xiaohongshu
xiaohongshu
bmad-planner
Interactive callable tool that creates BMAD planning documents (requirements, architecture, epics) in main repository on contrib branch. Three-persona Q&A system generates comprehensive planning before feature development. Use when: On contrib branch, planning phase, need requirements/architectu...
Full skill instructions
Business Model, Architecture, and Design documentation created in main repository before feature development begins.
Now available as an interactive callable Python script - saves ~2,000-2,700 tokens per feature compared to manual reproduction.
contrib/<gh-user>BMAD is now an interactive callable tool that runs as a Python script in the main repository.
Command:
python .claude/skills/bmad-planner/scripts/create_planning.py \
<slug> <gh_user>
Arguments:
slug: Feature slug (e.g., my-feature)gh_user: GitHub username--no-commit: Optional flag to skip git commit (for testing)Example:
# In main repo on contrib branch
python .claude/skills/bmad-planner/scripts/create_planning.py \
my-feature stharrold
Session output:
Working in main repository...
Branch: contrib/stharrold
======================================================================
BMAD Interactive Planning Tool
======================================================================
Creating planning documents for: my-feature
GitHub user: stharrold
Output directory: planning/my-feature
======================================================================
🧠 BMAD Analyst Persona - Requirements Gathering
======================================================================
I'll help create the requirements document through interactive Q&A.
----------------------------------------------------------------------
What problem does this feature solve?
> Add German vocabulary search by part of speech
Who are the primary users of this feature?
> German language learners
[... continues with 5-10 questions ...]
✓ Requirements gathering complete!
======================================================================
🏗️ BMAD Architect Persona - Technical Architecture Design
======================================================================
Based on the requirements, I'll design the technical architecture.
----------------------------------------------------------------------
Technology Stack:
Web framework (if applicable)?
1) FastAPI
2) Flask
3) Django
4) None
[default: None]
> 4
[... continues with 5-8 questions ...]
✓ Architecture design complete!
======================================================================
📋 BMAD PM Persona - Epic Breakdown
======================================================================
Analyzing requirements and architecture to create epic breakdown...
----------------------------------------------------------------------
✓ Identified 3 epics:
- E-001: Data Layer Foundation (Priority: P0, Medium complexity)
- E-002: Core Business Logic (Priority: P0, High complexity)
- E-003: Testing & Quality Assurance (Priority: P1, Medium complexity)
✓ Epic breakdown complete!
======================================================================
Generating Planning Documents
======================================================================
✓ Created planning/my-feature/CLAUDE.md
✓ Created planning/my-feature/README.md
✓ Created planning/my-feature/ARCHIVED/CLAUDE.md
✓ Created planning/my-feature/ARCHIVED/README.md
✓ Created planning/my-feature/requirements.md
✓ Created planning/my-feature/architecture.md
✓ Created planning/my-feature/epics.md
Committing planning documents...
✓ Committed planning documents for my-feature
======================================================================
✓ BMAD Planning Documents Created Successfully!
======================================================================
Files created in planning/my-feature:
- requirements.md (Business requirements and acceptance criteria)
- architecture.md (Technical architecture and design)
- epics.md (Epic breakdown and planning)
- CLAUDE.md (Context for Claude Code)
- README.md (Human-readable overview)
- ARCHIVED/ (Directory for deprecated planning docs)
Next steps:
1. Review planning documents in planning/my-feature
2. Create feature worktree
3. SpecKit will auto-detect and use these planning documents
4. Token savings: ~1,700-2,700 tokens by reusing planning context
What happens:
Token Efficiency:
| Approach | Token Usage | Savings |
|---|---|---|
| Before (manual): Claude Code reproduces BMAD each time | ~2,500 tokens | - |
| After (callable tool): Claude Code calls script | ~200 tokens | ~2,300 tokens (92%) |
Location: .claude/skills/bmad-planner/scripts/create_planning.py
Key functions:
detect_context() - Verify main repo, contrib branchinteractive_qa_analyst() - 🧠 Requirements Q&Ainteractive_qa_architect() - 🏗️ Architecture Q&Agenerate_epic_breakdown() - 📋 Auto-generate epicsprocess_*_template() - Replace placeholders, inject Q&A responsescreate_directory_structure() - CLAUDE.md, README.md, ARCHIVED/commit_planning_docs() - Git commitTemplates are located in templates/:
requirements.md.template - Business requirements and acceptance criteria (170 lines)architecture.md.template - System architecture and design decisions (418 lines)epics.md.template - Epic breakdown with priorities and dependencies (245 lines)BMAD uses a three-persona method to gather comprehensive planning information through interactive Q&A sessions with the user.
Role: Business Analyst creating Product Requirements Document
Process:
Interactive Q&A Example:
I'll help create the requirements document using the BMAD Analyst persona.
What problem does this feature solve?
> [User describes the problem]
Who are the primary users of this feature?
> [User identifies user types]
How will we measure success for this feature?
> [User defines success metrics]
What are the must-have capabilities? (functional requirements)
> [User lists key capabilities]
Any performance, security, or scalability requirements? (non-functional)
> [User specifies NFRs]
Generates: planning/<feature>/requirements.md using comprehensive template
Role: Technical Architect designing system architecture
Process:
Interactive Q&A Example:
Based on the requirements, I'll design the technical architecture.
Technology preferences?
- Web framework: FastAPI / Flask / Django?
> [User chooses framework]
Database requirements?
- Development: SQLite
- Production: PostgreSQL / MySQL?
> [User chooses database]
Performance targets?
- Response time: < 200ms?
- Concurrent users: How many?
> [User specifies targets]
Container strategy?
- Using Podman (default for this project)
- Multi-container setup needed?
> [User confirms approach]
Generates: planning/<feature>/architecture.md using comprehensive template
Role: Project Manager breaking down work into epics
Process:
Analysis:
Analyzing requirements and architecture to create epic breakdown...
Identified 3 major epics:
1. E-001: Data Layer (Foundation) - P0, High complexity
2. E-002: API Layer (Core functionality) - P0, Medium complexity
3. E-003: Testing & Quality - P1, Medium complexity
Dependencies detected:
E-001 → E-002 (API needs data layer)
E-002 → E-003 (tests need API)
Creating epic breakdown document...
Generates: planning/<feature>/epics.md with epic definitions, priorities, timeline
When workflow-orchestrator loads bmad-planner during Phase 1, it calls the create_planning.py script.
Workflow Orchestrator Code:
# In workflow orchestrator - Phase 1.1
if current_phase == 1 and current_step == '1.1':
import subprocess
result = subprocess.run([
'python',
'.claude/skills/bmad-planner/scripts/create_planning.py',
slug, # my-feature
gh_user, # stharrold
], check=True)
# Script handles:
# - 🧠 Analyst Q&A with user
# - 🏗️ Architect Q&A with user
# - 📋 PM epic breakdown (automatic)
# - requirements.md, architecture.md, epics.md generation
# - Directory structure creation
# - Git commit
print(f"✓ BMAD planning created in planning/{slug}/")
print(" Next: Create feature worktree (Phase 2)")
User Experience:
Phase 1: BMAD Planning Session
Workflow calls:
python .claude/skills/bmad-planner/scripts/create_planning.py my-feature stharrold
Script conducts interactive session:
🧠 BMAD Analyst: Requirements gathering [5-10 questions]
🏗️ BMAD Architect: Architecture design [5-8 questions]
📋 BMAD PM: Epic breakdown [automatic analysis]
✓ Generated: planning/my-feature/requirements.md
✓ Generated: planning/my-feature/architecture.md
✓ Generated: planning/my-feature/epics.md
✓ Committed to contrib branch
✓ BMAD planning complete!
Next: Create feature worktree (Phase 2 will use these docs)
Token savings: ~2,300 tokens vs manual approach
The workflow-orchestrator calls the create_planning.py script during Phase 1:
# In workflow orchestrator
if current_phase == 1 and current_step == '1.1':
import subprocess
result = subprocess.run([
'python',
'.claude/skills/bmad-planner/scripts/create_planning.py',
slug,
gh_user,
], check=True)
print(f"✓ BMAD planning created: planning/{slug}/")
BMAD generates three planning documents that become input context for SpecKit:
planning/<feature-name>/
├── requirements.md # Business requirements (170 lines from template)
│ ├─ Problem statement, stakeholders
│ ├─ Functional requirements (FR-001, FR-002...)
│ ├─ Non-functional requirements (performance, security...)
│ ├─ User stories with scenarios
│ └─ Risks, assumptions, success criteria
│
├── architecture.md # Technical architecture (418 lines from template)
│ ├─ System overview, components
│ ├─ Technology stack with justifications
│ ├─ Data models, API endpoints
│ ├─ Container architecture (Containerfile, podman-compose.yml)
│ ├─ Security, error handling, testing strategies
│ └─ Deployment, observability, disaster recovery
│
├── epics.md # Epic breakdown (245 lines from template)
│ ├─ Epic definitions (scope, complexity, priority)
│ ├─ Dependencies and critical path
│ ├─ Implementation timeline
│ └─ Resource requirements and risks
│
├── CLAUDE.md # Context for this planning directory
├── README.md # Human-readable overview
└── ARCHIVED/ # Deprecated planning documents
These files become input context for SpecKit in Phase 2.
BMAD documents are used as context when creating SpecKit specifications:
Phase 1 (Main Repo, contrib branch):
BMAD Interactive Session
↓
planning/<feature>/
├── requirements.md
├── architecture.md
└── epics.md
Create Worktree:
# Worktree creation preserves link to main repo
git worktree add ../repo_feature_<slug> feature/<timestamp>_<slug>
Phase 2 (Worktree):
SpecKit reads from main repo:
../planning/<feature>/requirements.md → Business context
../planning/<feature>/architecture.md → Technical design
../planning/<feature>/epics.md → Epic priorities
SpecKit generates (informed by BMAD):
specs/<feature>/spec.md ← Detailed specification
specs/<feature>/plan.md ← Implementation tasks
Consistency:
Completeness:
Traceability:
Less Rework:
The workflow-orchestrator calls this skill during Phase 1:
# In workflow orchestrator
if current_phase == 1 and current_step == '1.1':
load_skill('bmad-planner')
create_planning_docs(feature_name, gh_user)
commit_changes('docs: add BMAD planning for ' + feature_name)
Both templates use these placeholders:
{{TITLE}} - Feature name (title case){{DATE}} - Creation date (YYYY-MM-DD){{GH_USER}} - GitHub usernamexiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience