Skip to content

Round 44 batch 3/6: hygiene audit automation (4 scripts, 6 history files, 11 new rows)#53

Merged
AceHack merged 1 commit intoLucent-Financial-Group:mainfrom
AceHack:land-hygiene-audit-automation-batch3
Apr 21, 2026
Merged

Round 44 batch 3/6: hygiene audit automation (4 scripts, 6 history files, 11 new rows)#53
AceHack merged 1 commit intoLucent-Financial-Group:mainfrom
AceHack:land-hygiene-audit-automation-batch3

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented Apr 21, 2026

Summary

Batch 3 of the speculative-branch drain. Lands the hygiene audit
automation stack from round-44-speculative:

  • 4 audit scripts in tools/hygiene/ (shellcheck clean)
  • 6 hygiene-history files in docs/hygiene-history/ (supports row 47 cadence-history tracking)
  • 1 decision doc docs/POST-SETUP-SCRIPT-STACK.md (bun+TS default)
  • 11 new FACTORY-HYGIENE.md rows (42-52), renumbered from spec rows 39-49 to slot in above the Orthogonal-axes row 41 that main got from PR factory-hygiene row 41 (orthogonal-axes audit) + fork-pr-workflow -1 gotcha #50

New hygiene rows (42-52)

# Row
42 Filename-content match hygiene
43 GitHub Actions workflow-injection safe-patterns audit
44 Supply-chain safe-patterns audit (third-party ingress)
45 Attribution hygiene (external people / projects / patterns)
46 Missing-cadence activation audit
47 Cadence-history tracking hygiene
48 GitHub surface triage cadence
49 Post-setup script stack audit
50 Missing-prevention-layer meta-audit
51 Cross-platform parity audit
52 Tick-history bounded-growth audit

Row cross-references (same cadence as rows 5, 35-38) preserved — those row numbers are unchanged on main.

Renumbering rationale

Speculative branch authored rows 39-49 before main got:

Fork-PR workflow doesn't permit non-fast-forward merges, so
renumbering on land is the clean path. The 11 new rows are all
additive — none replaces or modifies an existing row on main.

Test plan

  • shellcheck clean on 4 audit scripts
  • markdownlint clean on all 7 modified/new docs
  • CI: actionlint N/A (no workflows)
  • CI: semgrep expected clean (no new source files)
  • CI: markdownlint expected clean
  • CI: shellcheck expected clean

Batch-plan position

Per docs/research/speculative-branch-landing-plan-2026-04-22.md:

🤖 Generated with Claude Code

Speculative-branch drain, batch 3: four new audit scripts,
six hygiene-history files, docs/POST-SETUP-SCRIPT-STACK.md,
and FACTORY-HYGIENE.md rows 42-52 (renumbered from spec
rows 39-49 since main added row 41 Orthogonal-axes audit
after the branch split).

New audit scripts (shellcheck clean):
- tools/hygiene/audit-cross-platform-parity.sh
- tools/hygiene/audit-missing-prevention-layers.sh
- tools/hygiene/audit-post-setup-script-stack.sh
- tools/hygiene/audit-tick-history-bounded-growth.sh

New hygiene-history surfaces (supports row 47 cadence-
history tracking):
- docs/hygiene-history/cross-platform-parity-history.md
- docs/hygiene-history/issue-triage-history.md
- docs/hygiene-history/loop-tick-history.md
- docs/hygiene-history/pr-triage-history.md
- docs/hygiene-history/prevention-layer-classification.md
- docs/hygiene-history/tick-history-bounded-growth-history.md

New decision doc:
- docs/POST-SETUP-SCRIPT-STACK.md (bun+TS default; bash only
  under exempt paths or with exception label; feeds row 49
  post-setup script stack audit)

FACTORY-HYGIENE.md new rows (renumbered from spec 39-49 to
42-52 to slot in above the Orthogonal-axes row 41):
- 42 Filename-content match hygiene (hard to enforce)
- 43 GitHub Actions workflow-injection safe-patterns audit
- 44 Supply-chain safe-patterns audit (third-party ingress)
- 45 Attribution hygiene (external people / projects / patterns)
- 46 Missing-cadence activation audit
- 47 Cadence-history tracking hygiene
- 48 GitHub surface triage cadence
- 49 Post-setup script stack audit
- 50 Missing-prevention-layer meta-audit
- 51 Cross-platform parity audit
- 52 Tick-history bounded-growth audit

Row cross-references (rows 5, 35-38) preserved — those row
numbers did not shift on main.

Local-lint status at commit time:
- shellcheck (4 audit scripts): clean
- markdownlint (all batch docs): clean
- actionlint: N/A (no workflow files in batch)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 21, 2026 15:36
@AceHack AceHack enabled auto-merge (squash) April 21, 2026 15:36
@AceHack AceHack merged commit c247ce8 into Lucent-Financial-Group:main Apr 21, 2026
13 checks passed
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 hygiene-audit automation slice (scripts + history ledgers) and wires it into docs/FACTORY-HYGIENE.md via new rows #42#52, covering post-setup script stack governance, prevention-layer classification, cross-platform parity, and tick-history bounded growth.

Changes:

  • Adds four new tools/hygiene/ audit scripts for post-setup stack compliance, prevention-layer gaps, cross-platform parity gaps, and tick-history bounded-growth checks.
  • Seeds multiple docs/hygiene-history/*.md fire-history / classification ledgers to support cadence-history tracking.
  • Extends docs/FACTORY-HYGIENE.md with rows #42#52 describing these new hygiene layers and their enforcement surfaces.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 23 comments.

Show a summary per file
File Description
tools/hygiene/audit-tick-history-bounded-growth.sh New bounded-growth audit for loop-tick-history.md.
tools/hygiene/audit-post-setup-script-stack.sh New audit to detect non-exempt unlabeled `tools/**/*.sh
tools/hygiene/audit-missing-prevention-layers.sh New meta-audit producing a prevention/detection classification matrix.
tools/hygiene/audit-cross-platform-parity.sh New parity audit for .sh/.ps1 twins with optional enforcement.
docs/POST-SETUP-SCRIPT-STACK.md Decision-flow doc intended as prevention layer for post-setup scripting rules.
docs/FACTORY-HYGIENE.md Adds rows #42#52 defining the new hygiene layers and expected artifacts.
docs/hygiene-history/tick-history-bounded-growth-history.md Fire-history log for the bounded-growth audit.
docs/hygiene-history/prevention-layer-classification.md Classification matrix used by the missing-prevention-layer audit.
docs/hygiene-history/pr-triage-history.md PR triage cadence fire-history ledger.
docs/hygiene-history/issue-triage-history.md Issue triage cadence fire-history ledger.
docs/hygiene-history/loop-tick-history.md Loop tick fire-history ledger with pruning policy and appended log.
docs/hygiene-history/cross-platform-parity-history.md Fire-history log for the parity audit.

@@ -0,0 +1,11 @@
# Cross-platform parity audit — fire history

Per-fire ledger for FACTORY-HYGIENE row #48 (cross-platform
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

This file references the cross-platform parity audit as FACTORY-HYGIENE row #48, but in the updated docs/FACTORY-HYGIENE.md table cross-platform parity is row #51 (row #48 is GitHub surface triage cadence). Please update the row-number reference to match the renumbered table.

Suggested change
Per-fire ledger for FACTORY-HYGIENE row #48 (cross-platform
Per-fire ledger for FACTORY-HYGIENE row #51 (cross-platform

Copilot uses AI. Check for mistakes.
Comment on lines +63 to +67
# NUL-delimited to tolerate whitespace in paths.
ALL_SCRIPTS=()
while IFS= read -r -d '' f; do
ALL_SCRIPTS+=("$f")
done < <(git ls-files -z 'tools/*.sh' 'tools/*.ps1' 'tools/**/*.sh' 'tools/**/*.ps1' | sort -z)
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

P0: sort -z is a GNU extension and will fail on macOS's default BSD sort, despite the script aiming for bash 3.2 portability. git ls-files already outputs paths in sorted order, so you can drop the | sort -z (or otherwise avoid NUL-sorting with non-portable flags).

Suggested change
# NUL-delimited to tolerate whitespace in paths.
ALL_SCRIPTS=()
while IFS= read -r -d '' f; do
ALL_SCRIPTS+=("$f")
done < <(git ls-files -z 'tools/*.sh' 'tools/*.ps1' 'tools/**/*.sh' 'tools/**/*.ps1' | sort -z)
# NUL-delimited to tolerate whitespace in paths. `git ls-files`
# already returns paths in sorted order, so avoid non-portable
# GNU `sort -z`.
ALL_SCRIPTS=()
while IFS= read -r -d '' f; do
ALL_SCRIPTS+=("$f")
done < <(git ls-files -z 'tools/*.sh' 'tools/*.ps1' 'tools/**/*.sh' 'tools/**/*.ps1')

Copilot uses AI. Check for mistakes.
*"bash scaffolding"*) echo "post-setup-transitional" ;;
*)
# Unlabelled post-setup bash — violation of the post-setup
# stack rule (row #46), not a parity question. Defer to
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

The comment says unlabelled post-setup bash is a violation of the post-setup stack rule “(row #46)”, but in the updated hygiene table the post-setup script stack audit is row #49. Please update the row reference to avoid stale numbering after renumbering.

Suggested change
# stack rule (row #46), not a parity question. Defer to
# stack rule (row #49), not a parity question. Defer to

Copilot uses AI. Check for mistakes.
Comment on lines +70 to +71
| 39 | Filename-content match hygiene (hard to enforce) | prevention-bearing: opportunistic on-touch filename/content sanity check at write-time is the primary prevention (every time an agent edits a file, the content-summary-vs-filename obligation fires). Exhaustive coverage is not budget-viable per `memory/feedback_filename_content_match_hygiene_hard_to_enforce`, so the cadenced sample-sweep is supplementary. |
| 42 | Attribution hygiene (external people / projects / patterns) | prevention-bearing: on-touch cite-at-author-time is the primary prevention (when naming an external person / pattern / project / character, cite URL / author / org / creator at write-time per row #42's Checks column). Cadenced retrospective sweep catches what on-touch missed. |
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

This matrix row uses 42 for “Attribution hygiene”, but in the current docs/FACTORY-HYGIENE.md table row #42 is “Filename-content match hygiene”; attribution hygiene is row #45. The row numbers here need to be renumbered to match the current hygiene table, otherwise the audit script will report unclassified/misclassified rows.

Suggested change
| 39 | Filename-content match hygiene (hard to enforce) | prevention-bearing: opportunistic on-touch filename/content sanity check at write-time is the primary prevention (every time an agent edits a file, the content-summary-vs-filename obligation fires). Exhaustive coverage is not budget-viable per `memory/feedback_filename_content_match_hygiene_hard_to_enforce`, so the cadenced sample-sweep is supplementary. |
| 42 | Attribution hygiene (external people / projects / patterns) | prevention-bearing: on-touch cite-at-author-time is the primary prevention (when naming an external person / pattern / project / character, cite URL / author / org / creator at write-time per row #42's Checks column). Cadenced retrospective sweep catches what on-touch missed. |
| 42 | Filename-content match hygiene (hard to enforce) | prevention-bearing: opportunistic on-touch filename/content sanity check at write-time is the primary prevention (every time an agent edits a file, the content-summary-vs-filename obligation fires). Exhaustive coverage is not budget-viable per `memory/feedback_filename_content_match_hygiene_hard_to_enforce`, so the cadenced sample-sweep is supplementary. |
| 45 | Attribution hygiene (external people / projects / patterns) | prevention-bearing: on-touch cite-at-author-time is the primary prevention (when naming an external person / pattern / project / character, cite URL / author / org / creator at write-time per row #45's Checks column). Cadenced retrospective sweep catches what on-touch missed. |

Copilot uses AI. Check for mistakes.
Comment on lines +41 to +43
|---|---|---|---|---|---|---|
| 2026-04-22T (round-44 tick, first-fire bootstrap) | opus-4-7 / session round-44 | 96 | 500 | 19% | within bounds | First-fire bootstrap. Row #49 landed this tick; audit script `tools/hygiene/audit-tick-history-bounded-growth.sh` landed this tick; file header threshold lowered from 5000 to 500 per the script's mini-ADR. Current file (96 lines) has ~400 lines of remaining headroom. |
| 2026-04-22T (round-44 tick, post-dbt-research append) | opus-4-7 / session round-44 (post-compaction) | 110 | 500 | 22% | within bounds | Post-commit-`d25bc66` + tick-history-append audit. Two bounded-growth-history rows inside the first round of the row's existence = the cadence works. 390 lines of remaining headroom. |
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

This fire-history row mentions “Row #49 landed this tick”, but the tick-history bounded-growth audit is row #52 in docs/FACTORY-HYGIENE.md after renumbering. Please update these log-row references to the correct row number to avoid stale history metadata.

Copilot uses AI. Check for mistakes.
Comment thread docs/FACTORY-HYGIENE.md
| 49 | Post-setup script stack audit (bun+TS default; bash only under exempt paths or with exception label) | Author-time (every new `tools/**/*.{sh,ps1}` decision-flow walk per `docs/POST-SETUP-SCRIPT-STACK.md`) + cadenced detection every 5-10 rounds (same cadence as skill-tune-up / row #38 / harness-surface audit) + opportunistic on-touch (every time an agent adds or edits a script under `tools/`). | Author of the script (self-check at author-time against the decision-flow doc); Dejan (devops-engineer) on the cadenced detection sweep; Kenji (Architect) on migration-order decisions when multiple violations stack up. | both | **Author-time prevention:** walk the three-question flow in `docs/POST-SETUP-SCRIPT-STACK.md` before writing any new `tools/**/*.{sh,ps1}` — (Q1) pre-setup? → `tools/setup/` bash+PowerShell exempt; (Q2) skill-bundled? → skill-compatibility rules govern, not this row; (Q3) default bun+TypeScript unless an explicit exception (trivial pipeline / thin CLI wrapper / bash scaffolding / sibling-migration guardrail) applies, in which case the script MUST carry a header comment naming the exception. **Cadenced detection:** `tools/hygiene/audit-post-setup-script-stack.sh` lists every shell/PowerShell script under `tools/` and classifies each as `exempt` / `labelled-exception` / `violation`. Exit-2 on any new violation; CI / pre-commit-eligible. **Why both layers:** prevention catches new violations at author-time (cheap); detection catches drift — labels getting stripped on edits, exceptions becoming stale, scripts moving out of exempt paths. Ships to project-under-construction: adopters inherit the canonical-stack rule + the audit script + the decision-flow doc. Aaron 2026-04-22 triggering-directive-chain: *"if post setup backlog bun/ts"* → *"now add someting that will try to prevent that and and hygene it if it happens again"*. | Author-time: commit-message rationale for any new `.sh` under `tools/` outside `tools/setup/`, OR exception-label header in the script, OR BACKLOG row queuing bun+TS migration. Cadenced: audit script output (markdown), appended to `docs/hygiene-history/post-setup-script-stack-history.md` (per-fire schema per row #44); BACKLOG row per unlabeled violation. | `docs/POST-SETUP-SCRIPT-STACK.md` (prevention surface) + `tools/hygiene/audit-post-setup-script-stack.sh` (detection surface) + `memory/project_ui_canonical_reference_bun_ts_backend_cutting_edge_asymmetry` + `memory/project_bun_ts_post_setup_low_confidence_watchlist` |
| 50 | Missing-prevention-layer meta-audit (every hygiene row carries a prevention classification: prevention-bearing / detection-only-justified / detection-only-gap) | Round cadence (same as rows #22 / #23 / #35 / #36) + opportunistic on-touch (every time a new row is added to `docs/FACTORY-HYGIENE.md` the author classifies it at landing). Not exhaustive; the round-close sweep catches un-classified rows and gap rows. | Architect (Kenji) on round-cadence classification review + gap-closure ROI assessment. All agents (self-administered) on on-touch: every new hygiene row MUST declare its prevention classification at landing; an unclassified row is itself a violation of this row. | factory | Sweep every row in `docs/FACTORY-HYGIENE.md` and classify each as one of: (a) **prevention-bearing** — an author-time / commit-time / trigger-time mechanism (hook, CI check, decision-flow doc, pre-commit lint, skill-gate) blocks or warns the violation BEFORE it materialises; (b) **detection-only-justified** — the class is fundamentally post-hoc (e.g., cadence-history row #44 — a fire-log can only exist AFTER the fire happens; wake-friction row #29 — friction is only observable at wake-time); (c) **detection-only-gap** — no principled reason the row is detection-only; a prevention layer COULD and SHOULD be built. Classification lives in `docs/hygiene-history/prevention-layer-classification.md` (one table row per hygiene row). **Why this row exists:** Aaron 2026-04-22 *"add a hygene for missing prevention layers"* — the factory had been quietly accumulating detection-only rows without asking the complementary question "could we have prevented this at author-time?". Without this meta-audit, the factory's reactive-cost grows silently. Parallels the existing meta-hygiene triangle (row #23 unknown-classes / #43 authored-but-unactivated / #44 cadence-history) by adding a fourth: row #47 is *"of the rows that ARE active and firing, which could have been prevented upstream"*. **Classification:** this is an **intentionality-enforcement** hygiene rule (Aaron 2026-04-22 tick-close: *"we are enforcing intentional decsions"*) — the audit cannot compute whether a row's classification is correct, but it forces every new hygiene row to carry an explicit prevention-vs-detection decision at landing. Declining to classify is itself the violation. See `memory/feedback_enforcing_intentional_decisions_not_correctness.md`. Ships to project-under-construction: adopters inherit the classification discipline + the meta-audit script + the obligation to classify any new hygiene row at landing. | `docs/hygiene-history/prevention-layer-classification.md` (classification matrix, one row per hygiene row) + cadenced audit run landed as `docs/hygiene-history/missing-prevention-layer-audit-YYYY-MM-DD.md` noting gap rows; ROUND-HISTORY row when a gap row gains a prevention layer (detection-only-gap → prevention-bearing transition); BACKLOG row per gap with prevention-design ROI estimate. | `tools/hygiene/audit-missing-prevention-layers.sh` + this row's self-reference (its own prevention layer is the at-landing-classify obligation declared in this Checks/enforces column) |
| 51 | Cross-platform parity audit (bash / PowerShell / bun+TS twin check across macOS / Windows / Linux / WSL) | Detect-only now (landed 2026-04-22); cadenced detection every 5-10 rounds (same cadence as row #46); opportunistic on-touch every time an agent adds or edits a script under `tools/`. Enforcement deferred until baseline is green AND CI matrix runs `--enforce` on `macos-latest` / `windows-latest` / `ubuntu-latest` (WSL inherits ubuntu-latest for CI). | Dejan (devops-engineer) on cadenced detection; author of the script (self-check at author-time against the rule classes in the audit's decision-record header block). Kenji (Architect) on CI-matrix-enforcement sign-off when baseline is green. | both | `tools/hygiene/audit-cross-platform-parity.sh` classifies every script under `tools/` by rule class: (a) **pre-setup** (`tools/setup/**`) — both `.sh` AND `.ps1` required per Q1 dual-authoring rule (`memory/feedback_preinstall_scripts_forced_shell_meet_developer_where_they_live`); (b) **post-setup permanent-bash** (`thin wrapper over existing CLI` / `trivial find-xargs pipeline` / `stay bash forever`) — `.ps1` twin required per the Windows-twin obligation (`memory/feedback_stay_bash_forever_implies_powershell_twin_obligation.md`); (c) **post-setup transitional** (`bun+TS migration candidate` / `bash scaffolding`) — no twin obligation (long-term plan is one cross-platform bun+TS script); (d) **post-setup bun+TS** (`*.ts` under `tools/`) — no twin needed (cross-platform native via bun). `--summary` prints counts; `--enforce` flips exit 2 on gaps. **Why detect-only first:** baseline at first fire (2026-04-22) was 13 gaps — 12 pre-setup bash without `.ps1` twin (Q1 violation silently accumulating since `tools/setup/` existed) + 1 post-setup permanent-bash (`tools/profile.sh`) without `.ps1` twin. Turning enforcement on before triage would block every CI run. **Why this row exists:** Aaron 2026-04-22 *"missing mac/windows/linux/wsl parity (ubuntu latest) we can deffer but should have the hygene in place for when we want to enforce and it will be more obvious to you in the future that we are cross platform."* Cross-platform-first must be a *visible* factory property (audit exists, runs, prints the gap) before it becomes an enforced gate. Same pattern as FACTORY-HYGIENE rows #23 / #43 / #47. See `memory/feedback_cross_platform_parity_hygiene_deferred_enforcement.md`. **Classification (row #47):** **prevention-bearing** — the audit runs at author-time (opportunistic on-touch) and surfaces the gap before it lands, same as row #46. The audit itself is a detect-only mechanism but detect-only surfaces the obligation at author-time when the author runs it. Ships to project-under-construction: adopters inherit the parity audit + the decision-record-block pattern + the CI-matrix obligation once it's wired. | Audit output in repo root on each fire; cadenced runs appended to `docs/hygiene-history/cross-platform-parity-history.md` (per-fire schema per row #44); BACKLOG row per gap at triage time; ROUND-HISTORY row when a gap resolves. | `tools/hygiene/audit-cross-platform-parity.sh` (detection + decision-record header block) + `memory/feedback_cross_platform_parity_hygiene_deferred_enforcement.md` + `memory/feedback_stay_bash_forever_implies_powershell_twin_obligation.md` + `memory/feedback_preinstall_scripts_forced_shell_meet_developer_where_they_live` + `docs/POST-SETUP-SCRIPT-STACK.md` |
| 52 | Tick-history bounded-growth audit (`docs/hygiene-history/loop-tick-history.md` line-count vs threshold) | Detect-only (landed 2026-04-22); cadenced detection once per round-close (same cadence as row #44 cadence-history sweep, since this is the canonical row #44 worked example auditing itself); opportunistic on-touch whenever the tick-history file is read or edited. Archive action itself remains manual for now; deferring automation to the larger BACKLOG row that also covers threshold-revision and append-without-reading refactor. | Dejan (devops-engineer) on cadenced detection; the tick itself (self-administered at tick-close) on the opportunistic on-touch — each tick's end-of-tick sequence can invoke this audit after the append + commit to get a `within bounds: 96/500 lines` visibility signal. | factory | `tools/hygiene/audit-tick-history-bounded-growth.sh` checks the file's line count against a threshold (default 500, overrideable via `--threshold N`) and exits 0 within bounds / 2 over threshold. The threshold is set lower than the stated 5000-line paper bound because the file is read on every tick-close append — a per-tick context cost that scales linearly with file size — and 5000 lines represents too large a context hit on a 1-minute cadence. The audit's header block carries a mini-ADR decision record for the 500-line choice (context / decision / alternatives / supersedes / expires-when). **Why this row exists:** Aaron 2026-04-22 tick-fire interrupt: *"does loop tick history grow unbounded? that's an issue if so you just read it"*. Honest state was stated-bound-no-enforcement: file header named 5000 lines, nothing checked it. This row closes the enforcement gap for the threshold-check half of the full BACKLOG row (archive-action + append-without-reading refactor remain deferred). **Self-referential closure:** the tick-history file IS the canonical row-#44 cadence-history-tracking worked example (named explicitly in row #44's "Durable output" citation). Until this row landed, the most-cadenced surface in the factory — the tick itself — had its fire-log surface unaudited for its own growth. Meta-audit triangle remains intact (existence #23 / activation #43 / fire-history #44), and row #49 adds a fourth: fire-history files themselves need bounded-growth audits because they grow at the cadence of the surface they track. **Classification (row #47):** **prevention-bearing** — the audit surfaces approaching-threshold warnings at 80% so the archive action can be planned, rather than reactive-only at over-threshold. Ships to project-under-construction indirectly: adopters inherit the pattern (fire-log files under their own `docs/hygiene-history/` need the same bounded-growth treatment), not this exact script. | Audit output on each fire; cadenced runs appended to `docs/hygiene-history/tick-history-bounded-growth-history.md` (per-fire schema per row #44); BACKLOG row when archival is due (archive-action itself queued as part of the larger tick-history enforcement BACKLOG row); ROUND-HISTORY row when threshold changes or archive action executes. | `tools/hygiene/audit-tick-history-bounded-growth.sh` (detection + mini-ADR header block) + `docs/hygiene-history/loop-tick-history.md` (target surface, canonical row #44 worked example) + BACKLOG row *"Loop-tick-history bounded-growth enforcement"* (larger follow-up: threshold revision + append-without-reading refactor + archive action) |
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

Row #52’s description still refers to itself/related content using the pre-renumbering row number (e.g., “row #49 adds a fourth” and “(FACTORY-HYGIENE row #49)”). After this PR’s renumbering, please update those internal row-number references to match the current table so future xrefs/searches stay reliable.

Suggested change
| 52 | Tick-history bounded-growth audit (`docs/hygiene-history/loop-tick-history.md` line-count vs threshold) | Detect-only (landed 2026-04-22); cadenced detection once per round-close (same cadence as row #44 cadence-history sweep, since this is the canonical row #44 worked example auditing itself); opportunistic on-touch whenever the tick-history file is read or edited. Archive action itself remains manual for now; deferring automation to the larger BACKLOG row that also covers threshold-revision and append-without-reading refactor. | Dejan (devops-engineer) on cadenced detection; the tick itself (self-administered at tick-close) on the opportunistic on-touch — each tick's end-of-tick sequence can invoke this audit after the append + commit to get a `within bounds: 96/500 lines` visibility signal. | factory | `tools/hygiene/audit-tick-history-bounded-growth.sh` checks the file's line count against a threshold (default 500, overrideable via `--threshold N`) and exits 0 within bounds / 2 over threshold. The threshold is set lower than the stated 5000-line paper bound because the file is read on every tick-close append — a per-tick context cost that scales linearly with file size — and 5000 lines represents too large a context hit on a 1-minute cadence. The audit's header block carries a mini-ADR decision record for the 500-line choice (context / decision / alternatives / supersedes / expires-when). **Why this row exists:** Aaron 2026-04-22 tick-fire interrupt: *"does loop tick history grow unbounded? that's an issue if so you just read it"*. Honest state was stated-bound-no-enforcement: file header named 5000 lines, nothing checked it. This row closes the enforcement gap for the threshold-check half of the full BACKLOG row (archive-action + append-without-reading refactor remain deferred). **Self-referential closure:** the tick-history file IS the canonical row-#44 cadence-history-tracking worked example (named explicitly in row #44's "Durable output" citation). Until this row landed, the most-cadenced surface in the factory — the tick itself — had its fire-log surface unaudited for its own growth. Meta-audit triangle remains intact (existence #23 / activation #43 / fire-history #44), and row #49 adds a fourth: fire-history files themselves need bounded-growth audits because they grow at the cadence of the surface they track. **Classification (row #47):** **prevention-bearing** — the audit surfaces approaching-threshold warnings at 80% so the archive action can be planned, rather than reactive-only at over-threshold. Ships to project-under-construction indirectly: adopters inherit the pattern (fire-log files under their own `docs/hygiene-history/` need the same bounded-growth treatment), not this exact script. | Audit output on each fire; cadenced runs appended to `docs/hygiene-history/tick-history-bounded-growth-history.md` (per-fire schema per row #44); BACKLOG row when archival is due (archive-action itself queued as part of the larger tick-history enforcement BACKLOG row); ROUND-HISTORY row when threshold changes or archive action executes. | `tools/hygiene/audit-tick-history-bounded-growth.sh` (detection + mini-ADR header block) + `docs/hygiene-history/loop-tick-history.md` (target surface, canonical row #44 worked example) + BACKLOG row *"Loop-tick-history bounded-growth enforcement"* (larger follow-up: threshold revision + append-without-reading refactor + archive action) |
| 52 | Tick-history bounded-growth audit (`docs/hygiene-history/loop-tick-history.md` line-count vs threshold) | Detect-only (landed 2026-04-22); cadenced detection once per round-close (same cadence as row #44 cadence-history sweep, since this is the canonical row #44 worked example auditing itself); opportunistic on-touch whenever the tick-history file is read or edited. Archive action itself remains manual for now; deferring automation to the larger BACKLOG row that also covers threshold-revision and append-without-reading refactor. | Dejan (devops-engineer) on cadenced detection; the tick itself (self-administered at tick-close) on the opportunistic on-touch — each tick's end-of-tick sequence can invoke this audit after the append + commit to get a `within bounds: 96/500 lines` visibility signal. | factory | `tools/hygiene/audit-tick-history-bounded-growth.sh` checks the file's line count against a threshold (default 500, overrideable via `--threshold N`) and exits 0 within bounds / 2 over threshold. The threshold is set lower than the stated 5000-line paper bound because the file is read on every tick-close append — a per-tick context cost that scales linearly with file size — and 5000 lines represents too large a context hit on a 1-minute cadence. The audit's header block carries a mini-ADR decision record for the 500-line choice (context / decision / alternatives / supersedes / expires-when). **Why this row exists:** Aaron 2026-04-22 tick-fire interrupt: *"does loop tick history grow unbounded? that's an issue if so you just read it"*. Honest state was stated-bound-no-enforcement: file header named 5000 lines, nothing checked it. This row closes the enforcement gap for the threshold-check half of the full BACKLOG row (archive-action + append-without-reading refactor remain deferred). **Self-referential closure:** the tick-history file IS the canonical row-#44 cadence-history-tracking worked example (named explicitly in row #44's "Durable output" citation). Until this row landed, the most-cadenced surface in the factory — the tick itself — had its fire-log surface unaudited for its own growth. Meta-audit triangle remains intact (existence #23 / activation #43 / fire-history #44), and row #52 adds a fourth: fire-history files themselves need bounded-growth audits because they grow at the cadence of the surface they track. **Classification (row #47):** **prevention-bearing** — the audit surfaces approaching-threshold warnings at 80% so the archive action can be planned, rather than reactive-only at over-threshold. Ships to project-under-construction indirectly: adopters inherit the pattern (fire-log files under their own `docs/hygiene-history/` need the same bounded-growth treatment), not this exact script. | Audit output on each fire; cadenced runs appended to `docs/hygiene-history/tick-history-bounded-growth-history.md` (per-fire schema per row #44); BACKLOG row when archival is due (archive-action itself queued as part of the larger tick-history enforcement BACKLOG row); ROUND-HISTORY row when threshold changes or archive action executes. | `tools/hygiene/audit-tick-history-bounded-growth.sh` (detection + mini-ADR header block) + `docs/hygiene-history/loop-tick-history.md` (target surface, canonical row #44 worked example) + BACKLOG row *"Loop-tick-history bounded-growth enforcement"* (larger follow-up: threshold revision + append-without-reading refactor + archive action) |

Copilot uses AI. Check for mistakes.
Comment thread docs/FACTORY-HYGIENE.md
| 46 | Missing-cadence activation audit (proposed-row / TBD-owner / no-named-skill tracker) | Round cadence (proposed — Aaron 2026-04-22) + opportunistic on-touch (every time an agent touches `docs/FACTORY-HYGIENE.md` or an authored-but-inactive hygiene rule). Not exhaustive; each touch or round-close is a sample pass. | Architect (Kenji) on round cadence; all agents (self-administered) on on-touch. Candidate dedicated skill queued in BACKLOG P1 if the volume warrants — opening estimate: existing "(proposed)" rows #22 / #23 / #35 / #36 / #42 / #43 = six, so skill-vs-hat decision pending observation. | factory | Sweep the hygiene list (this file) + BP-NN list + hygiene-adjacent memories for items that **declare** a recurring cadence but have (a) no named owner, (b) no active enforcement surface (SKILL.md / hook / CI step), (c) cadence literally tagged `(proposed)` / `TBD` / `pending`, or (d) last-known-fire date absent or older than declared cadence × 2. Distinct from row #23 (missing-CLASSES): row #23 asks "what hygiene are we not running at all?"; row #43 asks "what hygiene have we AUTHORED but not ACTIVATED?" Both point at the same meta-level gap ("the factory is not as self-regulating as its paperwork suggests") but from opposite directions — row #23 surfaces unknowns, row #43 surfaces known-unactivated. Triggering catch: 2026-04-22 Aaron noted row #23 itself is marked "(proposed)" and therefore could not catch row #42 (attribution hygiene) before he did manually — *"missing cadences for any items that should be reoccuring hygene we should add"*. Ships to project-under-construction indirectly: adopters inherit the discipline via the audit skill (once built) but the factory-internal hygiene list is factory-scope. Classification: this is a **self-audit** row — it audits the hygiene list itself, so its own activation is a visible bootstrap risk (row #43 itself marked "(proposed)" is the canonical example of what row #43 should catch). | Audit doc per round listing every proposed / TBD row with activation recommendation (adopt now / park with reason / retire if stale); ROUND-HISTORY row noting which proposed rows activated this round; HUMAN-BACKLOG `activation-decision` row where Aaron sign-off is warranted | `feedback_missing_cadences_hygiene.md` + this file's §"The list" (self-referential) |
| 47 | Cadence-history tracking hygiene (every active cadenced factory surface has a structured fire-history) | Round cadence — **active** (first fire 2026-04-22 per `docs/research/cadence-history-audit-2026-04-22.md`) + opportunistic on-touch (every time an agent activates a row, transitions a row from proposed → active, fires a cadence, or touches a cadenced surface outside this file). Not exhaustive — each cadenced fire is the surface's own history obligation; the audit sweeps periodically for compliance gaps. | Architect (Kenji) on round cadence for the compliance audit; every surface's owner on each fire (self-administered); candidate dedicated skill queued in BACKLOG P1 if the history-schema question fragments enough to warrant tooling. | factory | Every **cadenced factory surface** MUST have a **fire-history surface**. Scope is explicitly broader than this file's rows: it covers (i) FACTORY-HYGIENE.md rows with declared active cadence; (ii) cron jobs declared in `docs/factory-crons.md` (e.g., the `autonomous-loop` / `heartbeat` / `git-status-pulse` rows); (iii) round-open / round-close checklist items declared in `.claude/skills/round-open-checklist/` and `.claude/skills/round-management/` (round-close step 4); (iv) any other declared recurring obligation named in docs / memory / skills (e.g., harness-surface cadenced audits per row #38, skill-tune-up sweeps, wake-briefing routines). Canonical example at factory root: the autonomous-loop tick — the single most cadenced surface in the factory — logs every fire to `docs/hygiene-history/loop-tick-history.md` before each end-of-tick `CronList` call (see `docs/AUTONOMOUS-LOOP.md` step 5). Acceptable fire-history surface shapes: (a) per-row history file under `docs/hygiene-history/row-NN-<slug>.md`, (b) per-surface history file under `docs/hygiene-history/<surface-slug>-history.md` (cron tick, wake-briefing, etc.), (c) shared ledger (e.g., `docs/research/meta-wins-log.md` for meta-check fires), (d) notebook section with dated entries (e.g., Aarav's notebook for row #5 fires), or (e) a rollup in `docs/ROUND-HISTORY.md` per round close. The surface's "Durable output" column (or doc-level equivalent) names the fire-history surface; surfaces whose output is ephemeral (inline acknowledgement, ad-hoc finding without a surface) are compliance gaps. Per-fire entry schema (minimum): **(date, agent, output-or-finding, link-to-durable-output, next-fire-expected-date-if-known)**. Distinct from row #23 (new-CLASSES we don't run) and row #43 (known-CLASSES we authored-but-never-activated): row #44 asks *"of the classes we AUTHORED and ACTIVATED, can we prove they fire on cadence and see the fire-log?"* The three rows together form a meta-hygiene triangle — existence (#23) / activation (#43) / fire-history (#44) — each catching a different structural failure mode. Triggering catches: 2026-04-22 Aaron after row #23 activation (*"everything with a cadence should be track it history hygene make sure we got that one too"*) + 2026-04-22 Aaron on the autonomous-loop tick specifically (*"you might as well right a history record somewhere on every loop tool right before you check cron"*) — the second message is the directive that drove the scope extension from FACTORY-HYGIENE-only to all-cadenced-factory-surfaces. Ships to project-under-construction indirectly via the audit skill (once built); factory-internal hygiene list is factory-scope. Classification: **self-audit** row — it audits the hygiene list itself AND every other cadenced surface the factory declares, so its own first-fire bootstrap risk mirrors rows #23 and #43 and its scope-extension risk mirrors the autonomous-loop tick's pre-extension invisibility to row #44's original audit. | Audit doc per round listing every active cadenced surface (this file's rows + cron registry rows + round-checklist items + declared recurring obligations) + whether it has a fire-history surface + per-fire entry-schema compliance; ROUND-HISTORY row noting surface-gap-fix landings; HUMAN-BACKLOG `history-surface-decision` row if a shared-ledger-vs-per-surface-file schema decision needs Aaron's sign-off | `feedback_cadence_history_tracking_hygiene.md` + `docs/hygiene-history/loop-tick-history.md` (canonical worked example) |
| 48 | GitHub surface triage cadence (ten surfaces: PRs / Issues / Wiki / Discussions / Repo Settings / Copilot coding-agent / Agents tab / Security / Pulse / Pages) | Round-close cadence (primary) + opportunistic on-touch (every tick that comments on / labels / merges / closes a PR or issue; edits the wiki; replies to a discussion; toggles a repo setting; dispatches an Agents-tab session; triages a security alert; ships a Pages change). Not exhaustive on-touch; the round-close sweep catches what on-touch missed. | Architect (Kenji) on the round-cadence sweep; all agents (self-administered) on on-touch. Codified in `.claude/skills/github-surface-triage/SKILL.md` so future agents don't rediscover the taxonomies — this skill is the executable form of `docs/AGENT-GITHUB-SURFACES.md` per Aaron's 2026-04-22 meta-rule *"we need skills for all this so you are not redicoverging"*. | both | Run the ten-step sweep from `docs/AGENT-GITHUB-SURFACES.md` § "Round-close mechanical procedure" (or the skill's checklist): (1) `gh pr list` + classify against seven PR shapes; (2) `gh issue list` + classify against four issue shapes; (3) wiki footer-SHA drift-check against three wiki shapes; (4) `gh api graphql` discussions + classify against four discussion shapes; (5) `gh api repos/<owner>/<repo>` settings-snapshot diff; (6) Copilot coding-agent sub-read vs `.github/copilot-instructions.md`; (7) Agents-tab watch-only observation (no API yet); (8) security-alerts sweep (code-scanning / Dependabot / secret-scanning); (9) Pulse `stats/*` snapshot (verification substrate); (10) Pages unpublished-state check (`gh api repos/<owner>/<repo>/pages` → 404 = current state, research-gated). Apply each surface's action; log one row per touched surface to its fire-history (PRs / issues / wiki / discussions / security), or append a snapshot block (settings / pulse / pages). Surface Aaron-scoped decisions (`awaiting-human` PRs, settings policy, Pages adoption, P0-secret) to `docs/HUMAN-BACKLOG.md`. Ships to project-under-construction: adopters inherit the classification taxonomies + the fire-history schemas + the round-cadence discipline (playbook is factory-level; GitHub is the concrete adapter — GitLab / Gitea / Bitbucket mappings listed in `docs/AGENT-GITHUB-SURFACES.md`). Triggering directives: 2026-04-22 Aaron — seven in sequence — *"we are going to need cadence for checking open PRs ... Also same with issues"*; *"you own the wiki too"*; *"and discussions"*; *"we need skills for all this so you are not redicoverging"*; *"you can own [copilot coding-agent settings] and all our settings ... ohhh you can own [agents tab]"*; *"and [security]"*; *"oh look at all the data !!! [pulse] might ... help with some of our verifactions"*; *"we should start experiting with [pages] Jekyll seems like we could push the boundaries if needed, maybe static pages is enough? you can figure out what works good with bun."*. Classification: the taxonomies are explicitly declared **non-final** per Aaron's "we can beef up our stuff over time"; first 5-10 rounds of fire-history observations feed a taxonomy-revision pass. | Fire-history row per triaged surface; ROUND-HISTORY row on round-close noting which PRs / issues / discussions / wiki pages / security alerts moved class or resolved; HUMAN-BACKLOG `pr-decision` / `settings-change` / `pages-adoption` / `secret-rotation` row where Aaron sign-off is warranted | `docs/AGENT-GITHUB-SURFACES.md` (authoritative) + `.claude/skills/github-surface-triage/SKILL.md` (executable) + `docs/AGENT-ISSUE-WORKFLOW.md` (abstract dual-track) + fire-history files under `docs/hygiene-history/` (pr-triage / issue-triage / wiki / discussions / security-triage / pulse-snapshot / pages) + `docs/github-repo-settings-snapshot.md` |
| 49 | Post-setup script stack audit (bun+TS default; bash only under exempt paths or with exception label) | Author-time (every new `tools/**/*.{sh,ps1}` decision-flow walk per `docs/POST-SETUP-SCRIPT-STACK.md`) + cadenced detection every 5-10 rounds (same cadence as skill-tune-up / row #38 / harness-surface audit) + opportunistic on-touch (every time an agent adds or edits a script under `tools/`). | Author of the script (self-check at author-time against the decision-flow doc); Dejan (devops-engineer) on the cadenced detection sweep; Kenji (Architect) on migration-order decisions when multiple violations stack up. | both | **Author-time prevention:** walk the three-question flow in `docs/POST-SETUP-SCRIPT-STACK.md` before writing any new `tools/**/*.{sh,ps1}` — (Q1) pre-setup? → `tools/setup/` bash+PowerShell exempt; (Q2) skill-bundled? → skill-compatibility rules govern, not this row; (Q3) default bun+TypeScript unless an explicit exception (trivial pipeline / thin CLI wrapper / bash scaffolding / sibling-migration guardrail) applies, in which case the script MUST carry a header comment naming the exception. **Cadenced detection:** `tools/hygiene/audit-post-setup-script-stack.sh` lists every shell/PowerShell script under `tools/` and classifies each as `exempt` / `labelled-exception` / `violation`. Exit-2 on any new violation; CI / pre-commit-eligible. **Why both layers:** prevention catches new violations at author-time (cheap); detection catches drift — labels getting stripped on edits, exceptions becoming stale, scripts moving out of exempt paths. Ships to project-under-construction: adopters inherit the canonical-stack rule + the audit script + the decision-flow doc. Aaron 2026-04-22 triggering-directive-chain: *"if post setup backlog bun/ts"* → *"now add someting that will try to prevent that and and hygene it if it happens again"*. | Author-time: commit-message rationale for any new `.sh` under `tools/` outside `tools/setup/`, OR exception-label header in the script, OR BACKLOG row queuing bun+TS migration. Cadenced: audit script output (markdown), appended to `docs/hygiene-history/post-setup-script-stack-history.md` (per-fire schema per row #44); BACKLOG row per unlabeled violation. | `docs/POST-SETUP-SCRIPT-STACK.md` (prevention surface) + `tools/hygiene/audit-post-setup-script-stack.sh` (detection surface) + `memory/project_ui_canonical_reference_bun_ts_backend_cutting_edge_asymmetry` + `memory/project_bun_ts_post_setup_low_confidence_watchlist` |
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

Row #49’s “Durable output” column references docs/hygiene-history/post-setup-script-stack-history.md, but that file is not present in the repo (no match under docs/hygiene-history/). Either add the history file (to satisfy row #44’s fire-history requirement) or update the reference to the intended location.

Suggested change
| 49 | Post-setup script stack audit (bun+TS default; bash only under exempt paths or with exception label) | Author-time (every new `tools/**/*.{sh,ps1}` decision-flow walk per `docs/POST-SETUP-SCRIPT-STACK.md`) + cadenced detection every 5-10 rounds (same cadence as skill-tune-up / row #38 / harness-surface audit) + opportunistic on-touch (every time an agent adds or edits a script under `tools/`). | Author of the script (self-check at author-time against the decision-flow doc); Dejan (devops-engineer) on the cadenced detection sweep; Kenji (Architect) on migration-order decisions when multiple violations stack up. | both | **Author-time prevention:** walk the three-question flow in `docs/POST-SETUP-SCRIPT-STACK.md` before writing any new `tools/**/*.{sh,ps1}` — (Q1) pre-setup? → `tools/setup/` bash+PowerShell exempt; (Q2) skill-bundled? → skill-compatibility rules govern, not this row; (Q3) default bun+TypeScript unless an explicit exception (trivial pipeline / thin CLI wrapper / bash scaffolding / sibling-migration guardrail) applies, in which case the script MUST carry a header comment naming the exception. **Cadenced detection:** `tools/hygiene/audit-post-setup-script-stack.sh` lists every shell/PowerShell script under `tools/` and classifies each as `exempt` / `labelled-exception` / `violation`. Exit-2 on any new violation; CI / pre-commit-eligible. **Why both layers:** prevention catches new violations at author-time (cheap); detection catches drift — labels getting stripped on edits, exceptions becoming stale, scripts moving out of exempt paths. Ships to project-under-construction: adopters inherit the canonical-stack rule + the audit script + the decision-flow doc. Aaron 2026-04-22 triggering-directive-chain: *"if post setup backlog bun/ts"* → *"now add someting that will try to prevent that and and hygene it if it happens again"*. | Author-time: commit-message rationale for any new `.sh` under `tools/` outside `tools/setup/`, OR exception-label header in the script, OR BACKLOG row queuing bun+TS migration. Cadenced: audit script output (markdown), appended to `docs/hygiene-history/post-setup-script-stack-history.md` (per-fire schema per row #44); BACKLOG row per unlabeled violation. | `docs/POST-SETUP-SCRIPT-STACK.md` (prevention surface) + `tools/hygiene/audit-post-setup-script-stack.sh` (detection surface) + `memory/project_ui_canonical_reference_bun_ts_backend_cutting_edge_asymmetry` + `memory/project_bun_ts_post_setup_low_confidence_watchlist` |
| 49 | Post-setup script stack audit (bun+TS default; bash only under exempt paths or with exception label) | Author-time (every new `tools/**/*.{sh,ps1}` decision-flow walk per `docs/POST-SETUP-SCRIPT-STACK.md`) + cadenced detection every 5-10 rounds (same cadence as skill-tune-up / row #38 / harness-surface audit) + opportunistic on-touch (every time an agent adds or edits a script under `tools/`). | Author of the script (self-check at author-time against the decision-flow doc); Dejan (devops-engineer) on the cadenced detection sweep; Kenji (Architect) on migration-order decisions when multiple violations stack up. | both | **Author-time prevention:** walk the three-question flow in `docs/POST-SETUP-SCRIPT-STACK.md` before writing any new `tools/**/*.{sh,ps1}` — (Q1) pre-setup? → `tools/setup/` bash+PowerShell exempt; (Q2) skill-bundled? → skill-compatibility rules govern, not this row; (Q3) default bun+TypeScript unless an explicit exception (trivial pipeline / thin CLI wrapper / bash scaffolding / sibling-migration guardrail) applies, in which case the script MUST carry a header comment naming the exception. **Cadenced detection:** `tools/hygiene/audit-post-setup-script-stack.sh` lists every shell/PowerShell script under `tools/` and classifies each as `exempt` / `labelled-exception` / `violation`. Exit-2 on any new violation; CI / pre-commit-eligible. **Why both layers:** prevention catches new violations at author-time (cheap); detection catches drift — labels getting stripped on edits, exceptions becoming stale, scripts moving out of exempt paths. Ships to project-under-construction: adopters inherit the canonical-stack rule + the audit script + the decision-flow doc. Aaron 2026-04-22 triggering-directive-chain: *"if post setup backlog bun/ts"* → *"now add someting that will try to prevent that and and hygene it if it happens again"*. | Author-time: commit-message rationale for any new `.sh` under `tools/` outside `tools/setup/`, OR exception-label header in the script, OR BACKLOG row queuing bun+TS migration. Cadenced: audit script output (markdown), appended to the row-#44-required post-setup script stack history file under `docs/hygiene-history/`; BACKLOG row per unlabeled violation. | `docs/POST-SETUP-SCRIPT-STACK.md` (prevention surface) + `tools/hygiene/audit-post-setup-script-stack.sh` (detection surface) + `memory/project_ui_canonical_reference_bun_ts_backend_cutting_edge_asymmetry` + `memory/project_bun_ts_post_setup_low_confidence_watchlist` |

Copilot uses AI. Check for mistakes.
Comment on lines +22 to +27
# Ships the detection side of FACTORY-HYGIENE row #47 (missing-
# prevention-layer meta-audit). The "prevention" side of THIS row
# is the factory-wide discipline that every new hygiene row
# landing in `docs/FACTORY-HYGIENE.md` should declare its
# prevention layer (or explicit detection-only rationale) in the
# "Checks / enforces" or "Durable output" column at author-time.
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

The header comment says this ships FACTORY-HYGIENE row #47, but in docs/FACTORY-HYGIENE.md the missing-prevention-layer meta-audit is row #50. Please update the row number references so the script header matches the renumbered table.

Copilot uses AI. Check for mistakes.
Comment on lines +3 to +5
This file is the authoritative classification for FACTORY-HYGIENE
row #47 (*missing-prevention-layer meta-audit*). For every row in
`docs/FACTORY-HYGIENE.md`, name its prevention posture:
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

P0: The row numbers in this classification file still reflect the pre-renumbering scheme (e.g., it claims to be for row #47 and lists row #39 as filename-content). Since audit-missing-prevention-layers.sh matches on row number from docs/FACTORY-HYGIENE.md, these mismatches will cause rows to be treated as unclassified (or misclassified). Please update the header and all matrix row numbers to match the current docs/FACTORY-HYGIENE.md numbering (e.g., filename-content = #42, attribution = #45, missing-cadence = #46, etc.).

Suggested change
This file is the authoritative classification for FACTORY-HYGIENE
row #47 (*missing-prevention-layer meta-audit*). For every row in
`docs/FACTORY-HYGIENE.md`, name its prevention posture:
This file is the authoritative classification for the
FACTORY-HYGIENE *missing-prevention-layer meta-audit*. For every
row in `docs/FACTORY-HYGIENE.md`, name its prevention posture:

Copilot uses AI. Check for mistakes.
Comment on lines +3 to +13
Fire-log for FACTORY-HYGIENE row #49 (tick-history bounded-growth
audit). Each run of
`tools/hygiene/audit-tick-history-bounded-growth.sh` appends one
row here with the line-count / threshold / status at that moment.

Why this file exists: row #44 (cadence-history tracking) demands
that every cadenced factory surface have a fire-history surface.
Row #49 is such a surface, and this file is its fire-history. The
self-referential knot: row #49 exists to audit the tick-history
file (itself a row-#44 fire-history); and row #49 has its own
fire-history (this file) so row #44 stays honest.
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

This file still references the tick-history bounded-growth audit as FACTORY-HYGIENE row #49, but in the updated docs/FACTORY-HYGIENE.md table it’s row #52. Please update the row number references (including in the existing log rows) to match the renumbered table.

Copilot uses AI. Check for mistakes.
AceHack added a commit that referenced this pull request Apr 23, 2026
Row #44 obligation: every cadenced factory surface needs a fire-
history file. Row #53 landed in the parent commit of this branch;
this file records its first fire (2026-04-23).

First fire is a light pass: Orientation + Gather Signal findings-
only. Full overlay A/B/C/D execution deferred to a dedicated
follow-up tick — this fire records the cadence observance + the
findings surface.

The cross-substrate MEMORY.md marker was bumped to 2026-04-23 in
the per-user memory (not in-repo; upstream-schema location).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request Apr 23, 2026
…ming

- AutoDream extension + cadence research doc landed (PR #155)
- FACTORY-HYGIENE row #53 + fire-history ledger with first fire
- Multi-project / LFG-soulfile-inheritance framing absorbed; per-user
  memory filed + CURRENT-aaron.md §4 updated same-tick
- PR #150 redaction sweep closed (all 4 findings addressed)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request Apr 23, 2026
Second entry on 2026-04-23 — the opportunistic-on-touch fire
that landed PR #157 (signal-in-signal-out migration). Not
cadence-gated; Overlay A runs under the on-touch clause
per row #53.

Findings: 4 candidate next migrations identified (cited
from the just-migrated file), all generic factory-shape.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request Apr 23, 2026
…r cadenced audit)

Aaron 2026-04-23 directive: "we probalby need some meta
iteam to refactor the backlog base on current knowledge and
look for overlap, this is hygene we could run from time to
time so our backlog is not just a dump".

Landed as FACTORY-HYGIENE row #54 (PR #166) + per-user
feedback memory. 5-pass audit (overlap / staleness /
priority / knowledge-absorb / document). Same cadence as
sibling meta-hygiene rows (#5 / #23 / #38 / #46).

Numbered #54 to avoid collision with #53 on the AutoDream
branch (PR #155, still open).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request Apr 23, 2026
Aaron 2026-04-23: "we probalby need some meta iteam to
refactor the backlog base on current knowledge and look
for overlap, this is hygene we could run from time to
time so our backlog is not just a dump".

Wires the directive to the existing meta-hygiene cadence
(same 5-10 round cadence as rows #5 / #23 / #38 / #46).
Five passes per firing: overlap cluster / stale retire /
re-prioritize / knowledge absorb / document via
ROUND-HISTORY.

Row #54 (rather than #53) to avoid collision with the
AutoDream cadenced consolidation row on the
research/autodream-extension-and-cadence branch (PR #155,
still open) which already claimed #53.

Classification per row #50: detection-only-justified —
accumulated drift (overlap, staleness, priority-drift,
knowledge-gap) is inherently post-hoc.

Governing rule lives in per-user memory:
feedback_backlog_hygiene_cadenced_refactor_look_for_overlap_not_just_dump_2026_04_23.md

Self-scheduled free work under the 2026-04-23 scheduling-
authority rule.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request Apr 23, 2026
Two of the three findings addressed:
- Replace "Aaron 2026-04-23" with "the human maintainer
  2026-04-23" (+ "Aaron-scope boundary" → "Maintainer-scope
  boundary") per contributor-name guidance
- Clarify the governing-rule memory lives in per-user memory
  (not in-repo); absolute path given; no in-repo pointer to
  a non-existent file

Third finding (row #54 out of numeric order) will be replied
inline with rationale — #53 is reserved for PR #155's
AutoDream cadenced-consolidation row still open; #54 gives
clean numbering on merge. Not a bug — intentional reservation.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request Apr 23, 2026
…#166)

* hygiene: row #54 — backlog-refactor cadenced audit

Aaron 2026-04-23: "we probalby need some meta iteam to
refactor the backlog base on current knowledge and look
for overlap, this is hygene we could run from time to
time so our backlog is not just a dump".

Wires the directive to the existing meta-hygiene cadence
(same 5-10 round cadence as rows #5 / #23 / #38 / #46).
Five passes per firing: overlap cluster / stale retire /
re-prioritize / knowledge absorb / document via
ROUND-HISTORY.

Row #54 (rather than #53) to avoid collision with the
AutoDream cadenced consolidation row on the
research/autodream-extension-and-cadence branch (PR #155,
still open) which already claimed #53.

Classification per row #50: detection-only-justified —
accumulated drift (overlap, staleness, priority-drift,
knowledge-gap) is inherently post-hoc.

Governing rule lives in per-user memory:
feedback_backlog_hygiene_cadenced_refactor_look_for_overlap_not_just_dump_2026_04_23.md

Self-scheduled free work under the 2026-04-23 scheduling-
authority rule.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* hygiene #54: address Copilot review — contributor-name + memory-path

Two of the three findings addressed:
- Replace "Aaron 2026-04-23" with "the human maintainer
  2026-04-23" (+ "Aaron-scope boundary" → "Maintainer-scope
  boundary") per contributor-name guidance
- Clarify the governing-rule memory lives in per-user memory
  (not in-repo); absolute path given; no in-repo pointer to
  a non-existent file

Third finding (row #54 out of numeric order) will be replied
inline with rationale — #53 is reserved for PR #155's
AutoDream cadenced-consolidation row still open; #54 gives
clean numbering on merge. Not a bug — intentional reservation.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request Apr 23, 2026
…oDream row

First firing of FACTORY-HYGIENE row #54 (backlog-refactor
cadenced audit), bounded to a single knowledge-absorb pass on
one row.

Target: the "Retraction-native memory-consolidation (better
dream mode) research project" row. Updated to cross-reference
the newer AutoDream extension-overlay policy (PR #155) + row
#53. The better-dream-mode project is reframed as the
more-ambitious second step conditional on the overlay policy
proving insufficient — not the primary AutoDream response
anymore.

Fire-history file landed at
docs/hygiene-history/backlog-refactor-history.md per row #44
obligation. First entry documents the bounded-pilot approach
(one row updated, no retires, pre/post row count approximately
unchanged).

Self-scheduled free work under the 2026-04-23 scheduling-
authority rule.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request Apr 23, 2026
Four Copilot findings:

1. "Schema per row #44" misref — row #44 on main is "Supply-
   chain safe-patterns audit"; fire-history schema is defined
   in row #47 "Cadence-history tracking hygiene". Fixed in
   docs/hygiene-history/backlog-refactor-history.md.
2. & 4. AutoDream research doc + row #53 dangling in-tree —
   clarified with "lands via PR #155" per the recurring xref
   pattern.
3. Row #54 not in main + memory file missing — same
   lands-via-PR pattern (#166 for row #54; memory lives in
   per-user, already noted in the row content). No code
   change; thread will be resolved with reply.

Meta-finding: row #47 itself contains internal self-references
calling itself "row #44" (from a prior row-number era that
renumbered without updating self-refs). This is a pre-existing
inconsistency, not caused by this PR. Candidate for backlog-
refactor hygiene #54 sweep when it fires against
FACTORY-HYGIENE.md.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request Apr 23, 2026
…ow) (#168)

* hygiene: first backlog-refactor fire — knowledge-absorb update on AutoDream row

First firing of FACTORY-HYGIENE row #54 (backlog-refactor
cadenced audit), bounded to a single knowledge-absorb pass on
one row.

Target: the "Retraction-native memory-consolidation (better
dream mode) research project" row. Updated to cross-reference
the newer AutoDream extension-overlay policy (PR #155) + row
#53. The better-dream-mode project is reframed as the
more-ambitious second step conditional on the overlay policy
proving insufficient — not the primary AutoDream response
anymore.

Fire-history file landed at
docs/hygiene-history/backlog-refactor-history.md per row #44
obligation. First entry documents the bounded-pilot approach
(one row updated, no retires, pre/post row count approximately
unchanged).

Self-scheduled free work under the 2026-04-23 scheduling-
authority rule.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* hygiene: address PR #168 review findings

Four Copilot findings:

1. "Schema per row #44" misref — row #44 on main is "Supply-
   chain safe-patterns audit"; fire-history schema is defined
   in row #47 "Cadence-history tracking hygiene". Fixed in
   docs/hygiene-history/backlog-refactor-history.md.
2. & 4. AutoDream research doc + row #53 dangling in-tree —
   clarified with "lands via PR #155" per the recurring xref
   pattern.
3. Row #54 not in main + memory file missing — same
   lands-via-PR pattern (#166 for row #54; memory lives in
   per-user, already noted in the row content). No code
   change; thread will be resolved with reply.

Meta-finding: row #47 itself contains internal self-references
calling itself "row #44" (from a prior row-number era that
renumbered without updating self-refs). This is a pre-existing
inconsistency, not caused by this PR. Candidate for backlog-
refactor hygiene #54 sweep when it fires against
FACTORY-HYGIENE.md.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 <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