Plan
Transform feature descriptions into well-structured project plans following conventions
---
name: ce:plan
description: Transform feature descriptions into well-structured project plans following conventions
argument-hint: "[feature description, bug report, or improvement idea]"
---
# Create a plan for a new feature or bug fix
## Introduction
**Note: The current year is 2026.** Use this when dating plans and searching for recent documentation.
Transform feature descriptions, bug reports, or improvement ideas into well-structured markdown files issues that follow project conventions and best practices. This command provides flexible detail levels to match your needs.
## Feature Description
<feature_description> #$ARGUMENTS </feature_description>
**If the feature description above is empty, ask the user:** "What would you like to plan? Please describe the feature, bug fix, or improvement you have in mind."
Do not proceed until you have a clear feature description from the user.
### 0. Idea Refinement
**Check for brainstorm output first:**
Before asking questions, look for recent brainstorm documents in `docs/brainstorms/` that match this feature:
```bash
ls -la docs/brainstorms/*.md 2>/dev/null | head -10
Relevance criteria: A brainstorm is relevant if:
- The topic (from filename or YAML frontmatter) semantically matches the feature description
- Created within the last 14 days
- If multiple candidates match, use the most recent one
If a relevant brainstorm exists:
- Read the brainstorm document thoroughly — every section matters
- Announce: "Found brainstorm from [date]: [topic]. Using as foundation for planning."
- Extract and carry forward ALL of the following into the plan:
- Key decisions and their rationale
- Chosen approach and why alternatives were rejected
- Constraints and requirements discovered during brainstorming
- Open questions (flag these for resolution during planning)
- Success criteria and scope boundaries
- Any specific technical choices or patterns discussed
- Skip the idea refinement questions below — the brainstorm already answered WHAT to build
- Use brainstorm content as the primary input to research and planning phases
- Critical: The brainstorm is the origin document. Throughout the plan, reference specific decisions with
(see brainstorm: docs/brainstorms/<filename>)when carrying forward conclusions. Do not paraphrase decisions in a way that loses their original context — link back to the source. - Do not omit brainstorm content — if the brainstorm discussed it, the plan must address it (even if briefly). Scan each brainstorm section before finalizing the plan to verify nothing was dropped.
If multiple brainstorms could match: Use AskUserQuestion tool to ask which brainstorm to use, or whether to proceed without one.
If no brainstorm found (or not relevant), run idea refinement:
Refine the idea through collaborative dialogue using the AskUserQuestion tool:
- Ask questions one at a time to understand the idea fully
- Prefer multiple choice questions when natural options exist
- Focus on understanding: purpose, constraints and success criteria
- Continue until the idea is clear OR user says "proceed"
Gather signals for research decision. During refinement, note:
- User's familiarity: Do they know the codebase patterns? Are they pointing to examples?
- User's intent: Speed vs thoroughness? Exploration vs execution?
- Topic risk: Security, payments, external APIs warrant more caution
- Uncertainty level: Is the approach clear or open-ended?
Skip option: If the feature description is already detailed, offer: "Your description is clear. Should I proceed with research, or would you like to refine it further?"
Main Tasks
1. Local Research (Always Runs - Parallel)
Run these agents in parallel to gather local context:
- Task repo-research-analyst(feature_description)
- Task learnings-researcher(feature_description)
What to look for:
- Repo research: existing patterns, CLAUDE.md guidance, technology familiarity, pattern consistency
- Learnings: documented solutions in
docs/solutions/that might apply (gotchas, patterns, lessons learned)
These findings inform the next step.
1.5. Research Decision
Based on signals from Step 0 and findings from Step 1, decide on external research.
High-risk topics → always research. Security, payments, external APIs, data privacy. The cost of missing something is too high. This takes precedence over speed signals.
Strong local context → skip external research. Codebase has good patterns, CLAUDE.md has guidance, user knows what they want. External research adds little value.
Uncertainty or unfamiliar territory → research. User is exploring, codebase has no examples, new technology. External perspective is valuable.
Announce the decision and proceed. Brief explanation, then continue. User can redirect if needed.
Examples:
- "Your codebase has solid patterns for this. Proceeding without external research."
- "This involves payment processing, so I'll research current best practices first."
1.5b. External Research (Conditional)
Only run if Step 1.5 indicates external research is valuable.
Run these agents in parallel:
- Task best-practices-researcher(feature_description)
- Task framework-docs-researcher(feature_description)
1.6. Consolidate Research
After all research steps complete, consolidate findings:
- Document relevant file paths from repo research (e.g.,
app/services/example_service.rb:42) - Include relevant institutional learnings from
docs/solutions/(key insights, gotchas to avoid) - Note external documentation URLs and best practices (if external research was done)
- List related issues or PRs discovered
- Capture CLAUD
Maintain Plan?
Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.
[Plan on getagentictools](https://getagentictools.com/loops/sylvanding-create-a-plan-for-a-new-feature-or-bug-fix?ref=badge)