# Ghostlight Current System Map Ghostlight still does not have a full runtime. The live system is a set of validated artifact seams for producing reviewed training data. ## Control Flow 1. Rehydrate from `state/map.yaml`, `notes/fresh-workspace-handoff.md`, this file, and `notes/ghostlight-implementation-plan.md`. 2. Run `npm run state:status`. 3. Work one bounded organ. 4. Validate the seam that matters. 5. Persist only belief-changing evidence. 6. Commit and push completed work. ## Core Surfaces - `state/map.yaml`: canonical mission, boundaries, live architecture, next action. - `state/evidence.jsonl`: distilled belief-changing evidence only. - `state/evidence.archive.jsonl`: older evidence preserved for archaeology. - `notes/fresh-workspace-handoff.md`: compact re-entry packet. - `notes/ghostlight-implementation-plan.md`: near-term implementation sequence. - `docs/architecture/`: detailed contracts and rationale. ## Active Artifact Pipeline ```text Aetheria lore/source context -> lore grounding digest / source notes -> canonical agent and scene state -> projected local context -> responder packet -> sandboxed responder output -> review and leakage audit -> mutation receipt -> updated scene/world/social state -> coordinator continuity and next-beat plan -> branch compiler materializes Ink + sidecar + compiler notes -> IF artifact reviewer audits consequence, fold, and visual continuity -> accepted fixture / future training corpus ``` Responder packets are one seam, not the whole project. The current branching scene path also requires coordinator receipts, branch compiler artifacts, and an independent IF review pass before a fixture is accepted. ## Important Contracts - Agent state: `schemas/agent-state.schema.json` - Projection examples: `schemas/projection-example.schema.json` - Lore grounding: `schemas/lore-grounding-digest.schema.json` - Projected local context: `schemas/projected-local-context.schema.json` - Coordinator artifacts: `schemas/coordinator-artifact.schema.json` - Responder packets: `schemas/responder-packet.schema.json` - Responder outputs: `schemas/responder-output.schema.json` - Ink branch contract: `docs/architecture/ink-branching-scenes.md` - Training stages and corpus gates: `docs/architecture/training-plan.md` ## Current Live Example - Research-enabled packet: `examples/responder-packets/scene-02-sanctuary-intake.sella_ren.packet.research.v0.json` - It uses `responder_scoped_repository_search`, now treats `allowed_scope` as seed scope, permits bounded traversal through relevant AetheriaLore links, and requires `consulted_refs`, `followed_refs`, `research_trace`, plus `research_summary`. - First research-enabled capture: `experiments/responder-packets/cold-wake-sanctuary-intake-sella-research-enabled-v0.capture.json` - First research-enabled mutation receipt: `experiments/responder-packets/cold-wake-sanctuary-intake-sella-research-enabled-v0.mutation.json` - First research-enabled aftermath state: `examples/agent-state.cold-wake-story-lab.after-sella-research-conditions.json` - The capture is useful draft data. Its research trace is `coordinator_reconstructed`, not `runner_captured`, so it audits the lore constraints but does not prove the responder's actual tool path. - Future accepted research-enabled gold captures must use `runner_captured` research trace status. - First accepted runner-traced coordinator-scoped sample: `experiments/responder-packets/cold-wake-callisto-provenance-veyr-trace-v0.capture.json` - It starts from `examples/agent-state.cold-wake-story-lab.after-sella-research-conditions.json`, projects Veyr for `scene-03-callisto-provenance`, embeds coordinator-retrieved lore as packet-visible source excerpts, runs a no-fork packet-only responder, and mutates state into `examples/agent-state.cold-wake-story-lab.after-veyr-category-offer.json`. - Second accepted runner-traced coordinator-scoped sample: `experiments/responder-packets/cold-wake-convoy-threshold-isdra-trace-v0.capture.json` - It starts from `examples/agent-state.cold-wake-story-lab.after-veyr-category-offer.json`, projects Isdra for `scene-04-convoy-threshold`, embeds coordinator-retrieved lore on Cold Wake, PSC category law, Ganymede rescue ledgers, heat debt, and Navigator mixed-interface spaces, then mutates state into `examples/agent-state.cold-wake-story-lab.after-isdra-limited-contact.json`. - Third accepted runner-traced coordinator-scoped sample: `experiments/responder-packets/cold-wake-sanctuary-authorized-contact-sella-trace-v0.capture.json` - It starts from `examples/agent-state.cold-wake-story-lab.after-isdra-limited-contact.json`, projects Sella for `scene-05-sanctuary-authorized-contact`, embeds coordinator-retrieved lore on Aya care capacity, Ganymede rescue ledgers, Navigator mixed-interface clinics, Cold Wake category failure, and heat debt, then mutates state into `examples/agent-state.cold-wake-story-lab.after-sella-bay-opened.json`. - Parent sessions currently receive only the subagent final message, not a visible tool-call transcript. Treat subagent research as self-reported unless the worker returns explicit research notes or a future runner captures calls. - Clean accepted-as-draft IF scaffold: `examples/ink/cold-wake-branch-and-fold.v0.ink` - Its sidecar is `examples/ink/cold-wake-branch-and-fold.v0.training.json`. - Its coordinator artifact is `examples/coordinator/cold-wake-branch-and-fold.v0.json`. - Its readable run is `experiments/cold-wake-story-lab/cold-wake-branch-and-fold-clean-run.v0.md`. - This fixture is coordinator/IF scaffold data. It is not raw responder gold. - The user review that exposed fake variables and cosmetic state is now seed taxonomy for the IF artifact reviewer. ## Archived Receipts Old local-model prototype files with `qwen` in their paths remain useful for validation and lessons about structured-output failure, object custody, embodiment, prompt leakage, and materialization. They are not active direction. Do not let them steer gold responder data unless the task is explicitly model plumbing. ## Missing Or Incomplete Organs - Deterministic speaker-local input slicer - Full prompt renderer - Classifier/appraiser pipeline - Relationship/perception updater - State mutator model - Student projector - Branch compiler implementation beyond coordinator-authored fixtures - IF artifact reviewer implementation beyond manual/frontier review - Full scene/event loop implementation - Culture prior engine - Automatic promotion of branch outcomes into canonical state ## Current North Star Generate high-quality, sandboxed, source-grounded branching-scene samples that can later train specialized Ghostlight models while staying usable by a game engine: exact inputs, exact outputs, provenance, review labels, state mutation receipts, branch compiler artifacts, IF review findings, and clear branch consequences.