Skip to content

docs(hygiene): land tools/hygiene/AUDIT-LIFECYCLE.md — reusable template#3710

Merged
AceHack merged 2 commits into
mainfrom
docs/audit-lifecycle-pattern-otto-cli-2026-05-16
May 16, 2026
Merged

docs(hygiene): land tools/hygiene/AUDIT-LIFECYCLE.md — reusable template#3710
AceHack merged 2 commits into
mainfrom
docs/audit-lifecycle-pattern-otto-cli-2026-05-16

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented May 16, 2026

What

New doc at tools/hygiene/AUDIT-LIFECYCLE.md capturing the 7-step pattern shared by both repo-hygiene audits that have completed it:

  1. Discovery — bug class named, instance observed
  2. Narrow fix — per-instance fix, no audit yet
  3. Scanner — detect-only audit
  4. Quality iterations — false positives, edge cases, cross-platform
  5. Baseline — grandfather mechanism for immutable surfaces
  6. CI enforce gate — non-required lint (xxx) job
  7. Maintenance — shrink baseline; eventually delete

Worked examples in the doc

Includes

Step-ordering rationale, mutable-vs-immutable surface distinction for baseline strategy, pre-emptive scanner-author findings worth implementing in step 3 to shorten the quality loop.

Co-Authored-By: Claude noreply@anthropic.com

Promotes the audit-lifecycle pattern (discovery → narrow-fix → scanner →
quality iterations → baseline → CI enforce gate → maintenance) to a
canonical doc co-located with the hygiene-audit tooling.

Two worked examples documented:
1. §33 migration xrefs audit (PR #3513#3552 → enforce; ~4 weeks)
2. Tick-shard relative-path audit (PR #3676#3708; ~80 min single
   autonomous-loop session)

Captures the step-ordering rationale (why each step depends on the
previous), the mutable-vs-immutable surface distinction for baseline
strategy, and pre-emptive scanner-author findings worth implementing
in step 3 to shorten the quality iteration loop:
- sonarjs disable comment
- main export + import.meta.main guard
- generic URI scheme regex
- --files validation (existsSync + statSync.isFile)
- platform-correct PATH_SEP
- JSON output schema discipline
- baseline schema type guard

Local markdownlint clean.

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 16, 2026 03:34
@AceHack AceHack enabled auto-merge (squash) May 16, 2026 03:34
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a reusable hygiene-audit lifecycle template for turning recurring repository hygiene defects into scanner-backed CI gates.

Changes:

  • Documents the 7-step audit pattern from discovery through maintenance.
  • Adds worked examples for §33 migration xrefs and tick-shard relative-path audits.
  • Captures guidance on baseline strategy, scanner-quality pitfalls, and schema validation.

Comment thread tools/hygiene/AUDIT-LIFECYCLE.md Outdated
Comment thread tools/hygiene/AUDIT-LIFECYCLE.md Outdated
AceHack added a commit that referenced this pull request May 16, 2026
…3710) (#3711)

Tick 15: promoted the audit-lifecycle pattern to a canonical doc at
tools/hygiene/AUDIT-LIFECYCLE.md. 7-step pattern + 2 worked examples
(§33 audit ~4 weeks; tick-shard relative-path audit ~80 min single
session). Pre-emptive scanner-author findings documented to shorten
the quality iteration loop for future audit work.

All 3 prior-tick PRs (#3707/#3708/#3709) still armed + awaiting CI.

Co-authored-by: Claude <noreply@anthropic.com>
…ection

Two real Copilot findings on the §33 worked-example table:

P2 (line 37): direct name attribution outside allowed roster surfaces.
"Codex P2 catch on Riven section-33 archive migration" used Zeta persona
names inline. Replace with role-ref: "Reviewer P2 catch on the section-33
archive-migration PR". (Copilot stays as-is — it's an external automated-
reviewer role-ref, accepted style per existing gate.yml comments.)

Line 44 (factual error): I'd attributed BOTH baseline cleanup AND CI
enforce to PR #3552. Verified via git log + gh api:
- PR #3552 (Slice A): "baseline cleanup — 10 dead xrefs → 0"
- PR #3555 (Slice B.3 + B.4): "--enforce flag + gate.yml wiring"

Split the row: PR #3552 = "Baseline (cleanup-to-zero)"; PR #3555 = "CI enforce"
with sub-slice attribution preserved. Calendar duration range extended to
PR #3513 → PR #3555.

Co-Authored-By: Claude <noreply@anthropic.com>
@AceHack AceHack merged commit 16adc54 into main May 16, 2026
29 checks passed
@AceHack AceHack deleted the docs/audit-lifecycle-pattern-otto-cli-2026-05-16 branch May 16, 2026 03:42
AceHack added a commit that referenced this pull request May 16, 2026
…stale/FP) (#3715)

PR #3707 + #3708 merged. 6 new Copilot threads investigated:
- PR #3710 (AUDIT-LIFECYCLE.md): 2 real — name attribution (Codex/Riven →
  role-refs) + §33 PR-attribution factual error (PR #3552 baseline cleanup
  + PR #3555 CI enforce, not both #3552). Fixup cd7ba81.
- PR #3709 (0328Z shard): 4 threads — 2 stale (0322Z merged via #3707),
  1 minor prose-drift, 1 false-positive (4th time on table-pipes). All
  resolved no-op.

The Copilot table-pipe || hallucination is now a 4-time pattern (#3685,
#3690, #3699-era, #3709) — verify-first-resolve-no-op discipline.

Co-authored-by: Claude <noreply@anthropic.com>
AceHack added a commit that referenced this pull request May 16, 2026
…ed (PR #3716) (#3717)

Tick 17: bundled the 3 per-tick self-checks (MD032 awk + markdownlint-cli2
+ relative-path audit --files) into one command at
tools/hygiene/check-shard-before-push.ts. 187-line TS script.

Motivation: tick 13 self-bite — MD038 violation slipped past the awk-only
manual self-check. Bundle closes the local-feedback gap.

3 prior PRs merged (#3711, #3709, #3710). Full tick-shard hygiene
ecosystem on main: audit + baseline + CI enforce gate + AUDIT-LIFECYCLE.md
+ this DX helper. Wrong-depth-.. bug class is mechanized end to end.

Co-authored-by: Claude <noreply@anthropic.com>
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.

2 participants