claude-code-workflow 7.2.11 → 7.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/commands/workflow/analyze-with-file.md +108 -54
- package/.claude/commands/workflow-tune.md +811 -0
- package/.claude/skills/workflow-lite-execute/SKILL.md +106 -14
- package/.claude/skills/workflow-lite-plan/SKILL.md +34 -72
- package/.claude/skills/workflow-lite-test-review/SKILL.md +39 -26
- package/package.json +1 -1
- package/.claude/commands/ddd/auto.md +0 -359
- package/.claude/commands/ddd/doc-generate.md +0 -222
- package/.claude/commands/ddd/doc-refresh.md +0 -218
- package/.claude/commands/ddd/execute.md +0 -416
- package/.claude/commands/ddd/index-build.md +0 -212
- package/.claude/commands/ddd/plan.md +0 -611
- package/.claude/commands/ddd/scan.md +0 -365
- package/.claude/commands/ddd/sync.md +0 -353
- package/.claude/commands/ddd/update.md +0 -160
- package/.claude/commands/idaw/add.md +0 -287
- package/.claude/commands/idaw/resume.md +0 -442
- package/.claude/commands/idaw/run-coordinate.md +0 -648
- package/.claude/commands/idaw/run.md +0 -539
- package/.claude/commands/idaw/status.md +0 -182
- package/.claude/skills/workflow-tune/SKILL.md +0 -487
- package/.claude/skills/workflow-tune/phases/01-setup.md +0 -548
- package/.claude/skills/workflow-tune/phases/02-step-execute.md +0 -197
- package/.claude/skills/workflow-tune/phases/03-step-analyze.md +0 -386
- package/.claude/skills/workflow-tune/phases/04-synthesize.md +0 -257
- package/.claude/skills/workflow-tune/phases/05-optimize-report.md +0 -246
- package/.claude/skills/workflow-tune/specs/workflow-eval-criteria.md +0 -57
- package/.claude/skills/workflow-tune/templates/step-analysis-prompt.md +0 -88
- package/.claude/skills/workflow-tune/templates/synthesis-prompt.md +0 -90
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: doc-refresh
|
|
3
|
-
description: Incrementally update affected documents based on changed components/features. Layer 3 → 2 → 1 selective refresh. Called by sync/update or used standalone.
|
|
4
|
-
argument-hint: "[-y|--yes] [--components <id1,id2,...>] [--features <id1,id2,...>] [--minimal] [--dry-run]"
|
|
5
|
-
allowed-tools: TodoWrite(*), Agent(*), AskUserQuestion(*), Read(*), Grep(*), Glob(*), Bash(*), Edit(*), Write(*)
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Auto Mode
|
|
9
|
-
|
|
10
|
-
When `--yes` or `-y`: Auto-update affected documents without confirmation prompts.
|
|
11
|
-
|
|
12
|
-
# DDD Doc Refresh Command (/ddd:doc-refresh)
|
|
13
|
-
|
|
14
|
-
## Purpose
|
|
15
|
-
|
|
16
|
-
Incrementally update **only the affected documents** after code changes. Unlike `/ddd:doc-generate` (full generation), this command selectively refreshes documents for specific components and features.
|
|
17
|
-
|
|
18
|
-
```
|
|
19
|
-
affected component/feature IDs → update tech-registry (L3) → update feature-maps (L2) → update indexes (L1)
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## When to Use
|
|
23
|
-
|
|
24
|
-
| Scenario | Use |
|
|
25
|
-
|----------|-----|
|
|
26
|
-
| After `/ddd:sync` detects code changes | **doc-refresh** (auto-called by sync) |
|
|
27
|
-
| After `/ddd:update` traces impact | **doc-refresh** (auto-called by update) |
|
|
28
|
-
| Manual refresh of specific component docs | **doc-refresh --components tech-auth-service** |
|
|
29
|
-
| Quick metadata-only update | **doc-refresh --minimal --components tech-auth-service** |
|
|
30
|
-
| Preview what would change | **doc-refresh --dry-run --components tech-auth-service** |
|
|
31
|
-
|
|
32
|
-
## Prerequisite
|
|
33
|
-
|
|
34
|
-
- `doc-index.json` must exist at `.workflow/.doc-index/doc-index.json`
|
|
35
|
-
- At least one of `--components` or `--features` must be provided (or received from caller)
|
|
36
|
-
- Corresponding documents must already exist (generated by `/ddd:doc-generate`)
|
|
37
|
-
- If documents missing → error: "Documents not found. Run /ddd:doc-generate first."
|
|
38
|
-
|
|
39
|
-
## Phase 1: Determine Refresh Scope
|
|
40
|
-
|
|
41
|
-
### 1.1 Resolve Affected Entities
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
IF --components provided:
|
|
45
|
-
affected_components = parse comma-separated IDs
|
|
46
|
-
affected_features = lookup featureIds for each component in doc-index.json
|
|
47
|
-
|
|
48
|
-
IF --features provided:
|
|
49
|
-
affected_features = parse comma-separated IDs
|
|
50
|
-
affected_components = union of all component IDs linked to features
|
|
51
|
-
|
|
52
|
-
Merge both sets if both flags provided.
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### 1.2 Validate Entities Exist
|
|
56
|
-
|
|
57
|
-
For each ID, verify it exists in doc-index.json. Warn and skip missing IDs.
|
|
58
|
-
|
|
59
|
-
### 1.3 Check Document Existence
|
|
60
|
-
|
|
61
|
-
For each affected entity, check if corresponding .md file exists:
|
|
62
|
-
- Missing Layer 3 doc → warn: "Component doc not found. Run /ddd:doc-generate first."
|
|
63
|
-
- Missing Layer 2 doc → warn: "Feature doc not found. Run /ddd:doc-generate first."
|
|
64
|
-
|
|
65
|
-
## Phase 2: Layer 3 — Update Component Docs
|
|
66
|
-
|
|
67
|
-
For each affected component's `tech-registry/{slug}.md`:
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
ccw cli -p "PURPOSE: Update component documentation for {component.name} after code changes
|
|
71
|
-
TASK:
|
|
72
|
-
• Update code locations and line ranges
|
|
73
|
-
• Update symbol list (add new exports, remove deleted)
|
|
74
|
-
• Add change entry to history table
|
|
75
|
-
• Refresh usage examples if API changed
|
|
76
|
-
MODE: write
|
|
77
|
-
CONTEXT: @{component.codeLocations[].path}
|
|
78
|
-
EXPECTED: Updated markdown with current API state
|
|
79
|
-
CONSTRAINTS: Preserve existing structure | Only update changed sections
|
|
80
|
-
" --tool gemini --mode write --cd .workflow/.doc-index/tech-registry/
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
Update frontmatter:
|
|
84
|
-
```markdown
|
|
85
|
-
---
|
|
86
|
-
layer: 3
|
|
87
|
-
component_id: tech-auth-service
|
|
88
|
-
generated_at: {original}
|
|
89
|
-
last_updated: ISO8601
|
|
90
|
-
---
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
### 2.1 Minimal Mode (--minimal)
|
|
94
|
-
|
|
95
|
-
With `--minimal`, only update:
|
|
96
|
-
- `codeLocations` in frontmatter
|
|
97
|
-
- `last_updated` timestamp
|
|
98
|
-
- Skip CLI call for content regeneration
|
|
99
|
-
|
|
100
|
-
## Phase 3: Layer 2 — Update Feature Docs
|
|
101
|
-
|
|
102
|
-
For each affected feature's `feature-maps/{slug}.md`:
|
|
103
|
-
|
|
104
|
-
```bash
|
|
105
|
-
ccw cli -p "PURPOSE: Update feature documentation for {feature.name} after component changes
|
|
106
|
-
TASK:
|
|
107
|
-
• Update component list if new components added
|
|
108
|
-
• Update status if requirements now fully implemented
|
|
109
|
-
• Add change entry to history table
|
|
110
|
-
• Refresh integration guide if component APIs changed
|
|
111
|
-
MODE: write
|
|
112
|
-
CONTEXT: @.workflow/.doc-index/tech-registry/{affected-components}.md
|
|
113
|
-
EXPECTED: Updated markdown reflecting current feature state
|
|
114
|
-
CONSTRAINTS: Reference updated Layer 3 docs | Preserve business language
|
|
115
|
-
" --tool gemini --mode write --cd .workflow/.doc-index/feature-maps/
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
Update frontmatter:
|
|
119
|
-
```markdown
|
|
120
|
-
---
|
|
121
|
-
layer: 2
|
|
122
|
-
feature_id: feat-auth
|
|
123
|
-
depends_on_layer3: [tech-auth-service, tech-user-model]
|
|
124
|
-
generated_at: {original}
|
|
125
|
-
last_updated: ISO8601
|
|
126
|
-
---
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
### 3.1 Minimal Mode (--minimal)
|
|
130
|
-
|
|
131
|
-
With `--minimal`, only update:
|
|
132
|
-
- Component list in frontmatter
|
|
133
|
-
- Feature status (if requirements mapping changed)
|
|
134
|
-
- `last_updated` timestamp
|
|
135
|
-
- Skip CLI call for content regeneration
|
|
136
|
-
|
|
137
|
-
## Phase 4: Layer 1 — Update Index Docs (conditional)
|
|
138
|
-
|
|
139
|
-
### 4.1 Trigger Conditions
|
|
140
|
-
|
|
141
|
-
| Condition | Action |
|
|
142
|
-
|-----------|--------|
|
|
143
|
-
| New component registered | Update `tech-registry/_index.md` |
|
|
144
|
-
| Component removed | Update `tech-registry/_index.md` |
|
|
145
|
-
| Feature status changed | Update `feature-maps/_index.md` |
|
|
146
|
-
| New feature added | Update `feature-maps/_index.md` + README.md |
|
|
147
|
-
| Major architecture change | Update ARCHITECTURE.md |
|
|
148
|
-
| New action-log entry | Update `action-logs/_index.md` |
|
|
149
|
-
|
|
150
|
-
### 4.2 Update _index.md Files
|
|
151
|
-
|
|
152
|
-
Refresh table entries for affected features/components:
|
|
153
|
-
- `feature-maps/_index.md`
|
|
154
|
-
- `tech-registry/_index.md`
|
|
155
|
-
- `action-logs/_index.md` (if new action entry)
|
|
156
|
-
|
|
157
|
-
### 4.3 Update Overview Docs (only if significant)
|
|
158
|
-
|
|
159
|
-
If new features added or major status changes:
|
|
160
|
-
|
|
161
|
-
```bash
|
|
162
|
-
ccw cli -p "PURPOSE: Update project overview docs after feature changes
|
|
163
|
-
TASK:
|
|
164
|
-
• Update README.md feature list
|
|
165
|
-
• Update ARCHITECTURE.md if new components added
|
|
166
|
-
• Update planning/_index.md with new planning sessions
|
|
167
|
-
MODE: write
|
|
168
|
-
CONTEXT: @.workflow/.doc-index/feature-maps/*.md @.workflow/.doc-index/doc-index.json
|
|
169
|
-
EXPECTED: Updated overview docs with current project state
|
|
170
|
-
CONSTRAINTS: High-level only | Link to Layer 2 for details
|
|
171
|
-
" --tool gemini --mode write --cd .workflow/.doc-index/
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
### 4.4 Skip Layer 1
|
|
175
|
-
|
|
176
|
-
With `--minimal` or when changes are minor (only code location updates): skip Layer 1 entirely.
|
|
177
|
-
|
|
178
|
-
## Phase 5: Refresh Report
|
|
179
|
-
|
|
180
|
-
```
|
|
181
|
-
Document Refresh Report
|
|
182
|
-
|
|
183
|
-
Affected Scope:
|
|
184
|
-
Components: {N} ({component IDs})
|
|
185
|
-
Features: {N} ({feature IDs})
|
|
186
|
-
|
|
187
|
-
Updated:
|
|
188
|
-
Layer 3 (Components): {N} documents refreshed
|
|
189
|
-
Layer 2 (Features): {N} documents refreshed
|
|
190
|
-
Layer 1 (Indexes): {N} documents refreshed (or "skipped")
|
|
191
|
-
|
|
192
|
-
Mode: {full|minimal}
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
## Dry-Run Mode
|
|
196
|
-
|
|
197
|
-
With `--dry-run`:
|
|
198
|
-
- Execute Phase 1 (scope determination)
|
|
199
|
-
- Display what would be updated (affected files list)
|
|
200
|
-
- Skip all file writes (Phase 2-4)
|
|
201
|
-
- Output: "Dry-run complete. {N} documents would be refreshed."
|
|
202
|
-
|
|
203
|
-
## Flags
|
|
204
|
-
|
|
205
|
-
| Flag | Effect |
|
|
206
|
-
|------|--------|
|
|
207
|
-
| `-y, --yes` | Auto-confirm all updates |
|
|
208
|
-
| `--components <ids>` | Comma-separated component IDs to refresh |
|
|
209
|
-
| `--features <ids>` | Comma-separated feature IDs to refresh |
|
|
210
|
-
| `--minimal` | Only update metadata/frontmatter, skip content regeneration |
|
|
211
|
-
| `--dry-run` | Preview what would change without modifying files |
|
|
212
|
-
|
|
213
|
-
## Integration Points
|
|
214
|
-
|
|
215
|
-
- **Input from**: `doc-index.json`, affected entity IDs (from `/ddd:sync` or `/ddd:update`)
|
|
216
|
-
- **Called by**: `/ddd:sync` (after change detection + index update), `/ddd:update` (after impact tracing + index update)
|
|
217
|
-
- **Standalone**: Can be run independently to refresh specific component/feature docs
|
|
218
|
-
- **Prerequisite**: Documents must exist (generated by `/ddd:doc-generate`)
|
|
@@ -1,416 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: execute
|
|
3
|
-
description: Document-aware execution engine — executes plan.json + TASK-*.json with doc-index context enrichment, per-batch impact verification, and post-completion doc sync.
|
|
4
|
-
argument-hint: "[-y|--yes] [--skip-sync] [--skip-verify] [--plan <path>] [--in-memory] \"optional task description\""
|
|
5
|
-
allowed-tools: TodoWrite(*), Agent(*), AskUserQuestion(*), Read(*), Grep(*), Glob(*), Bash(*), Edit(*), Write(*), mcp__ace-tool__search_context(*)
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Auto Mode
|
|
9
|
-
|
|
10
|
-
When `--yes` or `-y`: Auto-confirm all decisions, auto-sync after completion.
|
|
11
|
-
|
|
12
|
-
# DDD Execute Command (/ddd:execute)
|
|
13
|
-
|
|
14
|
-
## Purpose
|
|
15
|
-
|
|
16
|
-
Same execution engine model as lite-execute, but each step is **doc-index-aware**:
|
|
17
|
-
- Tasks are enriched with feature context, component docs, and architecture constraints
|
|
18
|
-
- Per-batch impact verification ensures changes stay within planned scope
|
|
19
|
-
- Post-completion automatically syncs the document index
|
|
20
|
-
|
|
21
|
-
### Core Differentiator
|
|
22
|
-
Unlike generic execution engines, ddd:execute leverages the document architecture:
|
|
23
|
-
- Feature-maps provide business context for each task
|
|
24
|
-
- Tech-registry provides implementation patterns to follow
|
|
25
|
-
- ADRs surface as hard constraints during execution
|
|
26
|
-
- Requirement acceptance criteria inform convergence verification
|
|
27
|
-
|
|
28
|
-
## Prerequisite
|
|
29
|
-
|
|
30
|
-
- `plan.json` + `.task/TASK-*.json` files from `/ddd:plan`
|
|
31
|
-
- `doc-index.json` at `.workflow/.doc-index/doc-index.json`
|
|
32
|
-
- If `--in-memory`: receives executionContext from `/ddd:plan` handoff
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
|
|
36
|
-
## Step 1: Initialize & Load Context
|
|
37
|
-
|
|
38
|
-
### 1.1 Locate Plan
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
IF --in-memory:
|
|
42
|
-
Load executionContext from ddd:plan handoff
|
|
43
|
-
plan_path = executionContext.plan_path
|
|
44
|
-
task_dir = executionContext.task_dir
|
|
45
|
-
ELIF --plan <path>:
|
|
46
|
-
plan_path = <path>
|
|
47
|
-
task_dir = {dirname(path)}/.task/
|
|
48
|
-
ELSE:
|
|
49
|
-
Scan .workflow/.doc-index/planning/ for most recent session
|
|
50
|
-
plan_path = {latest_session}/plan.json
|
|
51
|
-
task_dir = {latest_session}/.task/
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### 1.2 Load Plan & Tasks
|
|
55
|
-
|
|
56
|
-
- Read `plan.json` — validate against plan-overview-base-schema
|
|
57
|
-
- Read all `TASK-*.json` from `.task/` directory — validate against task-schema
|
|
58
|
-
- Read `doc-index.json` from `.workflow/.doc-index/`
|
|
59
|
-
|
|
60
|
-
### 1.3 Pre-Load Doc Context
|
|
61
|
-
|
|
62
|
-
For each task with `doc_context`:
|
|
63
|
-
- Load referenced `feature_docs` (feature-maps/{slug}.md)
|
|
64
|
-
- Load referenced `component_docs` (tech-registry/{slug}.md)
|
|
65
|
-
- Load ADR excerpts from doc-index `architectureDecisions[]`
|
|
66
|
-
- Extract requirement acceptance criteria from doc-index `requirements[]`
|
|
67
|
-
- Load `doc_context.symbol_docs[]` documentation content (if present)
|
|
68
|
-
|
|
69
|
-
### 1.4 Echo Strategy
|
|
70
|
-
|
|
71
|
-
Display execution summary:
|
|
72
|
-
|
|
73
|
-
```
|
|
74
|
-
DDD Execute: {plan.summary}
|
|
75
|
-
Complexity: {plan.complexity}
|
|
76
|
-
Tasks: {plan.task_count}
|
|
77
|
-
|
|
78
|
-
Doc-Index Impact:
|
|
79
|
-
Features: {doc_context.affected_features}
|
|
80
|
-
Requirements: {doc_context.affected_requirements}
|
|
81
|
-
Components: {doc_context.affected_components}
|
|
82
|
-
Constraints: {doc_context.architecture_constraints}
|
|
83
|
-
|
|
84
|
-
Execution plan: {batch count} batches, {parallel tasks} parallel where possible
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
---
|
|
88
|
-
|
|
89
|
-
## Step 2: Task Grouping & Batch Creation
|
|
90
|
-
|
|
91
|
-
### 2.1 Extract Dependencies
|
|
92
|
-
|
|
93
|
-
From each `TASK-*.json`, read `depends_on[]` to build dependency graph.
|
|
94
|
-
|
|
95
|
-
### 2.2 Group into Batches
|
|
96
|
-
|
|
97
|
-
```
|
|
98
|
-
Batch 1: Tasks with no dependencies (depends_on: [])
|
|
99
|
-
Batch 2: Tasks depending only on Batch 1 tasks
|
|
100
|
-
Batch 3: Tasks depending on Batch 1 + 2 tasks
|
|
101
|
-
...
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
Within each batch, tasks with the same `parallel_group` can run concurrently.
|
|
105
|
-
|
|
106
|
-
### 2.3 Assign Executor per Task
|
|
107
|
-
|
|
108
|
-
| Signal | Executor |
|
|
109
|
-
|--------|----------|
|
|
110
|
-
| `meta.execution_config.method == "cli"` | CLI tool (gemini/codex/qwen) |
|
|
111
|
-
| `meta.execution_config.method == "agent"` | Agent (code-developer/universal-executor) |
|
|
112
|
-
| Default | Agent (code-developer) |
|
|
113
|
-
|
|
114
|
-
---
|
|
115
|
-
|
|
116
|
-
## Step 3: Doc-Enriched Execution
|
|
117
|
-
|
|
118
|
-
For each task in batch order, build an enriched prompt:
|
|
119
|
-
|
|
120
|
-
### 3.1 Task Prompt Template
|
|
121
|
-
|
|
122
|
-
```markdown
|
|
123
|
-
## Goal
|
|
124
|
-
${plan.summary} — specifically: ${task.title}
|
|
125
|
-
|
|
126
|
-
## Document Context
|
|
127
|
-
|
|
128
|
-
### Feature: ${feature.name} (${feature.id})
|
|
129
|
-
${feature-map content excerpt — overview + requirements section}
|
|
130
|
-
|
|
131
|
-
### Components
|
|
132
|
-
${for each component in task.doc_context.component_ids:
|
|
133
|
-
tech-registry excerpt — responsibility + code locations + key patterns}
|
|
134
|
-
|
|
135
|
-
### Symbol Documentation
|
|
136
|
-
${if doc_context.symbol_docs is non-empty:
|
|
137
|
-
for each component in doc_context.component_ids:
|
|
138
|
-
#### ${component.name} Symbols (Top-5)
|
|
139
|
-
${for each symbol in component.symbol_docs.slice(0, 5):
|
|
140
|
-
- **${symbol.name}** (${symbol.type}): ${symbol.doc_summary}
|
|
141
|
-
Source: `${symbol.source_path}` | Freshness: ${symbol.freshness}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
### Architecture Constraints
|
|
146
|
-
${for each ADR in task.doc_context.adr_ids:
|
|
147
|
-
ADR title + decision + rationale from doc-index}
|
|
148
|
-
|
|
149
|
-
### Requirement Acceptance Criteria
|
|
150
|
-
${for each requirement in task.doc_context.requirement_ids:
|
|
151
|
-
requirement title + priority + success criteria from doc-index}
|
|
152
|
-
|
|
153
|
-
## Task Details
|
|
154
|
-
${task.description}
|
|
155
|
-
|
|
156
|
-
### Files to Modify
|
|
157
|
-
${task.files[] — path, action, changes}
|
|
158
|
-
|
|
159
|
-
### Implementation Steps
|
|
160
|
-
${task.implementation[] — step-by-step guide}
|
|
161
|
-
|
|
162
|
-
## Done When
|
|
163
|
-
${task.convergence.criteria[]}
|
|
164
|
-
${task.convergence.verification}
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
### 3.2 Execute Task
|
|
168
|
-
|
|
169
|
-
**Agent execution**:
|
|
170
|
-
```
|
|
171
|
-
Agent(subagent_type="code-developer", prompt="{enriched prompt}")
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
**CLI execution**:
|
|
175
|
-
```bash
|
|
176
|
-
ccw cli -p "{enriched prompt}" --tool {cli_tool} --mode write
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
### 3.3 Record & Persist Result
|
|
180
|
-
|
|
181
|
-
After each task completes:
|
|
182
|
-
- Update `TASK-*.json` with `status`, `executed_at`, `result`
|
|
183
|
-
- Track `result.files_modified` for impact verification
|
|
184
|
-
- **Persist** result to `TASK-{id}.result.json` alongside the task file:
|
|
185
|
-
|
|
186
|
-
```json
|
|
187
|
-
{
|
|
188
|
-
"task_id": "TASK-001",
|
|
189
|
-
"status": "completed|failed",
|
|
190
|
-
"executed_at": "ISO8601",
|
|
191
|
-
"executor": "code-developer|gemini|codex",
|
|
192
|
-
"files_modified": [
|
|
193
|
-
{ "path": "src/services/auth.ts", "action": "modified", "symbols_changed": ["AuthService.validate"] },
|
|
194
|
-
{ "path": "src/routes/login.ts", "action": "created", "symbols_changed": ["loginRoute"] }
|
|
195
|
-
],
|
|
196
|
-
"convergence_result": {
|
|
197
|
-
"criteria_met": ["Rate limiter middleware exists"],
|
|
198
|
-
"criteria_unmet": [],
|
|
199
|
-
"verification_output": "test output snippet..."
|
|
200
|
-
},
|
|
201
|
-
"error": null
|
|
202
|
-
}
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
This file serves as the durable handoff between execute and sync — survives process interruptions.
|
|
206
|
-
|
|
207
|
-
---
|
|
208
|
-
|
|
209
|
-
## Step 4: Per-Batch Impact Verification
|
|
210
|
-
|
|
211
|
-
After each batch completes (unless `--skip-verify`):
|
|
212
|
-
|
|
213
|
-
### 4.1 Trace Changed Files
|
|
214
|
-
|
|
215
|
-
For each file modified in the batch:
|
|
216
|
-
```
|
|
217
|
-
changed_file → match to doc-index.technicalComponents[].codeLocations[].path
|
|
218
|
-
→ component_ids → featureIds → requirementIds
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
### 4.2 Scope Verification
|
|
222
|
-
|
|
223
|
-
Compare actual impact to planned impact:
|
|
224
|
-
|
|
225
|
-
```
|
|
226
|
-
Planned scope:
|
|
227
|
-
Features: [feat-auth]
|
|
228
|
-
Components: [tech-auth-service, tech-user-model]
|
|
229
|
-
|
|
230
|
-
Actual impact:
|
|
231
|
-
Features: [feat-auth] ← OK, within scope
|
|
232
|
-
Components: [tech-auth-service, tech-user-model, tech-email-service]
|
|
233
|
-
← WARNING: tech-email-service not in plan
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
### 4.3 Flag Unexpected Impact
|
|
237
|
-
|
|
238
|
-
If changes affect features/components NOT in `plan.doc_context`:
|
|
239
|
-
- **Warning**: Display unexpected impact
|
|
240
|
-
- **No -y**: Ask user to confirm continuation
|
|
241
|
-
- **With -y**: Log warning, continue execution
|
|
242
|
-
|
|
243
|
-
### 4.4 Skip Conditions
|
|
244
|
-
|
|
245
|
-
Skip verification when:
|
|
246
|
-
- `--skip-verify` flag is set
|
|
247
|
-
- Only 1 batch (no intermediate verification needed for simple plans)
|
|
248
|
-
|
|
249
|
-
---
|
|
250
|
-
|
|
251
|
-
## Step 4.5: Post-Execution Verify Gate
|
|
252
|
-
|
|
253
|
-
After all batches complete, before doc sync (unless `--skip-verify`):
|
|
254
|
-
|
|
255
|
-
### 4.5.1 Convergence Verification
|
|
256
|
-
|
|
257
|
-
For each completed task with `convergence.verification`:
|
|
258
|
-
```
|
|
259
|
-
Execute: {task.convergence.verification}
|
|
260
|
-
→ e.g., "npm test -- --grep rate-limit"
|
|
261
|
-
Record: pass/fail → update TASK-{id}.result.json.convergence_result
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
### 4.5.2 Build & Lint Check
|
|
265
|
-
|
|
266
|
-
```
|
|
267
|
-
Run project build command (if configured):
|
|
268
|
-
→ npm run build / tsc --noEmit / etc.
|
|
269
|
-
Run project lint command (if configured):
|
|
270
|
-
→ npm run lint / eslint src/ / etc.
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
If build or lint fails:
|
|
274
|
-
- **No -y**: Display errors, ask user: fix now / continue anyway / abort
|
|
275
|
-
- **With -y**: Log warning, continue (non-blocking)
|
|
276
|
-
|
|
277
|
-
### 4.5.3 Regression Test
|
|
278
|
-
|
|
279
|
-
```
|
|
280
|
-
Run project test suite:
|
|
281
|
-
→ npm test / pytest / etc.
|
|
282
|
-
Compare: test results before execution (baseline) vs after
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
If tests fail:
|
|
286
|
-
- **No -y**: Display failures, ask user: fix now / skip sync / abort
|
|
287
|
-
- **With -y**: Log failures as warning in execution results, continue
|
|
288
|
-
|
|
289
|
-
### 4.5.4 Verify Summary
|
|
290
|
-
|
|
291
|
-
```
|
|
292
|
-
Verify Gate Results:
|
|
293
|
-
Convergence: {passed}/{total} tasks verified
|
|
294
|
-
Build: pass|fail|skipped
|
|
295
|
-
Lint: pass|fail|skipped
|
|
296
|
-
Tests: {passed}/{total} ({new_failures} regressions)
|
|
297
|
-
|
|
298
|
-
Gate: PASS / WARN (continue with warnings) / FAIL (blocked)
|
|
299
|
-
```
|
|
300
|
-
|
|
301
|
-
### 4.5.5 Persist Verify Manifest
|
|
302
|
-
|
|
303
|
-
Write `execution-manifest.json` to session folder:
|
|
304
|
-
|
|
305
|
-
```json
|
|
306
|
-
{
|
|
307
|
-
"session_id": "{session-id}",
|
|
308
|
-
"plan_path": "planning/{slug}/plan.json",
|
|
309
|
-
"completed_at": "ISO8601",
|
|
310
|
-
"tasks": [
|
|
311
|
-
{
|
|
312
|
-
"task_id": "TASK-001",
|
|
313
|
-
"status": "completed",
|
|
314
|
-
"result_file": ".task/TASK-001.result.json"
|
|
315
|
-
}
|
|
316
|
-
],
|
|
317
|
-
"files_modified": [
|
|
318
|
-
{ "path": "src/services/auth.ts", "action": "modified", "task_id": "TASK-001" },
|
|
319
|
-
{ "path": "src/routes/login.ts", "action": "created", "task_id": "TASK-001" }
|
|
320
|
-
],
|
|
321
|
-
"verify": {
|
|
322
|
-
"convergence": { "passed": 2, "total": 2 },
|
|
323
|
-
"build": "pass",
|
|
324
|
-
"lint": "pass",
|
|
325
|
-
"tests": { "passed": 42, "total": 42, "regressions": 0 },
|
|
326
|
-
"gate": "PASS"
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
```
|
|
330
|
-
|
|
331
|
-
This manifest is the **single source of truth** consumed by `ddd:sync --from-manifest`.
|
|
332
|
-
|
|
333
|
-
---
|
|
334
|
-
|
|
335
|
-
## Step 5: Post-Completion Doc Sync
|
|
336
|
-
|
|
337
|
-
After all batches complete (unless `--skip-sync`):
|
|
338
|
-
|
|
339
|
-
### 5.1 Auto-Trigger ddd:sync
|
|
340
|
-
|
|
341
|
-
```
|
|
342
|
-
Invoke /ddd:sync [-y] --task-id {session-id} --from-manifest {session}/execution-manifest.json "{plan.summary}"
|
|
343
|
-
```
|
|
344
|
-
|
|
345
|
-
Note: `/ddd:sync` automatically creates a backup of `doc-index.json` before modifications.
|
|
346
|
-
|
|
347
|
-
When `--from-manifest` is provided, sync uses the **execution manifest** as its primary data source instead of git diff. This ensures:
|
|
348
|
-
- Precise file-level and symbol-level change tracking (from TASK-*.result.json)
|
|
349
|
-
- Task-to-file attribution (which task modified which file)
|
|
350
|
-
- Convergence verification results carried forward
|
|
351
|
-
- Survives process interruptions (manifest is persisted to disk)
|
|
352
|
-
|
|
353
|
-
Fallback: If manifest is unavailable (e.g., manual mode), sync falls back to git diff discovery.
|
|
354
|
-
|
|
355
|
-
### 5.2 Generate Action Log
|
|
356
|
-
|
|
357
|
-
Create action entry with:
|
|
358
|
-
- All tasks executed and their results
|
|
359
|
-
- Files modified across all batches
|
|
360
|
-
- Features and requirements addressed
|
|
361
|
-
|
|
362
|
-
### 5.3 Update Feature Status
|
|
363
|
-
|
|
364
|
-
Based on execution results:
|
|
365
|
-
- Requirements with verified convergence → update status
|
|
366
|
-
- Features with all requirements met → `status: "implemented"`
|
|
367
|
-
|
|
368
|
-
---
|
|
369
|
-
|
|
370
|
-
## Step 6: Summary & Follow-up
|
|
371
|
-
|
|
372
|
-
### 6.1 Execution Results
|
|
373
|
-
|
|
374
|
-
```
|
|
375
|
-
DDD Execute Complete
|
|
376
|
-
|
|
377
|
-
Tasks: {completed}/{total} ({failed} failed)
|
|
378
|
-
Files modified: {count}
|
|
379
|
-
Batches: {batch_count}
|
|
380
|
-
|
|
381
|
-
Doc-Index Changes:
|
|
382
|
-
Features updated: {list}
|
|
383
|
-
Components updated: {list}
|
|
384
|
-
New components registered: {list}
|
|
385
|
-
Requirements addressed: {list}
|
|
386
|
-
|
|
387
|
-
Convergence:
|
|
388
|
-
{for each task: task.id — criteria met: X/Y}
|
|
389
|
-
```
|
|
390
|
-
|
|
391
|
-
### 6.2 Follow-up Suggestions
|
|
392
|
-
|
|
393
|
-
Based on execution results, suggest:
|
|
394
|
-
- **New issues**: If unexpected scope expansion was detected
|
|
395
|
-
- **Additional tests**: If convergence criteria only partially met
|
|
396
|
-
- **Documentation gaps**: If new components were created without docs
|
|
397
|
-
- **Next tasks**: If plan had tasks marked as future/deferred
|
|
398
|
-
|
|
399
|
-
---
|
|
400
|
-
|
|
401
|
-
## Flags
|
|
402
|
-
|
|
403
|
-
| Flag | Effect |
|
|
404
|
-
|------|--------|
|
|
405
|
-
| `-y, --yes` | Auto-confirm, auto-sync |
|
|
406
|
-
| `--skip-sync` | Skip post-completion ddd:sync (Step 5) |
|
|
407
|
-
| `--skip-verify` | Skip per-batch impact verification (Step 4) AND post-execution verify gate (Step 4.5) |
|
|
408
|
-
| `--plan <path>` | Explicit plan.json path |
|
|
409
|
-
| `--in-memory` | Accept executionContext from ddd:plan handoff |
|
|
410
|
-
|
|
411
|
-
## Integration Points
|
|
412
|
-
|
|
413
|
-
- **Input from**: `/ddd:plan` output (plan.json + TASK-*.json), `doc-index.json`
|
|
414
|
-
- **Output to**: Updated `doc-index.json` (via ddd:sync), `TASK-*.result.json` (per-task), `execution-manifest.json` (session-level)
|
|
415
|
-
- **Schemas**: `plan-overview-ddd-schema.json` (input), `task-schema.json` + `task-ddd-extension-schema.json` (input), `doc-index.json` (enrichment)
|
|
416
|
-
- **Delegates to**: `/ddd:sync` for post-completion synchronization
|