feat(create-plan): add iterative cross-model plan review and Cursor variant
Add a configurable reviewer phase to all create-plan variants (claude-code, codex, opencode) that sends the plan to a second CLI/model for iterative feedback (max 5 rounds). Supported reviewer CLIs: codex, claude, cursor. Add new Cursor Agent CLI variant with full skill, templates, and workspace-discovery-based prerequisites (.cursor/rules/). Update README and docs/CREATE-PLAN.md with Cursor install/verify, reviewer CLI requirements, and supported reviewer CLIs table. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
## Purpose
|
||||
|
||||
Create structured implementation plans with milestone and story tracking.
|
||||
Create structured implementation plans with milestone and story tracking, and optionally review them iteratively with a second model/provider before finalizing.
|
||||
|
||||
## Requirements
|
||||
|
||||
@@ -12,11 +12,26 @@ Create structured implementation plans with milestone and story tracking.
|
||||
- `superpowers:writing-plans`
|
||||
- For Codex, native skill discovery must be configured:
|
||||
- `~/.agents/skills/superpowers -> ~/.codex/superpowers/skills`
|
||||
- For Cursor, skills must be installed under `.cursor/rules/` (repo-local) or `~/.cursor/rules/` (global)
|
||||
|
||||
If dependencies are missing, stop and return:
|
||||
|
||||
"Missing dependency: native Superpowers skills are required (`superpowers:brainstorming`, `superpowers:writing-plans`). Install from https://github.com/obra/superpowers, then retry."
|
||||
|
||||
### Reviewer CLI Requirements (Optional)
|
||||
|
||||
To use the iterative plan review feature, one of these CLIs must be installed:
|
||||
|
||||
| Reviewer CLI | Install | Verify |
|
||||
|---|---|---|
|
||||
| `codex` | `npm install -g @openai/codex` | `codex --version` |
|
||||
| `claude` | `npm install -g @anthropic-ai/claude-code` | `claude --version` |
|
||||
| `cursor` | `curl https://cursor.com/install -fsS \| bash` | `cursor-agent --version` (binary: `cursor-agent`; alias `cursor agent` also works) |
|
||||
|
||||
The reviewer CLI is independent of which agent is running the planning — e.g., Claude Code can send plans to Codex for review, and vice versa.
|
||||
|
||||
**Additional dependency for `cursor` reviewer:** `jq` is required to parse Cursor's JSON output. Install via `brew install jq` (macOS) or your package manager. Verify: `jq --version`.
|
||||
|
||||
## Install
|
||||
|
||||
### Codex
|
||||
@@ -40,12 +55,29 @@ mkdir -p ~/.config/opencode/skills/create-plan
|
||||
cp -R skills/create-plan/opencode/* ~/.config/opencode/skills/create-plan/
|
||||
```
|
||||
|
||||
### Cursor
|
||||
|
||||
Copy into the repo-local `.cursor/rules/` directory (where the Cursor Agent CLI discovers skills):
|
||||
|
||||
```bash
|
||||
mkdir -p .cursor/rules/create-plan
|
||||
cp -R skills/create-plan/cursor/* .cursor/rules/create-plan/
|
||||
```
|
||||
|
||||
Or install globally (loaded via `~/.cursor/rules/`):
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.cursor/rules/create-plan
|
||||
cp -R skills/create-plan/cursor/* ~/.cursor/rules/create-plan/
|
||||
```
|
||||
|
||||
## Verify Installation
|
||||
|
||||
```bash
|
||||
test -f ~/.codex/skills/create-plan/SKILL.md || true
|
||||
test -f ~/.claude/skills/create-plan/SKILL.md || true
|
||||
test -f ~/.config/opencode/skills/create-plan/SKILL.md || true
|
||||
test -f .cursor/rules/create-plan/SKILL.md || test -f ~/.cursor/rules/create-plan/SKILL.md || true
|
||||
```
|
||||
|
||||
Verify Superpowers dependencies exist in your agent skills root:
|
||||
@@ -56,12 +88,16 @@ Verify Superpowers dependencies exist in your agent skills root:
|
||||
- Claude Code: `~/.claude/skills/superpowers/writing-plans/SKILL.md`
|
||||
- OpenCode: `~/.config/opencode/skills/superpowers/brainstorming/SKILL.md`
|
||||
- OpenCode: `~/.config/opencode/skills/superpowers/writing-plans/SKILL.md`
|
||||
- Cursor: `.cursor/rules/superpowers/brainstorming/SKILL.md` or `~/.cursor/rules/superpowers/brainstorming/SKILL.md`
|
||||
- Cursor: `.cursor/rules/superpowers/writing-plans/SKILL.md` or `~/.cursor/rules/superpowers/writing-plans/SKILL.md`
|
||||
|
||||
## Key Behavior
|
||||
|
||||
- Creates plans under `ai_plan/YYYY-MM-DD-<short-title>/`.
|
||||
- Ensures `/ai_plan/` is in `.gitignore`.
|
||||
- Commits `.gitignore` update locally when added.
|
||||
- Asks which reviewer CLI and model to use (or accepts `skip` for no review).
|
||||
- Iteratively reviews the plan with the chosen reviewer (max 5 rounds) before generating files.
|
||||
- Produces:
|
||||
- `original-plan.md`
|
||||
- `final-transcript.md`
|
||||
@@ -69,6 +105,25 @@ Verify Superpowers dependencies exist in your agent skills root:
|
||||
- `story-tracker.md` — includes Tracking Guardrails section
|
||||
- `continuation-runbook.md` — includes Skill Workflow Guardrails section
|
||||
|
||||
## Iterative Plan Review
|
||||
|
||||
After the plan is created (design + milestones + stories), the skill sends it to a second model for review:
|
||||
|
||||
1. **Configure** — user picks a reviewer CLI (`codex`, `claude`, `cursor`) and model, or skips
|
||||
2. **Submit** — plan is written to a temp file and sent to the reviewer in read-only/ask mode
|
||||
3. **Feedback** — reviewer evaluates correctness, risks, missing steps, alternatives, security
|
||||
4. **Revise** — the planning agent addresses each issue and re-submits
|
||||
5. **Repeat** — up to 5 rounds until the reviewer returns `VERDICT: APPROVED`
|
||||
6. **Finalize** — approved plan is used to generate the plan file package
|
||||
|
||||
### Supported Reviewer CLIs
|
||||
|
||||
| CLI | Command | Session Resume | Read-Only Mode |
|
||||
|---|---|---|---|
|
||||
| `codex` | `codex exec -m <model> -s read-only` | Yes (`codex exec resume <id>`) | `-s read-only` |
|
||||
| `claude` | `claude -p --model <model> --allowedTools Read` | No (fresh call each round) | `--allowedTools Read` |
|
||||
| `cursor` | `cursor-agent -p --mode=ask --model <model> --trust --output-format json` | Yes (`--resume <id>`) | `--mode=ask` |
|
||||
|
||||
## Template Guardrails
|
||||
|
||||
All plan templates now include guardrail sections that enforce:
|
||||
@@ -120,6 +175,13 @@ All plan templates now include guardrail sections that enforce:
|
||||
- `superpowers/brainstorming`
|
||||
- `superpowers/writing-plans`
|
||||
|
||||
### Cursor
|
||||
|
||||
- Must use workspace discovery from `.cursor/rules/` (repo-local or `~/.cursor/rules/` global).
|
||||
- Must announce skill usage explicitly before invocation.
|
||||
- Must use `--mode=ask` (read-only) and `--trust` when running reviewer non-interactively.
|
||||
- Must not use `--force` or `--mode=agent` for review (reviewer should never write files).
|
||||
|
||||
## Execution Workflow Rules
|
||||
|
||||
- Read runbook first.
|
||||
|
||||
Reference in New Issue
Block a user