Files
learnharness/src/core/contracts/probe.ts
T

46 lines
1.7 KiB
TypeScript
Raw Normal View History

/**
* Probe-phase contracts (the probe→teach split, docs/probe-teach-split.md).
*
* The prober concludes its phase with `probe_done` — a server-side tool
* whose INPUT is the learner assessment (authored by the model, streamed to
* the learner live, durable in the transcript by the tool result itself).
* The first `probe_done` in the transcript is the probe→planning seam: the
* teacher agent is constructed from that point on, and the tool's execute
* queues the handoff steer through the wake pipeline so the teacher starts
* immediately after the prober's turn ends (auto-wake, user-decided).
*
* Assessment shape (v1 — refine later): the probe was a binary search per
* dependency strand; the assessment formalizes exactly that. A list of the
* strands the lesson will depend on, each with a free-form read of where
* the learner's edge sits.
*/
/** One dependency strand the planned lesson will rest on. */
export interface ProbeStrand {
/** Name/description of the strand (e.g. "the derivative as a limit"). */
strand: string;
/** Free-form: where the learner's edge sits on this strand — floor,
* ceiling, misconceptions found, what to build from. */
assessment: string;
}
/** The prober's read of the learner, carried by probe_done. */
export interface ProbeAssessment {
strands: ProbeStrand[];
/** Optional overall synthesis: the learner's apparent goal and edge. */
summary?: string;
}
/** probe_done tool input (the assessment the prober authors). */
export interface ProbeDoneInput {
assessment: ProbeAssessment;
}
/** probe_done tool output. */
export interface ProbeDoneResult {
ok: boolean;
/** Refusal reason when ok === false (open question, already concluded). */
error?: string;
assessment?: ProbeAssessment;
}