sow: sovereign-agent-v1-unit12-release-evaluation
project: sovereign-agent
unit: 12
status: PROPOSED
authority: principal
base_commit: 266d5c421940d2e0fceedd275c11a0168049dd0d
governing_documents:
- docs/sows/sovereign-agent-v1-educational-control-plane.md (sequencing amendment 6)
- docs/rulings/2026-08-30-unit11-local-closure-supersedes-real-deployment-gate.md
(withdraws the real-deployment pilot-start premise this unit's own scope was
originally written against)
- docs/rulings/2026-08-31-unit12-scope.md (Unit 12 scope ruling, all seven
holdings binding)
work_branch: unit-12/release-evaluation
runtime: Python 3.14
runtime_dependencies:
- pydantic
This SOW is the Principal’s implementation direction for Unit 12, incorporating
the Principal’s Unit 12 scope ruling
(docs/rulings/2026-08-31-unit12-scope.md) in full.
Filing and reviewing this SOW does not, by itself, authorize implementation — the same boundary every prior unit’s own SOW has had to state explicitly. Merging this SOW establishes the reviewed implementation contract; it does not start implementation.
The sequence is:
main. Merging establishes the contract; it does not
start implementation.main from a clean clone, confirming the merge introduced no
drift from the reviewed head.266d5c42 if main has advanced past this SOW’s own merge.Three further, independent authorization gates govern this unit’s own terminal acts, each distinct from and later than implementation authorization:
1.0.0rc1 TestPyPI publication and the redacted proof pack’s filing
(Holding 2 and Holding 5, steps 2-4) follow implementation acceptance but
require their own review before the release-candidate artifact is treated as
evidence of anything.v1.0.0 PyPI release (Holding 5, steps 5-7) requires separate,
explicit Principal authorization distinct from release-candidate publication.
Merging this unit’s implementation does not authorize either release tag.Correction (2026-08-31): the original version of this paragraph described
Unit 12’s own closure as following implementation merge with the final
release treated as a possibly-later, independently-orderable act. That
inverted the governing ruling’s own Holding 5 sequence, where step 10
(“close Unit 12”) comes strictly after steps 5-9 (final release
authorization, tagging, PyPI publication, external verification, and
installation-documentation correction) — one ordered sequence, not two
separately-sequenceable branches. “Separately authorized” means the final
release needs its own distinct Principal act (step 5); it does not mean that
act, once granted and executed, may happen after Unit 12’s own closure.
Corrected: Unit 12’s own closure (Holding 5, step 10) follows the completed,
externally-verified final release and its documentation correction (Holding
5, steps 5-9) — a separate, reviewed PROPOSED -> ACCEPTED change and a
clean-main gate come only after that, matching every prior unit’s own
closing convention. See “Review and merge ritual” and “Final Unit 12 closure
conditions” below for the corrected exact ordering.
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.
Close the seven components the governing ruling authorized:
done_when requirement,
additively, with Holding 1’s replacement text (Holding 1).1.0.0rc1 release-candidate sequence (Holding 5) — this unit builds the
mechanism and produces the evidence; it does not itself publish anything.Unit 12 does not finish or simulate a real 30-day pilot, does not perform the real pilot-start act, does not run the Andrea live evaluation itself (that is a separate, later, separately-authorized human session using the protocol this unit defines), does not publish any release tag, and does not claim PyPI publication occurred. All of that remains outside this unit’s own implementation-acceptance scope, per the governing ruling’s own holdings.
Terminology, per the governing ruling’s Holding 7, binding on this SOW and its own deliverables: “Andrea live evaluation” for the timed human session this unit’s protocol defines (never unqualified “soak”), “local, learner-controlled Sovereign Store release evaluation” for what the proof pack’s own pilot-mechanism evidence documents (never “the 30-day pilot” or any phrasing implying a real deployment), and “v0.6 infrastructure soak” if the unrelated historical concept needs mentioning at all.
Build docs/evidence/unit12/proof-pack.json (the manifest itself — filed only
once real evidence exists to populate it; this unit builds the schema and the
verifier, and produces a manifest whose fields are filled from evidence this
unit’s own gate actually generates, but Andrea-evaluation and provider-status
fields for statuses this unit cannot itself produce — see below — are recorded
using their honest NOT_RUN_* states, never fabricated) and a corresponding
schema/verifier module.
The manifest must record, exactly as the ruling requires:
Provider status is exactly one of LIVE_PASS, NOT_RUN_UNAVAILABLE,
NOT_RUN_UNAUTHENTICATED, FAIL — no fifth value, no free-text status field
that could smuggle in an unreviewed claim.
Build a verifier (scripts/verify_proof_pack.py) that rejects, with a specific
named reason for each:
.., absolute paths
outside docs/evidence/unit12/, symlink traversal — matching this project’s
own established .sovereign-out/.sovereign path-escape discipline);content that matches a secret-shaped pattern, field-schema-aware, not a
blind content scan. Correction (2026-08-31), superseding the prior
correction on this same bullet: the original version cited
verify_runtime_dependencies.py as already containing credential-shaped
environment heuristics; independently re-checked, that script contains no
such thing. The FIRST replacement contract (a blind “20+ contiguous
alphanumeric characters” entropy rule applied to all content) was itself
wrong, caught by the Principal and independently reproduced by Master
before applying this fix: a git commit SHA is exactly 40 hex characters
(git rev-parse HEAD | wc -c → 41 including the newline) and a SHA-256
digest is exactly 64 hex characters — both required manifest fields under
this same §1 (“exact source and release-candidate commits”; “artifact
digests” and evidence-file “SHA-256 digests”) — and both would trip a
blind entropy rule, making the verifier reject every valid proof pack. The
cited provider environment-variable names (ANTHROPIC_API_KEY, etc.) are
variable names, not value-shape patterns, and do not by themselves
define what a credential value looks like — a second, independent error
in the same prior fix, also caught here rather than left uncorrected.
The verifier must instead validate against the manifest’s own known field schema, never scan arbitrary string content blindly:
MAJOR.MINOR.PATCH with an optional pre-release
suffix; file paths: validated against the path-escape rule above, not
against a secret pattern) are validated against that specific shape and
never rejected as secret-shaped merely for being long.= and a non-empty,
non-placeholder value — e.g. ANTHROPIC_API_KEY=<real-looking value> —
using the exact variable names each provider adapter’s own
authentication_environment tuple already defines (confirmed by direct
read: ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN,
CLAUDE_CODE_OAUTH_TOKEN in src/sovereign_agent/providers/claude.py:24-27;
CODEX_API_KEY in src/sovereign_agent/providers/codex.py:26;
CURSOR_API_KEY in src/sovereign_agent/providers/cursor.py:24) — a
variable name alone, or a variable name in redaction metadata
explicitly describing that it was redacted (e.g. “ANTHROPIC_API_KEY was
present and has been redacted”), is never itself a rejection; only an
actual assignment-shaped pairing with a value is; (b) a literal
Bearer <token> HTTP authorization-header shape. No entropy heuristic
of any kind applies to free-text fields either, per the Principal’s own
instruction not to reintroduce a broad heuristic without mechanically
precise exclusions — none is precise enough here to justify one. This is
new detection logic this unit builds, not a reuse of anything that
already exists;NOT_RUN_* but
whose accompanying prose or a sibling field claims success — the exact
“NOT_RUN means PASS” lie Holding 2 names explicitly.This unit builds the manifest schema, the verifier, and — where this unit’s
own gate genuinely produces the evidence (deterministic gate results,
installed-wheel results, local pilot-mechanism evidence) — a real filled-in
manifest reflecting that evidence truthfully. Fields this unit’s own
implementation cannot itself produce (the Andrea live-evaluation result,
because that evaluation is a separate later human session; LIVE_PASS
provider rows, because no credential is available in this unit’s own
implementation environment) are filled with their honest NOT_RUN /
not-yet-available states, never left absent and never fabricated.
Create a new document, docs/andrea-chapters-0-12-evaluation.md, following
docs/andrea-chapters-0-7-evaluation.md’s own established shape (task
descriptions, expected observations with real captured command output,
scoring key, “what this document does not authorize” section). This document
does not rewrite docs/andrea-alpha-evaluation.md or
docs/andrea-chapters-0-7-evaluation.md — both remain historical records of
their own prior evaluations, untouched.
The new document must define, exactly per the ruling:
done_when
clause, unchanged by this unit).docs/andrea-chapters-0-7-evaluation.md, maximum 14 across those seven,
confirmed at this SOW’s base commit):
Each new task scores 0-2, matching Tasks 1-7’s own scale; new maximum 20 (14 existing + 3 new tasks × 2).
Build the machine-checkable pre-check
(scripts/evaluate_andrea_chapters_0_12.py, following
scripts/evaluate_andrea_chapters_0_7.py’s own established shape — stdlib
plus the production package, executes the cold-start path exactly as the new
document writes it, scores reachability and durable evidence, explicitly
declines to score what requires a human reader rather than inventing a score)
covering Tasks 8-9’s own machine-checkable reachability/evidence portions (not
Task 10, which is a comprehension question a human must score). This unit
builds and runs the pre-check; it does not run the human session itself.
scripts/verify_curriculum.py remains the structural gate, unweakened,
covering all 13 chapters (Chapters 0-12; Unit 12 adds no Chapter 13).
Build a new, distinct script, scripts/verify_release_candidate.py, that:
docs/sows/sovereign-agent-v1-unit11-store-expansion-pilot-start.md’s own
“Gate” section already established for verify_curriculum.py, extended
here to the release-candidate context specifically);evaluate_andrea_chapters_0_12.py’s own
reachability/evidence checks);verify_proof_pack.py itself passes against whatever manifest state
exists at gate time (partial-but-honest NOT_RUN rows included);LIVE_PASS without a
correspondingly real, verifiable evidence file backing it);This is a distinct gate from verify_curriculum.py, per the ruling’s own
instruction not to overload one script with unrelated release responsibilities
— verify_curriculum.py’s own scope (chapter structure, sequence, instructor
notes, frontmatter, rulings-index agreement) does not grow.
Renderer independence is preserved (per
docs/rulings/2026-08-27-book-publication-destination.md); this unit adds no
publication pipeline of its own.
For each of Claude, Codex, and Cursor, build the reporting path that produces one of the four allowed proof-pack statuses truthfully:
sovereign-agent doctor already performs,
reused here rather than reimplemented);tests/test_providers_live.py, the 9 tests already built under Unit 6, all
still deselected by default) only with explicit opt-in
(SOVEREIGN_AGENT_LIVE_ASSIGNMENTS=1, the flag that already exists);LIVE_PASS only when a live assignment genuinely completed
successfully with real, verifiable evidence; NOT_RUN_UNAVAILABLE when the
executable is absent; NOT_RUN_UNAUTHENTICATED when the executable exists
but no credential is available; FAIL when a live assignment was attempted
and failed because of Sovereign Agent’s own behavior (which blocks release
until fixed, per the governing ruling).This unit’s own implementation environment is expected to hold no live
provider credentials — matching every prior unit’s own confirmed state
(env | grep -Ei "ANTHROPIC|CLAUDE_CODE_OAUTH|CODEX_API|CURSOR_API" empty).
The proof-pack fields this unit itself produces will therefore genuinely show
NOT_RUN_UNAUTHENTICATED or NOT_RUN_UNAVAILABLE for all three providers —
this is the correct, honest state for this unit’s own acceptance, not a gap to
paper over. Obtaining LIVE_PASS evidence, if ever pursued, is a separate,
later, explicitly-authorized act using real credentials this unit does not
hold or request.
Correct the stale unqualified “Unit 12 Andrea soak” phrasing confirmed present
in docs/andrea-chapters-0-7-evaluation.md (the exact line the Unit 12 scope
descent identified) with an explicit terminology note identifying it as
superseded wording, additively — matching this project’s own established
discipline throughout this session of naming a stale phrase rather than
silently rewriting it. Do not touch any historical accepted SOW, acceptance
record, or docs/v0.6-soak.md. The new docs/andrea-chapters-0-12-evaluation.md
document itself must use only “Andrea live evaluation” throughout, never
unqualified “soak.”
done_when requirement, additively (governing ruling Holding 1)Added 2026-08-31, closing a gap the Principal identified: the original
version of this SOW cited the governing ruling’s Holding 1 replacement text
but never required implementing it against the top-level design memo it
actually governs. Implementation could satisfy every other requirement in
this SOW while leaving docs/sows/sovereign-agent-v1-educational-control-plane.md’s
own binding done_when clause still reading the superseded line — a real gap,
not a cosmetic one, since that document’s done_when field is this project’s
own binding completion criterion for the whole 1.x line, not merely
descriptive prose.
Add, additively, to docs/sows/sovereign-agent-v1-educational-control-plane.md:
a dated correction note (matching the pattern this session’s own Unit 11
rulings and SOW corrections already established — name the superseded line,
do not delete it, state the replacement, cite the ruling) identifying that the
done_when clause’s line
“30-day Sovereign Store pilot -> redacted proof pack accepted” and sequencing
amendment 6’s clause “then starts the 30-day pilot. Unit 12 finishes the
pilot…” are both superseded by
docs/rulings/2026-08-30-unit11-local-closure-supersedes-real-deployment-gate.md
(already true and already ruled, but never yet annotated directly on the
document those clauses live in) and by
docs/rulings/2026-08-31-unit12-scope.md’s own Holding 1, whose replacement
text is:
local, learner-controlled Sovereign Store release evaluation -> redacted Unit 12 proof pack accepted
The original done_when line and amendment 6’s own original wording remain
intact, unedited — this is an additive correction note, not a rewrite,
matching every other correction this project’s history has made to a
superseded-but-preserved passage.
main
does not mean the Andrea live evaluation has run, the release candidate has
been published, the final release has occurred, or this document’s status
has flipped to ACCEPTED — each of those requires its own separate,
later authorization and review. Stated in “Authorization” above and in
“Final Unit 12 closure conditions” below.LIVE_PASS evidence is not produced by this unit’s
own implementation — this environment holds no live credentials. Stated
in “Required implementation” §4 above.Do not:
LIVE_PASS provider evidence using real credentials this
unit’s own implementation environment does not hold;1.0.0rc1 to TestPyPI, tag v1.0.0, or publish to PyPI — building
the mechanism this unit’s evidence will eventually support is in scope;
invoking the actual publish sequence is not;ACCEPTED;docs/andrea-alpha-evaluation.md or
docs/andrea-chapters-0-7-evaluation.md;docs/v0.6-soak.md or any historical accepted SOW/acceptance record;scripts/verify_curriculum.py with release-gate responsibilities
that belong in the distinct scripts/verify_release_candidate.py.scripts/verify_source_budget.py scopes only to src/sovereign_agent/. At
this SOW’s base commit: 27/40 modules, 6208/6250 nonblank lines, 7/30 root
exports — 42 lines of headroom, confirmed by direct run at this SOW’s
exact base commit.
This unit’s own required implementation is expected to need zero
src/sovereign_agent/ changes. The proof-pack manifest/verifier, the new
release-candidate gate script, and the new Andrea evaluation document/script
are all release/curriculum/documentation surfaces living in scripts/,
docs/, and evidence directories — the same split Unit 9 established for
pulse_gate.py and Unit 11 continued for pilot.py. If implementation
genuinely discovers a need to touch src/sovereign_agent/ core primitives
(for example, if the proof-pack verifier’s secret-shaped-content detection
needs a shared helper that belongs in core rather than in scripts/), stop
and request a precise budget ruling before writing that code — 42 lines is
a hard, small ceiling; do not compress correctness to fit it, and do not treat
a granted amendment as license to pad.
Run at the exact implementation head:
uv lock --check
make verify
python scripts/verify_curriculum.py
python scripts/verify_curriculum.py
python scripts/verify_source_budget.py
python scripts/verify_proof_pack.py
python scripts/verify_release_candidate.py
git diff --check
Run verify_curriculum.py twice consecutively (existing discipline).
verify_release_candidate.py itself runs the 13 exercises twice from fresh
roots and the full installed-wheel path, per “Required implementation” §3
above — this is a heavier gate than any prior unit’s own, matching this unit’s
own release-gate mission. Build the wheel, install into a clean Python 3.14
environment outside the source tree, run sovereign-agent --help,
sovereign-agent doctor, sovereign-agent demo store --mode simulated --root
/tmp/<somewhere-outside-source> from that installed wheel (existing
discipline, reconfirmed here as part of the release gate specifically, not
merely as a general sanity check). Live-provider tests remain deselected and
must be reported as unrun, with the exact NOT_RUN_* status this unit’s own
proof-pack manifest records.
unit-12/release-evaluation; it does not open or
merge its own PR.LIVE_PASS for a provider with no
corresponding real evidence file — the verifier must catch this;docs/evidence/unit12/ — the verifier must catch this;Bearer <token> string inserted
into a free-text field) — the verifier must catch this with a named
reason, proving the detection side of the same fix also genuinely
works, not just that it no longer over-rejects;CHANGES_REQUESTED.main from a clean clone.docs/v1-unit12-release-evaluation.md (the documentation
deliverable this unit adds) against merged behavior.PROPOSED and Unit 12
is not yet closed. Merged, verified behavior on main is not, by
itself, Unit 12’s closure — matching the exact pattern
docs/rulings/2026-08-30-unit11-local-closure-supersedes-real-deployment-gate.md
established for Unit 11’s own closure sequence.1.0.0rc1 release candidate is produced and published to TestPyPI
(governing ruling Holding 5, steps 2-3), under its own separate
authorization, and the redacted proof pack is filed and reviewed
(Holding 5, step 4).Correction (2026-08-31): the original version of this section, and the
“Final Unit 12 closure conditions” section below, treated the final v1.0.0
PyPI release as an act that “may follow” Unit 12’s own closure — inverting
the governing ruling’s own explicit, single, numbered ten-step Holding 5
sequence, where step 10 (“Close Unit 12 only after…”) comes strictly after
steps 5-9 (final release authorization, tagging, publication, PyPI
verification, and installation-documentation correction). “Separately
authorized” (true — the final release needs its own distinct Principal act,
step 5, distinct from release-candidate authorization) does not mean “may
happen after closure” (false — the ruling’s own step numbering is one
sequence, not two independently orderable branches). Corrected below to
match the ruling’s own order exactly.
v1.0.0 (Holding 5, step 6); the existing trusted-publisher
workflow publishes to PyPI (Holding 5, step 7).PROPOSED -> ACCEPTED flip for this document (in a later, separate
reviewed change, per this project’s own standing convention) follow.main is gated once more
from a clean clone (governing ruling Holding 5, step 10).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.
Add docs/v1-unit12-release-evaluation.md, following the shape established by
docs/v1-unit7-workspace-lifecycle.md through
docs/v1-unit11-store-expansion-pilot-start.md: status header (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
being written into the doc), a budget-impact statement, a “what this unit did
not do” section (explicitly naming that the Andrea live evaluation was not
run, no LIVE_PASS provider evidence was obtained, and no release tag was
published), and explicit non-claims.
Add docs/andrea-chapters-0-12-evaluation.md (§2 above).
Add the additive correction note to
docs/sows/sovereign-agent-v1-educational-control-plane.md (§6 above).
Update CHANGELOG.md following the established per-unit style. Update
book/README.md’s chapter index if it references curriculum completion state
that changes (confirm current wording before deciding whether an update is
needed — do not assume).
The Unit 12 implementation is technically accepted only when the Principal can inspect the merged tree and confirm:
docs/evidence/unit12/proof-pack.json’s schema and verify_proof_pack.py
exist, reject every malformed-input class named in “Required implementation”
§1, and accept a genuinely honest partial manifest (real gate/curriculum/
installed-wheel/local-pilot evidence, NOT_RUN_* for Andrea and all three
providers);docs/andrea-chapters-0-12-evaluation.md exists, defines the full protocol
per Holding 3, and its machine-checkable pre-check
(scripts/evaluate_andrea_chapters_0_12.py) runs and reports honestly what
it can and cannot itself score;scripts/verify_release_candidate.py exists, runs the 13 exercises twice
from fresh roots, verifies the installed-wheel path outside the source
tree, and is demonstrably distinct from scripts/verify_curriculum.py
(the latter’s own scope unchanged);LIVE_PASS, and this unit’s own gate run shows the honest
NOT_RUN_* state for all three providers;docs/sows/sovereign-agent-v1-educational-control-plane.md) carries an
additive correction note identifying its done_when clause and sequencing
amendment 6’s own text as superseded by the governing ruling’s Holding 1
replacement, with the original text preserved unedited;src/sovereign_agent/ budget is respected — expected unchanged at
27/40 modules, 6208/6250 nonblank lines, 7/30 root exports — or a precise
amendment was requested and granted before implementation, never silently
exceeded or compressed against;NOT_RUN for what this unit cannot itself produce), and completing
it is later, separately-authorized work, not something this unit’s
implementation needs to finish.Proceed first by filing and reviewing this SOW. Do not begin implementation before it is merged unchanged or a subsequent Principal ruling amends it.
Correction (2026-08-31): this section previously listed six conditions and
treated the final v1.0.0 PyPI release as an act that “may follow” closure —
inverting the governing ruling’s own single, explicitly numbered Holding 5
sequence, where step 10 (“Close Unit 12 only after…”) comes strictly after
steps 5-9 (final release authorization, tagging, publication, PyPI
verification, installation-documentation correction). Corrected to nine
conditions below, matching the ruling’s own order exactly — separate
authorization for the final release (a real, distinct Principal act) does not
mean the release may happen after closure; it means closure waits for it.
Unit 12 is closed only when all of the following hold, in this order:
main clone
(Review-and-merge-ritual steps 1-10).1.0.0rc1 release candidate has been produced, published to TestPyPI,
and verified from outside the repository (Holding 5, steps 2-3).v1.0.0, and the existing trusted-publisher workflow has published it to
PyPI (Holding 5, steps 6-7).PROPOSED -> ACCEPTED in a
separate, reviewed change.main has been gated once more from a clean clone after that flip lands
(Holding 5, step 10).Only after all nine hold is Unit 12 closed.
zeo-site; this repository builds no site