Purge legacy pre-pivot scaffold (decided: extractor/merger-only architecture)
Delete src/extract/ (pi-session normalize/extract/merge stubs), src/ledger.ts, src/schema.ts, src/derive.ts, src/queries/, src/cli.ts (npm run ingest/graph/ what-next), data/legacy-graph/, data/agent/ (pi agentDir vestige), and their config.ts/package.json references. The retroactive-bootstrap goal is dropped: the live chat store (AI SDK UIMessages) is the only session format now, and the old pi JSONLs in data/sessions/ stay on disk, inert. contracts.ts is the single schema.
This commit is contained in:
@@ -21,10 +21,6 @@ npm test # all tests (node:test via tsx; deterministic, no LLM)
|
||||
npm run typecheck # tsc --noEmit
|
||||
|
||||
npx tsx scripts/bench-graph.ts # force-layout benchmark (synthetic graphs)
|
||||
|
||||
# ── legacy v0 pipeline (dormant, see "Legacy scaffold" below) ──────────
|
||||
npm run ingest -- <session.jsonl> # normalize a pi session JSONL
|
||||
npm run graph # ledger stats
|
||||
```
|
||||
|
||||
## Environment (`.env.local`)
|
||||
@@ -148,10 +144,6 @@ data/ chats/ · graph/ · jobs/ — runtime state, git
|
||||
|
||||
**The live graph.** Every completed turn folds the chat into append-only JSONL ledgers (`emitChat`: tree nodes/edges, quiz outcome events, taught events — idempotent, checkpointed, so partial sessions still deposit value). The home view derives node states from the ledgers and lays them out with forceAtlas2 (run-then-freeze — no idle simulation). At session start the derived graph is rendered into a compact markdown block appended to the teacher's instructions (`buildGraphContext`) — whole graph while small, hotspots + 1-hop neighborhood past 150 nodes.
|
||||
|
||||
## Legacy scaffold (dormant)
|
||||
|
||||
The pre-pivot v0 pipeline — `src/ledger.ts`, `src/cli.ts` (`npm run ingest` / `graph`), `src/extract/` (normalize ✅, extract/merge stubs), `src/schema.ts`, `src/derive.ts`, `src/queries/` — is kept compiling as reference for a future **retroactive bootstrap** over the old pi session JSONLs (`data/sessions/`, bootstrap input only). It writes to `data/legacy-graph/` and shares nothing with the live store (`data/graph/`, owned by `src/store/graph.ts` per the `contracts.ts` shapes). See `docs/architecture.md` for its design.
|
||||
|
||||
## Testing
|
||||
|
||||
All deterministic, no LLM (models are injected as `MockLanguageModelV4` where an agent loop is under test):
|
||||
|
||||
Reference in New Issue
Block a user