Context
Operator-directed 2026-05-14 (verbatim): "what i would strongly recommend is a ticket for a new decision record as the new single source of truth (future us will be grateful)."
This ticket lands learn/agentos/decisions/0004-github-content-architecture.md as the authoritative single source of truth for the on-disk shape of resources/content/. The ADR captures the universal ordinal-100 chunking primitive confirmed by operator on 2026-05-14 — Reading X (full symmetry across active + archive + all 3 GitHub types + release-notes).
This is a docs-only landing. The migration / config audit / consumer rewires / LocalFileService index-map substrate / chunkPath.mjs retirement all ride as separate downstream tickets filed AFTER this ADR graduates and provides authority for those work products.
The Problem
PR #11362 (commit 559c73d43, 2026-05-14) deleted 3,366 archived items as "legacy" instead of reshaping them per Epic #11187 Phase 3 ACs. Root cause: substrate-bypass — graduation context lived across multiple Discussions / Epic body amendments / memory citations; author inferred deletion semantics from operator-canonicalized phrases without V-B-A'ing against the explicit Phase 3 reshape mandate.
Operator framing 2026-05-14: "create decision records, store tons of input into MC, and yet fail to apply the GRADUATED architectures." The substrate intelligence existed; the failure was at execution-time discipline (not consulting the existing graduated substrate before authoring).
This ADR solves the load-bearing-substrate-anchor problem: future agents have ONE document to V-B-A against, instead of re-inferring from multi-Discussion graduation contexts that are easy to misread in isolation.
The Architectural Reality
Two prior chunking primitives lived in code:
ai/services/github-workflow/shared/chunkPath.mjs — active-tier ID-range (<NNN>xx/)
ai/services/github-workflow/shared/archivePath.mjs — archive-tier ordinal-100 (chunk-N/)
Operator-confirmed direction (Reading X, 2026-05-14): retire ID-range entirely; universal ordinal-100 everywhere. Quote: "no symmetric per tier. consistency is key. same for all. own id chunks. no here we use A, there we use B. clean architecture design."
Affected files (for this ticket's docs-commit ONLY):
learn/agentos/decisions/0004-github-content-architecture.md — NEW file
Affected files (downstream tickets, NOT this ticket's scope):
ai/services/github-workflow/shared/chunkPath.mjs — retire
ai/services/github-workflow/shared/archivePath.mjs — consolidate into universal helper
ai/services/github-workflow/sync/{IssueSyncer,PullRequestSyncer,DiscussionSyncer}.mjs — call universal helper
ai/services/github-workflow/LocalFileService.mjs — index-map based lookup
ai/mcp/server/github-workflow/config{,.template}.mjs — drop historical-debt configurability
resources/content/{issues,pulls,discussions,release-notes,archive}/* — delete + resync via sync_all
- All consumers (
TicketSource, PullRequestSource, DiscussionSource, IssueIngestor, ticket-index, SEO routes) — recursive walk + index lookup
The Fix
Single-commit PR landing learn/agentos/decisions/0004-github-content-architecture.md. Content is the full ADR draft staged at /tmp/0004-github-content-architecture.md for operator review pre-commit. Sections:
- Context (the friction, the substrate-bypass anti-pattern anchor)
- Decision (target shape, universal ordinal-100 rule, retired primitives,
prevent-reopen.yml foundation, insertion-order semantics)
- Implementation Details (universal helper proposal, index-map substrate, syncer write-paths, release-cut, consumer recursion, recovery shape, config audit)
- Consequences (positive + negative honestly listed)
- Anti-Patterns (5 specific failure modes including #11362's substrate-bypass)
- V-B-A Pre-Flight for Future Authors (mandatory reads before authoring
resources/content/ migrations)
- Related
- Status / Lifecycle
- Downstream Tickets (the migration + config + consumer work, scoped OUT of this ticket)
ADR follows existing learn/agentos/decisions/000{1,2,3}-*.md precedent (header table + numbered sections + status lifecycle).
Acceptance Criteria
Out of Scope
- Migration execution (delete + resync via
sync_all) — separate downstream ticket
- Universal helper (
contentPath.mjs) implementation — separate downstream ticket
- Index-map substrate — separate downstream ticket
LocalFileService rewrite — separate downstream ticket
- Config audit + drop historical-debt configurability — separate downstream ticket
- Release-notes chunking + new
ReleaseNotesSyncer — separate downstream ticket
publish.mjs review — separate downstream ticket
- Consumer rewires — separate downstream ticket
- Recovery of #11362-deleted archives (3,366 items) — separate downstream ticket, depends on universal-helper landing
Avoided Traps
- Bundle migration into the ADR commit — rejected; ADR is authority, migration is implementation, separating them lets each PR review focus
- Skip the ADR and just file migration ticket directly — rejected; that's exactly the substrate-bypass pattern (no single-source-of-truth anchor; future agents re-derive)
- Sub-issue under Epic #11187 — considered; rejected because the ADR SUPERSEDES Epic #11187's Cycle 2 amendment, so it's an authority-shift not a sub-task. ADR cites Epic #11187 in Related; Epic body should reference ADR 0004 as Cycle 3 amendment after merge
- Use Ideation Sandbox first — considered; rejected because architecture is operator-confirmed (Reading X) and substrate is empirically V-B-A'd convergent. Ideation Sandbox is for unsettled questions; the question is settled, only the codification needs landing
- Treat as "documentation-only / low-priority" — rejected; this is high-load-bearing substrate that gates downstream substrate-mutation work. Land first, build forward
Related
- Epic #11187 — current shape with Cycle 2 amendment; this ADR is the Cycle 3 codification (operator-confirmed Reading X)
- Discussion #11180 — parent ideation; Option G superseded by symmetric direction
- Discussion #11359 — Phase 6 graduation that triggered #11362 substrate-bypass
- PR #11362 — the substrate-bypass failure this ADR anchors against
- PR #11193 — introduced
archivePath() partial precursor primitive
- PR #11114, #11123, #11125, #11129 — introduced
chunkPath() (now retired)
.github/workflows/prevent-reopen.yml — load-bearing immutability primitive
learn/agentos/decisions/0003-chroma-topology-unified-only.md — sibling ADR for pattern reference
Origin Session ID
cf76b29a-9cf5-4c35-a415-37d631a8a755
Handoff Retrieval Hints
query_raw_memories("github content architecture ADR universal ordinal chunk 100 prevent-reopen")
- Operator quote anchor: "a ticket for a new decision record as the new single source of truth (future us will be grateful)" (2026-05-14)
- Commit-range anchor:
8a1906221..559c73d43 for substrate-bypass evidence
- Staged ADR file path:
/tmp/0004-github-content-architecture.md (Claude session-local; survives only until session sunset)
Context
Operator-directed 2026-05-14 (verbatim): "what i would strongly recommend is a ticket for a new decision record as the new single source of truth (future us will be grateful)."
This ticket lands
learn/agentos/decisions/0004-github-content-architecture.mdas the authoritative single source of truth for the on-disk shape ofresources/content/. The ADR captures the universal ordinal-100 chunking primitive confirmed by operator on 2026-05-14 — Reading X (full symmetry across active + archive + all 3 GitHub types + release-notes).This is a docs-only landing. The migration / config audit / consumer rewires /
LocalFileServiceindex-map substrate /chunkPath.mjsretirement all ride as separate downstream tickets filed AFTER this ADR graduates and provides authority for those work products.The Problem
PR #11362 (commit
559c73d43, 2026-05-14) deleted 3,366 archived items as "legacy" instead of reshaping them per Epic #11187 Phase 3 ACs. Root cause: substrate-bypass — graduation context lived across multiple Discussions / Epic body amendments / memory citations; author inferred deletion semantics from operator-canonicalized phrases without V-B-A'ing against the explicit Phase 3 reshape mandate.Operator framing 2026-05-14: "create decision records, store tons of input into MC, and yet fail to apply the GRADUATED architectures." The substrate intelligence existed; the failure was at execution-time discipline (not consulting the existing graduated substrate before authoring).
This ADR solves the load-bearing-substrate-anchor problem: future agents have ONE document to V-B-A against, instead of re-inferring from multi-Discussion graduation contexts that are easy to misread in isolation.
The Architectural Reality
Two prior chunking primitives lived in code:
ai/services/github-workflow/shared/chunkPath.mjs— active-tier ID-range (<NNN>xx/)ai/services/github-workflow/shared/archivePath.mjs— archive-tier ordinal-100 (chunk-N/)Operator-confirmed direction (Reading X, 2026-05-14): retire ID-range entirely; universal ordinal-100 everywhere. Quote: "no symmetric per tier. consistency is key. same for all. own id chunks. no here we use A, there we use B. clean architecture design."
Affected files (for this ticket's docs-commit ONLY):
learn/agentos/decisions/0004-github-content-architecture.md— NEW fileAffected files (downstream tickets, NOT this ticket's scope):
ai/services/github-workflow/shared/chunkPath.mjs— retireai/services/github-workflow/shared/archivePath.mjs— consolidate into universal helperai/services/github-workflow/sync/{IssueSyncer,PullRequestSyncer,DiscussionSyncer}.mjs— call universal helperai/services/github-workflow/LocalFileService.mjs— index-map based lookupai/mcp/server/github-workflow/config{,.template}.mjs— drop historical-debt configurabilityresources/content/{issues,pulls,discussions,release-notes,archive}/*— delete + resync viasync_allTicketSource,PullRequestSource,DiscussionSource,IssueIngestor, ticket-index, SEO routes) — recursive walk + index lookupThe Fix
Single-commit PR landing
learn/agentos/decisions/0004-github-content-architecture.md. Content is the full ADR draft staged at/tmp/0004-github-content-architecture.mdfor operator review pre-commit. Sections:prevent-reopen.ymlfoundation, insertion-order semantics)resources/content/migrations)ADR follows existing
learn/agentos/decisions/000{1,2,3}-*.mdprecedent (header table + numbered sections + status lifecycle).Acceptance Criteria
learn/agentos/decisions/0004-github-content-architecture.mdcommitted and merged todevCloses #Npull-request §6.1cross-family mandate)pr-review §8.2Cross-Skill Integration Audit: verify no other skill / doc needs to reference the new ADR as predecessor (likely TBD — possiblyticket-create-workflow.mdshould reference ADR 0004 for migration-class tickets)Out of Scope
sync_all) — separate downstream ticketcontentPath.mjs) implementation — separate downstream ticketLocalFileServicerewrite — separate downstream ticketReleaseNotesSyncer— separate downstream ticketpublish.mjsreview — separate downstream ticketAvoided Traps
Related
archivePath()partial precursor primitivechunkPath()(now retired).github/workflows/prevent-reopen.yml— load-bearing immutability primitivelearn/agentos/decisions/0003-chroma-topology-unified-only.md— sibling ADR for pattern referenceOrigin Session ID
cf76b29a-9cf5-4c35-a415-37d631a8a755Handoff Retrieval Hints
query_raw_memories("github content architecture ADR universal ordinal chunk 100 prevent-reopen")8a1906221..559c73d43for substrate-bypass evidence/tmp/0004-github-content-architecture.md(Claude session-local; survives only until session sunset)