diff --git a/.claude/agents/general-purpose.md b/.claude/agents/general-purpose.md index 8b769aee..bb9aeda1 100644 --- a/.claude/agents/general-purpose.md +++ b/.claude/agents/general-purpose.md @@ -91,100 +91,6 @@ ELIF context insufficient OR task has flow control marker: - Work functions as specified - 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 **When facing challenges** (max 3 attempts): diff --git a/.claude/commands/workflow/gemini-init.md b/.claude/commands/gemini/gemini-init.md similarity index 76% rename from .claude/commands/workflow/gemini-init.md rename to .claude/commands/gemini/gemini-init.md index 06a15c7d..e7e51f25 100644 --- a/.claude/commands/workflow/gemini-init.md +++ b/.claude/commands/gemini/gemini-init.md @@ -1,12 +1,12 @@ --- name: gemini-init description: Initialize Gemini CLI configuration with .gemini config and .geminiignore based on workspace analysis -usage: /workflow:gemini-init [--output=] [--preview] +usage: /gemini:gemini-init [--output=] [--preview] argument-hint: [optional: output path, preview flag] examples: - - /workflow:gemini-init - - /workflow:gemini-init --output=.config/ - - /workflow:gemini-init --preview + - /gemini:gemini-init + - /gemini:gemini-init --output=.config/ + - /gemini:gemini-init --preview --- # Gemini Initialization Command @@ -27,8 +27,9 @@ Initializes Gemini CLI configuration for the workspace by: ### Generated Files -#### .gemini Configuration File -Contains Gemini CLI contextfilename setting: +#### .gemini Configuration Directory +Creates `.gemini/` directory containing configuration files: +- `.gemini/settings.json` - Main configuration with contextfilename setting: ```json { "contextfilename": "CLAUDE.md" @@ -125,27 +126,59 @@ target/ ### Basic Usage ```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 - Sets contextfilename to "CLAUDE.md" by default ### Preview Mode ```bash -/workflow:gemini-init --preview +/gemini:gemini-init --preview ``` - Shows what would be generated without creating files - Displays detected technologies, configuration, and ignore rules ### Custom Output Path ```bash -/workflow:gemini-init --output=.config/ +/gemini:gemini-init --output=.config/ ``` - Generates files in specified directory - 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 1. Execute `get_modules_by_depth.sh json` to get structured project data @@ -175,8 +208,9 @@ detect_java() { ``` ### Phase 3: Configuration Generation -1. **Gemini Config (.gemini)**: - - Generate simple JSON config with contextfilename setting +1. **Gemini Config (.gemini/ directory)**: + - Create `.gemini/` directory if it doesn't exist + - Generate `settings.json` with contextfilename setting - Set contextfilename to "CLAUDE.md" by default ### Phase 4: Ignore Rules Generation @@ -186,7 +220,7 @@ detect_java() { 4. Sort and deduplicate rules ### 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 3. **Create backups**: Backup existing files if present 4. **Validate**: Check generated files are valid @@ -195,7 +229,7 @@ detect_java() { ``` # .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 # Detected technologies: Node.js, Python, Docker # @@ -255,13 +289,14 @@ docker-compose.override.yml - Show clear error message if cannot write to target location ### Backup Existing Files +- If `.gemini/` directory exists, create backup as `.gemini.backup/` - If `.geminiignore` exists, create backup as `.geminiignore.backup` - Include timestamp in backup filename ## Integration Points ### 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 ### CLI Tool Integration @@ -273,22 +308,22 @@ docker-compose.override.yml ### Basic Project Setup ```bash # New project - initialize Gemini configuration -/workflow:gemini-init +/gemini:gemini-init # Preview what would be generated -/workflow:gemini-init --preview +/gemini:gemini-init --preview # Generate in subdirectory -/workflow:gemini-init --output=.config/ +/gemini:gemini-init --output=.config/ ``` ### Technology Migration ```bash # 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 -/workflow:gemini-init --preview # Compare with existing configuration +/gemini:gemini-init --preview # Compare with existing configuration ``` ## Key Benefits diff --git a/.claude/commands/workflow/brainstorm/artifacts.md b/.claude/commands/workflow/brainstorm/artifacts.md index ca9ab2c0..c012ee0d 100644 --- a/.claude/commands/workflow/brainstorm/artifacts.md +++ b/.claude/commands/workflow/brainstorm/artifacts.md @@ -1,8 +1,8 @@ --- 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 "" -argument-hint: "topic or challenge description for discussion and analysis" +argument-hint: "topic or challenge description for framework generation" examples: - /workflow:brainstorm:artifacts "Build real-time collaboration feature" - /workflow:brainstorm:artifacts "Optimize database performance for millions of users" @@ -10,7 +10,7 @@ examples: allowed-tools: TodoWrite(*), Read(*), Write(*), Bash(*), Glob(*) --- -# Workflow Brainstorm Artifacts Command +# Topic Framework Generator Command ## Usage ```bash @@ -18,34 +18,34 @@ allowed-tools: TodoWrite(*), Read(*), Write(*), Bash(*), Glob(*) ``` ## 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 -### Discussion & Artifacts Generation Process +### Topic Framework Generation Process -**0. Session Management** ⚠️ FIRST STEP -- **MCP Tools Integration**: Use Code Index for technical context, Exa for industry insights +**Phase 1: Session Management** ⚠️ FIRST STEP - **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 analysis state +- **Framework check**: Check if `topic-framework.md` exists (update vs create mode) -**1. Topic Discussion & Inquiry** -- **Interactive exploration**: Direct conversation about topic aspects -- **Structured questioning**: Key areas of investigation -- **Context gathering**: User input and requirements clarification -- **Perspective collection**: Multiple viewpoints and considerations +**Phase 2: Interactive Topic Analysis** +- **Scope definition**: Define topic boundaries and objectives +- **Stakeholder identification**: Identify key users and stakeholders +- **Requirements gathering**: Extract core requirements and constraints +- **Context collection**: Gather technical and business context -**2. Topic Decomposition** -- **Component identification**: Break down topic into key areas -- **Relationship mapping**: Connections between components -- **Priority assessment**: Importance and urgency evaluation -- **Constraint analysis**: Limitations and requirements +**Phase 3: Structured Framework Generation** +- **Discussion points creation**: Generate 5 key discussion areas +- **Role-specific questions**: Create tailored questions for each relevant role +- **Framework document**: Generate structured `topic-framework.md` +- **Validation check**: Ensure framework completeness and clarity -**3. Analysis Artifacts Generation** -- **Discussion summary**: `.workflow/WFS-[topic]/.brainstorming/discussion-summary.md` - Key points and insights -- **Component analysis**: `.workflow/WFS-[topic]/.brainstorming/component-analysis.md` - Detailed decomposition +**Phase 4: Update Mechanism** +- **Existing framework detection**: Check for existing framework +- **Incremental updates**: Add new discussion points if requested +- **Version tracking**: Maintain framework evolution history ## Implementation Standards @@ -74,60 +74,75 @@ Dedicated command for topic discussion, decomposition, and analysis artifacts ge ## Document Generation -**Workflow**: Topic Discussion → Component Analysis → Documentation +**Primary Output**: Single structured `topic-framework.md` document **Document Structure**: ``` .workflow/WFS-[topic]/.brainstorming/ -├── discussion-summary.md # Main conversation and insights -└── component-analysis.md # Detailed topic breakdown +├── topic-framework.md # ★ STRUCTURED FRAMEWORK DOCUMENT +└── session.json # Framework metadata and role assignments ``` -**Document Templates**: +**Topic Framework Template**: -### discussion-summary.md +### topic-framework.md Structure ```markdown -# Topic Discussion Summary: [topic] +# [Topic] - Discussion Framework -## Overview -Brief description of the topic and its scope. +## Topic Overview +- **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 -- Major points discovered during discussion -- Important considerations identified -- Critical success factors +## Key Discussion Points -## Questions Explored -- Primary areas of investigation -- User responses and clarifications -- Open questions requiring further research +### 1. Core Requirements +- What are the fundamental requirements? +- What are the critical success factors? +- What constraints must be considered? +- What acceptance criteria define success? -## Next Steps -- Recommended follow-up actions -- Areas needing deeper analysis -``` +### 2. Technical Considerations +- What are the technical challenges? +- What architectural decisions are needed? +- What technology choices impact the solution? +- What integration points exist? -### component-analysis.md -```markdown -# Component Analysis: [topic] +### 3. User Experience Factors +- Who are the primary users? +- What are the key user journeys? +- What usability requirements exist? +- What accessibility considerations apply? -## Core Components -Detailed breakdown of main topic elements: +### 4. Implementation Challenges +- What are the main implementation risks? +- What dependencies exist? +- What resources are required? +- What timeline constraints apply? -### Component 1: [Name] -- **Purpose**: What it does -- **Dependencies**: What it relies on -- **Interfaces**: How it connects to other components +### 5. Success Metrics +- How will success be measured? +- What are the acceptance criteria? +- What performance requirements exist? +- What monitoring and analytics are needed? -### Component 2: [Name] -- **Purpose**: -- **Dependencies**: -- **Interfaces**: +## Role-Specific Analysis Points +- **System Architect**: Architecture patterns, scalability, technology stack +- **Product Manager**: Business value, user needs, market positioning +- **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 -- How components interact -- Data flow between components -- Critical dependencies +## Framework Usage Instructions +**For Role Agents**: Address each discussion point from your role perspective +**Reference Format**: Use @../topic-framework.md in your analysis.md +**Update Process**: Use /workflow:brainstorm:artifacts to update framework + +--- +*Generated by /workflow:brainstorm:artifacts* +*Last updated: [timestamp]* ``` ## Session Management ⚠️ CRITICAL @@ -162,19 +177,46 @@ Detailed breakdown of main topic elements: - **Alternatives**: What other approaches exist? - **Migration**: How do we transition from current state? -## Quality Standards +## Update Mechanism ⚠️ SMART UPDATES -### Discussion Excellence -- **Comprehensive exploration**: Cover all relevant aspects of the topic -- **Clear documentation**: Capture insights in structured, readable format -- **Actionable outcomes**: Generate practical next steps and recommendations -- **User-driven**: Follow user interests and priorities in the discussion +### Framework Update Logic +```bash +# Check existing framework +IF topic-framework.md EXISTS: + 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 -- **Structured format**: Use consistent templates for easy navigation -- **Complete coverage**: Document all important discussion points -- **Clear language**: Avoid jargon, explain technical concepts -- **Practical focus**: Emphasize actionable insights and recommendations +### Update Strategies + +**1. Complete Replacement** +- Backup existing framework as `topic-framework-[timestamp].md.backup` +- 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 - **Session creation failure**: Provide clear error message and retry option diff --git a/.claude/commands/workflow/brainstorm/auto-parallel.md b/.claude/commands/workflow/brainstorm/auto-parallel.md new file mode 100644 index 00000000..fc11672a --- /dev/null +++ b/.claude/commands/workflow/brainstorm/auto-parallel.md @@ -0,0 +1,325 @@ +--- +name: auto-parallel +description: Parallel brainstorming automation with dynamic role selection and concurrent execution +usage: /workflow:brainstorm:auto-parallel "" +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 "" +``` + +## 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/.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 \ No newline at end of file diff --git a/.claude/commands/workflow/brainstorm/auto-squeeze.md b/.claude/commands/workflow/brainstorm/auto-squeeze.md new file mode 100644 index 00000000..c14c0069 --- /dev/null +++ b/.claude/commands/workflow/brainstorm/auto-squeeze.md @@ -0,0 +1,196 @@ +--- +name: auto-squeeze +description: Sequential command coordination for brainstorming workflow commands +usage: /workflow:brainstorm:auto-squeeze "" +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 "" +``` + +## 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* \ No newline at end of file diff --git a/.claude/commands/workflow/brainstorm/auto.md b/.claude/commands/workflow/brainstorm/auto.md deleted file mode 100644 index 5d7fe6cc..00000000 --- a/.claude/commands/workflow/brainstorm/auto.md +++ /dev/null @@ -1,245 +0,0 @@ ---- -name: auto -description: Intelligent brainstorming automation with dynamic role selection and guided context gathering -usage: /workflow:brainstorm:auto "" -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 "" -``` - -## 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/.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/.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/.md))` from `.claude/workflows/cli-templates/planning-roles/` -- User responses: `bash(cat .workflow/WFS-[topic]/.brainstorming/-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 \ No newline at end of file diff --git a/.claude/commands/workflow/brainstorm/business-analyst.md b/.claude/commands/workflow/brainstorm/business-analyst.md index 5736b78f..fc9c70a6 100644 --- a/.claude/commands/workflow/brainstorm/business-analyst.md +++ b/.claude/commands/workflow/brainstorm/business-analyst.md @@ -1,273 +1,205 @@ --- name: business-analyst -description: Business analyst perspective brainstorming for process optimization and business efficiency analysis -usage: /workflow:brainstorm:business-analyst -argument-hint: "topic or challenge to analyze from business analysis perspective" +description: Generate or update business-analyst/analysis.md addressing topic-framework discussion points +usage: /workflow:brainstorm:business-analyst [topic] +argument-hint: "optional topic - uses existing framework if available" examples: + - /workflow:brainstorm:business-analyst - /workflow:brainstorm:business-analyst "workflow automation opportunities" - /workflow:brainstorm:business-analyst "business process optimization" - - /workflow:brainstorm:business-analyst "cost reduction initiatives" -allowed-tools: Task(conceptual-planning-agent), TodoWrite(*) +allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*) --- -## 📊 **Role Overview: Business Analyst** +## 📊 **Business Analyst Analysis Generator** -### Role Definition -Business process expert responsible for analyzing workflows, identifying requirements, and optimizing business operations to maximize value and efficiency. +### Purpose +**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 - **Requirements Analysis**: Identify and define business requirements and functional specifications -- **Value Assessment**: Evaluate solution business value and return on investment -- **Change Management**: Plan and manage business process changes +- **Value Analysis**: Assess cost-benefit and ROI of business initiatives +- **Change Management**: Plan organizational change and process transformation -### Focus Areas -- **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 +## ⚙️ **Execution Protocol** -### Success Metrics -- 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: +### Phase 1: Session & Framework Detection ```bash -# Check for active sessions -active_sessions=$(find .workflow -name ".active-*" 2>/dev/null) -if [ multiple_sessions ]; then - prompt_user_to_select_session() -else - use_existing_or_create_new() -fi +# Check active session and framework +CHECK: .workflow/.active-* marker files +IF active_session EXISTS: + session_id = get_active_session() + brainstorm_dir = .workflow/WFS-{session}/.brainstorming/ + + CHECK: brainstorm_dir/topic-framework.md + IF EXISTS: + framework_mode = true + load_framework = true + ELSE: + IF topic_provided: + framework_mode = false # Create analysis without framework + ELSE: + ERROR: "No framework found and no topic provided" ``` -### Step 1: Context Gathering Phase -**Business Analyst Perspective Questioning** +### Phase 2: Analysis Mode Detection +```bash +# Determine execution mode +IF framework_mode == true: + mode = "framework_based_analysis" + topic_ref = load_framework_topic() + discussion_points = extract_framework_points() +ELSE: + mode = "standalone_analysis" + topic_ref = provided_topic + discussion_points = generate_basic_structure() +``` -Before agent assignment, gather comprehensive business analyst context: - -#### 📋 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** +### Phase 3: Agent Execution with Flow Control +**Framework-Based Analysis Generation** ```bash Task(conceptual-planning-agent): " [FLOW_CONTROL] -Execute dedicated business analyst conceptual analysis for: {topic} +Execute business-analyst analysis for existing topic framework +## Context Loading ASSIGNED_ROLE: business-analyst -OUTPUT_LOCATION: .brainstorming/business-analyst/ -USER_CONTEXT: {validated_responses_from_context_gathering} +OUTPUT_LOCATION: .workflow/WFS-{session}/.brainstorming/business-analyst/ +ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"} -Flow Control Steps: -[ - { - \"step\": \"load_role_template\", - \"action\": \"Load business-analyst planning template\", - \"command\": \"bash($(cat ~/.claude/workflows/cli-templates/planning-roles/business-analyst.md))\", - \"output_to\": \"role_template\" - } -] +## Flow Control Steps +1. **load_topic_framework** + - Action: Load structured topic discussion framework + - Command: Read(.workflow/WFS-{session}/.brainstorming/topic-framework.md) + - Output: topic_framework_content -Conceptual Analysis Requirements: -- Apply business analyst perspective to topic analysis -- Focus on process optimization, cost-benefit analysis, and change management -- Use loaded role template framework for analysis structure -- Generate role-specific deliverables in designated output location -- Address all user context from questioning phase +2. **load_role_template** + - Action: Load business-analyst planning template + - Command: bash($(cat ~/.claude/workflows/cli-templates/planning-roles/business-analyst.md)) + - Output: role_template_guidelines -Deliverables: -- analysis.md: Main business analyst analysis -- recommendations.md: Business analyst recommendations -- deliverables/: Business analyst-specific outputs as defined in role template +3. **load_session_metadata** + - Action: Load session metadata and existing context + - Command: Read(.workflow/WFS-{session}/.brainstorming/session.json) + - Output: session_context -Embody 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 tracking for two-step process: -```json -[ - {"content": "Gather business analyst context through role-specific questioning", "status": "in_progress", "activeForm": "Gathering context"}, - {"content": "Validate context responses and save to business-analyst-context.md", "status": "pending", "activeForm": "Validating context"}, - {"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"} -] +## 📋 **TodoWrite Integration** + +### Workflow Progress Tracking +```javascript +TodoWrite({ + todos: [ + { + content: "Detect active session and locate topic framework", + status: "in_progress", + activeForm: "Detecting session and framework" + }, + { + content: "Load topic-framework.md and session metadata for context", + status: "pending", + activeForm: "Loading framework and session context" + }, + { + content: "Execute 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 Location +### Framework-Based Analysis ``` -.workflow/WFS-{topic-slug}/.brainstorming/business-analyst/ -├── analysis.md # Main business analysis and process assessment -├── requirements.md # Detailed business requirements and specifications -├── business-case.md # Cost-benefit analysis and financial justification -└── implementation-plan.md # Change management and implementation strategy +.workflow/WFS-{session}/.brainstorming/business-analyst/ +└── analysis.md # Structured analysis addressing topic-framework.md discussion points ``` -### Document Templates - -#### analysis.md Structure +### Analysis Document Structure ```markdown -# Business Analyst Analysis: {Topic} -*Generated: {timestamp}* +# Business Analyst Analysis: [Topic from Framework] -## Executive Summary -[Overview of key business analysis findings and recommendations] +## Framework Reference +**Topic Framework**: @../topic-framework.md +**Role Focus**: Business Analysis perspective -## Current State Assessment -### Business Process Mapping -### Stakeholder Analysis -### Performance Metrics Analysis -### Pain Points and Inefficiencies +## Discussion Points Analysis +[Address each point from topic-framework.md with business analysis expertise] -## Business Requirements -### Functional Requirements -### Non-Functional Requirements -### Stakeholder Needs Analysis -### Requirements Prioritization +### Core Requirements (from framework) +[Business analysis perspective on requirements] -## Process Optimization Opportunities -### Automation Potential -### Workflow Improvements -### Resource Optimization -### Quality Enhancements +### Technical Considerations (from framework) +[Business process and workflow considerations] -## Financial Analysis -### Cost-Benefit Analysis -### ROI Calculations -### Budget Requirements -### Financial Projections +### User Experience Factors (from framework) +[Business user experience and stakeholder considerations] -## Risk Assessment -### Business Risks -### Operational Risks -### Mitigation Strategies -### Contingency Planning +### Implementation Challenges (from framework) +[Change management and process transformation challenges] -## Implementation Strategy -### Change Management Plan -### Training Requirements -### Timeline and Milestones -### Success Metrics and KPIs +### Success Metrics (from framework) +[Business success metrics and performance indicators] -## Recommendations -### Immediate Actions (0-3 months) -### Medium-term Initiatives (3-12 months) -### Long-term Strategic Goals (12+ months) -### Resource Requirements +## Business Analysis Specific Recommendations +[Role-specific business process recommendations and solutions] + +--- +*Generated by business-analyst analysis addressing structured framework* ``` ## 🔄 **Session Integration** -### Status Synchronization -After analysis completion, update `workflow-session.json`: +### Completion Status Update ```json { - "phases": { - "BRAINSTORM": { - "business_analyst": { - "status": "completed", - "completed_at": "timestamp", - "output_directory": ".workflow/WFS-{topic}/.brainstorming/business-analyst/", - "key_insights": ["process_optimization", "cost_saving", "efficiency_gain"] - } - } + "business_analyst": { + "status": "completed", + "framework_addressed": true, + "output_location": ".workflow/WFS-{session}/.brainstorming/business-analyst/analysis.md", + "framework_reference": "@../topic-framework.md" } } ``` -### Collaboration with Other Roles -Business analyst perspective provides to other roles: -- **Business requirements and constraints** → Product Manager -- **Process technology requirements** → System Architect -- **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 \ No newline at end of file +### Integration Points +- **Framework Reference**: @../topic-framework.md for structured discussion points +- **Cross-Role Synthesis**: Business analysis insights available for synthesis-report.md integration +- **Agent Autonomy**: Independent execution with framework guidance \ No newline at end of file diff --git a/.claude/commands/workflow/brainstorm/data-architect.md b/.claude/commands/workflow/brainstorm/data-architect.md index ed14fca4..ce25da27 100644 --- a/.claude/commands/workflow/brainstorm/data-architect.md +++ b/.claude/commands/workflow/brainstorm/data-architect.md @@ -1,274 +1,205 @@ --- name: data-architect -description: Data architect perspective brainstorming for data modeling, flow, and analytics analysis -usage: /workflow:brainstorm:data-architect -argument-hint: "topic or challenge to analyze from data architecture perspective" +description: Generate or update data-architect/analysis.md addressing topic-framework discussion points +usage: /workflow:brainstorm:data-architect [topic] +argument-hint: "optional topic - uses existing framework if available" examples: + - /workflow:brainstorm:data-architect - /workflow:brainstorm:data-architect "user analytics data pipeline" - /workflow:brainstorm:data-architect "real-time data processing system" - - /workflow:brainstorm:data-architect "data warehouse modernization" -allowed-tools: Task(conceptual-planning-agent), TodoWrite(*) +allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*) --- -## 📊 **Role Overview: Data Architect** +## 📊 **Data Architect Analysis Generator** -### Role Definition -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. +### Purpose +**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 -- **Data Model Design**: Create efficient and scalable data models and schemas -- **Data Flow Design**: Plan data collection, processing, and storage workflows -- **Data Quality Management**: Ensure data accuracy, completeness, and consistency -- **Analytics and Insights**: Design data analysis and business intelligence solutions +### Core Function +- **Framework-based Analysis**: Address each discussion point in topic-framework.md +- **Data Architecture Focus**: Data models, pipelines, governance, and analytics perspective +- **Update Mechanism**: Create new or update existing analysis.md +- **Agent Delegation**: Use conceptual-planning-agent for analysis generation -### Focus Areas -- **Data Modeling**: Relational models, NoSQL, data warehouses, lakehouse architectures -- **Data Pipelines**: ETL/ELT processes, real-time processing, batch processing -- **Data Governance**: Data quality, security, privacy, compliance frameworks -- **Analytics Platforms**: BI tools, machine learning infrastructure, reporting systems +### Analysis Scope +- **Data Model Design**: Efficient and scalable data models and schemas +- **Data Flow Design**: Data collection, processing, and storage workflows +- **Data Quality Management**: Data accuracy, completeness, and consistency +- **Analytics and Insights**: Data analysis and business intelligence solutions -### Success Metrics -- Data quality and consistency metrics -- Processing performance and throughput -- Analytics accuracy and business impact -- Data governance and compliance adherence +## ⚙️ **Execution Protocol** -## 🧠 **Analysis Framework** - -@~/.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: +### Phase 1: Session & Framework Detection ```bash -# Check for active sessions -active_sessions=$(find .workflow -name ".active-*" 2>/dev/null) -if [ multiple_sessions ]; then - prompt_user_to_select_session() -else - use_existing_or_create_new() -fi +# Check active session and framework +CHECK: .workflow/.active-* marker files +IF active_session EXISTS: + session_id = get_active_session() + brainstorm_dir = .workflow/WFS-{session}/.brainstorming/ + + CHECK: brainstorm_dir/topic-framework.md + IF EXISTS: + framework_mode = true + load_framework = true + ELSE: + IF topic_provided: + framework_mode = false # Create analysis without framework + ELSE: + ERROR: "No framework found and no topic provided" ``` -### Step 1: Context Gathering Phase -**Data Architect Perspective Questioning** +### Phase 2: Analysis Mode Detection +```bash +# Determine execution mode +IF framework_mode == true: + mode = "framework_based_analysis" + topic_ref = load_framework_topic() + discussion_points = extract_framework_points() +ELSE: + mode = "standalone_analysis" + topic_ref = provided_topic + discussion_points = generate_basic_structure() +``` -Before agent assignment, gather comprehensive data architect context: - -#### 📋 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** +### Phase 3: Agent Execution with Flow Control +**Framework-Based Analysis Generation** ```bash Task(conceptual-planning-agent): " [FLOW_CONTROL] -Execute dedicated data architect conceptual analysis for: {topic} +Execute data-architect analysis for existing topic framework +## Context Loading ASSIGNED_ROLE: data-architect -OUTPUT_LOCATION: .brainstorming/data-architect/ -USER_CONTEXT: {validated_responses_from_context_gathering} +OUTPUT_LOCATION: .workflow/WFS-{session}/.brainstorming/data-architect/ +ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"} -Flow Control Steps: -[ - { - \"step\": \"load_role_template\", - \"action\": \"Load data-architect planning template\", - \"command\": \"bash($(cat ~/.claude/workflows/cli-templates/planning-roles/data-architect.md))\", - \"output_to\": \"role_template\" - } -] +## Flow Control Steps +1. **load_topic_framework** + - Action: Load structured topic discussion framework + - Command: Read(.workflow/WFS-{session}/.brainstorming/topic-framework.md) + - Output: topic_framework_content -Conceptual Analysis Requirements: -- Apply data architect perspective to topic analysis -- Focus on data models, flow patterns, storage strategies, and analytics requirements -- Use loaded role template framework for analysis structure -- Generate role-specific deliverables in designated output location -- Address all user context from questioning phase +2. **load_role_template** + - Action: Load data-architect planning template + - Command: bash($(cat ~/.claude/workflows/cli-templates/planning-roles/data-architect.md)) + - Output: role_template_guidelines -Deliverables: -- analysis.md: Main data architect analysis -- recommendations.md: Data architect recommendations -- deliverables/: Data architect-specific outputs as defined in role template +3. **load_session_metadata** + - Action: Load session metadata and existing context + - Command: Read(.workflow/WFS-{session}/.brainstorming/session.json) + - Output: session_context -Embody 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 tracking for two-step process: -```json -[ - {"content": "Gather data architect context through role-specific questioning", "status": "in_progress", "activeForm": "Gathering context"}, - {"content": "Validate context responses and save to data-architect-context.md", "status": "pending", "activeForm": "Validating context"}, - {"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"} -] +## 📋 **TodoWrite Integration** + +### Workflow Progress Tracking +```javascript +TodoWrite({ + todos: [ + { + content: "Detect active session and locate topic framework", + status: "in_progress", + activeForm: "Detecting session and framework" + }, + { + content: "Load topic-framework.md and session metadata for context", + status: "pending", + activeForm: "Loading framework and session context" + }, + { + content: "Execute 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/ -├── analysis.md # Primary data architecture analysis -├── 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 +.workflow/WFS-{session}/.brainstorming/data-architect/ +└── analysis.md # Structured analysis addressing topic-framework.md discussion points ``` -### Document Templates - -#### analysis.md Structure +### Analysis Document Structure ```markdown -# Data Architect Analysis: {Topic} -*Generated: {timestamp}* +# Data Architect Analysis: [Topic from Framework] -## Executive Summary -[Key data architecture findings and recommendations overview] +## Framework Reference +**Topic Framework**: @../topic-framework.md +**Role Focus**: Data Architecture perspective -## Current Data Landscape -### Existing Data Sources -### Current Data Architecture -### Data Quality Assessment -### Performance Bottlenecks +## Discussion Points Analysis +[Address each point from topic-framework.md with data architecture expertise] -## Data Requirements Analysis -### Business Data Needs -### Technical Data Requirements -### Data Volume and Growth Projections -### Real-time vs Batch Processing Needs +### Core Requirements (from framework) +[Data architecture perspective on requirements] -## Proposed Data Architecture -### Data Model Design -### Storage Architecture -### Processing Pipeline Design -### Integration Patterns +### Technical Considerations (from framework) +[Data model, pipeline, and storage considerations] -## Data Quality and Governance -### Data Quality Framework -### Governance Policies -### Security and Privacy Controls -### Compliance Requirements +### User Experience Factors (from framework) +[Data access patterns and analytics user experience] -## Analytics and Reporting Strategy -### Business Intelligence Architecture -### Self-Service Analytics Design -### Performance Monitoring -### Scalability Planning +### Implementation Challenges (from framework) +[Data migration, quality, and governance challenges] -## Implementation Roadmap -### Migration Strategy -### Technology Stack Recommendations -### Resource Requirements -### Risk Mitigation Plan +### Success Metrics (from framework) +[Data quality metrics and analytics success criteria] + +## Data Architecture Specific Recommendations +[Role-specific data architecture recommendations and solutions] + +--- +*Generated by data-architect analysis addressing structured framework* ``` ## 🔄 **Session Integration** -### Status Synchronization -Upon completion, update `workflow-session.json`: +### Completion Status Update ```json { - "phases": { - "BRAINSTORM": { - "data_architect": { - "status": "completed", - "completed_at": "timestamp", - "output_directory": ".workflow/WFS-{topic}/.brainstorming/data-architect/", - "key_insights": ["data_model_optimization", "pipeline_architecture", "analytics_strategy"] - } - } + "data_architect": { + "status": "completed", + "framework_addressed": true, + "output_location": ".workflow/WFS-{session}/.brainstorming/data-architect/analysis.md", + "framework_reference": "@../topic-framework.md" } } ``` -### Cross-Role Collaboration -Data architect perspective provides: -- **Data Storage Requirements** → System Architect -- **Analytics Data Requirements** → Product Manager -- **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 \ No newline at end of file +### Integration Points +- **Framework Reference**: @../topic-framework.md for structured discussion points +- **Cross-Role Synthesis**: Data architecture insights available for synthesis-report.md integration +- **Agent Autonomy**: Independent execution with framework guidance \ No newline at end of file diff --git a/.claude/commands/workflow/brainstorm/feature-planner.md b/.claude/commands/workflow/brainstorm/feature-planner.md index 9f7c497d..915a2588 100644 --- a/.claude/commands/workflow/brainstorm/feature-planner.md +++ b/.claude/commands/workflow/brainstorm/feature-planner.md @@ -1,273 +1,205 @@ --- name: feature-planner -description: Feature planner perspective brainstorming for feature development and planning analysis -usage: /workflow:brainstorm:feature-planner -argument-hint: "topic or challenge to analyze from feature planning perspective" +description: Generate or update feature-planner/analysis.md addressing topic-framework discussion points +usage: /workflow:brainstorm:feature-planner [topic] +argument-hint: "optional topic - uses existing framework if available" examples: + - /workflow:brainstorm:feature-planner - /workflow:brainstorm:feature-planner "user dashboard enhancement" - /workflow:brainstorm:feature-planner "mobile app feature roadmap" - - /workflow:brainstorm:feature-planner "integration capabilities planning" -allowed-tools: Task(conceptual-planning-agent), TodoWrite(*) +allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*) --- -## 🔧 **Role Overview: Feature Planner** +## 🔧 **Feature Planner Analysis Generator** -### Role Definition -Feature development specialist responsible for transforming business requirements into actionable feature specifications, managing development priorities, and ensuring successful feature delivery through strategic planning and execution. +### Purpose +**Specialized command for generating feature-planner/analysis.md** that addresses topic-framework.md discussion points from feature development perspective. Creates or updates role-specific analysis with framework references. -### Core Responsibilities -- **Feature Specification**: Transform business requirements into detailed feature specifications -- **Development Planning**: Create development roadmaps and manage feature priorities -- **Quality Assurance**: Design testing strategies and acceptance criteria -- **Delivery Management**: Plan feature releases and manage implementation timelines +### Core Function +- **Framework-based Analysis**: Address each discussion point in topic-framework.md +- **Feature Development Focus**: Feature specification, development planning, and delivery management +- **Update Mechanism**: Create new or update existing analysis.md +- **Agent Delegation**: Use conceptual-planning-agent for analysis generation -### Focus Areas -- **Feature Design**: User stories, acceptance criteria, feature specifications -- **Development Planning**: Sprint planning, milestones, dependency management -- **Quality Assurance**: Testing strategies, quality gates, acceptance processes -- **Release Management**: Release planning, version control, change management +### Analysis Scope +- **Feature Specification**: Transform requirements into detailed specifications +- **Development Planning**: Sprint planning, milestones, and dependency management +- **Quality Assurance**: Testing strategies and acceptance criteria +- **Delivery Management**: Release planning and implementation timelines -### Success Metrics -- Feature delivery on time and within scope -- Quality standards and acceptance criteria met -- User satisfaction with delivered features -- Development team productivity and efficiency +## ⚙️ **Execution Protocol** -## 🧠 **分析框架** - -@~/.claude/workflows/brainstorming-principles.md - -### Key Analysis Questions - -**1. Feature Requirements and Scope** -- What are the core feature requirements and user stories? -- How should MVP and full feature versions be planned? -- What cross-feature dependencies and integration requirements exist? - -**2. Implementation Complexity and Feasibility** -- What is the technical implementation complexity and what challenges exist? -- What extensions or modifications to existing systems are required? -- What third-party services and API integrations are needed? - -**3. Development Resources and Timeline** -- What are the development effort estimates and time projections? -- What skills and team configurations are required? -- What development risks exist and how can they be mitigated? - -**4. Testing and Quality Assurance** -- What testing strategies and test case designs are needed? -- What quality standards and acceptance criteria should be defined? -- What user acceptance and feedback mechanisms are required? - -## ⚡ **Two-Step Execution Flow** - -### ⚠️ Session Management - FIRST STEP -Session detection and selection: +### Phase 1: Session & Framework Detection ```bash -# Check for active sessions -active_sessions=$(find .workflow -name ".active-*" 2>/dev/null) -if [ multiple_sessions ]; then - prompt_user_to_select_session() -else - use_existing_or_create_new() -fi +# Check active session and framework +CHECK: .workflow/.active-* marker files +IF active_session EXISTS: + session_id = get_active_session() + brainstorm_dir = .workflow/WFS-{session}/.brainstorming/ + + CHECK: brainstorm_dir/topic-framework.md + IF EXISTS: + framework_mode = true + load_framework = true + ELSE: + IF topic_provided: + framework_mode = false # Create analysis without framework + ELSE: + ERROR: "No framework found and no topic provided" ``` -### Step 1: Context Gathering Phase -**Feature Planner Perspective Questioning** +### Phase 2: Analysis Mode Detection +```bash +# Determine execution mode +IF framework_mode == true: + mode = "framework_based_analysis" + topic_ref = load_framework_topic() + discussion_points = extract_framework_points() +ELSE: + mode = "standalone_analysis" + topic_ref = provided_topic + discussion_points = generate_basic_structure() +``` -Before agent assignment, gather comprehensive feature planner context: - -#### 📋 Role-Specific Questions - -**1. Implementation Complexity and Scope** -- What is the scope and complexity of the features you want to plan? -- Are there existing features or systems that need to be extended or integrated? -- What are the technical constraints or requirements that need to be considered? -- How do these features fit into the overall product roadmap? - -**2. Dependency Mapping and Integration** -- What other features, systems, or teams does this depend on? -- Are there any external APIs, services, or third-party integrations required? -- What are the data dependencies and how will data flow between components? -- What are the potential blockers or risks that could impact development? - -**3. Risk Assessment and Mitigation** -- What are the main technical, business, or timeline risks? -- Are there any unknowns or areas that need research or prototyping? -- What fallback plans or alternative approaches should be considered? -- How will quality and testing be ensured throughout development? - -**4. Technical Feasibility and Resource Planning** -- What is the estimated development effort and timeline? -- What skills, expertise, or team composition is needed? -- Are there any specific technologies, tools, or frameworks required? -- What are the performance, scalability, or maintenance considerations? - -#### Context Validation -- **Minimum Response**: Each answer must be ≥50 characters -- **Re-prompting**: Insufficient detail triggers follow-up questions -- **Context Storage**: Save responses to `.brainstorming/feature-planner-context.md` - -### Step 2: Agent Assignment with Flow Control -**Dedicated Agent Execution** +### Phase 3: Agent Execution with Flow Control +**Framework-Based Analysis Generation** ```bash Task(conceptual-planning-agent): " [FLOW_CONTROL] -Execute dedicated feature planner conceptual analysis for: {topic} +Execute feature-planner analysis for existing topic framework +## Context Loading ASSIGNED_ROLE: feature-planner -OUTPUT_LOCATION: .brainstorming/feature-planner/ -USER_CONTEXT: {validated_responses_from_context_gathering} +OUTPUT_LOCATION: .workflow/WFS-{session}/.brainstorming/feature-planner/ +ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"} -Flow Control Steps: -[ - { - \"step\": \"load_role_template\", - \"action\": \"Load feature-planner planning template\", - \"command\": \"bash($(cat ~/.claude/workflows/cli-templates/planning-roles/feature-planner.md))\", - \"output_to\": \"role_template\" - } -] +## Flow Control Steps +1. **load_topic_framework** + - Action: Load structured topic discussion framework + - Command: Read(.workflow/WFS-{session}/.brainstorming/topic-framework.md) + - Output: topic_framework_content -Conceptual Analysis Requirements: -- Apply feature planner perspective to topic analysis -- Focus on implementation complexity, dependency mapping, risk assessment, and technical feasibility -- Use loaded role template framework for analysis structure -- Generate role-specific deliverables in designated output location -- Address all user context from questioning phase +2. **load_role_template** + - Action: Load feature-planner planning template + - Command: bash($(cat ~/.claude/workflows/cli-templates/planning-roles/feature-planner.md)) + - Output: role_template_guidelines -Deliverables: -- analysis.md: Main feature planner analysis -- recommendations.md: Feature planner recommendations -- deliverables/: Feature planner-specific outputs as defined in role template +3. **load_session_metadata** + - Action: Load session metadata and existing context + - Command: Read(.workflow/WFS-{session}/.brainstorming/session.json) + - Output: session_context -Embody feature planner role expertise for comprehensive conceptual planning." +## Analysis Requirements +**Framework Reference**: Address all discussion points in topic-framework.md from feature development perspective +**Role Focus**: Feature specification, development planning, quality assurance, delivery management +**Structured Approach**: Create analysis.md addressing framework discussion points +**Template Integration**: Apply role template guidelines within framework structure + +## Expected Deliverables +1. **analysis.md**: Comprehensive feature planning analysis addressing all framework discussion points +2. **Framework Reference**: Include @../topic-framework.md reference in analysis + +## Completion Criteria +- Address each discussion point from topic-framework.md with feature development expertise +- Provide actionable development plans and implementation strategies +- Include quality assurance and testing considerations +- Reference framework document using @ notation for integration +" ``` -### Progress Tracking -TodoWrite tracking for two-step process: -```json -[ - {"content": "Gather feature planner context through role-specific questioning", "status": "in_progress", "activeForm": "Gathering context"}, - {"content": "Validate context responses and save to feature-planner-context.md", "status": "pending", "activeForm": "Validating context"}, - {"content": "Load feature-planner planning template via flow control", "status": "pending", "activeForm": "Loading template"}, - {"content": "Execute dedicated conceptual-planning-agent for feature-planner role", "status": "pending", "activeForm": "Executing agent"} -] +## 📋 **TodoWrite Integration** + +### Workflow Progress Tracking +```javascript +TodoWrite({ + todos: [ + { + content: "Detect active session and locate topic framework", + status: "in_progress", + activeForm: "Detecting session and framework" + }, + { + content: "Load topic-framework.md and session metadata for context", + status: "pending", + activeForm: "Loading framework and session context" + }, + { + content: "Execute feature-planner analysis using conceptual-planning-agent with FLOW_CONTROL", + status: "pending", + activeForm: "Executing feature-planner framework analysis" + }, + { + content: "Generate analysis.md addressing all framework discussion points", + status: "pending", + activeForm: "Generating structured feature-planner analysis" + }, + { + content: "Update session.json with feature-planner completion status", + status: "pending", + activeForm: "Updating session metadata" + } + ] +}); ``` -## 📊 **输出结构** +## 📊 **Output Structure** -### 保存位置 +### Framework-Based Analysis ``` -.workflow/WFS-{topic-slug}/.brainstorming/feature-planner/ -├── analysis.md # 主要功能分析和规范 -├── user-stories.md # 详细用户故事和验收标准 -├── development-plan.md # 开发时间线和资源规划 -└── testing-strategy.md # 质量保证和测试方法 +.workflow/WFS-{session}/.brainstorming/feature-planner/ +└── analysis.md # Structured analysis addressing topic-framework.md discussion points ``` -### 文档模板 - -#### analysis.md 结构 +### Analysis Document Structure ```markdown -# Feature Planner Analysis: {Topic} -*Generated: {timestamp}* +# Feature Planner Analysis: [Topic from Framework] -## Executive Summary -[核心功能规划发现和建议概述] +## Framework Reference +**Topic Framework**: @../topic-framework.md +**Role Focus**: Feature Development perspective -## Feature Requirements Overview -### Core Feature Specifications -### User Story Summary -### Feature Scope and Boundaries -### Success Criteria and KPIs +## Discussion Points Analysis +[Address each point from topic-framework.md with feature development expertise] -## Feature Architecture Design -### Feature Components and Modules -### Integration Points and Dependencies -### APIs and Data Interfaces -### Configuration and Customization +### Core Requirements (from framework) +[Feature development perspective on requirements] -## Development Planning -### Effort Estimation and Complexity -### Development Phases and Milestones -### Resource Requirements -### Risk Assessment and Mitigation +### Technical Considerations (from framework) +[Feature architecture and development considerations] -## Quality Assurance Strategy -### Testing Approach and Coverage -### Performance and Scalability Testing -### User Acceptance Testing Plan -### Quality Gates and Standards +### User Experience Factors (from framework) +[Feature usability and user story considerations] -## Delivery and Release Strategy -### Release Planning and Versioning -### Deployment Strategy -### Feature Rollout Plan -### Post-Release Support +### Implementation Challenges (from framework) +[Development complexity and delivery considerations] -## Feature Prioritization -### Priority Matrix (High/Medium/Low) -### Business Value Assessment -### Development Complexity Analysis -### Recommended Implementation Order +### Success Metrics (from framework) +[Feature success metrics and acceptance criteria] -## Implementation Roadmap -### Phase 1: Core Features (Weeks 1-4) -### Phase 2: Enhanced Features (Weeks 5-8) -### Phase 3: Advanced Features (Weeks 9-12) -### Continuous Improvement Plan +## Feature Development Specific Recommendations +[Role-specific feature planning recommendations and strategies] + +--- +*Generated by feature-planner analysis addressing structured framework* ``` -## 🔄 **会话集成** +## 🔄 **Session Integration** -### 状态同步 -分析完成后,更新 `workflow-session.json`: +### Completion Status Update ```json { - "phases": { - "BRAINSTORM": { - "feature_planner": { - "status": "completed", - "completed_at": "timestamp", - "output_directory": ".workflow/WFS-{topic}/.brainstorming/feature-planner/", - "key_insights": ["feature_specification", "development_timeline", "quality_requirement"] - } - } + "feature_planner": { + "status": "completed", + "framework_addressed": true, + "output_location": ".workflow/WFS-{session}/.brainstorming/feature-planner/analysis.md", + "framework_reference": "@../topic-framework.md" } } ``` -### 与其他角色的协作 -功能规划师视角为其他角色提供: -- **功能优先级和规划** → Product Manager -- **技术实现需求** → System Architect -- **界面功能要求** → UI Designer -- **数据功能需求** → Data Architect -- **功能安全需求** → Security Expert - -## ✅ **质量标准** - -### 必须包含的规划元素 -- [ ] 详细的功能规范和用户故事 -- [ ] 现实的开发时间估算 -- [ ] 全面的测试策略 -- [ ] 明确的质量标准 -- [ ] 可执行的发布计划 - -### 功能规划原则检查 -- [ ] 用户价值:每个功能都有明确的用户价值 -- [ ] 可测试性:所有功能都有验收标准 -- [ ] 可维护性:考虑长期维护和扩展 -- [ ] 可交付性:计划符合团队能力和资源 -- [ ] 可测量性:有明确的成功指标 - -### 交付质量评估 -- [ ] 功能完整性和正确性 -- [ ] 性能和稳定性指标 -- [ ] 用户体验和满意度 -- [ ] 代码质量和可维护性 -- [ ] 文档完整性和准确性 \ No newline at end of file +### Integration Points +- **Framework Reference**: @../topic-framework.md for structured discussion points +- **Cross-Role Synthesis**: Feature development insights available for synthesis-report.md integration +- **Agent Autonomy**: Independent execution with framework guidance \ No newline at end of file diff --git a/.claude/commands/workflow/brainstorm/innovation-lead.md b/.claude/commands/workflow/brainstorm/innovation-lead.md index ec1bc9f2..9756fa2c 100644 --- a/.claude/commands/workflow/brainstorm/innovation-lead.md +++ b/.claude/commands/workflow/brainstorm/innovation-lead.md @@ -1,13 +1,13 @@ --- name: innovation-lead -description: Innovation lead perspective brainstorming for emerging technologies and future opportunities analysis -usage: /workflow:brainstorm:innovation-lead -argument-hint: "topic or challenge to analyze from innovation and emerging technology perspective" +description: Generate or update innovation-lead/analysis.md addressing topic-framework discussion points +usage: /workflow:brainstorm:innovation-lead [topic] +argument-hint: "optional topic - uses existing framework if available" examples: + - /workflow:brainstorm:innovation-lead - /workflow:brainstorm:innovation-lead "AI integration opportunities" - /workflow:brainstorm:innovation-lead "future technology trends" - - /workflow:brainstorm:innovation-lead "disruptive innovation strategy" -allowed-tools: Task(conceptual-planning-agent), TodoWrite(*) +allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*) --- ## 🚀 **Role Overview: Innovation Lead** @@ -158,116 +158,97 @@ TodoWrite tracking for two-step process: ] ``` -## 📊 **输出结构** +## 📋 **TodoWrite Integration** -### 保存位置 -``` -.workflow/WFS-{topic-slug}/.brainstorming/innovation-lead/ -├── analysis.md # 主要创新分析和机会评估 -├── technology-roadmap.md # 技术趋势和未来场景 -├── innovation-concepts.md # 突破性想法和概念开发 -└── strategy-implementation.md # 创新策略和执行计划 +### Workflow Progress Tracking +```javascript +TodoWrite({ + todos: [ + { + content: "Detect active session and locate topic framework", + status: "in_progress", + activeForm: "Detecting session and framework" + }, + { + content: "Load topic-framework.md and session metadata for context", + status: "pending", + activeForm: "Loading framework and session context" + }, + { + content: "Execute 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 -# Innovation Lead Analysis: {Topic} -*Generated: {timestamp}* +# Innovation Lead Analysis: [Topic from Framework] -## Executive Summary -[核心创新机会和战略建议概述] +## Framework Reference +**Topic Framework**: @../topic-framework.md +**Role Focus**: Innovation and Emerging Technology perspective -## Technology Landscape Assessment -### Emerging Technologies Overview -### Technology Maturity Analysis -### Convergence Opportunities -### Disruptive Potential Assessment +## Discussion Points Analysis +[Address each point from topic-framework.md with innovation expertise] -## Innovation Opportunity Analysis -### Market Whitespace Identification -### Unmet Needs and Pain Points -### Disruptive Innovation Potential -### Blue Ocean Opportunities +### Core Requirements (from framework) +[Innovation perspective on emerging technology requirements] -## Competitive Intelligence -### Competitor Innovation Strategies -### Patent Landscape Analysis -### Startup Ecosystem Insights -### Investment and Funding Trends +### Technical Considerations (from framework) +[Future technology and breakthrough considerations] -## Future Scenarios and Trends -### Short-term Innovations (0-2 years) -### Medium-term Disruptions (2-5 years) -### Long-term Transformations (5+ years) -### Wild Card Scenarios +### User Experience Factors (from framework) +[Future user behavior and interaction trends] -## Innovation Concepts -### Breakthrough Ideas -### Proof-of-Concept Opportunities -### Platform Innovation Possibilities -### Ecosystem Partnership Ideas +### Implementation Challenges (from framework) +[Innovation implementation and market adoption considerations] -## Strategic Recommendations -### Innovation Investment Priorities -### Technology Partnership Strategy -### Capability Building Requirements -### Risk Mitigation Approaches +### Success Metrics (from framework) +[Innovation success metrics and breakthrough criteria] -## Implementation Roadmap -### Innovation Pilot Programs -### Technology Validation Milestones -### Scaling and Commercialization Plan -### Success Metrics and KPIs +## Innovation Specific Recommendations +[Role-specific innovation opportunities and breakthrough concepts] + +--- +*Generated by innovation-lead analysis addressing structured framework* ``` -## 🔄 **会话集成** +## 🔄 **Session Integration** -### 状态同步 -分析完成后,更新 `workflow-session.json`: +### Completion Status Update ```json { - "phases": { - "BRAINSTORM": { - "innovation_lead": { - "status": "completed", - "completed_at": "timestamp", - "output_directory": ".workflow/WFS-{topic}/.brainstorming/innovation-lead/", - "key_insights": ["breakthrough_opportunity", "emerging_technology", "disruptive_potential"] - } - } + "innovation_lead": { + "status": "completed", + "framework_addressed": true, + "output_location": ".workflow/WFS-{session}/.brainstorming/innovation-lead/analysis.md", + "framework_reference": "@../topic-framework.md" } } ``` -### 与其他角色的协作 -创新领导视角为其他角色提供: -- **创新机会和趋势** → Product Manager -- **新技术可行性** → System Architect -- **未来用户体验趋势** → UI Designer -- **新兴数据技术** → Data Architect -- **创新安全挑战** → Security Expert - -## ✅ **质量标准** - -### 必须包含的创新元素 -- [ ] 全面的技术趋势分析 -- [ ] 明确的创新机会识别 -- [ ] 具体的概念验证方案 -- [ ] 现实的实施路线图 -- [ ] 前瞻性的风险评估 - -### 创新思维原则检查 -- [ ] 前瞻性:关注未来3-10年趋势 -- [ ] 颠覆性:寻找破坏性创新机会 -- [ ] 系统性:考虑技术生态系统影响 -- [ ] 可行性:平衡愿景与现实可能 -- [ ] 差异化:创造独特竞争优势 - -### 创新价值评估 -- [ ] 市场影响的潜在规模 -- [ ] 技术可行性和成熟度 -- [ ] 竞争优势的可持续性 -- [ ] 投资回报的时间框架 -- [ ] 组织实施的复杂度 \ No newline at end of file +### Integration Points +- **Framework Reference**: @../topic-framework.md for structured discussion points +- **Cross-Role Synthesis**: Innovation insights available for synthesis-report.md integration +- **Agent Autonomy**: Independent execution with framework guidance \ No newline at end of file diff --git a/.claude/commands/workflow/brainstorm/product-manager.md b/.claude/commands/workflow/brainstorm/product-manager.md index 4727e8d8..ab8f1768 100644 --- a/.claude/commands/workflow/brainstorm/product-manager.md +++ b/.claude/commands/workflow/brainstorm/product-manager.md @@ -1,248 +1,205 @@ --- name: product-manager -description: Product manager perspective brainstorming for user needs and business value analysis -usage: /workflow:brainstorm:product-manager -argument-hint: "topic or challenge to analyze from product management perspective" +description: Generate or update product-manager/analysis.md addressing topic-framework discussion points +usage: /workflow:brainstorm:product-manager [topic] +argument-hint: "optional topic - uses existing framework if available" examples: + - /workflow:brainstorm:product-manager - /workflow:brainstorm:product-manager "user authentication redesign" - /workflow:brainstorm:product-manager "mobile app performance optimization" - - /workflow:brainstorm:product-manager "feature prioritization strategy" -allowed-tools: Task(conceptual-planning-agent), TodoWrite(*) +allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*) --- -## 🎯 **Role Overview: Product Manager** +## 🎯 **Product Manager Analysis Generator** -### Role Definition -Strategic product leader focused on maximizing user value and business impact through data-driven decisions and market-oriented thinking. +### Purpose +**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 -- **User Needs Analysis**: Identify and validate genuine user problems and requirements -- **Business Value Assessment**: Quantify commercial impact and return on investment -- **Market Positioning**: Analyze competitive landscape and identify opportunities -- **Product Strategy**: Develop roadmaps, priorities, and go-to-market approaches +### Core Function +- **Framework-based Analysis**: Address each discussion point in topic-framework.md +- **Product Strategy Focus**: User needs, business value, and market positioning +- **Update Mechanism**: Create new or update existing analysis.md +- **Agent Delegation**: Use conceptual-planning-agent for analysis generation -### Focus Areas -- **User Experience**: Journey mapping, satisfaction metrics, conversion optimization -- **Business Metrics**: ROI, user growth, retention rates, revenue impact -- **Market Dynamics**: Competitive analysis, differentiation, market trends -- **Product Lifecycle**: Feature evolution, technical debt management, scalability +### Analysis Scope +- **User Needs Analysis**: Target users, problems, and value propositions +- **Business Impact Assessment**: ROI, metrics, and commercial outcomes +- **Market Positioning**: Competitive analysis and differentiation +- **Product Strategy**: Roadmaps, priorities, and go-to-market approaches -### Success Metrics -- User satisfaction scores and engagement metrics -- Business KPIs (revenue, growth, retention) -- Market share and competitive positioning -- Product adoption and feature utilization rates +## ⚙️ **Execution Protocol** -## 🧠 **Analysis Framework** - -@~/.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: +### Phase 1: Session & Framework Detection ```bash -# Check for active sessions -active_sessions=$(find .workflow -name ".active-*" 2>/dev/null) -if [ multiple_sessions ]; then - prompt_user_to_select_session() -else - use_existing_or_create_new() -fi +# Check active session and framework +CHECK: .workflow/.active-* marker files +IF active_session EXISTS: + session_id = get_active_session() + brainstorm_dir = .workflow/WFS-{session}/.brainstorming/ + + CHECK: brainstorm_dir/topic-framework.md + IF EXISTS: + framework_mode = true + load_framework = true + ELSE: + IF topic_provided: + framework_mode = false # Create analysis without framework + ELSE: + ERROR: "No framework found and no topic provided" ``` -### Step 1: Context Gathering Phase -**Product Manager Perspective Questioning** +### Phase 2: Analysis Mode Detection +```bash +# Determine execution mode +IF framework_mode == true: + mode = "framework_based_analysis" + topic_ref = load_framework_topic() + discussion_points = extract_framework_points() +ELSE: + mode = "standalone_analysis" + topic_ref = provided_topic + discussion_points = generate_basic_structure() +``` -Before agent assignment, gather comprehensive product management context: - -#### 📋 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** +### Phase 3: Agent Execution with Flow Control +**Framework-Based Analysis Generation** ```bash Task(conceptual-planning-agent): " [FLOW_CONTROL] -Execute dedicated product-manager conceptual analysis for: {topic} +Execute product-manager analysis for existing topic framework +## Context Loading ASSIGNED_ROLE: product-manager -OUTPUT_LOCATION: .brainstorming/product-manager/ -USER_CONTEXT: {validated_responses_from_context_gathering} +OUTPUT_LOCATION: .workflow/WFS-{session}/.brainstorming/product-manager/ +ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"} -Flow Control Steps: -[ - { - \"step\": \"load_role_template\", - \"action\": \"Load product-manager planning template\", - \"command\": \"bash($(cat ~/.claude/workflows/cli-templates/planning-roles/product-manager.md))\", - \"output_to\": \"role_template\" - } -] +## Flow Control Steps +1. **load_topic_framework** + - Action: Load structured topic discussion framework + - Command: Read(.workflow/WFS-{session}/.brainstorming/topic-framework.md) + - Output: topic_framework_content -Conceptual Analysis Requirements: -- Apply product-manager perspective to topic analysis -- Focus on user value, business impact, and market positioning -- Use loaded role template framework for analysis structure -- Generate role-specific deliverables in designated output location -- Address all user context from questioning phase +2. **load_role_template** + - Action: Load product-manager planning template + - Command: bash($(cat ~/.claude/workflows/cli-templates/planning-roles/product-manager.md)) + - Output: role_template_guidelines -Deliverables: -- analysis.md: Main product management analysis -- recommendations.md: Product strategy recommendations -- deliverables/: Product-specific outputs as defined in role template +3. **load_session_metadata** + - Action: Load session metadata and existing context + - Command: Read(.workflow/WFS-{session}/.brainstorming/session.json) + - Output: session_context -Embody 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 tracking for two-step process: -```json -[ - {"content": "Gather product manager context through role-specific questioning", "status": "in_progress", "activeForm": "Gathering context"}, - {"content": "Validate context responses and save to product-manager-context.md", "status": "pending", "activeForm": "Validating context"}, - {"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"} -] +## 📋 **TodoWrite Integration** + +### Workflow Progress Tracking +```javascript +TodoWrite({ + todos: [ + { + content: "Detect active session and locate topic framework", + status: "in_progress", + activeForm: "Detecting session and framework" + }, + { + content: "Load topic-framework.md and session metadata for context", + status: "pending", + activeForm: "Loading framework and session context" + }, + { + content: "Execute 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/ -├── analysis.md # Primary product management analysis -├── business-case.md # Business justification and metrics -├── user-research.md # User research and market insights -└── roadmap.md # Strategic recommendations and timeline +.workflow/WFS-{session}/.brainstorming/product-manager/ +└── analysis.md # Structured analysis addressing topic-framework.md discussion points ``` -### Document Templates - -#### analysis.md Structure +### Analysis Document Structure ```markdown -# Product Manager Analysis: {Topic} -*Generated: {timestamp}* +# Product Manager Analysis: [Topic from Framework] -## Executive Summary -[Key findings and recommendations overview] +## Framework Reference +**Topic Framework**: @../topic-framework.md +**Role Focus**: Product Strategy perspective -## User Needs Analysis -### Target User Segments -### Core Problems Identified -### User Journey Mapping -### Priority Requirements +## Discussion Points Analysis +[Address each point from topic-framework.md with product management expertise] -## Business Impact Assessment -### Revenue Impact -### Cost Analysis -### ROI Projections -### Risk Assessment +### Core Requirements (from framework) +[Product strategy perspective on user needs and requirements] -## Competitive Analysis -### Market Position -### Differentiation Opportunities -### Competitive Advantages +### Technical Considerations (from framework) +[Business and technical feasibility considerations] -## Strategic Recommendations -### Immediate Actions (0-3 months) -### Medium-term Initiatives (3-12 months) -### Long-term Vision (12+ months) +### User Experience Factors (from framework) +[User value proposition and market positioning analysis] + +### 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** -### Status Synchronization -Upon completion, update `workflow-session.json`: +### Completion Status Update ```json { - "phases": { - "BRAINSTORM": { - "product_manager": { - "status": "completed", - "completed_at": "timestamp", - "output_directory": ".workflow/WFS-{topic}/.brainstorming/product-manager/", - "key_insights": ["user_value_proposition", "business_impact_assessment", "strategic_recommendations"] - } - } + "product_manager": { + "status": "completed", + "framework_addressed": true, + "output_location": ".workflow/WFS-{session}/.brainstorming/product-manager/analysis.md", + "framework_reference": "@../topic-framework.md" } } ``` -### Cross-Role Collaboration -Product manager perspective provides: -- **User Requirements Definition** → UI Designer -- **Business Constraints and Objectives** → System Architect -- **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 \ No newline at end of file +### Integration Points +- **Framework Reference**: @../topic-framework.md for structured discussion points +- **Cross-Role Synthesis**: Product strategy insights available for synthesis-report.md integration +- **Agent Autonomy**: Independent execution with framework guidance diff --git a/.claude/commands/workflow/brainstorm/security-expert.md b/.claude/commands/workflow/brainstorm/security-expert.md index ce1f3b1e..73bf86e1 100644 --- a/.claude/commands/workflow/brainstorm/security-expert.md +++ b/.claude/commands/workflow/brainstorm/security-expert.md @@ -1,328 +1,205 @@ --- name: security-expert -description: Security expert perspective brainstorming for threat modeling and security architecture analysis -usage: /workflow:brainstorm:security-expert -argument-hint: "topic or challenge to analyze from cybersecurity perspective" +description: Generate or update security-expert/analysis.md addressing topic-framework discussion points +usage: /workflow:brainstorm:security-expert [topic] +argument-hint: "optional topic - uses existing framework if available" examples: + - /workflow:brainstorm:security-expert - /workflow:brainstorm:security-expert "user authentication security review" - /workflow:brainstorm:security-expert "API security architecture" - - /workflow:brainstorm:security-expert "data protection compliance strategy" -allowed-tools: Task(conceptual-planning-agent), TodoWrite(*) +allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*) --- -## 🔒 **Role Overview: Security Expert** +## 🔒 **Security Expert Analysis Generator** -### Role Definition -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. +### Purpose +**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 -- **Threat Modeling**: Identify and analyze potential security threats and attack vectors -- **Security Architecture**: Design robust security controls and defensive measures -- **Risk Assessment**: Evaluate security risks and develop mitigation strategies -- **Compliance Management**: Ensure adherence to security standards and regulations +### Core Function +- **Framework-based Analysis**: Address each discussion point in topic-framework.md +- **Cybersecurity Focus**: Threat modeling, security architecture, and risk management +- **Update Mechanism**: Create new or update existing analysis.md +- **Agent Delegation**: Use conceptual-planning-agent for analysis generation -### Focus Areas -- **Application Security**: Code security, input validation, authentication, authorization -- **Infrastructure Security**: Network security, system hardening, access controls -- **Data Protection**: Encryption, privacy controls, data classification, compliance -- **Operational Security**: Monitoring, incident response, security awareness, procedures +### Analysis Scope +- **Threat Modeling**: Attack vectors, threat actors, and vulnerability assessment +- **Security Architecture**: Controls, defensive measures, and compliance +- **Risk Management**: Risk assessment, mitigation, and security policies +- **Implementation Security**: Integration, monitoring, and incident response -### Success Metrics -- Vulnerability reduction and remediation rates -- Security incident prevention and response times -- Compliance audit results and regulatory adherence -- Security awareness and training effectiveness +## ⚙️ **Execution Protocol** -## 🧠 **Analysis Framework** - -@~/.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: +### Phase 1: Session & Framework Detection ```bash -# Check for active sessions -active_sessions=$(find .workflow -name ".active-*" 2>/dev/null) -if [ multiple_sessions ]; then - prompt_user_to_select_session() -else - use_existing_or_create_new() -fi +# Check active session and framework +CHECK: .workflow/.active-* marker files +IF active_session EXISTS: + session_id = get_active_session() + brainstorm_dir = .workflow/WFS-{session}/.brainstorming/ + + CHECK: brainstorm_dir/topic-framework.md + IF EXISTS: + framework_mode = true + load_framework = true + ELSE: + IF topic_provided: + framework_mode = false # Create analysis without framework + ELSE: + ERROR: "No framework found and no topic provided" ``` -### Step 1: Context Gathering Phase -**Security Expert Perspective Questioning** +### Phase 2: Analysis Mode Detection +```bash +# Determine execution mode +IF framework_mode == true: + mode = "framework_based_analysis" + topic_ref = load_framework_topic() + discussion_points = extract_framework_points() +ELSE: + mode = "standalone_analysis" + topic_ref = provided_topic + discussion_points = generate_basic_structure() +``` -Before agent assignment, gather comprehensive security context: - -#### 📋 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** +### Phase 3: Agent Execution with Flow Control +**Framework-Based Analysis Generation** ```bash Task(conceptual-planning-agent): " [FLOW_CONTROL] -Execute dedicated security-expert conceptual analysis for: {topic} +Execute security-expert analysis for existing topic framework +## Context Loading ASSIGNED_ROLE: security-expert -OUTPUT_LOCATION: .brainstorming/security-expert/ -USER_CONTEXT: {validated_responses_from_context_gathering} +OUTPUT_LOCATION: .workflow/WFS-{session}/.brainstorming/security-expert/ +ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"} -Flow Control Steps: -[ - { - \"step\": \"load_role_template\", - \"action\": \"Load security-expert planning template\", - \"command\": \"bash($(cat ~/.claude/workflows/cli-templates/planning-roles/security-expert.md))\", - \"output_to\": \"role_template\" - } -] +## Flow Control Steps +1. **load_topic_framework** + - Action: Load structured topic discussion framework + - Command: Read(.workflow/WFS-{session}/.brainstorming/topic-framework.md) + - Output: topic_framework_content -Conceptual Analysis Requirements: -- Apply security-expert perspective to topic analysis -- Focus on threat modeling, security architecture, and risk assessment -- Use loaded role template framework for analysis structure -- Generate role-specific deliverables in designated output location -- Address all user context from questioning phase +2. **load_role_template** + - Action: Load security-expert planning template + - Command: bash($(cat ~/.claude/workflows/cli-templates/planning-roles/security-expert.md)) + - Output: role_template_guidelines -Deliverables: -- analysis.md: Main security analysis -- recommendations.md: Security recommendations -- deliverables/: Security-specific outputs as defined in role template +3. **load_session_metadata** + - Action: Load session metadata and existing context + - Command: Read(.workflow/WFS-{session}/.brainstorming/session.json) + - Output: session_context -Embody 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 tracking for two-step process: -```json -[ - {"content": "Gather security expert context through role-specific questioning", "status": "in_progress", "activeForm": "Gathering context"}, - {"content": "Validate context responses and save to security-expert-context.md", "status": "pending", "activeForm": "Validating context"}, - {"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"} -] +## 📋 **TodoWrite Integration** + +### Workflow Progress Tracking +```javascript +TodoWrite({ + todos: [ + { + content: "Detect active session and locate topic framework", + status: "in_progress", + activeForm: "Detecting session and framework" + }, + { + content: "Load topic-framework.md and session metadata for context", + status: "pending", + activeForm: "Loading framework and session context" + }, + { + content: "Execute 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 -```bash -Task(conceptual-planning-agent): " -Conduct security expert perspective brainstorming for: {topic} +## 📊 **Output Structure** -ROLE CONTEXT: Security Expert -- Focus Areas: Threat modeling, security architecture, risk management, compliance -- Analysis Framework: Security-first approach with emphasis on defense-in-depth and risk mitigation -- Success Metrics: Vulnerability reduction, incident prevention, compliance adherence, security maturity - -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." +### Framework-Based Analysis +``` +.workflow/WFS-{session}/.brainstorming/security-expert/ +└── analysis.md # Structured analysis addressing topic-framework.md discussion points ``` -## 📊 **Output Specification** - -### 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 +### Analysis Document Structure ```markdown -# Security Expert Analysis: {Topic} -*Generated: {timestamp}* +# Security Expert Analysis: [Topic from Framework] -## Executive Summary -[Key security findings and recommendations overview] +## Framework Reference +**Topic Framework**: @../topic-framework.md +**Role Focus**: Cybersecurity perspective -## Threat Landscape Assessment -### Threat Actor Analysis -### Attack Vector Identification -### Vulnerability Assessment -### Risk Prioritization Matrix +## Discussion Points Analysis +[Address each point from topic-framework.md with cybersecurity expertise] -## Security Requirements Analysis -### Functional Security Requirements -### Compliance and Regulatory Requirements -### Business Continuity Requirements -### Privacy and Data Protection Needs +### Core Requirements (from framework) +[Security perspective on threat modeling and protection requirements] -## Security Architecture Design -### Authentication and Authorization Framework -### Data Protection and Encryption Strategy -### Network Security and Access Controls -### Monitoring and Detection Capabilities +### Technical Considerations (from framework) +[Security architecture and technical control considerations] -## Risk Management Strategy -### Risk Assessment Methodology -### Risk Mitigation Controls -### Residual Risk Acceptance Criteria -### Continuous Risk Monitoring Plan +### User Experience Factors (from framework) +[Security usability and user protection considerations] -## Implementation Security Plan -### Security Control Implementation Priorities -### Security Testing and Validation Approach -### Incident Response and Recovery Procedures -### Security Awareness and Training Program +### Implementation Challenges (from framework) +[Security implementation and compliance considerations] -## Compliance and Governance -### Regulatory Compliance Framework -### Security Policy and Procedure Requirements -### Audit and Assessment Planning -### Governance and Oversight Structure +### Success Metrics (from framework) +[Security success metrics and risk management criteria] + +## Cybersecurity Specific Recommendations +[Role-specific security controls and threat mitigation strategies] + +--- +*Generated by security-expert analysis addressing structured framework* ``` ## 🔄 **Session Integration** -### Status Synchronization -Upon completion, update `workflow-session.json`: +### Completion Status Update ```json { - "phases": { - "BRAINSTORM": { - "security_expert": { - "status": "completed", - "completed_at": "timestamp", - "output_directory": ".workflow/WFS-{topic}/.brainstorming/security-expert/", - "key_insights": ["threat_model", "security_controls", "compliance_requirements"] - } - } + "security_expert": { + "status": "completed", + "framework_addressed": true, + "output_location": ".workflow/WFS-{session}/.brainstorming/security-expert/analysis.md", + "framework_reference": "@../topic-framework.md" } } ``` -### Cross-Role Collaboration -Security expert perspective provides: -- **Security Architecture Requirements** → System Architect -- **Security Compliance Constraints** → Product Manager -- **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 \ No newline at end of file +### Integration Points +- **Framework Reference**: @../topic-framework.md for structured discussion points +- **Cross-Role Synthesis**: Security insights available for synthesis-report.md integration +- **Agent Autonomy**: Independent execution with framework guidance \ No newline at end of file diff --git a/.claude/commands/workflow/brainstorm/synthesis.md b/.claude/commands/workflow/brainstorm/synthesis.md index ee0be5a5..aef9501e 100644 --- a/.claude/commands/workflow/brainstorm/synthesis.md +++ b/.claude/commands/workflow/brainstorm/synthesis.md @@ -1,77 +1,88 @@ --- 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 -argument-hint: "no arguments required - analyzes existing brainstorming session outputs" +argument-hint: "no arguments required - synthesizes existing framework and role analyses" examples: - /workflow:brainstorm:synthesis allowed-tools: Read(*), Write(*), TodoWrite(*), Glob(*) --- -## 🧩 **Command Overview: Brainstorm Synthesis** +## 🧩 **Synthesis Document Generator** ### 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 -- **Cross-Role Integration**: Consolidate analysis results from all brainstorming role perspectives -- **Insight Synthesis**: Identify consensus areas, disagreement points, and breakthrough opportunities -- **Decision Support**: Generate prioritized recommendations and strategic action plans -- **Comprehensive Reporting**: Create integrated brainstorming summary reports with implementation guidance +- **Framework Integration**: Reference topic-framework.md discussion points across all roles +- **Role Analysis Integration**: Consolidate all role/analysis.md files using @ references +- **Cross-Framework Comparison**: Compare how each role addressed framework discussion points +- **@ Reference System**: Create structured references to source documents +- **Update Detection**: Smart updates when new role analyses are added -### Analysis Scope Coverage -- **Product Management**: User needs, business value, market opportunities -- **System Architecture**: Technical design, technology selection, implementation feasibility -- **User Experience**: Interface design, usability, accessibility standards -- **Data Architecture**: Data models, processing workflows, analytics capabilities -- **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 +### Document Integration Model +**Three-Document Reference System**: +1. **topic-framework.md** → Structured discussion framework (input) +2. **[role]/analysis.md** → Role-specific analyses addressing framework (input) +3. **synthesis-report.md** → Integrated synthesis with @ references (output) ## ⚙️ **Execution Protocol** -### Phase 1: Session Detection & Data Collection +### Phase 1: Document Discovery & Validation ```bash # Detect active brainstorming session CHECK: .workflow/.active-* marker files IF active_session EXISTS: session_id = get_active_session() - load_context_from(session_id) + brainstorm_dir = .workflow/WFS-{session}/.brainstorming/ 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 ``` -### Phase 2: Role Output Scanning +### Phase 2: Role Analysis Discovery ```bash -# Scan all role brainstorming outputs +# Discover available role analyses SCAN_DIRECTORY: .workflow/WFS-{session}/.brainstorming/ -COLLECT_OUTPUTS: [ - product-manager/analysis.md, - 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 +FIND_ANALYSES: [ + */analysis.md files in role directories ] +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 -Initialize synthesis analysis task tracking: +### Phase 3: Update Mechanism Check +```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 [ - {"content": "Initialize brainstorming synthesis session", "status": "completed", "activeForm": "Initializing synthesis"}, - {"content": "Collect and analyze all role perspectives", "status": "in_progress", "activeForm": "Collecting role analyses"}, - {"content": "Identify cross-role insights and patterns", "status": "pending", "activeForm": "Identifying insights"}, - {"content": "Generate consensus and disagreement analysis", "status": "pending", "activeForm": "Analyzing consensus"}, - {"content": "Create prioritized recommendations matrix", "status": "pending", "activeForm": "Creating recommendations"}, - {"content": "Generate comprehensive synthesis report", "status": "pending", "activeForm": "Generating synthesis report"}, - {"content": "Create action plan with implementation priorities", "status": "pending", "activeForm": "Creating action plan"} + {"content": "Validate topic-framework.md and role analyses availability", "status": "in_progress", "activeForm": "Validating source documents"}, + {"content": "Load topic framework discussion points structure", "status": "pending", "activeForm": "Loading framework structure"}, + {"content": "Cross-analyze role responses to each framework point", "status": "pending", "activeForm": "Cross-analyzing framework responses"}, + {"content": "Generate synthesis-report.md with @ references", "status": "pending", "activeForm": "Generating synthesis with references"}, + {"content": "Update session metadata with synthesis completion", "status": "pending", "activeForm": "Updating session metadata"} ] ``` @@ -125,44 +136,48 @@ SORT recommendations BY priority_score DESC ### Output Location ``` .workflow/WFS-{topic-slug}/.brainstorming/ -├── synthesis-report.md # Comprehensive synthesis analysis report -├── recommendations-matrix.md # Priority recommendation matrix -├── action-plan.md # Implementation action plan -├── consensus-analysis.md # Consensus and disagreement analysis -└── brainstorm-summary.json # Machine-readable synthesis data +├── topic-framework.md # Input: Framework structure +├── [role]/analysis.md # Input: Role analyses (multiple) +└── synthesis-report.md # ★ OUTPUT: Integrated synthesis with @ references ``` ### Core Output Documents #### synthesis-report.md Structure ```markdown -# Brainstorming Synthesis Report: {Topic} -*Generated: {timestamp} | Session: WFS-{topic-slug}* +# [Topic] - Integrated Analysis + +**Framework Reference**: @topic-framework.md +**Generated**: [timestamp] | **Session**: WFS-[topic-slug] ## Executive Summary -### Key Findings Overview -### Strategic Recommendations -### Implementation Priority -### Success Metrics +Brief synthesis of key insights and recommendations across all role perspectives. -## Participating Perspectives Analysis -### Roles Analyzed: {list_of_completed_roles} -### Coverage Assessment: {completeness_percentage}% -### Analysis Quality Score: {quality_assessment} +## Framework Analysis Integration -## Cross-Role Insights Synthesis +### Discussion Point 1: Core Requirements +**Framework Questions**: @topic-framework.md (Core Requirements section) -### 🤝 Consensus Areas -**Strong Agreement (3+ roles)**: -1. **{consensus_theme_1}** - - Supporting roles: {role1, role2, role3} - - Key insight: {shared_understanding} - - Business impact: {impact_assessment} +**Role Perspectives**: +- **System Architect**: @system-architect/analysis.md (requirements section) +- **Product Manager**: @product-manager/analysis.md (requirements section) +- **Security Expert**: @security-expert/analysis.md (requirements section) -2. **{consensus_theme_2}** - - Supporting roles: {role1, role2, role4} - - Key insight: {shared_understanding} - - Business impact: {impact_assessment} +**Cross-Role Insights**: +- [Consensus areas and disagreements on core requirements] +- [Integration recommendations] + +### 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 **Innovation Opportunities**: diff --git a/.claude/commands/workflow/brainstorm/system-architect.md b/.claude/commands/workflow/brainstorm/system-architect.md index 8ff38212..a3dd19c2 100644 --- a/.claude/commands/workflow/brainstorm/system-architect.md +++ b/.claude/commands/workflow/brainstorm/system-architect.md @@ -1,57 +1,164 @@ --- name: system-architect -description: System architect perspective brainstorming for technical architecture and scalability analysis -usage: /workflow:brainstorm:system-architect -argument-hint: "topic or challenge to analyze from system architecture perspective" +description: Generate or update system-architect/analysis.md addressing topic-framework discussion points +usage: /workflow:brainstorm:system-architect [topic] +argument-hint: "optional topic - uses existing framework if available" examples: + - /workflow:brainstorm:system-architect - /workflow:brainstorm:system-architect "user authentication redesign" - - /workflow:brainstorm:system-architect "microservices migration strategy" - - /workflow:brainstorm:system-architect "system performance optimization" -allowed-tools: Task(conceptual-planning-agent), TodoWrite(*) +allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*) --- -## 🏗️ **Role Overview: System Architect** +## 🏗️ **System Architect Analysis Generator** -### Role Definition -Technical leader responsible for designing scalable, maintainable, and high-performance system architectures that align with business requirements and industry best practices. +### Purpose +**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 -- **Technical Architecture Design**: Create scalable and maintainable system architectures -- **Technology Selection**: Evaluate and choose appropriate technology stacks and tools -- **System Integration**: Design inter-system communication and integration patterns -- **Performance Optimization**: Identify bottlenecks and propose optimization solutions +### Core Function +- **Framework-based Analysis**: Address each discussion point in topic-framework.md +- **Architecture Focus**: Technical architecture, scalability, and system design perspective +- **Update Mechanism**: Create new or update existing analysis.md +- **Agent Delegation**: Use conceptual-planning-agent for analysis generation -### Focus Areas -- **Scalability**: Capacity planning, load handling, elastic scaling strategies -- **Reliability**: High availability design, fault tolerance, disaster recovery -- **Security**: Architectural security, data protection, access control patterns -- **Maintainability**: Code quality, modular design, technical debt management +### Analysis Scope +- **Technical Architecture**: Scalable and maintainable system design +- **Technology Selection**: Stack evaluation and architectural decisions +- **Performance & Scalability**: Capacity planning and optimization strategies +- **Integration Patterns**: System communication and data flow design -### Success Metrics -- System performance benchmarks (latency, throughput) -- Availability and uptime metrics -- Scalability handling capacity growth -- Technical debt and maintenance efficiency +## ⚙️ **Execution Protocol** -## 🧠 **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** -- What are the strengths and limitations of current architecture? -- How should we design architecture to meet business requirements? -- What are the trade-offs between microservices vs monolithic approaches? +### Phase 3: Agent Task Generation +**Framework-Based Analysis** (when topic-framework.md exists): +```bash +Task(subagent_type="conceptual-planning-agent", + prompt="Generate system architect analysis addressing topic framework -**2. Technology Selection Strategy** -- Which technology stack best fits current requirements? -- What are the risks and benefits of introducing new technologies? -- How well does team expertise align with technology choices? + ## Framework Integration Required + **MANDATORY**: Load and address topic-framework.md discussion points + **Framework Reference**: @{session.brainstorm_dir}/topic-framework.md + **Output Location**: {session.brainstorm_dir}/system-architect/analysis.md -**3. System Integration Planning** -- How should systems efficiently integrate and communicate? -- What are the third-party service integration strategies? + ## Analysis Requirements + 1. **Load Topic Framework**: Read topic-framework.md completely + 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? **4. Performance and Scalability** diff --git a/.claude/commands/workflow/brainstorm/ui-designer.md b/.claude/commands/workflow/brainstorm/ui-designer.md index bc13c431..ae5f0115 100644 --- a/.claude/commands/workflow/brainstorm/ui-designer.md +++ b/.claude/commands/workflow/brainstorm/ui-designer.md @@ -1,328 +1,205 @@ --- name: ui-designer -description: UI designer perspective brainstorming for user experience and interface design analysis -usage: /workflow:brainstorm:ui-designer -argument-hint: "topic or challenge to analyze from UI/UX design perspective" +description: Generate or update ui-designer/analysis.md addressing topic-framework discussion points +usage: /workflow:brainstorm:ui-designer [topic] +argument-hint: "optional topic - uses existing framework if available" examples: + - /workflow:brainstorm:ui-designer - /workflow:brainstorm:ui-designer "user authentication redesign" - /workflow:brainstorm:ui-designer "mobile app navigation improvement" - - /workflow:brainstorm:ui-designer "accessibility enhancement strategy" -allowed-tools: Task(conceptual-planning-agent), TodoWrite(*) +allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*) --- -## 🎨 **Role Overview: UI Designer** +## 🎨 **UI Designer Analysis Generator** -### Role Definition -Creative professional responsible for designing intuitive, accessible, and visually appealing user interfaces that create exceptional user experiences aligned with business goals and user needs. +### Purpose +**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 -- **User Experience Design**: Create intuitive and efficient user experiences -- **Interface Design**: Design beautiful and functional user interfaces -- **Interaction Design**: Design smooth user interaction flows and micro-interactions -- **Accessibility Design**: Ensure products are inclusive and accessible to all users +### Core Function +- **Framework-based Analysis**: Address each discussion point in topic-framework.md +- **UI/UX Focus**: User experience, interface design, and accessibility perspective +- **Update Mechanism**: Create new or update existing analysis.md +- **Agent Delegation**: Use conceptual-planning-agent for analysis generation -### Focus Areas -- **User Experience**: User journeys, usability, satisfaction metrics, conversion optimization -- **Visual Design**: Interface aesthetics, brand consistency, visual hierarchy -- **Interaction Design**: Workflow optimization, feedback mechanisms, responsiveness -- **Accessibility**: WCAG compliance, inclusive design, assistive technology support +### Analysis Scope +- **User Experience Design**: Intuitive and efficient user experiences +- **Interface Design**: Beautiful and functional user interfaces +- **Interaction Design**: Smooth user interaction flows and micro-interactions +- **Accessibility Design**: Inclusive design meeting WCAG compliance -### Success Metrics -- User satisfaction scores and usability metrics -- Task completion rates and conversion metrics -- Accessibility compliance scores -- Visual design consistency and brand alignment +## ⚙️ **Execution Protocol** -## 🧠 **Analysis Framework** - -@~/.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: +### Phase 1: Session & Framework Detection ```bash -# Check for active sessions -active_sessions=$(find .workflow -name ".active-*" 2>/dev/null) -if [ multiple_sessions ]; then - prompt_user_to_select_session() -else - use_existing_or_create_new() -fi +# Check active session and framework +CHECK: .workflow/.active-* marker files +IF active_session EXISTS: + session_id = get_active_session() + brainstorm_dir = .workflow/WFS-{session}/.brainstorming/ + + CHECK: brainstorm_dir/topic-framework.md + IF EXISTS: + framework_mode = true + load_framework = true + ELSE: + IF topic_provided: + framework_mode = false # Create analysis without framework + ELSE: + ERROR: "No framework found and no topic provided" ``` -### Step 1: Context Gathering Phase -**UI Designer Perspective Questioning** +### Phase 2: Analysis Mode Detection +```bash +# Determine execution mode +IF framework_mode == true: + mode = "framework_based_analysis" + topic_ref = load_framework_topic() + discussion_points = extract_framework_points() +ELSE: + mode = "standalone_analysis" + topic_ref = provided_topic + discussion_points = generate_basic_structure() +``` -Before agent assignment, gather comprehensive UI/UX design context: - -#### 📋 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** +### Phase 3: Agent Execution with Flow Control +**Framework-Based Analysis Generation** ```bash Task(conceptual-planning-agent): " [FLOW_CONTROL] -Execute dedicated ui-designer conceptual analysis for: {topic} +Execute ui-designer analysis for existing topic framework +## Context Loading ASSIGNED_ROLE: ui-designer -OUTPUT_LOCATION: .brainstorming/ui-designer/ -USER_CONTEXT: {validated_responses_from_context_gathering} +OUTPUT_LOCATION: .workflow/WFS-{session}/.brainstorming/ui-designer/ +ANALYSIS_MODE: {framework_mode ? "framework_based" : "standalone"} -Flow Control Steps: -[ - { - \"step\": \"load_role_template\", - \"action\": \"Load ui-designer planning template\", - \"command\": \"bash($(cat ~/.claude/workflows/cli-templates/planning-roles/ui-designer.md))\", - \"output_to\": \"role_template\" - } -] +## Flow Control Steps +1. **load_topic_framework** + - Action: Load structured topic discussion framework + - Command: Read(.workflow/WFS-{session}/.brainstorming/topic-framework.md) + - Output: topic_framework_content -Conceptual Analysis Requirements: -- Apply ui-designer perspective to topic analysis -- Focus on user experience, interface design, and interaction patterns -- Use loaded role template framework for analysis structure -- Generate role-specific deliverables in designated output location -- Address all user context from questioning phase +2. **load_role_template** + - Action: Load ui-designer planning template + - Command: bash($(cat ~/.claude/workflows/cli-templates/planning-roles/ui-designer.md)) + - Output: role_template_guidelines -Deliverables: -- analysis.md: Main UI/UX design analysis -- recommendations.md: Design recommendations -- deliverables/: UI-specific outputs as defined in role template +3. **load_session_metadata** + - Action: Load session metadata and existing context + - Command: Read(.workflow/WFS-{session}/.brainstorming/session.json) + - Output: session_context -Embody 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 tracking for two-step process: -```json -[ - {"content": "Gather ui-designer context through role-specific questioning", "status": "in_progress", "activeForm": "Gathering context"}, - {"content": "Validate context responses and save to ui-designer-context.md", "status": "pending", "activeForm": "Validating context"}, - {"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"} -] +## 📋 **TodoWrite Integration** + +### Workflow Progress Tracking +```javascript +TodoWrite({ + todos: [ + { + content: "Detect active session and locate topic framework", + status: "in_progress", + activeForm: "Detecting session and framework" + }, + { + content: "Load topic-framework.md and session metadata for context", + status: "pending", + activeForm: "Loading framework and session context" + }, + { + content: "Execute 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 -```bash -Task(conceptual-planning-agent): " -Conduct UI designer perspective brainstorming for: {topic} +## 📊 **Output Structure** -ROLE CONTEXT: UI Designer -- Focus Areas: User experience, interface design, visual design, accessibility -- Analysis Framework: User-centered design approach with emphasis on usability and accessibility -- Success Metrics: User satisfaction, task completion rates, accessibility compliance, visual appeal - -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." +### Framework-Based Analysis +``` +.workflow/WFS-{session}/.brainstorming/ui-designer/ +└── analysis.md # Structured analysis addressing topic-framework.md discussion points ``` -## 📊 **Output Specification** - -### 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 +### Analysis Document Structure ```markdown -# UI Designer Analysis: {Topic} -*Generated: {timestamp}* +# UI Designer Analysis: [Topic from Framework] -## Executive Summary -[Key UX findings and design recommendations overview] +## Framework Reference +**Topic Framework**: @../topic-framework.md +**Role Focus**: UI/UX Design perspective -## Current UX Assessment -### User Pain Points -### Interface Issues -### Accessibility Gaps -### Performance Impact on UX +## Discussion Points Analysis +[Address each point from topic-framework.md with UI/UX expertise] -## User Experience Strategy -### Target User Personas -### User Journey Mapping -### Key Interaction Points -### Success Metrics +### Core Requirements (from framework) +[UI/UX perspective on requirements] -## Visual Design Approach -### Brand Alignment -### Color and Typography Strategy -### Layout and Spacing System -### Iconography and Visual Elements +### Technical Considerations (from framework) +[Interface and design system considerations] -## Interface Design Plan -### Information Architecture -### Navigation Strategy -### Component Library -### Responsive Design Approach +### User Experience Factors (from framework) +[Detailed UX analysis and recommendations] -## Accessibility Implementation -### WCAG Compliance Plan -### Assistive Technology Support -### Inclusive Design Features -### Testing Strategy +### Implementation Challenges (from framework) +[Design implementation and accessibility considerations] -## Prototyping and Validation -### Wireframe Strategy -### Interactive Prototype Plan -### User Testing Approach -### Iteration Framework +### Success Metrics (from framework) +[UX metrics and usability success criteria] + +## UI/UX Specific Recommendations +[Role-specific design recommendations and solutions] + +--- +*Generated by ui-designer analysis addressing structured framework* ``` ## 🔄 **Session Integration** -### Status Synchronization -Upon completion, update `workflow-session.json`: +### Completion Status Update ```json { - "phases": { - "BRAINSTORM": { - "ui_designer": { - "status": "completed", - "completed_at": "timestamp", - "output_directory": ".workflow/WFS-{topic}/.brainstorming/ui-designer/", - "key_insights": ["ux_improvement", "accessibility_requirement", "design_pattern"] - } - } + "ui_designer": { + "status": "completed", + "framework_addressed": true, + "output_location": ".workflow/WFS-{session}/.brainstorming/ui-designer/analysis.md", + "framework_reference": "@../topic-framework.md" } } ``` -### Cross-Role Collaboration -UI designer perspective provides: -- **User Interface Requirements** → System Architect -- **User Experience Metrics and Goals** → Product Manager -- **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 \ No newline at end of file +### Integration Points +- **Framework Reference**: @../topic-framework.md for structured discussion points +- **Cross-Role Synthesis**: UI/UX insights available for synthesis-report.md integration +- **Agent Autonomy**: Independent execution with framework guidance \ No newline at end of file diff --git a/.claude/commands/workflow/execute.md b/.claude/commands/workflow/execute.md index ed57c908..974335cc 100644 --- a/.claude/commands/workflow/execute.md +++ b/.claude/commands/workflow/execute.md @@ -220,53 +220,115 @@ TodoWrite({ #### Agent Prompt Template ```bash -Task(subagent_type="{agent_type}", - prompt="Execute {task_id}: {task_title} +Task(subagent_type="{meta.agent}", + prompt="**TASK EXECUTION WITH FULL JSON LOADING** - ## Task Definition - **ID**: {task_id} - **Type**: {task_type} - **Agent**: {assigned_agent} + ## STEP 1: Load Complete Task JSON + **MANDATORY**: First load the complete task JSON from: {session.task_json_path} - ## Execution Instructions - {flow_control_marker} + cat {session.task_json_path} - ### Flow Control Steps (if [FLOW_CONTROL] present) - **AGENT RESPONSIBILITY**: Execute these pre_analysis steps sequentially with context accumulation: - {pre_analysis_steps} + **CRITICAL**: Validate all 5 required fields are present: + - id, title, status, meta, context, flow_control - ### Implementation Context - **Requirements**: {context.requirements} - **Focus Paths**: {context.focus_paths} - **Acceptance Criteria**: {context.acceptance} - **Target Files**: {flow_control.target_files} + ## STEP 2: Task Definition (From Loaded JSON) + **ID**: Use id field from JSON + **Title**: Use title field from JSON + **Type**: Use meta.type field from JSON + **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} **TODO List Path**: {session.todo_list_path} **Summaries Directory**: {session.summaries_dir} **Task JSON Path**: {session.task_json_path} + **Flow Context**: {flow_context.step_outputs} - ### Dependencies & Context - **Dependencies**: {context.depends_on} - **Inherited Context**: {context.inherited} - **Previous Outputs**: {flow_context.step_outputs} + ## STEP 6: Agent Completion Requirements + 1. **Load Task JSON**: Read and validate complete task structure + 2. **Execute Flow Control**: Run all pre_analysis steps if present + 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 - 1. Execute all flow control steps if present - 2. Implement according to acceptance criteria - 3. Update TODO_LIST.md at provided path - 4. Generate summary in summaries directory - 5. Mark task as completed in task JSON", - description="{task_description}") + **JSON UPDATE COMMAND**: + Update task status to completed using jq: + jq '.status = \"completed\"' {session.task_json_path} > temp.json && mv temp.json {session.task_json_path}"), + description="Execute task with full JSON loading and validation") +``` + +#### 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 -1. **Prepare Agent Context**: Assemble complete context package -2. **Generate Prompt**: Fill template with task and context data -3. **Launch Agent**: Invoke specialized agent with structured prompt -4. **Monitor Execution**: Track progress and handle errors -5. **Collect Results**: Process agent outputs and update status +1. **Load Task JSON**: Agent reads and validates complete JSON structure +2. **Execute Flow Control**: Agent runs pre_analysis steps if present +3. **Prepare Implementation**: Agent uses implementation_approach from JSON +4. **Launch Implementation**: Agent follows focus_paths and target_files +5. **Update Status**: Agent marks JSON status as completed +6. **Generate Summary**: Agent creates completion summary #### Agent Assignment Rules ``` diff --git a/.claude/commands/workflow/plan.md b/.claude/commands/workflow/plan.md index b8383214..e481a4bc 100644 --- a/.claude/commands/workflow/plan.md +++ b/.claude/commands/workflow/plan.md @@ -58,11 +58,11 @@ The command performs comprehensive analysis through: RULES: Follow existing component architecture " -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 **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 - **Decomposition strategy**: Flat (≤5) | Hierarchical (6-10) | Re-scope (>10) - **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", "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" }, { "step": "mcp_external_context", "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" }, { @@ -131,8 +131,8 @@ The following pre_analysis steps are generated for agent execution: "step": "analyze_task_patterns", "action": "Analyze existing code patterns for task context", "commands": [ - "bash(cd \"[task_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(cd \"[context.focus_paths]\")", + "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", "on_error": "fail" @@ -284,13 +284,50 @@ Each task's `flow_control.implementation_approach` defines execution strategy (p ## Reference Information ### Task JSON Schema (5-Field Architecture) -Each task.json uses the workflow-architecture.md 5-field schema: -- **id**: IMPL-N[.M] format (max 2 levels) -- **title**: Descriptive task name -- **status**: pending|active|completed|blocked|container -- **meta**: { type, agent } -- **context**: { requirements, focus_paths, acceptance, parent, depends_on, inherited, shared_context } -- **flow_control**: { pre_analysis[], implementation_approach, target_files[] } +Each task.json uses the standardized 5-field schema (aligned with task-core.md and execute.md): + +```json +{ + "id": "IMPL-N[.M]", + "title": "Descriptive task name", + "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: - **Code Index MCP**: `mcp__code-index__find_files()`, `mcp__code-index__search_code_advanced()`