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,611 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: plan
|
|
3
|
-
description: Document-driven planning pipeline — queries doc-index, explores codebase with doc-aware angles, clarifies ambiguities, and produces unified plan.json + TASK-*.json artifacts with doc_context traceability.
|
|
4
|
-
argument-hint: "[-y|--yes] [--explore] [--skip-explore] [--skip-clarify] \"task description or feature keyword\""
|
|
5
|
-
allowed-tools: TodoWrite(*), Agent(*), AskUserQuestion(*), Read(*), Grep(*), Glob(*), Bash(*), Write(*), mcp__ace-tool__search_context(*)
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Auto Mode
|
|
9
|
-
|
|
10
|
-
When `--yes` or `-y`: Skip clarification (Phase 3), auto-select ddd:execute (Phase 5), skip interactive refinement.
|
|
11
|
-
|
|
12
|
-
# DDD Plan Command (/ddd:plan)
|
|
13
|
-
|
|
14
|
-
## Purpose
|
|
15
|
-
|
|
16
|
-
Full planning pipeline for document-driven development. Unlike simple context lookup, this command:
|
|
17
|
-
1. **Queries** the doc-index for instant context (features, requirements, components, ADRs)
|
|
18
|
-
2. **Explores** the codebase with doc-index-informed angles (not generic presets)
|
|
19
|
-
3. **Clarifies** ambiguities from exploration results and doc-index gaps
|
|
20
|
-
4. **Plans** with unified schema output (plan.json + TASK-*.json with doc_context)
|
|
21
|
-
5. **Hands off** to ddd:execute or other execution engines
|
|
22
|
-
|
|
23
|
-
### Key Differentiation from lite-plan
|
|
24
|
-
- Phase 1 provides instant context from doc-index (no cold-start exploration)
|
|
25
|
-
- Exploration angles are doc-index-informed (not generic preset selection)
|
|
26
|
-
- Tasks carry doc_context for traceability (features → requirements → code)
|
|
27
|
-
- Architecture decisions (ADRs) automatically surface as constraints
|
|
28
|
-
|
|
29
|
-
## Prerequisite
|
|
30
|
-
|
|
31
|
-
- `doc-index.json` must exist at `.workflow/.doc-index/doc-index.json`
|
|
32
|
-
- If not found → suggest running `/ddd:index-build` or `/ddd:scan` first
|
|
33
|
-
|
|
34
|
-
## Session Folder
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
.workflow/.doc-index/planning/{task-slug}-{YYYY-MM-DD}/
|
|
38
|
-
├── exploration-{angle}.json # Per-angle exploration (Phase 2)
|
|
39
|
-
├── explorations-manifest.json # Exploration index
|
|
40
|
-
├── plan.json # Plan overview (Phase 4)
|
|
41
|
-
├── planning-context.md # Legacy context package (Phase 0+1 combined)
|
|
42
|
-
├── .process/
|
|
43
|
-
│ └── doc-context-package.json # Bundled doc_context (Phase 1.8)
|
|
44
|
-
└── .task/
|
|
45
|
-
├── TASK-001.json
|
|
46
|
-
└── TASK-002.json
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
## Phase 0: Parse Task Intent (enhanced)
|
|
52
|
-
|
|
53
|
-
### 0.1 Extract Keywords
|
|
54
|
-
|
|
55
|
-
From the user's task description, extract:
|
|
56
|
-
- **Domain keywords**: feature names, module names, business terms
|
|
57
|
-
- **Technical keywords**: file paths, class names, function names
|
|
58
|
-
- **Action type**: feature | bugfix | refactor | optimization | migration
|
|
59
|
-
|
|
60
|
-
### 0.2 Glossary Match
|
|
61
|
-
|
|
62
|
-
Cross-reference extracted keywords against `doc-index.json.glossary[]`:
|
|
63
|
-
- Match terms and aliases
|
|
64
|
-
- Expand user's vocabulary with canonical terms
|
|
65
|
-
|
|
66
|
-
### 0.3 Classify Complexity
|
|
67
|
-
|
|
68
|
-
Assess task complexity based on:
|
|
69
|
-
- Number of features potentially affected (from keyword matching)
|
|
70
|
-
- Whether new components are needed or existing ones modified
|
|
71
|
-
- Cross-feature impact (single feature vs multiple)
|
|
72
|
-
|
|
73
|
-
| Signal | Complexity |
|
|
74
|
-
|--------|-----------|
|
|
75
|
-
| Single feature, existing components | Low |
|
|
76
|
-
| 1-2 features, some new components | Medium |
|
|
77
|
-
| 3+ features, new architecture needed | High |
|
|
78
|
-
|
|
79
|
-
---
|
|
80
|
-
|
|
81
|
-
## Phase 1: Doc-Index Query
|
|
82
|
-
|
|
83
|
-
### 1.0 Schema Version Check (TASK-006)
|
|
84
|
-
|
|
85
|
-
Before querying doc-index, verify schema compatibility:
|
|
86
|
-
|
|
87
|
-
```javascript
|
|
88
|
-
const docIndex = JSON.parse(Read('.workflow/.doc-index/doc-index.json'));
|
|
89
|
-
const schemaVersion = docIndex.schema_version || '0.0'; // Default for legacy
|
|
90
|
-
|
|
91
|
-
if (schemaVersion !== '1.0') {
|
|
92
|
-
console.warn(`Schema version mismatch: found ${schemaVersion}, expected 1.0`);
|
|
93
|
-
console.warn('Consider running schema migration or regenerating doc-index with /ddd:scan');
|
|
94
|
-
// Continue with degraded functionality - may encounter missing fields
|
|
95
|
-
}
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
**Graceful degradation**: If version mismatch detected → log warning → continue with caution (some features may not work as expected).
|
|
99
|
-
|
|
100
|
-
### 1.1 Feature Search
|
|
101
|
-
|
|
102
|
-
```
|
|
103
|
-
Search doc-index.json.features[] where:
|
|
104
|
-
- name CONTAINS keyword (fuzzy)
|
|
105
|
-
- tags INTERSECT keywords
|
|
106
|
-
- requirementIds link to matching requirements
|
|
107
|
-
→ Output: matched feature IDs + names
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### 1.2 Requirement Search
|
|
111
|
-
|
|
112
|
-
```
|
|
113
|
-
Search doc-index.json.requirements[] where:
|
|
114
|
-
- title CONTAINS keyword
|
|
115
|
-
- id matches explicit REQ-NNN reference
|
|
116
|
-
- featureId matches found features
|
|
117
|
-
→ Output: matched requirement IDs + titles + priorities
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
### 1.3 Component Search
|
|
121
|
-
|
|
122
|
-
```
|
|
123
|
-
Search doc-index.json.technicalComponents[] where:
|
|
124
|
-
- name CONTAINS keyword
|
|
125
|
-
- codeLocations[].path CONTAINS file path keyword
|
|
126
|
-
- codeLocations[].symbols CONTAINS symbol keyword
|
|
127
|
-
- featureIds INTERSECT found features
|
|
128
|
-
→ Output: matched component IDs + code locations
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
### 1.4 ADR Search
|
|
132
|
-
|
|
133
|
-
```
|
|
134
|
-
Search doc-index.json.architectureDecisions[] where:
|
|
135
|
-
- componentIds INTERSECT found components
|
|
136
|
-
→ Output: matched ADR IDs + titles
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
### 1.5 Action History Search
|
|
140
|
-
|
|
141
|
-
```
|
|
142
|
-
Search doc-index.json.actions[] where:
|
|
143
|
-
- related to found features or components
|
|
144
|
-
→ Output: recent actions with descriptions
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
### 1.6 Build Impact Map
|
|
148
|
-
|
|
149
|
-
Assemble all found references into a structured impact map:
|
|
150
|
-
|
|
151
|
-
```json
|
|
152
|
-
{
|
|
153
|
-
"affected_features": ["feat-auth"],
|
|
154
|
-
"affected_requirements": ["REQ-001", "REQ-002"],
|
|
155
|
-
"affected_components": ["tech-auth-service", "tech-user-model"],
|
|
156
|
-
"architecture_constraints": ["ADR-001"],
|
|
157
|
-
"recent_actions": ["task-123"],
|
|
158
|
-
"complexity": "Medium"
|
|
159
|
-
}
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
Save as `planning-context.md` (legacy format for backward compatibility).
|
|
163
|
-
|
|
164
|
-
### Phase 1.7: Symbol Query (DeepWiki Bridge)
|
|
165
|
-
|
|
166
|
-
If DeepWiki is available (`deepwiki_feature_to_symbol_index` exists in doc-index.json):
|
|
167
|
-
|
|
168
|
-
1. Collect all `codeLocations[].path` from matched `technicalComponents[]`
|
|
169
|
-
2. Query DeepWiki: `POST /api/deepwiki/symbols-for-paths { paths: unique_paths }`
|
|
170
|
-
3. Build symbol_docs by component, sorted by type priority (class > function > method)
|
|
171
|
-
4. Populate `doc_context.symbol_docs[]` with Top-5 symbols per component
|
|
172
|
-
|
|
173
|
-
**Graceful degradation**: If DeepWiki unavailable → log warning → skip symbol injection → continue flow.
|
|
174
|
-
|
|
175
|
-
### Phase 1.8: Persist Doc Context Package
|
|
176
|
-
|
|
177
|
-
After building doc_context (including symbol_docs from Phase 1.7), persist it as a reusable context package:
|
|
178
|
-
|
|
179
|
-
1. Bundle doc_context into JSON structure:
|
|
180
|
-
```json
|
|
181
|
-
{
|
|
182
|
-
"affected_features": ["feat-auth"],
|
|
183
|
-
"affected_requirements": ["REQ-001", "REQ-002"],
|
|
184
|
-
"affected_components": ["tech-auth-service"],
|
|
185
|
-
"architecture_constraints": ["ADR-001"],
|
|
186
|
-
"index_path": ".workflow/.doc-index/doc-index.json",
|
|
187
|
-
"symbol_docs": [...]
|
|
188
|
-
}
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
2. Write to session folder: `{sessionFolder}/.process/doc-context-package.json`
|
|
192
|
-
3. Store relative path for task.json population: `../.process/doc-context-package.json`
|
|
193
|
-
|
|
194
|
-
**Error handling**: If write fails → log warning → continue without context package (backward compatible).
|
|
195
|
-
|
|
196
|
-
---
|
|
197
|
-
|
|
198
|
-
## Phase 2: Doc-Index-Guided Exploration (NEW)
|
|
199
|
-
|
|
200
|
-
Use Phase 1 results to **SELECT exploration angles intelligently**:
|
|
201
|
-
|
|
202
|
-
### 2.1 Angle Selection Logic
|
|
203
|
-
|
|
204
|
-
| Phase 1 Signal | Add Exploration Angle |
|
|
205
|
-
|----------------|----------------------|
|
|
206
|
-
| feat-auth or security-related ADR affected | `security` |
|
|
207
|
-
| Multiple features crossed (2+) | `integration-points` |
|
|
208
|
-
| New component needed (no matching tech-*) | `architecture` |
|
|
209
|
-
| Performance-related requirements | `performance` |
|
|
210
|
-
| Default (always included) | `patterns` + `dependencies` |
|
|
211
|
-
|
|
212
|
-
Select 1-4 angles total. More angles for higher complexity.
|
|
213
|
-
|
|
214
|
-
### 2.2 Skip & Trigger Conditions
|
|
215
|
-
|
|
216
|
-
| Complexity | Default Behavior | Override |
|
|
217
|
-
|-----------|-----------------|---------|
|
|
218
|
-
| **Low** | Auto-skip Phase 2 | `--explore` forces exploration |
|
|
219
|
-
| **Medium** | Ask user (unless `-y` → skip) | `--explore` forces, `--skip-explore` forces skip |
|
|
220
|
-
| **High** | Always run | `--skip-explore` forces skip |
|
|
221
|
-
|
|
222
|
-
Skip Phase 2 entirely when:
|
|
223
|
-
- Complexity is Low AND `--explore` not set
|
|
224
|
-
- OR `--skip-explore` flag is set
|
|
225
|
-
- OR `-y` flag AND complexity is Medium
|
|
226
|
-
|
|
227
|
-
### 2.3 Parallel Exploration
|
|
228
|
-
|
|
229
|
-
Launch 1-4 parallel `cli-explore-agent` runs:
|
|
230
|
-
|
|
231
|
-
```
|
|
232
|
-
For each selected angle:
|
|
233
|
-
Agent(subagent_type="cli-explore-agent", prompt="
|
|
234
|
-
Explore codebase for: {user task description}
|
|
235
|
-
Angle: {angle}
|
|
236
|
-
|
|
237
|
-
## Doc-Index Context (pre-loaded)
|
|
238
|
-
Features affected: {feature names + IDs}
|
|
239
|
-
Components: {component names + code locations}
|
|
240
|
-
Requirements: {requirement titles}
|
|
241
|
-
Architecture decisions: {ADR titles + decisions}
|
|
242
|
-
|
|
243
|
-
Focus exploration on {angle}-specific concerns.
|
|
244
|
-
Output: explore-json-schema format.
|
|
245
|
-
")
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
Each agent receives doc-index context (feature-maps, tech-registry docs) to avoid cold-start.
|
|
249
|
-
|
|
250
|
-
### 2.4 Save Exploration Results
|
|
251
|
-
|
|
252
|
-
- Each exploration → `exploration-{angle}.json` (explore-json-schema)
|
|
253
|
-
- Manifest → `explorations-manifest.json`:
|
|
254
|
-
|
|
255
|
-
```json
|
|
256
|
-
{
|
|
257
|
-
"explorations": [
|
|
258
|
-
{ "angle": "patterns", "path": "exploration-patterns.json", "file_count": 12 },
|
|
259
|
-
{ "angle": "security", "path": "exploration-security.json", "file_count": 8 }
|
|
260
|
-
],
|
|
261
|
-
"total_files_discovered": 18,
|
|
262
|
-
"timestamp": "ISO8601"
|
|
263
|
-
}
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
---
|
|
267
|
-
|
|
268
|
-
## Phase 3: Clarification (NEW)
|
|
269
|
-
|
|
270
|
-
### 3.1 Aggregate Clarification Needs
|
|
271
|
-
|
|
272
|
-
Collect from three sources:
|
|
273
|
-
1. **Exploration results**: `clarification_needs[]` from each exploration JSON
|
|
274
|
-
2. **Doc-index gaps**: unmapped requirements, orphan components, missing feature coverage
|
|
275
|
-
3. **Conflicting constraints**: contradictory architecture decisions, requirement priority conflicts
|
|
276
|
-
|
|
277
|
-
### 3.2 Deduplicate & Batch
|
|
278
|
-
|
|
279
|
-
- Merge duplicate/similar questions across exploration angles
|
|
280
|
-
- Group into rounds (max 4 questions per AskUserQuestion call)
|
|
281
|
-
- Prioritize: blocking questions first, nice-to-have last
|
|
282
|
-
|
|
283
|
-
### 3.3 Skip Conditions
|
|
284
|
-
|
|
285
|
-
Skip Phase 3 when:
|
|
286
|
-
- `-y` flag is set
|
|
287
|
-
- `--skip-clarify` flag is set
|
|
288
|
-
- No clarification needs collected from any source
|
|
289
|
-
- Complexity is Low AND Phase 2 was skipped (no exploration results to aggregate)
|
|
290
|
-
|
|
291
|
-
### 3.4 Execute Clarification
|
|
292
|
-
|
|
293
|
-
```
|
|
294
|
-
AskUserQuestion(questions=[
|
|
295
|
-
{
|
|
296
|
-
question: "Which authentication strategy should the new endpoint use?",
|
|
297
|
-
header: "Auth strategy",
|
|
298
|
-
options: [
|
|
299
|
-
{ label: "JWT Bearer (Recommended)", description: "Consistent with ADR-001 and existing auth middleware" },
|
|
300
|
-
{ label: "API Key", description: "Simpler but inconsistent with current architecture" },
|
|
301
|
-
{ label: "OAuth2", description: "Most flexible but higher implementation cost" }
|
|
302
|
-
],
|
|
303
|
-
multiSelect: false
|
|
304
|
-
}
|
|
305
|
-
])
|
|
306
|
-
```
|
|
307
|
-
|
|
308
|
-
Feed answers back into Phase 4 as constraints.
|
|
309
|
-
|
|
310
|
-
---
|
|
311
|
-
|
|
312
|
-
## Phase 4: Task Planning (NEW — produces plan.json + TASK-*.json)
|
|
313
|
-
|
|
314
|
-
### 4.1 Planning Strategy Selection
|
|
315
|
-
|
|
316
|
-
| Complexity | Strategy |
|
|
317
|
-
|-----------|---------|
|
|
318
|
-
| Low | Direct Claude planning (inline) |
|
|
319
|
-
| Medium | cli-lite-planning-agent with doc-index context |
|
|
320
|
-
| High | cli-lite-planning-agent with full exploration + doc-index context |
|
|
321
|
-
|
|
322
|
-
### 4.2 Planning Input Assembly
|
|
323
|
-
|
|
324
|
-
Combine:
|
|
325
|
-
- User's original task description
|
|
326
|
-
- Phase 1 impact map (features, requirements, components, ADRs)
|
|
327
|
-
- Phase 2 exploration results (if executed)
|
|
328
|
-
- Phase 3 clarification answers (if collected)
|
|
329
|
-
- Relevant feature-map and tech-registry doc excerpts
|
|
330
|
-
|
|
331
|
-
### 4.3 Execute Planning
|
|
332
|
-
|
|
333
|
-
For **Low complexity** (direct):
|
|
334
|
-
```
|
|
335
|
-
Generate plan.json + TASK-*.json directly based on assembled context.
|
|
336
|
-
```
|
|
337
|
-
|
|
338
|
-
For **Medium/High complexity**:
|
|
339
|
-
```
|
|
340
|
-
Agent(subagent_type="cli-lite-planning-agent", prompt="
|
|
341
|
-
Task: {user task description}
|
|
342
|
-
|
|
343
|
-
## Doc-Index Impact Map
|
|
344
|
-
{Phase 1 results}
|
|
345
|
-
|
|
346
|
-
## Exploration Context
|
|
347
|
-
{Phase 2 results summary}
|
|
348
|
-
|
|
349
|
-
## Clarification Answers
|
|
350
|
-
{Phase 3 answers}
|
|
351
|
-
|
|
352
|
-
## Architecture Constraints
|
|
353
|
-
{ADR excerpts}
|
|
354
|
-
|
|
355
|
-
Generate plan following plan-overview-base-schema.
|
|
356
|
-
Generate tasks following task-schema.
|
|
357
|
-
Include doc_context in both plan.json and each TASK-*.json.
|
|
358
|
-
")
|
|
359
|
-
```
|
|
360
|
-
|
|
361
|
-
### 4.3.1 Populate Task Artifacts (TASK-002)
|
|
362
|
-
|
|
363
|
-
After task generation, enrich each TASK-*.json with artifacts[] field:
|
|
364
|
-
|
|
365
|
-
1. Load doc-index.json from `.workflow/.doc-index/doc-index.json`
|
|
366
|
-
2. For each task, extract feature_ids from task.doc_context
|
|
367
|
-
3. Filter doc-index features/requirements matching task scope:
|
|
368
|
-
- Match by feature_ids in task.doc_context.feature_ids
|
|
369
|
-
- Include linked requirements via requirementIds
|
|
370
|
-
- Include linked components via componentIds
|
|
371
|
-
4. Populate task.artifacts[] with filtered references:
|
|
372
|
-
|
|
373
|
-
```json
|
|
374
|
-
{
|
|
375
|
-
"artifacts": [
|
|
376
|
-
{
|
|
377
|
-
"type": "feature_spec",
|
|
378
|
-
"source": "doc-index",
|
|
379
|
-
"path": ".workflow/.doc-index/feature-maps/auth.md",
|
|
380
|
-
"feature_id": "feat-auth",
|
|
381
|
-
"usage": "Reference for authentication requirements"
|
|
382
|
-
},
|
|
383
|
-
{
|
|
384
|
-
"type": "requirement",
|
|
385
|
-
"source": "doc-index",
|
|
386
|
-
"path": ".workflow/.doc-index/doc-index.json#requirements[0]",
|
|
387
|
-
"feature_id": "feat-auth",
|
|
388
|
-
"requirement_id": "REQ-001",
|
|
389
|
-
"usage": "Acceptance criteria source"
|
|
390
|
-
},
|
|
391
|
-
{
|
|
392
|
-
"type": "component_doc",
|
|
393
|
-
"source": "doc-index",
|
|
394
|
-
"path": ".workflow/.doc-index/tech-registry/auth-service.md",
|
|
395
|
-
"component_id": "tech-auth-service",
|
|
396
|
-
"usage": "Implementation reference"
|
|
397
|
-
}
|
|
398
|
-
]
|
|
399
|
-
}
|
|
400
|
-
```
|
|
401
|
-
|
|
402
|
-
**Loading pattern** (following brainstorm pattern from action-planning-agent.md:200-214):
|
|
403
|
-
- Load doc-index.json once for catalog
|
|
404
|
-
- Filter by task-relevant feature IDs (1-3 per task)
|
|
405
|
-
- Only include artifacts directly referenced in task scope
|
|
406
|
-
- Use relative paths from task file location
|
|
407
|
-
|
|
408
|
-
### 4.3.2 Populate Context Package Path (TASK-001)
|
|
409
|
-
|
|
410
|
-
Set context_package_path field in each TASK-*.json:
|
|
411
|
-
|
|
412
|
-
```json
|
|
413
|
-
{
|
|
414
|
-
"context_package_path": "../.process/doc-context-package.json"
|
|
415
|
-
}
|
|
416
|
-
```
|
|
417
|
-
|
|
418
|
-
Relative path from `.task/TASK-*.json` to `.process/doc-context-package.json`.
|
|
419
|
-
|
|
420
|
-
### 4.3.3 Add Navigation Links Block (TASK-003)
|
|
421
|
-
|
|
422
|
-
Add links{} navigation block to each TASK-*.json for improved discoverability:
|
|
423
|
-
|
|
424
|
-
```json
|
|
425
|
-
{
|
|
426
|
-
"links": {
|
|
427
|
-
"plan": "../plan.json",
|
|
428
|
-
"doc_index": "../../../doc-index.json",
|
|
429
|
-
"feature_maps": [
|
|
430
|
-
"../../../feature-maps/auth.md"
|
|
431
|
-
],
|
|
432
|
-
"related_tasks": [
|
|
433
|
-
"TASK-002.json",
|
|
434
|
-
"TASK-003.json"
|
|
435
|
-
]
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
```
|
|
439
|
-
|
|
440
|
-
**Path computation**:
|
|
441
|
-
- `plan`: Relative path from `.task/TASK-*.json` to `plan.json` (sibling of .task/)
|
|
442
|
-
- `doc_index`: Relative path to `.workflow/.doc-index/doc-index.json`
|
|
443
|
-
- `feature_maps`: Paths to feature-map docs from task.doc_context.feature_docs
|
|
444
|
-
- `related_tasks`: Task IDs from task.depends_on or tasks sharing same feature_ids
|
|
445
|
-
|
|
446
|
-
**Backward compatibility**: links{} is optional field (task-schema allows additionalProperties).
|
|
447
|
-
|
|
448
|
-
### 4.4 Output Schema: plan.json
|
|
449
|
-
|
|
450
|
-
Follows `plan-overview-base-schema` with ddd-specific `doc_context` extension:
|
|
451
|
-
|
|
452
|
-
```json
|
|
453
|
-
{
|
|
454
|
-
"summary": "...",
|
|
455
|
-
"approach": "...",
|
|
456
|
-
"task_ids": ["TASK-001", "TASK-002"],
|
|
457
|
-
"task_count": 2,
|
|
458
|
-
"complexity": "Medium",
|
|
459
|
-
"doc_context": {
|
|
460
|
-
"affected_features": ["feat-auth"],
|
|
461
|
-
"affected_requirements": ["REQ-001", "REQ-002"],
|
|
462
|
-
"affected_components": ["tech-auth-service"],
|
|
463
|
-
"architecture_constraints": ["ADR-001"],
|
|
464
|
-
"index_path": ".workflow/.doc-index/doc-index.json",
|
|
465
|
-
"symbol_docs": [
|
|
466
|
-
{
|
|
467
|
-
"symbol_urn": "deepwiki:symbol:<path>#L<start>-L<end>",
|
|
468
|
-
"name": "SymbolName",
|
|
469
|
-
"type": "class|function|method",
|
|
470
|
-
"doc_summary": "Generated documentation summary...",
|
|
471
|
-
"source_path": "src/path/to/file.ts",
|
|
472
|
-
"doc_path": ".deepwiki/file.md",
|
|
473
|
-
"freshness": "fresh|stale|unknown"
|
|
474
|
-
}
|
|
475
|
-
]
|
|
476
|
-
},
|
|
477
|
-
"_metadata": {
|
|
478
|
-
"timestamp": "ISO8601",
|
|
479
|
-
"source": "cli-lite-planning-agent",
|
|
480
|
-
"plan_type": "feature",
|
|
481
|
-
"schema_version": "2.0",
|
|
482
|
-
"exploration_angles": ["patterns", "security"]
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
```
|
|
486
|
-
|
|
487
|
-
### 4.5 Output Schema: TASK-*.json
|
|
488
|
-
|
|
489
|
-
Follows `task-schema` with ddd-specific `doc_context` extension:
|
|
490
|
-
|
|
491
|
-
```json
|
|
492
|
-
{
|
|
493
|
-
"id": "TASK-001",
|
|
494
|
-
"title": "Add rate limiting middleware",
|
|
495
|
-
"description": "...",
|
|
496
|
-
"depends_on": [],
|
|
497
|
-
"convergence": {
|
|
498
|
-
"criteria": ["Rate limiter middleware exists and is registered", "Tests pass"],
|
|
499
|
-
"verification": "npm test -- --grep rate-limit",
|
|
500
|
-
"definition_of_done": "API endpoints enforce rate limits per ADR-001 specifications"
|
|
501
|
-
},
|
|
502
|
-
"doc_context": {
|
|
503
|
-
"feature_ids": ["feat-auth"],
|
|
504
|
-
"requirement_ids": ["REQ-001"],
|
|
505
|
-
"component_ids": ["tech-auth-service"],
|
|
506
|
-
"adr_ids": ["ADR-001"],
|
|
507
|
-
"feature_docs": ["feature-maps/auth.md"],
|
|
508
|
-
"component_docs": ["tech-registry/auth-service.md"],
|
|
509
|
-
"symbol_docs": [
|
|
510
|
-
{
|
|
511
|
-
"symbol_urn": "deepwiki:symbol:<path>#L<start>-L<end>",
|
|
512
|
-
"name": "SymbolName",
|
|
513
|
-
"type": "class|function|method",
|
|
514
|
-
"doc_summary": "Generated documentation summary...",
|
|
515
|
-
"source_path": "src/path/to/file.ts",
|
|
516
|
-
"doc_path": ".deepwiki/file.md",
|
|
517
|
-
"freshness": "fresh|stale|unknown"
|
|
518
|
-
}
|
|
519
|
-
]
|
|
520
|
-
},
|
|
521
|
-
"files": [...],
|
|
522
|
-
"implementation": [...]
|
|
523
|
-
}
|
|
524
|
-
```
|
|
525
|
-
|
|
526
|
-
### 4.6 Enrichment Rules
|
|
527
|
-
|
|
528
|
-
Each task is enriched with:
|
|
529
|
-
- `feature_ids`, `requirement_ids`, `component_ids`, `adr_ids` — traced from Phase 1
|
|
530
|
-
- Relevant feature-map and tech-registry doc paths
|
|
531
|
-
- Requirement acceptance criteria as convergence criteria source
|
|
532
|
-
- ADR decisions as implementation constraints
|
|
533
|
-
|
|
534
|
-
---
|
|
535
|
-
|
|
536
|
-
## Phase 5: Confirmation & Handoff Selection
|
|
537
|
-
|
|
538
|
-
### 5.1 Display Plan Summary
|
|
539
|
-
|
|
540
|
-
Show:
|
|
541
|
-
- Plan overview (summary, approach, complexity)
|
|
542
|
-
- Task list with dependencies
|
|
543
|
-
- Doc-index impact: which features/requirements/components will be affected
|
|
544
|
-
- Estimated scope
|
|
545
|
-
|
|
546
|
-
### 5.2 Handoff Options
|
|
547
|
-
|
|
548
|
-
| Option | Description | When |
|
|
549
|
-
|--------|-------------|------|
|
|
550
|
-
| **ddd:execute** | Document-aware execution (recommended) | Default for ddd workflow |
|
|
551
|
-
| **lite-execute** | Standard execution (no doc awareness) | When doc traceability not needed |
|
|
552
|
-
| **direct** | Output context, manual work | User prefers manual coding |
|
|
553
|
-
| **stop** | Planning only, no execution | Research/analysis tasks |
|
|
554
|
-
|
|
555
|
-
### 5.3 Auto-Selection
|
|
556
|
-
|
|
557
|
-
With `-y`: auto-select `ddd:execute`.
|
|
558
|
-
|
|
559
|
-
Without `-y`: present options via AskUserQuestion.
|
|
560
|
-
|
|
561
|
-
---
|
|
562
|
-
|
|
563
|
-
## Phase 6: Handoff
|
|
564
|
-
|
|
565
|
-
### 6.1 Build Execution Context
|
|
566
|
-
|
|
567
|
-
Build `executionContext` compatible with lite-execute format:
|
|
568
|
-
|
|
569
|
-
```json
|
|
570
|
-
{
|
|
571
|
-
"plan_path": ".workflow/.doc-index/planning/{slug}/plan.json",
|
|
572
|
-
"task_dir": ".workflow/.doc-index/planning/{slug}/.task/",
|
|
573
|
-
"doc_index_path": ".workflow/.doc-index/doc-index.json",
|
|
574
|
-
"exploration_manifest": ".workflow/.doc-index/planning/{slug}/explorations-manifest.json",
|
|
575
|
-
"original_input": "user's task description"
|
|
576
|
-
}
|
|
577
|
-
```
|
|
578
|
-
|
|
579
|
-
### 6.2 Invoke Selected Engine
|
|
580
|
-
|
|
581
|
-
| Selection | Action |
|
|
582
|
-
|-----------|--------|
|
|
583
|
-
| `ddd:execute` | Invoke `/ddd:execute --in-memory` with executionContext |
|
|
584
|
-
| `lite-execute` | Invoke `/workflow:lite-execute` with plan.json path |
|
|
585
|
-
| `direct` | Display context package + file list for manual work |
|
|
586
|
-
| `stop` | Output plan summary, end here |
|
|
587
|
-
|
|
588
|
-
---
|
|
589
|
-
|
|
590
|
-
## Flags
|
|
591
|
-
|
|
592
|
-
| Flag | Effect |
|
|
593
|
-
|------|--------|
|
|
594
|
-
| `-y, --yes` | Skip clarification, auto-select ddd:execute |
|
|
595
|
-
| `--explore` | Force Phase 2 exploration even for Low complexity |
|
|
596
|
-
| `--skip-explore` | Skip Phase 2 (doc-index-guided exploration) |
|
|
597
|
-
| `--skip-clarify` | Skip Phase 3 (clarification) only |
|
|
598
|
-
|
|
599
|
-
## Output
|
|
600
|
-
|
|
601
|
-
- **Primary**: plan.json + TASK-*.json in session folder
|
|
602
|
-
- **Secondary**: planning-context.md (legacy format)
|
|
603
|
-
- **Exploration**: exploration-{angle}.json files (if Phase 2 ran)
|
|
604
|
-
- **Console**: Plan summary with doc-index impact
|
|
605
|
-
|
|
606
|
-
## Integration Points
|
|
607
|
-
|
|
608
|
-
- **Input from**: `doc-index.json` (built by `/ddd:index-build` or `/ddd:scan`)
|
|
609
|
-
- **Output to**: `/ddd:execute`, `/workflow:lite-execute`, `/ddd:sync` post-task
|
|
610
|
-
- **Schemas**: `plan-overview-ddd-schema.json` (plan output), `task-schema.json` + `task-ddd-extension-schema.json` (task output), `explore-json-schema.json`
|
|
611
|
-
- **Triggers**: Before any development task in ddd workflow
|