chore: rightsize agent context per Claude 5 context-engineering guidance - #155
Conversation
AGENTS.md carried no codebase gotchas -- eight lines, all graphify. Every landmine in this repo (prebuilt shell binary for the kernel E2E, the 500-line cap escape hatch, capability-map generated markers, threat-claims test rows, canon-beats-sequence-file) was discoverable only by burning a full check.sh cycle. Rewritten around those. .claude/.codex/.opencode carried openspec 1.3.1 skills instructing `mv openspec/changes/<name> openspec/changes/archive/...` -- the raw-move ceremony check-omp-ceremony.sh forbids, but only guards in .omp/. Archiving from those harnesses left spec deltas unapplied. Deleted; .omp/ (1.6.0-beta.1, hand-patched) is the single maintained copy, and the CLI-archive rule now lives in AGENTS.md so it survives regeneration in any harness. Also: - .ignore keeps generated graph data out of agent search. 2,528 of 3,451 tracked files were graphify-out/cache content-addressed blobs (92MB); glob hits under graphify-out drop from 2,580 to 3. Git-neutral. - Dropped the PreToolUse hooks that re-injected the same graphify sentence on every Glob|Grep (.claude) and every Bash (.codex). - Graphify guidance reframed from a mandatory 235KB read before any architecture question to available-if-useful; dropped the dead graphify-out/wiki/index.md reference. - CLAUDE.md was byte-identical to AGENTS.md; now imports it. Gate: check-omp-ceremony, check-file-sizes, capability-map + tests, and openspec validate --all --strict all pass. No .rs or Cargo.* touched.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (36)
Disabled knowledge base sources:
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis change removes OpenSpec commands, skills, and hook configurations across supported tool integrations. It consolidates repository guidance in ChangesRepository workflow cleanup
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Applies Anthropic's new rules of context engineering for Claude 5 generation models to this repo's agent setup.
Correctness fix (not just bloat)
.claude,.codex, and.opencodecarried openspec 1.3.1 skills instructing:That is the raw-move ceremony
scripts/check-omp-ceremony.sh:31forbids — but the check only guards.omp/. Archiving a change from any of those three harnesses left spec deltas unapplied inopenspec/specs/. Six files also referencedopenspec-sync-specs/opsx-continue, forbidden by name atcheck-omp-ceremony.sh:37-39.Deleted.
.omp/(1.6.0-beta.1, hand-patched) is now the single maintained copy, and the CLI-archive rule was lifted intoAGENTS.mdso it survives regeneration in any harness.The hand-written
openspine-change-landing-ceremonyskill is a symlink into~/repos/agent-skillsand is untouched.Context changes
AGENTS.md: 8 graphify-only lines → 67 gotcha-dense linesCLAUDE.md→@AGENTS.md(was byte-identical).ignoreexcludes generated graph data from agent searchThe dropped hooks re-injected the same "read GRAPH_REPORT.md" sentence as
additionalContexton everyGlob/Grep(.claude/settings.json) and everyBash(.codex/hooks.json) — a sentence already present inAGENTS.md. The graphify rule also pointed atgraphify-out/wiki/index.md, which does not exist.Gotchas now captured in
AGENTS.md, each previously discoverable only by burning a fullcheck.shcycle:openspine-shellbinary; barecargo test --workspacefails// openspine:allow-large-module reason:escape, and the#[path = "<n>_tests.rs"]split habit (31 files use it)capabilities/capability-map.jsongenerates into two markdown files between markerstest:row indocs/threat-claims.mdmust name a real test.raw/*-log.md) beatsopenspine-change-sequence.mdon conflictSearch surface
2,528 of 3,451 tracked files (73%, 92MB) were
graphify-out/cache/content-addressed blobs walked by every glob and grep..ignoreis honoured only by ripgrep-family tools — git still tracks everything and the cache is intact, so the graphify pre-commit hook is unaffected (it regenerated the graph in this very commit).Verification
No
.rsorCargo.*touched, sofmt/clippy/cargo testcannot be affected. Every gate step that can respond to these changes ran and passed.Note
Two stale facts corrected while grounding
AGENTS.md: this repo runscargo test --workspace, not nextest (nonexteststring inscripts/,.github/, orCargo.toml), and-yis not forbidden in repo text — the actual rule is--yesonopenspec archiveonly.Summary by cubic
Rightsizes the agent context to match Claude 5 guidance by moving critical repo gotchas into
AGENTS.md, simplifying agent hooks, and excluding noisy graph data from agent search. Also fixes a correctness issue by removing outdated OpenSpec skills that violated the archive ceremony, with.omp/now the single source of truth.Refactors
AGENTS.mdwith key gotchas (E2E shell binary, 500-line cap/escape, capability-map markers, threat-claims test names, canon logs precedence);CLAUDE.mdnow imports it..claude,.codex,.opencodethat instructed forbidden raw moves and referenced banned commands; keep.omp/(1.6.0-beta.1) as the maintained copy; archive rule documented inAGENTS.md..ignoreto excludegraphify-out/cache/, dated subfolders, andgraphify-out/graph.jsonfrom agent glob/grep, cutting matches undergraphify-out/**/*.jsonfrom ~2,580 to 3; git tracking and the graphify pre-commit hook remain unchanged.graphify-out/wiki/index.mdreference.Verification
openspec validate --all --strict(46/0).fmt/clippy/cargo testunaffected.Written for commit 6bdb935. Summary will update on new commits.