feat: 增强 command-guide skill,新增 UI 设计工作流指南和自动同步功能

## 主要更新

### 1. 新增 UI 设计工作流完整指南
- 新增 `ui-design-workflow-guide.md` (12KB)
- 使用 Gemini 分析 11 个 UI 设计命令文件
- 提供 4 种工作流模式详细指导:
  - 探索式设计(新概念)
  - 设计复制(模仿现有网站)
  - 代码优先导入
  - 批量生成(高容量)
- 包含架构最佳实践、性能优化和故障排查

### 2. 更新工作流模式指南
- 在 `workflow-patterns.md` 中新增 Pattern 7: UI设计工作流
- 提供三种子模式的中文示例
- 添加 UI 设计指南的交叉引用

### 3. 增强索引构建脚本
- 更新 `analyze_commands.py` 支持自动同步 reference 目录
- 新增 `sync_reference_directory()` 函数:
  - 自动删除旧的 reference 文件
  - 从 `.claude/agents` 和 `.claude/commands` 复制最新文件
  - 确保索引构建前 reference 目录为最新
- 增强统计输出,显示 reference 目录同步状态

### 4. 更新索引文件
- 重建所有索引文件(all-commands.json, by-category.json 等)
- 优化命令元数据和分类
- 同步最新的 UI 设计命令(包括新增的 import-from-code.md)

## 技术细节

**命令分类体系**:
- Orchestrators: explore-auto, imitate-auto, batch-generate
- Core Extractors: style-extract, layout-extract, animation-extract
- Input & Capture: capture, explore-layers, import-from-code
- Assemblers: generate, update

**架构原则**:
- 关注点分离:Style、Structure、Motion 独立
- Token-First CSS:使用 CSS 变量而非硬编码
- 并行执行:支持最多 6 个并发任务

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
catlog22
2025-11-06 21:37:19 +08:00
parent 581b46b494
commit 1e67f5780d
11 changed files with 3003 additions and 1757 deletions

View File

@@ -0,0 +1,326 @@
# UI Design Workflow Guide
## Overview
The UI Design Workflow System is a comprehensive suite of 11 autonomous commands designed to transform intent (prompts), references (images/URLs), or existing code into functional, production-ready UI prototypes. It employs a **Separation of Concerns** architecture, treating Style (visual tokens), Structure (layout templates), and Motion (animation tokens) as independent, mix-and-match components.
## Command Taxonomy
### 1. Orchestrators (High-Level Workflows)
These commands automate end-to-end processes by chaining specialized sub-commands.
- **`/workflow:ui-design:explore-auto`**: For creating *new* designs. Generates multiple style and layout variants from a prompt to explore design directions.
- **`/workflow:ui-design:imitate-auto`**: For *replicating* existing designs. High-fidelity cloning of target URLs into a reusable design system.
- **`/workflow:ui-design:batch-generate`**: For rapid, high-volume prototype generation based on established design tokens.
### 2. Core Extractors (Specialized Analysis)
Agents dedicated to analyzing specific aspects of design.
- **`/workflow:ui-design:style-extract`**: Extracts visual tokens (colors, typography, spacing, shadows) into `design-tokens.json`.
- **`/workflow:ui-design:layout-extract`**: Extracts DOM structure and CSS layout rules into `layout-templates.json`.
- **`/workflow:ui-design:animation-extract`**: Extracts motion patterns into `animation-tokens.json`.
### 3. Input & Capture Utilities
Tools for gathering raw data for analysis.
- **`/workflow:ui-design:capture`**: High-speed batch screenshot capture for multiple URLs.
- **`/workflow:ui-design:explore-layers`**: Interactive, depth-controlled capture (e.g., capturing modals, dropdowns, shadow DOM).
- **`/workflow:ui-design:import-from-code`**: Bootstraps a design system by analyzing existing CSS/JS/HTML files.
### 4. Assemblers & Integrators
Tools for combining components and integrating results.
- **`/workflow:ui-design:generate`**: Pure assembler that combines Layout Templates + Design Tokens into HTML/CSS prototypes.
- **`/workflow:ui-design:update`**: Synchronizes generated design artifacts with the main project session for implementation planning.
---
## Common Workflow Patterns
### Workflow A: Exploratory Design (New Concepts)
**Goal:** Create multiple design options for a new project from a text description.
**Primary Command:** `explore-auto`
**Steps:**
1. **Initiate**: User runs `/workflow:ui-design:explore-auto --prompt "Modern fintech dashboard" --style-variants 3`
2. **Style Extraction**: System generates 3 distinct visual design systems based on the prompt.
3. **Layout Extraction**: System researches and generates responsive layout templates for a dashboard.
4. **Assembly**: System generates a matrix of prototypes (3 styles × 1 layout = 3 prototypes).
5. **Review**: User views `compare.html` to select the best direction.
**Example:**
```bash
/workflow:ui-design:explore-auto \
--prompt "Modern SaaS landing page with hero, features, pricing sections" \
--style-variants 3 \
--layout-variants 2 \
--session WFS-001
```
**Output:**
- `design-tokens-v1.json`, `design-tokens-v2.json`, `design-tokens-v3.json` (3 style variants)
- `layout-templates-v1.json`, `layout-templates-v2.json` (2 layout variants)
- 6 HTML prototypes (3 × 2 combinations)
- `compare.html` for side-by-side comparison
---
### Workflow B: Design Replication (Imitation)
**Goal:** Create a design system and prototypes based on existing reference sites.
**Primary Command:** `imitate-auto`
**Steps:**
1. **Initiate**: User runs `/workflow:ui-design:imitate-auto --url-map "home:https://example.com, pricing:https://example.com/pricing"`
2. **Capture**: System screenshots all provided URLs.
3. **Extraction**: System extracts a unified design system (style, layout, animation) from the primary URL.
4. **Assembly**: System recreates all target pages using the extracted system.
**Example:**
```bash
/workflow:ui-design:imitate-auto \
--url-map "landing:https://stripe.com, pricing:https://stripe.com/pricing, docs:https://stripe.com/docs" \
--capture-mode batch \
--session WFS-002
```
**Output:**
- Screenshots of all URLs
- `design-tokens.json` (unified style system)
- `layout-templates.json` (page structures)
- 3 HTML prototypes matching the captured pages
---
### Workflow C: Code-First Bootstrap
**Goal:** Create a design system from an existing codebase.
**Primary Command:** `import-from-code`
**Steps:**
1. **Initiate**: User runs `/workflow:ui-design:import-from-code --base-path ./src`
2. **Analysis**: Parallel agents analyze CSS, JS, and HTML to find tokens, layouts, and animations.
3. **Reporting**: Generates completeness reports and initial token files.
4. **Supplement (Optional)**: Run `style-extract` or `layout-extract` to fill gaps identified in the reports.
**Example:**
```bash
/workflow:ui-design:import-from-code \
--base-path ./src/components \
--session WFS-003
```
**Output:**
- `design-tokens.json` (extracted from CSS variables, theme files)
- `layout-templates.json` (extracted from component structures)
- `completeness-report.md` (gaps and recommendations)
- `import-summary.json` (statistics and findings)
---
### Workflow D: Batch Generation (High Volume)
**Goal:** Generate multiple UI prototypes based on established design tokens.
**Primary Command:** `batch-generate`
**Steps:**
1. **Prerequisites**: Have `design-tokens.json` ready (from previous extraction or manual creation)
2. **Initiate**: User runs `/workflow:ui-design:batch-generate --targets "dashboard,settings,profile" --style-variants 2`
3. **Parallel Generation**: System generates all targets in parallel, applying style variants
4. **Review**: User reviews generated prototypes
**Example:**
```bash
/workflow:ui-design:batch-generate \
--targets "login-page,dashboard,settings,profile,notifications" \
--target-type page \
--style-variants 2 \
--device-type responsive \
--session WFS-004
```
**Output:**
- 10 HTML prototypes (5 targets × 2 styles)
- All using the same design system for consistency
---
## Architecture & Best Practices
### Separation of Concerns
**Always keep design tokens separate from layout templates:**
- `design-tokens.json` (Style) - Colors, typography, spacing, shadows
- `layout-templates.json` (Structure) - DOM hierarchy, CSS layout rules
- `animation-tokens.json` (Motion) - Transitions, keyframes, timing functions
**Benefits:**
- Instant re-theming by swapping design tokens
- Layout reuse across different visual styles
- Independent evolution of style and structure
### Token-First CSS
Generated CSS should primarily use CSS custom properties:
```css
/* Good - Token-based */
.button {
background: var(--color-primary);
padding: var(--spacing-md);
border-radius: var(--radius-md);
}
/* Avoid - Hardcoded */
.button {
background: #3b82f6;
padding: 16px;
border-radius: 8px;
}
```
### Style-Centric Batching
For high-volume generation:
- Group tasks by style to minimize context switching
- Use `batch-generate` with multiple targets
- Reuse existing layout inspirations
### Input Quality Guidelines
**For Prompts:**
- Specify the desired *vibe* (e.g., "minimalist, high-contrast")
- Specify the *targets* (e.g., "dashboard, settings page")
- Include functional requirements (e.g., "responsive, mobile-first")
**For URL Mapping:**
- First URL is treated as primary source of truth
- Use descriptive keys in `--url-map`
- Ensure URLs are accessible (no authentication walls)
---
## Advanced Usage
### Multi-Session Workflows
You can run UI design workflows within an existing workflow session:
```bash
# 1. Start a workflow session
/workflow:session:start --new
# 2. Run exploratory design
/workflow:ui-design:explore-auto --prompt "E-commerce checkout flow" --session <session-id>
# 3. Update main session with design artifacts
/workflow:ui-design:update --session <session-id> --selected-prototypes "v1,v2"
```
### Combining Workflows
**Example: Imitation + Custom Variants**
```bash
# 1. Replicate existing design
/workflow:ui-design:imitate-auto --url-map "ref:https://example.com"
# 2. Generate additional variants with batch-generate
/workflow:ui-design:batch-generate --targets "new-page-1,new-page-2" --style-variants 1
```
### Deep Interactive Capture
For complex UIs with overlays, modals, or dynamic content:
```bash
/workflow:ui-design:explore-layers \
--url https://complex-app.com \
--depth 3 \
--session WFS-005
```
---
## Troubleshooting
| Issue | Likely Cause | Resolution |
|-------|--------------|------------|
| **Missing Design Tokens** | `style-extract` failed or wasn't run | Run `/workflow:ui-design:style-extract` manually or check logs |
| **Inaccurate Layouts** | Complex DOM structure not captured | Use `--urls` in `layout-extract` for Chrome DevTools analysis |
| **Empty Screenshots** | Anti-bot measures or timeout | Use `explore-layers` interactive mode or increase timeout |
| **Generation Stalls** | Too many concurrent tasks | System defaults to max 6 parallel tasks; check resources |
| **Integration Failures** | Session ID mismatch or missing markers | Ensure `--session <id>` matches active workflow session |
| **Low Quality Tokens** | Insufficient reference material | Provide multiple reference images/URLs for better token extraction |
| **Inconsistent Styles** | Multiple token files without merge | Use single unified `design-tokens.json` or explicit variants |
---
## Command Reference Quick Links
### Orchestrators
- `/workflow:ui-design:explore-auto` - Create new designs from prompts
- `/workflow:ui-design:imitate-auto` - Replicate existing designs
- `/workflow:ui-design:batch-generate` - High-volume prototype generation
### Extractors
- `/workflow:ui-design:style-extract` - Extract visual design tokens
- `/workflow:ui-design:layout-extract` - Extract layout structures
- `/workflow:ui-design:animation-extract` - Extract motion patterns
### Utilities
- `/workflow:ui-design:capture` - Batch screenshot capture
- `/workflow:ui-design:explore-layers` - Interactive deep capture
- `/workflow:ui-design:import-from-code` - Bootstrap from existing code
- `/workflow:ui-design:generate` - Assemble prototypes from tokens
- `/workflow:ui-design:update` - Integrate with workflow sessions
---
## Performance Optimization
### Parallel Execution
The system is designed to run extraction phases in parallel:
- Animation and layout extraction can run concurrently
- Multiple target generation runs in parallel (default: max 6)
- Style variant generation is parallelized
### Reuse Intermediates
- `batch-generate` reuses existing layout inspirations
- Cached screenshots avoid redundant captures
- Token files can be versioned and reused
### Resource Management
- Each agent task consumes memory and CPU
- Monitor system resources with large batch operations
- Consider splitting large batches into smaller chunks
---
## Related Guides
- **Getting Started** - Basic workflow concepts
- **Workflow Patterns** - General workflow guidance
- **CLI Tools Guide** - CLI integration strategies
- **Troubleshooting** - Common issues and solutions

View File

@@ -461,10 +461,70 @@ graph TD
---
## 🎨 Pattern 7: UI设计工作流
**适用场景**前端UI设计和原型开发
**流程**:探索设计 / 模仿设计 / 代码导入 → 生成原型 → 集成
### 三种子模式
#### 7.1 探索式设计(新概念)
```bash
# 从提示词创建多个设计方案
/workflow:ui-design:explore-auto \
--prompt "现代化SaaS着陆页包含英雄区、特性、定价" \
--style-variants 3 \
--layout-variants 2
# 输出:
# - 3个风格变体 × 2个布局变体 = 6个原型
# - design-tokens-v1/v2/v3.json
# - layout-templates-v1/v2.json
# - compare.html对比页面
```
#### 7.2 模仿式设计(复制现有网站)
```bash
# 高保真克隆目标网站
/workflow:ui-design:imitate-auto \
--url-map "首页:https://example.com, 定价:https://example.com/pricing"
# 输出:
# - 统一的设计系统design-tokens.json
# - 页面结构layout-templates.json
# - 重建的HTML原型
```
#### 7.3 代码优先导入
```bash
# 从现有代码库提取设计系统
/workflow:ui-design:import-from-code \
--base-path ./src/components
# 输出:
# - 提取的设计令牌
# - 完整性报告
# - 改进建议
```
**关键概念**
- **关注点分离**样式design-tokens、结构layout-templates、动画animation-tokens独立
- **令牌优先**使用CSS变量而非硬编码
- **可重用性**:设计系统可跨项目复用
**详细指南**:参见 [UI Design Workflow Guide](ui-design-workflow-guide.md)
---
## 🔗 相关资源
- **快速入门**[Getting Started](getting-started.md) - 5分钟上手
- **CLI 工具**[CLI Tools Guide](cli-tools-guide.md) - Gemini/Qwen/Codex 详解
- **UI设计工作流**[UI Design Workflow Guide](ui-design-workflow-guide.md) - UI设计完整指南
- **问题排查**[Troubleshooting](troubleshooting.md) - 常见问题解决
- **完整命令列表**:查看 `index/all-commands.json`

View File

@@ -1,66 +1,73 @@
[
{
"name": "cli:analyze",
"name": "analyze",
"command": "/cli:analyze",
"description": "Read-only codebase analysis using Gemini (default), Qwen, or Codex with auto-pattern detection and template selection",
"arguments": "[--agent] [--tool codex|gemini|qwen] [--enhance] analysis target",
"category": "cli",
"subcategory": "core",
"usage_scenario": "documentation",
"difficulty": "Intermediate",
"subcategory": null,
"usage_scenario": "analysis",
"difficulty": "Beginner",
"file_path": "cli/analyze.md"
},
{
"name": "cli:chat",
"name": "chat",
"command": "/cli:chat",
"description": "Read-only Q&A interaction with Gemini/Qwen/Codex for codebase questions with automatic context inference",
"arguments": "[--agent] [--tool codex|gemini|qwen] [--enhance] inquiry",
"category": "cli",
"subcategory": "core",
"usage_scenario": "documentation",
"difficulty": "Intermediate",
"subcategory": null,
"usage_scenario": "general",
"difficulty": "Beginner",
"file_path": "cli/chat.md"
},
{
"name": "cli:cli-init",
"name": "cli-init",
"command": "/cli:cli-init",
"description": "Generate .gemini/ and .qwen/ config directories with settings.json and ignore files based on workspace technology detection",
"arguments": "[--tool gemini|qwen|all] [--output path] [--preview]",
"category": "cli",
"subcategory": "core",
"usage_scenario": "documentation",
"subcategory": null,
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "cli/cli-init.md"
},
{
"name": "cli:codex-execute",
"name": "codex-execute",
"command": "/cli:codex-execute",
"description": "Multi-stage Codex execution with automatic task decomposition into grouped subtasks using resume mechanism for context continuity",
"arguments": "[--verify-git] task description or task-id",
"category": "cli",
"subcategory": "core",
"usage_scenario": "session-management",
"subcategory": null,
"usage_scenario": "implementation",
"difficulty": "Intermediate",
"file_path": "cli/codex-execute.md"
},
{
"name": "cli:discuss-plan",
"name": "discuss-plan",
"command": "/cli:discuss-plan",
"description": "Multi-round collaborative planning using Gemini, Codex, and Claude synthesis with iterative discussion cycles (read-only, no code changes)",
"arguments": "[--topic '...'] [--task-id '...'] [--rounds N]",
"category": "cli",
"subcategory": "core",
"usage_scenario": "session-management",
"subcategory": null,
"usage_scenario": "planning",
"difficulty": "Intermediate",
"file_path": "cli/discuss-plan.md"
},
{
"name": "cli:execute",
"name": "execute",
"command": "/cli:execute",
"description": "Autonomous code implementation with YOLO auto-approval using Gemini/Qwen/Codex, supports task ID or description input with automatic file pattern detection",
"arguments": "[--agent] [--tool codex|gemini|qwen] [--enhance] description or task-id",
"category": "cli",
"subcategory": "core",
"usage_scenario": "session-management",
"subcategory": null,
"usage_scenario": "implementation",
"difficulty": "Intermediate",
"file_path": "cli/execute.md"
},
{
"name": "cli:mode:bug-diagnosis",
"name": "bug-diagnosis",
"command": "/cli:mode:bug-diagnosis",
"description": "Read-only bug root cause analysis using Gemini/Qwen/Codex with systematic diagnosis template for fix suggestions",
"arguments": "[--agent] [--tool codex|gemini|qwen] [--enhance] [--cd path] bug description",
"category": "cli",
@@ -70,17 +77,19 @@
"file_path": "cli/mode/bug-diagnosis.md"
},
{
"name": "cli:mode:code-analysis",
"name": "code-analysis",
"command": "/cli:mode:code-analysis",
"description": "Read-only execution path tracing using Gemini/Qwen/Codex with specialized analysis template for call flow and optimization",
"arguments": "[--agent] [--tool codex|gemini|qwen] [--enhance] [--cd path] analysis target",
"category": "cli",
"subcategory": "mode",
"usage_scenario": "implementation",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "cli/mode/code-analysis.md"
},
{
"name": "cli:mode:plan",
"name": "plan",
"command": "/cli:mode:plan",
"description": "Read-only architecture planning using Gemini/Qwen/Codex with strategic planning template for modification plans and impact analysis",
"arguments": "[--agent] [--tool codex|gemini|qwen] [--enhance] [--cd path] topic",
"category": "cli",
@@ -91,318 +100,350 @@
},
{
"name": "enhance-prompt",
"command": "/enhance-prompt",
"description": "Enhanced prompt transformation using session memory and codebase analysis with --enhance flag detection",
"arguments": "user input to enhance",
"category": "general",
"subcategory": "core",
"usage_scenario": "session-management",
"subcategory": null,
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "enhance-prompt.md"
},
{
"name": "memory:docs",
"name": "docs",
"command": "/memory:docs",
"description": "Plan documentation workflow with dynamic grouping (≤10 docs/task), generates IMPL tasks for parallel module trees, README, ARCHITECTURE, and HTTP API docs",
"arguments": "[path] [--tool <gemini|qwen|codex>] [--mode <full|partial>] [--cli-execute]",
"category": "memory",
"subcategory": "core",
"usage_scenario": "planning",
"subcategory": null,
"usage_scenario": "documentation",
"difficulty": "Intermediate",
"file_path": "memory/docs.md"
},
{
"name": "memory:load-skill-memory",
"name": "load-skill-memory",
"command": "/memory:load-skill-memory",
"description": "Activate SKILL package (auto-detect from paths/keywords or manual) and intelligently load documentation based on task intent keywords",
"arguments": "[skill_name] \\\"task intent description\\\"",
"arguments": "[skill_name] \\\"task intent description\\",
"category": "memory",
"subcategory": "core",
"subcategory": null,
"usage_scenario": "documentation",
"difficulty": "Intermediate",
"file_path": "memory/load-skill-memory.md"
},
{
"name": "memory:load",
"name": "load",
"command": "/memory:load",
"description": "Delegate to universal-executor agent to analyze project via Gemini/Qwen CLI and return JSON core content package for task context",
"arguments": "[--tool gemini|qwen] \\\"task context description\\\"",
"arguments": "[--tool gemini|qwen] \\\"task context description\\",
"category": "memory",
"subcategory": "core",
"usage_scenario": "implementation",
"subcategory": null,
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "memory/load.md"
},
{
"name": "memory:skill-memory",
"name": "skill-memory",
"command": "/memory:skill-memory",
"description": "4-phase autonomous orchestrator: check docs → /memory:docs planning → /workflow:execute → generate SKILL.md with progressive loading index (skips phases 2-3 if docs exist)",
"arguments": "[path] [--tool <gemini|qwen|codex>] [--regenerate] [--mode <full|partial>] [--cli-execute]",
"category": "memory",
"subcategory": "core",
"subcategory": null,
"usage_scenario": "documentation",
"difficulty": "Intermediate",
"file_path": "memory/skill-memory.md"
},
{
"name": "memory:tech-research",
"name": "tech-research",
"command": "/memory:tech-research",
"description": "3-phase orchestrator: extract tech stack from session/name → delegate to agent for Exa research and module generation → generate SKILL.md index (skips phase 2 if exists)",
"arguments": "[session-id | tech-stack-name] [--regenerate] [--tool <gemini|qwen>]",
"category": "memory",
"subcategory": "core",
"usage_scenario": "documentation",
"subcategory": null,
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "memory/tech-research.md"
},
{
"name": "memory:update-full",
"name": "update-full",
"command": "/memory:update-full",
"description": "Update all CLAUDE.md files using layer-based execution (Layer 3→1) with batched agents (4 modules/agent) and gemini→qwen→codex fallback, <20 modules uses direct parallel",
"arguments": "[--tool gemini|qwen|codex] [--path <directory>]",
"category": "memory",
"subcategory": "core",
"usage_scenario": "implementation",
"subcategory": null,
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "memory/update-full.md"
},
{
"name": "memory:update-related",
"name": "update-related",
"command": "/memory:update-related",
"description": "Update CLAUDE.md for git-changed modules using batched agent execution (4 modules/agent) with gemini→qwen→codex fallback, <15 modules uses direct execution",
"arguments": "[--tool gemini|qwen|codex]",
"category": "memory",
"subcategory": "core",
"usage_scenario": "implementation",
"subcategory": null,
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "memory/update-related.md"
},
{
"name": "memory:workflow-skill-memory",
"name": "workflow-skill-memory",
"command": "/memory:workflow-skill-memory",
"description": "Process WFS-* archived sessions using universal-executor agents with Gemini analysis to generate workflow-progress SKILL package (sessions-timeline, lessons, conflicts)",
"arguments": "session <session-id> | all",
"category": "memory",
"subcategory": "core",
"subcategory": null,
"usage_scenario": "documentation",
"difficulty": "Intermediate",
"file_path": "memory/workflow-skill-memory.md"
},
{
"name": "task:breakdown",
"name": "breakdown",
"command": "/task:breakdown",
"description": "Decompose complex task into subtasks with dependency mapping, creates child task JSONs with parent references and execution order",
"arguments": "task-id",
"category": "task",
"subcategory": "core",
"subcategory": null,
"usage_scenario": "planning",
"difficulty": "Intermediate",
"file_path": "task/breakdown.md"
},
{
"name": "task:create",
"name": "create",
"command": "/task:create",
"description": "Generate task JSON from natural language description with automatic file pattern detection, scope inference, and dependency analysis",
"arguments": "\\\"task title\\\"",
"arguments": "\\\"task title\\",
"category": "task",
"subcategory": "core",
"usage_scenario": "testing",
"subcategory": null,
"usage_scenario": "implementation",
"difficulty": "Intermediate",
"file_path": "task/create.md"
},
{
"name": "task:execute",
"name": "execute",
"command": "/task:execute",
"description": "Execute task JSON using appropriate agent (@doc-generator/@implementation-agent/@test-agent) with pre-analysis context loading and status tracking",
"arguments": "task-id",
"category": "task",
"subcategory": "core",
"subcategory": null,
"usage_scenario": "implementation",
"difficulty": "Intermediate",
"file_path": "task/execute.md"
},
{
"name": "task:replan",
"name": "replan",
"command": "/task:replan",
"description": "Update task JSON with new requirements or batch-update multiple tasks from verification report, tracks changes in task-changes.json",
"arguments": "task-id [\\\"text\\\"|file.md] | --batch [verification-report.md]",
"category": "task",
"subcategory": "core",
"usage_scenario": "documentation",
"subcategory": null,
"usage_scenario": "planning",
"difficulty": "Intermediate",
"file_path": "task/replan.md"
},
{
"name": "version",
"command": "/version",
"description": "Display Claude Code version information and check for updates",
"arguments": "",
"category": "general",
"subcategory": "core",
"usage_scenario": "utilities",
"difficulty": "Basic",
"subcategory": null,
"usage_scenario": "general",
"difficulty": "Beginner",
"file_path": "version.md"
},
{
"name": "workflow:action-plan-verify",
"name": "action-plan-verify",
"command": "/workflow:action-plan-verify",
"description": "Perform non-destructive cross-artifact consistency analysis between IMPL_PLAN.md and task JSONs with quality gate validation",
"arguments": "[optional: --session session-id]",
"category": "workflow",
"subcategory": "core",
"subcategory": null,
"usage_scenario": "planning",
"difficulty": "Intermediate",
"file_path": "workflow/action-plan-verify.md"
},
{
"name": "workflow:brainstorm:api-designer",
"name": "api-designer",
"command": "/workflow:brainstorm:api-designer",
"description": "Generate or update api-designer/analysis.md addressing guidance-specification discussion points for API design perspective",
"arguments": "optional topic - uses existing framework if available",
"category": "workflow",
"subcategory": "brainstorm",
"usage_scenario": "session-management",
"difficulty": "Advanced",
"usage_scenario": "planning",
"difficulty": "Intermediate",
"file_path": "workflow/brainstorm/api-designer.md"
},
{
"name": "workflow:brainstorm:artifacts",
"name": "artifacts",
"command": "/workflow:brainstorm:artifacts",
"description": "Interactive clarification generating confirmed guidance specification through role-based analysis and synthesis",
"arguments": "topic or challenge description [--count N]",
"category": "workflow",
"subcategory": "brainstorm",
"usage_scenario": "session-management",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/brainstorm/artifacts.md"
},
{
"name": "workflow:brainstorm:auto-parallel",
"name": "auto-parallel",
"command": "/workflow:brainstorm:auto-parallel",
"description": "Parallel brainstorming automation with dynamic role selection and concurrent execution across multiple perspectives",
"arguments": "topic or challenge description\" [--count N]",
"category": "workflow",
"subcategory": "brainstorm",
"usage_scenario": "session-management",
"usage_scenario": "general",
"difficulty": "Advanced",
"file_path": "workflow/brainstorm/auto-parallel.md"
},
{
"name": "workflow:brainstorm:data-architect",
"name": "data-architect",
"command": "/workflow:brainstorm:data-architect",
"description": "Generate or update data-architect/analysis.md addressing guidance-specification discussion points for data architecture perspective",
"arguments": "optional topic - uses existing framework if available",
"category": "workflow",
"subcategory": "brainstorm",
"usage_scenario": "implementation",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/brainstorm/data-architect.md"
},
{
"name": "workflow:brainstorm:product-manager",
"name": "product-manager",
"command": "/workflow:brainstorm:product-manager",
"description": "Generate or update product-manager/analysis.md addressing guidance-specification discussion points for product management perspective",
"arguments": "optional topic - uses existing framework if available",
"category": "workflow",
"subcategory": "brainstorm",
"usage_scenario": "implementation",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/brainstorm/product-manager.md"
},
{
"name": "workflow:brainstorm:product-owner",
"name": "product-owner",
"command": "/workflow:brainstorm:product-owner",
"description": "Generate or update product-owner/analysis.md addressing guidance-specification discussion points for product ownership perspective",
"arguments": "optional topic - uses existing framework if available",
"category": "workflow",
"subcategory": "brainstorm",
"usage_scenario": "implementation",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/brainstorm/product-owner.md"
},
{
"name": "workflow:brainstorm:scrum-master",
"name": "scrum-master",
"command": "/workflow:brainstorm:scrum-master",
"description": "Generate or update scrum-master/analysis.md addressing guidance-specification discussion points for Agile process perspective",
"arguments": "optional topic - uses existing framework if available",
"category": "workflow",
"subcategory": "brainstorm",
"usage_scenario": "planning",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/brainstorm/scrum-master.md"
},
{
"name": "workflow:brainstorm:subject-matter-expert",
"name": "subject-matter-expert",
"command": "/workflow:brainstorm:subject-matter-expert",
"description": "Generate or update subject-matter-expert/analysis.md addressing guidance-specification discussion points for domain expertise perspective",
"arguments": "optional topic - uses existing framework if available",
"category": "workflow",
"subcategory": "brainstorm",
"usage_scenario": "implementation",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/brainstorm/subject-matter-expert.md"
},
{
"name": "workflow:brainstorm:synthesis",
"name": "synthesis",
"command": "/workflow:brainstorm:synthesis",
"description": "Clarify and refine role analyses through intelligent Q&A and targeted updates with synthesis agent",
"arguments": "[optional: --session session-id]",
"category": "workflow",
"subcategory": "brainstorm",
"usage_scenario": "brainstorming",
"usage_scenario": "general",
"difficulty": "Advanced",
"file_path": "workflow/brainstorm/synthesis.md"
},
{
"name": "workflow:brainstorm:system-architect",
"name": "system-architect",
"command": "/workflow:brainstorm:system-architect",
"description": "Generate or update system-architect/analysis.md addressing guidance-specification discussion points for system architecture perspective",
"arguments": "optional topic - uses existing framework if available",
"category": "workflow",
"subcategory": "brainstorm",
"usage_scenario": "session-management",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/brainstorm/system-architect.md"
},
{
"name": "workflow:brainstorm:ui-designer",
"name": "ui-designer",
"command": "/workflow:brainstorm:ui-designer",
"description": "Generate or update ui-designer/analysis.md addressing guidance-specification discussion points for UI design perspective",
"arguments": "optional topic - uses existing framework if available",
"category": "workflow",
"subcategory": "brainstorm",
"usage_scenario": "planning",
"difficulty": "Advanced",
"difficulty": "Intermediate",
"file_path": "workflow/brainstorm/ui-designer.md"
},
{
"name": "workflow:brainstorm:ux-expert",
"name": "ux-expert",
"command": "/workflow:brainstorm:ux-expert",
"description": "Generate or update ux-expert/analysis.md addressing guidance-specification discussion points for UX perspective",
"arguments": "optional topic - uses existing framework if available",
"category": "workflow",
"subcategory": "brainstorm",
"usage_scenario": "implementation",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/brainstorm/ux-expert.md"
},
{
"name": "workflow:execute",
"name": "execute",
"command": "/workflow:execute",
"description": "Coordinate agent execution for workflow tasks with automatic session discovery, parallel task processing, and status tracking",
"arguments": "[--resume-session=\\\"session-id\\\"]",
"category": "workflow",
"subcategory": "core",
"usage_scenario": "session-management",
"subcategory": null,
"usage_scenario": "implementation",
"difficulty": "Intermediate",
"file_path": "workflow/execute.md"
},
{
"name": "workflow:plan",
"name": "plan",
"command": "/workflow:plan",
"description": "5-phase planning workflow with Gemini analysis and action-planning-agent task generation, outputs IMPL_PLAN.md and task JSONs with optional CLI auto-execution",
"arguments": "[--agent] [--cli-execute] \\\"text description\\\"|file.md",
"category": "workflow",
"subcategory": "core",
"usage_scenario": "session-management",
"subcategory": null,
"usage_scenario": "planning",
"difficulty": "Intermediate",
"file_path": "workflow/plan.md"
},
{
"name": "workflow:resume",
"name": "resume",
"command": "/workflow:resume",
"description": "Resume paused workflow session with automatic progress analysis, pending task identification, and conflict detection",
"arguments": "session-id for workflow session to resume",
"category": "workflow",
"subcategory": "core",
"usage_scenario": "implementation",
"subcategory": null,
"usage_scenario": "session-management",
"difficulty": "Intermediate",
"file_path": "workflow/resume.md"
},
{
"name": "workflow:review",
"name": "review",
"command": "/workflow:review",
"description": "Post-implementation review with specialized types (security/architecture/action-items/quality) using analysis agents and Gemini",
"arguments": "[--type=security|architecture|action-items|quality] [optional: session-id]",
"category": "workflow",
"subcategory": "core",
"usage_scenario": "testing",
"subcategory": null,
"usage_scenario": "analysis",
"difficulty": "Intermediate",
"file_path": "workflow/review.md"
},
{
"name": "workflow:session:complete",
"name": "complete",
"command": "/workflow:session:complete",
"description": "Mark active workflow session as complete, archive with lessons learned, update manifest, remove active flag",
"arguments": "# Complete current active session",
"arguments": "",
"category": "workflow",
"subcategory": "session",
"usage_scenario": "session-management",
@@ -410,19 +451,21 @@
"file_path": "workflow/session/complete.md"
},
{
"name": "workflow:session:list",
"name": "list",
"command": "/workflow:session:list",
"description": "List all workflow sessions with status filtering, shows session metadata and progress information",
"arguments": "# Show all sessions with status",
"arguments": "",
"category": "workflow",
"subcategory": "session",
"usage_scenario": "session-management",
"difficulty": "Basic",
"usage_scenario": "general",
"difficulty": "Beginner",
"file_path": "workflow/session/list.md"
},
{
"name": "workflow:session:resume",
"name": "resume",
"command": "/workflow:session:resume",
"description": "Resume the most recently paused workflow session with automatic session discovery and status update",
"arguments": "# Resume most recent paused session",
"arguments": "",
"category": "workflow",
"subcategory": "session",
"usage_scenario": "session-management",
@@ -430,127 +473,140 @@
"file_path": "workflow/session/resume.md"
},
{
"name": "workflow:session:start",
"name": "start",
"command": "/workflow:session:start",
"description": "Discover existing sessions or start new workflow session with intelligent session management and conflict detection",
"arguments": "[--auto|--new] [optional: task description for new session]",
"category": "workflow",
"subcategory": "session",
"usage_scenario": "session-management",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/session/start.md"
},
{
"name": "workflow:status",
"command": "/workflow:status",
"description": "Generate on-demand task status views from JSON task data with optional task-id filtering for detailed view",
"arguments": "[optional: task-id]",
"category": "workflow",
"subcategory": "core",
"usage_scenario": "monitoring",
"difficulty": "Basic",
"subcategory": null,
"usage_scenario": "session-management",
"difficulty": "Beginner",
"file_path": "workflow/status.md"
},
{
"name": "workflow:tdd-plan",
"name": "tdd-plan",
"command": "/workflow:tdd-plan",
"description": "TDD workflow planning with Red-Green-Refactor task chain generation, test-first development structure, and cycle tracking",
"arguments": "[--agent] \\\"feature description\\\"|file.md",
"category": "workflow",
"subcategory": "core",
"usage_scenario": "session-management",
"difficulty": "Intermediate",
"subcategory": null,
"usage_scenario": "planning",
"difficulty": "Advanced",
"file_path": "workflow/tdd-plan.md"
},
{
"name": "workflow:tdd-verify",
"name": "tdd-verify",
"command": "/workflow:tdd-verify",
"description": "Verify TDD workflow compliance against Red-Green-Refactor cycles, generate quality report with coverage analysis",
"arguments": "[optional: WFS-session-id]",
"category": "workflow",
"subcategory": "core",
"usage_scenario": "session-management",
"difficulty": "Intermediate",
"subcategory": null,
"usage_scenario": "testing",
"difficulty": "Advanced",
"file_path": "workflow/tdd-verify.md"
},
{
"name": "workflow:test-cycle-execute",
"name": "test-cycle-execute",
"command": "/workflow:test-cycle-execute",
"description": "Execute test-fix workflow with dynamic task generation and iterative fix cycles until all tests pass or max iterations reached",
"arguments": "[--resume-session=\\\"session-id\\\"] [--max-iterations=N]",
"category": "workflow",
"subcategory": "core",
"usage_scenario": "session-management",
"subcategory": null,
"usage_scenario": "implementation",
"difficulty": "Intermediate",
"file_path": "workflow/test-cycle-execute.md"
},
{
"name": "workflow:test-fix-gen",
"name": "test-fix-gen",
"command": "/workflow:test-fix-gen",
"description": "Create test-fix workflow session from session ID, description, or file path with test strategy generation and task planning",
"arguments": "[--use-codex] [--cli-execute] (source-session-id | \\\"feature description\\\" | /path/to/file.md)",
"category": "workflow",
"subcategory": "core",
"subcategory": null,
"usage_scenario": "testing",
"difficulty": "Intermediate",
"file_path": "workflow/test-fix-gen.md"
},
{
"name": "workflow:test-gen",
"name": "test-gen",
"command": "/workflow:test-gen",
"description": "Create independent test-fix workflow session from completed implementation session, analyzes code to generate test tasks",
"arguments": "[--use-codex] [--cli-execute] source-session-id",
"category": "workflow",
"subcategory": "core",
"subcategory": null,
"usage_scenario": "testing",
"difficulty": "Intermediate",
"file_path": "workflow/test-gen.md"
},
{
"name": "workflow:tools:conflict-resolution",
"name": "conflict-resolution",
"command": "/workflow:tools:conflict-resolution",
"description": "Detect and resolve conflicts between plan and existing codebase using CLI-powered analysis with Gemini/Qwen",
"arguments": "--session WFS-session-id --context path/to/context-package.json",
"category": "workflow",
"subcategory": "tools",
"usage_scenario": "brainstorming",
"usage_scenario": "general",
"difficulty": "Advanced",
"file_path": "workflow/tools/conflict-resolution.md"
},
{
"name": "workflow:tools:context-gather",
"name": "gather",
"command": "/workflow:tools:gather",
"description": "Intelligently collect project context using context-search-agent based on task description, packages into standardized JSON",
"arguments": "--session WFS-session-id \\\"task description\\\"",
"arguments": "--session WFS-session-id \\\"task description\\",
"category": "workflow",
"subcategory": "tools",
"usage_scenario": "implementation",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/tools/context-gather.md"
},
{
"name": "workflow:tools:task-generate-agent",
"name": "task-generate-agent",
"command": "/workflow:tools:task-generate-agent",
"description": "Autonomous task generation using action-planning-agent with discovery and output phases for workflow planning",
"arguments": "--session WFS-session-id [--cli-execute]",
"category": "workflow",
"subcategory": "tools",
"usage_scenario": "planning",
"usage_scenario": "implementation",
"difficulty": "Advanced",
"file_path": "workflow/tools/task-generate-agent.md"
},
{
"name": "workflow:tools:task-generate-tdd",
"name": "task-generate-tdd",
"command": "/workflow:tools:task-generate-tdd",
"description": "Generate TDD task chains with Red-Green-Refactor dependencies, test-first structure, and cycle validation",
"arguments": "--session WFS-session-id [--agent]",
"category": "workflow",
"subcategory": "tools",
"usage_scenario": "planning",
"usage_scenario": "implementation",
"difficulty": "Advanced",
"file_path": "workflow/tools/task-generate-tdd.md"
},
{
"name": "workflow:tools:task-generate",
"description": "",
"arguments": "--session WFS-auth",
"name": "task-generate",
"command": "/workflow:tools:task-generate",
"description": "Generate task JSON files and IMPL_PLAN.md from analysis results using action-planning-agent with artifact integration",
"arguments": "--session WFS-session-id [--cli-execute]",
"category": "workflow",
"subcategory": "tools",
"usage_scenario": "planning",
"difficulty": "Advanced",
"usage_scenario": "implementation",
"difficulty": "Intermediate",
"file_path": "workflow/tools/task-generate.md"
},
{
"name": "workflow:tools:tdd-coverage-analysis",
"name": "tdd-coverage-analysis",
"command": "/workflow:tools:tdd-coverage-analysis",
"description": "Analyze test coverage and TDD cycle execution with Red-Green-Refactor compliance verification",
"arguments": "--session WFS-session-id",
"category": "workflow",
@@ -560,133 +616,157 @@
"file_path": "workflow/tools/tdd-coverage-analysis.md"
},
{
"name": "workflow:tools:test-concept-enhanced",
"name": "test-concept-enhanced",
"command": "/workflow:tools:test-concept-enhanced",
"description": "Analyze test requirements and generate test generation strategy using Gemini with test-context package",
"arguments": "--session WFS-test-session-id --context path/to/test-context-package.json",
"category": "workflow",
"subcategory": "tools",
"usage_scenario": "testing",
"difficulty": "Advanced",
"difficulty": "Intermediate",
"file_path": "workflow/tools/test-concept-enhanced.md"
},
{
"name": "workflow:tools:test-context-gather",
"name": "test-context-gather",
"command": "/workflow:tools:test-context-gather",
"description": "Collect test coverage context using test-context-search-agent and package into standardized test-context JSON",
"arguments": "--session WFS-test-session-id",
"category": "workflow",
"subcategory": "tools",
"usage_scenario": "implementation",
"difficulty": "Advanced",
"usage_scenario": "testing",
"difficulty": "Intermediate",
"file_path": "workflow/tools/test-context-gather.md"
},
{
"name": "workflow:tools:test-task-generate",
"name": "test-task-generate",
"command": "/workflow:tools:test-task-generate",
"description": "Generate test-fix task JSON with iterative test-fix-retest cycle specification using Gemini/Qwen/Codex",
"arguments": "[--use-codex] [--cli-execute] --session WFS-test-session-id",
"category": "workflow",
"subcategory": "tools",
"usage_scenario": "session-management",
"difficulty": "Advanced",
"usage_scenario": "implementation",
"difficulty": "Intermediate",
"file_path": "workflow/tools/test-task-generate.md"
},
{
"name": "workflow:ui-design:animation-extract",
"name": "animation-extract",
"command": "/workflow:ui-design:animation-extract",
"description": "Extract animation and transition patterns from URLs, CSS, or interactive questioning for design system documentation",
"arguments": "[--base-path <path>] [--session <id>] [--urls \"<list>\"] [--mode <auto|interactive>] [--focus \"<types>\"]",
"category": "workflow",
"subcategory": "ui-design",
"usage_scenario": "documentation",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/ui-design/animation-extract.md"
},
{
"name": "workflow:ui-design:batch-generate",
"name": "batch-generate",
"command": "/workflow:ui-design:batch-generate",
"description": "Prompt-driven batch UI generation using target-style-centric parallel execution with design token application",
"arguments": "[--targets \"<list>\"] [--target-type \"page|component\"] [--device-type \"desktop|mobile|tablet|responsive\"] [--base-path <path>] [--session <id>] [--style-variants <count>] [--layout-variants <count>]",
"category": "workflow",
"subcategory": "ui-design",
"usage_scenario": "ui-design",
"difficulty": "Advanced",
"usage_scenario": "implementation",
"difficulty": "Intermediate",
"file_path": "workflow/ui-design/batch-generate.md"
},
{
"name": "workflow:ui-design:capture",
"name": "capture",
"command": "/workflow:ui-design:capture",
"description": "Batch screenshot capture for UI design workflows using MCP puppeteer or local fallback with URL mapping",
"arguments": "--url-map \"target:url,...\" [--base-path path] [--session id]",
"category": "workflow",
"subcategory": "ui-design",
"usage_scenario": "ui-design",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/ui-design/capture.md"
},
{
"name": "workflow:ui-design:explore-auto",
"name": "explore-auto",
"command": "/workflow:ui-design:explore-auto",
"description": "Exploratory UI design workflow with style-centric batch generation, creates design variants from prompts/images with parallel execution",
"arguments": "[--prompt \"<desc>\"] [--images \"<glob>\"] [--targets \"<list>\"] [--target-type \"page|component\"] [--session <id>] [--style-variants <count>] [--layout-variants <count>] [--batch-plan]\"",
"arguments": "[--prompt \"<desc>\"] [--images \"<glob>\"] [--targets \"<list>\"] [--target-type \"page|component\"] [--session <id>] [--style-variants <count>] [--layout-variants <count>] [--batch-plan]",
"category": "workflow",
"subcategory": "ui-design",
"usage_scenario": "ui-design",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/ui-design/explore-auto.md"
},
{
"name": "workflow:ui-design:explore-layers",
"name": "explore-layers",
"command": "/workflow:ui-design:explore-layers",
"description": "Interactive deep UI capture with depth-controlled layer exploration using MCP puppeteer",
"arguments": "--url <url> --depth <1-5> [--session id] [--base-path path]",
"category": "workflow",
"subcategory": "ui-design",
"usage_scenario": "ui-design",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/ui-design/explore-layers.md"
},
{
"name": "workflow:ui-design:generate",
"name": "generate",
"command": "/workflow:ui-design:generate",
"description": "Assemble UI prototypes by combining layout templates with design tokens, pure assembler without new content generation",
"arguments": "[--base-path <path>] [--session <id>] [--style-variants <count>] [--layout-variants <count>]",
"category": "workflow",
"subcategory": "ui-design",
"usage_scenario": "ui-design",
"difficulty": "Advanced",
"usage_scenario": "implementation",
"difficulty": "Intermediate",
"file_path": "workflow/ui-design/generate.md"
},
{
"name": "workflow:ui-design:imitate-auto",
"name": "imitate-auto",
"command": "/workflow:ui-design:imitate-auto",
"description": "High-speed multi-page UI replication with batch screenshot capture and design token extraction",
"arguments": "--url-map \"<map>\" [--capture-mode <batch|deep>] [--depth <1-5>] [--session <id>] [--prompt \"<desc>\"]",
"category": "workflow",
"subcategory": "ui-design",
"usage_scenario": "documentation",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/ui-design/imitate-auto.md"
},
{
"name": "workflow:ui-design:layout-extract",
"name": "workflow:ui-design:import-from-code",
"command": "/workflow:ui-design:import-from-code",
"description": "Import design system from code files (CSS/JS/HTML/SCSS) using parallel agent analysis with final synthesis",
"arguments": "[--base-path <path>] [--css \\\"<glob>\\\"] [--js \\\"<glob>\\\"] [--scss \\\"<glob>\\\"] [--html \\\"<glob>\\\"] [--style-files \\\"<glob>\\\"] [--session <id>]",
"category": "workflow",
"subcategory": "ui-design",
"usage_scenario": "planning",
"difficulty": "Intermediate",
"file_path": "workflow/ui-design/import-from-code.md"
},
{
"name": "layout-extract",
"command": "/workflow:ui-design:layout-extract",
"description": "Extract structural layout information from reference images, URLs, or text prompts using Claude analysis",
"arguments": "[--base-path <path>] [--session <id>] [--images \"<glob>\"] [--urls \"<list>\"] [--prompt \"<desc>\"] [--targets \"<list>\"] [--mode <imitate|explore>] [--variants <count>] [--device-type <desktop|mobile|tablet|responsive>]",
"category": "workflow",
"subcategory": "ui-design",
"usage_scenario": "ui-design",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/ui-design/layout-extract.md"
},
{
"name": "workflow:ui-design:style-extract",
"name": "style-extract",
"command": "/workflow:ui-design:style-extract",
"description": "Extract design style from reference images or text prompts using Claude analysis with variant generation",
"arguments": "[--base-path <path>] [--session <id>] [--images \"<glob>\"] [--urls \"<list>\"] [--prompt \"<desc>\"] [--mode <imitate|explore>] [--variants <count>]",
"category": "workflow",
"subcategory": "ui-design",
"usage_scenario": "documentation",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/ui-design/style-extract.md"
},
{
"name": "workflow:ui-design:update",
"name": "update",
"command": "/workflow:ui-design:update",
"description": "Update brainstorming artifacts with finalized design system references from selected prototypes",
"arguments": "--session <session_id> [--selected-prototypes \"<list>\"]",
"category": "workflow",
"subcategory": "ui-design",
"usage_scenario": "ui-design",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/ui-design/update.md"
}
]

View File

@@ -1,70 +1,77 @@
{
"cli": {
"core": [
"_root": [
{
"name": "cli:analyze",
"name": "analyze",
"command": "/cli:analyze",
"description": "Read-only codebase analysis using Gemini (default), Qwen, or Codex with auto-pattern detection and template selection",
"arguments": "[--agent] [--tool codex|gemini|qwen] [--enhance] analysis target",
"category": "cli",
"subcategory": "core",
"usage_scenario": "documentation",
"difficulty": "Intermediate",
"subcategory": null,
"usage_scenario": "analysis",
"difficulty": "Beginner",
"file_path": "cli/analyze.md"
},
{
"name": "cli:chat",
"name": "chat",
"command": "/cli:chat",
"description": "Read-only Q&A interaction with Gemini/Qwen/Codex for codebase questions with automatic context inference",
"arguments": "[--agent] [--tool codex|gemini|qwen] [--enhance] inquiry",
"category": "cli",
"subcategory": "core",
"usage_scenario": "documentation",
"difficulty": "Intermediate",
"subcategory": null,
"usage_scenario": "general",
"difficulty": "Beginner",
"file_path": "cli/chat.md"
},
{
"name": "cli:cli-init",
"name": "cli-init",
"command": "/cli:cli-init",
"description": "Generate .gemini/ and .qwen/ config directories with settings.json and ignore files based on workspace technology detection",
"arguments": "[--tool gemini|qwen|all] [--output path] [--preview]",
"category": "cli",
"subcategory": "core",
"usage_scenario": "documentation",
"subcategory": null,
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "cli/cli-init.md"
},
{
"name": "cli:codex-execute",
"name": "codex-execute",
"command": "/cli:codex-execute",
"description": "Multi-stage Codex execution with automatic task decomposition into grouped subtasks using resume mechanism for context continuity",
"arguments": "[--verify-git] task description or task-id",
"category": "cli",
"subcategory": "core",
"usage_scenario": "session-management",
"subcategory": null,
"usage_scenario": "implementation",
"difficulty": "Intermediate",
"file_path": "cli/codex-execute.md"
},
{
"name": "cli:discuss-plan",
"name": "discuss-plan",
"command": "/cli:discuss-plan",
"description": "Multi-round collaborative planning using Gemini, Codex, and Claude synthesis with iterative discussion cycles (read-only, no code changes)",
"arguments": "[--topic '...'] [--task-id '...'] [--rounds N]",
"category": "cli",
"subcategory": "core",
"usage_scenario": "session-management",
"subcategory": null,
"usage_scenario": "planning",
"difficulty": "Intermediate",
"file_path": "cli/discuss-plan.md"
},
{
"name": "cli:execute",
"name": "execute",
"command": "/cli:execute",
"description": "Autonomous code implementation with YOLO auto-approval using Gemini/Qwen/Codex, supports task ID or description input with automatic file pattern detection",
"arguments": "[--agent] [--tool codex|gemini|qwen] [--enhance] description or task-id",
"category": "cli",
"subcategory": "core",
"usage_scenario": "session-management",
"subcategory": null,
"usage_scenario": "implementation",
"difficulty": "Intermediate",
"file_path": "cli/execute.md"
}
],
"mode": [
{
"name": "cli:mode:bug-diagnosis",
"name": "bug-diagnosis",
"command": "/cli:mode:bug-diagnosis",
"description": "Read-only bug root cause analysis using Gemini/Qwen/Codex with systematic diagnosis template for fix suggestions",
"arguments": "[--agent] [--tool codex|gemini|qwen] [--enhance] [--cd path] bug description",
"category": "cli",
@@ -74,17 +81,19 @@
"file_path": "cli/mode/bug-diagnosis.md"
},
{
"name": "cli:mode:code-analysis",
"name": "code-analysis",
"command": "/cli:mode:code-analysis",
"description": "Read-only execution path tracing using Gemini/Qwen/Codex with specialized analysis template for call flow and optimization",
"arguments": "[--agent] [--tool codex|gemini|qwen] [--enhance] [--cd path] analysis target",
"category": "cli",
"subcategory": "mode",
"usage_scenario": "implementation",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "cli/mode/code-analysis.md"
},
{
"name": "cli:mode:plan",
"name": "plan",
"command": "/cli:mode:plan",
"description": "Read-only architecture planning using Gemini/Qwen/Codex with strategic planning template for modification plans and impact analysis",
"arguments": "[--agent] [--tool codex|gemini|qwen] [--enhance] [--cd path] topic",
"category": "cli",
@@ -96,107 +105,117 @@
]
},
"general": {
"core": [
"_root": [
{
"name": "enhance-prompt",
"command": "/enhance-prompt",
"description": "Enhanced prompt transformation using session memory and codebase analysis with --enhance flag detection",
"arguments": "user input to enhance",
"category": "general",
"subcategory": "core",
"usage_scenario": "session-management",
"subcategory": null,
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "enhance-prompt.md"
},
{
"name": "version",
"command": "/version",
"description": "Display Claude Code version information and check for updates",
"arguments": "",
"category": "general",
"subcategory": "core",
"usage_scenario": "utilities",
"difficulty": "Basic",
"subcategory": null,
"usage_scenario": "general",
"difficulty": "Beginner",
"file_path": "version.md"
}
]
},
"memory": {
"core": [
"_root": [
{
"name": "memory:docs",
"name": "docs",
"command": "/memory:docs",
"description": "Plan documentation workflow with dynamic grouping (≤10 docs/task), generates IMPL tasks for parallel module trees, README, ARCHITECTURE, and HTTP API docs",
"arguments": "[path] [--tool <gemini|qwen|codex>] [--mode <full|partial>] [--cli-execute]",
"category": "memory",
"subcategory": "core",
"usage_scenario": "planning",
"subcategory": null,
"usage_scenario": "documentation",
"difficulty": "Intermediate",
"file_path": "memory/docs.md"
},
{
"name": "memory:load-skill-memory",
"name": "load-skill-memory",
"command": "/memory:load-skill-memory",
"description": "Activate SKILL package (auto-detect from paths/keywords or manual) and intelligently load documentation based on task intent keywords",
"arguments": "[skill_name] \\\"task intent description\\\"",
"arguments": "[skill_name] \\\"task intent description\\",
"category": "memory",
"subcategory": "core",
"subcategory": null,
"usage_scenario": "documentation",
"difficulty": "Intermediate",
"file_path": "memory/load-skill-memory.md"
},
{
"name": "memory:load",
"name": "load",
"command": "/memory:load",
"description": "Delegate to universal-executor agent to analyze project via Gemini/Qwen CLI and return JSON core content package for task context",
"arguments": "[--tool gemini|qwen] \\\"task context description\\\"",
"arguments": "[--tool gemini|qwen] \\\"task context description\\",
"category": "memory",
"subcategory": "core",
"usage_scenario": "implementation",
"subcategory": null,
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "memory/load.md"
},
{
"name": "memory:skill-memory",
"name": "skill-memory",
"command": "/memory:skill-memory",
"description": "4-phase autonomous orchestrator: check docs → /memory:docs planning → /workflow:execute → generate SKILL.md with progressive loading index (skips phases 2-3 if docs exist)",
"arguments": "[path] [--tool <gemini|qwen|codex>] [--regenerate] [--mode <full|partial>] [--cli-execute]",
"category": "memory",
"subcategory": "core",
"subcategory": null,
"usage_scenario": "documentation",
"difficulty": "Intermediate",
"file_path": "memory/skill-memory.md"
},
{
"name": "memory:tech-research",
"name": "tech-research",
"command": "/memory:tech-research",
"description": "3-phase orchestrator: extract tech stack from session/name → delegate to agent for Exa research and module generation → generate SKILL.md index (skips phase 2 if exists)",
"arguments": "[session-id | tech-stack-name] [--regenerate] [--tool <gemini|qwen>]",
"category": "memory",
"subcategory": "core",
"usage_scenario": "documentation",
"subcategory": null,
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "memory/tech-research.md"
},
{
"name": "memory:update-full",
"name": "update-full",
"command": "/memory:update-full",
"description": "Update all CLAUDE.md files using layer-based execution (Layer 3→1) with batched agents (4 modules/agent) and gemini→qwen→codex fallback, <20 modules uses direct parallel",
"arguments": "[--tool gemini|qwen|codex] [--path <directory>]",
"category": "memory",
"subcategory": "core",
"usage_scenario": "implementation",
"subcategory": null,
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "memory/update-full.md"
},
{
"name": "memory:update-related",
"name": "update-related",
"command": "/memory:update-related",
"description": "Update CLAUDE.md for git-changed modules using batched agent execution (4 modules/agent) with gemini→qwen→codex fallback, <15 modules uses direct execution",
"arguments": "[--tool gemini|qwen|codex]",
"category": "memory",
"subcategory": "core",
"usage_scenario": "implementation",
"subcategory": null,
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "memory/update-related.md"
},
{
"name": "memory:workflow-skill-memory",
"name": "workflow-skill-memory",
"command": "/memory:workflow-skill-memory",
"description": "Process WFS-* archived sessions using universal-executor agents with Gemini analysis to generate workflow-progress SKILL package (sessions-timeline, lessons, conflicts)",
"arguments": "session <session-id> | all",
"category": "memory",
"subcategory": "core",
"subcategory": null,
"usage_scenario": "documentation",
"difficulty": "Intermediate",
"file_path": "memory/workflow-skill-memory.md"
@@ -204,157 +223,172 @@
]
},
"task": {
"core": [
"_root": [
{
"name": "task:breakdown",
"name": "breakdown",
"command": "/task:breakdown",
"description": "Decompose complex task into subtasks with dependency mapping, creates child task JSONs with parent references and execution order",
"arguments": "task-id",
"category": "task",
"subcategory": "core",
"subcategory": null,
"usage_scenario": "planning",
"difficulty": "Intermediate",
"file_path": "task/breakdown.md"
},
{
"name": "task:create",
"name": "create",
"command": "/task:create",
"description": "Generate task JSON from natural language description with automatic file pattern detection, scope inference, and dependency analysis",
"arguments": "\\\"task title\\\"",
"arguments": "\\\"task title\\",
"category": "task",
"subcategory": "core",
"usage_scenario": "testing",
"subcategory": null,
"usage_scenario": "implementation",
"difficulty": "Intermediate",
"file_path": "task/create.md"
},
{
"name": "task:execute",
"name": "execute",
"command": "/task:execute",
"description": "Execute task JSON using appropriate agent (@doc-generator/@implementation-agent/@test-agent) with pre-analysis context loading and status tracking",
"arguments": "task-id",
"category": "task",
"subcategory": "core",
"subcategory": null,
"usage_scenario": "implementation",
"difficulty": "Intermediate",
"file_path": "task/execute.md"
},
{
"name": "task:replan",
"name": "replan",
"command": "/task:replan",
"description": "Update task JSON with new requirements or batch-update multiple tasks from verification report, tracks changes in task-changes.json",
"arguments": "task-id [\\\"text\\\"|file.md] | --batch [verification-report.md]",
"category": "task",
"subcategory": "core",
"usage_scenario": "documentation",
"subcategory": null,
"usage_scenario": "planning",
"difficulty": "Intermediate",
"file_path": "task/replan.md"
}
]
},
"workflow": {
"core": [
"_root": [
{
"name": "workflow:action-plan-verify",
"name": "action-plan-verify",
"command": "/workflow:action-plan-verify",
"description": "Perform non-destructive cross-artifact consistency analysis between IMPL_PLAN.md and task JSONs with quality gate validation",
"arguments": "[optional: --session session-id]",
"category": "workflow",
"subcategory": "core",
"subcategory": null,
"usage_scenario": "planning",
"difficulty": "Intermediate",
"file_path": "workflow/action-plan-verify.md"
},
{
"name": "workflow:execute",
"name": "execute",
"command": "/workflow:execute",
"description": "Coordinate agent execution for workflow tasks with automatic session discovery, parallel task processing, and status tracking",
"arguments": "[--resume-session=\\\"session-id\\\"]",
"category": "workflow",
"subcategory": "core",
"usage_scenario": "session-management",
"subcategory": null,
"usage_scenario": "implementation",
"difficulty": "Intermediate",
"file_path": "workflow/execute.md"
},
{
"name": "workflow:plan",
"name": "plan",
"command": "/workflow:plan",
"description": "5-phase planning workflow with Gemini analysis and action-planning-agent task generation, outputs IMPL_PLAN.md and task JSONs with optional CLI auto-execution",
"arguments": "[--agent] [--cli-execute] \\\"text description\\\"|file.md",
"category": "workflow",
"subcategory": "core",
"usage_scenario": "session-management",
"subcategory": null,
"usage_scenario": "planning",
"difficulty": "Intermediate",
"file_path": "workflow/plan.md"
},
{
"name": "workflow:resume",
"name": "resume",
"command": "/workflow:resume",
"description": "Resume paused workflow session with automatic progress analysis, pending task identification, and conflict detection",
"arguments": "session-id for workflow session to resume",
"category": "workflow",
"subcategory": "core",
"usage_scenario": "implementation",
"subcategory": null,
"usage_scenario": "session-management",
"difficulty": "Intermediate",
"file_path": "workflow/resume.md"
},
{
"name": "workflow:review",
"name": "review",
"command": "/workflow:review",
"description": "Post-implementation review with specialized types (security/architecture/action-items/quality) using analysis agents and Gemini",
"arguments": "[--type=security|architecture|action-items|quality] [optional: session-id]",
"category": "workflow",
"subcategory": "core",
"usage_scenario": "testing",
"subcategory": null,
"usage_scenario": "analysis",
"difficulty": "Intermediate",
"file_path": "workflow/review.md"
},
{
"name": "workflow:status",
"command": "/workflow:status",
"description": "Generate on-demand task status views from JSON task data with optional task-id filtering for detailed view",
"arguments": "[optional: task-id]",
"category": "workflow",
"subcategory": "core",
"usage_scenario": "monitoring",
"difficulty": "Basic",
"subcategory": null,
"usage_scenario": "session-management",
"difficulty": "Beginner",
"file_path": "workflow/status.md"
},
{
"name": "workflow:tdd-plan",
"name": "tdd-plan",
"command": "/workflow:tdd-plan",
"description": "TDD workflow planning with Red-Green-Refactor task chain generation, test-first development structure, and cycle tracking",
"arguments": "[--agent] \\\"feature description\\\"|file.md",
"category": "workflow",
"subcategory": "core",
"usage_scenario": "session-management",
"difficulty": "Intermediate",
"subcategory": null,
"usage_scenario": "planning",
"difficulty": "Advanced",
"file_path": "workflow/tdd-plan.md"
},
{
"name": "workflow:tdd-verify",
"name": "tdd-verify",
"command": "/workflow:tdd-verify",
"description": "Verify TDD workflow compliance against Red-Green-Refactor cycles, generate quality report with coverage analysis",
"arguments": "[optional: WFS-session-id]",
"category": "workflow",
"subcategory": "core",
"usage_scenario": "session-management",
"difficulty": "Intermediate",
"subcategory": null,
"usage_scenario": "testing",
"difficulty": "Advanced",
"file_path": "workflow/tdd-verify.md"
},
{
"name": "workflow:test-cycle-execute",
"name": "test-cycle-execute",
"command": "/workflow:test-cycle-execute",
"description": "Execute test-fix workflow with dynamic task generation and iterative fix cycles until all tests pass or max iterations reached",
"arguments": "[--resume-session=\\\"session-id\\\"] [--max-iterations=N]",
"category": "workflow",
"subcategory": "core",
"usage_scenario": "session-management",
"subcategory": null,
"usage_scenario": "implementation",
"difficulty": "Intermediate",
"file_path": "workflow/test-cycle-execute.md"
},
{
"name": "workflow:test-fix-gen",
"name": "test-fix-gen",
"command": "/workflow:test-fix-gen",
"description": "Create test-fix workflow session from session ID, description, or file path with test strategy generation and task planning",
"arguments": "[--use-codex] [--cli-execute] (source-session-id | \\\"feature description\\\" | /path/to/file.md)",
"category": "workflow",
"subcategory": "core",
"subcategory": null,
"usage_scenario": "testing",
"difficulty": "Intermediate",
"file_path": "workflow/test-fix-gen.md"
},
{
"name": "workflow:test-gen",
"name": "test-gen",
"command": "/workflow:test-gen",
"description": "Create independent test-fix workflow session from completed implementation session, analyzes code to generate test tasks",
"arguments": "[--use-codex] [--cli-execute] source-session-id",
"category": "workflow",
"subcategory": "core",
"subcategory": null,
"usage_scenario": "testing",
"difficulty": "Intermediate",
"file_path": "workflow/test-gen.md"
@@ -362,131 +396,144 @@
],
"brainstorm": [
{
"name": "workflow:brainstorm:api-designer",
"name": "api-designer",
"command": "/workflow:brainstorm:api-designer",
"description": "Generate or update api-designer/analysis.md addressing guidance-specification discussion points for API design perspective",
"arguments": "optional topic - uses existing framework if available",
"category": "workflow",
"subcategory": "brainstorm",
"usage_scenario": "session-management",
"difficulty": "Advanced",
"usage_scenario": "planning",
"difficulty": "Intermediate",
"file_path": "workflow/brainstorm/api-designer.md"
},
{
"name": "workflow:brainstorm:artifacts",
"name": "artifacts",
"command": "/workflow:brainstorm:artifacts",
"description": "Interactive clarification generating confirmed guidance specification through role-based analysis and synthesis",
"arguments": "topic or challenge description [--count N]",
"category": "workflow",
"subcategory": "brainstorm",
"usage_scenario": "session-management",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/brainstorm/artifacts.md"
},
{
"name": "workflow:brainstorm:auto-parallel",
"name": "auto-parallel",
"command": "/workflow:brainstorm:auto-parallel",
"description": "Parallel brainstorming automation with dynamic role selection and concurrent execution across multiple perspectives",
"arguments": "topic or challenge description\" [--count N]",
"category": "workflow",
"subcategory": "brainstorm",
"usage_scenario": "session-management",
"usage_scenario": "general",
"difficulty": "Advanced",
"file_path": "workflow/brainstorm/auto-parallel.md"
},
{
"name": "workflow:brainstorm:data-architect",
"name": "data-architect",
"command": "/workflow:brainstorm:data-architect",
"description": "Generate or update data-architect/analysis.md addressing guidance-specification discussion points for data architecture perspective",
"arguments": "optional topic - uses existing framework if available",
"category": "workflow",
"subcategory": "brainstorm",
"usage_scenario": "implementation",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/brainstorm/data-architect.md"
},
{
"name": "workflow:brainstorm:product-manager",
"name": "product-manager",
"command": "/workflow:brainstorm:product-manager",
"description": "Generate or update product-manager/analysis.md addressing guidance-specification discussion points for product management perspective",
"arguments": "optional topic - uses existing framework if available",
"category": "workflow",
"subcategory": "brainstorm",
"usage_scenario": "implementation",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/brainstorm/product-manager.md"
},
{
"name": "workflow:brainstorm:product-owner",
"name": "product-owner",
"command": "/workflow:brainstorm:product-owner",
"description": "Generate or update product-owner/analysis.md addressing guidance-specification discussion points for product ownership perspective",
"arguments": "optional topic - uses existing framework if available",
"category": "workflow",
"subcategory": "brainstorm",
"usage_scenario": "implementation",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/brainstorm/product-owner.md"
},
{
"name": "workflow:brainstorm:scrum-master",
"name": "scrum-master",
"command": "/workflow:brainstorm:scrum-master",
"description": "Generate or update scrum-master/analysis.md addressing guidance-specification discussion points for Agile process perspective",
"arguments": "optional topic - uses existing framework if available",
"category": "workflow",
"subcategory": "brainstorm",
"usage_scenario": "planning",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/brainstorm/scrum-master.md"
},
{
"name": "workflow:brainstorm:subject-matter-expert",
"name": "subject-matter-expert",
"command": "/workflow:brainstorm:subject-matter-expert",
"description": "Generate or update subject-matter-expert/analysis.md addressing guidance-specification discussion points for domain expertise perspective",
"arguments": "optional topic - uses existing framework if available",
"category": "workflow",
"subcategory": "brainstorm",
"usage_scenario": "implementation",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/brainstorm/subject-matter-expert.md"
},
{
"name": "workflow:brainstorm:synthesis",
"name": "synthesis",
"command": "/workflow:brainstorm:synthesis",
"description": "Clarify and refine role analyses through intelligent Q&A and targeted updates with synthesis agent",
"arguments": "[optional: --session session-id]",
"category": "workflow",
"subcategory": "brainstorm",
"usage_scenario": "brainstorming",
"usage_scenario": "general",
"difficulty": "Advanced",
"file_path": "workflow/brainstorm/synthesis.md"
},
{
"name": "workflow:brainstorm:system-architect",
"name": "system-architect",
"command": "/workflow:brainstorm:system-architect",
"description": "Generate or update system-architect/analysis.md addressing guidance-specification discussion points for system architecture perspective",
"arguments": "optional topic - uses existing framework if available",
"category": "workflow",
"subcategory": "brainstorm",
"usage_scenario": "session-management",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/brainstorm/system-architect.md"
},
{
"name": "workflow:brainstorm:ui-designer",
"name": "ui-designer",
"command": "/workflow:brainstorm:ui-designer",
"description": "Generate or update ui-designer/analysis.md addressing guidance-specification discussion points for UI design perspective",
"arguments": "optional topic - uses existing framework if available",
"category": "workflow",
"subcategory": "brainstorm",
"usage_scenario": "planning",
"difficulty": "Advanced",
"difficulty": "Intermediate",
"file_path": "workflow/brainstorm/ui-designer.md"
},
{
"name": "workflow:brainstorm:ux-expert",
"name": "ux-expert",
"command": "/workflow:brainstorm:ux-expert",
"description": "Generate or update ux-expert/analysis.md addressing guidance-specification discussion points for UX perspective",
"arguments": "optional topic - uses existing framework if available",
"category": "workflow",
"subcategory": "brainstorm",
"usage_scenario": "implementation",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/brainstorm/ux-expert.md"
}
],
"session": [
{
"name": "workflow:session:complete",
"name": "complete",
"command": "/workflow:session:complete",
"description": "Mark active workflow session as complete, archive with lessons learned, update manifest, remove active flag",
"arguments": "# Complete current active session",
"arguments": "",
"category": "workflow",
"subcategory": "session",
"usage_scenario": "session-management",
@@ -494,19 +541,21 @@
"file_path": "workflow/session/complete.md"
},
{
"name": "workflow:session:list",
"name": "list",
"command": "/workflow:session:list",
"description": "List all workflow sessions with status filtering, shows session metadata and progress information",
"arguments": "# Show all sessions with status",
"arguments": "",
"category": "workflow",
"subcategory": "session",
"usage_scenario": "session-management",
"difficulty": "Basic",
"usage_scenario": "general",
"difficulty": "Beginner",
"file_path": "workflow/session/list.md"
},
{
"name": "workflow:session:resume",
"name": "resume",
"command": "/workflow:session:resume",
"description": "Resume the most recently paused workflow session with automatic session discovery and status update",
"arguments": "# Resume most recent paused session",
"arguments": "",
"category": "workflow",
"subcategory": "session",
"usage_scenario": "session-management",
@@ -514,69 +563,76 @@
"file_path": "workflow/session/resume.md"
},
{
"name": "workflow:session:start",
"name": "start",
"command": "/workflow:session:start",
"description": "Discover existing sessions or start new workflow session with intelligent session management and conflict detection",
"arguments": "[--auto|--new] [optional: task description for new session]",
"category": "workflow",
"subcategory": "session",
"usage_scenario": "session-management",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/session/start.md"
}
],
"tools": [
{
"name": "workflow:tools:conflict-resolution",
"name": "conflict-resolution",
"command": "/workflow:tools:conflict-resolution",
"description": "Detect and resolve conflicts between plan and existing codebase using CLI-powered analysis with Gemini/Qwen",
"arguments": "--session WFS-session-id --context path/to/context-package.json",
"category": "workflow",
"subcategory": "tools",
"usage_scenario": "brainstorming",
"usage_scenario": "general",
"difficulty": "Advanced",
"file_path": "workflow/tools/conflict-resolution.md"
},
{
"name": "workflow:tools:context-gather",
"name": "gather",
"command": "/workflow:tools:gather",
"description": "Intelligently collect project context using context-search-agent based on task description, packages into standardized JSON",
"arguments": "--session WFS-session-id \\\"task description\\\"",
"arguments": "--session WFS-session-id \\\"task description\\",
"category": "workflow",
"subcategory": "tools",
"usage_scenario": "implementation",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/tools/context-gather.md"
},
{
"name": "workflow:tools:task-generate-agent",
"name": "task-generate-agent",
"command": "/workflow:tools:task-generate-agent",
"description": "Autonomous task generation using action-planning-agent with discovery and output phases for workflow planning",
"arguments": "--session WFS-session-id [--cli-execute]",
"category": "workflow",
"subcategory": "tools",
"usage_scenario": "planning",
"usage_scenario": "implementation",
"difficulty": "Advanced",
"file_path": "workflow/tools/task-generate-agent.md"
},
{
"name": "workflow:tools:task-generate-tdd",
"name": "task-generate-tdd",
"command": "/workflow:tools:task-generate-tdd",
"description": "Generate TDD task chains with Red-Green-Refactor dependencies, test-first structure, and cycle validation",
"arguments": "--session WFS-session-id [--agent]",
"category": "workflow",
"subcategory": "tools",
"usage_scenario": "planning",
"usage_scenario": "implementation",
"difficulty": "Advanced",
"file_path": "workflow/tools/task-generate-tdd.md"
},
{
"name": "workflow:tools:task-generate",
"description": "",
"arguments": "--session WFS-auth",
"name": "task-generate",
"command": "/workflow:tools:task-generate",
"description": "Generate task JSON files and IMPL_PLAN.md from analysis results using action-planning-agent with artifact integration",
"arguments": "--session WFS-session-id [--cli-execute]",
"category": "workflow",
"subcategory": "tools",
"usage_scenario": "planning",
"difficulty": "Advanced",
"usage_scenario": "implementation",
"difficulty": "Intermediate",
"file_path": "workflow/tools/task-generate.md"
},
{
"name": "workflow:tools:tdd-coverage-analysis",
"name": "tdd-coverage-analysis",
"command": "/workflow:tools:tdd-coverage-analysis",
"description": "Analyze test coverage and TDD cycle execution with Red-Green-Refactor compliance verification",
"arguments": "--session WFS-session-id",
"category": "workflow",
@@ -586,135 +642,159 @@
"file_path": "workflow/tools/tdd-coverage-analysis.md"
},
{
"name": "workflow:tools:test-concept-enhanced",
"name": "test-concept-enhanced",
"command": "/workflow:tools:test-concept-enhanced",
"description": "Analyze test requirements and generate test generation strategy using Gemini with test-context package",
"arguments": "--session WFS-test-session-id --context path/to/test-context-package.json",
"category": "workflow",
"subcategory": "tools",
"usage_scenario": "testing",
"difficulty": "Advanced",
"difficulty": "Intermediate",
"file_path": "workflow/tools/test-concept-enhanced.md"
},
{
"name": "workflow:tools:test-context-gather",
"name": "test-context-gather",
"command": "/workflow:tools:test-context-gather",
"description": "Collect test coverage context using test-context-search-agent and package into standardized test-context JSON",
"arguments": "--session WFS-test-session-id",
"category": "workflow",
"subcategory": "tools",
"usage_scenario": "implementation",
"difficulty": "Advanced",
"usage_scenario": "testing",
"difficulty": "Intermediate",
"file_path": "workflow/tools/test-context-gather.md"
},
{
"name": "workflow:tools:test-task-generate",
"name": "test-task-generate",
"command": "/workflow:tools:test-task-generate",
"description": "Generate test-fix task JSON with iterative test-fix-retest cycle specification using Gemini/Qwen/Codex",
"arguments": "[--use-codex] [--cli-execute] --session WFS-test-session-id",
"category": "workflow",
"subcategory": "tools",
"usage_scenario": "session-management",
"difficulty": "Advanced",
"usage_scenario": "implementation",
"difficulty": "Intermediate",
"file_path": "workflow/tools/test-task-generate.md"
}
],
"ui-design": [
{
"name": "workflow:ui-design:animation-extract",
"name": "animation-extract",
"command": "/workflow:ui-design:animation-extract",
"description": "Extract animation and transition patterns from URLs, CSS, or interactive questioning for design system documentation",
"arguments": "[--base-path <path>] [--session <id>] [--urls \"<list>\"] [--mode <auto|interactive>] [--focus \"<types>\"]",
"category": "workflow",
"subcategory": "ui-design",
"usage_scenario": "documentation",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/ui-design/animation-extract.md"
},
{
"name": "workflow:ui-design:batch-generate",
"name": "batch-generate",
"command": "/workflow:ui-design:batch-generate",
"description": "Prompt-driven batch UI generation using target-style-centric parallel execution with design token application",
"arguments": "[--targets \"<list>\"] [--target-type \"page|component\"] [--device-type \"desktop|mobile|tablet|responsive\"] [--base-path <path>] [--session <id>] [--style-variants <count>] [--layout-variants <count>]",
"category": "workflow",
"subcategory": "ui-design",
"usage_scenario": "ui-design",
"difficulty": "Advanced",
"usage_scenario": "implementation",
"difficulty": "Intermediate",
"file_path": "workflow/ui-design/batch-generate.md"
},
{
"name": "workflow:ui-design:capture",
"name": "capture",
"command": "/workflow:ui-design:capture",
"description": "Batch screenshot capture for UI design workflows using MCP puppeteer or local fallback with URL mapping",
"arguments": "--url-map \"target:url,...\" [--base-path path] [--session id]",
"category": "workflow",
"subcategory": "ui-design",
"usage_scenario": "ui-design",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/ui-design/capture.md"
},
{
"name": "workflow:ui-design:explore-auto",
"name": "explore-auto",
"command": "/workflow:ui-design:explore-auto",
"description": "Exploratory UI design workflow with style-centric batch generation, creates design variants from prompts/images with parallel execution",
"arguments": "[--prompt \"<desc>\"] [--images \"<glob>\"] [--targets \"<list>\"] [--target-type \"page|component\"] [--session <id>] [--style-variants <count>] [--layout-variants <count>] [--batch-plan]\"",
"arguments": "[--prompt \"<desc>\"] [--images \"<glob>\"] [--targets \"<list>\"] [--target-type \"page|component\"] [--session <id>] [--style-variants <count>] [--layout-variants <count>] [--batch-plan]",
"category": "workflow",
"subcategory": "ui-design",
"usage_scenario": "ui-design",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/ui-design/explore-auto.md"
},
{
"name": "workflow:ui-design:explore-layers",
"name": "explore-layers",
"command": "/workflow:ui-design:explore-layers",
"description": "Interactive deep UI capture with depth-controlled layer exploration using MCP puppeteer",
"arguments": "--url <url> --depth <1-5> [--session id] [--base-path path]",
"category": "workflow",
"subcategory": "ui-design",
"usage_scenario": "ui-design",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/ui-design/explore-layers.md"
},
{
"name": "workflow:ui-design:generate",
"name": "generate",
"command": "/workflow:ui-design:generate",
"description": "Assemble UI prototypes by combining layout templates with design tokens, pure assembler without new content generation",
"arguments": "[--base-path <path>] [--session <id>] [--style-variants <count>] [--layout-variants <count>]",
"category": "workflow",
"subcategory": "ui-design",
"usage_scenario": "ui-design",
"difficulty": "Advanced",
"usage_scenario": "implementation",
"difficulty": "Intermediate",
"file_path": "workflow/ui-design/generate.md"
},
{
"name": "workflow:ui-design:imitate-auto",
"name": "imitate-auto",
"command": "/workflow:ui-design:imitate-auto",
"description": "High-speed multi-page UI replication with batch screenshot capture and design token extraction",
"arguments": "--url-map \"<map>\" [--capture-mode <batch|deep>] [--depth <1-5>] [--session <id>] [--prompt \"<desc>\"]",
"category": "workflow",
"subcategory": "ui-design",
"usage_scenario": "documentation",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/ui-design/imitate-auto.md"
},
{
"name": "workflow:ui-design:layout-extract",
"name": "workflow:ui-design:import-from-code",
"command": "/workflow:ui-design:import-from-code",
"description": "Import design system from code files (CSS/JS/HTML/SCSS) using parallel agent analysis with final synthesis",
"arguments": "[--base-path <path>] [--css \\\"<glob>\\\"] [--js \\\"<glob>\\\"] [--scss \\\"<glob>\\\"] [--html \\\"<glob>\\\"] [--style-files \\\"<glob>\\\"] [--session <id>]",
"category": "workflow",
"subcategory": "ui-design",
"usage_scenario": "planning",
"difficulty": "Intermediate",
"file_path": "workflow/ui-design/import-from-code.md"
},
{
"name": "layout-extract",
"command": "/workflow:ui-design:layout-extract",
"description": "Extract structural layout information from reference images, URLs, or text prompts using Claude analysis",
"arguments": "[--base-path <path>] [--session <id>] [--images \"<glob>\"] [--urls \"<list>\"] [--prompt \"<desc>\"] [--targets \"<list>\"] [--mode <imitate|explore>] [--variants <count>] [--device-type <desktop|mobile|tablet|responsive>]",
"category": "workflow",
"subcategory": "ui-design",
"usage_scenario": "ui-design",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/ui-design/layout-extract.md"
},
{
"name": "workflow:ui-design:style-extract",
"name": "style-extract",
"command": "/workflow:ui-design:style-extract",
"description": "Extract design style from reference images or text prompts using Claude analysis with variant generation",
"arguments": "[--base-path <path>] [--session <id>] [--images \"<glob>\"] [--urls \"<list>\"] [--prompt \"<desc>\"] [--mode <imitate|explore>] [--variants <count>]",
"category": "workflow",
"subcategory": "ui-design",
"usage_scenario": "documentation",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/ui-design/style-extract.md"
},
{
"name": "workflow:ui-design:update",
"name": "update",
"command": "/workflow:ui-design:update",
"description": "Update brainstorming artifacts with finalized design system references from selected prototypes",
"arguments": "--session <session_id> [--selected-prototypes \"<list>\"]",
"category": "workflow",
"subcategory": "ui-design",
"usage_scenario": "ui-design",
"difficulty": "Advanced",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/ui-design/update.md"
}
]

File diff suppressed because it is too large Load Diff

View File

@@ -1,616 +1,243 @@
{
"cli:analyze": {
"related_commands": [
"cli:chat",
"cli:mode:code-analysis"
],
"next_steps": [],
"prerequisites": []
},
"cli:chat": {
"related_commands": [
"cli:analyze",
"memory:load"
],
"next_steps": [],
"prerequisites": []
},
"cli:cli-init": {
"related_commands": [],
"next_steps": [],
"prerequisites": []
},
"cli:codex-execute": {
"related_commands": [
"cli:execute",
"task:execute"
],
"next_steps": [],
"prerequisites": []
},
"cli:discuss-plan": {
"related_commands": [],
"next_steps": [],
"prerequisites": []
},
"cli:execute": {
"related_commands": [
"cli:codex-execute",
"task:execute"
],
"next_steps": [
"workflow:status"
],
"prerequisites": []
},
"cli:mode:bug-diagnosis": {
"related_commands": [
"cli:mode:code-analysis",
"cli:execute"
],
"next_steps": [],
"prerequisites": []
},
"cli:mode:code-analysis": {
"related_commands": [
"cli:analyze",
"cli:mode:bug-diagnosis"
],
"next_steps": [],
"prerequisites": []
},
"cli:mode:plan": {
"related_commands": [
"workflow:plan",
"cli:analyze"
],
"next_steps": [],
"prerequisites": []
},
"enhance-prompt": {
"related_commands": [
"workflow:plan",
"cli:execute"
],
"next_steps": [],
"prerequisites": []
},
"memory:docs": {
"related_commands": [
"memory:update-full",
"memory:update-related"
],
"next_steps": [],
"prerequisites": []
},
"memory:load-skill-memory": {
"related_commands": [
"memory:load"
],
"next_steps": [],
"prerequisites": [
"memory:skill-memory"
]
},
"memory:load": {
"related_commands": [
"memory:skill-memory",
"memory:load-skill-memory"
],
"next_steps": [
"workflow:plan",
"cli:execute"
],
"prerequisites": []
},
"memory:skill-memory": {
"related_commands": [
"memory:docs",
"memory:update-full"
],
"next_steps": [
"memory:load-skill-memory"
],
"prerequisites": []
},
"memory:tech-research": {
"related_commands": [],
"next_steps": [
"memory:load-skill-memory"
],
"prerequisites": []
},
"memory:update-full": {
"related_commands": [
"memory:update-related"
],
"next_steps": [],
"prerequisites": [
"memory:docs"
]
},
"memory:update-related": {
"related_commands": [
"memory:update-full",
"memory:docs"
],
"next_steps": [],
"prerequisites": []
},
"memory:workflow-skill-memory": {
"related_commands": [
"memory:skill-memory",
"workflow:session:list"
],
"next_steps": [],
"prerequisites": []
},
"task:breakdown": {
"related_commands": [],
"next_steps": [
"task:execute"
],
"prerequisites": [
"task:create"
]
},
"task:create": {
"related_commands": [
"task:breakdown",
"workflow:plan"
],
"next_steps": [
"task:execute"
],
"prerequisites": []
},
"task:execute": {
"related_commands": [
"workflow:execute",
"workflow:status",
"task:create"
],
"next_steps": [],
"prerequisites": []
},
"task:replan": {
"related_commands": [
"task:execute",
"workflow:action-plan-verify"
],
"next_steps": [],
"prerequisites": []
},
"version": {
"related_commands": [],
"next_steps": [],
"prerequisites": []
},
"workflow:action-plan-verify": {
"related_commands": [
"workflow:status"
],
"next_steps": [
"workflow:execute"
],
"prerequisites": [
"workflow:plan"
]
},
"workflow:brainstorm:api-designer": {
"related_commands": [
"workflow:brainstorm:synthesis",
"workflow:plan"
],
"next_steps": [],
"prerequisites": []
},
"workflow:brainstorm:artifacts": {
"related_commands": [
"workflow:brainstorm:synthesis",
"workflow:plan"
],
"next_steps": [
"workflow:plan"
],
"prerequisites": []
},
"workflow:brainstorm:auto-parallel": {
"related_commands": [
"workflow:brainstorm:synthesis",
"workflow:plan"
],
"next_steps": [
"workflow:brainstorm:synthesis"
],
"prerequisites": []
},
"workflow:brainstorm:data-architect": {
"related_commands": [
"workflow:brainstorm:synthesis",
"workflow:plan"
],
"next_steps": [],
"prerequisites": []
},
"workflow:brainstorm:product-manager": {
"related_commands": [
"workflow:brainstorm:synthesis",
"workflow:plan"
],
"next_steps": [],
"prerequisites": []
},
"workflow:brainstorm:product-owner": {
"related_commands": [
"workflow:brainstorm:synthesis",
"workflow:plan"
],
"next_steps": [],
"prerequisites": []
},
"workflow:brainstorm:scrum-master": {
"related_commands": [
"workflow:brainstorm:synthesis",
"workflow:plan"
],
"next_steps": [],
"prerequisites": []
},
"workflow:brainstorm:subject-matter-expert": {
"related_commands": [
"workflow:brainstorm:synthesis",
"workflow:plan"
],
"next_steps": [],
"prerequisites": []
},
"workflow:brainstorm:synthesis": {
"related_commands": [
"workflow:brainstorm:synthesis",
"workflow:plan",
"workflow:brainstorm:artifacts"
],
"next_steps": [],
"prerequisites": []
},
"workflow:brainstorm:system-architect": {
"related_commands": [
"workflow:brainstorm:synthesis",
"workflow:plan"
],
"next_steps": [],
"prerequisites": []
},
"workflow:brainstorm:ui-designer": {
"related_commands": [
"workflow:brainstorm:synthesis",
"workflow:plan"
],
"next_steps": [],
"prerequisites": []
},
"workflow:brainstorm:ux-expert": {
"related_commands": [
"workflow:brainstorm:synthesis",
"workflow:plan"
],
"next_steps": [],
"prerequisites": []
},
"workflow:execute": {
"related_commands": [
"workflow:status",
"task:execute",
"workflow:session:start"
],
"next_steps": [
"workflow:review",
"workflow:test-cycle-execute"
],
"prerequisites": [
"workflow:plan"
]
},
"workflow:plan": {
"related_commands": [
"workflow:status",
"workflow:tdd-plan",
"workflow:session:start"
"calls_internally": [
"workflow:session:start",
"workflow:tools:context-gather",
"workflow:tools:conflict-resolution",
"workflow:tools:task-generate",
"workflow:tools:task-generate-agent"
],
"next_steps": [
"workflow:action-plan-verify",
"workflow:execute"
],
"prerequisites": []
},
"workflow:resume": {
"related_commands": [
"workflow:session:start",
"workflow:status",
"workflow:execute"
],
"next_steps": [],
"prerequisites": []
},
"workflow:review": {
"related_commands": [
"workflow:status"
"alternatives": [
"workflow:tdd-plan"
],
"next_steps": [],
"prerequisites": [
"workflow:execute"
]
},
"workflow:session:complete": {
"related_commands": [
"workflow:review",
"workflow:session:list"
],
"next_steps": [],
"prerequisites": [
"workflow:execute"
]
},
"workflow:session:list": {
"related_commands": [
"workflow:session:start",
"workflow:session:resume"
],
"next_steps": [],
"prerequisites": []
},
"workflow:session:resume": {
"related_commands": [
"workflow:resume",
"workflow:status"
],
"next_steps": [],
"prerequisites": [
"workflow:session:start"
]
},
"workflow:session:start": {
"related_commands": [
"workflow:session:list",
"workflow:session:resume"
],
"next_steps": [
"workflow:plan",
"workflow:execute"
],
"prerequisites": []
},
"workflow:status": {
"related_commands": [
"workflow:execute",
"workflow:plan",
"task:execute"
],
"next_steps": [],
"prerequisites": []
},
"workflow:tdd-plan": {
"related_commands": [
"workflow:plan",
"workflow:test-cycle-execute"
"calls_internally": [
"workflow:session:start",
"workflow:tools:context-gather",
"workflow:tools:task-generate-tdd"
],
"next_steps": [
"workflow:execute",
"workflow:tdd-verify"
"workflow:tdd-verify",
"workflow:status",
"workflow:execute"
],
"alternatives": [
"workflow:plan"
],
"prerequisites": []
},
"workflow:tdd-verify": {
"related_commands": [
"workflow:test-cycle-execute",
"workflow:review"
],
"next_steps": [],
"workflow:execute": {
"prerequisites": [
"workflow:plan",
"workflow:tdd-plan"
],
"related": [
"workflow:status",
"workflow:resume"
],
"next_steps": [
"workflow:review",
"workflow:tdd-verify"
]
},
"workflow:test-cycle-execute": {
"related_commands": [
"workflow:tdd-verify",
"workflow:action-plan-verify": {
"prerequisites": [
"workflow:plan"
],
"next_steps": [
"workflow:execute"
],
"next_steps": [],
"related": [
"workflow:status"
]
},
"workflow:tdd-verify": {
"prerequisites": [
"workflow:test-gen",
"workflow:test-fix-gen"
"workflow:execute"
],
"related": [
"workflow:tools:tdd-coverage-analysis"
]
},
"workflow:session:start": {
"next_steps": [
"workflow:plan",
"workflow:execute"
],
"related": [
"workflow:session:list",
"workflow:session:resume"
]
},
"workflow:session:resume": {
"alternatives": [
"workflow:resume"
],
"related": [
"workflow:session:list",
"workflow:status"
]
},
"workflow:resume": {
"alternatives": [
"workflow:session:resume"
],
"related": [
"workflow:status"
]
},
"task:create": {
"next_steps": [
"task:execute"
],
"related": [
"task:breakdown"
]
},
"task:breakdown": {
"next_steps": [
"task:execute"
],
"related": [
"task:create"
]
},
"task:replan": {
"prerequisites": [
"workflow:plan"
],
"related": [
"workflow:action-plan-verify"
]
},
"task:execute": {
"prerequisites": [
"task:create",
"task:breakdown",
"workflow:plan"
],
"related": [
"workflow:status"
]
},
"memory:docs": {
"calls_internally": [
"workflow:session:start",
"workflow:tools:context-gather"
],
"next_steps": [
"workflow:execute"
]
},
"memory:skill-memory": {
"next_steps": [
"workflow:plan",
"cli:analyze"
],
"related": [
"memory:load-skill-memory"
]
},
"memory:workflow-skill-memory": {
"related": [
"memory:skill-memory"
],
"next_steps": [
"workflow:plan"
]
},
"cli:execute": {
"alternatives": [
"cli:codex-execute"
],
"related": [
"cli:analyze",
"cli:chat"
]
},
"cli:analyze": {
"related": [
"cli:chat",
"cli:mode:code-analysis"
],
"next_steps": [
"cli:execute"
]
},
"workflow:brainstorm:artifacts": {
"next_steps": [
"workflow:brainstorm:synthesis",
"workflow:plan"
],
"related": [
"workflow:brainstorm:auto-parallel"
]
},
"workflow:brainstorm:synthesis": {
"prerequisites": [
"workflow:brainstorm:artifacts"
],
"next_steps": [
"workflow:plan"
]
},
"workflow:brainstorm:auto-parallel": {
"next_steps": [
"workflow:brainstorm:synthesis",
"workflow:plan"
],
"related": [
"workflow:brainstorm:artifacts"
]
},
"workflow:test-gen": {
"prerequisites": [
"workflow:execute"
],
"next_steps": [
"workflow:test-cycle-execute"
]
},
"workflow:test-fix-gen": {
"related_commands": [],
"alternatives": [
"workflow:test-gen"
],
"next_steps": [
"workflow:test-cycle-execute"
],
"prerequisites": []
},
"workflow:test-gen": {
"related_commands": [],
"next_steps": [
"workflow:test-cycle-execute"
],
"prerequisites": [
"workflow:execute"
]
},
"workflow:tools:conflict-resolution": {
"related_commands": [],
"next_steps": [
"workflow:tools:task-generate"
],
"workflow:test-cycle-execute": {
"prerequisites": [
"workflow:tools:context-gather"
]
},
"workflow:tools:context-gather": {
"related_commands": [
"memory:load",
"workflow:tools:conflict-resolution"
"workflow:test-gen",
"workflow:test-fix-gen"
],
"next_steps": [],
"prerequisites": [
"workflow:plan"
]
},
"workflow:tools:task-generate-agent": {
"related_commands": [
"workflow:tools:task-generate"
],
"next_steps": [
"workflow:execute"
],
"prerequisites": [
"workflow:plan"
]
},
"workflow:tools:task-generate-tdd": {
"related_commands": [
"workflow:tools:task-generate"
],
"next_steps": [],
"prerequisites": [
"workflow:tdd-plan"
]
},
"workflow:tools:task-generate": {
"related_commands": [],
"next_steps": [
"workflow:execute"
],
"prerequisites": [
"workflow:plan"
]
},
"workflow:tools:tdd-coverage-analysis": {
"related_commands": [
"related": [
"workflow:tdd-verify"
],
"next_steps": [],
"prerequisites": [
"workflow:tdd-plan"
]
},
"workflow:tools:test-concept-enhanced": {
"related_commands": [],
"next_steps": [],
"prerequisites": [
"workflow:tools:test-context-gather"
]
},
"workflow:tools:test-context-gather": {
"related_commands": [
"workflow:tools:context-gather"
],
"next_steps": [],
"prerequisites": [
"workflow:test-gen"
]
},
"workflow:tools:test-task-generate": {
"related_commands": [
"workflow:tools:task-generate"
],
"next_steps": [],
"prerequisites": [
"workflow:test-gen"
]
},
"workflow:ui-design:animation-extract": {
"related_commands": [
"workflow:plan",
"workflow:brainstorm:ui-designer"
],
"next_steps": [],
"prerequisites": []
},
"workflow:ui-design:batch-generate": {
"related_commands": [
"workflow:plan",
"workflow:brainstorm:ui-designer"
],
"next_steps": [],
"prerequisites": []
},
"workflow:ui-design:capture": {
"related_commands": [
"workflow:plan",
"workflow:brainstorm:ui-designer"
],
"next_steps": [
"workflow:ui-design:layout-extract",
"workflow:ui-design:style-extract"
],
"prerequisites": []
},
"workflow:ui-design:explore-auto": {
"related_commands": [
"workflow:plan",
"workflow:brainstorm:ui-designer"
"calls_internally": [
"workflow:ui-design:capture",
"workflow:ui-design:style-extract",
"workflow:ui-design:layout-extract"
],
"next_steps": [
"workflow:ui-design:generate",
"workflow:ui-design:update"
],
"prerequisites": []
},
"workflow:ui-design:explore-layers": {
"related_commands": [
"workflow:plan",
"workflow:brainstorm:ui-designer"
],
"next_steps": [],
"prerequisites": []
},
"workflow:ui-design:generate": {
"related_commands": [
"workflow:plan",
"workflow:brainstorm:ui-designer"
],
"next_steps": [
"workflow:ui-design:update",
"workflow:plan"
],
"prerequisites": []
"workflow:ui-design:generate"
]
},
"workflow:ui-design:imitate-auto": {
"related_commands": [
"workflow:plan",
"workflow:brainstorm:ui-designer"
],
"next_steps": [],
"prerequisites": []
},
"workflow:ui-design:layout-extract": {
"related_commands": [
"workflow:plan",
"workflow:brainstorm:ui-designer"
"calls_internally": [
"workflow:ui-design:capture"
],
"next_steps": [
"workflow:ui-design:generate"
],
"prerequisites": []
},
"workflow:ui-design:style-extract": {
"related_commands": [
"workflow:plan",
"workflow:brainstorm:ui-designer"
],
"next_steps": [
"workflow:ui-design:generate"
],
"prerequisites": []
},
"workflow:ui-design:update": {
"related_commands": [
"workflow:plan",
"workflow:brainstorm:ui-designer"
],
"next_steps": [],
"prerequisites": []
]
}
}

View File

@@ -1,142 +1,156 @@
[
{
"name": "cli:codex-execute",
"description": "Multi-stage Codex execution with automatic task decomposition into grouped subtasks using resume mechanism for context continuity",
"arguments": "[--verify-git] task description or task-id",
"category": "cli",
"subcategory": "core",
"usage_scenario": "session-management",
"name": "plan",
"command": "/workflow:plan",
"description": "5-phase planning workflow with Gemini analysis and action-planning-agent task generation, outputs IMPL_PLAN.md and task JSONs with optional CLI auto-execution",
"arguments": "[--agent] [--cli-execute] \\\"text description\\\"|file.md",
"category": "workflow",
"subcategory": null,
"usage_scenario": "planning",
"difficulty": "Intermediate",
"file_path": "cli/codex-execute.md"
"file_path": "workflow/plan.md"
},
{
"name": "cli:execute",
"description": "Autonomous code implementation with YOLO auto-approval using Gemini/Qwen/Codex, supports task ID or description input with automatic file pattern detection",
"arguments": "[--agent] [--tool codex|gemini|qwen] [--enhance] description or task-id",
"category": "cli",
"subcategory": "core",
"usage_scenario": "session-management",
"difficulty": "Intermediate",
"file_path": "cli/execute.md"
},
{
"name": "memory:load",
"description": "Delegate to universal-executor agent to analyze project via Gemini/Qwen CLI and return JSON core content package for task context",
"arguments": "[--tool gemini|qwen] \\\"task context description\\\"",
"category": "memory",
"subcategory": "core",
"name": "execute",
"command": "/workflow:execute",
"description": "Coordinate agent execution for workflow tasks with automatic session discovery, parallel task processing, and status tracking",
"arguments": "[--resume-session=\\\"session-id\\\"]",
"category": "workflow",
"subcategory": null,
"usage_scenario": "implementation",
"difficulty": "Intermediate",
"file_path": "memory/load.md"
"file_path": "workflow/execute.md"
},
{
"name": "memory:skill-memory",
"description": "4-phase autonomous orchestrator: check docs → /memory:docs planning → /workflow:execute → generate SKILL.md with progressive loading index (skips phases 2-3 if docs exist)",
"arguments": "[path] [--tool <gemini|qwen|codex>] [--regenerate] [--mode <full|partial>] [--cli-execute]",
"category": "memory",
"subcategory": "core",
"usage_scenario": "documentation",
"name": "workflow:status",
"command": "/workflow:status",
"description": "Generate on-demand task status views from JSON task data with optional task-id filtering for detailed view",
"arguments": "[optional: task-id]",
"category": "workflow",
"subcategory": null,
"usage_scenario": "session-management",
"difficulty": "Beginner",
"file_path": "workflow/status.md"
},
{
"name": "start",
"command": "/workflow:session:start",
"description": "Discover existing sessions or start new workflow session with intelligent session management and conflict detection",
"arguments": "[--auto|--new] [optional: task description for new session]",
"category": "workflow",
"subcategory": "session",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "memory/skill-memory.md"
"file_path": "workflow/session/start.md"
},
{
"name": "task:create",
"description": "Generate task JSON from natural language description with automatic file pattern detection, scope inference, and dependency analysis",
"arguments": "\\\"task title\\\"",
"category": "task",
"subcategory": "core",
"usage_scenario": "testing",
"difficulty": "Intermediate",
"file_path": "task/create.md"
},
{
"name": "task:execute",
"name": "execute",
"command": "/task:execute",
"description": "Execute task JSON using appropriate agent (@doc-generator/@implementation-agent/@test-agent) with pre-analysis context loading and status tracking",
"arguments": "task-id",
"category": "task",
"subcategory": "core",
"subcategory": null,
"usage_scenario": "implementation",
"difficulty": "Intermediate",
"file_path": "task/execute.md"
},
{
"name": "version",
"description": "Display Claude Code version information and check for updates",
"arguments": "",
"category": "general",
"subcategory": "core",
"usage_scenario": "utilities",
"difficulty": "Basic",
"file_path": "version.md"
"name": "analyze",
"command": "/cli:analyze",
"description": "Read-only codebase analysis using Gemini (default), Qwen, or Codex with auto-pattern detection and template selection",
"arguments": "[--agent] [--tool codex|gemini|qwen] [--enhance] analysis target",
"category": "cli",
"subcategory": null,
"usage_scenario": "analysis",
"difficulty": "Beginner",
"file_path": "cli/analyze.md"
},
{
"name": "workflow:action-plan-verify",
"name": "chat",
"command": "/cli:chat",
"description": "Read-only Q&A interaction with Gemini/Qwen/Codex for codebase questions with automatic context inference",
"arguments": "[--agent] [--tool codex|gemini|qwen] [--enhance] inquiry",
"category": "cli",
"subcategory": null,
"usage_scenario": "general",
"difficulty": "Beginner",
"file_path": "cli/chat.md"
},
{
"name": "docs",
"command": "/memory:docs",
"description": "Plan documentation workflow with dynamic grouping (≤10 docs/task), generates IMPL tasks for parallel module trees, README, ARCHITECTURE, and HTTP API docs",
"arguments": "[path] [--tool <gemini|qwen|codex>] [--mode <full|partial>] [--cli-execute]",
"category": "memory",
"subcategory": null,
"usage_scenario": "documentation",
"difficulty": "Intermediate",
"file_path": "memory/docs.md"
},
{
"name": "artifacts",
"command": "/workflow:brainstorm:artifacts",
"description": "Interactive clarification generating confirmed guidance specification through role-based analysis and synthesis",
"arguments": "topic or challenge description [--count N]",
"category": "workflow",
"subcategory": "brainstorm",
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/brainstorm/artifacts.md"
},
{
"name": "action-plan-verify",
"command": "/workflow:action-plan-verify",
"description": "Perform non-destructive cross-artifact consistency analysis between IMPL_PLAN.md and task JSONs with quality gate validation",
"arguments": "[optional: --session session-id]",
"category": "workflow",
"subcategory": "core",
"subcategory": null,
"usage_scenario": "planning",
"difficulty": "Intermediate",
"file_path": "workflow/action-plan-verify.md"
},
{
"name": "workflow:execute",
"description": "Coordinate agent execution for workflow tasks with automatic session discovery, parallel task processing, and status tracking",
"arguments": "[--resume-session=\\\"session-id\\\"]",
"category": "workflow",
"subcategory": "core",
"usage_scenario": "session-management",
"difficulty": "Intermediate",
"file_path": "workflow/execute.md"
},
{
"name": "workflow:plan",
"description": "5-phase planning workflow with Gemini analysis and action-planning-agent task generation, outputs IMPL_PLAN.md and task JSONs with optional CLI auto-execution",
"arguments": "[--agent] [--cli-execute] \\\"text description\\\"|file.md",
"category": "workflow",
"subcategory": "core",
"usage_scenario": "session-management",
"difficulty": "Intermediate",
"file_path": "workflow/plan.md"
},
{
"name": "workflow:resume",
"name": "resume",
"command": "/workflow:resume",
"description": "Resume paused workflow session with automatic progress analysis, pending task identification, and conflict detection",
"arguments": "session-id for workflow session to resume",
"category": "workflow",
"subcategory": "core",
"usage_scenario": "implementation",
"subcategory": null,
"usage_scenario": "session-management",
"difficulty": "Intermediate",
"file_path": "workflow/resume.md"
},
{
"name": "workflow:session:start",
"description": "Discover existing sessions or start new workflow session with intelligent session management and conflict detection",
"arguments": "[--auto|--new] [optional: task description for new session]",
"name": "review",
"command": "/workflow:review",
"description": "Post-implementation review with specialized types (security/architecture/action-items/quality) using analysis agents and Gemini",
"arguments": "[--type=security|architecture|action-items|quality] [optional: session-id]",
"category": "workflow",
"subcategory": "session",
"usage_scenario": "session-management",
"subcategory": null,
"usage_scenario": "analysis",
"difficulty": "Intermediate",
"file_path": "workflow/session/start.md"
"file_path": "workflow/review.md"
},
{
"name": "workflow:status",
"description": "Generate on-demand task status views from JSON task data with optional task-id filtering for detailed view",
"arguments": "[optional: task-id]",
"category": "workflow",
"subcategory": "core",
"usage_scenario": "monitoring",
"difficulty": "Basic",
"file_path": "workflow/status.md"
"name": "version",
"command": "/version",
"description": "Display Claude Code version information and check for updates",
"arguments": "",
"category": "general",
"subcategory": null,
"usage_scenario": "general",
"difficulty": "Beginner",
"file_path": "version.md"
},
{
"name": "workflow:test-cycle-execute",
"description": "Execute test-fix workflow with dynamic task generation and iterative fix cycles until all tests pass or max iterations reached",
"arguments": "[--resume-session=\\\"session-id\\\"] [--max-iterations=N]",
"category": "workflow",
"subcategory": "core",
"usage_scenario": "session-management",
"name": "enhance-prompt",
"command": "/enhance-prompt",
"description": "Enhanced prompt transformation using session memory and codebase analysis with --enhance flag detection",
"arguments": "user input to enhance",
"category": "general",
"subcategory": null,
"usage_scenario": "general",
"difficulty": "Intermediate",
"file_path": "workflow/test-cycle-execute.md"
"file_path": "enhance-prompt.md"
}
]

View File

@@ -107,7 +107,43 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*), Glob(*), Write(*
## 6-Phase Execution
### Phase 0a: Intelligent Prompt Parsing
### Phase 0a: Intelligent Path Detection & Source Selection
```bash
# Step 1: Detect if prompt/images contain existing file paths
code_files_detected = false
code_base_path = null
has_visual_input = false
IF --prompt:
# Extract potential file paths from prompt
potential_paths = extract_paths_from_text(--prompt)
FOR path IN potential_paths:
IF file_or_directory_exists(path):
code_files_detected = true
code_base_path = path
BREAK
IF --images:
# Check if images parameter points to existing files
IF glob_matches_files(--images):
has_visual_input = true
# Step 2: Determine design source strategy
design_source = "unknown"
IF code_files_detected AND has_visual_input:
design_source = "hybrid" # Both code and visual
ELSE IF code_files_detected:
design_source = "code_only" # Only code files
ELSE IF has_visual_input OR --prompt:
design_source = "visual_only" # Only visual/prompt
ELSE:
ERROR: "No design source provided (code files, images, or prompt required)"
EXIT 1
STORE: design_source, code_base_path, has_visual_input
```
### Phase 0a-2: Intelligent Prompt Parsing
```bash
# Parse variant counts from prompt or use explicit/default values
IF --prompt AND (NOT --style-variants OR NOT --layout-variants):
@@ -267,29 +303,101 @@ detect_target_type(target_list):
RETURN "component" IF component_matches > page_matches ELSE "page"
```
### Phase 1: Style Extraction
### Phase 0d: Code Import & Completeness Assessment (Conditional)
```bash
command = "/workflow:ui-design:style-extract --base-path \"{base_path}\" " +
(--images ? "--images \"{images}\" " : "") +
(--prompt ? "--prompt \"{prompt}\" " : "") +
"--mode explore --variants {style_variants}"
SlashCommand(command)
IF design_source IN ["code_only", "hybrid"]:
REPORT: "🔍 Phase 0d: Code Import ({design_source})"
command = "/workflow:ui-design:import-from-code --base-path \"{base_path}\" --base-path \"{code_base_path}\""
SlashCommand(command)
# Output: {style_variants} style cards with design_attributes
# SlashCommand blocks until phase complete
# Upon completion, IMMEDIATELY execute Phase 2.3 (auto-continue)
# Check file existence and assess completeness
style_exists = exists("{base_path}/style-extraction/style-1/design-tokens.json")
animation_exists = exists("{base_path}/animation-extraction/animation-tokens.json")
layout_exists = exists("{base_path}/layout-extraction/layout-templates.json")
style_complete = false
animation_complete = false
layout_complete = false
missing_categories = []
# Style completeness check
IF style_exists:
tokens = Read("{base_path}/style-extraction/style-1/design-tokens.json")
style_complete = (
tokens.colors?.brand && tokens.colors?.surface &&
tokens.typography?.font_family && tokens.spacing &&
Object.keys(tokens.colors.brand || {}).length >= 3 &&
Object.keys(tokens.spacing || {}).length >= 8
)
IF NOT style_complete AND tokens._metadata?.completeness?.missing_categories:
missing_categories.extend(tokens._metadata.completeness.missing_categories)
ELSE:
missing_categories.push("style tokens")
# Animation completeness check
IF animation_exists:
anim = Read("{base_path}/animation-extraction/animation-tokens.json")
animation_complete = (
anim.duration && anim.easing &&
Object.keys(anim.duration || {}).length >= 3 &&
Object.keys(anim.easing || {}).length >= 3
)
IF NOT animation_complete AND anim._metadata?.completeness?.missing_items:
missing_categories.extend(anim._metadata.completeness.missing_items)
ELSE:
missing_categories.push("animation tokens")
# Layout completeness check
IF layout_exists:
layouts = Read("{base_path}/layout-extraction/layout-templates.json")
layout_complete = (
layouts.layout_templates?.length >= 3 &&
layouts.extraction_metadata?.layout_system?.type &&
layouts.extraction_metadata?.responsive?.breakpoints
)
IF NOT layout_complete AND layouts.extraction_metadata?.completeness?.missing_items:
missing_categories.extend(layouts.extraction_metadata.completeness.missing_items)
ELSE:
missing_categories.push("layout templates")
needs_visual_supplement = false
IF design_source == "code_only" AND NOT (style_complete AND layout_complete):
REPORT: "⚠️ Missing: {', '.join(missing_categories)}"
REPORT: "Options: 'continue' | 'supplement: <images>' | 'cancel'"
user_response = WAIT_FOR_USER_INPUT()
MATCH user_response:
"continue"needs_visual_supplement = false
"supplement: ..."needs_visual_supplement = true; --images = extract_path(user_response)
"cancel" → EXIT 0
default → needs_visual_supplement = false
ELSE IF design_source == "hybrid":
needs_visual_supplement = true
STORE: needs_visual_supplement, style_complete, animation_complete, layout_complete
```
### Phase 2.3: Animation Extraction (Optional - Interactive Mode)
### Phase 1: Style Extraction
```bash
# Animation extraction for motion design patterns
REPORT: "🚀 Phase 2.3: Animation Extraction (interactive mode)"
REPORT: " → Mode: Interactive specification"
REPORT: " → Purpose: Define motion design patterns"
IF design_source == "visual_only" OR needs_visual_supplement:
REPORT: "🎨 Phase 1: Style Extraction (variants: {style_variants})"
command = "/workflow:ui-design:style-extract --base-path \"{base_path}\" " +
(--images ? "--images \"{images}\" " : "") +
(--prompt ? "--prompt \"{prompt}\" " : "") +
"--mode explore --variants {style_variants}"
SlashCommand(command)
ELSE:
REPORT: "✅ Phase 1: Style (Using Code Import)"
```
command = "/workflow:ui-design:animation-extract --base-path \"{base_path}\" --mode interactive"
SlashCommand(command)
### Phase 2.3: Animation Extraction
```bash
IF design_source == "visual_only" OR NOT animation_complete:
REPORT: "🚀 Phase 2.3: Animation Extraction"
command = "/workflow:ui-design:animation-extract --base-path \"{base_path}\" --mode interactive"
SlashCommand(command)
ELSE:
REPORT: "✅ Phase 2.3: Animation (Using Code Import)"
# Output: animation-tokens.json + animation-guide.md
# SlashCommand blocks until phase complete
@@ -299,23 +407,16 @@ SlashCommand(command)
### Phase 2.5: Layout Extraction
```bash
targets_string = ",".join(inferred_target_list)
command = "/workflow:ui-design:layout-extract --base-path \"{base_path}\" " +
(--images ? "--images \"{images}\" " : "") +
(--prompt ? "--prompt \"{prompt}\" " : "") +
"--targets \"{targets_string}\" " +
"--mode explore --variants {layout_variants} " +
"--device-type \"{device_type}\""
REPORT: "🚀 Phase 2.5: Layout Extraction (explore mode)"
REPORT: " → Targets: {targets_string}"
REPORT: " → Layout variants: {layout_variants}"
REPORT: " → Device: {device_type}"
SlashCommand(command)
# Output: layout-templates.json with {targets × layout_variants} layout structures
# SlashCommand blocks until phase complete
# Upon completion, IMMEDIATELY execute Phase 3 (auto-continue)
IF (design_source == "visual_only" OR needs_visual_supplement) OR (NOT layout_complete):
REPORT: "🚀 Phase 2.5: Layout Extraction ({targets_string}, variants: {layout_variants}, device: {device_type})"
command = "/workflow:ui-design:layout-extract --base-path \"{base_path}\" " +
(--images ? "--images \"{images}\" " : "") +
(--prompt ? "--prompt \"{prompt}\" " : "") +
"--targets \"{targets_string}\" --mode explore --variants {layout_variants} --device-type \"{device_type}\""
SlashCommand(command)
ELSE:
REPORT: "✅ Phase 2.5: Layout (Using Code Import)"
```
### Phase 3: UI Assembly

View File

@@ -115,6 +115,23 @@ ELSE:
# Create base directory
Bash(mkdir -p "{base_path}")
# Step 0.1: Intelligent Path Detection
code_files_detected = false
code_base_path = null
design_source = "web" # Default for imitate-auto
IF --prompt:
# Extract potential file paths from prompt
potential_paths = extract_paths_from_text(--prompt)
FOR path IN potential_paths:
IF file_or_directory_exists(path):
code_files_detected = true
code_base_path = path
design_source = "hybrid" # Web + Code
BREAK
STORE: design_source, code_base_path
# Parse url-map
url_map_string = {--url-map}
VALIDATE: url_map_string is not empty, "--url-map parameter is required"
@@ -196,11 +213,110 @@ TodoWrite({todos: [
]})
```
### Phase 0.5: Code Import & Completeness Assessment (Conditional)
```bash
# Only execute if code files detected
IF design_source == "hybrid":
REPORT: "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
REPORT: "🔍 Phase 0.5: Code Import & Analysis"
REPORT: "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
REPORT: " → Source: {code_base_path}"
REPORT: " → Mode: Hybrid (Web + Code)"
command = "/workflow:ui-design:import-from-code --base-path \"{base_path}\" " +
"--base-path \"{code_base_path}\""
TRY:
SlashCommand(command)
CATCH error:
WARN: "Code import failed: {error}"
WARN: "Falling back to web-only mode"
design_source = "web"
IF design_source == "hybrid":
# Check file existence and assess completeness
style_exists = exists("{base_path}/style-extraction/style-1/design-tokens.json")
animation_exists = exists("{base_path}/animation-extraction/animation-tokens.json")
layout_exists = exists("{base_path}/layout-extraction/layout-templates.json")
style_complete = false
animation_complete = false
layout_complete = false
missing_categories = []
# Style completeness check
IF style_exists:
tokens = Read("{base_path}/style-extraction/style-1/design-tokens.json")
style_complete = (
tokens.colors?.brand && tokens.colors?.surface &&
tokens.typography?.font_family && tokens.spacing &&
Object.keys(tokens.colors.brand || {}).length >= 3 &&
Object.keys(tokens.spacing || {}).length >= 8
)
IF NOT style_complete AND tokens._metadata?.completeness?.missing_categories:
missing_categories.extend(tokens._metadata.completeness.missing_categories)
ELSE:
missing_categories.push("style tokens")
# Animation completeness check
IF animation_exists:
anim = Read("{base_path}/animation-extraction/animation-tokens.json")
animation_complete = (
anim.duration && anim.easing &&
Object.keys(anim.duration || {}).length >= 3 &&
Object.keys(anim.easing || {}).length >= 3
)
IF NOT animation_complete AND anim._metadata?.completeness?.missing_items:
missing_categories.extend(anim._metadata.completeness.missing_items)
ELSE:
missing_categories.push("animation tokens")
# Layout completeness check
IF layout_exists:
layouts = Read("{base_path}/layout-extraction/layout-templates.json")
layout_complete = (
layouts.layout_templates?.length >= 3 &&
layouts.extraction_metadata?.layout_system?.type &&
layouts.extraction_metadata?.responsive?.breakpoints
)
IF NOT layout_complete AND layouts.extraction_metadata?.completeness?.missing_items:
missing_categories.extend(layouts.extraction_metadata.completeness.missing_items)
ELSE:
missing_categories.push("layout templates")
# Report code analysis results
IF len(missing_categories) > 0:
REPORT: ""
REPORT: "⚠️ Code Analysis Partial"
REPORT: "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
REPORT: "Missing Design Elements:"
FOR category IN missing_categories:
REPORT: " • {category}"
REPORT: ""
REPORT: "Web screenshots will supplement missing elements"
REPORT: "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
ELSE:
REPORT: ""
REPORT: "✅ Code Analysis Complete"
REPORT: "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
REPORT: "All design elements extracted from code"
REPORT: "Web screenshots will verify and enhance findings"
REPORT: "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
STORE: style_complete, animation_complete, layout_complete
TodoWrite(mark_completed: "Initialize and parse url-map",
mark_in_progress: capture_mode == "batch" ? f"Batch screenshot capture ({len(target_names)} targets)" : f"Deep exploration (depth {depth})")
```
### Phase 1: Screenshot Capture (Dual Mode)
```bash
REPORT: "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
REPORT: "🚀 Phase 1: Screenshot Capture"
IF design_source == "hybrid":
REPORT: " → Purpose: Verify and supplement code analysis"
REPORT: "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
IF capture_mode == "batch":
@@ -264,161 +380,84 @@ TodoWrite(mark_completed: f"Batch screenshot capture ({len(target_names)} target
mark_in_progress: "Extract style (visual tokens)")
```
### Phase 2: Style Extraction (Visual Tokens)
### Phase 2: Style Extraction
```bash
REPORT: "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
REPORT: "🚀 Phase 2: Style Extraction"
REPORT: "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
# Determine if style extraction needed
skip_style = (design_source == "hybrid" AND style_complete)
# Use all screenshots as input to extract single design system
IF capture_mode == "batch":
images_glob = f"{base_path}/screenshots/*.{{png,jpg,jpeg,webp}}"
ELSE: # deep mode
images_glob = f"{base_path}/screenshots/**/*.{{png,jpg,jpeg,webp}}"
# Build extraction prompt
IF --prompt:
user_guidance = {--prompt}
extraction_prompt = f"Extract visual style tokens from '{primary_target}'. User guidance: {user_guidance}"
IF skip_style:
REPORT: "✅ Phase 2: Style (Using Code Import)"
ELSE:
extraction_prompt = f"Extract visual style tokens from '{primary_target}' with consistency across all pages."
REPORT: "🚀 Phase 2: Style Extraction"
IF capture_mode == "batch":
images_glob = f"{base_path}/screenshots/*.{{png,jpg,jpeg,webp}}"
ELSE:
images_glob = f"{base_path}/screenshots/**/*.{{png,jpg,jpeg,webp}}"
# Build url-map string for style-extract (enables computed styles extraction)
url_map_for_extract = ",".join([f"{name}:{url}" for name, url in url_map.items()])
IF --prompt:
extraction_prompt = f"Extract visual style tokens from '{primary_target}'. {--prompt}"
ELSE:
IF design_source == "hybrid":
extraction_prompt = f"Extract visual style tokens from '{primary_target}' to supplement code-imported design tokens."
ELSE:
extraction_prompt = f"Extract visual style tokens from '{primary_target}' with consistency across all pages."
# Call style-extract command (imitate mode, automatically uses single variant)
# Pass --urls to enable auto-trigger of computed styles extraction
extract_command = f"/workflow:ui-design:style-extract --base-path \"{base_path}\" --images \"{images_glob}\" --urls \"{url_map_for_extract}\" --prompt \"{extraction_prompt}\" --mode imitate"
TRY:
url_map_for_extract = ",".join([f"{name}:{url}" for name, url in url_map.items()])
extract_command = f"/workflow:ui-design:style-extract --base-path \"{base_path}\" --images \"{images_glob}\" --urls \"{url_map_for_extract}\" --prompt \"{extraction_prompt}\" --mode imitate"
SlashCommand(extract_command)
CATCH error:
ERROR: "Style extraction failed: {error}"
ERROR: "Cannot proceed without visual tokens"
EXIT 1
# Verify extraction results
design_tokens_path = "{base_path}/style-extraction/style-1/design-tokens.json"
style_guide_path = "{base_path}/style-extraction/style-1/style-guide.md"
IF NOT exists(design_tokens_path) OR NOT exists(style_guide_path):
ERROR: "style-extract did not generate required files"
EXIT 1
TodoWrite(mark_completed: "Extract style (complete design systems)",
mark_in_progress: "Extract animation (CSS auto mode)")
TodoWrite(mark_completed: "Extract style", mark_in_progress: "Extract animation")
```
### Phase 2.3: Animation Extraction (CSS Auto Mode)
### Phase 2.3: Animation Extraction
```bash
REPORT: "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
REPORT: "🚀 Phase 2.3: Animation Extraction"
REPORT: "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
skip_animation = (design_source == "hybrid" AND animation_complete)
# Build URL list for animation-extract (auto mode for CSS extraction)
url_map_for_animation = ",".join([f"{target}:{url}" for target, url in url_map.items()])
# Call animation-extract command (auto mode for CSS animation extraction)
# Pass --urls to auto-trigger CSS animation/transition extraction via Chrome DevTools
animation_extract_command = f"/workflow:ui-design:animation-extract --base-path \"{base_path}\" --urls \"{url_map_for_animation}\" --mode auto"
TRY:
IF skip_animation:
REPORT: "✅ Phase 2.3: Animation (Using Code Import)"
ELSE:
REPORT: "🚀 Phase 2.3: Animation Extraction"
url_map_for_animation = ",".join([f"{target}:{url}" for target, url in url_map.items()])
animation_extract_command = f"/workflow:ui-design:animation-extract --base-path \"{base_path}\" --urls \"{url_map_for_animation}\" --mode auto"
SlashCommand(animation_extract_command)
CATCH error:
ERROR: "Animation extraction failed: {error}"
ERROR: "Cannot proceed without animation tokens"
EXIT 1
# Verify animation extraction results
animation_tokens_path = "{base_path}/animation-extraction/animation-tokens.json"
animation_guide_path = "{base_path}/animation-extraction/animation-guide.md"
IF NOT exists(animation_tokens_path) OR NOT exists(animation_guide_path):
ERROR: "animation-extract did not generate required files"
EXIT 1
TodoWrite(mark_completed: "Extract animation (CSS auto mode)",
mark_in_progress: "Extract layout (structure templates)")
```
### Phase 2.5: Layout Extraction (Structure Templates)
### Phase 2.5: Layout Extraction
```bash
REPORT: "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
REPORT: "🚀 Phase 2.5: Layout Extraction"
REPORT: "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
skip_layout = (design_source == "hybrid" AND layout_complete)
# Build URL map for layout-extract
url_map_for_layout = ",".join([f"{target}:{url}" for target, url in url_map.items()])
# Call layout-extract command (imitate mode for structure replication)
# Pass --urls to enable auto-trigger of DOM structure extraction
layout_extract_command = f"/workflow:ui-design:layout-extract --base-path \"{base_path}\" --images \"{images_glob}\" --urls \"{url_map_for_layout}\" --targets \"{','.join(target_names)}\" --mode imitate"
TRY:
IF skip_layout:
REPORT: "✅ Phase 2.5: Layout (Using Code Import)"
ELSE:
REPORT: "🚀 Phase 2.5: Layout Extraction"
url_map_for_layout = ",".join([f"{target}:{url}" for target, url in url_map.items()])
layout_extract_command = f"/workflow:ui-design:layout-extract --base-path \"{base_path}\" --images \"{images_glob}\" --urls \"{url_map_for_layout}\" --targets \"{','.join(target_names)}\" --mode imitate"
SlashCommand(layout_extract_command)
CATCH error:
ERROR: "Layout extraction failed: {error}"
ERROR: "Cannot proceed without layout templates"
EXIT 1
# Verify layout extraction results
layout_templates_path = "{base_path}/layout-extraction/layout-templates.json"
IF NOT exists(layout_templates_path):
ERROR: "layout-extract did not generate layout-templates.json"
EXIT 1
TodoWrite(mark_completed: "Extract layout (structure templates)",
mark_in_progress: f"Assemble UI for {len(target_names)} targets")
TodoWrite(mark_completed: "Extract layout", mark_in_progress: "Assemble UI")
```
### Phase 3: Batch UI Assembly
### Phase 3: UI Assembly
```bash
REPORT: "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
REPORT: "🚀 Phase 3: UI Assembly"
REPORT: "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
# Call generate command (pure assembler - combines layout templates + design tokens)
generate_command = f"/workflow:ui-design:generate --base-path \"{base_path}\" --style-variants 1 --layout-variants 1"
SlashCommand(generate_command)
TRY:
SlashCommand(generate_command)
CATCH error:
ERROR: "UI assembly failed: {error}"
ERROR: "Layout templates or design tokens may be invalid"
EXIT 1
# Verify assembly results
prototypes_dir = "{base_path}/prototypes"
generated_html_files = Glob(f"{prototypes_dir}/*-style-1-layout-1.html")
generated_count = len(generated_html_files)
IF generated_count < len(target_names):
WARN: "⚠️ Expected {len(target_names)} prototypes, assembled {generated_count}"
TodoWrite(mark_completed: f"Assemble UI for {len(target_names)} targets",
mark_in_progress: session_id ? "Integrate design system" : "Standalone completion")
TodoWrite(mark_completed: "Assemble UI", mark_in_progress: session_id ? "Integrate design system" : "Completion")
```
### Phase 4: Design System Integration
```bash
REPORT: "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
REPORT: "🚀 Phase 4: Design System Integration"
REPORT: "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
IF session_id:
REPORT: "🚀 Phase 4: Design System Integration"
update_command = f"/workflow:ui-design:update --session {session_id}"
TRY:
SlashCommand(update_command)
CATCH error:
WARN: "⚠️ Design system integration failed: {error}"
WARN: "Prototypes available at {base_path}/prototypes/"
SlashCommand(update_command)
# Update metadata
metadata = Read("{base_path}/.run-metadata.json")

View File

@@ -0,0 +1,785 @@
---
name: workflow:ui-design:import-from-code
description: Import design system from code files (CSS/JS/HTML/SCSS) using parallel agent analysis with final synthesis
argument-hint: "[--base-path <path>] [--css \"<glob>\"] [--js \"<glob>\"] [--scss \"<glob>\"] [--html \"<glob>\"] [--style-files \"<glob>\"] [--session <id>]"
allowed-tools: Read,Write,Bash,Glob,Grep,Task,TodoWrite
auto-continue: true
---
# UI Design: Import from Code
## Overview
Extract design system tokens from source code files (CSS/SCSS/JS/TS/HTML) using parallel agent analysis. Each agent can reference any file type for cross-source token extraction, and directly generates completeness reports with findings and gaps.
**Key Characteristics**:
- Executes parallel agent analysis (3 agents: Style, Animation, Layout)
- Each agent can read ALL file types (CSS/SCSS/JS/TS/HTML) for cross-reference
- Direct completeness reporting without synthesis phase
- Graceful failure handling with detailed missing content analysis
- Returns concrete analysis results with recommendations
## Core Functionality
- **File Discovery**: Auto-discover or target specific CSS/SCSS/JS/HTML files
- **Parallel Analysis**: 3 agents extract tokens simultaneously with cross-file-type support
- **Completeness Reporting**: Each agent reports found tokens, missing content, and recommendations
- **Cross-Source Extraction**: Agents can reference any file type (e.g., Style agent can read JS theme configs)
## Usage
### Command Syntax
```bash
/workflow:ui-design:import-from-code [FLAGS]
# Flags
--base-path <path> Base directory for analysis (default: current directory)
--css "<glob>" CSS file glob pattern (e.g., "theme/*.css")
--scss "<glob>" SCSS file glob pattern (e.g., "styles/*.scss")
--js "<glob>" JavaScript file glob pattern (e.g., "theme/*.js")
--html "<glob>" HTML file glob pattern (e.g., "pages/*.html")
--style-files "<glob>" Universal style file glob (applies to CSS/SCSS/JS)
--session <id> Session identifier for workflow tracking
```
### Usage Examples
```bash
# Basic usage - auto-discover all files
/workflow:ui-design:import-from-code --base-path ./
# Target specific directories
/workflow:ui-design:import-from-code --base-path ./src --css "theme/*.css" --js "theme/*.js"
# Tailwind config only
/workflow:ui-design:import-from-code --js "tailwind.config.js"
# CSS framework import
/workflow:ui-design:import-from-code --css "styles/**/*.scss" --html "components/**/*.html"
# Universal style files
/workflow:ui-design:import-from-code --style-files "**/theme.*"
```
---
## Execution Process
### Step 1: Setup & File Discovery
**Purpose**: Initialize session, discover and categorize code files
**Operations**:
```bash
# 1. Initialize directories
base_path="${base_path:-.}"
intermediates_dir="${base_path}/.intermediates/import-analysis"
mkdir -p "$intermediates_dir"
echo "[Phase 0] File Discovery Started"
```
<!-- TodoWrite: Initialize todo list -->
**TodoWrite**:
```json
[
{"content": "Phase 0: 发现和分类代码文件", "status": "in_progress", "activeForm": "发现代码文件"},
{"content": "Phase 1: 并行Agent分析并生成completeness-report.json", "status": "pending", "activeForm": "生成design system"}
]
```
**File Discovery Logic**:
```bash
# 2. Discover files by type
cd "$base_path" || exit 1
# CSS files
if [ -n "$css" ]; then
find . -type f -name "*.css" | grep -E "$css" > "$intermediates_dir/css-files.txt"
elif [ -n "$style_files" ]; then
find . -type f -name "*.css" | grep -E "$style_files" > "$intermediates_dir/css-files.txt"
else
find . -type f -name "*.css" -not -path "*/node_modules/*" -not -path "*/dist/*" > "$intermediates_dir/css-files.txt"
fi
# SCSS files
if [ -n "$scss" ]; then
find . -type f \( -name "*.scss" -o -name "*.sass" \) | grep -E "$scss" > "$intermediates_dir/scss-files.txt"
elif [ -n "$style_files" ]; then
find . -type f \( -name "*.scss" -o -name "*.sass" \) | grep -E "$style_files" > "$intermediates_dir/scss-files.txt"
else
find . -type f \( -name "*.scss" -o -name "*.sass" \) -not -path "*/node_modules/*" -not -path "*/dist/*" > "$intermediates_dir/scss-files.txt"
fi
# JavaScript files (theme/style related)
if [ -n "$js" ]; then
find . -type f \( -name "*.js" -o -name "*.ts" -o -name "*.jsx" -o -name "*.tsx" \) | grep -E "$js" > "$intermediates_dir/js-files.txt"
elif [ -n "$style_files" ]; then
find . -type f \( -name "*.js" -o -name "*.ts" -o -name "*.jsx" -o -name "*.tsx" \) | grep -E "$style_files" > "$intermediates_dir/js-files.txt"
else
# Look for common theme/style file patterns
find . -type f \( -name "*.js" -o -name "*.ts" -o -name "*.jsx" -o -name "*.tsx" \) -not -path "*/node_modules/*" -not -path "*/dist/*" | \
grep -iE "(theme|style|color|token|design)" > "$intermediates_dir/js-files.txt" || touch "$intermediates_dir/js-files.txt"
fi
# HTML files
if [ -n "$html" ]; then
find . -type f \( -name "*.html" -o -name "*.htm" \) | grep -E "$html" > "$intermediates_dir/html-files.txt"
else
find . -type f \( -name "*.html" -o -name "*.htm" \) -not -path "*/node_modules/*" -not -path "*/dist/*" > "$intermediates_dir/html-files.txt"
fi
# 3. Count discovered files
css_count=$(wc -l < "$intermediates_dir/css-files.txt" 2>/dev/null || echo 0)
scss_count=$(wc -l < "$intermediates_dir/scss-files.txt" 2>/dev/null || echo 0)
js_count=$(wc -l < "$intermediates_dir/js-files.txt" 2>/dev/null || echo 0)
html_count=$(wc -l < "$intermediates_dir/html-files.txt" 2>/dev/null || echo 0)
echo "[Phase 0] Discovered: CSS=$css_count, SCSS=$scss_count, JS=$js_count, HTML=$html_count"
```
<!-- TodoWrite: Mark Phase 0 complete, start Phase 1 -->
**TodoWrite**:
```json
[
{"content": "Phase 0: 发现和分类代码文件", "status": "completed", "activeForm": "发现代码文件"},
{"content": "Phase 1: 并行Agent分析并生成completeness-report.json", "status": "in_progress", "activeForm": "生成design system"}
]
```
---
### Step 2: Parallel Agent Analysis
**Purpose**: Three agents analyze all file types in parallel, each producing completeness-report.json
**Operations**:
- **Style Agent**: Extracts visual tokens (colors, typography, spacing) from ALL files (CSS/SCSS/JS/HTML)
- **Animation Agent**: Extracts animations/transitions from ALL files
- **Layout Agent**: Extracts layout patterns/component structures from ALL files
**Validation**:
- Each agent can reference any file type (not restricted to single type)
- Direct output: Each agent generates completeness-report.json with findings + missing content
- No synthesis needed: Agents produce final output directly
```bash
echo "[Phase 1] Starting parallel agent analysis (3 agents)"
```
#### Style Agent Task (style-completeness-report.json)
**Agent Task**:
```javascript
Task(ui-design-agent): `
[STYLE_TOKENS_EXTRACTION]
Extract visual design tokens (colors, typography, spacing, shadows, borders) from ALL file types
MODE: style-extraction | BASE_PATH: ${base_path}
## Input Files (Can reference ANY file type)
**CSS/SCSS files (${css_count})**:
$(cat "${intermediates_dir}/css-files.txt" 2>/dev/null | head -20)
**JavaScript/TypeScript files (${js_count})**:
$(cat "${intermediates_dir}/js-files.txt" 2>/dev/null | head -20)
**HTML files (${html_count})**:
$(cat "${intermediates_dir}/html-files.txt" 2>/dev/null | head -20)
## Extraction Strategy
**You can read ALL file types** - Cross-reference for better extraction:
1. **CSS/SCSS**: Primary source for colors, typography, spacing, shadows, borders
2. **JavaScript/TypeScript**: Theme objects (styled-components, Tailwind config, CSS-in-JS tokens)
3. **HTML**: Inline styles, class usage patterns, component examples
**Smart inference** - Fill gaps using cross-source data:
- Missing CSS colors? Check JS theme objects
- Missing spacing scale? Infer from existing values in any file type
- Missing typography? Check font-family usage in CSS + HTML + JS configs
## Output Requirements
Generate 2 files in ${base_path}/style-extraction/style-1/:
1. design-tokens.json (production-ready design tokens)
2. style-guide.md (design philosophy and usage guide)
### design-tokens.json Structure:
{
"colors": {
"brand": {
"primary": {"value": "#0066cc", "source": "file.css:23"},
"secondary": {"value": "#6c757d", "source": "file.css:24"}
},
"surface": {
"background": {"value": "#ffffff", "source": "file.css:10"},
"card": {"value": "#f8f9fa", "source": "file.css:11"}
},
"semantic": {
"success": {"value": "#28a745", "source": "file.css:30"},
"warning": {"value": "#ffc107", "source": "file.css:31"},
"error": {"value": "#dc3545", "source": "file.css:32"}
},
"text": {
"primary": {"value": "#212529", "source": "file.css:15"},
"secondary": {"value": "#6c757d", "source": "file.css:16"}
},
"border": {
"default": {"value": "#dee2e6", "source": "file.css:20"}
}
},
"typography": {
"font_family": {
"base": {"value": "system-ui, sans-serif", "source": "theme.js:12"},
"heading": {"value": "Georgia, serif", "source": "theme.js:13"}
},
"font_size": {
"xs": {"value": "0.75rem", "source": "styles.css:5"},
"sm": {"value": "0.875rem", "source": "styles.css:6"},
"base": {"value": "1rem", "source": "styles.css:7"},
"lg": {"value": "1.125rem", "source": "styles.css:8"},
"xl": {"value": "1.25rem", "source": "styles.css:9"}
},
"font_weight": {
"normal": {"value": "400", "source": "styles.css:12"},
"medium": {"value": "500", "source": "styles.css:13"},
"bold": {"value": "700", "source": "styles.css:14"}
},
"line_height": {
"tight": {"value": "1.25", "source": "styles.css:18"},
"normal": {"value": "1.5", "source": "styles.css:19"},
"relaxed": {"value": "1.75", "source": "styles.css:20"}
},
"letter_spacing": {
"tight": {"value": "-0.025em", "source": "styles.css:24"},
"normal": {"value": "0", "source": "styles.css:25"},
"wide": {"value": "0.025em", "source": "styles.css:26"}
}
},
"spacing": {
"0": {"value": "0", "source": "styles.css:30"},
"1": {"value": "0.25rem", "source": "styles.css:31"},
"2": {"value": "0.5rem", "source": "styles.css:32"},
"3": {"value": "0.75rem", "source": "styles.css:33"},
"4": {"value": "1rem", "source": "styles.css:34"},
"6": {"value": "1.5rem", "source": "styles.css:35"},
"8": {"value": "2rem", "source": "styles.css:36"},
"12": {"value": "3rem", "source": "styles.css:37"}
},
"opacity": {
"0": {"value": "0", "source": "styles.css:40"},
"50": {"value": "0.5", "source": "styles.css:41"},
"100": {"value": "1", "source": "styles.css:42"}
},
"border_radius": {
"none": {"value": "0", "source": "styles.css:45"},
"sm": {"value": "0.125rem", "source": "styles.css:46"},
"base": {"value": "0.25rem", "source": "styles.css:47"},
"lg": {"value": "0.5rem", "source": "styles.css:48"},
"full": {"value": "9999px", "source": "styles.css:49"}
},
"shadows": {
"sm": {"value": "0 1px 2px rgba(0,0,0,0.05)", "source": "theme.css:45"},
"base": {"value": "0 1px 3px rgba(0,0,0,0.1)", "source": "theme.css:46"},
"md": {"value": "0 4px 6px rgba(0,0,0,0.1)", "source": "theme.css:47"},
"lg": {"value": "0 10px 15px rgba(0,0,0,0.1)", "source": "theme.css:48"}
},
"breakpoints": {
"sm": {"value": "640px", "source": "media.scss:3"},
"md": {"value": "768px", "source": "media.scss:4"},
"lg": {"value": "1024px", "source": "media.scss:5"},
"xl": {"value": "1280px", "source": "media.scss:6"}
},
"_metadata": {
"extraction_source": "code_import",
"files_analyzed": {
"css": ["list of CSS/SCSS files read"],
"js": ["list of JS/TS files read"],
"html": ["list of HTML files read"]
},
"completeness": {
"colors": "complete | partial | minimal",
"typography": "complete | partial | minimal",
"spacing": "complete | partial | minimal",
"missing_categories": ["accent", "warning"],
"recommendations": [
"Define accent color for interactive elements",
"Add semantic colors (warning, error, success)"
]
}
}
}
### style-guide.md Structure:
# Design System Style Guide
## Overview
Extracted from code files: [list of source files]
## Colors
- **Brand**: Primary, Secondary
- **Surface**: Background, Card
- **Semantic**: Success, Warning, Error
- **Text**: Primary, Secondary
- **Border**: Default
## Typography
- **Font Families**: Base (system-ui), Heading (Georgia)
- **Font Sizes**: xs to xl (0.75rem - 1.25rem)
- **Font Weights**: Normal (400), Medium (500), Bold (700)
## Spacing
System: 8px-grid (0, 0.25rem, 0.5rem, ..., 3rem)
## Missing Elements
- Accent colors for interactive elements
- Extended shadow scale
## Usage
All tokens are production-ready and can be used with CSS variables.
## Completeness Criteria
- **colors**: ≥5 categories (brand, semantic, surface, text, border), ≥10 tokens
- **typography**: ≥3 font families, ≥8 sizes, ≥5 weights
- **spacing**: ≥8 values in consistent system
- **shadows**: ≥3 elevation levels
- **borders**: ≥3 radius values, ≥2 widths
## Critical Requirements
- ✅ Can read ANY file type (CSS/SCSS/JS/TS/HTML) - not restricted to CSS only
- ✅ Use Read() tool for each file you want to analyze
- ✅ Cross-reference between file types for better extraction
- ✅ Extract all visual token types systematically
- ✅ Create style-extraction/style-1/ directory first: Bash(mkdir -p "${base_path}/style-extraction/style-1")
- ✅ Use Write() to save both files:
- ${base_path}/style-extraction/style-1/design-tokens.json
- ${base_path}/style-extraction/style-1/style-guide.md
- ✅ Include _metadata.completeness field to track missing content
- ❌ NO external research or MCP calls
`
```
#### Animation Agent Task
**Agent Task**:
```javascript
Task(ui-design-agent): `
[ANIMATION_TOKENS_EXTRACTION]
Extract animation/transition tokens from ALL file types
MODE: animation-extraction | BASE_PATH: ${base_path}
## Input Files (Can reference ANY file type)
**CSS/SCSS files (${css_count})**:
$(cat "${intermediates_dir}/css-files.txt" 2>/dev/null | head -20)
**JavaScript/TypeScript files (${js_count})**:
$(cat "${intermediates_dir}/js-files.txt" 2>/dev/null | head -20)
**HTML files (${html_count})**:
$(cat "${intermediates_dir}/html-files.txt" 2>/dev/null | head -20)
## Extraction Strategy
**You can read ALL file types** - Find animations anywhere:
1. **CSS/SCSS**: @keyframes, transition properties, animation properties
2. **JavaScript/TypeScript**: Animation configs (Framer Motion, GSAP, CSS-in-JS animations)
3. **HTML**: Inline animation styles, data-animation attributes
**Cross-reference**:
- CSS animations referenced in JS configs
- JS animation libraries with CSS class triggers
- HTML elements with animation classes/attributes
## Output Requirements
Generate 2 files in ${base_path}/animation-extraction/:
1. animation-tokens.json (production-ready animation tokens)
2. animation-guide.md (animation usage guide)
### animation-tokens.json Structure:
{
"duration": {
"instant": {"value": "0ms", "source": "animations.css:10"},
"fast": {"value": "150ms", "source": "animations.css:12"},
"base": {"value": "250ms", "source": "animations.css:13"},
"slow": {"value": "500ms", "source": "animations.css:14"}
},
"easing": {
"linear": {"value": "linear", "source": "animations.css:20"},
"ease-in": {"value": "cubic-bezier(0.4, 0, 1, 1)", "source": "theme.js:45"},
"ease-out": {"value": "cubic-bezier(0, 0, 0.2, 1)", "source": "theme.js:46"},
"ease-in-out": {"value": "cubic-bezier(0.4, 0, 0.2, 1)", "source": "theme.js:47"}
},
"transitions": {
"color": {
"property": "color",
"duration": "var(--duration-fast)",
"easing": "var(--ease-out)",
"source": "transitions.css:30"
},
"transform": {
"property": "transform",
"duration": "var(--duration-base)",
"easing": "var(--ease-in-out)",
"source": "transitions.css:35"
},
"opacity": {
"property": "opacity",
"duration": "var(--duration-fast)",
"easing": "var(--ease-out)",
"source": "transitions.css:40"
}
},
"keyframes": {
"fadeIn": {
"name": "fadeIn",
"keyframes": {
"0%": {"opacity": "0"},
"100%": {"opacity": "1"}
},
"source": "styles.css:67"
},
"slideInUp": {
"name": "slideInUp",
"keyframes": {
"0%": {"transform": "translateY(20px)", "opacity": "0"},
"100%": {"transform": "translateY(0)", "opacity": "1"}
},
"source": "styles.css:75"
}
},
"interactions": {
"button-hover": {
"trigger": "hover",
"properties": ["background-color", "transform"],
"duration": "var(--duration-fast)",
"easing": "var(--ease-out)",
"source": "button.css:45"
}
},
"_metadata": {
"extraction_source": "code_import",
"framework_detected": "css-animations | framer-motion | gsap | none",
"files_analyzed": {
"css": ["list of CSS/SCSS files read"],
"js": ["list of JS/TS files read"],
"html": ["list of HTML files read"]
},
"completeness": {
"durations": "complete | partial | minimal",
"easing": "complete | partial | minimal",
"keyframes": "complete | partial | minimal",
"missing_items": ["bounce easing", "slide animations"],
"recommendations": [
"Add slow duration for complex animations",
"Define spring/bounce easing for interactive feedback"
]
}
}
}
### animation-guide.md Structure:
# Animation System Guide
## Overview
Extracted from code files: [list of source files]
Framework detected: [css-animations | framer-motion | gsap | none]
## Durations
- **Instant**: 0ms
- **Fast**: 150ms (UI feedback)
- **Base**: 250ms (standard transitions)
- **Slow**: 500ms (complex animations)
## Easing Functions
- **Linear**: Constant speed
- **Ease-out**: Fast start, slow end (entering elements)
- **Ease-in-out**: Smooth acceleration and deceleration
## Keyframe Animations
- **fadeIn**: Opacity 0 → 1
- **slideInUp**: Slide from bottom with fade
## Missing Elements
- Bounce/spring easing for playful interactions
- Slide-out animations
## Usage
All animation tokens use CSS variables and can be referenced in transitions.
## Completeness Criteria
- **durations**: ≥3 (fast, medium, slow)
- **easing**: ≥3 functions (ease-in, ease-out, ease-in-out)
- **keyframes**: ≥3 animation types (fade, scale, slide)
- **transitions**: ≥5 properties defined
## Critical Requirements
- ✅ Can read ANY file type (CSS/SCSS/JS/TS/HTML)
- ✅ Use Read() tool for each file you want to analyze
- ✅ Detect animation framework if used
- ✅ Extract all animation-related tokens
- ✅ Create animation-extraction/ directory first: Bash(mkdir -p "${base_path}/animation-extraction")
- ✅ Use Write() to save both files:
- ${base_path}/animation-extraction/animation-tokens.json
- ${base_path}/animation-extraction/animation-guide.md
- ✅ Include _metadata.completeness field to track missing content
- ❌ NO external research or MCP calls
`
```
#### Layout Agent Task
**Agent Task**:
```javascript
Task(ui-design-agent): `
[LAYOUT_PATTERNS_EXTRACTION]
Extract layout patterns and component structures from ALL file types
MODE: layout-extraction | BASE_PATH: ${base_path}
## Input Files (Can reference ANY file type)
**CSS/SCSS files (${css_count})**:
$(cat "${intermediates_dir}/css-files.txt" 2>/dev/null | head -20)
**JavaScript/TypeScript files (${js_count})**:
$(cat "${intermediates_dir}/js-files.txt" 2>/dev/null | head -20)
**HTML files (${html_count})**:
$(cat "${intermediates_dir}/html-files.txt" 2>/dev/null | head -20)
## Extraction Strategy
**You can read ALL file types** - Find layout patterns anywhere:
1. **CSS/SCSS**: Grid systems, flexbox utilities, layout classes, media queries
2. **JavaScript/TypeScript**: Layout components (React/Vue), grid configurations, responsive logic
3. **HTML**: Layout structures, semantic patterns, component hierarchies
**Cross-reference**:
- HTML structure + CSS classes → layout system
- JS components + CSS styles → component patterns
- Responsive classes across all file types
## Output Requirements
Generate 1 file: ${base_path}/layout-extraction/layout-templates.json
### layout-templates.json Structure:
{
"extraction_metadata": {
"extraction_source": "code_import",
"analysis_time": "ISO8601 timestamp",
"files_analyzed": {
"css": ["list of CSS/SCSS files read"],
"js": ["list of JS/TS files read"],
"html": ["list of HTML files read"]
},
"naming_convention": "BEM | SMACSS | utility-first | css-modules | custom",
"layout_system": {
"type": "12-column | flexbox | css-grid | custom",
"confidence": "high | medium | low",
"container_classes": ["container", "wrapper"],
"row_classes": ["row"],
"column_classes": ["col-1", "col-md-6"],
"source_files": ["grid.css", "Layout.jsx"]
},
"responsive": {
"breakpoint_prefixes": ["sm:", "md:", "lg:", "xl:"],
"mobile_first": true,
"breakpoints": {
"sm": "640px",
"md": "768px",
"lg": "1024px",
"xl": "1280px"
},
"source": "responsive.scss:5"
},
"completeness": {
"layout_system": "complete | partial | minimal",
"components": "complete | partial | minimal",
"responsive": "complete | partial | minimal",
"missing_items": ["gap utilities", "modal", "dropdown"],
"recommendations": [
"Add gap utilities for consistent spacing in grid layouts",
"Define modal/dropdown/tabs component patterns"
]
}
},
"layout_templates": [
{
"target": "button",
"variant_id": "layout-1",
"device_type": "responsive",
"component_type": "component",
"dom_structure": {
"tag": "button",
"classes": ["btn", "btn-primary"],
"children": [
{"tag": "span", "classes": ["btn-text"], "content": "{{text}}"}
],
"variants": {
"primary": {"classes": ["btn", "btn-primary"]},
"secondary": {"classes": ["btn", "btn-secondary"]}
},
"sizes": {
"sm": {"classes": ["btn-sm"]},
"base": {"classes": []},
"lg": {"classes": ["btn-lg"]}
},
"states": ["hover", "active", "disabled"]
},
"css_layout_rules": "display: inline-flex; align-items: center; justify-content: center; padding: var(--spacing-2) var(--spacing-4); border-radius: var(--radius-base);",
"source": "button.css:12"
},
{
"target": "card",
"variant_id": "layout-1",
"device_type": "responsive",
"component_type": "component",
"dom_structure": {
"tag": "div",
"classes": ["card"],
"children": [
{"tag": "div", "classes": ["card-header"], "content": "{{title}}"},
{"tag": "div", "classes": ["card-body"], "content": "{{content}}"},
{"tag": "div", "classes": ["card-footer"], "content": "{{footer}}"}
]
},
"css_layout_rules": "display: flex; flex-direction: column; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--spacing-4); background: var(--color-surface-card);",
"source": "card.css:25"
}
]
}
## Completeness Criteria
- **layout_system**: Clear grid/flexbox system identified
- **components**: ≥5 component patterns (button, card, input, modal, dropdown)
- **responsive**: ≥3 breakpoints, clear mobile-first strategy
- **naming_convention**: Consistent pattern identified
## Critical Requirements
- ✅ Can read ANY file type (CSS/SCSS/JS/TS/HTML)
- ✅ Use Read() tool for each file you want to analyze
- ✅ Identify naming conventions and layout systems
- ✅ Extract component patterns with variants and states
- ✅ Create layout-extraction/ directory first: Bash(mkdir -p "${base_path}/layout-extraction")
- ✅ Use Write() to save: ${base_path}/layout-extraction/layout-templates.json
- ✅ Include extraction_metadata.completeness field to track missing content
- ❌ NO external research or MCP calls
`
```
**Wait for All Agents**:
```bash
# Note: Agents run in parallel and write separate completeness reports
# Each agent generates its own completeness-report.json directly
# No synthesis phase needed
echo "[Phase 1] Parallel agent analysis complete"
```
<!-- TodoWrite: Mark all complete -->
**TodoWrite**:
```json
[
{"content": "Phase 0: 发现和分类代码文件", "status": "completed", "activeForm": "发现代码文件"},
{"content": "Phase 1: 并行Agent分析并生成completeness-report.json", "status": "completed", "activeForm": "生成design system"}
]
```
---
## Output Files
### Generated Files
**Location**: `${base_path}/`
**Directory Structure**:
```
${base_path}/
├── style-extraction/
│ └── style-1/
│ ├── design-tokens.json # Production-ready design tokens
│ └── style-guide.md # Design philosophy and usage
├── animation-extraction/
│ ├── animation-tokens.json # Animation/transition tokens
│ └── animation-guide.md # Animation usage guide
├── layout-extraction/
│ └── layout-templates.json # Layout patterns and component structures
└── .intermediates/
└── import-analysis/
├── css-files.txt # Discovered CSS/SCSS files
├── js-files.txt # Discovered JS/TS files
└── html-files.txt # Discovered HTML files
```
**Files**:
1. **style-extraction/style-1/design-tokens.json**
- Production-ready design tokens
- Categories: colors, typography, spacing, opacity, border_radius, shadows, breakpoints
- Metadata: extraction_source, files_analyzed, completeness assessment
2. **style-extraction/style-1/style-guide.md**
- Design system overview
- Token categories and usage
- Missing elements and recommendations
3. **animation-extraction/animation-tokens.json**
- Animation tokens: duration, easing, transitions, keyframes, interactions
- Framework detection: css-animations, framer-motion, gsap, etc.
- Metadata: extraction_source, completeness assessment
4. **animation-extraction/animation-guide.md**
- Animation system overview
- Usage guidelines and examples
5. **layout-extraction/layout-templates.json**
- Layout templates for each discovered component
- Extraction metadata: naming_convention, layout_system, responsive strategy
- Component patterns with DOM structure and CSS rules
**Intermediate Files**: `.intermediates/import-analysis/`
- `css-files.txt` - Discovered CSS/SCSS files
- `js-files.txt` - Discovered JS/TS files
- `html-files.txt` - Discovered HTML files
---
## Error Handling
### Common Errors
| Error | Cause | Resolution |
|-------|-------|------------|
| No files discovered | Glob patterns too restrictive or wrong base-path | Check glob patterns and base-path, verify file locations |
| Agent reports "failed" status | No tokens found in any file | Review file content, check if files contain design tokens |
| Empty completeness reports | Files exist but contain no extractable tokens | Manually verify token definitions in source files |
| Missing file type | Specific file type not discovered | Use explicit glob flags (--css, --js, --html, --scss) |
---
## Best Practices
1. **Use auto-discovery for full projects**: Omit glob flags to discover all files automatically
2. **Target specific directories for speed**: Use `--base-path` + specific globs for focused analysis
3. **Cross-reference agent reports**: Compare all three completeness reports to identify gaps
4. **Review missing content**: Check `missing` field in reports for actionable improvements
5. **Verify file discovery**: Check `.intermediates/import-analysis/*-files.txt` if agents report no data

View File

@@ -6,13 +6,18 @@ Analyze all command files and generate index files for command-guide skill.
import os
import re
import json
import shutil
from pathlib import Path
from collections import defaultdict
from typing import Dict, List, Any
# Base paths
COMMANDS_DIR = Path("D:/Claude_dms3/.claude/commands")
INDEX_DIR = Path("D:/Claude_dms3/.claude/skills/command-guide/index")
BASE_DIR = Path("D:/Claude_dms3/.claude")
COMMANDS_DIR = BASE_DIR / "commands"
AGENTS_DIR = BASE_DIR / "agents"
SKILL_DIR = BASE_DIR / "skills" / "command-guide"
REFERENCE_DIR = SKILL_DIR / "reference"
INDEX_DIR = SKILL_DIR / "index"
def parse_frontmatter(content: str) -> Dict[str, Any]:
"""Extract YAML frontmatter from markdown content."""
@@ -279,6 +284,41 @@ def build_command_relationships() -> Dict[str, Any]:
return relationships
def sync_reference_directory():
"""Sync reference directory with source directories."""
print("\n=== Syncing Reference Directory ===")
# Step 1: Delete all files in reference directory
if REFERENCE_DIR.exists():
print(f"Deleting existing reference directory: {REFERENCE_DIR}")
shutil.rmtree(REFERENCE_DIR)
# Step 2: Create reference directory structure
REFERENCE_DIR.mkdir(parents=True, exist_ok=True)
print(f"Created reference directory: {REFERENCE_DIR}")
# Step 3: Copy agents directory
agents_target = REFERENCE_DIR / "agents"
if AGENTS_DIR.exists():
print(f"Copying {AGENTS_DIR} -> {agents_target}")
shutil.copytree(AGENTS_DIR, agents_target)
agent_files = list(agents_target.rglob("*.md"))
print(f" Copied {len(agent_files)} agent files")
else:
print(f" WARNING: Source directory not found: {AGENTS_DIR}")
# Step 4: Copy commands directory
commands_target = REFERENCE_DIR / "commands"
if COMMANDS_DIR.exists():
print(f"Copying {COMMANDS_DIR} -> {commands_target}")
shutil.copytree(COMMANDS_DIR, commands_target)
command_files = list(commands_target.rglob("*.md"))
print(f" Copied {len(command_files)} command files")
else:
print(f" WARNING: Source directory not found: {COMMANDS_DIR}")
print("Reference directory sync completed\n")
def identify_essential_commands(all_commands: List[Dict]) -> List[Dict]:
"""Identify the most essential commands for beginners."""
# Essential command names (14 most important) - use full command paths
@@ -320,7 +360,13 @@ def main():
if sys.platform == 'win32':
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
print("Analyzing command files...")
print("=== Command Guide Index Rebuild ===\n")
# Step 1: Sync reference directory
sync_reference_directory()
# Step 2: Analyze command files
print("=== Analyzing Command Files ===")
# Find all command files
command_files = list(COMMANDS_DIR.rglob("*.md"))
@@ -385,7 +431,17 @@ def main():
# Print summary statistics
print("\n=== Summary Statistics ===")
print(f"Total commands: {len(all_commands)}")
# Reference directory statistics
if REFERENCE_DIR.exists():
ref_agents = list((REFERENCE_DIR / "agents").rglob("*.md")) if (REFERENCE_DIR / "agents").exists() else []
ref_commands = list((REFERENCE_DIR / "commands").rglob("*.md")) if (REFERENCE_DIR / "commands").exists() else []
print(f"\nReference directory:")
print(f" Agents: {len(ref_agents)} files")
print(f" Commands: {len(ref_commands)} files")
print(f" Total: {len(ref_agents) + len(ref_commands)} files")
print(f"\nTotal commands indexed: {len(all_commands)}")
print(f"\nBy category:")
for cat in sorted(by_category.keys()):
total = sum(len(cmds) for cmds in by_category[cat].values())
@@ -407,5 +463,9 @@ def main():
print(f"\nEssential commands: {len(essential)}")
print("\n=== Index Rebuild Complete ===")
print(f"Reference: {REFERENCE_DIR}")
print(f"Index: {INDEX_DIR}")
if __name__ == '__main__':
main()