deepflow 0.1.4 → 0.1.6
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/df/execute.md +75 -134
- package/.claude/commands/df/plan.md +49 -100
- package/.claude/commands/df/verify.md +24 -114
- package/.claude/settings.local.json +12 -0
- package/.claude/skills/atomic-commits/SKILL.md +14 -0
- package/VERSION +1 -1
- package/bin/install.js +14 -7
- package/hooks/df-statusline.js +19 -0
- package/package.json +1 -1
- package/templates/state-template.md +9 -0
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
# /df:execute — Execute Tasks from Plan
|
|
2
2
|
|
|
3
3
|
## Purpose
|
|
4
|
-
Implement tasks from PLAN.md with parallel agents and
|
|
4
|
+
Implement tasks from PLAN.md with parallel agents, atomic commits, and context-efficient execution.
|
|
5
5
|
|
|
6
6
|
## Usage
|
|
7
7
|
```
|
|
8
|
-
/df:execute
|
|
9
|
-
/df:execute T1 T2
|
|
8
|
+
/df:execute # Execute all ready tasks
|
|
9
|
+
/df:execute T1 T2 # Specific tasks only
|
|
10
|
+
/df:execute --continue # Resume from checkpoint
|
|
11
|
+
/df:execute --fresh # Ignore checkpoint
|
|
12
|
+
/df:execute --dry-run # Show plan only
|
|
10
13
|
```
|
|
11
14
|
|
|
12
15
|
## Skills & Agents
|
|
@@ -14,177 +17,115 @@ Implement tasks from PLAN.md with parallel agents and atomic commits.
|
|
|
14
17
|
- Agent: `general-purpose` (Sonnet) — Task implementation
|
|
15
18
|
- Agent: `reasoner` (Opus) — Debugging failures
|
|
16
19
|
|
|
17
|
-
##
|
|
18
|
-
|
|
19
|
-
### 1. LOAD PLAN
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
Load:
|
|
23
|
-
- PLAN.md (required)
|
|
24
|
-
- specs/*.md (for context)
|
|
25
|
-
- .specflow/config.yaml (if exists)
|
|
26
|
-
```
|
|
20
|
+
## Context-Aware Execution
|
|
27
21
|
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
No PLAN.md found. Run /df:plan first.
|
|
31
|
-
```
|
|
22
|
+
Statusline writes to `.deepflow/context.json`: `{"percentage": 45}`
|
|
32
23
|
|
|
33
|
-
|
|
24
|
+
| Context % | Action |
|
|
25
|
+
|-----------|--------|
|
|
26
|
+
| < 50% | Full parallelism (up to 5 agents) |
|
|
27
|
+
| ≥ 50% | Wait for running agents, checkpoint, exit |
|
|
34
28
|
|
|
35
|
-
|
|
36
|
-
- Status is `[ ]` (not done)
|
|
37
|
-
- All `blocked_by` tasks are `[x]` (complete)
|
|
29
|
+
## Agent Protocol
|
|
38
30
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
31
|
+
Agents write results to `.deepflow/results/{task_id}.yaml`:
|
|
32
|
+
```yaml
|
|
33
|
+
task: T3
|
|
34
|
+
status: success
|
|
35
|
+
commit: abc1234
|
|
43
36
|
```
|
|
44
37
|
|
|
45
|
-
|
|
38
|
+
**Spawn with:** `run_in_background: true`
|
|
39
|
+
**Poll:** `Glob(".deepflow/results/T*.yaml")`
|
|
40
|
+
**NEVER use TaskOutput** — returns full trace, wastes context.
|
|
46
41
|
|
|
47
|
-
|
|
42
|
+
## Checkpoint & Resume
|
|
48
43
|
|
|
49
|
-
|
|
50
|
-
|-------------|--------|
|
|
51
|
-
| 1-3 | All parallel |
|
|
52
|
-
| 4-10 | 5 parallel, queue rest |
|
|
53
|
-
| 10+ | 5 parallel, queue rest |
|
|
44
|
+
**File:** `.deepflow/checkpoint.json` — stores completed tasks, current wave.
|
|
54
45
|
|
|
55
|
-
|
|
46
|
+
**On checkpoint:** Complete wave → update PLAN.md → save → exit.
|
|
47
|
+
**Resume:** `--continue` loads checkpoint, skips completed tasks.
|
|
56
48
|
|
|
57
|
-
|
|
58
|
-
If T1 and T2 both modify `src/api.ts`, execute sequentially.
|
|
49
|
+
## Behavior
|
|
59
50
|
|
|
60
|
-
|
|
51
|
+
### 1. CHECK CHECKPOINT
|
|
61
52
|
|
|
62
|
-
|
|
53
|
+
```
|
|
54
|
+
--continue → Load and resume
|
|
55
|
+
--fresh → Delete checkpoint, start fresh
|
|
56
|
+
checkpoint exists → Prompt: "Resume? (y/n)"
|
|
57
|
+
else → Start fresh
|
|
58
|
+
```
|
|
63
59
|
|
|
64
|
-
|
|
60
|
+
### 2. LOAD PLAN
|
|
65
61
|
|
|
66
62
|
```
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
3. IMPLEMENT the task completely
|
|
70
|
-
- No stubs
|
|
71
|
-
- No placeholders
|
|
72
|
-
- No TODO comments
|
|
73
|
-
4. VERIFY implementation works
|
|
74
|
-
- Run related tests if they exist
|
|
75
|
-
- Check TypeScript/lint if applicable
|
|
76
|
-
5. COMMIT atomically
|
|
77
|
-
- Format: feat({spec}): {task description}
|
|
78
|
-
- One task = one commit
|
|
63
|
+
Load: PLAN.md (required), specs/doing-*.md, .deepflow/config.yaml
|
|
64
|
+
If missing: "No PLAN.md found. Run /df:plan first."
|
|
79
65
|
```
|
|
80
66
|
|
|
81
|
-
###
|
|
67
|
+
### 3. CHECK FOR UNPLANNED SPECS
|
|
82
68
|
|
|
83
|
-
|
|
84
|
-
```markdown
|
|
85
|
-
- [x] **T1**: Create upload API endpoint ✓ (abc1234)
|
|
86
|
-
- Files: src/api/upload.ts
|
|
87
|
-
- Blocked by: none
|
|
88
|
-
```
|
|
69
|
+
Warn if `specs/*.md` (excluding doing-/done-) exist. Non-blocking.
|
|
89
70
|
|
|
90
|
-
###
|
|
71
|
+
### 4. IDENTIFY READY TASKS
|
|
91
72
|
|
|
92
|
-
|
|
93
|
-
```
|
|
94
|
-
Wave 1 complete: T1 ✓, T2 ✓
|
|
73
|
+
Ready = `[ ]` + all `blocked_by` complete + not in checkpoint.
|
|
95
74
|
|
|
96
|
-
|
|
97
|
-
Executing wave 2...
|
|
98
|
-
```
|
|
75
|
+
### 5. CHECK CONTEXT & EXECUTE
|
|
99
76
|
|
|
100
|
-
|
|
77
|
+
If context ≥50%: wait for agents, checkpoint, exit.
|
|
101
78
|
|
|
102
|
-
|
|
79
|
+
| Ready | Strategy |
|
|
80
|
+
|-------|----------|
|
|
81
|
+
| 1-3 | All parallel |
|
|
82
|
+
| 4+ | 5 parallel, queue rest |
|
|
103
83
|
|
|
104
|
-
|
|
105
|
-
✓ Execution complete
|
|
84
|
+
1 writer per file. On failure: spawn `reasoner`.
|
|
106
85
|
|
|
107
|
-
|
|
108
|
-
Commits: 5
|
|
109
|
-
Failed: 0
|
|
86
|
+
### 6. PER-TASK (agent)
|
|
110
87
|
|
|
111
|
-
|
|
112
|
-
```
|
|
88
|
+
Implement → verify → commit → write result file.
|
|
113
89
|
|
|
114
|
-
|
|
115
|
-
```
|
|
116
|
-
⚠ Execution paused
|
|
90
|
+
### 7. COMPLETE SPECS
|
|
117
91
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
92
|
+
When all tasks done for a `doing-*` spec:
|
|
93
|
+
1. Embed history in spec: `## Completed` section
|
|
94
|
+
2. Rename: `doing-upload.md` → `done-upload.md`
|
|
95
|
+
3. Remove section from PLAN.md
|
|
121
96
|
|
|
122
|
-
|
|
123
|
-
[error details]
|
|
97
|
+
### 8. ITERATE
|
|
124
98
|
|
|
125
|
-
|
|
126
|
-
```
|
|
99
|
+
Repeat until: all done, all blocked, or checkpoint.
|
|
127
100
|
|
|
128
101
|
## Rules
|
|
129
102
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
- Format: `feat({spec}): {description}`
|
|
138
|
-
- Include task ID in commit body
|
|
139
|
-
- Never commit broken code
|
|
103
|
+
| Rule | Enforcement |
|
|
104
|
+
|------|-------------|
|
|
105
|
+
| 1 task = 1 commit | `atomic-commits` skill |
|
|
106
|
+
| No broken commits | Verify before commit |
|
|
107
|
+
| 1 writer per file | Sequential if conflict |
|
|
108
|
+
| Minimal returns | 5 lines max from agents |
|
|
109
|
+
| Internal verification | Agents fix issues, don't report |
|
|
140
110
|
|
|
141
|
-
|
|
142
|
-
- No stubs or placeholders
|
|
143
|
-
- No `// TODO` comments
|
|
144
|
-
- Implement fully or don't commit
|
|
111
|
+
## Example
|
|
145
112
|
|
|
146
|
-
### Conflict Avoidance
|
|
147
|
-
```
|
|
148
|
-
If T1 writes to src/api.ts
|
|
149
|
-
And T2 writes to src/api.ts
|
|
150
|
-
Then execute T1, wait, then T2
|
|
151
113
|
```
|
|
114
|
+
/df:execute (context: 12%)
|
|
152
115
|
|
|
153
|
-
|
|
116
|
+
Wave 1: T1, T2 parallel (context: 25%)
|
|
117
|
+
T1: success (abc1234)
|
|
118
|
+
T2: success (def5678)
|
|
154
119
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
max_parallel: 5
|
|
158
|
-
per_file_limit: 1
|
|
120
|
+
Wave 2: T3 (context: 48%)
|
|
121
|
+
T3: success (ghi9012)
|
|
159
122
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
debug: opus
|
|
163
|
-
|
|
164
|
-
commit_after: each_task
|
|
165
|
-
push_after: all_complete # Not every commit
|
|
123
|
+
✓ doing-upload → done-upload
|
|
124
|
+
✓ Complete: 3/3 tasks
|
|
166
125
|
```
|
|
167
126
|
|
|
168
|
-
|
|
169
|
-
|
|
127
|
+
With checkpoint:
|
|
170
128
|
```
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
Loading PLAN.md...
|
|
174
|
-
Found 5 tasks, 3 ready (no blockers)
|
|
175
|
-
|
|
176
|
-
Wave 1: Executing T1, T2, T5 in parallel...
|
|
177
|
-
T1: Create upload API endpoint... ✓ (abc1234)
|
|
178
|
-
T2: Add validation middleware... ✓ (def5678)
|
|
179
|
-
T5: Integrate color-thief... ✓ (ghi9012)
|
|
180
|
-
|
|
181
|
-
Wave 2: T3, T4 now unblocked
|
|
182
|
-
T3: Implement S3 upload... ✓ (jkl3456)
|
|
183
|
-
T4: Complete thumbnails... ✓ (mno7890)
|
|
184
|
-
|
|
185
|
-
✓ Execution complete
|
|
186
|
-
Tasks: 5/5
|
|
187
|
-
Commits: 5
|
|
188
|
-
|
|
189
|
-
Run /df:verify to confirm specs satisfied.
|
|
129
|
+
Wave 1 complete (context: 52%)
|
|
130
|
+
Checkpoint saved. Run /df:execute --continue
|
|
190
131
|
```
|
|
@@ -5,26 +5,43 @@ Compare specs against codebase, identify gaps, generate prioritized task list.
|
|
|
5
5
|
|
|
6
6
|
## Usage
|
|
7
7
|
```
|
|
8
|
-
/df:plan
|
|
8
|
+
/df:plan # Plan all new specs
|
|
9
|
+
/df:plan feature.md # Plan specific spec
|
|
9
10
|
```
|
|
10
11
|
|
|
11
12
|
## Skills & Agents
|
|
12
13
|
- Skill: `code-completeness` — Find TODOs, stubs, incomplete work
|
|
13
14
|
- Agent: `reasoner` (Opus) — Complex analysis and prioritization
|
|
14
15
|
|
|
16
|
+
## Spec File States
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
specs/
|
|
20
|
+
feature.md → New, needs planning (this command reads these)
|
|
21
|
+
doing-auth.md → In progress, has tasks in PLAN.md
|
|
22
|
+
done-payments.md → Completed, history embedded
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**Filtering:**
|
|
26
|
+
- New: `specs/*.md` excluding `doing-*` and `done-*`
|
|
27
|
+
- In progress: `specs/doing-*.md`
|
|
28
|
+
- Completed: `specs/done-*.md`
|
|
29
|
+
|
|
15
30
|
## Behavior
|
|
16
31
|
|
|
17
32
|
### 1. LOAD CONTEXT
|
|
18
33
|
|
|
19
34
|
```
|
|
20
35
|
Load:
|
|
21
|
-
- specs/*.md (
|
|
22
|
-
- PLAN.md (if exists,
|
|
23
|
-
- .
|
|
36
|
+
- specs/*.md EXCLUDING doing-* and done-* (only new specs)
|
|
37
|
+
- PLAN.md (if exists, for appending)
|
|
38
|
+
- .deepflow/config.yaml (if exists)
|
|
24
39
|
|
|
25
40
|
Determine source_dir from config or default to src/
|
|
26
41
|
```
|
|
27
42
|
|
|
43
|
+
If no new specs: report counts, suggest `/df:execute`.
|
|
44
|
+
|
|
28
45
|
### 2. ANALYZE CODEBASE
|
|
29
46
|
|
|
30
47
|
**Spawn Explore agents** (haiku, read-only) with dynamic count:
|
|
@@ -44,68 +61,33 @@ Determine source_dir from config or default to src/
|
|
|
44
61
|
|
|
45
62
|
### 3. COMPARE & PRIORITIZE
|
|
46
63
|
|
|
47
|
-
**Spawn `reasoner` agent** (Opus) for
|
|
48
|
-
|
|
49
|
-
| Status | Meaning | Action |
|
|
50
|
-
|--------|---------|--------|
|
|
51
|
-
| DONE | Fully implemented | Mark complete |
|
|
52
|
-
| PARTIAL | Stub or incomplete | Task to complete |
|
|
53
|
-
| MISSING | Not found in code | Task to implement |
|
|
54
|
-
| CONFLICT | Code contradicts spec | Flag for review |
|
|
55
|
-
|
|
56
|
-
Reasoner prioritizes by dependencies, impact, and risk.
|
|
57
|
-
|
|
58
|
-
### 4. PRIORITIZE
|
|
64
|
+
**Spawn `reasoner` agent** (Opus) for analysis:
|
|
59
65
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
66
|
+
| Status | Action |
|
|
67
|
+
|--------|--------|
|
|
68
|
+
| DONE | Skip |
|
|
69
|
+
| PARTIAL | Task to complete |
|
|
70
|
+
| MISSING | Task to implement |
|
|
71
|
+
| CONFLICT | Flag for review |
|
|
64
72
|
|
|
65
|
-
|
|
73
|
+
**Spec gaps:** If spec is ambiguous or missing details, note in output (don't silently assume).
|
|
66
74
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
Specs analyzed: {count}
|
|
75
|
+
**Priority order:**
|
|
76
|
+
1. Dependencies — blockers first
|
|
77
|
+
2. Impact — core features before enhancements
|
|
78
|
+
3. Risk — unknowns early
|
|
72
79
|
|
|
73
|
-
|
|
74
|
-
[If any specs need updates, list here]
|
|
75
|
-
- [ ] specs/X.md: Missing error handling definition
|
|
80
|
+
### 4. OUTPUT PLAN.md
|
|
76
81
|
|
|
77
|
-
|
|
82
|
+
Append tasks grouped by `### doing-{spec-name}`. Include spec gaps if any.
|
|
78
83
|
|
|
79
|
-
###
|
|
80
|
-
|
|
81
|
-
- [ ] **T1**: {task description}
|
|
82
|
-
- Files: {files to create/modify}
|
|
83
|
-
- Blocked by: none
|
|
84
|
+
### 5. RENAME SPECS
|
|
84
85
|
|
|
85
|
-
|
|
86
|
-
- Files: {files}
|
|
87
|
-
- Blocked by: T1
|
|
88
|
-
|
|
89
|
-
### {another-spec}
|
|
90
|
-
|
|
91
|
-
- [ ] **T3**: {task description}
|
|
92
|
-
- Files: {files}
|
|
93
|
-
- Blocked by: none
|
|
94
|
-
```
|
|
86
|
+
`mv specs/feature.md specs/doing-feature.md`
|
|
95
87
|
|
|
96
88
|
### 6. REPORT
|
|
97
89
|
|
|
98
|
-
|
|
99
|
-
✓ Plan generated
|
|
100
|
-
|
|
101
|
-
Specs analyzed: {n}
|
|
102
|
-
Tasks created: {n}
|
|
103
|
-
Spec gaps found: {n}
|
|
104
|
-
|
|
105
|
-
Ready to execute: {n} tasks (no blockers)
|
|
106
|
-
|
|
107
|
-
Next: Run /df:execute to start implementation
|
|
108
|
-
```
|
|
90
|
+
`✓ Plan generated — {n} specs, {n} tasks. Run /df:execute`
|
|
109
91
|
|
|
110
92
|
## Rules
|
|
111
93
|
- **Plan only** — Do NOT implement anything
|
|
@@ -114,58 +96,25 @@ Next: Run /df:execute to start implementation
|
|
|
114
96
|
- Prefer existing utilities over new code
|
|
115
97
|
- Flag spec gaps, don't silently ignore
|
|
116
98
|
|
|
117
|
-
## Agent
|
|
118
|
-
|
|
119
|
-
```yaml
|
|
120
|
-
search_agents:
|
|
121
|
-
base: 10
|
|
122
|
-
per_files: 20 # 1 agent per 20 files
|
|
123
|
-
cap: 100
|
|
99
|
+
## Agent Limits
|
|
124
100
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
model_selection:
|
|
131
|
-
search: sonnet
|
|
132
|
-
analyze: opus
|
|
133
|
-
```
|
|
101
|
+
| Agent | Base | Scale | Cap |
|
|
102
|
+
|-------|------|-------|-----|
|
|
103
|
+
| Explore (search) | 10 | +1 per 20 files | 100 |
|
|
104
|
+
| Reasoner (analyze) | 5 | +1 per 2 specs | 20 |
|
|
134
105
|
|
|
135
|
-
## Example
|
|
106
|
+
## Example
|
|
136
107
|
|
|
137
108
|
```markdown
|
|
138
109
|
# Plan
|
|
139
110
|
|
|
140
|
-
|
|
141
|
-
Specs analyzed: 2
|
|
111
|
+
### doing-upload
|
|
142
112
|
|
|
143
|
-
|
|
144
|
-
-
|
|
145
|
-
|
|
146
|
-
## Tasks
|
|
147
|
-
|
|
148
|
-
### image-upload
|
|
149
|
-
|
|
150
|
-
- [ ] **T1**: Create upload API endpoint
|
|
151
|
-
- Files: src/api/upload.ts (create)
|
|
152
|
-
- Blocked by: none
|
|
153
|
-
|
|
154
|
-
- [ ] **T2**: Add file validation middleware
|
|
155
|
-
- Files: src/middleware/validate.ts (create)
|
|
113
|
+
- [ ] **T1**: Create upload endpoint
|
|
114
|
+
- Files: src/api/upload.ts
|
|
156
115
|
- Blocked by: none
|
|
157
116
|
|
|
158
|
-
- [ ] **
|
|
159
|
-
- Files: src/services/storage.ts
|
|
160
|
-
- Blocked by: T1
|
|
161
|
-
|
|
162
|
-
- [ ] **T4**: Complete thumbnail generation
|
|
163
|
-
- Files: src/services/image.ts:45 (stub found)
|
|
164
|
-
- Blocked by: T3
|
|
165
|
-
|
|
166
|
-
### color-extraction
|
|
167
|
-
|
|
168
|
-
- [ ] **T5**: Integrate color-thief library
|
|
169
|
-
- Files: src/services/color.ts (create)
|
|
117
|
+
- [ ] **T2**: Add S3 service
|
|
118
|
+
- Files: src/services/storage.ts
|
|
170
119
|
- Blocked by: T1
|
|
171
120
|
```
|
|
@@ -5,108 +5,46 @@ Check that implemented code satisfies spec requirements and acceptance criteria.
|
|
|
5
5
|
|
|
6
6
|
## Usage
|
|
7
7
|
```
|
|
8
|
-
/df:verify
|
|
9
|
-
/df:verify
|
|
8
|
+
/df:verify # Verify all done-* specs
|
|
9
|
+
/df:verify --doing # Also verify in-progress specs
|
|
10
|
+
/df:verify done-upload # Verify specific spec
|
|
10
11
|
```
|
|
11
12
|
|
|
12
13
|
## Skills & Agents
|
|
13
14
|
- Skill: `code-completeness` — Find incomplete implementations
|
|
14
15
|
- Agent: `Explore` (Haiku) — Fast codebase scanning
|
|
15
16
|
|
|
16
|
-
##
|
|
17
|
-
|
|
18
|
-
### 1. LOAD CONTEXT
|
|
17
|
+
## Spec File States
|
|
19
18
|
|
|
20
19
|
```
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
20
|
+
specs/
|
|
21
|
+
feature.md → Unplanned (skip)
|
|
22
|
+
doing-auth.md → In progress (verify with --doing)
|
|
23
|
+
done-upload.md → Completed (default verify target)
|
|
25
24
|
```
|
|
26
25
|
|
|
27
|
-
|
|
26
|
+
## Behavior
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
### 1. LOAD CONTEXT
|
|
30
29
|
|
|
31
|
-
#### Requirements Coverage
|
|
32
30
|
```
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
Load:
|
|
32
|
+
- specs/done-*.md (completed specs to verify)
|
|
33
|
+
- specs/doing-*.md (if --doing flag)
|
|
34
|
+
- Source code (actual implementation)
|
|
37
35
|
```
|
|
38
36
|
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
For each criterion:
|
|
42
|
-
- Can it be verified? (testable)
|
|
43
|
-
- Is there evidence it passes?
|
|
44
|
-
- Mark: ✓ | ✗ | ⚠
|
|
45
|
-
```
|
|
37
|
+
If no done-* specs: report counts, suggest `--doing`.
|
|
46
38
|
|
|
47
|
-
|
|
39
|
+
### 2. VERIFY EACH SPEC
|
|
48
40
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
- TODO/FIXME comments (incomplete work)
|
|
52
|
-
- Placeholder returns (fake implementations)
|
|
53
|
-
- Skipped tests (untested code)
|
|
41
|
+
Check requirements, acceptance criteria, and quality (stubs/TODOs).
|
|
42
|
+
Mark each: ✓ satisfied | ✗ missing | ⚠ partial
|
|
54
43
|
|
|
55
44
|
### 3. GENERATE REPORT
|
|
56
45
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
✓ Verification complete
|
|
60
|
-
|
|
61
|
-
specs/image-upload.md
|
|
62
|
-
Requirements: 4/4 ✓
|
|
63
|
-
Acceptance criteria: 5/5 ✓
|
|
64
|
-
Quality: No stubs or TODOs
|
|
65
|
-
|
|
66
|
-
specs/color-extraction.md
|
|
67
|
-
Requirements: 2/2 ✓
|
|
68
|
-
Acceptance criteria: 3/3 ✓
|
|
69
|
-
Quality: No stubs or TODOs
|
|
70
|
-
|
|
71
|
-
All specs satisfied.
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
**If issues found:**
|
|
75
|
-
```
|
|
76
|
-
⚠ Verification found issues
|
|
77
|
-
|
|
78
|
-
specs/image-upload.md
|
|
79
|
-
Requirements: 3/4
|
|
80
|
-
✗ REQ-4: Error handling for S3 failures
|
|
81
|
-
Expected: Graceful error with retry option
|
|
82
|
-
Found: No error handling in src/services/storage.ts
|
|
83
|
-
|
|
84
|
-
Acceptance criteria: 4/5
|
|
85
|
-
⚠ "Upload shows progress bar"
|
|
86
|
-
Found: Progress callback exists but UI not connected
|
|
87
|
-
|
|
88
|
-
Quality:
|
|
89
|
-
⚠ src/services/image.ts:67 — TODO: optimize for large files
|
|
90
|
-
|
|
91
|
-
Action needed:
|
|
92
|
-
1. Add S3 error handling (REQ-4)
|
|
93
|
-
2. Connect progress UI
|
|
94
|
-
3. Complete TODO in image.ts
|
|
95
|
-
|
|
96
|
-
Run /df:plan to generate fix tasks, or fix manually.
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
### 4. UPDATE STATE
|
|
100
|
-
|
|
101
|
-
Write findings to STATE.md:
|
|
102
|
-
```markdown
|
|
103
|
-
## Verification Log
|
|
104
|
-
|
|
105
|
-
### 2025-01-28 15:30
|
|
106
|
-
Verified: image-upload, color-extraction
|
|
107
|
-
Result: 1 spec gap, 2 quality issues
|
|
108
|
-
Action: Generated fix tasks
|
|
109
|
-
```
|
|
46
|
+
Report per spec: requirements count, acceptance count, quality issues.
|
|
47
|
+
If issues: suggest creating fix spec or reopening (`mv done-* doing-*`).
|
|
110
48
|
|
|
111
49
|
## Verification Levels
|
|
112
50
|
|
|
@@ -127,43 +65,15 @@ Default: L1-L3 (L4 optional, can be slow)
|
|
|
127
65
|
|
|
128
66
|
## Agent Usage
|
|
129
67
|
|
|
130
|
-
Spawn `Explore` agents (Haiku)
|
|
131
|
-
- 1-2 agents per spec (based on spec size)
|
|
132
|
-
- Cap: 10 parallel agents
|
|
133
|
-
- Read-only: safe to parallelize heavily
|
|
68
|
+
Spawn `Explore` agents (Haiku), 1-2 per spec, cap 10.
|
|
134
69
|
|
|
135
70
|
## Example
|
|
136
71
|
|
|
137
72
|
```
|
|
138
73
|
/df:verify
|
|
139
74
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
specs/image-upload.md
|
|
143
|
-
├─ REQ-1: Upload endpoint ✓
|
|
144
|
-
│ src/api/upload.ts exports POST /api/upload
|
|
145
|
-
├─ REQ-2: File validation ✓
|
|
146
|
-
│ src/middleware/validate.ts checks type, size
|
|
147
|
-
├─ REQ-3: S3 storage ✓
|
|
148
|
-
│ src/services/storage.ts implements uploadToS3()
|
|
149
|
-
└─ REQ-4: Thumbnails ✓
|
|
150
|
-
src/services/image.ts implements generateThumbnail()
|
|
151
|
-
|
|
152
|
-
Acceptance: 5/5 ✓
|
|
153
|
-
Quality: Clean
|
|
154
|
-
|
|
155
|
-
specs/color-extraction.md
|
|
156
|
-
├─ REQ-1: Extract colors ✓
|
|
157
|
-
└─ REQ-2: Palette display ⚠
|
|
158
|
-
Found: Component exists but not exported
|
|
159
|
-
|
|
160
|
-
Acceptance: 2/3
|
|
161
|
-
Quality: 1 TODO found
|
|
162
|
-
|
|
163
|
-
Summary:
|
|
164
|
-
Specs: 2
|
|
165
|
-
Passed: 1
|
|
166
|
-
Issues: 1
|
|
75
|
+
done-upload.md: 4/4 reqs ✓, 5/5 acceptance ✓, clean
|
|
76
|
+
done-auth.md: 2/2 reqs ✓, 3/3 acceptance ✓, clean
|
|
167
77
|
|
|
168
|
-
|
|
78
|
+
✓ All specs verified
|
|
169
79
|
```
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(git add:*)",
|
|
5
|
+
"Bash(git commit -m \"$\\(cat <<''EOF''\nfeat: add spec lifecycle states and context-aware execution\n\nSpec file states \\(doing-/done- prefixes\\):\n- New specs: specs/*.md \\(no prefix\\)\n- In progress: specs/doing-*.md \\(has tasks in PLAN.md\\)\n- Completed: specs/done-*.md \\(history embedded\\)\n\nPlan command:\n- Only reads new specs \\(excludes doing-/done-\\)\n- Renames to doing-* after creating tasks\n- Appends to PLAN.md \\(preserves existing\\)\n\nExecute command:\n- Context-aware via .deepflow/context.json\n- At ≥50% context: stop spawning, wait, checkpoint\n- File-based agent results \\(no TaskOutput\\)\n- Completes specs: embed history, rename done-*, clean PLAN.md\n\nVerify command:\n- Verifies done-* specs by default\n- --doing flag for in-progress specs\n\nStatusline hook:\n- Writes context % to .deepflow/context.json\n\nCo-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>\nEOF\n\\)\")",
|
|
6
|
+
"Bash(git push)",
|
|
7
|
+
"Bash(npm version:*)",
|
|
8
|
+
"Bash(git commit:*)",
|
|
9
|
+
"Bash(npm publish:*)"
|
|
10
|
+
]
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -62,3 +62,17 @@ Task: T1
|
|
|
62
62
|
- Never commit partial work
|
|
63
63
|
- Never commit unrelated changes
|
|
64
64
|
- One logical change per commit
|
|
65
|
+
|
|
66
|
+
## Tags
|
|
67
|
+
|
|
68
|
+
Format: `v{major}.{minor}.{patch}`
|
|
69
|
+
|
|
70
|
+
| Trigger | Bump | Example |
|
|
71
|
+
|---------|------|---------|
|
|
72
|
+
| Breaking change | major | `v2.0.0` |
|
|
73
|
+
| New feature | minor | `v1.1.0` |
|
|
74
|
+
| Bug fix | patch | `v1.0.1` |
|
|
75
|
+
|
|
76
|
+
Create: `git tag -a v1.0.0 -m "message"` → `git push origin v1.0.0`
|
|
77
|
+
|
|
78
|
+
Tag after milestone complete, not every commit.
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.5
|
package/bin/install.js
CHANGED
|
@@ -46,6 +46,8 @@ async function main() {
|
|
|
46
46
|
|
|
47
47
|
if (level === 'global') {
|
|
48
48
|
dirs.push('hooks', 'deepflow');
|
|
49
|
+
} else {
|
|
50
|
+
dirs.push('deepflow');
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
for (const dir of dirs) {
|
|
@@ -89,13 +91,18 @@ async function main() {
|
|
|
89
91
|
}
|
|
90
92
|
}
|
|
91
93
|
|
|
92
|
-
// Copy VERSION (
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
94
|
+
// Copy VERSION file (for update checking)
|
|
95
|
+
const versionFile = path.join(PACKAGE_DIR, 'VERSION');
|
|
96
|
+
if (fs.existsSync(versionFile)) {
|
|
97
|
+
fs.copyFileSync(versionFile, path.join(CLAUDE_DIR, 'deepflow', 'VERSION'));
|
|
98
|
+
log('Version file installed');
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Clear stale update cache to prevent false warnings
|
|
102
|
+
// Cache is always global, so clear it regardless of install level
|
|
103
|
+
const cacheFile = path.join(GLOBAL_DIR, 'cache', 'df-update-check.json');
|
|
104
|
+
if (fs.existsSync(cacheFile)) {
|
|
105
|
+
fs.unlinkSync(cacheFile);
|
|
99
106
|
}
|
|
100
107
|
|
|
101
108
|
// Configure statusline (global only)
|
package/hooks/df-statusline.js
CHANGED
|
@@ -74,6 +74,9 @@ function buildContextMeter(contextWindow) {
|
|
|
74
74
|
|
|
75
75
|
percentage = Math.min(100, Math.round(percentage));
|
|
76
76
|
|
|
77
|
+
// Write context usage to file for deepflow commands
|
|
78
|
+
writeContextUsage(percentage);
|
|
79
|
+
|
|
77
80
|
// Build 10-segment bar
|
|
78
81
|
const segments = 10;
|
|
79
82
|
const filled = Math.round((percentage / 100) * segments);
|
|
@@ -107,3 +110,19 @@ function checkForUpdate() {
|
|
|
107
110
|
return null;
|
|
108
111
|
}
|
|
109
112
|
}
|
|
113
|
+
|
|
114
|
+
function writeContextUsage(percentage) {
|
|
115
|
+
try {
|
|
116
|
+
const deepflowDir = path.join(process.cwd(), '.deepflow');
|
|
117
|
+
if (!fs.existsSync(deepflowDir)) {
|
|
118
|
+
fs.mkdirSync(deepflowDir, { recursive: true });
|
|
119
|
+
}
|
|
120
|
+
const contextPath = path.join(deepflowDir, 'context.json');
|
|
121
|
+
fs.writeFileSync(contextPath, JSON.stringify({
|
|
122
|
+
percentage,
|
|
123
|
+
timestamp: Date.now()
|
|
124
|
+
}));
|
|
125
|
+
} catch (e) {
|
|
126
|
+
// Fail silently
|
|
127
|
+
}
|
|
128
|
+
}
|
package/package.json
CHANGED
|
@@ -29,6 +29,15 @@ Project context and learnings for LLM continuity.
|
|
|
29
29
|
|
|
30
30
|
- [ ] [Blocker]: [Workaround if any]
|
|
31
31
|
|
|
32
|
+
## Checkpoint
|
|
33
|
+
|
|
34
|
+
[Auto-populated when /df:execute creates a checkpoint]
|
|
35
|
+
|
|
36
|
+
- **Session**: [none]
|
|
37
|
+
- **Progress**: [0/0 tasks]
|
|
38
|
+
- **Tokens used**: [~0k/100k]
|
|
39
|
+
- **Resume**: `/df:execute --continue`
|
|
40
|
+
|
|
32
41
|
## Session Log
|
|
33
42
|
|
|
34
43
|
### {Date}
|