Wire agent docs into the audit harness and spec coverage - #144
Merged
Conversation
Three doc directories were unreferenced by any tool, so their contents could drift without anything failing. This connects each to the tool that should own it, and adds tests so the links cannot silently rot again. - docs/agent-tasks/fix-*.md -> tools/auditors/remediation/ These are audit fix runbooks. Four auditors pointed at doc paths that did not resolve, so audit findings linked nowhere. Paths are corrected, the files now sit next to the harness that references them, and audit_dispatch prints a remediation index for every auditor that fires. tests/contracts/test_auditor_wiring.py asserts every contract_file and remediation_doc on every auditor resolves to a real file. - docs/Dev-Docs/ -> tools/research/ The five leverage patterns are checklist items in the shape spec_extract already consumes. Each pattern gains an engine_mapping block (search tokens + scoped engine paths) and spec_extract emits a research_pattern category into the coverage matrix, so research becomes a tracked gap report rather than a static file. All five currently resolve to real subsystems (kge, hoprag, traversal/multihop, resolution, gds). tests/contracts/test_research_wiring.py pins it. - docs/agent-tasks/ dev playbooks -> .claude/skills/ Content is consolidated into the skills path agents actually load. add-action-handler.md documented a stale handler return shape and add-gate-type.md described a per-gate file layout that no longer matches engine/gates/types/all_gates.py; following either produced a broken change. The four files are marked status: deprecated with a banner, and DEFERRED-004 tracks their removal pending approval. Also: - make agent-check: one command mirroring CI's blocking set, so the 13 dead references to a nonexistent gate now resolve. - docs/contracts/README.md: validation commands matched CI incorrectly and implied covered surface that is not covered. Corrected, with a known-gaps table. Brittle hardcoded test counts are replaced with the command to compute them. Verified on this branch: verify_contracts, contract_scanner, check_action_refs, audit_harness, ruff check/format, and the full pytest suite all pass. Co-authored-by: Cursor <cursoragent@cursor.com>
|
❌ PR Too Large 📋 Best Practices for Large Changes
🚫 This PR is blocked until reviewable size limits are met. |
|
3 tasks
cryptoxdog
added a commit
that referenced
this pull request
Jul 24, 2026
The four files were last written on this branch before the L9_META pipeline and
contract-registry work landed, so the resume state pointed at PRs that have since
been opened and at next actions that are done.
activeContext.md is rewritten rather than appended: a session-end hook had
overwritten it in the main working tree with a bare template ("No summary
provided" plus a generic file list), which would have destroyed the PR #144
narrative this branch already carried. The rewrite keeps that context, folds in
#145-#148, and records the one non-obvious hazard — PR #147 already contains the
full-repo header stamp, so a second "meta-only" PR would duplicate it.
progress.md, tasks.md and tech-debt.md are additive; the three tech-debt entries
that appear removed are replaced by updated versions in the same commit.
Co-authored-by: Cursor <cursoragent@cursor.com>
cryptoxdog
added a commit
that referenced
this pull request
Jul 25, 2026
The four files were last written on this branch before the L9_META pipeline and
contract-registry work landed, so the resume state pointed at PRs that have since
been opened and at next actions that are done.
activeContext.md is rewritten rather than appended: a session-end hook had
overwritten it in the main working tree with a bare template ("No summary
provided" plus a generic file list), which would have destroyed the PR #144
narrative this branch already carried. The rewrite keeps that context, folds in
#145-#148, and records the one non-obvious hazard — PR #147 already contains the
full-repo header stamp, so a second "meta-only" PR would duplicate it.
progress.md, tasks.md and tech-debt.md are additive; the three tech-debt entries
that appear removed are replaced by updated versions in the same commit.
Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Three doc directories were referenced by no tool, so their contents could drift without anything failing. This connects each to the tool that should own it, and adds tests so the links cannot silently rot again.
docs/agent-tasks/fix-*.mdtools/auditors/remediation/docs/Dev-Docs/tools/research/tools/spec_extract.pyas spec-coverage inputdocs/agent-tasks/dev playbooks.claude/skills/What changed
Audit remediation links were broken. Four auditors pointed at
remediation_doc/contract_filepaths that did not resolve, so every finding linked nowhere. Paths are corrected, the runbooks moved next to the harness, andaudit_dispatchnow prints a remediation index listing the fix runbook for each auditor that produced findings.tests/contracts/test_auditor_wiring.pyasserts everycontract_fileandremediation_docon every registered auditor resolves to a real file.Research is now a tracked gap report. The five leverage patterns are checklist items in exactly the shape
spec_extractalready consumes. Each gains anengine_mappingblock (search tokens plus scoped engine paths), andspec_extractemits aresearch_patterncategory intoartifacts/coverage_matrix.json. All five currently resolve to real subsystems —engine/kge,engine/hoprag,engine/traversal/multihop.py,engine/resolution,engine/gds— so today they report IMPLEMENTED; the point is that a regression would now show up as PARTIAL/MISSING.tests/contracts/test_research_wiring.pypins the mapping.Two playbooks were actively wrong.
add-action-handler.mddocumented a stale handler return shape andadd-gate-type.mddescribed a one-file-per-gate layout that no longer matchesengine/gates/types/all_gates.py— following either produced a broken change. The four dev playbooks are markedstatus: deprecatedwith a banner pointing at their replacement skill. They are not deleted;DEFERRED-004tracks removal pending approval, per the destructive-operation rule.make agent-check— one command mirroring CI's blocking set (action refs, contract files, contract scan, lint, types, tests, audit harness). Thirteen references to this gate already existed in agent docs and pointed at nothing.docs/contracts/README.md— the documented validation commands did not match CI and implied covered surface that is not covered. Corrected, with an explicit known-gaps table (openapi-spec-validatorandjsonschemaare undeclared dependencies, so those tests skip in a clean environment). Hardcoded test counts are replaced with the command to compute them, since they were already stale.Scope note
The working tree this came from also contains unrelated in-progress work (chassis/engine/docker changes and a contract-registry expansion). This branch was built in an isolated worktree off
origin/mainand contains only the doc-wiring change set — nocontracts/*.yaml,chassis/,engine/, or workflow changes.artifacts/*are regenerated from this branch's content.artifacts/harness_report.mdis left untracked: its four siblings are tracked, but adding a new generated file to git is a separate decision the repo has not made.Test plan
Run from a clean checkout of this branch:
python3 tools/verify_contracts.py— all 20 present and wiredpython3 tools/contract_scanner.py— no violationspython3 tools/check_action_refs.py— passes (10 pre-existing pin-convention warnings)python3 tools/audit_harness.py— HARNESS PASSEDruff check . && ruff format --check .pytest tests/— full suite greenpytest tests/contracts/test_auditor_wiring.py tests/contracts/test_research_wiring.py— 37 tests, the new coveragemake agent-check— the new gate, end to endAll of the above were run on this branch before pushing.
make agent-check's mypy step could not be verified locally: themypyon PATH runs under Python 3.9 while the project targets 3.12, which is a pre-existing environment issue unrelated to this change. CI runs it correctly.Made with Cursor