From 09480979c4e16bf0a0314951158cdee75c1b8f46 Mon Sep 17 00:00:00 2001 From: amosblomqvist Date: Mon, 5 Oct 2026 02:22:04 +0300 Subject: [PATCH] =?UTF-8?q?practice:=20slim=20the=20tool=20schemas=20?= =?UTF-8?q?=E2=80=94=20the=20modelSolution=20IS=20the=20reveal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Owner round (2026-10-05): the problem pose only really needs statement, mode, target, modelSolution; conclude needs no reveal field. - problemInputObject drops decisionPoints, expectedWrongMoves, strategy, rationale. Halves the pose payload (the GLM incident's failing args were 3.3KB — a direct weak-model hardening). - concludeInputObject drops solutionReveal: the reveal is the modelSolution committed at pose time, shown verbatim at conclude. - Doctrine pass (00-base mechanics, 10-doctrine V.4/V.5): the commitment is the solution alone; the reveal instruction points at it. Fixtures slimmed to the new shapes (flow, agents, heal). ConcludeCard's render of legacy solutionReveal input stays until the card redesign lands (Slice C). --- src/agent/prompts/practice/00-base.md | 4 ++-- src/agent/prompts/practice/10-doctrine.md | 4 ++-- src/agent/tools/practice.ts | 25 ++++------------------- tests/practice-agents.test.ts | 5 ----- tests/practice-flow.test.ts | 12 +++-------- tests/practice-heal.test.ts | 6 ------ 6 files changed, 11 insertions(+), 45 deletions(-) diff --git a/src/agent/prompts/practice/00-base.md b/src/agent/prompts/practice/00-base.md index f745c4a..fa20121 100644 --- a/src/agent/prompts/practice/00-base.md +++ b/src/agent/prompts/practice/00-base.md @@ -23,13 +23,13 @@ He has to be able to trust you completely; one confidently-delivered hallucinati Two tools, and everything else is conversation. The mechanics only — the method (when to pose, what to pose, how to respond) is the doctrine's. -**`problem`** — poses one problem. The statement field is what the learner sees (markdown and LaTeX render); everything else in the call — modelSolution, decisionPoints, expectedWrongMoves, strategy, rationale — is your private commitment, hidden from the learner until you conclude. The call ends the turn. The learner then works in a thinking field; their submissions arrive back as labeled messages: +**`problem`** — poses one problem. The statement field is what the learner sees (markdown and LaTeX render); the modelSolution is your private commitment, hidden from the learner until you conclude. The call ends the turn. The learner then works in a thinking field; their submissions arrive back as labeled messages: - *Thinking trace (working, not committed):* they are mid-work and asking for a nudge. This is a hint request — the hint ladder applies, one rung per request. A trace may span several of these. - *Committed answer:* they claim an answer. Extract the moves, deliver the verdict. Remember: a commit is not a progress signal. Only one problem may be active at a time — the tool rejects a pose while one is live. Conclude before posing the next. -**`conclude`** — ends the active problem: records the outcome and verdict, and its solutionReveal field is shown to the learner — this is where the reveal is spent. The turn does NOT end at conclude; the same reply reveals and poses the next problem (or wraps the session in text). The tool rejects a conclude with nothing active. +**`conclude`** — ends the active problem: records the outcome and verdict. The reveal is the modelSolution you committed at pose time — the learner sees it verbatim; there is no reveal field to fill. The turn does NOT end at conclude; the same reply reveals and poses the next problem (or wraps the session in text). The tool rejects a conclude with nothing active. **Dismissals.** The learner may discard a problem without concluding it. You will see the synthesis arrive as a conclude call with outcome "dismissed" — treat it as full surrender of that problem (the reveal was declined; mark it for a fresh-surface retest if it mattered) and pose the next demand per the selection rules. Do not comment on the dismissal beyond what the stream needs. diff --git a/src/agent/prompts/practice/10-doctrine.md b/src/agent/prompts/practice/10-doctrine.md index 3bf9d81..4bba06e 100644 --- a/src/agent/prompts/practice/10-doctrine.md +++ b/src/agent/prompts/practice/10-doctrine.md @@ -73,8 +73,8 @@ Interleaving is the default. Never issue blocks of same-target problems. 1. **Target** — per the selection rules. 2. **Mode** — the cheapest undemonstrated layer for that target. 3. **Difficulty** — from the last outcomes on this target: clean success, one notch up; success that needed hints, hold; a miss, one notch down and consider dropping a mode; two misses in a row, switch targets. -4. **Situation** — a cue class not yet used for this target in this session; decision-point density per parse cost maximized; the surface, theory-formal or applied-concrete, is the learner's preference and changes nothing structural. -5. **Commit** — before the learner sees anything, fix: the model solution with its moves in order; the decision points; the expected wrong moves and what resolves each; the strategy; and why this problem — target and mode — was chosen. Committing before posing is what keeps verdicts honest, hints consistent, and the solution from leaking before it exists in full. +4. **Situation** — a cue class not yet used for this target in this session; the surface, theory-formal or applied-concrete, is the learner's preference and changes nothing structural. +5. **Commit** — before the learner sees anything, fix the model solution with its moves in order (and hold the target and mode in mind). Committing before posing is what keeps verdicts honest, hints consistent, and the solution from leaking before it exists in full. 6. **Check** — solve the problem, then try to break it. A problem that can be solved by a route skipping the target teaches that route instead, and is unsound; fix it or discard it. Confirm the solution requires nothing beyond the material. Never pose what you have not solved and shortcut-hunted. The statement never announces its target. If the situation makes the applicable proposition unmistakable, that is a deliberate low-rung recall demand — intended, not arrived at by accident. diff --git a/src/agent/tools/practice.ts b/src/agent/tools/practice.ts index dc0b8c0..fe15148 100644 --- a/src/agent/tools/practice.ts +++ b/src/agent/tools/practice.ts @@ -145,21 +145,7 @@ export const problemInputObject = Type.Object({ }), target: Type.Array(Type.String(), { minItems: 1, description: "REQUIRED — the proposition id(s) or names this problem exercises." }), modelSolution: Type.String({ - description: "REQUIRED — the full solution, moves in order, committed BEFORE the learner sees the problem.", - }), - decisionPoints: Type.Array(Type.String(), { - description: "REQUIRED — each juncture where a not-yet-active proposition must be selected.", - }), - expectedWrongMoves: Type.Array( - Type.Object({ - move: Type.String({ description: "The wrong move an honest attempt may take." }), - resolution: Type.String({ description: "What resolves it back to the right move." }), - }), - { description: "REQUIRED — the wrong moves you expect, each with its resolution." }, - ), - strategy: Type.String({ description: "REQUIRED — why this shape: the situation class, parse cost, density." }), - rationale: Type.String({ - description: "REQUIRED — why this problem now: target + mode + difficulty against the session's last outcomes.", + description: "REQUIRED — the full solution, moves in order, committed BEFORE the learner sees the problem. This IS the reveal — conclude shows it verbatim; never re-author it.", }), }); @@ -171,9 +157,9 @@ export function problemTool(gate: PracticeGate): AgentTool