Merge teacher guidance into discussion workspace
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
# Task: Align teacher behavior prompt with discussion tools
|
||||
|
||||
## Identity
|
||||
|
||||
- Task ID: 20260923-teacher-guidance-6d29b8f1
|
||||
- Mode: Feature
|
||||
- Branch: codex/20260923-teacher-guidance-6d29b8f1-teacher-guidance
|
||||
- Worktree: /Users/chillishark/Makelore 麦洛/.codex-worktrees/makelore-teacher-guidance
|
||||
- Base commit: 404cfcde46a398ac95175703da745b88a091d318
|
||||
- Owner: codex
|
||||
- Status: Ready for Integration
|
||||
|
||||
## Scope
|
||||
|
||||
- Add a complete, concise Main-owned teacher behavior baseline to the existing context compiler; preserve cloud identity, model, enabled text supplements, versioning and request-specific formats.
|
||||
- Align existing discussion instructions with persistent tools, student adoption, age 6–14 and product-thinking guidance. Add executable multi-turn protocol examples and focused compatibility tests.
|
||||
|
||||
## Intent And Constraints
|
||||
|
||||
- User delegated implementation from component task 01a0cc32-40cf-7503-983e-ca70eb688599. No subagents, edits/restarts of the peer trial, real-session test messages, remote configuration publication or changes to dirty main.
|
||||
- Preserve no demonstrations/project execution. Keep the existing {reply, quickReplies, tool} protocol and program-owned lifecycle. Finish is not blanket adoption or execution authorization.
|
||||
- All-operation-context and shared confirmed consensus are desired product capabilities, not currently connected; document exact gaps rather than claiming them in prompts.
|
||||
|
||||
## Project Context Loaded
|
||||
|
||||
- Task ID, feature mode, branch, absolute worktree and base above match successful start/status ownership. Base is the user-provided component implementation 404cfcd.
|
||||
- Read: AGENTS, read-before-planning, memory-index, active record, positioning, current-state, decision-index/teacher ADR, system-overview, teacher domain/module/data-flow sections, success criteria, planning-gate and all four peer Scope/Intent/Promotion sections.
|
||||
- Peers: classroom, presence and discussion are completed source ancestors; classroom integration is a completed candidate. No peer writes; main remains dirty and excluded. Component behavior is reused from the committed base in this owned checkout.
|
||||
- Goal: support student thinking through project creation while operation Agent owns execution. Main owns model/auth/context/persistence; use existing Host API and light UI.
|
||||
- Stale memory: positioning contains template fields and canonical teacher ADR predates the approved classroom. Current user consensus and the component commit define this work. No canonical project-memory writes in feature mode.
|
||||
- Gate: Passed. README and owned task record will report actual integration and limits.
|
||||
|
||||
## Plan
|
||||
|
||||
1. Wire one behavior baseline through compileTeacherContext for teacher requests, preserving friend isolation and per-intent format contracts.
|
||||
2. Refine the existing discussion instructions, without adding a second schema, and supply multi-turn examples validated by the real parser/reducer.
|
||||
3. Run teacher-focused unit tests, typecheck, scoped lint and production build; update README, operator-facing prompt artifact and concrete integration handoff.
|
||||
|
||||
## Outcome
|
||||
|
||||
- Added the 1,175-character teacher behavior baseline and wired it into Main context compilation for ordinary, guided-help, suggestions, check-in and preview teacher calls. Friend remains isolated. Cloud definition, enabled supplements, model, limits and frozen version are preserved; an exact published copy of the baseline is included only once.
|
||||
- Refined the existing discussion instructions, retaining the sole JSON contract and program-owned lifecycle. Stable full-content updates, null/no-op, focus, candidate status, explicit ideas-to-structure conversion, uncertainty and student-voiced thinking questions are covered; no new schema or model tool calls.
|
||||
- Added nine concrete response examples across pet, garden, shooter and cake projects, with multi-turn tests using the actual compiler/parser/reducer. Examples are test-only and never enter runtime context.
|
||||
- Updated README with the real loading layers and gaps. Synced the external human-readable prompt and wrote `/Users/chillishark/Makelore 麦洛/老师Agent提示词/老师Agent-接入说明.md` for integration/operations.
|
||||
- No other checkout, running app, real conversation, cloud definition, publication, credential, provider or schema was modified.
|
||||
|
||||
## Verification
|
||||
|
||||
- 216 tests passed in five suites: coding-teacher, teacher-discussion, teacher-discussion-state, teacher-guidance and coding-teacher-ui. Service-level model-message inspection proves actual behavior and UI-protocol injection; examples verify state continuity and preserve unaccepted ideas through finish/resume/return.
|
||||
- Standard `pnpm run typecheck`, changed-file ESLint, final Renderer/Main/Preload/utility production build and `git diff --check` passed.
|
||||
- Main standalone type diagnostics compared against 404cfcd using a TypeScript virtual compiler host for original changed files: base 66, current 66, no added/resolved diagnostics. Existing Main type errors remain; this check is not claimed clean.
|
||||
- Initial focused run exposed one old test whose 1,200-byte budget could not hold the new baseline. Replaced the magic budget with the exact required baseline+current-context budget and additionally checked retained source IDs and behavior. The trimming behavior and hard overflow rejection remain verified.
|
||||
- No native/real-model interaction performed. Fixture checks do not establish teaching quality or provider structured-output guarantees.
|
||||
|
||||
## Follow-ups
|
||||
|
||||
- Component/integration owner can apply this isolated commit on top of 404cfcd; no trial restart or deployment is performed by this task.
|
||||
- Full operation-context reading is not implemented: source still uses selected completed text and budget trimming. Confirmed consensus storage/versioning and injection into operation Agent remain absent; current finish lifecycle must not stand in for that consent.
|
||||
- Structure/flow/comparison lack machine-readable adoption/provenance fields; this task uses existing display text for uncertainty and does not invent fields. Future consensus extraction needs a coordinated contract.
|
||||
- New proactive-trigger consensus (no progress means no call; unread does not block future progress) remains a scheduler follow-up, not prompt behavior.
|
||||
- Operations must review legacy supplemental formatting instructions before publishing; cloud draft/publish and existing topic version migration were not performed.
|
||||
|
||||
## Promotion Candidates
|
||||
|
||||
- Target: canonical teacher architecture/domain and current-state during integration. Proposal: recognize the Main teaching baseline, operator supplements, single request-specific presentation protocol and actual limitations. Evidence: user-approved teaching goals, component-source delegation, compiler/service tests and 216 passing tests. Impact: future teaching changes use the same baseline and UI schema; no extra Skill needed. Conflict: earlier source-only teacher ADR and external product target of full-context/shared consensus are not yet the implemented runtime. Human confirmation: implementation delegation supplied; remaining system features require their own integration work. No canonical files changed here.
|
||||
Reference in New Issue
Block a user