sovereign-agent

SOW: Sovereign Agent 1.x — Unit 10 curriculum completion, Chapters 0-7

sow: sovereign-agent-v1-unit10-curriculum-completion
project: sovereign-agent
unit: 10
status: PROPOSED
authority: principal
base_commit: e6ce2bd3b3ec266a64c7705b4d55f587eee44730
governing_documents:
  - docs/sows/sovereign-agent-v1-educational-control-plane.md (sequencing amendment 6)
  - docs/units-0-6-contract.md (curriculum cross-cutting section)
work_branch: unit-10/curriculum-completion
runtime: Python 3.14
runtime_dependencies:
  - pydantic

Authorization

This SOW is the Principal’s implementation direction for Unit 10, incorporating the Principal’s rulings on the seven open questions the read-only scope descent surfaced (.unit10/SCOPE-DESCENT.md, untracked staging evidence, superseded by this SOW as the citable authority).

Filing and reviewing this SOW does not, by itself, authorize implementation. The Principal’s authorization for Unit 10 was explicitly narrower than prior units: read-only scope descent and SOW preparation only, with implementation requiring a separate Principal decision after this SOW is merged and verified — not something this document, or its own merge, may grant itself.

The sequence is:

  1. File this SOW in the repository, route it through Sparring review, and merge the reviewed text into main. Merging establishes the reviewed implementation contract; it does not start implementation.
  2. Gate merged main from a clean clone, confirming the merge introduced no drift from the reviewed head.
  3. Master requests explicit Principal authorization, bound to the exact merged SOW commit, before opening any implementation branch or spawning any stream work.
  4. Only on that separate authorization does implementation begin, from the resulting exact merged commit — not from the drafting branch and not from e6ce2bd3 if main has advanced past this SOW’s own merge.

A changed SOW head invalidates an earlier co-sign. Branch reconciliation must use an allowed, auditable PR-based mechanism; do not substitute a local history rewrite for the denied git rebase, git merge, or force-push mechanisms.

Mission

Complete the promised curriculum range and make Chapters 0-7 one coherent course:

  1. Create Chapters 4-7, each teaching one pedagogical concept grounded in real, ACCEPTED production behavior from Units 7-9.
  2. Establish instructor-note machinery, co-located per chapter and indexed at the book level.
  3. Make the curriculum’s own drift-verification machinery falsifiable against the new chapters, including a chapter-scoped (not removed) Pulse-claim guard.
  4. Leave Chapters 0-3 historically truthful, edited only additively.
  5. Extend the offline Andrea evaluation with a genuine post-Unit-9 task and scoring key.

Unit 10 does not create new production behavior. Every chapter exercise imports and runs existing, already-ACCEPTED code from Units 7, 8, and 9 — it does not invent new Pulse, supervisor, service-hosting, fencing, or provider behavior merely to make the curriculum easier to teach.

Binding interpretation of the two curriculum authorities (Question 5, resolved)

docs/sows/sovereign-agent-v1-educational-control-plane.md:62-68 (amendment 6) says Unit 10 “completes… Chapters 0-7.” docs/units-0-6-contract.md:97-100 says Unit 10 “expands, reorganises and polishes Chapters 0-7; it is not where the book first becomes runnable.”

These are compatible, and this SOW states the reconciling reading explicitly rather than silently picking one, per the A-U8-1 discipline this project already holds itself to:

Consequence: Chapters 0-3 retain their existing behavior and historically truthful claims. Their edits are additive editorial improvements only — better navigation, transitions, terminology, forward references. Unit 10 may NOT replace their exercises or rewrite history as though Pulse existed during their original scope.

Required implementation

1. Four new chapters — one pedagogical concept each (Questions 1-2, resolved)

The four chapters represent four pedagogical concepts, not one chapter per implementation unit. Unit 8 is split because fencing and recovery are distinct ideas. Pulse receives exactly one chapter, teaching both its mechanism and its end-to-end consequence together — do not split Pulse into separate teaching forks.

Chapter Directory Production subject
4 ch04_work_stays_inside_its_boundary Unit 7 workspace policy, confinement, safe paths, reclaim
5 ch05_authority_needs_a_fence Unit 8 actor leases, execution attempts, stale-worker refusal
6 ch06_the_organization_recovers Unit 8 supervisor reconciliation and hard-kill recovery
7 ch07_the_organization_wakes_itself Unit 9 wake gate, genuine Pulse, structured origin, proactive governed work

Each new chapter must match book/CONTENT-SOURCE.md’s existing contract exactly: a chNN_<slug>/ directory containing README.md and solution.py. README.md carries, in order: ## Learning objective, an exercise section (## The exercise or ## Exercise N), expected observations with real command output, ## Learner verification command, ## Explain it back. solution.py imports the production package (from sovereign_agent... or from reference_organizations... at module top level) rather than copying implementation — it must not contain class Database or CREATE TABLE, matching the exact heuristic scripts/verify_curriculum.py:97 already enforces for Chapters 0-3.

Each chapter’s exercise must import and run production code with a real, exercise-able entry point already proven by this project’s own test suites — no teaching forks:

Chapter 3’s own README currently has no forward link (it is presently the last chapter). Add one, matching the existing pattern (book/ch00_first_shift/ README.md:165, book/ch01_organization_remembers/README.md:209, book/ch02_work_needs_governance/README.md:285). Each new chapter must end with its own forward link, chaining 4→5→6→7. Chapter 7, being currently the last, needs no forward link but should close the sequence coherently (e.g. a return to book/README.md’s index or a forward gesture to Unit 11’s own future chapters, matching the existing precedent at book/ch03_actor_is_not_a_model/README.md:89 of naming a not-yet-written future unit by number).

Vocabulary introduced in Chapters 0-3 (Outcome/SOW/Assignment/Actor, per book/ch02_work_needs_governance/README.md:14-25) must extend consistently — new terms (actor lease, execution attempt, wake decision, Pulse origin) are introduced once, in the chapter that first needs them, and reused verbatim afterward, not re-defined differently in a later chapter.

2. Instructor-note machinery (Question 3, resolved)

Co-located notes, indexed at the book level:

book/INSTRUCTOR.md
book/chNN_<slug>/INSTRUCTOR.md

book/INSTRUCTOR.md defines how to teach the curriculum and indexes every chapter’s own instructor note. Every Chapter 0-7 INSTRUCTOR.md — including retroactively for the four existing chapters, since the machinery must cover the whole completed range, not just the four new ones — must contain:

Instructor notes carry no site frontmatter — the same renderer-agnostic constraint that already governs every chapter README.md (see below). book/CONTENT-SOURCE.md must be updated to document this source contract for instructor notes, following its own existing pattern (the file/contract table at book/CONTENT-SOURCE.md:21-26).

3. The Pulse guard becomes chapter-scoped, not removed (Question 4, resolved)

The exact current guard, scripts/verify_curriculum.py:62-66 (FORBIDDEN_CLAIMS), is global and chapter-blind — confirmed directly: the name parameter passed into check_chapter is never referenced inside that loop. It rejects truthful Chapter-7-shaped prose about real, ACCEPTED Pulse behavior (independently reproduced: “the organization wakes itself up today by running pulse –once” and “the pulse fired a wake decision” both trip it) and is also narrow/brittle by verb form (a differently-phrased but equally true claim evades it).

Required behavior after this unit:

The verifier must fail when:

Do not simply widen the existing regex or add a chapter-number exemption without also verifying the durable ledger evidence — a wording-only fix would let Chapter 7 claim Pulse fired without ever actually running it, reintroducing exactly the defect class this guard exists to prevent.

4. Mechanical enforcement (Question 6, resolved — mixed approach)

Extend scripts/verify_curriculum.py to mechanically enforce:

Keep additive-only treatment of Chapters 0-3 as an exact-diff review requirement, not a mechanical check. Do not build a brittle heuristic (e.g. “no line was deleted”) and present it as proof of additive-only editing — that would be exactly the kind of overclaimed-check-vs-actual-property gap this project’s own review discipline exists to catch. State this limitation plainly in the Unit 10 documentation deliverable rather than papering over it with a check that cannot actually verify the property it claims to.

Every new mechanical guarantee requires a mutation check before this unit is reported complete: for each new scripts/verify_curriculum.py check, demonstrate a plausible break (e.g. a chapter fabricating a Pulse event; an INSTRUCTOR.md missing a required section; a chapter’s forward link pointing at the wrong chapter; a README.md with injected frontmatter) that the new check catches, confirm the mutation actually landed (diff-stat), then restore and confirm green.

5. Andrea evaluation extension (Question 7, resolved)

The post-Unit-9 evaluation task belongs to Unit 10, not left unassigned — closing the gap that docs/andrea-alpha-evaluation.md’s own A-U9-2 note named: “A future evaluation covering post-Unit-9 curriculum will need its own task 7 and its own scoring key” (docs/andrea-alpha-evaluation.md:169-170).

A new task must not be added to docs/andrea-alpha-evaluation.md itself. That document’s own title — “Andrea Alpha evaluation (Units 0–6.5)” — is a historical scope statement; adding a post-Unit-9 task to it while leaving that title unedited would make the file internally contradictory, claiming one scope while containing an evaluation task from a later one.

Required instead:

This does NOT authorize the Unit 12 Andrea soak. The boundary is exact: Unit 10 authors and mechanically validates the new offline task and rubric; Unit 12 performs the timed, human, Andrea-profile soak and release evaluation using it. No credentialed provider execution is introduced in Unit 10 — the new task, like every existing one, runs entirely offline on the scripted provider.

Explicit non-scope

Do not:

The nine credentialed provider tests remain deselected and explicitly deferred to Unit 12.

Budget

scripts/verify_source_budget.py scopes only to src/sovereign_agent/ (confirmed: PACKAGE = ROOT / "src" / "sovereign_agent", scripts/verify_source_budget.py:10). Unit 10 is curriculum, documentation, and scripts/verify_curriculum.py extension work — none of it lives inside src/sovereign_agent/, so this unit is not expected to touch that budget at all. Confirm this explicitly in the gate (the budget script’s own output must be unchanged from the Unit 9 baseline: 27/40 modules, 6139/6250 lines, 7/30 exports). If any change to src/sovereign_agent/ proves necessary, stop and request a ruling — this SOW does not authorize new production code.

Gate

Run at the exact implementation head:

uv lock --check
make verify
python scripts/verify_curriculum.py
python scripts/verify_source_budget.py   # must be unchanged from Unit 9 baseline
git diff --check

Also build and install the wheel into a clean Python 3.14 environment outside the source tree, then run:

sovereign-agent --help
sovereign-agent doctor
sovereign-agent demo store --mode simulated --root /tmp/sovereign-agent-unit10

Run the extended verify_curriculum.py twice consecutively. Run each new chapter’s solution.py exercise directly, confirming it executes cleanly against a fresh organization root, matching the discipline scripts/verify_curriculum.py:100-129 already applies. Live-provider tests remain deselected and must be reported as unrun.

Review and merge ritual

This ritual governs the implementation PR, which may only begin after the separate Principal authorization required by the “Authorization” section above — not immediately on this SOW’s own merge.

  1. Stream implements on unit-10/curriculum-completion; it does not open or merge its own PR.
  2. Master independently reads the new chapters, runs each exercise directly, and reproduces the mutation checks for every new mechanical guarantee (§4).
  3. Master independently mutation-checks at least:
    • a fabricated pulse.* event inserted directly into Chapter 7’s exercise (bypassing run_pulse_once) — the chapter-scoped guard must still catch this;
    • a Pulse claim introduced into a pre-Chapter-7 chapter’s prose — the unconditional prohibition must still catch this;
    • a missing required section in a new INSTRUCTOR.md — the new structural check must catch this;
    • injected frontmatter into a chapter README.md — the new frontmatter check must catch this.
  4. Master opens the PR and names its exact head.
  5. Sparring reviews that exact head against this SOW and the Principal’s seven resolved questions above.
  6. No merge over CHANGES_REQUESTED.
  7. Principal acceptance is requested explicitly after Sparring co-signs.
  8. Merge only through the allowed GitHub PR mechanism.
  9. Gate merged main from a clean clone.
  10. Audit docs/v1-unit10-curriculum-completion.md (the documentation deliverable this unit adds, following the established docs/v1-unitN-...md shape) against merged behavior.
  11. Flip its status to ACCEPTED only in a separate, reviewed change.
  12. Unit 11 remains unstarted until that closure lands.

If main advances, reconcile through an auditable PR-based path and rerun gates and review on the resulting exact head. A prior co-sign does not survive a head change.

Documentation deliverables

Add docs/v1-unit10-curriculum-completion.md, following the shape established by docs/v1-unit7-workspace-lifecycle.md, docs/v1-unit8-supervisor-fencing-recovery.md, and docs/v1-unit9-pulse-proactive-work.md: status header block (status PROPOSED until a separate reviewed acceptance flip), the contract as testable properties, a verified “how to check this document against the repository” command block (every command run and confirmed working before it is written into the doc — this project has now caught a broken check-command in review multiple times; do not be the next), a budget-impact statement (expected: unchanged, per the Budget section above), a “what this unit did not do” section, and explicit non-claims (no credentialed provider evidence, no Chapters 8-12, no Unit 11/12 work).

Update CHANGELOG.md following the established per-unit style. Update book/CONTENT-SOURCE.md to document the instructor-note contract and the new mechanical guarantees (§4). Update book/README.md’s chapter index to include Chapters 4-7.

Acceptance conditions

Unit 10 is accepted only when the Principal can inspect the merged tree and confirm:

Proceed first by filing and reviewing this SOW. Do not begin implementation before it is merged unchanged or a subsequent Principal ruling amends it.