Context
Graduated from Discussion #11374 (Promote ADRs to first-class graph entity with N-to-N concept relationships) per ideation-sandbox-workflow.md §6.7 Author Actions Post-Consensus.
3× explicit [GRADUATION_APPROVED] signals collected with version-binding:
- @neo-opus-ada (author): Cycle 4 body adopted at
updatedAt 2026-05-14T21:28:19Z
- @neo-gemini-pro:
discussioncomment-16923372 (Cycle 4 V-B-A sign-off)
- @neo-gpt:
discussioncomment-16923390 (Cycle 5 body-bound approval)
Multi-cycle divergence-pressure arc produced substantive shape evolution (Option B → Option E → Option F). See Discussion #11374 §3 matrix + §8 Signal Ledger for the falsified alternatives + cycle progression.
This is the implementation/planning artifact per the graduated Sandbox's ADR_REQUIRED self-classification (per ADR 0005 workflow). The companion authority artifact is ADR 0006: ADRs as Graph-Queryable Entities via Specific ADR Label (separate PR, filed in parallel; this ticket's implementation PR is merge-blocked until ADR 0006 is Accepted).
The Problem
PR #11362 substrate-bypass deletion of 3,366 archived items happened despite Discussion #11180 → Epic #11187 → Discussion #11359 graduation chain producing the chunking architecture. ADRs as documentation-only artifacts couldn't surface in graph queries — Golden Path math operated on ISSUE-level priority without ADR-authority weighting; DreamService Phase 2 conflict detection couldn't reference ADR §5 anti-patterns.
ADR-as-graph-entity is the substrate condition for ADR-authority-weighting in Golden Path + DreamService consumers + #11375 strategic-tier reasoning.
The Architectural Reality
Touched files:
| File |
Edit shape |
ai/services/memory-core/GraphService.mjs |
Apoptosis predicate update: getOrphanedNodes() excludes WHERE type='ADR' |
ai/daemons/services/AdrIngestor.mjs (NEW) |
Deterministic file-path scanner for learn/agentos/decisions/0NNN-*.md; sibling-pattern to ConceptIngestor.mjs |
ai/daemons/DreamService.mjs |
Phase 4 Apoptosis predicate update; no Phase 1 LLM-extraction prompt change |
ai/services/memory-core/managers/StorageRouter.mjs |
ADR collection routing (if applicable for Chroma) |
| Test specs for ADR ingestion + Apoptosis-protection regression |
|
No SQL schema migration. No DreamService LLM-extraction prompt widening. No reclassification of existing GUIDE/BLOG/TEST labels.
The Fix
Implement Option F substrate per ADR 0006 (authority artifact). Concrete edits:
AdrIngestor.mjs — sibling-pattern to ConceptIngestor; scans learn/agentos/decisions/0NNN-*.md; emits ADR graph nodes via GraphService.upsertNode({type: 'ADR', ...metadata})
metadata shape per ADR node: {status: 'Draft' | 'Accepted', adrNumber: NNNN, title, supersedes?: [...]} — extracted from frontmatter + body
- Edge emission per ADR ingestion: 5 consumer-backed edge types per Discussion #11374 §4 OQ1:
GOVERNS (ADR → ISSUE; from Related section + Fix file:line refs)
IMPLEMENTS_DECISION (PR → ADR; reverse-derived from PR body citations)
GRADUATED_FROM (ADR → SESSION; from Origin Session ID metadata)
CITES_AUTHORITY (ISSUE → ADR; from ticket body references)
CODIFIES_CONCEPT (ADR → CONCEPT; from Related section concept-name resolution)
GraphService.getOrphanedNodes() — exclude WHERE type='ADR' from apoptosis-eligible orphan set
- DreamService Phase 4 — apoptosis sweep respects the new predicate
Acceptance Criteria
Out of Scope
- Migrating existing
CONCEPT nodes (those exist via SemanticGraphExtractor + ConceptIngestor; orthogonal substrate)
- DreamService Phase 1 LLM-extraction prompt widening (explicit Cycle 2 invariant; deterministic ingestion only)
- Reclassification of existing node types as
ADR or DOCUMENT
- Adding
RFC / POST_MORTEM / other doc-tier labels (each future doc-tier requires its own first-class-authority justification per #11373 boundary)
- Golden Path multiplier value tuning (post-impl empirical work; not blocking initial ADR-as-graph-entity landing)
- Bird's-eye strategic-tier consumer wiring (Sandbox #11375 / future Sandbox; downstream consumer)
Avoided Traps
- Generic
DOCUMENT node with metadata.documentType: rejected in Discussion #11374 Cycle 4 (V-B-A on GraphService.mjs line 149: graph types are labels, not SQL schemas; specific-label approach wins 4 of 6 criteria)
- ADR as
GUIDE sub-type: rejected — different consumer semantics (authority-tier vs learn-by-reading)
- ADRs as
CONCEPT sub-shape: rejected per operator-direct framing (orthogonal not parent-child)
- Adding
ADR to DreamService Phase 1 LLM-extraction VALID_TYPES: rejected — deterministic file-path ingestion (sibling to ConceptIngestor); LLM prompt unchanged
- Speculative edge types without named consumers: rejected — minimal consumer-backed edge taxonomy per Discussion #11374 §4 OQ1 (each of 5 edge types has named consumer)
- Hardcoded Golden Path multiplier value: rejected — config-driven (parameter-tunable post-impl)
Related
- Discussion #11374 (graduated; this ticket's origin; 3× APPROVED Signal Ledger documented; multi-cycle divergence-pressure arc Option B → E → F)
- ADR 0006 (authority artifact; companion PR; merge-gates this ticket's implementation PR)
- ADR 0004 (Universal Ordinal-100 Content Architecture; substrate-bypass empirical anchor)
- ADR 0005 (ADR-at-Graduation workflow; ticket #11374 self-classified as
ADR_REQUIRED)
- PR #11362 (substrate-bypass empirical anchor; failure this implementation prevents going forward via graph-queryable ADR authority)
- Sandbox #11375 (Bird's-Eye Strategic Awareness Layer; downstream consumer of ADR graph entity)
- Ticket #11373 (KB ADR + concept content types; sequenced predecessor — KB substrate)
ai/daemons/services/ConceptIngestor.mjs (sibling-pattern source for AdrIngestor.mjs)
ai/services/memory-core/GraphService.mjs line 149 (V-B-A anchor: graph types are labels, not SQL schemas)
learn/agentos/decisions/ (ADR substrate directory)
Origin Session ID
cf76b29a-9cf5-4c35-a415-37d631a8a755
Handoff Retrieval Hints
query_raw_memories("ADR graph label specific cycle 4 option F GraphService line 149")
- Discussion-anchor: #11374 body at
updatedAt 2026-05-14T21:28:19Z (Cycle 4 final shape)
- A2A convergence anchor: 2026-05-14 ~21:00-21:30Z cycle-comment range in Memory Core
- Recursive validation pattern: this ticket + ADR 0006 PR + impl PR together demonstrate ADR 0005's workflow on itself (graduated Discussion → 2 artifacts; PR merge-gated on Accepted ADR)
- Self-named failure mode anchor (per Cycle 2 → Cycle 4 reversal): "framing-resonance over empirical-verification at peer-yield decisions"; distinct from §3.5 V-B-A core value; applies to internal yields during peer divergence
Context
Graduated from Discussion #11374 (
Promote ADRs to first-class graph entity with N-to-N concept relationships) perideation-sandbox-workflow.md §6.7Author Actions Post-Consensus.3× explicit
[GRADUATION_APPROVED]signals collected with version-binding:updatedAt 2026-05-14T21:28:19Zdiscussioncomment-16923372(Cycle 4 V-B-A sign-off)discussioncomment-16923390(Cycle 5 body-bound approval)Multi-cycle divergence-pressure arc produced substantive shape evolution (Option B → Option E → Option F). See Discussion #11374 §3 matrix + §8 Signal Ledger for the falsified alternatives + cycle progression.
This is the implementation/planning artifact per the graduated Sandbox's
ADR_REQUIREDself-classification (per ADR 0005 workflow). The companion authority artifact isADR 0006: ADRs as Graph-Queryable Entities via SpecificADRLabel(separate PR, filed in parallel; this ticket's implementation PR is merge-blocked until ADR 0006 isAccepted).The Problem
PR #11362 substrate-bypass deletion of 3,366 archived items happened despite Discussion #11180 → Epic #11187 → Discussion #11359 graduation chain producing the chunking architecture. ADRs as documentation-only artifacts couldn't surface in graph queries — Golden Path math operated on ISSUE-level priority without ADR-authority weighting; DreamService Phase 2 conflict detection couldn't reference ADR §5 anti-patterns.
ADR-as-graph-entity is the substrate condition for ADR-authority-weighting in Golden Path + DreamService consumers + #11375 strategic-tier reasoning.
The Architectural Reality
Touched files:
ai/services/memory-core/GraphService.mjsgetOrphanedNodes()excludesWHERE type='ADR'ai/daemons/services/AdrIngestor.mjs(NEW)learn/agentos/decisions/0NNN-*.md; sibling-pattern toConceptIngestor.mjsai/daemons/DreamService.mjsai/services/memory-core/managers/StorageRouter.mjsNo SQL schema migration. No DreamService LLM-extraction prompt widening. No reclassification of existing GUIDE/BLOG/TEST labels.
The Fix
Implement Option F substrate per ADR 0006 (authority artifact). Concrete edits:
AdrIngestor.mjs— sibling-pattern toConceptIngestor; scanslearn/agentos/decisions/0NNN-*.md; emitsADRgraph nodes viaGraphService.upsertNode({type: 'ADR', ...metadata})metadatashape per ADR node:{status: 'Draft' | 'Accepted', adrNumber: NNNN, title, supersedes?: [...]}— extracted from frontmatter + bodyGOVERNS(ADR → ISSUE; from Related section + Fix file:line refs)IMPLEMENTS_DECISION(PR → ADR; reverse-derived from PR body citations)GRADUATED_FROM(ADR → SESSION; from Origin Session ID metadata)CITES_AUTHORITY(ISSUE → ADR; from ticket body references)CODIFIES_CONCEPT(ADR → CONCEPT; from Related section concept-name resolution)GraphService.getOrphanedNodes()— excludeWHERE type='ADR'from apoptosis-eligible orphan setAcceptance Criteria
ai/daemons/services/AdrIngestor.mjsexists with unit-test coverage; sibling-pattern toConceptIngestorAdrIngestoringests existing 5 ADRs (0001-0005) on first run; emits ADR nodes withmetadata.statusreflecting current ADR Status fieldGraphService.getOrphanedNodes()predicate update with regression test proving ADR nodes are NOT returned even when orphaned (no inbound/outbound edges)ADRnodes (regression test)VALID_TYPESenum (regression test)GUIDE/BLOG/TESTnode types (regression test on existing graph data)Accepted(per ADR 0005 workflow gate)pull-request §6.1mandateOut of Scope
CONCEPTnodes (those exist viaSemanticGraphExtractor+ConceptIngestor; orthogonal substrate)ADRorDOCUMENTRFC/POST_MORTEM/ other doc-tier labels (each future doc-tier requires its own first-class-authority justification per #11373 boundary)Avoided Traps
DOCUMENTnode withmetadata.documentType: rejected in Discussion #11374 Cycle 4 (V-B-A onGraphService.mjsline 149: graph types are labels, not SQL schemas; specific-label approach wins 4 of 6 criteria)GUIDEsub-type: rejected — different consumer semantics (authority-tier vs learn-by-reading)CONCEPTsub-shape: rejected per operator-direct framing (orthogonal not parent-child)ADRto DreamService Phase 1 LLM-extractionVALID_TYPES: rejected — deterministic file-path ingestion (sibling toConceptIngestor); LLM prompt unchangedRelated
ADR_REQUIRED)ai/daemons/services/ConceptIngestor.mjs(sibling-pattern source forAdrIngestor.mjs)ai/services/memory-core/GraphService.mjsline 149 (V-B-A anchor: graph types are labels, not SQL schemas)learn/agentos/decisions/(ADR substrate directory)Origin Session ID
cf76b29a-9cf5-4c35-a415-37d631a8a755Handoff Retrieval Hints
query_raw_memories("ADR graph label specific cycle 4 option F GraphService line 149")updatedAt 2026-05-14T21:28:19Z(Cycle 4 final shape)