E
Egora
OverviewHow It WorksArchitectureDesignDashboard
Teacher sign inOpen dashboard
E
Egora

A teacher workspace for planning courses, reviewing drafts, and publishing approved work to students.

© 2026 Egora

How It WorksArchitectureDashboardTeacher sign in
Back to design index
Flow & Dependency Maps

Visual maps for every load-bearing flow

Eight diagrams covering the state machine, dispatch cascade, agent harness, KB structure, review flow, gate topology, lifecycle states, and substrate boundaries.

Diagram 1 · Milestone state machine

M1 → M2 → M3 → M4 → Publish

M1
Strategy / Outline
Artifacts produced
intake.mdcourse-outline.mdpedagogy.mdpreferences-*.mdnon-negotiables-*.md
explicit review action → readiness evidence recorded → next phase continues
M2
Structure
Artifacts produced
units/unit-1/structure.mdunits/unit-2/structure.mdunits/unit-N/structure.md
explicit review action → readiness evidence recorded → next phase continues
M3
Skeleton (Detailed Unit Content)
Artifacts produced
units/unit-N/modules/module-M.md
explicit review action → readiness evidence recorded → next phase continues
M4
Substance (Lessons & Assignments)
Artifacts produced
units/.../lessons/lesson-L.mdunits/.../assignments/assignment-A.md
explicit review action → readiness evidence recorded → next phase continues
Publish
Publish
Artifacts produced
learning_content rows in Supabase
Diagram 2 · 4-state artifact lifecycle (D8)

draft → approved → finalized → published

State 1
draft
Just generated; teacher hasn't reviewed yet
State 2
approved
Teacher endorsed; triggers next sibling dispatch (D12)
State 3
finalized
Teacher closed; gate can fire; surface appears on left tree
State 4
published
Pushed via Formatter to learning_content; students see it
State transitions are git commits.The artifact's frontmatter status: field changes; the commit author tells you who made the transition (teacher@email vs agent:role).
Diagram 3 · Pipelined-sequential dispatch with APPROVED threshold (ADR 0008)

Sub-agent dispatches when prior reaches APPROVED

T0
Teacher
(parent finalized)
System
Orchestrator dispatches sibling-1 sub-agent
State
sibling-1: dispatching
T1
Teacher
(waiting)
System
sibling-1 generates
State
sibling-1: draft
T2
Teacher
Reviews sibling-1
System
(idle, awaiting approve)
State
sibling-1: has_comments
T3
Teacher
Approves sibling-1
System
Dispatches sibling-2 (reads sibling-1)
State
sibling-1: approved · sibling-2: dispatching
T4
Teacher
Finalizes sibling-1
System
sibling-2 generates
State
sibling-1: finalized · sibling-2: draft
T5
Teacher
Reviews sibling-2
System
(idle, awaiting approve)
State
sibling-2: has_comments
T6
Teacher
Approves sibling-2
System
Dispatches sibling-3 (reads sibling-1 + sibling-2)
State
sibling-2: approved · sibling-3: dispatching
The accented rows are when overlap happens. Teacher is still on sibling-N while system generates sibling-(N+1). Zero idle time + low token risk.
Diagram 4 · Gates topology (8 milestone-crossing + 2 intra-milestone)

Every gate maps to one prompt

GateFires atKindPrompt
gate-outline-to-structureM1 → M2Crossinggates/outline-to-structure.md
gate-planning-to-generationM2 → M3Crossinggates/planning-to-generation.md
gate-between-modulesWithin M3 + M4Intra-milestone alignmentgates/between-modules.md
gate-unit-content-completePer-unit M3 closePer-unit closuregates/unit-closure-m3.md
gate-all-units-content-completeM3 → M4Crossing (cross-unit)gates/all-units-closure-m3.md
gate-unit-lessons-completePer-unit M4 closePer-unit closuregates/unit-closure-m4.md
gate-all-units-lessons-completeM4 → PublishCrossing (cross-unit)gates/all-units-closure-m4.md
gate-final-sign-offPublishAlways-pauses (compliance)gates/final-sign-off.md
Diagram 5 · Review findings and linear apply (ADR 0020 + 0023)

Review a change → apply it linearly → inspect readiness

1.
Teacher opens units/unit-1/structure.md in left rail. Hits Review (not Edit).
2.
Server action creates coordinator/review-proposals/units_unit-1_structure.md/001.md with base and proposed digests.
3.
Teacher edits Big Idea inline. The proposed content stays in the review-proposal record.
4.
Teacher hits Submit.
5.
The current target digest is checked before the proposed content is applied.
6.
Acceptance writes one linear snapshot. No judge, revision, or downstream repair action runs automatically.
7.
Existing readiness reports and teacher review surface any downstream follow-up before Publish.
Diagram 6 · Prompts-as-agents harness (ADR 0005)

One Task primitive + N markdown prompts

Teacher (web UI)
Edit / Finalize / Comment / Approve / Chat / Publish
Server actions (Next.js)
Mount per-course git repo · Invoke Orchestrator inline · Enqueue sub-agent work · Commit + push
Inline
Async
Orchestrator (inline)
runAgentSession(socrates)
bounded tools · asks, dispatches, or pauses
Worker queue (async)
runAgentSession(delegated-task)
bounded tools · path-fenced reads and writes
Per-course git repo (Supabase Storage)
intake.md · course-outline.md · pedagogy.md
units/.../lessons/lesson-N.md
chat/ · comments/<path>/<id>.md
quality-reports/strategy · structure · substance
Publish (deterministic Formatter on finalized subtrees)
Supabase — ONLY published rows
learning_content (course / unit / module / lesson) · learning_content_versions
Diagram 7 · LLM Wiki at two scales (ADR 0006)

Course workspace is a wiki. KB is a wiki. Same pattern.

Wiki conceptPer-course workspacePer-teacher KB
Raw sourcesintake.md, fixtures, referenceskb/sources/
Wiki core (mutable)course-outline.md, units/**, lessons/**kb/pages/
Schema fileCLAUDE.md (workspace) + curriculum-agents/prompts/*kb/AGENTS.md
Indexworkspace tree + topology manifestkb/index.md
LogGit historySame — git history
Ingestdelegated course-generation task dispatches worker sessionskb/librarian.md + kb/field-researcher.md
QueryTeacher review + milestone chatCourse sub-agents Task-invoke kb/context-researcher.md
LintEvaluator prompts at gateskb/linter.md (cron + on-demand)
File-backResolved chat → comment thread back-referenceResolved chat → new kb/pages/<topic>.md via chat-dock affordance
Diagram 8 · Edit vs Review duality (D22)

Two surfaces, one rule: cascade is opt-in

Edit (left-rail button)
Direct commit, no cascade
  • • For small tweaks on finalized artifacts
  • • Commits directly to main branch
  • • Status stays finalized
  • • Teacher takes responsibility for the change
  • • No LLM-judge cascade triggered
  • • Cheap; fast; minimal friction
Review (left-rail button)
Review proposal, cascade on accept
  • • For full reconsideration of finalized artifact
  • • Creates coordinator/review-proposals/<path>/<n>.md
  • • Status starts open; stale targets become rebase_needed
  • • Opens in review panel (PR-queue UX)
  • • Cascade fires on submit (LLM-judge for affected children)
  • • Acceptance = expected-digest write; teacher reviews the diff before applying
Cascade is opt-in by user intent, not auto-triggered by file save. Avoids surprising the teacher with cascade on a typo fix.
Next →
UI Layout Mockups

3-zone workspace · left sidebar 3-section · chat dock · review panel.

Companion
Full spec

All 44 decisions, build order, open questions.

Why
ADRs

Five load-bearing decisions with rationale + alternatives.

Back to design index