Skip to content

feat(codebase-health): route the audit's Boundary to the seven sibling drift lanes - #3828

Merged
kyle-sexton merged 3 commits into
mainfrom
claude/3810-audit-boundary-routing
Sep 6, 2026
Merged

feat(codebase-health): route the audit's Boundary to the seven sibling drift lanes#3828
kyle-sexton merged 3 commits into
mainfrom
claude/3810-audit-boundary-routing

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Closes #3810

Summary

/codebase-health:audit covers doc, config, code, and architecture drift. Seven sibling lanes each own a different kind of drift, and the skill named exactly one of them (claude-config), in a paragraph buried inside the graceful-degrade section. An operator who reached this skill had no path to the other six, so a request that belonged to another lane got claim-extraction run over it instead of a route.

Fix

plugins/codebase-health/skills/audit/SKILL.md gains a ## Boundary, the adjacent drift lanes section, placed between the graceful-degrade section and the dimension seam. It follows the routing-table shape already used by overengineering:justify: a presence-gating preamble, then one table row per lane stating what that lane owns.

Lane What it owns Verified
review's doc-drift-detector agent doc/code drift (stale, missing, aspirational), both in a change under review and in its standalone repo-wide sweep plugins/review/agents/doc-drift-detector.md; listed in skills/fanout/context/leaf-roster.md and dispatched by run-everything-mode.md
/session-flow:reanchor a session's working assumptions: base-branch movement, stale handoffs, referenced PRs/issues/branches plugins/session-flow/skills/reanchor/SKILL.md
/discipline:recheck-against-upstream the surface in flight vs CURRENT official upstream docs plugins/discipline/skills/recheck-against-upstream/SKILL.md
/provenance:audit prose restating an external source with no pointer; expired verification stamps plugins/provenance/skills/audit/SKILL.md
/claude-config:audit (+ audit-automation-gaps, audit-instructions) settings.json, .mcp.json, hooks, permissions, env vars, and instruction-surface text judged against model capability or against how Claude Code actually behaves plugins/claude-config/skills/audit/SKILL.md, .../audit-instructions/SKILL.md
/instruction-placement:delta what moved since the last placement audit plugins/instruction-placement/skills/delta/SKILL.md
/overengineering:delta what moved in the enforcement surface since the last enforcement audit plugins/overengineering/skills/delta/SKILL.md

Each name was read out of its own SKILL.md (or agent frontmatter) rather than recalled, so no row asserts a capability the target does not have.

Supporting points:

  • Presence gating. The preamble states the contract once for the whole table: when the named plugin is installed, route there and invoke via the Skill tool; when it is not, say the lane is out of this skill's scope and name what would have owned it. Closing line: never assert that an absent skill is available.
  • The two rows that actually overlap this skill say where the line falls. doc-drift-detector audits every doc area when invoked with no scope (plugins/review/agents/doc-drift-detector.md, Workflow step 1), and its description triggers on "audit documentation" and "find stale docs" during maintenance cycles. That standalone mode is the one place it collides with this skill's documentation dimension, so the row names it and splits the sweep by question: whether a page deserves to exist is the agent's (it runs a derivability admission gate this skill has no equivalent of), whether a page's claims are true is this skill's. The claude-config row adds audit-instructions, the nearest unnamed misroute: Phase 0 reads CLAUDE.md, AGENTS.md, and .claude/rules/, and a claim those files make about the harness is not repo state this skill can verify; the row says they are read here only as the convention lens.
  • No duplication. The old claude-config-only paragraph in the skill body and the matching clause in the README intro are both folded into the table row rather than left as further statements of the same rule; 0.8.9 already did a pass removing restated rules from this file.
  • Delta disambiguation. A closing note says the two delta lanes track their own prior runs, not this audit's findings, since this skill keeps no baseline.
  • README points at the new section with an anchor link instead of repeating the table.
  • Frontmatter description untouched. Nothing in the listing entry changed.

Out of scope per the issue and untouched here: what the audit detects, how it reports, and all seven sibling skills.

Verification

Run from /home/user/wt-3810 on the committed state (re-run after the follow-up routing commit; results unchanged).

Command Result
bash scripts/affected-tests.sh --explain all 4 changed files map to recorded no-suite classes (non-shell CI lanes cover them)
bash scripts/affected-tests.sh --run exit 0, no suites selected
CHECK_SKILL_SKILLS_ROOT=$PWD bash plugins/skill-quality/scripts/check-skill.sh plugins/codebase-health/skills/audit PASS — 0 errors, 7 warning(s); the same 7 warnings appear on the pre-change file (line numbers shifted only)
bash plugins/skill-quality/scripts/check-listing-budget.sh plugins/codebase-health/skills OK — aggregate 562/8000 chars, byte-identical to the pre-change measurement (description unchanged)
bash scripts/check-purged-em-dashes.sh 91 declared paths, 122 files scanned, no em dashes
npx markdownlint-cli2 on the 3 changed markdown files 0 issues
bash scripts/check-changelog-parity.sh --check pass
bash scripts/check-changelog-parity.sh --check-order pass, 90 changelogs newest-first
bash scripts/check-changelog-parity.sh --check-bump origin/main pass, 0.9.0 entry present for the bumped manifest
bash scripts/check-changelog-parity.sh --check-preserved origin/main pass, 20 headings preserved

The README anchor #boundary-the-adjacent-drift-lanes still resolves: the heading text is unchanged at SKILL.md:67.

Manifest bumped 0.8.90.9.0 (additive section) with a matching ## [0.9.0] CHANGELOG entry. The follow-up routing commit refines the same unreleased entry and adds no further bump.

docs/SKILL-CHEAT-SHEET.md and docs/CATALOG.md render metadata.summary and the plugin-manifest description respectively; neither changed, so neither doc row needed editing.

Not from this branch: test_save_point.py::test_new_origin_falls_back_to_directory_name fails identically on pristine origin/main.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_01ViPsHkL3ng9xWt2GjEQJob


Generated by Claude Code

…g drift lanes

The audit skill covers doc, config, code, and architecture drift, and named
only one adjacent lane. An operator who reached it had no path to the other
six, so a request that belonged elsewhere got claim-extraction run over it.

Add a `Boundary, the adjacent drift lanes` section: one table row per lane,
each stating what that lane owns. The prior claude-config-only scope note is
folded into the table rather than left as a second statement of the same rule.
Every route is presence-gated; an absent plugin means the lane is named as out
of scope, never asserted as available. The README points at the section
instead of repeating it. Frontmatter description untouched, so the listing
entry is unchanged at 562 chars.

Closes #3810

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ViPsHkL3ng9xWt2GjEQJob
…kill

Two rows of the new Boundary table described the case where the lanes do not
collide and stayed silent on the case where they do.

`doc-drift-detector` was scoped to "a change under review", but that agent
audits every doc area when invoked with no scope, and its own description
triggers on "audit documentation" and "find stale docs" during maintenance
cycles. That standalone mode is exactly where it overlaps this skill's
`documentation` dimension, so the row now names it and splits the sweep by
question: whether a page deserves to exist is the agent's, it runs a
derivability admission gate this skill has no equivalent of; whether a page's
claims are true is this skill's.

The claude-config row named `audit` and `audit-automation-gaps` but not
`audit-instructions`, the nearest unnamed misroute: Phase 0 reads `CLAUDE.md`,
`AGENTS.md`, and `.claude/rules/`, and a claim those files make about the
harness is not repo state this skill can verify. The row adds it and says the
instruction files are read here only as the convention lens.

The README's claude-config scope note survived the first fold three lines above
the paragraph that anchors to the table routing the same lane. Folded, so the
table is the single place that rule lives.

No manifest bump; 0.9.0 already covers this change.

Closes #3810

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ViPsHkL3ng9xWt2GjEQJob
@kyle-sexton
kyle-sexton marked this pull request as ready for review September 6, 2026 08:24
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 6, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-06T08:28:14.136983Z 886ba84 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@claude

claude Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Claude finished @kyle-sexton's task in 5m 4s —— View job


Code review complete

  • Gather context (PR diff, CLAUDE.md/AGENTS.md, REVIEW.md)
  • Run skip-gate checks (PR is open, not draft; security lane exists at .github/workflows/claude-security-review.yml, so security findings are out of scope here)
  • Review changed files for correctness/maintainability
  • Post findings

This is a docs-only change (SKILL.md, README.md, CHANGELOG.md, plugin.json). I verified every one of the seven new Boundary table rows against its actual source (agent frontmatter / SKILL.md description) rather than trusting the PR body's own claims — all seven targets exist and the capability descriptions match:

  • plugins/review/agents/doc-drift-detector.md (repo-wide sweep + derivability admission gate — confirmed)
  • plugins/session-flow/skills/reanchor/SKILL.md
  • plugins/discipline/skills/recheck-against-upstream/SKILL.md
  • plugins/provenance/skills/audit/SKILL.md
  • plugins/claude-config/skills/audit/SKILL.md, audit-automation-gaps/SKILL.md, audit-instructions/SKILL.md
  • plugins/instruction-placement/skills/delta/SKILL.md
  • plugins/overengineering/skills/delta/SKILL.md

The README anchor (skills/audit/SKILL.md#boundary-the-adjacent-drift-lanes) resolves correctly against the new heading, and the CHANGELOG/version bump (0.8.90.9.0, additive) follows the plugin's existing format.

One inline nit posted on the invocation-mechanism wording (Skill tool vs. agent invocation).

One cross-file finding, no changed line to anchor it to:

The skill's evals/evals.json already carries a "boundary route" eval — boundary-route-to-claude-config — that exercises exactly this kind of routing behavior for the pre-existing claude-config lane. This PR adds six more routing destinations to the new Boundary section (doc-drift-detector, session-flow:reanchor, discipline:recheck-against-upstream, provenance:audit, instruction-placement:delta, overengineering:delta) but evals.json wasn't touched — none of the six get an eval case. check-skill.sh's evals check (check 14) only verifies the file's presence, not per-behavior coverage, so this gap wouldn't be caught by the PR's own verification run (PASS — 0 errors, 7 warning(s), same warnings pre/post-change). Given the established precedent of one eval per boundary route, the new rows look like a concrete, addressable gap rather than a generic "add more tests" ask.

Everything else — presence-gating contract, the two overlap disambiguations (doc-drift-detector's repo-wide mode vs. this skill's documentation dimension; claude-config:audit-instructions vs. Phase 0's convention-lens read of CLAUDE.md/AGENTS.md), the delta-lane closing note, and the no-duplication cleanup in the README/skill body — checked out against source.

Note: I could not independently re-run the PR's cited verification commands (affected-tests.sh, check-skill.sh, markdownlint-cli2, etc.) in this sandbox — those results are author-claimed and unverified by me; my review above is based on reading the changed files and their cited targets directly.

Branch: claude/3810-audit-boundary-routing

Copy link
Copy Markdown
Contributor Author

Independent review and the fix it produced — flipped to ready

Posted by the autonomous worker lane (vm-worker-202609050257). Commit 886ba846. This flip is the lane's handoff; the merge lane owns it from here. This lane does not merge.

A fresh-context reviewer verified every routing claim individually against the target's own frontmatter and body, because a Boundary section that sounds authoritative and routes wrong is worse than none.

Verified

Check Result
Targets exist at claimed paths 7 of 7
Descriptions match their own definitions 6 of 7 verbatim in substance; 1 drifted (fixed below)
Roster claims Confirmed at leaf-roster.md:12 and run-everything-mode.md:62
Table shape Correctly mirrors overengineering/skills/justify/SKILL.md:200-214, presence-gating preamble included
Version bump Minor is right — every ### Added in this plugin landed as a minor; ### Changed/### Fixed take patches
check-skill.sh warnings Same 7, line numbers shifted +16. No new warning
No-suite mapping Legitimate — all four files fall under documented classes whose named covering lanes genuinely reach these paths

The blocking finding

The doc-drift-detector row scoped it to "a change under review". But that agent audits repo-wide when invoked without a scope, and its description triggers on "audit documentation" and "find stale docs" during maintenance cycles. So the row described the one case where the two skills do not collide and stayed silent on the case where they do — hiding the misroute it exists to prevent.

The fix reads better than a simple widening: it splits the overlap by question rather than by scope. Whether a page should exist at all is the agent's (it runs a derivability admission gate this skill has no equivalent of, confirmed by grep); whether a page's claims are true is this skill's, with --docs-only named as the way to scope to it.

Two smaller ones, both real

  • The README's claude-config clause was still duplicating a rule the table now owns — folded. The worker also caught something not in the review: the anchor paragraph's parenthetical list had gone stale against the two widened rows.
  • /claude-config:audit-instructions was added, with the overlap justified rather than assumed: Phase 0 reads CLAUDE.md/AGENTS.md/.claude/rules/, while audit-instructions owns claims those files make about the harness and about model capability, which are not repo state this skill can verify. It widened the existing claude-config row rather than adding an eighth, keeping the "Seven adjacent lanes" preamble and the README wording true.

Gates green in the foreground: affected-tests.sh --run exit 0, check-skill.sh PASS 0 errors / 7 unchanged warnings, listing budget unchanged at 562/8000, em-dash purge clean with a diff-only scan confirming zero on added lines, markdownlint 0 issues, all four changelog-parity modes pass, README anchor still resolves.


Generated by Claude Code

@claude

claude Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Claude finished @kyle-sexton's task in 40s —— View job


Security review complete

  • Gather context (PR diff, description, changed files)
  • Run /review:security-review per instructions
  • Post findings

Skip gate triggered: this PR has no security-relevant surface. All four changed files are documentation and manifest metadata:

  • plugins/codebase-health/.claude-plugin/plugin.json — version bump only (0.8.90.9.0)
  • plugins/codebase-health/CHANGELOG.md — changelog entry
  • plugins/codebase-health/README.md — prose pointing to the new section, no code
  • plugins/codebase-health/skills/audit/SKILL.md — adds a routing table (prose) to an existing skill body; no new tool grants, no allowed-tools change, no shell commands, no executable logic

There's no code execution path, no auth/access-control logic, no injection surface (command/SQL/path/template), and no secret/token handling touched by this diff. Nothing here falls in this lane's scope.

No security issues found. Nothing to report.

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Last security-reviewed head: 886ba846fe313b90b74d0630583908c36c8bb577. On the next push, the relevance gate compares only the commits since this SHA; delete this comment to force a full re-review.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 886ba846fe

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/codebase-health/skills/audit/SKILL.md
Comment thread plugins/codebase-health/skills/audit/SKILL.md Outdated
Comment thread plugins/codebase-health/skills/audit/SKILL.md Outdated
Comment thread plugins/codebase-health/skills/audit/SKILL.md Outdated
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Claude has reviewed this PR 1 time. The lane skips further automatic reviews after 5; deleting this comment resets the count.

Copy link
Copy Markdown
Contributor Author

Merge lane claim — canonical for #3810, and the diagnosis of blocked

Claimed at head 886ba846fe313b90b74d0630583908c36c8bb577 by ccr-session-babysit-loop-20260906. No foreign activity in the preceding 30 minutes; this PR had been untouched for roughly 10 hours.

Duplicate resolved

#3829 worked #3810 independently from a second worker-lane session and produced the same four-file change. It is closed as superseded by this PR under the lowest-number tiebreak, with the evidence recorded there.

Why this PR reports blocked, and it is not CI

CI is green. The ci-status and lint failure/cancelled entries on this head are superseded runs: the latest run of each name is lint success at 08:25:19Z and ci-status success at 08:29:09Z, and the ci-lanes commit status is success.

blocked comes from unresolved review conversations. This head carries four open threads, none of them outdated. The control case confirms it: #3829 and #3834 both report clean, and both have zero unresolved threads (#3829's single thread was resolved by its author, #3834 never had one).

The four open threads:

  1. P1, codex, SKILL.md:80 — routing an upstream-divergence request to /discipline:recheck-against-upstream lets a bare, read-only audit invoke a corrector whose own body says "Correct each forward now", contradicting this skill's contract that remediation requires --fix.
  2. P2, codex, SKILL.md:78 — contradictory ownership of factual doc drift: the row assigns stale docs to doc-drift-detector while its closing clause keeps claim-truth here, so a repo-wide --docs-only request has two incompatible instructions.
  3. P2, codex, SKILL.md:78 — the /review:fanout route names no mode, and the default lifecycle-tiered mode never dispatches doc-drift-detector; only run-everything does.
  4. Nit, claude, SKILL.md:72 — the preamble asserts "invoke it via the Skill tool" for all seven rows, but row 1 targets an agent, invoked @review:doc-drift-detector.

All four are textual, confined to the Boundary section of one file, and branch-owned. Finding 1 is the same one the now-closed #3829 already fixed in ee167e88a; that remediation is being ported here with attribution to #3829, not presented as this lane's own reasoning.

I am fixing all four rather than resolving the threads around them.


Merge lane ccr-session-babysit-loop-20260906.


Generated by Claude Code

Addresses the four open review threads holding this PR at blocked.

P1, the read-only contract. The preamble told a bare audit to "route
there and invoke it via the Skill tool". /discipline:recheck-against-
upstream says "Correct each forward now: fix gaps toward upstream", and
bare audit is READ-ONLY per the verb contract, so that let the skill edit
the repo through a sibling. The table is now a router for the operator: a
request owned by another lane is reported as uncovered and the lane is
named as the next thing to run, whether or not its plugin is installed.
--fix authorizes remediation of this skill's own findings only.

P2, contradictory ownership of factual doc drift. The dispatch rule is
now the question asked, not the scope swept. Whether a page deserves to
exist is the agent's derivability gate; whether its claims are true is
always this skill's, repo-wide included, and --docs-only never routes
out.

P2, the unnamed fanout mode. The row now names /review:fanout
run-everything, verified: doc-drift-detector appears in
context/run-everything-mode.md and not in context/default-mode.md, so an
unqualified /review:fanout can finish without reaching the owner.

Nit, agent vs skill. The blanket "via the Skill tool" clause is gone;
each row states its own invocation form and row 1 names the Agent tool.

The read-only routing contract is ported from #3829, the parallel
independent PR on #3810 now closed as a duplicate, with attribution in
the CHANGELOG. Heading text is unchanged, so the README anchor still
resolves.

Verification: affected-tests.sh --explain/--run (all 4 files are recorded
no-suite classes), check-skill.sh PASS 0 errors 7 warnings (unchanged
from before), check-listing-budget 562/8000 unchanged, markdownlint 0
issues, check-purged-em-dashes clean, changelog parity --check and
--check-bump pass. Manifest stays 0.9.0; this refines the unreleased
entry rather than adding a bump.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VPLatLkg4329L8eyfxhuMa
@kyle-sexton
kyle-sexton merged commit ad0e187 into main Sep 6, 2026
12 checks passed
@kyle-sexton
kyle-sexton deleted the claude/3810-audit-boundary-routing branch September 6, 2026 21:46
kyle-sexton added a commit that referenced this pull request Sep 6, 2026
… verification (#3809)

v1 evidence restated as class-level with no lane-specific run record and
the ruling made a dispatch gate; ci-cron reduced to a fact plus an
illustrative binding with no exclusion; audit lane given a deterministic
pre-invocation target check; rotation index tables; no-path grep widened;
precedent, counts, and PR #3828 status corrected.

Refs #3809
Refs #3803

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012jiwedVq2GxuzN7siXQbr4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

codebase-health/audit: Boundary routes to the sibling drift lanes

2 participants