Domain-neutral skeleton of the production LangGraph.
Use it to show topology (nodes, edges, Send-fan-out RAG, data-manager batching, staging truth channels) without shipping prompts, proprietary prompts, or astrology/math code.
| Piece | Production | This folder |
|---|---|---|
| Graph wiring | graph.ts (~2.9k lines) |
src/graph.ts (~420 lines) |
| State schema | RagState |
src/rag-state.ts — renamed fields (see table inside file) |
| Prompts | i18n + supervisor + drafter… | src/prompt-stubs.ts |
| Deterministic eval hook | staging-passport-truth-audit.ts |
src/eval-hooks.ts (stub) |
| DB / tools / ephemeris | wired | omitted — console stubs only |
astrograph-engine/
package.json
tsconfig.json
README.md
src/
graph.ts # nodes + StateGraph.compile()
rag-state.ts # Annotation.Root channels
prompt-stubs.ts # replaces all LLM instruction strings
eval-hooks.ts # placeholder for structural + prose audit
START → contextSummarizer → clientContextLoader → memoryLoader → intentRouter → supervisor
Then conditional:
CHAT|CLARIFY|POLISH→ proLeadCHART→ chartMaker (stub:snapshotBuilderNode)TOOL_RUN→ toolRunnerBOOK_TEXT→ bookExport- default (
RAG) → dataManager →Send× N → librarian → sorter → drafter → proLead →END
- RAG state: rich
Annotation.Rootreducers (concat lists, replace scalars). - Memory lane:
memoryLoaderNodestub (prod: pgvector history + CRM vectors). - Context loader: fills engine/tool digest placeholders (prod: SQLite + logs).
- Supervisor routing: structured schema shape (
nextAction,searchTheses,toolsNeeded). - dataManager: self-healing when fingerprint missing but
subjectBundlecomplete; union oftoolsNeeded+ core batch IDs; regeneratestructuredSummaryJson; recall archived calculation IDs. - Parallel librarians:
mapLibrarians+ LangGraphSend. - Staging fields:
stagingPassportTruthMd/stagingPassportTruthOkfilled whenconfigurable.stagingCollectTraceis set on snapshot path.
cd astrograph-engine && npm install && npm run build