@sniper.ai/core 1.0.1 → 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.
- package/README.md +119 -39
- package/agents/analyst.md +30 -0
- package/agents/architect.md +36 -0
- package/agents/backend-dev.md +43 -0
- package/agents/code-reviewer.md +72 -0
- package/agents/frontend-dev.md +43 -0
- package/agents/fullstack-dev.md +44 -0
- package/agents/gate-reviewer.md +62 -0
- package/agents/lead-orchestrator.md +51 -0
- package/agents/product-manager.md +38 -0
- package/agents/qa-engineer.md +37 -0
- package/agents/retro-analyst.md +98 -0
- package/checklists/discover.yaml +23 -0
- package/checklists/implement.yaml +28 -0
- package/checklists/ingest-document.yaml +18 -0
- package/checklists/ingest-extract.yaml +13 -0
- package/checklists/ingest-scan.yaml +18 -0
- package/checklists/multi-faceted-review.yaml +56 -0
- package/checklists/plan.yaml +36 -0
- package/checklists/refactor-analyze.yaml +18 -0
- package/checklists/review.yaml +28 -0
- package/claude-md.template +42 -0
- package/config.template.yaml +156 -0
- package/hooks/settings-hooks.json +31 -0
- package/hooks/signal-hooks.json +11 -0
- package/package.json +23 -5
- package/personas/cognitive/devils-advocate.md +24 -0
- package/personas/cognitive/performance-focused.md +23 -0
- package/personas/cognitive/security-first.md +24 -0
- package/protocols/explore.yaml +18 -0
- package/protocols/feature.yaml +45 -0
- package/protocols/full.yaml +63 -0
- package/protocols/hotfix.yaml +19 -0
- package/protocols/ingest.yaml +39 -0
- package/protocols/patch.yaml +30 -0
- package/protocols/refactor.yaml +41 -0
- package/schemas/checkpoint.schema.yaml +133 -0
- package/schemas/cost.schema.yaml +97 -0
- package/schemas/dependency-graph.schema.yaml +37 -0
- package/schemas/gate-result.schema.yaml +101 -0
- package/schemas/knowledge-manifest.schema.yaml +39 -0
- package/schemas/live-status.schema.yaml +122 -0
- package/schemas/protocol.schema.yaml +100 -0
- package/schemas/retro.schema.yaml +95 -0
- package/schemas/revert-plan.schema.yaml +40 -0
- package/schemas/signal.schema.yaml +39 -0
- package/schemas/velocity.schema.yaml +52 -0
- package/schemas/workspace-lock.schema.yaml +34 -0
- package/schemas/workspace.schema.yaml +82 -0
- package/skills/sniper-flow/SKILL.md +243 -0
- package/skills/sniper-flow-headless/SKILL.md +105 -0
- package/skills/sniper-init/SKILL.md +103 -0
- package/skills/sniper-review/SKILL.md +49 -0
- package/skills/sniper-status/SKILL.md +79 -0
- package/templates/architecture.md +23 -0
- package/templates/checkpoint.yaml +27 -0
- package/templates/codebase-overview.md +19 -0
- package/templates/cost.yaml +23 -0
- package/templates/custom-protocol.yaml +98 -0
- package/templates/knowledge-manifest.yaml +32 -0
- package/templates/live-status.yaml +26 -0
- package/templates/multi-faceted-review-report.md +28 -0
- package/templates/review-report.md +25 -0
- package/templates/signal-record.yaml +37 -0
- package/templates/spec.md +28 -0
- package/templates/story.md +19 -0
- package/templates/velocity.yaml +9 -0
- package/templates/workspace-config.yaml +44 -0
- package/framework/checklists/code-review.md +0 -33
- package/framework/checklists/discover-review.md +0 -33
- package/framework/checklists/doc-review.md +0 -39
- package/framework/checklists/plan-review.md +0 -52
- package/framework/checklists/sprint-review.md +0 -41
- package/framework/checklists/story-review.md +0 -30
- package/framework/claude-md.template +0 -37
- package/framework/commands/sniper-compose.md +0 -237
- package/framework/commands/sniper-discover.md +0 -397
- package/framework/commands/sniper-doc.md +0 -441
- package/framework/commands/sniper-init.md +0 -372
- package/framework/commands/sniper-plan.md +0 -608
- package/framework/commands/sniper-review.md +0 -305
- package/framework/commands/sniper-solve.md +0 -375
- package/framework/commands/sniper-sprint.md +0 -601
- package/framework/commands/sniper-status.md +0 -276
- package/framework/config.template.yaml +0 -117
- package/framework/personas/cognitive/devils-advocate.md +0 -30
- package/framework/personas/cognitive/mentor-explainer.md +0 -29
- package/framework/personas/cognitive/performance-focused.md +0 -30
- package/framework/personas/cognitive/security-first.md +0 -29
- package/framework/personas/cognitive/systems-thinker.md +0 -29
- package/framework/personas/cognitive/user-empathetic.md +0 -29
- package/framework/personas/domain/.gitkeep +0 -0
- package/framework/personas/process/analyst.md +0 -29
- package/framework/personas/process/architect.md +0 -30
- package/framework/personas/process/developer.md +0 -32
- package/framework/personas/process/doc-analyst.md +0 -63
- package/framework/personas/process/doc-reviewer.md +0 -62
- package/framework/personas/process/doc-writer.md +0 -42
- package/framework/personas/process/product-manager.md +0 -32
- package/framework/personas/process/qa-engineer.md +0 -31
- package/framework/personas/process/scrum-master.md +0 -31
- package/framework/personas/process/ux-designer.md +0 -31
- package/framework/personas/technical/ai-ml.md +0 -33
- package/framework/personas/technical/api-design.md +0 -32
- package/framework/personas/technical/backend.md +0 -32
- package/framework/personas/technical/database.md +0 -32
- package/framework/personas/technical/frontend.md +0 -33
- package/framework/personas/technical/infrastructure.md +0 -32
- package/framework/personas/technical/security.md +0 -34
- package/framework/settings.template.json +0 -6
- package/framework/spawn-prompts/_template.md +0 -22
- package/framework/teams/discover.yaml +0 -57
- package/framework/teams/doc.yaml +0 -76
- package/framework/teams/plan.yaml +0 -86
- package/framework/teams/solve.yaml +0 -48
- package/framework/teams/sprint.yaml +0 -68
- package/framework/templates/architecture.md +0 -72
- package/framework/templates/brief.md +0 -52
- package/framework/templates/doc-api.md +0 -53
- package/framework/templates/doc-guide.md +0 -35
- package/framework/templates/doc-readme.md +0 -49
- package/framework/templates/epic.md +0 -33
- package/framework/templates/personas.md +0 -118
- package/framework/templates/prd.md +0 -69
- package/framework/templates/risks.md +0 -64
- package/framework/templates/security.md +0 -90
- package/framework/templates/sprint-review.md +0 -32
- package/framework/templates/story.md +0 -37
- package/framework/templates/ux-spec.md +0 -54
- package/framework/workflows/discover-only.md +0 -39
- package/framework/workflows/full-lifecycle.md +0 -56
- package/framework/workflows/quick-feature.md +0 -44
- package/framework/workflows/sprint-cycle.md +0 -47
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
# /sniper-compose -- Compose a Spawn Prompt from Persona Layers
|
|
2
|
-
|
|
3
|
-
You are executing the `/sniper-compose` command. Your job is to assemble a teammate spawn prompt by merging persona layers into the template. Follow every step below precisely.
|
|
4
|
-
|
|
5
|
-
The user's arguments are provided in: $ARGUMENTS
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Step 0: Parse Arguments
|
|
10
|
-
|
|
11
|
-
Parse the following flags from `$ARGUMENTS`:
|
|
12
|
-
|
|
13
|
-
| Flag | Required | Description | Example |
|
|
14
|
-
|----------------|----------|------------------------------------------------|------------------------|
|
|
15
|
-
| `--process` | YES | Process persona layer name | `architect` |
|
|
16
|
-
| `--technical` | NO | Technical persona layer name (null if omitted) | `backend` |
|
|
17
|
-
| `--cognitive` | NO | Cognitive persona layer name (null if omitted) | `security-first` |
|
|
18
|
-
| `--domain` | NO | Domain context name from active domain pack | `telephony` |
|
|
19
|
-
| `--name` | YES | Display name for the teammate | `"Backend Architect"` |
|
|
20
|
-
| `--ownership` | NO | Ownership key from config.yaml | `backend` |
|
|
21
|
-
|
|
22
|
-
**If `--process` is missing**, print an error:
|
|
23
|
-
```
|
|
24
|
-
ERROR: --process is required. This specifies the process persona layer.
|
|
25
|
-
Usage: /sniper-compose --process architect --technical backend --cognitive security-first --name "Backend Architect"
|
|
26
|
-
Available process layers: analyst, product-manager, architect, ux-designer, scrum-master, developer, qa-engineer
|
|
27
|
-
```
|
|
28
|
-
Then STOP.
|
|
29
|
-
|
|
30
|
-
**If `--name` is missing**, print an error:
|
|
31
|
-
```
|
|
32
|
-
ERROR: --name is required. This is the display name for the teammate.
|
|
33
|
-
Usage: /sniper-compose --process architect --technical backend --name "Backend Architect"
|
|
34
|
-
```
|
|
35
|
-
Then STOP.
|
|
36
|
-
|
|
37
|
-
If no arguments are provided at all, print a usage guide:
|
|
38
|
-
```
|
|
39
|
-
SNIPER Compose -- Assemble a spawn prompt from persona layers
|
|
40
|
-
|
|
41
|
-
Usage:
|
|
42
|
-
/sniper-compose --process <layer> --name <name> [--technical <layer>] [--cognitive <layer>] [--domain <context>] [--ownership <key>]
|
|
43
|
-
|
|
44
|
-
Required:
|
|
45
|
-
--process Process persona layer (analyst, product-manager, architect, ux-designer, scrum-master, developer, qa-engineer)
|
|
46
|
-
--name Display name for the teammate (quoted if spaces)
|
|
47
|
-
|
|
48
|
-
Optional:
|
|
49
|
-
--technical Technical persona layer (backend, frontend, infrastructure, security, ai-ml, database, api-design)
|
|
50
|
-
--cognitive Cognitive persona layer (systems-thinker, security-first, performance-focused, user-empathetic, devils-advocate, mentor-explainer)
|
|
51
|
-
--domain Domain context from the active domain pack
|
|
52
|
-
--ownership Ownership key from config.yaml (backend, frontend, infrastructure, tests, docs)
|
|
53
|
-
|
|
54
|
-
Examples:
|
|
55
|
-
/sniper-compose --process architect --technical backend --cognitive security-first --name "Backend Architect" --ownership backend
|
|
56
|
-
/sniper-compose --process developer --technical frontend --cognitive user-empathetic --name "Frontend Dev" --ownership frontend
|
|
57
|
-
/sniper-compose --process analyst --cognitive systems-thinker --name "Business Analyst"
|
|
58
|
-
```
|
|
59
|
-
Then STOP.
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
|
|
63
|
-
## Step 1: Read the Template
|
|
64
|
-
|
|
65
|
-
Read the spawn prompt template from:
|
|
66
|
-
```
|
|
67
|
-
.sniper/spawn-prompts/_template.md
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
If it does not exist, print an error:
|
|
71
|
-
```
|
|
72
|
-
ERROR: Spawn prompt template not found at .sniper/spawn-prompts/_template.md
|
|
73
|
-
Run /sniper-init to set up the framework.
|
|
74
|
-
```
|
|
75
|
-
Then STOP.
|
|
76
|
-
|
|
77
|
-
Store the template content for merging in Step 4.
|
|
78
|
-
|
|
79
|
-
---
|
|
80
|
-
|
|
81
|
-
## Step 2: Read Each Persona Layer
|
|
82
|
-
|
|
83
|
-
For each specified layer, read the corresponding file. Track which layers were found and which were not.
|
|
84
|
-
|
|
85
|
-
### 2a: Process Layer (required)
|
|
86
|
-
Read: `.sniper/personas/process/{process_name}.md`
|
|
87
|
-
|
|
88
|
-
If the file does not exist, print an error listing available process layers:
|
|
89
|
-
```
|
|
90
|
-
ERROR: Process persona '{process_name}' not found.
|
|
91
|
-
Available process layers:
|
|
92
|
-
```
|
|
93
|
-
Then list all `.md` files in `.sniper/personas/process/` (without the extension). Then STOP.
|
|
94
|
-
|
|
95
|
-
### 2b: Technical Layer (optional)
|
|
96
|
-
If `--technical` was provided, read: `.sniper/personas/technical/{technical_name}.md`
|
|
97
|
-
|
|
98
|
-
If the file does not exist, print a warning:
|
|
99
|
-
```
|
|
100
|
-
WARNING: Technical persona '{technical_name}' not found. Skipping technical layer.
|
|
101
|
-
Available technical layers:
|
|
102
|
-
```
|
|
103
|
-
Then list all `.md` files in `.sniper/personas/technical/`. Set the technical layer content to:
|
|
104
|
-
```
|
|
105
|
-
No specific technical expertise assigned. Apply general engineering best practices.
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
### 2c: Cognitive Layer (optional)
|
|
109
|
-
If `--cognitive` was provided, read: `.sniper/personas/cognitive/{cognitive_name}.md`
|
|
110
|
-
|
|
111
|
-
If the file does not exist, print a warning and list available cognitive layers. Set the cognitive layer content to:
|
|
112
|
-
```
|
|
113
|
-
No specific cognitive style assigned. Apply balanced analytical thinking.
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
### 2d: Domain Layer (optional)
|
|
117
|
-
If `--domain` was provided:
|
|
118
|
-
1. Read `.sniper/config.yaml` to get the active `domain_pack` value
|
|
119
|
-
2. If `domain_pack` is null, print an error:
|
|
120
|
-
```
|
|
121
|
-
ERROR: No domain pack is configured. Set domain_pack in .sniper/config.yaml or run /sniper-init.
|
|
122
|
-
```
|
|
123
|
-
Set the domain layer content to `No domain-specific context available.`
|
|
124
|
-
3. If `domain_pack` is set, read: `.sniper/domain-packs/{domain_pack}/context/{domain_name}.md`
|
|
125
|
-
4. If the file does not exist, print a warning and list available contexts in that domain pack directory.
|
|
126
|
-
Set the domain layer content to `No domain-specific context available.`
|
|
127
|
-
|
|
128
|
-
If `--domain` was NOT provided, set the domain layer content to:
|
|
129
|
-
```
|
|
130
|
-
No domain-specific context loaded. Refer to project documentation for domain knowledge.
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
---
|
|
134
|
-
|
|
135
|
-
## Step 3: Read Ownership Rules
|
|
136
|
-
|
|
137
|
-
Read `.sniper/config.yaml` and extract the `ownership` section.
|
|
138
|
-
|
|
139
|
-
If `--ownership` was provided:
|
|
140
|
-
1. Look up the ownership key in the config (e.g., `backend`, `frontend`, `infrastructure`, `tests`, `docs`)
|
|
141
|
-
2. Extract the list of directory patterns for that key
|
|
142
|
-
3. Format them as a comma-separated string for the template
|
|
143
|
-
|
|
144
|
-
If `--ownership` was NOT provided:
|
|
145
|
-
1. Try to infer ownership from the `--technical` flag:
|
|
146
|
-
- `backend` technical -> `backend` ownership
|
|
147
|
-
- `frontend` technical -> `frontend` ownership
|
|
148
|
-
- `infrastructure` technical -> `infrastructure` ownership
|
|
149
|
-
- `security` technical -> `backend` ownership (security spans backend)
|
|
150
|
-
- `ai-ml` technical -> `backend` ownership
|
|
151
|
-
- `database` technical -> `backend` ownership
|
|
152
|
-
- `api-design` technical -> `backend` ownership
|
|
153
|
-
2. If no technical layer was specified, set ownership to: `"No specific ownership assigned -- coordinate with team lead"`
|
|
154
|
-
|
|
155
|
-
Format the ownership value as a readable list, for example:
|
|
156
|
-
```
|
|
157
|
-
src/backend/, src/api/, src/services/, src/db/, src/workers/
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
---
|
|
161
|
-
|
|
162
|
-
## Step 4: Merge Layers into Template
|
|
163
|
-
|
|
164
|
-
Take the template content from Step 1 and perform these replacements:
|
|
165
|
-
|
|
166
|
-
| Placeholder | Replace With |
|
|
167
|
-
|-------------------|-----------------------------------------------|
|
|
168
|
-
| `{name}` | The `--name` value |
|
|
169
|
-
| `{process_layer}` | Full content of the process persona file |
|
|
170
|
-
| `{technical_layer}`| Full content of the technical persona file (or default text) |
|
|
171
|
-
| `{cognitive_layer}`| Full content of the cognitive persona file (or default text) |
|
|
172
|
-
| `{domain_layer}` | Full content of the domain context file (or default text) |
|
|
173
|
-
| `{ownership}` | Formatted ownership directories from Step 3 |
|
|
174
|
-
|
|
175
|
-
The merged result is the complete spawn prompt.
|
|
176
|
-
|
|
177
|
-
---
|
|
178
|
-
|
|
179
|
-
## Step 5: Write the Composed Prompt
|
|
180
|
-
|
|
181
|
-
Generate a slug from the `--name` value:
|
|
182
|
-
- Lowercase
|
|
183
|
-
- Replace spaces with hyphens
|
|
184
|
-
- Remove special characters
|
|
185
|
-
- Example: `"Backend Architect"` -> `backend-architect`
|
|
186
|
-
|
|
187
|
-
Write the composed prompt to:
|
|
188
|
-
```
|
|
189
|
-
.sniper/spawn-prompts/{slug}.md
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
If a file already exists at that path, overwrite it silently (spawn prompts are regenerated as needed).
|
|
193
|
-
|
|
194
|
-
---
|
|
195
|
-
|
|
196
|
-
## Step 6: Display Preview and Summary
|
|
197
|
-
|
|
198
|
-
Print a summary of what was composed:
|
|
199
|
-
|
|
200
|
-
```
|
|
201
|
-
============================================
|
|
202
|
-
Spawn Prompt Composed
|
|
203
|
-
============================================
|
|
204
|
-
|
|
205
|
-
Name: {name}
|
|
206
|
-
Saved to: .sniper/spawn-prompts/{slug}.md
|
|
207
|
-
|
|
208
|
-
Layers Used:
|
|
209
|
-
Process: {process_name} (.sniper/personas/process/{process_name}.md)
|
|
210
|
-
Technical: {technical_name or "none"}
|
|
211
|
-
Cognitive: {cognitive_name or "none"}
|
|
212
|
-
Domain: {domain_name or "none"}
|
|
213
|
-
|
|
214
|
-
Ownership: {ownership_dirs}
|
|
215
|
-
|
|
216
|
-
============================================
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
Then print a preview of the composed prompt. Show the FULL content of the generated file so the user can review it.
|
|
220
|
-
|
|
221
|
-
After the preview, print:
|
|
222
|
-
```
|
|
223
|
-
This spawn prompt is ready to use. It will be loaded when a teammate is created with this persona configuration.
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
---
|
|
227
|
-
|
|
228
|
-
## IMPORTANT RULES
|
|
229
|
-
|
|
230
|
-
- Do NOT modify any persona layer source files -- they are read-only inputs.
|
|
231
|
-
- Do NOT modify the template file -- it is a read-only input.
|
|
232
|
-
- The composed output goes ONLY to `.sniper/spawn-prompts/{slug}.md`.
|
|
233
|
-
- If any required layer file is missing, STOP with a clear error. Do not generate placeholder content for required layers.
|
|
234
|
-
- For optional layers that are missing, use the default text specified above and continue.
|
|
235
|
-
- Always show the full preview so the user can verify before using the prompt.
|
|
236
|
-
- Preserve all markdown formatting from the persona layer files when merging.
|
|
237
|
-
- Do not add any extra content beyond what is in the template and layers.
|
|
@@ -1,397 +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. Verify Phase State
|
|
21
|
-
|
|
22
|
-
1. Read the `state.current_phase` value from `.sniper/config.yaml`.
|
|
23
|
-
2. **If `current_phase` is `null`:** Good -- this is a fresh project. Proceed.
|
|
24
|
-
3. **If `current_phase` is `discover`:** The discover phase is already in progress or was interrupted.
|
|
25
|
-
- Ask the user: "The discover phase appears to be in progress or was previously started. Do you want to restart it? This will overwrite any existing discovery artifacts. (yes/no)"
|
|
26
|
-
- If no, STOP.
|
|
27
|
-
4. **If `current_phase` is anything else** (plan, solve, sprint):
|
|
28
|
-
- Ask the user: "The project is currently in the '{current_phase}' phase. Running discover again will reset progress. Are you sure? (yes/no)"
|
|
29
|
-
- If no, STOP.
|
|
30
|
-
|
|
31
|
-
### 0c. Verify Framework Files
|
|
32
|
-
|
|
33
|
-
Check that these files exist (they are needed by the team):
|
|
34
|
-
- `.sniper/teams/discover.yaml`
|
|
35
|
-
- `.sniper/spawn-prompts/_template.md`
|
|
36
|
-
- `.sniper/checklists/discover-review.md`
|
|
37
|
-
- `.sniper/personas/process/analyst.md`
|
|
38
|
-
- `.sniper/personas/cognitive/systems-thinker.md`
|
|
39
|
-
- `.sniper/personas/cognitive/devils-advocate.md`
|
|
40
|
-
- `.sniper/personas/cognitive/user-empathetic.md`
|
|
41
|
-
|
|
42
|
-
If any are missing, print a warning listing the missing files but continue if at least the team YAML exists.
|
|
43
|
-
|
|
44
|
-
---
|
|
45
|
-
|
|
46
|
-
## Step 1: Update Lifecycle State
|
|
47
|
-
|
|
48
|
-
Edit `.sniper/config.yaml` to update the state section:
|
|
49
|
-
|
|
50
|
-
1. Set `state.current_phase: discover`
|
|
51
|
-
2. Append to `state.phase_history`:
|
|
52
|
-
```yaml
|
|
53
|
-
- phase: discover
|
|
54
|
-
started_at: "{current ISO timestamp}"
|
|
55
|
-
completed_at: null
|
|
56
|
-
approved_by: null
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
---
|
|
60
|
-
|
|
61
|
-
## Step 2: Read Team Definition
|
|
62
|
-
|
|
63
|
-
1. Read `.sniper/teams/discover.yaml` in full.
|
|
64
|
-
2. Parse out:
|
|
65
|
-
- `team_name` (should be `sniper-discover`)
|
|
66
|
-
- The list of `teammates` with their `name`, `compose` layers, and `tasks`
|
|
67
|
-
- The `coordination` rules (should be empty for discover -- independent research)
|
|
68
|
-
- The `review_gate` section (checklist path and mode)
|
|
69
|
-
3. Store these values for subsequent steps.
|
|
70
|
-
|
|
71
|
-
---
|
|
72
|
-
|
|
73
|
-
## Step 3: Read Project Context
|
|
74
|
-
|
|
75
|
-
Gather the context that teammates will need:
|
|
76
|
-
|
|
77
|
-
1. Read `.sniper/config.yaml` fully -- extract `project.name`, `project.description`, `project.type`, `stack`, `domain_pack`, and `ownership` sections.
|
|
78
|
-
2. If `domain_pack` is not null, check if `.sniper/domain-packs/{domain_pack}/` exists and read any context files within it.
|
|
79
|
-
3. Read the artifact template `.sniper/templates/brief.md` -- teammates will need to follow this template.
|
|
80
|
-
|
|
81
|
-
---
|
|
82
|
-
|
|
83
|
-
## Step 4: Compose Spawn Prompts
|
|
84
|
-
|
|
85
|
-
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.
|
|
86
|
-
|
|
87
|
-
### Teammate: analyst
|
|
88
|
-
|
|
89
|
-
1. Read these persona layer files:
|
|
90
|
-
- Process: `.sniper/personas/process/analyst.md`
|
|
91
|
-
- Technical: SKIP (null in team YAML)
|
|
92
|
-
- Cognitive: `.sniper/personas/cognitive/systems-thinker.md`
|
|
93
|
-
- Domain: If `domain_pack` is set, read `.sniper/domain-packs/{domain_pack}/context/*.md`. Otherwise skip.
|
|
94
|
-
|
|
95
|
-
2. Read the spawn prompt template: `.sniper/spawn-prompts/_template.md`
|
|
96
|
-
|
|
97
|
-
3. Assemble the spawn prompt by filling the template:
|
|
98
|
-
- `{name}` = "analyst"
|
|
99
|
-
- `{process_layer}` = contents of the process persona file
|
|
100
|
-
- `{technical_layer}` = "No specific technical lens for this role."
|
|
101
|
-
- `{cognitive_layer}` = contents of the cognitive persona file
|
|
102
|
-
- `{domain_layer}` = domain pack context if available, otherwise "No domain pack configured."
|
|
103
|
-
- `{ownership}` = the `docs` ownership paths from `config.yaml`
|
|
104
|
-
|
|
105
|
-
4. Append to the spawn prompt:
|
|
106
|
-
```
|
|
107
|
-
## Your Task
|
|
108
|
-
**Task ID:** market-research
|
|
109
|
-
**Task Name:** Market Research & Competitive Analysis
|
|
110
|
-
**Output File:** docs/brief.md
|
|
111
|
-
**Template:** .sniper/templates/brief.md
|
|
112
|
-
|
|
113
|
-
{task description from the team YAML}
|
|
114
|
-
|
|
115
|
-
## Project Context
|
|
116
|
-
- **Project:** {project.name}
|
|
117
|
-
- **Type:** {project.type}
|
|
118
|
-
- **Description:** {project.description}
|
|
119
|
-
- **Stack:** {summary of stack section}
|
|
120
|
-
|
|
121
|
-
## Instructions
|
|
122
|
-
1. Read the template at `.sniper/templates/brief.md` to understand the expected output format.
|
|
123
|
-
2. If a domain pack is configured, read the domain context files for industry knowledge.
|
|
124
|
-
3. Research and produce the artifact at `docs/brief.md` following the template exactly.
|
|
125
|
-
4. Every section in the template MUST be filled -- no empty sections.
|
|
126
|
-
5. When complete, message the team lead that your task is done.
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
5. Save this composed prompt as a variable for spawning.
|
|
130
|
-
|
|
131
|
-
### Teammate: risk-researcher
|
|
132
|
-
|
|
133
|
-
1. Read these persona layer files:
|
|
134
|
-
- Process: `.sniper/personas/process/analyst.md`
|
|
135
|
-
- Technical: `.sniper/personas/technical/infrastructure.md`
|
|
136
|
-
- Cognitive: `.sniper/personas/cognitive/devils-advocate.md`
|
|
137
|
-
- Domain: Same as above.
|
|
138
|
-
|
|
139
|
-
2. Assemble using the same template pattern:
|
|
140
|
-
- `{name}` = "risk-researcher"
|
|
141
|
-
- `{technical_layer}` = contents of the infrastructure technical persona
|
|
142
|
-
- `{ownership}` = the `docs` ownership paths
|
|
143
|
-
|
|
144
|
-
3. Append task context:
|
|
145
|
-
```
|
|
146
|
-
## Your Task
|
|
147
|
-
**Task ID:** risk-assessment
|
|
148
|
-
**Task Name:** Technical Feasibility & Risk Assessment
|
|
149
|
-
**Output File:** docs/risks.md
|
|
150
|
-
**Template:** .sniper/templates/risks.md
|
|
151
|
-
|
|
152
|
-
{task description from the team YAML}
|
|
153
|
-
|
|
154
|
-
## Project Context
|
|
155
|
-
{same project context as above}
|
|
156
|
-
|
|
157
|
-
## Instructions
|
|
158
|
-
1. Read the template at `.sniper/templates/risks.md` to understand the expected output format.
|
|
159
|
-
2. Assess technical feasibility, integration risks, compliance hurdles, and scalability challenges.
|
|
160
|
-
3. Challenge optimistic assumptions -- be the devil's advocate.
|
|
161
|
-
4. For each risk, provide a specific mitigation strategy.
|
|
162
|
-
5. Write the output to `docs/risks.md` following the template exactly.
|
|
163
|
-
6. When complete, message the team lead that your task is done.
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
### Teammate: user-researcher
|
|
167
|
-
|
|
168
|
-
1. Read these persona layer files:
|
|
169
|
-
- Process: `.sniper/personas/process/analyst.md`
|
|
170
|
-
- Technical: SKIP (null)
|
|
171
|
-
- Cognitive: `.sniper/personas/cognitive/user-empathetic.md`
|
|
172
|
-
- Domain: Same as above.
|
|
173
|
-
|
|
174
|
-
2. Assemble using the same template pattern:
|
|
175
|
-
- `{name}` = "user-researcher"
|
|
176
|
-
- `{technical_layer}` = "No specific technical lens for this role."
|
|
177
|
-
- `{ownership}` = the `docs` ownership paths
|
|
178
|
-
|
|
179
|
-
3. Append task context:
|
|
180
|
-
```
|
|
181
|
-
## Your Task
|
|
182
|
-
**Task ID:** user-personas
|
|
183
|
-
**Task Name:** User Persona & Journey Mapping
|
|
184
|
-
**Output File:** docs/personas.md
|
|
185
|
-
**Template:** .sniper/templates/personas.md
|
|
186
|
-
|
|
187
|
-
{task description from the team YAML}
|
|
188
|
-
|
|
189
|
-
## Project Context
|
|
190
|
-
{same project context as above}
|
|
191
|
-
|
|
192
|
-
## Instructions
|
|
193
|
-
1. Read the template at `.sniper/templates/personas.md` to understand the expected output format.
|
|
194
|
-
2. Define 2-4 distinct user personas with goals, pain points, and workflows.
|
|
195
|
-
3. Map the primary user journey for each persona.
|
|
196
|
-
4. Identify key friction points and moments of delight.
|
|
197
|
-
5. Write the output to `docs/personas.md` following the template exactly.
|
|
198
|
-
6. When complete, message the team lead that your task is done.
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
---
|
|
202
|
-
|
|
203
|
-
## Step 5: Create the Agent Team
|
|
204
|
-
|
|
205
|
-
Use the TeamCreate tool to create the team:
|
|
206
|
-
|
|
207
|
-
```
|
|
208
|
-
TeamCreate:
|
|
209
|
-
team_name: "sniper-discover"
|
|
210
|
-
description: "SNIPER Phase 1: Discovery & Analysis for {project.name}"
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
---
|
|
214
|
-
|
|
215
|
-
## Step 6: Create Tasks in the Shared Task List
|
|
216
|
-
|
|
217
|
-
Create one task per teammate using TaskCreate. Since coordination is empty (all tasks are independent), there are NO dependencies between tasks.
|
|
218
|
-
|
|
219
|
-
### Task 1: Market Research
|
|
220
|
-
|
|
221
|
-
```
|
|
222
|
-
TaskCreate:
|
|
223
|
-
subject: "Market Research & Competitive Analysis"
|
|
224
|
-
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."
|
|
225
|
-
activeForm: "Researching market landscape and competitors"
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
### Task 2: Risk Assessment
|
|
229
|
-
|
|
230
|
-
```
|
|
231
|
-
TaskCreate:
|
|
232
|
-
subject: "Technical Feasibility & Risk Assessment"
|
|
233
|
-
description: "Assess technical feasibility, integration risks, compliance hurdles, and scalability challenges. Challenge optimistic assumptions. Output: docs/risks.md."
|
|
234
|
-
activeForm: "Assessing risks and technical feasibility"
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
### Task 3: User Personas
|
|
238
|
-
|
|
239
|
-
```
|
|
240
|
-
TaskCreate:
|
|
241
|
-
subject: "User Persona & Journey Mapping"
|
|
242
|
-
description: "Define 2-4 user personas with goals, pain points, and workflows. Map primary user journeys. Output: docs/personas.md."
|
|
243
|
-
activeForm: "Defining user personas and journeys"
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
No dependencies between tasks -- all three run in parallel.
|
|
247
|
-
|
|
248
|
-
---
|
|
249
|
-
|
|
250
|
-
## Step 7: Spawn Teammates
|
|
251
|
-
|
|
252
|
-
Spawn each teammate using the Task tool. Use the composed spawn prompts from Step 4.
|
|
253
|
-
|
|
254
|
-
For each teammate, spawn using:
|
|
255
|
-
- `team_name`: "sniper-discover"
|
|
256
|
-
- `name`: the teammate name from the YAML (analyst, risk-researcher, user-researcher)
|
|
257
|
-
- The full composed spawn prompt as the instruction
|
|
258
|
-
|
|
259
|
-
Spawn all three teammates. They will work in parallel on their independent tasks.
|
|
260
|
-
|
|
261
|
-
After spawning, assign each task to its corresponding teammate using TaskUpdate with the `owner` field:
|
|
262
|
-
- Task 1 (Market Research) -> owner: "analyst"
|
|
263
|
-
- Task 2 (Risk Assessment) -> owner: "risk-researcher"
|
|
264
|
-
- Task 3 (User Personas) -> owner: "user-researcher"
|
|
265
|
-
|
|
266
|
-
Mark each task as `in_progress` via TaskUpdate.
|
|
267
|
-
|
|
268
|
-
---
|
|
269
|
-
|
|
270
|
-
## Step 8: Enter Delegate Mode
|
|
271
|
-
|
|
272
|
-
**You are now the team lead. You do NOT produce artifacts.**
|
|
273
|
-
|
|
274
|
-
Your responsibilities during execution:
|
|
275
|
-
1. Monitor task progress via TaskList
|
|
276
|
-
2. Respond to teammate messages (questions, blockers, completion notifications)
|
|
277
|
-
3. If a teammate is stuck or asks a question about the project, provide guidance from the project context
|
|
278
|
-
4. If a teammate finishes early, acknowledge their completion and update their task status to `completed`
|
|
279
|
-
5. Track which teammates have completed their work
|
|
280
|
-
|
|
281
|
-
**Do NOT:**
|
|
282
|
-
- Write to `docs/brief.md`, `docs/risks.md`, or `docs/personas.md` yourself
|
|
283
|
-
- Modify teammate artifacts
|
|
284
|
-
- Do research yourself
|
|
285
|
-
|
|
286
|
-
Wait for all three teammates to report completion.
|
|
287
|
-
|
|
288
|
-
---
|
|
289
|
-
|
|
290
|
-
## Step 9: Verify Artifacts Exist
|
|
291
|
-
|
|
292
|
-
Once all three teammates report completion:
|
|
293
|
-
|
|
294
|
-
1. Verify these files exist and are non-empty:
|
|
295
|
-
- `docs/brief.md`
|
|
296
|
-
- `docs/risks.md`
|
|
297
|
-
- `docs/personas.md`
|
|
298
|
-
|
|
299
|
-
2. If any file is missing or empty, message the responsible teammate and ask them to complete it.
|
|
300
|
-
|
|
301
|
-
3. Do NOT proceed to Step 10 until all three files exist and contain content.
|
|
302
|
-
|
|
303
|
-
---
|
|
304
|
-
|
|
305
|
-
## Step 10: Run Review Gate
|
|
306
|
-
|
|
307
|
-
Read the review gate configuration from the team YAML: `review_gate.mode` and `review_gate.checklist`.
|
|
308
|
-
|
|
309
|
-
1. Read the review checklist at `.sniper/checklists/discover-review.md`.
|
|
310
|
-
2. For each checklist item, perform a quick evaluation by reading the relevant artifact and checking if the item is addressed.
|
|
311
|
-
3. Compile a review summary with:
|
|
312
|
-
- Total checklist items
|
|
313
|
-
- Items that PASS
|
|
314
|
-
- Items that NEED ATTENTION (not fully met but not blocking)
|
|
315
|
-
- Items that FAIL (critical gaps)
|
|
316
|
-
|
|
317
|
-
### Gate Decision
|
|
318
|
-
|
|
319
|
-
The discover gate mode is **flexible**:
|
|
320
|
-
|
|
321
|
-
- **If there are no FAIL items:** Auto-advance. Print the review summary and note any NEED ATTENTION items for async review.
|
|
322
|
-
- **If there are FAIL items:** Present the failures to the user and ask:
|
|
323
|
-
> "The discovery review found {N} critical issues. Would you like to:
|
|
324
|
-
> 1. Have the team fix the issues (I will message the relevant teammates)
|
|
325
|
-
> 2. Override and advance anyway
|
|
326
|
-
> 3. Stop and review manually"
|
|
327
|
-
|
|
328
|
-
If option 1: Message the relevant teammates with specific feedback, wait for fixes, then re-run the checklist.
|
|
329
|
-
If option 2: Proceed with a note that issues were overridden.
|
|
330
|
-
If option 3: STOP and let the user handle it.
|
|
331
|
-
|
|
332
|
-
---
|
|
333
|
-
|
|
334
|
-
## Step 11: Update State and Shut Down Team
|
|
335
|
-
|
|
336
|
-
### Update Lifecycle State
|
|
337
|
-
|
|
338
|
-
Edit `.sniper/config.yaml`:
|
|
339
|
-
|
|
340
|
-
1. Set `state.artifacts.brief: draft`
|
|
341
|
-
2. Update the discover entry in `state.phase_history` to add `completed_at: "{current ISO timestamp}"`
|
|
342
|
-
3. If auto-advanced (flexible gate passed), set `approved_by: "auto-flexible"`
|
|
343
|
-
|
|
344
|
-
### Shut Down Teammates
|
|
345
|
-
|
|
346
|
-
Send a shutdown request to each teammate:
|
|
347
|
-
- Send shutdown_request to "analyst"
|
|
348
|
-
- Send shutdown_request to "risk-researcher"
|
|
349
|
-
- Send shutdown_request to "user-researcher"
|
|
350
|
-
|
|
351
|
-
Wait for all teammates to acknowledge shutdown.
|
|
352
|
-
|
|
353
|
-
---
|
|
354
|
-
|
|
355
|
-
## Step 12: Present Results and Next Steps
|
|
356
|
-
|
|
357
|
-
Print a formatted summary:
|
|
358
|
-
|
|
359
|
-
```
|
|
360
|
-
============================================
|
|
361
|
-
SNIPER Phase 1: Discovery Complete
|
|
362
|
-
============================================
|
|
363
|
-
|
|
364
|
-
Artifacts Produced:
|
|
365
|
-
- docs/brief.md [draft]
|
|
366
|
-
- docs/risks.md [draft]
|
|
367
|
-
- docs/personas.md [draft]
|
|
368
|
-
|
|
369
|
-
Review Gate: FLEXIBLE
|
|
370
|
-
Passed: {count}/{total} checklist items
|
|
371
|
-
Attention: {count} items flagged for async review
|
|
372
|
-
Failed: {count} critical issues
|
|
373
|
-
|
|
374
|
-
Phase Duration: {time elapsed}
|
|
375
|
-
|
|
376
|
-
============================================
|
|
377
|
-
Next Steps
|
|
378
|
-
============================================
|
|
379
|
-
|
|
380
|
-
1. Review the discovery artifacts in `docs/`
|
|
381
|
-
2. When ready, run `/sniper-plan` to begin Phase 2: Planning & Architecture
|
|
382
|
-
3. Or run `/sniper-status` to see the full lifecycle state
|
|
383
|
-
|
|
384
|
-
============================================
|
|
385
|
-
```
|
|
386
|
-
|
|
387
|
-
---
|
|
388
|
-
|
|
389
|
-
## IMPORTANT RULES
|
|
390
|
-
|
|
391
|
-
- You are the LEAD. You coordinate. You do NOT write artifact files.
|
|
392
|
-
- All three teammates work in PARALLEL -- do not serialize their work.
|
|
393
|
-
- 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.
|
|
394
|
-
- If `$ARGUMENTS` contains "skip-review", skip Step 10 and go straight to Step 11.
|
|
395
|
-
- 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.
|
|
396
|
-
- All file paths are relative to the project root.
|
|
397
|
-
- Do NOT proceed to `/sniper-plan` automatically -- always let the user initiate the next phase.
|