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

@@ -91,100 +91,6 @@ ELIF context insufficient OR task has flow control marker:
- Work functions as specified - Work functions as specified
- Quality standards maintained - Quality standards maintained
2. **Update TODO List**:
- Update TODO_LIST.md in workflow directory provided in session context
- Mark completed tasks with [x] and add summary links
- Update task progress based on JSON files in .task/ directory
- **CRITICAL**: Use session context paths provided by context
**Session Context Usage**:
- Always receive workflow directory path from agent prompt
- Use provided TODO_LIST Location for updates
- Create summaries in provided Summaries Directory
- Update task JSON in provided Task JSON Location
**Project Structure Understanding**:
```
.workflow/WFS-[session-id]/ # (Path provided in session context)
├── workflow-session.json # Session metadata and state (REQUIRED)
├── IMPL_PLAN.md # Planning document (REQUIRED)
├── TODO_LIST.md # Progress tracking document (REQUIRED)
├── .task/ # Task definitions (REQUIRED)
│ ├── IMPL-*.json # Main task definitions
│ └── IMPL-*.*.json # Subtask definitions (created dynamically)
└── .summaries/ # Task completion summaries (created when tasks complete)
├── IMPL-*-summary.md # Main task summaries
└── IMPL-*.*-summary.md # Subtask summaries
```
**Example TODO_LIST.md Update**:
```markdown
# Tasks: Market Analysis Project
## Task Progress
▸ **IMPL-001**: Research market trends → [📋](./.task/IMPL-001.json)
- [x] **IMPL-001.1**: Data collection → [📋](./.task/IMPL-001.1.json) | [✅](./.summaries/IMPL-001.1-summary.md)
- [ ] **IMPL-001.2**: Analysis report → [📋](./.task/IMPL-001.2.json)
- [ ] **IMPL-002**: Create presentation → [📋](./.task/IMPL-002.json)
- [ ] **IMPL-003**: Stakeholder review → [📋](./.task/IMPL-003.json)
## Status Legend
- `` = Container task (has subtasks)
- `- [ ]` = Pending leaf task
- `- [x]` = Completed leaf task
```
3. **Generate Summary** (using session context paths):
- **MANDATORY**: Create summary in provided summaries directory
- Use exact paths from session context (e.g., `.workflow/WFS-[session-id]/.summaries/`)
- Link summary in TODO_LIST.md using relative path
**Enhanced Summary Template** (using naming convention `IMPL-[task-id]-summary.md`):
```markdown
# Task: [Task-ID] [Name]
## Execution Summary
### Deliverables Created
- `[file-path]`: [brief description of content/purpose]
- `[resource-name]`: [brief description of deliverable]
### Key Outputs
- **[Deliverable Name]** (`[location]`): [purpose/content summary]
- **[Analysis/Report]** (`[location]`): [key findings/conclusions]
- **[Resource/Asset]** (`[location]`): [purpose/usage]
## Outputs for Dependent Tasks
### Available Resources
- **[Resource Name]**: Located at `[path]` - [description and usage]
- **[Analysis Results]**: Key findings in `[location]` - [summary of insights]
- **[Documentation]**: Reference material at `[path]` - [content overview]
### Integration Points
- **[Output/Resource]**: Use `[access method]` to leverage `[functionality]`
- **[Analysis/Data]**: Reference `[location]` for `[specific information]`
- **[Process/Workflow]**: Follow `[documented process]` for `[specific outcome]`
### Usage Guidelines
- [Instructions for using key deliverables]
- [Best practices for leveraging outputs]
- [Important considerations for dependent tasks]
## Status: ✅ Complete
```
**Summary Naming Convention**:
- **Main tasks**: `IMPL-[task-id]-summary.md` (e.g., `IMPL-001-summary.md`)
- **Subtasks**: `IMPL-[task-id].[subtask-id]-summary.md` (e.g., `IMPL-001.1-summary.md`)
- **Location**: Always in `.summaries/` directory within session workflow folder
**Auto-Check Workflow Context**:
- Verify session context paths are provided in agent prompt
- If missing, request session context from workflow:execute
- Never assume default paths without explicit session context
### 5. Problem-Solving ### 5. Problem-Solving
**When facing challenges** (max 3 attempts): **When facing challenges** (max 3 attempts):

View File

@@ -1,12 +1,12 @@
--- ---
name: gemini-init name: gemini-init
description: Initialize Gemini CLI configuration with .gemini config and .geminiignore based on workspace analysis description: Initialize Gemini CLI configuration with .gemini config and .geminiignore based on workspace analysis
usage: /workflow:gemini-init [--output=<path>] [--preview] usage: /gemini:gemini-init [--output=<path>] [--preview]
argument-hint: [optional: output path, preview flag] argument-hint: [optional: output path, preview flag]
examples: examples:
- /workflow:gemini-init - /gemini:gemini-init
- /workflow:gemini-init --output=.config/ - /gemini:gemini-init --output=.config/
- /workflow:gemini-init --preview - /gemini:gemini-init --preview
--- ---
# Gemini Initialization Command # Gemini Initialization Command
@@ -27,8 +27,9 @@ Initializes Gemini CLI configuration for the workspace by:
### Generated Files ### Generated Files
#### .gemini Configuration File #### .gemini Configuration Directory
Contains Gemini CLI contextfilename setting: Creates `.gemini/` directory containing configuration files:
- `.gemini/settings.json` - Main configuration with contextfilename setting:
```json ```json
{ {
"contextfilename": "CLAUDE.md" "contextfilename": "CLAUDE.md"
@@ -125,27 +126,59 @@ target/
### Basic Usage ### Basic Usage
```bash ```bash
/workflow:gemini-init /gemini:gemini-init
``` ```
- Analyzes workspace and generates `.gemini` and `.geminiignore` in current directory - Analyzes workspace and generates `.gemini/` directory with `settings.json` and `.geminiignore` in current directory
- Creates backup of existing files if present - Creates backup of existing files if present
- Sets contextfilename to "CLAUDE.md" by default - Sets contextfilename to "CLAUDE.md" by default
### Preview Mode ### Preview Mode
```bash ```bash
/workflow:gemini-init --preview /gemini:gemini-init --preview
``` ```
- Shows what would be generated without creating files - Shows what would be generated without creating files
- Displays detected technologies, configuration, and ignore rules - Displays detected technologies, configuration, and ignore rules
### Custom Output Path ### Custom Output Path
```bash ```bash
/workflow:gemini-init --output=.config/ /gemini:gemini-init --output=.config/
``` ```
- Generates files in specified directory - Generates files in specified directory
- Creates directories if they don't exist - Creates directories if they don't exist
## Implementation Process ## EXECUTION INSTRUCTIONS ⚡ START HERE
**When this command is triggered, follow these exact steps:**
### Step 1: Workspace Analysis (MANDATORY FIRST)
```bash
# Analyze workspace structure
bash(~/.claude/scripts/get_modules_by_depth.sh json)
```
### Step 2: Technology Detection
```bash
# Check for common tech stack indicators
bash(find . -name "package.json" -not -path "*/node_modules/*" | head -1)
bash(find . -name "requirements.txt" -o -name "setup.py" -o -name "pyproject.toml" | head -1)
bash(find . -name "pom.xml" -o -name "build.gradle" | head -1)
bash(find . -name "Dockerfile" | head -1)
```
### Step 3: Generate Configuration Files
```bash
# Create .gemini/ directory and settings.json config file
# Create .geminiignore file with detected technology rules
# Backup existing files if present
```
### Step 4: Validation
```bash
# Verify generated files are valid
bash(ls -la .gemini* 2>/dev/null || echo "Configuration files created")
```
## Implementation Process (Technical Details)
### Phase 1: Workspace Analysis ### Phase 1: Workspace Analysis
1. Execute `get_modules_by_depth.sh json` to get structured project data 1. Execute `get_modules_by_depth.sh json` to get structured project data
@@ -175,8 +208,9 @@ detect_java() {
``` ```
### Phase 3: Configuration Generation ### Phase 3: Configuration Generation
1. **Gemini Config (.gemini)**: 1. **Gemini Config (.gemini/ directory)**:
- Generate simple JSON config with contextfilename setting - Create `.gemini/` directory if it doesn't exist
- Generate `settings.json` with contextfilename setting
- Set contextfilename to "CLAUDE.md" by default - Set contextfilename to "CLAUDE.md" by default
### Phase 4: Ignore Rules Generation ### Phase 4: Ignore Rules Generation
@@ -186,7 +220,7 @@ detect_java() {
4. Sort and deduplicate rules 4. Sort and deduplicate rules
### Phase 5: File Creation ### Phase 5: File Creation
1. **Generate .gemini config**: Write JSON configuration file 1. **Generate .gemini/ directory and settings.json**: Create directory structure and JSON configuration file
2. **Generate .geminiignore**: Create organized ignore file with sections 2. **Generate .geminiignore**: Create organized ignore file with sections
3. **Create backups**: Backup existing files if present 3. **Create backups**: Backup existing files if present
4. **Validate**: Check generated files are valid 4. **Validate**: Check generated files are valid
@@ -195,7 +229,7 @@ detect_java() {
``` ```
# .geminiignore # .geminiignore
# Generated by Claude Code workflow:gemini-ignore command # Generated by Claude Code gemini:gemini-ignore command
# Creation date: 2024-01-15 10:30:00 # Creation date: 2024-01-15 10:30:00
# Detected technologies: Node.js, Python, Docker # Detected technologies: Node.js, Python, Docker
# #
@@ -255,13 +289,14 @@ docker-compose.override.yml
- Show clear error message if cannot write to target location - Show clear error message if cannot write to target location
### Backup Existing Files ### Backup Existing Files
- If `.gemini/` directory exists, create backup as `.gemini.backup/`
- If `.geminiignore` exists, create backup as `.geminiignore.backup` - If `.geminiignore` exists, create backup as `.geminiignore.backup`
- Include timestamp in backup filename - Include timestamp in backup filename
## Integration Points ## Integration Points
### Workflow Commands ### Workflow Commands
- **After `/workflow:plan`**: Suggest running gemini-ignore for better analysis - **After `/gemini:plan`**: Suggest running gemini-ignore for better analysis
- **Before analysis**: Recommend updating ignore patterns for cleaner results - **Before analysis**: Recommend updating ignore patterns for cleaner results
### CLI Tool Integration ### CLI Tool Integration
@@ -273,22 +308,22 @@ docker-compose.override.yml
### Basic Project Setup ### Basic Project Setup
```bash ```bash
# New project - initialize Gemini configuration # New project - initialize Gemini configuration
/workflow:gemini-init /gemini:gemini-init
# Preview what would be generated # Preview what would be generated
/workflow:gemini-init --preview /gemini:gemini-init --preview
# Generate in subdirectory # Generate in subdirectory
/workflow:gemini-init --output=.config/ /gemini:gemini-init --output=.config/
``` ```
### Technology Migration ### Technology Migration
```bash ```bash
# After adding new tech stack (e.g., Docker) # After adding new tech stack (e.g., Docker)
/workflow:gemini-init # Regenerates both config and ignore files with new rules /gemini:gemini-init # Regenerates both config and ignore files with new rules
# Check what changed # Check what changed
/workflow:gemini-init --preview # Compare with existing configuration /gemini:gemini-init --preview # Compare with existing configuration
``` ```
## Key Benefits ## Key Benefits

View File

@@ -1,8 +1,8 @@
--- ---
name: artifacts name: artifacts
description: Topic discussion, decomposition, and analysis artifacts generation through structured inquiry description: Generate structured topic-framework.md for role-based brainstorming analysis
usage: /workflow:brainstorm:artifacts "<topic>" usage: /workflow:brainstorm:artifacts "<topic>"
argument-hint: "topic or challenge description for discussion and analysis" argument-hint: "topic or challenge description for framework generation"
examples: examples:
- /workflow:brainstorm:artifacts "Build real-time collaboration feature" - /workflow:brainstorm:artifacts "Build real-time collaboration feature"
- /workflow:brainstorm:artifacts "Optimize database performance for millions of users" - /workflow:brainstorm:artifacts "Optimize database performance for millions of users"
@@ -10,7 +10,7 @@ examples:
allowed-tools: TodoWrite(*), Read(*), Write(*), Bash(*), Glob(*) allowed-tools: TodoWrite(*), Read(*), Write(*), Bash(*), Glob(*)
--- ---
# Workflow Brainstorm Artifacts Command # Topic Framework Generator Command
## Usage ## Usage
```bash ```bash
@@ -18,34 +18,34 @@ allowed-tools: TodoWrite(*), Read(*), Write(*), Bash(*), Glob(*)
``` ```
## Purpose ## Purpose
Dedicated command for topic discussion, decomposition, and analysis artifacts generation. This command focuses on interactive exploration and documentation creation without complex agent workflows. **Specialized command for generating structured topic-framework.md documents** that provide discussion frameworks for role-based brainstorming analysis. Creates the foundation document that all role agents will reference.
## Core Workflow ## Core Workflow
### Discussion & Artifacts Generation Process ### Topic Framework Generation Process
**0. Session Management** ⚠️ FIRST STEP **Phase 1: Session Management** ⚠️ FIRST STEP
- **MCP Tools Integration**: Use Code Index for technical context, Exa for industry insights
- **Active session detection**: Check `.workflow/.active-*` markers - **Active session detection**: Check `.workflow/.active-*` markers
- **Session selection**: Prompt user if multiple active sessions found - **Session selection**: Prompt user if multiple active sessions found
- **Auto-creation**: Create `WFS-[topic-slug]` only if no active session exists - **Auto-creation**: Create `WFS-[topic-slug]` only if no active session exists
- **Context isolation**: Each session maintains independent analysis state - **Framework check**: Check if `topic-framework.md` exists (update vs create mode)
**1. Topic Discussion & Inquiry** **Phase 2: Interactive Topic Analysis**
- **Interactive exploration**: Direct conversation about topic aspects - **Scope definition**: Define topic boundaries and objectives
- **Structured questioning**: Key areas of investigation - **Stakeholder identification**: Identify key users and stakeholders
- **Context gathering**: User input and requirements clarification - **Requirements gathering**: Extract core requirements and constraints
- **Perspective collection**: Multiple viewpoints and considerations - **Context collection**: Gather technical and business context
**2. Topic Decomposition** **Phase 3: Structured Framework Generation**
- **Component identification**: Break down topic into key areas - **Discussion points creation**: Generate 5 key discussion areas
- **Relationship mapping**: Connections between components - **Role-specific questions**: Create tailored questions for each relevant role
- **Priority assessment**: Importance and urgency evaluation - **Framework document**: Generate structured `topic-framework.md`
- **Constraint analysis**: Limitations and requirements - **Validation check**: Ensure framework completeness and clarity
**3. Analysis Artifacts Generation** **Phase 4: Update Mechanism**
- **Discussion summary**: `.workflow/WFS-[topic]/.brainstorming/discussion-summary.md` - Key points and insights - **Existing framework detection**: Check for existing framework
- **Component analysis**: `.workflow/WFS-[topic]/.brainstorming/component-analysis.md` - Detailed decomposition - **Incremental updates**: Add new discussion points if requested
- **Version tracking**: Maintain framework evolution history
## Implementation Standards ## Implementation Standards
@@ -74,60 +74,75 @@ Dedicated command for topic discussion, decomposition, and analysis artifacts ge
## Document Generation ## Document Generation
**Workflow**: Topic Discussion → Component Analysis → Documentation **Primary Output**: Single structured `topic-framework.md` document
**Document Structure**: **Document Structure**:
``` ```
.workflow/WFS-[topic]/.brainstorming/ .workflow/WFS-[topic]/.brainstorming/
├── discussion-summary.md # Main conversation and insights ├── topic-framework.md # ★ STRUCTURED FRAMEWORK DOCUMENT
└── component-analysis.md # Detailed topic breakdown └── session.json # Framework metadata and role assignments
``` ```
**Document Templates**: **Topic Framework Template**:
### discussion-summary.md ### topic-framework.md Structure
```markdown ```markdown
# Topic Discussion Summary: [topic] # [Topic] - Discussion Framework
## Overview ## Topic Overview
Brief description of the topic and its scope. - **Scope**: [Clear topic boundaries and scope definition]
- **Objectives**: [Primary goals and expected outcomes]
- **Context**: [Relevant background and constraints]
- **Stakeholders**: [Key users, roles, and affected parties]
## Key Insights ## Key Discussion Points
- Major points discovered during discussion
- Important considerations identified
- Critical success factors
## Questions Explored ### 1. Core Requirements
- Primary areas of investigation - What are the fundamental requirements?
- User responses and clarifications - What are the critical success factors?
- Open questions requiring further research - What constraints must be considered?
- What acceptance criteria define success?
## Next Steps ### 2. Technical Considerations
- Recommended follow-up actions - What are the technical challenges?
- Areas needing deeper analysis - What architectural decisions are needed?
``` - What technology choices impact the solution?
- What integration points exist?
### component-analysis.md ### 3. User Experience Factors
```markdown - Who are the primary users?
# Component Analysis: [topic] - What are the key user journeys?
- What usability requirements exist?
- What accessibility considerations apply?
## Core Components ### 4. Implementation Challenges
Detailed breakdown of main topic elements: - What are the main implementation risks?
- What dependencies exist?
- What resources are required?
- What timeline constraints apply?
### Component 1: [Name] ### 5. Success Metrics
- **Purpose**: What it does - How will success be measured?
- **Dependencies**: What it relies on - What are the acceptance criteria?
- **Interfaces**: How it connects to other components - What performance requirements exist?
- What monitoring and analytics are needed?
### Component 2: [Name] ## Role-Specific Analysis Points
- **Purpose**: - **System Architect**: Architecture patterns, scalability, technology stack
- **Dependencies**: - **Product Manager**: Business value, user needs, market positioning
- **Interfaces**: - **UI Designer**: User experience, interface design, usability
- **Security Expert**: Security requirements, threat modeling, compliance
- **Data Architect**: Data modeling, processing workflows, analytics
- **Business Analyst**: Process optimization, cost-benefit, change management
## Component Relationships ## Framework Usage Instructions
- How components interact **For Role Agents**: Address each discussion point from your role perspective
- Data flow between components **Reference Format**: Use @../topic-framework.md in your analysis.md
- Critical dependencies **Update Process**: Use /workflow:brainstorm:artifacts to update framework
---
*Generated by /workflow:brainstorm:artifacts*
*Last updated: [timestamp]*
``` ```
## Session Management ⚠️ CRITICAL ## Session Management ⚠️ CRITICAL
@@ -162,19 +177,46 @@ Detailed breakdown of main topic elements:
- **Alternatives**: What other approaches exist? - **Alternatives**: What other approaches exist?
- **Migration**: How do we transition from current state? - **Migration**: How do we transition from current state?
## Quality Standards ## Update Mechanism ⚠️ SMART UPDATES
### Discussion Excellence ### Framework Update Logic
- **Comprehensive exploration**: Cover all relevant aspects of the topic ```bash
- **Clear documentation**: Capture insights in structured, readable format # Check existing framework
- **Actionable outcomes**: Generate practical next steps and recommendations IF topic-framework.md EXISTS:
- **User-driven**: Follow user interests and priorities in the discussion SHOW current framework to user
ASK: "Framework exists. Do you want to:"
OPTIONS:
1. "Replace completely" → Generate new framework
2. "Add discussion points" → Append to existing
3. "Refine existing points" → Interactive editing
4. "Cancel" → Exit without changes
ELSE:
CREATE new framework
```
### Documentation Quality ### Update Strategies
- **Structured format**: Use consistent templates for easy navigation
- **Complete coverage**: Document all important discussion points **1. Complete Replacement**
- **Clear language**: Avoid jargon, explain technical concepts - Backup existing framework as `topic-framework-[timestamp].md.backup`
- **Practical focus**: Emphasize actionable insights and recommendations - Generate completely new framework
- Preserve role-specific analysis points from previous version
**2. Incremental Addition**
- Load existing framework
- Identify new discussion areas through user interaction
- Add new sections while preserving existing structure
- Update framework usage instructions
**3. Refinement Mode**
- Interactive editing of existing discussion points
- Allow modification of scope, objectives, and questions
- Preserve framework structure and role assignments
- Update timestamp and version info
### Version Control
- **Backup Creation**: Always backup before major changes
- **Change Tracking**: Include change summary in framework footer
- **Rollback Support**: Keep previous version accessible
## Error Handling ## Error Handling
- **Session creation failure**: Provide clear error message and retry option - **Session creation failure**: Provide clear error message and retry option

View File

@@ -0,0 +1,325 @@
---
name: auto-parallel
description: Parallel brainstorming automation with dynamic role selection and concurrent execution
usage: /workflow:brainstorm:auto-parallel "<topic>"
argument-hint: "topic or challenge description"
examples:
- /workflow:brainstorm:auto-parallel "Build real-time collaboration feature"
- /workflow:brainstorm:auto-parallel "Optimize database performance for millions of users"
- /workflow:brainstorm:auto-parallel "Implement secure authentication system"
allowed-tools: SlashCommand(*), Task(*), TodoWrite(*), Read(*), Write(*), Bash(*), Glob(*)
---
# Workflow Brainstorm Parallel Auto Command
## Usage
```bash
/workflow:brainstorm:auto-parallel "<topic>"
```
## Role Selection Logic
- **Technical & Architecture**: `architecture|system|performance|database|security` → system-architect, data-architect, security-expert
- **Product & UX**: `user|ui|ux|interface|design|product|feature` → ui-designer, user-researcher, product-manager
- **Business & Process**: `business|process|workflow|cost|innovation|testing` → business-analyst, innovation-lead, test-strategist
- **Multi-role**: Complex topics automatically select 2-3 complementary roles
- **Default**: `product-manager` if no clear match
**Template Loading**: `bash($(cat ~/.claude/workflows/cli-templates/planning-roles/<role-name>.md))`
**Template Source**: `.claude/workflows/cli-templates/planning-roles/`
**Available Roles**: business-analyst, data-architect, feature-planner, innovation-lead, product-manager, security-expert, system-architect, test-strategist, ui-designer, user-researcher
**Example**:
```bash
bash($(cat ~/.claude/workflows/cli-templates/planning-roles/system-architect.md))
bash($(cat ~/.claude/workflows/cli-templates/planning-roles/ui-designer.md))
```
## Core Workflow
### Structured Topic Processing → Role Analysis → Synthesis
The command follows a structured three-phase approach with dedicated document types:
**Phase 1: Framework Generation** ⚠️ COMMAND EXECUTION
- **Call artifacts command**: Execute `/workflow:brainstorm:artifacts "{topic}"` using SlashCommand tool
**Phase 2: Role Analysis Execution** ⚠️ PARALLEL AGENT ANALYSIS
- **Parallel execution**: Multiple roles execute simultaneously for faster completion
- **Independent agents**: Each role gets dedicated conceptual-planning-agent running in parallel
- **Shared framework**: All roles reference the same topic framework for consistency
- **Concurrent generation**: Role-specific analysis documents generated simultaneously
- **Progress tracking**: Parallel agents update progress independently
**Phase 3: Synthesis Generation** ⚠️ COMMAND EXECUTION
- **Call synthesis command**: Execute `/workflow:brainstorm:synthesis` using SlashCommand tool
## Implementation Standards
### Simplified Command Orchestration ⚠️ STREAMLINED
Auto command coordinates independent specialized commands:
**Command Sequence**:
1. **Generate Framework**: Use SlashCommand to execute `/workflow:brainstorm:artifacts "{topic}"`
2. **Role Selection**: Auto-select 2-3 relevant roles based on topic keywords
3. **Role Analysis**: Execute selected role commands in parallel
4. **Generate Synthesis**: Use SlashCommand to execute `/workflow:brainstorm:synthesis`
**SlashCommand Integration**:
1. **artifacts command**: Called via SlashCommand tool for framework generation
2. **role commands**: Each role command operates in parallel with framework reference
3. **synthesis command**: Called via SlashCommand tool for final integration
4. **Command coordination**: SlashCommand handles execution and validation
**Role Selection Logic**:
- **Technical**: `architecture|system|performance|database|security` → system-architect, data-architect, security-expert
- **Product & UX**: `user|ui|ux|interface|design|product|feature` → ui-designer, user-researcher, product-manager
- **Business**: `business|process|workflow|cost|innovation` → business-analyst, innovation-lead
- **Auto-select**: 2-3 most relevant roles based on topic analysis
### Simplified Processing Standards
**Core Principles**:
1. **Minimal preprocessing** - Only session.json and basic role selection
2. **Agent autonomy** - Agents handle their own context and validation
3. **Parallel execution** - Multiple agents can work simultaneously
4. **Post-processing synthesis** - Integration happens after agent completion
5. **TodoWrite control** - Progress tracking throughout all phases
**Implementation Rules**:
- **Maximum 3 roles**: Auto-selected based on simple keyword mapping
- **No upfront validation**: Agents handle their own context requirements
- **Parallel execution**: Each agent operates concurrently without dependencies
- **Synthesis at end**: Integration only after all agents complete
**Agent Self-Management** (Agents decide their own approach):
- **Context gathering**: Agents determine what questions to ask
- **Template usage**: Agents load and apply their own role templates
- **Analysis depth**: Agents determine appropriate level of detail
- **Documentation**: Agents create their own file structure and content
### Session Management ⚠️ CRITICAL
- **⚡ FIRST ACTION**: Check for all `.workflow/.active-*` markers before role processing
- **Multiple sessions support**: Different Claude instances can have different active brainstorming sessions
- **User selection**: If multiple active sessions found, prompt user to select which one to work with
- **Auto-session creation**: `WFS-[topic-slug]` only if no active session exists
- **Session continuity**: MUST use selected active session for all role processing
- **Context preservation**: Each role's context and agent output stored in session directory
- **Session isolation**: Each session maintains independent brainstorming state and role assignments
## Document Generation
**Command Coordination Workflow**: artifacts → parallel role analysis → synthesis
**Output Structure**: Coordinated commands generate framework, role analyses, and synthesis documents as defined in their respective command specifications.
## Agent Prompt Templates
### Task Agent Invocation Template
```bash
Task(subagent_type="conceptual-planning-agent",
prompt="Execute brainstorming analysis: {role-name} perspective for {topic}
## Role Assignment
**ASSIGNED_ROLE**: {role-name}
**TOPIC**: {user-provided-topic}
**OUTPUT_LOCATION**: .workflow/WFS-{topic}/.brainstorming/{role}/
## Execution Instructions
[FLOW_CONTROL]
### Flow Control Steps
**AGENT RESPONSIBILITY**: Execute these pre_analysis steps sequentially with context accumulation:
1. **load_topic_framework**
- Action: Load structured topic discussion framework
- Command: bash(cat .workflow/WFS-{topic}/.brainstorming/topic-framework.md 2>/dev/null || echo 'Topic framework not found')
- Output: topic_framework
2. **load_role_template**
- Action: Load {role-name} planning template
- Command: bash($(cat ~/.claude/workflows/cli-templates/planning-roles/{role}.md))
- Output: role_template
3. **load_session_metadata**
- Action: Load session metadata and topic description
- Command: bash(cat .workflow/WFS-{topic}/.brainstorming/session.json 2>/dev/null || echo '{}')
- Output: session_metadata
### Implementation Context
**Topic Framework**: Use loaded topic-framework.md for structured analysis
**Role Focus**: {role-name} domain expertise and perspective
**Analysis Type**: Address framework discussion points from role perspective
**Template Framework**: Combine role template with topic framework structure
**Structured Approach**: Create analysis.md addressing all topic framework points
### Session Context
**Workflow Directory**: .workflow/WFS-{topic}/.brainstorming/
**Output Directory**: .workflow/WFS-{topic}/.brainstorming/{role}/
**Session JSON**: .workflow/WFS-{topic}/.brainstorming/session.json
### Dependencies & Context
**Topic**: {user-provided-topic}
**Role Template**: ~/.claude/workflows/cli-templates/planning-roles/{role}.md
**User Requirements**: To be gathered through interactive questioning
## Completion Requirements
1. Execute all flow control steps in sequence (load topic framework, role template, session metadata)
2. **Address Topic Framework**: Respond to all discussion points in topic-framework.md from role perspective
3. Apply role template guidelines within topic framework structure
4. Generate structured role analysis addressing framework points
5. Create single comprehensive deliverable in OUTPUT_LOCATION:
- analysis.md (structured analysis addressing all topic framework points with role-specific insights)
6. Include framework reference: @../topic-framework.md in analysis.md
7. Update session.json with completion status",
description="Execute {role-name} brainstorming analysis")
```
### Parallel Role Agent调用示例
```bash
# Execute multiple roles in parallel using single message with multiple Task calls
Task(subagent_type="conceptual-planning-agent",
prompt="Execute brainstorming analysis: system-architect perspective for {topic}...",
description="Execute system-architect brainstorming analysis")
Task(subagent_type="conceptual-planning-agent",
prompt="Execute brainstorming analysis: ui-designer perspective for {topic}...",
description="Execute ui-designer brainstorming analysis")
Task(subagent_type="conceptual-planning-agent",
prompt="Execute brainstorming analysis: security-expert perspective for {topic}...",
description="Execute security-expert brainstorming analysis")
```
### Direct Synthesis Process (Command-Driven)
**Synthesis execution**: Use SlashCommand to execute `/workflow:brainstorm:synthesis` after role completion
## TodoWrite Control Flow ⚠️ CRITICAL
### Workflow Progress Tracking
**MANDATORY**: Use Claude Code's built-in TodoWrite tool throughout entire brainstorming workflow:
```javascript
// Phase 1: Create initial todo list for command-coordinated brainstorming workflow
TodoWrite({
todos: [
{
content: "Initialize brainstorming session and detect active sessions",
status: "pending",
activeForm: "Initializing brainstorming session"
},
{
content: "Execute artifacts command using SlashCommand for framework generation",
status: "pending",
activeForm: "Executing artifacts command for topic framework"
},
{
content: "Select roles and create session.json with framework references",
status: "pending",
activeForm: "Selecting roles and creating session metadata"
},
{
content: "Execute [role-1] analysis [conceptual-planning-agent] [FLOW_CONTROL] addressing framework",
status: "pending",
activeForm: "Executing [role-1] structured framework analysis"
},
{
content: "Execute [role-2] analysis [conceptual-planning-agent] [FLOW_CONTROL] addressing framework",
status: "pending",
activeForm: "Executing [role-2] structured framework analysis"
},
{
content: "Execute synthesis command using SlashCommand for final integration",
status: "pending",
activeForm: "Executing synthesis command for integrated analysis"
}
]
});
// Phase 2: Update status as workflow progresses - ONLY ONE task should be in_progress at a time
TodoWrite({
todos: [
{
content: "Initialize brainstorming session and detect active sessions",
status: "completed", // Mark completed preprocessing
activeForm: "Initializing brainstorming session"
},
{
content: "Select roles for topic analysis and create session.json",
status: "in_progress", // Mark current task as in_progress
activeForm: "Selecting roles and creating session metadata"
},
// ... other tasks remain pending
]
});
// Phase 3: Parallel agent execution tracking
TodoWrite({
todos: [
// ... previous completed tasks
{
content: "Execute system-architect analysis [conceptual-planning-agent] [FLOW_CONTROL]",
status: "in_progress", // Executing in parallel
activeForm: "Executing system-architect brainstorming analysis"
},
{
content: "Execute ui-designer analysis [conceptual-planning-agent] [FLOW_CONTROL]",
status: "in_progress", // Executing in parallel
activeForm: "Executing ui-designer brainstorming analysis"
},
{
content: "Execute security-expert analysis [conceptual-planning-agent] [FLOW_CONTROL]",
status: "in_progress", // Executing in parallel
activeForm: "Executing security-expert brainstorming analysis"
}
]
});
```
**TodoWrite Integration Rules**:
1. **Create initial todos**: All workflow phases at start
2. **Mark in_progress**: Multiple parallel tasks can be in_progress simultaneously
3. **Update immediately**: After each task completion
4. **Track agent execution**: Include [agent-type] and [FLOW_CONTROL] markers for parallel agents
5. **Final synthesis**: Mark synthesis as in_progress only after all parallel agents complete
## Reference Information
### Structured Processing Schema
Each role processing follows structured framework pattern:
- **topic_framework**: Structured discussion framework document
- **role**: Selected planning role name with framework reference
- **agent**: Dedicated conceptual-planning-agent instance
- **structured_analysis**: Agent addresses all framework discussion points
- **output**: Role-specific analysis.md addressing topic framework structure
### File Structure Reference
**Architecture**: @~/.claude/workflows/workflow-architecture.md
**Role Templates**: @~/.claude/workflows/cli-templates/planning-roles/
### Execution Integration
Command coordination model: artifacts command → parallel role analysis → synthesis command
## Error Handling
- **Role selection failure**: Default to `product-manager` with explanation
- **Agent execution failure**: Agent-specific retry with minimal dependencies
- **Template loading issues**: Agent handles graceful degradation
- **Synthesis conflicts**: Synthesis agent highlights disagreements without resolution
## Quality Standards
### Agent Autonomy Excellence
- **Single role focus**: Each agent handles exactly one role independently
- **Self-contained execution**: Agent manages own context, validation, and output
- **Parallel processing**: Multiple agents can execute simultaneously
- **Complete ownership**: Agent produces entire role-specific analysis package
### Minimal Coordination Excellence
- **Lightweight handoff**: Only topic and role assignment provided
- **Agent self-management**: Agents handle their own workflow and validation
- **Concurrent operation**: No inter-agent dependencies enabling parallel execution
- **Reference-based synthesis**: Post-processing integration without content duplication
- **TodoWrite orchestration**: Progress tracking and workflow control throughout entire process

View File

@@ -0,0 +1,196 @@
---
name: auto-squeeze
description: Sequential command coordination for brainstorming workflow commands
usage: /workflow:brainstorm:auto-squeeze "<topic>"
argument-hint: "topic or challenge description for coordinated brainstorming"
examples:
- /workflow:brainstorm:auto-squeeze "Build real-time collaboration feature"
- /workflow:brainstorm:auto-squeeze "Optimize database performance for millions of users"
- /workflow:brainstorm:auto-squeeze "Implement secure authentication system"
allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*), Glob(*)
---
# Sequential Auto Brainstorming Coordination Command
## Usage
```bash
/workflow:brainstorm:auto-squeeze "<topic>"
```
## Purpose
**Sequential command coordination for brainstorming workflow** by calling existing brainstorm commands using SlashCommand tool. This command orchestrates the complete brainstorming workflow from framework generation to synthesis in sequential order.
## Command Coordination Workflow
### Phase 1: Framework Generation
1. **Call artifacts command**: Execute `/workflow:brainstorm:artifacts "{topic}"`
2. **Verify framework creation**: Check for topic-framework.md existence
3. **Session validation**: Ensure active session continuity
### Phase 2: Role Analysis Coordination
1. **Role selection**: Auto-select 2-3 relevant roles based on topic keywords
2. **Display selected roles**: Clearly list the chosen roles before execution
```
Selected roles for analysis:
- ui-designer (UI/UX perspective)
- system-architect (Technical architecture)
- security-expert (Security considerations)
```
3. **Sequential execution**: Call each role command using SlashCommand
4. **Progress monitoring**: Track completion of each role analysis
5. **Role execution order**:
- `/workflow:brainstorm:ui-designer` - UI/UX perspective
- `/workflow:brainstorm:system-architect` - Technical architecture
- `/workflow:brainstorm:security-expert` - Security considerations
### Phase 3: Synthesis Coordination
1. **Completion verification**: Ensure all role analyses are complete
2. **Call synthesis command**: Execute `/workflow:brainstorm:synthesis`
3. **Final validation**: Verify synthesis document creation
## Role Selection Logic
### Keyword-Based Role Mapping
- **Technical & Architecture**: `architecture|system|performance|database|security` → system-architect, data-architect, security-expert
- **Product & UX**: `user|ui|ux|interface|design|product|feature` → ui-designer, user-researcher, product-manager
- **Business & Process**: `business|process|workflow|cost|innovation` → business-analyst, innovation-lead
- **Default fallback**: ui-designer if no clear match
### Auto-Selection Rules
- **Maximum 3 roles**: Select most relevant based on topic analysis
- **Priority ordering**: Most relevant role first
- **Coverage ensure**: Include complementary perspectives
## Implementation Protocol
### Sequential Command Execution
```bash
# Phase 1: Generate framework
SlashCommand(command="/workflow:brainstorm:artifacts \"{topic}\"")
# Display selected roles
echo "Selected roles for analysis:"
echo "- ui-designer (UI/UX perspective)"
echo "- system-architect (Technical architecture)"
echo "- security-expert (Security considerations)"
# Phase 2: Execute selected roles sequentially
SlashCommand(command="/workflow:brainstorm:ui-designer")
SlashCommand(command="/workflow:brainstorm:system-architect")
SlashCommand(command="/workflow:brainstorm:security-expert")
# Phase 3: Generate synthesis
SlashCommand(command="/workflow:brainstorm:synthesis")
```
### Progress Tracking
```javascript
TodoWrite({
todos: [
{
content: "Generate topic framework using artifacts command",
status: "in_progress",
activeForm: "Generating topic framework"
},
{
content: "Display selected roles: ui-designer, system-architect, security-expert",
status: "pending",
activeForm: "Displaying selected roles for analysis"
},
{
content: "Execute ui-designer role analysis",
status: "pending",
activeForm: "Executing ui-designer analysis"
},
{
content: "Execute system-architect role analysis",
status: "pending",
activeForm: "Executing system-architect analysis"
},
{
content: "Execute security-expert role analysis",
status: "pending",
activeForm: "Executing security-expert analysis"
},
{
content: "Generate synthesis report",
status: "pending",
activeForm: "Generating synthesis report"
}
]
});
```
### Verification Steps
Between each phase:
1. **Check command completion**: Verify previous command finished successfully
2. **Validate outputs**: Ensure expected files were created
3. **Update progress**: Mark current task complete, start next task
4. **Error handling**: Stop workflow if any command fails
## Error Handling
### Command Failure Recovery
- **Framework generation fails**: Stop workflow, report error
- **Role analysis fails**: Continue with remaining roles, note failure
- **Synthesis fails**: Attempt retry once, then report partial completion
### Session Management
- **Active session required**: Use existing session or create new one
- **Session continuity**: Maintain same session throughout workflow
- **Multi-session handling**: Prompt user if multiple active sessions
## Expected Output Structure
```
.workflow/WFS-{session}/.brainstorming/
├── topic-framework.md # Generated by artifacts command
├── ui-designer/
│ └── analysis.md # Generated by ui-designer command
├── system-architect/
│ └── analysis.md # Generated by system-architect command
├── security-expert/
│ └── analysis.md # Generated by security-expert command
└── synthesis-report.md # Generated by synthesis command
```
## Test Scenarios
### Test Case 1: UI/UX Focus Topic
**Topic**: "Redesign user authentication interface"
**Expected roles**: ui-designer, user-researcher, security-expert
**Validation**: Check UI-focused analysis in each role output
### Test Case 2: Technical Architecture Topic
**Topic**: "Design scalable microservices architecture"
**Expected roles**: system-architect, data-architect, security-expert
**Validation**: Check technical depth in architecture analysis
### Test Case 3: Business Process Topic
**Topic**: "Optimize customer onboarding workflow"
**Expected roles**: business-analyst, product-manager, ui-designer
**Validation**: Check business process focus in analysis
## Quality Assurance
### Command Integration Verification
- **All commands execute independently**: Each command handles its own validation
- **No direct dependencies**: Commands work with framework reference
- **Consistent session usage**: All commands use same session directory
- **Proper error propagation**: Failed commands don't break workflow
### Output Quality Checks
- **Framework completeness**: topic-framework.md has all required sections
- **Role analysis depth**: Each role provides substantial analysis
- **Synthesis integration**: synthesis-report.md references all role analyses
- **Cross-references work**: @ notation links function correctly
## Success Criteria
1. **Complete workflow execution**: All phases complete without errors
2. **Proper file generation**: All expected output files created
3. **Content quality**: Each document contains substantial, relevant analysis
4. **Integration validation**: Synthesis properly references all role analyses
5. **Session consistency**: All outputs in correct session directory
---
*Sequential command coordination for brainstorming workflow*

View File

@@ -1,245 +0,0 @@
---
name: auto
description: Intelligent brainstorming automation with dynamic role selection and guided context gathering
usage: /workflow:brainstorm:auto "<topic>"
argument-hint: "topic or challenge description"
examples:
- /workflow:brainstorm:auto "Build real-time collaboration feature"
- /workflow:brainstorm:auto "Optimize database performance for millions of users"
- /workflow:brainstorm:auto "Implement secure authentication system"
allowed-tools: Task(*), TodoWrite(*), Read(*), Write(*), Bash(*), Glob(*)
---
# Workflow Brainstorm Auto Command
## Usage
```bash
/workflow:brainstorm:auto "<topic>"
```
## Role Selection Logic
- **Technical & Architecture**: `architecture|system|performance|database|security` → system-architect, data-architect, security-expert
- **Product & UX**: `user|ui|ux|interface|design|product|feature` → ui-designer, user-researcher, product-manager
- **Business & Process**: `business|process|workflow|cost|innovation|testing` → business-analyst, innovation-lead, test-strategist
- **Multi-role**: Complex topics automatically select 2-3 complementary roles
- **Default**: `product-manager` if no clear match
**Template Loading**: `bash($(cat ~/.claude/workflows/cli-templates/planning-roles/<role-name>.md))`
**Template Source**: `.claude/workflows/cli-templates/planning-roles/`
**Available Roles**: business-analyst, data-architect, feature-planner, innovation-lead, product-manager, security-expert, system-architect, test-strategist, ui-designer, user-researcher
**Example**:
```bash
bash($(cat ~/.claude/workflows/cli-templates/planning-roles/system-architect.md))
bash($(cat ~/.claude/workflows/cli-templates/planning-roles/ui-designer.md))
ls ~/.claude/workflows/cli-templates/planning-roles/ # Show all available roles
```
## Core Workflow
### Analysis & Planning Process
The command performs dedicated role analysis through:
**0. Session Management** ⚠️ FIRST STEP
- **MCP Tools Integration**: Use Code Index for codebase context, Exa for external insights
- **Active session detection**: Check `.workflow/.active-*` markers
- **Session selection**: Prompt user if multiple active sessions found
- **Auto-creation**: Create `WFS-[topic-slug]` only if no active session exists
- **Context isolation**: Each session maintains independent brainstorming state
**1. Role Selection & Template Loading**
- **Keyword analysis**: Extract topic keywords and map to planning roles
- **Template loading**: Load role templates via `bash($(cat ~/.claude/workflows/cli-templates/planning-roles/<role>.md))`
- **Role validation**: Verify against `.claude/workflows/cli-templates/planning-roles/`
- **Multi-role detection**: Select 1-3 complementary roles based on topic complexity
**2. Sequential Role Processing** ⚠️ CRITICAL ARCHITECTURE
- **One Role = One Agent**: Each role gets dedicated conceptual-planning-agent
- **Context gathering**: Role-specific questioning with validation
- **Agent submission**: Complete context handoff to single-role agents
- **Progress tracking**: Real-time TodoWrite updates per role
**3. Analysis Artifacts Generated**
- **Role contexts**: `.workflow/WFS-[topic]/.brainstorming/[role]-context.md` - User responses per role
- **Agent outputs**: `.workflow/WFS-[topic]/.brainstorming/[role]/analysis.md` - Dedicated role analysis
- **Session metadata**: `.workflow/WFS-[topic]/.brainstorming/auto-session.json` - Agent assignments and validation
- **Synthesis**: `.workflow/WFS-[topic]/.brainstorming/synthesis/integrated-analysis.md` - Multi-role integration
## Implementation Standards
### Dedicated Agent Architecture ⚠️ CRITICAL
Agents receive dedicated role assignments with complete context isolation:
```json
"agent_assignment": {
"role": "system-architect",
"agent_id": "conceptual-planning-agent-system-architect",
"context_source": ".workflow/WFS-[topic]/.brainstorming/system-architect-context.md",
"output_location": ".workflow/WFS-[topic]/.brainstorming/system-architect/",
"flow_control": {
"pre_analysis": [
{
"step": "load_role_template",
"action": "Load system-architect planning template",
"command": "bash($(cat ~/.claude/workflows/cli-templates/planning-roles/system-architect.md))",
"output_to": "role_template"
},
{
"step": "load_user_context",
"action": "Load user responses and context for role analysis",
"command": "bash(cat .workflow/WFS-[topic]/.brainstorming/system-architect-context.md)",
"output_to": "user_context"
},
{
"step": "load_content_analysis",
"action": "Load existing content analysis documents if available",
"command": "bash(find .workflow/*/.brainstorming/ -name '*.md' -path '*/analysis/*' -o -name 'content-analysis.md' | head -5 | xargs cat 2>/dev/null || echo 'No content analysis found')",
"output_to": "content_analysis"
},
{
"step": "load_session_metadata",
"action": "Load session metadata and previous analysis state",
"command": "bash(cat .workflow/WFS-[topic]/.brainstorming/auto-session.json 2>/dev/null || echo '{}')",
"output_to": "session_metadata"
}
],
"implementation_approach": {
"task_description": "Execute dedicated system-architect conceptual analysis for: [topic]",
"role_focus": "system-architect",
"user_context": "Direct user responses from context gathering phase",
"deliverables": "conceptual_analysis, strategic_recommendations, role_perspective"
}
}
}
```
**Context Accumulation & Role Isolation**:
1. **Role template loading**: Planning role template with domain expertise via CLI
2. **User context loading**: Direct user responses and context from interactive questioning
3. **Content analysis integration**: Existing analysis documents and session metadata
4. **Context validation**: Minimum response requirements with re-prompting
5. **Conceptual analysis**: Role-specific perspective on topic without implementation details
6. **Agent delegation**: Complete context handoff to dedicated conceptual-planning-agent with all references
**Content Sources**:
- Role templates: `bash($(cat ~/.claude/workflows/cli-templates/planning-roles/<role>.md))` from `.claude/workflows/cli-templates/planning-roles/`
- User responses: `bash(cat .workflow/WFS-[topic]/.brainstorming/<role>-context.md)` from interactive questioning phase
- Content analysis: `bash(find .workflow/*/.brainstorming/ -name '*.md' -path '*/analysis/*')` existing analysis documents
- Session metadata: `bash(cat .workflow/WFS-[topic]/.brainstorming/auto-session.json)` for analysis state and context
- Conceptual focus: Strategic and planning perspective without technical implementation
**Trigger Conditions**: Topic analysis matches role domains, user provides adequate context responses, role template successfully loaded
### Role Processing Standards
**Core Principles**:
1. **Sequential Processing** - Complete each role fully before proceeding to next
2. **Context Validation** - Ensure adequate detail before agent submission
3. **Dedicated Assignment** - One conceptual-planning-agent per role
4. **Progress Tracking** - Real-time TodoWrite updates for role processing stages
**Implementation Rules**:
- **Maximum 3 roles**: Auto-selected based on topic complexity and domain overlap
- **Context validation**: Minimum response length and completeness checks
- **Agent isolation**: Each agent receives only role-specific context
- **Error recovery**: Role-specific validation and retry logic
**Role Question Templates**:
- **system-architect**: Scale requirements, integration needs, technology constraints, non-functional requirements
- **security-expert**: Sensitive data types, compliance requirements, threat concerns, auth/authz needs
- **ui-designer**: User personas, platform support, design guidelines, accessibility requirements
- **product-manager**: Business objectives, stakeholders, success metrics, timeline constraints
- **data-architect**: Data types, volume projections, compliance needs, analytics requirements
### Session Management ⚠️ CRITICAL
- **⚡ FIRST ACTION**: Check for all `.workflow/.active-*` markers before role processing
- **Multiple sessions support**: Different Claude instances can have different active brainstorming sessions
- **User selection**: If multiple active sessions found, prompt user to select which one to work with
- **Auto-session creation**: `WFS-[topic-slug]` only if no active session exists
- **Session continuity**: MUST use selected active session for all role processing
- **Context preservation**: Each role's context and agent output stored in session directory
- **Session isolation**: Each session maintains independent brainstorming state and role assignments
## Document Generation
**Workflow**: Interactive Discussion → Topic Decomposition → Role Selection → Context Gathering → Agent Delegation → Documentation → Synthesis
**Always Created**:
- **discussion-summary.md**: Main conversation points and key insights from interactive discussion
- **component-analysis.md**: Detailed breakdown of topic components from discussion phase
- **auto-session.json**: Agent assignments, context validation, completion tracking
- **[role]-context.md**: User responses per role with question-answer pairs
**Auto-Created (per role)**:
- **[role]/analysis.md**: Main role analysis from dedicated agent
- **[role]/recommendations.md**: Role-specific recommendations
- **[role]-template.md**: Loaded role planning template
**Auto-Created (multi-role)**:
- **synthesis/integrated-analysis.md**: Cross-role integration and consensus analysis
- **synthesis/consensus-matrix.md**: Agreement/disagreement analysis
- **synthesis/priority-recommendations.md**: Prioritized action items
**Document Structure**:
```
.workflow/WFS-[topic]/.brainstorming/
├── discussion-summary.md # Main conversation and insights
├── component-analysis.md # Detailed topic breakdown
├── auto-session.json # Session metadata and agent tracking
├── system-architect-context.md # User responses for system-architect
├── system-architect-template.md# Loaded role template
├── system-architect/ # Dedicated agent outputs
│ ├── analysis.md
│ ├── recommendations.md
│ └── deliverables/
├── ui-designer-context.md # User responses for ui-designer
├── ui-designer/ # Dedicated agent outputs
│ └── analysis.md
└── synthesis/ # Multi-role integration
├── integrated-analysis.md
├── consensus-matrix.md
└── priority-recommendations.md
```
## Reference Information
### Role Processing Schema (Sequential Architecture)
Each role processing follows dedicated agent pattern:
- **role**: Selected planning role name
- **template**: Loaded from cli-templates/planning-roles/
- **context**: User responses with validation
- **agent**: Dedicated conceptual-planning-agent instance
- **output**: Role-specific analysis directory
### File Structure Reference
**Architecture**: @~/.claude/workflows/workflow-architecture.md
**Role Templates**: @~/.claude/workflows/cli-templates/planning-roles/
### Execution Integration
Documents created for synthesis and action planning:
- **auto-session.json**: Agent tracking and session metadata
- **[role]-context.md**: Context loading for role analysis
- **[role]/analysis.md**: Role-specific analysis outputs
- **synthesis/**: Multi-role integration for comprehensive planning
## Error Handling
- **Role selection failure**: Default to `product-manager` with explanation
- **Context validation failure**: Re-prompt with minimum requirements
- **Agent execution failure**: Role-specific retry with corrected context
- **Template loading issues**: Graceful degradation with fallback questions
- **Multi-role conflicts**: Synthesis agent handles disagreement resolution
## Quality Standards
### Dedicated Agent Excellence
- **Single role focus**: Each agent handles exactly one role - no multi-role assignments
- **Complete context**: Each agent receives comprehensive role-specific context
- **Sequential processing**: Roles processed one at a time with full validation
- **Dedicated output**: Each agent produces role-specific analysis and deliverables
### Context Collection Excellence
- **Role-specific questioning**: Targeted questions for each role's domain expertise
- **Context validation**: Verification before agent submission to ensure completeness
- **User guidance**: Clear explanations of role perspective and question importance
- **Response quality**: Minimum response requirements with re-prompting for insufficient detail

View File

@@ -1,273 +1,205 @@
--- ---
name: business-analyst name: business-analyst
description: Business analyst perspective brainstorming for process optimization and business efficiency analysis description: Generate or update business-analyst/analysis.md addressing topic-framework discussion points
usage: /workflow:brainstorm:business-analyst <topic> usage: /workflow:brainstorm:business-analyst [topic]
argument-hint: "topic or challenge to analyze from business analysis perspective" argument-hint: "optional topic - uses existing framework if available"
examples: examples:
- /workflow:brainstorm:business-analyst
- /workflow:brainstorm:business-analyst "workflow automation opportunities" - /workflow:brainstorm:business-analyst "workflow automation opportunities"
- /workflow:brainstorm:business-analyst "business process optimization" - /workflow:brainstorm:business-analyst "business process optimization"
- /workflow:brainstorm:business-analyst "cost reduction initiatives" allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
allowed-tools: Task(conceptual-planning-agent), TodoWrite(*)
--- ---
## 📊 **Role Overview: Business Analyst** ## 📊 **Business Analyst Analysis Generator**
### Role Definition ### Purpose
Business process expert responsible for analyzing workflows, identifying requirements, and optimizing business operations to maximize value and efficiency. **Specialized command for generating business-analyst/analysis.md** that addresses topic-framework.md discussion points from business analysis perspective. Creates or updates role-specific analysis with framework references.
### Core Responsibilities ### Core Function
- **Framework-based Analysis**: Address each discussion point in topic-framework.md
- **Business Analysis Focus**: Process optimization, requirements analysis, and business efficiency perspective
- **Update Mechanism**: Create new or update existing analysis.md
- **Agent Delegation**: Use conceptual-planning-agent for analysis generation
### Analysis Scope
- **Process Analysis**: Analyze existing business processes for efficiency and improvement opportunities - **Process Analysis**: Analyze existing business processes for efficiency and improvement opportunities
- **Requirements Analysis**: Identify and define business requirements and functional specifications - **Requirements Analysis**: Identify and define business requirements and functional specifications
- **Value Assessment**: Evaluate solution business value and return on investment - **Value Analysis**: Assess cost-benefit and ROI of business initiatives
- **Change Management**: Plan and manage business process changes - **Change Management**: Plan organizational change and process transformation
### Focus Areas ## ⚙️ **Execution Protocol**
- **Process Optimization**: Workflows, automation opportunities, efficiency improvements
- **Data Analysis**: Business metrics, KPI design, performance measurement
- **Cost-Benefit**: ROI analysis, cost optimization, value creation
- **Risk Management**: Business risks, compliance requirements, change risks
### Success Metrics ### Phase 1: Session & Framework Detection
- Process efficiency improvements (time/cost reduction)
- Requirements clarity and completeness
- Stakeholder satisfaction levels
- ROI achievement and value delivery
## 🧠 **Analysis Framework**
@~/.claude/workflows/brainstorming-principles.md
### Key Analysis Questions
**1. Business Process Analysis**
- What are the bottlenecks and inefficiencies in current business processes?
- Which processes can be automated or simplified?
- What are the obstacles in cross-departmental collaboration?
**2. Business Requirements Identification**
- What are the core needs of stakeholders?
- What are the business objectives and success metrics?
- How should functional and non-functional requirements be prioritized?
**3. Value and Benefit Analysis**
- What is the expected business value of the solution?
- How does implementation cost compare to expected benefits?
- What are the risk assessments and mitigation strategies?
**4. Implementation and Change Management**
- How will changes impact existing processes?
- What training and adaptation requirements exist?
- What success metrics and monitoring mechanisms are needed?
## ⚡ **Two-Step Execution Flow**
### ⚠️ Session Management - FIRST STEP
Session detection and selection:
```bash ```bash
# Check for active sessions # Check active session and framework
active_sessions=$(find .workflow -name ".active-*" 2>/dev/null) CHECK: .workflow/.active-* marker files
if [ multiple_sessions ]; then IF active_session EXISTS:
prompt_user_to_select_session() session_id = get_active_session()
else brainstorm_dir = .workflow/WFS-{session}/.brainstorming/
use_existing_or_create_new()
fi 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 ### Phase 2: Analysis Mode Detection
**Business Analyst Perspective Questioning** ```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 business analyst context: ### Phase 3: Agent Execution with Flow Control
**Framework-Based Analysis Generation**
#### 📋 Role-Specific Questions
**1. Business Process Analysis**
- What are the current business processes and workflows that need analysis?
- Which departments, teams, or stakeholders are involved in these processes?
- What are the key bottlenecks, inefficiencies, or pain points you've observed?
- What metrics or KPIs are currently used to measure process performance?
**2. Cost and Resource Analysis**
- What are the current costs associated with these processes (time, money, resources)?
- How much time do stakeholders spend on these activities daily/weekly?
- What technology, tools, or systems are currently being used?
- What budget constraints or financial targets need to be considered?
**3. Business Requirements and Objectives**
- What are the primary business objectives this analysis should achieve?
- Who are the key stakeholders and what are their specific needs?
- What are the success criteria and how will you measure improvement?
- Are there any compliance, regulatory, or governance requirements?
**4. Change Management and Implementation**
- How ready is the organization for process changes?
- What training or change management support might be needed?
- What timeline or deadlines are we working with?
- What potential resistance or challenges do you anticipate?
#### Context Validation
- **Minimum Response**: Each answer must be ≥50 characters
- **Re-prompting**: Insufficient detail triggers follow-up questions
- **Context Storage**: Save responses to `.brainstorming/business-analyst-context.md`
### Step 2: Agent Assignment with Flow Control
**Dedicated Agent Execution**
```bash ```bash
Task(conceptual-planning-agent): " Task(conceptual-planning-agent): "
[FLOW_CONTROL] [FLOW_CONTROL]
Execute dedicated business analyst conceptual analysis for: {topic} Execute business-analyst analysis for existing topic framework
## Context Loading
ASSIGNED_ROLE: business-analyst ASSIGNED_ROLE: business-analyst
OUTPUT_LOCATION: .brainstorming/business-analyst/ OUTPUT_LOCATION: .workflow/WFS-{session}/.brainstorming/business-analyst/
USER_CONTEXT: {validated_responses_from_context_gathering} ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
Flow Control Steps: ## Flow Control Steps
[ 1. **load_topic_framework**
{ - Action: Load structured topic discussion framework
\"step\": \"load_role_template\", - Command: Read(.workflow/WFS-{session}/.brainstorming/topic-framework.md)
\"action\": \"Load business-analyst planning template\", - Output: topic_framework_content
\"command\": \"bash($(cat ~/.claude/workflows/cli-templates/planning-roles/business-analyst.md))\",
\"output_to\": \"role_template\"
}
]
Conceptual Analysis Requirements: 2. **load_role_template**
- Apply business analyst perspective to topic analysis - Action: Load business-analyst planning template
- Focus on process optimization, cost-benefit analysis, and change management - Command: bash($(cat ~/.claude/workflows/cli-templates/planning-roles/business-analyst.md))
- Use loaded role template framework for analysis structure - Output: role_template_guidelines
- Generate role-specific deliverables in designated output location
- Address all user context from questioning phase
Deliverables: 3. **load_session_metadata**
- analysis.md: Main business analyst analysis - Action: Load session metadata and existing context
- recommendations.md: Business analyst recommendations - Command: Read(.workflow/WFS-{session}/.brainstorming/session.json)
- deliverables/: Business analyst-specific outputs as defined in role template - Output: session_context
Embody business analyst role expertise for comprehensive conceptual planning." ## Analysis Requirements
**Framework Reference**: Address all discussion points in topic-framework.md from business analysis perspective
**Role Focus**: Process optimization, requirements analysis, business efficiency
**Structured Approach**: Create analysis.md addressing framework discussion points
**Template Integration**: Apply role template guidelines within framework structure
## Expected Deliverables
1. **analysis.md**: Comprehensive business 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 business analysis expertise
- Provide process optimization recommendations and requirements specifications
- Include cost-benefit analysis and change management considerations
- Reference framework document using @ notation for integration
"
``` ```
### Progress Tracking ## 📋 **TodoWrite Integration**
TodoWrite tracking for two-step process:
```json ### Workflow Progress Tracking
[ ```javascript
{"content": "Gather business analyst context through role-specific questioning", "status": "in_progress", "activeForm": "Gathering context"}, TodoWrite({
{"content": "Validate context responses and save to business-analyst-context.md", "status": "pending", "activeForm": "Validating context"}, todos: [
{"content": "Load business-analyst planning template via flow control", "status": "pending", "activeForm": "Loading template"}, {
{"content": "Execute dedicated conceptual-planning-agent for business-analyst role", "status": "pending", "activeForm": "Executing agent"} 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 business-analyst analysis using conceptual-planning-agent with FLOW_CONTROL",
status: "pending",
activeForm: "Executing business-analyst framework analysis"
},
{
content: "Generate analysis.md addressing all framework discussion points",
status: "pending",
activeForm: "Generating structured business-analyst analysis"
},
{
content: "Update session.json with business-analyst completion status",
status: "pending",
activeForm: "Updating session metadata"
}
]
});
``` ```
## 📊 **Output Structure** ## 📊 **Output Structure**
### Output Location ### Framework-Based Analysis
``` ```
.workflow/WFS-{topic-slug}/.brainstorming/business-analyst/ .workflow/WFS-{session}/.brainstorming/business-analyst/
── analysis.md # Main business analysis and process assessment ── analysis.md # Structured analysis addressing topic-framework.md discussion points
├── requirements.md # Detailed business requirements and specifications
├── business-case.md # Cost-benefit analysis and financial justification
└── implementation-plan.md # Change management and implementation strategy
``` ```
### Document Templates ### Analysis Document Structure
#### analysis.md Structure
```markdown ```markdown
# Business Analyst Analysis: {Topic} # Business Analyst Analysis: [Topic from Framework]
*Generated: {timestamp}*
## Executive Summary ## Framework Reference
[Overview of key business analysis findings and recommendations] **Topic Framework**: @../topic-framework.md
**Role Focus**: Business Analysis perspective
## Current State Assessment ## Discussion Points Analysis
### Business Process Mapping [Address each point from topic-framework.md with business analysis expertise]
### Stakeholder Analysis
### Performance Metrics Analysis
### Pain Points and Inefficiencies
## Business Requirements ### Core Requirements (from framework)
### Functional Requirements [Business analysis perspective on requirements]
### Non-Functional Requirements
### Stakeholder Needs Analysis
### Requirements Prioritization
## Process Optimization Opportunities ### Technical Considerations (from framework)
### Automation Potential [Business process and workflow considerations]
### Workflow Improvements
### Resource Optimization
### Quality Enhancements
## Financial Analysis ### User Experience Factors (from framework)
### Cost-Benefit Analysis [Business user experience and stakeholder considerations]
### ROI Calculations
### Budget Requirements
### Financial Projections
## Risk Assessment ### Implementation Challenges (from framework)
### Business Risks [Change management and process transformation challenges]
### Operational Risks
### Mitigation Strategies
### Contingency Planning
## Implementation Strategy ### Success Metrics (from framework)
### Change Management Plan [Business success metrics and performance indicators]
### Training Requirements
### Timeline and Milestones
### Success Metrics and KPIs
## Recommendations ## Business Analysis Specific Recommendations
### Immediate Actions (0-3 months) [Role-specific business process recommendations and solutions]
### Medium-term Initiatives (3-12 months)
### Long-term Strategic Goals (12+ months) ---
### Resource Requirements *Generated by business-analyst analysis addressing structured framework*
``` ```
## 🔄 **Session Integration** ## 🔄 **Session Integration**
### Status Synchronization ### Completion Status Update
After analysis completion, update `workflow-session.json`:
```json ```json
{ {
"phases": { "business_analyst": {
"BRAINSTORM": { "status": "completed",
"business_analyst": { "framework_addressed": true,
"status": "completed", "output_location": ".workflow/WFS-{session}/.brainstorming/business-analyst/analysis.md",
"completed_at": "timestamp", "framework_reference": "@../topic-framework.md"
"output_directory": ".workflow/WFS-{topic}/.brainstorming/business-analyst/",
"key_insights": ["process_optimization", "cost_saving", "efficiency_gain"]
}
}
} }
} }
``` ```
### Collaboration with Other Roles ### Integration Points
Business analyst perspective provides to other roles: - **Framework Reference**: @../topic-framework.md for structured discussion points
- **Business requirements and constraints** → Product Manager - **Cross-Role Synthesis**: Business analysis insights available for synthesis-report.md integration
- **Process technology requirements** → System Architect - **Agent Autonomy**: Independent execution with framework guidance
- **Business process interface needs** → UI Designer
- **Business data requirements** → Data Architect
- **Business security requirements** → Security Expert
## ✅ **Quality Standards**
### Required Analysis Elements
- [ ] Detailed business process mapping
- [ ] Clear requirements specifications and priorities
- [ ] Quantified cost-benefit analysis
- [ ] Comprehensive risk assessment
- [ ] Actionable implementation plan
### Business Analysis Principles Checklist
- [ ] Value-oriented: Focus on business value creation
- [ ] Data-driven: Analysis based on facts and data
- [ ] Holistic thinking: Consider entire business ecosystem
- [ ] Risk awareness: Identify and manage various risks
- [ ] Sustainability: Long-term maintainability and improvement
### Analysis Quality Metrics
- [ ] Requirements completeness and accuracy
- [ ] Quantified benefits from process optimization
- [ ] Comprehensiveness of risk assessment
- [ ] Feasibility of implementation plan
- [ ] Stakeholder satisfaction levels

View File

@@ -1,274 +1,205 @@
--- ---
name: data-architect name: data-architect
description: Data architect perspective brainstorming for data modeling, flow, and analytics analysis description: Generate or update data-architect/analysis.md addressing topic-framework discussion points
usage: /workflow:brainstorm:data-architect <topic> usage: /workflow:brainstorm:data-architect [topic]
argument-hint: "topic or challenge to analyze from data architecture perspective" argument-hint: "optional topic - uses existing framework if available"
examples: examples:
- /workflow:brainstorm:data-architect
- /workflow:brainstorm:data-architect "user analytics data pipeline" - /workflow:brainstorm:data-architect "user analytics data pipeline"
- /workflow:brainstorm:data-architect "real-time data processing system" - /workflow:brainstorm:data-architect "real-time data processing system"
- /workflow:brainstorm:data-architect "data warehouse modernization" allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
allowed-tools: Task(conceptual-planning-agent), TodoWrite(*)
--- ---
## 📊 **Role Overview: Data Architect** ## 📊 **Data Architect Analysis Generator**
### Role Definition ### Purpose
Strategic data professional responsible for designing scalable, efficient data architectures that enable data-driven decision making through robust data models, processing pipelines, and analytics platforms. **Specialized command for generating data-architect/analysis.md** that addresses topic-framework.md discussion points from data architecture perspective. Creates or updates role-specific analysis with framework references.
### Core Responsibilities ### Core Function
- **Data Model Design**: Create efficient and scalable data models and schemas - **Framework-based Analysis**: Address each discussion point in topic-framework.md
- **Data Flow Design**: Plan data collection, processing, and storage workflows - **Data Architecture Focus**: Data models, pipelines, governance, and analytics perspective
- **Data Quality Management**: Ensure data accuracy, completeness, and consistency - **Update Mechanism**: Create new or update existing analysis.md
- **Analytics and Insights**: Design data analysis and business intelligence solutions - **Agent Delegation**: Use conceptual-planning-agent for analysis generation
### Focus Areas ### Analysis Scope
- **Data Modeling**: Relational models, NoSQL, data warehouses, lakehouse architectures - **Data Model Design**: Efficient and scalable data models and schemas
- **Data Pipelines**: ETL/ELT processes, real-time processing, batch processing - **Data Flow Design**: Data collection, processing, and storage workflows
- **Data Governance**: Data quality, security, privacy, compliance frameworks - **Data Quality Management**: Data accuracy, completeness, and consistency
- **Analytics Platforms**: BI tools, machine learning infrastructure, reporting systems - **Analytics and Insights**: Data analysis and business intelligence solutions
### Success Metrics ## ⚙️ **Execution Protocol**
- Data quality and consistency metrics
- Processing performance and throughput
- Analytics accuracy and business impact
- Data governance and compliance adherence
## 🧠 **Analysis Framework** ### Phase 1: Session & Framework Detection
@~/.claude/workflows/brainstorming-principles.md
### Key Analysis Questions
**1. Data Requirements and Sources**
- What data is needed to support business decisions and analytics?
- How reliable and high-quality are the available data sources?
- What is the balance between real-time and historical data needs?
**2. Data Architecture and Storage**
- What is the most appropriate data storage solution for requirements?
- How should we design scalable and maintainable data models?
- What are the optimal data partitioning and indexing strategies?
**3. Data Processing and Workflows**
- What are the performance requirements for data processing?
- How should we design fault-tolerant and resilient data pipelines?
- What data versioning and change management strategies are needed?
**4. Analytics and Reporting**
- How can we support diverse analytical requirements and use cases?
- What balance between real-time dashboards and periodic reports is optimal?
- What self-service analytics and data visualization capabilities are needed?
## ⚡ **Two-Step Execution Flow**
### ⚠️ Session Management - FIRST STEP
Session detection and selection:
```bash ```bash
# Check for active sessions # Check active session and framework
active_sessions=$(find .workflow -name ".active-*" 2>/dev/null) CHECK: .workflow/.active-* marker files
if [ multiple_sessions ]; then IF active_session EXISTS:
prompt_user_to_select_session() session_id = get_active_session()
else brainstorm_dir = .workflow/WFS-{session}/.brainstorming/
use_existing_or_create_new()
fi 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 ### Phase 2: Analysis Mode Detection
**Data Architect Perspective Questioning** ```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 data architect context: ### Phase 3: Agent Execution with Flow Control
**Framework-Based Analysis Generation**
#### 📋 Role-Specific Questions
**1. Data Models and Flow Patterns**
- What types of data will you be working with (structured, semi-structured, unstructured)?
- What are the expected data volumes and growth projections?
- What are the primary data sources and how frequently will data be updated?
- Are there existing data models or schemas that need to be considered?
**2. Storage Strategies and Performance**
- What are the query performance requirements and expected response times?
- Do you need real-time processing, batch processing, or both?
- What are the data retention and archival requirements?
- Are there specific compliance or regulatory requirements for data storage?
**3. Analytics Requirements and Insights**
- What types of analytics and reporting capabilities are needed?
- Who are the primary users of the data and what are their skill levels?
- What business intelligence or machine learning use cases need to be supported?
- Are there specific dashboard or visualization requirements?
**4. Data Governance and Quality**
- What data quality standards and validation rules need to be implemented?
- Who owns the data and what are the access control requirements?
- Are there data privacy or security concerns that need to be addressed?
- What data lineage and auditing capabilities are required?
#### Context Validation
- **Minimum Response**: Each answer must be ≥50 characters
- **Re-prompting**: Insufficient detail triggers follow-up questions
- **Context Storage**: Save responses to `.brainstorming/data-architect-context.md`
### Step 2: Agent Assignment with Flow Control
**Dedicated Agent Execution**
```bash ```bash
Task(conceptual-planning-agent): " Task(conceptual-planning-agent): "
[FLOW_CONTROL] [FLOW_CONTROL]
Execute dedicated data architect conceptual analysis for: {topic} Execute data-architect analysis for existing topic framework
## Context Loading
ASSIGNED_ROLE: data-architect ASSIGNED_ROLE: data-architect
OUTPUT_LOCATION: .brainstorming/data-architect/ OUTPUT_LOCATION: .workflow/WFS-{session}/.brainstorming/data-architect/
USER_CONTEXT: {validated_responses_from_context_gathering} ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
Flow Control Steps: ## Flow Control Steps
[ 1. **load_topic_framework**
{ - Action: Load structured topic discussion framework
\"step\": \"load_role_template\", - Command: Read(.workflow/WFS-{session}/.brainstorming/topic-framework.md)
\"action\": \"Load data-architect planning template\", - Output: topic_framework_content
\"command\": \"bash($(cat ~/.claude/workflows/cli-templates/planning-roles/data-architect.md))\",
\"output_to\": \"role_template\"
}
]
Conceptual Analysis Requirements: 2. **load_role_template**
- Apply data architect perspective to topic analysis - Action: Load data-architect planning template
- Focus on data models, flow patterns, storage strategies, and analytics requirements - Command: bash($(cat ~/.claude/workflows/cli-templates/planning-roles/data-architect.md))
- Use loaded role template framework for analysis structure - Output: role_template_guidelines
- Generate role-specific deliverables in designated output location
- Address all user context from questioning phase
Deliverables: 3. **load_session_metadata**
- analysis.md: Main data architect analysis - Action: Load session metadata and existing context
- recommendations.md: Data architect recommendations - Command: Read(.workflow/WFS-{session}/.brainstorming/session.json)
- deliverables/: Data architect-specific outputs as defined in role template - Output: session_context
Embody data architect role expertise for comprehensive conceptual planning." ## Analysis Requirements
**Framework Reference**: Address all discussion points in topic-framework.md from data architecture perspective
**Role Focus**: Data models, pipelines, governance, analytics platforms
**Structured Approach**: Create analysis.md addressing framework discussion points
**Template Integration**: Apply role template guidelines within framework structure
## Expected Deliverables
1. **analysis.md**: Comprehensive data architecture 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 data architecture expertise
- Provide data model designs, pipeline architectures, and governance strategies
- Include scalability, performance, and quality considerations
- Reference framework document using @ notation for integration
"
``` ```
### Progress Tracking ## 📋 **TodoWrite Integration**
TodoWrite tracking for two-step process:
```json ### Workflow Progress Tracking
[ ```javascript
{"content": "Gather data architect context through role-specific questioning", "status": "in_progress", "activeForm": "Gathering context"}, TodoWrite({
{"content": "Validate context responses and save to data-architect-context.md", "status": "pending", "activeForm": "Validating context"}, todos: [
{"content": "Load data-architect planning template via flow control", "status": "pending", "activeForm": "Loading template"}, {
{"content": "Execute dedicated conceptual-planning-agent for data-architect role", "status": "pending", "activeForm": "Executing agent"} 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 data-architect analysis using conceptual-planning-agent with FLOW_CONTROL",
status: "pending",
activeForm: "Executing data-architect framework analysis"
},
{
content: "Generate analysis.md addressing all framework discussion points",
status: "pending",
activeForm: "Generating structured data-architect analysis"
},
{
content: "Update session.json with data-architect completion status",
status: "pending",
activeForm: "Updating session metadata"
}
]
});
``` ```
## 📊 **Output Specification** ## 📊 **Output Structure**
### Output Location ### Framework-Based Analysis
``` ```
.workflow/WFS-{topic-slug}/.brainstorming/data-architect/ .workflow/WFS-{session}/.brainstorming/data-architect/
── analysis.md # Primary data architecture analysis ── analysis.md # Structured analysis addressing topic-framework.md discussion points
├── data-model.md # Data models, schemas, and relationships
├── pipeline-design.md # Data processing and ETL/ELT workflows
└── governance-plan.md # Data quality, security, and governance
``` ```
### Document Templates ### Analysis Document Structure
#### analysis.md Structure
```markdown ```markdown
# Data Architect Analysis: {Topic} # Data Architect Analysis: [Topic from Framework]
*Generated: {timestamp}*
## Executive Summary ## Framework Reference
[Key data architecture findings and recommendations overview] **Topic Framework**: @../topic-framework.md
**Role Focus**: Data Architecture perspective
## Current Data Landscape ## Discussion Points Analysis
### Existing Data Sources [Address each point from topic-framework.md with data architecture expertise]
### Current Data Architecture
### Data Quality Assessment
### Performance Bottlenecks
## Data Requirements Analysis ### Core Requirements (from framework)
### Business Data Needs [Data architecture perspective on requirements]
### Technical Data Requirements
### Data Volume and Growth Projections
### Real-time vs Batch Processing Needs
## Proposed Data Architecture ### Technical Considerations (from framework)
### Data Model Design [Data model, pipeline, and storage considerations]
### Storage Architecture
### Processing Pipeline Design
### Integration Patterns
## Data Quality and Governance ### User Experience Factors (from framework)
### Data Quality Framework [Data access patterns and analytics user experience]
### Governance Policies
### Security and Privacy Controls
### Compliance Requirements
## Analytics and Reporting Strategy ### Implementation Challenges (from framework)
### Business Intelligence Architecture [Data migration, quality, and governance challenges]
### Self-Service Analytics Design
### Performance Monitoring
### Scalability Planning
## Implementation Roadmap ### Success Metrics (from framework)
### Migration Strategy [Data quality metrics and analytics success criteria]
### Technology Stack Recommendations
### Resource Requirements ## Data Architecture Specific Recommendations
### Risk Mitigation Plan [Role-specific data architecture recommendations and solutions]
---
*Generated by data-architect analysis addressing structured framework*
``` ```
## 🔄 **Session Integration** ## 🔄 **Session Integration**
### Status Synchronization ### Completion Status Update
Upon completion, update `workflow-session.json`:
```json ```json
{ {
"phases": { "data_architect": {
"BRAINSTORM": { "status": "completed",
"data_architect": { "framework_addressed": true,
"status": "completed", "output_location": ".workflow/WFS-{session}/.brainstorming/data-architect/analysis.md",
"completed_at": "timestamp", "framework_reference": "@../topic-framework.md"
"output_directory": ".workflow/WFS-{topic}/.brainstorming/data-architect/",
"key_insights": ["data_model_optimization", "pipeline_architecture", "analytics_strategy"]
}
}
} }
} }
``` ```
### Cross-Role Collaboration ### Integration Points
Data architect perspective provides: - **Framework Reference**: @../topic-framework.md for structured discussion points
- **Data Storage Requirements** → System Architect - **Cross-Role Synthesis**: Data architecture insights available for synthesis-report.md integration
- **Analytics Data Requirements** → Product Manager - **Agent Autonomy**: Independent execution with framework guidance
- **Data Visualization Specifications** → UI Designer
- **Data Security Framework** → Security Expert
- **Feature Data Requirements** → Feature Planner
## ✅ **Quality Assurance**
### Required Architecture Elements
- [ ] Comprehensive data model with clear relationships and constraints
- [ ] Scalable data pipeline design with error handling and monitoring
- [ ] Data quality framework with validation rules and metrics
- [ ] Governance plan addressing security, privacy, and compliance
- [ ] Analytics architecture supporting business intelligence needs
### Data Architecture Principles
- [ ] **Scalability**: Architecture can handle data volume and velocity growth
- [ ] **Quality**: Built-in data validation, cleansing, and quality monitoring
- [ ] **Security**: Data protection, access controls, and privacy compliance
- [ ] **Performance**: Optimized for query performance and processing efficiency
- [ ] **Maintainability**: Clear data lineage, documentation, and change management
### Implementation Validation
- [ ] **Technical Feasibility**: All proposed solutions are technically achievable
- [ ] **Performance Requirements**: Architecture meets processing and query performance needs
- [ ] **Cost Effectiveness**: Storage and processing costs are optimized and sustainable
- [ ] **Governance Compliance**: Meets regulatory and organizational data requirements
- [ ] **Future Readiness**: Design accommodates anticipated growth and changing needs
### Data Quality Standards
- [ ] **Accuracy**: Data validation rules ensure correctness and consistency
- [ ] **Completeness**: Strategies for handling missing data and ensuring coverage
- [ ] **Timeliness**: Data freshness requirements met through appropriate processing
- [ ] **Consistency**: Data definitions and formats standardized across systems
- [ ] **Lineage**: Complete data lineage tracking from source to consumption

View File

@@ -1,273 +1,205 @@
--- ---
name: feature-planner name: feature-planner
description: Feature planner perspective brainstorming for feature development and planning analysis description: Generate or update feature-planner/analysis.md addressing topic-framework discussion points
usage: /workflow:brainstorm:feature-planner <topic> usage: /workflow:brainstorm:feature-planner [topic]
argument-hint: "topic or challenge to analyze from feature planning perspective" argument-hint: "optional topic - uses existing framework if available"
examples: examples:
- /workflow:brainstorm:feature-planner
- /workflow:brainstorm:feature-planner "user dashboard enhancement" - /workflow:brainstorm:feature-planner "user dashboard enhancement"
- /workflow:brainstorm:feature-planner "mobile app feature roadmap" - /workflow:brainstorm:feature-planner "mobile app feature roadmap"
- /workflow:brainstorm:feature-planner "integration capabilities planning" allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
allowed-tools: Task(conceptual-planning-agent), TodoWrite(*)
--- ---
## 🔧 **Role Overview: Feature Planner** ## 🔧 **Feature Planner Analysis Generator**
### Role Definition ### Purpose
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. **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 ### Core Function
- **Feature Specification**: Transform business requirements into detailed feature specifications - **Framework-based Analysis**: Address each discussion point in topic-framework.md
- **Development Planning**: Create development roadmaps and manage feature priorities - **Feature Development Focus**: Feature specification, development planning, and delivery management
- **Quality Assurance**: Design testing strategies and acceptance criteria - **Update Mechanism**: Create new or update existing analysis.md
- **Delivery Management**: Plan feature releases and manage implementation timelines - **Agent Delegation**: Use conceptual-planning-agent for analysis generation
### Focus Areas ### Analysis Scope
- **Feature Design**: User stories, acceptance criteria, feature specifications - **Feature Specification**: Transform requirements into detailed specifications
- **Development Planning**: Sprint planning, milestones, dependency management - **Development Planning**: Sprint planning, milestones, and dependency management
- **Quality Assurance**: Testing strategies, quality gates, acceptance processes - **Quality Assurance**: Testing strategies and acceptance criteria
- **Release Management**: Release planning, version control, change management - **Delivery Management**: Release planning and implementation timelines
### Success Metrics ## ⚙️ **Execution Protocol**
- Feature delivery on time and within scope
- Quality standards and acceptance criteria met
- User satisfaction with delivered features
- Development team productivity and efficiency
## 🧠 **分析框架** ### Phase 1: Session & Framework Detection
@~/.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:
```bash ```bash
# Check for active sessions # Check active session and framework
active_sessions=$(find .workflow -name ".active-*" 2>/dev/null) CHECK: .workflow/.active-* marker files
if [ multiple_sessions ]; then IF active_session EXISTS:
prompt_user_to_select_session() session_id = get_active_session()
else brainstorm_dir = .workflow/WFS-{session}/.brainstorming/
use_existing_or_create_new()
fi 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 ### Phase 2: Analysis Mode Detection
**Feature Planner Perspective Questioning** ```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: ### Phase 3: Agent Execution with Flow Control
**Framework-Based Analysis Generation**
#### 📋 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**
```bash ```bash
Task(conceptual-planning-agent): " Task(conceptual-planning-agent): "
[FLOW_CONTROL] [FLOW_CONTROL]
Execute dedicated feature planner conceptual analysis for: {topic} Execute feature-planner analysis for existing topic framework
## Context Loading
ASSIGNED_ROLE: feature-planner ASSIGNED_ROLE: feature-planner
OUTPUT_LOCATION: .brainstorming/feature-planner/ OUTPUT_LOCATION: .workflow/WFS-{session}/.brainstorming/feature-planner/
USER_CONTEXT: {validated_responses_from_context_gathering} ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
Flow Control Steps: ## Flow Control Steps
[ 1. **load_topic_framework**
{ - Action: Load structured topic discussion framework
\"step\": \"load_role_template\", - Command: Read(.workflow/WFS-{session}/.brainstorming/topic-framework.md)
\"action\": \"Load feature-planner planning template\", - Output: topic_framework_content
\"command\": \"bash($(cat ~/.claude/workflows/cli-templates/planning-roles/feature-planner.md))\",
\"output_to\": \"role_template\"
}
]
Conceptual Analysis Requirements: 2. **load_role_template**
- Apply feature planner perspective to topic analysis - Action: Load feature-planner planning template
- Focus on implementation complexity, dependency mapping, risk assessment, and technical feasibility - Command: bash($(cat ~/.claude/workflows/cli-templates/planning-roles/feature-planner.md))
- Use loaded role template framework for analysis structure - Output: role_template_guidelines
- Generate role-specific deliverables in designated output location
- Address all user context from questioning phase
Deliverables: 3. **load_session_metadata**
- analysis.md: Main feature planner analysis - Action: Load session metadata and existing context
- recommendations.md: Feature planner recommendations - Command: Read(.workflow/WFS-{session}/.brainstorming/session.json)
- deliverables/: Feature planner-specific outputs as defined in role template - 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 Integration**
TodoWrite tracking for two-step process:
```json ### Workflow Progress Tracking
[ ```javascript
{"content": "Gather feature planner context through role-specific questioning", "status": "in_progress", "activeForm": "Gathering context"}, TodoWrite({
{"content": "Validate context responses and save to feature-planner-context.md", "status": "pending", "activeForm": "Validating context"}, todos: [
{"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"} 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/ .workflow/WFS-{session}/.brainstorming/feature-planner/
── analysis.md # 主要功能分析和规范 ── analysis.md # Structured analysis addressing topic-framework.md discussion points
├── user-stories.md # 详细用户故事和验收标准
├── development-plan.md # 开发时间线和资源规划
└── testing-strategy.md # 质量保证和测试方法
``` ```
### 文档模板 ### Analysis Document Structure
#### analysis.md 结构
```markdown ```markdown
# Feature Planner Analysis: {Topic} # Feature Planner Analysis: [Topic from Framework]
*Generated: {timestamp}*
## Executive Summary ## Framework Reference
[核心功能规划发现和建议概述] **Topic Framework**: @../topic-framework.md
**Role Focus**: Feature Development perspective
## Feature Requirements Overview ## Discussion Points Analysis
### Core Feature Specifications [Address each point from topic-framework.md with feature development expertise]
### User Story Summary
### Feature Scope and Boundaries
### Success Criteria and KPIs
## Feature Architecture Design ### Core Requirements (from framework)
### Feature Components and Modules [Feature development perspective on requirements]
### Integration Points and Dependencies
### APIs and Data Interfaces
### Configuration and Customization
## Development Planning ### Technical Considerations (from framework)
### Effort Estimation and Complexity [Feature architecture and development considerations]
### Development Phases and Milestones
### Resource Requirements
### Risk Assessment and Mitigation
## Quality Assurance Strategy ### User Experience Factors (from framework)
### Testing Approach and Coverage [Feature usability and user story considerations]
### Performance and Scalability Testing
### User Acceptance Testing Plan
### Quality Gates and Standards
## Delivery and Release Strategy ### Implementation Challenges (from framework)
### Release Planning and Versioning [Development complexity and delivery considerations]
### Deployment Strategy
### Feature Rollout Plan
### Post-Release Support
## Feature Prioritization ### Success Metrics (from framework)
### Priority Matrix (High/Medium/Low) [Feature success metrics and acceptance criteria]
### Business Value Assessment
### Development Complexity Analysis
### Recommended Implementation Order
## Implementation Roadmap ## Feature Development Specific Recommendations
### Phase 1: Core Features (Weeks 1-4) [Role-specific feature planning recommendations and strategies]
### Phase 2: Enhanced Features (Weeks 5-8)
### Phase 3: Advanced Features (Weeks 9-12) ---
### Continuous Improvement Plan *Generated by feature-planner analysis addressing structured framework*
``` ```
## 🔄 **会话集成** ## 🔄 **Session Integration**
### 状态同步 ### Completion Status Update
分析完成后,更新 `workflow-session.json`:
```json ```json
{ {
"phases": { "feature_planner": {
"BRAINSTORM": { "status": "completed",
"feature_planner": { "framework_addressed": true,
"status": "completed", "output_location": ".workflow/WFS-{session}/.brainstorming/feature-planner/analysis.md",
"completed_at": "timestamp", "framework_reference": "@../topic-framework.md"
"output_directory": ".workflow/WFS-{topic}/.brainstorming/feature-planner/",
"key_insights": ["feature_specification", "development_timeline", "quality_requirement"]
}
}
} }
} }
``` ```
### 与其他角色的协作 ### Integration Points
功能规划师视角为其他角色提供: - **Framework Reference**: @../topic-framework.md for structured discussion points
- **功能优先级和规划** → Product Manager - **Cross-Role Synthesis**: Feature development insights available for synthesis-report.md integration
- **技术实现需求** → System Architect - **Agent Autonomy**: Independent execution with framework guidance
- **界面功能要求** → UI Designer
- **数据功能需求** → Data Architect
- **功能安全需求** → Security Expert
## ✅ **质量标准**
### 必须包含的规划元素
- [ ] 详细的功能规范和用户故事
- [ ] 现实的开发时间估算
- [ ] 全面的测试策略
- [ ] 明确的质量标准
- [ ] 可执行的发布计划
### 功能规划原则检查
- [ ] 用户价值:每个功能都有明确的用户价值
- [ ] 可测试性:所有功能都有验收标准
- [ ] 可维护性:考虑长期维护和扩展
- [ ] 可交付性:计划符合团队能力和资源
- [ ] 可测量性:有明确的成功指标
### 交付质量评估
- [ ] 功能完整性和正确性
- [ ] 性能和稳定性指标
- [ ] 用户体验和满意度
- [ ] 代码质量和可维护性
- [ ] 文档完整性和准确性

View File

@@ -1,13 +1,13 @@
--- ---
name: innovation-lead name: innovation-lead
description: Innovation lead perspective brainstorming for emerging technologies and future opportunities analysis description: Generate or update innovation-lead/analysis.md addressing topic-framework discussion points
usage: /workflow:brainstorm:innovation-lead <topic> usage: /workflow:brainstorm:innovation-lead [topic]
argument-hint: "topic or challenge to analyze from innovation and emerging technology perspective" argument-hint: "optional topic - uses existing framework if available"
examples: examples:
- /workflow:brainstorm:innovation-lead
- /workflow:brainstorm:innovation-lead "AI integration opportunities" - /workflow:brainstorm:innovation-lead "AI integration opportunities"
- /workflow:brainstorm:innovation-lead "future technology trends" - /workflow:brainstorm:innovation-lead "future technology trends"
- /workflow:brainstorm:innovation-lead "disruptive innovation strategy" allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
allowed-tools: Task(conceptual-planning-agent), TodoWrite(*)
--- ---
## 🚀 **Role Overview: Innovation Lead** ## 🚀 **Role Overview: Innovation Lead**
@@ -158,116 +158,97 @@ TodoWrite tracking for two-step process:
] ]
``` ```
## 📊 **输出结构** ## 📋 **TodoWrite Integration**
### 保存位置 ### Workflow Progress Tracking
``` ```javascript
.workflow/WFS-{topic-slug}/.brainstorming/innovation-lead/ TodoWrite({
├── analysis.md # 主要创新分析和机会评估 todos: [
├── technology-roadmap.md # 技术趋势和未来场景 {
├── innovation-concepts.md # 突破性想法和概念开发 content: "Detect active session and locate topic framework",
└── strategy-implementation.md # 创新策略和执行计划 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 innovation-lead analysis using conceptual-planning-agent with FLOW_CONTROL",
status: "pending",
activeForm: "Executing innovation-lead framework analysis"
},
{
content: "Generate analysis.md addressing all framework discussion points",
status: "pending",
activeForm: "Generating structured innovation-lead analysis"
},
{
content: "Update session.json with innovation-lead completion status",
status: "pending",
activeForm: "Updating session metadata"
}
]
});
``` ```
### 文档模板 ## 📊 **Output Structure**
#### analysis.md 结构 ### Framework-Based Analysis
```
.workflow/WFS-{session}/.brainstorming/innovation-lead/
└── analysis.md # Structured analysis addressing topic-framework.md discussion points
```
### Analysis Document Structure
```markdown ```markdown
# Innovation Lead Analysis: {Topic} # Innovation Lead Analysis: [Topic from Framework]
*Generated: {timestamp}*
## Executive Summary ## Framework Reference
[核心创新机会和战略建议概述] **Topic Framework**: @../topic-framework.md
**Role Focus**: Innovation and Emerging Technology perspective
## Technology Landscape Assessment ## Discussion Points Analysis
### Emerging Technologies Overview [Address each point from topic-framework.md with innovation expertise]
### Technology Maturity Analysis
### Convergence Opportunities
### Disruptive Potential Assessment
## Innovation Opportunity Analysis ### Core Requirements (from framework)
### Market Whitespace Identification [Innovation perspective on emerging technology requirements]
### Unmet Needs and Pain Points
### Disruptive Innovation Potential
### Blue Ocean Opportunities
## Competitive Intelligence ### Technical Considerations (from framework)
### Competitor Innovation Strategies [Future technology and breakthrough considerations]
### Patent Landscape Analysis
### Startup Ecosystem Insights
### Investment and Funding Trends
## Future Scenarios and Trends ### User Experience Factors (from framework)
### Short-term Innovations (0-2 years) [Future user behavior and interaction trends]
### Medium-term Disruptions (2-5 years)
### Long-term Transformations (5+ years)
### Wild Card Scenarios
## Innovation Concepts ### Implementation Challenges (from framework)
### Breakthrough Ideas [Innovation implementation and market adoption considerations]
### Proof-of-Concept Opportunities
### Platform Innovation Possibilities
### Ecosystem Partnership Ideas
## Strategic Recommendations ### Success Metrics (from framework)
### Innovation Investment Priorities [Innovation success metrics and breakthrough criteria]
### Technology Partnership Strategy
### Capability Building Requirements
### Risk Mitigation Approaches
## Implementation Roadmap ## Innovation Specific Recommendations
### Innovation Pilot Programs [Role-specific innovation opportunities and breakthrough concepts]
### Technology Validation Milestones
### Scaling and Commercialization Plan ---
### Success Metrics and KPIs *Generated by innovation-lead analysis addressing structured framework*
``` ```
## 🔄 **会话集成** ## 🔄 **Session Integration**
### 状态同步 ### Completion Status Update
分析完成后,更新 `workflow-session.json`:
```json ```json
{ {
"phases": { "innovation_lead": {
"BRAINSTORM": { "status": "completed",
"innovation_lead": { "framework_addressed": true,
"status": "completed", "output_location": ".workflow/WFS-{session}/.brainstorming/innovation-lead/analysis.md",
"completed_at": "timestamp", "framework_reference": "@../topic-framework.md"
"output_directory": ".workflow/WFS-{topic}/.brainstorming/innovation-lead/",
"key_insights": ["breakthrough_opportunity", "emerging_technology", "disruptive_potential"]
}
}
} }
} }
``` ```
### 与其他角色的协作 ### Integration Points
创新领导视角为其他角色提供: - **Framework Reference**: @../topic-framework.md for structured discussion points
- **创新机会和趋势** → Product Manager - **Cross-Role Synthesis**: Innovation insights available for synthesis-report.md integration
- **新技术可行性** → System Architect - **Agent Autonomy**: Independent execution with framework guidance
- **未来用户体验趋势** → UI Designer
- **新兴数据技术** → Data Architect
- **创新安全挑战** → Security Expert
## ✅ **质量标准**
### 必须包含的创新元素
- [ ] 全面的技术趋势分析
- [ ] 明确的创新机会识别
- [ ] 具体的概念验证方案
- [ ] 现实的实施路线图
- [ ] 前瞻性的风险评估
### 创新思维原则检查
- [ ] 前瞻性关注未来3-10年趋势
- [ ] 颠覆性:寻找破坏性创新机会
- [ ] 系统性:考虑技术生态系统影响
- [ ] 可行性:平衡愿景与现实可能
- [ ] 差异化:创造独特竞争优势
### 创新价值评估
- [ ] 市场影响的潜在规模
- [ ] 技术可行性和成熟度
- [ ] 竞争优势的可持续性
- [ ] 投资回报的时间框架
- [ ] 组织实施的复杂度

View File

@@ -1,248 +1,205 @@
--- ---
name: product-manager name: product-manager
description: Product manager perspective brainstorming for user needs and business value analysis description: Generate or update product-manager/analysis.md addressing topic-framework discussion points
usage: /workflow:brainstorm:product-manager <topic> usage: /workflow:brainstorm:product-manager [topic]
argument-hint: "topic or challenge to analyze from product management perspective" argument-hint: "optional topic - uses existing framework if available"
examples: examples:
- /workflow:brainstorm:product-manager
- /workflow:brainstorm:product-manager "user authentication redesign" - /workflow:brainstorm:product-manager "user authentication redesign"
- /workflow:brainstorm:product-manager "mobile app performance optimization" - /workflow:brainstorm:product-manager "mobile app performance optimization"
- /workflow:brainstorm:product-manager "feature prioritization strategy" allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
allowed-tools: Task(conceptual-planning-agent), TodoWrite(*)
--- ---
## 🎯 **Role Overview: Product Manager** ## 🎯 **Product Manager Analysis Generator**
### Role Definition ### Purpose
Strategic product leader focused on maximizing user value and business impact through data-driven decisions and market-oriented thinking. **Specialized command for generating product-manager/analysis.md** that addresses topic-framework.md discussion points from product strategy perspective. Creates or updates role-specific analysis with framework references.
### Core Responsibilities ### Core Function
- **User Needs Analysis**: Identify and validate genuine user problems and requirements - **Framework-based Analysis**: Address each discussion point in topic-framework.md
- **Business Value Assessment**: Quantify commercial impact and return on investment - **Product Strategy Focus**: User needs, business value, and market positioning
- **Market Positioning**: Analyze competitive landscape and identify opportunities - **Update Mechanism**: Create new or update existing analysis.md
- **Product Strategy**: Develop roadmaps, priorities, and go-to-market approaches - **Agent Delegation**: Use conceptual-planning-agent for analysis generation
### Focus Areas ### Analysis Scope
- **User Experience**: Journey mapping, satisfaction metrics, conversion optimization - **User Needs Analysis**: Target users, problems, and value propositions
- **Business Metrics**: ROI, user growth, retention rates, revenue impact - **Business Impact Assessment**: ROI, metrics, and commercial outcomes
- **Market Dynamics**: Competitive analysis, differentiation, market trends - **Market Positioning**: Competitive analysis and differentiation
- **Product Lifecycle**: Feature evolution, technical debt management, scalability - **Product Strategy**: Roadmaps, priorities, and go-to-market approaches
### Success Metrics ## ⚙️ **Execution Protocol**
- User satisfaction scores and engagement metrics
- Business KPIs (revenue, growth, retention)
- Market share and competitive positioning
- Product adoption and feature utilization rates
## 🧠 **Analysis Framework** ### Phase 1: Session & Framework Detection
@~/.claude/workflows/brainstorming-principles.md
### Key Analysis Questions
**1. User Value Assessment**
- What genuine user problem does this solve?
- Who are the target users and what are their core needs?
- How does this improve the user experience measurably?
**2. Business Impact Evaluation**
- What are the expected business outcomes?
- How does the cost-benefit analysis look?
- What impact will this have on existing workflows?
**3. Market Opportunity Analysis**
- What gaps exist in current market solutions?
- What is our unique competitive advantage?
- Is the timing right for this initiative?
**4. Execution Feasibility**
- What resources and timeline are required?
- What are the technical and market risks?
- Do we have the right team capabilities?
## ⚡ **Two-Step Execution Flow**
### ⚠️ Session Management - FIRST STEP
Session detection and selection:
```bash ```bash
# Check for active sessions # Check active session and framework
active_sessions=$(find .workflow -name ".active-*" 2>/dev/null) CHECK: .workflow/.active-* marker files
if [ multiple_sessions ]; then IF active_session EXISTS:
prompt_user_to_select_session() session_id = get_active_session()
else brainstorm_dir = .workflow/WFS-{session}/.brainstorming/
use_existing_or_create_new()
fi 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 ### Phase 2: Analysis Mode Detection
**Product Manager Perspective Questioning** ```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 product management context: ### Phase 3: Agent Execution with Flow Control
**Framework-Based Analysis Generation**
#### 📋 Role-Specific Questions
1. **Business Objectives & Metrics**
- Primary business goals and success metrics?
- Revenue impact expectations and timeline?
- Key stakeholders and decision makers?
2. **Target Users & Market**
- Primary user segments and personas?
- User pain points and current solutions?
- Competitive landscape and differentiation needs?
3. **Product Strategy & Scope**
- Feature priorities and user value propositions?
- Resource constraints and timeline expectations?
- Integration with existing product ecosystem?
4. **Success Criteria & Risk Assessment**
- How will success be measured and validated?
- Market and technical risks to consider?
- Go-to-market strategy requirements?
#### Context Validation
- **Minimum Response**: Each answer must be ≥50 characters
- **Re-prompting**: Insufficient detail triggers follow-up questions
- **Context Storage**: Save responses to `.brainstorming/product-manager-context.md`
### Step 2: Agent Assignment with Flow Control
**Dedicated Agent Execution**
```bash ```bash
Task(conceptual-planning-agent): " Task(conceptual-planning-agent): "
[FLOW_CONTROL] [FLOW_CONTROL]
Execute dedicated product-manager conceptual analysis for: {topic} Execute product-manager analysis for existing topic framework
## Context Loading
ASSIGNED_ROLE: product-manager ASSIGNED_ROLE: product-manager
OUTPUT_LOCATION: .brainstorming/product-manager/ OUTPUT_LOCATION: .workflow/WFS-{session}/.brainstorming/product-manager/
USER_CONTEXT: {validated_responses_from_context_gathering} ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
Flow Control Steps: ## Flow Control Steps
[ 1. **load_topic_framework**
{ - Action: Load structured topic discussion framework
\"step\": \"load_role_template\", - Command: Read(.workflow/WFS-{session}/.brainstorming/topic-framework.md)
\"action\": \"Load product-manager planning template\", - Output: topic_framework_content
\"command\": \"bash($(cat ~/.claude/workflows/cli-templates/planning-roles/product-manager.md))\",
\"output_to\": \"role_template\"
}
]
Conceptual Analysis Requirements: 2. **load_role_template**
- Apply product-manager perspective to topic analysis - Action: Load product-manager planning template
- Focus on user value, business impact, and market positioning - Command: bash($(cat ~/.claude/workflows/cli-templates/planning-roles/product-manager.md))
- Use loaded role template framework for analysis structure - Output: role_template_guidelines
- Generate role-specific deliverables in designated output location
- Address all user context from questioning phase
Deliverables: 3. **load_session_metadata**
- analysis.md: Main product management analysis - Action: Load session metadata and existing context
- recommendations.md: Product strategy recommendations - Command: Read(.workflow/WFS-{session}/.brainstorming/session.json)
- deliverables/: Product-specific outputs as defined in role template - Output: session_context
Embody product-manager role expertise for comprehensive conceptual planning." ## Analysis Requirements
**Framework Reference**: Address all discussion points in topic-framework.md from product strategy perspective
**Role Focus**: User value, business impact, market positioning, product strategy
**Structured Approach**: Create analysis.md addressing framework discussion points
**Template Integration**: Apply role template guidelines within framework structure
## Expected Deliverables
1. **analysis.md**: Comprehensive product strategy 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 product management expertise
- Provide actionable business strategies and user value propositions
- Include market analysis and competitive positioning insights
- Reference framework document using @ notation for integration
"
``` ```
### Progress Tracking ## 📋 **TodoWrite Integration**
TodoWrite tracking for two-step process:
```json ### Workflow Progress Tracking
[ ```javascript
{"content": "Gather product manager context through role-specific questioning", "status": "in_progress", "activeForm": "Gathering context"}, TodoWrite({
{"content": "Validate context responses and save to product-manager-context.md", "status": "pending", "activeForm": "Validating context"}, todos: [
{"content": "Load product-manager planning template via flow control", "status": "pending", "activeForm": "Loading template"}, {
{"content": "Execute dedicated conceptual-planning-agent for product-manager role", "status": "pending", "activeForm": "Executing agent"} 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 product-manager analysis using conceptual-planning-agent with FLOW_CONTROL",
status: "pending",
activeForm: "Executing product-manager framework analysis"
},
{
content: "Generate analysis.md addressing all framework discussion points",
status: "pending",
activeForm: "Generating structured product-manager analysis"
},
{
content: "Update session.json with product-manager completion status",
status: "pending",
activeForm: "Updating session metadata"
}
]
});
``` ```
## 📊 **Output Specification** ## 📊 **Output Structure**
### Output Location ### Framework-Based Analysis
``` ```
.workflow/WFS-{topic-slug}/.brainstorming/product-manager/ .workflow/WFS-{session}/.brainstorming/product-manager/
── analysis.md # Primary product management analysis ── analysis.md # Structured analysis addressing topic-framework.md discussion points
├── business-case.md # Business justification and metrics
├── user-research.md # User research and market insights
└── roadmap.md # Strategic recommendations and timeline
``` ```
### Document Templates ### Analysis Document Structure
#### analysis.md Structure
```markdown ```markdown
# Product Manager Analysis: {Topic} # Product Manager Analysis: [Topic from Framework]
*Generated: {timestamp}*
## Executive Summary ## Framework Reference
[Key findings and recommendations overview] **Topic Framework**: @../topic-framework.md
**Role Focus**: Product Strategy perspective
## User Needs Analysis ## Discussion Points Analysis
### Target User Segments [Address each point from topic-framework.md with product management expertise]
### Core Problems Identified
### User Journey Mapping
### Priority Requirements
## Business Impact Assessment ### Core Requirements (from framework)
### Revenue Impact [Product strategy perspective on user needs and requirements]
### Cost Analysis
### ROI Projections
### Risk Assessment
## Competitive Analysis ### Technical Considerations (from framework)
### Market Position [Business and technical feasibility considerations]
### Differentiation Opportunities
### Competitive Advantages
## Strategic Recommendations ### User Experience Factors (from framework)
### Immediate Actions (0-3 months) [User value proposition and market positioning analysis]
### Medium-term Initiatives (3-12 months)
### Long-term Vision (12+ months) ### Implementation Challenges (from framework)
[Business execution and go-to-market considerations]
### Success Metrics (from framework)
[Product success metrics and business KPIs]
## Product Strategy Specific Recommendations
[Role-specific product management strategies and business solutions]
---
*Generated by product-manager analysis addressing structured framework*
``` ```
## 🔄 **Session Integration** ## 🔄 **Session Integration**
### Status Synchronization ### Completion Status Update
Upon completion, update `workflow-session.json`:
```json ```json
{ {
"phases": { "product_manager": {
"BRAINSTORM": { "status": "completed",
"product_manager": { "framework_addressed": true,
"status": "completed", "output_location": ".workflow/WFS-{session}/.brainstorming/product-manager/analysis.md",
"completed_at": "timestamp", "framework_reference": "@../topic-framework.md"
"output_directory": ".workflow/WFS-{topic}/.brainstorming/product-manager/",
"key_insights": ["user_value_proposition", "business_impact_assessment", "strategic_recommendations"]
}
}
} }
} }
``` ```
### Cross-Role Collaboration ### Integration Points
Product manager perspective provides: - **Framework Reference**: @../topic-framework.md for structured discussion points
- **User Requirements Definition** → UI Designer - **Cross-Role Synthesis**: Product strategy insights available for synthesis-report.md integration
- **Business Constraints and Objectives** → System Architect - **Agent Autonomy**: Independent execution with framework guidance
- **Feature Prioritization** → Feature Planner
- **Market Requirements** → Innovation Lead
- **Success Metrics** → Business Analyst
## ✅ **Quality Assurance**
### Required Analysis Elements
- [ ] Clear user value proposition with supporting evidence
- [ ] Quantified business impact assessment with metrics
- [ ] Actionable product strategy recommendations
- [ ] Data-driven priority rankings
- [ ] Well-defined success criteria and KPIs
### Output Quality Standards
- [ ] Analysis grounded in real user needs and market data
- [ ] Business justification with clear logic and assumptions
- [ ] Recommendations are specific and actionable
- [ ] Timeline and milestones are realistic and achievable
- [ ] Risk identification is comprehensive and accurate
### Product Management Principles
- [ ] **User-Centric**: All decisions prioritize user value and experience
- [ ] **Data-Driven**: Conclusions supported by metrics and research
- [ ] **Market-Aware**: Considers competitive landscape and trends
- [ ] **Business-Focused**: Aligns with commercial objectives and constraints
- [ ] **Execution-Ready**: Provides clear next steps and success measures

View File

@@ -1,328 +1,205 @@
--- ---
name: security-expert name: security-expert
description: Security expert perspective brainstorming for threat modeling and security architecture analysis description: Generate or update security-expert/analysis.md addressing topic-framework discussion points
usage: /workflow:brainstorm:security-expert <topic> usage: /workflow:brainstorm:security-expert [topic]
argument-hint: "topic or challenge to analyze from cybersecurity perspective" argument-hint: "optional topic - uses existing framework if available"
examples: examples:
- /workflow:brainstorm:security-expert
- /workflow:brainstorm:security-expert "user authentication security review" - /workflow:brainstorm:security-expert "user authentication security review"
- /workflow:brainstorm:security-expert "API security architecture" - /workflow:brainstorm:security-expert "API security architecture"
- /workflow:brainstorm:security-expert "data protection compliance strategy" allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
allowed-tools: Task(conceptual-planning-agent), TodoWrite(*)
--- ---
## 🔒 **Role Overview: Security Expert** ## 🔒 **Security Expert Analysis Generator**
### Role Definition ### Purpose
Cybersecurity specialist focused on identifying threats, designing security controls, and ensuring comprehensive protection of systems, data, and users through proactive security architecture and risk management. **Specialized command for generating security-expert/analysis.md** that addresses topic-framework.md discussion points from cybersecurity perspective. Creates or updates role-specific analysis with framework references.
### Core Responsibilities ### Core Function
- **Threat Modeling**: Identify and analyze potential security threats and attack vectors - **Framework-based Analysis**: Address each discussion point in topic-framework.md
- **Security Architecture**: Design robust security controls and defensive measures - **Cybersecurity Focus**: Threat modeling, security architecture, and risk management
- **Risk Assessment**: Evaluate security risks and develop mitigation strategies - **Update Mechanism**: Create new or update existing analysis.md
- **Compliance Management**: Ensure adherence to security standards and regulations - **Agent Delegation**: Use conceptual-planning-agent for analysis generation
### Focus Areas ### Analysis Scope
- **Application Security**: Code security, input validation, authentication, authorization - **Threat Modeling**: Attack vectors, threat actors, and vulnerability assessment
- **Infrastructure Security**: Network security, system hardening, access controls - **Security Architecture**: Controls, defensive measures, and compliance
- **Data Protection**: Encryption, privacy controls, data classification, compliance - **Risk Management**: Risk assessment, mitigation, and security policies
- **Operational Security**: Monitoring, incident response, security awareness, procedures - **Implementation Security**: Integration, monitoring, and incident response
### Success Metrics ## ⚙️ **Execution Protocol**
- Vulnerability reduction and remediation rates
- Security incident prevention and response times
- Compliance audit results and regulatory adherence
- Security awareness and training effectiveness
## 🧠 **Analysis Framework** ### Phase 1: Session & Framework Detection
@~/.claude/workflows/brainstorming-principles.md
### Key Analysis Questions
**1. Threat Landscape Assessment**
- What are the primary threat vectors and attack scenarios?
- Who are the potential threat actors and what are their motivations?
- What are the current vulnerabilities and exposure risks?
**2. Security Architecture Design**
- What security controls and defensive measures are needed?
- How should we implement defense-in-depth strategies?
- What authentication and authorization mechanisms are appropriate?
**3. Risk Management and Compliance**
- What are the regulatory and compliance requirements?
- How should we prioritize and manage identified security risks?
- What security policies and procedures need to be established?
**4. Implementation and Operations**
- How should we integrate security into development and operations?
- What monitoring and detection capabilities are required?
- How should we plan for incident response and recovery?
## ⚡ **Two-Step Execution Flow**
### ⚠️ Session Management - FIRST STEP
Session detection and selection:
```bash ```bash
# Check for active sessions # Check active session and framework
active_sessions=$(find .workflow -name ".active-*" 2>/dev/null) CHECK: .workflow/.active-* marker files
if [ multiple_sessions ]; then IF active_session EXISTS:
prompt_user_to_select_session() session_id = get_active_session()
else brainstorm_dir = .workflow/WFS-{session}/.brainstorming/
use_existing_or_create_new()
fi 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 ### Phase 2: Analysis Mode Detection
**Security Expert Perspective Questioning** ```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 security context: ### Phase 3: Agent Execution with Flow Control
**Framework-Based Analysis Generation**
#### 📋 Role-Specific Questions
1. **Threat Assessment & Attack Vectors**
- Sensitive data types and classification levels?
- Known threat actors and attack scenarios?
- Current security vulnerabilities and concerns?
2. **Compliance & Regulatory Requirements**
- Applicable compliance standards (GDPR, SOX, HIPAA)?
- Industry-specific security requirements?
- Audit and reporting obligations?
3. **Security Architecture & Controls**
- Authentication and authorization needs?
- Data encryption and protection requirements?
- Network security and access control strategy?
4. **Incident Response & Monitoring**
- Security monitoring and detection capabilities?
- Incident response procedures and team readiness?
- Business continuity and disaster recovery plans?
#### Context Validation
- **Minimum Response**: Each answer must be ≥50 characters
- **Re-prompting**: Insufficient detail triggers follow-up questions
- **Context Storage**: Save responses to `.brainstorming/security-expert-context.md`
### Step 2: Agent Assignment with Flow Control
**Dedicated Agent Execution**
```bash ```bash
Task(conceptual-planning-agent): " Task(conceptual-planning-agent): "
[FLOW_CONTROL] [FLOW_CONTROL]
Execute dedicated security-expert conceptual analysis for: {topic} Execute security-expert analysis for existing topic framework
## Context Loading
ASSIGNED_ROLE: security-expert ASSIGNED_ROLE: security-expert
OUTPUT_LOCATION: .brainstorming/security-expert/ OUTPUT_LOCATION: .workflow/WFS-{session}/.brainstorming/security-expert/
USER_CONTEXT: {validated_responses_from_context_gathering} ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
Flow Control Steps: ## Flow Control Steps
[ 1. **load_topic_framework**
{ - Action: Load structured topic discussion framework
\"step\": \"load_role_template\", - Command: Read(.workflow/WFS-{session}/.brainstorming/topic-framework.md)
\"action\": \"Load security-expert planning template\", - Output: topic_framework_content
\"command\": \"bash($(cat ~/.claude/workflows/cli-templates/planning-roles/security-expert.md))\",
\"output_to\": \"role_template\"
}
]
Conceptual Analysis Requirements: 2. **load_role_template**
- Apply security-expert perspective to topic analysis - Action: Load security-expert planning template
- Focus on threat modeling, security architecture, and risk assessment - Command: bash($(cat ~/.claude/workflows/cli-templates/planning-roles/security-expert.md))
- Use loaded role template framework for analysis structure - Output: role_template_guidelines
- Generate role-specific deliverables in designated output location
- Address all user context from questioning phase
Deliverables: 3. **load_session_metadata**
- analysis.md: Main security analysis - Action: Load session metadata and existing context
- recommendations.md: Security recommendations - Command: Read(.workflow/WFS-{session}/.brainstorming/session.json)
- deliverables/: Security-specific outputs as defined in role template - Output: session_context
Embody security-expert role expertise for comprehensive conceptual planning." ## Analysis Requirements
**Framework Reference**: Address all discussion points in topic-framework.md from cybersecurity perspective
**Role Focus**: Threat modeling, security architecture, risk management, compliance
**Structured Approach**: Create analysis.md addressing framework discussion points
**Template Integration**: Apply role template guidelines within framework structure
## Expected Deliverables
1. **analysis.md**: Comprehensive security 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 cybersecurity expertise
- Provide actionable security controls and threat mitigation strategies
- Include compliance requirements and risk assessment insights
- Reference framework document using @ notation for integration
"
``` ```
### Progress Tracking ## 📋 **TodoWrite Integration**
TodoWrite tracking for two-step process:
```json ### Workflow Progress Tracking
[ ```javascript
{"content": "Gather security expert context through role-specific questioning", "status": "in_progress", "activeForm": "Gathering context"}, TodoWrite({
{"content": "Validate context responses and save to security-expert-context.md", "status": "pending", "activeForm": "Validating context"}, todos: [
{"content": "Load security-expert planning template via flow control", "status": "pending", "activeForm": "Loading template"}, {
{"content": "Execute dedicated conceptual-planning-agent for security-expert role", "status": "pending", "activeForm": "Executing agent"} 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 security-expert analysis using conceptual-planning-agent with FLOW_CONTROL",
status: "pending",
activeForm: "Executing security-expert framework analysis"
},
{
content: "Generate analysis.md addressing all framework discussion points",
status: "pending",
activeForm: "Generating structured security-expert analysis"
},
{
content: "Update session.json with security-expert completion status",
status: "pending",
activeForm: "Updating session metadata"
}
]
});
``` ```
### Phase 4: Conceptual Planning Agent Coordination ## 📊 **Output Structure**
```bash
Task(conceptual-planning-agent): "
Conduct security expert perspective brainstorming for: {topic}
ROLE CONTEXT: Security Expert ### Framework-Based Analysis
- Focus Areas: Threat modeling, security architecture, risk management, compliance ```
- Analysis Framework: Security-first approach with emphasis on defense-in-depth and risk mitigation .workflow/WFS-{session}/.brainstorming/security-expert/
- Success Metrics: Vulnerability reduction, incident prevention, compliance adherence, security maturity └── analysis.md # Structured analysis addressing topic-framework.md discussion points
USER CONTEXT: {captured_user_requirements_from_session}
ANALYSIS REQUIREMENTS:
1. Threat Modeling and Risk Assessment
- Identify potential threat actors and their capabilities
- Map attack vectors and potential attack paths
- Analyze system vulnerabilities and exposure points
- Assess business impact and likelihood of security incidents
2. Security Architecture Design
- Design authentication and authorization mechanisms
- Plan encryption and data protection strategies
- Design network security and access controls
- Plan security monitoring and logging architecture
3. Application Security Analysis
- Review secure coding practices and input validation
- Analyze session management and state security
- Assess API security and integration points
- Plan for secure software development lifecycle
4. Infrastructure and Operations Security
- Design system hardening and configuration management
- Plan security monitoring and SIEM integration
- Design incident response and recovery procedures
- Plan security awareness and training programs
5. Compliance and Regulatory Analysis
- Identify applicable compliance frameworks (GDPR, SOX, PCI-DSS, etc.)
- Map security controls to regulatory requirements
- Plan compliance monitoring and audit procedures
- Design privacy protection and data handling policies
6. Security Implementation Planning
- Prioritize security controls based on risk assessment
- Plan phased security implementation approach
- Design security testing and validation procedures
- Plan ongoing security maintenance and updates
OUTPUT REQUIREMENTS: Save comprehensive analysis to:
.workflow/WFS-{topic-slug}/.brainstorming/security-expert/
- analysis.md (main security analysis and threat model)
- security-architecture.md (security controls and defensive measures)
- compliance-plan.md (regulatory compliance and policy framework)
- implementation-guide.md (security implementation and operational procedures)
Apply cybersecurity expertise to create comprehensive security solutions that protect against threats while enabling business objectives."
``` ```
## 📊 **Output Specification** ### Analysis Document Structure
### Output Location
```
.workflow/WFS-{topic-slug}/.brainstorming/security-expert/
├── analysis.md # Primary security analysis and threat modeling
├── security-architecture.md # Security controls and defensive measures
├── compliance-plan.md # Regulatory compliance and policy framework
└── implementation-guide.md # Security implementation and operational procedures
```
### Document Templates
#### analysis.md Structure
```markdown ```markdown
# Security Expert Analysis: {Topic} # Security Expert Analysis: [Topic from Framework]
*Generated: {timestamp}*
## Executive Summary ## Framework Reference
[Key security findings and recommendations overview] **Topic Framework**: @../topic-framework.md
**Role Focus**: Cybersecurity perspective
## Threat Landscape Assessment ## Discussion Points Analysis
### Threat Actor Analysis [Address each point from topic-framework.md with cybersecurity expertise]
### Attack Vector Identification
### Vulnerability Assessment
### Risk Prioritization Matrix
## Security Requirements Analysis ### Core Requirements (from framework)
### Functional Security Requirements [Security perspective on threat modeling and protection requirements]
### Compliance and Regulatory Requirements
### Business Continuity Requirements
### Privacy and Data Protection Needs
## Security Architecture Design ### Technical Considerations (from framework)
### Authentication and Authorization Framework [Security architecture and technical control considerations]
### Data Protection and Encryption Strategy
### Network Security and Access Controls
### Monitoring and Detection Capabilities
## Risk Management Strategy ### User Experience Factors (from framework)
### Risk Assessment Methodology [Security usability and user protection considerations]
### Risk Mitigation Controls
### Residual Risk Acceptance Criteria
### Continuous Risk Monitoring Plan
## Implementation Security Plan ### Implementation Challenges (from framework)
### Security Control Implementation Priorities [Security implementation and compliance considerations]
### Security Testing and Validation Approach
### Incident Response and Recovery Procedures
### Security Awareness and Training Program
## Compliance and Governance ### Success Metrics (from framework)
### Regulatory Compliance Framework [Security success metrics and risk management criteria]
### Security Policy and Procedure Requirements
### Audit and Assessment Planning ## Cybersecurity Specific Recommendations
### Governance and Oversight Structure [Role-specific security controls and threat mitigation strategies]
---
*Generated by security-expert analysis addressing structured framework*
``` ```
## 🔄 **Session Integration** ## 🔄 **Session Integration**
### Status Synchronization ### Completion Status Update
Upon completion, update `workflow-session.json`:
```json ```json
{ {
"phases": { "security_expert": {
"BRAINSTORM": { "status": "completed",
"security_expert": { "framework_addressed": true,
"status": "completed", "output_location": ".workflow/WFS-{session}/.brainstorming/security-expert/analysis.md",
"completed_at": "timestamp", "framework_reference": "@../topic-framework.md"
"output_directory": ".workflow/WFS-{topic}/.brainstorming/security-expert/",
"key_insights": ["threat_model", "security_controls", "compliance_requirements"]
}
}
} }
} }
``` ```
### Cross-Role Collaboration ### Integration Points
Security expert perspective provides: - **Framework Reference**: @../topic-framework.md for structured discussion points
- **Security Architecture Requirements** → System Architect - **Cross-Role Synthesis**: Security insights available for synthesis-report.md integration
- **Security Compliance Constraints** → Product Manager - **Agent Autonomy**: Independent execution with framework guidance
- **Secure Interface Design Requirements** → UI Designer
- **Data Protection Requirements** → Data Architect
- **Security Feature Specifications** → Feature Planner
## ✅ **Quality Assurance**
### Required Security Elements
- [ ] Comprehensive threat model with identified attack vectors and mitigations
- [ ] Security architecture design with layered defensive controls
- [ ] Risk assessment with prioritized mitigation strategies
- [ ] Compliance framework addressing all relevant regulatory requirements
- [ ] Implementation plan with security testing and validation procedures
### Security Architecture Principles
- [ ] **Defense-in-Depth**: Multiple layers of security controls and protective measures
- [ ] **Least Privilege**: Minimal access rights granted based on need-to-know basis
- [ ] **Zero Trust**: Verify and validate all access requests regardless of location
- [ ] **Security by Design**: Security considerations integrated from initial design phase
- [ ] **Fail Secure**: System failures default to secure state with controlled recovery
### Risk Management Standards
- [ ] **Threat Coverage**: All identified threats have corresponding mitigation controls
- [ ] **Risk Tolerance**: Security risks align with organizational risk appetite
- [ ] **Continuous Monitoring**: Ongoing security monitoring and threat detection capabilities
- [ ] **Incident Response**: Comprehensive incident response and recovery procedures
- [ ] **Compliance Adherence**: Full compliance with applicable regulatory frameworks
### Implementation Readiness
- [ ] **Control Effectiveness**: Security controls are tested and validated for effectiveness
- [ ] **Integration Planning**: Security solutions integrate with existing infrastructure
- [ ] **Operational Procedures**: Clear procedures for security operations and maintenance
- [ ] **Training and Awareness**: Security awareness programs for all stakeholders
- [ ] **Continuous Improvement**: Framework for ongoing security assessment and enhancement

View File

@@ -1,77 +1,88 @@
--- ---
name: synthesis name: synthesis
description: Synthesize all brainstorming role perspectives into comprehensive analysis and recommendations description: Generate synthesis-report.md from topic-framework and role analyses with @ references
usage: /workflow:brainstorm:synthesis usage: /workflow:brainstorm:synthesis
argument-hint: "no arguments required - analyzes existing brainstorming session outputs" argument-hint: "no arguments required - synthesizes existing framework and role analyses"
examples: examples:
- /workflow:brainstorm:synthesis - /workflow:brainstorm:synthesis
allowed-tools: Read(*), Write(*), TodoWrite(*), Glob(*) allowed-tools: Read(*), Write(*), TodoWrite(*), Glob(*)
--- ---
## 🧩 **Command Overview: Brainstorm Synthesis** ## 🧩 **Synthesis Document Generator**
### Core Function ### Core Function
Cross-role integration command that synthesizes all brainstorming role perspectives into comprehensive strategic analysis, actionable recommendations, and prioritized implementation roadmaps. **Specialized command for generating synthesis-report.md** that integrates topic-framework.md and all role analysis.md files using @ reference system. Creates comprehensive strategic analysis with cross-role insights.
### Primary Capabilities ### Primary Capabilities
- **Cross-Role Integration**: Consolidate analysis results from all brainstorming role perspectives - **Framework Integration**: Reference topic-framework.md discussion points across all roles
- **Insight Synthesis**: Identify consensus areas, disagreement points, and breakthrough opportunities - **Role Analysis Integration**: Consolidate all role/analysis.md files using @ references
- **Decision Support**: Generate prioritized recommendations and strategic action plans - **Cross-Framework Comparison**: Compare how each role addressed framework discussion points
- **Comprehensive Reporting**: Create integrated brainstorming summary reports with implementation guidance - **@ Reference System**: Create structured references to source documents
- **Update Detection**: Smart updates when new role analyses are added
### Analysis Scope Coverage ### Document Integration Model
- **Product Management**: User needs, business value, market opportunities **Three-Document Reference System**:
- **System Architecture**: Technical design, technology selection, implementation feasibility 1. **topic-framework.md** → Structured discussion framework (input)
- **User Experience**: Interface design, usability, accessibility standards 2. **[role]/analysis.md** → Role-specific analyses addressing framework (input)
- **Data Architecture**: Data models, processing workflows, analytics capabilities 3. **synthesis-report.md** → Integrated synthesis with @ references (output)
- **Security Expert**: Threat assessment, security controls, compliance requirements
- **User Research**: Behavioral insights, needs validation, experience optimization
- **Business Analysis**: Process optimization, cost-benefit analysis, change management
- **Innovation Leadership**: Technology trends, innovation opportunities, future planning
- **Feature Planning**: Development planning, quality assurance, delivery management
## ⚙️ **Execution Protocol** ## ⚙️ **Execution Protocol**
### Phase 1: Session Detection & Data Collection ### Phase 1: Document Discovery & Validation
```bash ```bash
# Detect active brainstorming session # Detect active brainstorming session
CHECK: .workflow/.active-* marker files CHECK: .workflow/.active-* marker files
IF active_session EXISTS: IF active_session EXISTS:
session_id = get_active_session() session_id = get_active_session()
load_context_from(session_id) brainstorm_dir = .workflow/WFS-{session}/.brainstorming/
ELSE: ELSE:
ERROR: "No active brainstorming session found. Please run role-specific brainstorming commands first." ERROR: "No active brainstorming session found"
EXIT
# Validate required documents
CHECK: brainstorm_dir/topic-framework.md
IF NOT EXISTS:
ERROR: "topic-framework.md not found. Run /workflow:brainstorm:artifacts first"
EXIT EXIT
``` ```
### Phase 2: Role Output Scanning ### Phase 2: Role Analysis Discovery
```bash ```bash
# Scan all role brainstorming outputs # Discover available role analyses
SCAN_DIRECTORY: .workflow/WFS-{session}/.brainstorming/ SCAN_DIRECTORY: .workflow/WFS-{session}/.brainstorming/
COLLECT_OUTPUTS: [ FIND_ANALYSES: [
product-manager/analysis.md, */analysis.md files in role directories
system-architect/analysis.md,
ui-designer/analysis.md,
data-architect/analysis.md,
security-expert/analysis.md,
user-researcher/analysis.md,
business-analyst/analysis.md,
innovation-lead/analysis.md,
feature-planner/analysis.md
] ]
LOAD_DOCUMENTS: {
"topic_framework": topic-framework.md,
"role_analyses": [discovered analysis.md files],
"existing_synthesis": synthesis-report.md (if exists)
}
``` ```
### Phase 3: Task Tracking Initialization ### Phase 3: Update Mechanism Check
Initialize synthesis analysis task tracking: ```bash
# Check for existing synthesis
IF synthesis-report.md EXISTS:
SHOW current synthesis summary to user
ASK: "Synthesis exists. Do you want to:"
OPTIONS:
1. "Regenerate completely" → Create new synthesis
2. "Update with new analyses" → Integrate new role analyses
3. "Preserve existing" → Exit without changes
ELSE:
CREATE new synthesis
```
### Phase 4: Synthesis Generation Process
Initialize synthesis task tracking:
```json ```json
[ [
{"content": "Initialize brainstorming synthesis session", "status": "completed", "activeForm": "Initializing synthesis"}, {"content": "Validate topic-framework.md and role analyses availability", "status": "in_progress", "activeForm": "Validating source documents"},
{"content": "Collect and analyze all role perspectives", "status": "in_progress", "activeForm": "Collecting role analyses"}, {"content": "Load topic framework discussion points structure", "status": "pending", "activeForm": "Loading framework structure"},
{"content": "Identify cross-role insights and patterns", "status": "pending", "activeForm": "Identifying insights"}, {"content": "Cross-analyze role responses to each framework point", "status": "pending", "activeForm": "Cross-analyzing framework responses"},
{"content": "Generate consensus and disagreement analysis", "status": "pending", "activeForm": "Analyzing consensus"}, {"content": "Generate synthesis-report.md with @ references", "status": "pending", "activeForm": "Generating synthesis with references"},
{"content": "Create prioritized recommendations matrix", "status": "pending", "activeForm": "Creating recommendations"}, {"content": "Update session metadata with synthesis completion", "status": "pending", "activeForm": "Updating session metadata"}
{"content": "Generate comprehensive synthesis report", "status": "pending", "activeForm": "Generating synthesis report"},
{"content": "Create action plan with implementation priorities", "status": "pending", "activeForm": "Creating action plan"}
] ]
``` ```
@@ -125,44 +136,48 @@ SORT recommendations BY priority_score DESC
### Output Location ### Output Location
``` ```
.workflow/WFS-{topic-slug}/.brainstorming/ .workflow/WFS-{topic-slug}/.brainstorming/
├── synthesis-report.md # Comprehensive synthesis analysis report ├── topic-framework.md # Input: Framework structure
├── recommendations-matrix.md # Priority recommendation matrix ├── [role]/analysis.md # Input: Role analyses (multiple)
── action-plan.md # Implementation action plan ── synthesis-report.md # ★ OUTPUT: Integrated synthesis with @ references
├── consensus-analysis.md # Consensus and disagreement analysis
└── brainstorm-summary.json # Machine-readable synthesis data
``` ```
### Core Output Documents ### Core Output Documents
#### synthesis-report.md Structure #### synthesis-report.md Structure
```markdown ```markdown
# Brainstorming Synthesis Report: {Topic} # [Topic] - Integrated Analysis
*Generated: {timestamp} | Session: WFS-{topic-slug}*
**Framework Reference**: @topic-framework.md
**Generated**: [timestamp] | **Session**: WFS-[topic-slug]
## Executive Summary ## Executive Summary
### Key Findings Overview Brief synthesis of key insights and recommendations across all role perspectives.
### Strategic Recommendations
### Implementation Priority
### Success Metrics
## Participating Perspectives Analysis ## Framework Analysis Integration
### Roles Analyzed: {list_of_completed_roles}
### Coverage Assessment: {completeness_percentage}%
### Analysis Quality Score: {quality_assessment}
## Cross-Role Insights Synthesis ### Discussion Point 1: Core Requirements
**Framework Questions**: @topic-framework.md (Core Requirements section)
### 🤝 Consensus Areas **Role Perspectives**:
**Strong Agreement (3+ roles)**: - **System Architect**: @system-architect/analysis.md (requirements section)
1. **{consensus_theme_1}** - **Product Manager**: @product-manager/analysis.md (requirements section)
- Supporting roles: {role1, role2, role3} - **Security Expert**: @security-expert/analysis.md (requirements section)
- Key insight: {shared_understanding}
- Business impact: {impact_assessment}
2. **{consensus_theme_2}** **Cross-Role Insights**:
- Supporting roles: {role1, role2, role4} - [Consensus areas and disagreements on core requirements]
- Key insight: {shared_understanding} - [Integration recommendations]
- Business impact: {impact_assessment}
### Discussion Point 2: Technical Considerations
**Framework Questions**: @topic-framework.md (Technical Considerations section)
**Role Perspectives**:
- **System Architect**: @system-architect/analysis.md (technical section)
- **Data Architect**: @data-architect/analysis.md (technical section)
- **UI Designer**: @ui-designer/analysis.md (technical section)
**Cross-Role Insights**:
- [Technical consensus and conflicts]
- [Implementation recommendations]
### ⚡ Breakthrough Ideas ### ⚡ Breakthrough Ideas
**Innovation Opportunities**: **Innovation Opportunities**:

View File

@@ -1,57 +1,164 @@
--- ---
name: system-architect name: system-architect
description: System architect perspective brainstorming for technical architecture and scalability analysis description: Generate or update system-architect/analysis.md addressing topic-framework discussion points
usage: /workflow:brainstorm:system-architect <topic> usage: /workflow:brainstorm:system-architect [topic]
argument-hint: "topic or challenge to analyze from system architecture perspective" argument-hint: "optional topic - uses existing framework if available"
examples: examples:
- /workflow:brainstorm:system-architect
- /workflow:brainstorm:system-architect "user authentication redesign" - /workflow:brainstorm:system-architect "user authentication redesign"
- /workflow:brainstorm:system-architect "microservices migration strategy" allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
- /workflow:brainstorm:system-architect "system performance optimization"
allowed-tools: Task(conceptual-planning-agent), TodoWrite(*)
--- ---
## 🏗️ **Role Overview: System Architect** ## 🏗️ **System Architect Analysis Generator**
### Role Definition ### Purpose
Technical leader responsible for designing scalable, maintainable, and high-performance system architectures that align with business requirements and industry best practices. **Specialized command for generating system-architect/analysis.md** that addresses topic-framework.md discussion points from system architecture perspective. Creates or updates role-specific analysis with framework references.
### Core Responsibilities ### Core Function
- **Technical Architecture Design**: Create scalable and maintainable system architectures - **Framework-based Analysis**: Address each discussion point in topic-framework.md
- **Technology Selection**: Evaluate and choose appropriate technology stacks and tools - **Architecture Focus**: Technical architecture, scalability, and system design perspective
- **System Integration**: Design inter-system communication and integration patterns - **Update Mechanism**: Create new or update existing analysis.md
- **Performance Optimization**: Identify bottlenecks and propose optimization solutions - **Agent Delegation**: Use conceptual-planning-agent for analysis generation
### Focus Areas ### Analysis Scope
- **Scalability**: Capacity planning, load handling, elastic scaling strategies - **Technical Architecture**: Scalable and maintainable system design
- **Reliability**: High availability design, fault tolerance, disaster recovery - **Technology Selection**: Stack evaluation and architectural decisions
- **Security**: Architectural security, data protection, access control patterns - **Performance & Scalability**: Capacity planning and optimization strategies
- **Maintainability**: Code quality, modular design, technical debt management - **Integration Patterns**: System communication and data flow design
### Success Metrics ## ⚙️ **Execution Protocol**
- System performance benchmarks (latency, throughput)
- Availability and uptime metrics
- Scalability handling capacity growth
- Technical debt and maintenance efficiency
## 🧠 **Analysis Framework** ### Phase 1: Session & Framework Detection
```bash
# 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/
@~/.claude/workflows/brainstorming-principles.md 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"
```
### Key Analysis Questions ### Phase 2: Analysis Mode Detection
```bash
# Check existing analysis
CHECK: brainstorm_dir/system-architect/analysis.md
IF EXISTS:
SHOW existing analysis summary
ASK: "Analysis exists. Do you want to:"
OPTIONS:
1. "Update with new insights" → Update existing
2. "Replace completely" → Generate new
3. "Cancel" → Exit without changes
ELSE:
CREATE new analysis
```
**1. Architecture Design Assessment** ### Phase 3: Agent Task Generation
- What are the strengths and limitations of current architecture? **Framework-Based Analysis** (when topic-framework.md exists):
- How should we design architecture to meet business requirements? ```bash
- What are the trade-offs between microservices vs monolithic approaches? Task(subagent_type="conceptual-planning-agent",
prompt="Generate system architect analysis addressing topic framework
**2. Technology Selection Strategy** ## Framework Integration Required
- Which technology stack best fits current requirements? **MANDATORY**: Load and address topic-framework.md discussion points
- What are the risks and benefits of introducing new technologies? **Framework Reference**: @{session.brainstorm_dir}/topic-framework.md
- How well does team expertise align with technology choices? **Output Location**: {session.brainstorm_dir}/system-architect/analysis.md
**3. System Integration Planning** ## Analysis Requirements
- How should systems efficiently integrate and communicate? 1. **Load Topic Framework**: Read topic-framework.md completely
- What are the third-party service integration strategies? 2. **Address Each Discussion Point**: Respond to all 5 framework sections from system architecture perspective
3. **Include Framework Reference**: Start analysis.md with @../topic-framework.md
4. **Technical Focus**: Emphasize scalability, architecture patterns, technology decisions
5. **Structured Response**: Use framework structure for analysis organization
## Framework Sections to Address
- Core Requirements (from architecture perspective)
- Technical Considerations (detailed architectural analysis)
- User Experience Factors (technical UX considerations)
- Implementation Challenges (architecture risks and solutions)
- Success Metrics (technical metrics and monitoring)
## Output Structure Required
```markdown
# System Architect Analysis: [Topic]
**Framework Reference**: @../topic-framework.md
**Role Focus**: System Architecture and Technical Design
## Core Requirements Analysis
[Address framework requirements from architecture perspective]
## Technical Considerations
[Detailed architectural analysis]
## User Experience Factors
[Technical aspects of UX implementation]
## Implementation Challenges
[Architecture risks and mitigation strategies]
## Success Metrics
[Technical metrics and system monitoring]
## Architecture-Specific Recommendations
[Detailed technical recommendations]
```",
description="Generate system architect framework-based analysis")
```
### Phase 4: Update Mechanism
**Analysis Update Process**:
```bash
# For existing analysis updates
IF update_mode = "incremental":
Task(subagent_type="conceptual-planning-agent",
prompt="Update existing system architect analysis
## Current Analysis Context
**Existing Analysis**: @{session.brainstorm_dir}/system-architect/analysis.md
**Framework Reference**: @{session.brainstorm_dir}/topic-framework.md
## Update Requirements
1. **Preserve Structure**: Maintain existing analysis structure
2. **Add New Insights**: Integrate new technical insights and recommendations
3. **Framework Alignment**: Ensure continued alignment with topic framework
4. **Technical Updates**: Add new architecture patterns, technology considerations
5. **Maintain References**: Keep @../topic-framework.md reference
## Update Instructions
- Read existing analysis completely
- Identify areas for enhancement or new insights
- Add technical depth while preserving original structure
- Update recommendations with new architectural approaches
- Maintain framework discussion point addressing",
description="Update system architect analysis incrementally")
```
## Document Structure
### Output Files
```
.workflow/WFS-[topic]/.brainstorming/
├── topic-framework.md # Input: Framework (if exists)
└── system-architect/
└── analysis.md # ★ OUTPUT: Framework-based analysis
```
### Analysis Structure
**Required Elements**:
- **Framework Reference**: @../topic-framework.md (if framework exists)
- **Role Focus**: System Architecture and Technical Design perspective
- **5 Framework Sections**: Address each framework discussion point
- **Technical Recommendations**: Architecture-specific insights and solutions
- How should we design APIs and manage versioning? - How should we design APIs and manage versioning?
**4. Performance and Scalability** **4. Performance and Scalability**

View File

@@ -1,328 +1,205 @@
--- ---
name: ui-designer name: ui-designer
description: UI designer perspective brainstorming for user experience and interface design analysis description: Generate or update ui-designer/analysis.md addressing topic-framework discussion points
usage: /workflow:brainstorm:ui-designer <topic> usage: /workflow:brainstorm:ui-designer [topic]
argument-hint: "topic or challenge to analyze from UI/UX design perspective" argument-hint: "optional topic - uses existing framework if available"
examples: examples:
- /workflow:brainstorm:ui-designer
- /workflow:brainstorm:ui-designer "user authentication redesign" - /workflow:brainstorm:ui-designer "user authentication redesign"
- /workflow:brainstorm:ui-designer "mobile app navigation improvement" - /workflow:brainstorm:ui-designer "mobile app navigation improvement"
- /workflow:brainstorm:ui-designer "accessibility enhancement strategy" allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
allowed-tools: Task(conceptual-planning-agent), TodoWrite(*)
--- ---
## 🎨 **Role Overview: UI Designer** ## 🎨 **UI Designer Analysis Generator**
### Role Definition ### Purpose
Creative professional responsible for designing intuitive, accessible, and visually appealing user interfaces that create exceptional user experiences aligned with business goals and user needs. **Specialized command for generating ui-designer/analysis.md** that addresses topic-framework.md discussion points from UI/UX design perspective. Creates or updates role-specific analysis with framework references.
### Core Responsibilities ### Core Function
- **User Experience Design**: Create intuitive and efficient user experiences - **Framework-based Analysis**: Address each discussion point in topic-framework.md
- **Interface Design**: Design beautiful and functional user interfaces - **UI/UX Focus**: User experience, interface design, and accessibility perspective
- **Interaction Design**: Design smooth user interaction flows and micro-interactions - **Update Mechanism**: Create new or update existing analysis.md
- **Accessibility Design**: Ensure products are inclusive and accessible to all users - **Agent Delegation**: Use conceptual-planning-agent for analysis generation
### Focus Areas ### Analysis Scope
- **User Experience**: User journeys, usability, satisfaction metrics, conversion optimization - **User Experience Design**: Intuitive and efficient user experiences
- **Visual Design**: Interface aesthetics, brand consistency, visual hierarchy - **Interface Design**: Beautiful and functional user interfaces
- **Interaction Design**: Workflow optimization, feedback mechanisms, responsiveness - **Interaction Design**: Smooth user interaction flows and micro-interactions
- **Accessibility**: WCAG compliance, inclusive design, assistive technology support - **Accessibility Design**: Inclusive design meeting WCAG compliance
### Success Metrics ## ⚙️ **Execution Protocol**
- User satisfaction scores and usability metrics
- Task completion rates and conversion metrics
- Accessibility compliance scores
- Visual design consistency and brand alignment
## 🧠 **Analysis Framework** ### Phase 1: Session & Framework Detection
@~/.claude/workflows/brainstorming-principles.md
### Key Analysis Questions
**1. User Needs and Behavior Analysis**
- What are the main pain points users experience during interactions?
- What gaps exist between user expectations and actual experience?
- What are the specific needs of different user segments?
**2. Interface and Interaction Design**
- How can we simplify operational workflows?
- Is the information architecture logical and intuitive?
- Are interaction feedback mechanisms timely and clear?
**3. Visual and Brand Strategy**
- Does the visual design support and strengthen brand identity?
- Are color schemes, typography, and layouts appropriate and effective?
- How can we ensure cross-platform consistency?
**4. Technical Implementation Considerations**
- What are the technical feasibility constraints for design concepts?
- What responsive design requirements must be addressed?
- How do performance considerations impact user experience?
## ⚡ **Two-Step Execution Flow**
### ⚠️ Session Management - FIRST STEP
Session detection and selection:
```bash ```bash
# Check for active sessions # Check active session and framework
active_sessions=$(find .workflow -name ".active-*" 2>/dev/null) CHECK: .workflow/.active-* marker files
if [ multiple_sessions ]; then IF active_session EXISTS:
prompt_user_to_select_session() session_id = get_active_session()
else brainstorm_dir = .workflow/WFS-{session}/.brainstorming/
use_existing_or_create_new()
fi 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 ### Phase 2: Analysis Mode Detection
**UI Designer Perspective Questioning** ```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 UI/UX design context: ### Phase 3: Agent Execution with Flow Control
**Framework-Based Analysis Generation**
#### 📋 Role-Specific Questions
1. **User Experience & Personas**
- Primary user personas and their key characteristics?
- Current user pain points and usability issues?
- Platform requirements (web, mobile, desktop)?
2. **Design System & Branding**
- Existing design system and brand guidelines?
- Visual design preferences and constraints?
- Accessibility and compliance requirements?
3. **User Journey & Interactions**
- Key user workflows and task flows?
- Critical interaction points and user goals?
- Performance and responsive design requirements?
4. **Implementation & Integration**
- Technical constraints and development capabilities?
- Integration with existing UI components?
- Testing and validation approach?
#### Context Validation
- **Minimum Response**: Each answer must be ≥50 characters
- **Re-prompting**: Insufficient detail triggers follow-up questions
- **Context Storage**: Save responses to `.brainstorming/ui-designer-context.md`
### Step 2: Agent Assignment with Flow Control
**Dedicated Agent Execution**
```bash ```bash
Task(conceptual-planning-agent): " Task(conceptual-planning-agent): "
[FLOW_CONTROL] [FLOW_CONTROL]
Execute dedicated ui-designer conceptual analysis for: {topic} Execute ui-designer analysis for existing topic framework
## Context Loading
ASSIGNED_ROLE: ui-designer ASSIGNED_ROLE: ui-designer
OUTPUT_LOCATION: .brainstorming/ui-designer/ OUTPUT_LOCATION: .workflow/WFS-{session}/.brainstorming/ui-designer/
USER_CONTEXT: {validated_responses_from_context_gathering} ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"}
Flow Control Steps: ## Flow Control Steps
[ 1. **load_topic_framework**
{ - Action: Load structured topic discussion framework
\"step\": \"load_role_template\", - Command: Read(.workflow/WFS-{session}/.brainstorming/topic-framework.md)
\"action\": \"Load ui-designer planning template\", - Output: topic_framework_content
\"command\": \"bash($(cat ~/.claude/workflows/cli-templates/planning-roles/ui-designer.md))\",
\"output_to\": \"role_template\"
}
]
Conceptual Analysis Requirements: 2. **load_role_template**
- Apply ui-designer perspective to topic analysis - Action: Load ui-designer planning template
- Focus on user experience, interface design, and interaction patterns - Command: bash($(cat ~/.claude/workflows/cli-templates/planning-roles/ui-designer.md))
- Use loaded role template framework for analysis structure - Output: role_template_guidelines
- Generate role-specific deliverables in designated output location
- Address all user context from questioning phase
Deliverables: 3. **load_session_metadata**
- analysis.md: Main UI/UX design analysis - Action: Load session metadata and existing context
- recommendations.md: Design recommendations - Command: Read(.workflow/WFS-{session}/.brainstorming/session.json)
- deliverables/: UI-specific outputs as defined in role template - Output: session_context
Embody ui-designer role expertise for comprehensive conceptual planning." ## Analysis Requirements
**Framework Reference**: Address all discussion points in topic-framework.md from UI/UX perspective
**Role Focus**: User experience design, interface optimization, accessibility compliance
**Structured Approach**: Create analysis.md addressing framework discussion points
**Template Integration**: Apply role template guidelines within framework structure
## Expected Deliverables
1. **analysis.md**: Comprehensive UI/UX 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 UI/UX design expertise
- Provide actionable design recommendations and interface solutions
- Include accessibility considerations and WCAG compliance planning
- Reference framework document using @ notation for integration
"
``` ```
### Progress Tracking ## 📋 **TodoWrite Integration**
TodoWrite tracking for two-step process:
```json ### Workflow Progress Tracking
[ ```javascript
{"content": "Gather ui-designer context through role-specific questioning", "status": "in_progress", "activeForm": "Gathering context"}, TodoWrite({
{"content": "Validate context responses and save to ui-designer-context.md", "status": "pending", "activeForm": "Validating context"}, todos: [
{"content": "Load ui-designer planning template via flow control", "status": "pending", "activeForm": "Loading template"}, {
{"content": "Execute dedicated conceptual-planning-agent for ui-designer role", "status": "pending", "activeForm": "Executing agent"} 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 ui-designer analysis using conceptual-planning-agent with FLOW_CONTROL",
status: "pending",
activeForm: "Executing ui-designer framework analysis"
},
{
content: "Generate analysis.md addressing all framework discussion points",
status: "pending",
activeForm: "Generating structured ui-designer analysis"
},
{
content: "Update session.json with ui-designer completion status",
status: "pending",
activeForm: "Updating session metadata"
}
]
});
``` ```
### Phase 4: Conceptual Planning Agent Coordination ## 📊 **Output Structure**
```bash
Task(conceptual-planning-agent): "
Conduct UI designer perspective brainstorming for: {topic}
ROLE CONTEXT: UI Designer ### Framework-Based Analysis
- Focus Areas: User experience, interface design, visual design, accessibility ```
- Analysis Framework: User-centered design approach with emphasis on usability and accessibility .workflow/WFS-{session}/.brainstorming/ui-designer/
- Success Metrics: User satisfaction, task completion rates, accessibility compliance, visual appeal └── analysis.md # Structured analysis addressing topic-framework.md discussion points
USER CONTEXT: {captured_user_requirements_from_session}
ANALYSIS REQUIREMENTS:
1. User Experience Analysis
- Identify current UX pain points and friction areas
- Map user journeys and identify optimization opportunities
- Analyze user behavior patterns and preferences
- Evaluate task completion flows and success rates
2. Interface Design Assessment
- Review current interface design and information architecture
- Identify visual hierarchy and navigation issues
- Assess consistency across different screens and states
- Evaluate mobile and desktop interface differences
3. Visual Design Strategy
- Develop visual design concepts aligned with brand guidelines
- Create color schemes, typography, and spacing systems
- Design iconography and visual elements
- Plan for dark mode and theme variations
4. Interaction Design Planning
- Design micro-interactions and animation strategies
- Plan feedback mechanisms and loading states
- Create error handling and validation UX
- Design responsive behavior and breakpoints
5. Accessibility and Inclusion
- Evaluate WCAG 2.1 compliance requirements
- Design for screen readers and assistive technologies
- Plan for color blindness and visual impairments
- Ensure keyboard navigation and focus management
6. Prototyping and Testing Strategy
- Plan for wireframes, mockups, and interactive prototypes
- Design user testing scenarios and success metrics
- Create A/B testing strategies for key interactions
- Plan for iterative design improvements
OUTPUT REQUIREMENTS: Save comprehensive analysis to:
.workflow/WFS-{topic-slug}/.brainstorming/ui-designer/
- analysis.md (main UI/UX analysis)
- design-system.md (visual design guidelines and components)
- user-flows.md (user journey maps and interaction flows)
- accessibility-plan.md (accessibility requirements and implementation)
Apply UI/UX design expertise to create user-centered, accessible, and visually appealing solutions."
``` ```
## 📊 **Output Specification** ### Analysis Document Structure
### Output Location
```
.workflow/WFS-{topic-slug}/.brainstorming/ui-designer/
├── analysis.md # Primary UI/UX analysis
├── design-system.md # Visual design guidelines and components
├── user-flows.md # User journey maps and interaction flows
└── accessibility-plan.md # Accessibility requirements and implementation
```
### Document Templates
#### analysis.md Structure
```markdown ```markdown
# UI Designer Analysis: {Topic} # UI Designer Analysis: [Topic from Framework]
*Generated: {timestamp}*
## Executive Summary ## Framework Reference
[Key UX findings and design recommendations overview] **Topic Framework**: @../topic-framework.md
**Role Focus**: UI/UX Design perspective
## Current UX Assessment ## Discussion Points Analysis
### User Pain Points [Address each point from topic-framework.md with UI/UX expertise]
### Interface Issues
### Accessibility Gaps
### Performance Impact on UX
## User Experience Strategy ### Core Requirements (from framework)
### Target User Personas [UI/UX perspective on requirements]
### User Journey Mapping
### Key Interaction Points
### Success Metrics
## Visual Design Approach ### Technical Considerations (from framework)
### Brand Alignment [Interface and design system considerations]
### Color and Typography Strategy
### Layout and Spacing System
### Iconography and Visual Elements
## Interface Design Plan ### User Experience Factors (from framework)
### Information Architecture [Detailed UX analysis and recommendations]
### Navigation Strategy
### Component Library
### Responsive Design Approach
## Accessibility Implementation ### Implementation Challenges (from framework)
### WCAG Compliance Plan [Design implementation and accessibility considerations]
### Assistive Technology Support
### Inclusive Design Features
### Testing Strategy
## Prototyping and Validation ### Success Metrics (from framework)
### Wireframe Strategy [UX metrics and usability success criteria]
### Interactive Prototype Plan
### User Testing Approach ## UI/UX Specific Recommendations
### Iteration Framework [Role-specific design recommendations and solutions]
---
*Generated by ui-designer analysis addressing structured framework*
``` ```
## 🔄 **Session Integration** ## 🔄 **Session Integration**
### Status Synchronization ### Completion Status Update
Upon completion, update `workflow-session.json`:
```json ```json
{ {
"phases": { "ui_designer": {
"BRAINSTORM": { "status": "completed",
"ui_designer": { "framework_addressed": true,
"status": "completed", "output_location": ".workflow/WFS-{session}/.brainstorming/ui-designer/analysis.md",
"completed_at": "timestamp", "framework_reference": "@../topic-framework.md"
"output_directory": ".workflow/WFS-{topic}/.brainstorming/ui-designer/",
"key_insights": ["ux_improvement", "accessibility_requirement", "design_pattern"]
}
}
} }
} }
``` ```
### Cross-Role Collaboration ### Integration Points
UI designer perspective provides: - **Framework Reference**: @../topic-framework.md for structured discussion points
- **User Interface Requirements** → System Architect - **Cross-Role Synthesis**: UI/UX insights available for synthesis-report.md integration
- **User Experience Metrics and Goals** → Product Manager - **Agent Autonomy**: Independent execution with framework guidance
- **Data Visualization Requirements** → Data Architect
- **Secure Interaction Design Patterns** → Security Expert
- **Feature Interface Specifications** → Feature Planner
## ✅ **Quality Assurance**
### Required Design Elements
- [ ] Comprehensive user journey analysis with pain points identified
- [ ] Complete interface design solution with visual mockups
- [ ] Accessibility compliance plan meeting WCAG 2.1 standards
- [ ] Responsive design strategy for multiple devices and screen sizes
- [ ] Usability testing plan with clear success metrics
### Design Principles Validation
- [ ] **User-Centered**: All design decisions prioritize user needs and goals
- [ ] **Consistency**: Interface elements and interactions maintain visual and functional consistency
- [ ] **Accessibility**: Design meets WCAG guidelines and supports assistive technologies
- [ ] **Usability**: Operations are simple, intuitive, with minimal learning curve
- [ ] **Visual Appeal**: Design supports brand identity while creating positive user emotions
### UX Quality Metrics
- [ ] **Task Success**: High task completion rates with minimal errors
- [ ] **Efficiency**: Optimal task completion times with streamlined workflows
- [ ] **Satisfaction**: Positive user feedback and high satisfaction scores
- [ ] **Accessibility**: Full compliance with accessibility standards and inclusive design
- [ ] **Consistency**: Uniform experience across different devices and platforms
### Implementation Readiness
- [ ] **Design System**: Comprehensive component library and style guide
- [ ] **Prototyping**: Interactive prototypes demonstrating key user flows
- [ ] **Documentation**: Clear specifications for development implementation
- [ ] **Testing Plan**: Structured approach for usability and accessibility validation
- [ ] **Iteration Strategy**: Framework for continuous design improvement based on user feedback

View File

@@ -220,53 +220,115 @@ TodoWrite({
#### Agent Prompt Template #### Agent Prompt Template
```bash ```bash
Task(subagent_type="{agent_type}", Task(subagent_type="{meta.agent}",
prompt="Execute {task_id}: {task_title} prompt="**TASK EXECUTION WITH FULL JSON LOADING**
## Task Definition ## STEP 1: Load Complete Task JSON
**ID**: {task_id} **MANDATORY**: First load the complete task JSON from: {session.task_json_path}
**Type**: {task_type}
**Agent**: {assigned_agent}
## Execution Instructions cat {session.task_json_path}
{flow_control_marker}
### Flow Control Steps (if [FLOW_CONTROL] present) **CRITICAL**: Validate all 5 required fields are present:
**AGENT RESPONSIBILITY**: Execute these pre_analysis steps sequentially with context accumulation: - id, title, status, meta, context, flow_control
{pre_analysis_steps}
### Implementation Context ## STEP 2: Task Definition (From Loaded JSON)
**Requirements**: {context.requirements} **ID**: Use id field from JSON
**Focus Paths**: {context.focus_paths} **Title**: Use title field from JSON
**Acceptance Criteria**: {context.acceptance} **Type**: Use meta.type field from JSON
**Target Files**: {flow_control.target_files} **Agent**: Use meta.agent field from JSON
**Status**: Verify status is pending or active
### Session Context ## STEP 3: Flow Control Execution (if flow_control.pre_analysis exists)
**AGENT RESPONSIBILITY**: Execute pre_analysis steps sequentially from loaded JSON:
For each step in flow_control.pre_analysis array:
1. Execute step.command with variable substitution
2. Store output to step.output_to variable
3. Handle errors per step.on_error strategy
4. Pass accumulated variables to next step
## STEP 4: Implementation Context (From JSON context field)
**Requirements**: Use context.requirements array from JSON
**Focus Paths**: Use context.focus_paths array from JSON
**Acceptance Criteria**: Use context.acceptance array from JSON
**Dependencies**: Use context.depends_on array from JSON
**Parent Context**: Use context.inherited object from JSON
**Target Files**: Use flow_control.target_files array from JSON
**Implementation Approach**: Use flow_control.implementation_approach object from JSON
## STEP 5: Session Context (Provided by workflow:execute)
**Workflow Directory**: {session.workflow_dir} **Workflow Directory**: {session.workflow_dir}
**TODO List Path**: {session.todo_list_path} **TODO List Path**: {session.todo_list_path}
**Summaries Directory**: {session.summaries_dir} **Summaries Directory**: {session.summaries_dir}
**Task JSON Path**: {session.task_json_path} **Task JSON Path**: {session.task_json_path}
**Flow Context**: {flow_context.step_outputs}
### Dependencies & Context ## STEP 6: Agent Completion Requirements
**Dependencies**: {context.depends_on} 1. **Load Task JSON**: Read and validate complete task structure
**Inherited Context**: {context.inherited} 2. **Execute Flow Control**: Run all pre_analysis steps if present
**Previous Outputs**: {flow_context.step_outputs} 3. **Implement Solution**: Follow implementation_approach from JSON
4. **Update Progress**: Mark task status in JSON as completed
5. **Update TODO List**: Update TODO_LIST.md at provided path
6. **Generate Summary**: Create completion summary in summaries directory
## Completion Requirements **JSON UPDATE COMMAND**:
1. Execute all flow control steps if present Update task status to completed using jq:
2. Implement according to acceptance criteria jq '.status = \"completed\"' {session.task_json_path} > temp.json && mv temp.json {session.task_json_path}"),
3. Update TODO_LIST.md at provided path description="Execute task with full JSON loading and validation")
4. Generate summary in summaries directory ```
5. Mark task as completed in task JSON",
description="{task_description}") #### Agent JSON Loading Specification
**MANDATORY AGENT PROTOCOL**: All agents must follow this exact loading sequence:
1. **JSON Loading**: First action must be `cat {session.task_json_path}`
2. **Field Validation**: Verify all 5 required fields exist: `id`, `title`, `status`, `meta`, `context`, `flow_control`
3. **Structure Parsing**: Parse nested fields correctly:
- `meta.type` and `meta.agent` (NOT flat `task_type`)
- `context.requirements`, `context.focus_paths`, `context.acceptance`
- `context.depends_on`, `context.inherited`
- `flow_control.pre_analysis` array, `flow_control.target_files`
4. **Flow Control Execution**: If `flow_control.pre_analysis` exists, execute steps sequentially
5. **Status Management**: Update JSON status upon completion
**JSON Field Reference**:
```json
{
"id": "IMPL-1.2",
"title": "Task title",
"status": "pending|active|completed|blocked",
"meta": {
"type": "feature|bugfix|refactor|test|docs",
"agent": "@code-developer|@planning-agent|@code-review-test-agent"
},
"context": {
"requirements": ["req1", "req2"],
"focus_paths": ["src/path1", "src/path2"],
"acceptance": ["criteria1", "criteria2"],
"depends_on": ["IMPL-1.1"],
"inherited": { "from": "parent", "context": ["info"] }
},
"flow_control": {
"pre_analysis": [
{
"step": "step_name",
"command": "bash_command",
"output_to": "variable",
"on_error": "skip_optional|fail|retry_once"
}
],
"implementation_approach": { "task_description": "...", "modification_points": ["..."] },
"target_files": ["file:function:lines"]
}
}
``` ```
#### Execution Flow #### Execution Flow
1. **Prepare Agent Context**: Assemble complete context package 1. **Load Task JSON**: Agent reads and validates complete JSON structure
2. **Generate Prompt**: Fill template with task and context data 2. **Execute Flow Control**: Agent runs pre_analysis steps if present
3. **Launch Agent**: Invoke specialized agent with structured prompt 3. **Prepare Implementation**: Agent uses implementation_approach from JSON
4. **Monitor Execution**: Track progress and handle errors 4. **Launch Implementation**: Agent follows focus_paths and target_files
5. **Collect Results**: Process agent outputs and update status 5. **Update Status**: Agent marks JSON status as completed
6. **Generate Summary**: Agent creates completion summary
#### Agent Assignment Rules #### Agent Assignment Rules
``` ```

View File

@@ -58,11 +58,11 @@ The command performs comprehensive analysis through:
RULES: Follow existing component architecture RULES: Follow existing component architecture
" -s danger-full-access " -s danger-full-access
``` ```
- **Complex tasks** (>3 modules): Specialized task agents with autonomous CLI tool orchestration and cross-module coordination - **Complex tasks** (>3 modules): Specialized general-purpose with autonomous CLI tool orchestration and cross-module coordination
- Flow control integration with automatic tool selection - Flow control integration with automatic tool selection
**2. Project Structure Analysis** ⚠️ CRITICAL PRE-PLANNING STEP **2. Project Structure Analysis** ⚠️ CRITICAL PRE-PLANNING STEP
- **Documentation Context First**: Reference `.workflow/docs/` content from `/workflow:docs` command if available - **Documentation Context First**: Reference existing documentation at `.workflow/docs/README.md`, `.workflow/docs/modules/*/overview.md`, `.workflow/docs/architecture/*.md` if available
- **Complexity assessment**: Count total saturated tasks - **Complexity assessment**: Count total saturated tasks
- **Decomposition strategy**: Flat (≤5) | Hierarchical (6-10) | Re-scope (>10) - **Decomposition strategy**: Flat (≤5) | Hierarchical (6-10) | Re-scope (>10)
- **Module boundaries**: Identify relationships and dependencies using existing documentation - **Module boundaries**: Identify relationships and dependencies using existing documentation
@@ -94,13 +94,13 @@ The following pre_analysis steps are generated for agent execution:
{ {
"step": "mcp_codebase_exploration", "step": "mcp_codebase_exploration",
"action": "Explore codebase structure and patterns using MCP tools", "action": "Explore codebase structure and patterns using MCP tools",
"command": "mcp__code-index__find_files(pattern=\"[task_focus_patterns]\") && mcp__code-index__search_code_advanced(pattern=\"[relevant_patterns]\", file_pattern=\"[target_extensions]\")", "command": "mcp__code-index__find_files(pattern=\"[focus_paths_pattern]\") && mcp__code-index__search_code_advanced(pattern=\"[context_requirements_pattern]\", file_pattern=\"[target_extensions]\")",
"output_to": "codebase_structure" "output_to": "codebase_structure"
}, },
{ {
"step": "mcp_external_context", "step": "mcp_external_context",
"action": "Get external API examples and best practices", "action": "Get external API examples and best practices",
"command": "mcp__exa__get_code_context_exa(query=\"[task_technology] [task_patterns]\", tokensNum=\"dynamic\")", "command": "mcp__exa__get_code_context_exa(query=\"[meta_type] [context_requirements]\", tokensNum=\"dynamic\")",
"output_to": "external_context" "output_to": "external_context"
}, },
{ {
@@ -131,8 +131,8 @@ The following pre_analysis steps are generated for agent execution:
"step": "analyze_task_patterns", "step": "analyze_task_patterns",
"action": "Analyze existing code patterns for task context", "action": "Analyze existing code patterns for task context",
"commands": [ "commands": [
"bash(cd \"[task_focus_paths]\")", "bash(cd \"[context.focus_paths]\")",
"bash(~/.claude/scripts/gemini-wrapper -p \"PURPOSE: Analyze task patterns TASK: Review '[task_title]' patterns CONTEXT: Task [task_id] in [task_focus_paths] EXPECTED: Pattern analysis RULES: Focus on existing patterns\")" "bash(~/.claude/scripts/gemini-wrapper -p \"PURPOSE: Analyze task patterns for '[title]' TASK: Review existing patterns and dependencies CONTEXT: @{[session.task_json_path]} @{CLAUDE.md} @{[context.focus_paths]/**/*} EXPECTED: Pattern analysis with recommendations RULES: Focus on existing patterns and integration points\")"
], ],
"output_to": "task_context", "output_to": "task_context",
"on_error": "fail" "on_error": "fail"
@@ -284,13 +284,50 @@ Each task's `flow_control.implementation_approach` defines execution strategy (p
## Reference Information ## Reference Information
### Task JSON Schema (5-Field Architecture) ### Task JSON Schema (5-Field Architecture)
Each task.json uses the workflow-architecture.md 5-field schema: Each task.json uses the standardized 5-field schema (aligned with task-core.md and execute.md):
- **id**: IMPL-N[.M] format (max 2 levels)
- **title**: Descriptive task name ```json
- **status**: pending|active|completed|blocked|container {
- **meta**: { type, agent } "id": "IMPL-N[.M]",
- **context**: { requirements, focus_paths, acceptance, parent, depends_on, inherited, shared_context } "title": "Descriptive task name",
- **flow_control**: { pre_analysis[], implementation_approach, target_files[] } "status": "pending|active|completed|blocked|container",
"meta": {
"type": "feature|bugfix|refactor|test|docs",
"agent": "@code-developer|@planning-agent|@code-review-test-agent"
},
"context": {
"requirements": ["requirement1", "requirement2"],
"focus_paths": ["src/path1", "src/path2", "specific_file.ts"],
"acceptance": ["criteria1", "criteria2"],
"parent": "IMPL-N",
"depends_on": ["IMPL-N.M"],
"inherited": {
"from": "parent_task_id",
"context": ["inherited_info"]
},
"shared_context": {
"key": "shared_value"
}
},
"flow_control": {
"pre_analysis": [
{
"step": "step_name",
"action": "description",
"command": "executable_command",
"output_to": "variable_name",
"on_error": "skip_optional|fail|retry_once"
}
],
"implementation_approach": {
"task_description": "detailed implementation strategy",
"modification_points": ["specific changes"],
"logic_flow": ["step by step process"]
},
"target_files": ["file:function:lines"]
}
}
```
**MCP Tools Integration**: Enhanced with optional MCP servers for advanced analysis: **MCP Tools Integration**: Enhanced with optional MCP servers for advanced analysis:
- **Code Index MCP**: `mcp__code-index__find_files()`, `mcp__code-index__search_code_advanced()` - **Code Index MCP**: `mcp__code-index__find_files()`, `mcp__code-index__search_code_advanced()`