feat(docs-hygiene): repo-wide sweep escalation for audit-derivability + apply the sweep's confirmed verdicts - #2695
Conversation
… empty-target no-op With no argument and a clean tree the skill dead-ended. It now reports the clean tree, then offers a confirmation-gated escalation to a corpus sweep of all tracked markdown, with prescribed defaults (tracked .md scope, batched read-only subagents, low bounded concurrency, capped spot-tests) presented as pre-filled interview answers. Decline or silence preserves the old no-op. The sweep contract now batches large corpora (~15-25 docs per subagent, grouped by directory affinity) instead of doc-by-doc fan-out, and pins default concurrency low (3-4) to favor rate-limit headroom over wall-clock. Adds eval 10 covering the offer-only escalation; bumps to 0.12.0. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NfA3WGc3me6akomM3iQNZo
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a76cbb0398
ℹ️ 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".
…ap defer, not waive Codex review on #2695 flagged two contract defects in the new escalation: the sweep still required one aggregate ledger through a single context/reply (unbounded at 1000+ docs), and the spot-test cap contradicted the hard rule that load-bearing deletions are always spot-tested. Sweep subagents now write per-document detail to batch ledger files and the reply carries only the aggregate, the confirmed-vs-provisional actionable subset, and ledger pointers; a flagged verdict past the cap is provisional — excluded from actionable routing until its deferred spot-test runs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NfA3WGc3me6akomM3iQNZo
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
…ome pointers Applies the spot-test-confirmed convert-to-pointer verdicts from the repo-wide derivability audit (1131 docs, fresh-context spot-tests): - claude-ops known-issues/context/registry-schema.md -> pointer at registry_manager.py's constants and validators - machine-health audit/TODO.md -> pointer at references/shared/approvals.md and references/windows/remediation-policy.md (its denylist summary had drifted) - repo-hygiene clean/reference/ecosystems.md -> pointer at cleanup-config.md and the clean-*.sh scripts; cleanup-config.md cross-reference updated - toolchain README -> defers behavior/flags/ecosystem surface to SKILL.md and the ecosystem-commands convention (its closed six-ecosystem list was stale; code supports seven) Deliberately NOT applied, with reasons: - five templates/checklist.md files: runtime scaffolds their skills instruct agents to copy and tick — functional artifacts, not restatements - scripts/linux/NOT_IMPLEMENTED.md: owns the same removal criterion that overturned the macOS sibling's verdict in spot-testing - root CLAUDE.md (empty): deliberate unhobble bare-baseline state from #2188 Patch version bumps + CHANGELOG entries for all four touched plugins. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NfA3WGc3me6akomM3iQNZo
|
Claude finished @kyle-sexton's task in 3m 45s —— View job Code review —
|
|
Claude finished @kyle-sexton's task in 48s —— View job Security Review
Skip gate met — no security-relevant surface. Reviewed the full diff (
No code, scripts, or GitHub Actions workflow files are touched. The new Per |
|
Last security-reviewed head: |
|
Claude has reviewed this PR 5 times. The lane skips further automatic reviews after 5; deleting this comment resets the count. |
…bset; pin sweep to tracked files Two internal-consistency findings from the automated code review on #2695: the corpus-scale output line re-admitted provisional (cap-deferred) verdicts into the actionable subset that the prescribed-defaults bullet and hard rules exclude them from — provisional verdicts are now reported separately for visibility, never as actionable. And the sweep action's contract now states the tracked-only scope (git ls-files scoped to the directory, matching the extract-ssot convention) so the escalation's promised scope matches what sweep actually does. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NfA3WGc3me6akomM3iQNZo
|
Claude finished @kyle-sexton's task in 1m 45s —— View job Claude finished @kyle-sexton's task in 3m
Code review —
|
|
Claude finished @kyle-sexton's task in 40s —— View job Security Review
Skip gate met — no security-relevant surface. This lane's relevance gate compares only the commits since the last-reviewed head (
No code, scripts, or GitHub Actions workflow files are touched by this commit. The change is prose-only within an agent-instruction Markdown file — no auth/access-control logic, no injection surface, no secrets/token handling, no trust-boundary crossing. Reviewing the full cumulative diff ( Per the skip gate ("change has no security-relevant surface after reading the diff"), stopping here with no findings. |
…e whole repo git ls-files '*.md' -- <dir> ORs its two pathspecs, so a directory-scoped sweep silently escalated to every tracked .md in the repo (reproduced: 1148 files vs 20 for plugins/discipline). The contract now prescribes the single combined pathspec form, git ls-files -- '<dir>/*.md', and names the trap. Found by a plugin-quality audit of this skill; introduced in 5206b56. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NfA3WGc3me6akomM3iQNZo
|
Claude finished @kyle-sexton's task in 43s —— View job Security Review
Skip gate met — no security-relevant surface. This lane's relevance gate compares only the commits since the last-reviewed head (
No code, scripts, or GitHub Actions workflow files are touched by this commit. The change is prose-only within an agent-instruction Markdown file, correcting a scope-widening documentation bug in an example command — no auth/access-control logic, no injection surface, no secrets/token handling, no trust-boundary crossing. Reviewing the full cumulative diff ( Per the skip gate ("change has no security-relevant surface after reading the diff"), stopping here with no findings. |
|
Claude finished @kyle-sexton's task in 2m 1s —— View job Code review —
|
…ents A /plugin-quality:audit pass over the components this session exercised (docs-hygiene:audit-derivability, guardrails hooks, markdown-format hook, session-flow:orchestrate, discipline correctors) produced 2 HIGH, 8 MEDIUM and ~17 LOW findings, each grounded in session evidence and current official docs. This applies every fixable one: docs-hygiene 0.12.0 (audit-derivability): - functional-artifact out-of-scope disposition + rubric test and worked examples (source of 5 wrong verdicts in the 1131-doc run) - git-log deliberate-state check before actionable verdicts on empty files - convert-to-pointer verdicts must verify their anchor exists - sweep: report scope+count pre-fan-out; same-basename batch routing and cross-batch reconciliation; sample keep verdicts (false-keep bound); scope exclusions defer to extract-ssot's codified list - read-only hard rule scoped to the repository; concurrency is a ceiling; internal #1258 citations qualified; dead pre-compute fallback fixed; aggregate gains routed/out-of-scope slots; 3 regression evals added guardrails 0.28.26: staged-write shape named in the bypass scope note and README residuals with the secret-guard consequence stated; harness-timeout fail-open residual documented at the alias budget. Narrow same-command mv detector + repo-layer content invariants recorded as follow-ups. (block-hook-bypass test suite: 426/426 pass.) markdown-format 0.11.17: skip notice states real re-check semantics and hook environment inheritance instead of claiming session-long skip and misdirecting to a re-install; markdownlint-cli2 added as an exact repo devDependency so the filesystem probe resolves in cloud sessions where hooks do not see profile-managed PATH layers. Monorepo workspace probe gap recorded as follow-up. session-flow 0.23.5 (orchestrate): fork-is-a-leaf reworded to the documented narrow claim; cap inventory now covers workflow/teammate runtime limits (the CPU-dependent cap that bound the evidence run at 2); ${CLAUDE_EFFORT} addendum self-detects direct-read fallback; sources.md re-verified 2026-08-15 (CPU clause, third concurrency rider, threshold riders, v2.1.232 fork default). discipline 0.12.8: manifest enumeration opened (setup was missing); scrutinize-dont-coast declares its third delta and disambiguates the two fork senses; reciprocal boundary pointers added in reason-dont-recite and pick-for-the-problem. Catalog regenerated. Not remediable here, recorded: session-start slash-registry timing (harness-level), fleet-wide command -v formatter sweep, workspace-level node_modules resolution. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NfA3WGc3me6akomM3iQNZo
|
Claude finished @kyle-sexton's task in 3m 27s —— View job Code review —
|
|
Claude finished @kyle-sexton's task in 1m 21s —— View job Security Review
Skip gate met — no security-relevant surface. This lane's relevance gate compares only the commits since the last-reviewed head (
No code, scripts (beyond the comment-only hook edits), or GitHub Actions workflow files carry logic changes. Nothing here touches auth/access-control, introduces an injection surface, handles secrets/tokens, or crosses a trust boundary. Consistent with this lane's prior passes on Per the skip gate ("change has no security-relevant surface after reading the diff"), stopping here with no findings. |
…or the skill-quality gate
The extract-ssot exclusion-list citation used a bare relative path, which
resolves against the citing skill's own directory — written as the
cross-skill form the gate prescribes
(${CLAUDE_PLUGIN_ROOT}/skills/extract-ssot/actions/identify.md). The
rewritten pre-compute injection regains a failure fallback (|| echo) so an
injection failure cannot inline an error string; the empty case stays owned
by the label.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NfA3WGc3me6akomM3iQNZo
|
Claude finished @kyle-sexton's task in 51s —— View job Security Review
Skip gate met — no security-relevant surface. This lane's relevance gate compares only the commits since the last-reviewed head (
No code, scripts, or GitHub Actions workflow files are touched by this commit. No auth/access-control logic, no injection surface, no secrets/token handling, no trust-boundary crossing. Consistent with this lane's prior passes on Per the skip gate ("change has no security-relevant surface after reading the diff"), stopping here with no findings. |
|
Claude finished @kyle-sexton's task in 3m 34s —— View job Code review —
|
…ot an undefined bucket Review finding on #2695: the aggregate line counted <r> routed-to-sibling with no disposition defined anywhere. It is now explicitly an annotation on a standing verdict (doc-duplication -> extract-ssot, line noise -> audit-noise, recorded in the rationale), counted so routed work stays visible in the aggregate — never a fifth verdict class. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NfA3WGc3me6akomM3iQNZo
|
Claude finished @kyle-sexton's task in 38s —— View job Security Review
Skip gate met — no security-relevant surface. This lane's relevance gate compares only the commits since the last-reviewed head (
This is a prose-only edit to an agent-instruction Markdown file. No code, scripts, or GitHub Actions workflow files are touched. No auth/access-control logic, no injection surface, no secrets/token handling, no trust-boundary crossing. Consistent with this lane's prior passes on Per the skip gate ("change has no security-relevant surface after reading the diff"), stopping here with no findings. |
… failure Review finding on #2695: the trailing || bound to head's exit status, so the fallback was dead — same defect as the one removed earlier. The injection now captures git status output first (s=$(...) && ... || echo), binding the fallback to git's own exit: verified firing in a non-repo dir and silent on both clean and dirty trees. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NfA3WGc3me6akomM3iQNZo
|
Claude finished @kyle-sexton's task in 53s —— View job Security Review
Skip gate met — no security-relevant surface. This lane's relevance gate compares only the commits since the last-reviewed head (
This is a read-only shell-command restructuring inside an agent-instruction Markdown file's pre-computed-context block (same Per the skip gate ("change has no security-relevant surface after reading the diff"), stopping here with no findings. |
…ame method-doc steps in discipline citations plugin-gate failed on the reworded markdown-format skip notice: the test at markdown-format.test.sh:886 asserted the old string. Assertion updated to the new text; suite passes 147/147 (block-noncanonical-commit suite also re-run clean, 213/213). Also completes the last open audit finding (discipline F4): the correctors' method-doc step citations now carry the step name alongside the number, so a loop renumbering cannot silently invalidate eight files. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NfA3WGc3me6akomM3iQNZo
|
Claude finished @kyle-sexton's task in 44s —— View job Security Review
Skip gate met — no security-relevant surface. This lane's relevance gate compares only the commits since the last-reviewed head (
No code, scripts (beyond the one test-assertion string), or GitHub Actions workflow files carry logic changes. Nothing here touches auth/access-control, introduces an injection surface, handles secrets/tokens, or crosses a trust boundary. Consistent with this lane's prior passes on Per the skip gate ("change has no security-relevant surface after reading the diff"), stopping here with no findings. |
…udit-derivability-o12zbc # Conflicts: # plugins/docs-hygiene/.claude-plugin/plugin.json # plugins/docs-hygiene/CHANGELOG.md # plugins/machine-health/CHANGELOG.md # plugins/session-flow/CHANGELOG.md
|
Claude finished @kyle-sexton's task in 1m 57s —— View job Security Review
Skip gate met — no security-relevant surface. This lane's relevance gate compares only the commits since the last-reviewed head ( Verified the actual PR diff is unaffected by this merge:
No code, scripts, or GitHub Actions workflow files carry any logic change from this commit. Nothing here touches auth/access-control, introduces an injection surface, handles secrets/tokens, or crosses a trust boundary — consistent with this lane's prior passes on Per the skip gate ("change has no security-relevant surface after reading the diff"), stopping here with no findings. |
…udit-derivability-o12zbc # Conflicts: # plugins/docs-hygiene/.claude-plugin/plugin.json # plugins/docs-hygiene/CHANGELOG.md
|
Claude finished @kyle-sexton's task in 57s —— View job Security Review
Skip gate met — no security-relevant surface. This lane's relevance gate compares only the commits since the last-reviewed head ( Verified the merge doesn't touch this PR's actual diff: No code, scripts, or GitHub Actions workflow files carry any new logic. Nothing in the true PR diff touches auth/access-control, introduces an injection surface, handles secrets/tokens, or crosses a trust boundary — consistent with this lane's prior passes on Per the skip gate ("this head already has a successful security review that still applies"), stopping here with no findings. |
…udit-derivability-o12zbc Resolve guardrails CHANGELOG conflict: keep main's 0.28.26 SECURITY fix (#2720) and renumber this PR's residual-docs changes to 0.28.27. Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
…udit-derivability-o12zbc
|
Claude finished @kyle-sexton's task in 2m 25s —— View job Security Review
Skip gate met — no security-relevant surface. This lane's relevance gate compares only the commits since the last-reviewed head ( Verified the actual PR diff is unaffected in substance:
This is a pure merge-conflict renumbering: No code, scripts, or GitHub Actions workflow files carry new logic. Nothing in the true PR diff touches auth/access-control, introduces an injection surface, handles secrets/tokens, or crosses a trust boundary — consistent with this lane's prior passes on Per the skip gate ("this head already has a successful security review that still applies"), stopping here with no findings. |
…ariants (#2771) ## Summary Implements the two deferred follow-ups from #2695 / issue #2731 for the Bash staged-write residual (`jq … > /tmp/x && mv /tmp/x <repo-file>`). ## Changes 1. **Narrow same-command detector** in `block-hook-bypass`: when an effective stdout redirect target is later reused in the same command as an `mv`/`cp` SOURCE toward a destination outside configured scratch roots, block. Path-identity keeps ordinary renames unblocked. Residuals disclosed: cross-tool-call staging, variable-carried paths, quoted/opaque sources, other movers (`install`/`rsync`/`dd`). 2. **Write-path-independent content invariants**: opt-in `/guardrails:setup apply install-pre-commit-content` installs a personal `.git/hooks/pre-commit` that scans staged blobs with the same secret + hardcoded-path pattern libs the Write|Edit guards use. Secret patterns extracted to `lib/secret-detection/secret-patterns.sh` so the two layers cannot drift. Version bump: guardrails **0.28.29**. ## Test plan - [x] `bash block-hook-bypass.test.sh` — 452/452 (includes #2731 staged-write cases) - [x] `bash lib/git-hooks/pre-commit-content-invariants.test.sh` — 8/8 - [x] `bash hooks/secret-pattern-detection.test.sh` — 54/54 (shared lib) - [x] Full guardrails `*.test.sh` suite — all pass - [x] `bash -n` on edited hooks; `validate-plugins.sh`; catalog/cheatsheet check Closes #2731 ## Related Refs #2695 (prior staged-write residual discussion); #2731 (closed by keyword above). --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
No linked issue
Summary
Three phases in one branch. First,
/docs-hygiene:audit-derivability's empty-target no-op became a confirmation-gated repo-wide sweep escalation, with thesweepcontract scaled to large corpora. Second, that sweep ran against this repo (1131 tracked.md, 68 batched read-only subagents, fresh-context spot-tests) and its confirmed verdicts were applied. Third, a/plugin-quality:auditof the five components this session exercised fed back fixes to the sweep skill itself and to four sibling plugins.Fix
Skill change (docs-hygiene 0.12.0): offer-only repo-wide escalation with prescribed defaults; large-corpus batching with bounded ledger output; the spot-test cap defers (provisional verdicts excluded from actionable routing), never waives; tracked-only sweep scope with single-combined-pathspec enumeration (
git ls-files -- '<dir>/*.md'— the earlier two-pathspec form OR'd and silently swept the whole repo); eval 10 added.Applied sweep verdicts (four plugins):
claude-ops0.32.3,machine-health0.10.3,repo-hygiene0.10.4 pointer conversions;toolchain0.13.1 README de-duplication. Deliberate holds recorded: five checklist runtime scaffolds, the LinuxNOT_IMPLEMENTED.mdplaceholder, the empty unhobble-baseline rootCLAUDE.md(#2188).Plugin-quality audit remediations:
docs-hygiene(audit-derivability): functional-artifact out-of-scope disposition (source of 5 wrong verdicts); git-log deliberate-state check before deleting empty files; pointer verdicts verify their anchors; sweep reports scope+count pre-fan-out, reconciles near-identical cross-batch siblings, samples keep verdicts, defers exclusions to extract-ssot's list; repo-scoped read-only rule; 3 regression evals.guardrails0.28.27: staged-write (producer > tmp && mv) named as a residual in the scope note + README with the secret-guard consequence stated; harness-timeout fail-open edge documented. Test suite 426/426. Follow-ups recorded (narrow same-command detector, repo-layer content invariants), deliberately not rushed.markdown-format0.11.17: skip notice states real semantics + hook environment inheritance (root cause: hooks inherit Claude Code's process env, not the shell profile, so nvm-provisioned tools are invisible to hooks);markdownlint-cli2added as exact repo devDependency so the filesystem probe resolves in cloud sessions.session-flow0.23.5 (orchestrate): fork claim narrowed to the documented sentence; workflow/teammate runtime caps added to the cap inventory (the CPU-dependent cap that bound the evidence run at 2 concurrent);${CLAUDE_EFFORT}self-detects direct-read fallback; sources re-verified 2026-08-15.discipline0.12.8: manifest enumeration opened; third declared delta counted; reciprocal sibling-boundary pointers.Verification
guardrailsblock-hook-bypass tests: 426/426 pass;bash -nclean on all edited hooks.generate-catalogregenerated +generate-cheatsheet --checkin sync;validate-plugins.shpassed; markdownlint 0 issues on 13 changed files; typos clean; all JSON validated.Related
Refs #2188 (unhobble bare baseline — reason the empty root
CLAUDE.mdis kept)🤖 Generated with Claude Code
https://claude.ai/code/session_01NfA3WGc3me6akomM3iQNZo