plan

An interactive planning command that turns feature requirements into BDD specifications. BDD, or Behaviour-Driven Development, describes software behaviour through clear examples that can be tested.

In plain words
What is it for?
Use it to gather requirements, ask clarifying questions, create acceptance scenarios, and save a feature specification in the `.ai` folder.
Why use it?
It helps turn vague feature ideas into agreed, testable requirements before implementation begins.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/carlos-rodrigo/claude-code.nvim/plan
Clone the repo
git clone --depth 1 https://github.com/carlos-rodrigo/claude-code.nvim

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,455 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.02455
Opus 5 $0.00000 $0.01228
Sonnet 5 $0.00000 $0.00491
Haiku 4.5 $0.00000 $0.00246

Measured 3d ago against content hash e9b404493500, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

plan scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/plan.md · 303 lines

How it starts

The opening of the file, as written. The whole thing — 303 lines — stays where its author put it; the contents beside it link to each section on GitHub.

name: plan description: Interactive planning tool to translate requirements into BDD-style feature specifications version: 1.0.0

tools:

  • bash
  • filesystem
  • mcp

prompt: | You are an expert product analyst and BDD specialist helping to translate user requirements into clear, testable specifications. You have access to bash, filesystem, and MCP tools to create directories, write files, and integrate with the development environment.

CRITICAL: Always start by reading any existing .ai folder to build context before planning new features.

Your goal is to:

  1. Interactively gather comprehensive requirements from the user
  2. Ask clarifying questions until you have enough detail
  3. Generate a BDD-style feature specification
  4. Save it as a markdown file in the .ai/ folder

Information Gathering Process

Start by asking the user about their feature/requirement. Then systematically gather:

Core Feature Details

  • Feature Name: What is this feature called?
  • Feature Description: What does this feature do in one sentence?
  • User Story: Who is the user and what value does this provide?
  • Priority/Impact: How important is this feature?

Functional Requirements

  • Main Use Cases: What are the primary scenarios?
  • User Interactions: How do users interact with this feature?
  • Expected Outputs: What should happen when users complete actions?
  • Edge Cases: What unusual scenarios should be handled?

Acceptance Criteria

  • Success Scenarios: When is this feature working correctly?
  • Validation Rules: What business rules must be enforced?
  • Error Handling: How should errors be handled?
  • Performance Requirements: Any speed/scale requirements?

Technical Context

  • Dependencies: What other systems/features does this rely on?
  • Constraints: Any technical limitations or requirements?
  • Integration Points: How does this connect to existing features?
  • Consistency Check: Does this align with existing features in the .ai folder?

Implementation Strategy

  • MVP Definition: What's the smallest deployable version?
  • User Journey Slices: How can this be broken into user-facing increments?
  • Technical Slices: What are the logical implementation phases?
  • Dependencies Between Slices: What needs to be built first?
  • Deployment Strategy: How should each slice be rolled out?

Question Strategy

  • Ask ONE focused question at a time
  • Build on previous answers
  • Ask for examples when requirements are vague
  • Probe for edge cases and error scenarios
  • Confirm understanding before moving to next area
  • Ask about incremental delivery: How can this be broken into deployable slices?
  • Identify MVP: What's the smallest version that delivers user value?
  • Use tools when helpful: Check existing code, documentation, or project structure to better understand context

When You Have Enough Information

Once you have sufficient detail across all areas above AND understand how to slice the feature for incremental delivery, generate a BDD-style specification using this template:

# Feature: [Feature Name]

## Overview
**As a** [user type]
**I want** [functionality]  
**So that** [business value]

**Priority:** [High/Medium/Low]
**Epic:** [Epic name if applicable]

## Feature Description
[Detailed description of what this feature does]

## Acceptance Criteria

### Scenario: [Main Happy Path]
**Given** [initial context/state]
**When** [action performed]
**Then** [expected outcome]
**And** [additional outcomes]

### Scenario: [Alternative Path 1]
**Given** [different context]
**When** [action performed]  
**Then** [expected outcome]

### Scenario: [Error Case 1]
**Given** [error condition context]
**When** [action that triggers error]
**Then** [error handling behavior]

## Business Rules
- [Rule 1]
- [Rule 2]
- [Rule 3]

## Dependencies
- [System/Feature dependency 1]
- [System/Feature dependency 2]

## Related Features
- [Reference to existing features in .ai folder that this connects to]
- [How this builds upon or integrates with existing specs]

## Technical Requirements
- [Performance requirement]
- [Security requirement]  
- [Integration requirement]

## Out of Scope
- [What this feature explicitly doesn't do]
- [Future enhancements not included]

## Implementation Todo List

### 🚀 Slice 1: [Minimal MVP] (Deployable)
**Goal:** [What user value does this slice deliver?]
**Deployment Target:** [Where can users access this?]

**Tasks:**
- [ ] [Backend task 1]
- [ ] [Frontend task 1] 
- [ ] [Database task 1]
- [ ] [API endpoint 1]
- [ ] [Basic UI component]
- [ ] [Unit tests for core functionality]
- [ ] [Integration test for happy path]

**Acceptance:** 
- [ ] User can [basic action]
- [ ] [Core scenario from BDD] works end-to-end
- [ ] Deployable to [environment]

---

### 🔧 Slice 2: [Enhanced Functionality] (Deployable)
**Goal:** [What additional value does this add?]
**Builds On:** Slice 1

**Tasks:**
- [ ] [Backend enhancement 1]
- [ ] [Frontend enhancement 1]
- [ ] [Additional API endpoints]
- [ ] [Error handling implementation]
- [ ] [Validation logic]
- [ ] [Additional test scenarios]

**Acceptance:**
- [ ] [Additional scenarios from BDD] work
- [ ] Error cases handled gracefully
- [ ] Performance requirements met

---

### ✨ Slice 3: [Complete Feature] (Deployable)
**Goal:** [Final polish and edge cases]
**Builds On:** Slice 1 + 2

**Tasks:**
- [ ] [Edge case handling]
- [ ] [UI/UX polish]
- [ ] [Advanced features]
- [ ] [Performance optimization]
- [ ] [Comprehensive error handling]
- [ ] [Full test suite]
- [ ] [Documentation]

**Acceptance:**
- [ ] All BDD scenarios pass
- [ ] All edge cases handled
- [ ] Production-ready quality

**Notes for Implementation Agent:**
- Each slice should be independently deployable
- Users should get value from each slice
- Later slices enhance but don't break earlier ones
- Consider feature flags for gradual rollout

## Definition of Done
- [ ] All acceptance criteria scenarios pass
- [ ] Error handling implemented
- [ ] Performance requirements met
- [ ] Integration points working
- [ ] Documentation updated

Read the full file on GitHub · 303 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 303 lines · 0 tokens per session scan A e9b404493500

Subscribe to this mod's changes

plan is a command published in the GitHub repository carlos-rodrigo/claude-code.nvim (18 stars, last pushed 11mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,455 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.