@sniper.ai/core 2.0.0 → 3.1.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 (210) hide show
  1. package/README.md +87 -98
  2. package/agents/analyst.md +29 -0
  3. package/agents/architect.md +38 -0
  4. package/agents/backend-dev.md +43 -0
  5. package/agents/code-reviewer.md +72 -0
  6. package/agents/doc-writer.md +60 -0
  7. package/agents/frontend-dev.md +43 -0
  8. package/agents/fullstack-dev.md +44 -0
  9. package/agents/gate-reviewer.md +72 -0
  10. package/agents/lead-orchestrator.md +51 -0
  11. package/agents/product-manager.md +40 -0
  12. package/agents/qa-engineer.md +37 -0
  13. package/agents/retro-analyst.md +104 -0
  14. package/checklists/discover.yaml +23 -0
  15. package/checklists/implement.yaml +28 -0
  16. package/checklists/ingest-document.yaml +18 -0
  17. package/checklists/ingest-extract.yaml +13 -0
  18. package/checklists/ingest-scan.yaml +18 -0
  19. package/checklists/multi-faceted-review.yaml +57 -0
  20. package/checklists/plan.yaml +36 -0
  21. package/checklists/refactor-analyze.yaml +19 -0
  22. package/checklists/review.yaml +29 -0
  23. package/claude-md.template +42 -0
  24. package/config.template.yaml +156 -0
  25. package/hooks/settings-hooks.json +40 -0
  26. package/hooks/signal-hooks.json +16 -0
  27. package/package.json +23 -5
  28. package/personas/cognitive/devils-advocate.md +24 -0
  29. package/personas/cognitive/performance-focused.md +23 -0
  30. package/personas/cognitive/security-first.md +24 -0
  31. package/protocols/explore.yaml +21 -0
  32. package/protocols/feature.yaml +47 -0
  33. package/protocols/full.yaml +65 -0
  34. package/protocols/hotfix.yaml +19 -0
  35. package/protocols/ingest.yaml +42 -0
  36. package/protocols/patch.yaml +30 -0
  37. package/protocols/refactor.yaml +43 -0
  38. package/schemas/checkpoint.schema.yaml +133 -0
  39. package/schemas/cost.schema.yaml +97 -0
  40. package/schemas/dependency-graph.schema.yaml +37 -0
  41. package/schemas/gate-result.schema.yaml +101 -0
  42. package/schemas/knowledge-manifest.schema.yaml +39 -0
  43. package/schemas/live-status.schema.yaml +122 -0
  44. package/schemas/protocol-meta.schema.yaml +58 -0
  45. package/schemas/protocol.schema.yaml +100 -0
  46. package/schemas/retro.schema.yaml +95 -0
  47. package/schemas/revert-plan.schema.yaml +40 -0
  48. package/schemas/signal.schema.yaml +39 -0
  49. package/schemas/velocity.schema.yaml +52 -0
  50. package/schemas/workspace-lock.schema.yaml +34 -0
  51. package/schemas/workspace.schema.yaml +82 -0
  52. package/skills/sniper-flow/SKILL.md +196 -0
  53. package/skills/sniper-init/SKILL.md +102 -0
  54. package/skills/sniper-review/SKILL.md +49 -0
  55. package/skills/sniper-status/SKILL.md +79 -0
  56. package/templates/architecture.md +23 -0
  57. package/templates/checkpoint.yaml +27 -0
  58. package/templates/codebase-overview.md +19 -0
  59. package/templates/cost.yaml +23 -0
  60. package/templates/custom-protocol.yaml +98 -0
  61. package/templates/knowledge-manifest.yaml +32 -0
  62. package/templates/live-status.yaml +26 -0
  63. package/templates/multi-faceted-review-report.md +28 -0
  64. package/templates/registry.md +4 -0
  65. package/templates/review-report.md +25 -0
  66. package/templates/signal-record.yaml +37 -0
  67. package/templates/spec.md +28 -0
  68. package/templates/story.md +19 -0
  69. package/templates/velocity.yaml +9 -0
  70. package/templates/workspace-config.yaml +44 -0
  71. package/framework/checklists/code-review.md +0 -33
  72. package/framework/checklists/debug-review.md +0 -34
  73. package/framework/checklists/discover-review.md +0 -33
  74. package/framework/checklists/doc-review.md +0 -39
  75. package/framework/checklists/feature-review.md +0 -42
  76. package/framework/checklists/ingest-review.md +0 -42
  77. package/framework/checklists/memory-review.md +0 -30
  78. package/framework/checklists/perf-review.md +0 -33
  79. package/framework/checklists/plan-review.md +0 -52
  80. package/framework/checklists/refactor-review.md +0 -33
  81. package/framework/checklists/security-review.md +0 -34
  82. package/framework/checklists/sprint-review.md +0 -41
  83. package/framework/checklists/story-review.md +0 -30
  84. package/framework/checklists/test-review.md +0 -32
  85. package/framework/checklists/workspace-review.md +0 -34
  86. package/framework/claude-md.template +0 -37
  87. package/framework/commands/sniper-audit.md +0 -1549
  88. package/framework/commands/sniper-compose.md +0 -323
  89. package/framework/commands/sniper-debug.md +0 -337
  90. package/framework/commands/sniper-discover.md +0 -423
  91. package/framework/commands/sniper-doc.md +0 -441
  92. package/framework/commands/sniper-feature.md +0 -515
  93. package/framework/commands/sniper-ingest.md +0 -506
  94. package/framework/commands/sniper-init.md +0 -388
  95. package/framework/commands/sniper-memory.md +0 -219
  96. package/framework/commands/sniper-plan.md +0 -630
  97. package/framework/commands/sniper-review.md +0 -369
  98. package/framework/commands/sniper-solve.md +0 -408
  99. package/framework/commands/sniper-sprint.md +0 -716
  100. package/framework/commands/sniper-status.md +0 -481
  101. package/framework/commands/sniper-workspace-feature.md +0 -267
  102. package/framework/commands/sniper-workspace-init.md +0 -252
  103. package/framework/commands/sniper-workspace-status.md +0 -112
  104. package/framework/commands/sniper-workspace-validate.md +0 -138
  105. package/framework/config.template.yaml +0 -196
  106. package/framework/personas/cognitive/devils-advocate.md +0 -30
  107. package/framework/personas/cognitive/mentor-explainer.md +0 -29
  108. package/framework/personas/cognitive/performance-focused.md +0 -30
  109. package/framework/personas/cognitive/security-first.md +0 -29
  110. package/framework/personas/cognitive/systems-thinker.md +0 -29
  111. package/framework/personas/cognitive/user-empathetic.md +0 -29
  112. package/framework/personas/domain/.gitkeep +0 -0
  113. package/framework/personas/process/analyst.md +0 -29
  114. package/framework/personas/process/architect.md +0 -30
  115. package/framework/personas/process/architecture-cartographer.md +0 -25
  116. package/framework/personas/process/code-archaeologist.md +0 -22
  117. package/framework/personas/process/code-investigator.md +0 -29
  118. package/framework/personas/process/code-reviewer.md +0 -26
  119. package/framework/personas/process/contract-designer.md +0 -31
  120. package/framework/personas/process/convention-miner.md +0 -27
  121. package/framework/personas/process/coverage-analyst.md +0 -24
  122. package/framework/personas/process/developer.md +0 -32
  123. package/framework/personas/process/doc-analyst.md +0 -63
  124. package/framework/personas/process/doc-reviewer.md +0 -62
  125. package/framework/personas/process/doc-writer.md +0 -42
  126. package/framework/personas/process/flake-hunter.md +0 -30
  127. package/framework/personas/process/impact-analyst.md +0 -23
  128. package/framework/personas/process/integration-validator.md +0 -29
  129. package/framework/personas/process/log-analyst.md +0 -22
  130. package/framework/personas/process/migration-architect.md +0 -24
  131. package/framework/personas/process/perf-profiler.md +0 -27
  132. package/framework/personas/process/product-manager.md +0 -32
  133. package/framework/personas/process/qa-engineer.md +0 -31
  134. package/framework/personas/process/release-manager.md +0 -23
  135. package/framework/personas/process/retro-analyst.md +0 -30
  136. package/framework/personas/process/scrum-master.md +0 -31
  137. package/framework/personas/process/threat-modeler.md +0 -30
  138. package/framework/personas/process/triage-lead.md +0 -23
  139. package/framework/personas/process/ux-designer.md +0 -31
  140. package/framework/personas/process/vuln-scanner.md +0 -27
  141. package/framework/personas/process/workspace-orchestrator.md +0 -30
  142. package/framework/personas/technical/ai-ml.md +0 -33
  143. package/framework/personas/technical/api-design.md +0 -32
  144. package/framework/personas/technical/backend.md +0 -32
  145. package/framework/personas/technical/database.md +0 -32
  146. package/framework/personas/technical/frontend.md +0 -33
  147. package/framework/personas/technical/infrastructure.md +0 -32
  148. package/framework/personas/technical/security.md +0 -34
  149. package/framework/settings.template.json +0 -6
  150. package/framework/spawn-prompts/_template.md +0 -25
  151. package/framework/teams/debug.yaml +0 -56
  152. package/framework/teams/discover.yaml +0 -57
  153. package/framework/teams/doc.yaml +0 -76
  154. package/framework/teams/feature-plan.yaml +0 -61
  155. package/framework/teams/ingest.yaml +0 -85
  156. package/framework/teams/perf.yaml +0 -33
  157. package/framework/teams/plan.yaml +0 -86
  158. package/framework/teams/refactor.yaml +0 -34
  159. package/framework/teams/retro.yaml +0 -30
  160. package/framework/teams/review-pr.yaml +0 -73
  161. package/framework/teams/review-release.yaml +0 -70
  162. package/framework/teams/security.yaml +0 -59
  163. package/framework/teams/solve.yaml +0 -48
  164. package/framework/teams/sprint.yaml +0 -68
  165. package/framework/teams/test.yaml +0 -59
  166. package/framework/teams/workspace-feature.yaml +0 -69
  167. package/framework/teams/workspace-validation.yaml +0 -27
  168. package/framework/templates/arch-delta.md +0 -74
  169. package/framework/templates/architecture.md +0 -95
  170. package/framework/templates/brief.md +0 -73
  171. package/framework/templates/bug-report.md +0 -55
  172. package/framework/templates/contract-validation-report.md +0 -68
  173. package/framework/templates/contract.yaml +0 -60
  174. package/framework/templates/conventions.md +0 -59
  175. package/framework/templates/coverage-report.md +0 -67
  176. package/framework/templates/doc-api.md +0 -53
  177. package/framework/templates/doc-guide.md +0 -35
  178. package/framework/templates/doc-readme.md +0 -49
  179. package/framework/templates/epic.md +0 -47
  180. package/framework/templates/feature-brief.md +0 -54
  181. package/framework/templates/feature-spec.md +0 -53
  182. package/framework/templates/flaky-report.md +0 -64
  183. package/framework/templates/investigation.md +0 -49
  184. package/framework/templates/memory-anti-pattern.yaml +0 -16
  185. package/framework/templates/memory-convention.yaml +0 -17
  186. package/framework/templates/memory-decision.yaml +0 -16
  187. package/framework/templates/migration-plan.md +0 -47
  188. package/framework/templates/optimization-plan.md +0 -59
  189. package/framework/templates/performance-profile.md +0 -64
  190. package/framework/templates/personas.md +0 -118
  191. package/framework/templates/postmortem.md +0 -69
  192. package/framework/templates/pr-review.md +0 -50
  193. package/framework/templates/prd.md +0 -92
  194. package/framework/templates/refactor-scope.md +0 -52
  195. package/framework/templates/release-readiness.md +0 -66
  196. package/framework/templates/retro.yaml +0 -44
  197. package/framework/templates/risks.md +0 -64
  198. package/framework/templates/security.md +0 -111
  199. package/framework/templates/sprint-review.md +0 -32
  200. package/framework/templates/story.md +0 -53
  201. package/framework/templates/threat-model.md +0 -71
  202. package/framework/templates/ux-spec.md +0 -71
  203. package/framework/templates/vulnerability-report.md +0 -56
  204. package/framework/templates/workspace-brief.md +0 -52
  205. package/framework/templates/workspace-plan.md +0 -50
  206. package/framework/workflows/discover-only.md +0 -39
  207. package/framework/workflows/full-lifecycle.md +0 -56
  208. package/framework/workflows/quick-feature.md +0 -44
  209. package/framework/workflows/sprint-cycle.md +0 -47
  210. package/framework/workflows/workspace-feature.md +0 -71
@@ -1,423 +0,0 @@
1
- # /sniper-discover -- Phase 1: Discovery & Analysis (Parallel Team)
2
-
3
- You are executing the `/sniper-discover` command. Your job is to spawn a parallel discovery team that researches the project's market landscape, risks, and user needs. You are the **team lead** -- you coordinate, you do NOT produce artifacts yourself. Follow every step below precisely.
4
-
5
- **Arguments:** $ARGUMENTS
6
-
7
- ---
8
-
9
- ## Step 0: Pre-Flight Checks
10
-
11
- Perform ALL of the following checks before proceeding. If any check fails, STOP and report the issue.
12
-
13
- ### 0a. Verify SNIPER Is Initialized
14
-
15
- 1. Read `.sniper/config.yaml`.
16
- 2. If the file does not exist or `project.name` is empty:
17
- - **STOP.** Print: "SNIPER is not initialized. Run `/sniper-init` first."
18
- - Do not proceed further.
19
-
20
- ### 0b. Config Migration Check
21
-
22
- 1. Read `schema_version` from `.sniper/config.yaml`.
23
- 2. If `schema_version` is absent or less than 2, run the v1→v2 migration as defined in the Config Reader Protocol (see `plans/features/phase-a-config-schema.md`). Write the updated config before proceeding.
24
-
25
- ### 0c. Verify Phase State
26
-
27
- 1. Determine the current active phase: find the last entry in `state.phase_log` where `completed_at` is null.
28
- 2. **If no active phase (all completed or empty log):** Good -- proceed. Re-running discover after other phases is normal iteration.
29
- 3. **If active phase is `discover`:** The discover phase is already in progress.
30
- - Ask the user: "A discover phase is already in progress ({context}). Options: (a) Resume it (b) Start a new discover with a different context"
31
- - If resume, STOP (they should continue in the existing session).
32
- 4. **If active phase is something else** (plan, solve, sprint, ingest):
33
- - Ask the user: "You have an active {phase} phase ({context}) that hasn't completed. Options: (a) Pause it and start discover (b) Complete {phase} first"
34
- - If (b), STOP.
35
-
36
- ### 0d. Amendment Detection
37
-
38
- 1. Check if the target artifact files already exist and are non-empty:
39
- - `docs/brief.md`
40
- - `docs/risks.md`
41
- - `docs/personas.md`
42
- 2. **If ANY exist:** Enter **amendment mode**. Note which files exist and their current version numbers (from the version header). Agents will be instructed to amend rather than create from scratch (see Step 4 amendment instructions below).
43
- 3. **If NONE exist:** Normal create mode. Proceed with standard behavior.
44
-
45
- ### 0e. Verify Framework Files
46
-
47
- Check that these files exist (they are needed by the team):
48
- - `.sniper/teams/discover.yaml`
49
- - `.sniper/spawn-prompts/_template.md`
50
- - `.sniper/checklists/discover-review.md`
51
- - `.sniper/personas/process/analyst.md`
52
- - `.sniper/personas/cognitive/systems-thinker.md`
53
- - `.sniper/personas/cognitive/devils-advocate.md`
54
- - `.sniper/personas/cognitive/user-empathetic.md`
55
-
56
- If any are missing, print a warning listing the missing files but continue if at least the team YAML exists.
57
-
58
- ---
59
-
60
- ## Step 1: Update Lifecycle State
61
-
62
- Edit `.sniper/config.yaml` to update the state section:
63
-
64
- 1. Append to `state.phase_log`:
65
- ```yaml
66
- - phase: discover
67
- context: "{from --context argument, or 'initial' for first run, or 'iteration-N' for re-runs}"
68
- started_at: "{current ISO timestamp}"
69
- completed_at: null
70
- approved_by: null
71
- ```
72
-
73
- ---
74
-
75
- ## Step 2: Read Team Definition
76
-
77
- 1. Read `.sniper/teams/discover.yaml` in full.
78
- 2. Parse out:
79
- - `team_name` (should be `sniper-discover`)
80
- - The list of `teammates` with their `name`, `compose` layers, and `tasks`
81
- - The `coordination` rules (should be empty for discover -- independent research)
82
- - The `review_gate` section (checklist path and mode)
83
- 3. Store these values for subsequent steps.
84
-
85
- ---
86
-
87
- ## Step 3: Read Project Context
88
-
89
- Gather the context that teammates will need:
90
-
91
- 1. Read `.sniper/config.yaml` fully -- extract `project.name`, `project.description`, `project.type`, `stack`, `domain_pack`, and `ownership` sections.
92
- 2. If `domain_pack` is not null, check if `.sniper/domain-packs/{domain_pack}/` exists and read any context files within it.
93
- 3. Read the artifact template `.sniper/templates/brief.md` -- teammates will need to follow this template.
94
-
95
- ---
96
-
97
- ## Step 4: Compose Spawn Prompts
98
-
99
- For each teammate in the team YAML, compose a spawn prompt by assembling persona layers. Do this by reading the actual persona files and assembling them into the template.
100
-
101
- ### Teammate: analyst
102
-
103
- 1. Read these persona layer files:
104
- - Process: `.sniper/personas/process/analyst.md`
105
- - Technical: SKIP (null in team YAML)
106
- - Cognitive: `.sniper/personas/cognitive/systems-thinker.md`
107
- - Domain: If `domain_pack` is set, read `.sniper/domain-packs/{domain_pack}/context/*.md`. Otherwise skip.
108
-
109
- 2. Read the spawn prompt template: `.sniper/spawn-prompts/_template.md`
110
-
111
- 3. Assemble the spawn prompt by filling the template:
112
- - `{name}` = "analyst"
113
- - `{process_layer}` = contents of the process persona file
114
- - `{technical_layer}` = "No specific technical lens for this role."
115
- - `{cognitive_layer}` = contents of the cognitive persona file
116
- - `{domain_layer}` = domain pack context if available, otherwise "No domain pack configured."
117
- - `{ownership}` = the `docs` ownership paths from `config.yaml`
118
-
119
- 4. Append to the spawn prompt:
120
- ```
121
- ## Your Task
122
- **Task ID:** market-research
123
- **Task Name:** Market Research & Competitive Analysis
124
- **Output File:** docs/brief.md
125
- **Template:** .sniper/templates/brief.md
126
-
127
- {task description from the team YAML}
128
-
129
- ## Project Context
130
- - **Project:** {project.name}
131
- - **Type:** {project.type}
132
- - **Description:** {project.description}
133
- - **Stack:** {summary of stack section}
134
-
135
- ## Instructions (Create Mode — when docs/brief.md does NOT exist)
136
- 1. Read the template at `.sniper/templates/brief.md` to understand the expected output format.
137
- 2. If a domain pack is configured, read the domain context files for industry knowledge.
138
- 3. Research and produce the artifact at `docs/brief.md` following the template exactly.
139
- 4. Every section in the template MUST be filled -- no empty sections.
140
- 5. When complete, message the team lead that your task is done.
141
-
142
- ## Instructions (Amendment Mode — when docs/brief.md already exists)
143
- 1. Read the EXISTING artifact at `docs/brief.md` first. Note its current version number.
144
- 2. Read the template at `.sniper/templates/brief.md` to understand the expected format.
145
- 3. AMEND the existing brief: update sections that need changes, add new information, preserve content outside managed sections (<!-- sniper:managed --> markers).
146
- 4. Increment the version number in the header (e.g., v1 → v2).
147
- 5. Add a changelog entry describing what changed.
148
- 6. Set Status back to "Draft" (even if it was previously "Approved").
149
- 7. When complete, message the team lead that your task is done.
150
- ```
151
-
152
- 5. Save this composed prompt as a variable for spawning.
153
-
154
- ### Teammate: risk-researcher
155
-
156
- 1. Read these persona layer files:
157
- - Process: `.sniper/personas/process/analyst.md`
158
- - Technical: `.sniper/personas/technical/infrastructure.md`
159
- - Cognitive: `.sniper/personas/cognitive/devils-advocate.md`
160
- - Domain: Same as above.
161
-
162
- 2. Assemble using the same template pattern:
163
- - `{name}` = "risk-researcher"
164
- - `{technical_layer}` = contents of the infrastructure technical persona
165
- - `{ownership}` = the `docs` ownership paths
166
-
167
- 3. Append task context:
168
- ```
169
- ## Your Task
170
- **Task ID:** risk-assessment
171
- **Task Name:** Technical Feasibility & Risk Assessment
172
- **Output File:** docs/risks.md
173
- **Template:** .sniper/templates/risks.md
174
-
175
- {task description from the team YAML}
176
-
177
- ## Project Context
178
- {same project context as above}
179
-
180
- ## Instructions
181
- 1. Read the template at `.sniper/templates/risks.md` to understand the expected output format.
182
- 2. Assess technical feasibility, integration risks, compliance hurdles, and scalability challenges.
183
- 3. Challenge optimistic assumptions -- be the devil's advocate.
184
- 4. For each risk, provide a specific mitigation strategy.
185
- 5. Write the output to `docs/risks.md` following the template exactly.
186
- 6. When complete, message the team lead that your task is done.
187
- ```
188
-
189
- ### Teammate: user-researcher
190
-
191
- 1. Read these persona layer files:
192
- - Process: `.sniper/personas/process/analyst.md`
193
- - Technical: SKIP (null)
194
- - Cognitive: `.sniper/personas/cognitive/user-empathetic.md`
195
- - Domain: Same as above.
196
-
197
- 2. Assemble using the same template pattern:
198
- - `{name}` = "user-researcher"
199
- - `{technical_layer}` = "No specific technical lens for this role."
200
- - `{ownership}` = the `docs` ownership paths
201
-
202
- 3. Append task context:
203
- ```
204
- ## Your Task
205
- **Task ID:** user-personas
206
- **Task Name:** User Persona & Journey Mapping
207
- **Output File:** docs/personas.md
208
- **Template:** .sniper/templates/personas.md
209
-
210
- {task description from the team YAML}
211
-
212
- ## Project Context
213
- {same project context as above}
214
-
215
- ## Instructions
216
- 1. Read the template at `.sniper/templates/personas.md` to understand the expected output format.
217
- 2. Define 2-4 distinct user personas with goals, pain points, and workflows.
218
- 3. Map the primary user journey for each persona.
219
- 4. Identify key friction points and moments of delight.
220
- 5. Write the output to `docs/personas.md` following the template exactly.
221
- 6. When complete, message the team lead that your task is done.
222
- ```
223
-
224
- ---
225
-
226
- ## Step 5: Create the Agent Team
227
-
228
- Use the TeamCreate tool to create the team:
229
-
230
- ```
231
- TeamCreate:
232
- team_name: "sniper-discover"
233
- description: "SNIPER Phase 1: Discovery & Analysis for {project.name}"
234
- ```
235
-
236
- ---
237
-
238
- ## Step 6: Create Tasks in the Shared Task List
239
-
240
- Create one task per teammate using TaskCreate. Since coordination is empty (all tasks are independent), there are NO dependencies between tasks.
241
-
242
- ### Task 1: Market Research
243
-
244
- ```
245
- TaskCreate:
246
- subject: "Market Research & Competitive Analysis"
247
- description: "Research the market landscape. Identify competitors, features, pricing, and positioning. Define the project's unique value proposition. Output: docs/brief.md. Follow template at .sniper/templates/brief.md."
248
- activeForm: "Researching market landscape and competitors"
249
- ```
250
-
251
- ### Task 2: Risk Assessment
252
-
253
- ```
254
- TaskCreate:
255
- subject: "Technical Feasibility & Risk Assessment"
256
- description: "Assess technical feasibility, integration risks, compliance hurdles, and scalability challenges. Challenge optimistic assumptions. Output: docs/risks.md."
257
- activeForm: "Assessing risks and technical feasibility"
258
- ```
259
-
260
- ### Task 3: User Personas
261
-
262
- ```
263
- TaskCreate:
264
- subject: "User Persona & Journey Mapping"
265
- description: "Define 2-4 user personas with goals, pain points, and workflows. Map primary user journeys. Output: docs/personas.md."
266
- activeForm: "Defining user personas and journeys"
267
- ```
268
-
269
- No dependencies between tasks -- all three run in parallel.
270
-
271
- ---
272
-
273
- ## Step 7: Spawn Teammates
274
-
275
- Spawn each teammate using the Task tool. Use the composed spawn prompts from Step 4.
276
-
277
- For each teammate, spawn using:
278
- - `team_name`: "sniper-discover"
279
- - `name`: the teammate name from the YAML (analyst, risk-researcher, user-researcher)
280
- - The full composed spawn prompt as the instruction
281
-
282
- Spawn all three teammates. They will work in parallel on their independent tasks.
283
-
284
- After spawning, assign each task to its corresponding teammate using TaskUpdate with the `owner` field:
285
- - Task 1 (Market Research) -> owner: "analyst"
286
- - Task 2 (Risk Assessment) -> owner: "risk-researcher"
287
- - Task 3 (User Personas) -> owner: "user-researcher"
288
-
289
- Mark each task as `in_progress` via TaskUpdate.
290
-
291
- ---
292
-
293
- ## Step 8: Enter Delegate Mode
294
-
295
- **You are now the team lead. You do NOT produce artifacts.**
296
-
297
- Your responsibilities during execution:
298
- 1. Monitor task progress via TaskList
299
- 2. Respond to teammate messages (questions, blockers, completion notifications)
300
- 3. If a teammate is stuck or asks a question about the project, provide guidance from the project context
301
- 4. If a teammate finishes early, acknowledge their completion and update their task status to `completed`
302
- 5. Track which teammates have completed their work
303
-
304
- **Do NOT:**
305
- - Write to `docs/brief.md`, `docs/risks.md`, or `docs/personas.md` yourself
306
- - Modify teammate artifacts
307
- - Do research yourself
308
-
309
- Wait for all three teammates to report completion.
310
-
311
- ---
312
-
313
- ## Step 9: Verify Artifacts Exist
314
-
315
- Once all three teammates report completion:
316
-
317
- 1. Verify these files exist and are non-empty:
318
- - `docs/brief.md`
319
- - `docs/risks.md`
320
- - `docs/personas.md`
321
-
322
- 2. If any file is missing or empty, message the responsible teammate and ask them to complete it.
323
-
324
- 3. Do NOT proceed to Step 10 until all three files exist and contain content.
325
-
326
- ---
327
-
328
- ## Step 10: Run Review Gate
329
-
330
- Read the review gate configuration from the team YAML: `review_gate.mode` and `review_gate.checklist`.
331
-
332
- 1. Read the review checklist at `.sniper/checklists/discover-review.md`.
333
- 2. For each checklist item, perform a quick evaluation by reading the relevant artifact and checking if the item is addressed.
334
- 3. Compile a review summary with:
335
- - Total checklist items
336
- - Items that PASS
337
- - Items that NEED ATTENTION (not fully met but not blocking)
338
- - Items that FAIL (critical gaps)
339
-
340
- ### Gate Decision
341
-
342
- The discover gate mode is **flexible**:
343
-
344
- - **If there are no FAIL items:** Auto-advance. Print the review summary and note any NEED ATTENTION items for async review.
345
- - **If there are FAIL items:** Present the failures to the user and ask:
346
- > "The discovery review found {N} critical issues. Would you like to:
347
- > 1. Have the team fix the issues (I will message the relevant teammates)
348
- > 2. Override and advance anyway
349
- > 3. Stop and review manually"
350
-
351
- If option 1: Message the relevant teammates with specific feedback, wait for fixes, then re-run the checklist.
352
- If option 2: Proceed with a note that issues were overridden.
353
- If option 3: STOP and let the user handle it.
354
-
355
- ---
356
-
357
- ## Step 11: Update State and Shut Down Team
358
-
359
- ### Update Lifecycle State
360
-
361
- Edit `.sniper/config.yaml`:
362
-
363
- 1. Update artifact tracking (increment version if amendment mode):
364
- - Set `state.artifacts.brief.status: draft` and increment `state.artifacts.brief.version`
365
- - Set `state.artifacts.risks.status: draft` and increment `state.artifacts.risks.version` (if risks.md was produced)
366
- - Set `state.artifacts.personas.status: draft` and increment `state.artifacts.personas.version` (if personas.md was produced)
367
- 2. Update the discover entry in `state.phase_log` to add `completed_at: "{current ISO timestamp}"`
368
- 3. If auto-advanced (flexible gate passed), set `approved_by: "auto-flexible"`
369
-
370
- ### Shut Down Teammates
371
-
372
- Send a shutdown request to each teammate:
373
- - Send shutdown_request to "analyst"
374
- - Send shutdown_request to "risk-researcher"
375
- - Send shutdown_request to "user-researcher"
376
-
377
- Wait for all teammates to acknowledge shutdown.
378
-
379
- ---
380
-
381
- ## Step 12: Present Results and Next Steps
382
-
383
- Print a formatted summary:
384
-
385
- ```
386
- ============================================
387
- SNIPER Phase 1: Discovery Complete
388
- ============================================
389
-
390
- Artifacts Produced:
391
- - docs/brief.md [draft]
392
- - docs/risks.md [draft]
393
- - docs/personas.md [draft]
394
-
395
- Review Gate: FLEXIBLE
396
- Passed: {count}/{total} checklist items
397
- Attention: {count} items flagged for async review
398
- Failed: {count} critical issues
399
-
400
- Phase Duration: {time elapsed}
401
-
402
- ============================================
403
- Next Steps
404
- ============================================
405
-
406
- 1. Review the discovery artifacts in `docs/`
407
- 2. When ready, run `/sniper-plan` to begin Phase 2: Planning & Architecture
408
- 3. Or run `/sniper-status` to see the full lifecycle state
409
-
410
- ============================================
411
- ```
412
-
413
- ---
414
-
415
- ## IMPORTANT RULES
416
-
417
- - You are the LEAD. You coordinate. You do NOT write artifact files.
418
- - All three teammates work in PARALLEL -- do not serialize their work.
419
- - If `$ARGUMENTS` contains "dry-run", perform Steps 0-4 only (compose prompts) and print them without spawning. This lets the user review prompts before execution.
420
- - If `$ARGUMENTS` contains "skip-review", skip Step 10 and go straight to Step 11.
421
- - If a teammate crashes or becomes unresponsive after 10 minutes of no messages, report the issue to the user and offer to respawn that specific teammate.
422
- - All file paths are relative to the project root.
423
- - Do NOT proceed to `/sniper-plan` automatically -- always let the user initiate the next phase.