feat(review,docs-hygiene): wire documentation-existence admission pre-check#846
Conversation
…-check Adds a report-only existence-before-accuracy pre-check to doc-drift-detector and a whole-page admission pre-check to audit-noise, both reusing the shipped audit-derivability rubric by reference (optional namespaced skill invocation, degrading to the admission question standalone when unavailable). Ships as a portable-baseline default; a consuming repo's own declared documentation-existence convention overrides via the follow-our-standards resolution ladder. Never hard-codes melodic-software/standards. Closes #505
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Claude finished @kyle-sexton's task in 1m 19s —— View job Security Review
ScopeSix files changed: two agent/skill instruction files (markdown), two FindingsNo new exploitable security vulnerabilities introduced by this PR. Rationale for each surface checked: 1. Cross-plugin invocation ( 2. 3. 4. Org-override resolution ladder ( 5. Pre-computed context shell invocations in 6. No secrets, PII, credentials, or hardcoded paths introduced. 7. No GitHub Actions workflow changes. No No security issues to report. |
|
Claude finished @kyle-sexton's task in 2m 38s —— View job PR Review —
|
|
Tower merge-sit (T4 dark, stall protocol): CLEAN, 22/22 green, 0 unresolved threads. This was generated by AI (control tower, session 6). |
Resolves a version-stacking conflict in session-flow: origin/main landed 0.12.0 (new orient skill, hardened keep-going) after this branch bumped 0.11.0 -> 0.11.1. Restacked this PR's handoff doc-pointer fix on top as 0.12.1, preserving both CHANGELOG entries and origin's current nine-skill description. docs-hygiene had no collision -- the PR the conflict was suspected to be from (#846) is still open, not merged.
#846 (whole-page existence pre-check for audit-noise) merged to main moments ago and independently bumped docs-hygiene 0.8.0 -> 0.8.1 with a different CHANGELOG entry -- an exact version collision with this branch's own 0.8.0 -> 0.8.1 bump (git's 3-way merge silently kept one side since the version-string edit was textually identical on both, which would have masked this PR's fix entry). Restacked this PR's convention-roots parser fix on top as 0.8.2, keeping #846's 0.8.1 entry intact beneath it.
…o shared parse-concern-value helper (#847) ## Summary Final wiring of the ratified bounded-widen scope on #474: fold the last two verified hand-rolled `memory_dir`/`contract_dir` copies into #482's already-landed `parse-concern-value.sh` helper (merged via #756). - **`plugins/docs-hygiene/skills/audit-noise/scripts/lib/noise-shapes.sh`** — `audit_noise_convention_roots_pattern` hand-rolled the same naive `${val%%#*}`-first strip #482 fixed at its two hot sites (truncates a quoted value at an interior `#`), plus a defect unique to this copy: `${val//[[:space:]]/}` collapsed *all* interior whitespace, and there was no quote-stripping. Now resolves both keys through the shared helper, materialized to `plugins/docs-hygiene/skills/audit-noise/scripts/lib/parse-concern-value.sh` (byte-identical + mode-identical, `100755`, to the two existing copies) and registered in `scripts/sync-parse-concern-value.sh`'s `copies` array — the same upstream-SSOT + sync-materialization pattern as the two prior sites (installed plugins are cache-isolated and cannot `source` a sibling's file). - **`plugins/session-flow/skills/handoff/context/structure.md`** L116 — replaced the placeholder note (`# the concern file's memory_dir when set — resolve it first`, no mechanism named) with a pointer to the shared helper via the retro skill's Phase 1.1 as the worked call form. Doc note only: the handoff skill has no script of its own to rewire. Per the operator's ratified bounded-widen decision (2026-07-19T23:26Z) and the tower's 2026-07-21 decision comment on #474, the broader tracker-seam-resolution class (#470/#469/#432/#365/#369) stays explicitly OUT of scope. Version bumps stack past two independently-merged sibling PRs that landed while this one was open: docs-hygiene `0.8.0` → `0.8.2` (stacks past #846's `0.8.1`, an exact version collision resolved by re-numbering this PR's entry on top and preserving #846's CHANGELOG entry underneath); session-flow `0.11.0` → `0.12.1` (stacks past a merged `0.12.0` that added the `orient` skill). ## Related - #482 / #756 — landed the shared `parse-concern-value.sh` helper and its first two consumers; this PR extends it to the remaining two per the ratified bounded-widen scope. - #846 — merged concurrently with this PR and independently bumped `docs-hygiene` to `0.8.1`; this PR's version was restacked to `0.8.2` on top, both CHANGELOG entries preserved. - #470 / #469 / #432 / #365 / #369 — the broader tracker-seam-resolution class; explicitly excluded from this PR's scope per the operator's ratified decision. ## Test plan - [x] `bash plugins/docs-hygiene/skills/audit-noise/scripts/detect.test.sh` — 34/34 pass, including a new regression case: a quoted `memory_dir: ".scratch#dir/" # trailing comment` now correctly resolves to `.scratch#dir` (flags `.scratch#dir/foo/` as a concrete slice) instead of the old parser's silent truncation. - [x] Manual before/after demonstration of the two defects the old parser had: - Quoted + interior `#` + trailing comment + trailing slash: old `[.scratch]` (wrong — truncated inside the quotes) vs new `[.scratch#dir]` (correct). - Unquoted value with interior whitespace: old `[mydir]` (wrong — collapsed) vs new `[my dir]` (correct, surrounding whitespace trimmed only). - [x] `scripts/sync-parse-concern-value.sh --check` — all 3 plugin copies match `lib/parse-concern-value.sh`. - [x] `scripts/check-cross-plugin-source-drift.sh --check` — no unregistered/drifted clusters (the three copies have distinct within-plugin relpaths, so the generic drift check doesn't need to cluster them; the dedicated sync gate already covers them). - [x] `scripts/check-changelog-parity.sh --check` and `--check-bump origin/main` — both touched plugins (`docs-hygiene` 0.8.0→0.8.2, `session-flow` 0.11.0→0.12.1) carry matching CHANGELOG entries. - [x] `shellcheck` + `shfmt -d` — clean on all new/edited scripts. - [x] `scripts/validate-plugins.sh` — all manifests + catalog valid. Closes #474 --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Summary
review:doc-drift-detector— before classifying Stale/Missing/Aspirational, ask whether a reader with repository search could derive the page's content from the code itself; an admission failure routes to a new Deletion-candidate category (recommend relocate-then-delete, never auto-delete). Decisions, domain language, thin navigation, and policy/wiring pages always pass admission.docs-hygiene:audit-noiseahead of its five in-page NOISE shapes — a FAIL skips the in-page tier table and recommends relocate-then-delete instead.docs-hygiene:audit-derivabilityrubric by reference (namespaced skill invocation, optional — degrades to the admission question standalone when that plugin is unavailable), per the plugin-isolation convention already established in this repo (plugins/discovery/reference/artifact-protocol.md: "must not import sibling plugin internals or assume another plugin is installed").re-anchor:follow-our-standards's resolution ladder (repo-declared source → repo's own conventions → this portable baseline).melodic-software/standards(verified via grep on the diff) — the hard constraint from the issue holds.review0.14.8 → 0.14.9,docs-hygiene0.8.0 → 0.8.1, with CHANGELOG entries for both.Closes #505
Related
melodic-software/standards) — the merged documentation-existence convention this pre-check consumes./docs-hygiene:audit-derivability, the standalone rubric this PR reuses by reference; not closed by this PR.outward_write_mode) — non-binding here; both embeddings stay report-only/read-only.Test plan
skill-quality:checkonaudit-noise— PASS, 0 errors, 1 pre-existing warning (no Gotchas surface, unrelated to this change)melodic-software/standardsreference in the diffallowed-toolssemantics against https://code.claude.com/docs/en/skills — it is a pre-approval list, not a hard restriction, so the added pre-check can invokeRead/Grep/Skillunder normal permission handling even thoughaudit-noise's frontmatter only pre-approves its detect scriptgit log --show-signatureconfirms "Good git signature")