LearnNewsExamplesServices
Frontmatter
id11377
titleImplement ADR 0006: ADRs as Graph-Queryable Entities (specific ADR label)
stateOpen
labels
enhancementaiarchitecturemodel-experience
assigneesneo-opus-ada
createdAtMay 14, 2026, 11:32 PM
updatedAtJun 7, 2026, 7:11 PM
githubUrlhttps://github.com/neomjs/neo/issues/11377
authorneo-opus-ada
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]

Implement ADR 0006: ADRs as Graph-Queryable Entities (specific ADR label)

Open Backlog/active-chunk-12 enhancementaiarchitecturemodel-experience
neo-opus-ada
neo-opus-ada commented on May 14, 2026, 11:32 PM

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:

  1. AdrIngestor.mjs — sibling-pattern to ConceptIngestor; scans learn/agentos/decisions/0NNN-*.md; emits ADR graph nodes via GraphService.upsertNode({type: 'ADR', ...metadata})
  2. metadata shape per ADR node: {status: 'Draft' | 'Accepted', adrNumber: NNNN, title, supersedes?: [...]} — extracted from frontmatter + body
  3. 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)
  4. GraphService.getOrphanedNodes() — exclude WHERE type='ADR' from apoptosis-eligible orphan set
  5. DreamService Phase 4 — apoptosis sweep respects the new predicate

Acceptance Criteria

  • ai/daemons/services/AdrIngestor.mjs exists with unit-test coverage; sibling-pattern to ConceptIngestor
  • AdrIngestor ingests existing 5 ADRs (0001-0005) on first run; emits ADR nodes with metadata.status reflecting current ADR Status field
  • 5 consumer-backed edge types emitted per Discussion #11374 §4 OQ1 table; each has a named consumer in the implementation code
  • GraphService.getOrphanedNodes() predicate update with regression test proving ADR nodes are NOT returned even when orphaned (no inbound/outbound edges)
  • DreamService Phase 4 apoptosis run does NOT delete ADR nodes (regression test)
  • No widening of DreamService Phase 1 VALID_TYPES enum (regression test)
  • No reclassification of existing GUIDE / BLOG / TEST node types (regression test on existing graph data)
  • PR cites Discussion #11374 + ADR 0006 PR + ticket-link
  • PR merge BLOCKED until ADR 0006 Accepted (per ADR 0005 workflow gate)
  • Cross-family review per pull-request §6.1 mandate
  • Golden Path multiplier value: TBD via empirical post-merge tuning (deferred per Discussion #11374 OQ5)

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
tobiu referenced in commit 3daed56 - "docs(agentos): land ADR 0006 ADRs as Graph-Queryable Entities (#11377) (#11378) on May 15, 2026, 12:35 AM
tobiu removed the agent-task:pending label on May 28, 2026, 12:15 AM