---
name: bs-cursor
description: >
  Use when user invokes /bs-cursor. Brainstorm → design → plan → cursor-orchestrator.
  Same as /brainstorm but implementation runs via cursor-agent instead of Claude subagents.
---

# Brainstorm + Cursor Orchestrator

## IRON LAW — active every turn, survives compaction

**Claude not write implementation code. Ever. Not single line.**

Applies after compaction, long gaps, any context event. Notice yourself about to write code, edit file, run build — stop. Dispatch cursor-agent. No "unblock this once" on substantive work. Cursor-agent does all implementation. Claude orchestrates.

### Sole exception — trivial-edit inline (LOC rule)

**When code LOC to change ≤ LOC of the cursor prompt it would take to dispatch the change → Claude edits inline.** Dispatching cursor for a change smaller than its own prompt is pure overhead (a 48-line prompt to flip 1 comment line = waste). Bounds:
- Applies ONLY to mechanical, self-contained edits: a comment fix, a single-line rename, a typo, a one-token tweak — where writing a correct cursor prompt costs more lines than the edit.
- Does NOT apply to logic, multi-line, multi-file, or any change needing judgment — those go to cursor regardless of size.
- Inline edits still pass the code gate (Tier 1 + Tier 2) like any other change.

Skill compacted, lost track: re-read `cursor-orchestrator` before continuing. Rule not expire.

---

**Run `brainstorm` skill in full — every step, every rule, unchanged.**

One override: at terminal state, after plan completes, **branch on plan shape FIRST, then model**:
- **Multi-wave/multi-phase** (>1 wave/phase OR any wave has parallel tasks) → invoke `Skill("run-plan")` with the slug directly. The Workflow is model-independent and runs in background — no handoff needed. Applies on both opus and sonnet.
- **Single-wave + opus** → plan-only handoff. Finalize task JSONL, invoke `handoff`, STOP.
- **Single-wave + sonnet / non-opus** → auto-invoke `cursor-orchestrator`.

## The only difference from /brainstorm

| Step | brainstorm | bs-cursor (multi-wave) | bs-cursor (SW+opus) | bs-cursor (SW+sonnet) |
|------|-----------|------------------------|---------------------|----------------------|
| All steps up to plan | identical | identical | identical | identical |
| After plan completes | stop | `run-plan` Workflow | handoff + STOP | `cursor-orchestrator` inline |

## Multi-wave → run-plan (any model)

When `plan` finishes and the plan is multi-wave/multi-phase:
1. Invoke `Skill("run-plan")` with the slug directly. The Workflow controller is model-independent — no handoff needed regardless of active model.
2. Tell the user: "Multi-wave plan detected. Launching run-plan Workflow in background — watch with `/workflows`."

## Single-wave + opus — handoff branch

When `plan` finishes, plan is single-wave, and active model = opus:
1. **Invoke `handoff`** with focus "execute this plan with cursor-orchestrator on a sonnet session". `handoff` finalizes/creates `docs/plans/YYYY-MM-DD-<PLAN_SLUG>.jsonl` with full task list (every task `PENDING`) and **sets `meta.exec_mode = "cursor-orchestrator"`** so `run-plan` dispatches correctly. (If brainstorm already wrote JSONL, `handoff` reconciles it; never fork a second file.)
2. **STOP and tell user verbatim:**
   > "Planning complete on opus. Spec + plan + task JSONL written (slug: `<PLAN_SLUG>`). To execute: open a NEW session, run `/model sonnet`, then `/run-plan <PLAN_SLUG>`. Do not execute on opus."
3. **Do NOT auto-invoke `cursor-orchestrator`.**

## Single-wave + sonnet — start orchestration

When `plan` finishes, plan is single-wave, and active model = sonnet (or non-opus):
1. Tell user: "Plan ready. Executing with cursor-orchestrator."
2. Load and follow `cursor-orchestrator` skill from that point forward.
3. No wait for user confirmation — proceed immediately (same auto-proceed rule as brainstorm).

Review/gating owned by `cursor-orchestrator`: per-wave **two-tier code gate** (Tier 1: cursor-agent reviewer → fixer loop until cursor-agent clean; Tier 2: Opus code-review subagent → cursor-agent fixer + Opus re-scan loop until Opus clean) + **process gate** (`advisor()`) between waves and before completion. No gating logic lives here.