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,212 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: index-build
|
|
3
|
-
description: Build document index from spec-generator outputs + codebase mapping. Requires existing spec session. For projects without specs, use /ddd:scan instead.
|
|
4
|
-
argument-hint: "[-y|--yes] [-s|--spec <spec-session-id>] [--from-scratch]"
|
|
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, use inferred mappings, skip interactive review.
|
|
11
|
-
|
|
12
|
-
# DDD Index Build Command (/ddd:index-build)
|
|
13
|
-
|
|
14
|
-
## Purpose
|
|
15
|
-
|
|
16
|
-
From **spec-generator outputs** (requirements, architecture, epics), construct the central document index and map spec entities to actual code locations.
|
|
17
|
-
|
|
18
|
-
```
|
|
19
|
-
Spec outputs (REQ, ADR, EPIC) + Codebase → doc-index.json
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
> **No spec?** Use `/ddd:scan` instead — it reverse-engineers the index from code alone.
|
|
23
|
-
|
|
24
|
-
## Prerequisite
|
|
25
|
-
|
|
26
|
-
- At least one spec session in `.workflow/.doc-index/specs/` or `.workflow/.spec/`
|
|
27
|
-
- If no spec found → error with suggestion: "No spec session found. Run /ddd:scan for code-first indexing, or /spec-generator to create specs."
|
|
28
|
-
|
|
29
|
-
## Storage Location
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
.workflow/.doc-index/
|
|
33
|
-
├── doc-index.json ← Central index (primary output)
|
|
34
|
-
├── specs/ ← Spec-generator outputs
|
|
35
|
-
│ └── SPEC-{slug}-{date}/
|
|
36
|
-
├── feature-maps/ ← Feature documentation (from Epics)
|
|
37
|
-
│ ├── _index.md
|
|
38
|
-
│ └── {feature-slug}.md
|
|
39
|
-
├── tech-registry/ ← Technical component docs (from code mapping)
|
|
40
|
-
│ ├── _index.md
|
|
41
|
-
│ └── {component-slug}.md
|
|
42
|
-
└── action-logs/ ← Change history (initially empty)
|
|
43
|
-
└── _index.md
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## Phase 1: Discover & Parse Spec Sources
|
|
47
|
-
|
|
48
|
-
### 1.1 Locate Spec Session
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
IF --spec <id> provided:
|
|
52
|
-
Load from .workflow/.doc-index/specs/<id>/ OR .workflow/.spec/<id>/
|
|
53
|
-
ELSE:
|
|
54
|
-
Scan for all SPEC-* directories
|
|
55
|
-
IF multiple → present list, ask user to select (-y picks latest)
|
|
56
|
-
IF none → ERROR: "No spec session found. Use /ddd:scan or /spec-generator."
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
### 1.2 Migrate Specs (if needed)
|
|
60
|
-
|
|
61
|
-
If spec in `.workflow/.spec/` but not in `.workflow/.doc-index/specs/`:
|
|
62
|
-
- Copy to `.workflow/.doc-index/specs/`
|
|
63
|
-
- Preserve original (backward compatibility)
|
|
64
|
-
|
|
65
|
-
### 1.3 Extract Structured Entities
|
|
66
|
-
|
|
67
|
-
| Source File | Extract To |
|
|
68
|
-
|------------|------------|
|
|
69
|
-
| `spec-config.json` | project name, domain, spec_type |
|
|
70
|
-
| `glossary.json` | → index glossary[] |
|
|
71
|
-
| `product-brief.md` | vision, goals |
|
|
72
|
-
| `requirements/REQ-*.md` | → index requirements[] (with MoSCoW priority) |
|
|
73
|
-
| `requirements/NFR-*.md` | → index requirements[] (non-functional) |
|
|
74
|
-
| `architecture/ADR-*.md` | → index architectureDecisions[] |
|
|
75
|
-
| `epics/EPIC-*.md` | → feature grouping seeds |
|
|
76
|
-
|
|
77
|
-
## Phase 2: Codebase Mapping
|
|
78
|
-
|
|
79
|
-
Map spec entities to actual code locations using Gemini:
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
ccw cli -p "PURPOSE: Map codebase to specification entities for documentation indexing.
|
|
83
|
-
TASK:
|
|
84
|
-
• Scan the codebase and identify all major modules/components
|
|
85
|
-
• For each component: extract file paths, exported symbols (classes, functions, types)
|
|
86
|
-
• Match components to these specification entities by name/domain similarity:
|
|
87
|
-
Requirements: {REQ-001: desc, REQ-002: desc, ...extracted from Phase 1}
|
|
88
|
-
Architecture decisions: {ADR-001: title, ...extracted from Phase 1}
|
|
89
|
-
• Report unmatched components (exist in code but no spec counterpart)
|
|
90
|
-
• Report unmatched requirements (in spec but no code found)
|
|
91
|
-
MODE: analysis
|
|
92
|
-
CONTEXT: @**/*
|
|
93
|
-
EXPECTED: JSON: { components: [{ name, type, files, symbols, matched_req_ids, matched_adr_id, is_orphan }], unmatched_reqs: [REQ-NNN] }
|
|
94
|
-
CONSTRAINTS: Focus on source directories | Ignore node_modules, dist, build" --tool gemini --mode analysis
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
### 2.1 Generate Component IDs & Link
|
|
98
|
-
|
|
99
|
-
For each discovered component:
|
|
100
|
-
- ID: `tech-{kebab-case-name}`
|
|
101
|
-
- Link to matched `REQ-NNN` and `ADR-NNN`
|
|
102
|
-
- Flag orphans for user review
|
|
103
|
-
|
|
104
|
-
## Phase 3: Build Feature Map (from Epics)
|
|
105
|
-
|
|
106
|
-
### 3.1 Epic → Feature Mapping
|
|
107
|
-
|
|
108
|
-
```
|
|
109
|
-
Each EPIC-NNN → one feat-{slug}
|
|
110
|
-
- id: feat-{slug} (from epic slug)
|
|
111
|
-
- name: from Epic name
|
|
112
|
-
- epicId: EPIC-NNN
|
|
113
|
-
- status: inferred from code mapping
|
|
114
|
-
- all requirements have matched components → "implemented"
|
|
115
|
-
- some matched → "in-progress"
|
|
116
|
-
- none matched → "planned"
|
|
117
|
-
- requirementIds: from Epic's stories → requirement links
|
|
118
|
-
- tags: from domain keywords
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
### 3.2 Document Generation (delegated)
|
|
122
|
-
|
|
123
|
-
Feature-map and tech-registry document generation is handled by `/ddd:doc-generate` in Phase 5.
|
|
124
|
-
Phase 3 only builds the data structures (feature → requirement → component mappings) that doc-generate consumes.
|
|
125
|
-
|
|
126
|
-
## Phase 4: Assemble doc-index.json
|
|
127
|
-
|
|
128
|
-
```json
|
|
129
|
-
{
|
|
130
|
-
"version": "1.0",
|
|
131
|
-
"project": "{project-name}",
|
|
132
|
-
"build_path": "spec-first",
|
|
133
|
-
"spec_session": "SPEC-{slug}-{date}",
|
|
134
|
-
"last_updated": "ISO8601",
|
|
135
|
-
"glossary": [
|
|
136
|
-
{ "id": "gloss-{slug}", "term": "Term", "definition": "...", "aliases": [], "category": "core|technical|business" }
|
|
137
|
-
],
|
|
138
|
-
"features": [
|
|
139
|
-
{ "id": "feat-{slug}", "name": "...", "epicId": "EPIC-NNN", "status": "...", "docPath": "feature-maps/{slug}.md", "requirementIds": ["REQ-NNN"], "tags": [] }
|
|
140
|
-
],
|
|
141
|
-
"requirements": [
|
|
142
|
-
{ "id": "REQ-NNN", "title": "...", "source": "spec", "priority": "Must|Should|Could|Won't", "sourcePath": "specs/SPEC-*/requirements/REQ-NNN-*.md", "techComponentIds": ["tech-{slug}"], "featureId": "feat-{slug}" }
|
|
143
|
-
],
|
|
144
|
-
"technicalComponents": [
|
|
145
|
-
{ "id": "tech-{slug}", "name": "...", "type": "...", "responsibility": "...", "adrId": "ADR-NNN|null", "docPath": "tech-registry/{slug}.md", "codeLocations": [{ "path": "...", "symbols": [], "lineRange": [0,0] }], "dependsOn": [], "featureIds": ["feat-{slug}"], "actionIds": [] }
|
|
146
|
-
],
|
|
147
|
-
"architectureDecisions": [
|
|
148
|
-
{ "id": "ADR-NNN", "title": "...", "source": "spec", "sourcePath": "specs/SPEC-*/architecture/ADR-NNN-*.md", "componentIds": ["tech-{slug}"] }
|
|
149
|
-
],
|
|
150
|
-
"actions": []
|
|
151
|
-
}
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
### Merge with Existing Code-First Index
|
|
155
|
-
|
|
156
|
-
If a code-first index exists (from prior `/ddd:scan`):
|
|
157
|
-
- Replace `IREQ-NNN` with matching `REQ-NNN` where content overlaps
|
|
158
|
-
- Keep `IREQ-NNN` without spec counterpart (mark `source: "legacy-inferred"`)
|
|
159
|
-
- Replace `IADR-NNN` with `ADR-NNN` where applicable
|
|
160
|
-
- Update `build_path` to `"spec-first"`
|
|
161
|
-
- Preserve existing `tech-*` components (update links only)
|
|
162
|
-
|
|
163
|
-
## Phase 5: Generate Documents
|
|
164
|
-
|
|
165
|
-
Delegate all document generation to `/ddd:doc-generate`:
|
|
166
|
-
|
|
167
|
-
```
|
|
168
|
-
Invoke /ddd:doc-generate [-y]
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
This generates the complete document tree (Layer 3 → 2 → 1):
|
|
172
|
-
- `tech-registry/{slug}.md` — component docs from Phase 2 mapping (Layer 3)
|
|
173
|
-
- `feature-maps/{slug}.md` — feature docs from Phase 3 mapping (Layer 2)
|
|
174
|
-
- `_index.md`, `README.md`, `ARCHITECTURE.md`, `SCHEMA.md` — index/overview docs (Layer 1)
|
|
175
|
-
|
|
176
|
-
See `/ddd:doc-generate` for full details on generation strategy and flags.
|
|
177
|
-
|
|
178
|
-
## Phase 6: Coverage Report
|
|
179
|
-
|
|
180
|
-
```
|
|
181
|
-
Index Build Report (spec-first)
|
|
182
|
-
|
|
183
|
-
Spec: {session-id}
|
|
184
|
-
Features: {N} (from {N} Epics)
|
|
185
|
-
Requirements: {N} (REQ: {n}, NFR: {n})
|
|
186
|
-
Components: {N} ({orphan} orphans without spec match)
|
|
187
|
-
ADRs: {N}
|
|
188
|
-
|
|
189
|
-
Mapping Coverage:
|
|
190
|
-
Requirements → Components: {%} ({unmapped} unmapped)
|
|
191
|
-
Components → Features: {%}
|
|
192
|
-
Epics → Features: 100%
|
|
193
|
-
|
|
194
|
-
Gaps:
|
|
195
|
-
- {N} requirements have no matching code component
|
|
196
|
-
- {N} code components are not linked to any requirement
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
## Flags
|
|
200
|
-
|
|
201
|
-
| Flag | Effect |
|
|
202
|
-
|------|--------|
|
|
203
|
-
| `-y, --yes` | Skip all interactive prompts |
|
|
204
|
-
| `-s, --spec <id>` | Use specific spec session |
|
|
205
|
-
| `--from-scratch` | Delete existing index and rebuild |
|
|
206
|
-
|
|
207
|
-
## Integration Points
|
|
208
|
-
|
|
209
|
-
- **Input from**: `spec-generator` outputs, codebase, existing `/ddd:scan` index
|
|
210
|
-
- **Delegates to**: `/ddd:doc-generate` (Phase 5, full document generation)
|
|
211
|
-
- **Output to**: `ddd:plan`, `ddd:sync`, `ddd:update`
|
|
212
|
-
- **Upgrades**: Can merge with prior code-first (`/ddd:scan`) index
|