An open API service indexing awesome lists of open source software.

https://github.com/waitdeadai/searchoclock-core

Universal core of Search o'Clock: a portable socx engine + adapters bringing date-aware, durable, double-validated failure-troubleshooting to any agentic CLI (Codex, Gemini, Cursor, opencode, Goose, Cline, shell, MCP).
https://github.com/waitdeadai/searchoclock-core

ai-agents claude-code cli codex developer-tools gemini-cli mcp opencode

Last synced: 5 days ago
JSON representation

Universal core of Search o'Clock: a portable socx engine + adapters bringing date-aware, durable, double-validated failure-troubleshooting to any agentic CLI (Codex, Gemini, Cursor, opencode, Goose, Cline, shell, MCP).

Awesome Lists containing this project

README

          

# Search o'Clock โ€” core (works in any agentic CLI) ๐Ÿ”Ž๐Ÿ•

[![License: Apache-2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)
![works anywhere](https://img.shields.io/badge/harness-agnostic-success)

> **Your AI keeps fixing bugs with answers from before its training cutoff.** It defaults to the
> old, most-common pattern instead of the current API, slaps on `--force` / `@ts-ignore` to make
> the error disappear, skips the web-search tool that's right there, and burns retry loops on the
> same stale guess. Bigger models don't fix this โ€” they trained on yesterday's code too.

**Search o'Clock** intercepts the failure, stamps **today's date**, and makes the agent research the
fix against **live, dated sources** โ€” pick the most **durable** one (not the fastest band-aid) โ€” and
have an **independent second model agree from the evidence** before the fix is trusted.

The Claude Code plugin is [its own repo / marketplace submission](https://github.com/waitdeadai/searchoclock).
**This** repo is the harness-agnostic **core** so *everyone* gets results โ€” Codex, Gemini CLI, Cursor,
opencode, Goose, Cline, Aider, and any shell.

## Why existing fixes don't cut it
- **A bigger model** still trains on yesterday's code and defaults to the old pattern.
- **`AGENTS.md` / system prompts** go stale and the model can ignore them โ€” a prompt is a suggestion, a hook is enforcement.
- **An optional `/command`** doesn't fire when you need it โ€” in-prompt good behavior stops transferring the moment the model can act ([arXiv:2602.16943](https://arxiv.org/abs/2602.16943)).
- **Self-review** doesn't work โ€” a model checking its own answer invents errors or rubber-stamps. You need a *separate* model. See [`docs/WHY.md`](docs/WHY.md).

## The core: one portable engine
`socx` is a dependency-light (`bash` + `python3`) deterministic engine. Given a failed command + error,
it emits a date-anchored, durability-ranked, double-validated **research protocol** on stdout. No model
is in its trigger path; it never blocks; any internal error โ†’ exit 0 (fail-open).

```
socx hook # read a normalized failure event (JSON) on stdin โ†’ protocol on stdout (for adapters)
socx run -- CMDโ€ฆ # run CMD; on non-zero exit, print the protocol (universal, no hooks needed)
socx text | json # debug render
socx selftest # exit 0 if it works
```

## Install โ€” pick your integration (precedence: native hook > shell-wrapper > MCP)

| Harness | Mechanism | How |
|---|---|---|
| **Claude Code** | native hook โœ… | the dedicated plugin โ€” `/plugin marketplace add waitdeadai/searchoclock` |
| **OpenAI Codex CLI** | native hook โœ… | `adapters/codex-cli/` โ€” PostToolUse fires on non-zero Bash exit |
| **Google Gemini CLI** | native hook โœ… (v0.26.0+) | `adapters/gemini-cli/` โ€” extension-bundled PostToolUse/AfterTool |
| **Cursor** | native hook โœ… (1.7+) | `adapters/cursor/` โ€” `afterShellExecution` in `.cursor/hooks.json` |
| **opencode** | native hook โœ… | `adapters/opencode/` โ€” `tool.execute.after` TS plugin (MCP-tool calls excluded, issue #2319) |
| **Goose** | native hook โœ… (v1.34.0+) | `adapters/goose/` โ€” PostToolUse hook |
| **Cline** | native hook โœ… (in-code) | `adapters/cline/` โ€” `@cline/sdk` lifecycle hook |
| **Aider ยท Crush ยท Amp ยท Continue** | shell-wrapper โœ… | no failure hook โ†’ `socx-run -- ` / aliases (`adapters/shell-wrapper/`) |
| **Hermes (Nous) ยท OpenClaw** | shell-wrapper / MCP | gateway/agent, no tool-lifecycle hook โ†’ wrap the backend command or MCP |
| **any MCP-capable harness** | MCP (supplement) | `mcp/` โ€” `research-on-failure` tool; model-elective, not guaranteed-on-failure |

> Adapter mechanisms are from each tool's 2026 docs; some hook schemas evolve fast โ€” each adapter
> folder notes the doc to confirm against. The **shell-wrapper works everywhere** and needs nothing
> from the harness, so start there if in doubt.

### 30-second universal start (any CLI)
```bash
git clone https://github.com/waitdeadai/searchoclock-core
export PATH="$PWD/searchoclock-core:$PATH"
# wrap the commands your agent runs:
socx-run -- npm run build
# or alias them so failures always trigger research:
alias build='socx-run -- npm run build'
```

## Configuration
Same knobs as the plugin, read as `SOCX_*` (or `SEARCHOCLOCK_*`): `ENABLE`, `SOLUTION_MODE` (durable|fast|both),
`MIN_CANDIDATES`, `PROBE_ALL`, `VALIDATE`, `VALIDATOR_MODEL`, `VALIDATE_MIN_CONFIDENCE`, `COOLDOWN_SEC`,
`MIN_INTERVAL_SEC`, `MAX_PER_SESSION`, `SEVERITY_MIN`, `GOAL_SCOPE`, `STATE_DIR`, `HARNESS` (label shown in the protocol).

## Relationship to the Claude Code plugin
The plugin is the polished, marketplace-validated Claude Code adapter. This core is the shared engine +
the other-harness adapters. They keep the **same protocol, durability rubric, and double-validation** so a
fix you'd get in Claude Code is the fix you'd get anywhere. `adapters/claude-code/` is the reference adapter.

## Sister tools
Part of the [waitdeadai](https://github.com/waitdeadai) family of Claude Code governance hooks โ€”
[`searchoclock`](https://github.com/waitdeadai/searchoclock) (the Claude Code plugin),
[`time-anchor`](https://github.com/waitdeadai/time-anchor),
[`no-sycophancy`](https://github.com/waitdeadai/no-sycophancy),
[`llm-dark-patterns`](https://github.com/waitdeadai/llm-dark-patterns). More at [waitdead.com](https://waitdead.com).

## License
Apache-2.0. See [LICENSE](LICENSE).