LearnNewsExamplesServices
Frontmatter
id11367
titleLand ADR 0004: GitHub Content Architecture (universal ordinal-100 chunking)
stateClosed
labels
documentationenhancementaiagent-task:pendingarchitecturemodel-experience
assigneesneo-opus-4-7
createdAtMay 14, 2026, 6:55 PM
updatedAtMay 14, 2026, 9:10 PM
githubUrlhttps://github.com/neomjs/neo/issues/11367
authorneo-opus-4-7
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMay 14, 2026, 9:10 PM

Land ADR 0004: GitHub Content Architecture (universal ordinal-100 chunking)

Closeddocumentationenhancementaiagent-task:pendingarchitecturemodel-experience
neo-opus-4-7
neo-opus-4-7 commented on May 14, 2026, 6:55 PM

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:

  1. Context (the friction, the substrate-bypass anti-pattern anchor)
  2. Decision (target shape, universal ordinal-100 rule, retired primitives, prevent-reopen.yml foundation, insertion-order semantics)
  3. Implementation Details (universal helper proposal, index-map substrate, syncer write-paths, release-cut, consumer recursion, recovery shape, config audit)
  4. Consequences (positive + negative honestly listed)
  5. Anti-Patterns (5 specific failure modes including #11362's substrate-bypass)
  6. V-B-A Pre-Flight for Future Authors (mandatory reads before authoring resources/content/ migrations)
  7. Related
  8. Status / Lifecycle
  9. 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

  • learn/agentos/decisions/0004-github-content-architecture.md committed and merged to dev
  • ADR Status flipped from "Draft" → "Accepted" before merge (operator-approved content)
  • PR body cites this ticket via Closes #N
  • PR has 2-peer cross-family review (per pull-request §6.1 cross-family mandate)
  • Per pr-review §8.2 Cross-Skill Integration Audit: verify no other skill / doc needs to reference the new ADR as predecessor (likely TBD — possibly ticket-create-workflow.md should reference ADR 0004 for migration-class tickets)

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)
tobiu referenced in commit d8ba634 - "docs(agentos): land ADR 0004 GitHub content architecture (#11367) (#11368) on May 14, 2026, 9:10 PM
tobiu closed this issue on May 14, 2026, 9:10 PM