mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-06 01:54:11 +08:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
451b1a762e | ||
|
|
59b4b57537 | ||
|
|
e31b93340d | ||
|
|
7e75cf8425 | ||
|
|
bd9278bb02 | ||
|
|
51bd51ea60 | ||
|
|
0e16c6ba4b |
@@ -22,9 +22,18 @@ You are an expert technical documentation specialist. Your responsibility is to
|
||||
|
||||
- **Autonomous Execution**: You are not a script runner; you are a goal-oriented worker that understands and executes a plan.
|
||||
- **Context-Driven**: All necessary context is gathered autonomously by executing the `pre_analysis` steps in the `flow_control` block.
|
||||
- **Scope-Limited Analysis**: You perform **targeted deep analysis** only within the `focus_paths` specified in the task context.
|
||||
- **Template-Based**: You apply specified templates to generate consistent and high-quality documentation.
|
||||
- **Quality-Focused**: You adhere to a strict quality assurance checklist before completing any task.
|
||||
|
||||
## Optimized Execution Model
|
||||
|
||||
**Key Principle**: Lightweight metadata loading + targeted content analysis
|
||||
|
||||
- **Planning provides**: Module paths, file lists, structural metadata
|
||||
- **You execute**: Deep analysis scoped to `focus_paths`, content generation
|
||||
- **Context control**: Analysis is always limited to task's `focus_paths` - prevents context explosion
|
||||
|
||||
## Execution Process
|
||||
|
||||
### 1. Task Ingestion
|
||||
|
||||
421
.claude/commands/workflow/action-plan-verify.md
Normal file
421
.claude/commands/workflow/action-plan-verify.md
Normal file
@@ -0,0 +1,421 @@
|
||||
---
|
||||
name: action-plan-verify
|
||||
description: Perform non-destructive cross-artifact consistency and quality analysis of IMPL_PLAN.md and task.json before execution
|
||||
usage: /workflow:action-plan-verify [--session <session-id>]
|
||||
argument-hint: "optional: --session <session-id>"
|
||||
examples:
|
||||
- /workflow:action-plan-verify
|
||||
- /workflow:action-plan-verify --session WFS-auth
|
||||
allowed-tools: Read(*), TodoWrite(*), Glob(*), Bash(*)
|
||||
---
|
||||
|
||||
## User Input
|
||||
|
||||
```text
|
||||
$ARGUMENTS
|
||||
```
|
||||
|
||||
You **MUST** consider the user input before proceeding (if not empty).
|
||||
|
||||
## Goal
|
||||
|
||||
Identify inconsistencies, duplications, ambiguities, and underspecified items between action planning artifacts (`IMPL_PLAN.md`, `task.json`) and brainstorming artifacts (`synthesis-specification.md`) before implementation. This command MUST run only after `/workflow:plan` has successfully produced complete `IMPL_PLAN.md` and task JSON files.
|
||||
|
||||
## Operating Constraints
|
||||
|
||||
**STRICTLY READ-ONLY**: Do **not** modify any files. Output a structured analysis report. Offer an optional remediation plan (user must explicitly approve before any follow-up editing commands).
|
||||
|
||||
**Synthesis Authority**: The `synthesis-specification.md` is **authoritative** for requirements and design decisions. Any conflicts between IMPL_PLAN/tasks and synthesis are automatically CRITICAL and require adjustment of the plan/tasks—not reinterpretation of requirements.
|
||||
|
||||
## Execution Steps
|
||||
|
||||
### 1. Initialize Analysis Context
|
||||
|
||||
```bash
|
||||
# Detect active workflow session
|
||||
IF --session parameter provided:
|
||||
session_id = provided session
|
||||
ELSE:
|
||||
CHECK: .workflow/.active-* marker files
|
||||
IF active_session EXISTS:
|
||||
session_id = get_active_session()
|
||||
ELSE:
|
||||
ERROR: "No active workflow session found. Use --session <session-id>"
|
||||
EXIT
|
||||
|
||||
# Derive absolute paths
|
||||
session_dir = .workflow/WFS-{session}
|
||||
brainstorm_dir = session_dir/.brainstorming
|
||||
task_dir = session_dir/.task
|
||||
|
||||
# Validate required artifacts
|
||||
SYNTHESIS = brainstorm_dir/synthesis-specification.md
|
||||
IMPL_PLAN = session_dir/IMPL_PLAN.md
|
||||
TASK_FILES = Glob(task_dir/*.json)
|
||||
|
||||
# Abort if missing
|
||||
IF NOT EXISTS(SYNTHESIS):
|
||||
ERROR: "synthesis-specification.md not found. Run /workflow:brainstorm:synthesis first"
|
||||
EXIT
|
||||
|
||||
IF NOT EXISTS(IMPL_PLAN):
|
||||
ERROR: "IMPL_PLAN.md not found. Run /workflow:plan first"
|
||||
EXIT
|
||||
|
||||
IF TASK_FILES.count == 0:
|
||||
ERROR: "No task JSON files found. Run /workflow:plan first"
|
||||
EXIT
|
||||
```
|
||||
|
||||
### 2. Load Artifacts (Progressive Disclosure)
|
||||
|
||||
Load only minimal necessary context from each artifact:
|
||||
|
||||
**From synthesis-specification.md**:
|
||||
- Functional Requirements (IDs, descriptions, acceptance criteria)
|
||||
- Non-Functional Requirements (IDs, targets)
|
||||
- Business Requirements (IDs, success metrics)
|
||||
- Key Architecture Decisions
|
||||
- Risk factors and mitigation strategies
|
||||
- Implementation Roadmap (high-level phases)
|
||||
|
||||
**From IMPL_PLAN.md**:
|
||||
- Summary and objectives
|
||||
- Context Analysis
|
||||
- Implementation Strategy
|
||||
- Task Breakdown Summary
|
||||
- Success Criteria
|
||||
- Brainstorming Artifacts References (if present)
|
||||
|
||||
**From task.json files**:
|
||||
- Task IDs
|
||||
- Titles and descriptions
|
||||
- Status
|
||||
- Dependencies (depends_on, blocks)
|
||||
- Context (requirements, focus_paths, acceptance, artifacts)
|
||||
- Flow control (pre_analysis, implementation_approach)
|
||||
- Meta (complexity, priority, use_codex)
|
||||
|
||||
### 3. Build Semantic Models
|
||||
|
||||
Create internal representations (do not include raw artifacts in output):
|
||||
|
||||
**Requirements inventory**:
|
||||
- Each functional/non-functional/business requirement with stable ID
|
||||
- Requirement text, acceptance criteria, priority
|
||||
|
||||
**Architecture decisions inventory**:
|
||||
- ADRs from synthesis
|
||||
- Technology choices
|
||||
- Data model references
|
||||
|
||||
**Task coverage mapping**:
|
||||
- Map each task to one or more requirements (by ID reference or keyword inference)
|
||||
- Map each requirement to covering tasks
|
||||
|
||||
**Dependency graph**:
|
||||
- Task-to-task dependencies (depends_on, blocks)
|
||||
- Requirement-level dependencies (from synthesis)
|
||||
|
||||
### 4. Detection Passes (Token-Efficient Analysis)
|
||||
|
||||
Focus on high-signal findings. Limit to 50 findings total; aggregate remainder in overflow summary.
|
||||
|
||||
#### A. Requirements Coverage Analysis
|
||||
|
||||
- **Orphaned Requirements**: Requirements in synthesis with zero associated tasks
|
||||
- **Unmapped Tasks**: Tasks with no clear requirement linkage
|
||||
- **NFR Coverage Gaps**: Non-functional requirements (performance, security, scalability) not reflected in tasks
|
||||
|
||||
#### B. Consistency Validation
|
||||
|
||||
- **Requirement Conflicts**: Tasks contradicting synthesis requirements
|
||||
- **Architecture Drift**: IMPL_PLAN architecture not matching synthesis ADRs
|
||||
- **Terminology Drift**: Same concept named differently across IMPL_PLAN and tasks
|
||||
- **Data Model Inconsistency**: Tasks referencing entities/fields not in synthesis data model
|
||||
|
||||
#### C. Dependency Integrity
|
||||
|
||||
- **Circular Dependencies**: Task A depends on B, B depends on C, C depends on A
|
||||
- **Missing Dependencies**: Task requires outputs from another task but no explicit dependency
|
||||
- **Broken Dependencies**: Task depends on non-existent task ID
|
||||
- **Logical Ordering Issues**: Implementation tasks before foundational setup without dependency note
|
||||
|
||||
#### D. Synthesis Alignment
|
||||
|
||||
- **Priority Conflicts**: High-priority synthesis requirements mapped to low-priority tasks
|
||||
- **Success Criteria Mismatch**: IMPL_PLAN success criteria not covering synthesis acceptance criteria
|
||||
- **Risk Mitigation Gaps**: Critical risks in synthesis without corresponding mitigation tasks
|
||||
|
||||
#### E. Task Specification Quality
|
||||
|
||||
- **Ambiguous Focus Paths**: Tasks with vague or missing focus_paths
|
||||
- **Underspecified Acceptance**: Tasks without clear acceptance criteria
|
||||
- **Missing Artifacts References**: Tasks not referencing relevant brainstorming artifacts in context.artifacts
|
||||
- **Weak Flow Control**: Tasks without clear implementation_approach or pre_analysis steps
|
||||
- **Missing Target Files**: Tasks without flow_control.target_files specification
|
||||
|
||||
#### F. Duplication Detection
|
||||
|
||||
- **Overlapping Task Scope**: Multiple tasks with nearly identical descriptions
|
||||
- **Redundant Requirements Coverage**: Same requirement covered by multiple tasks without clear partitioning
|
||||
|
||||
#### G. Feasibility Assessment
|
||||
|
||||
- **Complexity Misalignment**: Task marked "simple" but requires multiple file modifications
|
||||
- **Resource Conflicts**: Parallel tasks requiring same resources/files
|
||||
- **Skill Gap Risks**: Tasks requiring skills not in team capability assessment (from synthesis)
|
||||
|
||||
### 5. Severity Assignment
|
||||
|
||||
Use this heuristic to prioritize findings:
|
||||
|
||||
- **CRITICAL**:
|
||||
- Violates synthesis authority (requirement conflict)
|
||||
- Core requirement with zero coverage
|
||||
- Circular dependencies
|
||||
- Broken dependencies
|
||||
|
||||
- **HIGH**:
|
||||
- NFR coverage gaps
|
||||
- Priority conflicts
|
||||
- Missing risk mitigation tasks
|
||||
- Ambiguous acceptance criteria
|
||||
|
||||
- **MEDIUM**:
|
||||
- Terminology drift
|
||||
- Missing artifacts references
|
||||
- Weak flow control
|
||||
- Logical ordering issues
|
||||
|
||||
- **LOW**:
|
||||
- Style/wording improvements
|
||||
- Minor redundancy not affecting execution
|
||||
|
||||
### 6. Produce Compact Analysis Report
|
||||
|
||||
Output a Markdown report (no file writes) with the following structure:
|
||||
|
||||
```markdown
|
||||
## Action Plan Verification Report
|
||||
|
||||
**Session**: WFS-{session-id}
|
||||
**Generated**: {timestamp}
|
||||
**Artifacts Analyzed**: synthesis-specification.md, IMPL_PLAN.md, {N} task files
|
||||
|
||||
---
|
||||
|
||||
### Executive Summary
|
||||
|
||||
- **Overall Risk Level**: CRITICAL | HIGH | MEDIUM | LOW
|
||||
- **Recommendation**: BLOCK_EXECUTION | PROCEED_WITH_FIXES | PROCEED_WITH_CAUTION | PROCEED
|
||||
- **Critical Issues**: {count}
|
||||
- **High Issues**: {count}
|
||||
- **Medium Issues**: {count}
|
||||
- **Low Issues**: {count}
|
||||
|
||||
---
|
||||
|
||||
### Findings Summary
|
||||
|
||||
| ID | Category | Severity | Location(s) | Summary | Recommendation |
|
||||
|----|----------|----------|-------------|---------|----------------|
|
||||
| C1 | Coverage | CRITICAL | synthesis:FR-03 | Requirement "User auth" has zero task coverage | Add authentication implementation task |
|
||||
| H1 | Consistency | HIGH | IMPL-1.2 vs synthesis:ADR-02 | Task uses REST while synthesis specifies GraphQL | Align task with ADR-02 decision |
|
||||
| M1 | Specification | MEDIUM | IMPL-2.1 | Missing context.artifacts reference | Add @synthesis reference |
|
||||
| L1 | Duplication | LOW | IMPL-3.1, IMPL-3.2 | Similar scope | Consider merging |
|
||||
|
||||
(Add one row per finding; generate stable IDs prefixed by severity initial.)
|
||||
|
||||
---
|
||||
|
||||
### Requirements Coverage Analysis
|
||||
|
||||
| Requirement ID | Requirement Summary | Has Task? | Task IDs | Priority Match | Notes |
|
||||
|----------------|---------------------|-----------|----------|----------------|-------|
|
||||
| FR-01 | User authentication | ✅ Yes | IMPL-1.1, IMPL-1.2 | ✅ Match | Complete |
|
||||
| FR-02 | Data export | ✅ Yes | IMPL-2.3 | ⚠️ Mismatch | High req → Med priority task |
|
||||
| FR-03 | Profile management | ❌ No | - | - | **CRITICAL: Zero coverage** |
|
||||
| NFR-01 | Response time <200ms | ❌ No | - | - | **HIGH: No performance tasks** |
|
||||
|
||||
**Coverage Metrics**:
|
||||
- Functional Requirements: 85% (17/20 covered)
|
||||
- Non-Functional Requirements: 40% (2/5 covered)
|
||||
- Business Requirements: 100% (5/5 covered)
|
||||
|
||||
---
|
||||
|
||||
### Unmapped Tasks
|
||||
|
||||
| Task ID | Title | Issue | Recommendation |
|
||||
|---------|-------|-------|----------------|
|
||||
| IMPL-4.5 | Refactor utils | No requirement linkage | Link to technical debt or remove |
|
||||
|
||||
---
|
||||
|
||||
### Dependency Graph Issues
|
||||
|
||||
**Circular Dependencies**: None detected ✅
|
||||
|
||||
**Broken Dependencies**:
|
||||
- IMPL-2.3 depends on "IMPL-2.4" (non-existent)
|
||||
|
||||
**Logical Ordering Issues**:
|
||||
- IMPL-5.1 (integration test) has no dependency on IMPL-1.* (implementation tasks)
|
||||
|
||||
---
|
||||
|
||||
### Synthesis Alignment Issues
|
||||
|
||||
| Issue Type | Synthesis Reference | IMPL_PLAN/Task | Impact | Recommendation |
|
||||
|------------|---------------------|----------------|--------|----------------|
|
||||
| Architecture Conflict | synthesis:ADR-01 (JWT auth) | IMPL_PLAN uses session cookies | HIGH | Update IMPL_PLAN to use JWT |
|
||||
| Priority Mismatch | synthesis:FR-02 (High) | IMPL-2.3 (Medium) | MEDIUM | Elevate task priority |
|
||||
| Missing Risk Mitigation | synthesis:Risk-03 (API rate limits) | No mitigation tasks | HIGH | Add rate limiting implementation task |
|
||||
|
||||
---
|
||||
|
||||
### Task Specification Quality Issues
|
||||
|
||||
**Missing Artifacts References**: 12 tasks lack context.artifacts
|
||||
**Weak Flow Control**: 5 tasks lack implementation_approach
|
||||
**Missing Target Files**: 8 tasks lack flow_control.target_files
|
||||
|
||||
**Sample Issues**:
|
||||
- IMPL-1.2: No context.artifacts reference to synthesis
|
||||
- IMPL-3.1: Missing flow_control.target_files specification
|
||||
- IMPL-4.2: Vague focus_paths ["src/"] - needs refinement
|
||||
|
||||
---
|
||||
|
||||
### Feasibility Concerns
|
||||
|
||||
| Concern | Tasks Affected | Issue | Recommendation |
|
||||
|---------|----------------|-------|----------------|
|
||||
| Skill Gap | IMPL-6.1, IMPL-6.2 | Requires Kubernetes expertise not in team | Add training task or external consultant |
|
||||
| Resource Conflict | IMPL-3.1, IMPL-3.2 | Both modify src/auth/service.ts in parallel | Add dependency or serialize |
|
||||
|
||||
---
|
||||
|
||||
### Metrics
|
||||
|
||||
- **Total Requirements**: 30 (20 functional, 5 non-functional, 5 business)
|
||||
- **Total Tasks**: 25
|
||||
- **Overall Coverage**: 77% (23/30 requirements with ≥1 task)
|
||||
- **Critical Issues**: 2
|
||||
- **High Issues**: 5
|
||||
- **Medium Issues**: 8
|
||||
- **Low Issues**: 3
|
||||
|
||||
---
|
||||
|
||||
### Next Actions
|
||||
|
||||
#### If CRITICAL Issues Exist (Current Status: 2 CRITICAL)
|
||||
**Recommendation**: ❌ **BLOCK EXECUTION** - Resolve CRITICAL issues before proceeding
|
||||
|
||||
**Required Actions**:
|
||||
1. **CRITICAL**: Add authentication implementation tasks to cover FR-03
|
||||
2. **CRITICAL**: Add performance optimization tasks to cover NFR-01
|
||||
|
||||
#### If Only HIGH/MEDIUM/LOW Issues
|
||||
**Recommendation**: ⚠️ **PROCEED WITH CAUTION** - Issues are non-blocking but should be addressed
|
||||
|
||||
**Suggested Improvements**:
|
||||
1. Add context.artifacts references to all tasks (use /task:replan)
|
||||
2. Fix broken dependency IMPL-2.3 → IMPL-2.4
|
||||
3. Add flow_control.target_files to underspecified tasks
|
||||
|
||||
#### Command Suggestions
|
||||
```bash
|
||||
# Fix critical coverage gaps
|
||||
/task:create "Implement user authentication (FR-03)"
|
||||
/task:create "Add performance optimization (NFR-01)"
|
||||
|
||||
# Refine existing tasks
|
||||
/task:replan IMPL-1.2 "Add context.artifacts and target_files"
|
||||
|
||||
# Update IMPL_PLAN if architecture drift detected
|
||||
# (Manual edit required)
|
||||
```
|
||||
```
|
||||
|
||||
### 7. Provide Remediation Options
|
||||
|
||||
At end of report, ask the user:
|
||||
|
||||
```markdown
|
||||
### 🔧 Remediation Options
|
||||
|
||||
Would you like me to:
|
||||
1. **Generate task suggestions** for unmapped requirements (no auto-creation)
|
||||
2. **Provide specific edit commands** for top N issues (you execute manually)
|
||||
3. **Create remediation checklist** for systematic fixing
|
||||
|
||||
(Do NOT apply fixes automatically - this is read-only analysis)
|
||||
```
|
||||
|
||||
### 8. Update Session Metadata
|
||||
|
||||
```json
|
||||
{
|
||||
"phases": {
|
||||
"PLAN": {
|
||||
"status": "completed",
|
||||
"action_plan_verification": {
|
||||
"completed": true,
|
||||
"completed_at": "timestamp",
|
||||
"overall_risk_level": "HIGH",
|
||||
"recommendation": "PROCEED_WITH_FIXES",
|
||||
"issues": {
|
||||
"critical": 2,
|
||||
"high": 5,
|
||||
"medium": 8,
|
||||
"low": 3
|
||||
},
|
||||
"coverage": {
|
||||
"functional_requirements": 0.85,
|
||||
"non_functional_requirements": 0.40,
|
||||
"business_requirements": 1.00
|
||||
},
|
||||
"report_path": ".workflow/WFS-{session}/.process/ACTION_PLAN_VERIFICATION.md"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Operating Principles
|
||||
|
||||
### Context Efficiency
|
||||
- **Minimal high-signal tokens**: Focus on actionable findings
|
||||
- **Progressive disclosure**: Load artifacts incrementally
|
||||
- **Token-efficient output**: Limit findings table to 50 rows; summarize overflow
|
||||
- **Deterministic results**: Rerunning without changes produces consistent IDs and counts
|
||||
|
||||
### Analysis Guidelines
|
||||
- **NEVER modify files** (this is read-only analysis)
|
||||
- **NEVER hallucinate missing sections** (if absent, report them accurately)
|
||||
- **Prioritize synthesis violations** (these are always CRITICAL)
|
||||
- **Use examples over exhaustive rules** (cite specific instances)
|
||||
- **Report zero issues gracefully** (emit success report with coverage statistics)
|
||||
|
||||
### Verification Taxonomy
|
||||
- **Coverage**: Requirements → Tasks mapping
|
||||
- **Consistency**: Cross-artifact alignment
|
||||
- **Dependencies**: Task ordering and relationships
|
||||
- **Synthesis Alignment**: Adherence to authoritative requirements
|
||||
- **Task Quality**: Specification completeness
|
||||
- **Feasibility**: Implementation risks
|
||||
|
||||
## Behavior Rules
|
||||
|
||||
- **If no issues found**: Report "✅ Action plan verification passed. No issues detected." and suggest proceeding to `/workflow:execute`.
|
||||
- **If CRITICAL issues exist**: Recommend blocking execution until resolved.
|
||||
- **If only HIGH/MEDIUM issues**: User may proceed with caution, but provide improvement suggestions.
|
||||
- **If IMPL_PLAN.md or task files missing**: Instruct user to run `/workflow:plan` first.
|
||||
- **Always provide actionable remediation suggestions**: Don't just identify problems—suggest solutions.
|
||||
|
||||
## Context
|
||||
|
||||
{ARGS}
|
||||
@@ -436,4 +436,65 @@ Upon completion, update `workflow-session.json`:
|
||||
- [ ] **Implementation Readiness**: Plans detailed enough for immediate execution, with clear handoff to IMPL_PLAN.md
|
||||
- [ ] **Stakeholder Alignment**: Addresses needs and concerns of all key stakeholders
|
||||
- [ ] **Decision Traceability**: Every major decision traceable to source role analysis via @ references
|
||||
- [ ] **Continuous Improvement**: Establishes framework for ongoing optimization and learning
|
||||
- [ ] **Continuous Improvement**: Establishes framework for ongoing optimization and learning
|
||||
|
||||
## 🚀 **Recommended Next Steps**
|
||||
|
||||
After synthesis completion, follow this recommended workflow:
|
||||
|
||||
### Option 1: Standard Planning Workflow (Recommended)
|
||||
```bash
|
||||
# Step 1: Verify conceptual clarity (Quality Gate)
|
||||
/workflow:concept-verify --session WFS-{session-id}
|
||||
# → Interactive Q&A (up to 5 questions) to clarify ambiguities in synthesis
|
||||
|
||||
# Step 2: Proceed to action planning (after concept verification)
|
||||
/workflow:plan --session WFS-{session-id}
|
||||
# → Generates IMPL_PLAN.md and task.json files
|
||||
|
||||
# Step 3: Verify action plan quality (Quality Gate)
|
||||
/workflow:action-plan-verify --session WFS-{session-id}
|
||||
# → Read-only analysis to catch issues before execution
|
||||
|
||||
# Step 4: Start implementation
|
||||
/workflow:execute --session WFS-{session-id}
|
||||
```
|
||||
|
||||
### Option 2: TDD Workflow
|
||||
```bash
|
||||
# Step 1: Verify conceptual clarity
|
||||
/workflow:concept-verify --session WFS-{session-id}
|
||||
|
||||
# Step 2: Generate TDD task chains (RED-GREEN-REFACTOR)
|
||||
/workflow:tdd-plan --session WFS-{session-id} "Feature description"
|
||||
|
||||
# Step 3: Verify TDD plan quality
|
||||
/workflow:action-plan-verify --session WFS-{session-id}
|
||||
|
||||
# Step 4: Execute TDD workflow
|
||||
/workflow:execute --session WFS-{session-id}
|
||||
```
|
||||
|
||||
### Quality Gates Explained
|
||||
|
||||
**`/workflow:concept-verify`** (Phase 2 - After Brainstorming):
|
||||
- **Purpose**: Detect and resolve conceptual ambiguities before detailed planning
|
||||
- **Time**: 10-20 minutes (interactive)
|
||||
- **Value**: Reduces downstream rework by 40-60%
|
||||
- **Output**: Updated synthesis-specification.md with clarifications
|
||||
|
||||
**`/workflow:action-plan-verify`** (Phase 4 - After Planning):
|
||||
- **Purpose**: Validate IMPL_PLAN.md and task.json consistency and completeness
|
||||
- **Time**: 5-10 minutes (read-only analysis)
|
||||
- **Value**: Prevents execution of flawed plans, saves 2-5 days
|
||||
- **Output**: Verification report with actionable recommendations
|
||||
|
||||
### Skip Verification? (Not Recommended)
|
||||
|
||||
If you want to skip verification and proceed directly:
|
||||
```bash
|
||||
/workflow:plan --session WFS-{session-id}
|
||||
/workflow:execute --session WFS-{session-id}
|
||||
```
|
||||
|
||||
⚠️ **Warning**: Skipping verification increases risk of late-stage issues and rework.
|
||||
311
.claude/commands/workflow/concept-verify.md
Normal file
311
.claude/commands/workflow/concept-verify.md
Normal file
@@ -0,0 +1,311 @@
|
||||
---
|
||||
name: concept-verify
|
||||
description: Identify underspecified areas in brainstorming artifacts through targeted clarification questions before action planning
|
||||
usage: /workflow:concept-verify [--session <session-id>]
|
||||
argument-hint: "optional: --session <session-id>"
|
||||
examples:
|
||||
- /workflow:concept-verify
|
||||
- /workflow:concept-verify --session WFS-auth
|
||||
allowed-tools: Read(*), Write(*), Edit(*), TodoWrite(*), Glob(*), Bash(*)
|
||||
---
|
||||
|
||||
## User Input
|
||||
|
||||
```text
|
||||
$ARGUMENTS
|
||||
```
|
||||
|
||||
You **MUST** consider the user input before proceeding (if not empty).
|
||||
|
||||
## Outline
|
||||
|
||||
**Goal**: Detect and reduce ambiguity or missing decision points in brainstorming artifacts (synthesis-specification.md, topic-framework.md, role analyses) before moving to action planning phase.
|
||||
|
||||
**Timing**: This command runs AFTER `/workflow:brainstorm:synthesis` and BEFORE `/workflow:plan`. It serves as a quality gate to ensure conceptual clarity before detailed task planning.
|
||||
|
||||
**Execution steps**:
|
||||
|
||||
1. **Session Detection & Validation**
|
||||
```bash
|
||||
# Detect active workflow session
|
||||
IF --session parameter provided:
|
||||
session_id = provided session
|
||||
ELSE:
|
||||
CHECK: .workflow/.active-* marker files
|
||||
IF active_session EXISTS:
|
||||
session_id = get_active_session()
|
||||
ELSE:
|
||||
ERROR: "No active workflow session found. Use --session <session-id> or start a session."
|
||||
EXIT
|
||||
|
||||
# Validate brainstorming completion
|
||||
brainstorm_dir = .workflow/WFS-{session}/.brainstorming/
|
||||
|
||||
CHECK: brainstorm_dir/synthesis-specification.md
|
||||
IF NOT EXISTS:
|
||||
ERROR: "synthesis-specification.md not found. Run /workflow:brainstorm:synthesis first"
|
||||
EXIT
|
||||
|
||||
CHECK: brainstorm_dir/topic-framework.md
|
||||
IF NOT EXISTS:
|
||||
WARN: "topic-framework.md not found. Verification will be limited."
|
||||
```
|
||||
|
||||
2. **Load Brainstorming Artifacts**
|
||||
```bash
|
||||
# Load primary artifacts
|
||||
synthesis_spec = Read(brainstorm_dir + "/synthesis-specification.md")
|
||||
topic_framework = Read(brainstorm_dir + "/topic-framework.md") # if exists
|
||||
|
||||
# Discover role analyses
|
||||
role_analyses = Glob(brainstorm_dir + "/*/analysis.md")
|
||||
participating_roles = extract_role_names(role_analyses)
|
||||
```
|
||||
|
||||
3. **Ambiguity & Coverage Scan**
|
||||
|
||||
Perform structured scan using this taxonomy. For each category, mark status: **Clear** / **Partial** / **Missing**.
|
||||
|
||||
**Requirements Clarity**:
|
||||
- Functional requirements specificity and measurability
|
||||
- Non-functional requirements with quantified targets
|
||||
- Business requirements with success metrics
|
||||
- Acceptance criteria completeness
|
||||
|
||||
**Architecture & Design Clarity**:
|
||||
- Architecture decisions with rationale
|
||||
- Data model completeness (entities, relationships, constraints)
|
||||
- Technology stack justification
|
||||
- Integration points and API contracts
|
||||
|
||||
**User Experience & Interface**:
|
||||
- User journey completeness
|
||||
- Critical interaction flows
|
||||
- Error/edge case handling
|
||||
- Accessibility and localization considerations
|
||||
|
||||
**Implementation Feasibility**:
|
||||
- Team capability vs. required skills
|
||||
- External dependencies and failure modes
|
||||
- Resource constraints (timeline, personnel)
|
||||
- Technical constraints and tradeoffs
|
||||
|
||||
**Risk & Mitigation**:
|
||||
- Critical risks identified
|
||||
- Mitigation strategies defined
|
||||
- Success factors clarity
|
||||
- Monitoring and quality gates
|
||||
|
||||
**Process & Collaboration**:
|
||||
- Role responsibilities and handoffs
|
||||
- Collaboration patterns defined
|
||||
- Timeline and milestone clarity
|
||||
- Dependency management strategy
|
||||
|
||||
**Decision Traceability**:
|
||||
- Controversial points documented
|
||||
- Alternatives considered and rejected
|
||||
- Decision rationale clarity
|
||||
- Consensus vs. dissent tracking
|
||||
|
||||
**Terminology & Consistency**:
|
||||
- Canonical terms defined
|
||||
- Consistent naming across artifacts
|
||||
- No unresolved placeholders (TODO, TBD, ???)
|
||||
|
||||
For each category with **Partial** or **Missing** status, add to candidate question queue unless:
|
||||
- Clarification would not materially change implementation strategy
|
||||
- Information is better deferred to planning phase
|
||||
|
||||
4. **Generate Prioritized Question Queue**
|
||||
|
||||
Internally generate prioritized queue of candidate questions (maximum 5):
|
||||
|
||||
**Constraints**:
|
||||
- Maximum 5 questions per session
|
||||
- Each question must be answerable with:
|
||||
* Multiple-choice (2-5 mutually exclusive options), OR
|
||||
* Short answer (≤5 words)
|
||||
- Only include questions whose answers materially impact:
|
||||
* Architecture decisions
|
||||
* Data modeling
|
||||
* Task decomposition
|
||||
* Risk mitigation
|
||||
* Success criteria
|
||||
- Ensure category coverage balance
|
||||
- Favor clarifications that reduce downstream rework risk
|
||||
|
||||
**Prioritization Heuristic**:
|
||||
```
|
||||
priority_score = (impact_on_planning * 0.4) +
|
||||
(uncertainty_level * 0.3) +
|
||||
(risk_if_unresolved * 0.3)
|
||||
```
|
||||
|
||||
If zero high-impact ambiguities found, proceed to **Step 8** (report success).
|
||||
|
||||
5. **Sequential Question Loop** (Interactive)
|
||||
|
||||
Present **EXACTLY ONE** question at a time:
|
||||
|
||||
**Multiple-choice format**:
|
||||
```markdown
|
||||
**Question {N}/5**: {Question text}
|
||||
|
||||
| Option | Description |
|
||||
|--------|-------------|
|
||||
| A | {Option A description} |
|
||||
| B | {Option B description} |
|
||||
| C | {Option C description} |
|
||||
| D | {Option D description} |
|
||||
| Short | Provide different answer (≤5 words) |
|
||||
```
|
||||
|
||||
**Short-answer format**:
|
||||
```markdown
|
||||
**Question {N}/5**: {Question text}
|
||||
|
||||
Format: Short answer (≤5 words)
|
||||
```
|
||||
|
||||
**Answer Validation**:
|
||||
- Validate answer maps to option or fits ≤5 word constraint
|
||||
- If ambiguous, ask quick disambiguation (doesn't count as new question)
|
||||
- Once satisfactory, record in working memory and proceed to next question
|
||||
|
||||
**Stop Conditions**:
|
||||
- All critical ambiguities resolved
|
||||
- User signals completion ("done", "no more", "proceed")
|
||||
- Reached 5 questions
|
||||
|
||||
**Never reveal future queued questions in advance**.
|
||||
|
||||
6. **Integration After Each Answer** (Incremental Update)
|
||||
|
||||
After each accepted answer:
|
||||
|
||||
```bash
|
||||
# Ensure Clarifications section exists
|
||||
IF synthesis_spec NOT contains "## Clarifications":
|
||||
Insert "## Clarifications" section after "# [Topic]" heading
|
||||
|
||||
# Create session subsection
|
||||
IF NOT contains "### Session YYYY-MM-DD":
|
||||
Create "### Session {today's date}" under "## Clarifications"
|
||||
|
||||
# Append clarification entry
|
||||
APPEND: "- Q: {question} → A: {answer}"
|
||||
|
||||
# Apply clarification to appropriate section
|
||||
CASE category:
|
||||
Functional Requirements → Update "## Requirements & Acceptance Criteria"
|
||||
Architecture → Update "## Key Designs & Decisions" or "## Design Specifications"
|
||||
User Experience → Update "## Design Specifications > UI/UX Guidelines"
|
||||
Risk → Update "## Risk Assessment & Mitigation"
|
||||
Process → Update "## Process & Collaboration Concerns"
|
||||
Data Model → Update "## Key Designs & Decisions > Data Model Overview"
|
||||
Non-Functional → Update "## Requirements & Acceptance Criteria > Non-Functional Requirements"
|
||||
|
||||
# Remove obsolete/contradictory statements
|
||||
IF clarification invalidates existing statement:
|
||||
Replace statement instead of duplicating
|
||||
|
||||
# Save immediately
|
||||
Write(synthesis_specification.md)
|
||||
```
|
||||
|
||||
7. **Validation After Each Write**
|
||||
|
||||
- [ ] Clarifications section contains exactly one bullet per accepted answer
|
||||
- [ ] Total asked questions ≤ 5
|
||||
- [ ] Updated sections contain no lingering placeholders
|
||||
- [ ] No contradictory earlier statements remain
|
||||
- [ ] Markdown structure valid
|
||||
- [ ] Terminology consistent across all updated sections
|
||||
|
||||
8. **Completion Report**
|
||||
|
||||
After questioning loop ends or early termination:
|
||||
|
||||
```markdown
|
||||
## ✅ Concept Verification Complete
|
||||
|
||||
**Session**: WFS-{session-id}
|
||||
**Questions Asked**: {count}/5
|
||||
**Artifacts Updated**: synthesis-specification.md
|
||||
**Sections Touched**: {list section names}
|
||||
|
||||
### Coverage Summary
|
||||
|
||||
| Category | Status | Notes |
|
||||
|----------|--------|-------|
|
||||
| Requirements Clarity | ✅ Resolved | Acceptance criteria quantified |
|
||||
| Architecture & Design | ✅ Clear | No ambiguities found |
|
||||
| Implementation Feasibility | ⚠️ Deferred | Team training plan to be defined in IMPL_PLAN |
|
||||
| Risk & Mitigation | ✅ Resolved | Critical risks now have mitigation strategies |
|
||||
| ... | ... | ... |
|
||||
|
||||
**Legend**:
|
||||
- ✅ Resolved: Was Partial/Missing, now addressed
|
||||
- ✅ Clear: Already sufficient
|
||||
- ⚠️ Deferred: Low impact, better suited for planning phase
|
||||
- ❌ Outstanding: Still Partial/Missing but question quota reached
|
||||
|
||||
### Recommendations
|
||||
|
||||
- ✅ **PROCEED to /workflow:plan**: Conceptual foundation is clear
|
||||
- OR ⚠️ **Address Outstanding Items First**: {list critical outstanding items}
|
||||
- OR 🔄 **Run /workflow:concept-verify Again**: If new information available
|
||||
|
||||
### Next Steps
|
||||
```bash
|
||||
/workflow:plan # Generate IMPL_PLAN.md and task.json
|
||||
```
|
||||
```
|
||||
|
||||
9. **Update Session Metadata**
|
||||
|
||||
```json
|
||||
{
|
||||
"phases": {
|
||||
"BRAINSTORM": {
|
||||
"status": "completed",
|
||||
"concept_verification": {
|
||||
"completed": true,
|
||||
"completed_at": "timestamp",
|
||||
"questions_asked": 3,
|
||||
"categories_clarified": ["Requirements", "Risk", "Architecture"],
|
||||
"outstanding_items": [],
|
||||
"recommendation": "PROCEED_TO_PLANNING"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Behavior Rules
|
||||
|
||||
- **If no meaningful ambiguities found**: Report "No critical ambiguities detected. Conceptual foundation is clear." and suggest proceeding to `/workflow:plan`.
|
||||
- **If synthesis-specification.md missing**: Instruct user to run `/workflow:brainstorm:synthesis` first.
|
||||
- **Never exceed 5 questions** (disambiguation retries don't count as new questions).
|
||||
- **Respect user early termination**: Signals like "stop", "done", "proceed" should stop questioning.
|
||||
- **If quota reached with high-impact items unresolved**: Explicitly flag them under "Outstanding" with recommendation to address before planning.
|
||||
- **Avoid speculative tech stack questions** unless absence blocks conceptual clarity.
|
||||
|
||||
## Operating Principles
|
||||
|
||||
### Context Efficiency
|
||||
- **Minimal high-signal tokens**: Focus on actionable clarifications
|
||||
- **Progressive disclosure**: Load artifacts incrementally
|
||||
- **Deterministic results**: Rerunning without changes produces consistent analysis
|
||||
|
||||
### Verification Guidelines
|
||||
- **NEVER hallucinate missing sections**: Report them accurately
|
||||
- **Prioritize high-impact ambiguities**: Focus on what affects planning
|
||||
- **Use examples over exhaustive rules**: Cite specific instances
|
||||
- **Report zero issues gracefully**: Emit success report with coverage statistics
|
||||
- **Update incrementally**: Save after each answer to minimize context loss
|
||||
|
||||
## Context
|
||||
|
||||
{ARGS}
|
||||
@@ -1,11 +1,13 @@
|
||||
---
|
||||
name: auto
|
||||
description: Orchestrate UI design refinement workflow with interactive checkpoints for user selection
|
||||
usage: /workflow:design:auto --session <session_id> --images "<glob>" --pages "<list>" [--variants <count>] [--batch-plan]
|
||||
argument-hint: "--session WFS-session-id --images \"refs/*.png\" --pages \"dashboard,auth\" [--variants 2] [--batch-plan]"
|
||||
usage: /workflow:design:auto [--prompt "<desc>"] [--images "<glob>"] [--pages "<list>"] [--session <id>] [--variants <count>] [--use-agent] [--batch-plan]
|
||||
argument-hint: "[--prompt \"Modern SaaS\"] [--images \"refs/*.png\"] [--pages \"dashboard,auth\"] [--session WFS-xxx] [--variants 3] [--use-agent]"
|
||||
examples:
|
||||
- /workflow:design:auto --session WFS-auth --images "design-refs/*.png" --pages "login,register"
|
||||
- /workflow:design:auto --session WFS-dashboard --images "refs/*.jpg" --pages "dashboard" --variants 3 --batch-plan
|
||||
- /workflow:design:auto --prompt "Modern blog with home, article and author pages, dark theme"
|
||||
- /workflow:design:auto --prompt "SaaS dashboard and settings" --variants 3 --use-agent
|
||||
- /workflow:design:auto --images "refs/*.png" --prompt "E-commerce site: home, product, cart"
|
||||
- /workflow:design:auto --session WFS-auth --images "refs/*.png" --variants 2
|
||||
allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*), Glob(*)
|
||||
---
|
||||
|
||||
@@ -45,28 +47,97 @@ This workflow runs **semi-autonomously** with user checkpoints:
|
||||
|
||||
## Parameter Requirements
|
||||
|
||||
**Required Parameters**:
|
||||
- `--session <session_id>`: Active workflow session ID
|
||||
- `--images "<glob_pattern>"`: Reference image paths for style extraction
|
||||
- `--pages "<page_list>"`: Comma-separated list of pages to generate
|
||||
**Optional Parameters** (all have smart defaults):
|
||||
- `--pages "<page_list>"`: Pages to generate (if omitted, inferred from prompt/session)
|
||||
- `--session <session_id>`: Workflow session ID (if omitted, runs in standalone mode)
|
||||
- `--images "<glob_pattern>"`: Reference image paths (default: `design-refs/*`)
|
||||
- `--prompt "<description>"`: Text description of design style and pages
|
||||
- `--variants <count>`: Number of style/UI variants to generate (default: 3, range: 1-5)
|
||||
- `--use-agent`: Enable agent-driven creative exploration mode
|
||||
- `--batch-plan`: Auto-generate implementation tasks after design-update (integrated mode only)
|
||||
|
||||
**Optional Parameters**:
|
||||
- `--variants <count>`: Number of UI variants per page (default: 1)
|
||||
- `--batch-plan`: Auto-generate implementation tasks for selected prototypes after design-update
|
||||
**Input Source Rules**:
|
||||
- Must provide at least one of: `--images` or `--prompt`
|
||||
- Both can be combined for guided style analysis
|
||||
|
||||
**Page Inference Logic**:
|
||||
1. If `--pages` provided: Use explicit list
|
||||
2. Else if `--prompt` provided: Extract page names from prompt text
|
||||
- Example: "dashboard and login page" → ["dashboard", "login"]
|
||||
- Example: "Modern SaaS app" → ["home", "dashboard", "settings"]
|
||||
3. Else if `--session` provided (integrated mode): Infer from synthesis-specification.md
|
||||
4. Else: Default to ["home"]
|
||||
|
||||
## Execution Modes
|
||||
|
||||
### Integrated Mode (with `--session`)
|
||||
- Works within existing workflow session: `.workflow/WFS-{session}/`
|
||||
- Reads from `.brainstorming/` artifacts
|
||||
- Phase 4 (design-update) updates synthesis-specification.md
|
||||
- Enables `--batch-plan` for task generation
|
||||
|
||||
### Standalone Mode (without `--session`)
|
||||
- Creates new session: `design-session-YYYYMMDD-HHMMSS/`
|
||||
- Independent of brainstorming phase
|
||||
- Phase 4 (design-update) is **skipped**
|
||||
- Outputs final summary instead of artifact updates
|
||||
|
||||
### Mode Detection
|
||||
```bash
|
||||
IF --session provided:
|
||||
mode = "integrated"
|
||||
base_path = ".workflow/WFS-{session}/"
|
||||
ELSE:
|
||||
mode = "standalone"
|
||||
session_id = "design-session-" + timestamp()
|
||||
base_path = "./{session_id}/"
|
||||
```
|
||||
|
||||
## 5-Phase Execution
|
||||
|
||||
### Phase 0: Page Inference (if needed)
|
||||
**Infer page list if not explicitly provided**:
|
||||
```bash
|
||||
IF --pages provided:
|
||||
page_list = {explicit_pages}
|
||||
ELSE IF --prompt provided:
|
||||
# Extract page names from prompt using Claude analysis
|
||||
page_list = extract_page_names_from_prompt({prompt_text})
|
||||
# Examples:
|
||||
# "dashboard and login page" → ["dashboard", "login"]
|
||||
# "blog with home, article, author pages" → ["home", "article", "author"]
|
||||
# "Modern SaaS app" → ["home", "dashboard", "settings"]
|
||||
ELSE IF --session provided:
|
||||
# Read synthesis-specification.md and extract page requirements
|
||||
page_list = extract_pages_from_synthesis({session_id})
|
||||
ELSE:
|
||||
page_list = ["home"] # Default fallback
|
||||
|
||||
VALIDATE: page_list not empty
|
||||
```
|
||||
|
||||
### Phase 1: Style Extraction
|
||||
**Command**: `SlashCommand(command="/workflow:design:style-extract --session {session_id} --images \"{image_glob}\"")`
|
||||
**Command Construction**:
|
||||
```bash
|
||||
variants_flag = --variants present ? "--variants {variants_count}" : ""
|
||||
agent_flag = --use-agent present ? "--use-agent" : ""
|
||||
images_flag = --images present ? "--images \"{image_glob}\"" : ""
|
||||
prompt_flag = --prompt present ? "--prompt \"{prompt_text}\"" : ""
|
||||
session_flag = --session present ? "--session {session_id}" : ""
|
||||
|
||||
command = "/workflow:design:style-extract {session_flag} {images_flag} {prompt_flag} {variants_flag} {agent_flag}"
|
||||
```
|
||||
|
||||
**Command**: `SlashCommand(command="{constructed_command}")`
|
||||
|
||||
**Parse Output**:
|
||||
- Verify: `.design/style-extraction/style-cards.json` created
|
||||
- Extract: `style_cards_count` from output message
|
||||
- Extract: `style_cards_count` (should match `variants_count`)
|
||||
- List available style variant IDs
|
||||
|
||||
**Validation**:
|
||||
- Style cards successfully generated
|
||||
- At least one style variant available
|
||||
- Variant count matches requested count
|
||||
|
||||
**TodoWrite**: Mark phase 1 completed, mark checkpoint "awaiting_user_confirmation"
|
||||
|
||||
@@ -115,7 +186,9 @@ Continuing to Phase 3: UI Generation...
|
||||
|
||||
```bash
|
||||
variants_flag = --variants present ? "--variants {variants_count}" : ""
|
||||
command = "/workflow:design:ui-generate --session {session_id} --pages \"{page_list}\" {variants_flag}"
|
||||
agent_flag = --use-agent present ? "--use-agent" : ""
|
||||
session_flag = --session present ? "--session {session_id}" : ""
|
||||
command = "/workflow:design:ui-generate {session_flag} --pages \"{page_list}\" {variants_flag} {agent_flag}"
|
||||
```
|
||||
|
||||
**Command**: `SlashCommand(command="{constructed_command}")`
|
||||
@@ -376,5 +449,3 @@ Return summary to user
|
||||
- `task-generate` automatically detects `.design/` directory
|
||||
- If present, adds design system to task context.artifacts
|
||||
- UI tasks automatically include `load_design_tokens` in flow_control
|
||||
|
||||
This design ensures backward compatibility while enabling powerful visual design workflows when needed.
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
---
|
||||
name: style-extract
|
||||
description: Extract design style from reference images using triple vision analysis (Claude Code + Gemini + Codex)
|
||||
usage: /workflow:design:style-extract --session <session_id> --images "<glob_pattern>"
|
||||
argument-hint: "--session WFS-session-id --images \"path/to/*.png\""
|
||||
description: Extract design style from reference images or text prompts using triple vision analysis or agent mode
|
||||
usage: /workflow:design:style-extract [--session <id>] [--images "<glob>"] [--prompt "<desc>"] [--variants <count>] [--use-agent]
|
||||
argument-hint: "[--session WFS-xxx] [--images \"refs/*.png\"] [--prompt \"Modern minimalist\"] [--variants 3] [--use-agent]"
|
||||
examples:
|
||||
- /workflow:design:style-extract --session WFS-auth --images "design-refs/*.png"
|
||||
- /workflow:design:style-extract --session WFS-dashboard --images "refs/dashboard-*.jpg"
|
||||
allowed-tools: TodoWrite(*), Read(*), Write(*), Bash(*), Glob(*)
|
||||
- /workflow:design:style-extract --images "design-refs/*.png" --variants 3
|
||||
- /workflow:design:style-extract --prompt "Modern minimalist blog, dark theme" --variants 3 --use-agent
|
||||
- /workflow:design:style-extract --session WFS-auth --images "refs/*.png" --prompt "Linear.app style" --variants 2
|
||||
allowed-tools: TodoWrite(*), Read(*), Write(*), Bash(*), Glob(*), Task(conceptual-planning-agent)
|
||||
---
|
||||
|
||||
# Style Extraction Command
|
||||
@@ -15,174 +16,197 @@ allowed-tools: TodoWrite(*), Read(*), Write(*), Bash(*), Glob(*)
|
||||
Extract design style elements from reference images using triple vision analysis: Claude Code's native vision, Gemini Vision for semantic understanding, and Codex for structured token generation.
|
||||
|
||||
## Core Philosophy
|
||||
- **Triple Vision Analysis**: Combine Claude Code, Gemini Vision, and Codex vision capabilities
|
||||
- **Comprehensive Coverage**: Claude Code for quick analysis, Gemini for deep semantic understanding, Codex for structured output
|
||||
- **Consensus-Based Extraction**: Synthesize results from all three sources
|
||||
- **Style Card System**: Generate reusable style cards for consolidation phase
|
||||
- **Multi-Image Support**: Process multiple reference images and extract common patterns
|
||||
- **Dual Mode Support**: Conventional triple vision OR agent-driven creative exploration
|
||||
- **Flexible Input**: Images, text prompts, or both combined
|
||||
- **Variant Control**: Generate N style cards based on `--variants` parameter (default: 3)
|
||||
- **Consensus Synthesis**: Multi-source analysis for quality assurance
|
||||
- **Style Card Output**: Reusable design direction cards for consolidation phase
|
||||
|
||||
## Execution Protocol
|
||||
|
||||
### Phase 1: Session & Input Validation
|
||||
### Phase 0: Mode & Parameter Detection
|
||||
```bash
|
||||
# Validate session and locate images
|
||||
CHECK: .workflow/.active-* marker files
|
||||
VALIDATE: session_id matches active session
|
||||
EXPAND: glob pattern to concrete image paths
|
||||
VERIFY: at least one image file exists
|
||||
# Detect execution mode
|
||||
IF --use-agent:
|
||||
mode = "agent" # Agent-driven creative exploration
|
||||
ELSE:
|
||||
mode = "conventional" # Triple vision analysis
|
||||
|
||||
# Detect input source
|
||||
IF --images AND --prompt:
|
||||
input_mode = "hybrid" # Text guides image analysis
|
||||
ELSE IF --images:
|
||||
input_mode = "image"
|
||||
ELSE IF --prompt:
|
||||
input_mode = "text"
|
||||
ELSE:
|
||||
ERROR: "Must provide --images or --prompt"
|
||||
|
||||
# Detect session mode
|
||||
IF --session:
|
||||
session_mode = "integrated"
|
||||
session_id = {provided_session}
|
||||
base_path = ".workflow/WFS-{session_id}/"
|
||||
ELSE:
|
||||
session_mode = "standalone"
|
||||
session_id = "design-session-" + timestamp()
|
||||
base_path = "./{session_id}/"
|
||||
|
||||
# Set variant count
|
||||
variants_count = --variants provided ? {count} : 3
|
||||
VALIDATE: 1 <= variants_count <= 5
|
||||
```
|
||||
|
||||
### Phase 2: Claude Code Vision Analysis (Quick Initial Pass)
|
||||
**Direct Execution**: Use Read tool with image paths
|
||||
|
||||
### Phase 1: Input Validation & Preparation
|
||||
```bash
|
||||
# Claude Code's native vision capability for quick initial analysis
|
||||
FOR each image IN expanded_image_paths:
|
||||
Read({image_path})
|
||||
# Claude Code analyzes image and extracts basic patterns
|
||||
# Validate and prepare inputs based on input_mode
|
||||
IF input_mode IN ["image", "hybrid"]:
|
||||
EXPAND: --images glob pattern to concrete paths
|
||||
VERIFY: at least one image file exists
|
||||
|
||||
# Write preliminary analysis
|
||||
Write(.workflow/WFS-{session}/.design/style-extraction/claude_vision_analysis.json)
|
||||
IF input_mode IN ["text", "hybrid"]:
|
||||
VALIDATE: --prompt is non-empty string
|
||||
|
||||
# Create session directory structure
|
||||
CREATE: {base_path}/.design/style-extraction/
|
||||
```
|
||||
|
||||
**Output**: `claude_vision_analysis.json` with Claude Code's initial observations
|
||||
### Phase 2: Style Extraction Execution
|
||||
|
||||
### Phase 3: Gemini Vision Analysis (Deep Semantic Understanding)
|
||||
**Direct Bash Execution**: No agent wrapper
|
||||
**Route based on mode**:
|
||||
|
||||
#### A. Conventional Mode (Triple Vision)
|
||||
Execute if `mode == "conventional"`
|
||||
|
||||
**Step 1**: Claude Code initial analysis
|
||||
```bash
|
||||
bash(cd .workflow/WFS-{session}/.design/style-extraction && \
|
||||
IF input_mode IN ["image", "hybrid"]:
|
||||
FOR each image IN expanded_image_paths:
|
||||
Read({image_path}) # Claude analyzes visuals
|
||||
ELSE IF input_mode == "text":
|
||||
# Analyze text prompt for design keywords
|
||||
keywords = extract_design_keywords({prompt_text})
|
||||
|
||||
Write({base_path}/.design/style-extraction/claude_analysis.json)
|
||||
```
|
||||
|
||||
**Step 2**: Gemini deep semantic analysis
|
||||
```bash
|
||||
context_arg = ""
|
||||
IF input_mode IN ["image", "hybrid"]:
|
||||
context_arg += "@{image_paths}"
|
||||
IF input_mode IN ["text", "hybrid"]:
|
||||
guidance = "GUIDED BY PROMPT: '{prompt_text}'"
|
||||
|
||||
bash(cd {base_path}/.design/style-extraction && \
|
||||
~/.claude/scripts/gemini-wrapper --approval-mode yolo -p "
|
||||
PURPOSE: Extract deep design semantics from reference images
|
||||
TASK: Analyze color palettes, typography, spacing, layout principles, component styles, design philosophy
|
||||
PURPOSE: Extract design semantics {guidance}
|
||||
TASK: Generate {variants_count} distinct style directions
|
||||
MODE: write
|
||||
CONTEXT: @{../../{image_paths}}
|
||||
EXPECTED: JSON with comprehensive semantic style description (colors with names, font characteristics, spacing scale, design philosophy, UI patterns)
|
||||
RULES: Focus on extracting semantic meaning and design intent, not exact pixel values. Identify design system patterns.
|
||||
CONTEXT: {context_arg}
|
||||
EXPECTED: {variants_count} style analysis variants in JSON
|
||||
RULES: OKLCH colors, semantic naming, explore diverse themes
|
||||
")
|
||||
|
||||
# Output: gemini_vision_analysis.json
|
||||
```
|
||||
|
||||
**Output**: `gemini_vision_analysis.json` with Gemini's deep semantic analysis
|
||||
|
||||
### Phase 4: Codex Vision Analysis (Structured Pattern Recognition)
|
||||
**Direct Bash Execution**: Codex with -i parameter
|
||||
|
||||
**Step 3**: Codex structured token generation
|
||||
```bash
|
||||
bash(codex -C .workflow/WFS-{session}/.design/style-extraction --full-auto -i {image_paths} exec "
|
||||
PURPOSE: Analyze reference images for structured design patterns
|
||||
TASK: Extract color values, typography specs, spacing measurements, component patterns
|
||||
bash(codex -C {base_path}/.design/style-extraction --full-auto exec "
|
||||
PURPOSE: Convert semantic analysis to structured tokens
|
||||
TASK: Generate design-tokens.json and {variants_count} style-cards
|
||||
MODE: auto
|
||||
CONTEXT: Reference images provided via -i parameter
|
||||
EXPECTED: Structured JSON with precise design specifications
|
||||
RULES: Focus on measurable design attributes and component patterns
|
||||
" --skip-git-repo-check -s danger-full-access)
|
||||
|
||||
# Output: codex_vision_analysis.json
|
||||
```
|
||||
|
||||
**Output**: `codex_vision_analysis.json` with Codex's structured analysis
|
||||
|
||||
### Phase 5: Synthesis of Triple Vision Analysis
|
||||
**Direct Execution**: Main Claude synthesizes all three analyses
|
||||
|
||||
```bash
|
||||
# Read all three vision analysis results
|
||||
Read(.workflow/WFS-{session}/.design/style-extraction/claude_vision_analysis.json)
|
||||
Read(.workflow/WFS-{session}/.design/style-extraction/gemini_vision_analysis.json)
|
||||
Read(.workflow/WFS-{session}/.design/style-extraction/codex_vision_analysis.json)
|
||||
|
||||
# Load optional session context
|
||||
Read(.workflow/WFS-{session}/.brainstorming/synthesis-specification.md) [optional]
|
||||
|
||||
# Synthesize consensus analysis
|
||||
# Main Claude identifies common patterns, resolves conflicts, creates unified semantic analysis
|
||||
Write(.workflow/WFS-{session}/.design/style-extraction/semantic_style_analysis.json)
|
||||
```
|
||||
|
||||
**Synthesis Strategy**:
|
||||
- **Color system**: Consensus from all three sources, prefer Codex for precise values
|
||||
- **Typography**: Gemini for semantic understanding, Codex for measurements
|
||||
- **Spacing**: Cross-validate across all three,identify consistent patterns
|
||||
- **Design philosophy**: Weighted combination with Gemini having highest weight
|
||||
- **Conflict resolution**: Majority vote or use context from synthesis-specification.md
|
||||
|
||||
**Output**: `semantic_style_analysis.json` - unified analysis synthesizing all three sources
|
||||
|
||||
### Phase 6: Structured Token Generation
|
||||
**Direct Bash Execution**: Codex generates CSS tokens
|
||||
|
||||
```bash
|
||||
bash(codex -C .workflow/WFS-{session}/.design/style-extraction --full-auto exec "
|
||||
PURPOSE: Convert synthesized semantic analysis to structured CSS design tokens
|
||||
TASK: Generate W3C-compliant design tokens, Tailwind config, and style card variants
|
||||
MODE: auto
|
||||
CONTEXT: @{semantic_style_analysis.json,../../../../CLAUDE.md}
|
||||
EXPECTED: design-tokens.json (OKLCH format), tailwind-tokens.js, style-cards.json (3 variants)
|
||||
RULES: $(cat ~/.claude/workflows/design-tokens-schema.md) | OKLCH colors, rem spacing, semantic naming
|
||||
CONTEXT: @{claude_analysis.json,gemini output}
|
||||
EXPECTED: design-tokens.json, style-cards.json with {variants_count} variants
|
||||
RULES: OKLCH format, rem spacing, semantic names
|
||||
" --skip-git-repo-check -s danger-full-access)
|
||||
```
|
||||
|
||||
**Output**:
|
||||
- `design-tokens.json`: W3C-compliant tokens in OKLCH format
|
||||
- `tailwind-tokens.js`: Tailwind theme extension
|
||||
- `style-cards.json`: 3 style variant cards for user selection
|
||||
- Command: bash(codex -C .workflow/WFS-{session}/.design/style-extraction --full-auto exec \"
|
||||
PURPOSE: Generate structured CSS design tokens from semantic analysis
|
||||
TASK: Convert semantic color/typography/spacing to OKLCH CSS variables and Tailwind config
|
||||
MODE: auto
|
||||
CONTEXT: @{semantic_style_analysis.json,../../../../CLAUDE.md}
|
||||
EXPECTED:
|
||||
1. design-tokens.json with OKLCH color values, font stacks, spacing scale
|
||||
2. tailwind-tokens.js with Tailwind config extension
|
||||
3. style-cards.json with named style variants for user selection
|
||||
RULES: Use OKLCH for colors, rem for spacing, maintain semantic naming, generate 2-3 style card variants
|
||||
\" --skip-git-repo-check -s danger-full-access)
|
||||
- Output: design-tokens.json, tailwind-tokens.js, style-cards.json
|
||||
#### B. Agent Mode (Creative Exploration)
|
||||
Execute if `mode == "agent"`
|
||||
|
||||
## Token Requirements
|
||||
**Color Format**: OKLCH with fallback (e.g., \"oklch(0.65 0.15 270 / 1)\")
|
||||
**Spacing Scale**: rem-based (0.25rem, 0.5rem, 1rem, 1.5rem, 2rem, 3rem, 4rem, 6rem)
|
||||
**Typography Scale**: rem-based with line-height (xs, sm, base, lg, xl, 2xl, 3xl, 4xl)
|
||||
**Border Radius**: rem-based (none, sm, md, lg, xl, 2xl, full)
|
||||
**Shadows**: Layered shadows with OKLCH colors
|
||||
**Agent-Driven Parallel Generation**:
|
||||
```bash
|
||||
# Prepare base context
|
||||
context_files = ""
|
||||
IF input_mode IN ["image", "hybrid"]:
|
||||
context_files += "@{image_paths}"
|
||||
IF session_mode == "integrated":
|
||||
context_files += "@{../../.brainstorming/synthesis-specification.md}"
|
||||
|
||||
## Expected Deliverables
|
||||
1. **design-tokens.json**: Structured CSS token definitions
|
||||
2. **tailwind-tokens.js**: Tailwind configuration extension
|
||||
3. **style-cards.json**: Multiple style variants for user selection
|
||||
"
|
||||
# Define creative themes for diversity
|
||||
themes = generate_creative_themes(variants_count)
|
||||
# Example: ["Modern Minimalist", "Brutalist Tech", "Organic Warmth"]
|
||||
|
||||
# Launch parallel agent tasks
|
||||
FOR i IN range(variants_count):
|
||||
Task(conceptual-planning-agent): "
|
||||
[FLOW_CONTROL]
|
||||
|
||||
Generate unique design style variant: '{themes[i]}'
|
||||
|
||||
## Context
|
||||
INPUT_SOURCE: {input_mode}
|
||||
PROMPT_GUIDANCE: {prompt_text if present else 'derive from images'}
|
||||
THEME_FOCUS: {themes[i]}
|
||||
OUTPUT_LOCATION: {base_path}/.design/style-extraction/
|
||||
|
||||
## Flow Steps
|
||||
1. **analyze_input**
|
||||
IF input_mode IN ['image', 'hybrid']:
|
||||
Use Gemini Vision to analyze images with theme focus
|
||||
IF input_mode IN ['text', 'hybrid']:
|
||||
Use Gemini to expand prompt into detailed design philosophy
|
||||
|
||||
2. **generate_tokens**
|
||||
Use Codex to create design-tokens subset for this variant
|
||||
Output: variant-{i}-tokens.json
|
||||
|
||||
3. **create_style_card**
|
||||
Synthesize into style card with:
|
||||
- id: 'variant-{i}'
|
||||
- name: '{themes[i]}'
|
||||
- preview: key design token values
|
||||
Output: variant-{i}-card.json
|
||||
|
||||
## Rules
|
||||
- Focus on '{themes[i]}' aesthetic
|
||||
- OKLCH colors, rem spacing, semantic naming
|
||||
- Must be distinct from other variants
|
||||
"
|
||||
|
||||
# Consolidate parallel results
|
||||
Wait for all {variants_count} tasks to complete
|
||||
Consolidate variant-*-card.json → style-cards.json
|
||||
Merge variant-*-tokens.json → design-tokens.json (include all variants)
|
||||
```
|
||||
|
||||
### Phase 4: TodoWrite Integration
|
||||
**Output**: `style-cards.json` with {variants_count} creatively distinct variants
|
||||
|
||||
### Phase 3: TodoWrite & Completion
|
||||
|
||||
```javascript
|
||||
TodoWrite({
|
||||
todos: [
|
||||
{
|
||||
content: "Validate session and locate reference images",
|
||||
status: "completed",
|
||||
activeForm: "Validating session and images"
|
||||
},
|
||||
{
|
||||
content: "Extract visual semantics using Gemini Vision",
|
||||
status: "completed",
|
||||
activeForm: "Extracting visual semantics"
|
||||
},
|
||||
{
|
||||
content: "Generate structured CSS tokens using Codex",
|
||||
status: "completed",
|
||||
activeForm: "Generating CSS tokens"
|
||||
},
|
||||
{
|
||||
content: "Create style cards for consolidation phase",
|
||||
status: "completed",
|
||||
activeForm: "Creating style cards"
|
||||
}
|
||||
{content: "Detect mode and validate inputs", status: "completed", activeForm: "Detecting mode"},
|
||||
{content: "Execute style extraction (conventional/agent mode)", status: "completed", activeForm: "Extracting styles"},
|
||||
{content: "Generate {variants_count} style cards", status: "completed", activeForm: "Generating style cards"}
|
||||
]
|
||||
});
|
||||
```
|
||||
|
||||
**Completion Message**:
|
||||
```
|
||||
Style extraction complete for session: {session_id}
|
||||
Mode: {mode} | Input: {input_mode} | Variants: {variants_count}
|
||||
|
||||
Generated {variants_count} style cards:
|
||||
{list_variant_names}
|
||||
|
||||
Location: {base_path}/.design/style-extraction/
|
||||
|
||||
Next: /workflow:design:style-consolidate --session {session_id} --variants "{selected_ids}"
|
||||
```
|
||||
|
||||
## Output Structure
|
||||
|
||||
```
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
---
|
||||
name: ui-generate
|
||||
description: Generate UI prototypes using consolidated design tokens with optional style overrides
|
||||
usage: /workflow:design:ui-generate --session <session_id> --pages "<page_list>" [--variants <count>] [--style-overrides "<path_or_json>"]
|
||||
argument-hint: "--session WFS-session-id --pages \"dashboard,auth\" [--variants 2] [--style-overrides \"overrides.json\"]"
|
||||
description: Generate UI prototypes using consolidated design tokens with conventional or agent mode
|
||||
usage: /workflow:design:ui-generate [--pages "<list>"] [--session <id>] [--variants <count>] [--use-agent]
|
||||
argument-hint: "[--pages \"dashboard,auth\"] [--session WFS-xxx] [--variants 3] [--use-agent]"
|
||||
examples:
|
||||
- /workflow:design:ui-generate --session WFS-auth --pages "login,register"
|
||||
- /workflow:design:ui-generate --session WFS-dashboard --pages "dashboard" --variants 3 --style-overrides "overrides.json"
|
||||
allowed-tools: TodoWrite(*), Read(*), Write(*), Bash(*)
|
||||
- /workflow:design:ui-generate --variants 2
|
||||
- /workflow:design:ui-generate --session WFS-auth --variants 3 --use-agent
|
||||
- /workflow:design:ui-generate --pages "home,pricing,contact" --variants 2
|
||||
allowed-tools: TodoWrite(*), Read(*), Write(*), Bash(*), Task(conceptual-planning-agent)
|
||||
---
|
||||
|
||||
# UI Generation Command
|
||||
@@ -15,198 +16,176 @@ allowed-tools: TodoWrite(*), Read(*), Write(*), Bash(*)
|
||||
Generate production-ready UI prototypes (HTML/CSS) strictly adhering to consolidated design tokens and synthesis specification requirements.
|
||||
|
||||
## Core Philosophy
|
||||
- **Dual Mode**: Conventional (Codex primary) OR agent-driven (creative layouts)
|
||||
- **Token-Driven**: All styles reference design-tokens.json, no hardcoded values
|
||||
- **Specification-Aligned**: UI structure follows synthesis-specification.md requirements
|
||||
- **Codex Primary**: Code generation with strict token enforcement
|
||||
- **Gemini Variants**: Optional semantic layout variations
|
||||
- **Production-Ready**: Clean HTML5, semantic markup, accessibility attributes
|
||||
- **Variant Control**: Generate N prototypes per page based on `--variants` (default: 1)
|
||||
- **Layout Diversity**: Agent mode explores structural variations (F-pattern, grid, asymmetric)
|
||||
- **Production-Ready**: Semantic HTML5, ARIA attributes, responsive design
|
||||
|
||||
## Execution Protocol
|
||||
|
||||
### Phase 1: Session & Requirements Loading
|
||||
### Phase 1: Mode Detection & Context Loading
|
||||
```bash
|
||||
# Validate session and load design system
|
||||
CHECK: .workflow/.active-* marker files
|
||||
VALIDATE: session_id matches active session
|
||||
VERIFY: .design/style-consolidation/design-tokens.json exists
|
||||
PARSE: --pages parameter to page list
|
||||
SET: variants_count = --variants || 1
|
||||
# Detect execution mode
|
||||
IF --use-agent:
|
||||
mode = "agent" # Agent-driven creative layouts
|
||||
ELSE:
|
||||
mode = "conventional" # Codex primary generation
|
||||
|
||||
# Detect session mode
|
||||
IF --session:
|
||||
session_mode = "integrated"
|
||||
session_id = {provided_session}
|
||||
base_path = ".workflow/WFS-{session_id}/"
|
||||
ELSE:
|
||||
session_mode = "standalone"
|
||||
# Infer session_id from existing design-session-* directory
|
||||
base_path = "./{detected_design_session}/"
|
||||
|
||||
# Infer page list if not provided
|
||||
IF --pages provided:
|
||||
page_list = {explicit_pages}
|
||||
ELSE IF session_mode == "integrated":
|
||||
# Read synthesis-specification.md to extract page requirements
|
||||
page_list = extract_pages_from_synthesis({base_path}/.brainstorming/synthesis-specification.md)
|
||||
ELSE:
|
||||
# Infer from generated prototypes or default
|
||||
page_list = detect_from_prototypes({base_path}/.design/prototypes/) OR ["home"]
|
||||
|
||||
VALIDATE: page_list not empty
|
||||
|
||||
# Set parameters
|
||||
variants_count = --variants provided ? {count} : 1
|
||||
VALIDATE: 1 <= variants_count <= 5
|
||||
|
||||
# Load design system
|
||||
VERIFY: {base_path}/.design/style-consolidation/design-tokens.json exists
|
||||
LOAD: design-tokens.json, style-guide.md, tailwind.config.js
|
||||
|
||||
# Load requirements (if integrated mode)
|
||||
IF session_mode == "integrated":
|
||||
LOAD: {base_path}/.brainstorming/synthesis-specification.md
|
||||
```
|
||||
|
||||
### Phase 2: Context Gathering
|
||||
**Load comprehensive context for UI generation**
|
||||
### Phase 2: UI Generation Execution
|
||||
|
||||
**Route based on mode**:
|
||||
|
||||
#### A. Conventional Mode (Codex Primary)
|
||||
Execute if `mode == "conventional"`
|
||||
|
||||
```bash
|
||||
LOAD: design-tokens.json (style system)
|
||||
LOAD: style-guide.md (usage guidelines)
|
||||
LOAD: synthesis-specification.md (functional requirements)
|
||||
LOAD: ui-designer/analysis.md (UX guidelines, optional)
|
||||
PARSE: page_requirements for each page in --pages list
|
||||
# Single Codex call generates all variants for all pages
|
||||
bash(codex -C {base_path}/.design/prototypes --full-auto exec "
|
||||
PURPOSE: Generate UI prototypes adhering to design tokens
|
||||
TASK: Create HTML/CSS for pages: {page_list} with {variants_count} variant(s) each
|
||||
MODE: auto
|
||||
CONTEXT: @{../style-consolidation/design-tokens.json,../style-consolidation/style-guide.md}
|
||||
EXPECTED:
|
||||
For each page, generate {variants_count} variant(s):
|
||||
- {page}-variant-{n}.html (semantic HTML5)
|
||||
- {page}-variant-{n}.css (token-driven, no hardcoded values)
|
||||
- {page}-variant-{n}-notes.md (implementation notes)
|
||||
|
||||
RULES:
|
||||
- STRICT token adherence: var(--color-brand-primary), var(--spacing-4)
|
||||
- Semantic HTML5 + ARIA attributes
|
||||
- Responsive: mobile-first, token-based breakpoints
|
||||
- Variants differ in minor layout details
|
||||
" --skip-git-repo-check -s danger-full-access)
|
||||
```
|
||||
|
||||
### Phase 3: Codex UI Generation (Primary)
|
||||
**Agent Invocation**: Task(conceptual-planning-agent) with Codex capabilities
|
||||
#### B. Agent Mode (Creative Layouts)
|
||||
Execute if `mode == "agent"`
|
||||
|
||||
**Agent-Driven Parallel Generation**:
|
||||
```bash
|
||||
# Define layout strategies for diversity
|
||||
layouts = generate_layout_strategies(variants_count)
|
||||
# Example: ["F-Pattern", "Asymmetric Grid", "Card-Based Modular"]
|
||||
|
||||
# Launch parallel agent tasks for each page-variant combination
|
||||
FOR page IN page_list:
|
||||
FOR i IN range(variants_count):
|
||||
Task(conceptual-planning-agent): "
|
||||
[FLOW_CONTROL]
|
||||
|
||||
Generate UI prototype: {page} using '{layouts[i]}' layout
|
||||
|
||||
## Context
|
||||
PAGE: {page}
|
||||
LAYOUT_STRATEGY: {layouts[i]}
|
||||
OUTPUT: {base_path}/.design/prototypes/
|
||||
|
||||
## Flow Steps
|
||||
1. **load_design_system**
|
||||
Read design-tokens.json and style-guide.md
|
||||
|
||||
2. **load_requirements**
|
||||
IF session_mode == 'integrated':
|
||||
Read synthesis-specification.md for {page} requirements
|
||||
|
||||
3. **generate_prototype_codex**
|
||||
Use Codex to generate HTML/CSS with layout focus:
|
||||
Layout: {layouts[i]}
|
||||
Token adherence: STRICT (all values from design-tokens)
|
||||
Output: {page}-variant-{i}.html/css/notes.md
|
||||
|
||||
## Rules
|
||||
- Layout must follow '{layouts[i]}' strategy
|
||||
- Examples:
|
||||
* F-Pattern: Content flows top→left→middle→bottom
|
||||
* Asymmetric Grid: Strong visual hierarchy, off-center
|
||||
* Card-Based: Modular components, flexible grid
|
||||
- STRICT token usage, semantic HTML, ARIA attributes
|
||||
"
|
||||
|
||||
Wait for all {len(page_list) * variants_count} tasks to complete
|
||||
```
|
||||
|
||||
### Phase 3: Generate Preview Files
|
||||
|
||||
```bash
|
||||
Task(conceptual-planning-agent): "
|
||||
[FLOW_CONTROL]
|
||||
|
||||
Generate production-ready UI prototypes with strict design token adherence
|
||||
|
||||
## Context Loading
|
||||
ASSIGNED_TASK: ui-prototype-generation
|
||||
OUTPUT_LOCATION: .workflow/WFS-{session}/.design/prototypes/
|
||||
TARGET_PAGES: {page_list}
|
||||
VARIANTS_PER_PAGE: {variants_count}
|
||||
|
||||
## Flow Control Steps
|
||||
1. **load_design_system**
|
||||
- Action: Load finalized design tokens and style guide
|
||||
- Commands:
|
||||
- Read(.workflow/WFS-{session}/.design/style-consolidation/design-tokens.json)
|
||||
- Read(.workflow/WFS-{session}/.design/style-consolidation/style-guide.md)
|
||||
- Read(.workflow/WFS-{session}/.design/style-consolidation/tailwind.config.js)
|
||||
- Output: design_system
|
||||
|
||||
2. **load_requirements**
|
||||
- Action: Load functional and UX requirements
|
||||
- Commands:
|
||||
- Read(.workflow/WFS-{session}/.brainstorming/synthesis-specification.md)
|
||||
- Read(.workflow/WFS-{session}/.brainstorming/ui-designer/analysis.md) [optional]
|
||||
- Output: requirements_context
|
||||
|
||||
3. **generate_ui_prototypes_codex**
|
||||
- Action: Generate HTML/CSS prototypes with strict token enforcement
|
||||
- Command: bash(codex -C .workflow/WFS-{session}/.design/prototypes --full-auto exec \"
|
||||
PURPOSE: Generate production-ready UI prototypes adhering to design tokens
|
||||
TASK: Create HTML/CSS prototypes for pages: {page_list} with {variants_count} variant(s) each
|
||||
MODE: auto
|
||||
CONTEXT: @{../style-consolidation/design-tokens.json,../style-consolidation/style-guide.md,../../.brainstorming/synthesis-specification.md,../../../../CLAUDE.md}
|
||||
EXPECTED:
|
||||
For each page, generate {variants_count} variant(s):
|
||||
1. {page}-variant-{n}.html - Complete HTML structure
|
||||
2. {page}-variant-{n}.css - CSS using design token custom properties
|
||||
3. {page}-variant-{n}-notes.md - Implementation notes and token usage
|
||||
|
||||
RULES:
|
||||
- ALL styles MUST reference design token CSS custom properties (--color-brand-primary, --spacing-4, etc.)
|
||||
- NO hardcoded colors, spacing, or typography values
|
||||
- Use semantic HTML5 elements (header, nav, main, section, article, footer)
|
||||
- Include ARIA labels and accessibility attributes (role, aria-label, aria-describedby)
|
||||
- Implement responsive design using token-based breakpoints
|
||||
- Follow component patterns from style-guide.md
|
||||
- Include placeholder content matching page purpose
|
||||
- Variants explore different layouts while maintaining token consistency
|
||||
- Generate CSS custom properties mapping in each CSS file
|
||||
\" --skip-git-repo-check -s danger-full-access)
|
||||
- Output: {page}-variant-{n}.html, {page}-variant-{n}.css, {page}-variant-{n}-notes.md
|
||||
|
||||
## Generation Requirements
|
||||
|
||||
**Token Adherence**:
|
||||
- Use CSS custom properties for all design values
|
||||
- Reference design-tokens.json for property definitions
|
||||
- Example: `color: var(--color-brand-primary);`
|
||||
- Example: `padding: var(--spacing-4) var(--spacing-6);`
|
||||
- Example: `font-size: var(--font-size-lg);`
|
||||
|
||||
**Semantic HTML**:
|
||||
```html
|
||||
<header role=\"banner\">
|
||||
<nav role=\"navigation\" aria-label=\"Main navigation\">
|
||||
<!-- Navigation items -->
|
||||
</nav>
|
||||
</header>
|
||||
<main role=\"main\">
|
||||
<section aria-labelledby=\"section-heading\">
|
||||
<h2 id=\"section-heading\">Section Title</h2>
|
||||
<!-- Content -->
|
||||
</section>
|
||||
</main>
|
||||
<footer role=\"contentinfo\">
|
||||
<!-- Footer content -->
|
||||
</footer>
|
||||
# Generate preview utilities
|
||||
Write({base_path}/.design/prototypes/index.html) # Master navigation
|
||||
Write({base_path}/.design/prototypes/compare.html) # Side-by-side comparison
|
||||
Write({base_path}/.design/prototypes/PREVIEW.md) # Setup instructions
|
||||
```
|
||||
|
||||
**Accessibility Requirements**:
|
||||
- Proper heading hierarchy (h1 → h2 → h3)
|
||||
- Alt text for images
|
||||
- ARIA labels for interactive elements
|
||||
- Keyboard navigation support
|
||||
- Focus indicators using token colors
|
||||
- Sufficient color contrast (validated against tokens)
|
||||
### Phase 4: TodoWrite & Completion
|
||||
|
||||
**Responsive Design**:
|
||||
- Mobile-first approach
|
||||
- Token-based breakpoints (e.g., --breakpoint-md: 768px)
|
||||
- Flexible layouts using CSS Grid or Flexbox
|
||||
- Responsive typography using clamp() with token values
|
||||
|
||||
## Expected Deliverables
|
||||
For each page in {page_list}:
|
||||
1. **{page}-variant-{n}.html**: Complete HTML prototype
|
||||
2. **{page}-variant-{n}.css**: Token-driven CSS
|
||||
3. **{page}-variant-{n}-notes.md**: Implementation notes
|
||||
"
|
||||
```
|
||||
|
||||
### Phase 4: Gemini Variant Suggestions (Optional)
|
||||
**Conditional Execution**: Only if --variants > 1
|
||||
|
||||
```bash
|
||||
IF variants_count > 1:
|
||||
Task(conceptual-planning-agent): "
|
||||
Generate semantic layout variation suggestions using Gemini
|
||||
|
||||
TASK: Analyze synthesis-specification.md and suggest {variants_count} layout approaches
|
||||
CONTEXT: synthesis-specification.md, ui-designer/analysis.md
|
||||
OUTPUT: variant-suggestions.md with layout rationale for each variant
|
||||
|
||||
Use Gemini to explore:
|
||||
- Different information hierarchy approaches
|
||||
- Alternative component compositions
|
||||
- Varied user flow emphasis
|
||||
- Diverse layout patterns (sidebar, top-nav, card-grid, list-detail)
|
||||
"
|
||||
```
|
||||
|
||||
### Phase 5: TodoWrite Integration
|
||||
```javascript
|
||||
TodoWrite({
|
||||
todos: [
|
||||
{
|
||||
content: "Validate session and load design system",
|
||||
status: "completed",
|
||||
activeForm: "Loading design system"
|
||||
},
|
||||
{
|
||||
content: "Load functional requirements and UX guidelines",
|
||||
status: "completed",
|
||||
activeForm: "Loading requirements"
|
||||
},
|
||||
{
|
||||
content: "Generate UI prototypes using Codex with token enforcement",
|
||||
status: "completed",
|
||||
activeForm: "Generating UI prototypes"
|
||||
},
|
||||
{
|
||||
content: "Generate layout variant suggestions using Gemini (optional)",
|
||||
status: "completed",
|
||||
activeForm: "Generating variant suggestions"
|
||||
},
|
||||
{
|
||||
content: "Create implementation notes for each prototype",
|
||||
status: "completed",
|
||||
activeForm: "Creating implementation notes"
|
||||
}
|
||||
{content: "Detect mode and load design system", status: "completed", activeForm: "Loading design system"},
|
||||
{content: "Generate {len(page_list) * variants_count} UI prototypes", status: "completed", activeForm: "Generating prototypes"},
|
||||
{content: "Generate preview files", status: "completed", activeForm: "Generating preview"}
|
||||
]
|
||||
});
|
||||
```
|
||||
|
||||
**Completion Message**:
|
||||
```
|
||||
UI generation complete for session: {session_id}
|
||||
Mode: {mode} | Pages: {page_list} | Variants: {variants_count}
|
||||
|
||||
Generated {len(page_list) * variants_count} prototypes:
|
||||
{list_generated_files}
|
||||
|
||||
Location: {base_path}/.design/prototypes/
|
||||
|
||||
Preview: Open index.html or run: python -m http.server 8080
|
||||
|
||||
Next: /workflow:design:design-update --session {session_id} --selected-prototypes "{selected_ids}"
|
||||
```
|
||||
|
||||
## Output Structure
|
||||
|
||||
```
|
||||
.workflow/WFS-{session}/.design/prototypes/
|
||||
├── index.html # 🆕 Preview index page (master navigation)
|
||||
├── compare.html # 🆕 Side-by-side comparison view
|
||||
├── PREVIEW.md # 🆕 Preview instructions and server setup
|
||||
├── dashboard-variant-1.html
|
||||
├── dashboard-variant-1.css
|
||||
├── dashboard-variant-1-notes.md
|
||||
@@ -277,6 +256,247 @@ TodoWrite({
|
||||
}
|
||||
```
|
||||
|
||||
### Preview Index Page Template (index.html)
|
||||
```html
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>UI Prototypes Preview - WFS-{session}</title>
|
||||
<style>
|
||||
body { font-family: system-ui; max-width: 1200px; margin: 2rem auto; padding: 0 1rem; }
|
||||
h1 { color: #2563eb; }
|
||||
.prototype-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
|
||||
.prototype-card { border: 1px solid #e5e7eb; border-radius: 0.5rem; padding: 1rem; transition: box-shadow 0.2s; }
|
||||
.prototype-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
|
||||
.prototype-card h3 { margin: 0 0 0.5rem; color: #1f2937; }
|
||||
.prototype-card .meta { font-size: 0.875rem; color: #6b7280; margin-bottom: 1rem; }
|
||||
.prototype-card a { display: inline-block; margin-right: 0.5rem; color: #2563eb; text-decoration: none; }
|
||||
.prototype-card a:hover { text-decoration: underline; }
|
||||
.actions { margin-top: 2rem; padding: 1rem; background: #f3f4f6; border-radius: 0.5rem; }
|
||||
.actions a { margin-right: 1rem; color: #2563eb; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>🎨 UI Prototypes Preview</h1>
|
||||
<p><strong>Session:</strong> WFS-{session} | <strong>Generated:</strong> {timestamp}</p>
|
||||
|
||||
<div class="actions">
|
||||
<a href="compare.html">📊 Compare All Variants</a>
|
||||
<a href="PREVIEW.md">📖 Preview Instructions</a>
|
||||
</div>
|
||||
|
||||
<div class="prototype-grid">
|
||||
<!-- Auto-generated for each page-variant -->
|
||||
<div class="prototype-card">
|
||||
<h3>Dashboard - Variant 1</h3>
|
||||
<div class="meta">Generated: {timestamp}</div>
|
||||
<a href="dashboard-variant-1.html" target="_blank">View Prototype →</a>
|
||||
<a href="dashboard-variant-1-notes.md">Implementation Notes</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
### Comparison View Template (compare.html)
|
||||
```html
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Side-by-Side Comparison - WFS-{session}</title>
|
||||
<style>
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
body { font-family: system-ui; }
|
||||
.header { background: #1f2937; color: white; padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; }
|
||||
.controls { display: flex; gap: 1rem; align-items: center; }
|
||||
select, button { padding: 0.5rem 1rem; border-radius: 0.25rem; border: 1px solid #d1d5db; background: white; cursor: pointer; }
|
||||
button:hover { background: #f3f4f6; }
|
||||
.comparison-container { display: flex; height: calc(100vh - 60px); }
|
||||
.variant-panel { flex: 1; border-right: 2px solid #e5e7eb; position: relative; }
|
||||
.variant-panel:last-child { border-right: none; }
|
||||
.variant-label { position: absolute; top: 0; left: 0; right: 0; background: rgba(37,99,235,0.9); color: white; padding: 0.5rem; text-align: center; z-index: 10; font-weight: 600; }
|
||||
iframe { width: 100%; height: 100%; border: none; padding-top: 2.5rem; }
|
||||
.viewport-toggle { display: flex; gap: 0.5rem; }
|
||||
.viewport-btn { padding: 0.25rem 0.75rem; font-size: 0.875rem; }
|
||||
.viewport-btn.active { background: #2563eb; color: white; border-color: #2563eb; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<h1>📊 Side-by-Side Comparison</h1>
|
||||
<div class="controls">
|
||||
<div class="viewport-toggle">
|
||||
<button class="viewport-btn active" data-width="100%">Desktop</button>
|
||||
<button class="viewport-btn" data-width="768px">Tablet</button>
|
||||
<button class="viewport-btn" data-width="375px">Mobile</button>
|
||||
</div>
|
||||
<select id="page-select">
|
||||
<option value="dashboard">Dashboard</option>
|
||||
<option value="auth">Auth</option>
|
||||
</select>
|
||||
<label><input type="checkbox" id="sync-scroll"> Sync Scroll</label>
|
||||
<a href="index.html" style="color: white;">← Back to Index</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="comparison-container">
|
||||
<div class="variant-panel">
|
||||
<div class="variant-label">Variant 1</div>
|
||||
<iframe id="frame1" src="dashboard-variant-1.html"></iframe>
|
||||
</div>
|
||||
<div class="variant-panel">
|
||||
<div class="variant-label">Variant 2</div>
|
||||
<iframe id="frame2" src="dashboard-variant-2.html"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// Viewport switching
|
||||
document.querySelectorAll('.viewport-btn').forEach(btn => {
|
||||
btn.addEventListener('click', () => {
|
||||
document.querySelectorAll('.viewport-btn').forEach(b => b.classList.remove('active'));
|
||||
btn.classList.add('active');
|
||||
const width = btn.dataset.width;
|
||||
document.querySelectorAll('iframe').forEach(frame => {
|
||||
frame.style.width = width;
|
||||
frame.style.margin = width === '100%' ? '0' : '0 auto';
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// Synchronized scrolling
|
||||
const syncCheckbox = document.getElementById('sync-scroll');
|
||||
const frames = [document.getElementById('frame1'), document.getElementById('frame2')];
|
||||
|
||||
syncCheckbox.addEventListener('change', () => {
|
||||
if (syncCheckbox.checked) {
|
||||
frames.forEach(frame => {
|
||||
frame.contentWindow.addEventListener('scroll', () => {
|
||||
const scrollTop = frame.contentWindow.scrollY;
|
||||
frames.forEach(f => {
|
||||
if (f !== frame) f.contentWindow.scrollTo(0, scrollTop);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Page switching
|
||||
document.getElementById('page-select').addEventListener('change', (e) => {
|
||||
const page = e.target.value;
|
||||
document.getElementById('frame1').src = `${page}-variant-1.html`;
|
||||
document.getElementById('frame2').src = `${page}-variant-2.html`;
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
### Preview Instructions Template (PREVIEW.md)
|
||||
```markdown
|
||||
# UI Prototypes Preview Guide
|
||||
|
||||
## Session Information
|
||||
- **Session ID**: WFS-{session}
|
||||
- **Generated**: {timestamp}
|
||||
- **Pages**: {page_list}
|
||||
- **Variants per page**: {variants_count}
|
||||
|
||||
## Quick Preview Options
|
||||
|
||||
### Option 1: Direct Browser Opening (Simplest)
|
||||
1. Navigate to `.workflow/WFS-{session}/.design/prototypes/`
|
||||
2. Double-click `index.html` to open the preview index
|
||||
3. Click any prototype link to view in browser
|
||||
|
||||
### Option 2: Local Development Server (Recommended)
|
||||
|
||||
#### Python (Built-in)
|
||||
```bash
|
||||
cd .workflow/WFS-{session}/.design/prototypes
|
||||
python -m http.server 8080
|
||||
# Visit: http://localhost:8080
|
||||
```
|
||||
|
||||
#### Node.js (npx)
|
||||
```bash
|
||||
cd .workflow/WFS-{session}/.design/prototypes
|
||||
npx http-server -p 8080
|
||||
# Visit: http://localhost:8080
|
||||
```
|
||||
|
||||
#### PHP (Built-in)
|
||||
```bash
|
||||
cd .workflow/WFS-{session}/.design/prototypes
|
||||
php -S localhost:8080
|
||||
# Visit: http://localhost:8080
|
||||
```
|
||||
|
||||
#### VS Code Live Server
|
||||
1. Install "Live Server" extension
|
||||
2. Right-click `index.html`
|
||||
3. Select "Open with Live Server"
|
||||
|
||||
## Preview Features
|
||||
|
||||
### Index Page (`index.html`)
|
||||
- **Master navigation** for all prototypes
|
||||
- **Quick links** to individual variants
|
||||
- **Metadata display**: timestamps, page info
|
||||
- **Direct access** to implementation notes
|
||||
|
||||
### Comparison View (`compare.html`)
|
||||
- **Side-by-side** variant comparison
|
||||
- **Viewport toggles**: Desktop (100%), Tablet (768px), Mobile (375px)
|
||||
- **Synchronized scrolling** option
|
||||
- **Page switching** dropdown
|
||||
- **Real-time** comparison
|
||||
|
||||
## Browser Compatibility
|
||||
- ✅ Chrome/Edge (Recommended)
|
||||
- ✅ Firefox
|
||||
- ✅ Safari
|
||||
- ⚠️ Some CSS features may require modern browsers (OKLCH colors)
|
||||
|
||||
## Files Overview
|
||||
```
|
||||
prototypes/
|
||||
├── index.html ← Start here
|
||||
├── compare.html ← Side-by-side comparison
|
||||
├── PREVIEW.md ← This file
|
||||
├── {page}-variant-{n}.html ← Individual prototypes
|
||||
├── {page}-variant-{n}.css ← Styles (token-driven)
|
||||
├── design-tokens.css ← CSS custom properties
|
||||
└── {page}-variant-{n}-notes.md ← Implementation guidance
|
||||
```
|
||||
|
||||
## Next Steps
|
||||
1. **Review prototypes**: Open index.html
|
||||
2. **Compare variants**: Use compare.html for side-by-side view
|
||||
3. **Select preferred**: Note variant IDs for design-update command
|
||||
4. **Continue workflow**: Run design-update with selected prototypes
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
**Styles not loading?**
|
||||
- Ensure `design-tokens.css` is in the same directory
|
||||
- Check browser console for CSS errors
|
||||
- Verify file paths in HTML `<link>` tags
|
||||
|
||||
**OKLCH colors not displaying?**
|
||||
- Use Chrome/Edge 111+ or Firefox 113+
|
||||
- Fallback colors should work in older browsers
|
||||
|
||||
**Local server CORS issues?**
|
||||
- Use one of the recommended local servers
|
||||
- Avoid opening HTML files with `file://` protocol for best results
|
||||
```
|
||||
|
||||
|
||||
## Error Handling
|
||||
- **No design tokens found**: Run `/workflow:design:style-consolidate` first
|
||||
- **Invalid page names**: List available pages from synthesis-specification.md
|
||||
@@ -300,17 +520,35 @@ After generation, verify:
|
||||
## Next Steps
|
||||
After successful generation:
|
||||
```
|
||||
UI prototypes generated for session: WFS-{session}
|
||||
✅ UI prototypes generated for session: WFS-{session}
|
||||
Pages: {page_list}
|
||||
Variants per page: {variants_count}
|
||||
|
||||
Generated files:
|
||||
- {count} HTML prototypes
|
||||
- {count} HTML prototypes (complete, standalone)
|
||||
- {count} CSS files (token-driven)
|
||||
- {count} implementation notes
|
||||
- 🆕 index.html (preview navigation)
|
||||
- 🆕 compare.html (side-by-side comparison)
|
||||
- 🆕 PREVIEW.md (preview instructions)
|
||||
|
||||
Review prototypes and select preferred variants:
|
||||
Location: .workflow/WFS-{session}/.design/prototypes/
|
||||
📂 Location: .workflow/WFS-{session}/.design/prototypes/
|
||||
|
||||
Next: /workflow:design:design-update --session WFS-{session}
|
||||
🌐 Preview Options:
|
||||
1. Quick: Open index.html in browser
|
||||
2. Full: Start local server and visit http://localhost:8080
|
||||
- Python: cd prototypes && python -m http.server 8080
|
||||
- Node.js: cd prototypes && npx http-server -p 8080
|
||||
|
||||
📊 Compare Variants:
|
||||
- Open compare.html for side-by-side view
|
||||
- Toggle viewports: Desktop / Tablet / Mobile
|
||||
- Switch between pages dynamically
|
||||
- Synchronized scrolling option
|
||||
|
||||
Review prototypes and select preferred variants, then run:
|
||||
/workflow:design:design-update --session WFS-{session} --selected-prototypes "{page-variant-ids}"
|
||||
|
||||
Example:
|
||||
/workflow:design:design-update --session WFS-{session} --selected-prototypes "dashboard-variant-1,auth-variant-2"
|
||||
```
|
||||
|
||||
@@ -143,7 +143,12 @@ Planning complete for session: [sessionId]
|
||||
Tasks generated: [count]
|
||||
Plan: .workflow/[sessionId]/IMPL_PLAN.md
|
||||
|
||||
Next: /workflow:execute or /workflow:status
|
||||
✅ Recommended Next Steps:
|
||||
1. /workflow:action-plan-verify --session [sessionId] # Verify plan quality before execution
|
||||
2. /workflow:status # Review task breakdown
|
||||
3. /workflow:execute # Start implementation (after verification)
|
||||
|
||||
⚠️ Quality Gate: Consider running /workflow:action-plan-verify to catch issues early
|
||||
```
|
||||
|
||||
## TodoWrite Pattern
|
||||
|
||||
@@ -26,10 +26,11 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*)
|
||||
2. **No Preliminary Analysis**: Do not read files before Phase 1
|
||||
3. **Parse Every Output**: Extract required data for next phase
|
||||
4. **Sequential Execution**: Each phase depends on previous output
|
||||
5. **Complete All Phases**: Do not return until Phase 5 completes
|
||||
5. **Complete All Phases**: Do not return until Phase 7 completes (with concept verification)
|
||||
6. **TDD Context**: All descriptions include "TDD:" prefix
|
||||
7. **Quality Gate**: Phase 5 concept verification ensures clarity before task generation
|
||||
|
||||
## 6-Phase Execution
|
||||
## 7-Phase Execution (with Concept Verification)
|
||||
|
||||
### Phase 1: Session Discovery
|
||||
**Command**: `/workflow:session:start --auto "TDD: [structured-description]"`
|
||||
@@ -79,7 +80,22 @@ TEST_FOCUS: [Test scenarios]
|
||||
|
||||
**Parse**: Verify ANALYSIS_RESULTS.md contains TDD breakdown sections
|
||||
|
||||
### Phase 5: TDD Task Generation
|
||||
### Phase 5: Concept Verification (NEW QUALITY GATE)
|
||||
**Command**: `/workflow:concept-verify --session [sessionId]`
|
||||
|
||||
**Purpose**: Verify conceptual clarity before TDD task generation
|
||||
- Clarify test requirements and acceptance criteria
|
||||
- Resolve ambiguities in expected behavior
|
||||
- Validate TDD approach is appropriate
|
||||
|
||||
**Behavior**:
|
||||
- If no ambiguities found → Auto-proceed to Phase 6
|
||||
- If ambiguities exist → Interactive clarification (up to 5 questions)
|
||||
- After clarifications → Auto-proceed to Phase 6
|
||||
|
||||
**Parse**: Verify concept verification completed (check for clarifications section in ANALYSIS_RESULTS.md or synthesis file if exists)
|
||||
|
||||
### Phase 6: TDD Task Generation
|
||||
**Command**:
|
||||
- Manual: `/workflow:tools:task-generate-tdd --session [sessionId]`
|
||||
- Agent: `/workflow:tools:task-generate-tdd --session [sessionId] --agent`
|
||||
@@ -93,10 +109,10 @@ TEST_FOCUS: [Test scenarios]
|
||||
- IMPL tasks include test-fix-cycle configuration
|
||||
- IMPL_PLAN.md contains workflow_type: "tdd" in frontmatter
|
||||
|
||||
### Phase 6: TDD Structure Validation
|
||||
**Internal validation (no command)**
|
||||
### Phase 7: TDD Structure Validation & Action Plan Verification (RECOMMENDED)
|
||||
**Internal validation first, then recommend external verification**
|
||||
|
||||
**Validate**:
|
||||
**Internal Validation**:
|
||||
1. Each feature has TEST → IMPL → REFACTOR chain
|
||||
2. Dependencies: IMPL depends_on TEST, REFACTOR depends_on IMPL
|
||||
3. Meta fields: tdd_phase correct ("red"/"green"/"refactor")
|
||||
@@ -117,20 +133,26 @@ Structure:
|
||||
|
||||
Plan:
|
||||
- Unified Implementation Plan: .workflow/[sessionId]/IMPL_PLAN.md
|
||||
(includes TDD Task Chains section)
|
||||
(includes TDD Task Chains section with workflow_type: "tdd")
|
||||
|
||||
Next: /workflow:execute or /workflow:tdd-verify
|
||||
✅ Recommended Next Steps:
|
||||
1. /workflow:action-plan-verify --session [sessionId] # Verify TDD plan quality
|
||||
2. /workflow:execute --session [sessionId] # Start TDD execution
|
||||
3. /workflow:tdd-verify [sessionId] # Post-execution TDD compliance check
|
||||
|
||||
⚠️ Quality Gate: Consider running /workflow:action-plan-verify to validate TDD task dependencies
|
||||
```
|
||||
|
||||
## TodoWrite Pattern
|
||||
|
||||
```javascript
|
||||
// Initialize (6 phases now)
|
||||
// Initialize (7 phases now with concept verification)
|
||||
[
|
||||
{content: "Execute session discovery", status: "in_progress", activeForm: "Executing session discovery"},
|
||||
{content: "Execute context gathering", status: "pending", activeForm: "Executing context gathering"},
|
||||
{content: "Execute test coverage analysis", status: "pending", activeForm: "Executing test coverage analysis"},
|
||||
{content: "Execute TDD analysis", status: "pending", activeForm: "Executing TDD analysis"},
|
||||
{content: "Execute context gathering", status: "pending", activeForm": "Executing context gathering"},
|
||||
{content: "Execute test coverage analysis", status: "pending", activeForm": "Executing test coverage analysis"},
|
||||
{content: "Execute TDD analysis", status: "pending", activeForm": "Executing TDD analysis"},
|
||||
{content: "Execute concept verification", status: "pending", activeForm": "Executing concept verification"},
|
||||
{content: "Execute TDD task generation", status: "pending", activeForm: "Executing TDD task generation"},
|
||||
{content: "Validate TDD structure", status: "pending", activeForm: "Validating TDD structure"}
|
||||
]
|
||||
|
||||
@@ -14,11 +14,16 @@ examples:
|
||||
|
||||
## Purpose
|
||||
|
||||
**`/workflow:docs` is a pure planner/orchestrator** - it analyzes project structure, decomposes documentation work into tasks, and generates execution plans. It does **NOT** generate any documentation content itself.
|
||||
**`/workflow:docs` is a lightweight planner/orchestrator** - it analyzes project structure using metadata tools, decomposes documentation work into tasks, and generates execution plans. It does **NOT** generate any documentation content itself.
|
||||
|
||||
**Key Principle**: Separation of Concerns
|
||||
- **docs.md** → Planning, session creation, task generation
|
||||
- **doc-generator.md** → Execution, content generation, quality assurance
|
||||
**Key Principle**: Lightweight Planning + Targeted Execution
|
||||
- **docs.md** → Collect metadata (paths, structure), generate task JSONs with path references
|
||||
- **doc-generator.md** → Execute targeted analysis on focus_paths, generate content
|
||||
|
||||
**Optimization Philosophy**:
|
||||
- **Planning phase**: Minimal context - only metadata (module paths, file lists via `get_modules_by_depth.sh` and Code Index MCP)
|
||||
- **Task JSON**: Store path references, not content
|
||||
- **Execution phase**: Targeted deep analysis within focus_paths scope
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -75,11 +80,18 @@ mkdir -p "${session_dir}"/{.task,.process,.summaries}
|
||||
touch ".workflow/.active-WFS-docs-${timestamp}"
|
||||
```
|
||||
|
||||
#### Phase 2: Project Structure Analysis (MANDATORY)
|
||||
#### Phase 2: Lightweight Metadata Collection (MANDATORY)
|
||||
```bash
|
||||
# Run get_modules_by_depth.sh for module hierarchy
|
||||
# Step 1: Run get_modules_by_depth.sh for module hierarchy (metadata only)
|
||||
module_data=$(~/.claude/scripts/get_modules_by_depth.sh)
|
||||
# Format: depth:N|path:<PATH>|files:N|size:N|has_claude:yes/no
|
||||
|
||||
# Step 2: Use Code Index MCP for file discovery (optional, for better precision)
|
||||
# Example: mcp__code-index__find_files(pattern="src/**/")
|
||||
# This finds directories without loading content
|
||||
|
||||
# IMPORTANT: Do NOT read file contents in planning phase
|
||||
# Only collect: paths, file counts, module structure
|
||||
```
|
||||
|
||||
#### Phase 3: Quick Documentation Assessment
|
||||
@@ -172,32 +184,27 @@ fi
|
||||
"pre_analysis": [
|
||||
{
|
||||
"step": "discover_project_structure",
|
||||
"action": "Analyze project structure and modules",
|
||||
"action": "Get project module hierarchy metadata",
|
||||
"command": "bash(~/.claude/scripts/get_modules_by_depth.sh)",
|
||||
"output_to": "system_structure"
|
||||
},
|
||||
{
|
||||
"step": "discover_project_files",
|
||||
"action": "Identify key project files",
|
||||
"command": "bash(find . -maxdepth 2 -type f \\( -name '*.json' -o -name '*.md' -o -name '*.yml' -o -name '*.yaml' \\) | head -30)",
|
||||
"output_to": "project_files"
|
||||
"output_to": "system_structure",
|
||||
"on_error": "fail",
|
||||
"note": "Lightweight metadata only - no file content"
|
||||
},
|
||||
{
|
||||
"step": "analyze_tech_stack",
|
||||
"action": "Analyze technology stack and dependencies",
|
||||
"command": "bash(~/.claude/scripts/gemini-wrapper -p \"PURPOSE: Analyze project technology stack\\nTASK: Extract tech stack, architecture patterns, design principles\\nMODE: analysis\\nCONTEXT: System structure: [system_structure]\\n Project files: [project_files]\\nEXPECTED: Technology analysis with architecture style\\nRULES: $(cat ~/.claude/workflows/cli-templates/prompts/documentation/project-overview.txt)\")",
|
||||
"output_to": "tech_analysis",
|
||||
"on_error": "fail",
|
||||
"note": "Command is built at planning time based on $tool variable (gemini/qwen/codex)"
|
||||
"action": "Analyze technology stack from key config files",
|
||||
"command": "bash(~/.claude/scripts/gemini-wrapper -p \"PURPOSE: Analyze project technology stack\\nTASK: Extract tech stack from key config files\\nMODE: analysis\\nCONTEXT: @{package.json,pom.xml,build.gradle,requirements.txt,go.mod,Cargo.toml,CLAUDE.md}\\nEXPECTED: Technology list and architecture style\\nRULES: Be concise, focus on stack only\")",
|
||||
"output_to": "tech_stack_analysis",
|
||||
"on_error": "skip_optional",
|
||||
"note": "Only analyze config files - small, controlled context"
|
||||
}
|
||||
],
|
||||
"implementation_approach": {
|
||||
"task_description": "Use tech_analysis to populate Project-Level Documentation Template",
|
||||
"task_description": "Use system_structure and tech_stack_analysis to populate Project Overview Template",
|
||||
"logic_flow": [
|
||||
"Load template: ~/.claude/workflows/cli-templates/prompts/documentation/project-overview.txt",
|
||||
"Parse tech_analysis for: purpose, architecture, tech stack, design principles",
|
||||
"Fill template sections with extracted information",
|
||||
"Generate navigation links to module/API docs",
|
||||
"Fill sections using [system_structure] and [tech_stack_analysis]",
|
||||
"Generate navigation links based on module paths",
|
||||
"Format output as Markdown"
|
||||
]
|
||||
},
|
||||
@@ -239,27 +246,19 @@ fi
|
||||
"flow_control": {
|
||||
"pre_analysis": [
|
||||
{
|
||||
"step": "load_system_context",
|
||||
"action": "Load system architecture from IMPL-001",
|
||||
"command": "bash(cat .workflow/WFS-docs-*/IMPL-001-system_structure.output 2>/dev/null || ~/.claude/scripts/get_modules_by_depth.sh)",
|
||||
"output_to": "system_context",
|
||||
"on_error": "skip_optional"
|
||||
},
|
||||
{
|
||||
"step": "analyze_module_structure",
|
||||
"action": "Deep analysis of module structure and API",
|
||||
"command": "bash(cd src/auth && ~/.claude/scripts/gemini-wrapper -p \"PURPOSE: Document module comprehensively\\nTASK: Extract module purpose, architecture, public API, dependencies\\nMODE: analysis\\nCONTEXT: @{**/*}\\n System: [system_context]\\nEXPECTED: Complete module analysis for documentation\\nRULES: $(cat ~/.claude/workflows/cli-templates/prompts/documentation/module-documentation.txt)\")",
|
||||
"step": "analyze_module_content",
|
||||
"action": "Perform deep analysis of the specific module's content",
|
||||
"command": "bash(cd src/auth && ~/.claude/scripts/gemini-wrapper -p \"PURPOSE: Document 'auth' module comprehensively\\nTASK: Extract module purpose, architecture, public API, dependencies\\nMODE: analysis\\nCONTEXT: @{**/*}\\nEXPECTED: Structured analysis of module content\\nRULES: $(cat ~/.claude/workflows/cli-templates/prompts/documentation/module-documentation.txt)\")",
|
||||
"output_to": "module_analysis",
|
||||
"on_error": "fail",
|
||||
"note": "For qwen: qwen-wrapper | For codex: codex -C src/auth --full-auto exec \"...\" --skip-git-repo-check"
|
||||
"note": "Analysis strictly limited to focus_paths ('src/auth') - controlled context"
|
||||
}
|
||||
],
|
||||
"implementation_approach": {
|
||||
"task_description": "Use module_analysis to populate Module-Level Documentation Template",
|
||||
"task_description": "Use the detailed [module_analysis] to populate the Module-Level Documentation Template",
|
||||
"logic_flow": [
|
||||
"Load template: ~/.claude/workflows/cli-templates/prompts/documentation/module-documentation.txt",
|
||||
"Parse module_analysis for: purpose, components, API, dependencies",
|
||||
"Fill template sections with extracted information",
|
||||
"Fill sections using [module_analysis]",
|
||||
"Generate code examples from actual usage",
|
||||
"Format output as Markdown"
|
||||
]
|
||||
@@ -369,18 +368,19 @@ fi
|
||||
"pre_analysis": [
|
||||
{
|
||||
"step": "discover_api_endpoints",
|
||||
"action": "Find all API routes and endpoints",
|
||||
"command": "bash(rg -t ts -t js '(router\\.|app\\.|@(Get|Post|Put|Delete|Patch))' src/ --no-heading | head -100)",
|
||||
"action": "Find all API routes and endpoints using MCP",
|
||||
"command": "mcp__code-index__search_code_advanced(pattern='router\\.|app\\.|@(Get|Post|Put|Delete|Patch)', file_pattern='*.{ts,js}', output_mode='content', head_limit=100)",
|
||||
"output_to": "endpoint_discovery",
|
||||
"on_error": "skip_optional"
|
||||
"on_error": "skip_optional",
|
||||
"note": "Use MCP instead of rg for better structure"
|
||||
},
|
||||
{
|
||||
"step": "analyze_api_structure",
|
||||
"action": "Analyze API structure and patterns",
|
||||
"command": "bash(~/.claude/scripts/gemini-wrapper -p \"PURPOSE: Document API comprehensively\\nTASK: Extract endpoints, auth, request/response formats\\nMODE: analysis\\nCONTEXT: @{src/api/**/*,src/routes/**/*,src/controllers/**/*}\\n Endpoints: [endpoint_discovery]\\nEXPECTED: Complete API documentation\\nRULES: $(cat ~/.claude/workflows/cli-templates/prompts/documentation/api-reference.txt)\")",
|
||||
"command": "bash(~/.claude/scripts/gemini-wrapper -p \"PURPOSE: Document API comprehensively\\nTASK: Extract endpoints, auth, request/response formats\\nMODE: analysis\\nCONTEXT: @{src/api/**/*,src/routes/**/*,src/controllers/**/*}\\nEXPECTED: Complete API documentation\\nRULES: $(cat ~/.claude/workflows/cli-templates/prompts/documentation/api-reference.txt)\")",
|
||||
"output_to": "api_analysis",
|
||||
"on_error": "fail",
|
||||
"note": "Tool-specific: gemini-wrapper | qwen-wrapper | codex -C src/api exec"
|
||||
"note": "Analysis limited to API-related paths - controlled context"
|
||||
}
|
||||
],
|
||||
"implementation_approach": {
|
||||
|
||||
@@ -238,35 +238,231 @@ Task(
|
||||
\`\`\`markdown
|
||||
---
|
||||
identifier: WFS-{session-id}
|
||||
source: "User requirements"
|
||||
source: "User requirements" | "File: path" | "Issue: ISS-001"
|
||||
analysis: .workflow/{session-id}/.process/ANALYSIS_RESULTS.md
|
||||
artifacts: .workflow/{session-id}/.brainstorming/
|
||||
context_package: .workflow/{session-id}/.process/context-package.json # CCW smart context
|
||||
workflow_type: "standard | tdd | design" # Indicates execution model
|
||||
verification_history: # CCW quality gates
|
||||
concept_verify: "passed | skipped | pending"
|
||||
action_plan_verify: "pending"
|
||||
phase_progression: "brainstorm → context → analysis → concept_verify → planning" # CCW workflow phases
|
||||
---
|
||||
|
||||
# Implementation Plan: {Project Title}
|
||||
|
||||
## Summary
|
||||
Core requirements, objectives, and technical approach.
|
||||
## 1. Summary
|
||||
Core requirements, objectives, technical approach summary (2-3 paragraphs max).
|
||||
|
||||
## Context Analysis
|
||||
- **Project**: Type, patterns, tech stack
|
||||
- **Modules**: Components and integration points
|
||||
- **Dependencies**: External libraries and constraints
|
||||
- **Patterns**: Code conventions and guidelines
|
||||
**Core Objectives**:
|
||||
- [Key objective 1]
|
||||
- [Key objective 2]
|
||||
|
||||
## Brainstorming Artifacts
|
||||
- synthesis-specification.md (Highest priority)
|
||||
- topic-framework.md (Medium priority)
|
||||
- Role analyses: ui-designer, system-architect, etc.
|
||||
**Technical Approach**:
|
||||
- [High-level approach]
|
||||
|
||||
## Task Breakdown
|
||||
- **Task Count**: N tasks, complexity level
|
||||
- **Hierarchy**: Flat/Two-level structure
|
||||
- **Dependencies**: Task dependency graph
|
||||
## 2. Context Analysis
|
||||
|
||||
## Implementation Plan
|
||||
- **Execution Strategy**: Sequential/Parallel approach
|
||||
- **Resource Requirements**: Tools, dependencies, artifacts
|
||||
- **Success Criteria**: Metrics and acceptance conditions
|
||||
### CCW Workflow Context
|
||||
**Phase Progression**:
|
||||
- ✅ Phase 1: Brainstorming (synthesis-specification.md generated)
|
||||
- ✅ Phase 2: Context Gathering (context-package.json: {N} files, {M} modules analyzed)
|
||||
- ✅ Phase 3: Enhanced Analysis (ANALYSIS_RESULTS.md: Gemini/Qwen/Codex parallel insights)
|
||||
- ✅ Phase 4: Concept Verification ({X} clarifications answered, synthesis updated | skipped)
|
||||
- ⏳ Phase 5: Action Planning (current phase - generating IMPL_PLAN.md)
|
||||
|
||||
**Quality Gates**:
|
||||
- concept-verify: ✅ Passed (0 ambiguities remaining) | ⏭️ Skipped (user decision) | ⏳ Pending
|
||||
- action-plan-verify: ⏳ Pending (recommended before /workflow:execute)
|
||||
|
||||
**Context Package Summary**:
|
||||
- **Focus Paths**: {list key directories from context-package.json}
|
||||
- **Key Files**: {list primary files for modification}
|
||||
- **Module Depth Analysis**: {from get_modules_by_depth.sh output}
|
||||
- **Smart Context**: {total file count} files, {module count} modules, {dependency count} dependencies identified
|
||||
|
||||
### Project Profile
|
||||
- **Type**: Greenfield/Enhancement/Refactor
|
||||
- **Scale**: User count, data volume, complexity
|
||||
- **Tech Stack**: Primary technologies
|
||||
- **Timeline**: Duration and milestones
|
||||
|
||||
### Module Structure
|
||||
\`\`\`
|
||||
[Directory tree showing key modules]
|
||||
\`\`\`
|
||||
|
||||
### Dependencies
|
||||
**Primary**: [Core libraries and frameworks]
|
||||
**APIs**: [External services]
|
||||
**Development**: [Testing, linting, CI/CD tools]
|
||||
|
||||
### Patterns & Conventions
|
||||
- **Architecture**: [Key patterns like DI, Event-Driven]
|
||||
- **Component Design**: [Design patterns]
|
||||
- **State Management**: [State strategy]
|
||||
- **Code Style**: [Naming, TypeScript coverage]
|
||||
|
||||
## 3. Brainstorming Artifacts Reference
|
||||
|
||||
### Artifact Usage Strategy
|
||||
**Primary Reference (synthesis-specification.md)**:
|
||||
- **What**: Comprehensive implementation blueprint from multi-role synthesis
|
||||
- **When**: Every task references this first for requirements and design decisions
|
||||
- **How**: Extract architecture decisions, UI/UX patterns, functional requirements, non-functional requirements
|
||||
- **Priority**: Authoritative - overrides role-specific analyses when conflicts arise
|
||||
- **CCW Value**: Consolidates insights from all brainstorming roles into single source of truth
|
||||
|
||||
**Context Intelligence (context-package.json)**:
|
||||
- **What**: Smart context gathered by CCW's context-gather phase
|
||||
- **Content**: Focus paths, dependency graph, existing patterns, module structure
|
||||
- **Usage**: Tasks load this via \`flow_control.preparatory_steps\` for environment setup
|
||||
- **CCW Value**: Automated intelligent context discovery replacing manual file exploration
|
||||
|
||||
**Technical Analysis (ANALYSIS_RESULTS.md)**:
|
||||
- **What**: Gemini/Qwen/Codex parallel analysis results
|
||||
- **Content**: Optimization strategies, risk assessment, architecture review, implementation patterns
|
||||
- **Usage**: Referenced in task planning for technical guidance and risk mitigation
|
||||
- **CCW Value**: Multi-model parallel analysis providing comprehensive technical intelligence
|
||||
|
||||
### Integrated Specifications (Highest Priority)
|
||||
- **synthesis-specification.md**: Comprehensive implementation blueprint
|
||||
- Contains: Architecture design, UI/UX guidelines, functional/non-functional requirements, implementation roadmap, risk assessment
|
||||
|
||||
### Supporting Artifacts (Reference)
|
||||
- **topic-framework.md**: Role-specific discussion points and analysis framework
|
||||
- **system-architect/analysis.md**: Detailed architecture specifications
|
||||
- **ui-designer/analysis.md**: Layout and component specifications
|
||||
- **product-manager/analysis.md**: Product vision and user stories
|
||||
|
||||
**Artifact Priority in Development**:
|
||||
1. synthesis-specification.md (primary reference for all tasks)
|
||||
2. context-package.json (smart context for execution environment)
|
||||
3. ANALYSIS_RESULTS.md (technical analysis and optimization strategies)
|
||||
4. Role-specific analyses (fallback for detailed specifications)
|
||||
|
||||
## 4. Implementation Strategy
|
||||
|
||||
### Execution Strategy
|
||||
**Execution Model**: [Sequential | Parallel | Phased | TDD Cycles]
|
||||
|
||||
**Rationale**: [Why this execution model fits the project]
|
||||
|
||||
**Parallelization Opportunities**:
|
||||
- [List independent workstreams]
|
||||
|
||||
**Serialization Requirements**:
|
||||
- [List critical dependencies]
|
||||
|
||||
### Architectural Approach
|
||||
**Key Architecture Decisions**:
|
||||
- [ADR references from synthesis]
|
||||
- [Justification for architecture patterns]
|
||||
|
||||
**Integration Strategy**:
|
||||
- [How modules communicate]
|
||||
- [State management approach]
|
||||
|
||||
### Key Dependencies
|
||||
**Task Dependency Graph**:
|
||||
\`\`\`
|
||||
[High-level dependency visualization]
|
||||
\`\`\`
|
||||
|
||||
**Critical Path**: [Identify bottleneck tasks]
|
||||
|
||||
### Testing Strategy
|
||||
**Testing Approach**:
|
||||
- Unit testing: [Tools, scope]
|
||||
- Integration testing: [Key integration points]
|
||||
- E2E testing: [Critical user flows]
|
||||
|
||||
**Coverage Targets**:
|
||||
- Lines: ≥70%
|
||||
- Functions: ≥70%
|
||||
- Branches: ≥65%
|
||||
|
||||
**Quality Gates**:
|
||||
- [CI/CD gates]
|
||||
- [Performance budgets]
|
||||
|
||||
## 5. Task Breakdown Summary
|
||||
|
||||
### Task Count
|
||||
**{N} tasks** (flat hierarchy | two-level hierarchy, sequential | parallel execution)
|
||||
|
||||
### Task Structure
|
||||
- **IMPL-1**: [Main task title]
|
||||
- **IMPL-2**: [Main task title]
|
||||
...
|
||||
|
||||
### Complexity Assessment
|
||||
- **High**: [List with rationale]
|
||||
- **Medium**: [List]
|
||||
- **Low**: [List]
|
||||
|
||||
### Dependencies
|
||||
[Reference Section 4.3 for dependency graph]
|
||||
|
||||
**Parallelization Opportunities**:
|
||||
- [Specific task groups that can run in parallel]
|
||||
|
||||
## 6. Implementation Plan (Detailed Phased Breakdown)
|
||||
|
||||
### Execution Strategy
|
||||
|
||||
**Phase 1 (Weeks 1-2): [Phase Name]**
|
||||
- **Tasks**: IMPL-1, IMPL-2
|
||||
- **Deliverables**:
|
||||
- [Specific deliverable 1]
|
||||
- [Specific deliverable 2]
|
||||
- **Success Criteria**:
|
||||
- [Measurable criterion]
|
||||
|
||||
**Phase 2 (Weeks 3-N): [Phase Name]**
|
||||
...
|
||||
|
||||
### Resource Requirements
|
||||
|
||||
**Development Team**:
|
||||
- [Team composition and skills]
|
||||
|
||||
**External Dependencies**:
|
||||
- [Third-party services, APIs]
|
||||
|
||||
**Infrastructure**:
|
||||
- [Development, staging, production environments]
|
||||
|
||||
## 7. Risk Assessment & Mitigation
|
||||
|
||||
| Risk | Impact | Probability | Mitigation Strategy | Owner |
|
||||
|------|--------|-------------|---------------------|-------|
|
||||
| [Risk description] | High/Med/Low | High/Med/Low | [Strategy] | [Role] |
|
||||
|
||||
**Critical Risks** (High impact + High probability):
|
||||
- [Risk 1]: [Detailed mitigation plan]
|
||||
|
||||
**Monitoring Strategy**:
|
||||
- [How risks will be monitored]
|
||||
|
||||
## 8. Success Criteria
|
||||
|
||||
**Functional Completeness**:
|
||||
- [ ] All requirements from synthesis-specification.md implemented
|
||||
- [ ] All acceptance criteria from task.json files met
|
||||
|
||||
**Technical Quality**:
|
||||
- [ ] Test coverage ≥70%
|
||||
- [ ] Bundle size within budget
|
||||
- [ ] Performance targets met
|
||||
|
||||
**Operational Readiness**:
|
||||
- [ ] CI/CD pipeline operational
|
||||
- [ ] Monitoring and logging configured
|
||||
- [ ] Documentation complete
|
||||
|
||||
**Business Metrics**:
|
||||
- [ ] [Key business metrics from synthesis]
|
||||
\`\`\`
|
||||
|
||||
#### 3. TODO_LIST.md
|
||||
|
||||
@@ -305,27 +305,279 @@ For each feature, generate 3 tasks with ID format:
|
||||
|
||||
### Phase 4: Unified IMPL_PLAN.md Generation
|
||||
|
||||
Generate single comprehensive IMPL_PLAN.md with:
|
||||
Generate single comprehensive IMPL_PLAN.md with enhanced 8-section structure:
|
||||
|
||||
**Frontmatter**:
|
||||
```yaml
|
||||
---
|
||||
identifier: WFS-{session-id}
|
||||
workflow_type: "tdd"
|
||||
source: "User requirements" | "File: path" | "Issue: ISS-001"
|
||||
analysis: .workflow/{session-id}/.process/ANALYSIS_RESULTS.md
|
||||
artifacts: .workflow/{session-id}/.brainstorming/
|
||||
context_package: .workflow/{session-id}/.process/context-package.json # CCW smart context
|
||||
workflow_type: "tdd" # TDD-specific workflow
|
||||
verification_history: # CCW quality gates
|
||||
concept_verify: "passed | skipped | pending"
|
||||
action_plan_verify: "pending"
|
||||
phase_progression: "brainstorm → context → test_context → analysis → concept_verify → tdd_planning" # TDD workflow phases
|
||||
feature_count: N
|
||||
task_count: 3N
|
||||
tdd_chains: N
|
||||
---
|
||||
```
|
||||
|
||||
**Structure**:
|
||||
1. **Summary**: Project overview
|
||||
2. **TDD Task Chains** (TDD-specific section):
|
||||
- Visual representation of TEST → IMPL → REFACTOR chains
|
||||
- Feature-by-feature breakdown with phase indicators
|
||||
3. **Task Breakdown**: Standard task listing
|
||||
4. **Implementation Strategy**: Execution approach
|
||||
5. **Success Criteria**: Acceptance conditions
|
||||
**Complete Structure** (8 Sections):
|
||||
|
||||
```markdown
|
||||
# Implementation Plan: {Project Title}
|
||||
|
||||
## 1. Summary
|
||||
Core requirements, objectives, and TDD-specific technical approach (2-3 paragraphs max).
|
||||
|
||||
**Core Objectives**:
|
||||
- [Key objective 1]
|
||||
- [Key objective 2]
|
||||
|
||||
**Technical Approach**:
|
||||
- TDD-driven development with Red-Green-Refactor cycles
|
||||
- [Other high-level approaches]
|
||||
|
||||
## 2. Context Analysis
|
||||
|
||||
### CCW Workflow Context
|
||||
**Phase Progression** (TDD-specific):
|
||||
- ✅ Phase 1: Brainstorming (synthesis-specification.md generated)
|
||||
- ✅ Phase 2: Context Gathering (context-package.json: {N} files, {M} modules analyzed)
|
||||
- ✅ Phase 3: Test Coverage Analysis (test-context-package.json: existing test patterns identified)
|
||||
- ✅ Phase 4: TDD Analysis (ANALYSIS_RESULTS.md: test-first requirements with Gemini/Qwen insights)
|
||||
- ✅ Phase 5: Concept Verification ({X} clarifications answered, test requirements clarified | skipped)
|
||||
- ⏳ Phase 6: TDD Task Generation (current phase - generating IMPL_PLAN.md with TDD chains)
|
||||
|
||||
**Quality Gates**:
|
||||
- concept-verify: ✅ Passed (test requirements clarified, 0 ambiguities) | ⏭️ Skipped (user decision) | ⏳ Pending
|
||||
- action-plan-verify: ⏳ Pending (recommended before /workflow:execute for TDD dependency validation)
|
||||
|
||||
**Context Package Summary**:
|
||||
- **Focus Paths**: {list key directories from context-package.json}
|
||||
- **Key Files**: {list primary files for modification}
|
||||
- **Test Context**: {existing test patterns, coverage baseline, test framework detected}
|
||||
- **Module Depth Analysis**: {from get_modules_by_depth.sh output}
|
||||
- **Smart Context**: {total file count} files, {module count} modules, {test file count} tests identified
|
||||
|
||||
### Project Profile
|
||||
- **Type**: Greenfield/Enhancement/Refactor
|
||||
- **Scale**: User count, data volume, complexity
|
||||
- **Tech Stack**: Primary technologies
|
||||
- **Timeline**: Duration and milestones
|
||||
- **TDD Framework**: Testing framework and tools
|
||||
|
||||
### Module Structure
|
||||
```
|
||||
[Directory tree showing key modules and test directories]
|
||||
```
|
||||
|
||||
### Dependencies
|
||||
**Primary**: [Core libraries and frameworks]
|
||||
**Testing**: [Test framework, mocking libraries]
|
||||
**Development**: [Linting, CI/CD tools]
|
||||
|
||||
### Patterns & Conventions
|
||||
- **Architecture**: [Key patterns]
|
||||
- **Testing Patterns**: [Unit, integration, E2E patterns]
|
||||
- **Code Style**: [Naming, TypeScript coverage]
|
||||
|
||||
## 3. Brainstorming Artifacts Reference
|
||||
|
||||
### Artifact Usage Strategy
|
||||
**Primary Reference (synthesis-specification.md)**:
|
||||
- **What**: Comprehensive implementation blueprint from multi-role synthesis
|
||||
- **When**: Every TDD task (TEST/IMPL/REFACTOR) references this for requirements and acceptance criteria
|
||||
- **How**: Extract testable requirements, architecture decisions, expected behaviors
|
||||
- **Priority**: Authoritative - defines what to test and how to implement
|
||||
- **CCW Value**: Consolidates insights from all brainstorming roles into single source of truth for TDD
|
||||
|
||||
**Context Intelligence (context-package.json & test-context-package.json)**:
|
||||
- **What**: Smart context from CCW's context-gather and test-context-gather phases
|
||||
- **Content**: Focus paths, dependency graph, existing test patterns, test framework configuration
|
||||
- **Usage**: RED phase loads test patterns, GREEN phase loads implementation context
|
||||
- **CCW Value**: Automated discovery of existing tests and patterns for TDD consistency
|
||||
|
||||
**Technical Analysis (ANALYSIS_RESULTS.md)**:
|
||||
- **What**: Gemini/Qwen parallel analysis with TDD-specific breakdown
|
||||
- **Content**: Testable requirements, test scenarios, implementation strategies, risk assessment
|
||||
- **Usage**: RED phase references test cases, GREEN phase references implementation approach
|
||||
- **CCW Value**: Multi-model analysis providing comprehensive TDD guidance
|
||||
|
||||
### Integrated Specifications (Highest Priority)
|
||||
- **synthesis-specification.md**: Comprehensive implementation blueprint
|
||||
- Contains: Architecture design, functional/non-functional requirements
|
||||
|
||||
### Supporting Artifacts (Reference)
|
||||
- **topic-framework.md**: Discussion framework
|
||||
- **system-architect/analysis.md**: Architecture specifications
|
||||
- **Role-specific analyses**: [Other relevant analyses]
|
||||
|
||||
**Artifact Priority in Development**:
|
||||
1. synthesis-specification.md (primary reference for test cases and implementation)
|
||||
2. test-context-package.json (existing test patterns for TDD consistency)
|
||||
3. context-package.json (smart context for execution environment)
|
||||
4. ANALYSIS_RESULTS.md (technical analysis with TDD breakdown)
|
||||
5. Role-specific analyses (supplementary)
|
||||
|
||||
## 4. Implementation Strategy
|
||||
|
||||
### Execution Strategy
|
||||
**Execution Model**: TDD Cycles (Red-Green-Refactor)
|
||||
|
||||
**Rationale**: Test-first approach ensures correctness and reduces bugs
|
||||
|
||||
**TDD Cycle Pattern**:
|
||||
- RED: Write failing test
|
||||
- GREEN: Implement minimal code to pass (with test-fix cycle if needed)
|
||||
- REFACTOR: Improve code quality while keeping tests green
|
||||
|
||||
**Parallelization Opportunities**:
|
||||
- [Independent features that can be developed in parallel]
|
||||
|
||||
### Architectural Approach
|
||||
**Key Architecture Decisions**:
|
||||
- [ADR references from synthesis]
|
||||
- [TDD-compatible architecture patterns]
|
||||
|
||||
**Integration Strategy**:
|
||||
- [How modules communicate]
|
||||
- [Test isolation strategy]
|
||||
|
||||
### Key Dependencies
|
||||
**Task Dependency Graph**:
|
||||
```
|
||||
Feature 1:
|
||||
TEST-1.1 (RED)
|
||||
↓
|
||||
IMPL-1.1 (GREEN) [with test-fix cycle]
|
||||
↓
|
||||
REFACTOR-1.1 (REFACTOR)
|
||||
|
||||
Feature 2:
|
||||
TEST-2.1 (RED) [depends on REFACTOR-1.1 if related]
|
||||
↓
|
||||
IMPL-2.1 (GREEN)
|
||||
↓
|
||||
REFACTOR-2.1 (REFACTOR)
|
||||
```
|
||||
|
||||
**Critical Path**: [Identify bottleneck features]
|
||||
|
||||
### Testing Strategy
|
||||
**TDD Testing Approach**:
|
||||
- Unit testing: Each feature has comprehensive unit tests
|
||||
- Integration testing: Cross-feature integration
|
||||
- E2E testing: Critical user flows after all TDD cycles
|
||||
|
||||
**Coverage Targets**:
|
||||
- Lines: ≥80% (TDD ensures high coverage)
|
||||
- Functions: ≥80%
|
||||
- Branches: ≥75%
|
||||
|
||||
**Quality Gates**:
|
||||
- All tests must pass before moving to next phase
|
||||
- Refactor phase must maintain test success
|
||||
|
||||
## 5. TDD Task Chains (TDD-Specific Section)
|
||||
|
||||
### Feature-by-Feature TDD Chains
|
||||
|
||||
**Feature 1: {Feature Name}**
|
||||
```
|
||||
🔴 TEST-1.1: Write failing test for {feature}
|
||||
↓
|
||||
🟢 IMPL-1.1: Implement to pass tests (includes test-fix cycle: max 3 iterations)
|
||||
↓
|
||||
🔵 REFACTOR-1.1: Refactor implementation while keeping tests green
|
||||
```
|
||||
|
||||
**Feature 2: {Feature Name}**
|
||||
```
|
||||
🔴 TEST-2.1: Write failing test for {feature}
|
||||
↓
|
||||
🟢 IMPL-2.1: Implement to pass tests (includes test-fix cycle)
|
||||
↓
|
||||
🔵 REFACTOR-2.1: Refactor implementation
|
||||
```
|
||||
|
||||
[Continue for all N features]
|
||||
|
||||
### TDD Task Breakdown Summary
|
||||
- **Total Features**: {N}
|
||||
- **Total Tasks**: {3N} (N TEST + N IMPL + N REFACTOR)
|
||||
- **TDD Chains**: {N}
|
||||
|
||||
## 6. Implementation Plan (Detailed Phased Breakdown)
|
||||
|
||||
### Execution Strategy
|
||||
|
||||
**TDD Cycle Execution**: Feature-by-feature sequential TDD cycles
|
||||
|
||||
**Phase 1 (Weeks 1-2): Foundation Features**
|
||||
- **Features**: Feature 1, Feature 2
|
||||
- **Tasks**: TEST-1.1, IMPL-1.1, REFACTOR-1.1, TEST-2.1, IMPL-2.1, REFACTOR-2.1
|
||||
- **Deliverables**:
|
||||
- Complete TDD cycles for foundation features
|
||||
- All tests passing
|
||||
- **Success Criteria**:
|
||||
- ≥80% test coverage
|
||||
- All RED-GREEN-REFACTOR cycles completed
|
||||
|
||||
**Phase 2 (Weeks 3-N): Advanced Features**
|
||||
[Continue with remaining features]
|
||||
|
||||
### Resource Requirements
|
||||
|
||||
**Development Team**:
|
||||
- [Team composition with TDD experience]
|
||||
|
||||
**External Dependencies**:
|
||||
- [Testing frameworks, mocking services]
|
||||
|
||||
**Infrastructure**:
|
||||
- [CI/CD with test automation]
|
||||
|
||||
## 7. Risk Assessment & Mitigation
|
||||
|
||||
| Risk | Impact | Probability | Mitigation Strategy | Owner |
|
||||
|------|--------|-------------|---------------------|-------|
|
||||
| Tests fail repeatedly in GREEN phase | High | Medium | Test-fix cycle (max 3 iterations) with auto-revert | Dev Team |
|
||||
| Complex features hard to test | High | Medium | Break down into smaller testable units | Architect |
|
||||
| [Other risks] | Med/Low | Med/Low | [Strategies] | [Owner] |
|
||||
|
||||
**Critical Risks** (TDD-Specific):
|
||||
- **GREEN phase failures**: Mitigated by test-fix cycle with Gemini diagnosis
|
||||
- **Test coverage gaps**: Mitigated by TDD-first approach ensuring tests before code
|
||||
|
||||
**Monitoring Strategy**:
|
||||
- Track TDD cycle completion rate
|
||||
- Monitor test success rate per iteration
|
||||
|
||||
## 8. Success Criteria
|
||||
|
||||
**Functional Completeness**:
|
||||
- [ ] All features implemented through TDD cycles
|
||||
- [ ] All RED-GREEN-REFACTOR cycles completed successfully
|
||||
|
||||
**Technical Quality**:
|
||||
- [ ] Test coverage ≥80% (ensured by TDD)
|
||||
- [ ] All tests passing (GREEN state achieved)
|
||||
- [ ] Code refactored for quality (REFACTOR phase completed)
|
||||
|
||||
**Operational Readiness**:
|
||||
- [ ] CI/CD pipeline with automated test execution
|
||||
- [ ] Test failure alerting configured
|
||||
|
||||
**TDD Compliance**:
|
||||
- [ ] Every feature has TEST → IMPL → REFACTOR chain
|
||||
- [ ] No implementation without tests (RED-first principle)
|
||||
- [ ] Refactoring did not break tests
|
||||
```
|
||||
|
||||
### Phase 5: TODO_LIST.md Generation
|
||||
|
||||
|
||||
@@ -240,33 +240,229 @@ Generate task JSON files and IMPL_PLAN.md from analysis results with automatic a
|
||||
identifier: WFS-{session-id}
|
||||
source: "User requirements" | "File: path" | "Issue: ISS-001"
|
||||
analysis: .workflow/{session-id}/.process/ANALYSIS_RESULTS.md
|
||||
artifacts: .workflow/{session-id}/.brainstorming/
|
||||
context_package: .workflow/{session-id}/.process/context-package.json # CCW smart context
|
||||
workflow_type: "standard | tdd | design" # Indicates execution model
|
||||
verification_history: # CCW quality gates
|
||||
concept_verify: "passed | skipped | pending"
|
||||
action_plan_verify: "pending"
|
||||
phase_progression: "brainstorm → context → analysis → concept_verify → planning" # CCW workflow phases
|
||||
---
|
||||
|
||||
# Implementation Plan: {Project Title}
|
||||
|
||||
## Summary
|
||||
Core requirements, objectives, and technical approach.
|
||||
## 1. Summary
|
||||
Core requirements, objectives, technical approach summary (2-3 paragraphs max).
|
||||
|
||||
## Context Analysis
|
||||
- **Project**: Type, patterns, tech stack
|
||||
- **Modules**: Components and integration points
|
||||
- **Dependencies**: External libraries and constraints
|
||||
- **Patterns**: Code conventions and guidelines
|
||||
**Core Objectives**:
|
||||
- [Key objective 1]
|
||||
- [Key objective 2]
|
||||
|
||||
## Brainstorming Artifacts
|
||||
- synthesis-specification.md (Highest priority)
|
||||
- topic-framework.md (Medium priority)
|
||||
- Role analyses: ui-designer, system-architect, etc.
|
||||
**Technical Approach**:
|
||||
- [High-level approach]
|
||||
|
||||
## Task Breakdown
|
||||
- **Task Count**: N tasks, complexity level
|
||||
- **Hierarchy**: Flat/Two-level structure
|
||||
- **Dependencies**: Task dependency graph
|
||||
## 2. Context Analysis
|
||||
|
||||
## Implementation Plan
|
||||
- **Execution Strategy**: Sequential/Parallel approach
|
||||
- **Resource Requirements**: Tools, dependencies, artifacts
|
||||
- **Success Criteria**: Metrics and acceptance conditions
|
||||
### CCW Workflow Context
|
||||
**Phase Progression**:
|
||||
- ✅ Phase 1: Brainstorming (synthesis-specification.md generated)
|
||||
- ✅ Phase 2: Context Gathering (context-package.json: {N} files, {M} modules analyzed)
|
||||
- ✅ Phase 3: Enhanced Analysis (ANALYSIS_RESULTS.md: Gemini/Qwen/Codex parallel insights)
|
||||
- ✅ Phase 4: Concept Verification ({X} clarifications answered, synthesis updated | skipped)
|
||||
- ⏳ Phase 5: Action Planning (current phase - generating IMPL_PLAN.md)
|
||||
|
||||
**Quality Gates**:
|
||||
- concept-verify: ✅ Passed (0 ambiguities remaining) | ⏭️ Skipped (user decision) | ⏳ Pending
|
||||
- action-plan-verify: ⏳ Pending (recommended before /workflow:execute)
|
||||
|
||||
**Context Package Summary**:
|
||||
- **Focus Paths**: {list key directories from context-package.json}
|
||||
- **Key Files**: {list primary files for modification}
|
||||
- **Module Depth Analysis**: {from get_modules_by_depth.sh output}
|
||||
- **Smart Context**: {total file count} files, {module count} modules, {dependency count} dependencies identified
|
||||
|
||||
### Project Profile
|
||||
- **Type**: Greenfield/Enhancement/Refactor
|
||||
- **Scale**: User count, data volume, complexity
|
||||
- **Tech Stack**: Primary technologies
|
||||
- **Timeline**: Duration and milestones
|
||||
|
||||
### Module Structure
|
||||
```
|
||||
[Directory tree showing key modules]
|
||||
```
|
||||
|
||||
### Dependencies
|
||||
**Primary**: [Core libraries and frameworks]
|
||||
**APIs**: [External services]
|
||||
**Development**: [Testing, linting, CI/CD tools]
|
||||
|
||||
### Patterns & Conventions
|
||||
- **Architecture**: [Key patterns like DI, Event-Driven]
|
||||
- **Component Design**: [Design patterns]
|
||||
- **State Management**: [State strategy]
|
||||
- **Code Style**: [Naming, TypeScript coverage]
|
||||
|
||||
## 3. Brainstorming Artifacts Reference
|
||||
|
||||
### Artifact Usage Strategy
|
||||
**Primary Reference (synthesis-specification.md)**:
|
||||
- **What**: Comprehensive implementation blueprint from multi-role synthesis
|
||||
- **When**: Every task references this first for requirements and design decisions
|
||||
- **How**: Extract architecture decisions, UI/UX patterns, functional requirements, non-functional requirements
|
||||
- **Priority**: Authoritative - overrides role-specific analyses when conflicts arise
|
||||
- **CCW Value**: Consolidates insights from all brainstorming roles into single source of truth
|
||||
|
||||
**Context Intelligence (context-package.json)**:
|
||||
- **What**: Smart context gathered by CCW's context-gather phase
|
||||
- **Content**: Focus paths, dependency graph, existing patterns, module structure
|
||||
- **Usage**: Tasks load this via `flow_control.preparatory_steps` for environment setup
|
||||
- **CCW Value**: Automated intelligent context discovery replacing manual file exploration
|
||||
|
||||
**Technical Analysis (ANALYSIS_RESULTS.md)**:
|
||||
- **What**: Gemini/Qwen/Codex parallel analysis results
|
||||
- **Content**: Optimization strategies, risk assessment, architecture review, implementation patterns
|
||||
- **Usage**: Referenced in task planning for technical guidance and risk mitigation
|
||||
- **CCW Value**: Multi-model parallel analysis providing comprehensive technical intelligence
|
||||
|
||||
### Integrated Specifications (Highest Priority)
|
||||
- **synthesis-specification.md**: Comprehensive implementation blueprint
|
||||
- Contains: Architecture design, UI/UX guidelines, functional/non-functional requirements, implementation roadmap, risk assessment
|
||||
|
||||
### Supporting Artifacts (Reference)
|
||||
- **topic-framework.md**: Role-specific discussion points and analysis framework
|
||||
- **system-architect/analysis.md**: Detailed architecture specifications
|
||||
- **ui-designer/analysis.md**: Layout and component specifications
|
||||
- **product-manager/analysis.md**: Product vision and user stories
|
||||
|
||||
**Artifact Priority in Development**:
|
||||
1. synthesis-specification.md (primary reference for all tasks)
|
||||
2. context-package.json (smart context for execution environment)
|
||||
3. ANALYSIS_RESULTS.md (technical analysis and optimization strategies)
|
||||
4. Role-specific analyses (fallback for detailed specifications)
|
||||
|
||||
## 4. Implementation Strategy
|
||||
|
||||
### Execution Strategy
|
||||
**Execution Model**: [Sequential | Parallel | Phased | TDD Cycles]
|
||||
|
||||
**Rationale**: [Why this execution model fits the project]
|
||||
|
||||
**Parallelization Opportunities**:
|
||||
- [List independent workstreams]
|
||||
|
||||
**Serialization Requirements**:
|
||||
- [List critical dependencies]
|
||||
|
||||
### Architectural Approach
|
||||
**Key Architecture Decisions**:
|
||||
- [ADR references from synthesis]
|
||||
- [Justification for architecture patterns]
|
||||
|
||||
**Integration Strategy**:
|
||||
- [How modules communicate]
|
||||
- [State management approach]
|
||||
|
||||
### Key Dependencies
|
||||
**Task Dependency Graph**:
|
||||
```
|
||||
[High-level dependency visualization]
|
||||
```
|
||||
|
||||
**Critical Path**: [Identify bottleneck tasks]
|
||||
|
||||
### Testing Strategy
|
||||
**Testing Approach**:
|
||||
- Unit testing: [Tools, scope]
|
||||
- Integration testing: [Key integration points]
|
||||
- E2E testing: [Critical user flows]
|
||||
|
||||
**Coverage Targets**:
|
||||
- Lines: ≥70%
|
||||
- Functions: ≥70%
|
||||
- Branches: ≥65%
|
||||
|
||||
**Quality Gates**:
|
||||
- [CI/CD gates]
|
||||
- [Performance budgets]
|
||||
|
||||
## 5. Task Breakdown Summary
|
||||
|
||||
### Task Count
|
||||
**{N} tasks** (flat hierarchy | two-level hierarchy, sequential | parallel execution)
|
||||
|
||||
### Task Structure
|
||||
- **IMPL-1**: [Main task title]
|
||||
- **IMPL-2**: [Main task title]
|
||||
...
|
||||
|
||||
### Complexity Assessment
|
||||
- **High**: [List with rationale]
|
||||
- **Medium**: [List]
|
||||
- **Low**: [List]
|
||||
|
||||
### Dependencies
|
||||
[Reference Section 4.3 for dependency graph]
|
||||
|
||||
**Parallelization Opportunities**:
|
||||
- [Specific task groups that can run in parallel]
|
||||
|
||||
## 6. Implementation Plan (Detailed Phased Breakdown)
|
||||
|
||||
### Execution Strategy
|
||||
|
||||
**Phase 1 (Weeks 1-2): [Phase Name]**
|
||||
- **Tasks**: IMPL-1, IMPL-2
|
||||
- **Deliverables**:
|
||||
- [Specific deliverable 1]
|
||||
- [Specific deliverable 2]
|
||||
- **Success Criteria**:
|
||||
- [Measurable criterion]
|
||||
|
||||
**Phase 2 (Weeks 3-N): [Phase Name]**
|
||||
...
|
||||
|
||||
### Resource Requirements
|
||||
|
||||
**Development Team**:
|
||||
- [Team composition and skills]
|
||||
|
||||
**External Dependencies**:
|
||||
- [Third-party services, APIs]
|
||||
|
||||
**Infrastructure**:
|
||||
- [Development, staging, production environments]
|
||||
|
||||
## 7. Risk Assessment & Mitigation
|
||||
|
||||
| Risk | Impact | Probability | Mitigation Strategy | Owner |
|
||||
|------|--------|-------------|---------------------|-------|
|
||||
| [Risk description] | High/Med/Low | High/Med/Low | [Strategy] | [Role] |
|
||||
|
||||
**Critical Risks** (High impact + High probability):
|
||||
- [Risk 1]: [Detailed mitigation plan]
|
||||
|
||||
**Monitoring Strategy**:
|
||||
- [How risks will be monitored]
|
||||
|
||||
## 8. Success Criteria
|
||||
|
||||
**Functional Completeness**:
|
||||
- [ ] All requirements from synthesis-specification.md implemented
|
||||
- [ ] All acceptance criteria from task.json files met
|
||||
|
||||
**Technical Quality**:
|
||||
- [ ] Test coverage ≥70%
|
||||
- [ ] Bundle size within budget
|
||||
- [ ] Performance targets met
|
||||
|
||||
**Operational Readiness**:
|
||||
- [ ] CI/CD pipeline operational
|
||||
- [ ] Monitoring and logging configured
|
||||
- [ ] Documentation complete
|
||||
|
||||
**Business Metrics**:
|
||||
- [ ] [Key business metrics from synthesis]
|
||||
```
|
||||
|
||||
### Phase 5: TODO_LIST.md Generation
|
||||
|
||||
235
.github/release-notes-v3.5.0.md
vendored
Normal file
235
.github/release-notes-v3.5.0.md
vendored
Normal file
@@ -0,0 +1,235 @@
|
||||
# 🎨 UI Design Workflow with Triple Vision Analysis & Interactive Preview
|
||||
|
||||
This release introduces a comprehensive UI design workflow system with triple vision analysis capabilities, interactive user checkpoints, zero agent overhead, and enhanced preview tools for real-time prototype comparison.
|
||||
|
||||
## 🌟 Major Features
|
||||
|
||||
### UI Design Workflow System
|
||||
- **`/workflow:design:auto`**: Semi-autonomous workflow orchestrator with interactive checkpoints
|
||||
- **`/workflow:design:style-extract`**: Triple vision analysis (Claude Code + Gemini + Codex)
|
||||
- **`/workflow:design:style-consolidate`**: Token validation and style guide generation
|
||||
- **`/workflow:design:ui-generate`**: Token-driven HTML/CSS prototype generation with preview tools
|
||||
- **`/workflow:design:design-update`**: Design system integration into brainstorming artifacts
|
||||
|
||||
### 👁️ Triple Vision Analysis
|
||||
- **Claude Code**: Quick initial visual analysis using native Read tool
|
||||
- **Gemini Vision**: Deep semantic understanding of design intent
|
||||
- **Codex Vision**: Structured pattern recognition with -i parameter
|
||||
- **Consensus Synthesis**: Weighted combination strategy for robust results
|
||||
|
||||
### ⏸️ Interactive Checkpoints
|
||||
- **Checkpoint 1**: User selects preferred style variants after extraction
|
||||
- **Checkpoint 2**: User confirms selected prototypes before design update
|
||||
- Pause-and-continue pattern for critical design decisions
|
||||
|
||||
### 🌐 Preview Enhancement System (NEW!)
|
||||
- **`index.html`**: Master preview navigation with grid layout
|
||||
- **`compare.html`**: Side-by-side comparison with responsive viewport toggles
|
||||
- **`PREVIEW.md`**: Comprehensive preview instructions and server setup guide
|
||||
- Synchronized scrolling for layout comparison
|
||||
- Dynamic page switching and real-time responsive testing
|
||||
|
||||
### 🎯 Zero Agent Overhead
|
||||
- Removed Task(conceptual-planning-agent) wrappers from design commands
|
||||
- Direct bash execution for gemini-wrapper and codex commands
|
||||
- Improved performance while preserving all functionality
|
||||
|
||||
## 🚀 Quick Start
|
||||
|
||||
### Complete Design Workflow
|
||||
```bash
|
||||
# Semi-autonomous workflow with user checkpoints
|
||||
/workflow:design:auto --session WFS-auth --images "design-refs/*.png" --pages "login,register" --batch-plan
|
||||
```
|
||||
|
||||
### Individual Commands
|
||||
```bash
|
||||
# Extract design styles (triple vision analysis)
|
||||
/workflow:design:style-extract --session WFS-auth --images "refs/*.png"
|
||||
|
||||
# Consolidate selected variants
|
||||
/workflow:design:style-consolidate --session WFS-auth --variants "variant-1,variant-3"
|
||||
|
||||
# Generate prototypes with preview tools
|
||||
/workflow:design:ui-generate --session WFS-auth --pages "login,register" --variants 2
|
||||
|
||||
# Preview generated prototypes
|
||||
cd .workflow/WFS-auth/.design/prototypes
|
||||
python -m http.server 8080 # Visit http://localhost:8080
|
||||
|
||||
# Integrate design system
|
||||
/workflow:design:design-update --session WFS-auth --selected-prototypes "login-variant-1,register-variant-2"
|
||||
```
|
||||
|
||||
## 🎨 Design System Features
|
||||
- **OKLCH Color Format**: Perceptually uniform color space
|
||||
- **W3C Design Tokens**: Standard-compliant token format
|
||||
- **WCAG 2.1 AA Compliance**: Automated accessibility validation
|
||||
- **Style Override Support**: Runtime token customization with --style-overrides
|
||||
- **Batch Task Generation**: Automatic task creation with --batch-plan
|
||||
|
||||
## 📊 Preview Tools
|
||||
|
||||
### Master Navigation (index.html)
|
||||
- Grid layout of all generated prototypes
|
||||
- Quick links to individual variants
|
||||
- Metadata display (session ID, timestamps, page info)
|
||||
- Direct access to implementation notes
|
||||
|
||||
### Side-by-Side Comparison (compare.html)
|
||||
- Iframe-based comparison for multiple variants
|
||||
- Responsive viewport toggles:
|
||||
- Desktop (100%)
|
||||
- Tablet (768px)
|
||||
- Mobile (375px)
|
||||
- Synchronized scrolling option
|
||||
- Dynamic page switching dropdown
|
||||
- Real-time variant comparison
|
||||
|
||||
### Preview Options
|
||||
```bash
|
||||
# Option 1: Direct browser (simplest)
|
||||
cd .workflow/WFS-{session}/.design/prototypes
|
||||
open index.html # or double-click
|
||||
|
||||
# Option 2: Local server (recommended)
|
||||
python -m http.server 8080 # Python
|
||||
npx http-server -p 8080 # Node.js
|
||||
php -S localhost:8080 # PHP
|
||||
# Visit: http://localhost:8080
|
||||
```
|
||||
|
||||
## 📦 What's Included
|
||||
|
||||
### New Commands (5)
|
||||
- `/workflow:design:auto`
|
||||
- `/workflow:design:style-extract`
|
||||
- `/workflow:design:style-consolidate`
|
||||
- `/workflow:design:ui-generate`
|
||||
- `/workflow:design:design-update`
|
||||
|
||||
### Generated Files
|
||||
```
|
||||
.workflow/WFS-{session}/.design/
|
||||
├── style-extraction/
|
||||
│ ├── claude_vision_analysis.json
|
||||
│ ├── gemini_vision_analysis.json
|
||||
│ ├── codex_vision_analysis.json
|
||||
│ ├── semantic_style_analysis.json
|
||||
│ ├── design-tokens.json
|
||||
│ └── style-cards.json
|
||||
├── style-consolidation/
|
||||
│ ├── design-tokens.json (validated)
|
||||
│ ├── style-guide.md
|
||||
│ ├── tailwind.config.js
|
||||
│ └── validation-report.json
|
||||
└── prototypes/
|
||||
├── index.html (NEW - preview navigation)
|
||||
├── compare.html (NEW - side-by-side comparison)
|
||||
├── PREVIEW.md (NEW - setup instructions)
|
||||
├── {page}-variant-{n}.html
|
||||
├── {page}-variant-{n}.css
|
||||
└── design-tokens.css
|
||||
```
|
||||
|
||||
## 🔄 Workflow Integration
|
||||
|
||||
Design phase fits seamlessly between brainstorming and planning:
|
||||
|
||||
```
|
||||
Brainstorming → UI Design → Planning → Execution
|
||||
↓ ↓ ↓ ↓
|
||||
synthesis- design-tokens tasks with token-driven
|
||||
specification + style design implementation
|
||||
guide context
|
||||
```
|
||||
|
||||
**Optional but recommended** for UI-heavy projects:
|
||||
- User-facing applications
|
||||
- Design system creation
|
||||
- Brand-critical interfaces
|
||||
- Accessibility compliance projects
|
||||
|
||||
## 💡 Benefits
|
||||
|
||||
### User Experience
|
||||
- 🎨 Visual validation before implementation
|
||||
- ⏸️ Interactive control at critical decision points
|
||||
- 👁️ Comprehensive analysis from three AI vision sources
|
||||
- 🌐 Real-time preview with comparison tools
|
||||
- 🎯 Zero waiting with direct bash execution
|
||||
|
||||
### Code Quality
|
||||
- 🔒 100% CSS values use custom properties
|
||||
- ♿ WCAG AA validated at design phase
|
||||
- 🎨 Single source of truth for visual design
|
||||
- 🧪 Production-ready prototypes (semantic HTML5, responsive, accessible)
|
||||
|
||||
### Development Workflow
|
||||
- 🔄 Seamless integration with existing workflow
|
||||
- 🚀 Backward compatible (design phase optional)
|
||||
- 📊 Better planning with design system context
|
||||
- 🎯 Focused implementation from validated prototypes
|
||||
|
||||
## 📚 Documentation
|
||||
|
||||
- **README.md**: Updated with UI Design Workflow section
|
||||
- **README_CN.md**: Chinese documentation for design workflow
|
||||
- **CHANGELOG.md**: Comprehensive release notes with examples
|
||||
- **Command Files**: Detailed implementation guides for all 5 commands
|
||||
|
||||
## 🔧 Technical Details
|
||||
|
||||
**Triple Vision Analysis Flow**:
|
||||
```
|
||||
Reference Images
|
||||
↓
|
||||
Claude Code (Read tool) → claude_vision_analysis.json
|
||||
Gemini Vision (wrapper) → gemini_vision_analysis.json
|
||||
Codex Vision (codex -i) → codex_vision_analysis.json
|
||||
↓
|
||||
Main Claude Synthesis → semantic_style_analysis.json
|
||||
↓
|
||||
Codex Token Generation → design-tokens.json, style-cards.json
|
||||
```
|
||||
|
||||
**Checkpoint Workflow Pattern**:
|
||||
```
|
||||
User: /workflow:design:auto --session WFS-xxx --images "refs/*.png" --pages "dashboard"
|
||||
↓
|
||||
Phase 1: style-extract (automatic)
|
||||
↓ [CHECKPOINT 1: User selects variants]
|
||||
User: /workflow:design:style-consolidate --session WFS-xxx --variants "variant-1"
|
||||
↓
|
||||
Phase 3: ui-generate (automatic)
|
||||
↓ [CHECKPOINT 2: User confirms prototypes]
|
||||
User: /workflow:design:design-update --session WFS-xxx --selected-prototypes "dashboard-variant-1"
|
||||
↓
|
||||
Phase 5: batch-plan (optional, if --batch-plan flag)
|
||||
```
|
||||
|
||||
## 🆙 Upgrade Instructions
|
||||
|
||||
```bash
|
||||
# Windows (PowerShell)
|
||||
Invoke-Expression (Invoke-WebRequest -Uri "https://raw.githubusercontent.com/catlog22/Claude-Code-Workflow/main/install-remote.ps1" -UseBasicParsing).Content
|
||||
|
||||
# Linux/macOS (Bash/Zsh)
|
||||
bash <(curl -fsSL https://raw.githubusercontent.com/catlog22/Claude-Code-Workflow/main/install-remote.sh)
|
||||
```
|
||||
|
||||
## 🐛 Bug Fixes & Improvements
|
||||
- Optimized agent architecture by removing unnecessary wrappers
|
||||
- Improved execution performance with direct bash commands
|
||||
- Enhanced documentation consistency across English and Chinese versions
|
||||
- Updated phase numbering to accommodate new design phase
|
||||
|
||||
## 📝 Full Changelog
|
||||
See [CHANGELOG.md](https://github.com/catlog22/Claude-Code-Workflow/blob/main/CHANGELOG.md) for complete details.
|
||||
|
||||
---
|
||||
|
||||
**Questions or Issues?**
|
||||
- 📖 [Documentation](https://github.com/catlog22/Claude-Code-Workflow)
|
||||
- 🐛 [Report Issues](https://github.com/catlog22/Claude-Code-Workflow/issues)
|
||||
- 💬 [Discussions](https://github.com/catlog22/Claude-Code-Workflow/discussions)
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -19,4 +19,5 @@ Thumbs.db
|
||||
.env
|
||||
settings.local.json
|
||||
.workflow
|
||||
version.json
|
||||
version.json
|
||||
ref
|
||||
301
CHANGELOG.md
301
CHANGELOG.md
@@ -5,11 +5,202 @@ All notable changes to Claude Code Workflow (CCW) will be documented in this fil
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [4.0.1] - 2025-10-07
|
||||
|
||||
### 🎯 Intelligent Page Inference
|
||||
|
||||
**IMPROVEMENT**: `--pages` parameter is now **optional** with smart inference from prompt or session context.
|
||||
|
||||
**Changes**:
|
||||
- `--pages` parameter: Now optional, intelligently inferred from:
|
||||
1. Explicit `--pages` if provided
|
||||
2. `--prompt` text analysis (e.g., "blog with home, article pages" → ["home", "article"])
|
||||
3. `--session` synthesis-specification.md extraction
|
||||
4. Default: ["home"]
|
||||
|
||||
**New Examples**:
|
||||
```bash
|
||||
# Simplest - pages inferred from prompt
|
||||
/workflow:design:auto --prompt "Modern blog with home, article and author pages"
|
||||
|
||||
# Explicit override if needed
|
||||
/workflow:design:auto --prompt "SaaS app" --pages "dashboard,settings,billing"
|
||||
```
|
||||
|
||||
**Commands Updated**:
|
||||
- `/workflow:design:auto`: All parameters now optional
|
||||
- `/workflow:design:ui-generate`: `--pages` optional with smart inference
|
||||
|
||||
## [4.0.0] - 2025-10-07
|
||||
|
||||
### 🚀 UI Design Workflow V2 - Agent Mode & Flexible Inputs
|
||||
|
||||
**BREAKING CHANGES**: Complete redesign of UI design workflow with mandatory new parameter structure. All old command formats are deprecated.
|
||||
|
||||
This major release introduces agent-driven creative exploration, unified variant control, dual-mode support (standalone/integrated), and flexible input sources (images + text prompts).
|
||||
|
||||
#### Breaking Changes
|
||||
|
||||
**Required Migration**:
|
||||
- **Old format no longer supported**: Commands using old parameter structure will fail
|
||||
- **All parameters now optional**: Smart defaults and inference for all parameters
|
||||
- **`--session`**: Optional, omitting enables standalone mode
|
||||
- **`--images`**: Optional with default `design-refs/*`
|
||||
- **`--pages`**: Optional, inferred from prompt or session (as of v4.0.1)
|
||||
- **Removed `--style-overrides`**: Use `--prompt` instead
|
||||
|
||||
**Migration Guide**:
|
||||
```bash
|
||||
# ❌ Old (v3.5.0 and earlier) - NO LONGER WORKS
|
||||
/workflow:design:style-extract --session WFS-auth --images "design-refs/*.png"
|
||||
/workflow:design:ui-generate --session WFS-auth --pages "login,register"
|
||||
|
||||
# ✅ New (v4.0.1) - All parameters optional
|
||||
/workflow:design:style-extract --images "design-refs/*.png" --variants 3
|
||||
/workflow:design:ui-generate --variants 2
|
||||
|
||||
# ✅ Simplest form (pages inferred from prompt)
|
||||
/workflow:design:auto --prompt "Modern blog with home, article and author pages"
|
||||
|
||||
# ✅ With agent mode and explicit pages
|
||||
/workflow:design:auto --prompt "Modern SaaS" --pages "dashboard,settings" --variants 3 --use-agent
|
||||
```
|
||||
|
||||
**Deprecated Commands**:
|
||||
- Old `style-extract` format without `--variants`
|
||||
- Old `ui-generate` format without `--use-agent` support
|
||||
- `--style-overrides` parameter (replaced by `--prompt`)
|
||||
|
||||
#### Added
|
||||
|
||||
**Unified Variant Control**:
|
||||
- **`--variants <count>`**: Single parameter controls both style cards AND UI prototypes generation
|
||||
- Default: 3 | Range: 1-5
|
||||
- Data flow: `auto.md` → `style-extract` → `ui-generate`
|
||||
- Example: `--variants 3` generates 3 style cards and 3 UI variants per page
|
||||
|
||||
**Agent Creative Exploration Mode** (`--use-agent`):
|
||||
- **style-extract**: Parallel generation of distinctly different design directions
|
||||
- Conventional mode: Subtle variations within same core style
|
||||
- Agent mode: Dramatically different aesthetics (e.g., "Modern Minimalist" vs "Brutalist Tech" vs "Organic Warmth")
|
||||
- Uses `conceptual-planning-agent` for creative exploration
|
||||
- **ui-generate**: Diverse layout strategies exploration
|
||||
- Conventional mode: Minor layout differences
|
||||
- Agent mode: Structural variations (F-Pattern, Asymmetric Grid, Card-Based Modular)
|
||||
- Parallel execution for efficiency
|
||||
|
||||
**Dual Mode Support**:
|
||||
- **Integrated Mode** (with `--session`): Works within existing workflow session
|
||||
- Location: `.workflow/WFS-{session}/`
|
||||
- Reads from `.brainstorming/` artifacts
|
||||
- Phase 4 (design-update) updates synthesis-specification.md
|
||||
- **Standalone Mode** (without `--session`): Independent quick prototyping
|
||||
- Auto-creates: `design-session-YYYYMMDD-HHMMSS/`
|
||||
- No dependency on brainstorming phase
|
||||
- Phase 4 (design-update) is skipped
|
||||
- Outputs final summary instead
|
||||
|
||||
**Dual Input Source Support**:
|
||||
- **`--images`**: Reference image paths (optional, default: `design-refs/*`)
|
||||
- **`--prompt`**: Text description of design style (NEW)
|
||||
- **Hybrid Mode**: Both combined - text guides image analysis
|
||||
- Input modes:
|
||||
- Pure image: Existing triple vision analysis
|
||||
- Pure text: Claude keywords → Gemini philosophy → Codex tokens
|
||||
- Hybrid: Text as context for visual analysis
|
||||
|
||||
#### Changed
|
||||
|
||||
**New Command Interface** (v4.0.1):
|
||||
- **`/workflow:design:auto`**:
|
||||
- All parameters optional with smart defaults
|
||||
- `--prompt <desc>`: Design description (infers pages automatically)
|
||||
- `--images <glob>`: Reference images (default: `design-refs/*`)
|
||||
- `--pages <list>`: Explicit page override (auto-inferred if omitted)
|
||||
- `--session <id>`, `--variants <count>`, `--use-agent`, `--batch-plan`
|
||||
- Examples:
|
||||
- Minimal: `/workflow:design:auto --prompt "Modern blog with home and article pages"`
|
||||
- Agent Mode: `/workflow:design:auto --prompt "SaaS dashboard and settings" --variants 3 --use-agent`
|
||||
- Hybrid: `/workflow:design:auto --images "refs/*.png" --prompt "E-commerce: home, product, cart"`
|
||||
|
||||
- **`/workflow:design:style-extract`**:
|
||||
- At least one of `--images` or `--prompt` recommended
|
||||
- All other parameters optional
|
||||
- Agent mode: Parallel generation of diverse design directions
|
||||
|
||||
- **`/workflow:design:ui-generate`**:
|
||||
- All parameters optional (pages inferred from session or defaults to ["home"])
|
||||
- `--pages <list>`: Optional explicit page list
|
||||
- Agent mode: Parallel layout exploration (F-Pattern, Grid, Asymmetric)
|
||||
|
||||
#### Usage Examples
|
||||
|
||||
**Standalone Quick Prototyping**:
|
||||
```bash
|
||||
# Pure text with page inference (simplest)
|
||||
/workflow:design:auto --prompt "Modern minimalist blog with home, article and author pages, dark theme" --use-agent
|
||||
|
||||
# Pure image with inferred pages
|
||||
/workflow:design:auto --images "refs/*.png" --variants 2
|
||||
|
||||
# Hybrid input with explicit page override
|
||||
/workflow:design:auto --images "current-app.png" --prompt "Modernize to Linear.app style" --pages "tasks,settings" --use-agent
|
||||
```
|
||||
|
||||
**Integrated Workflow Enhancement**:
|
||||
```bash
|
||||
# Within existing workflow (pages inferred from synthesis)
|
||||
/workflow:design:auto --session WFS-app-refresh --images "refs/*.png" --variants 3 --use-agent
|
||||
```
|
||||
|
||||
#### Technical Details
|
||||
|
||||
**Agent Mode Architecture**:
|
||||
- Uses `conceptual-planning-agent` for both style-extract and ui-generate phases
|
||||
- Parallel task execution: N variants × M pages run concurrently
|
||||
- Theme diversity strategies:
|
||||
- style-extract: Creative theme generation (Minimalist, Brutalist, Organic)
|
||||
- ui-generate: Layout strategy assignment (F-Pattern, Grid, Asymmetric)
|
||||
- Quality assurance: All variants maintain strict token adherence and WCAG AA compliance
|
||||
|
||||
**Mode Detection Logic**:
|
||||
```bash
|
||||
# Session mode
|
||||
IF --session provided: mode = "integrated"
|
||||
ELSE: mode = "standalone", auto-create design-session-YYYYMMDD-HHMMSS/
|
||||
|
||||
# Execution mode
|
||||
IF --use-agent: mode = "agent" (creative exploration)
|
||||
ELSE: mode = "conventional" (triple vision)
|
||||
|
||||
# Input mode
|
||||
IF --images AND --prompt: mode = "hybrid"
|
||||
ELSE IF --images: mode = "image"
|
||||
ELSE IF --prompt: mode = "text"
|
||||
```
|
||||
|
||||
#### Upgrade Benefits
|
||||
|
||||
**Simplified Workflow**:
|
||||
- Fewer required parameters (only `--pages` mandatory)
|
||||
- Smart defaults reduce boilerplate
|
||||
- Standalone mode for quick prototyping without workflow setup
|
||||
|
||||
**Enhanced Capabilities**:
|
||||
- Agent-driven creative exploration produces diverse designs
|
||||
- Parallel execution improves performance
|
||||
- Text prompts enable design without reference images
|
||||
|
||||
**Quality Improvements**:
|
||||
- All variants maintain strict token adherence
|
||||
- WCAG AA compliance validated automatically
|
||||
- Better separation of concerns (style vs layout)
|
||||
|
||||
## [3.5.0] - 2025-10-06
|
||||
|
||||
### 🎨 UI Design Workflow with Triple Vision Analysis
|
||||
### 🎨 UI Design Workflow with Triple Vision Analysis & Interactive Preview
|
||||
|
||||
This release introduces a comprehensive UI design workflow system with triple vision analysis capabilities, interactive user checkpoints, and zero agent overhead for improved performance.
|
||||
This release introduces a comprehensive UI design workflow system with triple vision analysis capabilities, interactive user checkpoints, zero agent overhead, and enhanced preview tools for real-time prototype comparison.
|
||||
|
||||
#### Added
|
||||
|
||||
@@ -34,29 +225,84 @@ This release introduces a comprehensive UI design workflow system with triple vi
|
||||
- Conflict resolution: Majority vote or synthesis-specification.md context
|
||||
|
||||
**Individual Design Commands**:
|
||||
- **`/workflow:design:style-extract`**: Extract design styles from reference images
|
||||
|
||||
**`/workflow:design:style-extract`** - Extract design styles from reference images
|
||||
- **Usage**: `/workflow:design:style-extract --session <session_id> --images "<glob_pattern>"`
|
||||
- **Examples**:
|
||||
```bash
|
||||
/workflow:design:style-extract --session WFS-auth --images "design-refs/*.png"
|
||||
/workflow:design:style-extract --session WFS-dashboard --images "refs/dashboard-*.jpg"
|
||||
```
|
||||
- **Features**:
|
||||
- Triple vision analysis (Claude Code + Gemini + Codex)
|
||||
- Generates `semantic_style_analysis.json`, `design-tokens.json`, `style-cards.json`
|
||||
- Outputs multiple style variant cards for user selection
|
||||
- Direct bash execution (no agent wrappers)
|
||||
- Supports PNG, JPG, WebP image formats
|
||||
- **Output**: `.design/style-extraction/` with analysis files and 2-3 style variant cards
|
||||
|
||||
- **`/workflow:design:style-consolidate`**: Consolidate selected style variants
|
||||
- Validates and merges design tokens
|
||||
**`/workflow:design:style-consolidate`** - Consolidate selected style variants
|
||||
- **Usage**: `/workflow:design:style-consolidate --session <session_id> --variants "<variant_ids>"`
|
||||
- **Examples**:
|
||||
```bash
|
||||
/workflow:design:style-consolidate --session WFS-auth --variants "variant-1,variant-3"
|
||||
/workflow:design:style-consolidate --session WFS-dashboard --variants "variant-2"
|
||||
```
|
||||
- **Features**:
|
||||
- Validates and merges design tokens from selected variants
|
||||
- Generates finalized `design-tokens.json`, `style-guide.md`, `tailwind.config.js`
|
||||
- WCAG AA compliance validation
|
||||
- WCAG AA compliance validation (contrast ≥4.5:1 for text)
|
||||
- Token coverage ≥90% requirement
|
||||
- OKLCH color format with fallback
|
||||
- **Output**: `.design/style-consolidation/` with validated design system files
|
||||
|
||||
- **`/workflow:design:ui-generate`**: Generate production-ready UI prototypes
|
||||
**`/workflow:design:ui-generate`** - Generate production-ready UI prototypes *(NEW: with preview enhancement)*
|
||||
- **Usage**: `/workflow:design:ui-generate --session <session_id> --pages "<page_list>" [--variants <count>] [--style-overrides "<path_or_json>"]`
|
||||
- **Examples**:
|
||||
```bash
|
||||
/workflow:design:ui-generate --session WFS-auth --pages "login,register"
|
||||
/workflow:design:ui-generate --session WFS-dashboard --pages "dashboard" --variants 3
|
||||
/workflow:design:ui-generate --session WFS-auth --pages "login" --style-overrides "overrides.json"
|
||||
```
|
||||
- **Features**:
|
||||
- Token-driven HTML/CSS generation with Codex
|
||||
- Support for `--style-overrides` parameter for runtime customization
|
||||
- Generates `{page}-variant-{n}.html`, `{page}-variant-{n}.css` per page
|
||||
- **🆕 Auto-generates preview files**: `index.html`, `compare.html`, `PREVIEW.md`
|
||||
- Semantic HTML5 with ARIA attributes
|
||||
- Responsive design with token-based breakpoints
|
||||
- Complete standalone prototypes (no external dependencies)
|
||||
- **Output**: `.design/prototypes/` with HTML/CSS files and preview tools
|
||||
- **Preview**: Open `index.html` in browser or start local server for interactive preview
|
||||
|
||||
- **`/workflow:design:design-update`**: Integrate design system into brainstorming
|
||||
**`/workflow:design:design-update`** - Integrate design system into brainstorming
|
||||
- **Usage**: `/workflow:design:design-update --session <session_id> [--selected-prototypes "<prototype_ids>"]`
|
||||
- **Examples**:
|
||||
```bash
|
||||
/workflow:design:design-update --session WFS-auth
|
||||
/workflow:design:design-update --session WFS-auth --selected-prototypes "login-variant-1,register-variant-2"
|
||||
```
|
||||
- **Features**:
|
||||
- Updates `synthesis-specification.md` with UI/UX guidelines section
|
||||
- Creates/updates `ui-designer/style-guide.md`
|
||||
- Makes design tokens available for task generation phase
|
||||
- Merges selected prototype recommendations into brainstorming artifacts
|
||||
- **Output**: Updated brainstorming files with design system integration
|
||||
|
||||
**`/workflow:design:auto`** - Semi-autonomous orchestrator with interactive checkpoints
|
||||
- **Usage**: `/workflow:design:auto --session <session_id> --images "<glob>" --pages "<list>" [--variants <count>] [--batch-plan]`
|
||||
- **Examples**:
|
||||
```bash
|
||||
/workflow:design:auto --session WFS-auth --images "design-refs/*.png" --pages "login,register"
|
||||
/workflow:design:auto --session WFS-dashboard --images "refs/*.jpg" --pages "dashboard" --variants 3 --batch-plan
|
||||
```
|
||||
- **Features**:
|
||||
- Orchestrates entire design workflow with pause-and-continue checkpoints
|
||||
- Checkpoint 1: User selects style variants after extraction
|
||||
- Checkpoint 2: User confirms prototypes before design-update
|
||||
- Optional `--batch-plan` for automatic task generation after design-update
|
||||
- Progress tracking with TodoWrite integration
|
||||
- **Workflow**: style-extract → [USER SELECTS] → style-consolidate → ui-generate → [USER CONFIRMS] → design-update → [optional batch-plan]
|
||||
|
||||
**Interactive Checkpoint System**:
|
||||
- **Checkpoint 1 (After style-extract)**: User selects preferred style variants
|
||||
@@ -74,6 +320,45 @@ This release introduces a comprehensive UI design workflow system with triple vi
|
||||
- **Batch Task Generation**: Automatic `/workflow:plan` invocation for each page
|
||||
- **Accessibility Validation**: WCAG 2.1 AA compliance checks
|
||||
|
||||
**Preview Enhancement System** *(NEW)*:
|
||||
- **`index.html`**: Master preview navigation page
|
||||
- Grid layout of all generated prototypes
|
||||
- Quick links to individual variants
|
||||
- Metadata display (session ID, timestamps, page info)
|
||||
- Direct access to implementation notes
|
||||
|
||||
- **`compare.html`**: Interactive side-by-side comparison
|
||||
- Iframe-based comparison for multiple variants
|
||||
- Responsive viewport toggles (Desktop 100%, Tablet 768px, Mobile 375px)
|
||||
- Synchronized scrolling option
|
||||
- Dynamic page switching dropdown
|
||||
- Real-time variant comparison
|
||||
|
||||
- **`PREVIEW.md`**: Comprehensive preview instructions
|
||||
- Direct browser opening guide
|
||||
- Local server setup (Python, Node.js, PHP, VS Code Live Server)
|
||||
- Browser compatibility notes
|
||||
- Troubleshooting guide
|
||||
- File structure overview
|
||||
|
||||
**Preview Workflow**:
|
||||
```bash
|
||||
# After ui-generate completes:
|
||||
cd .workflow/WFS-{session}/.design/prototypes
|
||||
|
||||
# Option 1: Direct browser (simplest)
|
||||
open index.html # or double-click
|
||||
|
||||
# Option 2: Local server (recommended)
|
||||
python -m http.server 8080 # Visit http://localhost:8080
|
||||
|
||||
# Features:
|
||||
- index.html: Browse all prototypes
|
||||
- compare.html: Side-by-side comparison with viewport controls
|
||||
- Responsive preview: Test mobile, tablet, desktop views
|
||||
- Synchronized scrolling: Compare layouts in sync
|
||||
```
|
||||
|
||||
#### Changed
|
||||
|
||||
**Agent Architecture Simplification**:
|
||||
|
||||
88
README.md
88
README.md
@@ -260,6 +260,13 @@ MCP (Model Context Protocol) tools provide advanced codebase analysis. **Recomme
|
||||
/workflow:design:style-extract --session WFS-auth --images "refs/*.png"
|
||||
/workflow:design:style-consolidate --session WFS-auth --variants "variant-1,variant-3"
|
||||
/workflow:design:ui-generate --session WFS-auth --pages "login,register" --variants 2
|
||||
|
||||
# Preview generated prototypes (NEW!)
|
||||
# Option 1: Open .workflow/WFS-auth/.design/prototypes/index.html in browser
|
||||
# Option 2: Start local server
|
||||
cd .workflow/WFS-auth/.design/prototypes && python -m http.server 8080
|
||||
# Visit http://localhost:8080 for interactive preview with comparison tools
|
||||
|
||||
/workflow:design:design-update --session WFS-auth --selected-prototypes "login-variant-1,register-variant-2"
|
||||
```
|
||||
|
||||
@@ -370,6 +377,87 @@ MCP (Model Context Protocol) tools provide advanced codebase analysis. **Recomme
|
||||
| `/workflow:tools:test-concept-enhanced` | Generate test strategy and requirements analysis using Gemini. |
|
||||
| `/workflow:tools:test-task-generate` | Generate test task JSON with test-fix-cycle specification. |
|
||||
|
||||
### **UI Design Workflow Commands (`/workflow:design:*`)** *(v3.5.0+)*
|
||||
|
||||
The design workflow system provides complete UI design refinement from style extraction to prototype generation with interactive preview tools.
|
||||
|
||||
#### Core Commands
|
||||
|
||||
**`/workflow:design:auto`** - Complete workflow orchestrator
|
||||
```bash
|
||||
# Semi-autonomous workflow with user checkpoints
|
||||
/workflow:design:auto --session WFS-auth --images "refs/*.png" --pages "login,register"
|
||||
/workflow:design:auto --session WFS-dash --images "refs/*.jpg" --pages "dashboard" --variants 3 --batch-plan
|
||||
```
|
||||
- **Checkpoints**: User selects style variants (Phase 1) and confirms prototypes (Phase 3)
|
||||
- **Optional**: `--batch-plan` for automatic task generation
|
||||
|
||||
**`/workflow:design:style-extract`** - Triple vision style analysis
|
||||
```bash
|
||||
# Extract design from reference images
|
||||
/workflow:design:style-extract --session WFS-auth --images "design-refs/*.png"
|
||||
```
|
||||
- **Vision Sources**: Claude Code + Gemini + Codex
|
||||
- **Output**: Style variant cards for user selection
|
||||
|
||||
**`/workflow:design:style-consolidate`** - Validate and merge tokens
|
||||
```bash
|
||||
# Consolidate selected style variants
|
||||
/workflow:design:style-consolidate --session WFS-auth --variants "variant-1,variant-3"
|
||||
```
|
||||
- **Features**: WCAG AA validation, OKLCH colors, W3C token format
|
||||
- **Output**: `design-tokens.json`, `style-guide.md`, `tailwind.config.js`
|
||||
|
||||
**`/workflow:design:ui-generate`** - Generate HTML/CSS prototypes
|
||||
```bash
|
||||
# Generate prototypes with preview tools
|
||||
/workflow:design:ui-generate --session WFS-auth --pages "login,register" --variants 2
|
||||
/workflow:design:ui-generate --session WFS-auth --pages "dashboard" --style-overrides "custom.json"
|
||||
```
|
||||
- **🆕 Preview Files**: `index.html` (navigation), `compare.html` (side-by-side), `PREVIEW.md` (instructions)
|
||||
- **Features**: Token-driven CSS, semantic HTML5, ARIA attributes, responsive design
|
||||
|
||||
**`/workflow:design:design-update`** - Integrate design system
|
||||
```bash
|
||||
# Update brainstorming artifacts with design system
|
||||
/workflow:design:design-update --session WFS-auth --selected-prototypes "login-variant-1,register-variant-2"
|
||||
```
|
||||
- **Updates**: `synthesis-specification.md`, `ui-designer/style-guide.md`
|
||||
- **Makes design tokens available for task generation**
|
||||
|
||||
#### Preview System
|
||||
|
||||
After running `ui-generate`, you get interactive preview tools:
|
||||
|
||||
**Quick Preview** (Direct Browser):
|
||||
```bash
|
||||
# Navigate to prototypes directory
|
||||
cd .workflow/WFS-auth/.design/prototypes
|
||||
# Open index.html in browser (double-click or):
|
||||
open index.html # macOS
|
||||
start index.html # Windows
|
||||
xdg-open index.html # Linux
|
||||
```
|
||||
|
||||
**Full Preview** (Local Server - Recommended):
|
||||
```bash
|
||||
cd .workflow/WFS-auth/.design/prototypes
|
||||
# Choose one:
|
||||
python -m http.server 8080 # Python
|
||||
npx http-server -p 8080 # Node.js
|
||||
php -S localhost:8080 # PHP
|
||||
# Visit: http://localhost:8080
|
||||
```
|
||||
|
||||
**Preview Features**:
|
||||
- `index.html`: Master navigation with all prototypes
|
||||
- `compare.html`: Side-by-side comparison with viewport controls (Desktop/Tablet/Mobile)
|
||||
- Synchronized scrolling for layout comparison
|
||||
- Dynamic page switching
|
||||
- Real-time responsive testing
|
||||
|
||||
---
|
||||
|
||||
### **Task & Memory Commands**
|
||||
|
||||
| Command | Description |
|
||||
|
||||
88
README_CN.md
88
README_CN.md
@@ -260,6 +260,13 @@ MCP (模型上下文协议) 工具提供高级代码库分析。**推荐安装**
|
||||
/workflow:design:style-extract --session WFS-auth --images "refs/*.png"
|
||||
/workflow:design:style-consolidate --session WFS-auth --variants "variant-1,variant-3"
|
||||
/workflow:design:ui-generate --session WFS-auth --pages "login,register" --variants 2
|
||||
|
||||
# 预览生成的原型(新功能!)
|
||||
# 选项1:在浏览器中打开 .workflow/WFS-auth/.design/prototypes/index.html
|
||||
# 选项2:启动本地服务器
|
||||
cd .workflow/WFS-auth/.design/prototypes && python -m http.server 8080
|
||||
# 访问 http://localhost:8080 获取交互式预览和对比工具
|
||||
|
||||
/workflow:design:design-update --session WFS-auth --selected-prototypes "login-variant-1,register-variant-2"
|
||||
```
|
||||
|
||||
@@ -370,6 +377,87 @@ MCP (模型上下文协议) 工具提供高级代码库分析。**推荐安装**
|
||||
| `/workflow:tools:test-concept-enhanced` | 使用 Gemini 生成测试策略和需求分析。 |
|
||||
| `/workflow:tools:test-task-generate` | 生成测试任务 JSON,包含 test-fix-cycle 规范。 |
|
||||
|
||||
### **UI 设计工作流命令 (`/workflow:design:*`)** *(v3.5.0+)*
|
||||
|
||||
设计工作流系统提供从风格提取到原型生成的完整 UI 设计精炼,配备交互式预览工具。
|
||||
|
||||
#### 核心命令
|
||||
|
||||
**`/workflow:design:auto`** - 完整工作流编排器
|
||||
```bash
|
||||
# 带用户检查点的半自主工作流
|
||||
/workflow:design:auto --session WFS-auth --images "refs/*.png" --pages "login,register"
|
||||
/workflow:design:auto --session WFS-dash --images "refs/*.jpg" --pages "dashboard" --variants 3 --batch-plan
|
||||
```
|
||||
- **检查点**: 用户选择风格变体(阶段1)和确认原型(阶段3)
|
||||
- **可选**: `--batch-plan` 用于自动任务生成
|
||||
|
||||
**`/workflow:design:style-extract`** - 三重视觉风格分析
|
||||
```bash
|
||||
# 从参考图像提取设计
|
||||
/workflow:design:style-extract --session WFS-auth --images "design-refs/*.png"
|
||||
```
|
||||
- **视觉来源**: Claude Code + Gemini + Codex
|
||||
- **输出**: 用于用户选择的风格变体卡片
|
||||
|
||||
**`/workflow:design:style-consolidate`** - 验证和合并令牌
|
||||
```bash
|
||||
# 整合选定的风格变体
|
||||
/workflow:design:style-consolidate --session WFS-auth --variants "variant-1,variant-3"
|
||||
```
|
||||
- **功能**: WCAG AA 验证、OKLCH 颜色、W3C 令牌格式
|
||||
- **输出**: `design-tokens.json`、`style-guide.md`、`tailwind.config.js`
|
||||
|
||||
**`/workflow:design:ui-generate`** - 生成 HTML/CSS 原型
|
||||
```bash
|
||||
# 生成带预览工具的原型
|
||||
/workflow:design:ui-generate --session WFS-auth --pages "login,register" --variants 2
|
||||
/workflow:design:ui-generate --session WFS-auth --pages "dashboard" --style-overrides "custom.json"
|
||||
```
|
||||
- **🆕 预览文件**: `index.html`(导航)、`compare.html`(并排对比)、`PREVIEW.md`(说明)
|
||||
- **功能**: 令牌驱动的 CSS、语义化 HTML5、ARIA 属性、响应式设计
|
||||
|
||||
**`/workflow:design:design-update`** - 集成设计系统
|
||||
```bash
|
||||
# 使用设计系统更新头脑风暴产物
|
||||
/workflow:design:design-update --session WFS-auth --selected-prototypes "login-variant-1,register-variant-2"
|
||||
```
|
||||
- **更新**: `synthesis-specification.md`、`ui-designer/style-guide.md`
|
||||
- **使设计令牌可用于任务生成**
|
||||
|
||||
#### 预览系统
|
||||
|
||||
运行 `ui-generate` 后,您将获得交互式预览工具:
|
||||
|
||||
**快速预览**(直接浏览器):
|
||||
```bash
|
||||
# 导航到原型目录
|
||||
cd .workflow/WFS-auth/.design/prototypes
|
||||
# 在浏览器中打开 index.html(双击或执行):
|
||||
open index.html # macOS
|
||||
start index.html # Windows
|
||||
xdg-open index.html # Linux
|
||||
```
|
||||
|
||||
**完整预览**(本地服务器 - 推荐):
|
||||
```bash
|
||||
cd .workflow/WFS-auth/.design/prototypes
|
||||
# 选择一个:
|
||||
python -m http.server 8080 # Python
|
||||
npx http-server -p 8080 # Node.js
|
||||
php -S localhost:8080 # PHP
|
||||
# 访问: http://localhost:8080
|
||||
```
|
||||
|
||||
**预览功能**:
|
||||
- `index.html`: 包含所有原型的主导航
|
||||
- `compare.html`: 带视口控制的并排对比(桌面/平板/移动)
|
||||
- 同步滚动用于布局对比
|
||||
- 动态页面切换
|
||||
- 实时响应式测试
|
||||
|
||||
---
|
||||
|
||||
### **任务与内存命令**
|
||||
|
||||
| 命令 | 描述 |
|
||||
|
||||
Reference in New Issue
Block a user