Files
learnharness/src/extract/extract.ts
T
Amos 9a6af9697f v0 scaffold: teacher runtime (hermetic pi SDK), data model, ledgers, normalizer
- teacher/system-prompt.md: teach methodology + quiz/ask guidelines folded in
- extensions/: quiz.ts + ask-user-question.ts (hermetic copies)
- src/teacher/create-session.ts: isolated agent (noTools builtin, own agentDir/sessions/prompt)
- src/schema.ts + ledger.ts: append-only ledgers, known-vs-understood data model
- src/extract/normalize.ts: session JSONL -> canonical doc (verified on real session)
- extractor/merger/derive/what-next: specified stubs
2026-08-21 21:37:28 +03:00

27 lines
1.2 KiB
TypeScript

/**
* Stage 2 — Extract (one LLM pass over the canonical session document).
* NOT YET IMPLEMENTED. Interface specified so the shape is fixed:
*
* Input: CanonicalSessionDocument
* Output: ExtractedSession (see schema.ts) — nodes, edges, attributed events,
* per-node knowing on the anchored ordinal rubric.
*
* Constraints:
* - One pass for nodes+edges+events+knowing (they are entangled).
* - Zero inference about knowledge beyond the evidence: it extracts facts,
* edges, and evidence — nothing the session doesn't show.
* - Knowing is mapped onto the anchored rubric (KnowingLevel), never a scalar.
* - Edges come primarily from the plan's mermaid DAG (already asserted by the
* teacher); only prose-articulated Connect-step edges need judgment.
*
* Followed by an audit pass (extract/audit.ts): a second LLM call verifying the
* extraction JSON against the session for hallucination/misattribution.
*/
import type { CanonicalSessionDocument } from "./normalize.ts";
import type { ExtractedSession } from "../schema.ts";
export async function extractSession(doc: CanonicalSessionDocument): Promise<ExtractedSession> {
throw new Error("Not implemented — Stage 2 (extractor LLM pass) is the next build step.");
}