Gabe Plan — KDBP-aware planner
Usage: /gabe-plan [goal] [--full-catalog] [--html-artifact|--no-html-artifact]
Gabe execution contract (E1–E7)
This skill runs under the suite execution contract — E1 EVIDENCE · E2 RUN-BEFORE-✅ · E3 NO SILENT DOWNGRADE · E4 REUSE FIRST · E5 STATE SYNC · E6 MISSING ANCHOR = STOP · E7 REPORT WHERE — floors, not ceilings; a skill's own gate may be stricter, never looser. Full text: ../gabe-docs/references/execution-contract.md (if that file is missing, E6 applies — STOP).
What this does
KDBP-aware planner. Same planning logic as /plan, but persists to .kdbp/PLAN.md with lifecycle management plus a per-phase tier decision (MVP / Enterprise / Scale) rendered as a trade-off matrix. Every PLAN.md write also writes the .kdbp/PLAN.json machine mirror (phases, cells, tier, per-phase proof: field) in the same turn — read by session hooks and deterministic tooling. For complex plans it also creates a self-contained HTML review artifact as the human-facing entrypoint, while .kdbp/PLAN.md stays canonical.
Procedure
- Treat any text after the invocation as
$ARGUMENTS.
- Read
references/plan-spec.md (in this skill directory) IN FULL before executing — it is the binding spec: subcommand dispatch, tier-decision flow, PLAN.md write format, DECISIONS/LEDGER writes, and the shared auto-tick helper. If it is missing, E6 applies — STOP.
- Summary of the spec's main flow:
- Step 0 — subcommand dispatch on first token of
$ARGUMENTS: check → Step CHK (structural compliance + retrofit); update → Step UPD (modify active plan in place); complete/defer/cancel/replace → Step 1 branches; anything else is treated as a goal.
- Step 0 (validate KDBP) — require
.kdbp/, ensure archive/ and PLAN.md exist.
- Step 0.5 (preset dispatch) — parses
--html-artifact/--no-html-artifact/--html-path; --preset=mockup-project emits the canonical 13-phase mockup template (Step 3.PRESET) instead of free-form planning, then still runs the per-phase tier decision.
- Step 1 — if an active plan exists, offer complete/defer/cancel/continue/replace;
continue stops here.
- Step 2 — gather context from
.kdbp/BEHAVIOR.md (maturity, domain, tech); ask for the goal if none given.
- Step 3 — draft the phase list; user confirms.
- Step 3.5 — tier decision per phase (MVP/Enterprise/Scale): assemble the trade-off matrix from
templates/gabe/tier-sections/* (Core always renders unfiltered; --full-catalog skips the Layer-2 LLM dimension filter), render the decision prompt, user picks a tier, log to DECISIONS.md (including per-dim tier overrides and suppressed dimensions), store tier + overrides in PLAN.md.
- Step 3.75 — decide whether to create the HTML review artifact (
--html-artifact forces, --no-html-artifact disables, otherwise complexity heuristics decide).
- Step 4 — write
.kdbp/PLAN.md (Goal, Context, Phases table, Phase Details, Current Phase, Dependencies, Risks, Notes, Review Artifacts, Runtime Evidence Checkpoints); Step 4b — write the .kdbp/PLAN.json machine mirror in the same turn.
- Step 5 — append one PLAN row to the LEDGER.md thin session index.
- Step 6 — archive mechanics for complete/defer/cancel/replace.
- Step 7 — show the result.
- Step CHK (
/gabe-plan check) — zero-LLM structural compliance check of the active plan against the current spec shape, with a retrofit offer (LLM only fires if retrofit needs content generation).
- Shared auto-tick helper — used by
/gabe-execute, /gabe-review, /gabe-commit, /gabe-push to tick the Phases table's Exec/Review/Commit/Push column; idempotent, never silent on mismatch, always prints an enumerated skip code on precondition failure.
Output contract (summary)
Write .kdbp/PLAN.md with the full section set (Goal/Context/Phases/Phase Details/Current Phase/Dependencies/Risks/Notes/Review Artifacts/Runtime Evidence Checkpoints), the .kdbp/PLAN.json machine mirror, and the corresponding LEDGER.md thin-index row in the same turn (E5). Tier decisions, per-dim overrides, and suppressed dimensions get a DECISIONS.md entry with a stated reason. Emit the output-only **Gabe-Lens block** — never written to PLAN.md/REVIEW.md/LEDGER.md/PENDING.md/commits/docs unless another command already owns that write. When an HTML review artifact is created or refreshed, report its path. The full output contract in the spec is binding.
Emit the shared beat brief (**Gabe-Lens brief** — ENTITY / FEATURE / DID, stated once in ../gabe-docs/references/execution-contract.md §"The beat brief") just before the E8 tail; output-only, never persisted. Plan is the beat that DECLARES each phase's entities, so its ENTITY line (the just-declared slugs) carries the most of any beat's.
Closing — the beat tail (E8)
End every run with the three-part beat tail, specified ONCE in
../gabe-docs/references/execution-contract.md §"The beat tail (E8)": NOW:/NEXT: rendered
from node ${ECC_ROOT:-$HOME/.claude}/skills/gabe-next/scripts/next.mjs --json (or the honest
NEXT: blocked — <reason> override when this beat knows the router's answer is stale) · the
conditional CENTER: pointer · the PULSE line last, verbatim, silent when silent.
1---2name: gabe-plan3description: KDBP planning — lifecycle management + per-phase tier decision (MVP/enterprise/scale), optional HTML review artifacts.4---56# Gabe Plan — KDBP-aware planner78**Usage:** `/gabe-plan [goal] [--full-catalog] [--html-artifact|--no-html-artifact]`910## Gabe execution contract (E1–E7)1112This skill runs under the suite execution contract — E1 EVIDENCE · E2 RUN-BEFORE-✅ · E3 NO SILENT DOWNGRADE · E4 REUSE FIRST · E5 STATE SYNC · E6 MISSING ANCHOR = STOP · E7 REPORT WHERE — floors, not ceilings; a skill's own gate may be stricter, never looser. Full text: `../gabe-docs/references/execution-contract.md` (if that file is missing, E6 applies — STOP).1314## What this does1516KDBP-aware planner. Same planning logic as `/plan`, but persists to `.kdbp/PLAN.md` with lifecycle management plus a per-phase tier decision (MVP / Enterprise / Scale) rendered as a trade-off matrix. Every PLAN.md write also writes the `.kdbp/PLAN.json` machine mirror (phases, cells, tier, per-phase `proof:` field) in the same turn — read by session hooks and deterministic tooling. For complex plans it also creates a self-contained HTML review artifact as the human-facing entrypoint, while `.kdbp/PLAN.md` stays canonical.1718## Procedure19201. Treat any text after the invocation as `$ARGUMENTS`.212. Read `references/plan-spec.md` (in this skill directory) IN FULL before executing — it is the binding spec: subcommand dispatch, tier-decision flow, PLAN.md write format, DECISIONS/LEDGER writes, and the shared auto-tick helper. If it is missing, E6 applies — STOP.223. Summary of the spec's main flow:23 - **Step 0** — subcommand dispatch on first token of `$ARGUMENTS`: `check` → Step CHK (structural compliance + retrofit); `update` → Step UPD (modify active plan in place); `complete`/`defer`/`cancel`/`replace` → Step 1 branches; anything else is treated as a goal.24 - **Step 0 (validate KDBP)** — require `.kdbp/`, ensure `archive/` and `PLAN.md` exist.25 - **Step 0.5 (preset dispatch)** — parses `--html-artifact`/`--no-html-artifact`/`--html-path`; `--preset=mockup-project` emits the canonical 13-phase mockup template (Step 3.PRESET) instead of free-form planning, then still runs the per-phase tier decision.26 - **Step 1** — if an active plan exists, offer complete/defer/cancel/continue/replace; `continue` stops here.27 - **Step 2** — gather context from `.kdbp/BEHAVIOR.md` (maturity, domain, tech); ask for the goal if none given.28 - **Step 3** — draft the phase list; user confirms.29 - **Step 3.5** — tier decision per phase (MVP/Enterprise/Scale): assemble the trade-off matrix from `templates/gabe/tier-sections/*` (Core always renders unfiltered; `--full-catalog` skips the Layer-2 LLM dimension filter), render the decision prompt, user picks a tier, log to DECISIONS.md (including per-dim tier overrides and suppressed dimensions), store tier + overrides in PLAN.md.30 - **Step 3.75** — decide whether to create the HTML review artifact (`--html-artifact` forces, `--no-html-artifact` disables, otherwise complexity heuristics decide).31 - **Step 4** — write `.kdbp/PLAN.md` (Goal, Context, Phases table, Phase Details, Current Phase, Dependencies, Risks, Notes, Review Artifacts, Runtime Evidence Checkpoints); **Step 4b** — write the `.kdbp/PLAN.json` machine mirror in the same turn.32 - **Step 5** — append one PLAN row to the LEDGER.md thin session index.33 - **Step 6** — archive mechanics for complete/defer/cancel/replace.34 - **Step 7** — show the result.35 - **Step CHK** (`/gabe-plan check`) — zero-LLM structural compliance check of the active plan against the current spec shape, with a retrofit offer (LLM only fires if retrofit needs content generation).36 - **Shared auto-tick helper** — used by `/gabe-execute`, `/gabe-review`, `/gabe-commit`, `/gabe-push` to tick the Phases table's Exec/Review/Commit/Push column; idempotent, never silent on mismatch, always prints an enumerated skip code on precondition failure.3738## Output contract (summary)3940Write `.kdbp/PLAN.md` with the full section set (Goal/Context/Phases/Phase Details/Current Phase/Dependencies/Risks/Notes/Review Artifacts/Runtime Evidence Checkpoints), the `.kdbp/PLAN.json` machine mirror, and the corresponding LEDGER.md thin-index row in the same turn (E5). Tier decisions, per-dim overrides, and suppressed dimensions get a DECISIONS.md entry with a stated reason. Emit the output-only `**Gabe-Lens block**` — never written to PLAN.md/REVIEW.md/LEDGER.md/PENDING.md/commits/docs unless another command already owns that write. When an HTML review artifact is created or refreshed, report its path. The full output contract in the spec is binding.4142Emit the shared beat brief (`**Gabe-Lens brief**` — ENTITY / FEATURE / DID, stated once in `../gabe-docs/references/execution-contract.md` §"The beat brief") just before the E8 tail; output-only, never persisted. Plan is the beat that DECLARES each phase's entities, so its ENTITY line (the just-declared slugs) carries the most of any beat's.4344## Closing — the beat tail (E8)4546End every run with the three-part beat tail, specified ONCE in47`../gabe-docs/references/execution-contract.md` §"The beat tail (E8)": `NOW:`/`NEXT:` rendered48from `node ${ECC_ROOT:-$HOME/.claude}/skills/gabe-next/scripts/next.mjs --json` (or the honest49`NEXT: blocked — <reason>` override when this beat knows the router's answer is stale) · the50conditional `CENTER:` pointer · the PULSE line last, verbatim, silent when silent.