@zik000/archai 0.1.4 → 0.2.0
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/README.md +636 -486
- package/dist/bin/cli.js +52 -1
- package/dist/bin/cli.js.map +1 -1
- package/dist/commands/cleanup.d.ts +16 -0
- package/dist/commands/cleanup.d.ts.map +1 -0
- package/dist/commands/cleanup.js +245 -0
- package/dist/commands/cleanup.js.map +1 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +14 -6
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/generate.d.ts +1 -5
- package/dist/commands/generate.d.ts.map +1 -1
- package/dist/commands/generate.js +15 -13
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/init.d.ts +7 -4
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +570 -90
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/rollback.d.ts +13 -0
- package/dist/commands/rollback.d.ts.map +1 -0
- package/dist/commands/rollback.js +186 -0
- package/dist/commands/rollback.js.map +1 -0
- package/dist/commands/setup-config.js +109 -107
- package/dist/commands/setup-config.js.map +1 -1
- package/dist/commands/setup-project.d.ts.map +1 -1
- package/dist/commands/setup-project.js +78 -76
- package/dist/commands/setup-project.js.map +1 -1
- package/dist/commands/uninstall.d.ts +3 -0
- package/dist/commands/uninstall.d.ts.map +1 -0
- package/dist/commands/uninstall.js +172 -0
- package/dist/commands/uninstall.js.map +1 -0
- package/dist/commands/update.d.ts +10 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +374 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/generator/claude-cli.d.ts +5 -0
- package/dist/generator/claude-cli.d.ts.map +1 -1
- package/dist/generator/claude-cli.js +74 -3
- package/dist/generator/claude-cli.js.map +1 -1
- package/dist/generator/prompt-builder.d.ts +6 -17
- package/dist/generator/prompt-builder.d.ts.map +1 -1
- package/dist/generator/prompt-builder.js +131 -109
- package/dist/generator/prompt-builder.js.map +1 -1
- package/dist/index.d.ts +14 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -2
- package/dist/index.js.map +1 -1
- package/dist/scaffold/create-claude-settings.d.ts.map +1 -1
- package/dist/scaffold/create-claude-settings.js +32 -20
- package/dist/scaffold/create-claude-settings.js.map +1 -1
- package/dist/scaffold/create-config.d.ts +4 -4
- package/dist/scaffold/create-config.d.ts.map +1 -1
- package/dist/scaffold/create-config.js +86 -86
- package/dist/scaffold/create-project-description.d.ts +4 -4
- package/dist/scaffold/create-project-description.d.ts.map +1 -1
- package/dist/scaffold/create-project-description.js +97 -97
- package/dist/types/index.d.ts +116 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/analyze-files.d.ts +7 -0
- package/dist/utils/analyze-files.d.ts.map +1 -0
- package/dist/utils/analyze-files.js +27 -0
- package/dist/utils/analyze-files.js.map +1 -0
- package/dist/utils/backup.d.ts +102 -0
- package/dist/utils/backup.d.ts.map +1 -0
- package/dist/utils/backup.js +352 -0
- package/dist/utils/backup.js.map +1 -0
- package/dist/utils/detect-project.d.ts +1 -9
- package/dist/utils/detect-project.d.ts.map +1 -1
- package/dist/utils/detect-project.js +9 -4
- package/dist/utils/detect-project.js.map +1 -1
- package/dist/utils/file-comparison.d.ts +89 -0
- package/dist/utils/file-comparison.d.ts.map +1 -0
- package/dist/utils/file-comparison.js +301 -0
- package/dist/utils/file-comparison.js.map +1 -0
- package/dist/utils/file-merger.d.ts +74 -0
- package/dist/utils/file-merger.d.ts.map +1 -0
- package/dist/utils/file-merger.js +350 -0
- package/dist/utils/file-merger.js.map +1 -0
- package/dist/utils/logger.d.ts +16 -0
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +43 -1
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/migration.d.ts +74 -0
- package/dist/utils/migration.d.ts.map +1 -0
- package/dist/utils/migration.js +342 -0
- package/dist/utils/migration.js.map +1 -0
- package/dist/utils/validate-config.d.ts +1 -21
- package/dist/utils/validate-config.d.ts.map +1 -1
- package/dist/utils/validate-config.js.map +1 -1
- package/dist/utils/version-tracker.d.ts +130 -0
- package/dist/utils/version-tracker.d.ts.map +1 -0
- package/dist/utils/version-tracker.js +298 -0
- package/dist/utils/version-tracker.js.map +1 -0
- package/package.json +7 -1
- package/templates/core-agents/iteration-controller.md +584 -584
package/README.md
CHANGED
|
@@ -1,486 +1,636 @@
|
|
|
1
|
-
# archai
|
|
2
|
-
|
|
3
|
-
**Multi-agent AI development workflow for any project.**
|
|
4
|
-
|
|
5
|
-
archai sets up a sophisticated multi-agent system for Claude Code that transforms how you build software. Instead of one AI assistant, you get a team of specialized agents working together through a structured three-phase workflow.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
│
|
|
28
|
-
│
|
|
29
|
-
│
|
|
30
|
-
│
|
|
31
|
-
│
|
|
32
|
-
│
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
│
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
│
|
|
49
|
-
│
|
|
50
|
-
│
|
|
51
|
-
│
|
|
52
|
-
│
|
|
53
|
-
│
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
│
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
│
|
|
70
|
-
│
|
|
71
|
-
│
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
- **
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
#
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
#
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
#
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
##
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
archai init
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
archai
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
archai setup-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
-
|
|
187
|
-
-
|
|
188
|
-
-
|
|
189
|
-
-
|
|
190
|
-
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
archai
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
-
|
|
203
|
-
-
|
|
204
|
-
-
|
|
205
|
-
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
###
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
-
|
|
261
|
-
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
-
|
|
314
|
-
-
|
|
315
|
-
-
|
|
316
|
-
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
|
380
|
-
|
|
381
|
-
|
|
|
382
|
-
|
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
1
|
+
# archai
|
|
2
|
+
|
|
3
|
+
**Multi-agent AI development workflow for any project.**
|
|
4
|
+
|
|
5
|
+
archai sets up a sophisticated multi-agent system for Claude Code that transforms how you build software. Instead of one AI assistant, you get a team of specialized agents working together through a structured three-phase workflow.
|
|
6
|
+
|
|
7
|
+
# DISCORD COMMUNITY
|
|
8
|
+
|
|
9
|
+
Join our Discord community to collaborate, share ideas, and get help with archai:
|
|
10
|
+
|
|
11
|
+
[JOIN DISCORD](https://discord.gg/2Y88888888)
|
|
12
|
+
|
|
13
|
+
## Philosophy: Think Before Acting
|
|
14
|
+
|
|
15
|
+
This agent system implements a **three-phase iteration architecture**:
|
|
16
|
+
|
|
17
|
+
1. **Phase 1: Planning Loop** - Think, validate, design tests, validate tests, rethink (2-4 iterations)
|
|
18
|
+
2. **Phase 2: Implementation Loop** - Implement, test, review (only after Phase 1 approved)
|
|
19
|
+
3. **Phase 3: Finalization** - Verify, cleanup, commit, push, CI/CD verification
|
|
20
|
+
|
|
21
|
+
**Key Insight**: The cost of thinking is much lower than the cost of re-implementing. Most bugs come from insufficient planning, not insufficient coding skill.
|
|
22
|
+
|
|
23
|
+
## The Three-Phase Architecture
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
27
|
+
│ PHASE 1: PLANNING LOOP │
|
|
28
|
+
│ (Think deeply BEFORE any code) │
|
|
29
|
+
│ │
|
|
30
|
+
│ ┌─────────┐ ┌───────────┐ ┌───────────┐ ┌──────────┐ ┌─────────┐ │
|
|
31
|
+
│ │ THINK │──▶│ VALIDATE │──▶│ TEST │──▶│ VALIDATE │──▶│ RETHINK │ │
|
|
32
|
+
│ │ (deep- │ │ (plan- │ │ DESIGN │ │ TESTS │ │ (deep- │ │
|
|
33
|
+
│ │ analyst)│ │ validator)│ │ (tdd- │ │ (critic) │ │ analyst)│ │
|
|
34
|
+
│ └─────────┘ └───────────┘ │ designer) │ └──────────┘ └─────────┘ │
|
|
35
|
+
│ ▲ └───────────┘ │ │
|
|
36
|
+
│ │ ◀─── ITERATE 2-4x ───────────────────────┘ │
|
|
37
|
+
│ │
|
|
38
|
+
│ EXIT: Plan + Tests validated + All questions answered │
|
|
39
|
+
└─────────────────────────────────────────────────────────────────────────────┘
|
|
40
|
+
│
|
|
41
|
+
▼
|
|
42
|
+
╔═══════════════════════════════════════════╗
|
|
43
|
+
║ 🛑 AWAIT USER PLAN APPROVAL 🛑 ║
|
|
44
|
+
╚═══════════════════════════════════════════╝
|
|
45
|
+
│
|
|
46
|
+
▼ (only on APPROVE)
|
|
47
|
+
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
48
|
+
│ PHASE 2: IMPLEMENTATION LOOP │
|
|
49
|
+
│ (Only after user approves plan) │
|
|
50
|
+
│ │
|
|
51
|
+
│ ┌──────────────┐ ┌─────────┐ ┌────────────┐ │
|
|
52
|
+
│ │ IMPLEMENT │───▶│ TEST │───▶│ REVIEW │ │
|
|
53
|
+
│ │(implement- │ │ (run) │ │ (code- │ │
|
|
54
|
+
│ │ation-agent) │ │ │ │ reviewer) │ │
|
|
55
|
+
│ └──────────────┘ └─────────┘ └────────────┘ │
|
|
56
|
+
│ ▲ │ │
|
|
57
|
+
│ │ ◀─── ITERATE ───────────┘ │
|
|
58
|
+
│ │
|
|
59
|
+
│ EXIT: Tests pass + Review approved │
|
|
60
|
+
└─────────────────────────────────────────────────────────────────────────────┘
|
|
61
|
+
│
|
|
62
|
+
▼
|
|
63
|
+
╔═══════════════════════════════════════════╗
|
|
64
|
+
║ 🛑 AWAIT USER FINAL APPROVAL 🛑 ║
|
|
65
|
+
╚═══════════════════════════════════════════╝
|
|
66
|
+
│
|
|
67
|
+
▼ (only on APPROVE)
|
|
68
|
+
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
69
|
+
│ PHASE 3: FINALIZATION │
|
|
70
|
+
│ (finalization-agent handles) │
|
|
71
|
+
│ │
|
|
72
|
+
│ ┌──────────┐ ┌─────────┐ ┌────────┐ ┌────────┐ ┌─────────────┐ │
|
|
73
|
+
│ │ VERIFY │──▶│ QUALITY │──▶│CLEANUP │──▶│ COMMIT │──▶│ WAIT FOR │ │
|
|
74
|
+
│ │ CRITERIA │ │ CHECKS │ │ │ │ + PUSH │ │ CI/CD │ │
|
|
75
|
+
│ └──────────┘ └─────────┘ └────────┘ └────────┘ └─────────────┘ │
|
|
76
|
+
│ │
|
|
77
|
+
│ EXIT: CI passes + All verified │
|
|
78
|
+
└─────────────────────────────────────────────────────────────────────────────┘
|
|
79
|
+
│
|
|
80
|
+
▼
|
|
81
|
+
┌──────────────┐
|
|
82
|
+
│ COMPLETE │
|
|
83
|
+
└──────────────┘
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Features
|
|
87
|
+
|
|
88
|
+
- **10 Core Agents** - Pre-built orchestration agents for planning, implementation, and quality assurance
|
|
89
|
+
- **Critical Review Mode** - Automated plan review via separate SDK session for blind spot detection
|
|
90
|
+
- **Permission Presets** - Configurable permission settings (permissive/strict/custom) with safety guardrails
|
|
91
|
+
- **Dynamic Specialists** - Claude Code generates project-specific specialists based on your tech stack
|
|
92
|
+
- **Three-Phase Workflow** - Planning Loop → (Optional Critical Review) → Implementation Loop → Finalization
|
|
93
|
+
- **Language Agnostic** - Works with any language, framework, or tech stack
|
|
94
|
+
- **Task Management** - Built-in epic/task tracking system
|
|
95
|
+
|
|
96
|
+
## Quick Start
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# Install globally
|
|
100
|
+
npm install -g @zik000/archai
|
|
101
|
+
|
|
102
|
+
# Initialize in your project
|
|
103
|
+
cd your-project
|
|
104
|
+
archai init
|
|
105
|
+
|
|
106
|
+
# Fill in the generated files (or use wizards):
|
|
107
|
+
archai setup-project # Interactive project description wizard
|
|
108
|
+
archai setup-config # Interactive configuration wizard
|
|
109
|
+
|
|
110
|
+
# Generate specialist agents
|
|
111
|
+
archai generate
|
|
112
|
+
|
|
113
|
+
# Start using with Claude Code
|
|
114
|
+
claude
|
|
115
|
+
|
|
116
|
+
# Manual mode (default) - user approves at both gates
|
|
117
|
+
> "Use iteration-controller for: [your task]"
|
|
118
|
+
|
|
119
|
+
# Critical review mode - auto-approve with SDK critical review
|
|
120
|
+
> "Use iteration-controller with critical-review for: [your task]"
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Requirements
|
|
124
|
+
|
|
125
|
+
- **Node.js 18+**
|
|
126
|
+
- **Claude Code CLI** - Install from [claude.ai/code](https://claude.ai/code)
|
|
127
|
+
- Claude Code must be authenticated
|
|
128
|
+
|
|
129
|
+
## Commands
|
|
130
|
+
|
|
131
|
+
### archai init
|
|
132
|
+
|
|
133
|
+
Initialize archai in your project. Runs an interactive wizard to gather project information.
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
archai init # Interactive wizard
|
|
137
|
+
archai init --skip-wizard # Use detected defaults
|
|
138
|
+
archai init --force # Smart update with file comparison
|
|
139
|
+
archai init --dry-run # Preview what would be created
|
|
140
|
+
archai init -y # Non-interactive mode (CI-friendly)
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**Smart Initialization Features:**
|
|
144
|
+
- **Legacy Migration**: Automatically migrates pre-0.2.0 installations to version tracking
|
|
145
|
+
- **File Comparison**: Compares existing files against templates
|
|
146
|
+
- **Conflict Detection**: Identifies user modifications vs archai updates
|
|
147
|
+
- **Interactive Resolution**: Prompts for action on conflicting files
|
|
148
|
+
- **Automatic Backup**: Creates backup before `--force` operations
|
|
149
|
+
|
|
150
|
+
Creates:
|
|
151
|
+
- `.claude/agents/` - Agent definitions
|
|
152
|
+
- `.claude/version.json` - Version and file hash tracking
|
|
153
|
+
- `.claude/settings.local.json` - Permission settings (permissive mode by default)
|
|
154
|
+
- `.claude/state/` - Working state (gitignored)
|
|
155
|
+
- `.knowledge/` - Permanent knowledge base
|
|
156
|
+
- `.tasks/` - Task management
|
|
157
|
+
- `archai.config.md` - Configuration file
|
|
158
|
+
- `PROMPTS.md` - Quick reference for all prompts
|
|
159
|
+
|
|
160
|
+
### archai generate
|
|
161
|
+
|
|
162
|
+
Generate specialist agents based on your configuration.
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
archai generate # Generate all specialists
|
|
166
|
+
archai generate --dry-run # Preview without writing
|
|
167
|
+
archai generate -y # Skip confirmation
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
This command:
|
|
171
|
+
1. Reads your `archai.config.md`
|
|
172
|
+
2. Calls Claude Code CLI to generate each specialist
|
|
173
|
+
3. Writes specialists to `.claude/agents/`
|
|
174
|
+
|
|
175
|
+
### archai setup-project
|
|
176
|
+
|
|
177
|
+
Interactive wizard to fill out your project description.
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
archai setup-project # Interactive wizard
|
|
181
|
+
archai setup-project --force # Overwrite existing content
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Guides you through:
|
|
185
|
+
- Project overview and description
|
|
186
|
+
- Architecture and key modules
|
|
187
|
+
- Domain concepts and workflows
|
|
188
|
+
- Technical constraints
|
|
189
|
+
- Development guidelines
|
|
190
|
+
- Current state and priorities
|
|
191
|
+
|
|
192
|
+
### archai setup-config
|
|
193
|
+
|
|
194
|
+
Interactive wizard to configure your project settings.
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
archai setup-config # Interactive wizard
|
|
198
|
+
archai setup-config --force # Overwrite existing content
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Configures:
|
|
202
|
+
- Tech stack (languages, frameworks, testing)
|
|
203
|
+
- Build commands (install, build, test, lint, dev)
|
|
204
|
+
- Project structure
|
|
205
|
+
- Specialist agents (with interactive loop to define multiple)
|
|
206
|
+
- Permission presets (permissive/strict/custom) with `.claude/settings.local.json`
|
|
207
|
+
- MCP/Skills placeholder section
|
|
208
|
+
|
|
209
|
+
### archai doctor
|
|
210
|
+
|
|
211
|
+
Validate your archai setup.
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
archai doctor
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
Checks:
|
|
218
|
+
- Configuration file exists and is valid
|
|
219
|
+
- Required directories exist
|
|
220
|
+
- Core agents are installed
|
|
221
|
+
- Claude Code CLI is available and shows version
|
|
222
|
+
|
|
223
|
+
### archai update
|
|
224
|
+
|
|
225
|
+
Update core agents and templates to the latest version with smart file comparison.
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
archai update # Smart update with comparison
|
|
229
|
+
archai update --all # Force update all files
|
|
230
|
+
archai update --dry-run # Preview what would change
|
|
231
|
+
archai update -y # Non-interactive mode (CI-friendly)
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
**Smart Update Features:**
|
|
235
|
+
- **Three-Way Comparison**: Detects if you, archai, or both modified files
|
|
236
|
+
- **Auto-Merge**: Automatically merges settings.json (union arrays) and .gitignore (append)
|
|
237
|
+
- **User Protection**: Skips files you modified (unless you choose otherwise)
|
|
238
|
+
- **Specialist Protection**: Never overwrites generated specialist agents
|
|
239
|
+
- **Automatic Backup**: Creates backup before any changes
|
|
240
|
+
- **Deprecated Detection**: Identifies files no longer in archai templates
|
|
241
|
+
|
|
242
|
+
**File Status Categories:**
|
|
243
|
+
| Status | Description | Action |
|
|
244
|
+
|--------|-------------|--------|
|
|
245
|
+
| New | File doesn't exist locally | Auto-add |
|
|
246
|
+
| Unchanged | Identical to template | Skip |
|
|
247
|
+
| Updated by archai | New template version | Auto-update |
|
|
248
|
+
| Modified by you | You changed it | Ask/skip |
|
|
249
|
+
| Conflict | Both changed | Ask/merge |
|
|
250
|
+
| Generated | Specialist file | Protected |
|
|
251
|
+
|
|
252
|
+
### archai rollback
|
|
253
|
+
|
|
254
|
+
Restore from a previous backup. Backups are automatically created before updates.
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
archai rollback # Interactive backup selection
|
|
258
|
+
archai rollback --list # List all available backups
|
|
259
|
+
archai rollback <timestamp> # Restore specific backup
|
|
260
|
+
archai rollback --dry-run # Preview what would be restored
|
|
261
|
+
archai rollback -y # Skip confirmation
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
**Features:**
|
|
265
|
+
- Lists backups with timestamps, reasons, and file counts
|
|
266
|
+
- Full restore of all files from backup
|
|
267
|
+
- Updates version.json after rollback
|
|
268
|
+
|
|
269
|
+
### archai cleanup
|
|
270
|
+
|
|
271
|
+
Clean up deprecated files and old backups.
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
archai cleanup # Show cleanup status
|
|
275
|
+
archai cleanup --deprecated # Remove deprecated/orphaned files
|
|
276
|
+
archai cleanup --backups # Prune old backups (keeps 5)
|
|
277
|
+
archai cleanup --all # Clean everything
|
|
278
|
+
archai cleanup --dry-run # Preview what would be removed
|
|
279
|
+
archai cleanup -y # Skip confirmation
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
**Features:**
|
|
283
|
+
- Identifies files tracked by archai but no longer in templates
|
|
284
|
+
- Prunes old backups (configurable with `--keep-backups <count>`)
|
|
285
|
+
- Safe: confirms before deleting
|
|
286
|
+
|
|
287
|
+
### archai uninstall
|
|
288
|
+
|
|
289
|
+
Remove archai artifacts from your project.
|
|
290
|
+
|
|
291
|
+
```bash
|
|
292
|
+
archai uninstall # Interactive removal
|
|
293
|
+
archai uninstall --dry-run # Preview what would be removed
|
|
294
|
+
archai uninstall --keep-knowledge # Preserve .knowledge/ directory
|
|
295
|
+
archai uninstall --force # Skip confirmation
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
### Debug Mode
|
|
299
|
+
|
|
300
|
+
Add `--debug` to any command for verbose logging:
|
|
301
|
+
|
|
302
|
+
```bash
|
|
303
|
+
archai init --debug
|
|
304
|
+
archai doctor --debug
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
## Agent Roles
|
|
308
|
+
|
|
309
|
+
### Phase 1 Agents (Planning)
|
|
310
|
+
|
|
311
|
+
| Agent | Purpose | Focus |
|
|
312
|
+
|-------|---------|-------|
|
|
313
|
+
| `deep-analyst` | Deep analysis, initial planning, rethinking | Understanding the REAL problem |
|
|
314
|
+
| `plan-validator` | Challenge plans, find gaps | Breaking assumptions |
|
|
315
|
+
| `tdd-designer` | Design tests BEFORE code | Real user workflows |
|
|
316
|
+
| `critical-reviewer` | SDK-spawned blind spot detection | Fresh unbiased perspective |
|
|
317
|
+
|
|
318
|
+
### Phase 2 Agents (Implementation)
|
|
319
|
+
|
|
320
|
+
| Agent | Purpose | Focus |
|
|
321
|
+
|-------|---------|-------|
|
|
322
|
+
| `implementation-agent` | Execute the validated plan | Following specs exactly |
|
|
323
|
+
| `code-reviewer` | Verify implementation | Finding problems |
|
|
324
|
+
|
|
325
|
+
### Phase 3 Agents (Finalization)
|
|
326
|
+
|
|
327
|
+
| Agent | Purpose | Focus |
|
|
328
|
+
|-------|---------|-------|
|
|
329
|
+
| `cleanup-agent` | Clean temporary work files | Before committing |
|
|
330
|
+
| `finalization-agent` | Post-implementation finalization | Verify, cleanup, commit, push, CI/CD |
|
|
331
|
+
|
|
332
|
+
### Orchestrator
|
|
333
|
+
|
|
334
|
+
| Agent | Purpose |
|
|
335
|
+
|-------|---------|
|
|
336
|
+
| `iteration-controller` | Manages all three phases, handles escalation |
|
|
337
|
+
| `task-orchestrator` | Manages epic/task lifecycle from `.tasks/inbox/` |
|
|
338
|
+
|
|
339
|
+
### Specialist Agents (Generated)
|
|
340
|
+
|
|
341
|
+
Specialists are generated dynamically by Claude Code based on your project. They understand:
|
|
342
|
+
- Your specific tech stack and versions
|
|
343
|
+
- Actual file paths in your codebase
|
|
344
|
+
- Existing patterns and conventions
|
|
345
|
+
- Testing frameworks you use
|
|
346
|
+
|
|
347
|
+
Example specialists:
|
|
348
|
+
- `frontend-specialist` - React/Vue/Angular expertise
|
|
349
|
+
- `backend-specialist` - Express/FastAPI/Django expertise
|
|
350
|
+
- `database-specialist` - SQL/NoSQL optimization
|
|
351
|
+
- `auth-specialist` - Authentication/authorization
|
|
352
|
+
|
|
353
|
+
## Key Principles
|
|
354
|
+
|
|
355
|
+
### 1. No Code Without Validated Plan
|
|
356
|
+
|
|
357
|
+
Never skip Phase 1. Every implementation must have:
|
|
358
|
+
- Dependency analysis
|
|
359
|
+
- Risk assessment
|
|
360
|
+
- Test design with concrete values
|
|
361
|
+
- All questions answered
|
|
362
|
+
|
|
363
|
+
### 2. Approval Gates (Two Modes)
|
|
364
|
+
|
|
365
|
+
Phase 1 outputs a **plan document** to `.claude/plans/{task}.md`. What happens next depends on the mode:
|
|
366
|
+
|
|
367
|
+
**Manual Mode** (default):
|
|
368
|
+
- Workflow **STOPS** and waits for user to: APPROVE / REVISE / REJECT
|
|
369
|
+
- User reviews plan before any code is written
|
|
370
|
+
- User reviews implementation before finalization
|
|
371
|
+
|
|
372
|
+
**Critical Review Mode** (`with critical-review`):
|
|
373
|
+
- Spawns a **separate SDK session** to critically review the plan
|
|
374
|
+
- Fresh perspective catches blind spots the planning agent missed
|
|
375
|
+
- Up to 2 review iterations with plan revisions
|
|
376
|
+
- Auto-proceeds if review passes (no CRITICAL/HIGH issues)
|
|
377
|
+
- Falls back to manual if unresolved issues after 2 iterations
|
|
378
|
+
|
|
379
|
+
| Mode | Plan Gate | Final Gate | Best For |
|
|
380
|
+
|------|-----------|------------|----------|
|
|
381
|
+
| Manual | User approval | User approval | High-stakes changes, learning |
|
|
382
|
+
| Critical Review | Auto (if passed) | Auto (if passed) | Routine tasks, trusted workflows |
|
|
383
|
+
|
|
384
|
+
### 3. Tests Define Done
|
|
385
|
+
|
|
386
|
+
Tests are designed FIRST, in Phase 1. Implementation follows. Tests must:
|
|
387
|
+
- Reflect real user workflows
|
|
388
|
+
- Use concrete values
|
|
389
|
+
- FAIL when code is wrong
|
|
390
|
+
- NOT mock core logic
|
|
391
|
+
|
|
392
|
+
### 4. Validation Is Adversarial
|
|
393
|
+
|
|
394
|
+
`plan-validator` exists to find problems, not approve plans. Expect:
|
|
395
|
+
- 2-4 planning iterations minimum
|
|
396
|
+
- Questions that force deeper thinking
|
|
397
|
+
- Rejection of vague plans
|
|
398
|
+
|
|
399
|
+
### 5. Iterate Until Right
|
|
400
|
+
|
|
401
|
+
Phase 1: Iterate until plan is specific, validated, and tests designed
|
|
402
|
+
Phase 2: Iterate until tests pass and review approves
|
|
403
|
+
|
|
404
|
+
## Permission Presets
|
|
405
|
+
|
|
406
|
+
archai configures Claude Code permissions via `.claude/settings.local.json`. Three presets available:
|
|
407
|
+
|
|
408
|
+
### Permissive (Default)
|
|
409
|
+
|
|
410
|
+
Close to `--dangerously-skip-permissions` but with safety guardrails. Allows most operations while blocking irreversible actions:
|
|
411
|
+
|
|
412
|
+
**Always Denied** (even in permissive mode):
|
|
413
|
+
- Destructive file ops: `rm -rf *`, `rmdir /s`
|
|
414
|
+
- Force git: `git push --force`, `git reset --hard`
|
|
415
|
+
- System damage: `sudo *`, `chmod 777`, `mkfs*`
|
|
416
|
+
- Credentials: `cat ~/.ssh/*`, `echo $*SECRET*`
|
|
417
|
+
- Remote code exec: `curl * | bash`, `wget * | sh`
|
|
418
|
+
- Database destruction: `DROP DATABASE`, `TRUNCATE TABLE`
|
|
419
|
+
|
|
420
|
+
### Strict
|
|
421
|
+
|
|
422
|
+
Production-safe preset. Only allows read-only operations and controlled writes:
|
|
423
|
+
|
|
424
|
+
**Allowed**:
|
|
425
|
+
- Package management: `npm install`, `pip install`, etc.
|
|
426
|
+
- Build/test: `tsc`, `eslint`, `jest`, `pytest`
|
|
427
|
+
- Read operations: `cat`, `grep`, `ls`, `git status`, `git diff`
|
|
428
|
+
- Safe git: `git add`, `git commit`, `git checkout -b`
|
|
429
|
+
|
|
430
|
+
**Denied** (in addition to Always Denied):
|
|
431
|
+
- Network: `curl`, `wget`, `ssh`, `scp`
|
|
432
|
+
- Publish: `npm publish`, `pip upload`
|
|
433
|
+
- Push: `git push` (any form)
|
|
434
|
+
- Process control: `kill`, `pkill`
|
|
435
|
+
|
|
436
|
+
### Custom
|
|
437
|
+
|
|
438
|
+
Define your own allow/deny lists via the wizard. Useful for specific project requirements.
|
|
439
|
+
|
|
440
|
+
### Command Chaining
|
|
441
|
+
|
|
442
|
+
Permissions validate **each segment** of chained commands:
|
|
443
|
+
```bash
|
|
444
|
+
npm install && npm test # Both validated separately
|
|
445
|
+
git add . && git push # Would fail in strict mode (push denied)
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
## Version Tracking
|
|
449
|
+
|
|
450
|
+
archai tracks file states in `.claude/version.json` to enable smart updates:
|
|
451
|
+
|
|
452
|
+
```json
|
|
453
|
+
{
|
|
454
|
+
"schemaVersion": 1,
|
|
455
|
+
"archai": "0.2.0",
|
|
456
|
+
"installedAt": "2026-02-01T10:00:00Z",
|
|
457
|
+
"lastUpdated": "2026-02-05T14:30:00Z",
|
|
458
|
+
"files": {
|
|
459
|
+
".claude/agents/deep-analyst.md": {
|
|
460
|
+
"baseHash": "abc123def456",
|
|
461
|
+
"isGenerated": false
|
|
462
|
+
},
|
|
463
|
+
".claude/agents/frontend-specialist.md": {
|
|
464
|
+
"baseHash": null,
|
|
465
|
+
"isGenerated": true
|
|
466
|
+
}
|
|
467
|
+
},
|
|
468
|
+
"expectedFiles": [".claude/agents/deep-analyst.md", "..."]
|
|
469
|
+
}
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
**How It Works:**
|
|
473
|
+
1. **baseHash**: SHA256 hash when archai installed the file
|
|
474
|
+
2. **currentHash**: Hash of file on disk now
|
|
475
|
+
3. **templateHash**: Hash of new archai template
|
|
476
|
+
|
|
477
|
+
**Three-Way Comparison:**
|
|
478
|
+
- `current == template` → Unchanged
|
|
479
|
+
- `current != base`, `template == base` → You modified it
|
|
480
|
+
- `current == base`, `template != base` → Archai updated it
|
|
481
|
+
- `current != base`, `template != base` → Conflict (both changed)
|
|
482
|
+
|
|
483
|
+
**Migration from Pre-0.2.0:**
|
|
484
|
+
When you run `init` or `update` on an old installation, archai automatically:
|
|
485
|
+
1. Creates version.json
|
|
486
|
+
2. Compares existing files to current templates
|
|
487
|
+
3. Marks matching files as unmodified
|
|
488
|
+
4. Marks differing files as user-modified (conservative approach)
|
|
489
|
+
5. Marks `*-specialist.md` files as generated
|
|
490
|
+
|
|
491
|
+
## Directory Structure
|
|
492
|
+
|
|
493
|
+
After initialization:
|
|
494
|
+
|
|
495
|
+
```
|
|
496
|
+
your-project/
|
|
497
|
+
├── .claude/
|
|
498
|
+
│ ├── agents/ # Agent definitions
|
|
499
|
+
│ │ ├── *.md # Core agents (archai-managed)
|
|
500
|
+
│ │ └── *-specialist.md # Generated specialists (protected)
|
|
501
|
+
│ ├── backups/ # Automatic backups (gitignored)
|
|
502
|
+
│ │ └── {timestamp}/ # Timestamped backup with manifest.json
|
|
503
|
+
│ ├── plans/ # Approved plans (per task)
|
|
504
|
+
│ │ └── archived/ # Completed task plans
|
|
505
|
+
│ ├── state/ # Working state (gitignored)
|
|
506
|
+
│ └── version.json # Version and file hash tracking
|
|
507
|
+
├── .knowledge/
|
|
508
|
+
│ ├── context/
|
|
509
|
+
│ │ └── project-description.md
|
|
510
|
+
│ ├── decisions/ # Architecture decisions
|
|
511
|
+
│ └── learnings/ # Learned patterns
|
|
512
|
+
├── .tasks/
|
|
513
|
+
│ ├── inbox/ # New tasks
|
|
514
|
+
│ ├── epics/ # Active work
|
|
515
|
+
│ ├── review/ # Awaiting merge
|
|
516
|
+
│ └── done/ # Completed
|
|
517
|
+
├── archai.config.md # Configuration
|
|
518
|
+
└── PROMPTS.md # Quick reference prompts
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
## When to Use Which Agent
|
|
522
|
+
|
|
523
|
+
| Situation | Start With |
|
|
524
|
+
|-----------|------------|
|
|
525
|
+
| New feature | `iteration-controller` |
|
|
526
|
+
| Bug fix (complex) | `iteration-controller` |
|
|
527
|
+
| Bug fix (simple, <10 lines) | Direct fix, no agents |
|
|
528
|
+
| Understanding code | `deep-analyst` only |
|
|
529
|
+
| Test quality review | `tdd-designer` only |
|
|
530
|
+
| Before committing | `cleanup-agent` |
|
|
531
|
+
| Managing epics | `task-orchestrator` |
|
|
532
|
+
|
|
533
|
+
### When to Use Critical Review Mode
|
|
534
|
+
|
|
535
|
+
| Situation | Mode | Why |
|
|
536
|
+
|-----------|------|-----|
|
|
537
|
+
| Learning the workflow | Manual | See how planning works |
|
|
538
|
+
| High-stakes feature | Manual | Want full control |
|
|
539
|
+
| Security-sensitive code | Manual | Extra human review |
|
|
540
|
+
| Routine refactoring | Critical Review | Trust the review process |
|
|
541
|
+
| Well-understood feature | Critical Review | Faster iteration |
|
|
542
|
+
| Batch of similar tasks | Critical Review | Efficiency at scale |
|
|
543
|
+
|
|
544
|
+
## Why This Architecture?
|
|
545
|
+
|
|
546
|
+
### Problem: Incomplete Plans
|
|
547
|
+
|
|
548
|
+
"Handle edge cases" leads to implementation guessing.
|
|
549
|
+
|
|
550
|
+
**Solution**: `plan-validator` rejects vague plans, forces specificity.
|
|
551
|
+
|
|
552
|
+
### Problem: Code First, Think Later
|
|
553
|
+
|
|
554
|
+
Jumping to code before understanding leads to rewrites.
|
|
555
|
+
|
|
556
|
+
**Solution**: Three-phase architecture enforces 2-4 thinking iterations BEFORE any code.
|
|
557
|
+
|
|
558
|
+
### Problem: Tests Written To Pass
|
|
559
|
+
|
|
560
|
+
Tests written after code tend to validate the implementation, not the requirement.
|
|
561
|
+
|
|
562
|
+
**Solution**: Tests designed BEFORE implementation, based on user stories, not code.
|
|
563
|
+
|
|
564
|
+
### Problem: Agents Cut Corners
|
|
565
|
+
|
|
566
|
+
Without enforcement, agents skip steps and produce low-quality work.
|
|
567
|
+
|
|
568
|
+
**Solution**: Explicit phase gates, required artifacts, adversarial validation.
|
|
569
|
+
|
|
570
|
+
## Common Mistakes to Avoid
|
|
571
|
+
|
|
572
|
+
### Mistake 1: Skipping to implementation
|
|
573
|
+
```
|
|
574
|
+
# BAD
|
|
575
|
+
"Just implement the auth feature"
|
|
576
|
+
|
|
577
|
+
# GOOD
|
|
578
|
+
"Use iteration-controller to implement the auth feature.
|
|
579
|
+
Run Phase 1 first and wait for my APPROVE."
|
|
580
|
+
```
|
|
581
|
+
|
|
582
|
+
### Mistake 2: Approving vague plans
|
|
583
|
+
```
|
|
584
|
+
# BAD plan that should be REVISED
|
|
585
|
+
"Step 3: Handle edge cases"
|
|
586
|
+
|
|
587
|
+
# GOOD plan that can be APPROVED
|
|
588
|
+
"Step 3: Handle boundary values
|
|
589
|
+
- Empty input: Return validation error 'input_required'
|
|
590
|
+
- Input > 1000 chars: Truncate with warning
|
|
591
|
+
- Invalid characters: Reject with 'invalid_chars'"
|
|
592
|
+
```
|
|
593
|
+
|
|
594
|
+
### Mistake 3: Interrupting Phase 2
|
|
595
|
+
```
|
|
596
|
+
# BAD
|
|
597
|
+
[Agent implementing step 2]
|
|
598
|
+
You: "How's it going? Should I help?"
|
|
599
|
+
|
|
600
|
+
# GOOD
|
|
601
|
+
[Let it run until DONE or BLOCKED]
|
|
602
|
+
[Only interrupt if truly necessary]
|
|
603
|
+
```
|
|
604
|
+
|
|
605
|
+
## Troubleshooting
|
|
606
|
+
|
|
607
|
+
### Agent isn't following instructions
|
|
608
|
+
1. Check if agent file content was passed in prompt
|
|
609
|
+
2. Verify output location is specified
|
|
610
|
+
3. Make task boundaries explicit
|
|
611
|
+
|
|
612
|
+
### Tests are too shallow
|
|
613
|
+
1. Check if tdd-designer used all test categories (correctness, edge, boundary)
|
|
614
|
+
2. Verify concrete values used (not "test with valid input")
|
|
615
|
+
|
|
616
|
+
### Phase 1 keeps iterating
|
|
617
|
+
1. After 4 iterations, check if requirements are unclear
|
|
618
|
+
2. May need to escalate to human for clarification
|
|
619
|
+
3. Check if plan-validator is rejecting for valid reasons
|
|
620
|
+
|
|
621
|
+
### Implementation keeps failing
|
|
622
|
+
1. Check if plan was specific enough
|
|
623
|
+
2. Review test design - were edge cases covered?
|
|
624
|
+
3. After 5 attempts on same error, escalate
|
|
625
|
+
|
|
626
|
+
## License
|
|
627
|
+
|
|
628
|
+
MIT
|
|
629
|
+
|
|
630
|
+
## Contributing
|
|
631
|
+
|
|
632
|
+
Contributions welcome!
|
|
633
|
+
|
|
634
|
+
---
|
|
635
|
+
|
|
636
|
+
Built with Claude Code.
|