| name | archive |
| description | Finalizes a completed execution: delivery receipt, version bump, changelog. Use when every wave has passed, or /archive. Not before verification is green. |
Archive
A task is not complete until you run. You are the permanent record. You read every receipt produced
this execution, compile the consolidated not-tested list, determine the version bump, and write the
delivery receipt. Implied completion is prohibited (I10) — you make completion provable and auditable.
You never delete; prior receipts remain untouched.
The version you bump is the product's — what the user is building — not the engine's. This is the
v7 fix for v6's four-identities mess: the engine has exactly one version (VERSION, bumped only by a
framework release); the product has its own, and archive operates on that.
What this does / does not do
Does: aggregate the session's receipts, compile not_tested verbatim, run the pre-archive sweep,
bump the product version per the domain's policy, append a changelog entry, write the delivery
receipt, maintain the receipt index. Does not: run waves (executor), verify wave output (verifier),
delete any receipt, or touch the engine VERSION.
When NOT to use
- Any wave receipt is missing, or any has status FAIL — the receipt chain is broken; archive a
complete chain only. Surface the gap instead of composing a partial delivery receipt.
- Verifier has not issued PASS for all waves — execution is not complete.
Reference Routing
| Situation | Reference |
|---|
| Optional post-archive hooks: drift scoring, sweep mode, dependency-graph refresh, shift trigger, ticket closure | references/archive-hooks.md |
| CHANGELOG append, VERSION bump, delivery-receipt write, index patch delegation | engine/shared/references/script-delegation-contract.md |
Inputs
- All receipts in
<workspace>/receipts/ written this session
- The product's version source (native manifest or
<workspace>/VERSION) — accessed by the delegation
script, not loaded into context
<workspace>/intake.json → domain; library/domains/<domain>/domain.yaml → version_policy
Receipt index
Maintain <workspace>/archive/receipt-index.json as a queryable audit record across executions
(schema in schemas/). Status transitions: PENDING (intake) → IN_PROGRESS (scope-frame receipt) →
PASS / FAIL / BLOCKED (archive writes the delivery receipt). The index is never deleted — FAIL entries
are audit evidence.
How to do it
Step 0 — Init or update the receipt index
Read the index (create with index_version: 1, empty tasks[] if absent). Find or create the entry
for task_id (do not duplicate). Update receipts_by_module for everything written this session
(written → PASS, not-run → PENDING, N/A → SKIP). Write it back before Step 1.
Step 1 — Gather all receipts
Read every receipt this execution: intake, scopeframe, specify, decompose, guard-wave-, wave-,
verification-wave-*, execution, plus any reviewer receipts. Any required receipt missing → FAIL:
record which is absent in the delivery receipt's failure reason; do not compose a delivery receipt with
a gap in the chain.
Step 2 — Compile the not-tested list
Read not_tested from every receipt. Aggregate into one list; deduplicate exact duplicates but
preserve distinct items even if similar. This appears verbatim in the delivery receipt — nothing
minimized, summarized away, or hidden. Delivery is not blocked by not-tested items; they become the
starting scope for the next related session.
Step 3 — Pre-archive sweep
Invoke verifier in pre-archive sweep mode (verifier/references/pre-archive-sweep.md):
completeness / correctness / coherence. Non-blocking — findings are WARN, recorded under
pre_archive_sweep; archive proceeds regardless.
Step 4 — Bump the PRODUCT version
Read the domain's version_policy:
- native — the product has its own manifest (the pack names which: package.json, pyproject.toml,
Cargo.toml, a build number, …). The delegation script reads and bumps that, and mirrors it to
<workspace>/VERSION.
- workspace — the product has no native manifest (a model, a curriculum).
<workspace>/VERSION is
authoritative; bump it.
Bump size derives from the highest change class across the session's receipts (BREAKING > ADDITIVE >
COSMETIC → major / minor / patch). Never touch the engine VERSION. When the product is
WabbleSpec (self-build), the product version is the engine version — that is a special case of this
rule, not an exception to it.
Step 5 — Changelog + delivery receipt
Delegate the CHANGELOG append (append-only; never modify existing entries) and the delivery-receipt
write. Provide the reasoning-dependent arguments: --summary (synthesize from wave receipts: what was
produced and why), --delta-class (highest across receipts), --files-delivered (union of
files_written), --waves-completed (PASS count), --not-tested (one per aggregated item). The
script handles file I/O without loading CHANGELOG/VERSION into context.
Step 6 — Optional hooks, then report
Run any applicable post-archive hooks (references/archive-hooks.md) — all optional, none block
archiving. Report to the user: product version bumped X → Y, N receipts aggregated, not-tested count
(name the items if any — they are actionable future scope), and the delivery-receipt path.
Output Contract
delivery-receipt (<workspace>/receipts/delivery-receipt-<timestamp>.json): base + receipts_aggregated,
not_tested_items (count), version_previous, version_new, version_bump_reason
(BREAKING|ADDITIVE|COSMETIC), version_target (native-manifest path or "workspace"), waves_completed,
all_waves_passed, pre_archive_sweep (the 3-dimension result). persistence: Spec-Anchored.
CHANGELOG.md — append-only, in the product space (or workspace for workspace-policy products).
Never modify existing entries.
Proactive Triggers
- A wave receipt is missing from the chain: do not compose a delivery receipt — surface the gap;
one missing wave receipt means the execution is not provably complete.
- About to bump the engine
VERSION: stop — archive bumps the product version; the engine
version changes only on a framework release.
- not_tested items exist: name them in the report verbatim — they are how the next session knows
what was deferred; never summarize them away.
- Domain pack declares no
version_policy: default to workspace and bump <workspace>/VERSION;
record the assumption.
- A receipt has
status: FAIL: archive is FAIL — execution did not complete; do not write a PASS
delivery receipt over a failed chain.
Completion Criteria
Done when: every required receipt was gathered (no gaps), the not-tested list is compiled verbatim,
the pre-archive sweep ran, the product version was bumped per policy, the changelog was appended,
and the delivery receipt was written; the receipt index reflects the final status.
Not done if: the delivery receipt was composed with a missing wave receipt; the engine VERSION was
bumped; any not-tested item was summarized away or hidden.
Next step: the task is complete. Surface the delivery receipt; on framework self-build with spec
artifacts changed, the shift trigger (references/archive-hooks.md) may run.
Related Skills
- executor: Signals archive after all waves pass and the user confirms the closeout. NOT auto-chained — archive waits for the signal.
- verifier: Archive invokes it in pre-archive sweep mode. NOT the per-wave verifier call — that already ran during execution.
- release: Produces a distributable build and bumps the ENGINE version. NOT the same as archive, which bumps the product version.