$npx -y skills add bo-cao/breaking-coding-chaos --skill bcc-clean-cutBCC minimal implement from locked PLAN.md (ponytail ladder + verify). Slash: /bcc-clean-cut · chat: bcc:clean-cut · "implement PLAN" after human APPROVE. Not for plan grill (use bcc-plan-spar).
| 1 | # bcc-clean-cut |
| 2 | |
| 3 | **Job:** ship the **shortest correct code** that satisfies the active `PLAN.md`, then verify and **progress-only** 约减 the checklist. |
| 4 | |
| 5 | **Deep source:** `ponytail` SKILL.md (coding ladder only — not review/audit family). |
| 6 | **Does not:** interview the user for domain design, write ADRs, adversarial-review the plan, or **refine PLAN design while coding** — do that in **`bcc-plan-spar`** first. |
| 7 | |
| 8 | --- |
| 9 | |
| 10 | ## Workflow preflight (required — before any code edit) |
| 11 | |
| 12 | **Do not** write product code until this check passes. |
| 13 | If uncertain → **ask the user** (one question + recommended default). Never invent APPROVE. |
| 14 | |
| 15 | ### 1. Snapshot disk + session |
| 16 | |
| 17 | | Check | Read | |
| 18 | |-------|------| |
| 19 | | Global map | `plans.md` / `progress.md` (if present) — which hardpoint is current? | |
| 20 | | Coding brief | `PLAN.md` (or `plan_path` from session) — exists? draft? locked? checklist open items? | |
| 21 | | Domain | `CONTEXT.md` / ADRs if referenced by PLAN | |
| 22 | | **`.bcc/session.json`** | Cross-session APPROVE — see [SESSION.md](../bcc-breaking-coding-chaos/references/SESSION.md) | |
| 23 | | Chat this session | **APPROVE implement** / “开写” / explicit skip-gate | |
| 24 | |
| 25 | **human_APPROVE=yes** if **either**: |
| 26 | |
| 27 | - Chat this session clearly APPROVE implement / skip-gate, **or** |
| 28 | - Session file has `approved_for=clean-cut` **and** `plan_sha256` equals SHA-256 of current PLAN file bytes. |
| 29 | |
| 30 | If session says approved but **hash mismatch** → PLAN changed after approve → `human_APPROVE=no` → ask re-APPROVE or plan-spar (do not code). |
| 31 | |
| 32 | Echo: |
| 33 | |
| 34 | `preflight · PLAN=… · human_APPROVE=yes|no|unclear · session=… · hash=match|mismatch|none · throughline=yes|no · recommend=code|plan-spar|throughline|ask-user` |
| 35 | |
| 36 | ### 2. Is **bcc-clean-cut** appropriate now? |
| 37 | |
| 38 | | Situation | Suitable? | Do this | |
| 39 | |-----------|-----------|---------| |
| 40 | | No `PLAN.md` | **No** | Stop. Send to **`bcc-plan-spar`**. Ask if they meant to plan first. | |
| 41 | | `PLAN.md` is `_Draft — not locked_` | **No** | Stop. Finish **bcc-plan-spar** lock (or ask user to force-lock). | |
| 42 | | Checklist **all complete** / slice already shipped | **Usually no** | Ask: *“PLAN is done. New slice (plan-spar), throughline next, or re-open checklist?”* | |
| 43 | | PLAN topic **≠** user’s request / ≠ throughline current hardpoint | **Ask** | *“PLAN is for X; you asked to implement Y. Switch (plan-spar), or implement X?”* | |
| 44 | | Human **APPROVE implement** this session **or** valid `.bcc/session.json` approve (hash match) | **Yes** | Proceed to ladder | |
| 45 | | User said “implement / clean-cut” but **no** chat APPROVE and **no** valid session approve | **Ask** | *“PLAN is locked but not human-approved for coding. APPROVE implement, amend, or back to plan-spar?”* Default recommend: confirm APPROVE once. | |
| 46 | | User only asked “where are we?” | **No** | **`bcc-throughline`** | |
| 47 | | User still wants alignment / more grill | **No** | **`bcc-plan-spar`** | |
| 48 | | Multi-step endeavor, no throughline, large remaining work | **Warn + ask** | Optional: *“No plans.md cockpit — continue one-off cut, or create throughline first?”* Coding may proceed if PLAN is solid and user wants speed. | |
| 49 | |
| 50 | ### 3. Coding readiness checklist (all should be true, or user override) |
| 51 | |
| 52 | 1. `PLAN.md` exists and is **not** an unlabeled draft. |
| 53 | 2. Goal + checklist + verification sections are present enough to execute. |
| 54 | 3. **Human** has approved implement (chat **or** valid session file) **or** explicit override (“skip gate / just code this PLAN”). |
| 55 | 4. You know **which slice** this PLAN is for (title/goal matches the work / session.active_slice). |
| 56 | |
| 57 | If any item fails and user did not override → **do not code**; ask or route. |
| 58 | |
| 59 | ### 4. After preflight OK |
| 60 | |
| 61 | Only then: optionally set session `status=coding` → read code flow → ladder → verify → 约减 PLAN → throughline writeback → on pass set session `status=done`, `approved_for=none` (consume one-shot approve per [SESSION.md](../bcc-breaking-coding-chaos/references/SESSION.md)). |
| 62 | |
| 63 | --- |
| 64 | |
| 65 | ## Preconditions (short) |
| 66 | |
| 67 | 1. Preflight passed (above). |
| 68 | 2. Trace the real code flow before editing. |
| 69 | 3. PLAN is the contract — no invented scope. |
| 70 | |
| 71 | ## PLAN freeze (execute, don't refine) |
| 72 | |
| 73 | After human APPROVE, `PLAN.md` is a **frozen contract** for design content. |
| 74 | |
| 75 | | Allowed during cut | Forbidden during cut | |
| 76 | |--------------------|----------------------| |
| 77 | | Implement within Goal / Approach / checklist / Verification | Rewrite Goal, Approach, Key decisions, Out of scope, Verification *design* | |
| 78 | | Check off `[ ]` → `[x]` only after implement + verify | Add new checklist items, “improve” wording of the brief, expand scope | |
| 79 | | **约减 progress only:** remove *completed* checklist rows / finished bulk that is already done | M |