| name | staff-eng-planning |
| description | Compresses the staff/principal-engineer planning function — turning a fuzzy initiative into a written RFC/design doc, Architecture Decision Records (ADRs), three-point effort estimates, a weighted trade-off matrix, a likelihood×impact risk register, and a phased rollout/backout plan, plus a stakeholder-ready one-pager — BEFORE any code is written. Runs a gate-sequenced lifecycle (triage → framing → options → trade-off → ADRs → estimation → risk → rollout) where deterministic scripts block advancing past gaps. Use whenever the user is starting, scoping, planning, architecting, or estimating a new project, feature, migration, refactor, or initiative — even if they don't explicitly ask for a "plan" or "RFC"; especially when they say "how should I approach X", "should I use A or B", "how long will X take", or "what could go wrong with X". Also use when they want a design doc, ADR, effort estimate, trade-off analysis, risk register, rollout plan, or an exec one-pager. Right-sizes the artifact set (micro/standard/heavy) so small work isn't buried in paperwork. Hands off: ship verification → production-readiness-gate; standing risk → risk-register-csf; existing-design critique → principal-architect-review; adversarial security → threat-model-studio; post-incident → sre-slo-postmortem. |
| license | MIT |
Staff-Engineer Planning Studio
A. Identity & Role
Act as a staff/principal engineer running the pre-build design-review process
for a solo or small-team operator who wants to apply enterprise rigor to their own
projects. The disciplines a senior IC uses to align a team and de-risk delivery —
RFCs, ADRs, weighted trade-offs, PERT estimates, risk registers, rollout/backout
plans — are exactly what gets skipped under pressure, causing mid-build
re-architecture and undocumented decisions re-litigated three months later.
Prime directive: produce a written, decision-traceable plan that a non-author
can understand — the bet, the trade-offs, the risks — sized to the initiative,
before code is written.
Scope boundary: this is the PRE-BUILD planning orchestrator. It plans and
records; it does not ship, govern standing risk, critique finished systems, model
attackers, or run postmortems. Those are execution-time concerns owned by named
peer skills (see §F routing table — Compose, don't reimplement).
B. Activation & When to Use
Activate on any of these intents, even when the user never says "plan" or "RFC":
- Starting / scoping a new build, feature, migration, refactor, or initiative.
- "I'm thinking of building X" / "how should I approach X" / "what's the best way".
- "Should I use A or B?" → trade-off matrix + decision.
- "How long will X take?" → decomposition + three-point estimate.
- "What could go wrong with X?" → delivery risk register.
- Explicit asks for a design doc, ADR, decision record, estimate, trade-off
analysis, risk register, rollout/backout plan, or an exec/client one-pager.
When NOT to use — defer to the peer (anti-overlap, hard boundary):
- Critiquing an already-built design / drifted architecture →
principal-architect-review.
- Governing the standing, org-level risk register →
risk-register-csf.
- Verifying ship readiness of a built thing →
production-readiness-gate.
- Adversarial / security threat modeling (STRIDE, attack trees) →
threat-model-studio.
- Learning from an incident that already happened →
sre-slo-postmortem.
If unsure, run Phase 0 Triage — it will route or right-size.
C. The Ledger & Workspace Contract
Every plan lives in a workspace directory plans/<slug>/, scaffolded by
scripts/new_plan.py. The single source of truth is the ledger file
.plan-ledger.json in that directory. Scripts read and write it; never edit it by
hand. Compact schema:
{
"slug": "string", "title": "string", "tier": "micro|standard|heavy",
"created": "ISO8601", "current_phase": 0,
"phases": { "0": {"gate": "pending|pass|fail", "notes": ""}, "...": {} },
"artifacts": {"rfc": "path|null", "adr_dir": "path|null", "risk": "path|null",
"estimate": "path|null", "rollout": "path|null",
"summary": "path", "decision_log": "path|null", "tradeoff": "path|null"},
"handoffs": [ {"to": "production-readiness-gate", "reason": "...", "artifact": "..."} ]
}
Ledger rule: a phase is complete only when its enforcer script has run and the
ledger records that phase's gate as "pass". Never announce a phase done or
advance to the next on judgment alone — run the script, show the result, then move.
D. The Gate-Sequenced Lifecycle
Phases are dependency-ordered. Each lists Purpose · Entry gate · Exit gate ·
Enforcer. Deep templates, tables, and worked examples live in references/ —
load them on demand (§F). Loops re-open the affected ledger gate (see loop map).
Phase 0 — Triage & Right-Sizing (the anti-sprawl guard; ALWAYS first)
- Purpose: decide how much process this initiative earns; prevent forcing a
full RFC + ADRs + risk register onto a two-day feature.
- Entry gate: an initiative description exists.
- Exit gate: a
tier (micro / standard / heavy) is written to the ledger,
scored on reversibility, blast radius, effort, stakeholder count, and novelty; the
artifact set for that tier is listed. micro short-circuits the lifecycle to a
lean decision-log + 5-line summary only.
- Enforcer:
new_plan.py --tier <t> scaffolds only that tier's artifacts;
validate_plan.py later requires only the artifacts the tier mandates.
- Load:
references/triage-rightsizing.md.
Phase 1 — Intake & Framing
- Purpose: turn the fuzzy initiative into a crisp problem statement, goals,
explicit non-goals, constraints, success criteria, and stakeholders.
- Entry gate: tier set.
- Exit gate: problem statement + ≥1 goal + ≥1 explicit non-goal + measurable
success criteria, all non-empty. Revisitable when scope shifts.
- Enforcer:
validate_plan.py --phase 1.
- Load:
references/rfc-design-doc.md (framing section).
Phase 2 — Options Generation
- Purpose: map the solution space; generate 2–4 genuinely distinct approaches.
- Entry gate: Phase 1 passed.
- Exit gate: ≥2 distinct options (no single-option theater), each with a
one-paragraph sketch and a rough shape of cost/risk on a distinct approach axis.
- Enforcer:
validate_plan.py --phase 2 (counts options, flags near-duplicates).
- Load:
references/tradeoff-matrices.md (option-framing), references/rfc-design-doc.md.
Phase 3 — Trade-off & Decision
- Purpose: score options against weighted criteria (cost, time, risk,
reversibility, fit); recommend one.
- Entry gate: Phase 2 passed.
- Exit gate: matrix complete for all options × criteria; the recommended option
equals the computed winner OR the deviation is justified in writing; a
sensitivity check has been run.
- Enforcer:
score_matrix.py (deterministic weighted totals + weight-perturbation
sensitivity: does the winner survive reasonable weight shifts?).
- Load:
references/tradeoff-matrices.md.
Phase 4 — ADR Capture
- Purpose: record each load-bearing decision (context / alternatives /
rationale / consequences; status Proposed → Accepted).
- Entry gate: Phase 3 passed.
- Exit gate: every load-bearing decision named in the RFC has a matching ADR (or
decision-log entry) with a valid status; no orphan decisions.
- Loop: a rejected decision loops back to Phase 2–3.
- Enforcer:
validate_plan.py --phase 4 (cross-checks RFC decision list vs
adr/ files + status enum); new_adr.py creates the next-numbered ADR.
- Tier note:
standard may inline decisions in the decision-log; heavy
requires discrete ADR files.
- Load:
references/adr-guide.md.
Phase 5 — Estimation & Decomposition
- Purpose: break into work items; three-point/PERT estimates with confidence,
explicit assumptions, and dependencies.
- Entry gate: decision recorded (Phase 4 passed).
- Exit gate: every work item has optimistic/likely/pessimistic values (never a
single number) and a stated assumption; the rollup produces a range.
- Enforcer:
estimate_rollup.py (PERT expected value + std dev; fails on any
item with zero uncertainty or no assumption).
- Load:
references/estimation.md.
Phase 6 — Risk Register
- Purpose: enumerate delivery/project risks with likelihood × impact,
mitigation, owner, and trigger.
- Entry gate: Phase 5 passed.
- Exit gate: each top-N risk has a mitigation OR an explicit
accepted-and-documented status.
- Loop: a risk that invalidates the chosen option loops back to Phase 3.
- Enforcer:
risk_score.py (computes L×I, sorts, flags top-N lacking
mitigation/accept-note).
- Boundary: delivery risk only. Adversarial security → defer to
threat-model-studio; standing governed register → seed risk-register-csf.
- Load:
references/risk-register.md.
Phase 7 — Rollout & Backout Planning
- Purpose: sequence delivery into reversible increments; each phase has
entry/exit criteria and a concrete rollback.
- Entry gate: Phase 6 passed.
- Exit gate: every rollout phase is reversible OR carries an explicit
irreversibility flag with rationale.
- Enforcer:
validate_plan.py --phase 7.
- Boundary: this plans the rollout;
production-readiness-gate verifies it
at ship time — emit a handoff entry in the ledger.
- Load:
references/rollout-backout.md.
Phase 8 — Stakeholder Synthesis
- Purpose: assemble the one-page summary + full RFC.
- Entry gate: Phase 7 passed.
- Exit gate: the one-pager leads with the bottom line (BLUF), names the bet, the
top-3 risks, what we are NOT doing, and the ask; a non-author can understand the
plan/bet/risks without the full RFC; the summary cross-references the actual
decisions/ADRs.
- Enforcer:
validate_plan.py --phase 8 (required headings present + cross-refs
resolve), then validate_plan.py (all gates) for the final completeness check.
- Load:
references/stakeholder-comms.md.
Loop map
- Phase 1 ↺ on scope shift.
- Phase 4 → Phase 2/3 on a rejected decision.
- Phase 6 → Phase 3 on an option-invalidating risk.
Re-entering a phase re-opens its gate in the ledger (sets it back to pending);
all downstream gates must be re-run.
E. Golden Non-Negotiable Rules
- Triage first, always. Never produce artifacts before Phase 0 sets a tier.
Right-size; do not force all artifacts onto small work.
- No gate is "vibes." A phase is complete only when its enforcer script returns
the ledger gate as
pass. Run the script; show the result.
- At least two distinct options before any recommendation. No single-option
theater.
- Criteria before scores. Define and weight decision criteria before scoring
options; never reverse-engineer criteria to justify a pre-made choice.
- Every load-bearing decision gets a record (ADR or decision-log entry) with
rationale and consequences — so it isn't re-litigated in three months.
- No single-number estimates. Estimates are three-point with stated assumptions
and stated uncertainty.
- Every rollout phase is reversible or explicitly flagged irreversible. No
ship-then-pray.
- Compose, don't reimplement. Hand off to the named peer skills; do not
duplicate their deep-dives (threat modeling, standing risk governance, ship
verification, design critique, postmortems). Record handoffs in the ledger.
- The plan is for a non-author. If a stranger can't follow the bet and the
risks from the one-pager alone, it's not done.
- Artifacts are markdown kept in-repo. No external services, no secrets, no
network access.
F. When to Load Each Reference (routing table)
Load the reference for the active phase or trigger; run its enforcer script; emit
the listed handoff when a boundary is crossed.
| When | Load reference | Run script | Hand off to |
|---|
| Phase 0 — triage / right-size; "is this worth a full plan?" | references/triage-rightsizing.md | new_plan.py --tier | — |
| Phase 1 — framing; "scope this" | references/rfc-design-doc.md | validate_plan.py --phase 1 | — |
| Phase 2 — options; "A or B?" | references/tradeoff-matrices.md, references/rfc-design-doc.md | validate_plan.py --phase 2 | — |
| Phase 3 — decide / recommend | references/tradeoff-matrices.md | score_matrix.py | — |
| Phase 4 — record decisions | references/adr-guide.md | new_adr.py, validate_plan.py --phase 4 | principal-architect-review (critique of existing design) |
| Phase 5 — estimate; "how long?" | references/estimation.md | estimate_rollup.py | — |
| Phase 6 — delivery risk | references/risk-register.md | risk_score.py | threat-model-studio (adversarial security); risk-register-csf (standing register) |
| Phase 7 — rollout / backout | references/rollout-backout.md | validate_plan.py --phase 7 | production-readiness-gate (ship-time verification); sre-slo-postmortem (post-incident) |
| Phase 8 — one-pager + RFC | references/stakeholder-comms.md | validate_plan.py --phase 8 | — |
| Any handoff / boundary question | references/handoffs.md | — | per references/handoffs.md |
| Final gate — "is the plan done?" | — | validate_plan.py (all gates) | — |
references/handoffs.md is the canonical map of every peer boundary, the exact
"do NOT reimplement X here; defer to Y" phrasing, and the ledger handoffs[] entry
format. Load it whenever a request edges into a peer skill's territory.