claude-flow-novice 2.18.32 → 2.18.33
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/cfn-fix-errors.md +238 -161
- package/package.json +1 -1
|
@@ -1,30 +1,33 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "Coordinate agents to fix compilation errors
|
|
2
|
+
description: "Coordinate agents to fix compilation errors with strategic Phase 0 and parallel Phase 1"
|
|
3
3
|
argument-hint: "<language> [--max-parallel=5] [--max-cycles=10]"
|
|
4
4
|
allowed-tools: ["Task", "TaskOutput", "TodoWrite", "Read", "Bash"]
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# CFN Fix Errors - Agent Coordination Mode
|
|
8
8
|
|
|
9
|
-
**Version:**
|
|
9
|
+
**Version:** 2.0.0 | **Date:** 2025-12-21 | **Status:** Production Ready
|
|
10
10
|
|
|
11
11
|
## Quick Overview
|
|
12
12
|
|
|
13
|
-
Main chat coordinates
|
|
13
|
+
Main chat coordinates error fixing in two phases:
|
|
14
|
+
- **Phase 0**: Fix strategic root-cause files first (prevents cascading errors)
|
|
15
|
+
- **Phase 1**: Parallel agents fix remaining files (up to 5 concurrent)
|
|
16
|
+
- **Phase 2**: Cleanup of cross-file errors
|
|
14
17
|
|
|
15
18
|
### Key Features
|
|
16
|
-
- **
|
|
19
|
+
- **Phase 0 strategic fixes** - identify and fix root-cause files first
|
|
20
|
+
- **Max 5 parallel agents** with continuous spawning in Phase 1
|
|
17
21
|
- **Single-file focus** - each agent fixes one file only
|
|
18
|
-
- **2-attempt retry** logic per file before deferring to Phase 2
|
|
19
22
|
- **Post-edit validation** confirms fixes are correct
|
|
20
|
-
- **
|
|
23
|
+
- **Agents solve independently** - no external tools, just expertise
|
|
21
24
|
- **Automatic Phase 2** transition at <40 errors
|
|
22
25
|
|
|
23
26
|
### When to Use
|
|
24
27
|
- 20+ compilation errors
|
|
25
|
-
- Errors
|
|
28
|
+
- Errors may have cascading dependencies
|
|
26
29
|
- Want visibility into agent progress
|
|
27
|
-
- Need
|
|
30
|
+
- Need systematic error reduction
|
|
28
31
|
|
|
29
32
|
---
|
|
30
33
|
|
|
@@ -51,7 +54,7 @@ echo "Session ID: $SESSION_ID | Language: $LANGUAGE | Max Parallel: $MAX_PARALLE
|
|
|
51
54
|
|
|
52
55
|
---
|
|
53
56
|
|
|
54
|
-
### Step 2: Get Error Files
|
|
57
|
+
### Step 2: Get Error Files and Analyze
|
|
55
58
|
|
|
56
59
|
**YOU SHOULD:** Run the appropriate type checker and get files with errors.
|
|
57
60
|
|
|
@@ -59,30 +62,26 @@ echo "Session ID: $SESSION_ID | Language: $LANGUAGE | Max Parallel: $MAX_PARALLE
|
|
|
59
62
|
```bash
|
|
60
63
|
cd [PROJECT_ROOT]
|
|
61
64
|
# Cargo errors: file paths are on lines starting with "-->"
|
|
62
|
-
SQLX_OFFLINE=true cargo check 2>&1 | grep "^\s*-->" | awk '{print $2}' | awk -F':' '{print $1}' | sort | uniq -c | sort -rn
|
|
65
|
+
SQLX_OFFLINE=true cargo check 2>&1 | tee /tmp/cargo-errors.txt | grep "^\s*-->" | awk '{print $2}' | awk -F':' '{print $1}' | sort | uniq -c | sort -rn
|
|
63
66
|
```
|
|
64
67
|
|
|
65
68
|
**For TypeScript (tsc):**
|
|
66
69
|
```bash
|
|
67
70
|
cd [PROJECT_ROOT]
|
|
68
|
-
|
|
69
|
-
npm run typecheck 2>&1 | grep "error TS" | awk -F'(' '{print $1}' | sort | uniq -c | sort -rn
|
|
71
|
+
npm run typecheck 2>&1 | tee /tmp/tsc-errors.txt | grep "error TS" | awk -F'(' '{print $1}' | sort | uniq -c | sort -rn
|
|
70
72
|
```
|
|
71
73
|
|
|
72
74
|
**For TypeScript (ESLint):**
|
|
73
75
|
```bash
|
|
74
76
|
cd [PROJECT_ROOT]
|
|
75
|
-
# ESLint: file paths are on separate lines, extract .ts/.tsx files
|
|
76
77
|
npm run lint 2>&1 > /tmp/eslint-output.txt
|
|
77
78
|
grep -B1 "error" /tmp/eslint-output.txt | grep -v "error\|--" | grep "\.tsx\?$" | sort | uniq -c | sort -rn
|
|
78
79
|
```
|
|
79
80
|
|
|
80
81
|
**Alternative (Universal TypeScript/ESLint parser):**
|
|
81
82
|
```bash
|
|
82
|
-
# Save full output first
|
|
83
83
|
npm run lint 2>&1 > /tmp/lint-output.txt || npm run typecheck 2>&1 > /tmp/lint-output.txt
|
|
84
84
|
|
|
85
|
-
# Parse with Python for robust extraction
|
|
86
85
|
python3 << 'PARSE_SCRIPT'
|
|
87
86
|
import re
|
|
88
87
|
from collections import defaultdict
|
|
@@ -92,37 +91,116 @@ current_file = None
|
|
|
92
91
|
|
|
93
92
|
with open('/tmp/lint-output.txt', 'r') as f:
|
|
94
93
|
for line in f:
|
|
95
|
-
# ESLint format: file path on its own line
|
|
96
94
|
if line.strip().endswith('.ts') or line.strip().endswith('.tsx'):
|
|
97
95
|
current_file = line.strip()
|
|
98
|
-
# ESLint error line
|
|
99
96
|
elif re.search(r'^\s+\d+:\d+\s+(error|warning)', line) and current_file:
|
|
100
97
|
error_counts[current_file] += 1
|
|
101
|
-
# TSC format: file.ts(line,col): error TS
|
|
102
98
|
elif match := re.match(r'^(.+\.tsx?)\(\d+,\d+\):\s+error', line):
|
|
103
99
|
error_counts[match.group(1)] += 1
|
|
104
100
|
|
|
105
|
-
# Print sorted by error count
|
|
106
101
|
for file, count in sorted(error_counts.items(), key=lambda x: -x[1])[:30]:
|
|
107
102
|
print(f"{count:6d} {file}")
|
|
108
103
|
PARSE_SCRIPT
|
|
109
104
|
```
|
|
110
105
|
|
|
111
|
-
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
### Step 3: Phase 0 - Identify Strategic Root-Cause Files
|
|
109
|
+
|
|
110
|
+
**YOU SHOULD:** Analyze the error output to identify files that should be fixed FIRST because they cause cascading errors.
|
|
111
|
+
|
|
112
|
+
**Root-Cause File Indicators:**
|
|
113
|
+
|
|
114
|
+
1. **Type Definition Files** (highest priority):
|
|
115
|
+
- `*.d.ts` files
|
|
116
|
+
- `types.ts`, `types/*.ts`
|
|
117
|
+
- `interfaces.ts`, `models.ts`
|
|
118
|
+
- Files with "Cannot find type" errors pointing to them
|
|
119
|
+
|
|
120
|
+
2. **Core/Base Modules**:
|
|
121
|
+
- `index.ts` files that re-export many modules
|
|
122
|
+
- Files imported by 5+ other error files
|
|
123
|
+
- Base classes/interfaces extended by other files
|
|
124
|
+
|
|
125
|
+
3. **Configuration Files**:
|
|
126
|
+
- `config.ts`, `constants.ts`
|
|
127
|
+
- Environment/settings files
|
|
128
|
+
|
|
129
|
+
4. **Dependency Analysis** (from error messages):
|
|
130
|
+
- Look for patterns like "Cannot find module './X'" - fix X first
|
|
131
|
+
- Look for "Type 'X' is not assignable" where X is defined elsewhere
|
|
132
|
+
- Look for "Property 'X' does not exist on type 'Y'" - fix Y's definition first
|
|
133
|
+
|
|
134
|
+
**YOU SHOULD:** Create a Phase 0 queue of 3-8 strategic files to fix first.
|
|
135
|
+
|
|
136
|
+
**Example Analysis:**
|
|
112
137
|
```
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
138
|
+
ERROR ANALYSIS:
|
|
139
|
+
- 15 files have "Cannot find module './types/api'"
|
|
140
|
+
→ Fix: src/types/api.ts FIRST (root cause)
|
|
141
|
+
|
|
142
|
+
- 8 files have "Type 'UserData' is not assignable"
|
|
143
|
+
→ Fix: src/models/user.ts FIRST (type definition issue)
|
|
144
|
+
|
|
145
|
+
- 12 files import from src/utils/index.ts which has errors
|
|
146
|
+
→ Fix: src/utils/index.ts FIRST (cascading imports)
|
|
147
|
+
|
|
148
|
+
PHASE 0 QUEUE (fix in order):
|
|
149
|
+
1. src/types/api.ts (15 dependents)
|
|
150
|
+
2. src/models/user.ts (8 dependents)
|
|
151
|
+
3. src/utils/index.ts (12 dependents)
|
|
116
152
|
```
|
|
117
153
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
### Step 4: Execute Phase 0 - Strategic Fixes (Sequential)
|
|
157
|
+
|
|
158
|
+
**YOU SHOULD:** Fix Phase 0 files ONE AT A TIME with full cross-file context.
|
|
159
|
+
|
|
160
|
+
**For EACH file in Phase 0 queue:**
|
|
161
|
+
|
|
162
|
+
1. **Spawn a dedicated agent** (NOT in background):
|
|
163
|
+
```typescript
|
|
164
|
+
Task("rust-developer" OR "typescript-specialist",
|
|
165
|
+
`Fix errors in: [FILE_PATH]
|
|
166
|
+
|
|
167
|
+
PROJECT: [PROJECT_ROOT]
|
|
168
|
+
CONTEXT: This is a Phase 0 strategic file that other files depend on.
|
|
169
|
+
|
|
170
|
+
YOUR TASK:
|
|
171
|
+
1. Read the file and understand its purpose
|
|
172
|
+
2. Check the error output in /tmp/[cargo-errors|tsc-errors|eslint-output].txt
|
|
173
|
+
3. Fix ALL errors in this file
|
|
174
|
+
4. Consider how your fixes affect files that import/use this file
|
|
175
|
+
5. Run post-edit validation: .claude/hooks/cfn-invoke-post-edit.sh [FILE_PATH]
|
|
176
|
+
6. If validation fails, adjust your fix
|
|
177
|
+
|
|
178
|
+
IMPORTANT:
|
|
179
|
+
- This file is a root cause - other files depend on it
|
|
180
|
+
- Ensure exports/types remain compatible
|
|
181
|
+
- Do NOT change the public API unless necessary to fix errors
|
|
182
|
+
- Focus on type correctness and import resolution
|
|
183
|
+
|
|
184
|
+
Report: List of fixes made and any breaking changes.`,
|
|
185
|
+
{run_in_background: false} // BLOCKING - wait for completion
|
|
186
|
+
);
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
2. **After each Phase 0 fix, recheck errors:**
|
|
190
|
+
```bash
|
|
191
|
+
# Rerun type checker to see cascading improvements
|
|
192
|
+
npm run typecheck 2>&1 | grep "error" | wc -l
|
|
193
|
+
# or for Rust:
|
|
194
|
+
SQLX_OFFLINE=true cargo check 2>&1 | grep "^error" | wc -l
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
3. **Update file queue** - remove files that no longer have errors
|
|
198
|
+
|
|
199
|
+
**PHASE 0 COMPLETE when:** All strategic files are fixed.
|
|
122
200
|
|
|
123
201
|
---
|
|
124
202
|
|
|
125
|
-
### Step
|
|
203
|
+
### Step 5: Execute Phase 1 - Parallel Agent Spawning
|
|
126
204
|
|
|
127
205
|
**YOU SHOULD:** Spawn agents continuously, maintaining exactly 5 active agents at any time.
|
|
128
206
|
|
|
@@ -148,194 +226,193 @@ while (fileQueue.length > 0 || activeAgents.length > 0) {
|
|
|
148
226
|
}
|
|
149
227
|
|
|
150
228
|
// Monitor agents (non-blocking check)
|
|
151
|
-
for
|
|
229
|
+
for (const agent of activeAgents) {
|
|
152
230
|
const result = TaskOutput(agent.taskId, {block: false, timeout: 0});
|
|
153
231
|
|
|
154
|
-
if (result.status ===
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
// File fixed! Remove from queue
|
|
232
|
+
if (result.status === "completed") {
|
|
233
|
+
if (result.success) {
|
|
234
|
+
markFileComplete(agent.file);
|
|
158
235
|
} else if (agent.attempts < 2) {
|
|
159
|
-
// Retry
|
|
160
|
-
|
|
161
|
-
|
|
236
|
+
// Retry once
|
|
237
|
+
agent.attempts++;
|
|
238
|
+
requeue(agent.file);
|
|
162
239
|
} else {
|
|
163
|
-
//
|
|
164
|
-
|
|
240
|
+
// Defer to Phase 2
|
|
241
|
+
markFileDeferred(agent.file);
|
|
165
242
|
}
|
|
166
|
-
|
|
167
|
-
// Remove from active agents (frees slot for next file)
|
|
168
|
-
activeAgents.remove(agent);
|
|
243
|
+
removeFromActive(agent);
|
|
169
244
|
}
|
|
170
245
|
}
|
|
171
246
|
|
|
172
|
-
//
|
|
173
|
-
sleep(
|
|
247
|
+
// Brief pause before next check
|
|
248
|
+
sleep(2000);
|
|
174
249
|
}
|
|
175
250
|
```
|
|
176
251
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
Use this exact prompt structure for spawned agents:
|
|
180
|
-
|
|
181
|
-
```
|
|
182
|
-
AGENT_ID="${agentId}"
|
|
183
|
-
FILE_PATH="${file}"
|
|
184
|
-
SESSION_ID="${SESSION_ID}"
|
|
185
|
-
ATTEMPT=${attempts}/2
|
|
186
|
-
|
|
187
|
-
TASK: Fix compilation errors in a single file using Cerebras acceleration.
|
|
188
|
-
|
|
189
|
-
WORKFLOW:
|
|
190
|
-
1. Read file: ${file}
|
|
191
|
-
|
|
192
|
-
2. Call Cerebras single-file fixer:
|
|
193
|
-
[FOR RUST]
|
|
194
|
-
npx tsx /path/to/cerebras-gated-fixer-v2.ts --file="${file}" --agent-id="${agentId}"
|
|
252
|
+
---
|
|
195
253
|
|
|
196
|
-
|
|
197
|
-
npx tsx /path/to/typescript-gated-fixer-v2.ts --file="${file}" --agent-id="${agentId}"
|
|
254
|
+
### Step 6: Phase 1 Agent Prompt
|
|
198
255
|
|
|
199
|
-
|
|
200
|
-
./.claude/hooks/cfn-invoke-post-edit.sh "${file}" --agent-id "${agentId}"
|
|
256
|
+
**USE THIS PROMPT for each Phase 1 agent:**
|
|
201
257
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
- If post-edit validation FAILS (exit 1): Return "RETRY" (attempt 1) or "DEFER" (attempt 2)
|
|
258
|
+
```
|
|
259
|
+
Fix compilation errors in: [FILE_PATH]
|
|
205
260
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
- Up to 3 retries per gate rejection
|
|
261
|
+
PROJECT: [PROJECT_ROOT]
|
|
262
|
+
LANGUAGE: [typescript|rust]
|
|
263
|
+
AGENT_ID: [GENERATED_AGENT_ID]
|
|
210
264
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
265
|
+
YOUR TASK:
|
|
266
|
+
1. Read the file to understand context
|
|
267
|
+
2. Identify all errors in this file from the type checker output
|
|
268
|
+
3. Fix each error using your expertise
|
|
269
|
+
4. Run post-edit validation after fixes
|
|
216
270
|
|
|
217
|
-
|
|
218
|
-
|
|
271
|
+
WORKFLOW:
|
|
272
|
+
1. Read the file: cat [FILE_PATH]
|
|
273
|
+
2. Get specific errors for this file from /tmp/[tsc-errors|cargo-errors|eslint-output].txt
|
|
274
|
+
3. Make targeted fixes - edit only what's needed
|
|
275
|
+
4. Validate: .claude/hooks/cfn-invoke-post-edit.sh [FILE_PATH] --agent-id [AGENT_ID]
|
|
276
|
+
5. If validation shows new errors, adjust
|
|
277
|
+
|
|
278
|
+
CONSTRAINTS:
|
|
279
|
+
- Fix ONLY errors in [FILE_PATH] - do not modify other files
|
|
280
|
+
- Do NOT run linters on the entire codebase (eslint . is FORBIDDEN)
|
|
281
|
+
- Do NOT add unnecessary dependencies
|
|
282
|
+
- Preserve existing functionality
|
|
283
|
+
- Keep fixes minimal and targeted
|
|
284
|
+
|
|
285
|
+
COMMON FIX PATTERNS:
|
|
286
|
+
- Missing imports: Add the import statement
|
|
287
|
+
- Type errors: Add proper type annotations
|
|
288
|
+
- Unused variables: Prefix with _ or remove if truly unused
|
|
289
|
+
- Missing exports: Add export keyword
|
|
290
|
+
- Null checks: Add optional chaining or null guards
|
|
291
|
+
|
|
292
|
+
REPORT FORMAT:
|
|
293
|
+
```
|
|
294
|
+
FIXES APPLIED:
|
|
295
|
+
- Line X: [description of fix]
|
|
296
|
+
- Line Y: [description of fix]
|
|
219
297
|
|
|
220
|
-
|
|
298
|
+
VALIDATION: [PASS/FAIL]
|
|
299
|
+
REMAINING ERRORS: [count or "none"]
|
|
300
|
+
```
|
|
221
301
|
```
|
|
222
302
|
|
|
223
303
|
---
|
|
224
304
|
|
|
225
|
-
### Step
|
|
226
|
-
|
|
227
|
-
**YOU SHOULD:** After all agents complete (activeAgents.length === 0), check if Phase 2 is needed.
|
|
305
|
+
### Step 7: Monitor Progress and Transition
|
|
228
306
|
|
|
229
|
-
**
|
|
307
|
+
**YOU SHOULD:** Track progress and decide when to transition to Phase 2.
|
|
230
308
|
|
|
309
|
+
**Progress Tracking:**
|
|
231
310
|
```bash
|
|
232
|
-
#
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
npm run typecheck 2>&1 | grep -c "error TS"
|
|
311
|
+
# Check current error count
|
|
312
|
+
npm run typecheck 2>&1 | grep "error" | wc -l
|
|
313
|
+
# or
|
|
314
|
+
SQLX_OFFLINE=true cargo check 2>&1 | grep "^error" | wc -l
|
|
237
315
|
```
|
|
238
316
|
|
|
239
|
-
**Phase 2
|
|
317
|
+
**Transition to Phase 2 when ANY of these conditions are met:**
|
|
240
318
|
- Error count < 40
|
|
241
|
-
-
|
|
242
|
-
-
|
|
243
|
-
-
|
|
319
|
+
- 3 consecutive cycles with no improvement
|
|
320
|
+
- All files have been attempted twice
|
|
321
|
+
- Remaining errors require cross-file coordination
|
|
244
322
|
|
|
245
|
-
|
|
323
|
+
---
|
|
324
|
+
|
|
325
|
+
### Step 8: Phase 2 - Cross-File Cleanup
|
|
326
|
+
|
|
327
|
+
**YOU SHOULD:** Spawn a dedicated cleanup agent for remaining errors.
|
|
246
328
|
|
|
247
329
|
```typescript
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
AGENT_ID="${LANGUAGE}-phase2-${SESSION_ID}"
|
|
330
|
+
Task("rust-developer" OR "typescript-specialist",
|
|
331
|
+
`Phase 2 Cleanup: Fix remaining cross-file errors
|
|
251
332
|
|
|
252
|
-
|
|
333
|
+
PROJECT: [PROJECT_ROOT]
|
|
334
|
+
REMAINING_ERRORS: [error count]
|
|
335
|
+
DEFERRED_FILES: [list of files that couldn't be fixed in Phase 1]
|
|
253
336
|
|
|
254
337
|
CONTEXT:
|
|
255
|
-
|
|
256
|
-
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
- Read FULL file before editing
|
|
275
|
-
- Preserve ALL existing imports
|
|
276
|
-
- Fix root causes first
|
|
277
|
-
- Verify after EACH file
|
|
278
|
-
- Run post-edit pipeline after EACH edit
|
|
279
|
-
|
|
280
|
-
RESTRICTIONS:
|
|
281
|
-
- DO NOT run linters on entire codebase
|
|
282
|
-
- Work on one file at a time
|
|
283
|
-
|
|
284
|
-
Report final error count when done.
|
|
285
|
-
`)
|
|
338
|
+
Phase 0 fixed strategic root-cause files.
|
|
339
|
+
Phase 1 fixed [X] files with single-file errors.
|
|
340
|
+
Now fix remaining errors that require cross-file understanding.
|
|
341
|
+
|
|
342
|
+
YOUR TASK:
|
|
343
|
+
1. Run full type check to get current errors
|
|
344
|
+
2. Analyze error patterns across files
|
|
345
|
+
3. Fix errors that span multiple files
|
|
346
|
+
4. Ensure type consistency across modules
|
|
347
|
+
|
|
348
|
+
APPROACH:
|
|
349
|
+
- Group related errors by type/module
|
|
350
|
+
- Fix shared types/interfaces first
|
|
351
|
+
- Then fix usage sites
|
|
352
|
+
- Run validation after each group of fixes
|
|
353
|
+
|
|
354
|
+
REPORT: Summary of remaining errors and fixes applied.`,
|
|
355
|
+
{run_in_background: false}
|
|
356
|
+
);
|
|
286
357
|
```
|
|
287
358
|
|
|
288
359
|
---
|
|
289
360
|
|
|
290
|
-
##
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
"
|
|
300
|
-
"
|
|
361
|
+
## State Management
|
|
362
|
+
|
|
363
|
+
**YOU SHOULD:** Maintain state in /tmp/phase-state.json:
|
|
364
|
+
|
|
365
|
+
```json
|
|
366
|
+
{
|
|
367
|
+
"sessionId": "cfn-fix-123456-7890",
|
|
368
|
+
"language": "typescript",
|
|
369
|
+
"startTime": "2025-12-21T10:00:00Z",
|
|
370
|
+
"initialErrors": 150,
|
|
371
|
+
"currentErrors": 45,
|
|
372
|
+
"phase": "1",
|
|
373
|
+
"phase0Files": [
|
|
374
|
+
{"file": "src/types/api.ts", "status": "completed", "dependents": 15}
|
|
375
|
+
],
|
|
376
|
+
"phase1Files": [
|
|
377
|
+
{"file": "src/api/handler.ts", "attempts": 1, "status": "in_progress", "agentId": "abc123"}
|
|
378
|
+
],
|
|
379
|
+
"deferredFiles": [],
|
|
380
|
+
"activeAgents": ["abc123", "def456"]
|
|
301
381
|
}
|
|
302
|
-
|
|
303
|
-
// Active agents
|
|
304
|
-
activeAgents = [
|
|
305
|
-
{file: "src/api.ts", agentId: "ts-fixer-123-api", taskId: "abc123", attempts: 1}
|
|
306
|
-
]
|
|
307
|
-
|
|
308
|
-
// Phase 2 queue
|
|
309
|
-
phase2Queue = ["src/db.ts", "src/models.ts"]
|
|
310
382
|
```
|
|
311
383
|
|
|
312
|
-
|
|
384
|
+
---
|
|
385
|
+
|
|
386
|
+
## Quick Reference
|
|
313
387
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
388
|
+
| Phase | Purpose | Execution | Agent Count |
|
|
389
|
+
|-------|---------|-----------|-------------|
|
|
390
|
+
| 0 | Root-cause files | Sequential | 1 at a time |
|
|
391
|
+
| 1 | Parallel fixes | Continuous spawn | Up to 5 |
|
|
392
|
+
| 2 | Cross-file cleanup | Sequential | 1 dedicated |
|
|
317
393
|
|
|
318
|
-
|
|
394
|
+
**Agent Types:**
|
|
395
|
+
- Rust: `rust-developer`
|
|
396
|
+
- TypeScript: `typescript-specialist`
|
|
319
397
|
|
|
320
|
-
**
|
|
321
|
-
|
|
322
|
-
-
|
|
323
|
-
|
|
324
|
-
- "Cycle 1 complete: 45 → 23 errors (-22)"
|
|
398
|
+
**Validation Hook:**
|
|
399
|
+
```bash
|
|
400
|
+
.claude/hooks/cfn-invoke-post-edit.sh [FILE] --agent-id [ID]
|
|
401
|
+
```
|
|
325
402
|
|
|
326
403
|
---
|
|
327
404
|
|
|
328
405
|
## Related Documentation
|
|
329
406
|
|
|
330
|
-
- **
|
|
331
|
-
- **
|
|
332
|
-
- **Post-Edit Pipeline**: `.claude/hooks/cfn-invoke-post-edit.sh`
|
|
407
|
+
- **Post-Edit Hooks**: `.claude/hooks/cfn-invoke-post-edit.sh`
|
|
408
|
+
- **Agent Templates**: `.claude/agents/cfn-dev-team/developers/`
|
|
333
409
|
- **Task Mode Reference**: `.claude/commands/cfn-loop-task.md`
|
|
334
410
|
|
|
335
411
|
---
|
|
336
412
|
|
|
337
413
|
## Version History
|
|
338
414
|
|
|
415
|
+
- v2.0.0 (2025-12-21) - Removed Cerebras, added Phase 0 for strategic root-cause files
|
|
339
416
|
- v1.2.0 (2025-12-21) - Fixed error file extraction patterns for Rust and TypeScript/ESLint
|
|
340
417
|
- v1.1.0 (2025-12-21) - Clarified instructions, removed pseudocode confusion
|
|
341
418
|
- v1.0.0 (2025-12-21) - Initial coordination mode implementation
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-flow-novice",
|
|
3
|
-
"version": "2.18.
|
|
3
|
+
"version": "2.18.33",
|
|
4
4
|
"description": "Claude Flow Novice - Advanced orchestration platform for multi-agent AI workflows with CFN Loop architecture\n\nIncludes Local RuVector Accelerator and all CFN skills for complete functionality.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|