practice agent: problem + conclude tools, doctrine prompt, handler branch

- tools/practice.ts: problem (terminate pose; commitment hidden in args)
  and conclude (non-terminating; outcome/verdict/reveal/rung/missClass/
  retest), gated by activeProblemOf — pose-while-active and conclude-
  with-nothing-active both return invalidInputResult.
- prompts/practice/00-base.md (voice + accuracy + tool mechanics) and
  10-doctrine.md (the owner's doctrine verbatim; one approved edit —
  §I material arrival generalized). Practice composes its own directory
  ALONE: no teaching base, no shared fragments.
- createPracticeAgent (teacher-agent.ts); chat-handler branch — kind
  'practice' builds the practitioner from turn 1 and skips extraction.
- problemResult/concludeResult acks in tool-execute (conclude text
  single-sourced: CONCLUDE_ACK_TEXT).
This commit is contained in:
amosblomqvist
2026-10-04 21:47:23 +03:00
parent eb7454900c
commit 4bea0b46df
9 changed files with 592 additions and 13 deletions
+5 -2
View File
@@ -17,7 +17,10 @@
export const FRAGMENT_RE = /^\d+-[\w.-]+\.md$/;
/** Which agent's prompt directory to compose. */
export type PromptAgent = "prober" | "teacher";
/** Practice (2026-10-04): composes ONLY its own directory — no shared
* teaching base, no shared fragments (the doctrine contradicts the
* teaching philosophy; its 00-base.md plays the base role). */
export type PromptAgent = "prober" | "teacher" | "practice";
/** One segment of one agent's composed prompt. */
export interface PromptSegmentInfo {
@@ -41,7 +44,7 @@ export interface PromptSegmentInfo {
* CURRENT source segment list. */
export function isValidSegmentPath(segmentPath: string): boolean {
if (segmentPath === "system-prompt.md") return true;
const m = /^(prober|teacher|shared)\/([\w.-]+\.md)$/.exec(segmentPath);
const m = /^(prober|teacher|practice|shared)\/([\w.-]+\.md)$/.exec(segmentPath);
if (!m || m[2] === undefined) return false;
return FRAGMENT_RE.test(m[2]);
}