Course / Lesson 30  ·  PT-BR
Lesson 30 · Capstone · the whole machine

Capstone: the whole machine, end to end

Thirty lessons in, you can hold the entire system in one view. Alembic is an engine that turns raw sources into validated knowledge and feeds finished work back into itself — a closed loop. The Hermes fusion added the missing pieces to make that loop self-improving: a memory to write to, a gated learning pass to write through, and a curator to prune what goes stale. This capstone draws the full circuit, lists what shipped and what is deliberately parked, and ends with a cross-cutting quiz over everything you've learned. No new facts — just the assembled picture.

The one loop everything serves

Every subsystem and invariant in this course exists to make one circuit turn safely: distill → learn → sediment → prune. Sources are distilled into Learnings (the funnel, T0→T3); a finished run proposes durable writes (the learning pass); approved writes sediment into memory and skills; and the curator prunes what goes unused — feeding back into what the next run knows.

DISTILLfunnel T0→T3 (L15) LEARN (gated)propose→gate (L8/L23) SEDIMENTmemory + skills (L7/L12) PRUNEcurator (L9) NEXT RUNknows more a finished run feeds the next

Notice the gate sitting in the LEARN box. That's the keystone (ADR-0018): the loop is Validator-gated, never auto-apply. Without it, a self-improving system drifts on its own bad outputs. The gate is what makes "learns from itself" safe rather than a feedback catastrophe.

What shipped

7
subsystems
~565
tests green
4
invariants
5
gates
18
ADRs

Counts are source-verified by the course's own foundation (Lesson 01): the complete-map recorded 19 workspace packages + 1 app at 415 tests, which grew to ~565 after @alembic/hermes landed — the same 565 the case study in Lesson 6 verifies green with an empty pgrep. [uncertain] the exact current total may differ by a few as tests are added; treat ~565 as the as-built figure when hermes shipped.

SubsystemDispositionWhat it gives the loopLesson
memoryCLONEthe durable store writes sediment into7
learningADAPTthe gated propose→dispose pass — the keystone8
curatorCLONEactive→stale→archived pruning (never deletes)9
clarifyCLONEthe T4 human-gate ask-surface10
webCLONEsearch/extract over an injected backend11
skillsCLONEprocedural memory with progressive disclosure12
mediaCLONEcloud transcribe/vision over injected backends13

What is deliberately parked (the frontier)

Honest engineering names what isn't done. The fusion matrix marks several capabilities as not-yet-shipped — on purpose, with reasons:

And what was deliberately IGNORED (not parked — decided against): subagent delegation (the swarm already does it better, Lesson 19), neural local TTS and local faster-whisper (Python-only ML, no clean Node port), and the 23 messaging-platform adapters (out of scope for an internal engine, ADR-0001). Lesson 3 and 21 walk these verdicts.

Why "parked" is a feature, not a failure

A system that ships everything at once ships nothing well. The fusion drew a tight boundary — the seven subsystems that close the self-improving loop — and explicitly deferred the rest with dated reasons. Parked work is recoverable (it's in the matrix with a disposition); rejected work is justified (an IGNORE with a reason). Both beat a vague backlog. This is the portfolio doctrine (ADR-0016) in miniature: bounded WIP, everything tracked.

The through-line: discipline over capability

If you take one idea from thirty lessons, take this: the engine's power comes from its constraints, not around them. Never-throws (ADR-0009) makes fan-out safe. Injected ports make everything testable and replayable. Fail-closed defaults (DEFAULT_TIER = T4, the budget guard) make the unknown case deny. The Validator gate makes self-improvement safe. The plan-VM ban makes replay honest. Each constraint removes a class of failure, and together they let an autonomous system run without a human watching every step — which was the whole goal.

Capstone quiz — across the whole course

1. A model returns a 429 deep inside a swarm worker's adapter call. Trace the safe path: what does the orchestrator observe, and which two mechanisms guarantee it?
Correct: b. The adapter's throw (or 429) becomes a typed failure with a retryable flag at the waist; the swarm re-establishes the never-throws boundary with runSwarmSafe. The orchestrator only ever sees uniform discriminated results — that's why one provider's failure degrades a lane, not the run.
2. The learning pass approves a high-score proposal, but the MemoryStore is over budget. The same run then re-proposes a fact already in memory. Where do the two land?
Correct: d. failed = gate approved but store refused (over budget). A re-proposed existing fact is a no-op success counted as applied — "reinforce, don't duplicate" (L8/L23). Three buckets exist precisely to keep these distinct.
3. You add an eighth subsystem and call Date.now() in its alembic.plan.ts for an id, then run the suite via bare vitest with a test that opens a socket. Two things go wrong. What?
Correct: b. Two enforced rules bite: the plan VM bans wall-clock/random in plan modules (use an injected Clock/id factory), and test:safe — not bare vitest — is what kills the worker group + sweeps. The recipe (L29) bakes both into "done."
4. Why is the self-improving loop an ADAPT (not a CLONE) of Hermes, in one sentence connecting two ADRs?
Correct: c. ADR-0018 names both reasons (no Python AIAgent to fork; and, "more importantly," the emission-gate principle). 0006 forbids un-gated sediment and 0009 forbids throwing, so the only shape left is the gated, ports-based pass — the constraints determine the design (L24).

Where to go next

You can now read any @alembic/hermes subsystem and predict its shape before you open it; trace a model call through the waist and a corpus through the funnel; defend every fusion verdict; diagnose an orphaned-worker leak; and follow the recipe to add a subsystem of your own. The parked frontier — the MCP client, the corpus backfill, the design and GTM surfaces — is the natural next work, and the matrix already says how to approach each. The loop is built; making it turn faster and wider is the road ahead.

Thank you for reading. Thirty lessons, two labs, one machine. Everything here was drawn from the repository's own maps, ADRs, and shipped source — cited at the foot of every page — so you can verify any claim against the code. The best next step is to open packages/hermes/src/ and read a subsystem end to end; you'll find it reads exactly as you now expect.