mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-02 15:23:19 +08:00
feat: Implement IDAW commands and update favicon/logo SVGs
- Added IDAW (Independent Development Autonomous Workflow) commands for batch task execution, including `/idaw:add`, `/idaw:run`, `/idaw:status`, and `/idaw:resume`. - Updated documentation for IDAW commands in both English and Chinese. - Modified favicon and logo SVGs to reflect new orbital design with dynamic colors. - Incremented package version from 7.0.6 to 7.0.9.
This commit is contained in:
@@ -119,6 +119,7 @@ export default withMermaid(defineConfig({
|
|||||||
{ text: 'Workflow', link: '/commands/claude/workflow' },
|
{ text: 'Workflow', link: '/commands/claude/workflow' },
|
||||||
{ text: 'Session', link: '/commands/claude/session' },
|
{ text: 'Session', link: '/commands/claude/session' },
|
||||||
{ text: 'Issue', link: '/commands/claude/issue' },
|
{ text: 'Issue', link: '/commands/claude/issue' },
|
||||||
|
{ text: 'IDAW', link: '/commands/claude/idaw' },
|
||||||
{ text: 'Memory', link: '/commands/claude/memory' },
|
{ text: 'Memory', link: '/commands/claude/memory' },
|
||||||
{ text: 'CLI', link: '/commands/claude/cli' },
|
{ text: 'CLI', link: '/commands/claude/cli' },
|
||||||
{ text: 'UI Design', link: '/commands/claude/ui-design' }
|
{ text: 'UI Design', link: '/commands/claude/ui-design' }
|
||||||
@@ -378,6 +379,7 @@ export default withMermaid(defineConfig({
|
|||||||
{ text: '工作流', link: '/zh/commands/claude/workflow' },
|
{ text: '工作流', link: '/zh/commands/claude/workflow' },
|
||||||
{ text: '会话管理', link: '/zh/commands/claude/session' },
|
{ text: '会话管理', link: '/zh/commands/claude/session' },
|
||||||
{ text: 'Issue', link: '/zh/commands/claude/issue' },
|
{ text: 'Issue', link: '/zh/commands/claude/issue' },
|
||||||
|
{ text: 'IDAW', link: '/zh/commands/claude/idaw' },
|
||||||
{ text: 'Memory', link: '/zh/commands/claude/memory' },
|
{ text: 'Memory', link: '/zh/commands/claude/memory' },
|
||||||
{ text: 'CLI', link: '/zh/commands/claude/cli' },
|
{ text: 'CLI', link: '/zh/commands/claude/cli' },
|
||||||
{ text: 'UI 设计', link: '/zh/commands/claude/ui-design' }
|
{ text: 'UI 设计', link: '/zh/commands/claude/ui-design' }
|
||||||
|
|||||||
@@ -39,14 +39,22 @@
|
|||||||
<!-- Main badge -->
|
<!-- Main badge -->
|
||||||
<rect x="-56" y="-20" width="112" height="40" rx="12" class="ccw-bg" filter="url(#ccwShadow)"/>
|
<rect x="-56" y="-20" width="112" height="40" rx="12" class="ccw-bg" filter="url(#ccwShadow)"/>
|
||||||
<rect x="-56" y="-20" width="112" height="40" rx="12" fill="none" stroke="url(#ccwBorder)" stroke-width="1.2"/>
|
<rect x="-56" y="-20" width="112" height="40" rx="12" fill="none" stroke="url(#ccwBorder)" stroke-width="1.2"/>
|
||||||
<!-- Logo icon (simplified favicon: blue square + white lines + green dot) -->
|
<!-- Logo icon (orbital design) -->
|
||||||
<g transform="translate(-48, -13)">
|
<g transform="translate(-48, -13)">
|
||||||
<rect width="26" height="26" rx="6" fill="var(--vp-c-brand-1)" opacity="0.12"/>
|
<rect width="26" height="26" rx="6" fill="var(--vp-c-brand-1)" opacity="0.12"/>
|
||||||
<rect width="26" height="26" rx="6" fill="none" stroke="var(--vp-c-brand-1)" stroke-width="0.8" opacity="0.25"/>
|
<rect width="26" height="26" rx="6" fill="none" stroke="var(--vp-c-brand-1)" stroke-width="0.8" opacity="0.25"/>
|
||||||
<line x1="6" y1="9" x2="20" y2="9" stroke="var(--vp-c-brand-1)" stroke-width="2" stroke-linecap="round" opacity="0.65"/>
|
<svg x="1" y="1" width="24" height="24" viewBox="-1 -1 26 26" fill="none" stroke="var(--vp-c-brand-1)" stroke-linecap="round" stroke-linejoin="round">
|
||||||
<line x1="6" y1="13" x2="17" y2="13" stroke="var(--vp-c-brand-1)" stroke-width="2" stroke-linecap="round" opacity="0.65"/>
|
<path d="M4 12 A8 3 0 0 1 20 12" stroke-width="0.8" opacity="0.2"/>
|
||||||
<line x1="6" y1="17" x2="14" y2="17" stroke="var(--vp-c-brand-1)" stroke-width="2" stroke-linecap="round" opacity="0.65"/>
|
<path d="M16.9 19.5 A8 3 30 0 1 7.1 4.5" stroke-width="0.8" opacity="0.2"/>
|
||||||
<circle cx="19" cy="17.5" r="3" fill="#22C55E" opacity="0.8"/>
|
<path d="M7.1 19.5 A8 3 -30 0 1 16.9 4.5" stroke-width="0.8" opacity="0.2"/>
|
||||||
|
<circle cx="12" cy="12" r="1.5" fill="var(--vp-c-brand-1)" stroke="none" opacity="0.15"/>
|
||||||
|
<path d="M20 12 A8 3 0 0 1 4 12" stroke-width="1.2" opacity="0.5"/>
|
||||||
|
<path d="M7.1 4.5 A8 3 30 0 1 16.9 19.5" stroke-width="1.2" opacity="0.5"/>
|
||||||
|
<path d="M16.9 4.5 A8 3 -30 0 1 7.1 19.5" stroke-width="1.2" opacity="0.5"/>
|
||||||
|
<circle cx="17" cy="10.5" r="1.5" fill="#D97757" stroke="none" opacity="0.8"/>
|
||||||
|
<circle cx="8" cy="16" r="1.5" fill="#10A37F" stroke="none" opacity="0.8"/>
|
||||||
|
<circle cx="14" cy="5.5" r="1.5" fill="#4285F4" stroke="none" opacity="0.8"/>
|
||||||
|
</svg>
|
||||||
</g>
|
</g>
|
||||||
<!-- Text — shifted right to avoid logo overlap -->
|
<!-- Text — shifted right to avoid logo overlap -->
|
||||||
<text x="16" y="0" text-anchor="middle" class="ccw-label">CCW</text>
|
<text x="16" y="0" text-anchor="middle" class="ccw-label">CCW</text>
|
||||||
|
|||||||
@@ -1,52 +1,47 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import { ref, onMounted, onUnmounted } from 'vue'
|
|
||||||
|
|
||||||
const dotColor = ref('var(--vp-c-primary)')
|
|
||||||
|
|
||||||
function updateDotColor() {
|
|
||||||
if (typeof document === 'undefined') return
|
|
||||||
|
|
||||||
const root = document.documentElement
|
|
||||||
const style = getComputedStyle(root)
|
|
||||||
const primaryColor = style.getPropertyValue('--vp-c-primary').trim()
|
|
||||||
dotColor.value = primaryColor || 'currentColor'
|
|
||||||
}
|
|
||||||
|
|
||||||
let observer: MutationObserver | null = null
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
updateDotColor()
|
|
||||||
|
|
||||||
// Watch for theme changes via MutationObserver
|
|
||||||
observer = new MutationObserver(() => {
|
|
||||||
updateDotColor()
|
|
||||||
})
|
|
||||||
|
|
||||||
observer.observe(document.documentElement, {
|
|
||||||
attributes: true,
|
|
||||||
attributeFilter: ['data-theme', 'class'],
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
onUnmounted(() => {
|
|
||||||
observer?.disconnect()
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
viewBox="0 0 24 24"
|
viewBox="-1 -1 26 26"
|
||||||
fill="none"
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
class="theme-logo"
|
class="theme-logo"
|
||||||
aria-label="Claude Code Workflow"
|
aria-label="Claude Code Workflow"
|
||||||
>
|
>
|
||||||
<!-- Three horizontal lines - use currentColor to inherit from text -->
|
<!-- Back orbit halves -->
|
||||||
<line x1="3" y1="6" x2="18" y2="6" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
<path d="M4 12 A8 3 0 0 1 20 12" stroke-width="0.9" opacity="0.15"/>
|
||||||
<line x1="3" y1="12" x2="15" y2="12" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
<path d="M16.9 19.5 A8 3 30 0 1 7.1 4.5" stroke-width="0.9" opacity="0.15"/>
|
||||||
<line x1="3" y1="18" x2="12" y2="18" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
<path d="M7.1 19.5 A8 3 -30 0 1 16.9 4.5" stroke-width="0.9" opacity="0.15"/>
|
||||||
<!-- Status dot - follows theme primary color -->
|
<!-- Core breathing pulse -->
|
||||||
<circle cx="19" cy="17" r="3" :style="{ fill: dotColor }"/>
|
<circle cx="12" cy="12" r="2" fill="currentColor" stroke="none" opacity="0.1">
|
||||||
|
<animate attributeName="opacity" dur="4s" repeatCount="indefinite" values="0.06;0.18;0.06"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="12" cy="12" r="1" fill="currentColor" stroke="none" opacity="0.25">
|
||||||
|
<animate attributeName="opacity" dur="4s" repeatCount="indefinite" values="0.15;0.4;0.15"/>
|
||||||
|
</circle>
|
||||||
|
<!-- Front orbit halves -->
|
||||||
|
<path d="M20 12 A8 3 0 0 1 4 12" stroke-width="1.3" opacity="0.75"/>
|
||||||
|
<path d="M7.1 4.5 A8 3 30 0 1 16.9 19.5" stroke-width="1.3" opacity="0.75"/>
|
||||||
|
<path d="M16.9 4.5 A8 3 -30 0 1 7.1 19.5" stroke-width="1.3" opacity="0.75"/>
|
||||||
|
<!-- Claude agent -->
|
||||||
|
<g>
|
||||||
|
<animateMotion dur="8s" repeatCount="indefinite" path="M20,12 A8,3,0,0,0,4,12 A8,3,0,0,0,20,12"/>
|
||||||
|
<animate attributeName="opacity" dur="8s" repeatCount="indefinite" values="0.95;0.95;0.3;0.3;0.95" keyTimes="0;0.35;0.5;0.65;1"/>
|
||||||
|
<circle r="1.5" fill="#D97757" stroke="none" opacity="0.9"/>
|
||||||
|
</g>
|
||||||
|
<!-- OpenAI agent -->
|
||||||
|
<g>
|
||||||
|
<animateMotion dur="10s" repeatCount="indefinite" begin="-3s" path="M7.1,4.5 A8,3,30,0,1,16.9,19.5 A8,3,30,0,1,7.1,4.5"/>
|
||||||
|
<animate attributeName="opacity" dur="10s" repeatCount="indefinite" begin="-3s" values="0.95;0.95;0.3;0.3;0.95" keyTimes="0;0.35;0.5;0.65;1"/>
|
||||||
|
<circle r="1.5" fill="#10A37F" stroke="none" opacity="0.9"/>
|
||||||
|
</g>
|
||||||
|
<!-- Gemini agent -->
|
||||||
|
<g>
|
||||||
|
<animateMotion dur="12s" repeatCount="indefinite" begin="-5s" path="M16.9,4.5 A8,3,-30,0,1,7.1,19.5 A8,3,-30,0,1,16.9,4.5"/>
|
||||||
|
<animate attributeName="opacity" dur="12s" repeatCount="indefinite" begin="-5s" values="0.95;0.95;0.3;0.3;0.95" keyTimes="0;0.35;0.5;0.65;1"/>
|
||||||
|
<circle r="1.5" fill="#4285F4" stroke="none" opacity="0.9"/>
|
||||||
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -56,9 +51,4 @@ onUnmounted(() => {
|
|||||||
height: 24px;
|
height: 24px;
|
||||||
color: var(--vp-c-text-1);
|
color: var(--vp-c-text-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.theme-logo circle {
|
|
||||||
fill: var(--vp-c-primary);
|
|
||||||
transition: fill 0.3s ease;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -77,17 +77,22 @@ export function getStatusColor(isDark: boolean): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate favicon SVG with dynamic colors (line style)
|
* Generate favicon SVG with orbital design
|
||||||
*/
|
*/
|
||||||
export function generateFaviconSvg(theme: ThemeName, isDark: boolean): string {
|
export function generateFaviconSvg(theme: ThemeName, isDark: boolean): string {
|
||||||
const lineColor = getThemeColor(theme, isDark)
|
const orbitColor = getThemeColor(theme, isDark)
|
||||||
const dotColor = getThemeColor(theme, isDark) // Dot follows theme color
|
|
||||||
|
|
||||||
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
|
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="-1 -1 26 26" fill="none" stroke="${orbitColor}" stroke-linecap="round" stroke-linejoin="round">
|
||||||
<line x1="3" y1="6" x2="18" y2="6" stroke="${lineColor}" stroke-width="2" stroke-linecap="round"/>
|
<path d="M4 12 A8 3 0 0 1 20 12" stroke-width="0.9" opacity="0.15"/>
|
||||||
<line x1="3" y1="12" x2="15" y2="12" stroke="${lineColor}" stroke-width="2" stroke-linecap="round"/>
|
<path d="M16.9 19.5 A8 3 30 0 1 7.1 4.5" stroke-width="0.9" opacity="0.15"/>
|
||||||
<line x1="3" y1="18" x2="12" y2="18" stroke="${lineColor}" stroke-width="2" stroke-linecap="round"/>
|
<path d="M7.1 19.5 A8 3 -30 0 1 16.9 4.5" stroke-width="0.9" opacity="0.15"/>
|
||||||
<circle cx="19" cy="17" r="3" fill="${dotColor}"/>
|
<circle cx="12" cy="12" r="1.5" fill="${orbitColor}" stroke="none" opacity="0.2"/>
|
||||||
|
<path d="M20 12 A8 3 0 0 1 4 12" stroke-width="1.3" opacity="0.75"/>
|
||||||
|
<path d="M7.1 4.5 A8 3 30 0 1 16.9 19.5" stroke-width="1.3" opacity="0.75"/>
|
||||||
|
<path d="M16.9 4.5 A8 3 -30 0 1 7.1 19.5" stroke-width="1.3" opacity="0.75"/>
|
||||||
|
<circle cx="17" cy="10.5" r="1.8" fill="#D97757" stroke="none"/>
|
||||||
|
<circle cx="8" cy="16" r="1.8" fill="#10A37F" stroke="none"/>
|
||||||
|
<circle cx="14" cy="5.5" r="1.8" fill="#4285F4" stroke="none"/>
|
||||||
</svg>`
|
</svg>`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
350
docs/commands/claude/idaw.md
Normal file
350
docs/commands/claude/idaw.md
Normal file
@@ -0,0 +1,350 @@
|
|||||||
|
# IDAW Commands
|
||||||
|
|
||||||
|
## One-Liner
|
||||||
|
|
||||||
|
**IDAW (Independent Development Autonomous Workflow) is the batch task execution engine** — queue development tasks, execute skill chains serially with per-task git checkpoints, and resume from interruptions.
|
||||||
|
|
||||||
|
## Core Concepts
|
||||||
|
|
||||||
|
| Concept | Description | Location |
|
||||||
|
|---------|-------------|----------|
|
||||||
|
| **Task** | Independent JSON task definition | `.workflow/.idaw/tasks/IDAW-*.json` |
|
||||||
|
| **Session** | Execution session with progress tracking | `.workflow/.idaw/sessions/IDA-*/` |
|
||||||
|
| **Skill Chain** | Ordered sequence of skills per task type | Mapped from `SKILL_CHAIN_MAP` |
|
||||||
|
| **Checkpoint** | Per-task git commit after successful execution | Automatic `git add -A && git commit` |
|
||||||
|
|
||||||
|
## IDAW vs Issue System
|
||||||
|
|
||||||
|
| Aspect | Issue System | IDAW |
|
||||||
|
|--------|-------------|------|
|
||||||
|
| **Granularity** | Fine-grained, multi-step orchestration | Coarse-grained, batch autonomous |
|
||||||
|
| **Pipeline** | new → plan → queue → execute | add → run (all-in-one) |
|
||||||
|
| **Execution** | DAG parallel | Serial with checkpoints |
|
||||||
|
| **Storage** | `.workflow/issues.jsonl` | `.workflow/.idaw/tasks/IDAW-*.json` |
|
||||||
|
| **Use Case** | Individual issue resolution | Batch task queue, unattended execution |
|
||||||
|
|
||||||
|
## Command List
|
||||||
|
|
||||||
|
| Command | Function | Syntax |
|
||||||
|
|---------|----------|--------|
|
||||||
|
| [`add`](#add) | Create tasks manually or import from issue | `/idaw:add [-y] [--from-issue <id>] "description" [--type <type>] [--priority 1-5]` |
|
||||||
|
| [`run`](#run) | Execute task queue with git checkpoints | `/idaw:run [-y] [--task <id,...>] [--dry-run]` |
|
||||||
|
| [`status`](#status) | View task and session progress | `/idaw:status [session-id]` |
|
||||||
|
| [`resume`](#resume) | Resume interrupted session | `/idaw:resume [-y] [session-id]` |
|
||||||
|
|
||||||
|
## Command Details
|
||||||
|
|
||||||
|
### add
|
||||||
|
|
||||||
|
**Function**: Create IDAW tasks manually or import from existing ccw issues.
|
||||||
|
|
||||||
|
**Syntax**:
|
||||||
|
```bash
|
||||||
|
/idaw:add [-y|--yes] [--from-issue <id>[,<id>,...]] "description" [--type <task_type>] [--priority <1-5>]
|
||||||
|
```
|
||||||
|
|
||||||
|
**Options**:
|
||||||
|
- `--from-issue <id>`: Import from ccw issue (comma-separated for multiple)
|
||||||
|
- `--type <type>`: Explicit task type (see [Task Types](#task-types))
|
||||||
|
- `--priority 1-5`: Priority (1=critical, 5=low, default=3)
|
||||||
|
|
||||||
|
**Modes**:
|
||||||
|
|
||||||
|
| Mode | Trigger | Behavior |
|
||||||
|
|------|---------|----------|
|
||||||
|
| Manual | No `--from-issue` | Parse description, generate task |
|
||||||
|
| Import | `--from-issue` | Fetch issue, freeze snapshot, create task |
|
||||||
|
|
||||||
|
**Examples**:
|
||||||
|
```bash
|
||||||
|
# Manual creation
|
||||||
|
/idaw:add "Fix login timeout bug" --type bugfix --priority 2
|
||||||
|
/idaw:add "Add rate limiting to API endpoints" --priority 1
|
||||||
|
/idaw:add "Refactor auth module to use strategy pattern"
|
||||||
|
|
||||||
|
# Import from ccw issue
|
||||||
|
/idaw:add --from-issue ISS-20260128-001
|
||||||
|
/idaw:add --from-issue ISS-20260128-001,ISS-20260128-002
|
||||||
|
|
||||||
|
# Auto mode (skip clarification)
|
||||||
|
/idaw:add -y "Quick fix for typo in header"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Output**:
|
||||||
|
```
|
||||||
|
Created IDAW-001: Fix login timeout bug
|
||||||
|
Type: bugfix | Priority: 2 | Source: manual
|
||||||
|
→ Next: /idaw:run or /idaw:status
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### run
|
||||||
|
|
||||||
|
**Function**: Main orchestrator — execute task skill chains serially with git checkpoints.
|
||||||
|
|
||||||
|
**Syntax**:
|
||||||
|
```bash
|
||||||
|
/idaw:run [-y|--yes] [--task <id>[,<id>,...]] [--dry-run]
|
||||||
|
```
|
||||||
|
|
||||||
|
**Options**:
|
||||||
|
- `--task <id,...>`: Execute specific tasks (default: all pending)
|
||||||
|
- `--dry-run`: Show execution plan without running
|
||||||
|
- `-y`: Auto mode — skip confirmations, auto-skip on failure
|
||||||
|
|
||||||
|
**6-Phase Execution**:
|
||||||
|
|
||||||
|
```
|
||||||
|
Phase 1: Load Tasks
|
||||||
|
└─ Glob IDAW-*.json → filter → sort by priority ASC, ID ASC
|
||||||
|
|
||||||
|
Phase 2: Session Setup
|
||||||
|
└─ Create session.json + progress.md + TodoWrite
|
||||||
|
|
||||||
|
Phase 3: Startup Protocol
|
||||||
|
├─ Check running sessions → offer resume or fresh
|
||||||
|
└─ Check git status → stash/continue/abort
|
||||||
|
|
||||||
|
Phase 4: Main Loop (serial)
|
||||||
|
For each task:
|
||||||
|
├─ Resolve: skill_chain || SKILL_CHAIN_MAP[task_type || inferred]
|
||||||
|
├─ Execute each skill (retry once on failure)
|
||||||
|
└─ On error: skip (autoYes) or ask (interactive)
|
||||||
|
|
||||||
|
Phase 5: Checkpoint (per task)
|
||||||
|
├─ git add -A && git commit
|
||||||
|
├─ Update task.json + session.json
|
||||||
|
└─ Append to progress.md
|
||||||
|
|
||||||
|
Phase 6: Report
|
||||||
|
└─ Summary: completed/failed/skipped counts + git commits
|
||||||
|
```
|
||||||
|
|
||||||
|
**Examples**:
|
||||||
|
```bash
|
||||||
|
# Execute all pending tasks (auto mode)
|
||||||
|
/idaw:run -y
|
||||||
|
|
||||||
|
# Execute specific tasks
|
||||||
|
/idaw:run --task IDAW-001,IDAW-003
|
||||||
|
|
||||||
|
# Preview execution plan
|
||||||
|
/idaw:run --dry-run
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### status
|
||||||
|
|
||||||
|
**Function**: Read-only view of IDAW task queue and session progress.
|
||||||
|
|
||||||
|
**Syntax**:
|
||||||
|
```bash
|
||||||
|
/idaw:status [session-id]
|
||||||
|
```
|
||||||
|
|
||||||
|
**View Modes**:
|
||||||
|
|
||||||
|
| Mode | Trigger | Output |
|
||||||
|
|------|---------|--------|
|
||||||
|
| Overview | No arguments | All tasks table + latest session summary |
|
||||||
|
| Session Detail | Session ID provided | Task × status × commit table + progress.md |
|
||||||
|
|
||||||
|
**Examples**:
|
||||||
|
```bash
|
||||||
|
# Overview
|
||||||
|
/idaw:status
|
||||||
|
|
||||||
|
# Specific session
|
||||||
|
/idaw:status IDA-auth-fix-20260301
|
||||||
|
```
|
||||||
|
|
||||||
|
**Output Example**:
|
||||||
|
```
|
||||||
|
# IDAW Tasks
|
||||||
|
|
||||||
|
| ID | Title | Type | Priority | Status |
|
||||||
|
|----------|--------------------------|---------|----------|-----------|
|
||||||
|
| IDAW-001 | Fix auth token refresh | bugfix | 1 | completed |
|
||||||
|
| IDAW-002 | Add rate limiting | feature | 2 | pending |
|
||||||
|
| IDAW-003 | Refactor payment module | refactor| 3 | pending |
|
||||||
|
|
||||||
|
Total: 3 | Pending: 2 | Completed: 1 | Failed: 0
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### resume
|
||||||
|
|
||||||
|
**Function**: Resume an interrupted IDAW session from the last checkpoint.
|
||||||
|
|
||||||
|
**Syntax**:
|
||||||
|
```bash
|
||||||
|
/idaw:resume [-y|--yes] [session-id]
|
||||||
|
```
|
||||||
|
|
||||||
|
**Options**:
|
||||||
|
- `session-id`: Resume specific session (default: latest running)
|
||||||
|
- `-y`: Auto-skip interrupted task, continue with remaining
|
||||||
|
|
||||||
|
**Recovery Flow**:
|
||||||
|
```
|
||||||
|
1. Find session with status=running
|
||||||
|
2. Handle interrupted task (in_progress):
|
||||||
|
├─ autoYes → mark as skipped
|
||||||
|
└─ interactive → ask: Retry or Skip
|
||||||
|
3. Build remaining task queue
|
||||||
|
4. Execute Phase 4-6 from /idaw:run
|
||||||
|
```
|
||||||
|
|
||||||
|
**Examples**:
|
||||||
|
```bash
|
||||||
|
# Resume most recent running session
|
||||||
|
/idaw:resume
|
||||||
|
|
||||||
|
# Resume specific session
|
||||||
|
/idaw:resume IDA-auth-fix-20260301
|
||||||
|
|
||||||
|
# Resume with auto mode
|
||||||
|
/idaw:resume -y
|
||||||
|
```
|
||||||
|
|
||||||
|
## Task Types
|
||||||
|
|
||||||
|
IDAW supports 10 task types, each mapping to a specific skill chain:
|
||||||
|
|
||||||
|
| Task Type | Skill Chain | Use Case |
|
||||||
|
|-----------|-------------|----------|
|
||||||
|
| `bugfix` | lite-plan → test-fix | Standard bug fixes |
|
||||||
|
| `bugfix-hotfix` | lite-plan (--hotfix) | Urgent production fixes |
|
||||||
|
| `feature` | lite-plan → test-fix | New features |
|
||||||
|
| `feature-complex` | plan → execute → test-fix | Multi-module features |
|
||||||
|
| `refactor` | refactor-cycle | Code restructuring |
|
||||||
|
| `tdd` | tdd-plan → execute | Test-driven development |
|
||||||
|
| `test` | test-fix | Test generation |
|
||||||
|
| `test-fix` | test-fix | Fix failing tests |
|
||||||
|
| `review` | review-cycle | Code review |
|
||||||
|
| `docs` | lite-plan | Documentation |
|
||||||
|
|
||||||
|
**Type Resolution**: Explicit `task_type` field takes priority. When null, the type is inferred from title and description using keyword matching at execution time.
|
||||||
|
|
||||||
|
## Task Schema
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"id": "IDAW-001",
|
||||||
|
"title": "Fix auth token refresh race condition",
|
||||||
|
"description": "Detailed problem/goal description...",
|
||||||
|
"status": "pending",
|
||||||
|
"priority": 2,
|
||||||
|
"task_type": "bugfix",
|
||||||
|
"skill_chain": null,
|
||||||
|
"context": {
|
||||||
|
"affected_files": ["src/auth/token-manager.ts"],
|
||||||
|
"acceptance_criteria": ["No concurrent refresh requests"],
|
||||||
|
"constraints": [],
|
||||||
|
"references": []
|
||||||
|
},
|
||||||
|
"source": {
|
||||||
|
"type": "manual",
|
||||||
|
"issue_id": null,
|
||||||
|
"issue_snapshot": null
|
||||||
|
},
|
||||||
|
"execution": {
|
||||||
|
"session_id": null,
|
||||||
|
"started_at": null,
|
||||||
|
"completed_at": null,
|
||||||
|
"skill_results": [],
|
||||||
|
"git_commit": null,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
"created_at": "2026-03-01T10:00:00Z",
|
||||||
|
"updated_at": "2026-03-01T10:00:00Z"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Key Fields**:
|
||||||
|
- `task_type`: Optional — inferred from title/description when null
|
||||||
|
- `skill_chain`: Optional — overrides automatic mapping when set
|
||||||
|
- `source.type`: `manual` or `import-issue`
|
||||||
|
- `source.issue_snapshot`: Frozen copy of original issue data (import only)
|
||||||
|
- `execution`: Runtime state populated by `/idaw:run`
|
||||||
|
|
||||||
|
## Task Lifecycle
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
graph TD
|
||||||
|
A["/idaw:add"] --> B["pending"]
|
||||||
|
B --> C["/idaw:run"]
|
||||||
|
C --> D["in_progress"]
|
||||||
|
D --> E{"Skill Chain"}
|
||||||
|
E -->|Success| F["completed (git commit)"]
|
||||||
|
E -->|Retry once| G{"Retry"}
|
||||||
|
G -->|Success| F
|
||||||
|
G -->|Fail| H{"autoYes?"}
|
||||||
|
H -->|Yes| I["failed (skip)"]
|
||||||
|
H -->|No| J["Ask: Skip/Abort"]
|
||||||
|
J -->|Skip| I
|
||||||
|
J -->|Abort| K["Session failed"]
|
||||||
|
|
||||||
|
L["/idaw:resume"] --> M{"Interrupted task"}
|
||||||
|
M -->|Retry| B
|
||||||
|
M -->|Skip| N["skipped"]
|
||||||
|
```
|
||||||
|
|
||||||
|
## Directory Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
.workflow/.idaw/
|
||||||
|
├── tasks/ # Task definitions (persist across sessions)
|
||||||
|
│ ├── IDAW-001.json
|
||||||
|
│ ├── IDAW-002.json
|
||||||
|
│ └── IDAW-003.json
|
||||||
|
└── sessions/ # Execution sessions
|
||||||
|
└── IDA-{slug}-YYYYMMDD/
|
||||||
|
├── session.json # Session state + task queue
|
||||||
|
└── progress.md # Human-readable progress log
|
||||||
|
```
|
||||||
|
|
||||||
|
## Error Handling
|
||||||
|
|
||||||
|
| Error | Resolution |
|
||||||
|
|-------|------------|
|
||||||
|
| No tasks found | Suggest `/idaw:add` |
|
||||||
|
| Task JSON parse error | Skip malformed task, log warning |
|
||||||
|
| Task type unresolvable | Default to `feature` chain |
|
||||||
|
| Skill failure | Retry once → skip (autoYes) or ask (interactive) |
|
||||||
|
| Git commit fails (no changes) | Record `no-commit`, continue |
|
||||||
|
| Dirty git tree | autoYes: proceed; interactive: ask |
|
||||||
|
| Session ID collision | Append `-2` suffix |
|
||||||
|
| Issue fetch fails (import) | Log error, skip issue |
|
||||||
|
| Duplicate import (same issue_id) | Warn and skip |
|
||||||
|
| No resumable sessions | Suggest `/idaw:run` |
|
||||||
|
|
||||||
|
## Typical Workflow
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 1. Queue tasks
|
||||||
|
/idaw:add "Fix login timeout bug" --type bugfix --priority 1
|
||||||
|
/idaw:add "Add rate limiting to API" --priority 2
|
||||||
|
/idaw:add --from-issue ISS-20260128-001,ISS-20260128-002
|
||||||
|
|
||||||
|
# 2. Preview execution plan
|
||||||
|
/idaw:run --dry-run
|
||||||
|
|
||||||
|
# 3. Execute all (unattended)
|
||||||
|
/idaw:run -y
|
||||||
|
|
||||||
|
# 4. Check progress
|
||||||
|
/idaw:status
|
||||||
|
|
||||||
|
# 5. Resume if interrupted
|
||||||
|
/idaw:resume -y
|
||||||
|
```
|
||||||
|
|
||||||
|
## Related Documentation
|
||||||
|
|
||||||
|
- [Issue Commands](./issue.md) — Fine-grained issue management
|
||||||
|
- [Core Orchestration](./core-orchestration.md) — `/ccw` main orchestrator
|
||||||
|
- [Workflow Commands](./workflow.md) — Individual workflow skills
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
| **Workflow** | 20+ | Planning, execution, review, TDD, testing workflows |
|
| **Workflow** | 20+ | Planning, execution, review, TDD, testing workflows |
|
||||||
| **Session Management** | 6 | Session creation, listing, resuming, completion |
|
| **Session Management** | 6 | Session creation, listing, resuming, completion |
|
||||||
| **Issue Workflow** | 8 | Issue discovery, planning, queue, execution |
|
| **Issue Workflow** | 8 | Issue discovery, planning, queue, execution |
|
||||||
|
| **IDAW** | 4 | Batch autonomous task execution with git checkpoints |
|
||||||
| **Memory** | 8 | Memory capture, update, document generation |
|
| **Memory** | 8 | Memory capture, update, document generation |
|
||||||
| **CLI Tools** | 2 | CLI initialization, Codex review |
|
| **CLI Tools** | 2 | CLI initialization, Codex review |
|
||||||
| **UI Design** | 10 | UI design prototype generation, style extraction |
|
| **UI Design** | 10 | UI design prototype generation, style extraction |
|
||||||
@@ -69,7 +70,16 @@
|
|||||||
| [`/issue:execute`](./issue.md#execute) | Execute queue | Intermediate |
|
| [`/issue:execute`](./issue.md#execute) | Execute queue | Intermediate |
|
||||||
| [`/issue:convert-to-plan`](./issue.md#convert-to-plan) | Convert planning artifact to issue solution | Intermediate |
|
| [`/issue:convert-to-plan`](./issue.md#convert-to-plan) | Convert planning artifact to issue solution | Intermediate |
|
||||||
|
|
||||||
### 5. Memory Commands
|
### 5. IDAW Commands
|
||||||
|
|
||||||
|
| Command | Function | Difficulty |
|
||||||
|
|---------|----------|------------|
|
||||||
|
| [`/idaw:add`](./idaw.md#add) | Create tasks manually or import from ccw issue | Beginner |
|
||||||
|
| [`/idaw:run`](./idaw.md#run) | Execute task queue with skill chains and git checkpoints | Intermediate |
|
||||||
|
| [`/idaw:status`](./idaw.md#status) | View task and session progress | Beginner |
|
||||||
|
| [`/idaw:resume`](./idaw.md#resume) | Resume interrupted session from last checkpoint | Intermediate |
|
||||||
|
|
||||||
|
### 6. Memory Commands
|
||||||
|
|
||||||
| Command | Function | Difficulty |
|
| Command | Function | Difficulty |
|
||||||
|---------|----------|------------|
|
|---------|----------|------------|
|
||||||
@@ -82,14 +92,14 @@
|
|||||||
| [`/memory:docs-related-cli`](./memory.md#docs-related-cli) | Generate documentation for git-changed modules | Intermediate |
|
| [`/memory:docs-related-cli`](./memory.md#docs-related-cli) | Generate documentation for git-changed modules | Intermediate |
|
||||||
| [`/memory:style-skill-memory`](./memory.md#style-skill-memory) | Generate SKILL memory package from style reference | Intermediate |
|
| [`/memory:style-skill-memory`](./memory.md#style-skill-memory) | Generate SKILL memory package from style reference | Intermediate |
|
||||||
|
|
||||||
### 6. CLI Tool Commands
|
### 7. CLI Tool Commands
|
||||||
|
|
||||||
| Command | Function | Difficulty |
|
| Command | Function | Difficulty |
|
||||||
|---------|----------|------------|
|
|---------|----------|------------|
|
||||||
| [`/cli:cli-init`](./cli.md#cli-init) | Generate configuration directory and settings files | Intermediate |
|
| [`/cli:cli-init`](./cli.md#cli-init) | Generate configuration directory and settings files | Intermediate |
|
||||||
| [`/cli:codex-review`](./cli.md#codex-review) | Interactive code review using Codex CLI | Intermediate |
|
| [`/cli:codex-review`](./cli.md#codex-review) | Interactive code review using Codex CLI | Intermediate |
|
||||||
|
|
||||||
### 7. UI Design Commands
|
### 8. UI Design Commands
|
||||||
|
|
||||||
| Command | Function | Difficulty |
|
| Command | Function | Difficulty |
|
||||||
|---------|----------|------------|
|
|---------|----------|------------|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
- [Workflow](/commands/claude/workflow) - workflow series commands
|
- [Workflow](/commands/claude/workflow) - workflow series commands
|
||||||
- [Session Management](/commands/claude/session) - session series commands
|
- [Session Management](/commands/claude/session) - session series commands
|
||||||
- [Issue](/commands/claude/issue) - issue series commands
|
- [Issue](/commands/claude/issue) - issue series commands
|
||||||
|
- [IDAW](/commands/claude/idaw) - batch autonomous task execution
|
||||||
- [Memory](/commands/claude/memory) - memory series commands
|
- [Memory](/commands/claude/memory) - memory series commands
|
||||||
- [CLI](/commands/claude/cli) - cli series commands
|
- [CLI](/commands/claude/cli) - cli series commands
|
||||||
- [UI Design](/commands/claude/ui-design) - ui-design series commands
|
- [UI Design](/commands/claude/ui-design) - ui-design series commands
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-1 -1 26 26" fill="none" stroke="#64748B" stroke-linecap="round" stroke-linejoin="round">
|
||||||
<style>
|
<path d="M4 12 A8 3 0 0 1 20 12" stroke-width="0.9" opacity="0.15"/>
|
||||||
.logo-line { stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
|
<path d="M16.9 19.5 A8 3 30 0 1 7.1 4.5" stroke-width="0.9" opacity="0.15"/>
|
||||||
.logo-dot { fill: var(--vp-c-primary, #3B82F6); }
|
<path d="M7.1 19.5 A8 3 -30 0 1 16.9 4.5" stroke-width="0.9" opacity="0.15"/>
|
||||||
</style>
|
<circle cx="12" cy="12" r="1.5" fill="#64748B" stroke="none" opacity="0.2"/>
|
||||||
<!-- Three horizontal lines - line style -->
|
<path d="M20 12 A8 3 0 0 1 4 12" stroke-width="1.3" opacity="0.75"/>
|
||||||
<line class="logo-line" x1="3" y1="6" x2="18" y2="6"/>
|
<path d="M7.1 4.5 A8 3 30 0 1 16.9 19.5" stroke-width="1.3" opacity="0.75"/>
|
||||||
<line class="logo-line" x1="3" y1="12" x2="15" y2="12"/>
|
<path d="M16.9 4.5 A8 3 -30 0 1 7.1 19.5" stroke-width="1.3" opacity="0.75"/>
|
||||||
<line class="logo-line" x1="3" y1="18" x2="12" y2="18"/>
|
<circle cx="17" cy="10.5" r="1.8" fill="#D97757" stroke="none"/>
|
||||||
<!-- Status dot - follows theme -->
|
<circle cx="8" cy="16" r="1.8" fill="#10A37F" stroke="none"/>
|
||||||
<circle class="logo-dot" cx="19" cy="17" r="3"/>
|
<circle cx="14" cy="5.5" r="1.8" fill="#4285F4" stroke="none"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 547 B After Width: | Height: | Size: 882 B |
@@ -1,8 +1,17 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-1 -1 26 26" fill="none" stroke="#64748B" stroke-linecap="round" stroke-linejoin="round">
|
||||||
<!-- Three horizontal lines - line style -->
|
<!-- Back orbit halves -->
|
||||||
<line x1="3" y1="6" x2="18" y2="6" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
<path d="M4 12 A8 3 0 0 1 20 12" stroke-width="0.9" opacity="0.15"/>
|
||||||
<line x1="3" y1="12" x2="15" y2="12" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
<path d="M16.9 19.5 A8 3 30 0 1 7.1 4.5" stroke-width="0.9" opacity="0.15"/>
|
||||||
<line x1="3" y1="18" x2="12" y2="18" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
<path d="M7.1 19.5 A8 3 -30 0 1 16.9 4.5" stroke-width="0.9" opacity="0.15"/>
|
||||||
<!-- Status dot - follows theme color -->
|
<!-- Core -->
|
||||||
<circle cx="19" cy="17" r="3" style="fill: var(--logo-dot-color, var(--vp-c-primary, currentColor))"/>
|
<circle cx="12" cy="12" r="2" fill="#64748B" stroke="none" opacity="0.1"/>
|
||||||
|
<circle cx="12" cy="12" r="1" fill="#64748B" stroke="none" opacity="0.25"/>
|
||||||
|
<!-- Front orbit halves -->
|
||||||
|
<path d="M20 12 A8 3 0 0 1 4 12" stroke-width="1.3" opacity="0.75"/>
|
||||||
|
<path d="M7.1 4.5 A8 3 30 0 1 16.9 19.5" stroke-width="1.3" opacity="0.75"/>
|
||||||
|
<path d="M16.9 4.5 A8 3 -30 0 1 7.1 19.5" stroke-width="1.3" opacity="0.75"/>
|
||||||
|
<!-- Agent dots -->
|
||||||
|
<circle cx="17" cy="10.5" r="1.5" fill="#D97757" stroke="none"/>
|
||||||
|
<circle cx="8" cy="16" r="1.5" fill="#10A37F" stroke="none"/>
|
||||||
|
<circle cx="14" cy="5.5" r="1.5" fill="#4285F4" stroke="none"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 583 B After Width: | Height: | Size: 1.0 KiB |
315
docs/zh/commands/claude/idaw.md
Normal file
315
docs/zh/commands/claude/idaw.md
Normal file
@@ -0,0 +1,315 @@
|
|||||||
|
# IDAW 命令
|
||||||
|
|
||||||
|
## 一句话定位
|
||||||
|
|
||||||
|
**IDAW(Independent Development Autonomous Workflow)是批量任务自治执行引擎** — 攒任务、串行执行 Skill 链、每个任务自动 git checkpoint、中断可恢复。
|
||||||
|
|
||||||
|
## 核心概念
|
||||||
|
|
||||||
|
| 概念 | 说明 | 存储位置 |
|
||||||
|
|------|------|----------|
|
||||||
|
| **Task** | 独立 JSON 任务定义 | `.workflow/.idaw/tasks/IDAW-*.json` |
|
||||||
|
| **Session** | 执行会话与进度追踪 | `.workflow/.idaw/sessions/IDA-*/` |
|
||||||
|
| **Skill Chain** | 按任务类型的有序 Skill 序列 | 由 `SKILL_CHAIN_MAP` 映射 |
|
||||||
|
| **Checkpoint** | 每个任务成功后的 git commit | 自动 `git add -A && git commit` |
|
||||||
|
|
||||||
|
## IDAW vs Issue 系统
|
||||||
|
|
||||||
|
| 对比维度 | Issue 系统 | IDAW |
|
||||||
|
|----------|-----------|------|
|
||||||
|
| **粒度** | 精细粒度、多步编排 | 粗粒度、批量自治 |
|
||||||
|
| **流水线** | new → plan → queue → execute | add → run(一站式) |
|
||||||
|
| **执行方式** | DAG 并行 | 串行 + checkpoint |
|
||||||
|
| **存储** | `.workflow/issues.jsonl` | `.workflow/.idaw/tasks/IDAW-*.json` |
|
||||||
|
| **场景** | 单个 issue 精细解决 | 批量任务队列、无人值守执行 |
|
||||||
|
|
||||||
|
## 命令列表
|
||||||
|
|
||||||
|
| 命令 | 功能 | 语法 |
|
||||||
|
|------|------|------|
|
||||||
|
| [`add`](#add) | 手动创建或从 issue 导入任务 | `/idaw:add [-y] [--from-issue <id>] "描述" [--type <类型>] [--priority 1-5]` |
|
||||||
|
| [`run`](#run) | 串行执行任务队列并 git checkpoint | `/idaw:run [-y] [--task <id,...>] [--dry-run]` |
|
||||||
|
| [`status`](#status) | 查看任务和会话进度 | `/idaw:status [session-id]` |
|
||||||
|
| [`resume`](#resume) | 从断点恢复中断的会话 | `/idaw:resume [-y] [session-id]` |
|
||||||
|
|
||||||
|
## 命令详情
|
||||||
|
|
||||||
|
### add
|
||||||
|
|
||||||
|
**功能**:手动创建 IDAW 任务或从现有 ccw issue 导入。
|
||||||
|
|
||||||
|
**语法**:
|
||||||
|
```bash
|
||||||
|
/idaw:add [-y|--yes] [--from-issue <id>[,<id>,...]] "描述" [--type <task_type>] [--priority <1-5>]
|
||||||
|
```
|
||||||
|
|
||||||
|
**参数**:
|
||||||
|
- `--from-issue <id>`:从 ccw issue 导入(逗号分隔多个)
|
||||||
|
- `--type <type>`:显式指定任务类型(见[任务类型](#任务类型))
|
||||||
|
- `--priority 1-5`:优先级(1=紧急,5=低,默认=3)
|
||||||
|
|
||||||
|
**模式**:
|
||||||
|
|
||||||
|
| 模式 | 触发条件 | 行为 |
|
||||||
|
|------|----------|------|
|
||||||
|
| 手动 | 无 `--from-issue` | 解析描述、生成任务 |
|
||||||
|
| 导入 | `--from-issue` | 获取 issue、冻结快照、创建任务 |
|
||||||
|
|
||||||
|
**示例**:
|
||||||
|
```bash
|
||||||
|
# 手动创建
|
||||||
|
/idaw:add "修复登录超时 Bug" --type bugfix --priority 2
|
||||||
|
/idaw:add "为 API 添加限流" --priority 1
|
||||||
|
/idaw:add "重构 auth 模块为策略模式"
|
||||||
|
|
||||||
|
# 从 ccw issue 导入
|
||||||
|
/idaw:add --from-issue ISS-20260128-001
|
||||||
|
/idaw:add --from-issue ISS-20260128-001,ISS-20260128-002
|
||||||
|
|
||||||
|
# 自动模式
|
||||||
|
/idaw:add -y "修复 header 拼写错误"
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### run
|
||||||
|
|
||||||
|
**功能**:主编排器 — 串行执行任务 Skill 链,每个任务完成后自动 git commit。
|
||||||
|
|
||||||
|
**语法**:
|
||||||
|
```bash
|
||||||
|
/idaw:run [-y|--yes] [--task <id>[,<id>,...]] [--dry-run]
|
||||||
|
```
|
||||||
|
|
||||||
|
**参数**:
|
||||||
|
- `--task <id,...>`:执行特定任务(默认:所有 pending)
|
||||||
|
- `--dry-run`:预览执行计划,不实际执行
|
||||||
|
- `-y`:自动模式 — 跳过确认,失败自动跳过
|
||||||
|
|
||||||
|
**6 阶段执行流程**:
|
||||||
|
|
||||||
|
```
|
||||||
|
Phase 1: 加载任务
|
||||||
|
└─ Glob IDAW-*.json → 过滤 → 按优先级 ASC、ID ASC 排序
|
||||||
|
|
||||||
|
Phase 2: 创建会话
|
||||||
|
└─ 创建 session.json + progress.md + TodoWrite
|
||||||
|
|
||||||
|
Phase 3: 启动检查
|
||||||
|
├─ 检查运行中的会话 → 提供恢复或新建选项
|
||||||
|
└─ 检查 git 状态 → stash/继续/中止
|
||||||
|
|
||||||
|
Phase 4: 主循环(串行)
|
||||||
|
每个任务:
|
||||||
|
├─ 解析: skill_chain || SKILL_CHAIN_MAP[task_type || 推断]
|
||||||
|
├─ 执行每个 skill(失败重试一次)
|
||||||
|
└─ 错误处理: skip (autoYes) 或 ask (交互)
|
||||||
|
|
||||||
|
Phase 5: Checkpoint(每个任务)
|
||||||
|
├─ git add -A && git commit
|
||||||
|
├─ 更新 task.json + session.json
|
||||||
|
└─ 追加 progress.md
|
||||||
|
|
||||||
|
Phase 6: 报告
|
||||||
|
└─ 汇总: 完成/失败/跳过数量 + git commits
|
||||||
|
```
|
||||||
|
|
||||||
|
**示例**:
|
||||||
|
```bash
|
||||||
|
# 执行所有 pending 任务(自动模式)
|
||||||
|
/idaw:run -y
|
||||||
|
|
||||||
|
# 执行特定任务
|
||||||
|
/idaw:run --task IDAW-001,IDAW-003
|
||||||
|
|
||||||
|
# 预览执行计划
|
||||||
|
/idaw:run --dry-run
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### status
|
||||||
|
|
||||||
|
**功能**:只读查看 IDAW 任务队列和会话进度。
|
||||||
|
|
||||||
|
**语法**:
|
||||||
|
```bash
|
||||||
|
/idaw:status [session-id]
|
||||||
|
```
|
||||||
|
|
||||||
|
**视图模式**:
|
||||||
|
|
||||||
|
| 模式 | 触发 | 输出 |
|
||||||
|
|------|------|------|
|
||||||
|
| 概览 | 无参数 | 所有任务表格 + 最新会话摘要 |
|
||||||
|
| 会话详情 | 指定 session-id | 任务 × 状态 × commit 表格 + progress.md |
|
||||||
|
|
||||||
|
**示例**:
|
||||||
|
```bash
|
||||||
|
/idaw:status
|
||||||
|
/idaw:status IDA-auth-fix-20260301
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### resume
|
||||||
|
|
||||||
|
**功能**:从最后一个 checkpoint 恢复中断的 IDAW 会话。
|
||||||
|
|
||||||
|
**语法**:
|
||||||
|
```bash
|
||||||
|
/idaw:resume [-y|--yes] [session-id]
|
||||||
|
```
|
||||||
|
|
||||||
|
**参数**:
|
||||||
|
- `session-id`:恢复指定会话(默认:最新 running 会话)
|
||||||
|
- `-y`:自动跳过中断任务,继续执行剩余任务
|
||||||
|
|
||||||
|
**恢复流程**:
|
||||||
|
```
|
||||||
|
1. 查找 status=running 的会话
|
||||||
|
2. 处理中断任务 (in_progress):
|
||||||
|
├─ autoYes → 标记为 skipped
|
||||||
|
└─ 交互 → 询问: 重试或跳过
|
||||||
|
3. 构建剩余任务队列
|
||||||
|
4. 执行 /idaw:run 的 Phase 4-6
|
||||||
|
```
|
||||||
|
|
||||||
|
**示例**:
|
||||||
|
```bash
|
||||||
|
/idaw:resume
|
||||||
|
/idaw:resume IDA-auth-fix-20260301
|
||||||
|
/idaw:resume -y
|
||||||
|
```
|
||||||
|
|
||||||
|
## 任务类型
|
||||||
|
|
||||||
|
IDAW 支持 10 种任务类型,每种映射到特定的 Skill 链:
|
||||||
|
|
||||||
|
| 任务类型 | Skill 链 | 使用场景 |
|
||||||
|
|----------|----------|----------|
|
||||||
|
| `bugfix` | lite-plan → test-fix | 常规 Bug 修复 |
|
||||||
|
| `bugfix-hotfix` | lite-plan (--hotfix) | 紧急生产修复 |
|
||||||
|
| `feature` | lite-plan → test-fix | 新功能 |
|
||||||
|
| `feature-complex` | plan → execute → test-fix | 多模块功能 |
|
||||||
|
| `refactor` | refactor-cycle | 代码重构 |
|
||||||
|
| `tdd` | tdd-plan → execute | 测试驱动开发 |
|
||||||
|
| `test` | test-fix | 测试生成 |
|
||||||
|
| `test-fix` | test-fix | 修复失败测试 |
|
||||||
|
| `review` | review-cycle | 代码审查 |
|
||||||
|
| `docs` | lite-plan | 文档 |
|
||||||
|
|
||||||
|
**类型解析**:显式 `task_type` 字段优先。为 null 时,执行时从标题和描述通过关键字匹配推断。
|
||||||
|
|
||||||
|
## 任务 Schema
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"id": "IDAW-001",
|
||||||
|
"title": "修复 auth token 刷新竞态",
|
||||||
|
"description": "详细的问题/目标描述...",
|
||||||
|
"status": "pending",
|
||||||
|
"priority": 2,
|
||||||
|
"task_type": "bugfix",
|
||||||
|
"skill_chain": null,
|
||||||
|
"context": {
|
||||||
|
"affected_files": ["src/auth/token-manager.ts"],
|
||||||
|
"acceptance_criteria": ["无并发刷新请求"],
|
||||||
|
"constraints": [],
|
||||||
|
"references": []
|
||||||
|
},
|
||||||
|
"source": {
|
||||||
|
"type": "manual",
|
||||||
|
"issue_id": null,
|
||||||
|
"issue_snapshot": null
|
||||||
|
},
|
||||||
|
"execution": {
|
||||||
|
"session_id": null,
|
||||||
|
"started_at": null,
|
||||||
|
"completed_at": null,
|
||||||
|
"skill_results": [],
|
||||||
|
"git_commit": null,
|
||||||
|
"error": null
|
||||||
|
},
|
||||||
|
"created_at": "2026-03-01T10:00:00Z",
|
||||||
|
"updated_at": "2026-03-01T10:00:00Z"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## 任务生命周期
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
graph TD
|
||||||
|
A["/idaw:add"] --> B["pending"]
|
||||||
|
B --> C["/idaw:run"]
|
||||||
|
C --> D["in_progress"]
|
||||||
|
D --> E{"Skill Chain"}
|
||||||
|
E -->|成功| F["completed (git commit)"]
|
||||||
|
E -->|重试一次| G{"重试"}
|
||||||
|
G -->|成功| F
|
||||||
|
G -->|失败| H{"autoYes?"}
|
||||||
|
H -->|是| I["failed (跳过)"]
|
||||||
|
H -->|否| J["询问: 跳过/中止"]
|
||||||
|
J -->|跳过| I
|
||||||
|
J -->|中止| K["Session failed"]
|
||||||
|
|
||||||
|
L["/idaw:resume"] --> M{"中断的任务"}
|
||||||
|
M -->|重试| B
|
||||||
|
M -->|跳过| N["skipped"]
|
||||||
|
```
|
||||||
|
|
||||||
|
## 目录结构
|
||||||
|
|
||||||
|
```
|
||||||
|
.workflow/.idaw/
|
||||||
|
├── tasks/ # 任务定义(跨会话持久化)
|
||||||
|
│ ├── IDAW-001.json
|
||||||
|
│ ├── IDAW-002.json
|
||||||
|
│ └── IDAW-003.json
|
||||||
|
└── sessions/ # 执行会话
|
||||||
|
└── IDA-{slug}-YYYYMMDD/
|
||||||
|
├── session.json # 会话状态 + 任务队列
|
||||||
|
└── progress.md # 可读的进度日志
|
||||||
|
```
|
||||||
|
|
||||||
|
## 错误处理
|
||||||
|
|
||||||
|
| 错误 | 处理方式 |
|
||||||
|
|------|----------|
|
||||||
|
| 无任务 | 提示 `/idaw:add` |
|
||||||
|
| 任务 JSON 解析错误 | 跳过并记录警告 |
|
||||||
|
| 任务类型无法解析 | 默认 `feature` 链 |
|
||||||
|
| Skill 失败 | 重试一次 → skip (autoYes) 或 ask (交互) |
|
||||||
|
| Git commit 无变更 | 记录 `no-commit`,继续 |
|
||||||
|
| Git 工作区脏 | autoYes: 继续; 交互: 询问 |
|
||||||
|
| Session ID 冲突 | 追加 `-2` 后缀 |
|
||||||
|
| Issue 获取失败(导入) | 记录错误,跳过 |
|
||||||
|
| 重复导入 | 警告并跳过 |
|
||||||
|
| 无可恢复会话 | 提示 `/idaw:run` |
|
||||||
|
|
||||||
|
## 典型使用流程
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 1. 攒任务
|
||||||
|
/idaw:add "修复登录超时 Bug" --type bugfix --priority 1
|
||||||
|
/idaw:add "为 API 添加限流" --priority 2
|
||||||
|
/idaw:add --from-issue ISS-20260128-001,ISS-20260128-002
|
||||||
|
|
||||||
|
# 2. 预览执行计划
|
||||||
|
/idaw:run --dry-run
|
||||||
|
|
||||||
|
# 3. 全自动执行(无人值守)
|
||||||
|
/idaw:run -y
|
||||||
|
|
||||||
|
# 4. 查看进度
|
||||||
|
/idaw:status
|
||||||
|
|
||||||
|
# 5. 中断后恢复
|
||||||
|
/idaw:resume -y
|
||||||
|
```
|
||||||
|
|
||||||
|
## 相关文档
|
||||||
|
|
||||||
|
- [Issue 命令](./issue.md) — 精细粒度 Issue 管理
|
||||||
|
- [核心编排](./core-orchestration.md) — `/ccw` 主编排器
|
||||||
|
- [工作流命令](./workflow.md) — 各个工作流 Skill
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
| **工作流** | 20+ | 规划、执行、审查、TDD、测试等工作流 |
|
| **工作流** | 20+ | 规划、执行、审查、TDD、测试等工作流 |
|
||||||
| **会话管理** | 6 | 会话创建、列表、恢复、完成等 |
|
| **会话管理** | 6 | 会话创建、列表、恢复、完成等 |
|
||||||
| **Issue 工作流** | 7 | Issue 发现、规划、队列、执行 |
|
| **Issue 工作流** | 7 | Issue 发现、规划、队列、执行 |
|
||||||
|
| **IDAW** | 4 | 批量任务自治执行引擎 |
|
||||||
| **Memory** | 8 | 记忆捕获、更新、文档生成 |
|
| **Memory** | 8 | 记忆捕获、更新、文档生成 |
|
||||||
| **CLI 工具** | 2 | CLI 初始化、Codex 审查 |
|
| **CLI 工具** | 2 | CLI 初始化、Codex 审查 |
|
||||||
| **UI 设计** | 10 | UI 设计原型生成、样式提取 |
|
| **UI 设计** | 10 | UI 设计原型生成、样式提取 |
|
||||||
@@ -67,7 +68,16 @@
|
|||||||
| [`/issue:execute`](./issue.md#execute) | 执行队列 | Intermediate |
|
| [`/issue:execute`](./issue.md#execute) | 执行队列 | Intermediate |
|
||||||
| [`/issue:convert-to-plan`](./issue.md#convert-to-plan) | 转换规划工件为 Issue 解决方案 | Intermediate |
|
| [`/issue:convert-to-plan`](./issue.md#convert-to-plan) | 转换规划工件为 Issue 解决方案 | Intermediate |
|
||||||
|
|
||||||
### 5. Memory 命令
|
### 5. IDAW 命令
|
||||||
|
|
||||||
|
| 命令 | 功能 | 难度 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| [`/idaw:add`](./idaw.md#add) | 手动创建或从 issue 导入任务 | Beginner |
|
||||||
|
| [`/idaw:run`](./idaw.md#run) | 串行执行任务 Skill 链并 git checkpoint | Intermediate |
|
||||||
|
| [`/idaw:status`](./idaw.md#status) | 查看任务和会话进度 | Beginner |
|
||||||
|
| [`/idaw:resume`](./idaw.md#resume) | 从断点恢复中断的会话 | Intermediate |
|
||||||
|
|
||||||
|
### 6. Memory 命令
|
||||||
|
|
||||||
| 命令 | 功能 | 难度 |
|
| 命令 | 功能 | 难度 |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
@@ -80,14 +90,14 @@
|
|||||||
| [`/memory:docs-related-cli`](./memory.md#docs-related-cli) | 生成 git 变更模块文档 | Intermediate |
|
| [`/memory:docs-related-cli`](./memory.md#docs-related-cli) | 生成 git 变更模块文档 | Intermediate |
|
||||||
| [`/memory:style-skill-memory`](./memory.md#style-skill-memory) | 从样式参考生成 SKILL 记忆包 | Intermediate |
|
| [`/memory:style-skill-memory`](./memory.md#style-skill-memory) | 从样式参考生成 SKILL 记忆包 | Intermediate |
|
||||||
|
|
||||||
### 6. CLI 工具命令
|
### 7. CLI 工具命令
|
||||||
|
|
||||||
| 命令 | 功能 | 难度 |
|
| 命令 | 功能 | 难度 |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| [`/cli:cli-init`](./cli.md#cli-init) | 生成配置目录和设置文件 | Intermediate |
|
| [`/cli:cli-init`](./cli.md#cli-init) | 生成配置目录和设置文件 | Intermediate |
|
||||||
| [`/cli:codex-review`](./cli.md#codex-review) | 使用 Codex CLI 进行交互式代码审查 | Intermediate |
|
| [`/cli:codex-review`](./cli.md#codex-review) | 使用 Codex CLI 进行交互式代码审查 | Intermediate |
|
||||||
|
|
||||||
### 7. UI 设计命令
|
### 8. UI 设计命令
|
||||||
|
|
||||||
| 命令 | 功能 | 难度 |
|
| 命令 | 功能 | 难度 |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
- [工作流](/commands/claude/workflow) - workflow 系列命令
|
- [工作流](/commands/claude/workflow) - workflow 系列命令
|
||||||
- [会话管理](/commands/claude/session) - session 系列命令
|
- [会话管理](/commands/claude/session) - session 系列命令
|
||||||
- [Issue](/commands/claude/issue) - issue 系列命令
|
- [Issue](/commands/claude/issue) - issue 系列命令
|
||||||
|
- [IDAW](/commands/claude/idaw) - 批量任务自治执行
|
||||||
- [Memory](/commands/claude/memory) - memory 系列命令
|
- [Memory](/commands/claude/memory) - memory 系列命令
|
||||||
- [CLI](/commands/claude/cli) - cli 系列命令
|
- [CLI](/commands/claude/cli) - cli 系列命令
|
||||||
- [UI 设计](/commands/claude/ui-design) - ui-design 系列命令
|
- [UI 设计](/commands/claude/ui-design) - ui-design 系列命令
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "claude-code-workflow",
|
"name": "claude-code-workflow",
|
||||||
"version": "7.0.6",
|
"version": "7.0.9",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "claude-code-workflow",
|
"name": "claude-code-workflow",
|
||||||
"version": "7.0.6",
|
"version": "7.0.9",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
|
|||||||
Reference in New Issue
Block a user