Version: @coldtea/abide 0.0.7
Many instructions in real AGENTS.md / CLAUDE.md files need more than the diff to judge. Examples: "reuse existing helpers", "deletes must cascade to referencing tables", "use the shared schema types". Today they end up as deferred, or as weak diff-only proxies, because the judge state is only {task, file(s), diff}.
Proposal: an opt-in per rule, check.context: true. Those rules get an extra context string in the state, built by a configurable local command such as contextCommand in the rubric or an env var. The command receives the changed files and symbols and prints bounded text, for example file outlines, callers and callees, and relevant schema definitions.
- Context rules go in a separate judge call, so every other rule's state stays byte-identical and fast.
- The context is capped by characters and by a time budget. On error or timeout it is omitted (fails open).
- Its token usage flows through the existing usage and spend accounting.
I prototyped this locally with a code-graph CLI as the provider.
- It applies to turn-phase checks and to
audit, where the context is built once per file and reused across chunks.
- A turn check went from about 300–400 ms to about 450–700 ms.
- An audit of 10 files went from 3.8 s to 8.7 s.
I'm happy to share the patch or open a PR if this direction is welcome.
Version: @coldtea/abide 0.0.7
Many instructions in real AGENTS.md / CLAUDE.md files need more than the diff to judge. Examples: "reuse existing helpers", "deletes must cascade to referencing tables", "use the shared schema types". Today they end up as
deferred, or as weak diff-only proxies, because the judge state is only{task, file(s), diff}.Proposal: an opt-in per rule,
check.context: true. Those rules get an extracontextstring in the state, built by a configurable local command such ascontextCommandin the rubric or an env var. The command receives the changed files and symbols and prints bounded text, for example file outlines, callers and callees, and relevant schema definitions.I prototyped this locally with a code-graph CLI as the provider.
audit, where the context is built once per file and reused across chunks.I'm happy to share the patch or open a PR if this direction is welcome.