Skip to content

Teaching absorption: session handover

Status: active cut-over point, 2026-10-01. Written so the build can continue in a fresh session, on any model or harness. The repo carries the decisions; this file carries the live state and the working protocol. Read order: this file → teaching-absorption-build-plan.md (slice table and Progress) → CONTEXT.md (the vocabulary contract) → the ADRs the plan cites.

Absorbing /home/anton/teaching (the yxnu repo’s teacher tooling) into emergent, until the maintainer’s real classes (and later colleagues’) are managed from the platform: Meetings and the calendar, classroom records, the Podium presenter, the Xuexitong/iTest platform bridges, and the department Deliverables. Path B order: foundations → classroom → daily management → paperwork → breadth. Spring semester is the full target; the January end-of-semester submission from emergent is the goal (soft-hard). Piloting in live classes begins as parity lands, with the flat-file tooling as the day’s fallback.

Done (all on develop, each verified and accepted)

Section titled “Done (all on develop, each verified and accepted)”
Slice Commit What it is
Glossary 1e3aa29b ~26 new terms in CONTEXT.md (Meeting, Timetable, Academic Calendar, Meeting Pattern, Room, Attendance, Ritual, Rota, Meeting Plan, Segment, Checkpoint, Task, Reminder, Notification, Observation, Observation Assessment, Operation, Operations API, Deck, Slide, Slide Binding, Platform Bridge, Connection, Push, Pull)
ADRs after 1e3aa29b docs/adr/0063–0068 (all proposed, provisional by the maintainer’s marking) + the ADR-0030 v1 notification core + backlog 0019 (department zip packaging)
F1 7f566421 Teaching-time schema (nine tables), the pure Pattern × Calendar generator in @emergent/domain, migration
F2 1d09b92a Sync registration; the server-side generation/regeneration service
fix 60261d7c Claims wide (any row naming a Pattern holds its date), write boundary narrow (planned + patterned only)
F3a 16558a6a Operations catalogue (transport-neutral, in domain), runner with audit trail, ops_ person-bound tokens, HTTP transport, mint-operation-token bootstrap CLI
F3b 53dd4b12 MCP transport at /mcp over the same catalogue (@modelcontextprotocol/sdk, stateless, ops_ bearer)
F4a 5505dec1 Six authoring Operations (timetable slots, rooms, calendars, patterns) with in-transaction auto-regeneration
F4b 76d369fa The teacher-portal Meetings tab: week-grouped list, detail drawer with the plan, Move/Cancel/Regenerate via the portal’s typed Operations client, read-only config panel

Key rulings worth knowing: a move keeps the original patterned + cancelled + linked, and gives the replacement moved with no pattern; a config write auto-regenerates exactly what it affects in the same transaction; a Timetable replace that would orphan a Pattern’s slot refuses atomically.

Needs the maintainer (Anton) — nothing below blocks a fresh session starting work

Section titled “Needs the maintainer (Anton) — nothing below blocks a fresh session starting work”
  • Migrations from F1 onward are committed but NEVER applied. Applying (packages/db: bun run db:migrate:local, then bun run db:check:local) is Anton’s step. Nothing runs against a real database until then.
  • To use the MCP door: apply migrations, then mint a token with tools/scripts/mint-operation-token.ts (see its usage), and point a workstation assistant at <api>/mcp with Authorization: Bearer ops_….
  • The reduced submission-file subset for Deliverables scoping (Anton to provide when known).
  • iTest login analysis; the forbidotherlogin and captcha-relay tests (bridge slices).
  • Phase-two bridge authorisation (standing/scheduled execution) is deliberately undesigned.
  • Slide-aware deck editor: parked, not committed. UI language for colleagues: spring concern.

C1 classroom-records schema (attendance, observation, ritual, rota + erasure declarations) → C2 portal logging surfaces (Podium-independent, because the January chain needs marking without it) → C3 Deck/Slide schema + server-side Marp rendering + the one-shot corpus import → C4 Podium (Presenter/Audience, Checkpoints, picker, offline Prepare) → D1 Tasks/Reminders/Notifications → D2 Platform Bridge Connections (encrypted session store, login form) → D3 Pull → D4 Push → P1 competency reuse for 课程目标 → P2 Deliverable engine + v1 templates → P3 Deck as PDF. F4c (config authoring UI) is parked; the assistant path works meanwhile. The January chain is D3 + C2 + P2 by early December. Full slice table and dependencies: the plan.

Working protocol (how the build has run; keep it)

Section titled “Working protocol (how the build has run; keep it)”
  • One slice = one implementer subagent run = one commit on develop. Never create branches (repo hard rule). Schema-touching slices never run concurrently — migration folders chain through snapshots. The coordinator never runs git commands while an implementer has the tree (the commit hook validates the whole working tree).
  • Implementer briefs carry, always: the exact context reads (plan slice, the ADR, CONTEXT.md terms, and the neighbouring code as templates); the pinned decisions; the deliverable scope broken into A/B/C; the hard constraints below; and the required return (changed paths, diff summary, key decisions, exact validation commands and real results).
  • Hard constraints in every brief: migrations additive per docs/runbooks/migrations.md and never applied; the validation gate (bun run validate/validate:full) always runs, never --no-verify; latest versions verified by command; scratch only under tmp/agents/; vocabulary only from CONTEXT.md, report rather than coin; implementers never edit CONTEXT.md, docs/adr/** or docs/design/**.
  • Frontend slices: consult Mantine via the MCP tools (mcp__mantine__*) first; where they are unavailable (as in the F4b run), verify against the installed @mantine/core type definitions and mirror in-repo usage. No hardcoded UI text (the gate enforces it); i18n keys in both locales; British DD/MM display dates.
  • Verification before accepting (coordinator): commit stat + contract-file check + read the core files against the ADR + sanity-check the reported test results; then update the plan’s Progress section in a small commit.
  • Erasure classes are declared at build time for every new person-linked table (Attendance and Observation are sever by ruling; the audit/actor posture recurs).
  • The lane memory file (Claude-family sessions) is at ~/.claude/projects/-home-anton-dev-emergent-emergent/memory/project_teaching_absorption_lane.md; a non-Claude harness should rely on this document plus the repo.

/home/anton/teaching/yxnu — the tooling and course sources being absorbed; resources/ — media and publisher material; yxnu/private/paperwork/models/ — Caroline’s forms (PII; the fuller local-teacher deliverable set to expand to); yxnu/private/rosters/ — the student CSVs. All four teaching repos are private; nothing here is published.

Accepted trade-offs worth not relitigating

Section titled “Accepted trade-offs worth not relitigating”
  • learning_period is unfiltered on the teacher rail (mirrors the learner rail; cheap now, a per-offering narrowing would be a new entry if it ever matters).
  • A Timetable replace refuses atomically when a Pattern names a dropped slot number (edit patterns first, or keep the number).
  • meetings.create picks its calendar deterministically when an Offering sits in several Periods (containing → latest-started → earliest).
  • Idempotency for retried Operations, the agent-facing catalogue document and scope-filtered tools/list are open, none blocking (ADR-0065’s remaining scaffolding).