name: mint-plan
description: Materialize the impl-tier phasing plan. Calls compute-plan, writes state/plan.json, and mints one absent-status impl state JSON per planned node (phase-scoped, with the responsibility closure pre-seeded). Idempotent and additive — never touches a node already drafted+. Triggers on "mint plan", "/mint_plan", or before the first /run_phase.
Mint the phasing plan
compute-plan is a pure projection — it describes the per-phase
impl nodes but writes nothing. This skill is the writer: it runs
compute-plan, persists the plan, and pre-creates the impl state
files so /run_phase has something concrete to draft into.
Run this once after the phase registry (state/phases/<id>.json) is
written, and again any time the registry, comparch, or subcomparch
tiers change.
Inputs
ref— git ref to read from and commit on (default: current branch)
Steps
Compute the plan. Run
python3 -m siege.cli compute-plan.Refuse on hard errors. If the result's
errorslist is non-empty, STOP. Surface every error verbatim and do not write anything. Hard errors (an unassigned feature, a closure that changed under an already-drafted node) mean the plan is not safe to materialize — the user fixes the registry or regenerates the stale node, then re-runsmint-plan.Write
state/plan.json. Serialize thecompute-planresult verbatim (it already hasschema_version,ref,computed_at,phases,rearrangements,errors,warnings,aggregates).Surface rearrangements. If
rearrangementsis non-empty, print eachline— these are components a dependency pulled earlier than their assigned phase. The registry was NOT mutated; this is the report the user asked for. Not an error, just visibility.Mint the impl nodes. From the repo root, call the writer CLI's
mint-plansubcommand. It readsstate/plan.jsonand, for each planned impl node, writes anabsent-status impl state JSON at the phased path withmeta.parent_respspre-seeded to the node's cumulativeclosure_resp_ids. It is idempotent and additive: a node already atdrafted/reviewed/approvedis left untouched; anabsentnode is re-seeded (the closure may have grown). It also reports — but never deletes — phased impl nodes on disk that the new plan no longer includes.python3 -m siege.cli mint-planIt prints a JSON object with
minted,reseeded,skipped_built, anddropped_by_plan— each a list of impl state paths.Stage + commit + push. One commit with
state/plan.jsonand every minted/re-seeded impl state JSON:mint-plan: <N> impl nodes across <M> phasesPush withgit push -u origin $ref(retry on network failure up to 4 times with 2s / 4s / 8s / 16s backoff).
Don't
- Don't materialize anything when
compute-planreportserrors. - Don't overwrite a
drafted/reviewed/approvedimpl node — re-planning is additive, never destructive. - Don't delete the
dropped_by_plannodes. Surface them so the user decides — a dropped node usually means a registry edit removed a feature; the user may want to keep the built artifact or clean it up deliberately. - Don't touch the phase registry (
state/phases/). It is the user's intent; the planner only reads it. - Don't create a PR.
Output
A summary:
plan: <M> phases, <N> impl nodes
minted: N new absent nodes
reseeded: N existing absent nodes (closure refreshed)
skipped: N already-built nodes (left untouched)
rearrangements: N — <one line each>
dropped-by-plan: N — <path each, surfaced for review>
commit: <sha>