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
Decision Journey · 2026-05-27

18 rounds of grilling, one architecture

The grilling-session narrative that produced this design. Captured so the why survives ephemeral cloud sessions, context compaction, and future agents landing cold.

The arc

From SDK audit to consolidated architecture

The session opened with a question about whether Vercel AI SDK was the right front-end choice. The operator confirmed the path. Then the conversation pivoted to the bigger question — was V2's vision actually being captured by what was on disk?

First grilling round surfaced that the existing V2 spec had baselined against the wrong layer— it treated V1-original's 42-agent complexity as the migration source, when collapsed (the actual production system) had already simplified that. The simplification commit 0e0703d that deleted the LLM Evaluator was solving a problem that didn't exist against the correct baseline.

From there, 17 more rounds nailed: the milestone shape (M1–M4 + Publish, locked from 08-milestone-architecture.md), the dispatch pattern (pipelined-sequential, APPROVED threshold), the agent layer (prompts-as-agents — “what would Claude Code do?”), the substrate (git in Supabase Storage, per-course repos), the review surface (the existing universal review system with workspace projection), the Knowledge Base (Karpathy's LLM Wiki pattern), and the UI shape (three-zone workspace, left-sidebar 3 sections, chat dock with context band).

The final move was consolidation: the conversation crystallised into a 44-decision spec, 5 ADRs, and the doc updates you're reading.

The 18 rounds
Round 1 of 19 · R0

Vercel AI SDK audit

Question

Is the Vercel AI SDK the right choice for V2's front-end AI calls, or should we look at alternatives?

Operator answer

“We can continue down the current path.”

Locked as

Vercel AI SDK stays; allow narrow escape hatch for Anthropic-only features.

Outcome

Set the technical baseline before the architecture grilling started.

Round 2 of 19 · R1

Spend a real LLM call

Question

Want to spend a real LLM call against the Generator (the handoff's ranked-1 next move)?

Operator answer

“I will run locally later. Let's spend this time ensuring the vision of this new branch is understood.”

Locked as

Pivot from execution to architecture grilling.

Outcome

Reframe the session: ensure vision is captured before any real spending happens.

Round 3 of 19 · R2

Baseline correction

Question

Identify gaps between vision and current V2-P1 state — grill on the differences.

Operator answer

“The existing codebase is the problem. There is V1, then the collapsed architecture. My intention was to cull V1 references. The 12 HITL checkpoints I cited are V1 — not collapsed.”

Locked as

V2 baseline = collapsed architecture, NOT V1-original.

Outcome

Re-grounded the entire grilling — collapsed is the real baseline. ADR 0004 captures this.

Round 4 of 19 · R3

Path α (finish V1→Collapsed first)

Question

Is V2 the next migration after collapsed (α), or does V2 jump over collapsed (β)?

Operator answer

“For question 5, a. The goal is to base this new version off the collapsed architecture.”

Locked as

V2 IS the next-gen migration from collapsed. Cutover at V2-P6 via default-branch swap.

Outcome

Locked the migration path. V2 inherits collapsed's 8-agent contract on a new substrate.

Round 5 of 19 · R4

Revert 0e0703d

Question

Q-A: Bring back the Evaluator? The 0e0703d simplification deleted it citing 'Claude Code uses one LLM.'

Operator answer

“Yes, it was a mistake. Bring back the evaluator.”

Locked as

Restore the Evaluator capability. ADR 0007.

Outcome

Identified that the simplification was justified against the wrong baseline. Reverting in spirit, restored as prompts.

Round 6 of 19 · R5

Milestone granularity (Q-B)

Question

What counts as a milestone? Three plausible models — phase-boundary, per-artifact, per-unit-spec-chain — with very different harness implications.

Operator answer

“(a) phase-boundary milestones BUT 'each milestone has an opportunity to finalize content and all finalized content that is student facing can be published separately.' M1 strategy → M2 structure → M3 skeleton → M4 substance.”

Locked as

4 milestones with strict gating BETWEEN milestones, per-artifact finalize WITHIN milestones. (D6, D7)

Outcome

Hybrid model nailed — coarse milestones, granular finalize within them.

Round 7 of 19 · R6

M3 artifact granularity

Question

What lives in M3? Per-unit only, per-module only, or both?

Operator answer

“M3 is per-module. Once a module is approved by the teacher, it can move past that gate. Other modules within that unit can still be in draft.”

Locked as

M3 = per-module skeletons. Per-module finalize. (D10 — strict mirror dispatch from M2 unit's module subsections.)

Outcome

Defined the M3 layer concretely. Per-module sub-agents become the M3 dispatch pattern.

Round 8 of 19 · R7

Cross-milestone progression

Question

Strict milestone gate (a), parent-gated cascade (b), or parent-gated + auto-dispatch (c)?

Operator answer

“(c) — yes, modules are nested (as will lessons and assignments under each module).”

Locked as

Parent-gated cascade with auto-dispatch. Workspace tree is nested (units/unit-N/modules/module-M/...). (D9)

Outcome

Locked the dispatch model. Generator auto-dispatches downstream when parent finalizes.

Round 9 of 19 · R8

Sub-agent dispatch shape

Question

One sub-agent per unit-spec-lock (operator's instinct), or per-module parallel sub-agents (push-back)?

Operator answer

“Agreed (per-module parallel sub-agents with bound tools).”

Locked as

Per-module parallel sub-agents with bound tools (writeFile scoped to single target file). (D14)

Outcome

Aligned with Claude Code's bound-tools pattern. Mechanical safety, not prompt discipline.

Round 10 of 19 · R9

Workflow structure recap

Question

Multiple decisions confirmed: per-artifact finalize, parent-gated cascade, student-facing taxonomy, targeted-eval + LLM judge for edit/regen, Orchestrator LLM-driven.

Operator answer

“1: per-artifact. 2: only student-facing get published. 3: targeted eval, then the LLM can judge to edit or Regen. 4: Orchestrator LLM-driven. 5: collapsed system breaks continuously. Grill me on individual questions one by one moving forward.”

Locked as

(D5) Pure-workspace projection. (D8) 4-state lifecycle. (D9) Parent-gated cascade. (D15) LLM-driven Orchestrator. (D24) Targeted re-eval flow.

Outcome

Six decisions confirmed simultaneously. Switched to one-question-at-a-time grilling.

Round 11 of 19 · R10

M1 entry + artifacts

Question

How does the teacher enter M1? Form, chat, or markdown? What's in M1 concretely?

Operator answer

“(b) chat-based intake + (iii) hybrid M1. Initial intake is a form for basic info, then a markdown with questions and articles that need to be satisfied via chat before generation.”

Locked as

M1 entry = form + MarkdownContract chat. M1 artifacts: course-outline + pedagogy (LLM, finalizable) + preferences-*.md + non-negotiables-*.md (deterministic, inputs).

Outcome

Locked M1 entry flow. MarkdownContract pattern from collapsed reused for intake.

Round 12 of 19 · R11

Publishing trigger

Question

Auto on finalize, explicit per-artifact, or batch?

Operator answer

“Per-artifact publish OR 'Publish all' batch button — existing code. No unpublish currently, but there should be one.”

Locked as

(b) Explicit per-artifact + batch publish. Unpublish added to backlog. (D16 implicit)

Outcome

Publishing decoupled from finalizing. Module-or-larger subtree granularity.

Round 13 of 19 · R12

M4 contract + sub-agent granularity

Question

Section structure: fixed minimal, conditional (V1), or floor+ceiling? Sub-agents: per-lesson or per-section?

Operator answer

“(c) floor + ceiling (Generator discretion above required floor). Same pattern probably for eval. (α) per-lesson sub-agent.”

Locked as

(D17 corrected from b to c) Floor + ceiling sections. (D19) Per-lesson sub-agents.

Outcome

M4 contract finalized. Generator has bounded pedagogical discretion.

Round 14 of 19 · R13

Targeted-eval mechanism + universal review system

Question

How should reviewed edits land? Digest-checked linear apply, then readiness reports and teacher review — no automatic repair action.

Operator answer

“Yes. Look at the universal review system — this surface allows teachers to comment on markdowns and answer questions raised by the LLM. Aligns with git and our design well, akin to a PR queue.”

Locked as

(B) Trigger on finalize-after-edit. (I) Verdict + diff_proposal output. Universal review surface is the V2 review UX home. (D24, D21)

Outcome

Discovered existing review-panel surface that aligns perfectly with V2's needs. Just swap projection layer.

Round 15 of 19 · R14

Review-panel projection

Question

(a) pure-workspace projection, (b) hybrid (comments in Supabase), or (c) shadow rows?

Operator answer

“(a) — let's remove options for the system to break.”

Locked as

Pure-workspace projection. Comments live as sidecar markdown files; no Supabase comments during generation. (D5, D23)

Outcome

Confirmed substrate purity. Supabase only holds published rows; everything else is workspace markdown.

Round 16 of 19 · R15

Workspace location + identity

Question

Where do workspaces live? (A) hosted git, (B) Supabase Storage, (C) attached volume. Per-course (α), per-teacher (β), or per-school (γ)?

Operator answer

“(B) and (α), but teachers should be able to host multiple repos in their dashboard.”

Locked as

(D3, D4) Supabase Storage + per-course repos + multi-repo teacher dashboard.

Outcome

Substrate location nailed. New course = new bucket folder + git init.

Round 17 of 19 · R16

Async execution + UI affordances

Question

(I) inline-blocking, (II) full async, or (III) hybrid (Orchestrator inline, sub-agents async)?

Operator answer

“(III). We have a plan/progress tab as well to provide UI affordances. Chat stays minimal (just a working progress spinner).”

Locked as

(D16) Hybrid async execution. Plan/progress tab is the sub-agent visibility surface; chat minimal during work.

Outcome

Discovered the existing Progress tab (#1217) is already wired for this; only data source needs to change.

Round 18 of 19 · R17

Prompts-as-agents pattern

Question

Evaluator mode structure — (a) single agent with mode param, (b) four specialized files, or (c) two evaluators + judge?

Operator answer

“The collapsed architecture might have the wrong call. What would Claude Code do?”

Locked as

(d) Prompts-as-agents pattern. One Task primitive + N markdown prompts. (D17 — ADR 0005)

Outcome

Critical reframe: Claude Code's pattern isn't 'one LLM' — it's 'one Task primitive + many prompts.' Architecture collapses to a single TS file + ~30 markdown prompts.

Round 19 of 19 · R18

Karpathy LLM Wiki for KB

Question

(B + ii) Per-teacher KB repo + Task-based query — recommended. Does Karpathy's LLM Wiki pattern fit?

Operator answer

“Confirm your recommendations. Research Karpathy's LLM wiki to ensure the model fits with our refactor. It should be a perfect fit.”

Locked as

Per-teacher KB repo following Karpathy's LLM Wiki pattern. Three additions: kb/AGENTS.md schema file, kb/linter.md prompt, 'File as KB page' chat-dock affordance. Rename manifest.md → index.md. (D36–D40 — ADR 0006)

Outcome

Researched Karpathy's actual gist. Fit was exact. KB structure aligned at two scales (course workspace + KB repo, same pattern).

Why this page exists

Decisions without rationale rot fastest

The spec describes what was decided. The ADRs describe why each decision was taken over alternatives. This page describes how the decisions emerged — the question-answer arc that produced the architecture.

That arc is normally lost. Sessions end; context compacts; future agents land cold into the spec and have to reverse-engineer the reasoning. Capturing the arc means someone (or some agent) can read it, recognise the pattern of grilling that worked, and apply it to the next set of decisions.

Specifically: this page tells future readers that the V2 baseline was once misidentified, that the “simplification” in 0e0703dwas a direction error, and that “what would Claude Code do?” was the question that produced the prompts-as-agents architecture. Without this page, those are just artifacts in git log.

Read the spec ADR index Back to design index