deepflow 0.1.5 → 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 +48 -81
- package/.claude/commands/df/plan.md +49 -100
- package/.claude/commands/df/verify.md +24 -114
- package/.claude/settings.local.json +12 -0
- package/hooks/df-statusline.js +19 -0
- package/package.json +1 -1
|
@@ -17,63 +17,34 @@ Implement tasks from PLAN.md with parallel agents, atomic commits, and context-e
|
|
|
17
17
|
- Agent: `general-purpose` (Sonnet) — Task implementation
|
|
18
18
|
- Agent: `reasoner` (Opus) — Debugging failures
|
|
19
19
|
|
|
20
|
-
## Context
|
|
20
|
+
## Context-Aware Execution
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|-----------|--------|--------|
|
|
24
|
-
| Normal | <60k | Continue execution |
|
|
25
|
-
| Warning | 60k | Display budget status |
|
|
26
|
-
| Checkpoint | 80k | Save state, prompt resume |
|
|
27
|
-
| Limit | 100k | Hard stop |
|
|
22
|
+
Statusline writes to `.deepflow/context.json`: `{"percentage": 45}`
|
|
28
23
|
|
|
29
|
-
|
|
24
|
+
| Context % | Action |
|
|
25
|
+
|-----------|--------|
|
|
26
|
+
| < 50% | Full parallelism (up to 5 agents) |
|
|
27
|
+
| ≥ 50% | Wait for running agents, checkpoint, exit |
|
|
30
28
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
## Agent Output Protocol
|
|
34
|
-
|
|
35
|
-
Agents MUST return exactly 5 lines:
|
|
29
|
+
## Agent Protocol
|
|
36
30
|
|
|
31
|
+
Agents write results to `.deepflow/results/{task_id}.yaml`:
|
|
37
32
|
```yaml
|
|
38
33
|
task: T3
|
|
39
|
-
status: success
|
|
34
|
+
status: success
|
|
40
35
|
commit: abc1234
|
|
41
|
-
duration: 45s
|
|
42
|
-
error: "single line if failed"
|
|
43
36
|
```
|
|
44
37
|
|
|
45
|
-
**
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
Handle all verification internally. Fix issues before returning.
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
If verbose output received: extract minimal data, discard rest.
|
|
38
|
+
**Spawn with:** `run_in_background: true`
|
|
39
|
+
**Poll:** `Glob(".deepflow/results/T*.yaml")`
|
|
40
|
+
**NEVER use TaskOutput** — returns full trace, wastes context.
|
|
52
41
|
|
|
53
42
|
## Checkpoint & Resume
|
|
54
43
|
|
|
55
|
-
**File:** `.deepflow/checkpoint.json`
|
|
56
|
-
|
|
57
|
-
```json
|
|
58
|
-
{
|
|
59
|
-
"session_id": "exec_abc123",
|
|
60
|
-
"completed_tasks": ["T1", "T2"],
|
|
61
|
-
"current_wave": 2,
|
|
62
|
-
"last_commit": "def5678",
|
|
63
|
-
"estimated_tokens_used": 82000,
|
|
64
|
-
"decisions_made": ["Used multer for uploads"],
|
|
65
|
-
"resume_instructions": "Continue with Wave 3"
|
|
66
|
-
}
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
**Checkpoint protocol** (at 80k tokens):
|
|
70
|
-
1. Complete current task
|
|
71
|
-
2. Wait for parallel agents
|
|
72
|
-
3. Update PLAN.md
|
|
73
|
-
4. Write checkpoint atomically (.tmp → rename)
|
|
74
|
-
5. Print: `Context limit reached. Run /df:execute --continue`
|
|
44
|
+
**File:** `.deepflow/checkpoint.json` — stores completed tasks, current wave.
|
|
75
45
|
|
|
76
|
-
**
|
|
46
|
+
**On checkpoint:** Complete wave → update PLAN.md → save → exit.
|
|
47
|
+
**Resume:** `--continue` loads checkpoint, skips completed tasks.
|
|
77
48
|
|
|
78
49
|
## Behavior
|
|
79
50
|
|
|
@@ -89,44 +60,43 @@ else → Start fresh
|
|
|
89
60
|
### 2. LOAD PLAN
|
|
90
61
|
|
|
91
62
|
```
|
|
92
|
-
Load: PLAN.md (required), specs
|
|
63
|
+
Load: PLAN.md (required), specs/doing-*.md, .deepflow/config.yaml
|
|
93
64
|
If missing: "No PLAN.md found. Run /df:plan first."
|
|
94
65
|
```
|
|
95
66
|
|
|
96
|
-
### 3.
|
|
67
|
+
### 3. CHECK FOR UNPLANNED SPECS
|
|
97
68
|
|
|
98
|
-
|
|
69
|
+
Warn if `specs/*.md` (excluding doing-/done-) exist. Non-blocking.
|
|
99
70
|
|
|
100
|
-
### 4.
|
|
71
|
+
### 4. IDENTIFY READY TASKS
|
|
72
|
+
|
|
73
|
+
Ready = `[ ]` + all `blocked_by` complete + not in checkpoint.
|
|
74
|
+
|
|
75
|
+
### 5. CHECK CONTEXT & EXECUTE
|
|
76
|
+
|
|
77
|
+
If context ≥50%: wait for agents, checkpoint, exit.
|
|
101
78
|
|
|
102
79
|
| Ready | Strategy |
|
|
103
80
|
|-------|----------|
|
|
104
81
|
| 1-3 | All parallel |
|
|
105
82
|
| 4+ | 5 parallel, queue rest |
|
|
106
83
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
**On failure:** Spawn `reasoner` (Opus) for debugging.
|
|
84
|
+
1 writer per file. On failure: spawn `reasoner`.
|
|
110
85
|
|
|
111
|
-
###
|
|
86
|
+
### 6. PER-TASK (agent)
|
|
112
87
|
|
|
113
|
-
|
|
114
|
-
1. Read spec requirements
|
|
115
|
-
2. Implement completely (no stubs/TODOs)
|
|
116
|
-
3. Verify (tests, types, lint) — fix issues
|
|
117
|
-
4. Commit atomically: `feat({spec}): {description}`
|
|
118
|
-
5. Return 5-line YAML only
|
|
88
|
+
Implement → verify → commit → write result file.
|
|
119
89
|
|
|
120
|
-
###
|
|
90
|
+
### 7. COMPLETE SPECS
|
|
121
91
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
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
|
|
126
96
|
|
|
127
|
-
###
|
|
97
|
+
### 8. ITERATE
|
|
128
98
|
|
|
129
|
-
Repeat until: all done, all blocked, or
|
|
99
|
+
Repeat until: all done, all blocked, or checkpoint.
|
|
130
100
|
|
|
131
101
|
## Rules
|
|
132
102
|
|
|
@@ -141,24 +111,21 @@ Repeat until: all done, all blocked, or budget reached.
|
|
|
141
111
|
## Example
|
|
142
112
|
|
|
143
113
|
```
|
|
144
|
-
/df:execute
|
|
114
|
+
/df:execute (context: 12%)
|
|
145
115
|
|
|
146
|
-
|
|
147
|
-
|
|
116
|
+
Wave 1: T1, T2 parallel (context: 25%)
|
|
117
|
+
T1: success (abc1234)
|
|
118
|
+
T2: success (def5678)
|
|
148
119
|
|
|
149
|
-
Wave
|
|
150
|
-
|
|
151
|
-
T2: success (def5678) 32s
|
|
152
|
-
T5: success (ghi9012) 28s
|
|
153
|
-
Budget: ~32k/100k tokens
|
|
120
|
+
Wave 2: T3 (context: 48%)
|
|
121
|
+
T3: success (ghi9012)
|
|
154
122
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
Budget: ~52k/100k tokens
|
|
159
|
-
|
|
160
|
-
✓ Execution complete
|
|
161
|
-
Tasks: 5/5 | Commits: 5
|
|
123
|
+
✓ doing-upload → done-upload
|
|
124
|
+
✓ Complete: 3/3 tasks
|
|
125
|
+
```
|
|
162
126
|
|
|
163
|
-
|
|
127
|
+
With checkpoint:
|
|
128
|
+
```
|
|
129
|
+
Wave 1 complete (context: 52%)
|
|
130
|
+
Checkpoint saved. Run /df:execute --continue
|
|
164
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
|
+
}
|
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
|
+
}
|