@sniper.ai/core 2.0.0 → 3.0.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.
Files changed (208) hide show
  1. package/README.md +88 -98
  2. package/agents/analyst.md +30 -0
  3. package/agents/architect.md +36 -0
  4. package/agents/backend-dev.md +43 -0
  5. package/agents/code-reviewer.md +72 -0
  6. package/agents/frontend-dev.md +43 -0
  7. package/agents/fullstack-dev.md +44 -0
  8. package/agents/gate-reviewer.md +62 -0
  9. package/agents/lead-orchestrator.md +51 -0
  10. package/agents/product-manager.md +38 -0
  11. package/agents/qa-engineer.md +37 -0
  12. package/agents/retro-analyst.md +98 -0
  13. package/checklists/discover.yaml +23 -0
  14. package/checklists/implement.yaml +28 -0
  15. package/checklists/ingest-document.yaml +18 -0
  16. package/checklists/ingest-extract.yaml +13 -0
  17. package/checklists/ingest-scan.yaml +18 -0
  18. package/checklists/multi-faceted-review.yaml +56 -0
  19. package/checklists/plan.yaml +36 -0
  20. package/checklists/refactor-analyze.yaml +18 -0
  21. package/checklists/review.yaml +28 -0
  22. package/claude-md.template +42 -0
  23. package/config.template.yaml +156 -0
  24. package/hooks/settings-hooks.json +31 -0
  25. package/hooks/signal-hooks.json +11 -0
  26. package/package.json +23 -5
  27. package/personas/cognitive/devils-advocate.md +24 -0
  28. package/personas/cognitive/performance-focused.md +23 -0
  29. package/personas/cognitive/security-first.md +24 -0
  30. package/protocols/explore.yaml +18 -0
  31. package/protocols/feature.yaml +45 -0
  32. package/protocols/full.yaml +63 -0
  33. package/protocols/hotfix.yaml +19 -0
  34. package/protocols/ingest.yaml +39 -0
  35. package/protocols/patch.yaml +30 -0
  36. package/protocols/refactor.yaml +41 -0
  37. package/schemas/checkpoint.schema.yaml +133 -0
  38. package/schemas/cost.schema.yaml +97 -0
  39. package/schemas/dependency-graph.schema.yaml +37 -0
  40. package/schemas/gate-result.schema.yaml +101 -0
  41. package/schemas/knowledge-manifest.schema.yaml +39 -0
  42. package/schemas/live-status.schema.yaml +122 -0
  43. package/schemas/protocol.schema.yaml +100 -0
  44. package/schemas/retro.schema.yaml +95 -0
  45. package/schemas/revert-plan.schema.yaml +40 -0
  46. package/schemas/signal.schema.yaml +39 -0
  47. package/schemas/velocity.schema.yaml +52 -0
  48. package/schemas/workspace-lock.schema.yaml +34 -0
  49. package/schemas/workspace.schema.yaml +82 -0
  50. package/skills/sniper-flow/SKILL.md +243 -0
  51. package/skills/sniper-flow-headless/SKILL.md +105 -0
  52. package/skills/sniper-init/SKILL.md +103 -0
  53. package/skills/sniper-review/SKILL.md +49 -0
  54. package/skills/sniper-status/SKILL.md +79 -0
  55. package/templates/architecture.md +23 -0
  56. package/templates/checkpoint.yaml +27 -0
  57. package/templates/codebase-overview.md +19 -0
  58. package/templates/cost.yaml +23 -0
  59. package/templates/custom-protocol.yaml +98 -0
  60. package/templates/knowledge-manifest.yaml +32 -0
  61. package/templates/live-status.yaml +26 -0
  62. package/templates/multi-faceted-review-report.md +28 -0
  63. package/templates/review-report.md +25 -0
  64. package/templates/signal-record.yaml +37 -0
  65. package/templates/spec.md +28 -0
  66. package/templates/story.md +19 -0
  67. package/templates/velocity.yaml +9 -0
  68. package/templates/workspace-config.yaml +44 -0
  69. package/framework/checklists/code-review.md +0 -33
  70. package/framework/checklists/debug-review.md +0 -34
  71. package/framework/checklists/discover-review.md +0 -33
  72. package/framework/checklists/doc-review.md +0 -39
  73. package/framework/checklists/feature-review.md +0 -42
  74. package/framework/checklists/ingest-review.md +0 -42
  75. package/framework/checklists/memory-review.md +0 -30
  76. package/framework/checklists/perf-review.md +0 -33
  77. package/framework/checklists/plan-review.md +0 -52
  78. package/framework/checklists/refactor-review.md +0 -33
  79. package/framework/checklists/security-review.md +0 -34
  80. package/framework/checklists/sprint-review.md +0 -41
  81. package/framework/checklists/story-review.md +0 -30
  82. package/framework/checklists/test-review.md +0 -32
  83. package/framework/checklists/workspace-review.md +0 -34
  84. package/framework/claude-md.template +0 -37
  85. package/framework/commands/sniper-audit.md +0 -1549
  86. package/framework/commands/sniper-compose.md +0 -323
  87. package/framework/commands/sniper-debug.md +0 -337
  88. package/framework/commands/sniper-discover.md +0 -423
  89. package/framework/commands/sniper-doc.md +0 -441
  90. package/framework/commands/sniper-feature.md +0 -515
  91. package/framework/commands/sniper-ingest.md +0 -506
  92. package/framework/commands/sniper-init.md +0 -388
  93. package/framework/commands/sniper-memory.md +0 -219
  94. package/framework/commands/sniper-plan.md +0 -630
  95. package/framework/commands/sniper-review.md +0 -369
  96. package/framework/commands/sniper-solve.md +0 -408
  97. package/framework/commands/sniper-sprint.md +0 -716
  98. package/framework/commands/sniper-status.md +0 -481
  99. package/framework/commands/sniper-workspace-feature.md +0 -267
  100. package/framework/commands/sniper-workspace-init.md +0 -252
  101. package/framework/commands/sniper-workspace-status.md +0 -112
  102. package/framework/commands/sniper-workspace-validate.md +0 -138
  103. package/framework/config.template.yaml +0 -196
  104. package/framework/personas/cognitive/devils-advocate.md +0 -30
  105. package/framework/personas/cognitive/mentor-explainer.md +0 -29
  106. package/framework/personas/cognitive/performance-focused.md +0 -30
  107. package/framework/personas/cognitive/security-first.md +0 -29
  108. package/framework/personas/cognitive/systems-thinker.md +0 -29
  109. package/framework/personas/cognitive/user-empathetic.md +0 -29
  110. package/framework/personas/domain/.gitkeep +0 -0
  111. package/framework/personas/process/analyst.md +0 -29
  112. package/framework/personas/process/architect.md +0 -30
  113. package/framework/personas/process/architecture-cartographer.md +0 -25
  114. package/framework/personas/process/code-archaeologist.md +0 -22
  115. package/framework/personas/process/code-investigator.md +0 -29
  116. package/framework/personas/process/code-reviewer.md +0 -26
  117. package/framework/personas/process/contract-designer.md +0 -31
  118. package/framework/personas/process/convention-miner.md +0 -27
  119. package/framework/personas/process/coverage-analyst.md +0 -24
  120. package/framework/personas/process/developer.md +0 -32
  121. package/framework/personas/process/doc-analyst.md +0 -63
  122. package/framework/personas/process/doc-reviewer.md +0 -62
  123. package/framework/personas/process/doc-writer.md +0 -42
  124. package/framework/personas/process/flake-hunter.md +0 -30
  125. package/framework/personas/process/impact-analyst.md +0 -23
  126. package/framework/personas/process/integration-validator.md +0 -29
  127. package/framework/personas/process/log-analyst.md +0 -22
  128. package/framework/personas/process/migration-architect.md +0 -24
  129. package/framework/personas/process/perf-profiler.md +0 -27
  130. package/framework/personas/process/product-manager.md +0 -32
  131. package/framework/personas/process/qa-engineer.md +0 -31
  132. package/framework/personas/process/release-manager.md +0 -23
  133. package/framework/personas/process/retro-analyst.md +0 -30
  134. package/framework/personas/process/scrum-master.md +0 -31
  135. package/framework/personas/process/threat-modeler.md +0 -30
  136. package/framework/personas/process/triage-lead.md +0 -23
  137. package/framework/personas/process/ux-designer.md +0 -31
  138. package/framework/personas/process/vuln-scanner.md +0 -27
  139. package/framework/personas/process/workspace-orchestrator.md +0 -30
  140. package/framework/personas/technical/ai-ml.md +0 -33
  141. package/framework/personas/technical/api-design.md +0 -32
  142. package/framework/personas/technical/backend.md +0 -32
  143. package/framework/personas/technical/database.md +0 -32
  144. package/framework/personas/technical/frontend.md +0 -33
  145. package/framework/personas/technical/infrastructure.md +0 -32
  146. package/framework/personas/technical/security.md +0 -34
  147. package/framework/settings.template.json +0 -6
  148. package/framework/spawn-prompts/_template.md +0 -25
  149. package/framework/teams/debug.yaml +0 -56
  150. package/framework/teams/discover.yaml +0 -57
  151. package/framework/teams/doc.yaml +0 -76
  152. package/framework/teams/feature-plan.yaml +0 -61
  153. package/framework/teams/ingest.yaml +0 -85
  154. package/framework/teams/perf.yaml +0 -33
  155. package/framework/teams/plan.yaml +0 -86
  156. package/framework/teams/refactor.yaml +0 -34
  157. package/framework/teams/retro.yaml +0 -30
  158. package/framework/teams/review-pr.yaml +0 -73
  159. package/framework/teams/review-release.yaml +0 -70
  160. package/framework/teams/security.yaml +0 -59
  161. package/framework/teams/solve.yaml +0 -48
  162. package/framework/teams/sprint.yaml +0 -68
  163. package/framework/teams/test.yaml +0 -59
  164. package/framework/teams/workspace-feature.yaml +0 -69
  165. package/framework/teams/workspace-validation.yaml +0 -27
  166. package/framework/templates/arch-delta.md +0 -74
  167. package/framework/templates/architecture.md +0 -95
  168. package/framework/templates/brief.md +0 -73
  169. package/framework/templates/bug-report.md +0 -55
  170. package/framework/templates/contract-validation-report.md +0 -68
  171. package/framework/templates/contract.yaml +0 -60
  172. package/framework/templates/conventions.md +0 -59
  173. package/framework/templates/coverage-report.md +0 -67
  174. package/framework/templates/doc-api.md +0 -53
  175. package/framework/templates/doc-guide.md +0 -35
  176. package/framework/templates/doc-readme.md +0 -49
  177. package/framework/templates/epic.md +0 -47
  178. package/framework/templates/feature-brief.md +0 -54
  179. package/framework/templates/feature-spec.md +0 -53
  180. package/framework/templates/flaky-report.md +0 -64
  181. package/framework/templates/investigation.md +0 -49
  182. package/framework/templates/memory-anti-pattern.yaml +0 -16
  183. package/framework/templates/memory-convention.yaml +0 -17
  184. package/framework/templates/memory-decision.yaml +0 -16
  185. package/framework/templates/migration-plan.md +0 -47
  186. package/framework/templates/optimization-plan.md +0 -59
  187. package/framework/templates/performance-profile.md +0 -64
  188. package/framework/templates/personas.md +0 -118
  189. package/framework/templates/postmortem.md +0 -69
  190. package/framework/templates/pr-review.md +0 -50
  191. package/framework/templates/prd.md +0 -92
  192. package/framework/templates/refactor-scope.md +0 -52
  193. package/framework/templates/release-readiness.md +0 -66
  194. package/framework/templates/retro.yaml +0 -44
  195. package/framework/templates/risks.md +0 -64
  196. package/framework/templates/security.md +0 -111
  197. package/framework/templates/sprint-review.md +0 -32
  198. package/framework/templates/story.md +0 -53
  199. package/framework/templates/threat-model.md +0 -71
  200. package/framework/templates/ux-spec.md +0 -71
  201. package/framework/templates/vulnerability-report.md +0 -56
  202. package/framework/templates/workspace-brief.md +0 -52
  203. package/framework/templates/workspace-plan.md +0 -50
  204. package/framework/workflows/discover-only.md +0 -39
  205. package/framework/workflows/full-lifecycle.md +0 -56
  206. package/framework/workflows/quick-feature.md +0 -44
  207. package/framework/workflows/sprint-cycle.md +0 -47
  208. package/framework/workflows/workspace-feature.md +0 -71
@@ -1,369 +0,0 @@
1
- # /sniper-review -- Run Review Gate for the Current Phase
2
-
3
- You are executing the `/sniper-review` command. Your job is to evaluate the current phase's artifacts against its review checklist and enforce the appropriate gate policy. Follow every step below precisely.
4
-
5
- ---
6
-
7
- ## Step 0: Pre-Flight -- Determine Current Phase
8
-
9
- 1. Read `.sniper/config.yaml`
10
- 2. Determine the current active phase: find the last entry in `state.phase_log` where `completed_at` is null.
11
- 3. If no active phase (all completed or empty log):
12
- ```
13
- ERROR: No active phase. The SNIPER lifecycle has not been started or all phases are complete.
14
-
15
- Current state:
16
- Phase: not started
17
- Sprint: 0
18
-
19
- To begin, run one of these phase commands:
20
- /sniper-ingest -- Ingest an existing codebase
21
- /sniper-discover -- Start Phase 1: Discovery & Analysis
22
- /sniper-plan -- Start Phase 2: Planning & Architecture
23
- /sniper-solve -- Start Phase 3: Epic Sharding & Story Creation
24
- /sniper-sprint -- Start Phase 4: Implementation Sprint
25
- ```
26
- Then STOP.
27
-
28
- 4. Store the current phase name. It must be one of: `ingest`, `discover`, `plan`, `solve`, `sprint`
29
-
30
- ---
31
-
32
- ## Step 1: Map Phase to Checklist and Gate Mode
33
-
34
- Use this mapping to determine which checklist to load and what gate mode to enforce:
35
-
36
- | Phase | Checklist File | Config Gate Key |
37
- |-----------|-------------------------------------------|-----------------------|
38
- | `ingest` | `.sniper/checklists/ingest-review.md` | `review_gates.after_ingest` |
39
- | `discover` | `.sniper/checklists/discover-review.md` | `review_gates.after_discover` |
40
- | `plan` | `.sniper/checklists/plan-review.md` | `review_gates.after_plan` |
41
- | `solve` | `.sniper/checklists/story-review.md` | `review_gates.after_solve` |
42
- | `sprint` | `.sniper/checklists/sprint-review.md` | `review_gates.after_sprint` |
43
-
44
- 1. Read the gate mode from `config.yaml` using the appropriate key
45
- 2. Read the checklist file
46
- 3. Check for domain pack checklists: scan `.sniper/packs/*/checklists/` for any `.md` files. If found, these will be evaluated as additional checklist items after the framework checklist (Step 3b).
47
-
48
- If the checklist file does not exist:
49
- ```
50
- ERROR: Checklist file not found: {path}
51
- The framework installation may be incomplete. Check .sniper/checklists/ for available checklists.
52
- ```
53
- Then STOP.
54
-
55
- ---
56
-
57
- ## Step 2: Identify Artifacts to Review
58
-
59
- Based on the current phase, identify which artifact files need to be reviewed:
60
-
61
- ### Phase: ingest
62
- | Artifact | Expected Path |
63
- |---------------------|-------------------------|
64
- | Project Brief | `docs/brief.md` |
65
- | System Architecture | `docs/architecture.md` |
66
- | Coding Conventions | `docs/conventions.md` |
67
-
68
- ### Phase: discover
69
- | Artifact | Expected Path |
70
- |---------------------|---------------------|
71
- | Project Brief | `docs/brief.md` |
72
- | Risk Assessment | `docs/risks.md` |
73
- | User Personas | `docs/personas.md` |
74
-
75
- ### Phase: plan
76
- | Artifact | Expected Path |
77
- |---------------------|-------------------------|
78
- | PRD | `docs/prd.md` |
79
- | Architecture | `docs/architecture.md` |
80
- | UX Specification | `docs/ux-spec.md` |
81
- | Security Requirements| `docs/security.md` |
82
-
83
- ### Phase: solve
84
- | Artifact | Expected Path |
85
- |---------------------|---------------------|
86
- | Epics | `docs/epics/*.md` |
87
- | Stories | `docs/stories/*.md` |
88
-
89
- ### Phase: sprint
90
- | Artifact | Expected Path |
91
- |---------------------|--------------------------------------|
92
- | Source Code | Files in ownership directories |
93
- | Tests | Files in test directories |
94
- | Sprint Stories | Stories assigned to current sprint |
95
-
96
- For each expected artifact:
97
- 1. Check if the file exists
98
- 2. If it does NOT exist, record an immediate FAIL for that artifact:
99
- ```
100
- FAIL: {artifact_name} not found at {path}
101
- ```
102
- 3. If it exists, read its content for evaluation in Step 3
103
-
104
- ---
105
-
106
- ## Step 3: Evaluate Each Checklist Item
107
-
108
- Parse the checklist file. Each line starting with `- [ ]` is a checklist item.
109
-
110
- Group the checklist items by their section headers (## headers in the checklist file).
111
-
112
- For each checklist item, evaluate it against the relevant artifact content:
113
-
114
- ### Evaluation Criteria
115
-
116
- For each item, assign one of three statuses:
117
-
118
- **PASS** -- The criterion is clearly met in the artifact:
119
- - The artifact contains substantive content addressing the criterion
120
- - The content is specific, not generic placeholder text
121
- - The content has enough depth to be actionable
122
-
123
- **WARN** -- The criterion is partially met or needs improvement:
124
- - The artifact addresses the topic but lacks specificity
125
- - The content exists but is thin or uses vague language
126
- - The artifact has the right structure but some sections are incomplete
127
-
128
- **FAIL** -- The criterion is not met:
129
- - The artifact does not address the criterion at all
130
- - The relevant section is empty or contains only template placeholders
131
- - The content contradicts the criterion
132
- - The artifact file does not exist
133
-
134
- ### Evaluation Process
135
-
136
- For each checklist section:
137
- 1. Read the relevant artifact
138
- 2. For each checklist item in that section:
139
- a. Search the artifact for content related to the criterion
140
- b. Assess whether the content meets the criterion (PASS/WARN/FAIL)
141
- c. Write a brief (one-line) justification for the assessment
142
- 3. Record the result
143
-
144
- Be thorough but fair:
145
- - Do NOT fail items just because they could be better -- that is a WARN
146
- - Do NOT pass items that only have placeholder text (template markers like `<!-- -->` or `TODO`)
147
- - For cross-document consistency checks, read ALL referenced documents and compare
148
-
149
- ---
150
-
151
- ## Step 3c: Memory Compliance Checks
152
-
153
- After evaluating the phase checklist, check project memory for compliance if memory files exist.
154
-
155
- ### 3c-1: Load Memory
156
-
157
- Check if `.sniper/memory/` directory exists. If not, skip this step entirely.
158
-
159
- Read:
160
- - `.sniper/memory/conventions.yaml` — filter for entries with `enforcement: review_gate` or `enforcement: both`
161
- - `.sniper/memory/anti-patterns.yaml` — all entries
162
- - `.sniper/memory/decisions.yaml` — active entries only
163
-
164
- If workspace memory exists (check config), also load workspace-level files.
165
-
166
- ### 3c-2: Convention Compliance
167
-
168
- For each convention with review gate enforcement:
169
- 1. Read the convention's `rule` and `detection_hint` (if present)
170
- 2. Examine the sprint output / artifacts being reviewed
171
- 3. Check whether the convention was followed
172
- 4. Report as PASS (compliant) or WARN (violation with details)
173
-
174
- ### 3c-3: Anti-Pattern Scanning
175
-
176
- For each anti-pattern:
177
- 1. Read the `detection_hint`
178
- 2. If a detection hint is present, search the changed files for matches
179
- 3. If matches found, report as WARN with file locations
180
- 4. If no detection hint, skip automated detection (will be caught in manual review)
181
-
182
- ### 3c-4: Decision Consistency
183
-
184
- For each active decision:
185
- 1. Check if the sprint output contradicts the decision
186
- 2. Example: if decision says "Use PostgreSQL" but new code imports MongoDB, flag it
187
- 3. Report any contradictions
188
-
189
- ### 3c-5: Report Memory Compliance
190
-
191
- Add a "Memory Compliance" section to the review output:
192
-
193
- ```
194
- ## Memory Compliance
195
-
196
- ### Convention Checks
197
- PASS conv-001: Zod validation — all new routes use validation middleware
198
- WARN conv-003: Barrel exports — 2 new directories missing index.ts
199
-
200
- ### Anti-Pattern Checks
201
- PASS ap-001: No direct DB queries in handlers — clean
202
- WARN ap-002: Silent error catch found in lib/webhook-delivery.ts:42
203
-
204
- ### Decision Consistency
205
- PASS All decisions consistent
206
-
207
- ### Summary
208
- {N} conventions checked, {M} violations
209
- {N} anti-patterns checked, {M} matches found
210
- {N} decisions checked, {M} contradictions
211
- ```
212
-
213
- If there are violations, these count as review findings but do NOT block the gate by themselves (memory compliance is advisory unless the gate mode is strict AND the convention enforcement is review_gate).
214
-
215
- ---
216
-
217
- ## Step 4: Present Results
218
-
219
- Print a formatted review report:
220
-
221
- ```
222
- ============================================
223
- SNIPER Review Gate: {phase} Phase
224
- ============================================
225
-
226
- Gate Mode: {strict|flexible|auto}
227
- Checklist: {checklist_file}
228
- Date: {today's date}
229
-
230
- --------------------------------------------
231
- {Section Name from Checklist}
232
- --------------------------------------------
233
- {PASS|WARN|FAIL} {checklist item text}
234
- -> {brief justification}
235
-
236
- {PASS|WARN|FAIL} {checklist item text}
237
- -> {brief justification}
238
-
239
- ... (repeat for all items in section)
240
-
241
- --------------------------------------------
242
- {Next Section Name}
243
- --------------------------------------------
244
- ... (repeat for all sections)
245
-
246
- ============================================
247
- Summary
248
- ============================================
249
-
250
- Total Items: {count}
251
- PASS: {count} ({percentage}%)
252
- WARN: {count} ({percentage}%)
253
- FAIL: {count} ({percentage}%)
254
-
255
- Overall: {ALL PASS | HAS WARNINGS | HAS FAILURES}
256
- ```
257
-
258
- ---
259
-
260
- ## Step 5: Apply Gate Policy
261
-
262
- Based on the gate mode and results, take the appropriate action:
263
-
264
- ### Gate Mode: `strict`
265
-
266
- **If ALL items are PASS (no WARN, no FAIL):**
267
- 1. Print: "All review criteria passed. This gate requires human approval to advance."
268
- 2. Ask the user: "Do you approve advancing from the {phase} phase to the next phase? (yes/no)"
269
- 3. If YES: proceed to Step 6 (update state)
270
- 4. If NO: print "Phase advancement blocked by reviewer. Address feedback and run `/sniper-review` again."
271
-
272
- **If ANY items are WARN (but no FAIL):**
273
- 1. Print: "Review found warnings. This gate requires human approval."
274
- 2. List all WARN items with their justifications
275
- 3. Ask: "There are {count} warnings. Do you want to approve advancement despite these warnings? (yes/no)"
276
- 4. If YES: proceed to Step 6
277
- 5. If NO: print "Phase advancement blocked. Address warnings and run `/sniper-review` again."
278
-
279
- **If ANY items are FAIL:**
280
- 1. Print: "Review found failures. This gate BLOCKS advancement."
281
- 2. List all FAIL items with their justifications
282
- 3. Print: "The following items MUST be addressed before this phase can be approved:"
283
- 4. List each FAIL item as an action item
284
- 5. Print: "Fix these issues and run `/sniper-review` again."
285
- 6. Do NOT advance. Do NOT ask for override. STOP here.
286
-
287
- ### Gate Mode: `flexible`
288
-
289
- **If ALL items are PASS:**
290
- 1. Print: "All review criteria passed. Auto-advancing to next phase."
291
- 2. Proceed to Step 6 (update state)
292
-
293
- **If ANY items are WARN (but no FAIL):**
294
- 1. Print: "Review found warnings. Auto-advancing (flexible gate)."
295
- 2. List WARN items briefly
296
- 3. Print: "These items are noted for async review. Proceeding to next phase."
297
- 4. Proceed to Step 6
298
-
299
- **If ANY items are FAIL:**
300
- 1. Print: "Review found failures in a flexible gate."
301
- 2. List all FAIL items
302
- 3. Ask: "There are {count} failures. This is a flexible gate -- do you want to advance anyway? (yes/no)"
303
- 4. If YES: proceed to Step 6 with a note that failures were accepted
304
- 5. If NO: print "Address failures and run `/sniper-review` again."
305
-
306
- ### Gate Mode: `auto`
307
-
308
- 1. Print: "Auto gate -- no review required. Advancing to next phase."
309
- 2. Print any FAIL or WARN items as informational notes
310
- 3. Proceed to Step 6
311
-
312
- ---
313
-
314
- ## Step 6: Update Lifecycle State
315
-
316
- When a phase is approved for advancement:
317
-
318
- 1. Read the current `.sniper/config.yaml`
319
- 2. Find the active phase_log entry (the one where `completed_at` is null) and update it:
320
- ```yaml
321
- completed_at: "{current ISO timestamp}"
322
- approved_by: "{human or auto-flexible or auto}"
323
- ```
324
-
325
- 3. Update artifact statuses based on what was reviewed:
326
- - If all items for an artifact passed -> set status to `approved`
327
- - If any items warn but no fails -> keep status as `draft`
328
- - If the artifact exists but has fails -> keep status as `draft`
329
- - Keep existing values for artifacts not reviewed in this phase
330
-
331
- 4. If the completed phase is `sprint`, increment `state.current_sprint` by 1.
332
-
333
- 5. Write the updated config back to `.sniper/config.yaml`
334
-
335
- 6. Suggest the next command based on what was just completed:
336
-
337
- | Completed Phase | Suggested Next Commands |
338
- |----------------|------------------------|
339
- | `ingest` | `/sniper-feature`, `/sniper-discover`, `/sniper-audit` |
340
- | `discover` | `/sniper-plan` |
341
- | `plan` | `/sniper-solve` |
342
- | `solve` | `/sniper-sprint` |
343
- | `sprint` | `/sniper-sprint` (next sprint), `/sniper-review` |
344
-
345
- 7. Print the completion confirmation:
346
- ```
347
- ============================================
348
- Phase Review Complete
349
- ============================================
350
-
351
- Completed: {phase} ({context})
352
- Artifacts updated in config.yaml
353
-
354
- Suggested next: {next_command}
355
- ```
356
-
357
- ---
358
-
359
- ## IMPORTANT RULES
360
-
361
- - NEVER skip evaluation -- read every artifact and assess every checklist item.
362
- - NEVER auto-approve a strict gate. Always require explicit human input.
363
- - NEVER modify artifact files -- this command is a review tool, not an editor.
364
- - Be honest in assessments. Do not inflate passes to speed things along.
365
- - If artifacts contain only template placeholders, that is a FAIL, not a WARN.
366
- - For cross-document consistency checks, you MUST read all referenced documents.
367
- - When updating config.yaml, preserve ALL existing content -- only modify the state section.
368
- - Always show the full formatted report before applying gate logic.
369
- - If the user's config.yaml is malformed or unreadable, report an error and STOP.