Files
makelore/.project-docs/30-worklog/tasks/20260928-teacher-protocol-boundary-f2c8a601.md
T

63 lines
5.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Task: Keep teacher runtime instructions scoped to entry facts and UI protocol
## Identity
- Task ID: 20260928-teacher-protocol-boundary-f2c8a601
- Mode: Feature
- Branch: codex/20260928-teacher-protocol-boundary-f2c8a601-teacher-protocol-boundary
- Worktree: /Users/chillishark/Makelore 麦洛/.codex-worktrees/makelore/20260928-teacher-protocol-boundary-f2c8a601
- Base commit: 998796d77cba146ae2a007cbebfdaa1255a3413e
- Owner: codex
- Status: Ready for Integration
## Scope
- Continue the accepted teacher/client boundary on top of completed legacy-component cleanup commit `998796d77cba146ae2a007cbebfdaa1255a3413e`.
- Keep entry markers factual and the reply protocol technical. Remove locally appended teaching strategy from active help, guided help, background checks, and reply-format instructions.
- Enforce the current 0–3 shortcut capacity for newly generated answers while preserving archived replies and exact diagnostics.
- Update focused tests and README; preserve card styling and existing interaction/scheduling machinery.
## Intent And Constraints
- User assigned main merge and push to another conversation. This task stays in its isolated feature branch and prepares a tested commit for integration.
- Cloud configuration owns Alice's teaching purpose, focus, tone, length, and shortcut prefixes; the host owns invocation facts, available context/tools, and interface protocol.
- Keep old component cleanup intact. Do not merge the older `89c913b` patch wholesale because it modifies a superseded protocol.
- No cloud configuration publishing, live app restart, scheduler redesign, or teacher-to-operator consensus handoff in this task.
- Gate passed before edits: task ownership/status verified; entry, task-relevant memory, and peer scopes reviewed. Relevant canonical documents are unchanged between the previously read baseline and `998796d`; shared memory remains read-only.
## Outcome
- Active-help and guided-help messages now identify the student's entry intent; background checks identify a program-triggered check without a fabricated student question. They no longer mandate a teaching strategy.
- Reply instructions now declare only the two fields, Markdown body support, optional 0–3 nonempty shortcut strings, and delegation of content/style to published configuration.
- Main rejects excess newly generated shortcuts without silently truncating or rewriting them: prose is retained, cards are withheld, and the exact raw answer and format diagnostic are saved. 0/1/3-card replies preserve prefixes and duplicates. The shared compatibility parser and historical store remain unchanged.
- The UI now shows recorded reply-format errors beside the preserved answer; raw content stays collapsed and inert. Existing colors, layout, click handling and drafts are unchanged.
- Regression coverage includes local/cloud service persistence, history read/list/save, all entry intents, current/legacy envelopes, and UI behavior. README reflects the responsibility boundary and current capacity.
- No merge, push, running-app restart, cloud config change, or canonical memory edit performed.
## Verification
- Dependency installation: pinned pnpm 10.33.4, frozen lockfile, offline cache; no tracked dependency change.
- Focused final suite: 269/269 passed across teacher-guidance, teacher-reply, teacher-reply-history, coding-teacher, coding-teacher-cloud, coding-teacher-model and coding-teacher-ui.
- `corepack pnpm run typecheck`: passed.
- ESLint for all changed TypeScript/TSX files, including the Electron E2E spec: passed.
- `corepack pnpm run build:vite`: passed after the final UI change.
- `git diff --check` and task-aware project-doc drift check: passed.
- Independent read-only review found no remaining teaching-policy directives in the scoped runtime files and confirmed lossless historical handling.
- Added a focused Electron E2E case for visible format errors, absent rejected shortcut buttons, collapsed exact raw text, and preserved drafts. Playwright test collection passed using an existing Electron distribution override; the native test was not executed to avoid launching another app window during concurrent work. Component/service assertions covering these behaviors passed.
- Real published-model responses were not tested. Existing topics retain their pinned configuration versions; code tests do not establish that an updated cloud prompt is active.
## Follow-ups
- Integrate this commit after the legacy-component cleanup; merging/pushing belongs to the user's other conversation.
- Validate actual Alice output with a new topic using the published cloud version. Local tests cannot prove model behavior or that existing pinned topics picked up a new prompt.
- Three-operation-round checks and shared confirmed context remain separate work.
## Promotion Candidates
- Target: canonical teacher decision/current-state documents during integration.
- Proposal: runtime help/check-in markers convey entry facts only; teaching strategy is entirely in the selected published agent configuration. Current newly generated replies accept 0–3 shortcuts; historical card counts remain lossless.
- Evidence: context/reply code and focused tests in this task; user's accepted client/agent boundary in this conversation.
- Future impact: future personas can use the same interface without inheriting Alice's teaching policy; prompt changes are evaluated against the actual published topic version.
- Semantic conflicts: supersedes cleanup task's remaining locally mandated single discussion focus and unrestricted new-card count; retains historical compatibility and UI cleanup.
- Human confirmation: not additionally required for these already accepted boundaries; no canonical edits in this feature task.