Plan

Transform feature descriptions into well-structured project plans following conventions

lowyelling updated 4mo ago
Claude CodeGeneric
View source ↗
---
name: workflows: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 scope documents in `factory/artifacts/scope/` that match this feature:

```bash
ls -la factory/artifacts/scope/*.md 2>/dev/null | head -10

Relevance criteria: A scope doc 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 scope doc exists:

  1. Read the scope document
  2. Announce: "Found scope from [date]: [topic]. Using as context for planning."
  3. Extract key decisions, features list, and open questions
  4. Skip the idea refinement questions below - the scope already answered WHAT to build
  5. Use scope decisions as input to the research phase

If multiple scope docs could match: Use AskUserQuestion tool to ask which scope doc 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)

First, I need to understand the project's conventions, existing patterns, and any documented learnings. This is fast and local - it informs whether external research is needed.

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 CLAUDE.md conventions

Optional validation: Briefly summarize findings and ask if anything looks off or missing before proceeding to planning.

2. Issue Planning & Structure

Think like a product manager - what would make this issue clear and actionable? Consider multiple perspectives

Title & Categorization:

  • Draft clear, searchable issue title using conventional format (e.g., feat: Add user authentication, fix: Cart total calculation)
  • Determine issue type: enhancement, bug, refactor
  • Convert title to filename: add today's date prefix, strip prefix colon, kebab-case, add -plan suffix
    • Example: feat: Add User Authentication2026-01-21-feat-add-user-authentication-plan.md
    • Keep it descriptive (3-5 words after prefix) so plans are findable by context

Stakeholder Analysis:

  • Identify who will be affected by this issu

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/lowyelling-create-a-plan-for-a-new-feature-or-bug-fix?ref=badge)
npx agentictools info loops/lowyelling-create-a-plan-for-a-new-feature-or-bug-fix

The second line is the CLI lookup for this page — handy in READMEs and docs.