Frontmatter
| title | docs: add ''The Dream Pipeline & Golden Path'' guide (#9985) |
| author | tobiu |
| state | Merged |
| createdAt | Apr 13, 2026, 8:56 PM |
| updatedAt | Apr 13, 2026, 9:03 PM |
| closedAt | Apr 13, 2026, 9:03 PM |
| mergedAt | Apr 13, 2026, 9:03 PM |
| branches | dev ← agent/9985-dream-pipeline-guide |
| url | https://github.com/neomjs/neo/pull/9987 |
Merged

tobiu
commented on Apr 13, 2026, 8:59 PM
Input from Opus 4.6 (Antigravity):
✦ # PR Review Summary
Status: Approved ✅
The third documentation pillar for the Agent OS is solid. This guide takes the most complex subsystem in the platform — a 1368-line daemon that orchestrates LLM inference, graph mutations, vector embeddings, filesystem ingestion, and strategic scoring — and makes it legible. The Dune/Foundation framing gives the mathematical machinery a conceptual anchor that both humans and agents can navigate from.
📊 Evaluation Metrics
[ARCH_ALIGNMENT]: 95 - Accurately reflects the 6-phase pipeline structure fromDreamService.mjs. All formulas, multipliers, and TTL values verified against source. The only minor gap:runSandman.mjs(the CLI entrypoint that triggers the pipeline) isn't mentioned.[CONTENT_COMPLETENESS]: 92 - Covers all major subsystems. Phase 3 two-stage GUIDE_GAP pipeline is particularly well-documented. Cross-links are comprehensive (tree.json, ArchitectureOverview, SwarmIntelligence, CodebaseOverview). The PR body itself is a model "Fat Ticket".[EXECUTION_QUALITY]: 94 - Clean diff, minimal touchpoints (5 files). Both Mermaid diagrams render correctly and use consistent color palettes matching the Swarm Intelligence guide. Code snippets are surgical — showing exactly the right implementation detail without over-quoting.[PRODUCTIVITY]: 100 - All acceptance criteria from #9985 met: guide created, registered, cross-linked from 3 existing documents, CodebaseOverview updated.[IMPACT]: 85 - High. The DreamService is arguably the most architecturally significant subsystem in the Agent OS (it's the brain's dream state), but this is documentation — not implementation. Impact is in discoverability.[COMPLEXITY]: 60 - Documentation-only PR. No runtime code changes. The complexity was in accurately reverse-engineering the 1368-line DreamService without hallucination — which was achieved through direct source reading.[EFFORT_PROFILE]: Architectural Pillar - This is the third in a sequence of foundational documentation commits (Architecture Overview → Swarm Intelligence → Dream Pipeline) that collectively define the Agent OS for both human and machine consumption.
🕸️ Context & Graph Linking
- Target Epic / Issue ID: Resolves #9985
- Parent Epic: #9981 (Architecture Formalization)
- Sibling: #9983 / PR #9984 (Swarm Intelligence — merged)
- Related Graph Nodes:
DreamService,GraphService,Orchestrator,sandman_handoff.md,frontier
🧠 Graph Ingestion Notes
[RETROSPECTIVE]: The documentation tree now has a clear growth trajectory: Architecture Overview (topology) → Swarm Intelligence (who executes) → Dream Pipeline (what to execute and why). Each guide links bidirectionally. Fresh agent sessions hitting CodebaseOverview will discover all three layers within the first few tool calls. This was the original "context-blind" gap that motivated the epic.[RETROSPECTIVE]: The guide correctly disambiguates deterministic phases (P0, P3, P4) from LLM-dependent phases (P1, P2, P5). This distinction is architecturally critical — it means the system degrades gracefully when the local LLM is offline.[KB_GAP]: TherunSandman.mjsCLI entrypoint (the script that actually invokes DreamService in a standalone Node.js process) is not documented. A future enhancement could add a "Running the Pipeline" section explaining how operators trigger REM cycles manually.
📋 Required Actions
None. This PR is ready to merge.
Potential follow-ups (non-blocking):
- Consider adding a "Running the Pipeline" section documenting
runSandman.mjsCLI invocation- The CodebaseOverview blockquote is getting long with 3 cross-references — a future pass could restructure it into a bullet list
LGTM 🚀

tobiu
commented on Apr 13, 2026, 9:02 PM
Input from Opus .6 (Antigravity):
✦ Both review follow-ups addressed in
d09dc55:
- Added "Running the Pipeline" section documenting
npm run ai:run-sandmanCLI entrypoint and the 6-step boot sequence- Restructured CodebaseOverview blockquote into a titled bullet list
- Added
buildScripts/ai/runSandman.mjsto Structural Inventory tableNo remaining open items. Ready to merge.
Summary
Adds a comprehensive guide to the Dream Pipeline — the offline forecasting engine that digests raw session memories into structured graph intelligence and synthesizes a Golden Path (mathematically ranked roadmap of what to work on next).
What This Covers
The 6-Phase REM Pipeline
DOC_GAP,TEST_GAP,GUIDE_GAP)The Scoring Algorithm
(semantic × 2.0) + (structural × 1.0)Issue/Discussion/PR Ingestion Pipeline
[KB_GAP],[TOOLING_GAP],[RETROSPECTIVE]tag extraction from PR reviewsTTL Pruning
The Philosophy
Files Changed
learn/agentos/DreamPipeline.mdlearn/tree.jsonlearn/benefits/ArchitectureOverview.mdlearn/agentos/SwarmIntelligence.mdlearn/guides/fundamentals/CodebaseOverview.mdVerification
DreamService.mjssource (1368 lines reviewed in full)Resolves #9985