@sniper.ai/core 1.0.0 → 2.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 (94) hide show
  1. package/README.md +122 -32
  2. package/framework/checklists/debug-review.md +34 -0
  3. package/framework/checklists/feature-review.md +42 -0
  4. package/framework/checklists/ingest-review.md +42 -0
  5. package/framework/checklists/memory-review.md +30 -0
  6. package/framework/checklists/perf-review.md +33 -0
  7. package/framework/checklists/refactor-review.md +33 -0
  8. package/framework/checklists/security-review.md +34 -0
  9. package/framework/checklists/test-review.md +32 -0
  10. package/framework/checklists/workspace-review.md +34 -0
  11. package/framework/commands/sniper-audit.md +1549 -0
  12. package/framework/commands/sniper-compose.md +88 -2
  13. package/framework/commands/sniper-debug.md +337 -0
  14. package/framework/commands/sniper-discover.md +41 -15
  15. package/framework/commands/sniper-feature.md +515 -0
  16. package/framework/commands/sniper-ingest.md +506 -0
  17. package/framework/commands/sniper-init.md +21 -5
  18. package/framework/commands/sniper-memory.md +219 -0
  19. package/framework/commands/sniper-plan.md +41 -19
  20. package/framework/commands/sniper-review.md +106 -42
  21. package/framework/commands/sniper-solve.md +47 -14
  22. package/framework/commands/sniper-sprint.md +132 -17
  23. package/framework/commands/sniper-status.md +240 -35
  24. package/framework/commands/sniper-workspace-feature.md +267 -0
  25. package/framework/commands/sniper-workspace-init.md +252 -0
  26. package/framework/commands/sniper-workspace-status.md +112 -0
  27. package/framework/commands/sniper-workspace-validate.md +138 -0
  28. package/framework/config.template.yaml +88 -9
  29. package/framework/personas/process/architecture-cartographer.md +25 -0
  30. package/framework/personas/process/code-archaeologist.md +22 -0
  31. package/framework/personas/process/code-investigator.md +29 -0
  32. package/framework/personas/process/code-reviewer.md +26 -0
  33. package/framework/personas/process/contract-designer.md +31 -0
  34. package/framework/personas/process/convention-miner.md +27 -0
  35. package/framework/personas/process/coverage-analyst.md +24 -0
  36. package/framework/personas/process/flake-hunter.md +30 -0
  37. package/framework/personas/process/impact-analyst.md +23 -0
  38. package/framework/personas/process/integration-validator.md +29 -0
  39. package/framework/personas/process/log-analyst.md +22 -0
  40. package/framework/personas/process/migration-architect.md +24 -0
  41. package/framework/personas/process/perf-profiler.md +27 -0
  42. package/framework/personas/process/release-manager.md +23 -0
  43. package/framework/personas/process/retro-analyst.md +30 -0
  44. package/framework/personas/process/threat-modeler.md +30 -0
  45. package/framework/personas/process/triage-lead.md +23 -0
  46. package/framework/personas/process/vuln-scanner.md +27 -0
  47. package/framework/personas/process/workspace-orchestrator.md +30 -0
  48. package/framework/spawn-prompts/_template.md +3 -0
  49. package/framework/teams/debug.yaml +56 -0
  50. package/framework/teams/feature-plan.yaml +61 -0
  51. package/framework/teams/ingest.yaml +85 -0
  52. package/framework/teams/perf.yaml +33 -0
  53. package/framework/teams/refactor.yaml +34 -0
  54. package/framework/teams/retro.yaml +30 -0
  55. package/framework/teams/review-pr.yaml +73 -0
  56. package/framework/teams/review-release.yaml +70 -0
  57. package/framework/teams/security.yaml +59 -0
  58. package/framework/teams/test.yaml +59 -0
  59. package/framework/teams/workspace-feature.yaml +69 -0
  60. package/framework/teams/workspace-validation.yaml +27 -0
  61. package/framework/templates/arch-delta.md +74 -0
  62. package/framework/templates/architecture.md +24 -1
  63. package/framework/templates/brief.md +22 -1
  64. package/framework/templates/bug-report.md +55 -0
  65. package/framework/templates/contract-validation-report.md +68 -0
  66. package/framework/templates/contract.yaml +60 -0
  67. package/framework/templates/conventions.md +59 -0
  68. package/framework/templates/coverage-report.md +67 -0
  69. package/framework/templates/epic.md +14 -0
  70. package/framework/templates/feature-brief.md +54 -0
  71. package/framework/templates/feature-spec.md +53 -0
  72. package/framework/templates/flaky-report.md +64 -0
  73. package/framework/templates/investigation.md +49 -0
  74. package/framework/templates/memory-anti-pattern.yaml +16 -0
  75. package/framework/templates/memory-convention.yaml +17 -0
  76. package/framework/templates/memory-decision.yaml +16 -0
  77. package/framework/templates/migration-plan.md +47 -0
  78. package/framework/templates/optimization-plan.md +59 -0
  79. package/framework/templates/performance-profile.md +64 -0
  80. package/framework/templates/postmortem.md +69 -0
  81. package/framework/templates/pr-review.md +50 -0
  82. package/framework/templates/prd.md +24 -1
  83. package/framework/templates/refactor-scope.md +52 -0
  84. package/framework/templates/release-readiness.md +66 -0
  85. package/framework/templates/retro.yaml +44 -0
  86. package/framework/templates/security.md +22 -1
  87. package/framework/templates/story.md +16 -0
  88. package/framework/templates/threat-model.md +71 -0
  89. package/framework/templates/ux-spec.md +18 -1
  90. package/framework/templates/vulnerability-report.md +56 -0
  91. package/framework/templates/workspace-brief.md +52 -0
  92. package/framework/templates/workspace-plan.md +50 -0
  93. package/framework/workflows/workspace-feature.md +71 -0
  94. package/package.json +2 -2
@@ -16,19 +16,37 @@ Perform ALL checks before proceeding. If any critical check fails, STOP.
16
16
  2. If the file does not exist or `project.name` is empty:
17
17
  - **STOP.** Print: "SNIPER is not initialized. Run `/sniper-init` first."
18
18
 
19
- ### 0b. Verify Stories Exist
20
-
21
- 1. List files in `docs/stories/`.
19
+ ### 0b. Check for Feature Flag
20
+
21
+ 1. If `$ARGUMENTS` contains `--feature SNPR-{XXXX}`:
22
+ - Store the feature ID.
23
+ - Read `state.features[]` from config to find the feature.
24
+ - If not found, STOP: "Feature SNPR-{XXXX} not found. Run `/sniper-feature --list` to see active features."
25
+ - Set story directory to `docs/features/SNPR-{XXXX}/stories/`.
26
+ - Set team name prefix to `sniper-feature-sprint-{feature_id}`.
27
+ - Note: Feature sprints do NOT increment `state.current_sprint`.
28
+ 2. If no `--feature` flag:
29
+ - Set story directory to `docs/stories/`.
30
+ - Set team name prefix to `sniper-sprint`.
31
+
32
+ ### 0c. Verify Stories Exist
33
+
34
+ 1. List files in the story directory (set in 0b).
22
35
  2. If the directory does not exist or contains no `.md` files:
23
- - **STOP.** Print: "No stories found in `docs/stories/`. Run `/sniper-solve` first to create stories."
36
+ - If feature mode: **STOP.** Print: "No stories found for SNPR-{XXXX}. The feature may not have reached the solving phase yet."
37
+ - If normal mode: **STOP.** Print: "No stories found in `docs/stories/`. Run `/sniper-solve` first to create stories."
38
+
39
+ ### 0d. Config Migration Check
40
+
41
+ 1. Read `schema_version` from `.sniper/config.yaml`.
42
+ 2. If `schema_version` is absent or less than 2, run the v1→v2 migration. Write the updated config before proceeding.
24
43
 
25
- ### 0c. Verify Phase State
44
+ ### 0e. Verify Phase State
26
45
 
27
- 1. Read `state` from config.yaml.
28
- 2. Check that `state.artifacts.stories` is not null (stories have been created).
29
- 3. If `state.artifacts.stories` is null but story files exist, print a warning and continue.
46
+ 1. Check that `state.artifacts.stories.status` is not null (stories have been created).
47
+ 2. If `state.artifacts.stories.status` is null but story files exist, print a warning and continue.
30
48
 
31
- ### 0d. Verify Framework Files
49
+ ### 0f. Verify Framework Files
32
50
 
33
51
  Check that these files exist:
34
52
  - `.sniper/teams/sprint.yaml`
@@ -54,12 +72,25 @@ Report any missing files as warnings.
54
72
 
55
73
  Edit `.sniper/config.yaml`:
56
74
 
75
+ **If normal mode (no `--feature` flag):**
57
76
  1. Increment `state.current_sprint` by 1 (e.g., 0 -> 1, 1 -> 2).
58
- 2. Set `state.current_phase: sprint`
59
- 3. Store the new sprint number as `{sprint_number}` for use throughout.
60
- 4. Append to `state.phase_history`:
77
+ 2. Store the new sprint number as `{sprint_number}` for use throughout.
78
+ 3. Append to `state.phase_log`:
79
+ ```yaml
80
+ - phase: sprint
81
+ context: "sprint-{sprint_number}"
82
+ started_at: "{current ISO timestamp}"
83
+ completed_at: null
84
+ approved_by: null
85
+ ```
86
+
87
+ **If feature mode (`--feature SNPR-{XXXX}`):**
88
+ 1. Do NOT increment `state.current_sprint`.
89
+ 2. Use the feature ID as the sprint identifier.
90
+ 3. Append to `state.phase_log`:
61
91
  ```yaml
62
- - phase: "sprint-{sprint_number}"
92
+ - phase: sprint
93
+ context: "feature-sprint-SNPR-{XXXX}"
63
94
  started_at: "{current ISO timestamp}"
64
95
  completed_at: null
65
96
  approved_by: null
@@ -253,6 +284,8 @@ Read each story file and embed it completely.}
253
284
  ## Architecture Reference
254
285
  Read `docs/architecture.md` for the full system architecture.
255
286
  The relevant sections are embedded in each story above.
287
+ {If feature mode: "Also read `docs/features/SNPR-{XXXX}/arch-delta.md` for architecture changes specific to this feature. The delta takes precedence for this feature's scope."}
288
+ {If conventions doc exists: "Also read `docs/conventions.md` for the project's coding patterns and conventions."}
256
289
 
257
290
  ## Coordination
258
291
  {If this teammate has coordination pairs from sprint.yaml, list them:}
@@ -530,15 +563,18 @@ Update state and STOP.
530
563
 
531
564
  Edit `.sniper/config.yaml`:
532
565
 
533
- 1. Update the sprint entry in `state.phase_history`:
566
+ 1. Update the sprint entry in `state.phase_log`:
534
567
  - Set `completed_at: "{current ISO timestamp}"`
535
568
  - Set `approved_by: "human"`
536
569
 
537
570
  ### Mark Stories Complete
538
571
 
539
- For each story that was implemented and approved, add a completion marker. Either:
572
+ For each story that was implemented and approved, add a completion marker:
540
573
  - Add `> **Status:** Complete (Sprint {sprint_number})` to the top of each story file
541
- - Or track in a separate sprint log if preferred
574
+
575
+ **If feature mode:** Also update `state.features[]` for this feature:
576
+ - Increment `stories_complete` by the number of completed stories
577
+ - If `stories_complete == stories_total`, the feature is ready for merge-back
542
578
 
543
579
  ### Shut Down Teammates
544
580
 
@@ -548,7 +584,86 @@ Send shutdown requests to each teammate:
548
584
 
549
585
  ---
550
586
 
551
- ## Step 14: Present Results and Next Steps
587
+ ## Step 14: Trigger Sprint Retrospective
588
+
589
+ After the review gate passes, automatically trigger a sprint retrospective if memory is enabled.
590
+
591
+ ### 14-1: Check Memory Configuration
592
+
593
+ Read `.sniper/config.yaml`:
594
+ - If `memory.enabled` is false or not set, skip retrospective
595
+ - If `memory.auto_retro` is false, skip retrospective but print:
596
+ ```
597
+ Sprint retrospective skipped (auto_retro is disabled).
598
+ To run manually: /sniper-memory --retro
599
+ ```
600
+
601
+ ### 14-2: Read Retro Team and Compose Agent
602
+
603
+ 1. Read `.sniper/teams/retro.yaml` for the team definition
604
+ 2. Parse the teammate entry: `retro-analyst` with compose layers from the YAML
605
+ 3. Compose the retro-analyst spawn prompt using `/sniper-compose` with the layers from the team YAML:
606
+ ```
607
+ /sniper-compose --process {compose.process} --cognitive {compose.cognitive} --name "Retro Analyst"
608
+ ```
609
+
610
+ ### 14-3: Run Retrospective
611
+
612
+ Spawn the retro agent with these context files:
613
+ - All completed story files from this sprint (from `docs/stories/`)
614
+ - The review gate output from Step 12
615
+ - Existing memory files (`.sniper/memory/conventions.yaml`, `.sniper/memory/anti-patterns.yaml`)
616
+ - The code changes from this sprint (git diff summary)
617
+
618
+ The retro agent should produce: `.sniper/memory/retros/sprint-{N}-retro.yaml`
619
+
620
+ ### 14-4: Auto-Codify Findings
621
+
622
+ If `memory.auto_codify` is true in config:
623
+ 1. Read the retro output
624
+ 2. For each finding with `recommendation: codify` AND `confidence: high`:
625
+ - If it's a convention: append to `.sniper/memory/conventions.yaml` with status `confirmed`
626
+ - If it's an anti-pattern: append to `.sniper/memory/anti-patterns.yaml` with status `confirmed`
627
+ 3. For findings with `confidence: medium`:
628
+ - Append with status `candidate`
629
+ 4. Regenerate `.sniper/memory/summary.md`
630
+
631
+ ### 14-5: Show Retro Summary
632
+
633
+ Display the retrospective results:
634
+ ```
635
+ ============================================
636
+ Sprint {sprint_number} Retrospective
637
+ ============================================
638
+
639
+ Stories analyzed: {count}
640
+
641
+ New Conventions (auto-codified):
642
+ conv-{XXX}: {rule}
643
+
644
+ New Anti-Patterns (auto-codified):
645
+ ap-{XXX}: {description}
646
+
647
+ Candidates (need confirmation):
648
+ {rule/description}
649
+
650
+ Estimation Calibration:
651
+ Overestimates: {stories}
652
+ Underestimates: {stories}
653
+ Pattern: {description}
654
+
655
+ Positive Patterns:
656
+ {pattern}
657
+
658
+ ============================================
659
+ ```
660
+
661
+ Print: `Review auto-codified entries with: /sniper-memory --conventions`
662
+ Print: `Promote candidates with: /sniper-memory --promote {id}`
663
+
664
+ ---
665
+
666
+ ## Step 15: Present Results and Next Steps
552
667
 
553
668
  ```
554
669
  ============================================
@@ -37,10 +37,16 @@ Extract from config.yaml:
37
37
  ## Step 2: Read Lifecycle State
38
38
 
39
39
  Extract from config.yaml:
40
- - `state.current_phase`
41
- - `state.phase_history` (array of completed phases)
40
+ - `state.phase_log` (array of phase entries with context, started_at, completed_at)
42
41
  - `state.current_sprint`
43
- - `state.artifacts` (status of each artifact)
42
+ - `state.artifacts` (status and version of each artifact)
43
+ - `state.features` (array of feature lifecycle entries, if any)
44
+ - `state.bugs` (array of bug tracking entries, if any)
45
+ - `state.refactors` (array of refactor tracking entries, if any)
46
+ - `state.reviews` (array of review entries, if any)
47
+ - `state.test_audits` (array of test audit entries, if any)
48
+ - `state.security_audits` (array of security audit entries, if any)
49
+ - `state.perf_audits` (array of performance audit entries, if any)
44
50
 
45
51
  ---
46
52
 
@@ -57,8 +63,9 @@ For each artifact, check whether the actual file exists on disk and has content.
57
63
  | Security | `security` | `docs/security.md` |
58
64
  | Epics | `epics` | `docs/epics/*.md` |
59
65
  | Stories | `stories` | `docs/stories/*.md` |
60
- | Risks | (not in config) | `docs/risks.md` |
61
- | Personas | (not in config) | `docs/personas.md` |
66
+ | Risks | `risks` | `docs/risks.md` |
67
+ | Personas | `personas` | `docs/personas.md` |
68
+ | Conventions | `conventions` | `docs/conventions.md` |
62
69
 
63
70
  For epics and stories, count the number of `.md` files in the directory.
64
71
 
@@ -132,50 +139,59 @@ Print the following formatted report. Use the actual values from the steps above
132
139
  Lifecycle Phase
133
140
  --------------------------------------------
134
141
 
135
- Current Phase: {phase or "NOT STARTED"}
142
+ Current Phase: {active phase from phase_log or "NOT STARTED"}
136
143
  Sprint: {current_sprint or "N/A"}
137
144
  Progress: {estimated_progress}
138
145
 
139
- Phase Progression:
140
- [x] discover {completed_date or "-- pending"} {gate_mode}
141
- [x] plan {completed_date or "-- pending"} {gate_mode}
142
- [ ] solve {status} {gate_mode}
143
- [ ] sprint {status} {gate_mode}
146
+ Phase Log (most recent first):
147
+ {For each entry in phase_log, most recent first:}
148
+ {[x] if completed, [>] if active} {phase} ({context}) {started_at} - {completed_at or "in progress"}
144
149
 
145
- Use [x] for completed phases, [>] for the active phase, [ ] for pending phases.
150
+ {If phase_log is empty:}
151
+ No phases started yet.
152
+
153
+ Standard Phase Progression:
154
+ [ ] ingest -- Ingest existing codebase (optional, for existing projects)
155
+ [ ] discover -- Discovery & Analysis
156
+ [ ] plan -- Planning & Architecture
157
+ [ ] solve -- Epic Sharding & Story Creation
158
+ [ ] sprint -- Implementation Sprint
159
+
160
+ Use [x] for completed phases, [>] for the active phase, [ ] for not yet run.
161
+ Note: Phases can be run multiple times. The phase log shows all executions.
146
162
 
147
163
  --------------------------------------------
148
- Phase History
164
+ Phase History (from phase_log)
149
165
  --------------------------------------------
150
166
 
151
- {For each entry in phase_history:}
152
- Phase: {phase}
153
- Started: {started_at}
154
- Completed: {completed_at}
155
- Approved by: {approved_by}
156
- Gate mode: {gate_mode}
157
- Results: {pass_count} pass, {warn_count} warn, {fail_count} fail
167
+ {For each entry in phase_log:}
168
+ Phase: {phase} Context: {context}
169
+ Started: {started_at}
170
+ Completed: {completed_at or "in progress"}
171
+ Approved by: {approved_by or "pending"}
158
172
 
159
- {If phase_history is empty:}
160
- No phases completed yet.
173
+ {If phase_log is empty:}
174
+ No phases started yet.
161
175
 
162
176
  --------------------------------------------
163
177
  Artifacts
164
178
  --------------------------------------------
165
179
 
166
- | Artifact | Config Status | On Disk | Path |
167
- |---------------|---------------|----------------|--------------------------|
168
- | Brief | {status} | {disk_status} | docs/brief.md |
169
- | Risks | -- | {disk_status} | docs/risks.md |
170
- | Personas | -- | {disk_status} | docs/personas.md |
171
- | PRD | {status} | {disk_status} | docs/prd.md |
172
- | Architecture | {status} | {disk_status} | docs/architecture.md |
173
- | UX Spec | {status} | {disk_status} | docs/ux-spec.md |
174
- | Security | {status} | {disk_status} | docs/security.md |
175
- | Epics | {status} | {count} files | docs/epics/ |
176
- | Stories | {status} | {count} files | docs/stories/ |
177
-
178
- For "Config Status" show: null, draft, approved
180
+ | Artifact | Status | Version | On Disk | Path |
181
+ |---------------|--------|---------|----------------|--------------------------|
182
+ | Brief | {s} | v{n} | {disk_status} | docs/brief.md |
183
+ | Risks | {s} | v{n} | {disk_status} | docs/risks.md |
184
+ | Personas | {s} | v{n} | {disk_status} | docs/personas.md |
185
+ | PRD | {s} | v{n} | {disk_status} | docs/prd.md |
186
+ | Architecture | {s} | v{n} | {disk_status} | docs/architecture.md |
187
+ | UX Spec | {s} | v{n} | {disk_status} | docs/ux-spec.md |
188
+ | Security | {s} | v{n} | {disk_status} | docs/security.md |
189
+ | Conventions | {s} | v{n} | {disk_status} | docs/conventions.md |
190
+ | Epics | {s} | v{n} | {count} files | docs/epics/ |
191
+ | Stories | {s} | v{n} | {count} files | docs/stories/ |
192
+
193
+ For "Status" show: null, draft, approved (from state.artifacts.{key}.status)
194
+ For "Version" show: v0 if never produced, v1+, from state.artifacts.{key}.version
179
195
  For "On Disk" show: missing, empty, has content, {N} files
180
196
 
181
197
  --------------------------------------------
@@ -196,12 +212,166 @@ Print the following formatted report. Use the actual values from the steps above
196
212
  {If not in sprint phase:}
197
213
  No active sprint.
198
214
 
215
+ --------------------------------------------
216
+ Features
217
+ --------------------------------------------
218
+
219
+ {If state.features has entries:}
220
+
221
+ Active Features:
222
+ | ID | Feature | Phase | Progress |
223
+ |----|---------|-------|----------|
224
+ | SNPR-{XXXX} | {title} | {phase} | {stories_complete}/{stories_total} stories |
225
+ | ... | ... | ... | ... |
226
+
227
+ Completed Features:
228
+ | ID | Feature | Completed | Stories |
229
+ |----|---------|-----------|---------|
230
+ | SNPR-{XXXX} | {title} | {completed_at} | {stories_total} |
231
+ | ... | ... | ... | ... |
232
+
233
+ Total: {active count} active, {completed count} completed
234
+
235
+ {If state.features is empty:}
236
+ No features started. Run /sniper-feature to add an incremental feature.
237
+
238
+ --------------------------------------------
239
+ Bugs
240
+ --------------------------------------------
241
+
242
+ {If state.bugs has entries:}
243
+
244
+ Active Bugs:
245
+ | ID | Bug | Severity | Status |
246
+ |----|-----|----------|--------|
247
+ | BUG-{NNN} | {title} | {severity} | {status} |
248
+
249
+ Resolved Bugs:
250
+ | ID | Bug | Severity | Resolved | Root Cause |
251
+ |----|-----|----------|----------|------------|
252
+ | BUG-{NNN} | {title} | {severity} | {resolved_at} | {root_cause} |
253
+
254
+ {If state.bugs is empty:}
255
+ No bugs tracked. Run /sniper-debug to investigate a bug.
256
+
257
+ --------------------------------------------
258
+ Refactors
259
+ --------------------------------------------
260
+
261
+ {If state.refactors has entries:}
262
+
263
+ Active Refactors:
264
+ | ID | Refactor | Status | Progress |
265
+ |----|----------|--------|----------|
266
+ | REF-{NNN} | {title} | {status} | {stories_complete}/{stories_total} stories |
267
+
268
+ Completed Refactors:
269
+ | ID | Refactor | Completed |
270
+ |----|----------|-----------|
271
+ | REF-{NNN} | {title} | {completed_at} |
272
+
273
+ {If state.refactors is empty:}
274
+ No refactors tracked. Run /sniper-audit --target refactor to start one.
275
+
276
+ --------------------------------------------
277
+ Reviews
278
+ --------------------------------------------
279
+
280
+ {If state.reviews has entries:}
281
+
282
+ Recent Reviews:
283
+ | ID | Type | Target | Recommendation | Date |
284
+ |----|------|--------|---------------|------|
285
+ | {id} | {pr/release} | {target} | {recommendation} | {created_at} |
286
+
287
+ {If state.reviews is empty:}
288
+ No reviews tracked. Run /sniper-audit --target review to review a PR or release.
289
+
290
+ --------------------------------------------
291
+ Test Audits
292
+ --------------------------------------------
293
+
294
+ {If state.test_audits has entries:}
295
+
296
+ Active Test Audits:
297
+ | ID | Audit | Status | Progress |
298
+ |----|-------|--------|----------|
299
+ | TST-{NNN} | {title} | {status} | {stories_complete}/{stories_total} stories |
300
+
301
+ Completed Test Audits:
302
+ | ID | Audit | Completed | Stories |
303
+ |----|-------|-----------|---------|
304
+ | TST-{NNN} | {title} | {completed_at} | {stories_total} |
305
+
306
+ {If state.test_audits is empty:}
307
+ No test audits tracked. Run /sniper-audit --target tests to analyze test quality.
308
+
309
+ --------------------------------------------
310
+ Security Audits
311
+ --------------------------------------------
312
+
313
+ {If state.security_audits has entries:}
314
+
315
+ Active Security Audits:
316
+ | ID | Audit | Status | Findings | Progress |
317
+ |----|-------|--------|----------|----------|
318
+ | SEC-{NNN} | {title} | {status} | {critical}C {high}H {medium}M {low}L | {stories_complete}/{stories_total} stories |
319
+
320
+ Completed Security Audits:
321
+ | ID | Audit | Completed | Findings | Stories |
322
+ |----|-------|-----------|----------|---------|
323
+ | SEC-{NNN} | {title} | {completed_at} | {critical}C {high}H | {stories_total} |
324
+
325
+ {If state.security_audits is empty:}
326
+ No security audits tracked. Run /sniper-audit --target security to audit security.
327
+
328
+ --------------------------------------------
329
+ Performance Audits
330
+ --------------------------------------------
331
+
332
+ {If state.perf_audits has entries:}
333
+
334
+ Active Performance Audits:
335
+ | ID | Audit | Status | Progress |
336
+ |----|-------|--------|----------|
337
+ | PERF-{NNN} | {title} | {status} | {stories_complete}/{stories_total} stories |
338
+
339
+ Completed Performance Audits:
340
+ | ID | Audit | Completed | Stories |
341
+ |----|-------|-----------|---------|
342
+ | PERF-{NNN} | {title} | {completed_at} | {stories_total} |
343
+
344
+ {If state.perf_audits is empty:}
345
+ No performance audits tracked. Run /sniper-audit --target performance to profile performance.
346
+
347
+ --------------------------------------------
348
+ Memory
349
+ --------------------------------------------
350
+
351
+ {If .sniper/memory/ directory exists:}
352
+
353
+ Memory:
354
+ Conventions: {N} confirmed, {M} candidates
355
+ Anti-Patterns: {N} confirmed, {M} candidates
356
+ Decisions: {N} active, {M} superseded
357
+ Retrospectives: {N} (latest: Sprint {X}, {date})
358
+
359
+ {If .sniper/memory/ does not exist:}
360
+ Memory: not initialized (run /sniper-memory to set up)
361
+
362
+ {If workspace memory is configured:}
363
+ Workspace Memory:
364
+ Conventions: {N}
365
+ Anti-Patterns: {N}
366
+ Decisions: {N}
367
+
199
368
  --------------------------------------------
200
369
  Review Gates
201
370
  --------------------------------------------
202
371
 
203
372
  | Gate | Mode | Status |
204
373
  |-----------------|------------|---------------------------|
374
+ | after_ingest | {mode} | {passed/pending/N/A} |
205
375
  | after_discover | {mode} | {passed/pending/N/A} |
206
376
  | after_plan | {mode} | {passed/pending/N/A} |
207
377
  | after_solve | {mode} | {passed/pending/N/A} |
@@ -232,7 +402,16 @@ Print the following formatted report. Use the actual values from the steps above
232
402
  {Generate contextual next-step suggestions based on current state:}
233
403
 
234
404
  {If not started:}
405
+ -> Run /sniper-ingest to bootstrap artifacts from an existing codebase
406
+ -> Run /sniper-discover to begin Phase 1: Discovery & Analysis (for new projects)
407
+
408
+ {If in ingest phase:}
409
+ -> Ingestion is in progress. When complete, run /sniper-review to evaluate artifacts.
410
+
411
+ {If ingest complete:}
412
+ -> Run /sniper-feature to add incremental features using ingested artifacts
235
413
  -> Run /sniper-discover to begin Phase 1: Discovery & Analysis
414
+ -> Run /sniper-audit to audit the codebase
236
415
 
237
416
  {If in discover phase:}
238
417
  -> Discovery is in progress. When complete, run /sniper-review to evaluate artifacts.
@@ -257,6 +436,32 @@ Print the following formatted report. Use the actual values from the steps above
257
436
  -> Sprint #{N} is in progress. {completed}/{total} stories complete.
258
437
  -> When all sprint stories are done, run /sniper-review to evaluate the sprint.
259
438
 
439
+ {If there are active bugs:}
440
+ -> {count} active bug(s). Run /sniper-debug --list to see details.
441
+
442
+ {If there are active refactors:}
443
+ -> {count} active refactor(s). Run /sniper-audit --target refactor --list to see details.
444
+
445
+ {If there are active features:}
446
+ -> {count} active feature(s). Run /sniper-feature --list to see details.
447
+
448
+ {If there are active test audits:}
449
+ -> {count} active test audit(s). Run /sniper-audit --target tests --list to see details.
450
+
451
+ {If there are active security audits:}
452
+ -> {count} active security audit(s). Run /sniper-audit --target security --list to see details.
453
+
454
+ {If there are active performance audits:}
455
+ -> {count} active performance audit(s). Run /sniper-audit --target performance --list to see details.
456
+
457
+ {Always show these as available commands:}
458
+ -> Run /sniper-debug to investigate a production bug
459
+ -> Run /sniper-audit --target review --pr {N} to review a pull request
460
+ -> Run /sniper-audit --target refactor to plan a large refactoring
461
+ -> Run /sniper-audit --target tests to analyze test quality
462
+ -> Run /sniper-audit --target security to audit security
463
+ -> Run /sniper-audit --target performance to profile performance
464
+
260
465
  {If there are out-of-sync artifacts:}
261
466
  -> WARNING: Some artifacts are out of sync between config and disk. Review the artifacts table above.
262
467
  ```