@zik000/archai 0.2.1 → 0.2.3

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.
@@ -1,480 +1,506 @@
1
- # archai Prompt Templates
2
-
3
- Complete reference for using the agent system. Copy and customize these prompts.
4
-
5
- ---
6
-
7
- ## Full Orchestration Prompt (Recommended)
8
-
9
- Copy this to start the full three-phase workflow:
10
-
11
- ```
12
- Follow the orchestration guide in .claude/agents/iteration-controller.md to create an
13
- implementation plan for: {YOUR TASK DESCRIPTION}
14
-
15
- PHASE 1 INSTRUCTIONS (Planning - requires approval):
16
- 1. Read each agent's full instruction file from .claude/agents/ BEFORE spawning
17
- 2. Pass the COMPLETE instructions to each subagent in the Task prompt
18
- 3. Save ALL agent outputs to .claude/state/ directory
19
- 4. Run at least 2 planning iterations (THINK → VALIDATE → TEST DESIGN → VALIDATE TESTS → RETHINK)
20
- 5. After planning complete, write final plan to .claude/plans/{task-name}.md
21
- 6. STOP and present the plan summary - do NOT implement until I say "APPROVE"
22
-
23
- PHASE 2 INSTRUCTIONS (Implementation - AUTONOMOUS after approval):
24
- When I say "APPROVE", execute Phase 2 AUTONOMOUSLY:
25
- - Implement ALL steps without stopping to ask
26
- - Run tests after each step
27
- - Fix failures automatically (up to 5 attempts per step)
28
- - Only report back when ALL DONE or truly BLOCKED
29
- - DO NOT ask "should I proceed?" - just execute the full loop
30
- - When Phase 2 complete, present summary and wait for FINAL APPROVAL
31
-
32
- PHASE 3 INSTRUCTIONS (Finalization - after implementation approved):
33
- When I say "APPROVE" on implementation:
34
- - Read .claude/agents/finalization-agent.md
35
- - Spawn finalization-agent to verify, cleanup, commit, push, wait for CI/CD
36
- - Report final status
37
-
38
- Start with Phase 1, Iteration 1: Read .claude/agents/deep-analyst.md and
39
- spawn a deep-analyst subagent to analyze the task.
40
- ```
41
-
42
- ---
43
-
44
- ## Phase 2 Only Prompt (After Plan is Approved)
45
-
46
- Use this when resuming after approval:
47
-
48
- ```
49
- The plan in .claude/plans/{task-name}.md has been APPROVED.
50
-
51
- Execute Phase 2 AUTONOMOUSLY:
52
- 1. Read .claude/agents/implementation-agent.md
53
- 2. Spawn implementation-agent with FULL instructions
54
- 3. The agent must execute ALL steps WITHOUT stopping to ask
55
- 4. Loop: implement test fix failures → next step → repeat
56
- 5. Only report back when COMPLETELY DONE or truly BLOCKED
57
- 6. When done, present summary and wait for FINAL APPROVAL
58
-
59
- DO NOT ask for permission between steps. Just execute until done.
60
- ```
61
-
62
- ---
63
-
64
- ## Phase 3 Only Prompt (After Implementation is Approved)
65
-
66
- Use this when implementation is done and you've approved it:
67
-
68
- ```
69
- The implementation is complete and APPROVED.
70
-
71
- Execute Phase 3 (Finalization):
72
- 1. Read .claude/agents/finalization-agent.md
73
- 2. Spawn finalization-agent with FULL instructions
74
- 3. The agent will:
75
- - Verify all acceptance criteria against original task
76
- - Run local quality checks (typecheck, lint)
77
- - Clean up temp files
78
- - Commit with proper message
79
- - Push to remote (triggers CI/CD)
80
- - Wait for CI/CD to pass
81
- 4. Report final status when complete
82
-
83
- Branch: {branch-name}
84
- Task file: {.tasks/epics/TASK-XXX/epic.md or original task}
85
- ```
86
-
87
- ---
88
-
89
- ## Planning Phase Only
90
-
91
- ### Deep Analysis
92
-
93
- ```
94
- Read .claude/agents/deep-analyst.md and spawn a deep-analyst to analyze:
95
- {WHAT TO ANALYZE}
96
-
97
- Focus on:
98
- - What is the REAL problem we're solving?
99
- - What are the dependencies?
100
- - What could go wrong?
101
-
102
- DO NOT create an implementation plan yet - just analysis.
103
- Output to .claude/state/analysis-{topic}.md
104
- ```
105
-
106
- **Examples:**
107
- ```
108
- Read .claude/agents/deep-analyst.md and spawn a deep-analyst to analyze
109
- our current authentication flow.
110
-
111
- Trace:
112
- 1. How users log in
113
- 2. How tokens are validated
114
- 3. How sessions are managed
115
-
116
- DO NOT create an implementation plan yet - just analysis.
117
- Output to .claude/state/auth-flow-analysis.md
118
- ```
119
-
120
- ### Plan Validation
121
-
122
- ```
123
- Read .claude/agents/plan-validator.md and spawn a plan-validator to
124
- challenge the plan in .claude/state/{plan-file}.md
125
-
126
- Your job is to FIND PROBLEMS, not approve the plan.
127
- Look for:
128
- - Vague steps ("handle edge cases")
129
- - Missing error handling
130
- - Untested assumptions
131
- - Performance concerns
132
-
133
- Output critique to .claude/state/plan-validation.md
134
- ```
135
-
136
- ### Test Design (TDD)
137
-
138
- ```
139
- Read .claude/agents/tdd-designer.md and spawn a tdd-designer to create
140
- test designs for: {FEATURE DESCRIPTION}
141
-
142
- Focus on:
143
- - Real user workflows, not implementation details
144
- - Concrete values (not "test with valid input")
145
- - Tests that would FAIL if code is broken
146
- - Edge cases and boundary conditions
147
-
148
- Output to .claude/state/test-design-{feature}.md
149
- ```
150
-
151
- **Examples:**
152
- ```
153
- Read .claude/agents/tdd-designer.md and spawn a tdd-designer to create
154
- test designs for the user registration flow.
155
-
156
- Focus on:
157
- - Valid registration with all fields
158
- - Missing required fields (each field separately)
159
- - Invalid email formats
160
- - Password strength requirements
161
- - Duplicate email handling
162
-
163
- Use concrete values like:
164
- - email: "test@example.com"
165
- - password: "SecureP@ss123"
166
-
167
- Output to .claude/state/test-design-registration.md
168
- ```
169
-
170
- ---
171
-
172
- ## Implementation Phase Only
173
-
174
- ### Direct Implementation (Skip Planning)
175
-
176
- Use only for simple, well-defined tasks:
177
-
178
- ```
179
- Read .claude/agents/implementation-agent.md and spawn an implementation-agent to:
180
- {SPECIFIC TASK}
181
-
182
- Execute WITHOUT stopping to ask. Just implement and test.
183
- Report back when DONE or truly BLOCKED.
184
- ```
185
-
186
- **Examples:**
187
- ```
188
- Read .claude/agents/implementation-agent.md and spawn an implementation-agent to:
189
- Fix the typo in src/components/Header.tsx - change "Welcom" to "Welcome"
190
-
191
- Execute WITHOUT stopping to ask. Report back when done.
192
- ```
193
-
194
- ```
195
- Read .claude/agents/implementation-agent.md and spawn an implementation-agent to:
196
- Add a loading spinner to the submit button in LoginForm.tsx
197
-
198
- Requirements:
199
- - Show spinner when form is submitting
200
- - Disable button during submission
201
- - Hide spinner when complete
202
-
203
- Execute WITHOUT stopping to ask. Run tests after changes.
204
- ```
205
-
206
- ### Code Review
207
-
208
- ```
209
- Read .claude/agents/code-reviewer.md and spawn a code-reviewer to
210
- review the changes in: {LOCATION}
211
-
212
- Focus on:
213
- - Does it match the approved plan?
214
- - Are there bugs or edge cases missed?
215
- - Is error handling complete?
216
- - Are tests adequate?
217
-
218
- Output review to .claude/state/code-review-{feature}.md
219
- ```
220
-
221
- **Examples:**
222
- ```
223
- Read .claude/agents/code-reviewer.md and spawn a code-reviewer to
224
- review the changes in src/api/auth/
225
-
226
- Focus on:
227
- - Security vulnerabilities
228
- - Error handling completeness
229
- - Test coverage
230
- - API contract compliance
231
-
232
- Output review to .claude/state/code-review-auth-api.md
233
- ```
234
-
235
- ---
236
-
237
- ## Finalization Phase
238
-
239
- ### Cleanup Before Commit
240
-
241
- ```
242
- Read .claude/agents/cleanup-agent.md and spawn a cleanup-agent for task: {TASK}
243
-
244
- Clean up:
245
- - .claude/state/ (except archived)
246
- - .agents/scratch/
247
- - .agents/thoughts/
248
- - Any temporary files
249
-
250
- Preserve:
251
- - .knowledge/ (all of it)
252
- - .claude/plans/ (approved plans)
253
- - Actual source code changes
254
- ```
255
-
256
- ### Full Finalization
257
-
258
- ```
259
- Read .claude/agents/finalization-agent.md and spawn a finalization-agent.
260
-
261
- Task: {TASK DESCRIPTION}
262
- Branch: {BRANCH NAME}
263
-
264
- The agent will:
265
- 1. Verify all acceptance criteria
266
- 2. Run quality checks (typecheck, lint)
267
- 3. Clean temporary files
268
- 4. Commit with proper message
269
- 5. Push to remote
270
- 6. Wait for CI/CD
271
- 7. Report final status
272
- ```
273
-
274
- ---
275
-
276
- ## Task Management
277
-
278
- ### Pick Up Next Task
279
-
280
- ```
281
- Read .claude/agents/task-orchestrator.md and spawn a task-orchestrator to:
282
- Pick up the next task from .tasks/inbox/
283
-
284
- The agent will:
285
- 1. Scan inbox for available tasks
286
- 2. Select highest priority task
287
- 3. Move to .tasks/epics/
288
- 4. Create branch
289
- 5. Begin Phase 1 planning
290
- ```
291
-
292
- ### Create New Epic
293
-
294
- ```
295
- Read .claude/agents/task-orchestrator.md and spawn a task-orchestrator to:
296
- Create an epic for: {FEATURE DESCRIPTION}
297
-
298
- Include:
299
- - Clear acceptance criteria
300
- - Priority level
301
- - Estimated complexity
302
- - Dependencies (if any)
303
-
304
- Save to .tasks/inbox/TASK-{XXX}/epic.md
305
- ```
306
-
307
- ---
308
-
309
- ## Specialist Agents
310
-
311
- After running `archai generate`, use your project-specific specialists:
312
-
313
- ### Template: Invoke Any Specialist
314
-
315
- ```
316
- Read .claude/agents/{specialist-name}.md and spawn a {specialist-name} to:
317
- {SPECIFIC TASK}
318
-
319
- Context:
320
- - {relevant context}
321
-
322
- Output to .claude/state/{output-file}.md
323
- ```
324
-
325
- ### Common Specialist Prompts
326
-
327
- ```
328
- # Frontend work
329
- Read .claude/agents/frontend-specialist.md and spawn a frontend-specialist to:
330
- Create a reusable modal component with:
331
- - Backdrop click to close
332
- - ESC key to close
333
- - Focus trap
334
- - Smooth animations
335
-
336
- Output to .claude/state/modal-component-design.md
337
- ```
338
-
339
- ```
340
- # Backend work
341
- Read .claude/agents/backend-specialist.md and spawn a backend-specialist to:
342
- Add rate limiting to the API endpoints in src/api/
343
-
344
- Requirements:
345
- - 100 requests per minute per IP
346
- - Return 429 with Retry-After header
347
- - Whitelist internal services
348
-
349
- Output to .claude/state/rate-limiting-design.md
350
- ```
351
-
352
- ```
353
- # Database work
354
- Read .claude/agents/database-specialist.md and spawn a database-specialist to:
355
- Optimize the slow query in getUserOrders()
356
-
357
- Current query takes 2+ seconds with 10k orders.
358
- Target: under 100ms
359
-
360
- Output to .claude/state/query-optimization.md
361
- ```
362
-
363
- ---
364
-
365
- ## Quick Reference Card
366
-
367
- | I want to... | Use this prompt... |
368
- |--------------|-------------------|
369
- | Implement a feature | `Use iteration-controller for: X. Run Phase 1, wait for APPROVE.` |
370
- | Analyze code first | `Read deep-analyst.md, spawn deep-analyst to analyze: X` |
371
- | Design tests only | `Read tdd-designer.md, spawn tdd-designer to design tests for: X` |
372
- | Get specialist help | `Read {name}-specialist.md, spawn {name}-specialist for: X` |
373
- | Resume implementation | `The plan in .claude/plans/X.md has been APPROVED. Execute Phase 2 AUTONOMOUSLY.` |
374
- | Finalize (commit/push) | `Implementation APPROVED. Execute Phase 3 with finalization-agent.` |
375
- | Clean up before commit | `Read cleanup-agent.md, spawn cleanup-agent for task: X` |
376
- | Approve a plan | `APPROVE` |
377
- | Approve implementation | `APPROVE` (triggers Phase 3 finalization) |
378
- | Request changes | `REVISE: [specific changes]` |
379
- | Stop workflow | `REJECT: [reason]` |
380
-
381
- ---
382
-
383
- ## Step-by-Step Examples
384
-
385
- ### Example 1: Implement a New Feature
386
-
387
- **Task:** "Add user authentication with JWT"
388
-
389
- **Step 1: Start the orchestrated workflow**
390
- ```
391
- Use iteration-controller to implement: Add user authentication with JWT
392
- that supports login, logout, and token refresh.
393
-
394
- Run Phase 1 with at least 2 iterations.
395
- Write plan to .claude/plans/jwt-auth.md.
396
- STOP and wait for my APPROVE before implementing.
397
- ```
398
-
399
- **Step 2: Wait for Phase 1 to complete**
400
-
401
- The agent will:
402
- 1. Spawn `deep-analyst` Creates analysis in `.claude/state/phase1_analysis.md`
403
- 2. Spawn `plan-validator` → Challenges plan in `.claude/state/phase1_validation.md`
404
- 3. Spawn `tdd-designer` Designs tests in `.claude/state/phase1_test_design.md`
405
- 4. Iterate 2-4 times until plan is solid
406
- 5. Write final plan to `.claude/plans/jwt-auth.md`
407
- 6. **STOP and present summary**
408
-
409
- **Step 3: Review and approve**
410
- ```
411
- # Review the plan
412
- Read .claude/plans/jwt-auth.md
413
-
414
- # If satisfied:
415
- APPROVE
416
-
417
- # If changes needed:
418
- REVISE: Add support for refresh token rotation, also consider session invalidation on password change
419
- ```
420
-
421
- **Step 4: Autonomous implementation**
422
-
423
- After APPROVE, Phase 2 runs without stopping:
424
- - Implements each step
425
- - Runs tests after each step
426
- - Fixes failures automatically
427
- - Reports only when DONE or BLOCKED
428
-
429
- ---
430
-
431
- ### Example 2: Quick Bug Fix
432
-
433
- **Task:** "Fix the broken date formatting in user profiles"
434
-
435
- ```
436
- Read .claude/agents/implementation-agent.md and spawn an implementation-agent to:
437
- Fix the date formatting bug in src/components/UserProfile.tsx
438
-
439
- The issue: Dates show as "Invalid Date" for users with null birthdates.
440
-
441
- Fix: Add null check before formatting.
442
- Test: Verify with null, valid date, and edge cases.
443
-
444
- Execute WITHOUT stopping. Report when done.
445
- ```
446
-
447
- ---
448
-
449
- ### Example 3: Analysis Without Implementation
450
-
451
- **Task:** "Understand how the caching layer works before optimizing"
452
-
453
- ```
454
- Read .claude/agents/deep-analyst.md and spawn a deep-analyst to analyze
455
- the caching implementation in src/services/cache/.
456
-
457
- Trace:
458
- 1. What gets cached and for how long
459
- 2. Cache invalidation strategy
460
- 3. Memory usage patterns
461
- 4. Performance bottlenecks
462
-
463
- DO NOT create an implementation plan - just analysis.
464
- Output to .claude/state/cache-analysis.md
465
- ```
466
-
467
- ---
468
-
469
- ## Tips for Best Results
470
-
471
- 1. **Be specific** - More detail = better results
472
- 2. **Include context** - Mention relevant files, constraints, or requirements
473
- 3. **Start with iteration-controller** - For any non-trivial task
474
- 4. **Use specialists** - They know your project's patterns
475
- 5. **Let Phase 2 run** - Don't interrupt unless truly necessary
476
- 6. **Review plans carefully** - Reject vague steps
477
-
478
- ---
479
-
480
- *Generated by archai. See README.md for full documentation.*
1
+ # archai Prompt Templates
2
+
3
+ Complete reference for using the agent system. Copy and customize these prompts.
4
+
5
+ ---
6
+
7
+ ## Full Orchestration Prompt (Recommended)
8
+
9
+ Copy this to start the full three-phase workflow:
10
+
11
+ ```
12
+ Follow the orchestration guide in .claude/agents/maestro-agent.md to create an
13
+ implementation plan for: {YOUR TASK DESCRIPTION}
14
+
15
+ PHASE 1 INSTRUCTIONS (Planning - requires approval):
16
+ 1. Read each agent's full instruction file from .claude/agents/ BEFORE spawning
17
+ 2. Pass the COMPLETE instructions to each subagent in the Task prompt
18
+ 3. Save ALL agent outputs to .claude/state/ directory
19
+ 4. Run at least 2 planning iterations (THINK → VALIDATE → TEST DESIGN → VALIDATE TESTS → RETHINK)
20
+ 5. After planning complete, write final plan to .claude/plans/{task-name}.md
21
+ 6. STOP and present the plan summary - do NOT implement until I say "APPROVE"
22
+
23
+ PHASE 2 INSTRUCTIONS (Implementation - AUTONOMOUS after approval):
24
+ When I say "APPROVE", execute Phase 2 AUTONOMOUSLY:
25
+ - Implement ALL steps without stopping to ask
26
+ - Run tests after each step
27
+ - Fix failures automatically (up to 5 attempts per step)
28
+ - Only report back when ALL DONE or truly BLOCKED
29
+ - DO NOT ask "should I proceed?" - just execute the full loop
30
+ - When Phase 2 complete, present summary and wait for FINAL APPROVAL
31
+
32
+ PHASE 3 INSTRUCTIONS (Finalization - after implementation approved):
33
+ When I say "APPROVE" on implementation:
34
+ - Read .claude/agents/finalization-agent.md
35
+ - Spawn finalization-agent to verify, cleanup, commit, push, wait for CI/CD
36
+ - Report final status
37
+
38
+ Start with Phase 1, Iteration 1: Read .claude/agents/deep-analyst.md and
39
+ spawn a deep-analyst subagent to analyze the task.
40
+ ```
41
+
42
+ ---
43
+
44
+ ## Task Preparation Prompt (Recommended First Step)
45
+
46
+ Use this to structure a vague or complex task before execution:
47
+
48
+ ```
49
+ Use task-prep for: {YOUR RAW TASK DESCRIPTION}
50
+ ```
51
+
52
+ After approval, feed the result to the execution loop:
53
+
54
+ ```
55
+ Use maestro-agent for: the prepared task in .claude/state/prepared-task.md
56
+ ```
57
+
58
+ ---
59
+
60
+ ## Phase 2 Only Prompt (After Plan is Approved)
61
+
62
+ Use this when resuming after approval:
63
+
64
+ ```
65
+ The plan in .claude/plans/{task-name}.md has been APPROVED.
66
+
67
+ Execute Phase 2 AUTONOMOUSLY:
68
+ 1. Read .claude/agents/implementation-agent.md
69
+ 2. Spawn implementation-agent with FULL instructions
70
+ 3. The agent must execute ALL steps WITHOUT stopping to ask
71
+ 4. Loop: implement → test → fix failures → next step → repeat
72
+ 5. Only report back when COMPLETELY DONE or truly BLOCKED
73
+ 6. When done, present summary and wait for FINAL APPROVAL
74
+
75
+ DO NOT ask for permission between steps. Just execute until done.
76
+ ```
77
+
78
+ ---
79
+
80
+ ## Phase 3 Only Prompt (After Implementation is Approved)
81
+
82
+ Use this when implementation is done and you've approved it:
83
+
84
+ ```
85
+ The implementation is complete and APPROVED.
86
+
87
+ Execute Phase 3 (Finalization):
88
+ 1. Read .claude/agents/finalization-agent.md
89
+ 2. Spawn finalization-agent with FULL instructions
90
+ 3. The agent will:
91
+ - Verify all acceptance criteria against original task
92
+ - Run local quality checks (typecheck, lint)
93
+ - Clean up temp files
94
+ - Commit with proper message
95
+ - Push to remote (triggers CI/CD)
96
+ - Wait for CI/CD to pass
97
+ 4. Report final status when complete
98
+
99
+ Branch: {branch-name}
100
+ Task file: {.tasks/epics/TASK-XXX/epic.md or original task}
101
+ ```
102
+
103
+ ---
104
+
105
+ ## Planning Phase Only
106
+
107
+ ### Deep Analysis
108
+
109
+ ```
110
+ Read .claude/agents/deep-analyst.md and spawn a deep-analyst to analyze:
111
+ {WHAT TO ANALYZE}
112
+
113
+ Focus on:
114
+ - What is the REAL problem we're solving?
115
+ - What are the dependencies?
116
+ - What could go wrong?
117
+
118
+ DO NOT create an implementation plan yet - just analysis.
119
+ Output to .claude/state/analysis-{topic}.md
120
+ ```
121
+
122
+ **Examples:**
123
+ ```
124
+ Read .claude/agents/deep-analyst.md and spawn a deep-analyst to analyze
125
+ our current authentication flow.
126
+
127
+ Trace:
128
+ 1. How users log in
129
+ 2. How tokens are validated
130
+ 3. How sessions are managed
131
+
132
+ DO NOT create an implementation plan yet - just analysis.
133
+ Output to .claude/state/auth-flow-analysis.md
134
+ ```
135
+
136
+ ### Plan Validation
137
+
138
+ ```
139
+ Read .claude/agents/plan-validator.md and spawn a plan-validator to
140
+ challenge the plan in .claude/state/{plan-file}.md
141
+
142
+ Your job is to FIND PROBLEMS, not approve the plan.
143
+ Look for:
144
+ - Vague steps ("handle edge cases")
145
+ - Missing error handling
146
+ - Untested assumptions
147
+ - Performance concerns
148
+
149
+ Output critique to .claude/state/plan-validation.md
150
+ ```
151
+
152
+ ### Test Design (TDD)
153
+
154
+ ```
155
+ Read .claude/agents/tdd-designer.md and spawn a tdd-designer to create
156
+ test designs for: {FEATURE DESCRIPTION}
157
+
158
+ Focus on:
159
+ - Real user workflows, not implementation details
160
+ - Concrete values (not "test with valid input")
161
+ - Tests that would FAIL if code is broken
162
+ - Edge cases and boundary conditions
163
+
164
+ Output to .claude/state/test-design-{feature}.md
165
+ ```
166
+
167
+ **Examples:**
168
+ ```
169
+ Read .claude/agents/tdd-designer.md and spawn a tdd-designer to create
170
+ test designs for the user registration flow.
171
+
172
+ Focus on:
173
+ - Valid registration with all fields
174
+ - Missing required fields (each field separately)
175
+ - Invalid email formats
176
+ - Password strength requirements
177
+ - Duplicate email handling
178
+
179
+ Use concrete values like:
180
+ - email: "test@example.com"
181
+ - password: "SecureP@ss123"
182
+
183
+ Output to .claude/state/test-design-registration.md
184
+ ```
185
+
186
+ ---
187
+
188
+ ## Implementation Phase Only
189
+
190
+ ### Direct Implementation (Skip Planning)
191
+
192
+ Use only for simple, well-defined tasks:
193
+
194
+ ```
195
+ Read .claude/agents/implementation-agent.md and spawn an implementation-agent to:
196
+ {SPECIFIC TASK}
197
+
198
+ Execute WITHOUT stopping to ask. Just implement and test.
199
+ Report back when DONE or truly BLOCKED.
200
+ ```
201
+
202
+ **Examples:**
203
+ ```
204
+ Read .claude/agents/implementation-agent.md and spawn an implementation-agent to:
205
+ Fix the typo in src/components/Header.tsx - change "Welcom" to "Welcome"
206
+
207
+ Execute WITHOUT stopping to ask. Report back when done.
208
+ ```
209
+
210
+ ```
211
+ Read .claude/agents/implementation-agent.md and spawn an implementation-agent to:
212
+ Add a loading spinner to the submit button in LoginForm.tsx
213
+
214
+ Requirements:
215
+ - Show spinner when form is submitting
216
+ - Disable button during submission
217
+ - Hide spinner when complete
218
+
219
+ Execute WITHOUT stopping to ask. Run tests after changes.
220
+ ```
221
+
222
+ ### Code Review
223
+
224
+ ```
225
+ Read .claude/agents/code-reviewer.md and spawn a code-reviewer to
226
+ review the changes in: {LOCATION}
227
+
228
+ Focus on:
229
+ - Does it match the approved plan?
230
+ - Are there bugs or edge cases missed?
231
+ - Is error handling complete?
232
+ - Are tests adequate?
233
+
234
+ Output review to .claude/state/code-review-{feature}.md
235
+ ```
236
+
237
+ **Examples:**
238
+ ```
239
+ Read .claude/agents/code-reviewer.md and spawn a code-reviewer to
240
+ review the changes in src/api/auth/
241
+
242
+ Focus on:
243
+ - Security vulnerabilities
244
+ - Error handling completeness
245
+ - Test coverage
246
+ - API contract compliance
247
+
248
+ Output review to .claude/state/code-review-auth-api.md
249
+ ```
250
+
251
+ ---
252
+
253
+ ## Finalization Phase
254
+
255
+ ### Cleanup Before Commit
256
+
257
+ ```
258
+ Read .claude/agents/cleanup-agent.md and spawn a cleanup-agent for task: {TASK}
259
+
260
+ Clean up:
261
+ - .claude/state/ (except archived)
262
+ - .agents/scratch/
263
+ - .agents/thoughts/
264
+ - Any temporary files
265
+
266
+ Preserve:
267
+ - .knowledge/ (all of it)
268
+ - .claude/plans/ (approved plans)
269
+ - Actual source code changes
270
+ ```
271
+
272
+ ### Full Finalization
273
+
274
+ ```
275
+ Read .claude/agents/finalization-agent.md and spawn a finalization-agent.
276
+
277
+ Task: {TASK DESCRIPTION}
278
+ Branch: {BRANCH NAME}
279
+
280
+ The agent will:
281
+ 1. Verify all acceptance criteria
282
+ 2. Run quality checks (typecheck, lint)
283
+ 3. Clean temporary files
284
+ 4. Commit with proper message
285
+ 5. Push to remote
286
+ 6. Wait for CI/CD
287
+ 7. Report final status
288
+ ```
289
+
290
+ ---
291
+
292
+ ## Task Management
293
+
294
+ ### Pick Up Next Task
295
+
296
+ ```
297
+ Read .claude/agents/task-orchestrator.md and spawn a task-orchestrator to:
298
+ Pick up the next task from .tasks/inbox/
299
+
300
+ The agent will:
301
+ 1. Scan inbox for available tasks
302
+ 2. Select highest priority task
303
+ 3. Move to .tasks/epics/
304
+ 4. Create branch
305
+ 5. Begin Phase 1 planning
306
+ ```
307
+
308
+ ### Create New Epic
309
+
310
+ ```
311
+ Read .claude/agents/task-orchestrator.md and spawn a task-orchestrator to:
312
+ Create an epic for: {FEATURE DESCRIPTION}
313
+
314
+ Include:
315
+ - Clear acceptance criteria
316
+ - Priority level
317
+ - Estimated complexity
318
+ - Dependencies (if any)
319
+
320
+ Save to .tasks/inbox/TASK-{XXX}/epic.md
321
+ ```
322
+
323
+ ---
324
+
325
+ ## Specialist Agents
326
+
327
+ After running `archai generate`, use your project-specific specialists:
328
+
329
+ ### Template: Invoke Any Specialist
330
+
331
+ ```
332
+ Read .claude/agents/{specialist-name}.md and spawn a {specialist-name} to:
333
+ {SPECIFIC TASK}
334
+
335
+ Context:
336
+ - {relevant context}
337
+
338
+ Output to .claude/state/{output-file}.md
339
+ ```
340
+
341
+ ### Common Specialist Prompts
342
+
343
+ ```
344
+ # Frontend work
345
+ Read .claude/agents/frontend-specialist.md and spawn a frontend-specialist to:
346
+ Create a reusable modal component with:
347
+ - Backdrop click to close
348
+ - ESC key to close
349
+ - Focus trap
350
+ - Smooth animations
351
+
352
+ Output to .claude/state/modal-component-design.md
353
+ ```
354
+
355
+ ```
356
+ # Backend work
357
+ Read .claude/agents/backend-specialist.md and spawn a backend-specialist to:
358
+ Add rate limiting to the API endpoints in src/api/
359
+
360
+ Requirements:
361
+ - 100 requests per minute per IP
362
+ - Return 429 with Retry-After header
363
+ - Whitelist internal services
364
+
365
+ Output to .claude/state/rate-limiting-design.md
366
+ ```
367
+
368
+ ```
369
+ # Database work
370
+ Read .claude/agents/database-specialist.md and spawn a database-specialist to:
371
+ Optimize the slow query in getUserOrders()
372
+
373
+ Current query takes 2+ seconds with 10k orders.
374
+ Target: under 100ms
375
+
376
+ Output to .claude/state/query-optimization.md
377
+ ```
378
+
379
+ ---
380
+
381
+ ## Quick Reference Card
382
+
383
+ | I want to... | Use this prompt... |
384
+ |--------------|-------------------|
385
+ | Prepare a task spec | `Use task-prep for: [description]` |
386
+ | Implement a feature | `Use maestro-agent for: X. Run Phase 1, wait for APPROVE.` |
387
+ | Analyze code first | `Read deep-analyst.md, spawn deep-analyst to analyze: X` |
388
+ | Design tests only | `Read tdd-designer.md, spawn tdd-designer to design tests for: X` |
389
+ | Get specialist help | `Read {name}-specialist.md, spawn {name}-specialist for: X` |
390
+ | Resume implementation | `The plan in .claude/plans/X.md has been APPROVED. Execute Phase 2 AUTONOMOUSLY.` |
391
+ | Finalize (commit/push) | `Implementation APPROVED. Execute Phase 3 with finalization-agent.` |
392
+ | Clean up before commit | `Read cleanup-agent.md, spawn cleanup-agent for task: X` |
393
+ | Approve a plan | `APPROVE` |
394
+ | Approve implementation | `APPROVE` (triggers Phase 3 finalization) |
395
+ | Request changes | `REVISE: [specific changes]` |
396
+ | Stop workflow | `REJECT: [reason]` |
397
+
398
+ ---
399
+
400
+ ## Step-by-Step Examples
401
+
402
+ ### Example 1: Implement a New Feature
403
+
404
+ **Task:** "Add user authentication with JWT"
405
+
406
+ **Step 1: Prepare the task spec (recommended)**
407
+ ```
408
+ Use task-prep for: add user authentication with JWT
409
+ ```
410
+
411
+ The agent will:
412
+ 1. Read project context and codebase structure
413
+ 2. Classify as Task or Epic
414
+ 3. Ask 1-2 targeted clarifying questions (scope, constraints)
415
+ 4. Write structured spec to `.claude/state/prepared-task.md`
416
+ 5. Present for your approval
417
+
418
+ ```
419
+ APPROVE
420
+ ```
421
+
422
+ **Step 2: Start the orchestrated workflow**
423
+ ```
424
+ Use maestro-agent for: the prepared task in .claude/state/prepared-task.md
425
+ ```
426
+
427
+ The agent will:
428
+ 1. Spawn `deep-analyst` → Creates analysis in `.claude/state/phase1_analysis.md`
429
+ 2. Spawn `plan-validator` → Challenges plan in `.claude/state/phase1_validation.md`
430
+ 3. Spawn `tdd-designer` → Designs tests in `.claude/state/phase1_test_design.md`
431
+ 4. Iterate 2-4 times until plan is solid
432
+ 5. Write final plan to `.claude/plans/jwt-auth.md`
433
+ 6. **STOP and present summary**
434
+
435
+ **Step 3: Review and approve**
436
+ ```
437
+ # Review the plan
438
+ Read .claude/plans/jwt-auth.md
439
+
440
+ # If satisfied:
441
+ APPROVE
442
+
443
+ # If changes needed:
444
+ REVISE: Add support for refresh token rotation, also consider session invalidation on password change
445
+ ```
446
+
447
+ **Step 4: Autonomous implementation**
448
+
449
+ After APPROVE, Phase 2 runs without stopping:
450
+ - Implements each step
451
+ - Runs tests after each step
452
+ - Fixes failures automatically
453
+ - Reports only when DONE or BLOCKED
454
+
455
+ ---
456
+
457
+ ### Example 2: Quick Bug Fix
458
+
459
+ **Task:** "Fix the broken date formatting in user profiles"
460
+
461
+ ```
462
+ Read .claude/agents/implementation-agent.md and spawn an implementation-agent to:
463
+ Fix the date formatting bug in src/components/UserProfile.tsx
464
+
465
+ The issue: Dates show as "Invalid Date" for users with null birthdates.
466
+
467
+ Fix: Add null check before formatting.
468
+ Test: Verify with null, valid date, and edge cases.
469
+
470
+ Execute WITHOUT stopping. Report when done.
471
+ ```
472
+
473
+ ---
474
+
475
+ ### Example 3: Analysis Without Implementation
476
+
477
+ **Task:** "Understand how the caching layer works before optimizing"
478
+
479
+ ```
480
+ Read .claude/agents/deep-analyst.md and spawn a deep-analyst to analyze
481
+ the caching implementation in src/services/cache/.
482
+
483
+ Trace:
484
+ 1. What gets cached and for how long
485
+ 2. Cache invalidation strategy
486
+ 3. Memory usage patterns
487
+ 4. Performance bottlenecks
488
+
489
+ DO NOT create an implementation plan - just analysis.
490
+ Output to .claude/state/cache-analysis.md
491
+ ```
492
+
493
+ ---
494
+
495
+ ## Tips for Best Results
496
+
497
+ 1. **Be specific** - More detail = better results
498
+ 2. **Include context** - Mention relevant files, constraints, or requirements
499
+ 3. **Start with maestro-agent** - For any non-trivial task
500
+ 4. **Use specialists** - They know your project's patterns
501
+ 5. **Let Phase 2 run** - Don't interrupt unless truly necessary
502
+ 6. **Review plans carefully** - Reject vague steps
503
+
504
+ ---
505
+
506
+ *Generated by archai. See README.md for full documentation.*