mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-06 01:54:11 +08:00
Compare commits
32 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
958567e35a | ||
|
|
920b179440 | ||
|
|
6993677ed9 | ||
|
|
8e3dff3d0f | ||
|
|
775c982218 | ||
|
|
164d1df341 | ||
|
|
bbddbebef2 | ||
|
|
854464b221 | ||
|
|
afed67cd3a | ||
|
|
b6b788f0d8 | ||
|
|
63acd94bbf | ||
|
|
43d647e7b2 | ||
|
|
76aa20cdfd | ||
|
|
39c956c703 | ||
|
|
dd04433079 | ||
|
|
c36ff8fcec | ||
|
|
967e3805b7 | ||
|
|
e898ebc322 | ||
|
|
a38a216cc9 | ||
|
|
3b351693fc | ||
|
|
ab266a38b1 | ||
|
|
dc9d63b349 | ||
|
|
72bdb3470e | ||
|
|
f496a35da5 | ||
|
|
15bf9cdbed | ||
|
|
779581ec3b | ||
|
|
483ab621bc | ||
|
|
6adbe7c1e9 | ||
|
|
b5fb4e3d48 | ||
|
|
1cabccbbdd | ||
|
|
8073549234 | ||
|
|
3eec2a542b |
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: analyze
|
||||
description: Quick codebase analysis using CLI tools (codex/gemini/qwen)
|
||||
description: Read-only codebase analysis using Gemini (default), Qwen, or Codex with auto-pattern detection and template selection
|
||||
argument-hint: "[--agent] [--tool codex|gemini|qwen] [--enhance] analysis target"
|
||||
allowed-tools: SlashCommand(*), Bash(*), TodoWrite(*), Read(*), Glob(*), Task(*)
|
||||
---
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: chat
|
||||
description: Simple CLI interaction command for direct codebase analysis
|
||||
description: Read-only Q&A interaction with Gemini/Qwen/Codex for codebase questions with automatic context inference
|
||||
argument-hint: "[--agent] [--tool codex|gemini|qwen] [--enhance] inquiry"
|
||||
allowed-tools: SlashCommand(*), Bash(*), Task(*)
|
||||
---
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: cli-init
|
||||
description: Initialize CLI tool configurations (Gemini and Qwen) based on workspace analysis
|
||||
description: Generate .gemini/ and .qwen/ config directories with settings.json and ignore files based on workspace technology detection
|
||||
argument-hint: "[--tool gemini|qwen|all] [--output path] [--preview]"
|
||||
allowed-tools: Bash(*), Read(*), Write(*), Glob(*)
|
||||
---
|
||||
@@ -178,7 +178,7 @@ target/
|
||||
/cli:cli-init --tool all --output=.config/
|
||||
```
|
||||
|
||||
## EXECUTION INSTRUCTIONS ⚡ START HERE
|
||||
## EXECUTION INSTRUCTIONS - START HERE
|
||||
|
||||
**When this command is triggered, follow these exact steps:**
|
||||
|
||||
@@ -209,7 +209,7 @@ bash(find . -name "Dockerfile" | head -1)
|
||||
```bash
|
||||
# Create .gemini/ directory and settings.json
|
||||
mkdir -p .gemini
|
||||
echo '{"contextfilename": "CLAUDE.md"}' > .gemini/settings.json
|
||||
Write({file_path: '.gemini/settings.json', content: '{"contextfilename": "CLAUDE.md"}'})
|
||||
|
||||
# Create .geminiignore file with detected technology rules
|
||||
# Backup existing files if present
|
||||
@@ -219,7 +219,7 @@ echo '{"contextfilename": "CLAUDE.md"}' > .gemini/settings.json
|
||||
```bash
|
||||
# Create .qwen/ directory and settings.json
|
||||
mkdir -p .qwen
|
||||
echo '{"contextfilename": "CLAUDE.md"}' > .qwen/settings.json
|
||||
Write({file_path: '.qwen/settings.json', content: '{"contextfilename": "CLAUDE.md"}'})
|
||||
|
||||
# Create .qwenignore file with detected technology rules
|
||||
# Backup existing files if present
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: codex-execute
|
||||
description: Automated task decomposition and execution with Codex using resume mechanism
|
||||
description: Multi-stage Codex execution with automatic task decomposition into grouped subtasks using resume mechanism for context continuity
|
||||
argument-hint: "[--verify-git] task description or task-id"
|
||||
allowed-tools: SlashCommand(*), Bash(*), TodoWrite(*), Read(*), Glob(*)
|
||||
---
|
||||
@@ -257,12 +257,12 @@ TodoWrite({
|
||||
|
||||
**When to Resume vs New Session**:
|
||||
```
|
||||
✅ RESUME (same group):
|
||||
RESUME (same group):
|
||||
- Subtasks share files/modules
|
||||
- Logical continuation of previous work
|
||||
- Same architectural domain
|
||||
|
||||
❌ NEW SESSION (different group):
|
||||
NEW SESSION (different group):
|
||||
- Independent task area
|
||||
- Different files/modules
|
||||
- Switching architectural domains
|
||||
@@ -318,7 +318,7 @@ AskUserQuestion({
|
||||
|
||||
**During Execution**:
|
||||
```
|
||||
📊 Task Flow Diagram:
|
||||
Task Flow Diagram:
|
||||
[Group A: Auth Core]
|
||||
A1: Create user model ──┐
|
||||
A2: Add validation ─┤─► [resume] ─► A3: Database schema
|
||||
@@ -331,7 +331,7 @@ AskUserQuestion({
|
||||
C1: Unit tests ─────────────► [new session]
|
||||
C2: Integration tests ──────► [resume]
|
||||
|
||||
📋 Task Decomposition:
|
||||
Task Decomposition:
|
||||
[Group A] 1. Create user model
|
||||
[Group A] 2. Add validation logic [resume]
|
||||
[Group A] 3. Implement database schema [resume]
|
||||
@@ -341,28 +341,28 @@ AskUserQuestion({
|
||||
[Group C] 7. Unit tests [new session]
|
||||
[Group C] 8. Integration tests [resume]
|
||||
|
||||
▶️ [Group A] Executing Subtask 1/8: Create user model
|
||||
[Group A] Executing Subtask 1/8: Create user model
|
||||
Starting new Codex session for Group A...
|
||||
[Codex output]
|
||||
✅ Subtask 1 completed
|
||||
Subtask 1 completed
|
||||
|
||||
🔍 Git Verification:
|
||||
Git Verification:
|
||||
M src/models/user.ts
|
||||
✅ Changes verified
|
||||
Changes verified
|
||||
|
||||
▶️ [Group A] Executing Subtask 2/8: Add validation logic
|
||||
[Group A] Executing Subtask 2/8: Add validation logic
|
||||
Resuming Codex session (same group)...
|
||||
[Codex output]
|
||||
✅ Subtask 2 completed
|
||||
Subtask 2 completed
|
||||
|
||||
▶️ [Group B] Executing Subtask 4/8: Create auth endpoints
|
||||
[Group B] Executing Subtask 4/8: Create auth endpoints
|
||||
Starting NEW Codex session for Group B...
|
||||
[Codex output]
|
||||
✅ Subtask 4 completed
|
||||
Subtask 4 completed
|
||||
...
|
||||
|
||||
✅ All Subtasks Completed
|
||||
📊 Summary: [file references, changes, next steps]
|
||||
All Subtasks Completed
|
||||
Summary: [file references, changes, next steps]
|
||||
```
|
||||
|
||||
**Final Summary**:
|
||||
@@ -370,8 +370,8 @@ AskUserQuestion({
|
||||
# Task Execution Summary: [Task Description]
|
||||
|
||||
## Subtasks Completed
|
||||
1. ✅ [Subtask 1]: [files modified]
|
||||
2. ✅ [Subtask 2]: [files modified]
|
||||
1. [Subtask 1]: [files modified]
|
||||
2. [Subtask 2]: [files modified]
|
||||
...
|
||||
|
||||
## Files Modified
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: discuss-plan
|
||||
description: Orchestrates an iterative, multi-model discussion for planning and analysis without implementation.
|
||||
description: Multi-round collaborative planning using Gemini, Codex, and Claude synthesis with iterative discussion cycles (read-only, no code changes)
|
||||
argument-hint: "[--topic '...'] [--task-id '...'] [--rounds N]"
|
||||
allowed-tools: SlashCommand(*), Bash(*), TodoWrite(*), Read(*), Glob(*)
|
||||
---
|
||||
@@ -279,11 +279,11 @@ Each round's output is structured as:
|
||||
|
||||
| Command | Models | Rounds | Discussion | Implementation | Use Case |
|
||||
|---------|--------|--------|------------|----------------|----------|
|
||||
| `/cli:mode:plan` | Gemini | 1 | ❌ NO | ❌ NO | Single-model planning |
|
||||
| `/cli:analyze` | Gemini/Qwen | 1 | ❌ NO | ❌ NO | Code analysis |
|
||||
| `/cli:execute` | Any | 1 | ❌ NO | ✅ YES | Direct implementation |
|
||||
| `/cli:codex-execute` | Codex | 1 | ❌ NO | ✅ YES | Multi-stage implementation |
|
||||
| `/cli:discuss-plan` | **Gemini+Codex+Claude** | **Multiple** | ✅ **YES** | ❌ **NO** | **Multi-perspective planning** |
|
||||
| `/cli:mode:plan` | Gemini | 1 | NO | NO | Single-model planning |
|
||||
| `/cli:analyze` | Gemini/Qwen | 1 | NO | NO | Code analysis |
|
||||
| `/cli:execute` | Any | 1 | NO | YES | Direct implementation |
|
||||
| `/cli:codex-execute` | Codex | 1 | NO | YES | Multi-stage implementation |
|
||||
| `/cli:discuss-plan` | **Gemini+Codex+Claude** | **Multiple** | **YES** | **NO** | **Multi-perspective planning** |
|
||||
|
||||
## Best Practices
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: execute
|
||||
description: Auto-execution of implementation tasks with YOLO permissions and intelligent context inference
|
||||
description: Autonomous code implementation with YOLO auto-approval using Gemini/Qwen/Codex, supports task ID or description input with automatic file pattern detection
|
||||
argument-hint: "[--agent] [--tool codex|gemini|qwen] [--enhance] description or task-id"
|
||||
allowed-tools: SlashCommand(*), Bash(*), Task(*)
|
||||
---
|
||||
@@ -27,7 +27,7 @@ Execute implementation tasks with **YOLO permissions** (auto-approves all confir
|
||||
### YOLO Permissions
|
||||
Auto-approves: file pattern inference, execution, **file modifications**, summary generation
|
||||
|
||||
**⚠️ WARNING**: This command will make actual code changes without manual confirmation
|
||||
**WARNING**: This command will make actual code changes without manual confirmation
|
||||
|
||||
### Execution Modes
|
||||
|
||||
@@ -158,14 +158,14 @@ The agent handles all phases internally, including complexity-based tool selecti
|
||||
|
||||
## Examples
|
||||
|
||||
**Basic Implementation (Standard Mode)** (⚠️ modifies code):
|
||||
**Basic Implementation (Standard Mode)** (modifies code):
|
||||
```bash
|
||||
/cli:execute "implement JWT authentication with middleware"
|
||||
# Executes: Creates auth middleware, updates routes, modifies config
|
||||
# Result: NEW/MODIFIED code files with JWT implementation
|
||||
```
|
||||
|
||||
**Intelligent Implementation (Agent Mode)** (⚠️ modifies code):
|
||||
**Intelligent Implementation (Agent Mode)** (modifies code):
|
||||
```bash
|
||||
/cli:execute --agent "implement OAuth2 authentication with token refresh"
|
||||
# Phase 1: Classifies intent=execute, complexity=complex, keywords=['oauth2', 'auth', 'token', 'refresh']
|
||||
@@ -176,7 +176,7 @@ The agent handles all phases internally, including complexity-based tool selecti
|
||||
# Result: Complete OAuth2 implementation + detailed execution log
|
||||
```
|
||||
|
||||
**Enhanced Implementation** (⚠️ modifies code):
|
||||
**Enhanced Implementation** (modifies code):
|
||||
```bash
|
||||
/cli:execute --enhance "implement JWT authentication"
|
||||
# Step 1: Enhance to expand requirements
|
||||
@@ -184,7 +184,7 @@ The agent handles all phases internally, including complexity-based tool selecti
|
||||
# Result: Complete auth system with MODIFIED code files
|
||||
```
|
||||
|
||||
**Task Execution** (⚠️ modifies code):
|
||||
**Task Execution** (modifies code):
|
||||
```bash
|
||||
/cli:execute IMPL-001
|
||||
# Reads: .task/IMPL-001.json for requirements
|
||||
@@ -192,14 +192,14 @@ The agent handles all phases internally, including complexity-based tool selecti
|
||||
# Result: Code changes per task definition
|
||||
```
|
||||
|
||||
**Codex Implementation** (⚠️ modifies code):
|
||||
**Codex Implementation** (modifies code):
|
||||
```bash
|
||||
/cli:execute --tool codex "optimize database queries"
|
||||
# Executes: Codex with full file access
|
||||
# Result: MODIFIED query code, new indexes, updated tests
|
||||
```
|
||||
|
||||
**Qwen Code Generation** (⚠️ modifies code):
|
||||
**Qwen Code Generation** (modifies code):
|
||||
```bash
|
||||
/cli:execute --tool qwen --enhance "refactor auth module"
|
||||
# Step 1: Enhanced refactoring plan
|
||||
@@ -211,11 +211,11 @@ The agent handles all phases internally, including complexity-based tool selecti
|
||||
|
||||
| Command | Intent | Code Changes | Auto-Approve |
|
||||
|---------|--------|--------------|--------------|
|
||||
| `/cli:analyze` | Understand code | ❌ NO | N/A |
|
||||
| `/cli:chat` | Ask questions | ❌ NO | N/A |
|
||||
| `/cli:execute` | **Implement** | ✅ **YES** | ✅ **YES** |
|
||||
| `/cli:analyze` | Understand code | NO | N/A |
|
||||
| `/cli:chat` | Ask questions | NO | N/A |
|
||||
| `/cli:execute` | **Implement** | **YES** | **YES** |
|
||||
|
||||
## Notes
|
||||
|
||||
- Command templates, YOLO mode details, and session management: see intelligent-tools-strategy.md (loaded in memory)
|
||||
- **⚠️ Code Modification**: This command modifies code - execution logs document changes made
|
||||
- **Code Modification**: This command modifies code - execution logs document changes made
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: bug-diagnosis
|
||||
description: Bug diagnosis and fix suggestions using CLI tools with specialized template
|
||||
description: Read-only bug root cause analysis using Gemini/Qwen/Codex with systematic diagnosis template for fix suggestions
|
||||
argument-hint: "[--agent] [--tool codex|gemini|qwen] [--enhance] [--cd path] bug description"
|
||||
allowed-tools: SlashCommand(*), Bash(*), Task(*)
|
||||
---
|
||||
@@ -9,7 +9,7 @@ allowed-tools: SlashCommand(*), Bash(*), Task(*)
|
||||
|
||||
## Purpose
|
||||
|
||||
Systematic bug diagnosis with root cause analysis template (`~/.claude/workflows/cli-templates/prompts/development/bug-diagnosis.txt`).
|
||||
Systematic bug diagnosis with root cause analysis template (`~/.claude/workflows/cli-templates/prompts/analysis/01-diagnose-bug-root-cause.txt`).
|
||||
|
||||
**Tool Selection**:
|
||||
- **gemini** (default) - Best for bug diagnosis
|
||||
@@ -48,7 +48,7 @@ Systematic bug diagnosis with root cause analysis template (`~/.claude/workflows
|
||||
1. Parse tool selection (default: gemini)
|
||||
2. Optional: enhance with `/enhance-prompt`
|
||||
3. Detect directory from `--cd` or auto-infer
|
||||
4. Build command with bug-diagnosis template
|
||||
4. Build command with template
|
||||
5. Execute diagnosis (read-only)
|
||||
6. Save to `.workflow/WFS-[id]/.chat/`
|
||||
|
||||
@@ -65,7 +65,7 @@ Task(
|
||||
Mode: bug-diagnosis
|
||||
Tool: ${tool_flag || 'auto-select'} // gemini|qwen|codex
|
||||
Directory: ${cd_path || 'auto-detect'}
|
||||
Template: bug-diagnosis
|
||||
Template: ~/.claude/workflows/cli-templates/prompts/analysis/01-diagnose-bug-root-cause.txt
|
||||
|
||||
Agent responsibilities:
|
||||
1. Context Discovery:
|
||||
@@ -76,7 +76,7 @@ Task(
|
||||
2. CLI Command Generation:
|
||||
- Build Gemini/Qwen/Codex command
|
||||
- Include diagnostic context
|
||||
- Apply bug-diagnosis.txt template
|
||||
- Apply ~/.claude/workflows/cli-templates/prompts/analysis/01-diagnose-bug-root-cause.txt template
|
||||
|
||||
3. Execution & Output:
|
||||
- Execute root cause analysis
|
||||
@@ -89,7 +89,7 @@ Task(
|
||||
## Core Rules
|
||||
|
||||
- **Read-only**: Diagnoses bugs, does NOT modify code
|
||||
- **Template**: Uses `bug-diagnosis.txt` for root cause analysis
|
||||
- **Template**: Uses `~/.claude/workflows/cli-templates/prompts/analysis/01-diagnose-bug-root-cause.txt` for root cause analysis
|
||||
- **Output**: Saves to `.workflow/WFS-[id]/.chat/`
|
||||
|
||||
## CLI Command Templates
|
||||
@@ -102,7 +102,7 @@ TASK: Root cause analysis
|
||||
MODE: analysis
|
||||
CONTEXT: @**/*
|
||||
EXPECTED: Diagnosis, fix plan
|
||||
RULES: $(cat ~/.claude/workflows/cli-templates/prompts/development/bug-diagnosis.txt)
|
||||
RULES: $(cat ~/.claude/workflows/cli-templates/prompts/analysis/01-diagnose-bug-root-cause.txt)
|
||||
"
|
||||
# Qwen: Replace 'gemini' with 'qwen'
|
||||
```
|
||||
@@ -115,7 +115,7 @@ TASK: Bug diagnosis
|
||||
MODE: analysis
|
||||
CONTEXT: @**/*
|
||||
EXPECTED: Diagnosis, fix suggestions
|
||||
RULES: $(cat ~/.claude/workflows/cli-templates/prompts/development/bug-diagnosis.txt)
|
||||
RULES: $(cat ~/.claude/workflows/cli-templates/prompts/analysis/01-diagnose-bug-root-cause.txt)
|
||||
" -m gpt-5 --skip-git-repo-check -s danger-full-access
|
||||
```
|
||||
|
||||
@@ -126,5 +126,5 @@ RULES: $(cat ~/.claude/workflows/cli-templates/prompts/development/bug-diagnosis
|
||||
|
||||
## Notes
|
||||
|
||||
- Template: `~/.claude/workflows/cli-templates/prompts/development/bug-diagnosis.txt`
|
||||
- Template: `~/.claude/workflows/cli-templates/prompts/analysis/01-diagnose-bug-root-cause.txt`
|
||||
- See `intelligent-tools-strategy.md` for detailed tool usage
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: code-analysis
|
||||
description: Deep code analysis and debugging using CLI tools with specialized template
|
||||
description: Read-only execution path tracing using Gemini/Qwen/Codex with specialized analysis template for call flow and optimization
|
||||
argument-hint: "[--agent] [--tool codex|gemini|qwen] [--enhance] [--cd path] analysis target"
|
||||
allowed-tools: SlashCommand(*), Bash(*), Task(*)
|
||||
---
|
||||
@@ -9,7 +9,7 @@ allowed-tools: SlashCommand(*), Bash(*), Task(*)
|
||||
|
||||
## Purpose
|
||||
|
||||
Systematic code analysis with execution path tracing template (`~/.claude/workflows/cli-templates/prompts/analysis/code-execution-tracing.txt`).
|
||||
Systematic code analysis with execution path tracing template (`~/.claude/workflows/cli-templates/prompts/analysis/01-trace-code-execution.txt`).
|
||||
|
||||
**Tool Selection**:
|
||||
- **gemini** (default) - Best for code analysis and tracing
|
||||
@@ -52,7 +52,7 @@ Systematic code analysis with execution path tracing template (`~/.claude/workfl
|
||||
1. Parse tool selection (default: gemini)
|
||||
2. Optional: enhance analysis target with `/enhance-prompt`
|
||||
3. Detect target directory from `--cd` or auto-infer
|
||||
4. Build command with execution-tracing template
|
||||
4. Build command with template
|
||||
5. Execute analysis (read-only)
|
||||
6. Save to `.workflow/WFS-[id]/.chat/code-analysis-[timestamp].md`
|
||||
|
||||
@@ -63,7 +63,7 @@ Delegates to `cli-execution-agent` for intelligent context discovery and analysi
|
||||
## Core Rules
|
||||
|
||||
- **Read-only**: Analyzes code, does NOT modify files
|
||||
- **Template**: Uses `code-execution-tracing.txt` for systematic analysis
|
||||
- **Template**: Uses `~/.claude/workflows/cli-templates/prompts/analysis/01-trace-code-execution.txt` for systematic analysis
|
||||
- **Output**: Saves to `.workflow/WFS-[id]/.chat/`
|
||||
|
||||
## CLI Command Templates
|
||||
@@ -76,7 +76,7 @@ TASK: Execution path tracing
|
||||
MODE: analysis
|
||||
CONTEXT: @**/*
|
||||
EXPECTED: Trace, call diagram
|
||||
RULES: $(cat ~/.claude/workflows/cli-templates/prompts/analysis/code-execution-tracing.txt)
|
||||
RULES: $(cat ~/.claude/workflows/cli-templates/prompts/analysis/01-trace-code-execution.txt)
|
||||
"
|
||||
# Qwen: Replace 'gemini' with 'qwen'
|
||||
```
|
||||
@@ -89,7 +89,7 @@ TASK: Path analysis
|
||||
MODE: analysis
|
||||
CONTEXT: @**/*
|
||||
EXPECTED: Trace, optimization
|
||||
RULES: $(cat ~/.claude/workflows/cli-templates/prompts/analysis/code-execution-tracing.txt)
|
||||
RULES: $(cat ~/.claude/workflows/cli-templates/prompts/analysis/01-trace-code-execution.txt)
|
||||
" -m gpt-5 --skip-git-repo-check -s danger-full-access
|
||||
```
|
||||
|
||||
@@ -106,7 +106,7 @@ Task(
|
||||
Mode: code-analysis
|
||||
Tool: ${tool_flag || 'auto-select'} // gemini|qwen|codex
|
||||
Directory: ${cd_path || 'auto-detect'}
|
||||
Template: code-execution-tracing
|
||||
Template: ~/.claude/workflows/cli-templates/prompts/analysis/01-trace-code-execution.txt
|
||||
|
||||
Agent responsibilities:
|
||||
1. Context Discovery:
|
||||
@@ -117,7 +117,7 @@ Task(
|
||||
2. CLI Command Generation:
|
||||
- Build Gemini/Qwen/Codex command
|
||||
- Include discovered context
|
||||
- Apply code-execution-tracing.txt template
|
||||
- Apply ~/.claude/workflows/cli-templates/prompts/analysis/01-trace-code-execution.txt template
|
||||
|
||||
3. Execution & Output:
|
||||
- Execute analysis with selected tool
|
||||
@@ -133,5 +133,5 @@ Task(
|
||||
|
||||
## Notes
|
||||
|
||||
- Template: `~/.claude/workflows/cli-templates/prompts/analysis/code-execution-tracing.txt`
|
||||
- Template: `~/.claude/workflows/cli-templates/prompts/analysis/01-trace-code-execution.txt`
|
||||
- See `intelligent-tools-strategy.md` for detailed tool usage
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: plan
|
||||
description: Project planning and architecture analysis using CLI tools
|
||||
description: Read-only architecture planning using Gemini/Qwen/Codex with strategic planning template for modification plans and impact analysis
|
||||
argument-hint: "[--agent] [--tool codex|gemini|qwen] [--enhance] [--cd path] topic"
|
||||
allowed-tools: SlashCommand(*), Bash(*), Task(*)
|
||||
---
|
||||
@@ -9,7 +9,7 @@ allowed-tools: SlashCommand(*), Bash(*), Task(*)
|
||||
|
||||
## Purpose
|
||||
|
||||
Strategic software architecture planning template (`~/.claude/workflows/cli-templates/prompts/planning/architecture-planning.txt`).
|
||||
Strategic software architecture planning template (`~/.claude/workflows/cli-templates/prompts/planning/01-plan-architecture-design.txt`).
|
||||
|
||||
**Tool Selection**:
|
||||
- **gemini** (default) - Best for architecture planning
|
||||
@@ -47,7 +47,7 @@ Strategic software architecture planning template (`~/.claude/workflows/cli-temp
|
||||
1. Parse tool selection (default: gemini)
|
||||
2. Optional: enhance with `/enhance-prompt`
|
||||
3. Detect directory from `--cd` or auto-infer
|
||||
4. Build command with architecture-planning template
|
||||
4. Build command with template
|
||||
5. Execute planning (read-only, no code generation)
|
||||
6. Save to `.workflow/WFS-[id]/.chat/`
|
||||
|
||||
@@ -64,7 +64,7 @@ Task(
|
||||
Mode: architecture-planning
|
||||
Tool: ${tool_flag || 'auto-select'} // gemini|qwen|codex
|
||||
Directory: ${cd_path || 'auto-detect'}
|
||||
Template: architecture-planning
|
||||
Template: ~/.claude/workflows/cli-templates/prompts/planning/01-plan-architecture-design.txt
|
||||
|
||||
Agent responsibilities:
|
||||
1. Context Discovery:
|
||||
@@ -75,7 +75,7 @@ Task(
|
||||
2. CLI Command Generation:
|
||||
- Build Gemini/Qwen/Codex command
|
||||
- Include architecture context
|
||||
- Apply architecture-planning.txt template
|
||||
- Apply ~/.claude/workflows/cli-templates/prompts/planning/01-plan-architecture-design.txt template
|
||||
|
||||
3. Execution & Output:
|
||||
- Execute strategic planning
|
||||
@@ -88,7 +88,7 @@ Task(
|
||||
## Core Rules
|
||||
|
||||
- **Planning only**: Creates modification plans, does NOT generate code
|
||||
- **Template**: Uses `architecture-planning.txt` for strategic planning
|
||||
- **Template**: Uses `~/.claude/workflows/cli-templates/prompts/planning/01-plan-architecture-design.txt` for strategic planning
|
||||
- **Output**: Saves to `.workflow/WFS-[id]/.chat/`
|
||||
|
||||
## CLI Command Templates
|
||||
@@ -101,7 +101,7 @@ TASK: Architecture planning
|
||||
MODE: analysis
|
||||
CONTEXT: @**/*
|
||||
EXPECTED: Modification plan, impact analysis
|
||||
RULES: $(cat ~/.claude/workflows/cli-templates/prompts/planning/architecture-planning.txt)
|
||||
RULES: $(cat ~/.claude/workflows/cli-templates/prompts/planning/01-plan-architecture-design.txt)
|
||||
"
|
||||
# Qwen: Replace 'gemini' with 'qwen'
|
||||
```
|
||||
@@ -114,7 +114,7 @@ TASK: Architecture planning
|
||||
MODE: analysis
|
||||
CONTEXT: @**/*
|
||||
EXPECTED: Plan, implementation roadmap
|
||||
RULES: $(cat ~/.claude/workflows/cli-templates/prompts/planning/architecture-planning.txt)
|
||||
RULES: $(cat ~/.claude/workflows/cli-templates/prompts/planning/01-plan-architecture-design.txt)
|
||||
" -m gpt-5 --skip-git-repo-check -s danger-full-access
|
||||
```
|
||||
|
||||
@@ -125,5 +125,5 @@ RULES: $(cat ~/.claude/workflows/cli-templates/prompts/planning/architecture-pla
|
||||
|
||||
## Notes
|
||||
|
||||
- Template: `~/.claude/workflows/cli-templates/prompts/planning/architecture-planning.txt`
|
||||
- Template: `~/.claude/workflows/cli-templates/prompts/planning/01-plan-architecture-design.txt`
|
||||
- See `intelligent-tools-strategy.md` for detailed tool usage
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: enhance-prompt
|
||||
description: Context-aware prompt enhancement using session memory and codebase analysis
|
||||
description: Enhanced prompt transformation using session memory and codebase analysis with --enhance flag detection
|
||||
argument-hint: "user input to enhance"
|
||||
---
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: docs
|
||||
description: Documentation planning and orchestration - creates structured documentation tasks for execution
|
||||
description: Plan documentation workflow with dynamic grouping (≤10 docs/task), generates IMPL tasks for parallel module trees, README, ARCHITECTURE, and HTTP API docs
|
||||
argument-hint: "[path] [--tool <gemini|qwen|codex>] [--mode <full|partial>] [--cli-execute]"
|
||||
---
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: load-skill-memory
|
||||
description: Manually activate specified SKILL package and load documentation based on task intent
|
||||
argument-hint: "<skill_name> \"task intent description\""
|
||||
description: Activate SKILL package (auto-detect from paths/keywords or manual) and intelligently load documentation based on task intent keywords
|
||||
argument-hint: "[skill_name] \"task intent description\""
|
||||
allowed-tools: Bash(*), Read(*), Skill(*)
|
||||
---
|
||||
|
||||
@@ -9,10 +9,10 @@ allowed-tools: Bash(*), Read(*), Skill(*)
|
||||
|
||||
## 1. Overview
|
||||
|
||||
The `memory:load-skill-memory` command **manually activates a specified SKILL package** and intelligently loads documentation based on user's task intent. The system automatically determines which documentation files to read based on the intent description.
|
||||
The `memory:load-skill-memory` command **activates SKILL package** (auto-detect from task or manual specification) and intelligently loads documentation based on user's task intent. The system automatically determines which documentation files to read based on the intent description.
|
||||
|
||||
**Core Philosophy**:
|
||||
- **Manual Activation**: User explicitly specifies which SKILL to activate
|
||||
- **Flexible Activation**: Auto-detect skill from task description/paths, or user explicitly specifies
|
||||
- **Intent-Driven Loading**: System analyzes task intent to determine documentation scope
|
||||
- **Intelligent Selection**: Automatically chooses appropriate documentation level and modules
|
||||
- **Direct Context Loading**: Loads selected documentation into conversation memory
|
||||
@@ -22,26 +22,42 @@ The `memory:load-skill-memory` command **manually activates a specified SKILL pa
|
||||
- Load SKILL context when system hasn't auto-triggered it
|
||||
- Force reload SKILL documentation with specific intent focus
|
||||
|
||||
**Note**: Normal SKILL activation happens automatically via description triggers. Use this command only when manual activation is needed.
|
||||
**Note**: Normal SKILL activation happens automatically via description triggers or path mentions (system extracts skill name from file paths for intelligent triggering). Use this command only when manual activation is needed.
|
||||
|
||||
## 2. Parameters
|
||||
|
||||
- `<skill_name>` (Required): Name of SKILL package to activate
|
||||
- Example: `hydro_generator_module`, `Claude_dms3`
|
||||
- `[skill_name]` (Optional): Name of SKILL package to activate
|
||||
- If omitted: System auto-detects from task description or file paths
|
||||
- If specified: Direct activation of named SKILL package
|
||||
- Example: `my_project`, `api_service`
|
||||
- Must match directory name under `.claude/skills/`
|
||||
|
||||
- `"task intent description"` (Required): Description of what you want to do
|
||||
- Used for both: auto-detection (if skill_name omitted) and documentation scope selection
|
||||
- **Analysis tasks**: "分析builder pattern实现", "理解参数系统架构"
|
||||
- **Modification tasks**: "修改workflow逻辑", "增强thermal template功能"
|
||||
- **Learning tasks**: "学习接口设计模式", "了解测试框架使用"
|
||||
- **With paths**: "修改D:\projects\my_project\src\auth.py的认证逻辑" (auto-extracts `my_project`)
|
||||
|
||||
## 3. Execution Flow
|
||||
|
||||
### Step 1: Activate SKILL and Analyze Intent
|
||||
### Step 1: Determine SKILL Name (if not provided)
|
||||
|
||||
**Auto-Detection Strategy** (when skill_name parameter is omitted):
|
||||
1. **Path Extraction**: Scan task description for file paths
|
||||
- Extract potential project names from path segments
|
||||
- Example: `"修改D:\projects\my_project\src\auth.py"` → extracts `my_project`
|
||||
2. **Keyword Matching**: Match task keywords against SKILL descriptions
|
||||
- Search for project-specific terms, domain keywords
|
||||
3. **Validation**: Check if extracted name matches `.claude/skills/{skill_name}/`
|
||||
|
||||
**Result**: Either uses provided skill_name or auto-detected name for activation
|
||||
|
||||
### Step 2: Activate SKILL and Analyze Intent
|
||||
|
||||
**Activate SKILL Package**:
|
||||
```javascript
|
||||
Skill(command: "${skill_name}")
|
||||
Skill(command: "${skill_name}") // Uses provided or auto-detected name
|
||||
```
|
||||
|
||||
**What Happens After Activation**:
|
||||
@@ -57,7 +73,7 @@ Based on task intent description, system determines:
|
||||
- **Scope**: specific module, architecture overview, complete system
|
||||
- **Depth**: quick reference, detailed API, full documentation
|
||||
|
||||
### Step 2: Intelligent Documentation Loading
|
||||
### Step 3: Intelligent Documentation Loading
|
||||
|
||||
**Loading Strategy**:
|
||||
|
||||
@@ -86,7 +102,9 @@ The system automatically selects documentation based on intent keywords:
|
||||
**Documentation Loaded into Memory**:
|
||||
After loading, the selected documentation content is available in conversation memory for subsequent operations.
|
||||
|
||||
## 4. Usage Example
|
||||
## 4. Usage Examples
|
||||
|
||||
### Example 1: Manual Specification
|
||||
|
||||
**User Command**:
|
||||
```bash
|
||||
@@ -95,20 +113,52 @@ After loading, the selected documentation content is available in conversation m
|
||||
|
||||
**Execution**:
|
||||
```javascript
|
||||
// Step 1: Activate SKILL
|
||||
// Step 1: Use provided skill_name
|
||||
skill_name = "my_project" // Directly from parameter
|
||||
|
||||
// Step 2: Activate SKILL
|
||||
Skill(command: "my_project")
|
||||
|
||||
// Intent Analysis
|
||||
// Step 3: Intent Analysis
|
||||
Keywords: ["修改", "认证模块", "增加", "OAuth"]
|
||||
Action: modifying (implementation)
|
||||
Scope: auth module + examples
|
||||
|
||||
// Step 2: Load documentation based on intent
|
||||
// Load documentation based on intent
|
||||
Read(.workflow/docs/my_project/auth/README.md)
|
||||
Read(.workflow/docs/my_project/auth/API.md)
|
||||
Read(.workflow/docs/my_project/EXAMPLES.md)
|
||||
```
|
||||
|
||||
### Example 2: Auto-Detection from Path
|
||||
|
||||
**User Command**:
|
||||
```bash
|
||||
/memory:load-skill-memory "修改D:\projects\my_project\src\services\api.py的接口逻辑"
|
||||
```
|
||||
|
||||
**Execution**:
|
||||
```javascript
|
||||
// Step 1: Auto-detect skill_name from path
|
||||
Path detected: "D:\projects\my_project\src\services\api.py"
|
||||
Extracted: "my_project"
|
||||
Validated: .claude/skills/my_project/ exists ✓
|
||||
skill_name = "my_project"
|
||||
|
||||
// Step 2: Activate SKILL
|
||||
Skill(command: "my_project")
|
||||
|
||||
// Step 3: Intent Analysis
|
||||
Keywords: ["修改", "services", "接口逻辑"]
|
||||
Action: modifying (implementation)
|
||||
Scope: services module + examples
|
||||
|
||||
// Load documentation based on intent
|
||||
Read(.workflow/docs/my_project/services/README.md)
|
||||
Read(.workflow/docs/my_project/services/API.md)
|
||||
Read(.workflow/docs/my_project/EXAMPLES.md)
|
||||
```
|
||||
|
||||
## 5. Intent Keyword Mapping
|
||||
|
||||
**Quick Reference**:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: load
|
||||
description: Load project memory by delegating to agent, returns structured core content package for subsequent operations
|
||||
description: Delegate to universal-executor agent to analyze project via Gemini/Qwen CLI and return JSON core content package for task context
|
||||
argument-hint: "[--tool gemini|qwen] \"task context description\""
|
||||
allowed-tools: Task(*), Bash(*)
|
||||
examples:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: skill-memory
|
||||
description: Generate SKILL package index from project documentation
|
||||
argument-hint: "[path] [--tool <gemini|qwen|codex>] [--update] [--mode <full|partial>] [--cli-execute]"
|
||||
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)
|
||||
argument-hint: "[path] [--tool <gemini|qwen|codex>] [--regenerate] [--mode <full|partial>] [--cli-execute]"
|
||||
allowed-tools: SlashCommand(*), TodoWrite(*), Bash(*), Read(*), Write(*)
|
||||
---
|
||||
|
||||
@@ -9,38 +9,26 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Bash(*), Read(*), Write(*)
|
||||
|
||||
## Orchestrator Role
|
||||
|
||||
**This command is a pure orchestrator**: Execute documentation generation workflow, then generate SKILL.md index. Does NOT create task JSON files.
|
||||
**Pure Orchestrator**: Execute documentation generation workflow, then generate SKILL.md index. Does NOT create task JSON files.
|
||||
|
||||
**Execution Model - Auto-Continue Workflow**:
|
||||
**Auto-Continue Workflow**: This command runs **fully autonomously** once triggered. Each phase completes and automatically triggers the next phase without user interaction.
|
||||
|
||||
This workflow runs **fully autonomously** once triggered. Each phase completes and automatically triggers the next phase.
|
||||
|
||||
1. **User triggers**: `/memory:skill-memory [path] [options]`
|
||||
2. **Phase 1 executes** → Parse arguments and prepare → Auto-continues
|
||||
3. **Phase 2 executes** → Call `/memory:docs` to plan documentation → Auto-continues
|
||||
4. **Phase 3 executes** → Call `/workflow:execute` to generate docs → Auto-continues
|
||||
5. **Phase 4 executes** → Generate SKILL.md index → Reports completion
|
||||
|
||||
**Auto-Continue Mechanism**:
|
||||
- TodoList tracks current phase status (in_progress/completed)
|
||||
- After each phase completion, check TodoList and automatically execute next pending phase
|
||||
- All phases run autonomously without user interaction
|
||||
- Progress updates shown at each phase for visibility
|
||||
- Each phase MUST update TodoWrite before triggering next phase
|
||||
**Execution Paths**:
|
||||
- **Full Path**: All 4 phases (no existing docs OR `--regenerate` specified)
|
||||
- **Skip Path**: Phase 1 → Phase 4 (existing docs found AND no `--regenerate` flag)
|
||||
- **Phase 4 Always Executes**: SKILL.md index is never skipped, always generated or updated
|
||||
|
||||
## Core Rules
|
||||
|
||||
1. **Start Immediately**: First action is TodoWrite initialization, second action is Phase 1 execution
|
||||
2. **No Task JSON**: This command does not create task JSON files - delegates to /memory:docs
|
||||
3. **Parse Every Output**: Extract required data from each command output (session_id, task_count, file paths)
|
||||
4. **Auto-Continue via TodoList**: After completing each phase:
|
||||
- Update TodoWrite to mark current phase completed
|
||||
- Mark next phase as in_progress
|
||||
- Immediately execute next phase (no waiting for user input)
|
||||
- Check TodoList to identify next pending phase automatically
|
||||
4. **Auto-Continue**: After completing each phase, update TodoWrite and immediately execute next phase
|
||||
5. **Track Progress**: Update TodoWrite after EVERY phase completion before starting next phase
|
||||
6. **Direct Generation**: Phase 4 directly generates SKILL.md using Write tool
|
||||
7. **No Manual Steps**: User should never be prompted for decisions between phases - fully autonomous execution
|
||||
7. **No Manual Steps**: User should never be prompted for decisions between phases
|
||||
|
||||
---
|
||||
|
||||
## 4-Phase Execution
|
||||
|
||||
@@ -70,13 +58,13 @@ bash(git rev-parse --show-toplevel 2>/dev/null || pwd)
|
||||
# Default values (use these unless user specifies otherwise):
|
||||
# - tool: "gemini"
|
||||
# - mode: "full"
|
||||
# - update: false (no --update flag)
|
||||
# - regenerate: false (no --regenerate flag)
|
||||
# - cli_execute: false (no --cli-execute flag)
|
||||
```
|
||||
|
||||
**Step 3: Check Existing Documentation**
|
||||
```bash
|
||||
# Check if docs directory exists (replace project_name with actual value)
|
||||
# Check if docs directory exists
|
||||
bash(test -d .workflow/docs/my_project && echo "exists" || echo "not_exists")
|
||||
|
||||
# Count existing documentation files
|
||||
@@ -87,39 +75,51 @@ bash(find .workflow/docs/my_project -name "*.md" 2>/dev/null | wc -l || echo 0)
|
||||
- `docs_exists`: `exists` or `not_exists`
|
||||
- `existing_docs`: `5` (or `0` if no docs)
|
||||
|
||||
**Step 4: Handle --update Flag (If Specified)**
|
||||
```bash
|
||||
# If user specified --update, delete existing docs directory
|
||||
bash(rm -rf .workflow/docs/my_project 2>/dev/null || true)
|
||||
**Step 4: Determine Execution Path**
|
||||
|
||||
# Verify deletion
|
||||
bash(test -d .workflow/docs/my_project && echo "still_exists" || echo "deleted")
|
||||
**Decision Logic**:
|
||||
```javascript
|
||||
if (existing_docs > 0 && !regenerate_flag) {
|
||||
// Documentation exists and no regenerate flag
|
||||
SKIP_DOCS_GENERATION = true
|
||||
message = "Documentation already exists, skipping Phase 2 and Phase 3. Use --regenerate to force regeneration."
|
||||
} else if (regenerate_flag) {
|
||||
// Force regeneration: delete existing docs
|
||||
bash(rm -rf .workflow/docs/my_project 2>/dev/null || true)
|
||||
SKIP_DOCS_GENERATION = false
|
||||
message = "Regenerating documentation from scratch."
|
||||
} else {
|
||||
// No existing docs
|
||||
SKIP_DOCS_GENERATION = false
|
||||
message = "No existing documentation found, generating new documentation."
|
||||
}
|
||||
```
|
||||
|
||||
**Summary**:
|
||||
**Summary Variables**:
|
||||
- `PROJECT_NAME`: `my_project`
|
||||
- `TARGET_PATH`: `/d/my_project`
|
||||
- `DOCS_PATH`: `.workflow/docs/my_project`
|
||||
- `TOOL`: `gemini` (default) or user-specified
|
||||
- `MODE`: `full` (default) or user-specified
|
||||
- `CLI_EXECUTE`: `false` (default) or `true` if --cli-execute flag
|
||||
- `UPDATE`: `false` (default) or `true` if --update flag
|
||||
- `EXISTING_DOCS`: `0` (after update) or actual count
|
||||
- `REGENERATE`: `false` (default) or `true` if --regenerate flag
|
||||
- `EXISTING_DOCS`: Count of existing documentation files
|
||||
- `SKIP_DOCS_GENERATION`: `true` if skipping Phase 2/3, `false` otherwise
|
||||
|
||||
**Completion Criteria**:
|
||||
- All parameters extracted and validated
|
||||
- Project name and paths confirmed
|
||||
- Existing docs count retrieved (or 0 after regenerate)
|
||||
- Default values set for unspecified parameters
|
||||
**Completion & TodoWrite**:
|
||||
- If `SKIP_DOCS_GENERATION = true`: Mark phase 1 completed, phase 2&3 completed (skipped), phase 4 in_progress
|
||||
- If `SKIP_DOCS_GENERATION = false`: Mark phase 1 completed, phase 2 in_progress
|
||||
|
||||
**TodoWrite**: Mark phase 1 completed, phase 2 in_progress
|
||||
|
||||
**After Phase 1**: Display preparation results → **Automatically continue to Phase 2** (no user input required)
|
||||
**Next Action**:
|
||||
- If skipping: Display skip message → Jump to Phase 4 (SKILL.md generation)
|
||||
- If not skipping: Display preparation results → Continue to Phase 2 (documentation planning)
|
||||
|
||||
---
|
||||
|
||||
### Phase 2: Call /memory:docs
|
||||
|
||||
**Skip Condition**: This phase is **skipped if SKIP_DOCS_GENERATION = true** (documentation already exists without --regenerate flag)
|
||||
|
||||
**Goal**: Trigger documentation generation workflow
|
||||
|
||||
**Command**:
|
||||
@@ -133,33 +133,29 @@ SlashCommand(command="/memory:docs [targetPath] --tool [tool] --mode [mode] [--c
|
||||
/memory:docs /d/my_app --tool gemini --mode full --cli-execute
|
||||
```
|
||||
|
||||
**Note**: The `--update` flag is handled in Phase 1 by deleting existing documentation. This command always calls `/memory:docs` without the update flag, relying on docs.md's built-in update detection.
|
||||
|
||||
**Input**:
|
||||
- `targetPath` from Phase 1
|
||||
- `tool` from Phase 1
|
||||
- `mode` from Phase 1
|
||||
- `cli_execute` from Phase 1 (optional)
|
||||
**Note**: The `--regenerate` flag is handled in Phase 1 by deleting existing documentation. This command always calls `/memory:docs` without the regenerate flag, relying on docs.md's built-in update detection.
|
||||
|
||||
**Parse Output**:
|
||||
- Extract session ID pattern: `WFS-docs-[timestamp]` (store as `docsSessionId`)
|
||||
- Extract session ID: `WFS-docs-[timestamp]` (store as `docsSessionId`)
|
||||
- Extract task count (store as `taskCount`)
|
||||
|
||||
**Completion Criteria**:
|
||||
- `/memory:docs` command executed successfully
|
||||
- Session ID extracted: `WFS-docs-[timestamp]`
|
||||
- Task count retrieved from output
|
||||
- Session ID extracted and stored
|
||||
- Task count retrieved
|
||||
- Task files created in `.workflow/[docsSessionId]/.task/`
|
||||
- workflow-session.json exists in session directory
|
||||
- workflow-session.json exists
|
||||
|
||||
**TodoWrite**: Mark phase 2 completed, phase 3 in_progress
|
||||
|
||||
**After Phase 2**: Display docs planning results (session ID, task count) → **Automatically continue to Phase 3** (no user input required)
|
||||
**Next Action**: Display docs planning results (session ID, task count) → Auto-continue to Phase 3
|
||||
|
||||
---
|
||||
|
||||
### Phase 3: Execute Documentation Generation
|
||||
|
||||
**Skip Condition**: This phase is **skipped if SKIP_DOCS_GENERATION = true** (documentation already exists without --regenerate flag)
|
||||
|
||||
**Goal**: Execute documentation generation tasks
|
||||
|
||||
**Command**:
|
||||
@@ -173,17 +169,19 @@ SlashCommand(command="/workflow:execute")
|
||||
- `/workflow:execute` command executed successfully
|
||||
- Documentation files generated in `.workflow/docs/[projectName]/`
|
||||
- All tasks marked as completed in session
|
||||
- At minimum, module documentation files exist (API.md and/or README.md)
|
||||
- At minimum: module documentation files exist (API.md and/or README.md)
|
||||
- For full mode: Project README, ARCHITECTURE, EXAMPLES files generated
|
||||
|
||||
**TodoWrite**: Mark phase 3 completed, phase 4 in_progress
|
||||
|
||||
**After Phase 3**: Display execution results (file count, module count) → **Automatically continue to Phase 4** (no user input required)
|
||||
**Next Action**: Display execution results (file count, module count) → Auto-continue to Phase 4
|
||||
|
||||
---
|
||||
|
||||
### Phase 4: Generate SKILL.md Index
|
||||
|
||||
**Note**: This phase is **NEVER skipped** - it always executes to generate or update the SKILL index.
|
||||
|
||||
**Step 1: Read Key Files** (Use Read tool)
|
||||
- `.workflow/docs/{project_name}/README.md` (required)
|
||||
- `.workflow/docs/{project_name}/ARCHITECTURE.md` (optional)
|
||||
@@ -199,14 +197,11 @@ Extract from README + structure: Function (capabilities), Modules (names), Keywo
|
||||
|
||||
**Format**: `{Project} {core capabilities} (located at {project_path}). Load this SKILL when analyzing, modifying, or learning about {domain_description} or files under this path, especially when no relevant context exists in memory.`
|
||||
|
||||
**Path Reference**: Use `TARGET_PATH` from Phase 1 for precise location identification.
|
||||
|
||||
**Domain Description**: Extract human-readable domain/feature area from README (e.g., "workflow management", "thermal modeling"), NOT the technical project_name.
|
||||
|
||||
**Trigger Optimization**:
|
||||
- Include project path to improve triggering when users mention specific directories or file locations
|
||||
- Emphasize "especially when no relevant context exists in memory" to prioritize SKILL as primary context source
|
||||
- Cover three key actions: analyzing (分析), modifying (修改), learning (了解)
|
||||
**Key Elements**:
|
||||
- **Path Reference**: Use `TARGET_PATH` from Phase 1 for precise location identification
|
||||
- **Domain Description**: Extract human-readable domain/feature area from README (e.g., "workflow management", "thermal modeling")
|
||||
- **Trigger Optimization**: Include project path, emphasize "especially when no relevant context exists in memory"
|
||||
- **Action Coverage**: analyzing (分析), modifying (修改), learning (了解)
|
||||
|
||||
**Example**: "Workflow orchestration system with CLI tools and documentation generation (located at /d/Claude_dms3). Load this SKILL when analyzing, modifying, or learning about workflow management or files under this path, especially when no relevant context exists in memory."
|
||||
|
||||
@@ -246,11 +241,11 @@ Everything + [Examples](../../../.workflow/docs/{project_name}/EXAMPLES.md)
|
||||
|
||||
**TodoWrite**: Mark phase 4 completed
|
||||
|
||||
**After Phase 4**: Workflow complete → **Report final summary to user**
|
||||
**Final Action**: Report completion summary to user
|
||||
|
||||
**Return to User**:
|
||||
```
|
||||
✅ SKILL Package Generation Complete
|
||||
SKILL Package Generation Complete
|
||||
|
||||
Project: {project_name}
|
||||
Documentation: .workflow/docs/{project_name}/ ({doc_count} files)
|
||||
@@ -270,65 +265,9 @@ Usage:
|
||||
|
||||
---
|
||||
|
||||
## TodoWrite Pattern
|
||||
## Implementation Details
|
||||
|
||||
**Auto-Continue Logic**: After updating TodoWrite at end of each phase, immediately check for next pending task and execute it.
|
||||
|
||||
```javascript
|
||||
// Initialize (before Phase 1)
|
||||
// FIRST ACTION: Create TodoList with all 4 phases
|
||||
TodoWrite({todos: [
|
||||
{"content": "Parse arguments and prepare", "status": "in_progress", "activeForm": "Parsing arguments"},
|
||||
{"content": "Call /memory:docs to plan documentation", "status": "pending", "activeForm": "Calling /memory:docs"},
|
||||
{"content": "Execute documentation generation", "status": "pending", "activeForm": "Executing documentation"},
|
||||
{"content": "Generate SKILL.md index", "status": "pending", "activeForm": "Generating SKILL.md"}
|
||||
]})
|
||||
// SECOND ACTION: Execute Phase 1 immediately
|
||||
|
||||
// After Phase 1 completes
|
||||
// Update TodoWrite: Mark Phase 1 completed, Phase 2 in_progress
|
||||
TodoWrite({todos: [
|
||||
{"content": "Parse arguments and prepare", "status": "completed", "activeForm": "Parsing arguments"},
|
||||
{"content": "Call /memory:docs to plan documentation", "status": "in_progress", "activeForm": "Calling /memory:docs"},
|
||||
{"content": "Execute documentation generation", "status": "pending", "activeForm": "Executing documentation"},
|
||||
{"content": "Generate SKILL.md index", "status": "pending", "activeForm": "Generating SKILL.md"}
|
||||
]})
|
||||
// NEXT ACTION: Auto-continue to Phase 2 (execute /memory:docs command)
|
||||
|
||||
// After Phase 2 completes
|
||||
// Update TodoWrite: Mark Phase 2 completed, Phase 3 in_progress
|
||||
TodoWrite({todos: [
|
||||
{"content": "Parse arguments and prepare", "status": "completed", "activeForm": "Parsing arguments"},
|
||||
{"content": "Call /memory:docs to plan documentation", "status": "completed", "activeForm": "Calling /memory:docs"},
|
||||
{"content": "Execute documentation generation", "status": "in_progress", "activeForm": "Executing documentation"},
|
||||
{"content": "Generate SKILL.md index", "status": "pending", "activeForm": "Generating SKILL.md"}
|
||||
]})
|
||||
// NEXT ACTION: Auto-continue to Phase 3 (execute /workflow:execute command)
|
||||
|
||||
// After Phase 3 completes
|
||||
// Update TodoWrite: Mark Phase 3 completed, Phase 4 in_progress
|
||||
TodoWrite({todos: [
|
||||
{"content": "Parse arguments and prepare", "status": "completed", "activeForm": "Parsing arguments"},
|
||||
{"content": "Call /memory:docs to plan documentation", "status": "completed", "activeForm": "Calling /memory:docs"},
|
||||
{"content": "Execute documentation generation", "status": "completed", "activeForm": "Executing documentation"},
|
||||
{"content": "Generate SKILL.md index", "status": "in_progress", "activeForm": "Generating SKILL.md"}
|
||||
]})
|
||||
// NEXT ACTION: Auto-continue to Phase 4 (generate SKILL.md)
|
||||
|
||||
// After Phase 4 completes
|
||||
// Update TodoWrite: Mark Phase 4 completed
|
||||
TodoWrite({todos: [
|
||||
{"content": "Parse arguments and prepare", "status": "completed", "activeForm": "Parsing arguments"},
|
||||
{"content": "Call /memory:docs to plan documentation", "status": "completed", "activeForm": "Calling /memory:docs"},
|
||||
{"content": "Execute documentation generation", "status": "completed", "activeForm": "Executing documentation"},
|
||||
{"content": "Generate SKILL.md index", "status": "completed", "activeForm": "Generating SKILL.md"}
|
||||
]})
|
||||
// FINAL ACTION: Report completion summary to user
|
||||
```
|
||||
|
||||
## Auto-Continue Execution Flow
|
||||
|
||||
**Critical Implementation Rules**:
|
||||
### Critical Rules
|
||||
|
||||
1. **No User Prompts Between Phases**: Never ask user questions or wait for input between phases
|
||||
2. **Immediate Phase Transition**: After TodoWrite update, immediately execute next phase command
|
||||
@@ -340,7 +279,96 @@ TodoWrite({todos: [
|
||||
Phase N completes → Update TodoWrite (N=completed, N+1=in_progress) → Execute Phase N+1
|
||||
```
|
||||
|
||||
**Execution Sequence**:
|
||||
### TodoWrite Patterns
|
||||
|
||||
#### Initialization (Before Phase 1)
|
||||
|
||||
**FIRST ACTION**: Create TodoList with all 4 phases
|
||||
```javascript
|
||||
TodoWrite({todos: [
|
||||
{"content": "Parse arguments and prepare", "status": "in_progress", "activeForm": "Parsing arguments"},
|
||||
{"content": "Call /memory:docs to plan documentation", "status": "pending", "activeForm": "Calling /memory:docs"},
|
||||
{"content": "Execute documentation generation", "status": "pending", "activeForm": "Executing documentation"},
|
||||
{"content": "Generate SKILL.md index", "status": "pending", "activeForm": "Generating SKILL.md"}
|
||||
]})
|
||||
```
|
||||
|
||||
**SECOND ACTION**: Execute Phase 1 immediately
|
||||
|
||||
#### Full Path (SKIP_DOCS_GENERATION = false)
|
||||
|
||||
**After Phase 1**:
|
||||
```javascript
|
||||
TodoWrite({todos: [
|
||||
{"content": "Parse arguments and prepare", "status": "completed", "activeForm": "Parsing arguments"},
|
||||
{"content": "Call /memory:docs to plan documentation", "status": "in_progress", "activeForm": "Calling /memory:docs"},
|
||||
{"content": "Execute documentation generation", "status": "pending", "activeForm": "Executing documentation"},
|
||||
{"content": "Generate SKILL.md index", "status": "pending", "activeForm": "Generating SKILL.md"}
|
||||
]})
|
||||
// Auto-continue to Phase 2
|
||||
```
|
||||
|
||||
**After Phase 2**:
|
||||
```javascript
|
||||
TodoWrite({todos: [
|
||||
{"content": "Parse arguments and prepare", "status": "completed", "activeForm": "Parsing arguments"},
|
||||
{"content": "Call /memory:docs to plan documentation", "status": "completed", "activeForm": "Calling /memory:docs"},
|
||||
{"content": "Execute documentation generation", "status": "in_progress", "activeForm": "Executing documentation"},
|
||||
{"content": "Generate SKILL.md index", "status": "pending", "activeForm": "Generating SKILL.md"}
|
||||
]})
|
||||
// Auto-continue to Phase 3
|
||||
```
|
||||
|
||||
**After Phase 3**:
|
||||
```javascript
|
||||
TodoWrite({todos: [
|
||||
{"content": "Parse arguments and prepare", "status": "completed", "activeForm": "Parsing arguments"},
|
||||
{"content": "Call /memory:docs to plan documentation", "status": "completed", "activeForm": "Calling /memory:docs"},
|
||||
{"content": "Execute documentation generation", "status": "completed", "activeForm": "Executing documentation"},
|
||||
{"content": "Generate SKILL.md index", "status": "in_progress", "activeForm": "Generating SKILL.md"}
|
||||
]})
|
||||
// Auto-continue to Phase 4
|
||||
```
|
||||
|
||||
**After Phase 4**:
|
||||
```javascript
|
||||
TodoWrite({todos: [
|
||||
{"content": "Parse arguments and prepare", "status": "completed", "activeForm": "Parsing arguments"},
|
||||
{"content": "Call /memory:docs to plan documentation", "status": "completed", "activeForm": "Calling /memory:docs"},
|
||||
{"content": "Execute documentation generation", "status": "completed", "activeForm": "Executing documentation"},
|
||||
{"content": "Generate SKILL.md index", "status": "completed", "activeForm": "Generating SKILL.md"}
|
||||
]})
|
||||
// Report completion summary to user
|
||||
```
|
||||
|
||||
#### Skip Path (SKIP_DOCS_GENERATION = true)
|
||||
|
||||
**After Phase 1** (detects existing docs, skips Phase 2 & 3):
|
||||
```javascript
|
||||
TodoWrite({todos: [
|
||||
{"content": "Parse arguments and prepare", "status": "completed", "activeForm": "Parsing arguments"},
|
||||
{"content": "Call /memory:docs to plan documentation", "status": "completed", "activeForm": "Calling /memory:docs"},
|
||||
{"content": "Execute documentation generation", "status": "completed", "activeForm": "Executing documentation"},
|
||||
{"content": "Generate SKILL.md index", "status": "in_progress", "activeForm": "Generating SKILL.md"}
|
||||
]})
|
||||
// Display skip message: "Documentation already exists, skipping Phase 2 and Phase 3. Use --regenerate to force regeneration."
|
||||
// Jump directly to Phase 4
|
||||
```
|
||||
|
||||
**After Phase 4**:
|
||||
```javascript
|
||||
TodoWrite({todos: [
|
||||
{"content": "Parse arguments and prepare", "status": "completed", "activeForm": "Parsing arguments"},
|
||||
{"content": "Call /memory:docs to plan documentation", "status": "completed", "activeForm": "Calling /memory:docs"},
|
||||
{"content": "Execute documentation generation", "status": "completed", "activeForm": "Executing documentation"},
|
||||
{"content": "Generate SKILL.md index", "status": "completed", "activeForm": "Generating SKILL.md"}
|
||||
]})
|
||||
// Report completion summary to user
|
||||
```
|
||||
|
||||
### Execution Flow Diagrams
|
||||
|
||||
#### Full Path Flow
|
||||
```
|
||||
User triggers command
|
||||
↓
|
||||
@@ -365,7 +393,27 @@ User triggers command
|
||||
[Report] Display completion summary
|
||||
```
|
||||
|
||||
**Error Handling**:
|
||||
#### Skip Path Flow
|
||||
```
|
||||
User triggers command
|
||||
↓
|
||||
[TodoWrite] Initialize 4 phases (Phase 1 = in_progress)
|
||||
↓
|
||||
[Execute] Phase 1: Parse arguments, detect existing docs
|
||||
↓
|
||||
[TodoWrite] Phase 1 = completed, Phase 2&3 = completed (skipped), Phase 4 = in_progress
|
||||
↓
|
||||
[Display] Skip message: "Documentation already exists, skipping Phase 2 and Phase 3"
|
||||
↓
|
||||
[Execute] Phase 4: Generate SKILL.md (always runs)
|
||||
↓
|
||||
[TodoWrite] Phase 4 = completed
|
||||
↓
|
||||
[Report] Display completion summary
|
||||
```
|
||||
|
||||
### Error Handling
|
||||
|
||||
- If any phase fails, mark it as "in_progress" (not completed)
|
||||
- Report error details to user
|
||||
- Do NOT auto-continue to next phase on failure
|
||||
@@ -375,7 +423,7 @@ User triggers command
|
||||
## Parameters
|
||||
|
||||
```bash
|
||||
/memory:skill-memory [path] [--tool <gemini|qwen|codex>] [--update] [--mode <full|partial>] [--cli-execute]
|
||||
/memory:skill-memory [path] [--tool <gemini|qwen|codex>] [--regenerate] [--mode <full|partial>] [--cli-execute]
|
||||
```
|
||||
|
||||
- **path**: Target directory (default: current directory)
|
||||
@@ -383,7 +431,7 @@ User triggers command
|
||||
- `gemini`: Comprehensive documentation
|
||||
- `qwen`: Architecture analysis
|
||||
- `codex`: Implementation validation
|
||||
- **--update**: Force update all documentation
|
||||
- **--regenerate**: Force regenerate all documentation
|
||||
- When enabled: Deletes existing `.workflow/docs/{project_name}/` before regeneration
|
||||
- Ensures fresh documentation from source code
|
||||
- **--mode**: Documentation mode (default: full)
|
||||
@@ -393,6 +441,8 @@ User triggers command
|
||||
- When enabled: CLI generates docs directly in implementation_approach
|
||||
- When disabled (default): Agent generates documentation content
|
||||
|
||||
---
|
||||
|
||||
## Examples
|
||||
|
||||
### Example 1: Generate SKILL Package (Default)
|
||||
@@ -407,16 +457,16 @@ User triggers command
|
||||
3. Phase 3: Executes documentation generation via `/workflow:execute`
|
||||
4. Phase 4: Generates SKILL.md at `.claude/skills/{project_name}/SKILL.md`
|
||||
|
||||
### Example 2: Update with Qwen
|
||||
### Example 2: Regenerate with Qwen
|
||||
|
||||
```bash
|
||||
/memory:skill-memory /d/my_app --tool qwen --update
|
||||
/memory:skill-memory /d/my_app --tool qwen --regenerate
|
||||
```
|
||||
|
||||
**Workflow**:
|
||||
1. Phase 1: Parses target path, detects update flag
|
||||
2. Phase 2: Calls `/memory:docs /d/my_app --tool qwen --mode full` (update handled in Phase 1)
|
||||
3. Phase 3: Executes documentation update
|
||||
1. Phase 1: Parses target path, detects regenerate flag, deletes existing docs
|
||||
2. Phase 2: Calls `/memory:docs /d/my_app --tool qwen --mode full`
|
||||
3. Phase 3: Executes documentation regeneration
|
||||
4. Phase 4: Generates updated SKILL.md
|
||||
|
||||
### Example 3: Partial Mode (Modules Only)
|
||||
@@ -443,24 +493,42 @@ User triggers command
|
||||
3. Phase 3: Executes CLI-based documentation generation
|
||||
4. Phase 4: Generates SKILL.md at `.claude/skills/{project_name}/SKILL.md`
|
||||
|
||||
### Example 5: Skip Path (Existing Docs)
|
||||
|
||||
```bash
|
||||
/memory:skill-memory
|
||||
```
|
||||
|
||||
**Scenario**: Documentation already exists in `.workflow/docs/{project_name}/`
|
||||
|
||||
**Workflow**:
|
||||
1. Phase 1: Detects existing docs (5 files), sets SKIP_DOCS_GENERATION = true
|
||||
2. Display: "Documentation already exists, skipping Phase 2 and Phase 3. Use --regenerate to force regeneration."
|
||||
3. Phase 4: Generates or updates SKILL.md index only (~5-10x faster)
|
||||
|
||||
---
|
||||
|
||||
## Benefits
|
||||
|
||||
- ✅ **Pure Orchestrator**: No task JSON generation, delegates to /memory:docs
|
||||
- ✅ **Auto-Continue**: Autonomous 4-phase execution
|
||||
- ✅ **Simplified**: ~70% less code than previous version
|
||||
- ✅ **Maintainable**: Changes to /memory:docs automatically apply
|
||||
- ✅ **Direct Generation**: Phase 4 directly writes SKILL.md
|
||||
- ✅ **Flexible**: Supports all /memory:docs options
|
||||
- **Pure Orchestrator**: No task JSON generation, delegates to /memory:docs
|
||||
- **Auto-Continue**: Autonomous 4-phase execution without user interaction
|
||||
- **Intelligent Skip**: Detects existing docs and skips regeneration for fast SKILL updates
|
||||
- **Always Fresh Index**: Phase 4 always executes to ensure SKILL.md stays synchronized
|
||||
- **Simplified**: ~70% less code than previous version
|
||||
- **Maintainable**: Changes to /memory:docs automatically apply
|
||||
- **Direct Generation**: Phase 4 directly writes SKILL.md
|
||||
- **Flexible**: Supports all /memory:docs options (tool, mode, cli-execute)
|
||||
|
||||
## Architecture
|
||||
|
||||
```
|
||||
skill-memory (orchestrator)
|
||||
├─ Phase 1: Prepare (bash commands)
|
||||
├─ Phase 2: /memory:docs (task planning)
|
||||
├─ Phase 3: /workflow:execute (task execution)
|
||||
└─ Phase 4: Write SKILL.md (direct file generation)
|
||||
├─ Phase 1: Prepare (bash commands, skip decision)
|
||||
├─ Phase 2: /memory:docs (task planning, skippable)
|
||||
├─ Phase 3: /workflow:execute (task execution, skippable)
|
||||
└─ Phase 4: Write SKILL.md (direct file generation, always runs)
|
||||
|
||||
No task JSON created by this command
|
||||
All documentation tasks managed by /memory:docs
|
||||
Smart skip logic: 5-10x faster when docs exist
|
||||
```
|
||||
|
||||
477
.claude/commands/memory/tech-research.md
Normal file
477
.claude/commands/memory/tech-research.md
Normal file
@@ -0,0 +1,477 @@
|
||||
---
|
||||
name: 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)
|
||||
argument-hint: "[session-id | tech-stack-name] [--regenerate] [--tool <gemini|qwen>]"
|
||||
allowed-tools: SlashCommand(*), TodoWrite(*), Bash(*), Read(*), Write(*), Task(*)
|
||||
---
|
||||
|
||||
# Tech Stack Research SKILL Generator
|
||||
|
||||
## Overview
|
||||
|
||||
**Pure Orchestrator with Agent Delegation**: Prepares context paths and delegates ALL work to agent. Agent produces files directly.
|
||||
|
||||
**Auto-Continue Workflow**: Runs fully autonomously once triggered. Each phase completes and automatically triggers the next phase.
|
||||
|
||||
**Execution Paths**:
|
||||
- **Full Path**: All 3 phases (no existing SKILL OR `--regenerate` specified)
|
||||
- **Skip Path**: Phase 1 → Phase 3 (existing SKILL found AND no `--regenerate` flag)
|
||||
- **Phase 3 Always Executes**: SKILL index is always generated or updated
|
||||
|
||||
**Agent Responsibility**:
|
||||
- Agent does ALL the work: context reading, Exa research, content synthesis, file writing
|
||||
- Orchestrator only provides context paths and waits for completion
|
||||
|
||||
## Core Rules
|
||||
|
||||
1. **Start Immediately**: First action is TodoWrite initialization, second action is Phase 1 execution
|
||||
2. **Context Path Delegation**: Pass session directory or tech stack name to agent, let agent do discovery
|
||||
3. **Agent Produces Files**: Agent directly writes all module files, orchestrator does NOT parse agent output
|
||||
4. **Auto-Continue**: After completing each phase, update TodoWrite and immediately execute next phase
|
||||
5. **No User Prompts**: Never ask user questions or wait for input between phases
|
||||
6. **Track Progress**: Update TodoWrite after EVERY phase completion before starting next phase
|
||||
7. **Lightweight Index**: Phase 3 only generates SKILL.md index by reading existing files
|
||||
|
||||
---
|
||||
|
||||
## 3-Phase Execution
|
||||
|
||||
### Phase 1: Prepare Context Paths
|
||||
|
||||
**Goal**: Detect input mode, prepare context paths for agent, check existing SKILL
|
||||
|
||||
**Input Mode Detection**:
|
||||
```bash
|
||||
# Get input parameter
|
||||
input="$1"
|
||||
|
||||
# Detect mode
|
||||
if [[ "$input" == WFS-* ]]; then
|
||||
MODE="session"
|
||||
SESSION_ID="$input"
|
||||
CONTEXT_PATH=".workflow/${SESSION_ID}"
|
||||
else
|
||||
MODE="direct"
|
||||
TECH_STACK_NAME="$input"
|
||||
CONTEXT_PATH="$input" # Pass tech stack name as context
|
||||
fi
|
||||
```
|
||||
|
||||
**Check Existing SKILL**:
|
||||
```bash
|
||||
# For session mode, peek at session to get tech stack name
|
||||
if [[ "$MODE" == "session" ]]; then
|
||||
bash(test -f ".workflow/${SESSION_ID}/workflow-session.json")
|
||||
Read(.workflow/${SESSION_ID}/workflow-session.json)
|
||||
# Extract tech_stack_name (minimal extraction)
|
||||
fi
|
||||
|
||||
# Normalize and check
|
||||
normalized_name=$(echo "$TECH_STACK_NAME" | tr '[:upper:]' '[:lower:]' | tr ' ' '-')
|
||||
bash(test -d ".claude/skills/${normalized_name}" && echo "exists" || echo "not_exists")
|
||||
bash(find ".claude/skills/${normalized_name}" -name "*.md" 2>/dev/null | wc -l || echo 0)
|
||||
```
|
||||
|
||||
**Skip Decision**:
|
||||
```javascript
|
||||
if (existing_files > 0 && !regenerate_flag) {
|
||||
SKIP_GENERATION = true
|
||||
message = "Tech stack SKILL already exists, skipping Phase 2. Use --regenerate to force regeneration."
|
||||
} else if (regenerate_flag) {
|
||||
bash(rm -rf ".claude/skills/${normalized_name}")
|
||||
SKIP_GENERATION = false
|
||||
message = "Regenerating tech stack SKILL from scratch."
|
||||
} else {
|
||||
SKIP_GENERATION = false
|
||||
message = "No existing SKILL found, generating new tech stack documentation."
|
||||
}
|
||||
```
|
||||
|
||||
**Output Variables**:
|
||||
- `MODE`: `session` or `direct`
|
||||
- `SESSION_ID`: Session ID (if session mode)
|
||||
- `CONTEXT_PATH`: Path to session directory OR tech stack name
|
||||
- `TECH_STACK_NAME`: Extracted or provided tech stack name
|
||||
- `SKIP_GENERATION`: Boolean - whether to skip Phase 2
|
||||
|
||||
**TodoWrite**:
|
||||
- If skipping: Mark phase 1 completed, phase 2 completed, phase 3 in_progress
|
||||
- If not skipping: Mark phase 1 completed, phase 2 in_progress
|
||||
|
||||
---
|
||||
|
||||
### Phase 2: Agent Produces All Files
|
||||
|
||||
**Skip Condition**: Skipped if `SKIP_GENERATION = true`
|
||||
|
||||
**Goal**: Delegate EVERYTHING to agent - context reading, Exa research, content synthesis, and file writing
|
||||
|
||||
**Agent Task Specification**:
|
||||
|
||||
```
|
||||
Task(
|
||||
subagent_type: "general-purpose",
|
||||
description: "Generate tech stack SKILL: {CONTEXT_PATH}",
|
||||
prompt: "
|
||||
Generate a complete tech stack SKILL package with Exa research.
|
||||
|
||||
**Context Provided**:
|
||||
- Mode: {MODE}
|
||||
- Context Path: {CONTEXT_PATH}
|
||||
|
||||
**Templates Available**:
|
||||
- Module Format: ~/.claude/workflows/cli-templates/prompts/tech/tech-module-format.txt
|
||||
- SKILL Index: ~/.claude/workflows/cli-templates/prompts/tech/tech-skill-index.txt
|
||||
|
||||
**Your Responsibilities**:
|
||||
|
||||
1. **Extract Tech Stack Information**:
|
||||
|
||||
IF MODE == 'session':
|
||||
- Read `.workflow/{SESSION_ID}/workflow-session.json`
|
||||
- Read `.workflow/{SESSION_ID}/.process/context-package.json`
|
||||
- Extract tech_stack: {language, frameworks, libraries}
|
||||
- Build tech stack name: \"{language}-{framework1}-{framework2}\"
|
||||
- Example: \"typescript-react-nextjs\"
|
||||
|
||||
IF MODE == 'direct':
|
||||
- Tech stack name = CONTEXT_PATH
|
||||
- Parse composite: split by '-' delimiter
|
||||
- Example: \"typescript-react-nextjs\" → [\"typescript\", \"react\", \"nextjs\"]
|
||||
|
||||
2. **Execute Exa Research** (4-6 parallel queries):
|
||||
|
||||
Base Queries (always execute):
|
||||
- mcp__exa__get_code_context_exa(query: \"{tech} core principles best practices 2025\", tokensNum: 8000)
|
||||
- mcp__exa__get_code_context_exa(query: \"{tech} common patterns architecture examples\", tokensNum: 7000)
|
||||
- mcp__exa__web_search_exa(query: \"{tech} configuration setup tooling 2025\", numResults: 5)
|
||||
- mcp__exa__get_code_context_exa(query: \"{tech} testing strategies\", tokensNum: 5000)
|
||||
|
||||
Component Queries (if composite):
|
||||
- For each additional component:
|
||||
mcp__exa__get_code_context_exa(query: \"{main_tech} {component} integration\", tokensNum: 5000)
|
||||
|
||||
3. **Read Module Format Template**:
|
||||
|
||||
Read template for structure guidance:
|
||||
```bash
|
||||
Read(~/.claude/workflows/cli-templates/prompts/tech/tech-module-format.txt)
|
||||
```
|
||||
|
||||
4. **Synthesize Content into 6 Modules**:
|
||||
|
||||
Follow template structure from tech-module-format.txt:
|
||||
- **principles.md** - Core concepts, philosophies (~3K tokens)
|
||||
- **patterns.md** - Implementation patterns with code examples (~5K tokens)
|
||||
- **practices.md** - Best practices, anti-patterns, pitfalls (~4K tokens)
|
||||
- **testing.md** - Testing strategies, frameworks (~3K tokens)
|
||||
- **config.md** - Setup, configuration, tooling (~3K tokens)
|
||||
- **frameworks.md** - Framework integration (only if composite, ~4K tokens)
|
||||
|
||||
Each module follows template format:
|
||||
- Frontmatter (YAML)
|
||||
- Main sections with clear headings
|
||||
- Code examples from Exa research
|
||||
- Best practices sections
|
||||
- References to Exa sources
|
||||
|
||||
5. **Write Files Directly**:
|
||||
|
||||
```javascript
|
||||
// Create directory
|
||||
bash(mkdir -p \".claude/skills/{tech_stack_name}\")
|
||||
|
||||
// Write each module file using Write tool
|
||||
Write({ file_path: \".claude/skills/{tech_stack_name}/principles.md\", content: ... })
|
||||
Write({ file_path: \".claude/skills/{tech_stack_name}/patterns.md\", content: ... })
|
||||
Write({ file_path: \".claude/skills/{tech_stack_name}/practices.md\", content: ... })
|
||||
Write({ file_path: \".claude/skills/{tech_stack_name}/testing.md\", content: ... })
|
||||
Write({ file_path: \".claude/skills/{tech_stack_name}/config.md\", content: ... })
|
||||
// Write frameworks.md only if composite
|
||||
|
||||
// Write metadata.json
|
||||
Write({
|
||||
file_path: \".claude/skills/{tech_stack_name}/metadata.json\",
|
||||
content: JSON.stringify({
|
||||
tech_stack_name,
|
||||
components,
|
||||
is_composite,
|
||||
generated_at: timestamp,
|
||||
source: \"exa-research\",
|
||||
research_summary: { total_queries, total_sources }
|
||||
})
|
||||
})
|
||||
```
|
||||
|
||||
6. **Report Completion**:
|
||||
|
||||
Provide summary:
|
||||
- Tech stack name
|
||||
- Files created (count)
|
||||
- Exa queries executed
|
||||
- Sources consulted
|
||||
|
||||
**CRITICAL**:
|
||||
- MUST read external template files before generating content (step 3 for modules, step 4 for index)
|
||||
- You have FULL autonomy - read files, execute Exa, synthesize content, write files
|
||||
- Do NOT return JSON or structured data - produce actual .md files
|
||||
- Handle errors gracefully (Exa failures, missing files, template read failures)
|
||||
- If tech stack cannot be determined, ask orchestrator to clarify
|
||||
"
|
||||
)
|
||||
```
|
||||
|
||||
**Completion Criteria**:
|
||||
- Agent task executed successfully
|
||||
- 5-6 modular files written to `.claude/skills/{tech_stack_name}/`
|
||||
- metadata.json written
|
||||
- Agent reports completion
|
||||
|
||||
**TodoWrite**: Mark phase 2 completed, phase 3 in_progress
|
||||
|
||||
---
|
||||
|
||||
### Phase 3: Generate SKILL.md Index
|
||||
|
||||
**Note**: This phase **ALWAYS executes** - generates or updates the SKILL index.
|
||||
|
||||
**Goal**: Read generated module files and create SKILL.md index with loading recommendations
|
||||
|
||||
**Steps**:
|
||||
|
||||
1. **Verify Generated Files**:
|
||||
```bash
|
||||
bash(find ".claude/skills/${TECH_STACK_NAME}" -name "*.md" -type f | sort)
|
||||
```
|
||||
|
||||
2. **Read metadata.json**:
|
||||
```javascript
|
||||
Read(.claude/skills/${TECH_STACK_NAME}/metadata.json)
|
||||
// Extract: tech_stack_name, components, is_composite, research_summary
|
||||
```
|
||||
|
||||
3. **Read Module Headers** (optional, first 20 lines):
|
||||
```javascript
|
||||
Read(.claude/skills/${TECH_STACK_NAME}/principles.md, limit: 20)
|
||||
// Repeat for other modules
|
||||
```
|
||||
|
||||
4. **Read SKILL Index Template**:
|
||||
|
||||
```javascript
|
||||
Read(~/.claude/workflows/cli-templates/prompts/tech/tech-skill-index.txt)
|
||||
```
|
||||
|
||||
5. **Generate SKILL.md Index**:
|
||||
|
||||
Follow template from tech-skill-index.txt with variable substitutions:
|
||||
- `{TECH_STACK_NAME}`: From metadata.json
|
||||
- `{MAIN_TECH}`: Primary technology
|
||||
- `{ISO_TIMESTAMP}`: Current timestamp
|
||||
- `{QUERY_COUNT}`: From research_summary
|
||||
- `{SOURCE_COUNT}`: From research_summary
|
||||
- Conditional sections for composite tech stacks
|
||||
|
||||
Template provides structure for:
|
||||
- Frontmatter with metadata
|
||||
- Overview and tech stack description
|
||||
- Module organization (Core/Practical/Config sections)
|
||||
- Loading recommendations (Quick/Implementation/Complete)
|
||||
- Usage guidelines and auto-trigger keywords
|
||||
- Research metadata and version history
|
||||
|
||||
6. **Write SKILL.md**:
|
||||
```javascript
|
||||
Write({
|
||||
file_path: `.claude/skills/${TECH_STACK_NAME}/SKILL.md`,
|
||||
content: generatedIndexMarkdown
|
||||
})
|
||||
```
|
||||
|
||||
**Completion Criteria**:
|
||||
- SKILL.md index written
|
||||
- All module files verified
|
||||
- Loading recommendations included
|
||||
|
||||
**TodoWrite**: Mark phase 3 completed
|
||||
|
||||
**Final Report**:
|
||||
```
|
||||
Tech Stack SKILL Package Complete
|
||||
|
||||
Tech Stack: {TECH_STACK_NAME}
|
||||
Location: .claude/skills/{TECH_STACK_NAME}/
|
||||
|
||||
Files: SKILL.md + 5-6 modules + metadata.json
|
||||
Exa Research: {queries} queries, {sources} sources
|
||||
|
||||
Usage: Skill(command: "{TECH_STACK_NAME}")
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Implementation Details
|
||||
|
||||
### TodoWrite Patterns
|
||||
|
||||
**Initialization** (Before Phase 1):
|
||||
```javascript
|
||||
TodoWrite({todos: [
|
||||
{"content": "Prepare context paths", "status": "in_progress", "activeForm": "Preparing context paths"},
|
||||
{"content": "Agent produces all module files", "status": "pending", "activeForm": "Agent producing files"},
|
||||
{"content": "Generate SKILL.md index", "status": "pending", "activeForm": "Generating SKILL index"}
|
||||
]})
|
||||
```
|
||||
|
||||
**Full Path** (SKIP_GENERATION = false):
|
||||
```javascript
|
||||
// After Phase 1
|
||||
TodoWrite({todos: [
|
||||
{"content": "Prepare context paths", "status": "completed", ...},
|
||||
{"content": "Agent produces all module files", "status": "in_progress", ...},
|
||||
{"content": "Generate SKILL.md index", "status": "pending", ...}
|
||||
]})
|
||||
|
||||
// After Phase 2
|
||||
TodoWrite({todos: [
|
||||
{"content": "Prepare context paths", "status": "completed", ...},
|
||||
{"content": "Agent produces all module files", "status": "completed", ...},
|
||||
{"content": "Generate SKILL.md index", "status": "in_progress", ...}
|
||||
]})
|
||||
|
||||
// After Phase 3
|
||||
TodoWrite({todos: [
|
||||
{"content": "Prepare context paths", "status": "completed", ...},
|
||||
{"content": "Agent produces all module files", "status": "completed", ...},
|
||||
{"content": "Generate SKILL.md index", "status": "completed", ...}
|
||||
]})
|
||||
```
|
||||
|
||||
**Skip Path** (SKIP_GENERATION = true):
|
||||
```javascript
|
||||
// After Phase 1 (skip Phase 2)
|
||||
TodoWrite({todos: [
|
||||
{"content": "Prepare context paths", "status": "completed", ...},
|
||||
{"content": "Agent produces all module files", "status": "completed", ...}, // Skipped
|
||||
{"content": "Generate SKILL.md index", "status": "in_progress", ...}
|
||||
]})
|
||||
```
|
||||
|
||||
### Execution Flow
|
||||
|
||||
**Full Path**:
|
||||
```
|
||||
User → TodoWrite Init → Phase 1 (prepare) → Phase 2 (agent writes files) → Phase 3 (write index) → Report
|
||||
```
|
||||
|
||||
**Skip Path**:
|
||||
```
|
||||
User → TodoWrite Init → Phase 1 (detect existing) → Phase 3 (update index) → Report
|
||||
```
|
||||
|
||||
### Error Handling
|
||||
|
||||
**Phase 1 Errors**:
|
||||
- Invalid session ID: Report error, verify session exists
|
||||
- Missing context-package: Warn, fall back to direct mode
|
||||
- No tech stack detected: Ask user to specify tech stack name
|
||||
|
||||
**Phase 2 Errors (Agent)**:
|
||||
- Agent task fails: Retry once, report if fails again
|
||||
- Exa API failures: Agent handles internally with retries
|
||||
- Incomplete results: Warn user, proceed with partial data if minimum sections available
|
||||
|
||||
**Phase 3 Errors**:
|
||||
- Write failures: Report which files failed
|
||||
- Missing files: Note in SKILL.md, suggest regeneration
|
||||
|
||||
---
|
||||
|
||||
## Parameters
|
||||
|
||||
```bash
|
||||
/memory:tech-research [session-id | "tech-stack-name"] [--regenerate] [--tool <gemini|qwen>]
|
||||
```
|
||||
|
||||
**Arguments**:
|
||||
- **session-id | tech-stack-name**: Input source (auto-detected by WFS- prefix)
|
||||
- Session mode: `WFS-user-auth-v2` - Extract tech stack from workflow
|
||||
- Direct mode: `"typescript"`, `"typescript-react-nextjs"` - User specifies
|
||||
- **--regenerate**: Force regenerate existing SKILL (deletes and recreates)
|
||||
- **--tool**: Reserved for future CLI integration (default: gemini)
|
||||
|
||||
---
|
||||
|
||||
## Examples
|
||||
|
||||
**Generated File Structure** (for all examples):
|
||||
```
|
||||
.claude/skills/{tech-stack}/
|
||||
├── SKILL.md # Index (Phase 3)
|
||||
├── principles.md # Agent (Phase 2)
|
||||
├── patterns.md # Agent
|
||||
├── practices.md # Agent
|
||||
├── testing.md # Agent
|
||||
├── config.md # Agent
|
||||
├── frameworks.md # Agent (if composite)
|
||||
└── metadata.json # Agent
|
||||
```
|
||||
|
||||
### Direct Mode - Single Stack
|
||||
|
||||
```bash
|
||||
/memory:tech-research "typescript"
|
||||
```
|
||||
|
||||
**Workflow**:
|
||||
1. Phase 1: Detects direct mode, checks existing SKILL
|
||||
2. Phase 2: Agent executes 4 Exa queries, writes 5 modules
|
||||
3. Phase 3: Generates SKILL.md index
|
||||
|
||||
### Direct Mode - Composite Stack
|
||||
|
||||
```bash
|
||||
/memory:tech-research "typescript-react-nextjs"
|
||||
```
|
||||
|
||||
**Workflow**:
|
||||
1. Phase 1: Decomposes into ["typescript", "react", "nextjs"]
|
||||
2. Phase 2: Agent executes 6 Exa queries (4 base + 2 components), writes 6 modules (adds frameworks.md)
|
||||
3. Phase 3: Generates SKILL.md index with framework integration
|
||||
|
||||
### Session Mode - Extract from Workflow
|
||||
|
||||
```bash
|
||||
/memory:tech-research WFS-user-auth-20251104
|
||||
```
|
||||
|
||||
**Workflow**:
|
||||
1. Phase 1: Reads session, extracts tech stack: `python-fastapi-sqlalchemy`
|
||||
2. Phase 2: Agent researches Python + FastAPI + SQLAlchemy, writes 6 modules
|
||||
3. Phase 3: Generates SKILL.md index
|
||||
|
||||
### Regenerate Existing
|
||||
|
||||
```bash
|
||||
/memory:tech-research "react" --regenerate
|
||||
```
|
||||
|
||||
**Workflow**:
|
||||
1. Phase 1: Deletes existing SKILL due to --regenerate
|
||||
2. Phase 2: Agent executes fresh Exa research (latest 2025 practices)
|
||||
3. Phase 3: Generates updated SKILL.md
|
||||
|
||||
### Skip Path - Fast Update
|
||||
|
||||
```bash
|
||||
/memory:tech-research "python"
|
||||
```
|
||||
|
||||
**Scenario**: SKILL already exists with 7 files
|
||||
|
||||
**Workflow**:
|
||||
1. Phase 1: Detects existing SKILL, sets SKIP_GENERATION = true
|
||||
2. Phase 2: **SKIPPED**
|
||||
3. Phase 3: Updates SKILL.md index only (5-10x faster)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: update-full
|
||||
description: Complete project-wide CLAUDE.md documentation update with agent-based parallel execution and tool fallback
|
||||
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
|
||||
argument-hint: "[--tool gemini|qwen|codex] [--path <directory>]"
|
||||
---
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: update-related
|
||||
description: Context-aware CLAUDE.md documentation updates based on recent changes with agent-based execution and tool fallback
|
||||
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
|
||||
argument-hint: "[--tool gemini|qwen|codex]"
|
||||
---
|
||||
|
||||
|
||||
517
.claude/commands/memory/workflow-skill-memory.md
Normal file
517
.claude/commands/memory/workflow-skill-memory.md
Normal file
@@ -0,0 +1,517 @@
|
||||
---
|
||||
name: 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)
|
||||
argument-hint: "session <session-id> | all"
|
||||
allowed-tools: Task(*), TodoWrite(*), Bash(*), Read(*), Write(*)
|
||||
---
|
||||
|
||||
# Workflow SKILL Memory Generator
|
||||
|
||||
## Overview
|
||||
|
||||
Generate SKILL package from archived workflow sessions using agent-driven analysis. Supports single-session incremental updates or parallel processing of all sessions.
|
||||
|
||||
**Scope**: Only processes WFS-* workflow sessions. Other session types (e.g., doc sessions) are automatically ignored.
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
/memory:workflow-skill-memory session WFS-<session-id> # Process single WFS session
|
||||
/memory:workflow-skill-memory all # Process all WFS sessions in parallel
|
||||
```
|
||||
|
||||
## Execution Modes
|
||||
|
||||
### Mode 1: Single Session (`session <session-id>`)
|
||||
|
||||
**Purpose**: Incremental update - process one archived session and merge into existing SKILL package
|
||||
|
||||
**Workflow**:
|
||||
1. **Validate session**: Check if session exists in `.workflow/.archives/{session-id}/`
|
||||
2. **Invoke agent**: Call `universal-executor` to analyze session and update SKILL documents
|
||||
3. **Agent tasks**:
|
||||
- Read session data from `.workflow/.archives/{session-id}/`
|
||||
- Extract lessons, conflicts, and outcomes
|
||||
- Use Gemini for intelligent aggregation (optional)
|
||||
- Update or create SKILL documents using templates
|
||||
- Regenerate SKILL.md index
|
||||
|
||||
**Command Example**:
|
||||
```bash
|
||||
/memory:workflow-skill-memory session WFS-user-auth
|
||||
```
|
||||
|
||||
**Expected Output**:
|
||||
```
|
||||
Session WFS-user-auth processed
|
||||
Updated:
|
||||
- sessions-timeline.md (1 session added)
|
||||
- lessons-learned.md (3 lessons merged)
|
||||
- conflict-patterns.md (1 conflict added)
|
||||
- SKILL.md (index regenerated)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Mode 2: All Sessions (`all`)
|
||||
|
||||
**Purpose**: Full regeneration - process all archived sessions in parallel for complete SKILL package
|
||||
|
||||
**Workflow**:
|
||||
1. **List sessions**: Read manifest.json to get all archived session IDs
|
||||
2. **Parallel invocation**: Launch multiple `universal-executor` agents in parallel (one per session)
|
||||
3. **Agent coordination**:
|
||||
- Each agent processes one session independently
|
||||
- Agents use Gemini for analysis
|
||||
- Agents collect data into JSON (no direct file writes)
|
||||
- Final aggregator agent merges results and generates SKILL documents
|
||||
|
||||
**Command Example**:
|
||||
```bash
|
||||
/memory:workflow-skill-memory all
|
||||
```
|
||||
|
||||
**Expected Output**:
|
||||
```
|
||||
All sessions processed in parallel
|
||||
Sessions: 8 total
|
||||
Updated:
|
||||
- sessions-timeline.md (8 sessions)
|
||||
- lessons-learned.md (24 lessons aggregated)
|
||||
- conflict-patterns.md (12 conflicts documented)
|
||||
- SKILL.md (index regenerated)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Implementation Flow
|
||||
|
||||
### Phase 1: Validation and Setup
|
||||
|
||||
**Step 1.1: Parse Command Arguments**
|
||||
|
||||
Extract mode and session ID:
|
||||
```javascript
|
||||
if (args === "all") {
|
||||
mode = "all"
|
||||
} else if (args.startsWith("session ")) {
|
||||
mode = "session"
|
||||
session_id = args.replace("session ", "").trim()
|
||||
} else {
|
||||
ERROR = "Invalid arguments. Usage: session <session-id> | all"
|
||||
EXIT
|
||||
}
|
||||
```
|
||||
|
||||
**Step 1.2: Validate Archive Directory**
|
||||
```bash
|
||||
bash(test -d .workflow/.archives && echo "exists" || echo "missing")
|
||||
```
|
||||
|
||||
If missing, report error and exit.
|
||||
|
||||
**Step 1.3: Mode-Specific Validation**
|
||||
|
||||
**Single Session Mode**:
|
||||
```bash
|
||||
# Validate session ID format (must start with WFS-)
|
||||
if [[ ! "$session_id" =~ ^WFS- ]]; then
|
||||
ERROR = "Invalid session ID format. Only WFS-* sessions are supported"
|
||||
EXIT
|
||||
fi
|
||||
|
||||
# Check if session exists
|
||||
bash(test -d .workflow/.archives/{session_id} && echo "exists" || echo "missing")
|
||||
```
|
||||
|
||||
If missing, report error: "Session {session_id} not found in archives"
|
||||
|
||||
**All Sessions Mode**:
|
||||
```bash
|
||||
# Read manifest and filter only WFS- sessions
|
||||
bash(cat .workflow/.archives/manifest.json | jq -r '.archives[].session_id | select(startswith("WFS-"))')
|
||||
```
|
||||
|
||||
Store filtered session IDs in array. Ignore doc sessions and other non-WFS sessions.
|
||||
|
||||
**Step 1.4: TodoWrite Initialization**
|
||||
|
||||
**Single Session Mode**:
|
||||
```javascript
|
||||
TodoWrite({todos: [
|
||||
{"content": "Validate session existence", "status": "completed", "activeForm": "Validating session"},
|
||||
{"content": "Invoke agent to process session", "status": "in_progress", "activeForm": "Invoking agent"},
|
||||
{"content": "Verify SKILL package updated", "status": "pending", "activeForm": "Verifying update"}
|
||||
]})
|
||||
```
|
||||
|
||||
**All Sessions Mode**:
|
||||
```javascript
|
||||
TodoWrite({todos: [
|
||||
{"content": "Read manifest and list sessions", "status": "completed", "activeForm": "Reading manifest"},
|
||||
{"content": "Invoke agents in parallel", "status": "in_progress", "activeForm": "Invoking agents"},
|
||||
{"content": "Verify SKILL package regenerated", "status": "pending", "activeForm": "Verifying regeneration"}
|
||||
]})
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Phase 2: Agent Invocation
|
||||
|
||||
#### Single Session Mode - Agent Task
|
||||
|
||||
Invoke `universal-executor` with session-specific task:
|
||||
|
||||
**Agent Prompt Structure**:
|
||||
```
|
||||
Task: Process Workflow Session for SKILL Package
|
||||
|
||||
Context:
|
||||
- Session ID: {session_id}
|
||||
- Session Path: .workflow/.archives/{session_id}/
|
||||
- Mode: Incremental update
|
||||
|
||||
Objectives:
|
||||
|
||||
1. Read session data:
|
||||
- workflow-session.json (metadata)
|
||||
- IMPL_PLAN.md (implementation summary)
|
||||
- TODO_LIST.md (if exists)
|
||||
- manifest.json entry for lessons
|
||||
|
||||
2. Extract key information:
|
||||
- Description, tags, metrics
|
||||
- Lessons (successes, challenges, watch_patterns)
|
||||
- Context package path (reference only)
|
||||
- Key outcomes from IMPL_PLAN
|
||||
|
||||
3. Use Gemini for aggregation (optional):
|
||||
Command pattern:
|
||||
cd .workflow/.archives/{session_id} && gemini -p "
|
||||
PURPOSE: Extract lessons and conflicts from workflow session
|
||||
TASK:
|
||||
• Analyze IMPL_PLAN and lessons from manifest
|
||||
• Identify success patterns and challenges
|
||||
• Extract conflict patterns with resolutions
|
||||
• Categorize by functional domain
|
||||
MODE: analysis
|
||||
CONTEXT: @IMPL_PLAN.md @workflow-session.json
|
||||
EXPECTED: Structured lessons and conflicts in JSON format
|
||||
RULES: Template reference from skill-aggregation.txt
|
||||
"
|
||||
|
||||
3.5. **Generate SKILL.md Description** (CRITICAL for auto-loading):
|
||||
|
||||
Read skill-index.txt template Section: "Description Field Generation"
|
||||
|
||||
Execute command to get project root:
|
||||
```bash
|
||||
git rev-parse --show-toplevel # Example output: /d/Claude_dms3
|
||||
```
|
||||
|
||||
Apply description format:
|
||||
```
|
||||
Progressive workflow development history (located at {project_root}).
|
||||
Load this SKILL when continuing development, analyzing past implementations,
|
||||
or learning from workflow history, especially when no relevant context exists in memory.
|
||||
```
|
||||
|
||||
**Validation**:
|
||||
- [ ] Path uses forward slashes (not backslashes)
|
||||
- [ ] All three use cases present
|
||||
- [ ] Trigger optimization phrase included
|
||||
- [ ] Path is absolute (starts with / or drive letter)
|
||||
|
||||
4. Read templates for formatting guidance:
|
||||
- ~/.claude/workflows/cli-templates/prompts/workflow/skill-sessions-timeline.txt
|
||||
- ~/.claude/workflows/cli-templates/prompts/workflow/skill-lessons-learned.txt
|
||||
- ~/.claude/workflows/cli-templates/prompts/workflow/skill-conflict-patterns.txt
|
||||
- ~/.claude/workflows/cli-templates/prompts/workflow/skill-index.txt
|
||||
|
||||
**CRITICAL**: From skill-index.txt, read these sections:
|
||||
- "Description Field Generation" - Rules for generating description
|
||||
- "Variable Substitution Guide" - All required variables
|
||||
- "Generation Instructions" - Step-by-step generation process
|
||||
- "Validation Checklist" - Final validation steps
|
||||
|
||||
5. Update SKILL documents:
|
||||
- sessions-timeline.md: Append new session, update domain grouping
|
||||
- lessons-learned.md: Merge lessons into categories, update frequencies
|
||||
- conflict-patterns.md: Add conflicts, update recurring pattern frequencies
|
||||
- SKILL.md: Regenerate index with updated counts
|
||||
|
||||
**For SKILL.md generation**:
|
||||
- Follow "Generation Instructions" from skill-index.txt (Steps 1-7)
|
||||
- Use git command for project_root: `git rev-parse --show-toplevel`
|
||||
- Apply "Description Field Generation" rules
|
||||
- Validate using "Validation Checklist"
|
||||
- Increment version (patch level)
|
||||
|
||||
6. Return result JSON:
|
||||
{
|
||||
"status": "success",
|
||||
"session_id": "{session_id}",
|
||||
"updates": {
|
||||
"sessions_added": 1,
|
||||
"lessons_merged": count,
|
||||
"conflicts_added": count
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
#### All Sessions Mode - Parallel Agent Tasks
|
||||
|
||||
**Step 2.1: Launch parallel session analyzers**
|
||||
|
||||
Invoke multiple agents in parallel (one message with multiple Task calls):
|
||||
|
||||
**Per-Session Agent Prompt**:
|
||||
```
|
||||
Task: Extract Session Data for SKILL Package
|
||||
|
||||
Context:
|
||||
- Session ID: {session_id}
|
||||
- Mode: Parallel analysis (no direct file writes)
|
||||
|
||||
Objectives:
|
||||
|
||||
1. Read session data (same as single mode)
|
||||
|
||||
2. Extract key information (same as single mode)
|
||||
|
||||
3. Use Gemini for analysis (same as single mode)
|
||||
|
||||
4. Return structured data JSON:
|
||||
{
|
||||
"status": "success",
|
||||
"session_id": "{session_id}",
|
||||
"data": {
|
||||
"metadata": {
|
||||
"description": "...",
|
||||
"archived_at": "...",
|
||||
"tags": [...],
|
||||
"metrics": {...}
|
||||
},
|
||||
"lessons": {
|
||||
"successes": [...],
|
||||
"challenges": [...],
|
||||
"watch_patterns": [...]
|
||||
},
|
||||
"conflicts": [
|
||||
{
|
||||
"type": "architecture|dependencies|testing|performance",
|
||||
"pattern": "...",
|
||||
"resolution": "...",
|
||||
"code_impact": [...]
|
||||
}
|
||||
],
|
||||
"impl_summary": "First 200 chars of IMPL_PLAN",
|
||||
"context_package_path": "..."
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Step 2.2: Aggregate results**
|
||||
|
||||
After all session agents complete, invoke aggregator agent:
|
||||
|
||||
**Aggregator Agent Prompt**:
|
||||
```
|
||||
Task: Aggregate Session Results and Generate SKILL Package
|
||||
|
||||
Context:
|
||||
- Mode: Full regeneration
|
||||
- Input: JSON results from {session_count} session agents
|
||||
|
||||
Objectives:
|
||||
|
||||
1. Aggregate all session data:
|
||||
- Collect metadata from all sessions
|
||||
- Merge lessons by category
|
||||
- Group conflicts by type
|
||||
- Sort sessions by date
|
||||
|
||||
2. Use Gemini for final aggregation:
|
||||
gemini -p "
|
||||
PURPOSE: Aggregate lessons and conflicts from all workflow sessions
|
||||
TASK:
|
||||
• Group successes by functional domain
|
||||
• Categorize challenges by severity (HIGH/MEDIUM/LOW)
|
||||
• Identify recurring conflict patterns
|
||||
• Calculate frequencies and prioritize
|
||||
MODE: analysis
|
||||
CONTEXT: [Provide aggregated JSON data]
|
||||
EXPECTED: Final aggregated structure for SKILL documents
|
||||
RULES: Template reference from skill-aggregation.txt
|
||||
"
|
||||
|
||||
3. Read templates for formatting (same 4 templates as single mode)
|
||||
|
||||
4. Generate all SKILL documents:
|
||||
- sessions-timeline.md (all sessions, sorted by date)
|
||||
- lessons-learned.md (aggregated lessons with frequencies)
|
||||
- conflict-patterns.md (recurring patterns with resolutions)
|
||||
- SKILL.md (index with progressive loading)
|
||||
|
||||
5. Write files to .claude/skills/workflow-progress/
|
||||
|
||||
6. Return result JSON:
|
||||
{
|
||||
"status": "success",
|
||||
"sessions_processed": count,
|
||||
"files_generated": ["SKILL.md", "sessions-timeline.md", ...],
|
||||
"summary": {
|
||||
"total_sessions": count,
|
||||
"functional_domains": [...],
|
||||
"date_range": "...",
|
||||
"lessons_count": count,
|
||||
"conflicts_count": count
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Phase 3: Verification
|
||||
|
||||
**Step 3.1: Check SKILL Package Files**
|
||||
```bash
|
||||
bash(ls -lh .claude/skills/workflow-progress/)
|
||||
```
|
||||
|
||||
Verify all 4 files exist:
|
||||
- SKILL.md
|
||||
- sessions-timeline.md
|
||||
- lessons-learned.md
|
||||
- conflict-patterns.md
|
||||
|
||||
**Step 3.2: TodoWrite Completion**
|
||||
|
||||
Mark all tasks as completed.
|
||||
|
||||
**Step 3.3: Display Summary**
|
||||
|
||||
**Single Session Mode**:
|
||||
```
|
||||
Session {session_id} processed successfully
|
||||
|
||||
Updated:
|
||||
- sessions-timeline.md
|
||||
- lessons-learned.md
|
||||
- conflict-patterns.md
|
||||
- SKILL.md
|
||||
|
||||
SKILL Location: .claude/skills/workflow-progress/SKILL.md
|
||||
```
|
||||
|
||||
**All Sessions Mode**:
|
||||
```
|
||||
All sessions processed in parallel
|
||||
|
||||
Sessions: {count} total
|
||||
Functional Domains: {domain_list}
|
||||
Date Range: {earliest} - {latest}
|
||||
|
||||
Generated:
|
||||
- sessions-timeline.md ({count} sessions)
|
||||
- lessons-learned.md ({lessons_count} lessons)
|
||||
- conflict-patterns.md ({conflicts_count} conflicts)
|
||||
- SKILL.md (4-level progressive loading)
|
||||
|
||||
SKILL Location: .claude/skills/workflow-progress/SKILL.md
|
||||
|
||||
Usage:
|
||||
- Level 0: Quick refresh (~2K tokens)
|
||||
- Level 1: Recent history (~8K tokens)
|
||||
- Level 2: Complete analysis (~25K tokens)
|
||||
- Level 3: Deep dive (~40K tokens)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Agent Guidelines
|
||||
|
||||
### Agent Capabilities
|
||||
|
||||
**universal-executor agents can**:
|
||||
- Read files from `.workflow/.archives/`
|
||||
- Execute bash commands
|
||||
- Call Gemini CLI for intelligent analysis
|
||||
- Read template files for formatting guidance
|
||||
- Write SKILL package files (single mode) or return JSON (parallel mode)
|
||||
- Return structured results
|
||||
|
||||
### Gemini Usage Pattern
|
||||
|
||||
**When to use Gemini**:
|
||||
- Aggregating lessons from multiple sources
|
||||
- Identifying recurring patterns
|
||||
- Classifying conflicts by type and severity
|
||||
- Extracting structured data from IMPL_PLAN
|
||||
|
||||
**Fallback Strategy**: If Gemini fails or times out, use direct file parsing with structured extraction logic.
|
||||
|
||||
---
|
||||
|
||||
## Template System
|
||||
|
||||
### Template Files
|
||||
|
||||
All templates located in: `~/.claude/workflows/cli-templates/prompts/workflow/`
|
||||
|
||||
1. **skill-sessions-timeline.txt**: Format for sessions-timeline.md
|
||||
2. **skill-lessons-learned.txt**: Format for lessons-learned.md
|
||||
3. **skill-conflict-patterns.txt**: Format for conflict-patterns.md
|
||||
4. **skill-index.txt**: Format for SKILL.md index
|
||||
5. **skill-aggregation.txt**: Rules for Gemini aggregation (existing)
|
||||
|
||||
### Template Usage in Agent
|
||||
|
||||
**Agents read templates to understand**:
|
||||
- File structure and markdown format
|
||||
- Data sources (which files to read)
|
||||
- Update strategy (incremental vs full)
|
||||
- Formatting rules and conventions
|
||||
- Aggregation logic (for Gemini)
|
||||
|
||||
**Templates are NOT shown in this command documentation** - agents read them directly as needed.
|
||||
|
||||
---
|
||||
|
||||
## Error Handling
|
||||
|
||||
### Validation Errors
|
||||
- **No archives directory**: "Error: No workflow archives found at .workflow/.archives/"
|
||||
- **Invalid session ID format**: "Error: Invalid session ID format. Only WFS-* sessions are supported"
|
||||
- **Session not found**: "Error: Session {session_id} not found in archives"
|
||||
- **No WFS sessions in manifest**: "Error: No WFS-* workflow sessions found in manifest.json"
|
||||
|
||||
### Agent Errors
|
||||
- If agent fails, report error message from agent result
|
||||
- If Gemini times out, agents use fallback direct parsing
|
||||
- If template read fails, agents use inline format
|
||||
|
||||
### Recovery
|
||||
- Single session mode: Can be retried without affecting other sessions
|
||||
- All sessions mode: If one agent fails, others continue; retry failed sessions individually
|
||||
|
||||
|
||||
|
||||
## Integration
|
||||
|
||||
### Called by `/workflow:session:complete`
|
||||
|
||||
Automatically invoked after session archival:
|
||||
```bash
|
||||
SlashCommand(command="/memory:workflow-skill-memory session {session_id}")
|
||||
```
|
||||
|
||||
### Manual Invocation
|
||||
|
||||
Users can manually process sessions:
|
||||
```bash
|
||||
/memory:workflow-skill-memory session WFS-custom-feature # Single session
|
||||
/memory:workflow-skill-memory all # Full regeneration
|
||||
```
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: breakdown
|
||||
description: Intelligent task decomposition with context-aware subtask generation
|
||||
description: Decompose complex task into subtasks with dependency mapping, creates child task JSONs with parent references and execution order
|
||||
argument-hint: "task-id"
|
||||
---
|
||||
|
||||
@@ -15,7 +15,7 @@ Breaks down complex tasks into executable subtasks with context inheritance and
|
||||
|
||||
## Core Features
|
||||
|
||||
⚠️ **CRITICAL**: Manual breakdown with safety controls to prevent file conflicts and task limit violations.
|
||||
**CRITICAL**: Manual breakdown with safety controls to prevent file conflicts and task limit violations.
|
||||
|
||||
### Breakdown Process
|
||||
1. **Session Check**: Verify active session contains parent task
|
||||
@@ -50,7 +50,7 @@ Interactive process:
|
||||
Task: Build authentication module
|
||||
Current total tasks: 6/10
|
||||
|
||||
⚠️ MANUAL BREAKDOWN REQUIRED
|
||||
MANUAL BREAKDOWN REQUIRED
|
||||
Define subtasks manually (remaining capacity: 4 tasks):
|
||||
|
||||
1. Enter subtask title: User authentication core
|
||||
@@ -59,11 +59,11 @@ Define subtasks manually (remaining capacity: 4 tasks):
|
||||
2. Enter subtask title: OAuth integration
|
||||
Focus files: services/OAuthService.js, routes/oauth.js
|
||||
|
||||
⚠️ FILE CONFLICT DETECTED:
|
||||
FILE CONFLICT DETECTED:
|
||||
- routes/auth.js appears in multiple subtasks
|
||||
- Recommendation: Merge related authentication routes
|
||||
|
||||
⚠️ SIMILAR FUNCTIONALITY WARNING:
|
||||
SIMILAR FUNCTIONALITY WARNING:
|
||||
- "User authentication" and "OAuth integration" both handle auth
|
||||
- Consider combining into single task
|
||||
|
||||
@@ -83,10 +83,10 @@ AskUserQuestion({
|
||||
|
||||
User selected: "Proceed with breakdown"
|
||||
|
||||
✅ Task IMPL-1 broken down:
|
||||
▸ IMPL-1: Build authentication module (container)
|
||||
├── IMPL-1.1: User authentication core → @code-developer
|
||||
└── IMPL-1.2: OAuth integration → @code-developer
|
||||
Task IMPL-1 broken down:
|
||||
IMPL-1: Build authentication module (container)
|
||||
├── IMPL-1.1: User authentication core -> @code-developer
|
||||
└── IMPL-1.2: OAuth integration -> @code-developer
|
||||
|
||||
Files updated: .task/IMPL-1.json + 2 subtask files + TODO_LIST.md
|
||||
```
|
||||
@@ -167,45 +167,38 @@ Files updated: .task/IMPL-1.json + 2 subtask files + TODO_LIST.md
|
||||
```bash
|
||||
/task:breakdown impl-1
|
||||
|
||||
▸ impl-1: Build authentication (container)
|
||||
├── impl-1.1: Design schema → @planning-agent
|
||||
├── impl-1.2: Implement logic + tests → @code-developer
|
||||
└── impl-1.3: Execute & fix tests → @test-fix-agent
|
||||
impl-1: Build authentication (container)
|
||||
├── impl-1.1: Design schema -> @planning-agent
|
||||
├── impl-1.2: Implement logic + tests -> @code-developer
|
||||
└── impl-1.3: Execute & fix tests -> @test-fix-agent
|
||||
```
|
||||
|
||||
## Error Handling
|
||||
|
||||
```bash
|
||||
# Task not found
|
||||
❌ Task IMPL-5 not found
|
||||
Task IMPL-5 not found
|
||||
|
||||
# Already broken down
|
||||
⚠️ Task IMPL-1 already has subtasks
|
||||
Task IMPL-1 already has subtasks
|
||||
|
||||
# Wrong status
|
||||
❌ Cannot breakdown completed task IMPL-2
|
||||
Cannot breakdown completed task IMPL-2
|
||||
|
||||
# 10-task limit exceeded
|
||||
❌ Breakdown would exceed 10-task limit (current: 8, proposed: 4)
|
||||
Suggestion: Re-scope project into smaller iterations
|
||||
Breakdown would exceed 10-task limit (current: 8, proposed: 4)
|
||||
Suggestion: Re-scope project into smaller iterations
|
||||
|
||||
# File conflicts detected
|
||||
⚠️ File conflict: routes/auth.js appears in IMPL-1.1 and IMPL-1.2
|
||||
Recommendation: Merge subtasks or redistribute files
|
||||
File conflict: routes/auth.js appears in IMPL-1.1 and IMPL-1.2
|
||||
Recommendation: Merge subtasks or redistribute files
|
||||
|
||||
# Similar functionality warning
|
||||
⚠️ Similar functions detected: "user login" and "authentication"
|
||||
Consider consolidating related functionality
|
||||
Similar functions detected: "user login" and "authentication"
|
||||
Consider consolidating related functionality
|
||||
|
||||
# Manual breakdown required
|
||||
❌ Automatic breakdown disabled. Use manual breakdown process.
|
||||
Automatic breakdown disabled. Use manual breakdown process.
|
||||
```
|
||||
|
||||
## Related Commands
|
||||
|
||||
- `/task:create` - Create new tasks
|
||||
- `/task:execute` - Execute subtasks
|
||||
- `/workflow:status` - View task hierarchy
|
||||
- `/workflow:plan` - Plan within 10-task limit
|
||||
|
||||
**System ensures**: Manual breakdown control with file cohesion enforcement, similar functionality detection, and 10-task limit compliance
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: create
|
||||
description: Create implementation tasks with automatic context awareness
|
||||
description: Generate task JSON from natural language description with automatic file pattern detection, scope inference, and dependency analysis
|
||||
argument-hint: "\"task title\""
|
||||
---
|
||||
|
||||
@@ -37,7 +37,7 @@ Creates new implementation tasks with automatic context awareness and ID generat
|
||||
|
||||
Output:
|
||||
```
|
||||
✅ Task created: IMPL-1
|
||||
Task created: IMPL-1
|
||||
Title: Build authentication module
|
||||
Type: feature
|
||||
Agent: code-developer
|
||||
@@ -73,7 +73,7 @@ Status: pending
|
||||
### Analysis Triggers
|
||||
When implementation details incomplete:
|
||||
```bash
|
||||
⚠️ Task requires analysis for implementation details
|
||||
Task requires analysis for implementation details
|
||||
Suggest running: gemini analysis for file locations and dependencies
|
||||
```
|
||||
|
||||
@@ -117,16 +117,16 @@ Based on task type and title keywords:
|
||||
|
||||
```bash
|
||||
# No workflow session
|
||||
❌ No active workflow found
|
||||
→ Use: /workflow init "project name"
|
||||
No active workflow found
|
||||
Use: /workflow init "project name"
|
||||
|
||||
# Duplicate task
|
||||
⚠️ Similar task exists: IMPL-3
|
||||
→ Continue anyway? (y/n)
|
||||
Similar task exists: IMPL-3
|
||||
Continue anyway? (y/n)
|
||||
|
||||
# Max depth exceeded
|
||||
❌ Cannot create IMPL-1.2.1 (max 2 levels)
|
||||
→ Use: IMPL-2 for new main task
|
||||
Cannot create IMPL-1.2.1 (max 2 levels)
|
||||
Use: IMPL-2 for new main task
|
||||
```
|
||||
|
||||
## Examples
|
||||
@@ -135,7 +135,7 @@ Based on task type and title keywords:
|
||||
```bash
|
||||
/task:create "Implement user authentication"
|
||||
|
||||
✅ Created IMPL-1: Implement user authentication
|
||||
Created IMPL-1: Implement user authentication
|
||||
Type: feature
|
||||
Agent: code-developer
|
||||
Status: pending
|
||||
@@ -145,14 +145,8 @@ Status: pending
|
||||
```bash
|
||||
/task:create "Fix login validation bug" --type=bugfix
|
||||
|
||||
✅ Created IMPL-2: Fix login validation bug
|
||||
Created IMPL-2: Fix login validation bug
|
||||
Type: bugfix
|
||||
Agent: code-developer
|
||||
Status: pending
|
||||
```
|
||||
|
||||
## Related Commands
|
||||
|
||||
- `/task:breakdown` - Break into subtasks
|
||||
- `/task:execute` - Execute with agent
|
||||
- `/context` - View task details
|
||||
```
|
||||
@@ -1,15 +1,15 @@
|
||||
---
|
||||
name: execute
|
||||
description: Execute tasks with appropriate agents and context-aware orchestration
|
||||
description: Execute task JSON using appropriate agent (@doc-generator/@implementation-agent/@test-agent) with pre-analysis context loading and status tracking
|
||||
argument-hint: "task-id"
|
||||
---
|
||||
|
||||
### 🚀 **Command Overview: `/task:execute`**
|
||||
## Command Overview: /task:execute
|
||||
|
||||
- **Purpose**: Executes tasks using intelligent agent selection, context preparation, and progress tracking.
|
||||
**Purpose**: Executes tasks using intelligent agent selection, context preparation, and progress tracking.
|
||||
|
||||
|
||||
### ⚙️ **Execution Modes**
|
||||
## Execution Modes
|
||||
|
||||
- **auto (Default)**
|
||||
- Fully autonomous execution with automatic agent selection.
|
||||
@@ -22,7 +22,7 @@ argument-hint: "task-id"
|
||||
- Optional manual review using `@universal-executor`.
|
||||
- Used only when explicitly requested by user.
|
||||
|
||||
### 🤖 **Agent Selection Logic**
|
||||
## Agent Selection Logic
|
||||
|
||||
The system determines the appropriate agent for a task using the following logic.
|
||||
|
||||
@@ -52,11 +52,11 @@ FUNCTION select_agent(task, agent_override):
|
||||
END FUNCTION
|
||||
```
|
||||
|
||||
### 🔄 **Core Execution Protocol**
|
||||
## Core Execution Protocol
|
||||
|
||||
`Pre-Execution` **->** `Execution` **->** `Post-Execution`
|
||||
`Pre-Execution` -> `Execution` -> `Post-Execution`
|
||||
|
||||
### ✅ **Pre-Execution Protocol**
|
||||
### Pre-Execution Protocol
|
||||
|
||||
`Validate Task & Dependencies` **->** `Prepare Execution Context` **->** `Coordinate with TodoWrite`
|
||||
|
||||
@@ -65,7 +65,7 @@ END FUNCTION
|
||||
- **Session Context Injection**: Provides workflow directory paths to agents for TODO_LIST.md and summary management.
|
||||
- **TodoWrite Coordination**: Generates execution Todos and checkpoints, syncing with `TODO_LIST.md`.
|
||||
|
||||
### 🏁 **Post-Execution Protocol**
|
||||
### Post-Execution Protocol
|
||||
|
||||
`Update Task Status` **->** `Generate Summary` **->** `Save Artifacts` **->** `Sync All Progress` **->** `Validate File Integrity`
|
||||
|
||||
@@ -73,7 +73,7 @@ END FUNCTION
|
||||
- Creates a summary in `.summaries/`.
|
||||
- Stores outputs and syncs progress across the entire workflow session.
|
||||
|
||||
### 🧠 **Task & Subtask Execution Logic**
|
||||
### Task & Subtask Execution Logic
|
||||
|
||||
This logic defines how single, multiple, or parent tasks are handled.
|
||||
|
||||
@@ -99,7 +99,7 @@ FUNCTION execute_task_command(task_id, mode, parallel_flag):
|
||||
END FUNCTION
|
||||
```
|
||||
|
||||
### 🛡️ **Error Handling & Recovery Logic**
|
||||
### Error Handling & Recovery Logic
|
||||
|
||||
```pseudo
|
||||
FUNCTION pre_execution_check(task):
|
||||
@@ -124,7 +124,7 @@ END FUNCTION
|
||||
```
|
||||
|
||||
|
||||
### 📄 **Simplified Context Structure (JSON)**
|
||||
### Simplified Context Structure (JSON)
|
||||
|
||||
This is the simplified data structure loaded to provide context for task execution.
|
||||
|
||||
@@ -189,7 +189,7 @@ This is the simplified data structure loaded to provide context for task executi
|
||||
"pre_analysis": [
|
||||
{
|
||||
"action": "analyze patterns",
|
||||
"template": "~/.claude/workflows/cli-templates/prompts/analysis/pattern.txt",
|
||||
"template": "~/.claude/workflows/cli-templates/prompts/analysis/02-analyze-code-patterns.txt",
|
||||
"method": "gemini"
|
||||
}
|
||||
]
|
||||
@@ -213,7 +213,7 @@ This is the simplified data structure loaded to provide context for task executi
|
||||
}
|
||||
```
|
||||
|
||||
### 🎯 **Agent-Specific Context**
|
||||
### Agent-Specific Context
|
||||
|
||||
Different agents receive context tailored to their function, including implementation details:
|
||||
|
||||
@@ -243,13 +243,13 @@ Different agents receive context tailored to their function, including implement
|
||||
- Dependency validation from implementation.context_notes.dependencies
|
||||
- Architecture compliance checks
|
||||
|
||||
### 🗃️ **Simplified File Output**
|
||||
### Simplified File Output
|
||||
|
||||
- **Task JSON File (`.task/<task-id>.json`)**: Updated with status and last attempt time only.
|
||||
- **Session File (`workflow-session.json`)**: Updated task stats (completed count).
|
||||
- **Summary File**: Generated in `.summaries/` upon completion (optional).
|
||||
|
||||
### 📝 **Simplified Summary Template**
|
||||
### Simplified Summary Template
|
||||
|
||||
Optional summary file generated at `.summaries/IMPL-[task-id]-summary.md`.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: replan
|
||||
description: Replan individual tasks with detailed user input and change tracking
|
||||
description: Update task JSON with new requirements or batch-update multiple tasks from verification report, tracks changes in task-changes.json
|
||||
argument-hint: "task-id [\"text\"|file.md] | --batch [verification-report.md]"
|
||||
allowed-tools: Read(*), Write(*), Edit(*), TodoWrite(*), Glob(*), Bash(*)
|
||||
---
|
||||
@@ -24,7 +24,7 @@ Replans individual tasks or batch processes multiple tasks with change tracking
|
||||
- **Change Documentation**: Track all modifications
|
||||
- **Progress Tracking**: TodoWrite integration for batch operations
|
||||
|
||||
⚠️ **CRITICAL**: Validates active session before replanning
|
||||
**CRITICAL**: Validates active session before replanning
|
||||
|
||||
## Operation Modes
|
||||
|
||||
@@ -189,7 +189,7 @@ AskUserQuestion({
|
||||
|
||||
User selected: "Yes, rollback"
|
||||
|
||||
✅ Task rolled back to version 1.1
|
||||
Task rolled back to version 1.1
|
||||
```
|
||||
|
||||
## Batch Processing with TodoWrite
|
||||
@@ -201,7 +201,7 @@ When processing multiple tasks, automatically creates TodoWrite task list:
|
||||
**Batch Replan Progress**:
|
||||
- [x] IMPL-002: Add FR-12 draft saving acceptance criteria
|
||||
- [x] IMPL-003: Add FR-14 history tracking acceptance criteria
|
||||
- [⧗] IMPL-004: Add FR-09 response surface explicit coverage
|
||||
- [ ] IMPL-004: Add FR-09 response surface explicit coverage
|
||||
- [ ] IMPL-008: Add NFR performance validation steps
|
||||
```
|
||||
|
||||
@@ -255,9 +255,9 @@ AskUserQuestion({
|
||||
|
||||
User selected: "Yes, apply"
|
||||
|
||||
✓ Version 1.2 created
|
||||
✓ Context updated
|
||||
✓ Backup saved to .task/backup/IMPL-1-v1.1.json
|
||||
Version 1.2 created
|
||||
Context updated
|
||||
Backup saved to .task/backup/IMPL-1-v1.1.json
|
||||
```
|
||||
|
||||
### Single Task - File Input
|
||||
@@ -267,9 +267,9 @@ User selected: "Yes, apply"
|
||||
Loading requirements.md...
|
||||
Applying specification changes...
|
||||
|
||||
✓ Task updated with new requirements
|
||||
✓ Version 1.1 created
|
||||
✓ Backup saved to .task/backup/IMPL-2-v1.0.json
|
||||
Task updated with new requirements
|
||||
Version 1.1 created
|
||||
Backup saved to .task/backup/IMPL-2-v1.0.json
|
||||
```
|
||||
|
||||
### Batch Mode - From Verification Report
|
||||
@@ -286,23 +286,23 @@ Found 4 tasks requiring replanning:
|
||||
Creating task tracking list...
|
||||
|
||||
Processing IMPL-002...
|
||||
✓ Backup created: .task/backup/IMPL-002-v1.0.json
|
||||
✓ Updated to v1.1
|
||||
Backup created: .task/backup/IMPL-002-v1.0.json
|
||||
Updated to v1.1
|
||||
|
||||
Processing IMPL-003...
|
||||
✓ Backup created: .task/backup/IMPL-003-v1.0.json
|
||||
✓ Updated to v1.1
|
||||
Backup created: .task/backup/IMPL-003-v1.0.json
|
||||
Updated to v1.1
|
||||
|
||||
Processing IMPL-004...
|
||||
✓ Backup created: .task/backup/IMPL-004-v1.0.json
|
||||
✓ Updated to v1.1
|
||||
Backup created: .task/backup/IMPL-004-v1.0.json
|
||||
Updated to v1.1
|
||||
|
||||
Processing IMPL-008...
|
||||
✓ Backup created: .task/backup/IMPL-008-v1.0.json
|
||||
✓ Updated to v1.1
|
||||
Backup created: .task/backup/IMPL-008-v1.0.json
|
||||
Updated to v1.1
|
||||
|
||||
✅ Batch replan completed: 4/4 successful
|
||||
📋 Summary report saved
|
||||
Batch replan completed: 4/4 successful
|
||||
Summary report saved
|
||||
```
|
||||
|
||||
### Batch Mode - Auto-detection
|
||||
@@ -320,35 +320,35 @@ Entering batch mode...
|
||||
### Single Task Errors
|
||||
```bash
|
||||
# Task not found
|
||||
❌ Task IMPL-5 not found
|
||||
→ Check task ID with /workflow:status
|
||||
Task IMPL-5 not found
|
||||
Check task ID with /workflow:status
|
||||
|
||||
# Task completed
|
||||
⚠️ Task IMPL-1 is completed (cannot replan)
|
||||
→ Create new task for additional work
|
||||
Task IMPL-1 is completed (cannot replan)
|
||||
Create new task for additional work
|
||||
|
||||
# File not found
|
||||
❌ File requirements.md not found
|
||||
→ Check file path
|
||||
File requirements.md not found
|
||||
Check file path
|
||||
|
||||
# No input provided
|
||||
❌ Please specify changes needed
|
||||
→ Provide text, file, or verification report
|
||||
Please specify changes needed
|
||||
Provide text, file, or verification report
|
||||
```
|
||||
|
||||
### Batch Mode Errors
|
||||
```bash
|
||||
# Invalid verification report
|
||||
❌ File does not contain valid verification report format
|
||||
→ Check report structure or use single task mode
|
||||
File does not contain valid verification report format
|
||||
Check report structure or use single task mode
|
||||
|
||||
# Partial failures
|
||||
⚠️ Batch completed with errors: 3/4 successful
|
||||
→ Review error details in summary report
|
||||
Batch completed with errors: 3/4 successful
|
||||
Review error details in summary report
|
||||
|
||||
# No replan recommendations found
|
||||
❌ Verification report contains no replan recommendations
|
||||
→ Check report content or use /workflow:action-plan-verify first
|
||||
Verification report contains no replan recommendations
|
||||
Check report content or use /workflow:action-plan-verify first
|
||||
```
|
||||
|
||||
## Batch Mode Integration
|
||||
@@ -429,16 +429,4 @@ TodoWrite({
|
||||
TodoWrite({
|
||||
todos: updateTaskStatus(taskId, "completed")
|
||||
});
|
||||
```
|
||||
|
||||
## Related Commands
|
||||
|
||||
- `/workflow:status` - View task structure and versions
|
||||
- `/workflow:action-plan-verify` - Generate verification report for batch mode
|
||||
- `/task:execute` - Execute replanned task
|
||||
- `/task:create` - Create new tasks
|
||||
- `/task:breakdown` - Break down complex tasks
|
||||
|
||||
## Context
|
||||
|
||||
$ARGUMENTS
|
||||
```
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: version
|
||||
description: Display version information and check for updates
|
||||
description: Display Claude Code version information and check for updates
|
||||
allowed-tools: Bash(*)
|
||||
---
|
||||
|
||||
@@ -152,12 +152,12 @@ bash(printf "%s\n%s" "3.2.1" "3.2.2" | sort -V | tail -n 1)
|
||||
|
||||
**Scenario 1: Up to date**
|
||||
```
|
||||
✅ You are on the latest stable version (3.2.1)
|
||||
You are on the latest stable version (3.2.1)
|
||||
```
|
||||
|
||||
**Scenario 2: Upgrade available**
|
||||
```
|
||||
⬆️ A newer stable version is available: v3.2.2
|
||||
A newer stable version is available: v3.2.2
|
||||
Your version: 3.2.1
|
||||
|
||||
To upgrade:
|
||||
@@ -167,7 +167,7 @@ Bash: bash <(curl -fsSL https://raw.githubusercontent.com/catlog22/Claude-Code-W
|
||||
|
||||
**Scenario 3: Development version**
|
||||
```
|
||||
✨ You are running a development version (3.4.0-dev)
|
||||
You are running a development version (3.4.0-dev)
|
||||
This is newer than the latest stable release (v3.3.0)
|
||||
```
|
||||
|
||||
@@ -252,7 +252,3 @@ ERROR: version.json is invalid or corrupted
|
||||
|
||||
### Timeout Configuration
|
||||
All network calls should use `timeout: 30000` (30 seconds) to handle slow connections.
|
||||
|
||||
## Related Commands
|
||||
- `/cli:cli-init` - Initialize CLI configurations
|
||||
- `/workflow:session:list` - List workflow sessions
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: action-plan-verify
|
||||
description: Perform non-destructive cross-artifact consistency and quality analysis of IMPL_PLAN.md and task.json before execution
|
||||
description: Perform non-destructive cross-artifact consistency analysis between IMPL_PLAN.md and task JSONs with quality gate validation
|
||||
argument-hint: "[optional: --session session-id]"
|
||||
allowed-tools: Read(*), TodoWrite(*), Glob(*), Bash(*)
|
||||
---
|
||||
@@ -242,10 +242,10 @@ Output a Markdown report (no file writes) with the following structure:
|
||||
|
||||
| Requirement ID | Requirement Summary | Has Task? | Task IDs | Priority Match | Notes |
|
||||
|----------------|---------------------|-----------|----------|----------------|-------|
|
||||
| FR-01 | User authentication | ✅ Yes | IMPL-1.1, IMPL-1.2 | ✅ Match | Complete |
|
||||
| FR-02 | Data export | ✅ Yes | IMPL-2.3 | ⚠️ Mismatch | High req → Med priority task |
|
||||
| FR-03 | Profile management | ❌ No | - | - | **CRITICAL: Zero coverage** |
|
||||
| NFR-01 | Response time <200ms | ❌ No | - | - | **HIGH: No performance tasks** |
|
||||
| FR-01 | User authentication | Yes | IMPL-1.1, IMPL-1.2 | Match | Complete |
|
||||
| FR-02 | Data export | Yes | IMPL-2.3 | Mismatch | High req → Med priority task |
|
||||
| FR-03 | Profile management | No | - | - | **CRITICAL: Zero coverage** |
|
||||
| NFR-01 | Response time <200ms | No | - | - | **HIGH: No performance tasks** |
|
||||
|
||||
**Coverage Metrics**:
|
||||
- Functional Requirements: 85% (17/20 covered)
|
||||
@@ -264,7 +264,7 @@ Output a Markdown report (no file writes) with the following structure:
|
||||
|
||||
### Dependency Graph Issues
|
||||
|
||||
**Circular Dependencies**: None detected ✅
|
||||
**Circular Dependencies**: None detected
|
||||
|
||||
**Broken Dependencies**:
|
||||
- IMPL-2.3 depends on "IMPL-2.4" (non-existent)
|
||||
@@ -323,12 +323,12 @@ Output a Markdown report (no file writes) with the following structure:
|
||||
#### Action Recommendations
|
||||
|
||||
**If CRITICAL Issues Exist**:
|
||||
- ❌ **BLOCK EXECUTION** - Resolve critical issues before proceeding
|
||||
- **BLOCK EXECUTION** - Resolve critical issues before proceeding
|
||||
- Use TodoWrite to track all required fixes
|
||||
- Fix broken dependencies and circular references
|
||||
|
||||
**If Only HIGH/MEDIUM/LOW Issues**:
|
||||
- ⚠️ **PROCEED WITH CAUTION** - Fix high-priority issues first
|
||||
- **PROCEED WITH CAUTION** - Fix high-priority issues first
|
||||
- Use TodoWrite to systematically track and complete all improvements
|
||||
|
||||
#### TodoWrite-Based Remediation Workflow
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: api-designer
|
||||
description: Generate or update api-designer/analysis.md addressing guidance-specification discussion points
|
||||
description: Generate or update api-designer/analysis.md addressing guidance-specification discussion points for API design perspective
|
||||
argument-hint: "optional topic - uses existing framework if available"
|
||||
allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
|
||||
---
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: artifacts
|
||||
description: Interactive clarification generating confirmed guidance specification
|
||||
description: Interactive clarification generating confirmed guidance specification through role-based analysis and synthesis
|
||||
argument-hint: "topic or challenge description [--count N]"
|
||||
allowed-tools: TodoWrite(*), Read(*), Write(*), Glob(*)
|
||||
---
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: auto-parallel
|
||||
description: Parallel brainstorming automation with dynamic role selection and concurrent execution
|
||||
description: Parallel brainstorming automation with dynamic role selection and concurrent execution across multiple perspectives
|
||||
argument-hint: "topic or challenge description" [--count N]
|
||||
allowed-tools: SlashCommand(*), Task(*), TodoWrite(*), Read(*), Write(*), Bash(*), Glob(*)
|
||||
---
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: data-architect
|
||||
description: Generate or update data-architect/analysis.md addressing guidance-specification discussion points
|
||||
description: Generate or update data-architect/analysis.md addressing guidance-specification discussion points for data architecture perspective
|
||||
argument-hint: "optional topic - uses existing framework if available"
|
||||
allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
|
||||
---
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: product-manager
|
||||
description: Generate or update product-manager/analysis.md addressing guidance-specification discussion points
|
||||
description: Generate or update product-manager/analysis.md addressing guidance-specification discussion points for product management perspective
|
||||
argument-hint: "optional topic - uses existing framework if available"
|
||||
allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
|
||||
---
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: product-owner
|
||||
description: Generate or update product-owner/analysis.md addressing guidance-specification discussion points
|
||||
description: Generate or update product-owner/analysis.md addressing guidance-specification discussion points for product ownership perspective
|
||||
argument-hint: "optional topic - uses existing framework if available"
|
||||
allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
|
||||
---
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: scrum-master
|
||||
description: Generate or update scrum-master/analysis.md addressing guidance-specification discussion points
|
||||
description: Generate or update scrum-master/analysis.md addressing guidance-specification discussion points for Agile process perspective
|
||||
argument-hint: "optional topic - uses existing framework if available"
|
||||
allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
|
||||
---
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: subject-matter-expert
|
||||
description: Generate or update subject-matter-expert/analysis.md addressing guidance-specification discussion points
|
||||
description: Generate or update subject-matter-expert/analysis.md addressing guidance-specification discussion points for domain expertise perspective
|
||||
argument-hint: "optional topic - uses existing framework if available"
|
||||
allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
|
||||
---
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: synthesis
|
||||
description: Clarify and refine role analyses through intelligent Q&A and targeted updates
|
||||
description: Clarify and refine role analyses through intelligent Q&A and targeted updates with synthesis agent
|
||||
argument-hint: "[optional: --session session-id]"
|
||||
allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*), Edit(*), Glob(*)
|
||||
---
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: system-architect
|
||||
description: Generate or update system-architect/analysis.md addressing guidance-specification discussion points
|
||||
description: Generate or update system-architect/analysis.md addressing guidance-specification discussion points for system architecture perspective
|
||||
argument-hint: "optional topic - uses existing framework if available"
|
||||
allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
|
||||
---
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: ui-designer
|
||||
description: Generate or update ui-designer/analysis.md addressing guidance-specification discussion points
|
||||
description: Generate or update ui-designer/analysis.md addressing guidance-specification discussion points for UI design perspective
|
||||
argument-hint: "optional topic - uses existing framework if available"
|
||||
allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
|
||||
---
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: ux-expert
|
||||
description: Generate or update ux-expert/analysis.md addressing guidance-specification discussion points
|
||||
description: Generate or update ux-expert/analysis.md addressing guidance-specification discussion points for UX perspective
|
||||
argument-hint: "optional topic - uses existing framework if available"
|
||||
allowed-tools: Task(conceptual-planning-agent), TodoWrite(*), Read(*), Write(*)
|
||||
---
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: execute
|
||||
description: Coordinate agents for existing workflow tasks with automatic discovery
|
||||
description: Coordinate agent execution for workflow tasks with automatic session discovery, parallel task processing, and status tracking
|
||||
argument-hint: "[--resume-session=\"session-id\"]"
|
||||
---
|
||||
|
||||
@@ -406,8 +406,8 @@ TodoWrite({
|
||||
#### TODO_LIST.md Update Timing
|
||||
**Single source of truth for task status** - enables lazy loading by providing task metadata without reading JSONs
|
||||
|
||||
- **Before Agent Launch**: Mark task as `in_progress` (⚠️)
|
||||
- **After Task Complete**: Mark as `completed` (✅), advance to next
|
||||
- **Before Agent Launch**: Mark task as `in_progress`
|
||||
- **After Task Complete**: Mark as `completed`, advance to next
|
||||
- **On Error**: Keep as `in_progress`, add error note
|
||||
- **Workflow Complete**: Call `/workflow:session:complete`
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: plan
|
||||
description: Orchestrate 5-phase planning workflow with quality gate, executing commands and passing context between phases
|
||||
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
|
||||
argument-hint: "[--agent] [--cli-execute] \"text description\"|file.md"
|
||||
allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*)
|
||||
---
|
||||
@@ -153,7 +153,7 @@ CONTEXT: Existing user database schema, REST API endpoints
|
||||
|
||||
**Relationship with Brainstorm Phase**:
|
||||
- If brainstorm role analyses exist ([role]/analysis.md files), Phase 3 analysis incorporates them as input
|
||||
- **⚠️ User's original intent is ALWAYS primary**: New or refined user goals override brainstorm recommendations
|
||||
- **User's original intent is ALWAYS primary**: New or refined user goals override brainstorm recommendations
|
||||
- **Role analysis.md files define "WHAT"**: Requirements, design specs, role-specific insights
|
||||
- **IMPL_PLAN.md defines "HOW"**: Executable task breakdown, dependencies, implementation sequence
|
||||
- Task generation translates high-level role analyses into concrete, actionable work items
|
||||
@@ -192,12 +192,12 @@ Planning complete for session: [sessionId]
|
||||
Tasks generated: [count]
|
||||
Plan: .workflow/[sessionId]/IMPL_PLAN.md
|
||||
|
||||
✅ Recommended Next Steps:
|
||||
Recommended Next Steps:
|
||||
1. /workflow:action-plan-verify --session [sessionId] # Verify plan quality before execution
|
||||
2. /workflow:status # Review task breakdown
|
||||
3. /workflow:execute # Start implementation (after verification)
|
||||
|
||||
⚠️ Quality Gate: Consider running /workflow:action-plan-verify to catch issues early
|
||||
Quality Gate: Consider running /workflow:action-plan-verify to catch issues early
|
||||
```
|
||||
|
||||
## TodoWrite Pattern
|
||||
@@ -323,24 +323,24 @@ Return summary to user
|
||||
|
||||
## Coordinator Checklist
|
||||
|
||||
✅ **Pre-Phase**: Convert user input to structured format (GOAL/SCOPE/CONTEXT)
|
||||
✅ Initialize TodoWrite before any command (Phase 3 added dynamically after Phase 2)
|
||||
✅ Execute Phase 1 immediately with structured description
|
||||
✅ Parse session ID from Phase 1 output, store in memory
|
||||
✅ Pass session ID and structured description to Phase 2 command
|
||||
✅ Parse context path from Phase 2 output, store in memory
|
||||
✅ **Extract conflict_risk from context-package.json**: Determine Phase 3 execution
|
||||
✅ **If conflict_risk ≥ medium**: Launch Phase 3 conflict-resolution with sessionId and contextPath
|
||||
✅ Wait for Phase 3 completion (if executed), verify CONFLICT_RESOLUTION.md created
|
||||
✅ **If conflict_risk is none/low**: Skip Phase 3, proceed directly to Phase 4
|
||||
✅ **Build Phase 4 command** based on flags:
|
||||
- **Pre-Phase**: Convert user input to structured format (GOAL/SCOPE/CONTEXT)
|
||||
- Initialize TodoWrite before any command (Phase 3 added dynamically after Phase 2)
|
||||
- Execute Phase 1 immediately with structured description
|
||||
- Parse session ID from Phase 1 output, store in memory
|
||||
- Pass session ID and structured description to Phase 2 command
|
||||
- Parse context path from Phase 2 output, store in memory
|
||||
- **Extract conflict_risk from context-package.json**: Determine Phase 3 execution
|
||||
- **If conflict_risk ≥ medium**: Launch Phase 3 conflict-resolution with sessionId and contextPath
|
||||
- Wait for Phase 3 completion (if executed), verify CONFLICT_RESOLUTION.md created
|
||||
- **If conflict_risk is none/low**: Skip Phase 3, proceed directly to Phase 4
|
||||
- **Build Phase 4 command** based on flags:
|
||||
- Base command: `/workflow:tools:task-generate` (or `-agent` if `--agent` flag)
|
||||
- Add `--session [sessionId]`
|
||||
- Add `--cli-execute` if flag present
|
||||
✅ Pass session ID to Phase 4 command
|
||||
✅ Verify all Phase 4 outputs
|
||||
✅ Update TodoWrite after each phase (dynamically adjust for Phase 3 presence)
|
||||
✅ After each phase, automatically continue to next phase based on TodoList status
|
||||
- Pass session ID to Phase 4 command
|
||||
- Verify all Phase 4 outputs
|
||||
- Update TodoWrite after each phase (dynamically adjust for Phase 3 presence)
|
||||
- After each phase, automatically continue to next phase based on TodoList status
|
||||
|
||||
## Structure Template Reference
|
||||
|
||||
@@ -368,3 +368,22 @@ CONSTRAINTS: [Limitations or boundaries]
|
||||
# Phase 2
|
||||
/workflow:tools:context-gather --session WFS-123 "GOAL: Build authentication\nSCOPE: JWT, login, registration\nCONTEXT: REST API"
|
||||
```
|
||||
|
||||
## Related Commands
|
||||
|
||||
**Prerequisite Commands**:
|
||||
- `/workflow:brainstorm:artifacts` - Optional: Generate role-based analyses before planning (if complex requirements need multiple perspectives)
|
||||
- `/workflow:brainstorm:synthesis` - Optional: Refine brainstorm analyses with clarifications
|
||||
|
||||
**Called by This Command** (5 phases):
|
||||
- `/workflow:session:start` - Phase 1: Create or discover workflow session
|
||||
- `/workflow:tools:context-gather` - Phase 2: Gather project context and analyze codebase
|
||||
- `/workflow:tools:conflict-resolution` - Phase 3: Detect and resolve conflicts (auto-triggered if conflict_risk ≥ medium)
|
||||
- `/compact` - Phase 3: Memory optimization (if context approaching limits)
|
||||
- `/workflow:tools:task-generate` - Phase 4: Generate task JSON files with manual approach
|
||||
- `/workflow:tools:task-generate-agent` - Phase 4: Generate task JSON files with agent-driven approach (when `--agent` flag used)
|
||||
|
||||
**Follow-up Commands**:
|
||||
- `/workflow:action-plan-verify` - Recommended: Verify plan quality and catch issues before execution
|
||||
- `/workflow:status` - Review task breakdown and current progress
|
||||
- `/workflow:execute` - Begin implementation of generated tasks
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: resume
|
||||
description: Intelligent workflow session resumption with automatic progress analysis
|
||||
description: Resume paused workflow session with automatic progress analysis, pending task identification, and conflict detection
|
||||
argument-hint: "session-id for workflow session to resume"
|
||||
allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*)
|
||||
---
|
||||
@@ -89,5 +89,17 @@ The special `--resume-session` flag tells `/workflow:execute`:
|
||||
3. **Agent coordination**: TodoWrite and agent execution initiated successfully
|
||||
4. **Context preservation**: Session state and progress properly maintained
|
||||
|
||||
## Related Commands
|
||||
|
||||
**Prerequisite Commands**:
|
||||
- `/workflow:plan` or `/workflow:execute` - Workflow must be in progress or paused
|
||||
|
||||
**Called by This Command** (2 phases):
|
||||
- `/workflow:status` - Phase 1: Analyze current session status and identify resume point
|
||||
- `/workflow:execute` - Phase 2: Resume execution with `--resume-session` flag
|
||||
|
||||
**Follow-up Commands**:
|
||||
- None - Workflow continues automatically via `/workflow:execute`
|
||||
|
||||
---
|
||||
*Sequential command coordination for workflow session resumption*
|
||||
@@ -1,20 +1,20 @@
|
||||
---
|
||||
name: review
|
||||
description: Optional specialized review (security, architecture, docs) for completed implementation
|
||||
description: Post-implementation review with specialized types (security/architecture/action-items/quality) using analysis agents and Gemini
|
||||
argument-hint: "[--type=security|architecture|action-items|quality] [optional: session-id]"
|
||||
---
|
||||
|
||||
### 🚀 Command Overview: `/workflow:review`
|
||||
## Command Overview: /workflow:review
|
||||
|
||||
**Optional specialized review** for completed implementations. In the standard workflow, **passing tests = approved code**. Use this command only when specialized review is required (security, architecture, compliance, docs).
|
||||
|
||||
## Philosophy: "Tests Are the Review"
|
||||
|
||||
- ✅ **Default**: All tests pass → Code approved
|
||||
- 🔍 **Optional**: Specialized reviews for:
|
||||
- 🔒 Security audits (vulnerabilities, auth/authz)
|
||||
- 🏗️ Architecture compliance (patterns, technical debt)
|
||||
- 📋 Action items verification (requirements met, acceptance criteria)
|
||||
- **Default**: All tests pass -> Code approved
|
||||
- **Optional**: Specialized reviews for:
|
||||
- Security audits (vulnerabilities, auth/authz)
|
||||
- Architecture compliance (patterns, technical debt)
|
||||
- Action items verification (requirements met, acceptance criteria)
|
||||
|
||||
## Review Types
|
||||
|
||||
@@ -44,13 +44,13 @@ fi
|
||||
|
||||
# Step 2: Validation
|
||||
if [ ! -d ".workflow/${sessionId}" ]; then
|
||||
echo "❌ Session ${sessionId} not found"
|
||||
echo "Session ${sessionId} not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check for completed tasks
|
||||
if [ ! -d ".workflow/${sessionId}/.summaries" ] || [ -z "$(find .workflow/${sessionId}/.summaries/ -name "IMPL-*.md" -type f 2>/dev/null)" ]; then
|
||||
echo "❌ No completed implementation found. Complete implementation first"
|
||||
echo "No completed implementation found. Complete implementation first"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -59,7 +59,7 @@ review_type="${TYPE_ARG:-quality}"
|
||||
|
||||
# Redirect docs review to specialized command
|
||||
if [ "$review_type" = "docs" ]; then
|
||||
echo "💡 For documentation generation, please use:"
|
||||
echo "For documentation generation, please use:"
|
||||
echo " /workflow:tools:docs"
|
||||
echo ""
|
||||
echo "The docs command provides:"
|
||||
@@ -73,7 +73,7 @@ fi
|
||||
# BASH_EXECUTION_STOPS → MODEL_ANALYSIS_BEGINS
|
||||
```
|
||||
|
||||
### 🧠 Model Analysis Phase
|
||||
### Model Analysis Phase
|
||||
|
||||
After bash validation, the model takes control to:
|
||||
|
||||
@@ -205,7 +205,7 @@ After bash validation, the model takes control to:
|
||||
```bash
|
||||
# If architecture or quality issues found, suggest memory update
|
||||
if [ "$review_type" = "architecture" ] || [ "$review_type" = "quality" ]; then
|
||||
echo "💡 Consider updating project documentation:"
|
||||
echo "Consider updating project documentation:"
|
||||
echo " /update-memory-related"
|
||||
fi
|
||||
```
|
||||
@@ -226,7 +226,7 @@ After bash validation, the model takes control to:
|
||||
/workflow:review --type=docs
|
||||
```
|
||||
|
||||
## ✨ Features
|
||||
## Features
|
||||
|
||||
- **Simple Validation**: Check session exists and has completed tasks
|
||||
- **No Complex Orchestration**: Direct analysis, no multi-phase pipeline
|
||||
@@ -240,10 +240,10 @@ After bash validation, the model takes control to:
|
||||
|
||||
```
|
||||
Standard Workflow:
|
||||
plan → execute → test-gen → execute ✅
|
||||
plan -> execute -> test-gen -> execute (complete)
|
||||
|
||||
Optional Review (when needed):
|
||||
plan → execute → test-gen → execute → review (security/architecture/docs)
|
||||
plan -> execute -> test-gen -> execute -> review (security/architecture/docs)
|
||||
```
|
||||
|
||||
**When to Use**:
|
||||
@@ -256,11 +256,3 @@ Optional Review (when needed):
|
||||
- Regular development (tests are sufficient)
|
||||
- Simple bug fixes (test-fix-agent handles it)
|
||||
- Minor changes (update-memory-related is enough)
|
||||
|
||||
## Related Commands
|
||||
|
||||
- `/workflow:execute` - Must complete implementation first
|
||||
- `/workflow:test-gen` - Primary quality gate (tests)
|
||||
- `/workflow:tools:docs` - Generate hierarchical documentation (use instead of `--type=docs`)
|
||||
- `/update-memory-related` - Update CLAUDE.md docs after architecture findings
|
||||
- `/workflow:status` - Check session status
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: complete
|
||||
description: Mark the active workflow session as complete, archive it with lessons learned, and remove active flag
|
||||
description: Mark active workflow session as complete, archive with lessons learned, update manifest, remove active flag
|
||||
examples:
|
||||
- /workflow:session:complete
|
||||
- /workflow:session:complete --detailed
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: list
|
||||
description: List all workflow sessions with status
|
||||
description: List all workflow sessions with status filtering, shows session metadata and progress information
|
||||
examples:
|
||||
- /workflow:session:list
|
||||
---
|
||||
@@ -59,19 +59,19 @@ jq -r '.created_at // "unknown"' .workflow/WFS-session/workflow-session.json
|
||||
```
|
||||
Workflow Sessions:
|
||||
|
||||
✅ WFS-oauth-integration (ACTIVE)
|
||||
[ACTIVE] WFS-oauth-integration
|
||||
Project: OAuth2 authentication system
|
||||
Status: active
|
||||
Progress: 3/8 tasks completed
|
||||
Created: 2025-09-15T10:30:00Z
|
||||
|
||||
⏸️ WFS-user-profile (PAUSED)
|
||||
[PAUSED] WFS-user-profile
|
||||
Project: User profile management
|
||||
Status: paused
|
||||
Progress: 1/5 tasks completed
|
||||
Created: 2025-09-14T14:15:00Z
|
||||
|
||||
📁 WFS-database-migration (COMPLETED)
|
||||
[COMPLETED] WFS-database-migration
|
||||
Project: Database schema migration
|
||||
Status: completed
|
||||
Progress: 4/4 tasks completed
|
||||
@@ -81,10 +81,10 @@ Total: 3 sessions (1 active, 1 paused, 1 completed)
|
||||
```
|
||||
|
||||
### Status Indicators
|
||||
- **✅**: Active session
|
||||
- **⏸️**: Paused session
|
||||
- **📁**: Completed session
|
||||
- **❌**: Error/corrupted session
|
||||
- **[ACTIVE]**: Active session
|
||||
- **[PAUSED]**: Paused session
|
||||
- **[COMPLETED]**: Completed session
|
||||
- **[ERROR]**: Error/corrupted session
|
||||
|
||||
### Quick Commands
|
||||
```bash
|
||||
@@ -96,9 +96,4 @@ ls .workflow/.active-* | basename | sed 's/^\.active-//'
|
||||
|
||||
# Show recent sessions
|
||||
ls -t .workflow/WFS-*/workflow-session.json | head -3
|
||||
```
|
||||
|
||||
## Related Commands
|
||||
- `/workflow:session:start` - Create new session
|
||||
- `/workflow:session:switch` - Switch to different session
|
||||
- `/workflow:session:status` - Detailed session info
|
||||
```
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: resume
|
||||
description: Resume the most recently paused workflow session
|
||||
description: Resume the most recently paused workflow session with automatic session discovery and status update
|
||||
---
|
||||
|
||||
# Resume Workflow Session (/workflow:session:resume)
|
||||
@@ -64,9 +64,4 @@ Session WFS-user-auth resumed
|
||||
- Paused at: 2025-09-15T14:30:00Z
|
||||
- Resumed at: 2025-09-15T15:45:00Z
|
||||
- Ready for: /workflow:execute
|
||||
```
|
||||
|
||||
## Related Commands
|
||||
- `/workflow:session:pause` - Pause current session
|
||||
- `/workflow:execute` - Continue workflow execution
|
||||
- `/workflow:session:list` - Show all sessions
|
||||
```
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: start
|
||||
description: Discover existing sessions or start a new workflow session with intelligent session management
|
||||
description: Discover existing sessions or start new workflow session with intelligent session management and conflict detection
|
||||
argument-hint: [--auto|--new] [optional: task description for new session]
|
||||
examples:
|
||||
- /workflow:session:start
|
||||
@@ -212,9 +212,4 @@ bash(echo '{"session_id":"WFS-test","project":"test project","status":"planning"
|
||||
- Pattern: `WFS-[lowercase-slug]`
|
||||
- Characters: `a-z`, `0-9`, `-` only
|
||||
- Max length: 50 characters
|
||||
- Uniqueness: Add numeric suffix if collision (`WFS-auth-2`, `WFS-auth-3`)
|
||||
|
||||
## Related Commands
|
||||
- `/workflow:plan` - Uses `--auto` mode for session management
|
||||
- `/workflow:execute` - Uses discovery mode for session selection
|
||||
- `/workflow:session:status` - Shows detailed session information
|
||||
- Uniqueness: Add numeric suffix if collision (`WFS-auth-2`, `WFS-auth-3`)
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: workflow:status
|
||||
description: Generate on-demand views from JSON task data
|
||||
description: Generate on-demand task status views from JSON task data with optional task-id filtering for detailed view
|
||||
argument-hint: "[optional: task-id]"
|
||||
---
|
||||
|
||||
@@ -51,11 +51,11 @@ find .workflow/WFS-session/.summaries/ -name "*.md" -type f 2>/dev/null | wc -l
|
||||
**Progress**: 3/8 tasks completed
|
||||
|
||||
## Active Tasks
|
||||
- [⚠️] impl-1: Current task in progress
|
||||
- [IN PROGRESS] impl-1: Current task in progress
|
||||
- [ ] impl-2: Next pending task
|
||||
|
||||
## Completed Tasks
|
||||
- [✅] impl-0: Setup completed
|
||||
- [COMPLETED] impl-0: Setup completed
|
||||
```
|
||||
|
||||
## Simple Bash Commands
|
||||
@@ -112,13 +112,8 @@ Summary: .summaries/impl-1-summary.md
|
||||
|
||||
### Validation Results
|
||||
```
|
||||
✅ Session file valid
|
||||
✅ 8 task files found
|
||||
✅ 3 summaries found
|
||||
⚠️ 5 tasks pending completion
|
||||
```
|
||||
|
||||
## Related Commands
|
||||
- `/workflow:execute` - Uses this for task discovery
|
||||
- `/workflow:resume` - Uses this for progress analysis
|
||||
- `/workflow:session:status` - Shows session metadata
|
||||
Session file valid
|
||||
8 task files found
|
||||
3 summaries found
|
||||
5 tasks pending completion
|
||||
```
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: tdd-plan
|
||||
description: Orchestrate TDD workflow planning with Red-Green-Refactor task chains
|
||||
description: TDD workflow planning with Red-Green-Refactor task chain generation, test-first development structure, and cycle tracking
|
||||
argument-hint: "[--agent] \"feature description\"|file.md"
|
||||
allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*)
|
||||
---
|
||||
@@ -171,14 +171,14 @@ Total tasks: [M] (1 task per simple feature + subtasks for complex features)
|
||||
Task breakdown:
|
||||
- Simple features: [K] tasks (IMPL-1 to IMPL-K)
|
||||
- Complex features: [L] features with [P] subtasks
|
||||
- Total task count: [M] (within 10-task limit ✅)
|
||||
- Total task count: [M] (within 10-task limit)
|
||||
|
||||
Structure:
|
||||
- IMPL-1: {Feature 1 Name} (Internal: 🔴 Red → 🟢 Green → 🔵 Refactor)
|
||||
- IMPL-2: {Feature 2 Name} (Internal: 🔴 Red → 🟢 Green → 🔵 Refactor)
|
||||
- IMPL-1: {Feature 1 Name} (Internal: Red → Green → Refactor)
|
||||
- IMPL-2: {Feature 2 Name} (Internal: Red → Green → Refactor)
|
||||
- IMPL-3: {Complex Feature} (Container)
|
||||
- IMPL-3.1: {Sub-feature A} (Internal: 🔴 Red → 🟢 Green → 🔵 Refactor)
|
||||
- IMPL-3.2: {Sub-feature B} (Internal: 🔴 Red → 🟢 Green → 🔵 Refactor)
|
||||
- IMPL-3.1: {Sub-feature A} (Internal: Red → Green → Refactor)
|
||||
- IMPL-3.2: {Sub-feature B} (Internal: Red → Green → Refactor)
|
||||
[...]
|
||||
|
||||
Plans generated:
|
||||
@@ -192,12 +192,12 @@ TDD Configuration:
|
||||
- Green phase includes test-fix cycle (max 3 iterations)
|
||||
- Auto-revert on max iterations reached
|
||||
|
||||
✅ Recommended Next Steps:
|
||||
Recommended Next Steps:
|
||||
1. /workflow:action-plan-verify --session [sessionId] # Verify TDD plan quality and dependencies
|
||||
2. /workflow:execute --session [sessionId] # Start TDD execution
|
||||
3. /workflow:tdd-verify [sessionId] # Post-execution TDD compliance check
|
||||
|
||||
⚠️ Quality Gate: Consider running /workflow:action-plan-verify to validate TDD task structure and dependencies
|
||||
Quality Gate: Consider running /workflow:action-plan-verify to validate TDD task structure and dependencies
|
||||
```
|
||||
|
||||
## TodoWrite Pattern
|
||||
@@ -258,11 +258,6 @@ Convert user input to TDD-structured format:
|
||||
- **Command failure**: Keep phase in_progress, report error
|
||||
- **TDD validation failure**: Report incomplete chains or wrong dependencies
|
||||
|
||||
## Related Commands
|
||||
- `/workflow:plan` - Standard (non-TDD) planning
|
||||
- `/workflow:execute` - Execute TDD tasks
|
||||
- `/workflow:tdd-verify` - Verify TDD compliance
|
||||
- `/workflow:status` - View progress
|
||||
## TDD Workflow Enhancements
|
||||
|
||||
### Overview
|
||||
@@ -294,7 +289,7 @@ IMPL (Green phase) tasks now include automatic test-fix cycle for resilient impl
|
||||
```
|
||||
1. Write minimal implementation code
|
||||
2. Execute test suite
|
||||
3. IF tests pass → Complete task ✅
|
||||
3. IF tests pass → Complete task
|
||||
4. IF tests fail → Enter fix cycle:
|
||||
a. Gemini diagnoses with bug-fix template
|
||||
b. Apply fix (manual or Codex)
|
||||
@@ -304,10 +299,10 @@ IMPL (Green phase) tasks now include automatic test-fix cycle for resilient impl
|
||||
```
|
||||
|
||||
**Benefits**:
|
||||
- ✅ Faster feedback within Green phase
|
||||
- ✅ Autonomous recovery from implementation errors
|
||||
- ✅ Systematic debugging with Gemini
|
||||
- ✅ Safe rollback prevents broken state
|
||||
- Faster feedback within Green phase
|
||||
- Autonomous recovery from implementation errors
|
||||
- Systematic debugging with Gemini
|
||||
- Safe rollback prevents broken state
|
||||
|
||||
#### 3. Agent-Driven Planning
|
||||
**From plan --agent workflow**
|
||||
@@ -335,7 +330,7 @@ Supports action-planning-agent for more autonomous TDD planning with:
|
||||
|
||||
### Migration Notes
|
||||
|
||||
**Backward Compatibility**: ✅ Fully compatible
|
||||
**Backward Compatibility**: Fully compatible
|
||||
- Existing TDD workflows continue to work
|
||||
- New features are additive, not breaking
|
||||
- Phase 3 can be skipped if test-context-gather not available
|
||||
@@ -367,3 +362,23 @@ Supports action-planning-agent for more autonomous TDD planning with:
|
||||
- `meta.max_iterations`: Fix attempts (default: 3)
|
||||
- `meta.use_codex`: Auto-fix mode (default: false)
|
||||
|
||||
## Related Commands
|
||||
|
||||
**Prerequisite Commands**:
|
||||
- None - TDD planning is self-contained (can optionally run brainstorm commands before)
|
||||
|
||||
**Called by This Command** (6 phases):
|
||||
- `/workflow:session:start` - Phase 1: Create or discover TDD workflow session
|
||||
- `/workflow:tools:context-gather` - Phase 2: Gather project context and analyze codebase
|
||||
- `/workflow:tools:test-context-gather` - Phase 3: Analyze existing test patterns and coverage
|
||||
- `/workflow:tools:conflict-resolution` - Phase 4: Detect and resolve conflicts (auto-triggered if conflict_risk ≥ medium)
|
||||
- `/compact` - Phase 4: Memory optimization (if context approaching limits)
|
||||
- `/workflow:tools:task-generate-tdd` - Phase 5: Generate TDD task chains with Red-Green-Refactor cycles
|
||||
- `/workflow:tools:task-generate-tdd --agent` - Phase 5: Generate TDD tasks with agent-driven approach (when `--agent` flag used)
|
||||
|
||||
**Follow-up Commands**:
|
||||
- `/workflow:action-plan-verify` - Recommended: Verify TDD plan quality and structure before execution
|
||||
- `/workflow:status` - Review TDD task breakdown
|
||||
- `/workflow:execute` - Begin TDD implementation
|
||||
- `/workflow:tdd-verify` - Post-execution: Verify TDD compliance and generate quality report
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: tdd-verify
|
||||
description: Verify TDD workflow compliance and generate quality report
|
||||
description: Verify TDD workflow compliance against Red-Green-Refactor cycles, generate quality report with coverage analysis
|
||||
|
||||
argument-hint: "[optional: WFS-session-id]"
|
||||
allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(gemini:*)
|
||||
@@ -118,14 +118,14 @@ RULES: Focus on TDD best practices and workflow adherence. Be specific about vio
|
||||
TDD Verification Report - Session: {sessionId}
|
||||
|
||||
## Chain Validation
|
||||
✅ Feature 1: TEST-1.1 → IMPL-1.1 → REFACTOR-1.1 (Complete)
|
||||
✅ Feature 2: TEST-2.1 → IMPL-2.1 → REFACTOR-2.1 (Complete)
|
||||
⚠️ Feature 3: TEST-3.1 → IMPL-3.1 (Missing REFACTOR phase)
|
||||
[COMPLETE] Feature 1: TEST-1.1 → IMPL-1.1 → REFACTOR-1.1 (Complete)
|
||||
[COMPLETE] Feature 2: TEST-2.1 → IMPL-2.1 → REFACTOR-2.1 (Complete)
|
||||
[INCOMPLETE] Feature 3: TEST-3.1 → IMPL-3.1 (Missing REFACTOR phase)
|
||||
|
||||
## Test Execution
|
||||
✅ All TEST tasks produced failing tests
|
||||
✅ All IMPL tasks made tests pass
|
||||
✅ All REFACTOR tasks maintained green tests
|
||||
All TEST tasks produced failing tests
|
||||
All IMPL tasks made tests pass
|
||||
All REFACTOR tasks maintained green tests
|
||||
|
||||
## Coverage Metrics
|
||||
Line Coverage: {percentage}%
|
||||
@@ -271,20 +271,20 @@ Status: {EXCELLENT | GOOD | NEEDS IMPROVEMENT | FAILED}
|
||||
## Chain Analysis
|
||||
|
||||
### Feature 1: {Feature Name}
|
||||
**Status**: ✅ Complete
|
||||
**Status**: Complete
|
||||
**Chain**: TEST-1.1 → IMPL-1.1 → REFACTOR-1.1
|
||||
|
||||
- ✅ **Red Phase**: Test created and failed with clear message
|
||||
- ✅ **Green Phase**: Minimal implementation made test pass
|
||||
- ✅ **Refactor Phase**: Code improved, tests remained green
|
||||
- **Red Phase**: Test created and failed with clear message
|
||||
- **Green Phase**: Minimal implementation made test pass
|
||||
- **Refactor Phase**: Code improved, tests remained green
|
||||
|
||||
### Feature 2: {Feature Name}
|
||||
**Status**: ⚠️ Incomplete
|
||||
**Status**: Incomplete
|
||||
**Chain**: TEST-2.1 → IMPL-2.1 (Missing REFACTOR-2.1)
|
||||
|
||||
- ✅ **Red Phase**: Test created and failed
|
||||
- ⚠️ **Green Phase**: Implementation seems over-engineered
|
||||
- ❌ **Refactor Phase**: Missing
|
||||
- **Red Phase**: Test created and failed
|
||||
- **Green Phase**: Implementation seems over-engineered
|
||||
- **Refactor Phase**: Missing
|
||||
|
||||
**Issues**:
|
||||
- REFACTOR-2.1 task not completed
|
||||
@@ -306,16 +306,16 @@ Status: {EXCELLENT | GOOD | NEEDS IMPROVEMENT | FAILED}
|
||||
## TDD Cycle Validation
|
||||
|
||||
### Red Phase (Write Failing Test)
|
||||
- ✅ {N}/{total} features had failing tests initially
|
||||
- ⚠️ Feature 3: No evidence of initial test failure
|
||||
- {N}/{total} features had failing tests initially
|
||||
- Feature 3: No evidence of initial test failure
|
||||
|
||||
### Green Phase (Make Test Pass)
|
||||
- ✅ {N}/{total} implementations made tests pass
|
||||
- ✅ All implementations minimal and focused
|
||||
- {N}/{total} implementations made tests pass
|
||||
- All implementations minimal and focused
|
||||
|
||||
### Refactor Phase (Improve Quality)
|
||||
- ⚠️ {N}/{total} features completed refactoring
|
||||
- ❌ Feature 2, 4: Refactoring step skipped
|
||||
- {N}/{total} features completed refactoring
|
||||
- Feature 2, 4: Refactoring step skipped
|
||||
|
||||
## Best Practices Assessment
|
||||
|
||||
@@ -351,8 +351,3 @@ Status: {EXCELLENT | GOOD | NEEDS IMPROVEMENT | FAILED}
|
||||
{Summary of compliance status and next steps}
|
||||
```
|
||||
|
||||
## Related Commands
|
||||
- `/workflow:tdd-plan` - Creates TDD workflow
|
||||
- `/workflow:execute` - Executes TDD tasks
|
||||
- `/workflow:tools:tdd-coverage-analysis` - Analyzes test coverage
|
||||
- `/workflow:status` - Views workflow progress
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: test-cycle-execute
|
||||
description: Execute test-fix workflow with dynamic task generation and iterative fix cycles
|
||||
description: Execute test-fix workflow with dynamic task generation and iterative fix cycles until all tests pass or max iterations reached
|
||||
argument-hint: "[--resume-session=\"session-id\"] [--max-iterations=N]"
|
||||
allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*), Task(*)
|
||||
---
|
||||
@@ -10,7 +10,7 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*), Task(*)
|
||||
## Overview
|
||||
Orchestrates dynamic test-fix workflow execution through iterative cycles of testing, analysis, and fixing. **Unlike standard execute, this command dynamically generates intermediate tasks** during execution based on test results and CLI analysis, enabling adaptive problem-solving.
|
||||
|
||||
**⚠️ CRITICAL - Orchestrator Boundary**:
|
||||
**CRITICAL - Orchestrator Boundary**:
|
||||
- This command is the **ONLY place** where test failures are handled
|
||||
- All CLI analysis (Gemini/Qwen), fix task generation (IMPL-fix-N.json), and iteration management happen HERE
|
||||
- Agents (@test-fix-agent) only execute single tasks and return results
|
||||
@@ -59,22 +59,22 @@ Orchestrates dynamic test-fix workflow execution through iterative cycles of tes
|
||||
|
||||
## Responsibility Matrix
|
||||
|
||||
**⚠️ CRITICAL - Clear division of labor between orchestrator and agents:**
|
||||
**CRITICAL - Clear division of labor between orchestrator and agents:**
|
||||
|
||||
| Responsibility | test-cycle-execute (Orchestrator) | @test-fix-agent (Executor) |
|
||||
|----------------|----------------------------|---------------------------|
|
||||
| Manage iteration loop | ✅ Controls loop flow | ❌ Executes single task |
|
||||
| Run CLI analysis (Gemini/Qwen) | ✅ Runs between agent tasks | ❌ Not involved |
|
||||
| Generate IMPL-fix-N.json | ✅ Creates task files | ❌ Not involved |
|
||||
| Run tests | ❌ Delegates to agent | ✅ Executes test command |
|
||||
| Apply fixes | ❌ Delegates to agent | ✅ Modifies code |
|
||||
| Detect test failures | ✅ Analyzes results and decides next action | ✅ Executes tests and reports outcomes |
|
||||
| Add tasks to queue | ✅ Manages queue | ❌ Not involved |
|
||||
| Update iteration state | ✅ Maintains overall iteration state | ✅ Updates individual task status only |
|
||||
| Manage iteration loop | Yes - Controls loop flow | No - Executes single task |
|
||||
| Run CLI analysis (Gemini/Qwen) | Yes - Runs between agent tasks | No - Not involved |
|
||||
| Generate IMPL-fix-N.json | Yes - Creates task files | No - Not involved |
|
||||
| Run tests | No - Delegates to agent | Yes - Executes test command |
|
||||
| Apply fixes | No - Delegates to agent | Yes - Modifies code |
|
||||
| Detect test failures | Yes - Analyzes results and decides next action | Yes - Executes tests and reports outcomes |
|
||||
| Add tasks to queue | Yes - Manages queue | No - Not involved |
|
||||
| Update iteration state | Yes - Maintains overall iteration state | Yes - Updates individual task status only |
|
||||
|
||||
**Key Principle**: Orchestrator manages the "what" and "when"; agents execute the "how".
|
||||
|
||||
**⚠️ ENFORCEMENT**: If test failures occur outside this orchestrator, do NOT handle them inline - always call `/workflow:test-cycle-execute` instead.
|
||||
**ENFORCEMENT**: If test failures occur outside this orchestrator, do NOT handle them inline - always call `/workflow:test-cycle-execute` instead.
|
||||
|
||||
## Execution Lifecycle
|
||||
|
||||
@@ -653,10 +653,3 @@ mv temp.json iteration-state.json
|
||||
5. **Verify No Regressions**: Check all tests pass, not just previously failing ones
|
||||
6. **Preserve Context**: All iteration artifacts saved for debugging
|
||||
|
||||
## Related Commands
|
||||
|
||||
- `/workflow:test-fix-gen` - Planning phase (creates initial tasks)
|
||||
- `/workflow:execute` - Standard workflow execution (no dynamic iteration)
|
||||
- `/workflow:status` - Check progress and iteration state
|
||||
- `/workflow:session:complete` - Mark session complete (auto-called on success)
|
||||
- `/task:create` - Manually create additional tasks if needed
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: test-fix-gen
|
||||
description: Create independent test-fix workflow session from existing implementation (session or prompt-based)
|
||||
description: Create test-fix workflow session from session ID, description, or file path with test strategy generation and task planning
|
||||
argument-hint: "[--use-codex] [--cli-execute] (source-session-id | \"feature description\" | /path/to/file.md)"
|
||||
allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*)
|
||||
---
|
||||
@@ -13,7 +13,7 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*)
|
||||
|
||||
This command creates an independent test-fix workflow session for existing code. It orchestrates a 5-phase process to analyze implementation, generate test requirements, and create executable test generation and fix tasks.
|
||||
|
||||
**⚠️ CRITICAL - Command Scope**:
|
||||
**CRITICAL - Command Scope**:
|
||||
- **This command ONLY generates task JSON files** (IMPL-001.json, IMPL-002.json)
|
||||
- **Does NOT execute tests or apply fixes** - all execution happens in separate orchestrator
|
||||
- **Must call `/workflow:test-cycle-execute`** after this command to actually run tests and fixes
|
||||
@@ -274,7 +274,7 @@ Review artifacts:
|
||||
- Test plan: .workflow/[testSessionId]/IMPL_PLAN.md
|
||||
- Task list: .workflow/[testSessionId]/TODO_LIST.md
|
||||
|
||||
⚠️ CRITICAL - Next Steps:
|
||||
CRITICAL - Next Steps:
|
||||
1. Review IMPL_PLAN.md
|
||||
2. **MUST execute: /workflow:test-cycle-execute**
|
||||
- This command only generated task JSON files
|
||||
@@ -284,7 +284,7 @@ Review artifacts:
|
||||
|
||||
**TodoWrite**: Mark phase 5 completed
|
||||
|
||||
**⚠️ BOUNDARY NOTE**:
|
||||
**BOUNDARY NOTE**:
|
||||
- Command completes here - only task JSON files generated
|
||||
- All test execution, failure detection, CLI analysis, fix generation happens in `/workflow:test-cycle-execute`
|
||||
- This command does NOT handle test failures or apply fixes
|
||||
@@ -462,25 +462,23 @@ WFS-test-[session]/
|
||||
- Use `--use-codex` for autonomous fix application
|
||||
- Use `--cli-execute` for enhanced generation capabilities
|
||||
|
||||
### Related Commands
|
||||
## Related Commands
|
||||
|
||||
**Planning Phase**:
|
||||
- `/workflow:plan` - Create implementation workflow
|
||||
- `/workflow:session:start` - Initialize workflow session
|
||||
**Prerequisite Commands**:
|
||||
- `/workflow:plan` or `/workflow:execute` - Complete implementation session (for Session Mode)
|
||||
- None for Prompt Mode (ad-hoc test generation)
|
||||
|
||||
**Context Gathering**:
|
||||
- `/workflow:tools:test-context-gather` - Session-based context (Phase 2 for session mode)
|
||||
- `/workflow:tools:context-gather` - Prompt-based context (Phase 2 for prompt mode)
|
||||
**Called by This Command** (5 phases):
|
||||
- `/workflow:session:start` - Phase 1: Create independent test workflow session
|
||||
- `/workflow:tools:test-context-gather` - Phase 2 (Session Mode): Gather source session context
|
||||
- `/workflow:tools:context-gather` - Phase 2 (Prompt Mode): Analyze codebase directly
|
||||
- `/workflow:tools:test-concept-enhanced` - Phase 3: Generate test requirements using Gemini
|
||||
- `/workflow:tools:test-task-generate` - Phase 4: Generate test task JSONs with fix cycle specification
|
||||
- `/workflow:tools:test-task-generate --use-codex` - Phase 4: With automated Codex fixes (when `--use-codex` flag used)
|
||||
- `/workflow:tools:test-task-generate --cli-execute` - Phase 4: With CLI execution mode (when `--cli-execute` flag used)
|
||||
|
||||
**Analysis & Task Generation**:
|
||||
- `/workflow:tools:test-concept-enhanced` - Gemini test analysis (Phase 3)
|
||||
- `/workflow:tools:test-task-generate` - Generate test tasks (Phase 4)
|
||||
**Follow-up Commands**:
|
||||
- `/workflow:status` - Review generated test tasks
|
||||
- `/workflow:test-cycle-execute` - Execute test generation and iterative fix cycles
|
||||
- `/workflow:execute` - Standard execution of generated test tasks
|
||||
|
||||
**Execution**:
|
||||
- `/workflow:test-cycle-execute` - Execute test-fix workflow (recommended for IMPL-002)
|
||||
- `/workflow:execute` - Execute standard workflow tasks
|
||||
- `/workflow:status` - Check task progress
|
||||
|
||||
**Review & Management**:
|
||||
- `/workflow:review` - Review workflow results
|
||||
- `/workflow:session:complete` - Mark session complete
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: test-gen
|
||||
description: Create independent test-fix workflow session by analyzing completed implementation
|
||||
description: Create independent test-fix workflow session from completed implementation session, analyzes code to generate test tasks
|
||||
argument-hint: "[--use-codex] [--cli-execute] source-session-id"
|
||||
allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*)
|
||||
---
|
||||
@@ -24,7 +24,7 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*)
|
||||
3. Analyze implementation with concept-enhanced → Parse ANALYSIS_RESULTS.md
|
||||
4. Generate test task from analysis → Return summary
|
||||
|
||||
**⚠️ Command Scope**: This command ONLY prepares test workflow artifacts. It does NOT execute tests or implementation. Task execution requires separate user action.
|
||||
**Command Scope**: This command ONLY prepares test workflow artifacts. It does NOT execute tests or implementation. Task execution requires separate user action.
|
||||
|
||||
## Core Rules
|
||||
|
||||
@@ -36,7 +36,7 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*)
|
||||
6. **Track Progress**: Update TodoWrite after every phase completion
|
||||
7. **Automatic Detection**: context-gather auto-detects test session and gathers source session context
|
||||
8. **Parse --use-codex Flag**: Extract flag from arguments and pass to Phase 4 (test-task-generate)
|
||||
9. **⚠️ Command Boundary**: This command ends at Phase 5 summary. Test execution is NOT part of this command.
|
||||
9. **Command Boundary**: This command ends at Phase 5 summary. Test execution is NOT part of this command.
|
||||
|
||||
## 5-Phase Execution
|
||||
|
||||
@@ -177,13 +177,13 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*)
|
||||
|
||||
---
|
||||
|
||||
### Phase 5: Return Summary (⚠️ Command Ends Here)
|
||||
### Phase 5: Return Summary (Command Ends Here)
|
||||
|
||||
**⚠️ Important**: This is the final phase of `/workflow:test-gen`. The command completes and returns control to the user. No automatic execution occurs.
|
||||
**Important**: This is the final phase of `/workflow:test-gen`. The command completes and returns control to the user. No automatic execution occurs.
|
||||
|
||||
**Return to User**:
|
||||
```
|
||||
✅ Test workflow preparation complete!
|
||||
Test workflow preparation complete!
|
||||
|
||||
Source Session: [sourceSessionId]
|
||||
Test Session: [testSessionId]
|
||||
@@ -198,17 +198,17 @@ Test Framework: [detected framework]
|
||||
Test Files to Generate: [count]
|
||||
Fix Mode: [Manual|Codex Automated] (based on --use-codex flag)
|
||||
|
||||
📋 Review Generated Artifacts:
|
||||
Review Generated Artifacts:
|
||||
- Test plan: .workflow/[testSessionId]/IMPL_PLAN.md
|
||||
- Task list: .workflow/[testSessionId]/TODO_LIST.md
|
||||
- Analysis: .workflow/[testSessionId]/.process/TEST_ANALYSIS_RESULTS.md
|
||||
|
||||
⚠️ Ready for execution. Use appropriate workflow commands to proceed.
|
||||
Ready for execution. Use appropriate workflow commands to proceed.
|
||||
```
|
||||
|
||||
**TodoWrite**: Mark phase 5 completed
|
||||
|
||||
**⚠️ Command Boundary**: After this phase, the command terminates and returns to user prompt.
|
||||
**Command Boundary**: After this phase, the command terminates and returns to user prompt.
|
||||
|
||||
---
|
||||
|
||||
@@ -244,7 +244,7 @@ Update status to `in_progress` when starting each phase, mark `completed` when d
|
||||
│ ↓ │
|
||||
│ Phase 5: Return summary │
|
||||
└─────────────────────────────────────────────────────────┘
|
||||
⚠️ COMMAND ENDS - Control returns to user
|
||||
COMMAND ENDS - Control returns to user
|
||||
|
||||
Artifacts Created:
|
||||
├── .workflow/WFS-test-[session]/
|
||||
@@ -330,8 +330,18 @@ See `/workflow:tools:test-task-generate` for complete JSON schemas.
|
||||
|
||||
## Related Commands
|
||||
|
||||
- `/workflow:tools:test-context-gather` - Phase 2 (coverage analysis)
|
||||
- `/workflow:tools:test-concept-enhanced` - Phase 3 (Gemini test analysis)
|
||||
- `/workflow:tools:test-task-generate` - Phase 4 (task generation)
|
||||
- `/workflow:execute` - Execute workflow
|
||||
- `/workflow:status` - Check progress
|
||||
**Prerequisite Commands**:
|
||||
- `/workflow:plan` or `/workflow:execute` - Complete implementation session that needs test validation
|
||||
|
||||
**Called by This Command** (5 phases):
|
||||
- `/workflow:session:start` - Phase 1: Create independent test workflow session
|
||||
- `/workflow:tools:test-context-gather` - Phase 2: Analyze test coverage and gather source session context
|
||||
- `/workflow:tools:test-concept-enhanced` - Phase 3: Generate test requirements and strategy using Gemini
|
||||
- `/workflow:tools:test-task-generate` - Phase 4: Generate test generation and execution task JSONs
|
||||
- `/workflow:tools:test-task-generate --use-codex` - Phase 4: With automated Codex fixes (when `--use-codex` flag used)
|
||||
- `/workflow:tools:test-task-generate --cli-execute` - Phase 4: With CLI execution mode (when `--cli-execute` flag used)
|
||||
|
||||
**Follow-up Commands**:
|
||||
- `/workflow:status` - Review generated test tasks
|
||||
- `/workflow:test-cycle-execute` - Execute test generation and fix cycles
|
||||
- `/workflow:execute` - Execute generated test tasks
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: conflict-resolution
|
||||
description: Detect and resolve conflicts between plan and existing codebase using CLI-powered analysis
|
||||
description: Detect and resolve conflicts between plan and existing codebase using CLI-powered analysis with Gemini/Qwen
|
||||
argument-hint: "--session WFS-session-id --context path/to/context-package.json"
|
||||
examples:
|
||||
- /workflow:tools:conflict-resolution --session WFS-auth --context .workflow/WFS-auth/.process/context-package.json
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: gather
|
||||
description: Intelligently collect project context using context-search-agent based on task description and package into standardized JSON
|
||||
description: Intelligently collect project context using context-search-agent based on task description, packages into standardized JSON
|
||||
argument-hint: "--session WFS-session-id \"task description\""
|
||||
examples:
|
||||
- /workflow:tools:context-gather --session WFS-user-auth "Implement user authentication system"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: task-generate-agent
|
||||
description: Autonomous task generation using action-planning-agent with discovery and output phases
|
||||
description: Autonomous task generation using action-planning-agent with discovery and output phases for workflow planning
|
||||
argument-hint: "--session WFS-session-id [--cli-execute]"
|
||||
examples:
|
||||
- /workflow:tools:task-generate-agent --session WFS-auth
|
||||
@@ -19,6 +19,7 @@ Autonomous task JSON and IMPL_PLAN.md generation using action-planning-agent wit
|
||||
- **MCP-Enhanced**: Use MCP tools for advanced code analysis and research
|
||||
- **Pre-Selected Templates**: Command selects correct template based on `--cli-execute` flag **before** invoking agent
|
||||
- **Agent Simplicity**: Agent receives pre-selected template and focuses only on content generation
|
||||
- **Path Clarity**: All `focus_paths` prefer absolute paths (e.g., `D:\\project\\src\\module`), or clear relative paths from project root (e.g., `./src/module`)
|
||||
|
||||
## Execution Lifecycle
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: task-generate-tdd
|
||||
description: Generate TDD task chains with Red-Green-Refactor dependencies
|
||||
description: Generate TDD task chains with Red-Green-Refactor dependencies, test-first structure, and cycle validation
|
||||
argument-hint: "--session WFS-session-id [--agent]"
|
||||
allowed-tools: Read(*), Write(*), Bash(gemini:*), TodoWrite(*)
|
||||
---
|
||||
@@ -49,6 +49,7 @@ Generate TDD-specific tasks from analysis results with complete Red-Green-Refact
|
||||
- **Feature-Complete Tasks**: Each task contains complete Red-Green-Refactor cycle
|
||||
- **Phase-Explicit**: Internal phases clearly marked in flow_control.implementation_approach
|
||||
- **Task Merging**: Prefer single task per feature over decomposition
|
||||
- **Path Clarity**: All `focus_paths` prefer absolute paths (e.g., `D:\\project\\src\\module`), or clear relative paths from project root (e.g., `./src/module`)
|
||||
- **Artifact-Aware**: Integrates brainstorming outputs
|
||||
- **Memory-First**: Reuse loaded documents from memory
|
||||
- **Context-Aware**: Analyzes existing codebase and test patterns
|
||||
@@ -157,7 +158,7 @@ For each feature, generate task(s) with ID format:
|
||||
"expected_failure": "Why test should fail initially"
|
||||
}
|
||||
],
|
||||
"focus_paths": ["src/path/", "tests/path/"], // Files to modify
|
||||
"focus_paths": ["D:\\project\\src\\path", "./tests/path"], // Absolute or clear relative paths from project root
|
||||
"acceptance": [ // Success criteria
|
||||
"All tests pass (Red → Green)",
|
||||
"Code refactored (Refactor complete)",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: task-generate
|
||||
description: Generate task JSON files and IMPL_PLAN.md from analysis results with artifacts integration
|
||||
description: Generate task JSON files and IMPL_PLAN.md from analysis results using action-planning-agent with artifact integration
|
||||
argument-hint: "--session WFS-session-id [--cli-execute]"
|
||||
examples:
|
||||
- /workflow:tools:task-generate --session WFS-auth
|
||||
@@ -40,6 +40,7 @@ This command is built on a set of core principles to ensure efficient and reliab
|
||||
- **Role Analysis-Driven**: All generated tasks originate from role-specific `analysis.md` files (enhanced in synthesis phase), ensuring direct link between requirements/design and implementation
|
||||
- **Artifact-Aware**: Automatically detects and integrates all brainstorming outputs (role analyses, guidance-specification.md, enhancements) to enrich task context
|
||||
- **Context-Rich**: Embeds comprehensive context (requirements, focus paths, acceptance criteria, artifact references) directly into each task JSON
|
||||
- **Path Clarity**: All `focus_paths` prefer absolute paths (e.g., `D:\\project\\src\\module`), or clear relative paths from project root (e.g., `./src/module`)
|
||||
- **Flow-Control Ready**: Pre-defines clear execution sequence (`pre_analysis`, `implementation_approach`) within each task
|
||||
- **Memory-First**: Prioritizes using documents already loaded in conversation memory to avoid redundant file operations
|
||||
- **Mode-Flexible**: Supports both agent-driven execution (default) and CLI tool execution (with `--cli-execute` flag)
|
||||
@@ -182,7 +183,7 @@ This enhanced 5-field schema embeds all necessary context, artifacts, and execut
|
||||
},
|
||||
"context": {
|
||||
"requirements": ["Clear requirement from analysis"],
|
||||
"focus_paths": ["src/module/path", "tests/module/path"],
|
||||
"focus_paths": ["D:\\project\\src\\module\\path", "./tests/module/path"],
|
||||
"acceptance": ["Measurable acceptance criterion"],
|
||||
"parent": "IMPL-N",
|
||||
"depends_on": ["IMPL-N.M"],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: tdd-coverage-analysis
|
||||
description: Analyze test coverage and TDD cycle execution
|
||||
description: Analyze test coverage and TDD cycle execution with Red-Green-Refactor compliance verification
|
||||
argument-hint: "--session WFS-session-id"
|
||||
allowed-tools: Read(*), Write(*), Bash(*)
|
||||
---
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: test-concept-enhanced
|
||||
description: Analyze test requirements and generate test generation strategy using Gemini
|
||||
description: Analyze test requirements and generate test generation strategy using Gemini with test-context package
|
||||
argument-hint: "--session WFS-test-session-id --context path/to/test-context-package.json"
|
||||
examples:
|
||||
- /workflow:tools:test-concept-enhanced --session WFS-test-auth --context .workflow/WFS-test-auth/.process/test-context-package.json
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: test-context-gather
|
||||
description: Intelligently collect test coverage context using test-context-search-agent and package into standardized test-context JSON
|
||||
description: Collect test coverage context using test-context-search-agent and package into standardized test-context JSON
|
||||
argument-hint: "--session WFS-test-session-id"
|
||||
examples:
|
||||
- /workflow:tools:test-context-gather --session WFS-test-auth
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: test-task-generate
|
||||
description: Generate test-fix task JSON with iterative test-fix-retest cycle specification
|
||||
description: Generate test-fix task JSON with iterative test-fix-retest cycle specification using Gemini/Qwen/Codex
|
||||
argument-hint: "[--use-codex] [--cli-execute] --session WFS-test-session-id"
|
||||
examples:
|
||||
- /workflow:tools:test-task-generate --session WFS-test-auth
|
||||
@@ -363,7 +363,7 @@ Generate **TWO task JSON files**:
|
||||
" Source files: [focus_paths]",
|
||||
" Implementation: [implementation_context]",
|
||||
" EXPECTED: Root cause analysis, code path tracing, targeted fixes",
|
||||
" RULES: $(cat ~/.claude/workflows/cli-templates/prompts/development/bug-diagnosis.txt) | Bug: [test_failure_description]",
|
||||
" RULES: $(cat ~/.claude/workflows/cli-templates/prompts/analysis/01-diagnose-bug-root-cause.txt) | Bug: [test_failure_description]",
|
||||
" Minimal surgical fixes only - no refactoring",
|
||||
" \" > fix-iteration-[N]-diagnosis.md)",
|
||||
" - Parse diagnosis → extract fix_suggestion and target_files",
|
||||
@@ -690,6 +690,6 @@ The `@test-fix-agent` will execute the task by following the `flow_control.imple
|
||||
6. **Phase 3**: Generate summary and certify code
|
||||
7. **Error Recovery**: Revert changes if max iterations reached
|
||||
|
||||
**Bug Diagnosis Template**: Uses `~/.claude/workflows/cli-templates/prompts/development/bug-diagnosis.txt` template for systematic root cause analysis, code path tracing, and targeted fix recommendations.
|
||||
**Bug Diagnosis Template**: Uses `~/.claude/workflows/cli-templates/prompts/analysis/01-diagnose-bug-root-cause.txt` template for systematic root cause analysis, code path tracing, and targeted fix recommendations.
|
||||
|
||||
**Codex Usage**: The agent uses `codex exec "..." resume --last` pattern ONLY when meta.use_codex=true (--use-codex flag present) to maintain conversation context across multiple fix iterations, ensuring consistency and learning from previous attempts.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: animation-extract
|
||||
description: Extract animation and transition patterns from URLs, CSS, or interactive questioning
|
||||
description: Extract animation and transition patterns from URLs, CSS, or interactive questioning for design system documentation
|
||||
argument-hint: "[--base-path <path>] [--session <id>] [--urls "<list>"] [--mode <auto|interactive>] [--focus "<types>"]"
|
||||
allowed-tools: TodoWrite(*), Read(*), Write(*), Glob(*), Bash(*), Task(ui-design-agent), mcp__chrome-devtools__navigate_page(*), mcp__chrome-devtools__evaluate_script(*)
|
||||
---
|
||||
@@ -170,128 +170,318 @@ ELSE:
|
||||
extraction_insufficient = true
|
||||
```
|
||||
|
||||
### Step 2: Interactive Question Workflow (Agent)
|
||||
### Step 2: Generate Animation Questions (Main Flow)
|
||||
|
||||
```bash
|
||||
# If extraction failed or insufficient, use interactive questioning
|
||||
IF extraction_insufficient OR extraction_mode == "interactive":
|
||||
REPORT: "🤔 Launching interactive animation specification mode"
|
||||
REPORT: "🤔 Interactive animation specification mode"
|
||||
REPORT: " Context: {has_design_context ? 'Aligning with design tokens' : 'Standalone animation system'}"
|
||||
REPORT: " Focus: {focus_types}"
|
||||
|
||||
# Launch ui-design-agent for interactive questioning
|
||||
Task(ui-design-agent): `
|
||||
[ANIMATION_SPECIFICATION_TASK]
|
||||
Guide user through animation design decisions via structured questions
|
||||
# Determine question categories based on focus_types
|
||||
question_categories = []
|
||||
IF "all" IN focus_types OR "transitions" IN focus_types:
|
||||
question_categories.append("timing_scale")
|
||||
question_categories.append("easing_philosophy")
|
||||
|
||||
SESSION: {session_id} | MODE: interactive | BASE_PATH: {base_path}
|
||||
IF "all" IN focus_types OR "interactions" IN focus_types OR "hover" IN focus_types:
|
||||
question_categories.append("button_interactions")
|
||||
question_categories.append("card_interactions")
|
||||
question_categories.append("input_interactions")
|
||||
|
||||
## Context
|
||||
- Design tokens available: {has_design_context}
|
||||
- Focus areas: {focus_types}
|
||||
- Extracted data: {animations_extracted ? "Partial CSS data available" : "No CSS data"}
|
||||
IF "all" IN focus_types OR "page" IN focus_types:
|
||||
question_categories.append("page_transitions")
|
||||
|
||||
## Interactive Workflow
|
||||
IF "all" IN focus_types OR "loading" IN focus_types:
|
||||
question_categories.append("loading_states")
|
||||
|
||||
For each animation category, ASK user and WAIT for response:
|
||||
IF "all" IN focus_types OR "scroll" IN focus_types:
|
||||
question_categories.append("scroll_animations")
|
||||
```
|
||||
|
||||
### 1. Transition Duration Scale
|
||||
QUESTION: "What timing scale feels right for your design?"
|
||||
OPTIONS:
|
||||
- "Fast & Snappy" (100-200ms transitions)
|
||||
- "Balanced" (200-400ms transitions)
|
||||
- "Smooth & Deliberate" (400-600ms transitions)
|
||||
- "Custom" (specify values)
|
||||
### Step 3: Output Questions in Text Format (Main Flow)
|
||||
|
||||
### 2. Easing Philosophy
|
||||
QUESTION: "What easing style matches your brand?"
|
||||
OPTIONS:
|
||||
- "Linear" (constant speed, technical feel)
|
||||
- "Ease-Out" (fast start, natural feel)
|
||||
- "Ease-In-Out" (balanced, polished feel)
|
||||
- "Spring/Bounce" (playful, modern feel)
|
||||
- "Custom" (specify cubic-bezier)
|
||||
```markdown
|
||||
# Generate and output structured questions
|
||||
REPORT: ""
|
||||
REPORT: "===== 动画规格交互式配置 ====="
|
||||
REPORT: ""
|
||||
|
||||
### 3. Common Interactions (Ask for each)
|
||||
FOR interaction IN ["button-hover", "link-hover", "card-hover", "modal-open", "dropdown-toggle"]:
|
||||
QUESTION: "How should {interaction} animate?"
|
||||
OPTIONS:
|
||||
- "Subtle" (color/opacity change only)
|
||||
- "Lift" (scale + shadow increase)
|
||||
- "Slide" (transform translateY)
|
||||
- "Fade" (opacity transition)
|
||||
- "None" (no animation)
|
||||
- "Custom" (describe behavior)
|
||||
question_number = 1
|
||||
questions_output = []
|
||||
|
||||
### 4. Page Transitions
|
||||
QUESTION: "Should page/route changes have animations?"
|
||||
IF YES:
|
||||
ASK: "What style?"
|
||||
OPTIONS:
|
||||
- "Fade" (crossfade between views)
|
||||
- "Slide" (swipe left/right)
|
||||
- "Zoom" (scale in/out)
|
||||
- "None"
|
||||
# Q1: Timing Scale (if included)
|
||||
IF "timing_scale" IN question_categories:
|
||||
REPORT: "【问题{question_number} - 时间尺度】您的设计需要什么样的过渡速度?"
|
||||
REPORT: "a) 快速敏捷"
|
||||
REPORT: " 说明:100-200ms 过渡,适合工具型应用和即时反馈场景"
|
||||
REPORT: "b) 平衡适中"
|
||||
REPORT: " 说明:200-400ms 过渡,通用选择,符合多数用户预期"
|
||||
REPORT: "c) 流畅舒缓"
|
||||
REPORT: " 说明:400-600ms 过渡,适合品牌展示和沉浸式体验"
|
||||
REPORT: "d) 自定义"
|
||||
REPORT: " 说明:需要指定具体数值和使用场景"
|
||||
REPORT: ""
|
||||
questions_output.append({id: question_number, category: "timing_scale", options: ["a", "b", "c", "d"]})
|
||||
question_number += 1
|
||||
|
||||
### 5. Loading States
|
||||
QUESTION: "What loading animation style?"
|
||||
OPTIONS:
|
||||
- "Spinner" (rotating circle)
|
||||
- "Pulse" (opacity pulse)
|
||||
- "Skeleton" (shimmer effect)
|
||||
- "Progress Bar" (linear fill)
|
||||
- "Custom" (describe)
|
||||
# Q2: Easing Philosophy (if included)
|
||||
IF "easing_philosophy" IN question_categories:
|
||||
REPORT: "【问题{question_number} - 缓动风格】哪种缓动曲线符合您的品牌调性?"
|
||||
REPORT: "a) 线性匀速"
|
||||
REPORT: " 说明:恒定速度,技术感和精确性,适合数据可视化"
|
||||
REPORT: "b) 快入慢出"
|
||||
REPORT: " 说明:快速启动自然减速,最接近物理世界,通用推荐"
|
||||
REPORT: "c) 慢入慢出"
|
||||
REPORT: " 说明:平滑对称,精致优雅,适合高端品牌"
|
||||
REPORT: "d) 弹性效果"
|
||||
REPORT: " 说明:Spring/Bounce 回弹,活泼现代,适合互动性强的应用"
|
||||
REPORT: ""
|
||||
questions_output.append({id: question_number, category: "easing_philosophy", options: ["a", "b", "c", "d"]})
|
||||
question_number += 1
|
||||
|
||||
### 6. Micro-interactions
|
||||
QUESTION: "Should form inputs have micro-interactions?"
|
||||
IF YES:
|
||||
ASK: "What interactions?"
|
||||
OPTIONS:
|
||||
- "Focus state animation" (border/shadow transition)
|
||||
- "Error shake" (horizontal shake on error)
|
||||
- "Success check" (checkmark animation)
|
||||
- "All of the above"
|
||||
# Q3-5: Interaction Animations (button, card, input - if included)
|
||||
IF "button_interactions" IN question_categories:
|
||||
REPORT: "【问题{question_number} - 按钮交互】按钮悬停/点击时如何反馈?"
|
||||
REPORT: "a) 微妙变化"
|
||||
REPORT: " 说明:仅颜色/透明度变化,适合简约设计"
|
||||
REPORT: "b) 抬升效果"
|
||||
REPORT: " 说明:轻微缩放+阴影加深,增强物理感知"
|
||||
REPORT: "c) 滑动移位"
|
||||
REPORT: " 说明:Transform translateY,视觉引导明显"
|
||||
REPORT: "d) 无动画"
|
||||
REPORT: " 说明:静态交互,性能优先或特定品牌要求"
|
||||
REPORT: ""
|
||||
questions_output.append({id: question_number, category: "button_interactions", options: ["a", "b", "c", "d"]})
|
||||
question_number += 1
|
||||
|
||||
### 7. Scroll Animations
|
||||
QUESTION: "Should elements animate on scroll?"
|
||||
IF YES:
|
||||
ASK: "What scroll animation style?"
|
||||
OPTIONS:
|
||||
- "Fade In" (opacity 0→1)
|
||||
- "Slide Up" (translateY + fade)
|
||||
- "Scale In" (scale 0.9→1 + fade)
|
||||
- "Stagger" (sequential delays)
|
||||
- "None"
|
||||
IF "card_interactions" IN question_categories:
|
||||
REPORT: "【问题{question_number} - 卡片交互】卡片悬停时的动画效果?"
|
||||
REPORT: "a) 阴影加深"
|
||||
REPORT: " 说明:Box-shadow 变化,层次感增强"
|
||||
REPORT: "b) 上浮效果"
|
||||
REPORT: " 说明:Transform translateY(-4px),明显的空间层次"
|
||||
REPORT: "c) 缩放放大"
|
||||
REPORT: " 说明:Scale(1.02),突出焦点内容"
|
||||
REPORT: "d) 无动画"
|
||||
REPORT: " 说明:静态卡片,性能或设计考量"
|
||||
REPORT: ""
|
||||
questions_output.append({id: question_number, category: "card_interactions", options: ["a", "b", "c", "d"]})
|
||||
question_number += 1
|
||||
|
||||
## Output Generation
|
||||
IF "input_interactions" IN question_categories:
|
||||
REPORT: "【问题{question_number} - 表单交互】输入框是否需要微交互反馈?"
|
||||
REPORT: "a) 聚焦动画"
|
||||
REPORT: " 说明:边框/阴影过渡,清晰的状态指示"
|
||||
REPORT: "b) 错误抖动"
|
||||
REPORT: " 说明:水平shake动画,错误提示更明显"
|
||||
REPORT: "c) 成功勾选"
|
||||
REPORT: " 说明:Checkmark 动画,完成反馈"
|
||||
REPORT: "d) 全部包含"
|
||||
REPORT: " 说明:聚焦+错误+成功的完整反馈体系"
|
||||
REPORT: "e) 无微交互"
|
||||
REPORT: " 说明:标准表单,无额外动画"
|
||||
REPORT: ""
|
||||
questions_output.append({id: question_number, category: "input_interactions", options: ["a", "b", "c", "d", "e"]})
|
||||
question_number += 1
|
||||
|
||||
Based on user responses, generate structured data:
|
||||
# Q6: Page Transitions (if included)
|
||||
IF "page_transitions" IN question_categories:
|
||||
REPORT: "【问题{question_number} - 页面过渡】页面/路由切换是否需要过渡动画?"
|
||||
REPORT: "a) 淡入淡出"
|
||||
REPORT: " 说明:Crossfade 效果,平滑过渡不突兀"
|
||||
REPORT: "b) 滑动切换"
|
||||
REPORT: " 说明:Swipe left/right,方向性导航"
|
||||
REPORT: "c) 缩放过渡"
|
||||
REPORT: " 说明:Scale in/out,空间层次感"
|
||||
REPORT: "d) 无过渡"
|
||||
REPORT: " 说明:即时切换,性能优先"
|
||||
REPORT: ""
|
||||
questions_output.append({id: question_number, category: "page_transitions", options: ["a", "b", "c", "d"]})
|
||||
question_number += 1
|
||||
|
||||
1. Create animation-specification.json with user choices:
|
||||
- timing_scale (fast/balanced/slow/custom)
|
||||
- easing_philosophy (linear/ease-out/ease-in-out/spring)
|
||||
- interactions: {interaction_name: {type, properties, timing}}
|
||||
- page_transitions: {enabled, style, duration}
|
||||
- loading_animations: {style, duration}
|
||||
- scroll_animations: {enabled, style, stagger_delay}
|
||||
# Q7: Loading States (if included)
|
||||
IF "loading_states" IN question_categories:
|
||||
REPORT: "【问题{question_number} - 加载状态】加载时使用何种动画风格?"
|
||||
REPORT: "a) 旋转加载器"
|
||||
REPORT: " 说明:Spinner 圆形旋转,通用加载指示"
|
||||
REPORT: "b) 脉冲闪烁"
|
||||
REPORT: " 说明:Opacity pulse,轻量级反馈"
|
||||
REPORT: "c) 骨架屏"
|
||||
REPORT: " 说明:Shimmer effect,内容占位预览"
|
||||
REPORT: "d) 进度条"
|
||||
REPORT: " 说明:Linear fill,进度量化展示"
|
||||
REPORT: ""
|
||||
questions_output.append({id: question_number, category: "loading_states", options: ["a", "b", "c", "d"]})
|
||||
question_number += 1
|
||||
|
||||
2. Write to {base_path}/.intermediates/animation-analysis/animation-specification.json
|
||||
# Q8: Scroll Animations (if included)
|
||||
IF "scroll_animations" IN question_categories:
|
||||
REPORT: "【问题{question_number} - 滚动动画】元素是否在滚动时触发动画?"
|
||||
REPORT: "a) 淡入出现"
|
||||
REPORT: " 说明:Opacity 0→1,渐进式内容呈现"
|
||||
REPORT: "b) 上滑出现"
|
||||
REPORT: " 说明:TranslateY + fade,方向性引导"
|
||||
REPORT: "c) 缩放淡入"
|
||||
REPORT: " 说明:Scale 0.9→1 + fade,聚焦效果"
|
||||
REPORT: "d) 交错延迟"
|
||||
REPORT: " 说明:Stagger 序列动画,列表渐次呈现"
|
||||
REPORT: "e) 无滚动动画"
|
||||
REPORT: " 说明:静态内容,性能或可访问性考量"
|
||||
REPORT: ""
|
||||
questions_output.append({id: question_number, category: "scroll_animations", options: ["a", "b", "c", "d", "e"]})
|
||||
question_number += 1
|
||||
|
||||
## Critical Requirements
|
||||
- ✅ Use Write() tool immediately for specification file
|
||||
- ✅ Wait for user response after EACH question before proceeding
|
||||
- ✅ Validate responses and ask for clarification if needed
|
||||
- ✅ Provide sensible defaults if user skips questions
|
||||
- ❌ NO external research or MCP calls
|
||||
`
|
||||
REPORT: "支持格式:"
|
||||
REPORT: "- 空格分隔:1a 2b 3c"
|
||||
REPORT: "- 逗号分隔:1a,2b,3c"
|
||||
REPORT: "- 自由组合:1a 2b,3c"
|
||||
REPORT: ""
|
||||
REPORT: "请输入您的选择:"
|
||||
```
|
||||
|
||||
### Step 4: Wait for User Input (Main Flow)
|
||||
|
||||
```javascript
|
||||
# Wait for user input
|
||||
user_raw_input = WAIT_FOR_USER_INPUT()
|
||||
|
||||
# Store raw input for debugging
|
||||
REPORT: "收到输入: {user_raw_input}"
|
||||
```
|
||||
|
||||
### Step 5: Parse User Answers (Main Flow)
|
||||
|
||||
```javascript
|
||||
# Intelligent input parsing (support multiple formats)
|
||||
answers = {}
|
||||
|
||||
# Parse input using intelligent matching
|
||||
# Support formats: "1a 2b 3c", "1a,2b,3c", "1a 2b,3c"
|
||||
parsed_responses = PARSE_USER_INPUT(user_raw_input, questions_output)
|
||||
|
||||
# Validate parsing
|
||||
IF parsed_responses.is_valid:
|
||||
# Map question numbers to categories
|
||||
FOR response IN parsed_responses.answers:
|
||||
question_id = response.question_id
|
||||
selected_option = response.option
|
||||
|
||||
# Find category for this question
|
||||
FOR question IN questions_output:
|
||||
IF question.id == question_id:
|
||||
category = question.category
|
||||
answers[category] = selected_option
|
||||
REPORT: "✅ 问题{question_id} ({category}): 选择 {selected_option}"
|
||||
break
|
||||
ELSE:
|
||||
REPORT: "❌ 输入格式无法识别,请参考格式示例重新输入:"
|
||||
REPORT: " 示例:1a 2b 3c 4d"
|
||||
# Return to Step 3 for re-input
|
||||
GOTO Step 3
|
||||
```
|
||||
|
||||
### Step 6: Write Animation Specification (Main Flow)
|
||||
|
||||
```javascript
|
||||
# Map user choices to specification structure
|
||||
specification = {
|
||||
"metadata": {
|
||||
"source": "interactive",
|
||||
"timestamp": NOW(),
|
||||
"focus_types": focus_types,
|
||||
"has_design_context": has_design_context
|
||||
},
|
||||
"timing_scale": MAP_TIMING_SCALE(answers.timing_scale),
|
||||
"easing_philosophy": MAP_EASING_PHILOSOPHY(answers.easing_philosophy),
|
||||
"interactions": {
|
||||
"button": MAP_BUTTON_INTERACTION(answers.button_interactions),
|
||||
"card": MAP_CARD_INTERACTION(answers.card_interactions),
|
||||
"input": MAP_INPUT_INTERACTION(answers.input_interactions)
|
||||
},
|
||||
"page_transitions": MAP_PAGE_TRANSITIONS(answers.page_transitions),
|
||||
"loading_animations": MAP_LOADING_STATES(answers.loading_states),
|
||||
"scroll_animations": MAP_SCROLL_ANIMATIONS(answers.scroll_animations)
|
||||
}
|
||||
|
||||
# Mapping functions (inline logic)
|
||||
FUNCTION MAP_TIMING_SCALE(option):
|
||||
SWITCH option:
|
||||
CASE "a": RETURN {scale: "fast", base_duration: "150ms", range: "100-200ms"}
|
||||
CASE "b": RETURN {scale: "balanced", base_duration: "300ms", range: "200-400ms"}
|
||||
CASE "c": RETURN {scale: "smooth", base_duration: "500ms", range: "400-600ms"}
|
||||
CASE "d": RETURN {scale: "custom", base_duration: "300ms", note: "User to provide values"}
|
||||
|
||||
FUNCTION MAP_EASING_PHILOSOPHY(option):
|
||||
SWITCH option:
|
||||
CASE "a": RETURN {style: "linear", curve: "linear"}
|
||||
CASE "b": RETURN {style: "ease-out", curve: "cubic-bezier(0, 0, 0.2, 1)"}
|
||||
CASE "c": RETURN {style: "ease-in-out", curve: "cubic-bezier(0.4, 0, 0.2, 1)"}
|
||||
CASE "d": RETURN {style: "spring", curve: "cubic-bezier(0.34, 1.56, 0.64, 1)"}
|
||||
|
||||
FUNCTION MAP_BUTTON_INTERACTION(option):
|
||||
SWITCH option:
|
||||
CASE "a": RETURN {type: "subtle", properties: ["color", "background-color", "opacity"]}
|
||||
CASE "b": RETURN {type: "lift", properties: ["transform", "box-shadow"], transform: "scale(1.02)"}
|
||||
CASE "c": RETURN {type: "slide", properties: ["transform"], transform: "translateY(-2px)"}
|
||||
CASE "d": RETURN {type: "none", properties: []}
|
||||
|
||||
FUNCTION MAP_CARD_INTERACTION(option):
|
||||
SWITCH option:
|
||||
CASE "a": RETURN {type: "shadow", properties: ["box-shadow"]}
|
||||
CASE "b": RETURN {type: "float", properties: ["transform", "box-shadow"], transform: "translateY(-4px)"}
|
||||
CASE "c": RETURN {type: "scale", properties: ["transform"], transform: "scale(1.02)"}
|
||||
CASE "d": RETURN {type: "none", properties: []}
|
||||
|
||||
FUNCTION MAP_INPUT_INTERACTION(option):
|
||||
SWITCH option:
|
||||
CASE "a": RETURN {enabled: ["focus"], focus: {properties: ["border-color", "box-shadow"]}}
|
||||
CASE "b": RETURN {enabled: ["error"], error: {animation: "shake", keyframes: "translateX"}}
|
||||
CASE "c": RETURN {enabled: ["success"], success: {animation: "checkmark", keyframes: "draw"}}
|
||||
CASE "d": RETURN {enabled: ["focus", "error", "success"]}
|
||||
CASE "e": RETURN {enabled: []}
|
||||
|
||||
FUNCTION MAP_PAGE_TRANSITIONS(option):
|
||||
SWITCH option:
|
||||
CASE "a": RETURN {enabled: true, style: "fade", animation: "fadeIn/fadeOut"}
|
||||
CASE "b": RETURN {enabled: true, style: "slide", animation: "slideLeft/slideRight"}
|
||||
CASE "c": RETURN {enabled: true, style: "zoom", animation: "zoomIn/zoomOut"}
|
||||
CASE "d": RETURN {enabled: false}
|
||||
|
||||
FUNCTION MAP_LOADING_STATES(option):
|
||||
SWITCH option:
|
||||
CASE "a": RETURN {style: "spinner", animation: "rotate", keyframes: "360deg"}
|
||||
CASE "b": RETURN {style: "pulse", animation: "pulse", keyframes: "opacity"}
|
||||
CASE "c": RETURN {style: "skeleton", animation: "shimmer", keyframes: "gradient-shift"}
|
||||
CASE "d": RETURN {style: "progress", animation: "fill", keyframes: "width"}
|
||||
|
||||
FUNCTION MAP_SCROLL_ANIMATIONS(option):
|
||||
SWITCH option:
|
||||
CASE "a": RETURN {enabled: true, style: "fade", animation: "fadeIn"}
|
||||
CASE "b": RETURN {enabled: true, style: "slideUp", animation: "slideUp", transform: "translateY(20px)"}
|
||||
CASE "c": RETURN {enabled: true, style: "scaleIn", animation: "scaleIn", transform: "scale(0.9)"}
|
||||
CASE "d": RETURN {enabled: true, style: "stagger", animation: "fadeIn", stagger_delay: "100ms"}
|
||||
CASE "e": RETURN {enabled: false}
|
||||
|
||||
# Write specification file
|
||||
output_path = "{base_path}/.intermediates/animation-analysis/animation-specification.json"
|
||||
Write(output_path, JSON.stringify(specification, indent=2))
|
||||
|
||||
REPORT: "✅ Animation specification saved to {output_path}"
|
||||
REPORT: " Proceeding to token synthesis..."
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**Phase 2 Output**: `animation-specification.json` (user preferences)
|
||||
|
||||
## Phase 3: Animation Token Synthesis (Agent)
|
||||
## Phase 3: Animation Token Synthesis (Agent - No User Interaction)
|
||||
|
||||
**Executor**: `Task(ui-design-agent)` for token generation
|
||||
|
||||
**⚠️ CRITICAL**: This phase has NO user interaction. Agent only reads existing data and generates tokens.
|
||||
|
||||
### Step 1: Load All Input Sources
|
||||
|
||||
```bash
|
||||
@@ -305,61 +495,96 @@ IF animations_extracted:
|
||||
user_specification = null
|
||||
IF exists({base_path}/.intermediates/animation-analysis/animation-specification.json):
|
||||
user_specification = Read(file)
|
||||
REPORT: "✅ Loaded user specification from Phase 2"
|
||||
ELSE:
|
||||
REPORT: "⚠️ No user specification found - using extracted CSS only"
|
||||
|
||||
design_tokens = null
|
||||
IF has_design_context:
|
||||
design_tokens = Read({base_path}/style-extraction/style-1/design-tokens.json)
|
||||
```
|
||||
|
||||
### Step 2: Launch Token Generation Task
|
||||
### Step 2: Launch Token Generation Task (Pure Synthesis)
|
||||
|
||||
```javascript
|
||||
Task(ui-design-agent): `
|
||||
[ANIMATION_TOKEN_GENERATION_TASK]
|
||||
Synthesize all animation data into production-ready animation tokens
|
||||
Synthesize animation data into production-ready tokens - NO user interaction
|
||||
|
||||
SESSION: {session_id} | BASE_PATH: {base_path}
|
||||
|
||||
## Input Sources
|
||||
1. Extracted CSS Animations: {JSON.stringify(extracted_animations) OR "None"}
|
||||
2. User Specification: {JSON.stringify(user_specification) OR "None"}
|
||||
3. Design Tokens Context: {JSON.stringify(design_tokens) OR "None"}
|
||||
## ⚠️ CRITICAL: Pure Synthesis Task
|
||||
- NO user questions or interaction
|
||||
- READ existing specification files ONLY
|
||||
- Generate tokens based on available data
|
||||
|
||||
## Input Sources (Read-Only)
|
||||
1. **Extracted CSS Animations** (if available):
|
||||
${extracted_animations.length > 0 ? JSON.stringify(extracted_animations) : "None - skip CSS data"}
|
||||
|
||||
2. **User Specification** (REQUIRED if Phase 2 ran):
|
||||
File: {base_path}/.intermediates/animation-analysis/animation-specification.json
|
||||
${user_specification ? "Status: ✅ Found - READ this file for user choices" : "Status: ⚠️ Not found - use CSS extraction only"}
|
||||
|
||||
3. **Design Tokens Context** (for alignment):
|
||||
${design_tokens ? JSON.stringify(design_tokens) : "None - standalone animation system"}
|
||||
|
||||
## Synthesis Rules
|
||||
|
||||
### Priority System
|
||||
1. User specification (highest priority)
|
||||
2. Extracted CSS values (medium priority)
|
||||
1. User specification from animation-specification.json (highest priority)
|
||||
2. Extracted CSS values from animations-*.json (medium priority)
|
||||
3. Industry best practices (fallback)
|
||||
|
||||
### Duration Normalization
|
||||
- Analyze all extracted durations
|
||||
- Cluster into 3-5 semantic scales: instant, fast, normal, slow, very-slow
|
||||
- IF user_specification.timing_scale EXISTS:
|
||||
Use user's chosen scale (fast/balanced/smooth/custom)
|
||||
- ELSE IF extracted CSS durations available:
|
||||
Cluster extracted durations into 3-5 semantic scales
|
||||
- ELSE:
|
||||
Use standard scale (instant:0ms, fast:150ms, normal:300ms, slow:500ms, very-slow:800ms)
|
||||
- Align with design token spacing scale if available
|
||||
|
||||
### Easing Standardization
|
||||
- Identify common easing functions from extracted data
|
||||
- Map to semantic names: linear, ease-in, ease-out, ease-in-out, spring
|
||||
- Convert all cubic-bezier values to standard format
|
||||
- IF user_specification.easing_philosophy EXISTS:
|
||||
Use user's chosen philosophy (linear/ease-out/ease-in-out/spring)
|
||||
- ELSE IF extracted CSS easings available:
|
||||
Identify common easing functions from CSS
|
||||
- ELSE:
|
||||
Use standard easings
|
||||
- Map to semantic names and convert to cubic-bezier format
|
||||
|
||||
### Animation Categorization
|
||||
Organize into:
|
||||
- transitions: Property-specific transitions (color, transform, opacity)
|
||||
- keyframe_animations: Named @keyframe animations
|
||||
- interactions: Interaction-specific presets (hover, focus, active)
|
||||
- micro_interactions: Small feedback animations
|
||||
- page_transitions: Route/view change animations
|
||||
- scroll_animations: Scroll-triggered animations
|
||||
- **duration**: Timing scale (instant, fast, normal, slow, very-slow)
|
||||
- **easing**: Easing functions (linear, ease-in, ease-out, ease-in-out, spring)
|
||||
- **transitions**: Property-specific transitions (color, transform, opacity, etc.)
|
||||
- **keyframes**: Named @keyframe animations (fadeIn, slideInUp, pulse, etc.)
|
||||
- **interactions**: Interaction-specific presets (button-hover, card-hover, input-focus, etc.)
|
||||
- **page_transitions**: Route/view change animations (if user enabled)
|
||||
- **scroll_animations**: Scroll-triggered animations (if user enabled)
|
||||
|
||||
### User Specification Integration
|
||||
IF user_specification EXISTS:
|
||||
- Map user choices to token values:
|
||||
* timing_scale → duration values
|
||||
* easing_philosophy → easing curves
|
||||
* interactions.button → interactions.button-hover token
|
||||
* interactions.card → interactions.card-hover token
|
||||
* interactions.input → micro-interaction tokens
|
||||
* page_transitions → page_transitions tokens
|
||||
* loading_animations → loading state tokens
|
||||
* scroll_animations → scroll_animations tokens
|
||||
|
||||
## Generate Files
|
||||
|
||||
### 1. animation-tokens.json
|
||||
Complete animation token structure:
|
||||
Complete animation token structure using var() references:
|
||||
|
||||
{
|
||||
"duration": {
|
||||
"instant": "0ms",
|
||||
"fast": "150ms",
|
||||
"fast": "150ms", # Adjust based on user_specification.timing_scale
|
||||
"normal": "300ms",
|
||||
"slow": "500ms",
|
||||
"very-slow": "800ms"
|
||||
@@ -367,7 +592,7 @@ Task(ui-design-agent): `
|
||||
"easing": {
|
||||
"linear": "linear",
|
||||
"ease-in": "cubic-bezier(0.4, 0, 1, 1)",
|
||||
"ease-out": "cubic-bezier(0, 0, 0.2, 1)",
|
||||
"ease-out": "cubic-bezier(0, 0, 0.2, 1)", # Adjust based on user_specification.easing_philosophy
|
||||
"ease-in-out": "cubic-bezier(0.4, 0, 0.2, 1)",
|
||||
"spring": "cubic-bezier(0.34, 1.56, 0.64, 1)"
|
||||
},
|
||||
@@ -389,66 +614,74 @@ Task(ui-design-agent): `
|
||||
}
|
||||
},
|
||||
"keyframes": {
|
||||
"fadeIn": {
|
||||
"0%": {"opacity": "0"},
|
||||
"100%": {"opacity": "1"}
|
||||
},
|
||||
"slideInUp": {
|
||||
"0%": {"transform": "translateY(20px)", "opacity": "0"},
|
||||
"100%": {"transform": "translateY(0)", "opacity": "1"}
|
||||
},
|
||||
"pulse": {
|
||||
"0%, 100%": {"opacity": "1"},
|
||||
"50%": {"opacity": "0.7"}
|
||||
}
|
||||
"fadeIn": {"0%": {"opacity": "0"}, "100%": {"opacity": "1"}},
|
||||
"slideInUp": {"0%": {"transform": "translateY(20px)", "opacity": "0"}, "100%": {"transform": "translateY(0)", "opacity": "1"}},
|
||||
"pulse": {"0%, 100%": {"opacity": "1"}, "50%": {"opacity": "0.7"}},
|
||||
# Add more keyframes based on user_specification choices
|
||||
},
|
||||
"interactions": {
|
||||
"button-hover": {
|
||||
# Map from user_specification.interactions.button
|
||||
"properties": ["background-color", "transform"],
|
||||
"duration": "var(--duration-fast)",
|
||||
"easing": "var(--easing-ease-out)",
|
||||
"transform": "scale(1.02)"
|
||||
},
|
||||
"card-hover": {
|
||||
# Map from user_specification.interactions.card
|
||||
"properties": ["box-shadow", "transform"],
|
||||
"duration": "var(--duration-normal)",
|
||||
"easing": "var(--easing-ease-out)",
|
||||
"transform": "translateY(-4px)"
|
||||
}
|
||||
# Add input-focus, modal-open, dropdown-toggle based on user choices
|
||||
},
|
||||
"page_transitions": {
|
||||
# IF user_specification.page_transitions.enabled == true
|
||||
"fade": {
|
||||
"duration": "var(--duration-normal)",
|
||||
"enter": "fadeIn",
|
||||
"exit": "fadeOut"
|
||||
}
|
||||
# Add slide, zoom based on user_specification.page_transitions.style
|
||||
},
|
||||
"scroll_animations": {
|
||||
# IF user_specification.scroll_animations.enabled == true
|
||||
"default": {
|
||||
"animation": "fadeInUp",
|
||||
"animation": "fadeIn", # From user_specification.scroll_animations.style
|
||||
"duration": "var(--duration-slow)",
|
||||
"easing": "var(--easing-ease-out)",
|
||||
"threshold": "0.1",
|
||||
"stagger_delay": "100ms"
|
||||
"stagger_delay": "100ms" # From user_specification if stagger chosen
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
### 2. animation-guide.md
|
||||
Comprehensive usage guide:
|
||||
- Animation philosophy and rationale
|
||||
- Duration scale explanation
|
||||
- Easing function usage guidelines
|
||||
- Interaction animation patterns
|
||||
- Implementation examples (CSS and JS)
|
||||
- Accessibility considerations (prefers-reduced-motion)
|
||||
- Performance best practices
|
||||
Comprehensive usage guide with sections:
|
||||
- **Animation Philosophy**: Rationale from user choices and CSS analysis
|
||||
- **Duration Scale**: Explanation of timing values and usage contexts
|
||||
- **Easing Functions**: When to use each easing curve
|
||||
- **Transition Presets**: Property-specific transition guidelines
|
||||
- **Keyframe Animations**: Available animations and use cases
|
||||
- **Interaction Patterns**: Button, card, input animation examples
|
||||
- **Page Transitions**: Route change animation implementation (if enabled)
|
||||
- **Scroll Animations**: Scroll-trigger setup and configuration (if enabled)
|
||||
- **Implementation Examples**: CSS and JavaScript code samples
|
||||
- **Accessibility**: prefers-reduced-motion media query setup
|
||||
- **Performance Best Practices**: Hardware acceleration, will-change usage
|
||||
|
||||
## Output File Paths
|
||||
- animation-tokens.json: {base_path}/animation-extraction/animation-tokens.json
|
||||
- animation-guide.md: {base_path}/animation-extraction/animation-guide.md
|
||||
|
||||
## Critical Requirements
|
||||
- ✅ READ animation-specification.json if it exists (from Phase 2)
|
||||
- ✅ Use Write() tool immediately for both files
|
||||
- ✅ Ensure all tokens use CSS Custom Property format: var(--duration-fast)
|
||||
- ✅ All tokens use CSS Custom Property format: var(--duration-fast)
|
||||
- ✅ Include prefers-reduced-motion media query guidance
|
||||
- ✅ Validate all cubic-bezier values are valid
|
||||
- ✅ Validate all cubic-bezier values are valid (4 numbers between 0-1)
|
||||
- ❌ NO user questions or interaction in this phase
|
||||
- ❌ NO external research or MCP calls
|
||||
`
|
||||
```
|
||||
@@ -487,8 +720,8 @@ bash(ls -lh {base_path}/animation-extraction/)
|
||||
TodoWrite({todos: [
|
||||
{content: "Setup and input validation", status: "completed", activeForm: "Validating inputs"},
|
||||
{content: "CSS animation extraction (auto mode)", status: "completed", activeForm: "Extracting from CSS"},
|
||||
{content: "Interactive specification (fallback)", status: "completed", activeForm: "Collecting user input"},
|
||||
{content: "Animation token synthesis (agent)", status: "completed", activeForm: "Generating tokens"},
|
||||
{content: "Interactive specification (main flow)", status: "completed", activeForm: "Collecting user input in main flow"},
|
||||
{content: "Animation token synthesis (agent - no interaction)", status: "completed", activeForm: "Generating tokens via agent"},
|
||||
{content: "Verify output files", status: "completed", activeForm: "Verifying files"}
|
||||
]});
|
||||
```
|
||||
@@ -506,7 +739,7 @@ Configuration:
|
||||
- ✅ CSS extracted from {len(url_list)} URL(s)
|
||||
}
|
||||
{IF user_specification:
|
||||
- ✅ User specification via interactive mode
|
||||
- ✅ User specification via interactive mode (main flow)
|
||||
}
|
||||
{IF has_design_context:
|
||||
- ✅ Aligned with existing design tokens
|
||||
@@ -652,11 +885,12 @@ ERROR: Invalid cubic-bezier values
|
||||
|
||||
- **Auto-Trigger CSS Extraction** - Automatically extracts animations when --urls provided
|
||||
- **Hybrid Strategy** - Combines CSS extraction with interactive specification
|
||||
- **Main Flow Interaction** - User questions in main flow, agent only for token synthesis
|
||||
- **Intelligent Fallback** - Gracefully handles extraction failures
|
||||
- **Context-Aware** - Aligns with existing design tokens
|
||||
- **Production-Ready** - CSS var() format, accessibility support
|
||||
- **Comprehensive Coverage** - Transitions, keyframes, interactions, scroll animations
|
||||
- **Agent-Driven** - Autonomous token generation with ui-design-agent
|
||||
- **Separated Concerns** - User decisions (Phase 2 main flow) → Token generation (Phase 3 agent)
|
||||
|
||||
## Integration
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: batch-generate
|
||||
description: Prompt-driven batch UI generation using target-style-centric parallel execution
|
||||
description: Prompt-driven batch UI generation using target-style-centric parallel execution with design token application
|
||||
argument-hint: [--targets "<list>"] [--target-type "page|component"] [--device-type "desktop|mobile|tablet|responsive"] [--base-path <path>] [--session <id>] [--style-variants <count>] [--layout-variants <count>]
|
||||
allowed-tools: TodoWrite(*), Read(*), Write(*), Task(ui-design-agent), Bash(*), mcp__exa__web_search_exa(*)
|
||||
---
|
||||
@@ -129,7 +129,10 @@ Task(ui-design-agent): `
|
||||
## Reference
|
||||
- Layout inspiration: Read("{base_path}/.intermediates/layout-analysis/inspirations/{target}-layout-ideas.txt")
|
||||
- Design tokens: Read("{base_path}/style-extraction/style-{style_id}/design-tokens.json")
|
||||
Parse ALL token values (colors, typography, spacing, borders, shadows, breakpoints)
|
||||
Parse ALL token values including:
|
||||
* colors, typography (with combinations), spacing, opacity
|
||||
* border_radius, shadows, breakpoints
|
||||
* component_styles (button, card, input variants)
|
||||
${design_attributes ? "- Adapt DOM to: density, visual_weight, formality, organic_vs_geometric" : ""}
|
||||
|
||||
## Generation
|
||||
@@ -152,14 +155,16 @@ Task(ui-design-agent): `
|
||||
|
||||
2. CSS: {base_path}/prototypes/{target}-style-{style_id}-layout-N.css
|
||||
- Self-contained: Direct token VALUES (no var())
|
||||
- Use tokens: colors, fonts, spacing, borders, shadows
|
||||
- Use tokens: colors, fonts, spacing, opacity, borders, shadows
|
||||
- IF tokens.component_styles exists: Use component presets for buttons, cards, inputs
|
||||
- IF tokens.typography.combinations exists: Use typography presets for headings and body text
|
||||
- Device-optimized: {device_type} styles
|
||||
${device_type === 'responsive' ? '- Responsive: Mobile-first @media' : '- Fixed: ' + device_type}
|
||||
${design_attributes ? `
|
||||
- Token selection: density → spacing, visual_weight → shadows` : ""}
|
||||
|
||||
## Notes
|
||||
- ✅ Token VALUES directly from design-tokens.json
|
||||
- ✅ Token VALUES directly from design-tokens.json (with typography.combinations, opacity, component_styles support)
|
||||
- ✅ Follow prompt requirements for {target}
|
||||
- ✅ Optimize for {device_type}
|
||||
- ❌ NO var() refs, NO external deps
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: capture
|
||||
description: Batch screenshot capture for UI design workflows using MCP or local fallback
|
||||
description: Batch screenshot capture for UI design workflows using MCP puppeteer or local fallback with URL mapping
|
||||
argument-hint: --url-map "target:url,..." [--base-path path] [--session id]
|
||||
allowed-tools: TodoWrite(*), Read(*), Write(*), Bash(*), Glob(*), ListMcpResourcesTool(*), mcp__chrome-devtools__*, mcp__playwright__*
|
||||
---
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: explore-auto
|
||||
description: Exploratory UI design workflow with style-centric batch generation
|
||||
description: Exploratory UI design workflow with style-centric batch generation, creates design variants from prompts/images with parallel execution
|
||||
argument-hint: "[--prompt "<desc>"] [--images "<glob>"] [--targets "<list>"] [--target-type "page|component"] [--session <id>] [--style-variants <count>] [--layout-variants <count>] [--batch-plan]""
|
||||
allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*), Glob(*), Write(*), Task(conceptual-planning-agent)
|
||||
---
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: explore-layers
|
||||
description: Interactive deep UI capture with depth-controlled layer exploration
|
||||
description: Interactive deep UI capture with depth-controlled layer exploration using MCP puppeteer
|
||||
argument-hint: --url <url> --depth <1-5> [--session id] [--base-path path]
|
||||
allowed-tools: TodoWrite(*), Read(*), Write(*), Bash(*), Glob(*), mcp__chrome-devtools__*
|
||||
---
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: generate
|
||||
description: Assemble UI prototypes by combining layout templates with design tokens (pure assembler)
|
||||
description: Assemble UI prototypes by combining layout templates with design tokens, pure assembler without new content generation
|
||||
argument-hint: [--base-path <path>] [--session <id>] [--style-variants <count>] [--layout-variants <count>]
|
||||
allowed-tools: TodoWrite(*), Read(*), Write(*), Task(ui-design-agent), Bash(*)
|
||||
---
|
||||
@@ -99,7 +99,11 @@ Task(ui-design-agent): `
|
||||
|
||||
2. Design Tokens:
|
||||
Read("{base_path}/style-extraction/style-{style_id}/design-tokens.json")
|
||||
Extract: ALL token values (colors, typography, spacing, borders, shadows, breakpoints)
|
||||
Extract: ALL token values including:
|
||||
* colors, typography (with combinations), spacing, opacity
|
||||
* border_radius, shadows, breakpoints
|
||||
* component_styles (button, card, input variants)
|
||||
Note: typography.combinations, opacity, and component_styles fields contain preset configurations using var() references
|
||||
|
||||
3. Animation Tokens (OPTIONAL):
|
||||
IF exists("{base_path}/animation-extraction/animation-tokens.json"):
|
||||
@@ -133,11 +137,21 @@ Task(ui-design-agent): `
|
||||
- Replace ALL var(--*) with actual token values from design-tokens.json
|
||||
Example: var(--spacing-4) → 1rem (from tokens.spacing.4)
|
||||
Example: var(--breakpoint-md) → 768px (from tokens.breakpoints.md)
|
||||
Example: var(--opacity-80) → 0.8 (from tokens.opacity.80)
|
||||
- Add visual styling using design tokens:
|
||||
* Colors: tokens.colors.*
|
||||
* Typography: tokens.typography.*
|
||||
* Typography: tokens.typography.* (including combinations)
|
||||
* Opacity: tokens.opacity.*
|
||||
* Shadows: tokens.shadows.*
|
||||
* Border radius: tokens.border_radius.*
|
||||
- IF tokens.component_styles exists: Add component style classes
|
||||
* Generate classes for button variants (.btn-primary, .btn-secondary)
|
||||
* Generate classes for card variants (.card-default, .card-interactive)
|
||||
* Generate classes for input variants (.input-default, .input-focus, .input-error)
|
||||
* Use var() references that resolve to actual token values
|
||||
- IF tokens.typography.combinations exists: Add typography preset classes
|
||||
* Generate classes for typography presets (.text-heading-primary, .text-body-regular, .text-caption)
|
||||
* Use var() references for family, size, weight, line-height, letter-spacing
|
||||
- IF has_animations == true: Inject animation tokens
|
||||
* Add CSS Custom Properties for animations at :root level:
|
||||
--duration-instant, --duration-fast, --duration-normal, etc.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: imitate-auto
|
||||
description: High-speed multi-page UI replication with batch screenshot capture
|
||||
description: High-speed multi-page UI replication with batch screenshot capture and design token extraction
|
||||
argument-hint: --url-map "<map>" [--capture-mode <batch|deep>] [--depth <1-5>] [--session <id>] [--prompt "<desc>"]
|
||||
allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Write(*), Bash(*)
|
||||
---
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: layout-extract
|
||||
description: Extract structural layout information from reference images, URLs, or text prompts
|
||||
description: Extract structural layout information from reference images, URLs, or text prompts using Claude analysis
|
||||
argument-hint: [--base-path <path>] [--session <id>] [--images "<glob>"] [--urls "<list>"] [--prompt "<desc>"] [--targets "<list>"] [--mode <imitate|explore>] [--variants <count>] [--device-type <desktop|mobile|tablet|responsive>]
|
||||
allowed-tools: TodoWrite(*), Read(*), Write(*), Glob(*), Bash(*), Task(ui-design-agent), mcp__exa__web_search_exa(*)
|
||||
---
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: style-extract
|
||||
description: Extract design style from reference images or text prompts using Claude's analysis
|
||||
description: Extract design style from reference images or text prompts using Claude analysis with variant generation
|
||||
argument-hint: "[--base-path <path>] [--session <id>] [--images "<glob>"] [--urls "<list>"] [--prompt "<desc>"] [--mode <imitate|explore>] [--variants <count>]"
|
||||
allowed-tools: TodoWrite(*), Read(*), Write(*), Glob(*), mcp__chrome-devtools__navigate_page(*), mcp__chrome-devtools__evaluate_script(*)
|
||||
---
|
||||
@@ -418,17 +418,33 @@ Task(ui-design-agent): `
|
||||
Create complete design system in {base_path}/style-extraction/style-1/
|
||||
|
||||
1. **design-tokens.json**:
|
||||
- Complete token structure: colors (brand, surface, semantic, text, border), typography (families, sizes, weights, line heights, letter spacing), spacing (0-24 scale), border_radius (none to full), shadows (sm to xl), breakpoints (sm to 2xl)
|
||||
- Complete token structure with ALL fields:
|
||||
* colors (brand, surface, semantic, text, border) - OKLCH format
|
||||
* typography (families, sizes, weights, line heights, letter spacing, combinations)
|
||||
* typography.combinations: Predefined typography presets (heading-primary, heading-secondary, body-regular, body-emphasis, caption, label) using var() references
|
||||
* spacing (0-24 scale)
|
||||
* opacity (0, 10, 20, 40, 60, 80, 90, 100)
|
||||
* border_radius (none to full)
|
||||
* shadows (sm to xl)
|
||||
* component_styles (button, card, input variants) - component presets using var() references
|
||||
* breakpoints (sm to 2xl)
|
||||
- All colors in OKLCH format
|
||||
${extraction_mode == "explore" ? "- Start from preview colors and expand to full palette" : ""}
|
||||
${extraction_mode == "explore" && refinements.enabled ? "- Apply user refinements where specified" : ""}
|
||||
- Common Tailwind CSS usage patterns in project (if extracting from existing project)
|
||||
|
||||
2. **style-guide.md**:
|
||||
- Design philosophy (${extraction_mode == "explore" ? "expand on: " + selected_direction.philosophy_name : "describe the reference design"})
|
||||
- Complete color system documentation with accessibility notes
|
||||
- Typography scale and usage guidelines
|
||||
- Typography Combinations section: Document each preset (heading-primary, heading-secondary, body-regular, body-emphasis, caption, label) with usage context and code examples
|
||||
- Spacing system explanation
|
||||
- Opacity & Transparency section: Opacity scale usage, common use cases (disabled states, overlays, hover effects), accessibility considerations
|
||||
- Shadows & Elevation section: Shadow hierarchy and semantic usage
|
||||
- Component Styles section: Document button, card, and input variants with code examples and visual descriptions
|
||||
- Border Radius system and semantic usage
|
||||
- Component examples and usage patterns
|
||||
- Common Tailwind CSS patterns (if applicable)
|
||||
|
||||
## Critical Requirements
|
||||
- ✅ Use Write() tool immediately for each file
|
||||
@@ -577,15 +593,46 @@ bash(test -f {base_path}/.intermediates/style-analysis/analysis-options.json &&
|
||||
"text": {"primary": "oklch(...)", "secondary": "oklch(...)", "tertiary": "oklch(...)", "inverse": "oklch(...)"},
|
||||
"border": {"default": "oklch(...)", "strong": "oklch(...)", "subtle": "oklch(...)"}
|
||||
},
|
||||
"typography": {"font_family": {...}, "font_size": {...}, "font_weight": {...}, "line_height": {...}, "letter_spacing": {...}},
|
||||
"typography": {
|
||||
"font_family": {...},
|
||||
"font_size": {...},
|
||||
"font_weight": {...},
|
||||
"line_height": {...},
|
||||
"letter_spacing": {...},
|
||||
"combinations": {
|
||||
"heading-primary": {"family": "var(--font-family-heading)", "size": "var(--font-size-3xl)", "weight": "var(--font-weight-bold)", "line_height": "var(--line-height-tight)", "letter_spacing": "var(--letter-spacing-tight)"},
|
||||
"heading-secondary": {...},
|
||||
"body-regular": {...},
|
||||
"body-emphasis": {...},
|
||||
"caption": {...},
|
||||
"label": {...}
|
||||
}
|
||||
},
|
||||
"spacing": {"0": "0", "1": "0.25rem", ..., "24": "6rem"},
|
||||
"opacity": {"0": "0", "10": "0.1", "20": "0.2", "40": "0.4", "60": "0.6", "80": "0.8", "90": "0.9", "100": "1"},
|
||||
"border_radius": {"none": "0", "sm": "0.25rem", ..., "full": "9999px"},
|
||||
"shadows": {"sm": "...", "md": "...", "lg": "...", "xl": "..."},
|
||||
"component_styles": {
|
||||
"button": {
|
||||
"primary": {"background": "var(--color-brand-primary)", "color": "var(--color-text-inverse)", "padding": "var(--spacing-3) var(--spacing-6)", "border_radius": "var(--border-radius-md)", "font_weight": "var(--font-weight-semibold)"},
|
||||
"secondary": {...},
|
||||
"tertiary": {...}
|
||||
},
|
||||
"card": {
|
||||
"default": {"background": "var(--color-surface-elevated)", "padding": "var(--spacing-6)", "border_radius": "var(--border-radius-lg)", "shadow": "var(--shadow-md)"},
|
||||
"interactive": {...}
|
||||
},
|
||||
"input": {
|
||||
"default": {"border": "1px solid var(--color-border-default)", "padding": "var(--spacing-3)", "border_radius": "var(--border-radius-md)", "background": "var(--color-surface-background)"},
|
||||
"focus": {...},
|
||||
"error": {...}
|
||||
}
|
||||
},
|
||||
"breakpoints": {"sm": "640px", ..., "2xl": "1536px"}
|
||||
}
|
||||
```
|
||||
|
||||
**Requirements**: OKLCH colors, complete coverage, semantic naming, WCAG AA compliance
|
||||
**Requirements**: OKLCH colors, complete coverage, semantic naming, WCAG AA compliance, typography combinations, component style presets, opacity scale
|
||||
|
||||
## Error Handling
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: update
|
||||
description: Update brainstorming artifacts with finalized design system references
|
||||
description: Update brainstorming artifacts with finalized design system references from selected prototypes
|
||||
argument-hint: --session <session_id> [--selected-prototypes "<list>"]
|
||||
allowed-tools: Read(*), Write(*), Edit(*), TodoWrite(*), Glob(*), Bash(*)
|
||||
---
|
||||
|
||||
@@ -192,7 +192,7 @@ update_module_claude() {
|
||||
fi
|
||||
|
||||
# Use unified template for all modules
|
||||
local template_path="$HOME/.claude/workflows/cli-templates/prompts/memory/claude-module-unified.txt"
|
||||
local template_path="$HOME/.claude/workflows/cli-templates/prompts/memory/02-document-module-structure.txt"
|
||||
|
||||
# Read template content directly
|
||||
local template_content=""
|
||||
|
||||
179
.claude/skills/command-guide/SKILL.md
Normal file
179
.claude/skills/command-guide/SKILL.md
Normal file
@@ -0,0 +1,179 @@
|
||||
---
|
||||
name: command-guide
|
||||
description: Workflow command guide for Claude DMS3 (69 commands). Search/browse commands, get next-step recommendations, view documentation, report issues. Triggers "CCW-help", "CCW-issue", "how to use", "search commands", "what's next", beginner onboarding questions
|
||||
allowed-tools: Read, Grep, Glob, AskUserQuestion
|
||||
---
|
||||
|
||||
# Command Guide Skill
|
||||
|
||||
Comprehensive command guide for Claude DMS3 workflow system covering 69 commands across 4 categories (workflow, cli, memory, task).
|
||||
|
||||
## 🎯 Operation Modes
|
||||
|
||||
### Mode 1: Command Search 🔍
|
||||
|
||||
**When**: User searches by keyword, category, or use-case
|
||||
|
||||
**Triggers**: "搜索命令", "find command", "planning 相关", "search"
|
||||
|
||||
**Process**:
|
||||
1. Identify search type (keyword/category/use-case)
|
||||
2. Query appropriate index (all-commands/by-category/by-use-case)
|
||||
3. Return matching commands with metadata
|
||||
4. Suggest related commands
|
||||
|
||||
**Example**: "搜索 planning 命令" → Lists planning commands from `index/by-use-case.json`
|
||||
|
||||
---
|
||||
|
||||
### Mode 2: Smart Recommendations 🤖
|
||||
|
||||
**When**: User asks for next steps after a command
|
||||
|
||||
**Triggers**: "下一步", "what's next", "after /workflow:plan", "推荐"
|
||||
|
||||
**Process**:
|
||||
1. Parse current context (last command/workflow state)
|
||||
2. Query `index/command-relationships.json`
|
||||
3. Return recommended next commands with rationale
|
||||
4. Show common workflow patterns
|
||||
|
||||
**Example**: "执行完 /workflow:plan 后做什么?" → Recommends /workflow:execute or /workflow:action-plan-verify
|
||||
|
||||
---
|
||||
|
||||
### Mode 3: Full Documentation 📖
|
||||
|
||||
**When**: User requests command details
|
||||
|
||||
**Triggers**: "参数说明", "怎么用", "how to use", "详情"
|
||||
|
||||
**Process**:
|
||||
1. Locate command in `index/all-commands.json`
|
||||
2. Read original command file for full details
|
||||
3. Present parameters, arguments, examples
|
||||
4. Link to related commands
|
||||
|
||||
**Example**: "/workflow:plan 的参数是什么?" → Shows full parameter list and usage examples
|
||||
|
||||
---
|
||||
|
||||
### Mode 4: Beginner Onboarding 🎓
|
||||
|
||||
**When**: New user needs guidance
|
||||
|
||||
**Triggers**: "新手", "getting started", "如何开始", "常用命令"
|
||||
|
||||
**Process**:
|
||||
1. Present progressive learning path
|
||||
2. Show `index/essential-commands.json` (Top 14 commands)
|
||||
3. Link to getting-started guide
|
||||
4. Provide first workflow example
|
||||
|
||||
**Example**: "我是新手,如何开始?" → Learning path + Top 14 commands + quick start guide
|
||||
|
||||
---
|
||||
|
||||
### Mode 5: Issue Reporting 📝
|
||||
|
||||
**When**: User wants to report issue or request feature
|
||||
|
||||
**Triggers**: **"CCW-issue"**, **"CCW-help"**, "报告 bug", "功能建议", "问题咨询"
|
||||
|
||||
**Process**:
|
||||
1. Use AskUserQuestion to confirm type (bug/feature/question)
|
||||
2. Collect required information interactively
|
||||
3. Select appropriate template (`templates/issue-{type}.md`)
|
||||
4. Generate filled template and save/display
|
||||
|
||||
**Example**: "CCW-issue" → Interactive Q&A → Generates GitHub issue template
|
||||
|
||||
---
|
||||
|
||||
## 📚 Index Files
|
||||
|
||||
All command metadata is stored in JSON indexes for fast querying:
|
||||
|
||||
- **all-commands.json** - Complete catalog (69 commands) with full metadata
|
||||
- **by-category.json** - Hierarchical organization (workflow/cli/memory/task)
|
||||
- **by-use-case.json** - Grouped by scenario (planning/implementation/testing/docs/session)
|
||||
- **essential-commands.json** - Top 14 most-used commands
|
||||
- **command-relationships.json** - Next-step recommendations and dependencies
|
||||
|
||||
📖 Detailed structure: [Index Structure Reference](guides/index-structure.md)
|
||||
|
||||
---
|
||||
|
||||
## 🗂️ Supporting Guides
|
||||
|
||||
- **[Getting Started](guides/getting-started.md)** - 5-minute quickstart for beginners
|
||||
- **[Workflow Patterns](guides/workflow-patterns.md)** - Common workflow examples (Plan→Execute, TDD, UI design)
|
||||
- **[CLI Tools Guide](guides/cli-tools-guide.md)** - Gemini/Qwen/Codex usage
|
||||
- **[Troubleshooting](guides/troubleshooting.md)** - Common issues and solutions
|
||||
- **[Implementation Details](guides/implementation-details.md)** - Detailed logic for each mode
|
||||
- **[Usage Examples](guides/examples.md)** - Example dialogues and edge cases
|
||||
|
||||
---
|
||||
|
||||
## 🛠️ Issue Templates
|
||||
|
||||
Generate standardized GitHub issue templates:
|
||||
|
||||
- **[Bug Report](templates/issue-bug.md)** - Report command errors or system bugs
|
||||
- **[Feature Request](templates/issue-feature.md)** - Suggest new features or improvements
|
||||
- **[Question](templates/issue-question.md)** - Ask usage questions or request help
|
||||
|
||||
Templates are auto-populated during Mode 5 (Issue Reporting) interaction.
|
||||
|
||||
---
|
||||
|
||||
## 📊 System Statistics
|
||||
|
||||
- **Total Commands**: 69
|
||||
- **Categories**: 4 (workflow: 46, cli: 9, memory: 8, task: 4, general: 2)
|
||||
- **Use Cases**: 5 (planning, implementation, testing, documentation, session-management)
|
||||
- **Difficulty Levels**: 3 (Beginner, Intermediate, Advanced)
|
||||
- **Essential Commands**: 14
|
||||
|
||||
---
|
||||
|
||||
## 🔧 Maintenance
|
||||
|
||||
### Updating Indexes
|
||||
|
||||
When commands are added/modified/removed:
|
||||
|
||||
```bash
|
||||
bash scripts/update-index.sh
|
||||
```
|
||||
|
||||
This script:
|
||||
1. Scans all command files in `../../commands/`
|
||||
2. Extracts metadata from YAML frontmatter
|
||||
3. Analyzes command relationships
|
||||
4. Regenerates all 5 index files
|
||||
|
||||
### Committing Updates
|
||||
|
||||
```bash
|
||||
git add .claude/skills/command-guide/index/
|
||||
git commit -m "docs: update command indexes"
|
||||
git push
|
||||
```
|
||||
|
||||
Team members get latest indexes via `git pull`.
|
||||
|
||||
---
|
||||
|
||||
## 📖 Related Documentation
|
||||
|
||||
- [Workflow Architecture](../../workflows/workflow-architecture.md) - System design overview
|
||||
- [Intelligent Tools Strategy](../../workflows/intelligent-tools-strategy.md) - CLI tool selection
|
||||
- [Context Search Strategy](../../workflows/context-search-strategy.md) - Search patterns
|
||||
- [Task Core](../../workflows/task-core.md) - Task system fundamentals
|
||||
|
||||
---
|
||||
|
||||
**Version**: 1.1.0
|
||||
**Last Updated**: 2025-11-06
|
||||
**Maintainer**: Claude DMS3 Team
|
||||
64
.claude/skills/command-guide/guides/cli-tools-guide.md
Normal file
64
.claude/skills/command-guide/guides/cli-tools-guide.md
Normal file
@@ -0,0 +1,64 @@
|
||||
# CLI 智能工具指南
|
||||
|
||||
Gemini CLI 能够集成多种智能工具(如大型语言模型 LLM),以增强您的开发工作流。本指南将帮助您理解这些智能工具如何工作,以及如何有效地利用它们。
|
||||
|
||||
## 1. 什么是智能工具?
|
||||
|
||||
智能工具是集成到 Gemini CLI 中的高级 AI 模型,它们能够理解自然语言、分析代码、生成文本和代码,并协助完成复杂的开发任务。它们就像您的智能助手,可以自动化重复性工作,提供洞察,并帮助您做出更好的决策。
|
||||
|
||||
## 2. 核心工作原理
|
||||
|
||||
Gemini CLI 中的智能工具遵循以下核心原则:
|
||||
|
||||
- **上下文感知**: 工具会理解您当前的项目状态、代码内容和开发意图,从而提供更相关的建议和操作。这意味着它们不会“凭空”回答问题,而是基于您的实际工作环境提供帮助。
|
||||
- **模块化**: 智能工具被设计为可互换的后端。您可以根据任务需求选择或组合不同的 LLM。例如,某些模型可能擅长代码生成,而另一些则擅长复杂推理。
|
||||
- **自动化与增强**: 智能工具可以自动化重复或复杂的任务(如生成样板代码、基础重构、测试脚手架),并通过提供智能建议、解释和问题解决协助来增强您的开发能力。
|
||||
- **用户控制与透明**: 您始终对工具的操作拥有最终控制权。工具会清晰地解释其建议的更改,并允许您轻松审查和修改。工具的选择和执行过程也是透明的。
|
||||
|
||||
详情可参考 `../../workflows/intelligent-tools-strategy.md`。
|
||||
|
||||
## 3. 智能工具的应用场景
|
||||
|
||||
智能工具被集成到 CLI 工作流的多个关键点,以提供全面的帮助:
|
||||
|
||||
- **提示增强**: 优化您的输入提示,使智能工具更好地理解您的需求。
|
||||
- **命令**: `enhance-prompt`
|
||||
- **代码分析与审查**: 快速洞察代码,识别潜在问题,并提出改进建议。
|
||||
- **命令**: `analyze`, `chat`, `code-analysis`, `bug-diagnosis`
|
||||
- **规划与任务分解**: 协助将复杂问题分解为可管理的小任务,并生成实施计划。
|
||||
- **命令**: `plan`, `discuss-plan`, `breakdown`
|
||||
- **代码生成与实现**: 根据您的规范生成代码片段、函数、测试甚至整个模块。
|
||||
- **命令**: `execute`, `create`, `codex-execute`
|
||||
- **测试与调试**: 生成测试用例,诊断错误,并建议修复方案。
|
||||
- **命令**: `test-gen`, `test-fix-gen`, `tdd-plan`, `tdd-verify`
|
||||
- **文档生成**: 自动化代码、API 和项目模块的文档创建。
|
||||
- **命令**: `docs`, `skill-memory`, `update-full`, `update-related`
|
||||
- **工作流编排**: 智能选择和协调工具与代理来执行复杂的工作流。
|
||||
- **命令**: `workflow:status`, `resume`, `plan`, `execute` (工作流级别)
|
||||
|
||||
## 4. 如何选择和使用工具
|
||||
|
||||
Gemini CLI 允许您使用 `--tool` 标志来指定用于特定操作的智能工具。这为您提供了灵活性,可以根据任务的性质选择最合适的模型。
|
||||
|
||||
- `--tool codex`: 优先使用 Codex(或兼容的专注于代码的 LLM)。非常适合精确的代码生成、重构和类似 linting 的任务。
|
||||
- **何时使用**: 当您需要生成高质量代码、进行代码审查或修复代码错误时。
|
||||
- `--tool gemini`: 优先使用 Gemini(或兼容的通用 LLM)。擅长复杂的推理、更广泛的分析、规划和自然语言理解任务。
|
||||
- **何时使用**: 当您需要进行高层次的规划、理解复杂概念或进行广泛的代码库分析时。
|
||||
- `--tool qwen`: 优先使用 Qwen(或兼容的特定领域/语言 LLM)。适用于需要专业知识或特定语言支持的任务。
|
||||
- **何时使用**: 当您的项目涉及特定技术栈或需要特定语言的专业知识时。
|
||||
- **(默认/自动)**: 如果未指定工具,CLI 会根据任务上下文和可用配置智能地选择最合适的工具。
|
||||
|
||||
**示例**:
|
||||
|
||||
```bash
|
||||
# 使用 Gemini 进行项目规划
|
||||
gemini plan --tool gemini "设计一个新的微服务架构"
|
||||
|
||||
# 使用 Codex 生成代码
|
||||
gemini execute --tool codex "task-id-for-code-generation"
|
||||
|
||||
# 使用 Qwen 分析特定领域的代码
|
||||
gemini analyze --tool qwen "分析医疗数据处理模块"
|
||||
```
|
||||
|
||||
通过理解这些智能工具及其用法,您可以更有效地利用 Gemini CLI,加速您的开发过程。
|
||||
537
.claude/skills/command-guide/guides/examples.md
Normal file
537
.claude/skills/command-guide/guides/examples.md
Normal file
@@ -0,0 +1,537 @@
|
||||
# Usage Examples
|
||||
|
||||
Comprehensive examples of command-guide skill in action across all 5 operation modes.
|
||||
|
||||
---
|
||||
|
||||
## Mode 1: Command Search 🔍
|
||||
|
||||
### Example 1: Keyword Search
|
||||
|
||||
**User**: "搜索包含 'execute' 的命令"
|
||||
|
||||
**Skill Response**:
|
||||
```
|
||||
找到 4 个相关命令:
|
||||
|
||||
1. **cli:execute** (高级)
|
||||
描述: Auto-execution of implementation tasks with YOLO permissions
|
||||
参数: [--agent] [--tool codex|gemini|qwen] [--enhance] description or task-id
|
||||
场景: implementation
|
||||
|
||||
2. **task:execute** (中级)
|
||||
描述: Execute tasks with appropriate agents and context-aware orchestration
|
||||
参数: task-id
|
||||
场景: implementation
|
||||
|
||||
3. **workflow:execute** (中级)
|
||||
描述: Coordinate agents for existing workflow tasks with automatic discovery
|
||||
参数: [--resume-session="session-id"]
|
||||
场景: implementation
|
||||
|
||||
4. **codex-execute** (高级)
|
||||
描述: Automated task decomposition and execution with Codex
|
||||
参数: task description or task-id
|
||||
场景: implementation
|
||||
|
||||
💡 相关命令: workflow:plan, task:create
|
||||
📖 详细文档: [Implementation Commands](workflow-patterns.md#implementation)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Example 2: Category Search
|
||||
|
||||
**User**: "cli 类别下有哪些命令?"
|
||||
|
||||
**Skill Response**:
|
||||
```
|
||||
CLI 类别包含 9 个命令:
|
||||
|
||||
**核心命令** (6个):
|
||||
- cli:analyze - Quick codebase analysis
|
||||
- cli:chat - Direct codebase interaction
|
||||
- cli:execute - Auto-execution with YOLO
|
||||
- cli:cli-init - Initialize CLI tool configs
|
||||
- cli:codex-execute - Codex-powered execution
|
||||
- cli:discuss-plan - Multi-model planning discussion
|
||||
|
||||
**模式命令** (3个):
|
||||
- cli:mode:plan - Project planning mode
|
||||
- cli:mode:code-analysis - Deep code analysis mode
|
||||
- cli:mode:bug-diagnosis - Bug diagnosis mode
|
||||
|
||||
📚 使用指南: [CLI Tools Guide](cli-tools-guide.md)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Example 3: Use-Case Search
|
||||
|
||||
**User**: "planning 相关的命令有哪些?"
|
||||
|
||||
**Skill Response**:
|
||||
```
|
||||
Planning 场景包含 8 个命令:
|
||||
|
||||
**核心规划**:
|
||||
1. workflow:plan (高级) - 5阶段规划工作流
|
||||
2. cli:mode:plan (高级) - 项目规划和架构分析
|
||||
3. workflow:tdd-plan (高级) - TDD 规划工作流
|
||||
|
||||
**任务分解**:
|
||||
4. task:breakdown (中级) - 智能任务分解
|
||||
5. workflow:tools:task-generate (中级) - 生成任务 JSON
|
||||
|
||||
**架构设计**:
|
||||
6. workflow:brainstorm:system-architect (中级) - 系统架构师头脑风暴
|
||||
7. workflow:brainstorm:api-designer (中级) - API 设计师头脑风暴
|
||||
|
||||
**评估验证**:
|
||||
8. workflow:action-plan-verify (中级) - 规划质量验证
|
||||
|
||||
💡 常见工作流: Plan → Verify → Execute
|
||||
📖 模式参考: [Workflow Patterns](workflow-patterns.md#planning-workflow)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Mode 2: Smart Recommendations 🤖
|
||||
|
||||
### Example 1: After Planning
|
||||
|
||||
**User**: "执行完 /workflow:plan 后下一步做什么?"
|
||||
|
||||
**Skill Response**:
|
||||
```
|
||||
推荐的后续步骤:
|
||||
|
||||
**🎯 主要选择**:
|
||||
1. **/workflow:execute** - 开始执行规划的任务
|
||||
✅ 这是最常见的下一步
|
||||
作用: 实际执行 workflow:plan 生成的任务
|
||||
|
||||
**📋 可选步骤**:
|
||||
2. **/workflow:action-plan-verify** - 验证规划质量
|
||||
作用: 在执行前检查规划的一致性和完整性
|
||||
建议: 重要项目建议先验证
|
||||
|
||||
3. **/workflow:status** - 查看规划状态
|
||||
作用: 查看生成的任务和当前进度
|
||||
|
||||
**📚 完整工作流模式**:
|
||||
Plan → Verify (可选) → Execute → Review
|
||||
|
||||
详见: [Planning Workflow Pattern](workflow-patterns.md#planning-execution)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Example 2: After Execution
|
||||
|
||||
**User**: "workflow:execute 执行完成后,推荐做什么?"
|
||||
|
||||
**Skill Response**:
|
||||
```
|
||||
推荐的后续步骤:
|
||||
|
||||
**🎯 主要选择**:
|
||||
1. **/workflow:review** - 审查实现结果
|
||||
✅ 检查代码质量、安全性、架构
|
||||
参数: [--type=quality|security|architecture]
|
||||
|
||||
**📊 可选步骤**:
|
||||
2. **/workflow:status** - 查看执行状态
|
||||
作用: 确认所有任务都已完成
|
||||
|
||||
3. **/workflow:test-gen** - 生成测试
|
||||
作用: 为实现的功能创建测试用例
|
||||
|
||||
4. **/workflow:session:complete** - 完成会话
|
||||
作用: 标记工作流已完成,归档经验
|
||||
|
||||
**🔄 如果需要修改**:
|
||||
- /task:replan - 重新规划某个任务
|
||||
- /workflow:resume - 恢复工作流
|
||||
|
||||
详见: [Execution Review Pattern](workflow-patterns.md#execution-review)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Mode 3: Full Documentation 📖
|
||||
|
||||
### Example 1: Command Parameters
|
||||
|
||||
**User**: "/workflow:plan 的参数是什么?"
|
||||
|
||||
**Skill Response**:
|
||||
```
|
||||
# workflow:plan
|
||||
|
||||
**描述**: Orchestrate 5-phase planning workflow with quality gate, executing commands and passing context between phases
|
||||
|
||||
**参数**:
|
||||
```bash
|
||||
/workflow:plan [--agent] [--cli-execute] "text description"|file.md
|
||||
```
|
||||
|
||||
**参数说明**:
|
||||
- `--agent` (可选): 使用 agent 模式执行规划
|
||||
- `--cli-execute` (可选): 允许在规划阶段执行 CLI 命令
|
||||
- `"text description"`: 任务描述文本
|
||||
- `file.md`: 或者提供任务描述文件路径
|
||||
|
||||
**使用场景**: planning
|
||||
**难度级别**: 高级
|
||||
|
||||
**使用示例**:
|
||||
```bash
|
||||
# 基本用法
|
||||
/workflow:plan "实现用户认证功能"
|
||||
|
||||
# 使用 agent 模式
|
||||
/workflow:plan --agent "重构支付模块"
|
||||
|
||||
# 从文件读取
|
||||
/workflow:plan --agent feature-spec.md
|
||||
|
||||
# 允许 CLI 执行
|
||||
/workflow:plan --cli-execute "添加搜索功能"
|
||||
```
|
||||
|
||||
**执行流程**:
|
||||
1. 上下文收集
|
||||
2. 概念规划
|
||||
3. 实现规划
|
||||
4. 任务生成
|
||||
5. 质量验证
|
||||
|
||||
**相关命令**:
|
||||
- workflow:execute - 执行规划的任务
|
||||
- workflow:action-plan-verify - 验证规划质量
|
||||
- workflow:status - 查看规划状态
|
||||
|
||||
**详细文档**: ../../commands/workflow/plan.md
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Mode 4: Beginner Onboarding 🎓
|
||||
|
||||
### Example 1: Complete Beginner
|
||||
|
||||
**User**: "我是新手,如何开始使用工作流系统?"
|
||||
|
||||
**Skill Response**:
|
||||
```
|
||||
欢迎使用 Claude DMS3 工作流系统!🎉
|
||||
|
||||
## 🚀 快速开始(3 步)
|
||||
|
||||
### Step 1: 了解核心命令(Top 5)
|
||||
|
||||
1. **/workflow:plan** - 规划一个功能或任务
|
||||
用法: /workflow:plan "你想做的事情"
|
||||
|
||||
2. **/workflow:execute** - 执行规划的任务
|
||||
用法: /workflow:execute
|
||||
|
||||
3. **/cli:execute** - 快速自动执行
|
||||
用法: /cli:execute "实现XXX功能"
|
||||
|
||||
4. **/task:create** - 创建单个任务
|
||||
用法: /task:create "任务标题"
|
||||
|
||||
5. **/enhance-prompt** - 优化你的提示词
|
||||
用法: /enhance-prompt "你的想法"
|
||||
|
||||
### Step 2: 尝试第一个工作流
|
||||
|
||||
```bash
|
||||
# 1. 规划一个简单功能
|
||||
/workflow:plan "添加用户登录功能"
|
||||
|
||||
# 2. 执行规划
|
||||
/workflow:execute
|
||||
|
||||
# 3. 审查结果
|
||||
/workflow:review
|
||||
```
|
||||
|
||||
### Step 3: 学习资源
|
||||
|
||||
📖 **必读指南**:
|
||||
- [5分钟快速开始](getting-started.md)
|
||||
- [常见工作流模式](workflow-patterns.md)
|
||||
|
||||
🛠️ **工具指南**:
|
||||
- [CLI 工具使用](cli-tools-guide.md)
|
||||
- [问题排查](troubleshooting.md)
|
||||
|
||||
💡 **下一步建议**:
|
||||
1. 阅读 getting-started.md(5分钟)
|
||||
2. 尝试上面的第一个工作流
|
||||
3. 探索更多命令: 询问 "常用命令有哪些"
|
||||
|
||||
有问题随时问 "CCW-help"!
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Example 2: Intermediate User
|
||||
|
||||
**User**: "常用命令有哪些?"
|
||||
|
||||
**Skill Response**:
|
||||
```
|
||||
## 核心命令列表(Top 14)
|
||||
|
||||
### 🎯 工作流管理 (5个)
|
||||
1. workflow:plan - 5阶段规划
|
||||
2. workflow:execute - 执行任务
|
||||
3. workflow:review - 审查实现
|
||||
4. workflow:tdd-plan - TDD 规划
|
||||
5. workflow:test-gen - 生成测试
|
||||
|
||||
### 🛠️ CLI 工具 (3个)
|
||||
6. cli:execute - 自动执行
|
||||
7. cli:mode:plan - 规划模式
|
||||
8. cli:analyze - 代码分析
|
||||
|
||||
### 📋 任务管理 (3个)
|
||||
9. task:create - 创建任务
|
||||
10. task:execute - 执行任务
|
||||
11. task:breakdown - 分解任务
|
||||
|
||||
### 🔧 实用工具 (2个)
|
||||
12. enhance-prompt - 提示词增强
|
||||
13. version - 版本信息
|
||||
|
||||
### 💡 使用频率
|
||||
- **每天**: workflow:plan, workflow:execute, cli:execute
|
||||
- **经常**: task:create, enhance-prompt
|
||||
- **按需**: workflow:review, test-gen, tdd-plan
|
||||
|
||||
📚 详细文档: [Index Structure](index-structure.md#essential-commands)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Mode 5: Issue Reporting 📝
|
||||
|
||||
### Example 1: Bug Report
|
||||
|
||||
**User**: "CCW-issue"
|
||||
|
||||
**Skill (Interactive)**:
|
||||
```
|
||||
请选择问题类型:
|
||||
1. 🐛 Bug 报告
|
||||
2. ✨ 功能请求
|
||||
3. ❓ 问题咨询
|
||||
```
|
||||
|
||||
**User**: "1"
|
||||
|
||||
**Skill**:
|
||||
```
|
||||
好的,我将帮您创建 Bug 报告。请回答以下问题:
|
||||
|
||||
1. 简要描述问题:
|
||||
```
|
||||
|
||||
**User**: "/workflow:plan 执行后没有生成任务文件"
|
||||
|
||||
**Skill**:
|
||||
```
|
||||
2. 您执行的完整命令是什么?
|
||||
```
|
||||
|
||||
**User**: "/workflow:plan '添加登录功能'"
|
||||
|
||||
**Skill**:
|
||||
```
|
||||
3. 期望的结果是什么?
|
||||
```
|
||||
|
||||
**User**: "应该在 .workflow/ 目录生成 task.json"
|
||||
|
||||
**Skill**:
|
||||
```
|
||||
4. 实际发生了什么?
|
||||
```
|
||||
|
||||
**User**: "命令执行了但没有生成文件"
|
||||
|
||||
**Skill**:
|
||||
```
|
||||
✅ Bug 报告已生成!
|
||||
|
||||
文件路径: templates/.generated/bug-2025-01-06-123456.md
|
||||
|
||||
--- 报告内容 ---
|
||||
# Bug 报告
|
||||
|
||||
## 问题描述
|
||||
/workflow:plan 执行后没有生成任务文件
|
||||
|
||||
## 执行的命令
|
||||
```bash
|
||||
/workflow:plan '添加登录功能'
|
||||
```
|
||||
|
||||
## 期望行为
|
||||
应该在 .workflow/ 目录生成 task.json
|
||||
|
||||
## 实际行为
|
||||
命令执行了但没有生成文件
|
||||
|
||||
## 环境信息
|
||||
- 操作系统: Windows
|
||||
- 报告日期: 2025-01-06
|
||||
- 相关命令: /workflow:plan
|
||||
|
||||
---
|
||||
|
||||
**下一步操作**:
|
||||
1. 复制以上内容到 GitHub Issues
|
||||
2. 或使用: gh issue create -F templates/.generated/bug-2025-01-06-123456.md
|
||||
|
||||
需要更多帮助?使用 "CCW-help"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Example 2: Feature Request
|
||||
|
||||
**User**: "我想提个功能建议"
|
||||
|
||||
**Skill (Interactive)**:
|
||||
```
|
||||
请选择问题类型:
|
||||
1. 🐛 Bug 报告
|
||||
2. ✨ 功能请求
|
||||
3. ❓ 问题咨询
|
||||
```
|
||||
|
||||
**User**: "2"
|
||||
|
||||
**Skill**:
|
||||
```
|
||||
好的,功能请求。请描述:
|
||||
|
||||
1. 您希望添加什么功能?
|
||||
```
|
||||
|
||||
**User**: "希望 /workflow:plan 能自动估算任务时间"
|
||||
|
||||
**Skill**:
|
||||
```
|
||||
2. 这个功能解决什么问题?
|
||||
```
|
||||
|
||||
**User**: "帮助更好地规划项目进度和资源分配"
|
||||
|
||||
**Skill**:
|
||||
```
|
||||
3. 具体的使用场景是什么?(可选)
|
||||
```
|
||||
|
||||
**User**: "规划大型项目时,能看到预计完成时间"
|
||||
|
||||
**Skill**:
|
||||
```
|
||||
✅ 功能请求已生成!
|
||||
|
||||
文件路径: templates/.generated/feature-2025-01-06-123457.md
|
||||
|
||||
--- 内容预览 ---
|
||||
# 功能请求
|
||||
|
||||
## 功能概述
|
||||
希望 /workflow:plan 能自动估算任务时间
|
||||
|
||||
## 问题背景
|
||||
帮助更好地规划项目进度和资源分配
|
||||
|
||||
## 使用场景
|
||||
规划大型项目时,能看到预计完成时间
|
||||
|
||||
## 优先级
|
||||
- [ ] 高 - 严重影响工作效率
|
||||
- [x] 中 - 有明显改善但有变通方案
|
||||
- [ ] 低 - 锦上添花
|
||||
|
||||
---
|
||||
|
||||
可以复制到 GitHub 提交,或使用:
|
||||
gh issue create -F templates/.generated/feature-2025-01-06-123457.md
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Edge Cases & Error Handling
|
||||
|
||||
### Case 1: No Results Found
|
||||
|
||||
**User**: "搜索 xyz 命令"
|
||||
|
||||
**Skill**:
|
||||
```
|
||||
❌ 未找到包含 "xyz" 的命令
|
||||
|
||||
💡 建议:
|
||||
1. 尝试更广泛的关键词(如 "plan", "execute", "test")
|
||||
2. 按类别浏览:workflow, cli, memory, task
|
||||
3. 查看所有常用命令:询问 "常用命令"
|
||||
4. 需要帮助:使用 "CCW-help"
|
||||
|
||||
📚 快速参考:[All Commands Index](index-structure.md#all-commands)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Case 2: Ambiguous Query
|
||||
|
||||
**User**: "命令"
|
||||
|
||||
**Skill**:
|
||||
```
|
||||
您想了解什么?请选择:
|
||||
|
||||
1. 🔍 搜索特定命令
|
||||
2. 🤖 获取命令推荐
|
||||
3. 📖 查看命令文档
|
||||
4. 🎓 新手入门指导
|
||||
5. 📝 报告问题或建议
|
||||
|
||||
或者直接说出具体需求,例如:
|
||||
- "搜索 planning 命令"
|
||||
- "执行完 /workflow:plan 下一步做什么"
|
||||
- "/task:create 怎么用"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Case 3: Multiple Matches
|
||||
|
||||
**User**: "execute 命令"
|
||||
|
||||
**Skill**:
|
||||
```
|
||||
找到多个相关命令,请选择您需要的:
|
||||
|
||||
1. **cli:execute** - CLI 自动执行(推荐新手)
|
||||
2. **task:execute** - 执行单个任务
|
||||
3. **workflow:execute** - 执行整个工作流
|
||||
|
||||
或者询问:
|
||||
- "cli:execute 的详细文档"
|
||||
- "三者有什么区别"
|
||||
- "我该用哪个"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**Last Updated**: 2025-01-06
|
||||
95
.claude/skills/command-guide/guides/getting-started.md
Normal file
95
.claude/skills/command-guide/guides/getting-started.md
Normal file
@@ -0,0 +1,95 @@
|
||||
# 5分钟快速上手指南
|
||||
|
||||
欢迎来到 Gemini CLI!本指南将帮助您快速了解核心命令,并通过一个简单的工作流示例,让您在5分钟内开始使用。
|
||||
|
||||
## 1. Gemini CLI 简介
|
||||
|
||||
Gemini CLI 是一个强大的命令行工具,旨在通过智能代理和自动化工作流,提升您的开发效率。它能够帮助您进行代码分析、任务规划、代码生成、测试以及文档编写等。
|
||||
|
||||
## 2. 核心命令速览
|
||||
|
||||
以下是一些您将频繁使用的核心命令:
|
||||
|
||||
### `version` - 查看版本信息
|
||||
- **用途**: 检查当前 CLI 版本并获取更新信息。
|
||||
- **示例**:
|
||||
```bash
|
||||
gemini version
|
||||
```
|
||||
|
||||
### `enhance-prompt` - 智能提示增强
|
||||
- **用途**: 根据当前会话记忆和代码库分析,智能地优化您的输入提示,让代理更好地理解您的意图。
|
||||
- **示例**:
|
||||
```bash
|
||||
gemini enhance-prompt "如何修复这个bug?"
|
||||
```
|
||||
|
||||
### `analyze` - 快速代码分析
|
||||
- **用途**: 使用 CLI 工具(如 Codex, Gemini, Qwen)对代码库进行快速分析,获取洞察。
|
||||
- **示例**:
|
||||
```bash
|
||||
gemini analyze "分析 src/main.py 中的性能瓶颈"
|
||||
```
|
||||
|
||||
### `chat` - 交互式对话
|
||||
- **用途**: 与 CLI 进行简单的交互式对话,直接进行代码分析或提问。
|
||||
- **示例**:
|
||||
```bash
|
||||
gemini chat "解释一下 UserService.java 的主要功能"
|
||||
```
|
||||
|
||||
### `plan` - 项目规划与架构分析
|
||||
- **用途**: 启动项目规划和架构分析工作流,帮助您将复杂问题分解为可执行的任务。
|
||||
- **示例**:
|
||||
```bash
|
||||
gemini plan "实现用户认证模块"
|
||||
```
|
||||
|
||||
### `create` - 创建实现任务
|
||||
- **用途**: 根据上下文创建具体的实现任务。
|
||||
- **示例**:
|
||||
```bash
|
||||
gemini create "编写用户注册接口"
|
||||
```
|
||||
|
||||
### `execute` - 自动执行任务
|
||||
- **用途**: 自动执行实现任务,智能地推断上下文并协调代理完成工作。
|
||||
- **示例**:
|
||||
```bash
|
||||
gemini execute "task-id-123"
|
||||
```
|
||||
|
||||
## 3. 第一个工作流示例:规划与执行一个简单任务
|
||||
|
||||
让我们通过一个简单的例子来体验 Gemini CLI 的工作流:**规划并实现一个“Hello World”函数**。
|
||||
|
||||
1. **规划任务**:
|
||||
首先,我们使用 `plan` 命令来规划我们的“Hello World”功能。
|
||||
```bash
|
||||
gemini plan "实现一个打印 'Hello World!' 的 Python 函数"
|
||||
```
|
||||
CLI 将会启动一个规划工作流,可能会询问您一些问题,并最终生成一个或多个任务。
|
||||
|
||||
2. **创建具体任务**:
|
||||
假设 `plan` 命令为您生成了一个任务 ID,或者您想手动创建一个任务。
|
||||
```bash
|
||||
gemini create "编写 Python 函数 `say_hello` 打印 'Hello World!'"
|
||||
```
|
||||
这个命令会创建一个新的任务,并返回一个任务 ID。
|
||||
|
||||
3. **执行任务**:
|
||||
现在,我们使用 `execute` 命令来让 CLI 自动完成这个任务。请将 `your-task-id` 替换为上一步中获得的实际任务 ID。
|
||||
```bash
|
||||
gemini execute "your-task-id"
|
||||
```
|
||||
CLI 将会调用智能代理,根据任务描述生成代码,并尝试将其写入文件。
|
||||
|
||||
通过这三个简单的步骤,您就完成了一个从规划到执行的完整工作流。
|
||||
|
||||
## 4. 接下来做什么?
|
||||
|
||||
- 探索更多命令:使用 `gemini help` 查看所有可用命令。
|
||||
- 查阅其他指南:深入了解工作流模式、CLI 工具使用和故障排除。
|
||||
- 尝试更复杂的任务:挑战自己,使用 Gemini CLI 解决实际项目中的问题。
|
||||
|
||||
祝您使用愉快!
|
||||
526
.claude/skills/command-guide/guides/implementation-details.md
Normal file
526
.claude/skills/command-guide/guides/implementation-details.md
Normal file
@@ -0,0 +1,526 @@
|
||||
# Implementation Details
|
||||
|
||||
Detailed implementation logic for command-guide skill operation modes.
|
||||
|
||||
## Architecture Overview
|
||||
|
||||
```
|
||||
User Query
|
||||
↓
|
||||
Intent Recognition
|
||||
↓
|
||||
Mode Selection (1 of 5)
|
||||
↓
|
||||
Index/File Query
|
||||
↓
|
||||
Response Formation
|
||||
↓
|
||||
User Output + Recommendations
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Intent Recognition
|
||||
|
||||
### Step 1: Parse User Input
|
||||
|
||||
Analyze query for trigger keywords and patterns:
|
||||
|
||||
```javascript
|
||||
function recognizeIntent(userQuery) {
|
||||
const query = userQuery.toLowerCase();
|
||||
|
||||
// Mode 5: Issue Reporting (highest priority)
|
||||
if (query.includes('ccw-issue') || query.includes('ccw-help') ||
|
||||
query.match(/报告.*bug/) || query.includes('功能建议')) {
|
||||
return 'ISSUE_REPORTING';
|
||||
}
|
||||
|
||||
// Mode 1: Command Search
|
||||
if (query.includes('搜索') || query.includes('find') ||
|
||||
query.includes('search') || query.match(/.*相关.*命令/)) {
|
||||
return 'COMMAND_SEARCH';
|
||||
}
|
||||
|
||||
// Mode 2: Recommendations
|
||||
if (query.includes('下一步') || query.includes("what's next") ||
|
||||
query.includes('推荐') || query.match(/after.*\/\w+:\w+/)) {
|
||||
return 'RECOMMENDATIONS';
|
||||
}
|
||||
|
||||
// Mode 3: Documentation
|
||||
if (query.includes('参数') || query.includes('怎么用') ||
|
||||
query.includes('如何使用') || query.match(/\/\w+:\w+.*详情/)) {
|
||||
return 'DOCUMENTATION';
|
||||
}
|
||||
|
||||
// Mode 4: Onboarding
|
||||
if (query.includes('新手') || query.includes('入门') ||
|
||||
query.includes('getting started') || query.includes('常用命令')) {
|
||||
return 'ONBOARDING';
|
||||
}
|
||||
|
||||
// Default: Ask for clarification
|
||||
return 'CLARIFY';
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Mode 1: Command Search 🔍
|
||||
|
||||
### Trigger Analysis
|
||||
|
||||
**Keywords**: 搜索, find, search, [topic] 相关命令
|
||||
|
||||
**Examples**:
|
||||
- "搜索 planning 命令"
|
||||
- "find commands for testing"
|
||||
- "实现相关的命令有哪些"
|
||||
|
||||
### Processing Flow
|
||||
|
||||
```
|
||||
1. Extract Search Parameters
|
||||
↓
|
||||
2. Determine Search Type
|
||||
├─ Keyword Search (in name/description)
|
||||
├─ Category Search (workflow/cli/memory/task)
|
||||
└─ Use-Case Search (planning/implementation/testing)
|
||||
↓
|
||||
3. Query Appropriate Index
|
||||
├─ Keyword → all-commands.json
|
||||
├─ Category → by-category.json
|
||||
└─ Use-Case → by-use-case.json
|
||||
↓
|
||||
4. Filter and Rank Results
|
||||
↓
|
||||
5. Format Response
|
||||
├─ List matching commands
|
||||
├─ Show key metadata (name, description, args)
|
||||
└─ Suggest related commands
|
||||
```
|
||||
|
||||
### Implementation
|
||||
|
||||
```javascript
|
||||
async function searchCommands(query, searchType) {
|
||||
let results = [];
|
||||
|
||||
switch (searchType) {
|
||||
case 'keyword':
|
||||
// Load all-commands.json
|
||||
const allCommands = await readIndex('all-commands.json');
|
||||
results = allCommands.filter(cmd =>
|
||||
cmd.name.toLowerCase().includes(query.toLowerCase()) ||
|
||||
cmd.description.toLowerCase().includes(query.toLowerCase())
|
||||
);
|
||||
break;
|
||||
|
||||
case 'category':
|
||||
// Load by-category.json
|
||||
const byCategory = await readIndex('by-category.json');
|
||||
const category = extractCategory(query); // e.g., "workflow"
|
||||
results = flattenCategory(byCategory[category]);
|
||||
break;
|
||||
|
||||
case 'use-case':
|
||||
// Load by-use-case.json
|
||||
const byUseCase = await readIndex('by-use-case.json');
|
||||
const useCase = extractUseCase(query); // e.g., "planning"
|
||||
results = byUseCase[useCase] || [];
|
||||
break;
|
||||
}
|
||||
|
||||
// Rank by relevance
|
||||
results = rankResults(results, query);
|
||||
|
||||
// Add related commands
|
||||
results = await enrichWithRelated(results);
|
||||
|
||||
return results;
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Mode 2: Smart Recommendations 🤖
|
||||
|
||||
### Trigger Analysis
|
||||
|
||||
**Keywords**: 下一步, what's next, 推荐, after [command]
|
||||
|
||||
**Examples**:
|
||||
- "执行完 /workflow:plan 后做什么?"
|
||||
- "What's next after planning?"
|
||||
- "推荐下一个命令"
|
||||
|
||||
### Processing Flow
|
||||
|
||||
```
|
||||
1. Extract Context
|
||||
├─ Current/Last Command
|
||||
├─ Workflow State
|
||||
└─ User's Current Task
|
||||
↓
|
||||
2. Query Relationships
|
||||
└─ Load command-relationships.json
|
||||
↓
|
||||
3. Find Next Steps
|
||||
├─ Check next_steps array
|
||||
├─ Consider prerequisites
|
||||
└─ Check related_commands
|
||||
↓
|
||||
4. Generate Recommendations
|
||||
├─ Primary recommendation (most common next step)
|
||||
├─ Alternative options
|
||||
└─ Rationale for each
|
||||
↓
|
||||
5. Add Workflow Context
|
||||
└─ Link to workflow-patterns.md
|
||||
```
|
||||
|
||||
### Implementation
|
||||
|
||||
```javascript
|
||||
async function getRecommendations(currentCommand) {
|
||||
// Load relationships
|
||||
const relationships = await readIndex('command-relationships.json');
|
||||
|
||||
// Get relationship data
|
||||
const cmdData = relationships[currentCommand];
|
||||
|
||||
if (!cmdData) {
|
||||
return defaultRecommendations();
|
||||
}
|
||||
|
||||
// Primary next steps
|
||||
const nextSteps = cmdData.next_steps || [];
|
||||
|
||||
// Alternative related commands
|
||||
const alternatives = cmdData.related_commands || [];
|
||||
|
||||
// Build recommendations
|
||||
const recommendations = {
|
||||
primary: await enrichCommand(nextSteps[0]),
|
||||
alternatives: await enrichCommands(alternatives),
|
||||
workflow_pattern: findWorkflowPattern(currentCommand),
|
||||
rationale: generateRationale(currentCommand, nextSteps[0])
|
||||
};
|
||||
|
||||
return recommendations;
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Mode 3: Full Documentation 📖
|
||||
|
||||
### Trigger Analysis
|
||||
|
||||
**Keywords**: 参数, 怎么用, 如何使用, [command] 详情
|
||||
|
||||
**Examples**:
|
||||
- "/workflow:plan 的参数是什么?"
|
||||
- "如何使用 /cli:execute?"
|
||||
- "task:create 详细文档"
|
||||
|
||||
### Processing Flow
|
||||
|
||||
```
|
||||
1. Extract Command Name
|
||||
└─ Parse /workflow:plan or workflow:plan
|
||||
↓
|
||||
2. Locate in Index
|
||||
└─ Search all-commands.json
|
||||
↓
|
||||
3. Read Full Command File
|
||||
└─ Use file_path from index
|
||||
↓
|
||||
4. Extract Documentation
|
||||
├─ Parameters section
|
||||
├─ Arguments specification
|
||||
├─ Examples section
|
||||
└─ Best practices
|
||||
↓
|
||||
5. Format Response
|
||||
├─ Command overview
|
||||
├─ Full parameter list
|
||||
├─ Usage examples
|
||||
└─ Related commands
|
||||
```
|
||||
|
||||
### Implementation
|
||||
|
||||
```javascript
|
||||
async function getDocumentation(commandName) {
|
||||
// Normalize command name
|
||||
const normalized = normalizeCommandName(commandName);
|
||||
|
||||
// Find in index
|
||||
const allCommands = await readIndex('all-commands.json');
|
||||
const command = allCommands.find(cmd => cmd.name === normalized);
|
||||
|
||||
if (!command) {
|
||||
return { error: 'Command not found' };
|
||||
}
|
||||
|
||||
// Read full command file
|
||||
const commandFilePath = path.join(
|
||||
'../commands',
|
||||
command.file_path
|
||||
);
|
||||
const fullDoc = await readCommandFile(commandFilePath);
|
||||
|
||||
// Parse sections
|
||||
const documentation = {
|
||||
name: command.name,
|
||||
description: command.description,
|
||||
arguments: command.arguments,
|
||||
difficulty: command.difficulty,
|
||||
usage_scenario: command.usage_scenario,
|
||||
parameters: extractSection(fullDoc, '## Parameters'),
|
||||
examples: extractSection(fullDoc, '## Examples'),
|
||||
best_practices: extractSection(fullDoc, '## Best Practices'),
|
||||
related: await getRelatedCommands(command.name)
|
||||
};
|
||||
|
||||
return documentation;
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Mode 4: Beginner Onboarding 🎓
|
||||
|
||||
### Trigger Analysis
|
||||
|
||||
**Keywords**: 新手, 入门, getting started, 常用命令, 如何开始
|
||||
|
||||
**Examples**:
|
||||
- "我是新手,如何开始?"
|
||||
- "getting started with workflows"
|
||||
- "最常用的命令有哪些?"
|
||||
|
||||
### Processing Flow
|
||||
|
||||
```
|
||||
1. Assess User Level
|
||||
└─ Identify as beginner
|
||||
↓
|
||||
2. Load Essential Commands
|
||||
└─ Read essential-commands.json
|
||||
↓
|
||||
3. Build Learning Path
|
||||
├─ Step 1: Core commands (Top 5)
|
||||
├─ Step 2: Basic workflow
|
||||
├─ Step 3: Intermediate commands
|
||||
└─ Step 4: Advanced features
|
||||
↓
|
||||
4. Provide Resources
|
||||
├─ Link to getting-started.md
|
||||
├─ Link to workflow-patterns.md
|
||||
└─ Suggest first task
|
||||
↓
|
||||
5. Interactive Guidance
|
||||
└─ Offer to walk through first workflow
|
||||
```
|
||||
|
||||
### Implementation
|
||||
|
||||
```javascript
|
||||
async function onboardBeginner() {
|
||||
// Load essential commands
|
||||
const essentialCommands = await readIndex('essential-commands.json');
|
||||
|
||||
// Group by difficulty
|
||||
const beginner = essentialCommands.filter(cmd =>
|
||||
cmd.difficulty === 'Beginner' || cmd.difficulty === 'Intermediate'
|
||||
);
|
||||
|
||||
// Create learning path
|
||||
const learningPath = {
|
||||
step1: {
|
||||
title: 'Core Commands (Start Here)',
|
||||
commands: beginner.slice(0, 5),
|
||||
guide: 'guides/getting-started.md'
|
||||
},
|
||||
step2: {
|
||||
title: 'Your First Workflow',
|
||||
pattern: 'Plan → Execute',
|
||||
commands: ['workflow:plan', 'workflow:execute'],
|
||||
guide: 'guides/workflow-patterns.md#basic-workflow'
|
||||
},
|
||||
step3: {
|
||||
title: 'Intermediate Skills',
|
||||
commands: beginner.slice(5, 10),
|
||||
guide: 'guides/workflow-patterns.md#common-patterns'
|
||||
}
|
||||
};
|
||||
|
||||
// Resources
|
||||
const resources = {
|
||||
getting_started: 'guides/getting-started.md',
|
||||
workflow_patterns: 'guides/workflow-patterns.md',
|
||||
cli_tools: 'guides/cli-tools-guide.md',
|
||||
troubleshooting: 'guides/troubleshooting.md'
|
||||
};
|
||||
|
||||
return {
|
||||
learning_path: learningPath,
|
||||
resources: resources,
|
||||
first_task: 'Try: /workflow:plan "create a simple feature"'
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Mode 5: Issue Reporting 📝
|
||||
|
||||
### Trigger Analysis
|
||||
|
||||
**Keywords**: CCW-issue, CCW-help, 报告 bug, 功能建议, 问题咨询
|
||||
|
||||
**Examples**:
|
||||
- "CCW-issue"
|
||||
- "我要报告一个 bug"
|
||||
- "CCW-help 有问题"
|
||||
- "想提个功能建议"
|
||||
|
||||
### Processing Flow
|
||||
|
||||
```
|
||||
1. Detect Issue Type
|
||||
└─ Use AskUserQuestion if unclear
|
||||
↓
|
||||
2. Select Template
|
||||
├─ Bug → templates/issue-bug.md
|
||||
├─ Feature → templates/issue-feature.md
|
||||
└─ Question → templates/issue-question.md
|
||||
↓
|
||||
3. Collect Information
|
||||
└─ Interactive Q&A
|
||||
├─ Problem description
|
||||
├─ Steps to reproduce (bug)
|
||||
├─ Expected vs actual (bug)
|
||||
├─ Use case (feature)
|
||||
└─ Context
|
||||
↓
|
||||
4. Generate Filled Template
|
||||
└─ Populate template with collected data
|
||||
↓
|
||||
5. Save or Display
|
||||
├─ Save to templates/.generated/
|
||||
└─ Display for user to copy
|
||||
```
|
||||
|
||||
### Implementation
|
||||
|
||||
```javascript
|
||||
async function reportIssue(issueType) {
|
||||
// Determine type (bug/feature/question)
|
||||
if (!issueType) {
|
||||
issueType = await askUserQuestion({
|
||||
question: 'What type of issue would you like to report?',
|
||||
options: ['Bug Report', 'Feature Request', 'Question']
|
||||
});
|
||||
}
|
||||
|
||||
// Select template
|
||||
const templatePath = {
|
||||
'bug': 'templates/issue-bug.md',
|
||||
'feature': 'templates/issue-feature.md',
|
||||
'question': 'templates/issue-question.md'
|
||||
}[issueType.toLowerCase()];
|
||||
|
||||
const template = await readTemplate(templatePath);
|
||||
|
||||
// Collect information
|
||||
const info = await collectIssueInfo(issueType);
|
||||
|
||||
// Fill template
|
||||
const filledTemplate = fillTemplate(template, {
|
||||
...info,
|
||||
timestamp: new Date().toISOString(),
|
||||
auto_context: gatherAutoContext()
|
||||
});
|
||||
|
||||
// Save
|
||||
const outputPath = `templates/.generated/${issueType}-${Date.now()}.md`;
|
||||
await writeFile(outputPath, filledTemplate);
|
||||
|
||||
return {
|
||||
template: filledTemplate,
|
||||
file_path: outputPath,
|
||||
instructions: 'Copy content to GitHub Issues or use: gh issue create -F ' + outputPath
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Error Handling
|
||||
|
||||
### Not Found
|
||||
```javascript
|
||||
if (results.length === 0) {
|
||||
return {
|
||||
message: 'No commands found matching your query.',
|
||||
suggestions: [
|
||||
'Try broader keywords',
|
||||
'Browse by category: workflow, cli, memory, task',
|
||||
'View all commands: essential-commands.json',
|
||||
'Need help? Ask: "CCW-help"'
|
||||
]
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
### Ambiguous Intent
|
||||
```javascript
|
||||
if (intent === 'CLARIFY') {
|
||||
return await askUserQuestion({
|
||||
question: 'What would you like to do?',
|
||||
options: [
|
||||
'Search for commands',
|
||||
'Get recommendations for next steps',
|
||||
'View command documentation',
|
||||
'Learn how to get started',
|
||||
'Report an issue or get help'
|
||||
]
|
||||
});
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Optimization Strategies
|
||||
|
||||
### Caching
|
||||
```javascript
|
||||
// Cache indexes in memory after first load
|
||||
const indexCache = new Map();
|
||||
|
||||
async function readIndex(filename) {
|
||||
if (indexCache.has(filename)) {
|
||||
return indexCache.get(filename);
|
||||
}
|
||||
|
||||
const data = await readFile(`index/${filename}`);
|
||||
const parsed = JSON.parse(data);
|
||||
indexCache.set(filename, parsed);
|
||||
return parsed;
|
||||
}
|
||||
```
|
||||
|
||||
### Lazy Loading
|
||||
```javascript
|
||||
// Only load full command files when needed
|
||||
// Use index metadata for most queries
|
||||
// Read command file only for Mode 3 (Documentation)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**Last Updated**: 2025-01-06
|
||||
326
.claude/skills/command-guide/guides/index-structure.md
Normal file
326
.claude/skills/command-guide/guides/index-structure.md
Normal file
@@ -0,0 +1,326 @@
|
||||
# Index Structure Reference
|
||||
|
||||
Complete documentation for command index files and their data structures.
|
||||
|
||||
## Overview
|
||||
|
||||
The command-guide skill uses 5 JSON index files to organize and query 69 commands across the Claude DMS3 workflow system.
|
||||
|
||||
## Index Files
|
||||
|
||||
### 1. `all-commands.json`
|
||||
|
||||
**Purpose**: Complete catalog of all commands with full metadata
|
||||
|
||||
**Use Cases**:
|
||||
- Full-text search across all commands
|
||||
- Detailed command queries
|
||||
- Batch operations
|
||||
- Reference lookup
|
||||
|
||||
**Structure**:
|
||||
```json
|
||||
[
|
||||
{
|
||||
"name": "workflow:plan",
|
||||
"description": "Orchestrate 5-phase planning workflow with quality gate",
|
||||
"arguments": "[--agent] [--cli-execute] \"text description\"|file.md",
|
||||
"category": "workflow",
|
||||
"subcategory": "core",
|
||||
"usage_scenario": "planning",
|
||||
"difficulty": "Advanced",
|
||||
"file_path": "workflow/plan.md"
|
||||
},
|
||||
...
|
||||
]
|
||||
```
|
||||
|
||||
**Fields**:
|
||||
- `name` (string): Command name (e.g., "workflow:plan")
|
||||
- `description` (string): Brief functional description
|
||||
- `arguments` (string): Parameter specification
|
||||
- `category` (string): Primary category (workflow/cli/memory/task)
|
||||
- `subcategory` (string|null): Secondary grouping if applicable
|
||||
- `usage_scenario` (string): Primary use case (planning/implementation/testing/etc.)
|
||||
- `difficulty` (string): Skill level (Beginner/Intermediate/Advanced)
|
||||
- `file_path` (string): Relative path to command file
|
||||
|
||||
**Total Records**: 69 commands
|
||||
|
||||
---
|
||||
|
||||
### 2. `by-category.json`
|
||||
|
||||
**Purpose**: Hierarchical organization by category and subcategory
|
||||
|
||||
**Use Cases**:
|
||||
- Browse commands by category
|
||||
- Category-specific listings
|
||||
- Hierarchical navigation
|
||||
- Understanding command organization
|
||||
|
||||
**Structure**:
|
||||
```json
|
||||
{
|
||||
"workflow": {
|
||||
"core": [
|
||||
{
|
||||
"name": "workflow:plan",
|
||||
"description": "...",
|
||||
...
|
||||
}
|
||||
],
|
||||
"brainstorm": [...],
|
||||
"session": [...],
|
||||
"tools": [...],
|
||||
"ui-design": [...]
|
||||
},
|
||||
"cli": {
|
||||
"mode": [...],
|
||||
"core": [...]
|
||||
},
|
||||
"memory": [...],
|
||||
"task": [...]
|
||||
}
|
||||
```
|
||||
|
||||
**Category Breakdown**:
|
||||
- **workflow** (46 commands):
|
||||
- core: 11 commands
|
||||
- brainstorm: 12 commands
|
||||
- session: 4 commands
|
||||
- tools: 9 commands
|
||||
- ui-design: 10 commands
|
||||
- **cli** (9 commands):
|
||||
- mode: 3 commands
|
||||
- core: 6 commands
|
||||
- **memory** (8 commands)
|
||||
- **task** (4 commands)
|
||||
- **general** (2 commands)
|
||||
|
||||
---
|
||||
|
||||
### 3. `by-use-case.json`
|
||||
|
||||
**Purpose**: Commands organized by practical usage scenarios
|
||||
|
||||
**Use Cases**:
|
||||
- Task-oriented command discovery
|
||||
- "I want to do X" queries
|
||||
- Workflow planning
|
||||
- Learning paths
|
||||
|
||||
**Structure**:
|
||||
```json
|
||||
{
|
||||
"planning": [
|
||||
{
|
||||
"name": "workflow:plan",
|
||||
"description": "...",
|
||||
...
|
||||
},
|
||||
...
|
||||
],
|
||||
"implementation": [...],
|
||||
"testing": [...],
|
||||
"documentation": [...],
|
||||
"session-management": [...],
|
||||
"general": [...]
|
||||
}
|
||||
```
|
||||
|
||||
**Use Case Categories**:
|
||||
- **planning**: Architecture, task breakdown, design
|
||||
- **implementation**: Coding, development, execution
|
||||
- **testing**: Test generation, TDD, quality assurance
|
||||
- **documentation**: Docs generation, memory management
|
||||
- **session-management**: Workflow control, resumption
|
||||
- **general**: Utilities, versioning, prompt enhancement
|
||||
|
||||
---
|
||||
|
||||
### 4. `essential-commands.json`
|
||||
|
||||
**Purpose**: Curated list of 10-15 most frequently used commands
|
||||
|
||||
**Use Cases**:
|
||||
- Quick reference for beginners
|
||||
- Onboarding new users
|
||||
- Common workflow starters
|
||||
- Cheat sheet
|
||||
|
||||
**Structure**:
|
||||
```json
|
||||
[
|
||||
{
|
||||
"name": "enhance-prompt",
|
||||
"description": "Context-aware prompt enhancement",
|
||||
"arguments": "\"user input to enhance\"",
|
||||
"category": "general",
|
||||
"subcategory": null,
|
||||
"usage_scenario": "general",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "enhance-prompt.md"
|
||||
},
|
||||
...
|
||||
]
|
||||
```
|
||||
|
||||
**Selection Criteria**:
|
||||
- Frequency of use in common workflows
|
||||
- Value for beginners
|
||||
- Core functionality coverage
|
||||
- Minimal overlap in capabilities
|
||||
|
||||
**Current Count**: 14 commands
|
||||
|
||||
**List**:
|
||||
1. `enhance-prompt` - Prompt enhancement
|
||||
2. `version` - Version info
|
||||
3. `cli:analyze` - Quick codebase analysis
|
||||
4. `cli:chat` - Direct CLI interaction
|
||||
5. `cli:execute` - Auto-execution
|
||||
6. `cli:mode:plan` - Planning mode
|
||||
7. `task:breakdown` - Task decomposition
|
||||
8. `task:create` - Create tasks
|
||||
9. `task:execute` - Execute tasks
|
||||
10. `workflow:execute` - Run workflows
|
||||
11. `workflow:plan` - Plan workflows
|
||||
12. `workflow:review` - Review implementation
|
||||
13. `workflow:tdd-plan` - TDD planning
|
||||
14. `workflow:test-gen` - Test generation
|
||||
|
||||
---
|
||||
|
||||
### 5. `command-relationships.json`
|
||||
|
||||
**Purpose**: Mapping of command dependencies and common sequences
|
||||
|
||||
**Use Cases**:
|
||||
- Next-step recommendations
|
||||
- Workflow pattern suggestions
|
||||
- Related command discovery
|
||||
- Smart navigation
|
||||
|
||||
**Structure**:
|
||||
```json
|
||||
{
|
||||
"workflow:plan": {
|
||||
"related_commands": [
|
||||
"workflow:execute",
|
||||
"workflow:action-plan-verify"
|
||||
],
|
||||
"next_steps": ["workflow:execute"],
|
||||
"prerequisites": []
|
||||
},
|
||||
"workflow:execute": {
|
||||
"related_commands": [
|
||||
"workflow:status",
|
||||
"workflow:resume",
|
||||
"workflow:review"
|
||||
],
|
||||
"next_steps": ["workflow:review", "workflow:status"],
|
||||
"prerequisites": ["workflow:plan"]
|
||||
},
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
**Fields**:
|
||||
- `related_commands` (array): Commonly used together
|
||||
- `next_steps` (array): Typical next commands
|
||||
- `prerequisites` (array): Usually run before this command
|
||||
|
||||
**Relationship Types**:
|
||||
1. **Sequential**: A → B (plan → execute)
|
||||
2. **Alternatives**: A | B (execute OR codex-execute)
|
||||
3. **Built-in**: A includes B (plan auto-includes context-gather)
|
||||
|
||||
---
|
||||
|
||||
## Query Patterns
|
||||
|
||||
### Pattern 1: Keyword Search
|
||||
```javascript
|
||||
// Search by keyword in name or description
|
||||
const results = allCommands.filter(cmd =>
|
||||
cmd.name.includes(keyword) ||
|
||||
cmd.description.toLowerCase().includes(keyword.toLowerCase())
|
||||
);
|
||||
```
|
||||
|
||||
### Pattern 2: Category Browse
|
||||
```javascript
|
||||
// Get all commands in a category
|
||||
const workflowCommands = byCategory.workflow;
|
||||
const coreWorkflow = byCategory.workflow.core;
|
||||
```
|
||||
|
||||
### Pattern 3: Use-Case Lookup
|
||||
```javascript
|
||||
// Find commands for specific use case
|
||||
const planningCommands = byUseCase.planning;
|
||||
```
|
||||
|
||||
### Pattern 4: Related Commands
|
||||
```javascript
|
||||
// Get next steps after a command
|
||||
const nextSteps = commandRelationships["workflow:plan"].next_steps;
|
||||
```
|
||||
|
||||
### Pattern 5: Essential Commands
|
||||
```javascript
|
||||
// Get beginner-friendly quick reference
|
||||
const quickStart = essentialCommands;
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Maintenance
|
||||
|
||||
### Regenerating Indexes
|
||||
|
||||
When commands are added/modified/removed:
|
||||
|
||||
```bash
|
||||
bash scripts/update-index.sh
|
||||
```
|
||||
|
||||
The script will:
|
||||
1. Scan all .md files in commands/
|
||||
2. Extract metadata from YAML frontmatter
|
||||
3. Analyze command relationships
|
||||
4. Identify essential commands
|
||||
5. Generate all 5 index files
|
||||
|
||||
### Validation Checklist
|
||||
|
||||
After regeneration, verify:
|
||||
- [ ] All 5 JSON files are valid (no syntax errors)
|
||||
- [ ] Total command count matches (currently 69)
|
||||
- [ ] No missing fields in records
|
||||
- [ ] Category breakdown correct
|
||||
- [ ] Essential commands reasonable (10-15)
|
||||
- [ ] Relationships make logical sense
|
||||
|
||||
---
|
||||
|
||||
## Performance Considerations
|
||||
|
||||
**Index Sizes**:
|
||||
- `all-commands.json`: ~28KB
|
||||
- `by-category.json`: ~31KB
|
||||
- `by-use-case.json`: ~29KB
|
||||
- `command-relationships.json`: ~7KB
|
||||
- `essential-commands.json`: ~5KB
|
||||
|
||||
**Total**: ~100KB (fast to load)
|
||||
|
||||
**Query Speed**:
|
||||
- In-memory search: < 1ms
|
||||
- File read + parse: < 50ms
|
||||
- Recommended: Load indexes once, cache in memory
|
||||
|
||||
---
|
||||
|
||||
**Last Updated**: 2025-01-06
|
||||
92
.claude/skills/command-guide/guides/troubleshooting.md
Normal file
92
.claude/skills/command-guide/guides/troubleshooting.md
Normal file
@@ -0,0 +1,92 @@
|
||||
# 常见问题与解决方案
|
||||
|
||||
在使用 Gemini CLI 的过程中,您可能会遇到一些问题。本指南旨在帮助您诊断和解决这些常见问题,确保您能顺利使用 CLI。
|
||||
|
||||
## 1. 命令执行失败或未找到
|
||||
|
||||
**问题描述**:
|
||||
- 您输入的命令没有响应,或者系统提示“命令未找到”。
|
||||
- 命令执行后出现错误信息,但您不理解其含义。
|
||||
|
||||
**可能原因**:
|
||||
- 命令拼写错误。
|
||||
- CLI 未正确安装或环境变量配置不正确。
|
||||
- 命令所需的依赖项缺失。
|
||||
- 命令参数不正确或缺失。
|
||||
|
||||
**解决方案**:
|
||||
1. **检查拼写**: 仔细核对您输入的命令是否正确,包括命令名称和任何参数。
|
||||
2. **查看帮助**: 使用 `gemini help` 或 `gemini [command-name] --help` 来查看命令的正确用法、可用参数和示例。
|
||||
3. **验证安装**: 确保 Gemini CLI 已正确安装,并且其可执行文件路径已添加到系统的环境变量中。您可以尝试重新安装 CLI。
|
||||
4. **检查日志**: CLI 通常会生成日志文件。查看这些日志可以提供更详细的错误信息,帮助您定位问题。
|
||||
5. **更新 CLI**: 确保您使用的是最新版本的 Gemini CLI。旧版本可能存在已知错误,通过 `gemini version` 检查并更新。
|
||||
|
||||
## 2. 权限问题
|
||||
|
||||
**问题描述**:
|
||||
- CLI 尝试读取、写入或创建文件/目录时,提示“权限被拒绝”或类似错误。
|
||||
- 某些操作(如安装依赖、修改系统配置)失败。
|
||||
|
||||
**可能原因**:
|
||||
- 当前用户没有足够的权限执行该操作。
|
||||
- 文件或目录被其他程序占用。
|
||||
|
||||
**解决方案**:
|
||||
1. **以管理员身份运行**: 尝试以管理员权限(Windows)或使用 `sudo`(Linux/macOS)运行您的终端或命令提示符。
|
||||
```bash
|
||||
# Windows (在命令提示符或 PowerShell 中右键选择“以管理员身份运行”)
|
||||
# Linux/macOS
|
||||
sudo gemini [command]
|
||||
```
|
||||
2. **检查文件/目录权限**: 确保您对目标文件或目录拥有读/写/执行权限。您可能需要使用 `chmod` (Linux/macOS) 或修改文件属性 (Windows) 来更改权限。
|
||||
3. **关闭占用程序**: 确保没有其他程序正在使用您尝试访问的文件或目录。
|
||||
|
||||
## 3. 配置问题
|
||||
|
||||
**问题描述**:
|
||||
- CLI 行为异常,例如无法连接到 LLM 服务,或者某些功能无法正常工作。
|
||||
- 提示缺少 API 密钥或配置项。
|
||||
|
||||
**可能原因**:
|
||||
- 配置文件(如 `.gemini.json` 或相关环境变量)设置不正确。
|
||||
- API 密钥过期或无效。
|
||||
- 网络连接问题导致无法访问外部服务。
|
||||
|
||||
**解决方案**:
|
||||
1. **检查配置文件**: 仔细检查 Gemini CLI 的配置文件(通常位于用户主目录或项目根目录)中的设置。确保所有路径、API 密钥和选项都正确无误。
|
||||
2. **验证环境变量**: 确认所有必要的环境变量(如 `GEMINI_API_KEY`)都已正确设置。
|
||||
3. **网络连接**: 检查您的网络连接是否正常,并确保没有防火墙或代理设置阻止 CLI 访问外部服务。
|
||||
4. **重新初始化配置**: 对于某些配置问题,您可能需要使用 `gemini cli-init` 命令重新初始化 CLI 配置。
|
||||
```bash
|
||||
gemini cli-init
|
||||
```
|
||||
|
||||
## 4. 智能代理 (LLM) 相关问题
|
||||
|
||||
**问题描述**:
|
||||
- 智能代理的响应质量不佳,不相关或不准确。
|
||||
- 代理响应速度慢,或提示达到速率限制。
|
||||
|
||||
**可能原因**:
|
||||
- 提示不够清晰或缺乏上下文。
|
||||
- 选择了不适合当前任务的 LLM 模型。
|
||||
- LLM 服务提供商的速率限制或服务中断。
|
||||
|
||||
**解决方案**:
|
||||
1. **优化提示**: 尝试使用 `enhance-prompt` 命令来优化您的输入,提供更清晰、更具体的上下文信息。
|
||||
2. **选择合适的工具**: 根据任务类型,使用 `--tool` 标志选择最合适的 LLM 模型(如 `codex` 适用于代码生成,`gemini` 适用于复杂推理)。
|
||||
```bash
|
||||
gemini analyze --tool gemini "分析这个复杂算法"
|
||||
```
|
||||
3. **检查 API 密钥和配额**: 确保您的 LLM 服务 API 密钥有效,并且没有超出使用配额。
|
||||
4. **重试或等待**: 如果是速率限制或服务中断,请稍后重试或联系服务提供商。
|
||||
|
||||
## 5. 寻求帮助
|
||||
|
||||
如果以上解决方案都无法解决您的问题,您可以:
|
||||
|
||||
- **查阅官方文档**: 访问 Gemini CLI 的官方文档获取更全面的信息。
|
||||
- **社区支持**: 在相关的开发者社区或论坛中提问。
|
||||
- **提交问题**: 如果您认为是 CLI 的 bug,请在项目的问题跟踪器中提交详细的问题报告。
|
||||
|
||||
希望本指南能帮助您解决遇到的问题,让您更好地利用 Gemini CLI!
|
||||
100
.claude/skills/command-guide/guides/workflow-patterns.md
Normal file
100
.claude/skills/command-guide/guides/workflow-patterns.md
Normal file
@@ -0,0 +1,100 @@
|
||||
# 常见工作流模式
|
||||
|
||||
Gemini CLI 不仅提供单个命令,更能通过智能编排将一系列命令组合成强大的工作流,帮助您高效完成复杂任务。本指南将介绍几种常见的工作流模式。
|
||||
|
||||
## 1. 工作流核心概念
|
||||
|
||||
在深入了解具体模式之前,理解工作流的架构至关重要。Gemini CLI 的工作流管理系统旨在提供一个灵活、可扩展的框架,用于定义、执行和协调复杂的开发任务。
|
||||
|
||||
- **工作流 (Workflows)**:一系列任务的组合,旨在实现特定的开发目标。
|
||||
- **任务 (Tasks)**:工作流中的独立工作单元,可以简单也可以复杂,有状态、输入和输出。
|
||||
- **智能体 (Agents)**:通常由大型语言模型驱动,负责执行任务或在工作流中做出决策。
|
||||
- **上下文 (Context)**:当前工作流的相关动态信息,包括项目状态、代码片段、文档、用户输入等,是智能决策的关键。
|
||||
- **记忆 (Memory)**:持久存储上下文、工作流历史和学习模式,支持工作流的恢复、适应和改进。
|
||||
|
||||
详情可参考 `../../workflows/workflow-architecture.md`。
|
||||
|
||||
## 2. 规划 -> 执行 (Plan -> Execute) 模式
|
||||
|
||||
这是最基础也是最常用的工作流模式,它将一个大的目标分解为可执行的步骤,并逐步实现。
|
||||
|
||||
**场景**: 您有一个需要从头开始实现的新功能或模块。
|
||||
|
||||
**主要命令**:
|
||||
- `plan`: 启动高级规划过程,分解目标。
|
||||
- `breakdown`: 进一步细化和分解 `plan` 生成的任务。
|
||||
- `create`: 创建具体的实施任务。
|
||||
- `execute`: 执行创建好的任务以实现代码或解决方案。
|
||||
|
||||
**工作流示例**:
|
||||
1. **启动规划**: `gemini plan "开发一个用户认证服务"`
|
||||
- CLI 会与您互动,明确需求,并生成一个初步的规划(可能包含多个子任务)。
|
||||
2. **任务分解** (可选,如果规划足够细致可跳过):
|
||||
- 假设 `plan` 产生了一个任务 ID `task-auth-service`。
|
||||
- `gemini breakdown task-auth-service`
|
||||
- 可能进一步分解为 `task-register`, `task-login`, `task-password-reset`等。
|
||||
3. **创建具体实现任务**:
|
||||
- `gemini create "实现用户注册 API 接口"`
|
||||
- 这会生成一个专门针对此任务的 ID,例如 `task-id-register-api`。
|
||||
4. **执行实现任务**:
|
||||
- `gemini execute task-id-register-api`
|
||||
- CLI 将调用智能体自动编写和集成代码。
|
||||
|
||||
## 3. 测试驱动开发 (TDD) 模式
|
||||
|
||||
TDD 模式强调先编写测试,再编写满足测试的代码,然后重构。Gemini CLI 通过自动化 TDD 流程来支持这一模式。
|
||||
|
||||
**场景**: 您正在开发一个新功能,并希望通过 TDD 确保代码质量和正确性。
|
||||
|
||||
**主要命令**:
|
||||
- `tdd-plan`: 规划 TDD 工作流,生成红-绿-重构任务链。
|
||||
- `test-gen`: 根据功能描述生成测试用例。
|
||||
- `execute`: 执行代码生成和测试。
|
||||
- `tdd-verify`: 验证 TDD 工作流的合规性并生成质量报告。
|
||||
|
||||
**工作流示例**:
|
||||
1. **TDD 规划**: `gemini tdd-plan "实现一个购物车功能"`
|
||||
- CLI 将为您创建一个 TDD 任务链,包括测试生成、代码实现和验证。
|
||||
2. **生成测试**: (通常包含在 `tdd-plan` 的早期阶段,或可以单独调用)
|
||||
- `gemini test-gen source-session-id` (如果已有一个实现会话)
|
||||
- 这会产生失败的测试(红)。
|
||||
3. **执行代码实现和测试**:
|
||||
- `gemini execute task-id-for-code-implementation`
|
||||
- 智能体会编写代码以通过测试,并将执行测试(变为绿)。
|
||||
4. **TDD 验证**: `gemini tdd-verify`
|
||||
- 验证整个 TDD 周期是否规范执行,以及生成测试覆盖率等报告。
|
||||
|
||||
## 4. UI 设计与实现工作流
|
||||
|
||||
Gemini CLI 可以辅助您进行 UI 的设计、提取和代码生成,加速前端开发。
|
||||
|
||||
**场景**: 您需要基于一些设计稿或现有网站来快速构建 UI 原型或实现页面。
|
||||
|
||||
**主要命令**:
|
||||
- `ui-designer`: 启动 UI 设计分析。
|
||||
- `layout-extract`: 从参考图像或 URL 提取布局信息。
|
||||
- `style-extract`: 从参考图像或 URL 提取设计风格。
|
||||
- `generate`: 组合布局和设计令牌生成 UI 原型。
|
||||
- `update`: 使用最终设计系统参考更新设计产物。
|
||||
|
||||
**工作流示例**:
|
||||
1. **启动 UI 设计分析**: `gemini ui-designer`
|
||||
- 开始一个引导式的流程,定义您的 UI 设计目标。
|
||||
2. **提取布局**: `gemini layout-extract --urls "https://example.com/some-page"`
|
||||
- 从给定 URL 提取页面布局结构。
|
||||
3. **提取样式**: `gemini style-extract --images "./design-mockup.png"`
|
||||
- 从设计图中提取颜色、字体等视觉风格。
|
||||
4. **生成 UI 原型**: `gemini generate --base-path ./my-ui-project`
|
||||
- 结合提取的布局和样式,生成可工作的 UI 代码或原型。
|
||||
5. **更新与迭代**: `gemini update --session ui-design-session-id --selected-prototypes "proto-01,proto-03"`
|
||||
- 根据反馈和最终设计系统,迭代并更新生成的 UI 产物。
|
||||
|
||||
## 5. 上下文搜索策略
|
||||
|
||||
所有这些工作流都依赖于高效的上下文管理。Gemini CLI 采用多层次的上下文搜索策略,以确保智能代理获得最相关的信息。
|
||||
|
||||
- **相关性优先**: 优先收集与当前任务直接相关的上下文,而非大量数据。
|
||||
- **分层搜索**: 从最直接的来源(如当前打开文件)开始,逐步扩展到项目文件、记忆库和外部资源。
|
||||
- **语义理解**: 利用智能搜索理解查询的意图,而非仅仅是关键词匹配。
|
||||
|
||||
更多细节请查阅 `../../workflows/context-search-strategy.md`。
|
||||
692
.claude/skills/command-guide/index/all-commands.json
Normal file
692
.claude/skills/command-guide/index/all-commands.json
Normal file
@@ -0,0 +1,692 @@
|
||||
[
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "cli/analyze.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "cli/chat.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "cli/cli-init.md"
|
||||
},
|
||||
{
|
||||
"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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "cli/codex-execute.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "cli/discuss-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": "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",
|
||||
"subcategory": "mode",
|
||||
"usage_scenario": "analysis",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "cli/mode/bug-diagnosis.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "cli/mode/code-analysis.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"subcategory": "mode",
|
||||
"usage_scenario": "planning",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "cli/mode/plan.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "enhance-prompt.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "memory/docs.md"
|
||||
},
|
||||
{
|
||||
"name": "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\\\"",
|
||||
"category": "memory",
|
||||
"subcategory": "core",
|
||||
"usage_scenario": "documentation",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "memory/load-skill-memory.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",
|
||||
"usage_scenario": "implementation",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "memory/load.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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "memory/skill-memory.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "memory/tech-research.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "memory/update-full.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "memory/update-related.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"usage_scenario": "documentation",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "memory/workflow-skill-memory.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"usage_scenario": "planning",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "task/breakdown.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",
|
||||
"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",
|
||||
"usage_scenario": "implementation",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "task/execute.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "task/replan.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": "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",
|
||||
"usage_scenario": "planning",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "workflow/action-plan-verify.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/brainstorm/api-designer.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/brainstorm/artifacts.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Advanced",
|
||||
"file_path": "workflow/brainstorm/auto-parallel.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/brainstorm/data-architect.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/brainstorm/product-manager.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/brainstorm/product-owner.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/brainstorm/scrum-master.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/brainstorm/subject-matter-expert.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Advanced",
|
||||
"file_path": "workflow/brainstorm/synthesis.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/brainstorm/system-architect.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/brainstorm/ui-designer.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/brainstorm/ux-expert.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",
|
||||
"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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "workflow/resume.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "workflow/review.md"
|
||||
},
|
||||
{
|
||||
"name": "workflow:session:complete",
|
||||
"description": "Mark active workflow session as complete, archive with lessons learned, update manifest, remove active flag",
|
||||
"arguments": "# Complete current active session",
|
||||
"category": "workflow",
|
||||
"subcategory": "session",
|
||||
"usage_scenario": "session-management",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "workflow/session/complete.md"
|
||||
},
|
||||
{
|
||||
"name": "workflow:session:list",
|
||||
"description": "List all workflow sessions with status filtering, shows session metadata and progress information",
|
||||
"arguments": "# Show all sessions with status",
|
||||
"category": "workflow",
|
||||
"subcategory": "session",
|
||||
"usage_scenario": "session-management",
|
||||
"difficulty": "Basic",
|
||||
"file_path": "workflow/session/list.md"
|
||||
},
|
||||
{
|
||||
"name": "workflow:session:resume",
|
||||
"description": "Resume the most recently paused workflow session with automatic session discovery and status update",
|
||||
"arguments": "# Resume most recent paused session",
|
||||
"category": "workflow",
|
||||
"subcategory": "session",
|
||||
"usage_scenario": "session-management",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "workflow/session/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]",
|
||||
"category": "workflow",
|
||||
"subcategory": "session",
|
||||
"usage_scenario": "session-management",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "workflow/session/start.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": "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",
|
||||
"file_path": "workflow/tdd-plan.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/tdd-verify.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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "workflow/test-cycle-execute.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"usage_scenario": "testing",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "workflow/test-fix-gen.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"usage_scenario": "testing",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "workflow/test-gen.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Advanced",
|
||||
"file_path": "workflow/tools/conflict-resolution.md"
|
||||
},
|
||||
{
|
||||
"name": "workflow:tools:context-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\\\"",
|
||||
"category": "workflow",
|
||||
"subcategory": "tools",
|
||||
"usage_scenario": "implementation",
|
||||
"difficulty": "Advanced",
|
||||
"file_path": "workflow/tools/context-gather.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Advanced",
|
||||
"file_path": "workflow/tools/task-generate-agent.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Advanced",
|
||||
"file_path": "workflow/tools/task-generate-tdd.md"
|
||||
},
|
||||
{
|
||||
"name": "workflow:tools:task-generate",
|
||||
"description": "",
|
||||
"arguments": "--session WFS-auth",
|
||||
"category": "workflow",
|
||||
"subcategory": "tools",
|
||||
"usage_scenario": "planning",
|
||||
"difficulty": "Advanced",
|
||||
"file_path": "workflow/tools/task-generate.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"subcategory": "tools",
|
||||
"usage_scenario": "testing",
|
||||
"difficulty": "Advanced",
|
||||
"file_path": "workflow/tools/tdd-coverage-analysis.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/tools/test-concept-enhanced.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/tools/test-context-gather.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/tools/test-task-generate.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/ui-design/animation-extract.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/ui-design/batch-generate.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/ui-design/capture.md"
|
||||
},
|
||||
{
|
||||
"name": "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]\"",
|
||||
"category": "workflow",
|
||||
"subcategory": "ui-design",
|
||||
"usage_scenario": "ui-design",
|
||||
"difficulty": "Advanced",
|
||||
"file_path": "workflow/ui-design/explore-auto.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/ui-design/explore-layers.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/ui-design/generate.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/ui-design/imitate-auto.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/ui-design/layout-extract.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/ui-design/style-extract.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/ui-design/update.md"
|
||||
}
|
||||
]
|
||||
722
.claude/skills/command-guide/index/by-category.json
Normal file
722
.claude/skills/command-guide/index/by-category.json
Normal file
@@ -0,0 +1,722 @@
|
||||
{
|
||||
"cli": {
|
||||
"core": [
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "cli/analyze.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "cli/chat.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "cli/cli-init.md"
|
||||
},
|
||||
{
|
||||
"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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "cli/codex-execute.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "cli/discuss-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"
|
||||
}
|
||||
],
|
||||
"mode": [
|
||||
{
|
||||
"name": "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",
|
||||
"subcategory": "mode",
|
||||
"usage_scenario": "analysis",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "cli/mode/bug-diagnosis.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "cli/mode/code-analysis.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"subcategory": "mode",
|
||||
"usage_scenario": "planning",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "cli/mode/plan.md"
|
||||
}
|
||||
]
|
||||
},
|
||||
"general": {
|
||||
"core": [
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "enhance-prompt.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"
|
||||
}
|
||||
]
|
||||
},
|
||||
"memory": {
|
||||
"core": [
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "memory/docs.md"
|
||||
},
|
||||
{
|
||||
"name": "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\\\"",
|
||||
"category": "memory",
|
||||
"subcategory": "core",
|
||||
"usage_scenario": "documentation",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "memory/load-skill-memory.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",
|
||||
"usage_scenario": "implementation",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "memory/load.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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "memory/skill-memory.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "memory/tech-research.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "memory/update-full.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "memory/update-related.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"usage_scenario": "documentation",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "memory/workflow-skill-memory.md"
|
||||
}
|
||||
]
|
||||
},
|
||||
"task": {
|
||||
"core": [
|
||||
{
|
||||
"name": "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",
|
||||
"usage_scenario": "planning",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "task/breakdown.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",
|
||||
"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",
|
||||
"usage_scenario": "implementation",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "task/execute.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "task/replan.md"
|
||||
}
|
||||
]
|
||||
},
|
||||
"workflow": {
|
||||
"core": [
|
||||
{
|
||||
"name": "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",
|
||||
"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",
|
||||
"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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "workflow/resume.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"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": "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",
|
||||
"file_path": "workflow/tdd-plan.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/tdd-verify.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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "workflow/test-cycle-execute.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"usage_scenario": "testing",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "workflow/test-fix-gen.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"usage_scenario": "testing",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "workflow/test-gen.md"
|
||||
}
|
||||
],
|
||||
"brainstorm": [
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/brainstorm/api-designer.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/brainstorm/artifacts.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Advanced",
|
||||
"file_path": "workflow/brainstorm/auto-parallel.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/brainstorm/data-architect.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/brainstorm/product-manager.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/brainstorm/product-owner.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/brainstorm/scrum-master.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/brainstorm/subject-matter-expert.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Advanced",
|
||||
"file_path": "workflow/brainstorm/synthesis.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/brainstorm/system-architect.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/brainstorm/ui-designer.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/brainstorm/ux-expert.md"
|
||||
}
|
||||
],
|
||||
"session": [
|
||||
{
|
||||
"name": "workflow:session:complete",
|
||||
"description": "Mark active workflow session as complete, archive with lessons learned, update manifest, remove active flag",
|
||||
"arguments": "# Complete current active session",
|
||||
"category": "workflow",
|
||||
"subcategory": "session",
|
||||
"usage_scenario": "session-management",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "workflow/session/complete.md"
|
||||
},
|
||||
{
|
||||
"name": "workflow:session:list",
|
||||
"description": "List all workflow sessions with status filtering, shows session metadata and progress information",
|
||||
"arguments": "# Show all sessions with status",
|
||||
"category": "workflow",
|
||||
"subcategory": "session",
|
||||
"usage_scenario": "session-management",
|
||||
"difficulty": "Basic",
|
||||
"file_path": "workflow/session/list.md"
|
||||
},
|
||||
{
|
||||
"name": "workflow:session:resume",
|
||||
"description": "Resume the most recently paused workflow session with automatic session discovery and status update",
|
||||
"arguments": "# Resume most recent paused session",
|
||||
"category": "workflow",
|
||||
"subcategory": "session",
|
||||
"usage_scenario": "session-management",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "workflow/session/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]",
|
||||
"category": "workflow",
|
||||
"subcategory": "session",
|
||||
"usage_scenario": "session-management",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "workflow/session/start.md"
|
||||
}
|
||||
],
|
||||
"tools": [
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Advanced",
|
||||
"file_path": "workflow/tools/conflict-resolution.md"
|
||||
},
|
||||
{
|
||||
"name": "workflow:tools:context-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\\\"",
|
||||
"category": "workflow",
|
||||
"subcategory": "tools",
|
||||
"usage_scenario": "implementation",
|
||||
"difficulty": "Advanced",
|
||||
"file_path": "workflow/tools/context-gather.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Advanced",
|
||||
"file_path": "workflow/tools/task-generate-agent.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Advanced",
|
||||
"file_path": "workflow/tools/task-generate-tdd.md"
|
||||
},
|
||||
{
|
||||
"name": "workflow:tools:task-generate",
|
||||
"description": "",
|
||||
"arguments": "--session WFS-auth",
|
||||
"category": "workflow",
|
||||
"subcategory": "tools",
|
||||
"usage_scenario": "planning",
|
||||
"difficulty": "Advanced",
|
||||
"file_path": "workflow/tools/task-generate.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"subcategory": "tools",
|
||||
"usage_scenario": "testing",
|
||||
"difficulty": "Advanced",
|
||||
"file_path": "workflow/tools/tdd-coverage-analysis.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/tools/test-concept-enhanced.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/tools/test-context-gather.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/tools/test-task-generate.md"
|
||||
}
|
||||
],
|
||||
"ui-design": [
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/ui-design/animation-extract.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/ui-design/batch-generate.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/ui-design/capture.md"
|
||||
},
|
||||
{
|
||||
"name": "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]\"",
|
||||
"category": "workflow",
|
||||
"subcategory": "ui-design",
|
||||
"usage_scenario": "ui-design",
|
||||
"difficulty": "Advanced",
|
||||
"file_path": "workflow/ui-design/explore-auto.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/ui-design/explore-layers.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/ui-design/generate.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/ui-design/imitate-auto.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/ui-design/layout-extract.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/ui-design/style-extract.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/ui-design/update.md"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
712
.claude/skills/command-guide/index/by-use-case.json
Normal file
712
.claude/skills/command-guide/index/by-use-case.json
Normal file
@@ -0,0 +1,712 @@
|
||||
{
|
||||
"documentation": [
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "cli/analyze.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "cli/chat.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "cli/cli-init.md"
|
||||
},
|
||||
{
|
||||
"name": "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\\\"",
|
||||
"category": "memory",
|
||||
"subcategory": "core",
|
||||
"usage_scenario": "documentation",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "memory/load-skill-memory.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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "memory/skill-memory.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "memory/tech-research.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"usage_scenario": "documentation",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "memory/workflow-skill-memory.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "task/replan.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/ui-design/animation-extract.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/ui-design/imitate-auto.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/ui-design/style-extract.md"
|
||||
}
|
||||
],
|
||||
"session-management": [
|
||||
{
|
||||
"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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "cli/codex-execute.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "cli/discuss-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": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "enhance-prompt.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/brainstorm/api-designer.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/brainstorm/artifacts.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Advanced",
|
||||
"file_path": "workflow/brainstorm/auto-parallel.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/brainstorm/system-architect.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:session:complete",
|
||||
"description": "Mark active workflow session as complete, archive with lessons learned, update manifest, remove active flag",
|
||||
"arguments": "# Complete current active session",
|
||||
"category": "workflow",
|
||||
"subcategory": "session",
|
||||
"usage_scenario": "session-management",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "workflow/session/complete.md"
|
||||
},
|
||||
{
|
||||
"name": "workflow:session:list",
|
||||
"description": "List all workflow sessions with status filtering, shows session metadata and progress information",
|
||||
"arguments": "# Show all sessions with status",
|
||||
"category": "workflow",
|
||||
"subcategory": "session",
|
||||
"usage_scenario": "session-management",
|
||||
"difficulty": "Basic",
|
||||
"file_path": "workflow/session/list.md"
|
||||
},
|
||||
{
|
||||
"name": "workflow:session:resume",
|
||||
"description": "Resume the most recently paused workflow session with automatic session discovery and status update",
|
||||
"arguments": "# Resume most recent paused session",
|
||||
"category": "workflow",
|
||||
"subcategory": "session",
|
||||
"usage_scenario": "session-management",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "workflow/session/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]",
|
||||
"category": "workflow",
|
||||
"subcategory": "session",
|
||||
"usage_scenario": "session-management",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "workflow/session/start.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/tdd-plan.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/tdd-verify.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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "workflow/test-cycle-execute.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/tools/test-task-generate.md"
|
||||
}
|
||||
],
|
||||
"analysis": [
|
||||
{
|
||||
"name": "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",
|
||||
"subcategory": "mode",
|
||||
"usage_scenario": "analysis",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "cli/mode/bug-diagnosis.md"
|
||||
}
|
||||
],
|
||||
"implementation": [
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "cli/mode/code-analysis.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",
|
||||
"usage_scenario": "implementation",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "memory/load.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "memory/update-full.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "memory/update-related.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"usage_scenario": "implementation",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "task/execute.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/brainstorm/data-architect.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/brainstorm/product-manager.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/brainstorm/product-owner.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/brainstorm/subject-matter-expert.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/brainstorm/ux-expert.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "workflow/resume.md"
|
||||
},
|
||||
{
|
||||
"name": "workflow:tools:context-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\\\"",
|
||||
"category": "workflow",
|
||||
"subcategory": "tools",
|
||||
"usage_scenario": "implementation",
|
||||
"difficulty": "Advanced",
|
||||
"file_path": "workflow/tools/context-gather.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/tools/test-context-gather.md"
|
||||
}
|
||||
],
|
||||
"planning": [
|
||||
{
|
||||
"name": "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",
|
||||
"subcategory": "mode",
|
||||
"usage_scenario": "planning",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "cli/mode/plan.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "memory/docs.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"usage_scenario": "planning",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "task/breakdown.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"usage_scenario": "planning",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "workflow/action-plan-verify.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/brainstorm/scrum-master.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/brainstorm/ui-designer.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Advanced",
|
||||
"file_path": "workflow/tools/task-generate-agent.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Advanced",
|
||||
"file_path": "workflow/tools/task-generate-tdd.md"
|
||||
},
|
||||
{
|
||||
"name": "workflow:tools:task-generate",
|
||||
"description": "",
|
||||
"arguments": "--session WFS-auth",
|
||||
"category": "workflow",
|
||||
"subcategory": "tools",
|
||||
"usage_scenario": "planning",
|
||||
"difficulty": "Advanced",
|
||||
"file_path": "workflow/tools/task-generate.md"
|
||||
}
|
||||
],
|
||||
"testing": [
|
||||
{
|
||||
"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": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "workflow/review.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"usage_scenario": "testing",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "workflow/test-fix-gen.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"usage_scenario": "testing",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "workflow/test-gen.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"subcategory": "tools",
|
||||
"usage_scenario": "testing",
|
||||
"difficulty": "Advanced",
|
||||
"file_path": "workflow/tools/tdd-coverage-analysis.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/tools/test-concept-enhanced.md"
|
||||
}
|
||||
],
|
||||
"utilities": [
|
||||
{
|
||||
"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"
|
||||
}
|
||||
],
|
||||
"brainstorming": [
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Advanced",
|
||||
"file_path": "workflow/brainstorm/synthesis.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"difficulty": "Advanced",
|
||||
"file_path": "workflow/tools/conflict-resolution.md"
|
||||
}
|
||||
],
|
||||
"monitoring": [
|
||||
{
|
||||
"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"
|
||||
}
|
||||
],
|
||||
"ui-design": [
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/ui-design/batch-generate.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/ui-design/capture.md"
|
||||
},
|
||||
{
|
||||
"name": "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]\"",
|
||||
"category": "workflow",
|
||||
"subcategory": "ui-design",
|
||||
"usage_scenario": "ui-design",
|
||||
"difficulty": "Advanced",
|
||||
"file_path": "workflow/ui-design/explore-auto.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/ui-design/explore-layers.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/ui-design/generate.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/ui-design/layout-extract.md"
|
||||
},
|
||||
{
|
||||
"name": "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",
|
||||
"file_path": "workflow/ui-design/update.md"
|
||||
}
|
||||
]
|
||||
}
|
||||
616
.claude/skills/command-guide/index/command-relationships.json
Normal file
616
.claude/skills/command-guide/index/command-relationships.json
Normal file
@@ -0,0 +1,616 @@
|
||||
{
|
||||
"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"
|
||||
],
|
||||
"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"
|
||||
],
|
||||
"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"
|
||||
],
|
||||
"next_steps": [
|
||||
"workflow:execute",
|
||||
"workflow:tdd-verify"
|
||||
],
|
||||
"prerequisites": []
|
||||
},
|
||||
"workflow:tdd-verify": {
|
||||
"related_commands": [
|
||||
"workflow:test-cycle-execute",
|
||||
"workflow:review"
|
||||
],
|
||||
"next_steps": [],
|
||||
"prerequisites": [
|
||||
"workflow:tdd-plan"
|
||||
]
|
||||
},
|
||||
"workflow:test-cycle-execute": {
|
||||
"related_commands": [
|
||||
"workflow:tdd-verify",
|
||||
"workflow:execute"
|
||||
],
|
||||
"next_steps": [],
|
||||
"prerequisites": [
|
||||
"workflow:test-gen",
|
||||
"workflow:test-fix-gen"
|
||||
]
|
||||
},
|
||||
"workflow:test-fix-gen": {
|
||||
"related_commands": [],
|
||||
"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"
|
||||
],
|
||||
"prerequisites": [
|
||||
"workflow:tools:context-gather"
|
||||
]
|
||||
},
|
||||
"workflow:tools:context-gather": {
|
||||
"related_commands": [
|
||||
"memory:load",
|
||||
"workflow:tools:conflict-resolution"
|
||||
],
|
||||
"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": [
|
||||
"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"
|
||||
],
|
||||
"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: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"
|
||||
],
|
||||
"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": []
|
||||
}
|
||||
}
|
||||
142
.claude/skills/command-guide/index/essential-commands.json
Normal file
142
.claude/skills/command-guide/index/essential-commands.json
Normal file
@@ -0,0 +1,142 @@
|
||||
[
|
||||
{
|
||||
"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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "cli/codex-execute.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",
|
||||
"usage_scenario": "implementation",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "memory/load.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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "memory/skill-memory.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",
|
||||
"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",
|
||||
"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": "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",
|
||||
"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",
|
||||
"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",
|
||||
"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]",
|
||||
"category": "workflow",
|
||||
"subcategory": "session",
|
||||
"usage_scenario": "session-management",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "workflow/session/start.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": "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",
|
||||
"difficulty": "Intermediate",
|
||||
"file_path": "workflow/test-cycle-execute.md"
|
||||
}
|
||||
]
|
||||
411
.claude/skills/command-guide/scripts/analyze_commands.py
Normal file
411
.claude/skills/command-guide/scripts/analyze_commands.py
Normal file
@@ -0,0 +1,411 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Analyze all command files and generate index files for command-guide skill.
|
||||
"""
|
||||
|
||||
import os
|
||||
import re
|
||||
import json
|
||||
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")
|
||||
|
||||
def parse_frontmatter(content: str) -> Dict[str, Any]:
|
||||
"""Extract YAML frontmatter from markdown content."""
|
||||
frontmatter = {}
|
||||
if content.startswith('---'):
|
||||
lines = content.split('\n')
|
||||
in_frontmatter = False
|
||||
for i, line in enumerate(lines[1:], 1):
|
||||
if line.strip() == '---':
|
||||
break
|
||||
if ':' in line:
|
||||
key, value = line.split(':', 1)
|
||||
frontmatter[key.strip()] = value.strip().strip('"')
|
||||
return frontmatter
|
||||
|
||||
def categorize_command(file_path: Path) -> tuple:
|
||||
"""Determine category and subcategory from file path."""
|
||||
parts = file_path.relative_to(COMMANDS_DIR).parts
|
||||
|
||||
if len(parts) == 1:
|
||||
return "general", None
|
||||
|
||||
category = parts[0] # cli, memory, task, workflow
|
||||
subcategory = parts[1].replace('.md', '') if len(parts) > 2 else None
|
||||
|
||||
return category, subcategory
|
||||
|
||||
def determine_usage_scenario(name: str, description: str, category: str) -> str:
|
||||
"""Determine primary usage scenario for command."""
|
||||
name_lower = name.lower()
|
||||
desc_lower = description.lower()
|
||||
|
||||
# Planning indicators
|
||||
if any(word in name_lower for word in ['plan', 'design', 'breakdown', 'brainstorm']):
|
||||
return "planning"
|
||||
|
||||
# Implementation indicators
|
||||
if any(word in name_lower for word in ['implement', 'execute', 'generate', 'create', 'write']):
|
||||
return "implementation"
|
||||
|
||||
# Testing indicators
|
||||
if any(word in name_lower for word in ['test', 'tdd', 'verify', 'coverage']):
|
||||
return "testing"
|
||||
|
||||
# Documentation indicators
|
||||
if any(word in name_lower for word in ['docs', 'documentation', 'memory']):
|
||||
return "documentation"
|
||||
|
||||
# Session management indicators
|
||||
if any(word in name_lower for word in ['session', 'resume', 'status', 'complete']):
|
||||
return "session-management"
|
||||
|
||||
# Analysis indicators
|
||||
if any(word in name_lower for word in ['analyze', 'review', 'diagnosis']):
|
||||
return "analysis"
|
||||
|
||||
return "general"
|
||||
|
||||
def determine_difficulty(name: str, description: str, category: str) -> str:
|
||||
"""Determine difficulty level."""
|
||||
name_lower = name.lower()
|
||||
|
||||
# Beginner commands
|
||||
beginner_keywords = ['status', 'list', 'chat', 'analyze', 'version']
|
||||
if any(word in name_lower for word in beginner_keywords):
|
||||
return "Beginner"
|
||||
|
||||
# Advanced commands
|
||||
advanced_keywords = ['tdd', 'conflict', 'agent', 'auto-parallel', 'coverage', 'synthesis']
|
||||
if any(word in name_lower for word in advanced_keywords):
|
||||
return "Advanced"
|
||||
|
||||
# Intermediate by default
|
||||
return "Intermediate"
|
||||
|
||||
def analyze_command_file(file_path: Path) -> Dict[str, Any]:
|
||||
"""Analyze a single command file and extract metadata."""
|
||||
with open(file_path, 'r', encoding='utf-8') as f:
|
||||
content = f.read()
|
||||
|
||||
# Parse frontmatter
|
||||
frontmatter = parse_frontmatter(content)
|
||||
|
||||
# Extract data
|
||||
name = frontmatter.get('name', file_path.stem)
|
||||
description = frontmatter.get('description', '')
|
||||
argument_hint = frontmatter.get('argument-hint', '')
|
||||
|
||||
# Determine categorization
|
||||
category, subcategory = categorize_command(file_path)
|
||||
usage_scenario = determine_usage_scenario(name, description, category)
|
||||
difficulty = determine_difficulty(name, description, category)
|
||||
|
||||
# Build relative path
|
||||
rel_path = str(file_path.relative_to(COMMANDS_DIR)).replace('\\', '/')
|
||||
|
||||
# Build full command name from frontmatter name or construct it
|
||||
# If name already contains colons (e.g., "workflow:status"), use it directly
|
||||
if ':' in name:
|
||||
command_name = f"/{name}"
|
||||
elif category == "general":
|
||||
command_name = f"/{name}"
|
||||
else:
|
||||
# For subcategorized commands, build the full path
|
||||
if subcategory:
|
||||
command_name = f"/{category}:{subcategory}:{name}"
|
||||
else:
|
||||
command_name = f"/{category}:{name}"
|
||||
|
||||
return {
|
||||
"name": name,
|
||||
"command": command_name,
|
||||
"description": description,
|
||||
"arguments": argument_hint,
|
||||
"category": category,
|
||||
"subcategory": subcategory,
|
||||
"usage_scenario": usage_scenario,
|
||||
"difficulty": difficulty,
|
||||
"file_path": rel_path
|
||||
}
|
||||
|
||||
def build_command_relationships() -> Dict[str, Any]:
|
||||
"""Build command relationship mappings."""
|
||||
relationships = {
|
||||
# Workflow planning commands
|
||||
"workflow:plan": {
|
||||
"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:status", "workflow:execute"],
|
||||
"alternatives": ["workflow:tdd-plan"],
|
||||
"prerequisites": []
|
||||
},
|
||||
"workflow:tdd-plan": {
|
||||
"calls_internally": [
|
||||
"workflow:session:start",
|
||||
"workflow:tools:context-gather",
|
||||
"workflow:tools:task-generate-tdd"
|
||||
],
|
||||
"next_steps": ["workflow:tdd-verify", "workflow:status", "workflow:execute"],
|
||||
"alternatives": ["workflow:plan"],
|
||||
"prerequisites": []
|
||||
},
|
||||
|
||||
# Execution commands
|
||||
"workflow:execute": {
|
||||
"prerequisites": ["workflow:plan", "workflow:tdd-plan"],
|
||||
"related": ["workflow:status", "workflow:resume"],
|
||||
"next_steps": ["workflow:review", "workflow:tdd-verify"]
|
||||
},
|
||||
|
||||
# Verification commands
|
||||
"workflow:action-plan-verify": {
|
||||
"prerequisites": ["workflow:plan"],
|
||||
"next_steps": ["workflow:execute"],
|
||||
"related": ["workflow:status"]
|
||||
},
|
||||
"workflow:tdd-verify": {
|
||||
"prerequisites": ["workflow:execute"],
|
||||
"related": ["workflow:tools:tdd-coverage-analysis"]
|
||||
},
|
||||
|
||||
# Session management
|
||||
"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 management
|
||||
"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/Documentation
|
||||
"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 modes
|
||||
"cli:execute": {
|
||||
"alternatives": ["cli:codex-execute"],
|
||||
"related": ["cli:analyze", "cli:chat"]
|
||||
},
|
||||
"cli:analyze": {
|
||||
"related": ["cli:chat", "cli:mode:code-analysis"],
|
||||
"next_steps": ["cli:execute"]
|
||||
},
|
||||
|
||||
# Brainstorming
|
||||
"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"]
|
||||
},
|
||||
|
||||
# Test workflows
|
||||
"workflow:test-gen": {
|
||||
"prerequisites": ["workflow:execute"],
|
||||
"next_steps": ["workflow:test-cycle-execute"]
|
||||
},
|
||||
"workflow:test-fix-gen": {
|
||||
"alternatives": ["workflow:test-gen"],
|
||||
"next_steps": ["workflow:test-cycle-execute"]
|
||||
},
|
||||
"workflow:test-cycle-execute": {
|
||||
"prerequisites": ["workflow:test-gen", "workflow:test-fix-gen"],
|
||||
"related": ["workflow:tdd-verify"]
|
||||
},
|
||||
|
||||
# UI Design workflows
|
||||
"workflow:ui-design:explore-auto": {
|
||||
"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:imitate-auto": {
|
||||
"calls_internally": ["workflow:ui-design:capture"],
|
||||
"next_steps": ["workflow:ui-design:generate"]
|
||||
}
|
||||
}
|
||||
|
||||
return relationships
|
||||
|
||||
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
|
||||
essential_names = [
|
||||
"workflow:plan",
|
||||
"workflow:execute",
|
||||
"workflow:status",
|
||||
"workflow:session:start",
|
||||
"task:execute",
|
||||
"cli:analyze",
|
||||
"cli:chat",
|
||||
"memory:docs",
|
||||
"workflow:brainstorm:artifacts",
|
||||
"workflow:action-plan-verify",
|
||||
"workflow:resume",
|
||||
"workflow:review",
|
||||
"version",
|
||||
"enhance-prompt"
|
||||
]
|
||||
|
||||
essential = []
|
||||
for cmd in all_commands:
|
||||
# Check command name without leading slash
|
||||
cmd_name = cmd['command'].lstrip('/')
|
||||
if cmd_name in essential_names:
|
||||
essential.append(cmd)
|
||||
|
||||
# Sort by order in essential_names
|
||||
essential.sort(key=lambda x: essential_names.index(x['command'].lstrip('/')))
|
||||
|
||||
return essential[:14] # Limit to 14
|
||||
|
||||
def main():
|
||||
"""Main analysis function."""
|
||||
import sys
|
||||
import io
|
||||
|
||||
# Fix Windows console encoding
|
||||
if sys.platform == 'win32':
|
||||
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
|
||||
|
||||
print("Analyzing command files...")
|
||||
|
||||
# Find all command files
|
||||
command_files = list(COMMANDS_DIR.rglob("*.md"))
|
||||
print(f"Found {len(command_files)} command files")
|
||||
|
||||
# Analyze each command
|
||||
all_commands = []
|
||||
for cmd_file in sorted(command_files):
|
||||
try:
|
||||
metadata = analyze_command_file(cmd_file)
|
||||
all_commands.append(metadata)
|
||||
print(f" OK {metadata['command']}")
|
||||
except Exception as e:
|
||||
print(f" ERROR analyzing {cmd_file}: {e}")
|
||||
|
||||
print(f"\nAnalyzed {len(all_commands)} commands")
|
||||
|
||||
# Generate index files
|
||||
INDEX_DIR.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
# 1. all-commands.json
|
||||
all_commands_path = INDEX_DIR / "all-commands.json"
|
||||
with open(all_commands_path, 'w', encoding='utf-8') as f:
|
||||
json.dump(all_commands, f, indent=2, ensure_ascii=False)
|
||||
print(f"\nOK Generated {all_commands_path} ({os.path.getsize(all_commands_path)} bytes)")
|
||||
|
||||
# 2. by-category.json
|
||||
by_category = defaultdict(lambda: defaultdict(list))
|
||||
for cmd in all_commands:
|
||||
cat = cmd['category']
|
||||
subcat = cmd['subcategory'] or '_root'
|
||||
by_category[cat][subcat].append(cmd)
|
||||
|
||||
by_category_path = INDEX_DIR / "by-category.json"
|
||||
with open(by_category_path, 'w', encoding='utf-8') as f:
|
||||
json.dump(dict(by_category), f, indent=2, ensure_ascii=False)
|
||||
print(f"OK Generated {by_category_path} ({os.path.getsize(by_category_path)} bytes)")
|
||||
|
||||
# 3. by-use-case.json
|
||||
by_use_case = defaultdict(list)
|
||||
for cmd in all_commands:
|
||||
by_use_case[cmd['usage_scenario']].append(cmd)
|
||||
|
||||
by_use_case_path = INDEX_DIR / "by-use-case.json"
|
||||
with open(by_use_case_path, 'w', encoding='utf-8') as f:
|
||||
json.dump(dict(by_use_case), f, indent=2, ensure_ascii=False)
|
||||
print(f"OK Generated {by_use_case_path} ({os.path.getsize(by_use_case_path)} bytes)")
|
||||
|
||||
# 4. essential-commands.json
|
||||
essential = identify_essential_commands(all_commands)
|
||||
essential_path = INDEX_DIR / "essential-commands.json"
|
||||
with open(essential_path, 'w', encoding='utf-8') as f:
|
||||
json.dump(essential, f, indent=2, ensure_ascii=False)
|
||||
print(f"OK Generated {essential_path} ({os.path.getsize(essential_path)} bytes)")
|
||||
|
||||
# 5. command-relationships.json
|
||||
relationships = build_command_relationships()
|
||||
relationships_path = INDEX_DIR / "command-relationships.json"
|
||||
with open(relationships_path, 'w', encoding='utf-8') as f:
|
||||
json.dump(relationships, f, indent=2, ensure_ascii=False)
|
||||
print(f"OK Generated {relationships_path} ({os.path.getsize(relationships_path)} bytes)")
|
||||
|
||||
# Print summary statistics
|
||||
print("\n=== Summary Statistics ===")
|
||||
print(f"Total commands: {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())
|
||||
print(f" {cat}: {total}")
|
||||
for subcat in sorted(by_category[cat].keys()):
|
||||
if subcat != '_root':
|
||||
print(f" - {subcat}: {len(by_category[cat][subcat])}")
|
||||
|
||||
print(f"\nBy usage scenario:")
|
||||
for scenario in sorted(by_use_case.keys()):
|
||||
print(f" {scenario}: {len(by_use_case[scenario])}")
|
||||
|
||||
print(f"\nBy difficulty:")
|
||||
difficulty_counts = defaultdict(int)
|
||||
for cmd in all_commands:
|
||||
difficulty_counts[cmd['difficulty']] += 1
|
||||
for difficulty in ['Beginner', 'Intermediate', 'Advanced']:
|
||||
print(f" {difficulty}: {difficulty_counts[difficulty]}")
|
||||
|
||||
print(f"\nEssential commands: {len(essential)}")
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
130
.claude/skills/command-guide/scripts/update-index.sh
Normal file
130
.claude/skills/command-guide/scripts/update-index.sh
Normal file
@@ -0,0 +1,130 @@
|
||||
#!/bin/bash
|
||||
|
||||
##############################################################################
|
||||
# 命令索引更新脚本
|
||||
# 用途: 维护者使用此脚本重新生成命令索引文件
|
||||
# 使用: bash update-index.sh
|
||||
##############################################################################
|
||||
|
||||
set -e # 遇到错误立即退出
|
||||
|
||||
# 颜色输出
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
# 获取脚本所在目录
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
SKILL_DIR="$(dirname "$SCRIPT_DIR")"
|
||||
COMMANDS_DIR="$(dirname "$(dirname "$SKILL_DIR")")/commands"
|
||||
INDEX_DIR="$SKILL_DIR/index"
|
||||
|
||||
echo -e "${GREEN}=== 命令索引更新工具 ===${NC}"
|
||||
echo ""
|
||||
echo "技能目录: $SKILL_DIR"
|
||||
echo "命令目录: $COMMANDS_DIR"
|
||||
echo "索引目录: $INDEX_DIR"
|
||||
echo ""
|
||||
|
||||
# 检查命令目录是否存在
|
||||
if [ ! -d "$COMMANDS_DIR" ]; then
|
||||
echo -e "${RED}错误: 命令目录不存在: $COMMANDS_DIR${NC}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 检查 gemini 是否可用
|
||||
if ! command -v gemini &> /dev/null; then
|
||||
echo -e "${RED}错误: gemini 命令未找到${NC}"
|
||||
echo "请确保 gemini CLI 工具已安装并在 PATH 中"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 统计命令文件数量
|
||||
COMMAND_COUNT=$(find "$COMMANDS_DIR" -name "*.md" -type f | wc -l)
|
||||
echo -e "${YELLOW}发现 $COMMAND_COUNT 个命令文件${NC}"
|
||||
echo ""
|
||||
|
||||
# 备份现有索引(如果存在)
|
||||
if [ -d "$INDEX_DIR" ] && [ "$(ls -A $INDEX_DIR)" ]; then
|
||||
BACKUP_DIR="$INDEX_DIR/.backup-$(date +%Y%m%d-%H%M%S)"
|
||||
echo -e "${YELLOW}备份现有索引到: $BACKUP_DIR${NC}"
|
||||
mkdir -p "$BACKUP_DIR"
|
||||
cp "$INDEX_DIR"/*.json "$BACKUP_DIR/" 2>/dev/null || true
|
||||
echo ""
|
||||
fi
|
||||
|
||||
# 确保索引目录存在
|
||||
mkdir -p "$INDEX_DIR"
|
||||
|
||||
echo -e "${GREEN}开始生成索引...${NC}"
|
||||
echo ""
|
||||
|
||||
# 使用 gemini 生成索引
|
||||
cd "$COMMANDS_DIR" && gemini -p "
|
||||
PURPOSE: 解析所有命令文件(约 $COMMAND_COUNT 个)并重新生成结构化命令索引
|
||||
TASK:
|
||||
• 扫描所有 .md 命令文件(包括子目录)
|
||||
• 提取每个命令的元数据:name, description, arguments, category, subcategory
|
||||
• 分析命令的使用场景和难度等级(初级/中级/高级)
|
||||
• 识别命令之间的关联关系(通常一起使用的命令、前置依赖、后续推荐)
|
||||
• 识别10-15个最常用的核心命令
|
||||
• 按使用场景分类(planning/implementation/testing/documentation/session-management)
|
||||
• 生成5个 JSON 索引文件到 $INDEX_DIR 目录
|
||||
MODE: write
|
||||
CONTEXT: @**/*.md | Memory: 命令分为4大类:workflow, cli, memory, task,需要理解每个命令的实际用途来生成准确的索引
|
||||
EXPECTED: 生成5个规范的 JSON 文件:
|
||||
1. all-commands.json - 包含所有命令的完整信息数组
|
||||
2. by-category.json - 按 category/subcategory 层级组织
|
||||
3. by-use-case.json - 按使用场景(planning/implementation/testing等)组织
|
||||
4. essential-commands.json - 核心命令列表(10-15个)
|
||||
5. command-relationships.json - 命令关联关系图(command -> related_commands数组)
|
||||
每个命令对象包含:name, description, arguments, category, subcategory, usage_scenario, difficulty, file_path
|
||||
RULES: 保持一致的数据结构,JSON格式严格遵循规范,确保所有命令都被包含 | write=CREATE
|
||||
" -m gemini-2.5-flash --approval-mode yolo
|
||||
|
||||
# 检查生成结果
|
||||
if [ $? -eq 0 ]; then
|
||||
echo ""
|
||||
echo -e "${GREEN}✓ 索引生成成功!${NC}"
|
||||
echo ""
|
||||
echo "生成的索引文件:"
|
||||
ls -lh "$INDEX_DIR"/*.json
|
||||
echo ""
|
||||
|
||||
# 验证文件
|
||||
echo -e "${YELLOW}验证索引文件...${NC}"
|
||||
REQUIRED_FILES=("all-commands.json" "by-category.json" "by-use-case.json" "essential-commands.json" "command-relationships.json")
|
||||
ALL_EXIST=true
|
||||
|
||||
for file in "${REQUIRED_FILES[@]}"; do
|
||||
if [ -f "$INDEX_DIR/$file" ]; then
|
||||
echo -e "${GREEN}✓${NC} $file"
|
||||
else
|
||||
echo -e "${RED}✗${NC} $file (缺失)"
|
||||
ALL_EXIST=false
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
|
||||
if [ "$ALL_EXIST" = true ]; then
|
||||
echo -e "${GREEN}=== 索引更新完成!===${NC}"
|
||||
echo ""
|
||||
echo "后续步骤:"
|
||||
echo "1. 验证生成的索引内容是否正确"
|
||||
echo "2. 提交更新: git add .claude/skills/command-guide/index/"
|
||||
echo "3. 创建提交: git commit -m \"docs: 更新命令索引\""
|
||||
echo "4. 推送更新: git push"
|
||||
echo ""
|
||||
echo "团队成员执行 'git pull' 后将自动获取最新索引"
|
||||
else
|
||||
echo -e "${RED}=== 索引更新不完整,请检查错误 ===${NC}"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo ""
|
||||
echo -e "${RED}✗ 索引生成失败${NC}"
|
||||
echo "请检查 gemini 输出的错误信息"
|
||||
exit 1
|
||||
fi
|
||||
63
.claude/skills/command-guide/templates/issue-bug.md
Normal file
63
.claude/skills/command-guide/templates/issue-bug.md
Normal file
@@ -0,0 +1,63 @@
|
||||
---
|
||||
name: Bug 报告
|
||||
about: 报告命令执行问题或系统错误
|
||||
labels: bug
|
||||
---
|
||||
|
||||
# Bug 报告
|
||||
|
||||
## 问题描述
|
||||
|
||||
<!-- 简要描述遇到的问题 -->
|
||||
|
||||
## 执行的命令
|
||||
|
||||
```bash
|
||||
<!-- 粘贴执行的命令 -->
|
||||
```
|
||||
|
||||
## 期望行为
|
||||
|
||||
<!-- 描述您期望的结果是什么 -->
|
||||
|
||||
## 实际行为
|
||||
|
||||
<!-- 描述实际发生的情况,包括错误信息 -->
|
||||
|
||||
## 复现步骤
|
||||
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
## 环境信息
|
||||
|
||||
- **操作系统**: Windows / Mac / Linux
|
||||
- **OS 版本**:
|
||||
- **Claude Code 版本**:
|
||||
- **相关命令**:
|
||||
- **相关文件路径**:
|
||||
|
||||
## 错误日志
|
||||
|
||||
```
|
||||
<!-- 如有错误信息或日志,请粘贴在这里 -->
|
||||
```
|
||||
|
||||
## 额外上下文
|
||||
|
||||
<!-- 任何其他有助于理解问题的信息,如:
|
||||
- 是否是首次执行此命令
|
||||
- 之前是否成功执行过
|
||||
- 最近是否修改过配置或文件
|
||||
- 相关的 workflow session ID(如适用)
|
||||
-->
|
||||
|
||||
## 可能的解决方案(可选)
|
||||
|
||||
<!-- 如果您有任何想法或建议,请在这里描述 -->
|
||||
|
||||
---
|
||||
|
||||
**报告日期**: <!-- 自动填充 -->
|
||||
**报告人**: <!-- 自动填充 -->
|
||||
64
.claude/skills/command-guide/templates/issue-feature.md
Normal file
64
.claude/skills/command-guide/templates/issue-feature.md
Normal file
@@ -0,0 +1,64 @@
|
||||
---
|
||||
name: 功能请求
|
||||
about: 建议新功能或改进现有功能
|
||||
labels: enhancement
|
||||
---
|
||||
|
||||
# 功能请求
|
||||
|
||||
## 功能概述
|
||||
|
||||
<!-- 简要描述您希望添加或改进的功能 -->
|
||||
|
||||
## 问题背景
|
||||
|
||||
<!-- 描述当前的痛点或限制,这个功能将解决什么问题? -->
|
||||
|
||||
## 建议的解决方案
|
||||
|
||||
<!-- 详细描述您建议的功能实现方式 -->
|
||||
|
||||
## 使用场景
|
||||
|
||||
<!-- 描述具体的使用场景和示例 -->
|
||||
|
||||
### 场景 1:
|
||||
**情况**:
|
||||
**操作**:
|
||||
**期望结果**:
|
||||
|
||||
### 场景 2(可选):
|
||||
**情况**:
|
||||
**操作**:
|
||||
**期望结果**:
|
||||
|
||||
## 预期效果
|
||||
|
||||
<!-- 描述这个功能将如何改善工作流程或用户体验 -->
|
||||
|
||||
## 参考示例(可选)
|
||||
|
||||
<!-- 如果有类似功能的参考实现(其他工具、项目等),请提供链接或描述 -->
|
||||
|
||||
## 替代方案(可选)
|
||||
|
||||
<!-- 描述您考虑过的其他解决方案 -->
|
||||
|
||||
## 优先级
|
||||
|
||||
- [ ] 高 - 严重影响工作效率
|
||||
- [ ] 中 - 有明显改善但有变通方案
|
||||
- [ ] 低 - 锦上添花
|
||||
|
||||
## 额外信息
|
||||
|
||||
<!-- 任何其他相关信息,如:
|
||||
- 相关的命令或工作流
|
||||
- 技术实现建议
|
||||
- 可能的挑战或限制
|
||||
-->
|
||||
|
||||
---
|
||||
|
||||
**提交日期**: <!-- 自动填充 -->
|
||||
**提交人**: <!-- 自动填充 -->
|
||||
81
.claude/skills/command-guide/templates/issue-question.md
Normal file
81
.claude/skills/command-guide/templates/issue-question.md
Normal file
@@ -0,0 +1,81 @@
|
||||
---
|
||||
name: 问题咨询
|
||||
about: 询问使用方法、最佳实践或寻求帮助
|
||||
labels: question
|
||||
---
|
||||
|
||||
# 问题咨询
|
||||
|
||||
## 问题描述
|
||||
|
||||
<!-- 清楚地描述您的问题或困惑 -->
|
||||
|
||||
## 当前情况
|
||||
|
||||
<!-- 描述您当前的情况和已尝试的方法 -->
|
||||
|
||||
### 相关命令
|
||||
|
||||
```bash
|
||||
<!-- 如果与特定命令相关,请粘贴命令 -->
|
||||
```
|
||||
|
||||
### 已尝试的方法
|
||||
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
## 具体疑问
|
||||
|
||||
<!-- 详细说明您想要了解的内容 -->
|
||||
|
||||
### 问题 1:
|
||||
|
||||
|
||||
### 问题 2(可选):
|
||||
|
||||
|
||||
## 期望的解答
|
||||
|
||||
<!-- 描述您期望获得什么样的帮助或解答 -->
|
||||
|
||||
- [ ] 使用方法说明
|
||||
- [ ] 最佳实践建议
|
||||
- [ ] 示例代码或配置
|
||||
- [ ] 故障排除指导
|
||||
- [ ] 概念解释
|
||||
- [ ] 其他:
|
||||
|
||||
## 上下文信息
|
||||
|
||||
### 使用场景
|
||||
<!-- 描述您的具体使用场景 -->
|
||||
|
||||
### 项目类型
|
||||
<!-- 如果相关,描述您的项目类型,如:Web 应用、API 服务、数据分析等 -->
|
||||
|
||||
### 相关文档
|
||||
<!-- 列出您已经查看过的相关文档 -->
|
||||
|
||||
- [ ] getting-started.md
|
||||
- [ ] workflow-patterns.md
|
||||
- [ ] cli-tools-guide.md
|
||||
- [ ] troubleshooting.md
|
||||
- [ ] 命令文档:
|
||||
- [ ] 其他:
|
||||
|
||||
## 紧急程度
|
||||
|
||||
- [ ] 紧急 - 阻碍当前工作
|
||||
- [ ] 一般 - 希望尽快了解
|
||||
- [ ] 不急 - 学习和改进目的
|
||||
|
||||
## 额外信息
|
||||
|
||||
<!-- 任何其他可能有助于理解或解答的信息 -->
|
||||
|
||||
---
|
||||
|
||||
**提问日期**: <!-- 自动填充 -->
|
||||
**提问人**: <!-- 自动填充 -->
|
||||
@@ -1,83 +0,0 @@
|
||||
You are the archive-analysis-agent. Your mission is to analyze a completed workflow session and extract actionable lessons in JSON format.
|
||||
|
||||
## Input Context
|
||||
You will analyze the session directory structure containing:
|
||||
- workflow-session.json: Session metadata
|
||||
- IMPL_PLAN.md: Implementation plan
|
||||
- .task/*.json: Task definitions
|
||||
- .summaries/*.md: Task completion summaries
|
||||
- .process/context-package.json: Initial context and conflict detection
|
||||
|
||||
## Analysis Tasks
|
||||
|
||||
### 1. Identify Successes
|
||||
Find design patterns, architectural decisions, or solutions that worked well.
|
||||
- Look for elegant solutions in .summaries/
|
||||
- Identify reusable patterns from IMPL_PLAN.md
|
||||
- Include file references using @path/to/file.ext format
|
||||
|
||||
### 2. Document Challenges
|
||||
Identify problems encountered during implementation.
|
||||
- Failed tasks or iterations from .process/ logs
|
||||
- Issues mentioned in summaries
|
||||
- Unexpected complications or blockers
|
||||
|
||||
### 3. Extract Watch Patterns
|
||||
Create actionable conflict prevention rules for future sessions.
|
||||
- Review context-package.json conflict_detection section
|
||||
- Analyze what files were modified together
|
||||
- Identify dependencies that weren't initially obvious
|
||||
- Format: "When doing X, check/verify Y"
|
||||
|
||||
## Output Format
|
||||
|
||||
Return ONLY a valid JSON object (no markdown, no explanations):
|
||||
|
||||
{
|
||||
"successes": [
|
||||
"Success pattern description @path/to/file.ext",
|
||||
"Another success with file reference @another/file.ts"
|
||||
],
|
||||
"challenges": [
|
||||
"Challenge or problem encountered",
|
||||
"Another issue that required extra effort"
|
||||
],
|
||||
"watch_patterns": [
|
||||
{
|
||||
"pattern": "When modifying X component/model/service",
|
||||
"action": "Check Y and Z for dependencies/impacts",
|
||||
"related_files": ["path/to/file1.ts", "path/to/file2.ts"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
## Quality Guidelines
|
||||
|
||||
**Successes**:
|
||||
- Be specific about what worked and why
|
||||
- Include file paths for pattern reuse
|
||||
- Focus on reusable architectural decisions
|
||||
|
||||
**Challenges**:
|
||||
- Document what made the task difficult
|
||||
- Include lessons about what to avoid
|
||||
- Note any tooling or process gaps
|
||||
|
||||
**Watch Patterns**:
|
||||
- Must be actionable and specific
|
||||
- Include trigger condition (pattern)
|
||||
- Specify what to check (action)
|
||||
- List relevant files to review
|
||||
- Minimum 1, maximum 5 patterns per session
|
||||
|
||||
**File References**:
|
||||
- Use relative paths from project root
|
||||
- Use @ prefix for inline references: "@src/models/User.ts"
|
||||
- Array format for related_files: ["src/models/User.ts"]
|
||||
|
||||
## Analysis Depth
|
||||
|
||||
- Keep each item concise (1-2 sentences)
|
||||
- Focus on high-impact insights
|
||||
- Prioritize patterns that prevent future conflicts
|
||||
- Aim for 2-4 successes, 1-3 challenges, 1-3 watch patterns
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user