aiblueprint-cli 1.4.99 → 1.4.100

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.
Files changed (96) hide show
  1. package/agents-config/skills/agents-manager/SKILL.md +2 -2
  2. package/agents-config/skills/agents-manager/agents/openai.yaml +7 -0
  3. package/agents-config/skills/agents-manager/assets/codex-icon.svg +20 -0
  4. package/agents-config/skills/apex/SKILL.md +120 -118
  5. package/agents-config/skills/apex/agents/openai.yaml +10 -0
  6. package/agents-config/skills/apex/assets/codex-icon.svg +15 -0
  7. package/agents-config/skills/apex/scripts/apex-state.py +740 -0
  8. package/agents-config/skills/apex/scripts/setup-templates.sh +27 -145
  9. package/agents-config/skills/apex/scripts/test_apex_state.py +413 -0
  10. package/agents-config/skills/apex/scripts/update-progress.sh +17 -73
  11. package/agents-config/skills/apex/steps/step-00-init.md +85 -231
  12. package/agents-config/skills/apex/steps/step-00b-branch.md +10 -118
  13. package/agents-config/skills/apex/steps/step-00b-economy.md +12 -239
  14. package/agents-config/skills/apex/steps/step-00b-interactive.md +13 -162
  15. package/agents-config/skills/apex/steps/step-00b-save.md +13 -114
  16. package/agents-config/skills/apex/steps/step-01-analyze.md +40 -361
  17. package/agents-config/skills/apex/steps/step-02-plan.md +55 -562
  18. package/agents-config/skills/apex/steps/step-02b-tasks.md +15 -291
  19. package/agents-config/skills/apex/steps/step-03-execute-teams.md +47 -267
  20. package/agents-config/skills/apex/steps/step-03-execute.md +32 -212
  21. package/agents-config/skills/apex/steps/step-04-validate.md +42 -246
  22. package/agents-config/skills/apex/steps/step-05-examine.md +47 -371
  23. package/agents-config/skills/apex/steps/step-06-resolve.md +19 -221
  24. package/agents-config/skills/apex/steps/step-07-tests.md +19 -234
  25. package/agents-config/skills/apex/steps/step-08-run-tests.md +13 -300
  26. package/agents-config/skills/apex/steps/step-09-finish.md +36 -200
  27. package/agents-config/skills/apex/steps/step-10-verify.md +46 -264
  28. package/agents-config/skills/appstore-connect/agents/openai.yaml +7 -0
  29. package/agents-config/skills/appstore-connect/assets/codex-icon.svg +17 -0
  30. package/agents-config/skills/commit/agents/openai.yaml +10 -0
  31. package/agents-config/skills/commit/assets/codex-icon.svg +17 -0
  32. package/agents-config/skills/create-pr/agents/openai.yaml +10 -0
  33. package/agents-config/skills/create-pr/assets/codex-icon.svg +17 -0
  34. package/agents-config/skills/environments-manager/SKILL.md +1 -1
  35. package/agents-config/skills/environments-manager/agents/openai.yaml +7 -0
  36. package/agents-config/skills/environments-manager/assets/codex-icon.svg +16 -0
  37. package/agents-config/skills/environments-manager/examples/scripts/claude-worktree-remove.sh +19 -3
  38. package/agents-config/skills/environments-manager/examples/scripts/worktree-up.sh +1 -1
  39. package/agents-config/skills/environments-manager/references/claude.md +1 -1
  40. package/agents-config/skills/fix-pr-comments/agents/openai.yaml +10 -0
  41. package/agents-config/skills/fix-pr-comments/assets/codex-icon.svg +17 -0
  42. package/agents-config/skills/grill-me/SKILL.md +25 -4
  43. package/agents-config/skills/grill-me/agents/openai.yaml +8 -0
  44. package/agents-config/skills/grill-me/assets/codex-icon.svg +16 -0
  45. package/agents-config/skills/hooks-manager/SKILL.md +19 -9
  46. package/agents-config/skills/hooks-manager/assets/codex-icon.svg +15 -4
  47. package/agents-config/skills/hooks-manager/references/claude-code.md +32 -0
  48. package/agents-config/skills/hooks-manager/references/codex.md +23 -0
  49. package/agents-config/skills/hooks-manager/references/cursor.md +18 -0
  50. package/agents-config/skills/hooks-manager/references/hook-types.md +5 -3
  51. package/agents-config/skills/hooks-manager/references/input-output-schemas.md +2 -2
  52. package/agents-config/skills/hooks-manager/references/research-sources.md +25 -0
  53. package/agents-config/skills/hooks-manager/references/router.md +32 -0
  54. package/agents-config/skills/hooks-manager/references/troubleshooting.md +3 -3
  55. package/agents-config/skills/merge/agents/openai.yaml +10 -0
  56. package/agents-config/skills/merge/assets/codex-icon.svg +17 -0
  57. package/agents-config/skills/oneshot/SKILL.md +4 -0
  58. package/agents-config/skills/oneshot/agents/openai.yaml +10 -0
  59. package/agents-config/skills/oneshot/assets/codex-icon.svg +18 -0
  60. package/agents-config/skills/prompt-creator/agents/openai.yaml +7 -0
  61. package/agents-config/skills/prompt-creator/assets/codex-icon.svg +16 -0
  62. package/agents-config/skills/rules-manager/agents/openai.yaml +7 -0
  63. package/agents-config/skills/rules-manager/assets/codex-icon.svg +23 -0
  64. package/agents-config/skills/skill-manager/SKILL.md +45 -3
  65. package/agents-config/skills/skill-manager/agents/openai.yaml +7 -0
  66. package/agents-config/skills/skill-manager/assets/codex-icon.svg +23 -0
  67. package/agents-config/skills/skill-manager/references/skill-writing-glossary.md +201 -0
  68. package/agents-config/skills/skill-manager/scripts/setup-codex-icons.ts +143 -0
  69. package/agents-config/skills/ultrathink/agents/openai.yaml +10 -0
  70. package/agents-config/skills/ultrathink/assets/codex-icon.svg +20 -0
  71. package/agents-config/skills/use-artifacts/SKILL.md +102 -51
  72. package/agents-config/skills/use-artifacts/assets/local-runtime.js +299 -0
  73. package/agents-config/skills/use-artifacts/scripts/create_artifact.py +1 -1
  74. package/agents-config/skills/use-delegate/SKILL.md +4 -0
  75. package/agents-config/skills/use-delegate/agents/openai.yaml +10 -0
  76. package/agents-config/skills/use-delegate/assets/codex-icon.svg +20 -0
  77. package/agents-config/skills/use-goal/SKILL.md +70 -9
  78. package/agents-config/skills/use-goal/agents/openai.yaml +1 -1
  79. package/agents-config/skills/use-goal/assets/codex-icon.svg +17 -3
  80. package/agents-config/skills/use-goal/references/claude-code-goal.md +54 -6
  81. package/agents-config/skills/use-goal/references/codex-goal.md +59 -4
  82. package/agents-config/skills/use-goal/references/verification-harnesses.md +104 -3
  83. package/package.json +1 -1
  84. package/agents-config/skills/apex/templates/00-context.md +0 -55
  85. package/agents-config/skills/apex/templates/01-analyze.md +0 -10
  86. package/agents-config/skills/apex/templates/02-plan.md +0 -10
  87. package/agents-config/skills/apex/templates/03-execute.md +0 -10
  88. package/agents-config/skills/apex/templates/04-validate.md +0 -10
  89. package/agents-config/skills/apex/templates/05-examine.md +0 -10
  90. package/agents-config/skills/apex/templates/06-resolve.md +0 -10
  91. package/agents-config/skills/apex/templates/07-tests.md +0 -10
  92. package/agents-config/skills/apex/templates/08-run-tests.md +0 -10
  93. package/agents-config/skills/apex/templates/09-finish.md +0 -10
  94. package/agents-config/skills/apex/templates/10-verify.md +0 -9
  95. package/agents-config/skills/apex/templates/README.md +0 -195
  96. package/agents-config/skills/apex/templates/step-complete.md +0 -7
@@ -1,239 +1,37 @@
1
1
  ---
2
2
  name: step-06-resolve
3
- description: Resolve findings - interactively address review issues
4
- prev_step: steps/step-05-examine.md
5
- next_step: COMPLETE
3
+ description: Resolve confirmed APEX findings, preserve finding provenance, and re-run invalidated validation and proof.
4
+ next_step: step-04-validate.md
6
5
  ---
7
6
 
8
- # Step 6: Resolve Findings
7
+ # Step 6: Resolve findings
9
8
 
10
- ## MANDATORY EXECUTION RULES (READ FIRST):
9
+ Resolve confirmed findings in severity and dependency order.
11
10
 
12
- - 🛑 NEVER auto-fix Noise or Uncertain findings
13
- - 🛑 NEVER skip validation after fixes
14
- - ✅ ALWAYS present resolution options to user (unless auto_mode)
15
- - ✅ ALWAYS validate after applying fixes
16
- - ✅ ALWAYS provide clear completion summary
17
- - 📋 YOU ARE A RESOLVER, addressing identified issues
18
- - 💬 FOCUS on "How do we fix these issues?"
19
- - 🚫 FORBIDDEN to proceed with failing validation
11
+ ## 1. Select disposition
20
12
 
21
- ## EXECUTION PROTOCOLS:
13
+ - Fix confirmed in-scope findings.
14
+ - Leave noise unchanged and record why.
15
+ - Do not silently absorb pre-existing or out-of-scope issues.
16
+ - Investigate high-impact uncertain findings until they become confirmed, rejected, or concretely blocked.
17
+ - Ask before accepting an unresolved critical/high risk when that choice belongs to the user.
22
18
 
23
- - 🎯 Present resolution options first
24
- - 💾 Log each fix applied (if save_mode)
25
- - 📖 Validate after all fixes
26
- - 🚫 FORBIDDEN to skip post-fix validation
19
+ ## 2. Update the graph
27
20
 
28
- ## CONTEXT BOUNDARIES:
21
+ Create or revise task nodes for fixes. Record which acceptance criteria, validation entries, reviewer dispositions, and proof artifacts become stale.
29
22
 
30
- - Findings from step-05 are classified
31
- - Some are Real, some Noise, some Uncertain
32
- - User may want different resolution strategies
33
- - Must validate after any changes
34
- - **If `{teams_mode}` = true:** Agent team is still alive. Do NOT shutdown teammates - that happens in step-09-finish only.
23
+ ## 3. Apply fixes
35
24
 
36
- ## YOUR TASK:
25
+ Use the standard execution protocol: bounded edit, immediate diff inspection, shortest feedback loop, and scope check. A reviewer does not become the sole judge of its own remediation.
37
26
 
38
- Address adversarial review findings interactively - fix real issues, dismiss noise, discuss uncertain items.
27
+ ## 4. Re-validate
39
28
 
40
- ---
41
-
42
- <available_state>
43
- From previous steps:
44
-
45
- | Variable | Description |
46
- |----------|-------------|
47
- | `{task_description}` | What was implemented |
48
- | `{task_id}` | Kebab-case identifier |
49
- | `{auto_mode}` | Auto-fix Real findings |
50
- | `{save_mode}` | Save outputs to files |
51
- | `{output_dir}` | Path to output (if save_mode) |
52
- | Findings table | IDs, severity, validity |
53
- | Finding todos | For tracking |
54
- </available_state>
55
-
56
- ---
57
-
58
- ## EXECUTION SEQUENCE:
59
-
60
- ### 1. Initialize Save Output (if save_mode)
61
-
62
- **If `{save_mode}` = true:**
63
-
64
- ```bash
65
- bash {skill_dir}/scripts/update-progress.sh "{task_id}" "06" "resolve" "in_progress"
66
- ```
67
-
68
- Append logs to `{output_dir}/06-resolve.md` as you work.
69
-
70
- ### 2. Present Resolution Options
71
-
72
- **If `{auto_mode}` = true:**
73
- → Auto-fix all "Real" findings, skip Noise/Uncertain
74
-
75
- **If `{auto_mode}` = false:**
29
+ Return to `step-04-validate.md` for every affected command and then re-run the relevant independent review lens. If runtime proof artifacts were invalidated, recapture them through `step-10-verify.md`.
76
30
 
77
- ```yaml
78
- questions:
79
- - header: "Resolution"
80
- question: "How would you like to handle these findings?"
81
- options:
82
- - label: "Auto-fix Real issues (Recommended)"
83
- description: "Fix 'Real' findings, skip noise/uncertain"
84
- - label: "Walk through each finding"
85
- description: "Decide on each finding individually"
86
- - label: "Fix only critical"
87
- description: "Only fix CRITICAL/BLOCKING issues"
88
- - label: "Skip all"
89
- description: "Acknowledge but don't change"
90
- multiSelect: false
91
- ```
92
-
93
- ### 3. Apply Fixes Based on Choice
94
-
95
- **Auto-fix Real:**
96
- 1. Filter to Real findings only
97
- 2. For each: Read file → Apply fix → Verify
98
- 3. Log each fix
99
-
100
- **Walk through each:**
101
- For each finding in severity order:
102
-
103
- ```yaml
104
- questions:
105
- - header: "F1"
106
- question: "How should we handle this finding?"
107
- options:
108
- - label: "Fix now (Recommended)"
109
- description: "Apply the suggested fix"
110
- - label: "Skip"
111
- description: "Acknowledge but don't fix"
112
- - label: "Discuss"
113
- description: "Need more context"
114
- - label: "Mark as noise"
115
- description: "Not a real issue"
116
- multiSelect: false
117
- ```
118
-
119
- **Fix only critical:**
120
- 1. Filter to CRITICAL/BLOCKING only
121
- 2. Auto-fix those, skip others
122
-
123
- **Skip all:**
124
- 1. Acknowledge findings
125
- 2. If Critical/High exist, confirm:
126
-
127
- ```yaml
128
- questions:
129
- - header: "Confirm"
130
- question: "You have unresolved Critical/High findings. Proceed anyway?"
131
- options:
132
- - label: "Go back and fix"
133
- description: "Return to resolution options"
134
- - label: "Proceed anyway"
135
- description: "Accept risks, continue"
136
- - label: "Fix only critical"
137
- description: "Just fix critical issues"
138
- multiSelect: false
139
- ```
140
-
141
- ### 4. Post-Resolution Validation
142
-
143
- After any fixes:
31
+ Record fixed, rejected, deferred, and blocked finding IDs with evidence.
144
32
 
145
33
  ```bash
146
- pnpm run typecheck && pnpm run lint
147
- ```
148
-
149
- Both MUST pass.
150
-
151
- ### 5. Resolution Summary
152
-
153
- ```
154
- **Resolution Complete**
155
-
156
- **Fixed:** {count}
157
- - F1: Parameterized SQL query in auth.ts:42
158
- - F2: Added null check in handler.ts:78
159
-
160
- **Skipped:** {count}
161
- - F3: Complex function (uncertain)
162
-
163
- **Validation:** ✓ Passed
164
- ```
165
-
166
- ### 6. Complete Save Output (if save_mode)
167
-
168
- **If `{save_mode}` = true:**
169
-
170
- Append to `{output_dir}/06-resolve.md`:
171
- ```markdown
172
- ---
173
- ## Step Complete
174
- **Status:** ✓ Complete
175
- **Findings fixed:** {count}
176
- **Findings skipped:** {count}
177
- **Validation:** ✓ Passed
178
- **Timestamp:** {ISO timestamp}
179
- ```
180
-
181
- ### 7. Completion Summary
182
-
183
- ```
184
- **APEX Workflow Complete**
185
-
186
- **Task:** {task_description}
187
-
188
- **Implementation:**
189
- - Files modified: {count}
190
- - All checks passing: ✓
191
-
192
- **Review:**
193
- - Findings identified: {total}
194
- - Findings resolved: {fixed}
195
- - Findings skipped: {skipped}
196
-
197
- **Next Steps:**
198
- - [ ] Commit changes
199
- - [ ] Run full test suite
200
- - [ ] Deploy when ready
34
+ python3 "{skill_dir}/scripts/apex-state.py" event --root "$PWD" --run-id "{run_id}" --phase resolve --status complete --message "Confirmed findings resolved or explicitly dispositioned"
201
35
  ```
202
36
 
203
- ---
204
-
205
- ## SUCCESS METRICS:
206
-
207
- ✅ User chose resolution approach
208
- ✅ All chosen fixes applied correctly
209
- ✅ Validation passes after fixes
210
- ✅ Clear summary of resolved/skipped
211
- ✅ User understands next steps
212
-
213
- ## FAILURE MODES:
214
-
215
- ❌ Auto-fixing Noise or Uncertain findings
216
- ❌ Not validating after fixes
217
- ❌ No clear completion summary
218
- ❌ Proceeding with failing validation
219
- ❌ **CRITICAL**: Not using AskUserQuestion for decisions
220
-
221
- ## RESOLUTION PROTOCOLS:
222
-
223
- - Only auto-fix Real findings
224
- - Validate after EVERY fix round
225
- - Clear summary at the end
226
- - User controls final decision
227
-
228
- ---
229
-
230
- ## NEXT STEP:
231
-
232
- Based on flags:
233
- - **If verify_mode:** Load `./step-10-verify.md` to verify feature
234
- - **If pr_mode:** Load `./step-09-finish.md` to create pull request
235
- - **Otherwise:** Workflow complete - show summary
236
-
237
- <critical>
238
- Remember: Always validate after fixes - never proceed with failing checks!
239
- </critical>
37
+ Completion requires no unresolved confirmed blocker and current validation after the latest fix.
@@ -1,250 +1,35 @@
1
1
  ---
2
2
  name: step-07-tests
3
- description: Smart test analysis and creation - analyze patterns, create appropriate tests
4
- prev_step: steps/step-04-validate.md
5
- next_step: steps/step-08-run-tests.md
3
+ description: Add focused tests where the APEX risk and acceptance map identifies a material coverage gap.
4
+ next_step: step-08-run-tests.md
6
5
  ---
7
6
 
8
- # Step 7: Tests (Analysis & Creation)
7
+ # Step 7: Test authoring
9
8
 
10
- ## MANDATORY EXECUTION RULES (READ FIRST):
9
+ Tests are selected by risk and observable contracts, not by a requirement to create a file for every change.
11
10
 
12
- - 🛑 NEVER create tests without analyzing existing patterns first
13
- - 🛑 NEVER use wrong test type (unit when integration needed)
14
- - ✅ ALWAYS analyze test infrastructure BEFORE writing
15
- - ✅ ALWAYS follow existing test conventions exactly
16
- - ✅ ALWAYS map tests to acceptance criteria
17
- - 📋 YOU ARE A TEST ENGINEER, not a code generator
18
- - 💬 FOCUS on "What tests does this ACTUALLY need?"
19
- - 🚫 FORBIDDEN to ignore project test conventions
11
+ ## 1. Inspect test infrastructure
20
12
 
21
- ## EXECUTION PROTOCOLS:
13
+ Find the existing runner, conventions, fixtures, isolation rules, service dependencies, and nearby examples. Reuse project patterns.
22
14
 
23
- - 🎯 Analyze test infrastructure first
24
- - 💾 Document test strategy (if save_mode)
25
- - 📖 Read similar tests before writing
26
- - 🚫 FORBIDDEN to write tests without reading examples
15
+ ## 2. Map coverage gaps
27
16
 
28
- ## CONTEXT BOUNDARIES:
17
+ Prioritize behavior the implementation could plausibly get wrong:
29
18
 
30
- - Implementation is complete and validated
31
- - Test infrastructure exists (discovered in this step)
32
- - Existing tests show conventions to follow
33
- - Focus on creating RIGHT tests, not just tests
19
+ - acceptance-criterion happy path;
20
+ - boundary and failure behavior;
21
+ - regression that motivated the task;
22
+ - auth, tenancy, idempotency, concurrency, and persistence where relevant;
23
+ - compatibility with unchanged behavior.
34
24
 
35
- ## YOUR TASK:
25
+ Avoid snapshot or mock-heavy tests that merely restate implementation details.
36
26
 
37
- Analyze existing test patterns and create appropriate tests for the implementation.
27
+ ## 3. Write the smallest durable suite
38
28
 
39
- ---
40
-
41
- <available_state>
42
- From previous steps:
43
-
44
- | Variable | Description |
45
- |----------|-------------|
46
- | `{task_description}` | What was implemented |
47
- | `{task_id}` | Kebab-case identifier |
48
- | `{auto_mode}` | Skip confirmations |
49
- | `{save_mode}` | Save outputs to files |
50
- | `{economy_mode}` | Lighter test analysis |
51
- | `{output_dir}` | Path to output (if save_mode) |
52
- | Files modified | From implementation |
53
- | Acceptance criteria | From step-01 |
54
- </available_state>
55
-
56
- ---
57
-
58
- ## EXECUTION SEQUENCE:
59
-
60
- ### 1. Initialize Save Output (if save_mode)
61
-
62
- **If `{save_mode}` = true:**
63
-
64
- ```bash
65
- bash {skill_dir}/scripts/update-progress.sh "{task_id}" "07" "tests" "in_progress"
66
- ```
67
-
68
- Append analysis to `{output_dir}/07-tests.md` as you work.
69
-
70
- ### 2. Analyze Test Infrastructure
71
-
72
- **2.1 Discover Framework**
73
- ```bash
74
- cat package.json | grep -E "(jest|vitest|mocha|playwright|testing-library)"
75
- ```
76
-
77
- **2.2 Find Config**
78
- ```bash
79
- ls -la | grep -E "(jest|vitest|playwright)"
80
- ```
81
-
82
- **2.3 Find Test Commands**
83
- ```bash
84
- cat package.json | grep -A 5 '"scripts"' | grep -E "(test|spec)"
85
- ```
86
-
87
- ### 3. Analyze Existing Test Patterns
88
-
89
- **If `{economy_mode}` = true:**
90
- → Read 1 similar test file for patterns
91
-
92
- **If `{economy_mode}` = false:**
93
- → Read 2-3 similar test files
94
-
95
- **Pattern Checklist:**
96
- - [ ] describe/it vs test() syntax
97
- - [ ] Setup/teardown patterns
98
- - [ ] Mocking approach
99
- - [ ] Assertion style
100
- - [ ] Test data approach
101
-
102
- ### 4. Determine Test Strategy
103
-
104
- | Implementation Type | Test Type |
105
- |--------------------|-----------|
106
- | API Route | Integration with supertest/fetch |
107
- | Service/Logic | Integration with real deps |
108
- | Utility Function | Unit with mocks |
109
- | React Component | Component with testing-library |
110
- | Full Feature | Integration + E2E |
111
-
112
- ### 5. Create Test Plan
113
-
114
- ```markdown
115
- ## Test Plan
116
-
117
- **Framework:** {jest/vitest}
118
- **Command:** `pnpm test`
119
-
120
- ### Tests to Create
121
-
122
- **Integration:** `src/auth/register.test.ts`
123
- - creates user with valid data (happy path)
124
- - rejects invalid email (error case)
125
- - handles auth failure (error case)
126
-
127
- **Unit:** `src/utils/validation.test.ts`
128
- - validates correct email
129
- - rejects malformed email
130
- ```
131
-
132
- **If `{auto_mode}` = false:**
133
-
134
- ```yaml
135
- questions:
136
- - header: "Tests"
137
- question: "Review the test plan. Ready to create tests?"
138
- options:
139
- - label: "Create tests (Recommended)"
140
- description: "Proceed with planned tests"
141
- - label: "Add more tests"
142
- description: "I want additional test cases"
143
- - label: "Modify approach"
144
- description: "Change the strategy"
145
- - label: "Skip tests"
146
- description: "Don't create tests"
147
- multiSelect: false
148
- ```
149
-
150
- ### 6. Create Tests
151
-
152
- **CRITICAL: Follow existing patterns EXACTLY**
153
-
154
- 1. Read similar test for reference
155
- 2. Create test file matching structure
156
- 3. Write tests following conventions
157
-
158
- ```typescript
159
- import { describe, it, expect, beforeEach } from 'vitest'
160
-
161
- describe('POST /api/auth/register', () => {
162
- beforeEach(async () => {
163
- await db.user.deleteMany()
164
- })
165
-
166
- it('creates user with valid data', async () => {
167
- const response = await client.post('/api/auth/register', {
168
- email: 'test@example.com',
169
- password: 'SecurePass123!'
170
- })
171
-
172
- expect(response.status).toBe(201)
173
- })
174
-
175
- it('rejects invalid email', async () => {
176
- const response = await client.post('/api/auth/register', {
177
- email: 'invalid',
178
- password: 'SecurePass123!'
179
- })
180
-
181
- expect(response.status).toBe(400)
182
- })
183
- })
184
- ```
185
-
186
- ### 7. Verify Tests
187
-
188
- ```bash
189
- pnpm run typecheck
190
- ```
191
-
192
- List created tests:
193
- ```
194
- **Tests Created:**
195
- - `src/auth/register.test.ts` (3 tests)
196
- - `src/utils/validation.test.ts` (2 tests)
197
- ```
198
-
199
- ### 8. Complete Save Output (if save_mode)
200
-
201
- **If `{save_mode}` = true:**
202
-
203
- Append to `{output_dir}/07-tests.md`:
204
- ```markdown
205
- ---
206
- ## Step Complete
207
- **Status:** ✓ Complete
208
- **Tests created:** {count}
209
- **Test files:** {list}
210
- **Next:** step-08-run-tests.md
211
- **Timestamp:** {ISO timestamp}
212
- ```
213
-
214
- ---
215
-
216
- ## SUCCESS METRICS:
217
-
218
- ✅ Test infrastructure analyzed
219
- ✅ Existing patterns studied
220
- ✅ Appropriate test types chosen
221
- ✅ Tests follow codebase conventions
222
- ✅ Tests pass syntax check
223
- ✅ All AC have corresponding tests
224
-
225
- ## FAILURE MODES:
226
-
227
- ❌ Writing tests without analyzing patterns
228
- ❌ Wrong test type for implementation
229
- ❌ Ignoring project conventions
230
- ❌ Tests don't match acceptance criteria
231
- ❌ Over-testing (testing implementation, not behavior)
232
- ❌ **CRITICAL**: Not using AskUserQuestion for approval
233
-
234
- ## TEST PROTOCOLS:
235
-
236
- - Analyze BEFORE writing
237
- - Follow existing patterns EXACTLY
238
- - Test behavior, not implementation
239
- - Map to acceptance criteria
240
- - Create minimal, focused tests
241
-
242
- ---
29
+ Keep fixtures controlled and cleanup explicit. Do not make production calls or mutate shared external state unless that exact action is authorized and the test surface is designed for it.
243
30
 
244
- ## NEXT STEP:
31
+ ## 4. Inspect and record
245
32
 
246
- After tests created, load `./step-08-run-tests.md`
33
+ Review the test diff and map each test to an acceptance criterion or risk. Record why any material path remains untested.
247
34
 
248
- <critical>
249
- Remember: Create the RIGHT tests - analyze patterns first, then write!
250
- </critical>
35
+ Proceed to `step-08-run-tests.md`.