feat: Refactor and enhance brainstorming workflow commands

- Removed deprecated `gemini-init.md` command and migrated its functionality to a new structure under `.claude/commands/gemini/`.
- Introduced `auto-parallel.md` for parallel brainstorming automation with dynamic role selection and concurrent execution.
- Added `auto-squeeze.md` for sequential command coordination in brainstorming workflows, ensuring structured execution from framework generation to synthesis.
- Updated `plan.md` to improve clarity on project structure analysis and command execution strategies.
- Enhanced error handling and session management across all commands to ensure robustness and user guidance.
- Improved documentation for generated files and command options to facilitate user understanding and usage.
This commit is contained in:
catlog22
2025-09-29 15:48:42 +08:00
parent 99a8c0d685
commit c7ec9dd040
17 changed files with 2051 additions and 2084 deletions

View File

@@ -1,273 +1,205 @@
---
name: feature-planner
description: Feature planner perspective brainstorming for feature development and planning analysis
usage: /workflow:brainstorm:feature-planner <topic>
argument-hint: "topic or challenge to analyze from feature planning perspective"
description: Generate or update feature-planner/analysis.md addressing topic-framework discussion points
usage: /workflow:brainstorm:feature-planner [topic]
argument-hint: "optional topic - uses existing framework if available"
examples:
- /workflow:brainstorm:feature-planner
- /workflow:brainstorm:feature-planner "user dashboard enhancement"
- /workflow:brainstorm:feature-planner "mobile app feature roadmap"
- /workflow:brainstorm:feature-planner "integration capabilities planning"
allowed-tools: Task(conceptual-planning-agent), TodoWrite(*)
allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
---
## 🔧 **Role Overview: Feature Planner**
## 🔧 **Feature Planner Analysis Generator**
### Role Definition
Feature development specialist responsible for transforming business requirements into actionable feature specifications, managing development priorities, and ensuring successful feature delivery through strategic planning and execution.
### Purpose
**Specialized command for generating feature-planner/analysis.md** that addresses topic-framework.md discussion points from feature development perspective. Creates or updates role-specific analysis with framework references.
### Core Responsibilities
- **Feature Specification**: Transform business requirements into detailed feature specifications
- **Development Planning**: Create development roadmaps and manage feature priorities
- **Quality Assurance**: Design testing strategies and acceptance criteria
- **Delivery Management**: Plan feature releases and manage implementation timelines
### Core Function
- **Framework-based Analysis**: Address each discussion point in topic-framework.md
- **Feature Development Focus**: Feature specification, development planning, and delivery management
- **Update Mechanism**: Create new or update existing analysis.md
- **Agent Delegation**: Use conceptual-planning-agent for analysis generation
### Focus Areas
- **Feature Design**: User stories, acceptance criteria, feature specifications
- **Development Planning**: Sprint planning, milestones, dependency management
- **Quality Assurance**: Testing strategies, quality gates, acceptance processes
- **Release Management**: Release planning, version control, change management
### Analysis Scope
- **Feature Specification**: Transform requirements into detailed specifications
- **Development Planning**: Sprint planning, milestones, and dependency management
- **Quality Assurance**: Testing strategies and acceptance criteria
- **Delivery Management**: Release planning and implementation timelines
### Success Metrics
- Feature delivery on time and within scope
- Quality standards and acceptance criteria met
- User satisfaction with delivered features
- Development team productivity and efficiency
## ⚙️ **Execution Protocol**
## 🧠 **分析框架**
@~/.claude/workflows/brainstorming-principles.md
### Key Analysis Questions
**1. Feature Requirements and Scope**
- What are the core feature requirements and user stories?
- How should MVP and full feature versions be planned?
- What cross-feature dependencies and integration requirements exist?
**2. Implementation Complexity and Feasibility**
- What is the technical implementation complexity and what challenges exist?
- What extensions or modifications to existing systems are required?
- What third-party services and API integrations are needed?
**3. Development Resources and Timeline**
- What are the development effort estimates and time projections?
- What skills and team configurations are required?
- What development risks exist and how can they be mitigated?
**4. Testing and Quality Assurance**
- What testing strategies and test case designs are needed?
- What quality standards and acceptance criteria should be defined?
- What user acceptance and feedback mechanisms are required?
## ⚡ **Two-Step Execution Flow**
### ⚠️ Session Management - FIRST STEP
Session detection and selection:
### Phase 1: Session & Framework Detection
```bash
# Check for active sessions
active_sessions=$(find .workflow -name ".active-*" 2>/dev/null)
if [ multiple_sessions ]; then
prompt_user_to_select_session()
else
use_existing_or_create_new()
fi
# Check active session and framework
CHECK: .workflow/.active-* marker files
IF active_session EXISTS:
session_id = get_active_session()
brainstorm_dir = .workflow/WFS-{session}/.brainstorming/
CHECK: brainstorm_dir/topic-framework.md
IF EXISTS:
framework_mode = true
load_framework = true
ELSE:
IF topic_provided:
framework_mode = false # Create analysis without framework
ELSE:
ERROR: "No framework found and no topic provided"
```
### Step 1: Context Gathering Phase
**Feature Planner Perspective Questioning**
### Phase 2: Analysis Mode Detection
```bash
# Determine execution mode
IF framework_mode == true:
mode = "framework_based_analysis"
topic_ref = load_framework_topic()
discussion_points = extract_framework_points()
ELSE:
mode = "standalone_analysis"
topic_ref = provided_topic
discussion_points = generate_basic_structure()
```
Before agent assignment, gather comprehensive feature planner context:
#### 📋 Role-Specific Questions
**1. Implementation Complexity and Scope**
- What is the scope and complexity of the features you want to plan?
- Are there existing features or systems that need to be extended or integrated?
- What are the technical constraints or requirements that need to be considered?
- How do these features fit into the overall product roadmap?
**2. Dependency Mapping and Integration**
- What other features, systems, or teams does this depend on?
- Are there any external APIs, services, or third-party integrations required?
- What are the data dependencies and how will data flow between components?
- What are the potential blockers or risks that could impact development?
**3. Risk Assessment and Mitigation**
- What are the main technical, business, or timeline risks?
- Are there any unknowns or areas that need research or prototyping?
- What fallback plans or alternative approaches should be considered?
- How will quality and testing be ensured throughout development?
**4. Technical Feasibility and Resource Planning**
- What is the estimated development effort and timeline?
- What skills, expertise, or team composition is needed?
- Are there any specific technologies, tools, or frameworks required?
- What are the performance, scalability, or maintenance considerations?
#### Context Validation
- **Minimum Response**: Each answer must be ≥50 characters
- **Re-prompting**: Insufficient detail triggers follow-up questions
- **Context Storage**: Save responses to `.brainstorming/feature-planner-context.md`
### Step 2: Agent Assignment with Flow Control
**Dedicated Agent Execution**
### Phase 3: Agent Execution with Flow Control
**Framework-Based Analysis Generation**
```bash
Task(conceptual-planning-agent): "
[FLOW_CONTROL]
Execute dedicated feature planner conceptual analysis for: {topic}
Execute feature-planner analysis for existing topic framework
## Context Loading
ASSIGNED_ROLE: feature-planner
OUTPUT_LOCATION: .brainstorming/feature-planner/
USER_CONTEXT: {validated_responses_from_context_gathering}
OUTPUT_LOCATION: .workflow/WFS-{session}/.brainstorming/feature-planner/
ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
Flow Control Steps:
[
{
\"step\": \"load_role_template\",
\"action\": \"Load feature-planner planning template\",
\"command\": \"bash($(cat ~/.claude/workflows/cli-templates/planning-roles/feature-planner.md))\",
\"output_to\": \"role_template\"
}
]
## Flow Control Steps
1. **load_topic_framework**
- Action: Load structured topic discussion framework
- Command: Read(.workflow/WFS-{session}/.brainstorming/topic-framework.md)
- Output: topic_framework_content
Conceptual Analysis Requirements:
- Apply feature planner perspective to topic analysis
- Focus on implementation complexity, dependency mapping, risk assessment, and technical feasibility
- Use loaded role template framework for analysis structure
- Generate role-specific deliverables in designated output location
- Address all user context from questioning phase
2. **load_role_template**
- Action: Load feature-planner planning template
- Command: bash($(cat ~/.claude/workflows/cli-templates/planning-roles/feature-planner.md))
- Output: role_template_guidelines
Deliverables:
- analysis.md: Main feature planner analysis
- recommendations.md: Feature planner recommendations
- deliverables/: Feature planner-specific outputs as defined in role template
3. **load_session_metadata**
- Action: Load session metadata and existing context
- Command: Read(.workflow/WFS-{session}/.brainstorming/session.json)
- Output: session_context
Embody feature planner role expertise for comprehensive conceptual planning."
## Analysis Requirements
**Framework Reference**: Address all discussion points in topic-framework.md from feature development perspective
**Role Focus**: Feature specification, development planning, quality assurance, delivery management
**Structured Approach**: Create analysis.md addressing framework discussion points
**Template Integration**: Apply role template guidelines within framework structure
## Expected Deliverables
1. **analysis.md**: Comprehensive feature planning analysis addressing all framework discussion points
2. **Framework Reference**: Include @../topic-framework.md reference in analysis
## Completion Criteria
- Address each discussion point from topic-framework.md with feature development expertise
- Provide actionable development plans and implementation strategies
- Include quality assurance and testing considerations
- Reference framework document using @ notation for integration
"
```
### Progress Tracking
TodoWrite tracking for two-step process:
```json
[
{"content": "Gather feature planner context through role-specific questioning", "status": "in_progress", "activeForm": "Gathering context"},
{"content": "Validate context responses and save to feature-planner-context.md", "status": "pending", "activeForm": "Validating context"},
{"content": "Load feature-planner planning template via flow control", "status": "pending", "activeForm": "Loading template"},
{"content": "Execute dedicated conceptual-planning-agent for feature-planner role", "status": "pending", "activeForm": "Executing agent"}
]
## 📋 **TodoWrite Integration**
### Workflow Progress Tracking
```javascript
TodoWrite({
todos: [
{
content: "Detect active session and locate topic framework",
status: "in_progress",
activeForm: "Detecting session and framework"
},
{
content: "Load topic-framework.md and session metadata for context",
status: "pending",
activeForm: "Loading framework and session context"
},
{
content: "Execute feature-planner analysis using conceptual-planning-agent with FLOW_CONTROL",
status: "pending",
activeForm: "Executing feature-planner framework analysis"
},
{
content: "Generate analysis.md addressing all framework discussion points",
status: "pending",
activeForm: "Generating structured feature-planner analysis"
},
{
content: "Update session.json with feature-planner completion status",
status: "pending",
activeForm: "Updating session metadata"
}
]
});
```
## 📊 **输出结构**
## 📊 **Output Structure**
### 保存位置
### Framework-Based Analysis
```
.workflow/WFS-{topic-slug}/.brainstorming/feature-planner/
── analysis.md # 主要功能分析和规范
├── user-stories.md # 详细用户故事和验收标准
├── development-plan.md # 开发时间线和资源规划
└── testing-strategy.md # 质量保证和测试方法
.workflow/WFS-{session}/.brainstorming/feature-planner/
── analysis.md # Structured analysis addressing topic-framework.md discussion points
```
### 文档模板
#### analysis.md 结构
### Analysis Document Structure
```markdown
# Feature Planner Analysis: {Topic}
*Generated: {timestamp}*
# Feature Planner Analysis: [Topic from Framework]
## Executive Summary
[核心功能规划发现和建议概述]
## Framework Reference
**Topic Framework**: @../topic-framework.md
**Role Focus**: Feature Development perspective
## Feature Requirements Overview
### Core Feature Specifications
### User Story Summary
### Feature Scope and Boundaries
### Success Criteria and KPIs
## Discussion Points Analysis
[Address each point from topic-framework.md with feature development expertise]
## Feature Architecture Design
### Feature Components and Modules
### Integration Points and Dependencies
### APIs and Data Interfaces
### Configuration and Customization
### Core Requirements (from framework)
[Feature development perspective on requirements]
## Development Planning
### Effort Estimation and Complexity
### Development Phases and Milestones
### Resource Requirements
### Risk Assessment and Mitigation
### Technical Considerations (from framework)
[Feature architecture and development considerations]
## Quality Assurance Strategy
### Testing Approach and Coverage
### Performance and Scalability Testing
### User Acceptance Testing Plan
### Quality Gates and Standards
### User Experience Factors (from framework)
[Feature usability and user story considerations]
## Delivery and Release Strategy
### Release Planning and Versioning
### Deployment Strategy
### Feature Rollout Plan
### Post-Release Support
### Implementation Challenges (from framework)
[Development complexity and delivery considerations]
## Feature Prioritization
### Priority Matrix (High/Medium/Low)
### Business Value Assessment
### Development Complexity Analysis
### Recommended Implementation Order
### Success Metrics (from framework)
[Feature success metrics and acceptance criteria]
## Implementation Roadmap
### Phase 1: Core Features (Weeks 1-4)
### Phase 2: Enhanced Features (Weeks 5-8)
### Phase 3: Advanced Features (Weeks 9-12)
### Continuous Improvement Plan
## Feature Development Specific Recommendations
[Role-specific feature planning recommendations and strategies]
---
*Generated by feature-planner analysis addressing structured framework*
```
## 🔄 **会话集成**
## 🔄 **Session Integration**
### 状态同步
分析完成后,更新 `workflow-session.json`:
### Completion Status Update
```json
{
"phases": {
"BRAINSTORM": {
"feature_planner": {
"status": "completed",
"completed_at": "timestamp",
"output_directory": ".workflow/WFS-{topic}/.brainstorming/feature-planner/",
"key_insights": ["feature_specification", "development_timeline", "quality_requirement"]
}
}
"feature_planner": {
"status": "completed",
"framework_addressed": true,
"output_location": ".workflow/WFS-{session}/.brainstorming/feature-planner/analysis.md",
"framework_reference": "@../topic-framework.md"
}
}
```
### 与其他角色的协作
功能规划师视角为其他角色提供:
- **功能优先级和规划** → Product Manager
- **技术实现需求** → System Architect
- **界面功能要求** → UI Designer
- **数据功能需求** → Data Architect
- **功能安全需求** → Security Expert
## ✅ **质量标准**
### 必须包含的规划元素
- [ ] 详细的功能规范和用户故事
- [ ] 现实的开发时间估算
- [ ] 全面的测试策略
- [ ] 明确的质量标准
- [ ] 可执行的发布计划
### 功能规划原则检查
- [ ] 用户价值:每个功能都有明确的用户价值
- [ ] 可测试性:所有功能都有验收标准
- [ ] 可维护性:考虑长期维护和扩展
- [ ] 可交付性:计划符合团队能力和资源
- [ ] 可测量性:有明确的成功指标
### 交付质量评估
- [ ] 功能完整性和正确性
- [ ] 性能和稳定性指标
- [ ] 用户体验和满意度
- [ ] 代码质量和可维护性
- [ ] 文档完整性和准确性
### Integration Points
- **Framework Reference**: @../topic-framework.md for structured discussion points
- **Cross-Role Synthesis**: Feature development insights available for synthesis-report.md integration
- **Agent Autonomy**: Independent execution with framework guidance