Skip to content

tools: backlog split Phase 1a — generator + schema + example row (Aaron Otto-181, 3rd ask)#354

Merged
AceHack merged 4 commits intomainfrom
tools/backlog-split-phase-1a-generator-plus-schema
Apr 24, 2026
Merged

tools: backlog split Phase 1a — generator + schema + example row (Aaron Otto-181, 3rd ask)#354
AceHack merged 4 commits intomainfrom
tools/backlog-split-phase-1a-generator-plus-schema

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented Apr 24, 2026

Summary

Phase 1a of BACKLOG.md split per Aaron Otto-181 3rd-ask. Aaron approved reasonable defaults ("i trust your suggestions").

Phase-1a scope (this PR): tooling + schema + one example row. No BACKLOG.md content touched.

Files

  • tools/backlog/README.md — schema spec + frontmatter reference + how-to
  • tools/backlog/generate-index.sh — bash generator (3 modes: --stdout, --check, default write with Phase-1a safety guard)
  • docs/backlog/README.md — per-row-dir overview
  • docs/backlog/P2/B-0001-example-schema-self-reference.md — example row exercising the schema end-to-end

Defaults applied (Aaron's 6 open questions)

# Question Default this PR applies Rationale
1 ID scheme B-NNNN sequential Memory-file convention parallel
2 Generator language bash (temporary) Phase 1a CI fit; bun+TS long-term per Aaron Otto-182
3 Phase-2 timing drain first Avoid one-time cascade cost
4 Retire convention plain delete Per CLAUDE.md "honor those that came before"
5 Auto-ID scaffolder (Phase 1b) Friction reduction
6 composes_with lint best-effort first Strict after adoption

Aaron confirmed bun+TS is the long-term direction to eliminate needing both .sh + .ps1 per FACTORY-HYGIENE #51 cross-platform parity. Phase 1b or later can migrate the generator to bun+TS when convenient; bash lands Phase 1a as tight-CI-fit for immediate adoption.

Safety

Generator in write-mode refuses to overwrite an existing docs/BACKLOG.md with >50 lines unless BACKLOG_WRITE_FORCE=1 is set. Prevents Phase-2-before-Phase-2 accidents. Verified working:

$ tools/backlog/generate-index.sh
generate-index.sh: refusing to overwrite existing docs/BACKLOG.md...

Phase-2 content-migration PR will set BACKLOG_WRITE_FORCE=1 intentionally after populating per-row files.

Phases remaining

  • 1b: .github/workflows/backlog-index-integrity.yml drift-CI + tools/backlog/new-row.sh scaffolder
  • 2: content split mega-PR (reads BACKLOG.md, generates per-row files, regenerates index)
  • 3: CONTRIBUTING.md / AGENTS.md convention updates

Codex review requested

Aaron Otto-182: "can you ask codex too?" — inviting @codex review below.

Test plan

  • Generator empty-dir output: correct header + footer, no rows
  • Generator with B-0001 example: correct P2 section + link + checkbox
  • Safety guard fires with exit 1 on existing monolith
  • Markdownlint clean locally
  • No BACKLOG.md touched

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings April 24, 2026 10:27
@AceHack AceHack enabled auto-merge (squash) April 24, 2026 10:27
@AceHack
Copy link
Copy Markdown
Member Author

AceHack commented Apr 24, 2026

@codex review

Requesting peer-agent review on this BACKLOG-split Phase-1a tooling per Aaron Otto-182 directive. Key things to check:

  1. Generator correctness — does tools/backlog/generate-index.sh handle all valid frontmatter variations (quoted vs unquoted title, missing optional fields, different status values)?
  2. Safety guard robustness — can BACKLOG_WRITE_FORCE=1 accidentally fire (e.g. if set in CI env)? Should the guard also check a marker file or commit-message trigger?
  3. Schema completeness — does the frontmatter spec in tools/backlog/README.md cover all use cases the current 6100-line docs/BACKLOG.md contains? What fields are we likely to need that aren't listed?
  4. Cross-platform parity — bash is Phase-1a-temporary; bun+TS is long-term per Aaron. Any bash idioms here that would pose obstacles when migrating to TS?
  5. Phase-2 migration risk — the content-split mega-PR will touch 6100 lines. Heuristic parsing (bullet-list items under priority headers) — will it miss any row shapes? Rows with nested bullets? Multi-paragraph directives?

Independent eyes welcome. Advisory only; Aaron makes final calls on any design changes.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6a447ee234

ℹ️ 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".

Comment thread tools/backlog/generate-index.sh Outdated
Comment thread tools/backlog/generate-index.sh Outdated
Comment thread tools/backlog/generate-index.sh
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

Phase 1a scaffolding for splitting the monolithic docs/BACKLOG.md into per-row markdown files under docs/backlog/, with a generator to produce a compact index.

Changes:

  • Adds tools/backlog/generate-index.sh to generate/check/print the docs/BACKLOG.md index from per-row files, including a Phase-1a overwrite guard.
  • Adds schema + usage documentation for per-row backlog files (tools/backlog/README.md, docs/backlog/README.md).
  • Adds an example per-row backlog entry to exercise the schema and generator (docs/backlog/P2/B-0001-...).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 9 comments.

File Description
tools/backlog/generate-index.sh Bash generator for docs/BACKLOG.md with --stdout and --check modes plus a write safety guard.
tools/backlog/README.md Schema/spec and contributor instructions for per-row backlog files and index generation.
docs/backlog/README.md Overview of docs/backlog/ layout and quick reference for contributors.
docs/backlog/P2/B-0001-example-schema-self-reference.md Example backlog row demonstrating frontmatter + body end-to-end.

Comment thread tools/backlog/generate-index.sh Outdated
Comment thread tools/backlog/README.md Outdated
Comment thread tools/backlog/README.md Outdated
Comment thread docs/backlog/README.md Outdated
Comment thread tools/backlog/generate-index.sh Outdated
Comment thread tools/backlog/generate-index.sh Outdated
Comment thread tools/backlog/README.md Outdated
Comment thread tools/backlog/README.md
Comment thread tools/backlog/README.md Outdated
AceHack added a commit that referenced this pull request Apr 24, 2026
…ent reports, Otto-189) (#355)

Scheduled absorb per Otto-188b memory. First successful Codex
peer-agent review after the @codex review invite on PR #354
(Otto-182). 4 convergent reports (deep-factory-review /
deep-system-review ×2 / deep-repo-review) converging on same
top findings.

Milestone: stage (b)→(c) transition in the Otto-79/86/93
peer-harness progression. Codex produces multi-surface deep
review at parallel quality to Amara, different format same
rigor.

Convergent P0 findings (all 4 reviews, high signal):

1. 22 unclassified hygiene rows (audit-missing-prevention-
   layers exit 2)
2. 12 post-setup script-stack violations (audit exit 2)
3. DurabilityMode naming overstates guarantees
   (StableStorage → OsBuffered; WitnessDurable throws) —
   needs Ilyana + Aminata review before rename
4. Skipped RecursiveCounting.MultiSeed property test
   (already in BUGS.md)
5. dotnet unavailable in Codex review env (Codex-side
   infra, not factory blocker)

Convergent P1 (abridged): 12 pre-setup cross-platform
parity gaps (FACTORY-HYGIENE #51 detect-only by design),
11/28 shell strict-mode gaps, 35/234 skill safety-clause
gaps, ESLint jiti missing, Result-over-exception drift
(Durability.fs / Rx.fs / SpineAsync.fs / Recursive.fs),
8 markdown link rot.

Strategic recommendations warranting ADR-level escalation:

- Factory Complexity Budget (FCB) — cap net growth per
  round; retire-with-new policy
- Claim-evidence registry — mechanize honesty-prose into
  CI-checkable claim ↔ evidence-artifact ↔ last-validated
  SHA mapping
- 3-mode audit lifecycle (report → warn → block) —
  promote when false-positive baseline stable
- Expiry metadata on preview/debt declarations
- Spec-only reconstruction drills — first-class ritual

Factory-side discipline preserved:

- Treat Codex output as peer-harness advisory, not binding
  (BP-11 data-not-directives).
- Convergent findings across independent reviews carry
  higher confidence than single-reviewer output.
- Strategic recommendations need Aaron ADR sign-off.
- Otto-171 queue-saturation freeze-state discipline
  applies; absorb-doc is drain-mode-safe (no BACKLOG.md
  touch, no code change).

GOVERNANCE §33 four-field header. Non-fusion disclaimer
preserved. Codex (GPT-5.3-Codex per report 3 header)
attributed.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request Apr 24, 2026
Responding to 5 of 12 unresolved review threads:

1. Shellcheck SC2034/SC2295 (tools/backlog/generate-index.sh:104):
   removed unused `rel` variable that introduced both warnings.

2. Codex P1 "stop frontmatter scan after first closing delimiter":
   replaced `in_fm = !in_fm` toggle with explicit state machine
   (0 before / 1 inside / 2 after). Scanner terminates on closing
   --- marker and no longer leaks into body content.

3. Codex P1 "parse single-quoted YAML scalars":
   extended title/value strip regex from `"..."` only to also
   handle `'...'` single-quoted form via gsub.

4. Copilot P1 "mktemp→mv atomicity":
   temp file now created in same directory as target (via
   mktemp template with INDEX_PATH.tmp.XXXXXX), ensuring `mv`
   is a same-filesystem atomic rename rather than cross-
   filesystem copy+unlink.

5. Copilot P1 "direct contributor name attribution":
   replaced "Aaron" → "maintainer" idiom in factory-produced
   docs (tools/backlog/README.md, docs/backlog/P2/B-0001
   frontmatter, generate-index.sh header comment). History-
   exemption preserves commit-message Aaron-references per
   factory convention (loop-tick-history 2026-04-22).

Deferred (not this commit, separate follow-up):

- Codex P2 "second factor for BACKLOG_WRITE_FORCE bypass":
  defer until Phase 2 content-migration PR — will be the
  natural place to add the second factor (commit-message
  marker or dedicated workflow trigger).
- 7 remaining review threads: need triage per Codex/Copilot
  verdicts before I can pattern the response.

Course-correction this commit represents: active PR-management
(fix CI + address reviews + resolve threads) replaces the
ship-and-pray pattern that kept my PRs stuck. Factory-level
solution coming as a dedicated pr-resolve-loop skill per
maintainer directive "you need some pr resolve loop".

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request Apr 24, 2026
Addresses additional review threads beyond commit 6f659a0:

1. docs/backlog/README.md:34 "no row files exist yet" vs B-0001:
   Updated to acknowledge B-0001 placeholder row exists as a
   generator-exercise; substantive migration starts at B-0002
   with Phase 2.

2. tools/backlog/README.md:85 "forward-references new-row.sh"
   that doesn't exist yet: Explicitly marks the scaffolder
   invocation as Phase 1b target, with Phase 1a manual-file
   creation as current path. No ambiguity about what works
   now vs what's promised.

3. tools/backlog/README.md:95 "parses frontmatter via yq or
   awk fallback": Corrected to "inline awk parser, no yq
   required" which matches the actual implementation. yq
   positioned as Phase 1b upgrade if nested queries needed.

4. tools/backlog/generate-index.sh:24 header "Optional: yq":
   Updated to "No external yq required" matching the inline
   parser. Removes the "fallback if absent" wording that
   implied branching logic that doesn't exist.

5. tools/backlog/README.md:139 cross-reference to auto-memory
   path that doesn't resolve from external vantage: Replaced
   the memory/feedback_aaron_asked... path-reference (which
   lives in session-memory substrate, not necessarily synced
   to repo memory/) with a contextual description pointing
   at the detector's own header comment as the primary
   cross-reference for scope.

Conversation-preservation discipline (maintainer Otto-204):
"we are saving you resolution to all the comments and we
expect those to be excellent don't take shortcuts on the
feedback, do the right long term thing or backlog the right
thing and not it on the comment. We want to save both sides
of the conversation." This commit does the long-term thing
rather than the minimum-to-silence-the-warning thing.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 24, 2026 11:02
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9bf3d09ff1

ℹ️ 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".

Comment thread tools/backlog/generate-index.sh Outdated
Comment thread tools/backlog/generate-index.sh Outdated
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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

Comment thread docs/backlog/README.md Outdated
Comment thread tools/backlog/generate-index.sh
Comment thread tools/backlog/generate-index.sh Outdated
Comment thread tools/backlog/generate-index.sh Outdated
Comment thread tools/backlog/README.md Outdated
Comment thread tools/backlog/README.md Outdated
AceHack added a commit that referenced this pull request Apr 24, 2026
…on (#356)

Maintainer Otto-204: "you need some pr resolve loop that will
handled everyting needed to take a pr to compelteion so you
don't ahve to keep figuion it out" + Otto-204b: "we are
saving you resolution to all the comments and we expect
those to be excellent don't take shortcuts on the feedback,
do the right long term thing or backlog the right thing and
not it on the comment."

New P1 CI/DX BACKLOG row for .claude/skills/pr-resolve-loop/
SKILL.md. Six-step close cycle: CI-status → review-thread
resolution (reply-then-resolve; never shortcut) → name-
attribution lint → conversation-preservation hook → auto-
merge re-arm → loop-exit on merge / maintainer-escalation /
external-blocker.

Core discipline: active PR management vs ship-and-pray. The
factory's Otto-200..203 observation of "queue unchanged 136"
for 6+ ticks misread passive-stuck as livelock; actual
blocker was accumulated unresolved review-threads + silent
lint failures that armed auto-merge could not overcome. This
skill internalizes that learning; active resolution has
10-20× higher ROI than opening new PRs when queue saturated.

Conversation-preservation: every reply+resolve logs to
artifacts/pr-discussions/PR-<N>-conversation-log.json per
Otto-150..154 git-native preservation directive.

Non-goals: NOT an auto-merge-bypass, NOT a shortcut around
reviewer intent, NOT a retry-loop on flake, NOT an opener of
new PRs.

Composes with: Otto-171 queue-saturation-throttle, PR #335
preservation, @codex review + Copilot patterns, PR #213
git-hotspots, PR #354 BACKLOG-split-Phase-1a (first PR where
active-management discipline applied).

Priority P1 CI/DX. Effort: M skill design + S invocation +
S reply-template bank.

Placed in P1 CI/DX section line 2469, NOT BACKLOG tail.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request Apr 24, 2026
Applying PR-resolve-loop discipline to #352. 5 unresolved
review threads (Copilot P2 inline-code-span + P1 cross-ref
drift + P2 IP-discipline ambiguity + P1 inline-code-span
duplicate + P1 line-reference drift). 4 addressed in this
commit; resolution replies to follow via GraphQL.

1. Inline code span split across lines 1008-1009 (Copilot
   P2 threads 59XP74 + 59XSRN, duplicate finding): Moved
   the multi-line `docs/research/server-meshing-*.md` path
   onto its own line so the backtick-delimited span renders
   atomically per CommonMark. No more rendering risk.

2. "Otto-175c starship-franchise-mapping row" cross-ref
   that didn't resolve (Copilot P1 thread 59XSQc): Clarified
   the reference to note the row landed in PR #351 (merged).
   Amara 10th + 11th ferry cross-refs updated to point at
   their archived location under `docs/aurora/2026-04-24-
   amara-*.md` paths.

3. Wire-protocol row line-number reference was `~754`,
   actual location is `~830` (Copilot P1 thread 59XSRf):
   Corrected the line hint.

4. "No Star-Citizen trademarked content ingested" IP-
   discipline bullet was ambiguous — the row itself uses
   trademarked names for reference (Copilot P2 thread
   59XSQz): Rewrote the discipline block to explicitly
   distinguish industry-landscape reference (permitted)
   from proprietary-content ingestion (excluded), with
   specific "research-permitted" boundaries for CIG's
   public Inside-Star-Citizen + RSI content and for
   SpacetimeDB's Apache-2 repo.

Framing: this commit demonstrates the PR-resolve-loop
pattern (BACKLOG row Otto-204, PR #356) on a second PR
after the pattern was first applied to #354. Active
management vs ship-and-pray. Part of the corrective
response to Otto-204c livelock-diagnosis.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request Apr 24, 2026
PR-resolve-loop applied to #336 (KSK naming definition doc).
1 CI failure + 6 unresolved review threads.

CI fix:

- docs/definitions/KSK.md:19 MD026/no-trailing-punctuation:
  "## In this project, KSK means..." → "## In this project,
  KSK means" (dropped the three dots in the heading).

Review-thread fixes:

1. docs/GLOSSARY.md:819 — "LFG/lucent-ksk" read as in-repo
   path: Rewrote to explicitly mark as the external
   repository at https://github.com/Lucent-Financial-Group/
   lucent-ksk, clarified "not a local LFG/ directory in
   this repo."

2. docs/definitions/KSK.md:158 — named individuals in
   Attribution section violated factory name-attribution
   policy: Rewrote using role references ("the human
   maintainer", "an external AI collaborator", "a trusted
   external contributor"). Direct names preserved only in
   audit-trail surfaces per policy (commit messages,
   tick-history, session memory).

3. docs/definitions/KSK.md:153 — cross-reference to
   memory/feedback_ksk_naming_unblocked_*.md that didn't
   exist in repo: Removed path reference entirely; the
   factual substance was restated in role-based prose
   without a broken-link dependency.

4. docs/definitions/KSK.md:180 — "LFG/lucent-ksk" repeated
   same in-repo-path confusion as GLOSSARY: Applied same
   fix (external repo URL + explicit "separate repo"
   framing).

5. docs/definitions/KSK.md:207 — cross-reference list
   included `docs/aurora/*-5th-ferry-*`, `*-12th-ferry-*`,
   `*-14th-ferry-*`, `*-16th-ferry-*` globs that resolve
   to zero files in the current tree: Rewrote list to
   enumerate only verified in-repo references (6th / 7th /
   17th / 19th ferries that actually exist); added
   explicit note that earlier ferries (5th / 12th / 14th
   / 16th) live in ROUND-HISTORY + session memory rather
   than as standalone docs.

6. docs/definitions/KSK.md:191 — literal "+" continuation
   line violating markdownlint + repo convention: resolved
   as a side-effect of the Attribution rewrite — the
   replacement prose doesn't use "+" continuations.

Framing: third PR where PR-resolve-loop discipline is
applied (after #354 and #352). Active management continues.
Compound lesson from Otto-204c: prior-session review-
resolution precedents now integrated into per-tick habit,
not just sitting in memory.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request Apr 24, 2026
Applying PR-resolve-loop discipline to #352. 5 unresolved
review threads (Copilot P2 inline-code-span + P1 cross-ref
drift + P2 IP-discipline ambiguity + P1 inline-code-span
duplicate + P1 line-reference drift). 4 addressed in this
commit; resolution replies to follow via GraphQL.

1. Inline code span split across lines 1008-1009 (Copilot
   P2 threads 59XP74 + 59XSRN, duplicate finding): Moved
   the multi-line `docs/research/server-meshing-*.md` path
   onto its own line so the backtick-delimited span renders
   atomically per CommonMark. No more rendering risk.

2. "Otto-175c starship-franchise-mapping row" cross-ref
   that didn't resolve (Copilot P1 thread 59XSQc): Clarified
   the reference to note the row landed in PR #351 (merged).
   Amara 10th + 11th ferry cross-refs updated to point at
   their archived location under `docs/aurora/2026-04-24-
   amara-*.md` paths.

3. Wire-protocol row line-number reference was `~754`,
   actual location is `~830` (Copilot P1 thread 59XSRf):
   Corrected the line hint.

4. "No Star-Citizen trademarked content ingested" IP-
   discipline bullet was ambiguous — the row itself uses
   trademarked names for reference (Copilot P2 thread
   59XSQz): Rewrote the discipline block to explicitly
   distinguish industry-landscape reference (permitted)
   from proprietary-content ingestion (excluded), with
   specific "research-permitted" boundaries for CIG's
   public Inside-Star-Citizen + RSI content and for
   SpacetimeDB's Apache-2 repo.

Framing: this commit demonstrates the PR-resolve-loop
pattern (BACKLOG row Otto-204, PR #356) on a second PR
after the pattern was first applied to #354. Active
management vs ship-and-pray. Part of the corrective
response to Otto-204c livelock-diagnosis.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request Apr 24, 2026
…ndustry competitive angle (#352)

* backlog: Otto-180 Server Meshing + SpacetimeDB deep research — game-industry competitive angle

Aaron Otto-180: "also backlog server mesh from star citizen,
our db backend when we shard it should support this style of
cross shard communication like server mesh, it's amazing
actually, i think space time db is similar too or not it
might be orthogonal but we want to support these use cases
in our backend too. do deep reserach here, this could get us
lots of customers in the game industruy if we can compete
with server mess/space time db".

Two architectures to research (Aaron's "might be orthogonal"
intuition is correct):

1. Server Meshing (CIG / Star Citizen) — horizontal-scaling
   across many game servers; entity handoff + state
   propagation at server boundaries. Static vs Dynamic Server
   Meshing both in scope.

2. SpacetimeDB (Clockwork Labs, Apache-2) — vertical-
   integration of DB + server; reducers as stored-procedure-
   like functions; "the database IS the server" pitch;
   claims 1000x cheaper + faster than traditional MMO
   backend.

Zeta's retraction-native DBSP substrate can plausibly
support EITHER pattern (or both). Competitive differentiators
identified:

- Retraction-native semantics (native rollback /
  lag-compensation / failed-transaction recovery).
- Time-travel queries compose with persistent-universe
  replay / match-review.
- Columnar storage serves game-economy analytics.

CIG / RSI attribution preserved (Aaron supplied): Cloud
Imperium Games = developer; Roberts Space Industries =
publishing/marketing subsidiary + in-game ship manufacturer;
founded April 2012 by Chris Roberts.

Research deliverable: docs/research/server-meshing-
spacetimedb-comparison-zeta-sharding-fit.md with 5 sections
(SM architecture / SpacetimeDB architecture / Zeta fit /
competitive positioning / integration scenarios).

Customer-industry angle: 3-5 named studio-types (MMO / sim /
esports / mobile persistent / VR-social) with value-
proposition per segment.

IP discipline (same pattern as Otto-175c + Scientology rows):
no CIG proprietary content ingested beyond public Inside-
Star-Citizen + RSI blog; SpacetimeDB Apache-2 code study
fine; no positioning as CIG-adjacent or SpacetimeDB-
adjacent in public branding (technical reference OK).

Priority P2 research-grade; effort L (deep research) +
L (design ADR when sharding graduates). Waits on Zeta
multi-node foundation (not yet shipped).

Placed in "## P2 — Post-v1 query-surface research" section
at line ~921 — NOT BACKLOG tail — to avoid positional-
append conflict pattern (53 DIRTY siblings on tail).

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

* fix(#352): 4 review-thread P1/P2s on Server Meshing BACKLOG row

Applying PR-resolve-loop discipline to #352. 5 unresolved
review threads (Copilot P2 inline-code-span + P1 cross-ref
drift + P2 IP-discipline ambiguity + P1 inline-code-span
duplicate + P1 line-reference drift). 4 addressed in this
commit; resolution replies to follow via GraphQL.

1. Inline code span split across lines 1008-1009 (Copilot
   P2 threads 59XP74 + 59XSRN, duplicate finding): Moved
   the multi-line `docs/research/server-meshing-*.md` path
   onto its own line so the backtick-delimited span renders
   atomically per CommonMark. No more rendering risk.

2. "Otto-175c starship-franchise-mapping row" cross-ref
   that didn't resolve (Copilot P1 thread 59XSQc): Clarified
   the reference to note the row landed in PR #351 (merged).
   Amara 10th + 11th ferry cross-refs updated to point at
   their archived location under `docs/aurora/2026-04-24-
   amara-*.md` paths.

3. Wire-protocol row line-number reference was `~754`,
   actual location is `~830` (Copilot P1 thread 59XSRf):
   Corrected the line hint.

4. "No Star-Citizen trademarked content ingested" IP-
   discipline bullet was ambiguous — the row itself uses
   trademarked names for reference (Copilot P2 thread
   59XSQz): Rewrote the discipline block to explicitly
   distinguish industry-landscape reference (permitted)
   from proprietary-content ingestion (excluded), with
   specific "research-permitted" boundaries for CIG's
   public Inside-Star-Citizen + RSI content and for
   SpacetimeDB's Apache-2 repo.

Framing: this commit demonstrates the PR-resolve-loop
pattern (BACKLOG row Otto-204, PR #356) on a second PR
after the pattern was first applied to #354. Active
management vs ship-and-pray. Part of the corrective
response to Otto-204c livelock-diagnosis.

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

* fix(#352): 11th/12th ferry reference — drop forward-looking path (priors are pending absorbs PR #296 / PR #311)

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request Apr 24, 2026
PR-resolve-loop applied to #336 (KSK naming definition doc).
1 CI failure + 6 unresolved review threads.

CI fix:

- docs/definitions/KSK.md:19 MD026/no-trailing-punctuation:
  "## In this project, KSK means..." → "## In this project,
  KSK means" (dropped the three dots in the heading).

Review-thread fixes:

1. docs/GLOSSARY.md:819 — "LFG/lucent-ksk" read as in-repo
   path: Rewrote to explicitly mark as the external
   repository at https://github.com/Lucent-Financial-Group/
   lucent-ksk, clarified "not a local LFG/ directory in
   this repo."

2. docs/definitions/KSK.md:158 — named individuals in
   Attribution section violated factory name-attribution
   policy: Rewrote using role references ("the human
   maintainer", "an external AI collaborator", "a trusted
   external contributor"). Direct names preserved only in
   audit-trail surfaces per policy (commit messages,
   tick-history, session memory).

3. docs/definitions/KSK.md:153 — cross-reference to
   memory/feedback_ksk_naming_unblocked_*.md that didn't
   exist in repo: Removed path reference entirely; the
   factual substance was restated in role-based prose
   without a broken-link dependency.

4. docs/definitions/KSK.md:180 — "LFG/lucent-ksk" repeated
   same in-repo-path confusion as GLOSSARY: Applied same
   fix (external repo URL + explicit "separate repo"
   framing).

5. docs/definitions/KSK.md:207 — cross-reference list
   included `docs/aurora/*-5th-ferry-*`, `*-12th-ferry-*`,
   `*-14th-ferry-*`, `*-16th-ferry-*` globs that resolve
   to zero files in the current tree: Rewrote list to
   enumerate only verified in-repo references (6th / 7th /
   17th / 19th ferries that actually exist); added
   explicit note that earlier ferries (5th / 12th / 14th
   / 16th) live in ROUND-HISTORY + session memory rather
   than as standalone docs.

6. docs/definitions/KSK.md:191 — literal "+" continuation
   line violating markdownlint + repo convention: resolved
   as a side-effect of the Attribution rewrite — the
   replacement prose doesn't use "+" continuations.

Framing: third PR where PR-resolve-loop discipline is
applied (after #354 and #352). Active management continues.
Compound lesson from Otto-204c: prior-session review-
resolution precedents now integrated into per-tick habit,
not just sitting in memory.

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

* docs: KSK naming definition doc — resolves Amara 16th-ferry correction #7

Canonical expansion locked by Aaron Otto-142..145 (self-correcting
transient Otto-141 "SDK" typo): **KSK = Kinetic Safeguard Kernel**.

"Kernel" here is used in the safety-kernel / security-kernel sense
(Anderson 1972 reference-monitor, Saltzer-Schroeder complete-
mediation, aviation safety-kernel) — **NOT** an OS-kernel (not
Linux / Windows / BSD ring-0 / kernel-mode). The lead paragraph of
the doc makes this distinction up-front so readers coming from
OS-kernel contexts do not misinterpret.

Doc content (docs/definitions/KSK.md):

- "In this project, KSK means..." definitional anchor with the
  k1/k2/k3 + revocable-budgets + multi-party-consent + signed-
  receipts + traffic-light + optional-anchoring mechanism set
  (per Amara 5th ferry, ratified 7th/16th/17th)
- "Inspired by..." DNSSEC KSK, DNSCrypt + threshold-sig
  ceremonies, security kernels (Anderson / Saltzer-Schroeder),
  aviation safety kernels, microkernel OS lineage
- "NOT identical to..." OS kernel, DNSSEC KSK, generic
  root-of-trust, blockchain/ledger, policy engine (OPA Rego /
  XACML), authentication system
- Attribution + provenance: Aaron + Amara concept owners; Max
  initial-starting-point in LFG/lucent-ksk (preserved per
  Otto-77 attribution; rewrite authority per Otto-140)
- Relationship to Zeta / Aurora / lucent-ksk triangle
- Cross-references to 5 prior courier ferries

Also added glossary pointer entry (`### KSK (Kinetic Safeguard
Kernel)`) placed under "## Meta-algorithms and factory-native
coinages" section with plain + technical definition and pointer
to the full doc.

Addresses:
- Amara 16th-ferry §4 (KSK naming stabilization needed)
- Amara 17th-ferry correction #7 (stabilization still pending)
- BACKLOG row 4278 (updated in-place to reflect landing)

Authority: Aaron Otto-140 rewrite approved (Max-coordination
gate lifted; Max attribution preserved).

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

* fix(#336): markdownlint MD026 + 5 review-thread P1s

PR-resolve-loop applied to #336 (KSK naming definition doc).
1 CI failure + 6 unresolved review threads.

CI fix:

- docs/definitions/KSK.md:19 MD026/no-trailing-punctuation:
  "## In this project, KSK means..." → "## In this project,
  KSK means" (dropped the three dots in the heading).

Review-thread fixes:

1. docs/GLOSSARY.md:819 — "LFG/lucent-ksk" read as in-repo
   path: Rewrote to explicitly mark as the external
   repository at https://github.com/Lucent-Financial-Group/
   lucent-ksk, clarified "not a local LFG/ directory in
   this repo."

2. docs/definitions/KSK.md:158 — named individuals in
   Attribution section violated factory name-attribution
   policy: Rewrote using role references ("the human
   maintainer", "an external AI collaborator", "a trusted
   external contributor"). Direct names preserved only in
   audit-trail surfaces per policy (commit messages,
   tick-history, session memory).

3. docs/definitions/KSK.md:153 — cross-reference to
   memory/feedback_ksk_naming_unblocked_*.md that didn't
   exist in repo: Removed path reference entirely; the
   factual substance was restated in role-based prose
   without a broken-link dependency.

4. docs/definitions/KSK.md:180 — "LFG/lucent-ksk" repeated
   same in-repo-path confusion as GLOSSARY: Applied same
   fix (external repo URL + explicit "separate repo"
   framing).

5. docs/definitions/KSK.md:207 — cross-reference list
   included `docs/aurora/*-5th-ferry-*`, `*-12th-ferry-*`,
   `*-14th-ferry-*`, `*-16th-ferry-*` globs that resolve
   to zero files in the current tree: Rewrote list to
   enumerate only verified in-repo references (6th / 7th /
   17th / 19th ferries that actually exist); added
   explicit note that earlier ferries (5th / 12th / 14th
   / 16th) live in ROUND-HISTORY + session memory rather
   than as standalone docs.

6. docs/definitions/KSK.md:191 — literal "+" continuation
   line violating markdownlint + repo convention: resolved
   as a side-effect of the Attribution rewrite — the
   replacement prose doesn't use "+" continuations.

Framing: third PR where PR-resolve-loop discipline is
applied (after #354 and #352). Active management continues.
Compound lesson from Otto-204c: prior-session review-
resolution precedents now integrated into per-tick habit,
not just sitting in memory.

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

* fix(#336): 2 review threads — ROUND-HISTORY claim + ferry cross-ref numbers

- Thread PRRT_kwDOSF9kNM59YL4x (line 219): ROUND-HISTORY.md
  claim was false (grep confirms zero 'ferry' references and
  no tick rows); repointed to
  docs/hygiene-history/loop-tick-history.md where ferries and
  tick rows actually live.
- Thread PRRT_kwDOSF9kNM59YL4- (line 151): parenthetical
  listed 5th/7th/12th/14th/16th/17th but Cross-references is
  authoritative with 6th/7th/12th/17th/19th; aligned the
  parenthetical to match the verified in-repo list.

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request Apr 24, 2026
…ll (10 PRs)

Otto-207: maintainer "are we saving these yet gitnative and
have we backfilled them yet?" Honest answer was NO — the
PR-preservation BACKLOG row (Otto-150..154, PR #335 in queue)
specifies the discipline but never shipped the capture
tooling. This PR ships the minimal viable implementation
+ backfills 10 PRs from this session.

New tool:

- tools/pr-preservation/archive-pr.sh — one-shot bash
  script that fetches a PR's review threads, reviews, and
  comments via `gh api graphql` and writes them to
  docs/pr-discussions/PR-<N>-<slug>.md with YAML
  frontmatter (pr_number / title / author / state / dates
  / refs / archived_at / archive_tool).
- tools/pr-preservation/README.md — scope (Phase 0
  minimal vs Phase 1-4 longer plan), usage, output
  schema, backfill status, dependencies (bash + python3
  + gh; no external packages), cross-references to
  Otto-171 / Otto-204 / Otto-204c / PR #335.

Backfill (10 PRs archived this tick):

- PR #354 backlog-split Phase 1a
- PR #352 Server Meshing + SpacetimeDB research
- PR #336 KSK naming definition doc
- PR #342 calibration-harness Stage-2 design (merged)
- PR #344 Amara 19th ferry absorb (merged)
- PR #346 DST compliance criteria (merged)
- PR #350 Frontier rename pass-2 (merged)
- PR #353 BACKLOG split Phase 0 design (merged)
- PR #355 Codex first peer-agent deep-review absorb
  (merged)
- PR #356 PR-resolve-loop skill row (merged)

Total: 72 review threads + 40 reviews + 6 general comments
captured across ~97KB of archive markdown.

Long-term plan deliberately kept in BACKLOG row (Otto-150
..154 / PR #335 queue elevation) rather than expanded in
this commit's docs. Phase 0 shipping now; Phase 1 GHA
workflow + Phase 2 historical backfill + Phase 3
reconciliation + Phase 4 redaction layer remain queued
tickets. Per maintainer directive "make sure you backlog
then to a proper long term solution" — the phased plan
is already in PR #335 and covers the remaining work.

Discipline applied: active-management on the preservation
gap itself. Previous tick's "ship and pray" pattern is the
exact failure mode this tool begins to close (operator-
initiated archive instead of silent reliance on GitHub-
side conversation storage). Composes with Otto-204c
livelock-diagnosis memory + Otto-204 PR-resolve-loop
skill (this script is step 4 of that cycle's
conversation-preservation hook).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request Apr 24, 2026
…ll (10 PRs)

Otto-207: maintainer "are we saving these yet gitnative and
have we backfilled them yet?" Honest answer was NO — the
PR-preservation BACKLOG row (Otto-150..154, PR #335 in queue)
specifies the discipline but never shipped the capture
tooling. This PR ships the minimal viable implementation
+ backfills 10 PRs from this session.

New tool:

- tools/pr-preservation/archive-pr.sh — one-shot bash
  script that fetches a PR's review threads, reviews, and
  comments via `gh api graphql` and writes them to
  docs/pr-discussions/PR-<N>-<slug>.md with YAML
  frontmatter (pr_number / title / author / state / dates
  / refs / archived_at / archive_tool).
- tools/pr-preservation/README.md — scope (Phase 0
  minimal vs Phase 1-4 longer plan), usage, output
  schema, backfill status, dependencies (bash + python3
  + gh; no external packages), cross-references to
  Otto-171 / Otto-204 / Otto-204c / PR #335.

Backfill (10 PRs archived this tick):

- PR #354 backlog-split Phase 1a
- PR #352 Server Meshing + SpacetimeDB research
- PR #336 KSK naming definition doc
- PR #342 calibration-harness Stage-2 design (merged)
- PR #344 Amara 19th ferry absorb (merged)
- PR #346 DST compliance criteria (merged)
- PR #350 Frontier rename pass-2 (merged)
- PR #353 BACKLOG split Phase 0 design (merged)
- PR #355 Codex first peer-agent deep-review absorb
  (merged)
- PR #356 PR-resolve-loop skill row (merged)

Total: 72 review threads + 40 reviews + 6 general comments
captured across ~97KB of archive markdown.

Long-term plan deliberately kept in BACKLOG row (Otto-150
..154 / PR #335 queue elevation) rather than expanded in
this commit's docs. Phase 0 shipping now; Phase 1 GHA
workflow + Phase 2 historical backfill + Phase 3
reconciliation + Phase 4 redaction layer remain queued
tickets. Per maintainer directive "make sure you backlog
then to a proper long term solution" — the phased plan
is already in PR #335 and covers the remaining work.

Discipline applied: active-management on the preservation
gap itself. Previous tick's "ship and pray" pattern is the
exact failure mode this tool begins to close (operator-
initiated archive instead of silent reliance on GitHub-
side conversation storage). Composes with Otto-204c
livelock-diagnosis memory + Otto-204 PR-resolve-loop
skill (this script is step 4 of that cycle's
conversation-preservation hook).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request Apr 24, 2026
…ll (10 PRs)

Otto-207: maintainer "are we saving these yet gitnative and
have we backfilled them yet?" Honest answer was NO — the
PR-preservation BACKLOG row (Otto-150..154, PR #335 in queue)
specifies the discipline but never shipped the capture
tooling. This PR ships the minimal viable implementation
+ backfills 10 PRs from this session.

New tool:

- tools/pr-preservation/archive-pr.sh — one-shot bash
  script that fetches a PR's review threads, reviews, and
  comments via `gh api graphql` and writes them to
  docs/pr-discussions/PR-<N>-<slug>.md with YAML
  frontmatter (pr_number / title / author / state / dates
  / refs / archived_at / archive_tool).
- tools/pr-preservation/README.md — scope (Phase 0
  minimal vs Phase 1-4 longer plan), usage, output
  schema, backfill status, dependencies (bash + python3
  + gh; no external packages), cross-references to
  Otto-171 / Otto-204 / Otto-204c / PR #335.

Backfill (10 PRs archived this tick):

- PR #354 backlog-split Phase 1a
- PR #352 Server Meshing + SpacetimeDB research
- PR #336 KSK naming definition doc
- PR #342 calibration-harness Stage-2 design (merged)
- PR #344 Amara 19th ferry absorb (merged)
- PR #346 DST compliance criteria (merged)
- PR #350 Frontier rename pass-2 (merged)
- PR #353 BACKLOG split Phase 0 design (merged)
- PR #355 Codex first peer-agent deep-review absorb
  (merged)
- PR #356 PR-resolve-loop skill row (merged)

Total: 72 review threads + 40 reviews + 6 general comments
captured across ~97KB of archive markdown.

Long-term plan deliberately kept in BACKLOG row (Otto-150
..154 / PR #335 queue elevation) rather than expanded in
this commit's docs. Phase 0 shipping now; Phase 1 GHA
workflow + Phase 2 historical backfill + Phase 3
reconciliation + Phase 4 redaction layer remain queued
tickets. Per maintainer directive "make sure you backlog
then to a proper long term solution" — the phased plan
is already in PR #335 and covers the remaining work.

Discipline applied: active-management on the preservation
gap itself. Previous tick's "ship and pray" pattern is the
exact failure mode this tool begins to close (operator-
initiated archive instead of silent reliance on GitHub-
side conversation storage). Composes with Otto-204c
livelock-diagnosis memory + Otto-204 PR-resolve-loop
skill (this script is step 4 of that cycle's
conversation-preservation hook).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request Apr 24, 2026
…ll (10 PRs)

Otto-207: maintainer "are we saving these yet gitnative and
have we backfilled them yet?" Honest answer was NO — the
PR-preservation BACKLOG row (Otto-150..154, PR #335 in queue)
specifies the discipline but never shipped the capture
tooling. This PR ships the minimal viable implementation
+ backfills 10 PRs from this session.

New tool:

- tools/pr-preservation/archive-pr.sh — one-shot bash
  script that fetches a PR's review threads, reviews, and
  comments via `gh api graphql` and writes them to
  docs/pr-discussions/PR-<N>-<slug>.md with YAML
  frontmatter (pr_number / title / author / state / dates
  / refs / archived_at / archive_tool).
- tools/pr-preservation/README.md — scope (Phase 0
  minimal vs Phase 1-4 longer plan), usage, output
  schema, backfill status, dependencies (bash + python3
  + gh; no external packages), cross-references to
  Otto-171 / Otto-204 / Otto-204c / PR #335.

Backfill (10 PRs archived this tick):

- PR #354 backlog-split Phase 1a
- PR #352 Server Meshing + SpacetimeDB research
- PR #336 KSK naming definition doc
- PR #342 calibration-harness Stage-2 design (merged)
- PR #344 Amara 19th ferry absorb (merged)
- PR #346 DST compliance criteria (merged)
- PR #350 Frontier rename pass-2 (merged)
- PR #353 BACKLOG split Phase 0 design (merged)
- PR #355 Codex first peer-agent deep-review absorb
  (merged)
- PR #356 PR-resolve-loop skill row (merged)

Total: 72 review threads + 40 reviews + 6 general comments
captured across ~97KB of archive markdown.

Long-term plan deliberately kept in BACKLOG row (Otto-150
..154 / PR #335 queue elevation) rather than expanded in
this commit's docs. Phase 0 shipping now; Phase 1 GHA
workflow + Phase 2 historical backfill + Phase 3
reconciliation + Phase 4 redaction layer remain queued
tickets. Per maintainer directive "make sure you backlog
then to a proper long term solution" — the phased plan
is already in PR #335 and covers the remaining work.

Discipline applied: active-management on the preservation
gap itself. Previous tick's "ship and pray" pattern is the
exact failure mode this tool begins to close (operator-
initiated archive instead of silent reliance on GitHub-
side conversation storage). Composes with Otto-204c
livelock-diagnosis memory + Otto-204 PR-resolve-loop
skill (this script is step 4 of that cycle's
conversation-preservation hook).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
AceHack and others added 3 commits April 24, 2026 11:01
…on Otto-181, 3rd ask, approved)

Aaron Otto-181: "BACKLOG.md-touching sibling we gonna split
it lol, :)" + "approved whenever you want to do you this is
the 3rd time i asked you even created a git hot file
detector to find other hot files as hygene" + "i trust your
suggestions, can you ask codex too?"

Phase 1a landings (this PR):

- tools/backlog/README.md — schema spec + frontmatter
  reference + how-to.
- tools/backlog/generate-index.sh — bash generator that
  walks docs/backlog/**/*.md, parses YAML frontmatter via
  awk, emits sorted index. Three modes: --stdout, --check
  (drift detection), default write. Phase-1a safety guard
  refuses write-mode overwrite of existing BACKLOG.md with
  >50 lines unless BACKLOG_WRITE_FORCE=1 (prevents Phase-2-
  before-Phase-2 accidents).
- docs/backlog/README.md — per-row directory overview +
  current-state pointer.
- docs/backlog/P2/B-0001-example-schema-self-reference.md —
  placeholder row exercising the schema end-to-end;
  generator verified to emit a proper index from this input.

Reasonable defaults applied on Aaron's 6 open questions per
"i trust your suggestions":

1. ID scheme: B-NNNN (sequential, zero-padded 4 digits).
2. Generator language: bash (Phase-1a tight-CI fit + FACTORY-
   HYGIENE cross-platform parity compatible; bun+TS evaluable
   later if needed).
3. Phase-2 timing: drain queue first (recommended); this PR
   doesn't touch BACKLOG.md content.
4. Retire convention: plain delete (per CLAUDE.md "honor
   those that came before — retire by deletion, git-
   recoverable").
5. Auto-ID: scaffolder-picks-next-unused (Phase 1b ships
   tools/backlog/new-row.sh).
6. composes_with lint: best-effort first (Phase 1b warning);
   strict (error) after adoption maturity.

Aaron can override any of these via PR review; I'm making
the reasonable-default call per his standing "do you"
authorization.

Safety: this PR creates new files ONLY. Does not touch
docs/BACKLOG.md. Generator in write-mode would refuse to
run against the current 6100-line monolith thanks to the
Phase-1a guard.

Phases remaining:
- 1b: CI drift workflow (.github/workflows/backlog-index-
  integrity.yml) + new-row.sh scaffolder.
- 2: content split mega-PR (reads BACKLOG.md, generates per-
  row files, regenerates index with BACKLOG_WRITE_FORCE=1).
- 3: CONTRIBUTING.md / AGENTS.md convention updates.

Codex review requested per Aaron Otto-182 "can you ask codex
too?" — invoking @codex review in PR comment.

Composes with:
- docs/research/backlog-split-design-otto-181.md (Phase 0)
- tools/hygiene/audit-git-hotspots.sh (PR #213 BEHIND; the
  detector that identified BACKLOG.md as the hotspot)
- memory/feedback_aaron_asked_for_backlog_split_three_times
  _hot_file_detector_pr_213_exists_*.md (3rd-ask context)
- Otto-171 queue-saturation memory (the pattern Phase 2
  structurally eliminates)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Responding to 5 of 12 unresolved review threads:

1. Shellcheck SC2034/SC2295 (tools/backlog/generate-index.sh:104):
   removed unused `rel` variable that introduced both warnings.

2. Codex P1 "stop frontmatter scan after first closing delimiter":
   replaced `in_fm = !in_fm` toggle with explicit state machine
   (0 before / 1 inside / 2 after). Scanner terminates on closing
   --- marker and no longer leaks into body content.

3. Codex P1 "parse single-quoted YAML scalars":
   extended title/value strip regex from `"..."` only to also
   handle `'...'` single-quoted form via gsub.

4. Copilot P1 "mktemp→mv atomicity":
   temp file now created in same directory as target (via
   mktemp template with INDEX_PATH.tmp.XXXXXX), ensuring `mv`
   is a same-filesystem atomic rename rather than cross-
   filesystem copy+unlink.

5. Copilot P1 "direct contributor name attribution":
   replaced "Aaron" → "maintainer" idiom in factory-produced
   docs (tools/backlog/README.md, docs/backlog/P2/B-0001
   frontmatter, generate-index.sh header comment). History-
   exemption preserves commit-message Aaron-references per
   factory convention (loop-tick-history 2026-04-22).

Deferred (not this commit, separate follow-up):

- Codex P2 "second factor for BACKLOG_WRITE_FORCE bypass":
  defer until Phase 2 content-migration PR — will be the
  natural place to add the second factor (commit-message
  marker or dedicated workflow trigger).
- 7 remaining review threads: need triage per Codex/Copilot
  verdicts before I can pattern the response.

Course-correction this commit represents: active PR-management
(fix CI + address reviews + resolve threads) replaces the
ship-and-pray pattern that kept my PRs stuck. Factory-level
solution coming as a dedicated pr-resolve-loop skill per
maintainer directive "you need some pr resolve loop".

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Addresses additional review threads beyond commit 6f659a0:

1. docs/backlog/README.md:34 "no row files exist yet" vs B-0001:
   Updated to acknowledge B-0001 placeholder row exists as a
   generator-exercise; substantive migration starts at B-0002
   with Phase 2.

2. tools/backlog/README.md:85 "forward-references new-row.sh"
   that doesn't exist yet: Explicitly marks the scaffolder
   invocation as Phase 1b target, with Phase 1a manual-file
   creation as current path. No ambiguity about what works
   now vs what's promised.

3. tools/backlog/README.md:95 "parses frontmatter via yq or
   awk fallback": Corrected to "inline awk parser, no yq
   required" which matches the actual implementation. yq
   positioned as Phase 1b upgrade if nested queries needed.

4. tools/backlog/generate-index.sh:24 header "Optional: yq":
   Updated to "No external yq required" matching the inline
   parser. Removes the "fallback if absent" wording that
   implied branching logic that doesn't exist.

5. tools/backlog/README.md:139 cross-reference to auto-memory
   path that doesn't resolve from external vantage: Replaced
   the memory/feedback_aaron_asked... path-reference (which
   lives in session-memory substrate, not necessarily synced
   to repo memory/) with a contextual description pointing
   at the detector's own header comment as the primary
   cross-reference for scope.

Conversation-preservation discipline (maintainer Otto-204):
"we are saving you resolution to all the comments and we
expect those to be excellent don't take shortcuts on the
feedback, do the right long term thing or backlog the right
thing and not it on the comment. We want to save both sides
of the conversation." This commit does the long-term thing
rather than the minimum-to-silence-the-warning thing.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…P2 status trim + P2 word-splitting + P2 line-count drift + P2 (Phase 1b) annotations

Addresses remaining review-thread findings so PR #354 can clear
the required_conversation_resolution branch-protection rule.

Changes:
- extract_field: swap \x27 hex escape to \047 octal for POSIX
  awk portability (Copilot P1; macOS awk-compatible).
- extract_field: strip trailing whitespace from parsed values
  so "status: closed   " still matches the closed) case
  (Codex P2; silent mis-report of open-vs-closed fixed).
- generate: replace `for file in $files` with NUL-delimited
  `find -print0 | sort -z` + `while IFS= read -r -d ''` loop
  so paths containing spaces no longer break the index build
  (Codex P2; word-splitting hardening).
- generate: soften hardcoded "6100-line" monolith comment to
  "pre-split monolithic backlog" (Copilot P2; drift-proof).
- tools/backlog/README.md: annotate new-row.sh as "(Phase 1b)"
  in the structure diagram so readers see it is forward-
  referencing (Copilot P2).
- tools/backlog/README.md: soften the tools/hygiene/audit-git-
  hotspots.sh cross-reference since that script is not in tree;
  recovery path added for when/if the hygiene detector lands
  (Copilot P1; broken xref eliminated).
- docs/backlog/README.md: soften "6100-line" to "single-file"
  so the description does not drift as BACKLOG.md grows
  (Copilot P1; line-count drift eliminated).

Generator tested: --stdout produces valid index, default write
mode correctly refuses to overwrite the existing 8362-line
docs/BACKLOG.md without BACKLOG_WRITE_FORCE=1.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@AceHack AceHack force-pushed the tools/backlog-split-phase-1a-generator-plus-schema branch from 9bf3d09 to df1224f Compare April 24, 2026 15:03
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@AceHack AceHack merged commit d8988c8 into main Apr 24, 2026
10 checks passed
@AceHack AceHack deleted the tools/backlog-split-phase-1a-generator-plus-schema branch April 24, 2026 15:05
AceHack added a commit that referenced this pull request Apr 24, 2026
…tion

Addresses 5 copilot-pull-request-reviewer threads on PR #190:
- GLOSSARY.md length 814 -> approximately 840 (current tree is ~840)
- ROUND-HISTORY append-only discipline no longer attributed to
  GOVERNANCE §2+§6 (§2 is "docs are current-state", §6 is round
  naming; neither establishes append-only). Re-attributed to the
  file's own preamble as the authoritative source.
- ROUND-HISTORY.md length 3559 -> approximately 3560
- BACKLOG.md length 6761 -> "approximately 8500 (grows tick-by-tick;
  see BACKLOG split design doc)" — switching to approximate framing
  prevents recurring drift as backlog grows, and points at the
  Phase-1a generator already on main (PR #354).
- ROADMAP.md length 177 -> approximately 178
- VISION.md length 886 -> approximately 887

Switching from exact to approximate line counts is reviewer's own
suggested remediation; this eliminates the audit's dependency on
stable file sizes that are expected to drift.

Rebased on main after BACKLOG split Phase-1a (PR #354) landed;
keep-both-sides resolution on the append-only "Files audited"
list per Otto-229.
AceHack added a commit that referenced this pull request Apr 24, 2026
…tion

Addresses 5 copilot-pull-request-reviewer threads on PR #190:
- GLOSSARY.md length 814 -> approximately 840 (current tree is ~840)
- ROUND-HISTORY append-only discipline no longer attributed to
  GOVERNANCE §2+§6 (§2 is "docs are current-state", §6 is round
  naming; neither establishes append-only). Re-attributed to the
  file's own preamble as the authoritative source.
- ROUND-HISTORY.md length 3559 -> approximately 3560
- BACKLOG.md length 6761 -> "approximately 8500 (grows tick-by-tick;
  see BACKLOG split design doc)" — switching to approximate framing
  prevents recurring drift as backlog grows, and points at the
  Phase-1a generator already on main (PR #354).
- ROADMAP.md length 177 -> approximately 178
- VISION.md length 886 -> approximately 887

Switching from exact to approximate line counts is reviewer's own
suggested remediation; this eliminates the audit's dependency on
stable file sizes that are expected to drift.

Rebased on main after BACKLOG split Phase-1a (PR #354) landed;
keep-both-sides resolution on the append-only "Files audited"
list per Otto-229.
AceHack added a commit that referenced this pull request Apr 24, 2026
…ll (10 PRs)

Otto-207: maintainer "are we saving these yet gitnative and
have we backfilled them yet?" Honest answer was NO — the
PR-preservation BACKLOG row (Otto-150..154, PR #335 in queue)
specifies the discipline but never shipped the capture
tooling. This PR ships the minimal viable implementation
+ backfills 10 PRs from this session.

New tool:

- tools/pr-preservation/archive-pr.sh — one-shot bash
  script that fetches a PR's review threads, reviews, and
  comments via `gh api graphql` and writes them to
  docs/pr-discussions/PR-<N>-<slug>.md with YAML
  frontmatter (pr_number / title / author / state / dates
  / refs / archived_at / archive_tool).
- tools/pr-preservation/README.md — scope (Phase 0
  minimal vs Phase 1-4 longer plan), usage, output
  schema, backfill status, dependencies (bash + python3
  + gh; no external packages), cross-references to
  Otto-171 / Otto-204 / Otto-204c / PR #335.

Backfill (10 PRs archived this tick):

- PR #354 backlog-split Phase 1a
- PR #352 Server Meshing + SpacetimeDB research
- PR #336 KSK naming definition doc
- PR #342 calibration-harness Stage-2 design (merged)
- PR #344 Amara 19th ferry absorb (merged)
- PR #346 DST compliance criteria (merged)
- PR #350 Frontier rename pass-2 (merged)
- PR #353 BACKLOG split Phase 0 design (merged)
- PR #355 Codex first peer-agent deep-review absorb
  (merged)
- PR #356 PR-resolve-loop skill row (merged)

Total: 72 review threads + 40 reviews + 6 general comments
captured across ~97KB of archive markdown.

Long-term plan deliberately kept in BACKLOG row (Otto-150
..154 / PR #335 queue elevation) rather than expanded in
this commit's docs. Phase 0 shipping now; Phase 1 GHA
workflow + Phase 2 historical backfill + Phase 3
reconciliation + Phase 4 redaction layer remain queued
tickets. Per maintainer directive "make sure you backlog
then to a proper long term solution" — the phased plan
is already in PR #335 and covers the remaining work.

Discipline applied: active-management on the preservation
gap itself. Previous tick's "ship and pray" pattern is the
exact failure mode this tool begins to close (operator-
initiated archive instead of silent reliance on GitHub-
side conversation storage). Composes with Otto-204c
livelock-diagnosis memory + Otto-204 PR-resolve-loop
skill (this script is step 4 of that cycle's
conversation-preservation hook).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request Apr 24, 2026
…ll (10 PRs)

Otto-207: maintainer "are we saving these yet gitnative and
have we backfilled them yet?" Honest answer was NO — the
PR-preservation BACKLOG row (Otto-150..154, PR #335 in queue)
specifies the discipline but never shipped the capture
tooling. This PR ships the minimal viable implementation
+ backfills 10 PRs from this session.

New tool:

- tools/pr-preservation/archive-pr.sh — one-shot bash
  script that fetches a PR's review threads, reviews, and
  comments via `gh api graphql` and writes them to
  docs/pr-discussions/PR-<N>-<slug>.md with YAML
  frontmatter (pr_number / title / author / state / dates
  / refs / archived_at / archive_tool).
- tools/pr-preservation/README.md — scope (Phase 0
  minimal vs Phase 1-4 longer plan), usage, output
  schema, backfill status, dependencies (bash + python3
  + gh; no external packages), cross-references to
  Otto-171 / Otto-204 / Otto-204c / PR #335.

Backfill (10 PRs archived this tick):

- PR #354 backlog-split Phase 1a
- PR #352 Server Meshing + SpacetimeDB research
- PR #336 KSK naming definition doc
- PR #342 calibration-harness Stage-2 design (merged)
- PR #344 Amara 19th ferry absorb (merged)
- PR #346 DST compliance criteria (merged)
- PR #350 Frontier rename pass-2 (merged)
- PR #353 BACKLOG split Phase 0 design (merged)
- PR #355 Codex first peer-agent deep-review absorb
  (merged)
- PR #356 PR-resolve-loop skill row (merged)

Total: 72 review threads + 40 reviews + 6 general comments
captured across ~97KB of archive markdown.

Long-term plan deliberately kept in BACKLOG row (Otto-150
..154 / PR #335 queue elevation) rather than expanded in
this commit's docs. Phase 0 shipping now; Phase 1 GHA
workflow + Phase 2 historical backfill + Phase 3
reconciliation + Phase 4 redaction layer remain queued
tickets. Per maintainer directive "make sure you backlog
then to a proper long term solution" — the phased plan
is already in PR #335 and covers the remaining work.

Discipline applied: active-management on the preservation
gap itself. Previous tick's "ship and pray" pattern is the
exact failure mode this tool begins to close (operator-
initiated archive instead of silent reliance on GitHub-
side conversation storage). Composes with Otto-204c
livelock-diagnosis memory + Otto-204 PR-resolve-loop
skill (this script is step 4 of that cycle's
conversation-preservation hook).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request Apr 24, 2026
…ll (10 PRs)

Otto-207: maintainer "are we saving these yet gitnative and
have we backfilled them yet?" Honest answer was NO — the
PR-preservation BACKLOG row (Otto-150..154, PR #335 in queue)
specifies the discipline but never shipped the capture
tooling. This PR ships the minimal viable implementation
+ backfills 10 PRs from this session.

New tool:

- tools/pr-preservation/archive-pr.sh — one-shot bash
  script that fetches a PR's review threads, reviews, and
  comments via `gh api graphql` and writes them to
  docs/pr-discussions/PR-<N>-<slug>.md with YAML
  frontmatter (pr_number / title / author / state / dates
  / refs / archived_at / archive_tool).
- tools/pr-preservation/README.md — scope (Phase 0
  minimal vs Phase 1-4 longer plan), usage, output
  schema, backfill status, dependencies (bash + python3
  + gh; no external packages), cross-references to
  Otto-171 / Otto-204 / Otto-204c / PR #335.

Backfill (10 PRs archived this tick):

- PR #354 backlog-split Phase 1a
- PR #352 Server Meshing + SpacetimeDB research
- PR #336 KSK naming definition doc
- PR #342 calibration-harness Stage-2 design (merged)
- PR #344 Amara 19th ferry absorb (merged)
- PR #346 DST compliance criteria (merged)
- PR #350 Frontier rename pass-2 (merged)
- PR #353 BACKLOG split Phase 0 design (merged)
- PR #355 Codex first peer-agent deep-review absorb
  (merged)
- PR #356 PR-resolve-loop skill row (merged)

Total: 72 review threads + 40 reviews + 6 general comments
captured across ~97KB of archive markdown.

Long-term plan deliberately kept in BACKLOG row (Otto-150
..154 / PR #335 queue elevation) rather than expanded in
this commit's docs. Phase 0 shipping now; Phase 1 GHA
workflow + Phase 2 historical backfill + Phase 3
reconciliation + Phase 4 redaction layer remain queued
tickets. Per maintainer directive "make sure you backlog
then to a proper long term solution" — the phased plan
is already in PR #335 and covers the remaining work.

Discipline applied: active-management on the preservation
gap itself. Previous tick's "ship and pray" pattern is the
exact failure mode this tool begins to close (operator-
initiated archive instead of silent reliance on GitHub-
side conversation storage). Composes with Otto-204c
livelock-diagnosis memory + Otto-204 PR-resolve-loop
skill (this script is step 4 of that cycle's
conversation-preservation hook).

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

Addresses 5 copilot-pull-request-reviewer threads on PR #190:
- GLOSSARY.md length 814 -> approximately 840 (current tree is ~840)
- ROUND-HISTORY append-only discipline no longer attributed to
  GOVERNANCE §2+§6 (§2 is "docs are current-state", §6 is round
  naming; neither establishes append-only). Re-attributed to the
  file's own preamble as the authoritative source.
- ROUND-HISTORY.md length 3559 -> approximately 3560
- BACKLOG.md length 6761 -> "approximately 8500 (grows tick-by-tick;
  see BACKLOG split design doc)" — switching to approximate framing
  prevents recurring drift as backlog grows, and points at the
  Phase-1a generator already on main (PR #354).
- ROADMAP.md length 177 -> approximately 178
- VISION.md length 886 -> approximately 887

Switching from exact to approximate line counts is reviewer's own
suggested remediation; this eliminates the audit's dependency on
stable file sizes that are expected to drift.

Rebased on main after BACKLOG split Phase-1a (PR #354) landed;
keep-both-sides resolution on the append-only "Files audited"
list per Otto-229.
AceHack added a commit that referenced this pull request Apr 24, 2026
…tion

Addresses 5 copilot-pull-request-reviewer threads on PR #190:
- GLOSSARY.md length 814 -> approximately 840 (current tree is ~840)
- ROUND-HISTORY append-only discipline no longer attributed to
  GOVERNANCE §2+§6 (§2 is "docs are current-state", §6 is round
  naming; neither establishes append-only). Re-attributed to the
  file's own preamble as the authoritative source.
- ROUND-HISTORY.md length 3559 -> approximately 3560
- BACKLOG.md length 6761 -> "approximately 8500 (grows tick-by-tick;
  see BACKLOG split design doc)" — switching to approximate framing
  prevents recurring drift as backlog grows, and points at the
  Phase-1a generator already on main (PR #354).
- ROADMAP.md length 177 -> approximately 178
- VISION.md length 886 -> approximately 887

Switching from exact to approximate line counts is reviewer's own
suggested remediation; this eliminates the audit's dependency on
stable file sizes that are expected to drift.

Rebased on main after BACKLOG split Phase-1a (PR #354) landed;
keep-both-sides resolution on the append-only "Files audited"
list per Otto-229.
AceHack added a commit that referenced this pull request Apr 24, 2026
…of ~16 done) (#190)

* frontier-readiness: gap #5 audit — 5-file planning-docs batch (15 of ~16 done)

Batched audit of the project-planning files. All classified
short-form since shape is factory-generic + content is
project-specific.

- GLOSSARY.md → both (coupled): format generic, Zeta-term
  entries specific
- ROUND-HISTORY.md → zeta-library-specific: Zeta's rounds
- BACKLOG.md → zeta-library-specific: ~6700 lines Zeta rows
- ROADMAP.md → zeta-library-specific: Zeta roadmap
- VISION.md → zeta-library-specific: Zeta vision, 11-pass
  editing history, Elisabeth dedication

Pattern after 15 audits (3 classes cleanly separated):
- 5 factory-generic (GOVERNANCE / AGENT-BEST-PRACTICES /
  ALIGNMENT / AUTONOMOUS-LOOP / FACTORY-HYGIENE)
- 6 both-coupled (CLAUDE / AGENTS / CONFLICT-RESOLUTION /
  WONT-DO / TECH-RADAR / GLOSSARY)
- 4 zeta-library-specific (ROUND-HISTORY / BACKLOG /
  ROADMAP / VISION)

15 of ~16 top-level files done. Remaining: directory-
level audits (.claude/skills/**, .claude/agents/**,
openspec/**, tools/**, .github/**).

Multi-repo split mechanical plan clearer:
- factory-generic → verbatim to Frontier (5 files)
- both-coupled → surgical edits per file, most to Frontier
  with Zeta content extracted (6 files)
- zeta-library-specific → stay in Zeta, Frontier gets
  empty templates (4 files)

Attribution: Otto (loop-agent PM hat).

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

* review-drain: role-refs for VISION.md audit + fix pattern-summary count

Two PR #190 review threads:

- PRRT_kwDOSF9kNM59NTkB (P1, line ~492): rewrite direct
  contributor-name attribution to role references per Otto-220
  name-attribution discipline. "Aaron's 11-pass editorial
  lineage" -> "human-maintainer 11-pass editorial lineage";
  "Elisabeth dedication" -> generic "in-memoriam dedication
  header" with a pointer to the "honor those that came before"
  discipline in CLAUDE.md (which is where the specific
  named-memory carve-out lives).
- PRRT_kwDOSF9kNM59NTkg (P1, line ~504): pattern-summary table
  said Count=5 for "both (coupled)" but listed 6 files with a
  "(6 actually)" marker. Corrected count to 6, removed the
  marker, added an explicit 5+6+4=15 totals line so the table
  is mechanically consistent.

No semantic change to the audit classifications; the VISION.md
row still reads zeta-library-specific and the file still
belongs on the Zeta side of the split.

* review-drain: approximate line counts + correct ROUND-HISTORY attribution

Addresses 5 copilot-pull-request-reviewer threads on PR #190:
- GLOSSARY.md length 814 -> approximately 840 (current tree is ~840)
- ROUND-HISTORY append-only discipline no longer attributed to
  GOVERNANCE §2+§6 (§2 is "docs are current-state", §6 is round
  naming; neither establishes append-only). Re-attributed to the
  file's own preamble as the authoritative source.
- ROUND-HISTORY.md length 3559 -> approximately 3560
- BACKLOG.md length 6761 -> "approximately 8500 (grows tick-by-tick;
  see BACKLOG split design doc)" — switching to approximate framing
  prevents recurring drift as backlog grows, and points at the
  Phase-1a generator already on main (PR #354).
- ROADMAP.md length 177 -> approximately 178
- VISION.md length 886 -> approximately 887

Switching from exact to approximate line counts is reviewer's own
suggested remediation; this eliminates the audit's dependency on
stable file sizes that are expected to drift.

Rebased on main after BACKLOG split Phase-1a (PR #354) landed;
keep-both-sides resolution on the append-only "Files audited"
list per Otto-229.

* fix: markdownlint auto-fixes on planning-files-batch audit

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

* drain: resolve 2 threads on #190 (fix + backlog per Otto-236)

- Thread P0 line 561 (markdownlint continuation-starting-with-+):
  reworded both occurrences (lines 561 and 684) so wrapped
  continuation lines no longer begin with `+` — replaced with
  `plus` / `and` / comma-series per Copilot reviewer's suggestion.

- Thread P2 line 678 (unaudited docs in pattern-summary): added
  explanatory note under the summary table clarifying that three
  audits (ALIGNMENT / TECH-RADAR / FACTORY-HYGIENE) land in
  sibling PRs #185/#188 rather than this file, and flagged that
  the rollup assumes those PRs merge. Deeper mechanical-verification
  restructure backlogged as P2 "Separation-audit cross-PR rollup".

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

* drain: resolve 2 post-rebase threads on #190

Fixes (narrow) for both Copilot P1 at line 68 (dedicated bullets
for cross-PR audits) and Codex P2 at line 770 (honest 13-of-15
in-file count + mechanical-verification deficit flag pointing at
existing BACKLOG row).

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

* rebase-cleanup: remove stale 'audit pending sibling PR' notes after #188 merge

After rebasing onto origin/main (which carries PR #188's TECH-RADAR +
FACTORY-HYGIENE audits in this file), two PR-side breadcrumb rows that
said 'audited on sibling PR #188 ... no Audit section pending that merge'
are factually wrong — the merge has happened; the Audit sections exist.

Fold the cross-PR note accordingly.

Otto-254 roll-forward; no content re-litigated.

* fix: markdownlint MD018 on wrapped #188 (backtick-wrap per Otto-260)

Post-rebase #188-reference sat at wrapped-line-start. Backtick-wrap per Otto-260 (preserve canonical form; reflow/wrap, never rename).

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

* drain: resolve 4 threads on #190

Pattern-summary classification: ALIGNMENT moved from
factory-generic to both (coupled) to match its in-file
`## Audit —` section (codex P2 line 886). Counts updated:
4 factory-generic + 7 both-coupled + 4 zeta-library-specific
= 15.

Cross-PR note (line 895+) refreshed: PR #188 has merged, so
all 15 audits now have dedicated `## Audit —` sections in
this file; the wait-for-merge option has resolved itself. A
reader can `grep '^## Audit —'` and reproduce the 15-count
directly (copilot P1 line 72 inconsistency cleared).

BACKLOG row at line 5379 updated: removed stale "live in
sibling PRs #185 / #188 (still open)" premise (copilot P1 +
codex P2). Row now scopes to the residual concern (option c
tooling / CI diff check) since options (a) and (b) have
resolved naturally for the first 15 audits.

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 25, 2026
…ll (10 PRs)

Otto-207: maintainer "are we saving these yet gitnative and
have we backfilled them yet?" Honest answer was NO — the
PR-preservation BACKLOG row (Otto-150..154, PR #335 in queue)
specifies the discipline but never shipped the capture
tooling. This PR ships the minimal viable implementation
+ backfills 10 PRs from this session.

New tool:

- tools/pr-preservation/archive-pr.sh — one-shot bash
  script that fetches a PR's review threads, reviews, and
  comments via `gh api graphql` and writes them to
  docs/pr-discussions/PR-<N>-<slug>.md with YAML
  frontmatter (pr_number / title / author / state / dates
  / refs / archived_at / archive_tool).
- tools/pr-preservation/README.md — scope (Phase 0
  minimal vs Phase 1-4 longer plan), usage, output
  schema, backfill status, dependencies (bash + python3
  + gh; no external packages), cross-references to
  Otto-171 / Otto-204 / Otto-204c / PR #335.

Backfill (10 PRs archived this tick):

- PR #354 backlog-split Phase 1a
- PR #352 Server Meshing + SpacetimeDB research
- PR #336 KSK naming definition doc
- PR #342 calibration-harness Stage-2 design (merged)
- PR #344 Amara 19th ferry absorb (merged)
- PR #346 DST compliance criteria (merged)
- PR #350 Frontier rename pass-2 (merged)
- PR #353 BACKLOG split Phase 0 design (merged)
- PR #355 Codex first peer-agent deep-review absorb
  (merged)
- PR #356 PR-resolve-loop skill row (merged)

Total: 72 review threads + 40 reviews + 6 general comments
captured across ~97KB of archive markdown.

Long-term plan deliberately kept in BACKLOG row (Otto-150
..154 / PR #335 queue elevation) rather than expanded in
this commit's docs. Phase 0 shipping now; Phase 1 GHA
workflow + Phase 2 historical backfill + Phase 3
reconciliation + Phase 4 redaction layer remain queued
tickets. Per maintainer directive "make sure you backlog
then to a proper long term solution" — the phased plan
is already in PR #335 and covers the remaining work.

Discipline applied: active-management on the preservation
gap itself. Previous tick's "ship and pray" pattern is the
exact failure mode this tool begins to close (operator-
initiated archive instead of silent reliance on GitHub-
side conversation storage). Composes with Otto-204c
livelock-diagnosis memory + Otto-204 PR-resolve-loop
skill (this script is step 4 of that cycle's
conversation-preservation hook).

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

* tools: PR-preservation minimal archive tool + Otto-207 session backfill (10 PRs)

Otto-207: maintainer "are we saving these yet gitnative and
have we backfilled them yet?" Honest answer was NO — the
PR-preservation BACKLOG row (Otto-150..154, PR #335 in queue)
specifies the discipline but never shipped the capture
tooling. This PR ships the minimal viable implementation
+ backfills 10 PRs from this session.

New tool:

- tools/pr-preservation/archive-pr.sh — one-shot bash
  script that fetches a PR's review threads, reviews, and
  comments via `gh api graphql` and writes them to
  docs/pr-discussions/PR-<N>-<slug>.md with YAML
  frontmatter (pr_number / title / author / state / dates
  / refs / archived_at / archive_tool).
- tools/pr-preservation/README.md — scope (Phase 0
  minimal vs Phase 1-4 longer plan), usage, output
  schema, backfill status, dependencies (bash + python3
  + gh; no external packages), cross-references to
  Otto-171 / Otto-204 / Otto-204c / PR #335.

Backfill (10 PRs archived this tick):

- PR #354 backlog-split Phase 1a
- PR #352 Server Meshing + SpacetimeDB research
- PR #336 KSK naming definition doc
- PR #342 calibration-harness Stage-2 design (merged)
- PR #344 Amara 19th ferry absorb (merged)
- PR #346 DST compliance criteria (merged)
- PR #350 Frontier rename pass-2 (merged)
- PR #353 BACKLOG split Phase 0 design (merged)
- PR #355 Codex first peer-agent deep-review absorb
  (merged)
- PR #356 PR-resolve-loop skill row (merged)

Total: 72 review threads + 40 reviews + 6 general comments
captured across ~97KB of archive markdown.

Long-term plan deliberately kept in BACKLOG row (Otto-150
..154 / PR #335 queue elevation) rather than expanded in
this commit's docs. Phase 0 shipping now; Phase 1 GHA
workflow + Phase 2 historical backfill + Phase 3
reconciliation + Phase 4 redaction layer remain queued
tickets. Per maintainer directive "make sure you backlog
then to a proper long term solution" — the phased plan
is already in PR #335 and covers the remaining work.

Discipline applied: active-management on the preservation
gap itself. Previous tick's "ship and pray" pattern is the
exact failure mode this tool begins to close (operator-
initiated archive instead of silent reliance on GitHub-
side conversation storage). Composes with Otto-204c
livelock-diagnosis memory + Otto-204 PR-resolve-loop
skill (this script is step 4 of that cycle's
conversation-preservation hook).

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

* fix(#357): bot→agent terminology per GOVERNANCE §3 (maintainer Otto-208)

Maintainer Otto-208 flag on Phase 4 redaction-layer wording:
"No redaction — bot content + human content ... bot=agent."

Applied the Otto-156 pattern: Copilot + Codex + Claude Code
personas + github-actions are AGENTS with agency and
accountability (GOVERNANCE §3 + CLAUDE.md "Agents, not
bots."). Updated Phase 4 wording:

- "bot-review comments (Copilot, Codex) archive verbatim"
  →
  "agent-review comments (Copilot, Codex, Claude Code
  personas, github-actions) archive verbatim"
- Added explicit pointer to GOVERNANCE §3 + CLAUDE.md
  terminology convention.

PR body edit follows separately via `gh pr edit`.

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

* fix(#357): 9 review threads — paginate, null-check, dynamic repo, YAML quoting, README alignment, trailing-ws strip

Addresses all 9 unresolved Copilot + Codex threads on PR #357
(Otto-226 review-drain discipline, three-outcome model: fix).

Script changes (tools/pr-preservation/archive-pr.sh):
- Paginate reviewThreads / reviews / comments at the top level
  AND per-thread comments via cursor loops (threads 1 + 6 —
  no silent truncation).
- Validate `pullRequest != null` and detect top-level
  GraphQL `errors` before dereferencing (threads 2 + 4).
- Capture `gh api graphql` exit code explicitly instead of
  letting `set -e` swallow the diagnostic path (thread 3).
- Derive owner/name dynamically from `gh repo view --json
  nameWithOwner` with a hard-fail if detection fails —
  works from forks and after rename (thread 5).
- Quote all YAML frontmatter string values via `json.dumps`
  (title / author / state / ISO timestamps / head_ref /
  base_ref / archived_at / archive_tool), so refs with `#`
  or `:` don't break parsing (thread 7).

Documentation alignment:
- README now shows zero-padded filename shape
  `PR-<NNNN>-<slug>.md` (e.g. `PR-0357-...`) matching the
  script's output (thread 8 — chose "align README to
  script" since the 10 backfilled files already use the
  zero-padded form and renaming them would churn links).
- README notes pagination is in place (no more "may be
  truncated" silent-behaviour gap tied to thread 6).

Backfilled archives:
- Stripped trailing whitespace across all existing
  `docs/pr-discussions/*.md` via `perl -i -pe 's/[ \t]+$//'`
  (thread 9 — MD009 compliance for the CI markdownlint
  gate).

Also adds `docs/pr-discussions/PR-0357-...md` as the
self-hosting smoke test: the archive tool successfully
drains its own review queue.

Validation:
- `bash -n` clean
- `shellcheck` clean (no findings)
- End-to-end: `./tools/pr-preservation/archive-pr.sh 357`
  writes 9 threads / 2 reviews / 0 comments to 12179 bytes
- Error path: PR #99999 exits 2 with clear diagnostic

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

* fix(#357): Codex pagination P2 — backlog row for per-connection cursor refactor

* fix(#357): 8 review threads — integer PR validation, trailing-ws preservation, MD012 blank-line collapse, README/header filename shape + bash dep

Second drain pass on PR #357 review threads. Eight threads from
agent reviewers; all fix-in-place.

Script changes (`tools/pr-preservation/archive-pr.sh`):

- Integer validation on `$PR` in the shell (pre-Python) — prevents
  a Python traceback + generic "fetch failed exit 2" diagnostic
  when a typo / non-integer is passed.
- Dropped the per-line `rstrip()` normalization. Markdown uses
  two trailing spaces as a hard-line-break; this tool is a
  faithful audit copy and must preserve that intent.
- Added a blank-line-run collapse (3+ consecutive blank lines
  -> 2) so generated archives stay clean under markdownlint
  MD012 without destroying user-authored formatting.
- Header comment now documents the zero-padded `PR-<NNNN>-<slug>`
  filename shape (matches the implementation + README).
- Header comment on repo-detection aligned with actual behavior
  (requires `gh repo view`, no silent fallback).

README changes (`tools/pr-preservation/README.md`):

- Intro uses `PR-<NNNN>-<slug>.md` (matches Usage + implementation).
- Dependency relaxed from `bash 4+` to `bash` with a note — the
  script uses no bash-4-only features and macOS ships bash 3.2.

Backfilled archives regenerated under the new collapse rule so
they stop tripping MD012:

- PR-0350 (Frontier rename pass-2)
- PR-0352 (Server Meshing / SpacetimeDB deep research)
- PR-0354 (backlog-split Phase 1a)
- PR-0357 (this PR — self-archive re-fetched)

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

* fix(#357): 2 Codex P2 threads — PR-number stable filename key + preserve leading whitespace in archived bodies

Third-round review-thread drain on `tools/pr-preservation/archive-pr.sh`:

- `PRRT_kwDOSF9kNM59bWi5` (line 325): archive filename was derived
  from the title slug, so editing a PR title would write a second
  file instead of updating the existing record. Fix: PR number is
  now the canonical archive key. On re-archive, glob for an existing
  `PR-<NNNN>-*.md` and reuse its path regardless of current title.
  New PRs still land at `PR-<NNNN>-<slug>.md`.
- `PRRT_kwDOSF9kNM59bWi_` (line 369 + lines 388, 401): `.strip()`
  normalised review / thread-comment / general-comment bodies and
  destroyed semantically-significant leading indentation (indented
  code blocks, nested bullets). Switched to `.rstrip('\n')` so only
  trailing newlines are stripped; leading whitespace survives.

Smoke tested: `./archive-pr.sh 357` writes back to the same file
(no new PR-0357-* orphan), bash -n + shellcheck clean, diff shows
preserved `<details>` internal structure and indentation in archive.

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

* fix(#357): 6 review threads — drop truncation-warning claim, preserve last-line hard-line-breaks, normalize whitespace-only lines

Fourth drain pass on PR #357. Addresses 6 new P0 threads from
re-review:

- archive-pr.sh header said "Pagination + truncation warning
  for threads (>100)" but implementation only paginates, never
  emits a warning. Claim removed; comment now matches behaviour.
- `body.rstrip()` on the PR-description block stripped trailing
  spaces from the last line (kills markdown "  \n" hard-line
  breaks). Changed to `body.rstrip('\n')`.
- End-of-file `content.rstrip()` had the same problem — end-of-
  file hard-line-break would be lost. Changed to
  `content.rstrip('\n')` in both places (pre- and post-blank-
  line-collapse).
- Whitespace-only lines (e.g. "    " from Codex connector
  comments) tripped markdownlint MD009. Added a post-collapse
  normalization step: lines containing only whitespace are
  normalized to empty, while lines with any non-whitespace
  character keep trailing whitespace intact (two-space
  hard-line-breaks survive).

Regenerated four affected archives: PR-0350, PR-0352, PR-0354,
PR-0357. Verified: zero whitespace-only lines, zero 3+ blank-
line runs across all archives.

Syntax / shellcheck clean.

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

* fix(#357): Codex P1 audit-fidelity carve-out — skip blank-line collapse inside fenced code blocks

Codex review thread on PR #357 (line 486, P1, unresolved after 4
prior drain rounds): the formatter globally collapses every run of
blank lines to at most 2 after assembling the archive, which silently
rewrites user-authored bodies. In PR comments / reviews that include
fenced code blocks, logs, or templates where 3+ consecutive blank
lines are intentional, this changes the preserved content and breaks
the script's stated audit-fidelity goal.

Narrow fix: toggle code-fence state while scanning (``` / ~~~ at the
start of a line, ignoring leading whitespace), and SKIP both the
blank-line-run collapse and the whitespace-only normalization inside
fenced regions. Outside fences, MD012 / MD009 hygiene still applies
to tool-generated scaffolding so archives stay lint-clean.

Rationale: markdownlint MD012 already exempts fenced code from the
"no multiple consecutive blank lines" rule by design, so this fix
aligns with the linter's own semantics. Fenced regions in PR review
text are exactly where audit fidelity must win over scaffolding
hygiene — that is where logs, templates, and preformatted payloads
live.

Smoke-tested against PR #357 itself: re-running archive-pr.sh 357
produces a 107-line diff of recovered content (mostly inside the
<details> fenced blocks from Codex / Copilot connector payloads that
the prior collapse was truncating). Archive-file churn reverted on
this branch — archive regeneration belongs in a separate PR, not
here.

Gates: `bash -n` clean + `shellcheck` clean.

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

* drain(#357): fence-marker type-match + gh --jq consistency

Two Codex/Copilot threads on #357's archive-pr.sh:

1. **Codex P2 — fence detector conflates ``` and ~~~.** CommonMark
   requires the closing fence to use the SAME marker character as
   the opener (backticks close backticks; tildes close tildes). The
   previous `in_fence = not in_fence` on any fence-shaped line would
   prematurely close a backtick fence when a tilde line appeared
   inside it (and vice versa). Fix: track fence_marker on open,
   only flip back to False when the marker matches. Different-marker
   fence lines inside an open fence fall through to the verbatim
   branch so they're preserved as content.

2. **Copilot — `gh repo view -q` → `--jq` for consistency.** Other
   repo scripts (e.g. tools/hygiene/check-github-settings-drift.sh)
   use `--jq`. Switching to the long form matches the rest of the
   factory's gh invocations and avoids any `-q` ambiguity across
   gh versions.

Bash -n syntax check passes.

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

* drain(#357): REPO_ROOT git-tree guard + mktemp template + fence-length tracking + README cross-ref

Five Copilot + Codex threads:

1. **REPO_ROOT bogus-path risk.** `git rev-parse --show-toplevel || pwd`
   falls back to pwd outside a git checkout, but `gh repo view` can
   succeed via `gh repo set-default`, so the script could write
   docs/pr-discussions/ into a bogus REPO_ROOT directory. Hard-fail
   when not inside a git working tree.

2. **mktemp portability.** Plain `mktemp` with no template works on
   GNU coreutils (Linux) but fails on BSD mktemp (macOS). README
   advertises macOS support, so added `-t zeta-archive-pr.XXXXXX`
   template that works on both.

3. **Fence-length tracking (Codex P2 + Copilot).** Prior fix tracked
   marker TYPE (backtick vs tilde) but not fence LENGTH. Per
   CommonMark §4.5, the closing fence must be at least as long as
   the opener — a 4-backtick opener contains a 3-backtick line as
   content, not a closer. Now tracks both marker + length on open;
   closer must match BOTH.

4. **README cross-ref correction.** Canonical source for "agents,
   not bots" terminology is GOVERNANCE.md §3 ("Contributors are
   agents, not bots"). CLAUDE.md carries a session-bootstrap pointer
   at the same rule. Reworded to name GOVERNANCE as canonical with
   CLAUDE.md as the pointer.

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