Skip to content

fix(install): wave-5 follow-up — SHIPPED_DOCS sync + N3 stat-fallback comment - #36

Merged
artyhoo merged 1 commit into
mainfrom
fix/wave-5-follow-up-shipped-docs-sync
May 11, 2026
Merged

fix(install): wave-5 follow-up — SHIPPED_DOCS sync + N3 stat-fallback comment#36
artyhoo merged 1 commit into
mainfrom
fix/wave-5-follow-up-shipped-docs-sync

Conversation

@artyhoo

@artyhoo artyhoo commented May 11, 2026

Copy link
Copy Markdown
Owner

Summary

Post-merge follow-up to PR #35 (Wave 5.2+5.3 merged 2026-05-11). Addresses reviewer findings S1 (install.sh SHIPPED_DOCS stale vs principle 09 after Wave 5.1 added two skills/tool-bootstrapping/ paths to REQUIRED_HEADER_DOCS) and N3 (asymmetric stat-failure fallbacks in audit-ai-docs.sh D4 probe — logically correct, opaque on first read).

Changes

  • install.sh:50: pre-install header comment Wave 2 entries — 11Wave 2 + Wave 5.1 entries — 13.
  • install.sh:67-68: add skills/tool-bootstrapping/SKILL.md and skills/tool-bootstrapping/references/decision-format.md to SHIPPED_DOCS.
  • packages/core/principles/09-doc-authority-hierarchy.test.ts:131-164: rename WAVE_2_PREFIXESSHIPPED_DOC_PREFIXES, add skills/tool-bootstrapping/ prefix, update length expectation 11 → 13, refresh leading comment + it() title to reflect that the subset now covers Wave 2 + Wave 5.1.
  • packages/core/audit-self/audit-ai-docs.sh:204-206: N3 — two-line comment explaining why the stat-failure fallbacks are asymmetric (PKG=0 vs DEC=1 ensures PKG_MTIME ≤ DEC_MTIME on stat error, so a stat failure never produces a false stale-WARN).

Prior-art consult

Test plan

  • npx vitest run packages/core/principles/09-doc-authority-hierarchy.test.ts → 17/17 passed.
  • npm test --workspaces --if-present → 329 / 329 tests across 47 files passed (@rules-as-tests/core 291, @rules-as-tests/preset-next-15-canonical 38).
  • npm run typecheck --workspaces --if-present → clean across all 3 workspaces.
  • install.sh --dry-run from a fresh temp project with stub package.json✓ all 13 shipped artefacts carry valid headers.
  • Pre-push hook (10 files / 56 tests) → green.

§1.7 Forward-check applied

PR adds + relaxes a drift-detection meta-test (principle 09 covers a wider shipped-doc subset). Disciplines re-checked against this change before merge: (1) doc-authority-hierarchy — verified the two newly-listed paths (skills/tool-bootstrapping/SKILL.md, …/references/decision-format.md) both already carry > **Authoritative for:** headers (grep -c returned 1 each); (2) build-vs-reuse — confirmed this commit does not match any of the three capability-commit triggers in CLAUDE.md (no new dep, no new file ≥50 LOC under a new packages/core/<dir>/, no new file ≥80 LOC under packages/), so the Prior-art: skipped escape hatch with ≥20-char rationale is the correct trailer; (3) self-reflection — this §1.7 block is itself the recursive application; the rule about widening a meta-test is being applied to widening the meta-test.

§1.7 Backward-check applied

Sweep across already-shipped surfaces to confirm no other Wave 2 / 5.1 drift is being left on the floor: (1) install.sh:164-192 ships both skills/rules-as-tests/ and skills/tool-bootstrapping/ to .claude/skills/, but only the tool-bootstrapping skill files are in REQUIRED_HEADER_DOCS-shipped-subset — skills/rules-as-tests/SKILL.md + its 5 references are in REQUIRED_HEADER_DOCS but not in SHIPPED_DOCS, a pre-existing gap (not Wave 5.1 regression). Deliberately deferred: reviewer scoped S1 to Wave 5.1 drift; expanding to rules-as-tests would also require either (a) adding the 6 rules-as-tests doc paths to SHIPPED_DOCS and the skills/rules-as-tests/ prefix to the test, or (b) widening to skills/ prefix wholesale. Logged for next follow-up. (2) .claude/skills/tool-bootstrapping/{SKILL.md, references/decision-format.md} are in REQUIRED_HEADER_DOCS but intentionally not in SHIPPED_DOCS — they are project-internal copies of the skill, not consumer-shipped. (3) Reviewer findings N1 (Last reviewed: 2026-05-10 vs commit 2026-05-11) and N2 (grep -q "context7" substring match in setup.sh:291) — N1 is convention-not-bug per reviewer verdict; N2 has no concrete failure mode in the current .mcp.json shape — both captured here for future hardening if scenarios materialise, not blocking.

… comment

Address PR #35 post-merge review S1 (install.sh SHIPPED_DOCS stale vs
principle 09) and N3 (asymmetric stat fallback in D4 audit probe).

S1 — Wave 5.1 added two shipped surfaces to REQUIRED_HEADER_DOCS
(skills/tool-bootstrapping/SKILL.md + references/decision-format.md, see
packages/core/principles/09-doc-authority-hierarchy.ts:70-71), but
install.sh SHIPPED_DOCS pre-install fail-loud check was not updated.
Principle 09 PR-time CI still catches header drift, but install.sh
release-time check silently misses it — defeating Wave 3's purpose.

  - install.sh: add the two skills/tool-bootstrapping/ paths to
    SHIPPED_DOCS; update header comment 11 → 13 surfaces.
  - 09-doc-authority-hierarchy.test.ts: rename WAVE_2_PREFIXES →
    SHIPPED_DOC_PREFIXES, add skills/tool-bootstrapping/ prefix, update
    length expectation 11 → 13, and the test-name + leading comment to
    reflect that the subset now covers Wave 2 + Wave 5.1.

N3 — audit-ai-docs.sh D4 probe uses asymmetric stat-failure fallbacks
(PKG=0, DEC=1). Logically correct (ensures stat-error → no false stale
WARN) but opaque on first read. Added a two-line comment explaining the
intent so the asymmetry doesn't look like a typo.

Verification:
  - npx vitest run …/09-doc-authority-hierarchy.test.ts → 17/17 passed
  - npm test --workspaces → 329/329 passed (44 + 3 files)
  - npm run typecheck --workspaces → all 3 workspaces clean
  - install.sh --dry-run from temp project → "all 13 shipped artefacts
    carry valid headers"

N1 (Last-reviewed date convention) and N2 (grep -q context7 substring
match) intentionally not addressed in this PR — N1 is convention-not-bug
per reviewer; N2 is a pre-mature hardening with no concrete failure
mode. Captured for future hardening if the scenarios materialise.

Prior-art: skipped — follow-up fix syncing install.sh SHIPPED_DOCS with already-decided Wave 5.1 SSOT additions, no new capability
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.

1 participant