@sniper.ai/core 1.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 (67) hide show
  1. package/README.md +73 -0
  2. package/framework/checklists/code-review.md +33 -0
  3. package/framework/checklists/discover-review.md +33 -0
  4. package/framework/checklists/doc-review.md +39 -0
  5. package/framework/checklists/plan-review.md +52 -0
  6. package/framework/checklists/sprint-review.md +41 -0
  7. package/framework/checklists/story-review.md +30 -0
  8. package/framework/claude-md.template +37 -0
  9. package/framework/commands/sniper-compose.md +237 -0
  10. package/framework/commands/sniper-discover.md +397 -0
  11. package/framework/commands/sniper-doc.md +441 -0
  12. package/framework/commands/sniper-init.md +372 -0
  13. package/framework/commands/sniper-plan.md +608 -0
  14. package/framework/commands/sniper-review.md +305 -0
  15. package/framework/commands/sniper-solve.md +375 -0
  16. package/framework/commands/sniper-sprint.md +601 -0
  17. package/framework/commands/sniper-status.md +276 -0
  18. package/framework/config.template.yaml +117 -0
  19. package/framework/personas/cognitive/devils-advocate.md +30 -0
  20. package/framework/personas/cognitive/mentor-explainer.md +29 -0
  21. package/framework/personas/cognitive/performance-focused.md +30 -0
  22. package/framework/personas/cognitive/security-first.md +29 -0
  23. package/framework/personas/cognitive/systems-thinker.md +29 -0
  24. package/framework/personas/cognitive/user-empathetic.md +29 -0
  25. package/framework/personas/domain/.gitkeep +0 -0
  26. package/framework/personas/process/analyst.md +29 -0
  27. package/framework/personas/process/architect.md +30 -0
  28. package/framework/personas/process/developer.md +32 -0
  29. package/framework/personas/process/doc-analyst.md +63 -0
  30. package/framework/personas/process/doc-reviewer.md +62 -0
  31. package/framework/personas/process/doc-writer.md +42 -0
  32. package/framework/personas/process/product-manager.md +32 -0
  33. package/framework/personas/process/qa-engineer.md +31 -0
  34. package/framework/personas/process/scrum-master.md +31 -0
  35. package/framework/personas/process/ux-designer.md +31 -0
  36. package/framework/personas/technical/ai-ml.md +33 -0
  37. package/framework/personas/technical/api-design.md +32 -0
  38. package/framework/personas/technical/backend.md +32 -0
  39. package/framework/personas/technical/database.md +32 -0
  40. package/framework/personas/technical/frontend.md +33 -0
  41. package/framework/personas/technical/infrastructure.md +32 -0
  42. package/framework/personas/technical/security.md +34 -0
  43. package/framework/settings.template.json +6 -0
  44. package/framework/spawn-prompts/_template.md +22 -0
  45. package/framework/teams/discover.yaml +57 -0
  46. package/framework/teams/doc.yaml +76 -0
  47. package/framework/teams/plan.yaml +86 -0
  48. package/framework/teams/solve.yaml +48 -0
  49. package/framework/teams/sprint.yaml +68 -0
  50. package/framework/templates/architecture.md +72 -0
  51. package/framework/templates/brief.md +52 -0
  52. package/framework/templates/doc-api.md +53 -0
  53. package/framework/templates/doc-guide.md +35 -0
  54. package/framework/templates/doc-readme.md +49 -0
  55. package/framework/templates/epic.md +33 -0
  56. package/framework/templates/personas.md +118 -0
  57. package/framework/templates/prd.md +69 -0
  58. package/framework/templates/risks.md +64 -0
  59. package/framework/templates/security.md +90 -0
  60. package/framework/templates/sprint-review.md +32 -0
  61. package/framework/templates/story.md +37 -0
  62. package/framework/templates/ux-spec.md +54 -0
  63. package/framework/workflows/discover-only.md +39 -0
  64. package/framework/workflows/full-lifecycle.md +56 -0
  65. package/framework/workflows/quick-feature.md +44 -0
  66. package/framework/workflows/sprint-cycle.md +47 -0
  67. package/package.json +30 -0
@@ -0,0 +1,372 @@
1
+ # /sniper-init -- Initialize SNIPER in a New or Existing Project
2
+
3
+ You are executing the `/sniper-init` command. Your job is to initialize the SNIPER framework in the current project. Follow every step below precisely.
4
+
5
+ ---
6
+
7
+ ## Step 0: Pre-Flight Checks
8
+
9
+ 1. Check if the directory `.sniper/` already exists in the project root by listing its contents.
10
+ 2. If `.sniper/` exists AND contains a `config.yaml` with a non-empty `project.name`:
11
+ - **WARN the user:** "SNIPER is already initialized for project '{name}'. Re-running will overwrite configuration and persona files. Artifacts in `docs/` will NOT be deleted."
12
+ - Ask the user: "Do you want to re-initialize? (yes/no)"
13
+ - If they say no, STOP and print: "Initialization cancelled. Run `/sniper-status` to see current state."
14
+ - If they say yes, proceed with overwrite.
15
+ 3. If `.sniper/` does not exist, or `config.yaml` is empty/missing, proceed normally.
16
+
17
+ ---
18
+
19
+ ## Step 1: Gather Project Information
20
+
21
+ Ask the user the following questions ONE AT A TIME using conversational prompts. Wait for each answer before asking the next. Provide defaults in brackets.
22
+
23
+ **Question 1: Project Name**
24
+ > What is the project name? This will be used in config and artifacts.
25
+
26
+ **Question 2: Project Type**
27
+ > What type of project is this?
28
+ > Options: `saas` | `api` | `mobile` | `cli` | `library` | `monorepo`
29
+ > [default: saas]
30
+
31
+ **Question 3: One-Line Description**
32
+ > Give a one-line description of what this project does.
33
+
34
+ **Question 4: Tech Stack**
35
+ Ask about each stack component. Present all at once and let the user confirm or override:
36
+
37
+ > Here is the default tech stack. Confirm or override each:
38
+ >
39
+ > | Setting | Default |
40
+ > |-----------------|----------------|
41
+ > | Language | typescript |
42
+ > | Frontend | react |
43
+ > | Backend | node-express |
44
+ > | Database | postgresql |
45
+ > | Cache | redis |
46
+ > | Infrastructure | aws |
47
+ > | Test Runner | vitest |
48
+ > | Package Manager | pnpm |
49
+ >
50
+ > Type your overrides as key=value pairs (e.g., `language=python backend=fastapi database=mongodb frontend=null`), or type `ok` to accept defaults.
51
+
52
+ Parse the user's response. For any key not mentioned, keep the default. If the user says `ok` or `confirm` or similar, keep all defaults.
53
+
54
+ **Question 5: Domain Pack**
55
+ > Do you want to install a domain pack? Domain packs add industry-specific context to personas.
56
+ > Available packs are found in `.sniper/domain-packs/`. Enter a pack name, or `none` to skip.
57
+ > [default: none]
58
+
59
+ If the user specifies a domain pack, verify that the directory `.sniper/domain-packs/{pack-name}/` exists. If it does not exist, warn them and set domain_pack to null.
60
+
61
+ **Question 6: Review Gate Configuration**
62
+ > Here are the default review gates:
63
+ >
64
+ > | Gate | Default | Description |
65
+ > |-----------------|------------|--------------------------------------------|
66
+ > | after_discover | flexible | Auto-advance, human reviews async |
67
+ > | after_plan | strict | Full stop, human must approve |
68
+ > | after_solve | flexible | Auto-advance, human reviews async |
69
+ > | after_sprint | strict | Full stop, human must review code |
70
+ >
71
+ > Options per gate: `strict` | `flexible` | `auto`
72
+ > Type overrides as key=value (e.g., `after_discover=strict`), or `ok` to accept defaults.
73
+
74
+ Parse overrides. Keep defaults for any not mentioned.
75
+
76
+ ---
77
+
78
+ ## Step 2: Create Directory Structure
79
+
80
+ Create the following directories if they do not already exist. Use `mkdir -p` to create them all at once:
81
+
82
+ ```
83
+ .sniper/personas/process
84
+ .sniper/personas/technical
85
+ .sniper/personas/cognitive
86
+ .sniper/personas/domain
87
+ .sniper/teams
88
+ .sniper/workflows
89
+ .sniper/templates
90
+ .sniper/checklists
91
+ .sniper/spawn-prompts
92
+ .sniper/domain-packs
93
+ ```
94
+
95
+ ---
96
+
97
+ ## Step 3: Generate config.yaml
98
+
99
+ Write `.sniper/config.yaml` using the gathered information. Use this exact structure:
100
+
101
+ ```yaml
102
+ # ─────────────────────────────────────────
103
+ # SNIPER Framework Configuration
104
+ # ─────────────────────────────────────────
105
+
106
+ project:
107
+ name: "{project_name}"
108
+ type: {project_type}
109
+ description: "{description}"
110
+
111
+ stack:
112
+ language: {language}
113
+ frontend: {frontend}
114
+ backend: {backend}
115
+ database: {database}
116
+ cache: {cache}
117
+ infrastructure: {infrastructure}
118
+ test_runner: {test_runner}
119
+ package_manager: {package_manager}
120
+
121
+ # ─────────────────────────────────────────
122
+ # Review Gate Configuration
123
+ # ─────────────────────────────────────────
124
+ # strict = full stop, human must approve before next phase
125
+ # flexible = auto-advance, human reviews async
126
+ # auto = no gate (not recommended for architecture/implementation)
127
+
128
+ review_gates:
129
+ after_discover: {after_discover}
130
+ after_plan: {after_plan}
131
+ after_solve: {after_solve}
132
+ after_sprint: {after_sprint}
133
+
134
+ # ─────────────────────────────────────────
135
+ # Agent Teams Configuration
136
+ # ─────────────────────────────────────────
137
+
138
+ agent_teams:
139
+ max_teammates: 5
140
+ default_model: sonnet
141
+ planning_model: opus
142
+ delegate_mode: true
143
+ plan_approval: true
144
+ coordination_timeout: 30
145
+
146
+ # ─────────────────────────────────────────
147
+ # Domain Pack
148
+ # ─────────────────────────────────────────
149
+
150
+ domain_pack: {domain_pack_or_null}
151
+
152
+ # ─────────────────────────────────────────
153
+ # File Ownership Rules
154
+ # ─────────────────────────────────────────
155
+ # These are injected into spawn prompts to prevent teammates from editing
156
+ # each other's files. Customize per project.
157
+
158
+ ownership:
159
+ backend:
160
+ - "src/backend/"
161
+ - "src/api/"
162
+ - "src/services/"
163
+ - "src/db/"
164
+ - "src/workers/"
165
+ frontend:
166
+ - "src/frontend/"
167
+ - "src/components/"
168
+ - "src/hooks/"
169
+ - "src/styles/"
170
+ - "src/pages/"
171
+ infrastructure:
172
+ - "docker/"
173
+ - ".github/"
174
+ - "infra/"
175
+ - "terraform/"
176
+ - "scripts/"
177
+ tests:
178
+ - "tests/"
179
+ - "__tests__/"
180
+ - "*.test.*"
181
+ - "*.spec.*"
182
+ docs:
183
+ - "docs/"
184
+
185
+ # ─────────────────────────────────────────
186
+ # Lifecycle State (managed by SNIPER, don't edit manually)
187
+ # ─────────────────────────────────────────
188
+
189
+ state:
190
+ current_phase: null
191
+ phase_history: []
192
+ current_sprint: 0
193
+ artifacts:
194
+ brief: null
195
+ prd: null
196
+ architecture: null
197
+ ux_spec: null
198
+ security: null
199
+ epics: null
200
+ stories: null
201
+ ```
202
+
203
+ Replace all `{placeholders}` with the actual values gathered from the user. For `null` values (e.g., no frontend, no cache), write the literal YAML `null`.
204
+
205
+ ---
206
+
207
+ ## Step 4: Verify Framework Files Exist
208
+
209
+ Check that the following framework files already exist. For each file category, list what is present:
210
+
211
+ 1. **Persona layers** in `.sniper/personas/`:
212
+ - Process: `analyst.md`, `product-manager.md`, `architect.md`, `ux-designer.md`, `scrum-master.md`, `developer.md`, `qa-engineer.md`
213
+ - Technical: `backend.md`, `frontend.md`, `infrastructure.md`, `security.md`, `ai-ml.md`, `database.md`, `api-design.md`
214
+ - Cognitive: `systems-thinker.md`, `security-first.md`, `performance-focused.md`, `user-empathetic.md`, `devils-advocate.md`, `mentor-explainer.md`
215
+ 2. **Spawn prompt template**: `.sniper/spawn-prompts/_template.md`
216
+ 3. **Team definitions**: `.sniper/teams/discover.yaml`, `plan.yaml`, `solve.yaml`, `sprint.yaml`
217
+ 4. **Artifact templates**: `.sniper/templates/brief.md`, `risks.md`, `personas.md`, `prd.md`, `architecture.md`, `ux-spec.md`, `security.md`, `epic.md`, `story.md`, `sprint-review.md`
218
+ 5. **Review checklists**: `.sniper/checklists/discover-review.md`, `plan-review.md`, `story-review.md`, `sprint-review.md`, `code-review.md`
219
+ 6. **Workflows**: `.sniper/workflows/full-lifecycle.md`, `sprint-cycle.md`, `discover-only.md`, `quick-feature.md`
220
+
221
+ For any MISSING files, report them to the user as warnings. These are framework files that should have been included with the SNIPER framework repo. Do NOT attempt to generate them from scratch -- just warn.
222
+
223
+ ---
224
+
225
+ ## Step 5: Install Domain Pack (if specified)
226
+
227
+ If the user chose a domain pack:
228
+
229
+ 1. Check that `.sniper/domain-packs/{pack-name}/` exists
230
+ 2. Check for a `context/` subdirectory with `.md` files
231
+ 3. If contexts exist, copy/link them into `.sniper/personas/domain/`
232
+ 4. Report what domain context files were installed
233
+
234
+ If no domain pack was chosen, skip this step.
235
+
236
+ ---
237
+
238
+ ## Step 6: Create docs/ Directory
239
+
240
+ Create the `docs/` directory if it does not exist:
241
+ ```
242
+ docs/
243
+ docs/epics/
244
+ docs/stories/
245
+ ```
246
+
247
+ Do NOT create any artifact files -- those are produced by the discovery and planning phases.
248
+
249
+ ---
250
+
251
+ ## Step 7: Verify CLAUDE.md
252
+
253
+ Check that `CLAUDE.md` exists in the project root. If it does, read it and verify it references the SNIPER framework. If it does NOT exist, create one with the standard SNIPER CLAUDE.md content:
254
+
255
+ ```markdown
256
+ # SNIPER Project
257
+
258
+ ## Framework
259
+ This project uses SNIPER (Spawn, Navigate, Implement, Parallelize, Evaluate, Release).
260
+ See `.sniper/config.yaml` for project settings.
261
+
262
+ ## Quick Reference
263
+ - Framework workflows: `.sniper/workflows/`
264
+ - Persona layers: `.sniper/personas/`
265
+ - Team definitions: `.sniper/teams/`
266
+ - Artifact templates: `.sniper/templates/`
267
+ - Quality gates: `.sniper/checklists/`
268
+ - Project artifacts: `docs/`
269
+ - Domain context: `.sniper/domain-packs/{pack-name}/`
270
+
271
+ ## Commands
272
+ - `/sniper-init` -- Initialize SNIPER in a new project
273
+ - `/sniper-discover` -- Phase 1: Discovery & Analysis (parallel team)
274
+ - `/sniper-plan` -- Phase 2: Planning & Architecture (parallel team)
275
+ - `/sniper-solve` -- Phase 3: Epic Sharding & Story Creation (sequential)
276
+ - `/sniper-sprint` -- Phase 4: Implementation Sprint (parallel team)
277
+ - `/sniper-review` -- Run review gate for current phase
278
+ - `/sniper-compose` -- Create a spawn prompt from persona layers
279
+ - `/sniper-status` -- Show lifecycle status and artifact state
280
+
281
+ ## Agent Teams Rules
282
+ When spawning teammates, always:
283
+ 1. Read the relevant team YAML from `.sniper/teams/`
284
+ 2. Compose spawn prompts using `/sniper-compose` with the layers specified in the YAML
285
+ 3. Assign file ownership boundaries from `config.yaml` ownership rules
286
+ 4. Create tasks with dependencies from the team YAML
287
+ 5. Enter delegate mode (Shift+Tab) -- the lead coordinates, it does not code
288
+ 6. Require plan approval for tasks marked `plan_approval: true`
289
+ 7. When a phase completes, run `/sniper-review` before advancing
290
+
291
+ ## Code Standards
292
+ See `.sniper/config.yaml` -> stack section for language/framework specifics.
293
+ ```
294
+
295
+ ---
296
+
297
+ ## Step 8: Verify Slash Commands
298
+
299
+ Check that the following slash command files exist in `.claude/commands/`:
300
+ - `sniper-init.md` (this file)
301
+ - `sniper-compose.md`
302
+ - `sniper-discover.md`
303
+ - `sniper-plan.md`
304
+ - `sniper-solve.md`
305
+ - `sniper-sprint.md`
306
+ - `sniper-review.md`
307
+ - `sniper-status.md`
308
+
309
+ Report any missing commands as warnings.
310
+
311
+ ---
312
+
313
+ ## Step 9: Print Summary and Next Steps
314
+
315
+ Print a formatted summary:
316
+
317
+ ```
318
+ ============================================
319
+ SNIPER Initialized Successfully
320
+ ============================================
321
+
322
+ Project: {project_name}
323
+ Type: {project_type}
324
+ Description: {description}
325
+
326
+ Stack:
327
+ Language: {language}
328
+ Frontend: {frontend}
329
+ Backend: {backend}
330
+ Database: {database}
331
+ Cache: {cache}
332
+ Infrastructure: {infrastructure}
333
+ Test Runner: {test_runner}
334
+ Package Manager: {package_manager}
335
+
336
+ Domain Pack: {domain_pack or "none"}
337
+
338
+ Review Gates:
339
+ after_discover: {gate}
340
+ after_plan: {gate}
341
+ after_solve: {gate}
342
+ after_sprint: {gate}
343
+
344
+ Framework Files:
345
+ Personas: {count} layers found
346
+ Teams: {count} definitions found
347
+ Templates: {count} templates found
348
+ Checklists: {count} checklists found
349
+ Workflows: {count} workflows found
350
+
351
+ {warnings if any}
352
+
353
+ ============================================
354
+ Next Steps
355
+ ============================================
356
+
357
+ 1. Review `.sniper/config.yaml` and adjust ownership rules for your project structure
358
+ 2. Run `/sniper-discover` to begin Phase 1: Discovery & Analysis
359
+ 3. Or run `/sniper-status` to see the current lifecycle state
360
+
361
+ Tip: The full lifecycle workflow is documented in `.sniper/workflows/full-lifecycle.md`
362
+ ```
363
+
364
+ ---
365
+
366
+ ## IMPORTANT RULES
367
+
368
+ - Do NOT skip the user questions -- every project is different and needs configuration.
369
+ - Do NOT generate placeholder artifact files (brief.md, prd.md, etc.) -- those come from the actual phases.
370
+ - Do NOT modify any existing artifact files in `docs/`.
371
+ - If the user cancels at any point, stop gracefully and report what was done.
372
+ - All file paths are relative to the project root.