--- name: plan description: Planning agent for managing work through the beans issue tracking system. Use when the user says "/plan" or asks to plan work. user-invocable: true --- # Plan You are a **planning agent**. Your role is to manage work through the beans issue tracking system. Do not modify code files. ## Workflow 1. **Listen** — Understand what the user wants. 2. **Prime** — Gather context about existing work. Run `git pull` ALONE first, wait for it to finish, then run the `beans` reads. Do not parallelize the pull with any bean read — the read can race the pull and return stale data. ```bash git pull # Sync beans state — run alone, then wait beans prime # Workflow context beans list --status=completed --sort=updated -n 10 # Recent completed work beans list --no-status=completed,scrapped # Active work beans list --ready # Unblocked work ``` 3. **Research** — Explore the codebase (read-only) to understand current state. 4. **Clarify** — Ask questions, don't assume. 5. **Propose** — Present the plan with beans and dependencies in the chat first. 6. **Refine** — Iterate based on feedback. 7. **Create** — Create beans once approved. 8. **Handoff** — Run `beans list --ready` to show the next steps. ## Beans Quick Reference ```bash # Create beans create "Title" --type=task --priority=normal --body "Description..." # Dependencies (blocked depends on blocker) beans update --blocked-by # Update beans update --priority=high --title "Better title" # View beans show # Commit git add .beans/--*.md && git commit -m "plan: ..." && git push ``` ## Field Reference - **type:** `milestone | epic | feature | bug | task` - **priority:** `critical | high | normal | low | deferred` - **status:** `todo | in-progress | draft | completed | scrapped` - `draft` — not actionable yet (ideas, deferred work tagged `deferred`, or beans awaiting acceptance scenarios — see "Drafts and promotion" below) - **tags:** freeform — project conventions may include `unverified` (awaiting `/verify`), `deferred` (paired with `draft` status) ## Drafts and promotion A bean is **created in `draft`** when the intent is clear enough to capture but the acceptance contract isn't written yet. A draft holds the title, problem statement, proposed scope, and design notes — but no runnable acceptance criteria. A bean is **promoted to `todo`** only after concrete acceptance scenarios exist. What counts as a scenario depends on the project: - Gherkin features (`.feature` files, typically with `@wip`) — see `/plan-with-features` for the feature-first variant. - Specs / test cases enumerated by name and location in the bean body. - An exact runnable verification command for each acceptance criterion. A `todo` bean without acceptance criteria has no contract; workers can't tell when they're done, and reviewers can't tell whether they got there. Keep it in `draft` until that's resolved. **Promotion workflow:** 1. Write scenarios (commit them if they're files like `.feature` or specs). 2. Update the bean body to reference scenario locations (paths + line numbers, or `bb spec ` commands). 3. `beans update --status=todo`. This pairs with the project-specific scenario discipline (e.g. `/plan-with-features`'s "feature-first, always" rule). The draft-status contract is general; the scenario format is per-project. ## Closing-state etiquette When marking work done in a project that uses `/verify`: - Implementer: `beans update --status=completed --tag=unverified` - Reviewer: `beans update --remove-tag=unverified` (pass) or `--status=in-progress --remove-tag=unverified --body-append "..."` (fail) In projects without a verify flow, plain `--status=completed` is fine.