@sniper.ai/core 3.1.1 → 3.2.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.
@@ -20,11 +20,6 @@ checks:
20
20
  blocking: true
21
21
  description: Architecture plan includes Data Model section
22
22
 
23
- - id: ears_criteria
24
- description: All stories have EARS acceptance criteria
25
- check: grep:.sniper/artifacts/{protocol_id}/stories/:"shall"
26
- blocking: true
27
-
28
23
  - id: open_questions
29
24
  description: No unresolved open questions remain
30
25
  check: "!grep:.sniper/artifacts/{protocol_id}/:\\*\\*TBD\\*\\*|\\*\\*TODO\\*\\*|\\*\\*OPEN\\*\\*"
@@ -0,0 +1,29 @@
1
+ name: solve
2
+ description: Story sharding quality gate
3
+ # Note: {protocol_id} is resolved at gate-review time from the active checkpoint
4
+
5
+ checks:
6
+ - id: stories_exist
7
+ description: At least one story file exists
8
+ check: glob:.sniper/artifacts/{protocol_id}/stories/:*.md
9
+ blocking: true
10
+
11
+ - id: ears_criteria
12
+ description: All stories have EARS acceptance criteria
13
+ check: grep:.sniper/artifacts/{protocol_id}/stories/:"shall"
14
+ blocking: true
15
+
16
+ - id: stories_have_status
17
+ description: All stories have a status field in frontmatter
18
+ check: grep:.sniper/artifacts/{protocol_id}/stories/:"status:"
19
+ blocking: true
20
+
21
+ - id: stories_reference_architecture
22
+ description: Stories reference the architecture plan
23
+ check: grep:.sniper/artifacts/{protocol_id}/stories/:"plan.md"
24
+ blocking: false
25
+
26
+ - id: open_questions
27
+ description: No unresolved open questions in stories
28
+ check: "!grep:.sniper/artifacts/{protocol_id}/stories/:\\*\\*TBD\\*\\*|\\*\\*TODO\\*\\*|\\*\\*OPEN\\*\\*"
29
+ blocking: false
@@ -2,7 +2,7 @@
2
2
  "hooks": {
3
3
  "PreToolUse": [
4
4
  {
5
- "matcher": { "tools": ["Write"] },
5
+ "matcher": "Write",
6
6
  "hooks": [
7
7
  {
8
8
  "type": "command",
@@ -14,7 +14,7 @@
14
14
  ],
15
15
  "PostToolUse": [
16
16
  {
17
- "matcher": { "tools": ["Bash"] },
17
+ "matcher": "Bash",
18
18
  "hooks": [
19
19
  {
20
20
  "type": "command",
@@ -26,7 +26,6 @@
26
26
  ],
27
27
  "Stop": [
28
28
  {
29
- "matcher": {},
30
29
  "hooks": [
31
30
  {
32
31
  "type": "command",
@@ -2,7 +2,7 @@
2
2
  "hooks": {
3
3
  "PostToolUse": [
4
4
  {
5
- "matcher": { "tools": ["Bash"] },
5
+ "matcher": "Bash",
6
6
  "hooks": [
7
7
  {
8
8
  "type": "command",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sniper.ai/core",
3
- "version": "3.1.1",
3
+ "version": "3.2.0",
4
4
  "description": "SNIPER framework core — agents, skills, protocols, checklists, templates, and hooks",
5
5
  "type": "module",
6
6
  "exports": {
@@ -4,18 +4,28 @@ budget: 800000 # 800K tokens
4
4
 
5
5
  phases:
6
6
  - name: plan
7
- description: Feature design and story creation
7
+ description: Feature design and architecture
8
8
  agents:
9
9
  - architect
10
10
  - product-manager
11
- spawn_strategy: sequential # Architect designs first, PM writes stories from that
12
- interactive_review: true # Present plan to user for review/feedback before proceeding
11
+ spawn_strategy: sequential # Architect designs first, PM refines PRD from that
12
+ interactive_review: true # User reviews architecture before story sharding
13
13
  gate:
14
14
  checklist: plan
15
15
  human_approval: true
16
16
  outputs:
17
17
  - .sniper/artifacts/{protocol_id}/plan.md
18
18
  - .sniper/artifacts/{protocol_id}/prd.md
19
+
20
+ - name: solve
21
+ description: Story creation from approved architecture
22
+ agents:
23
+ - product-manager
24
+ spawn_strategy: single
25
+ gate:
26
+ checklist: solve
27
+ human_approval: false
28
+ outputs:
19
29
  - .sniper/artifacts/{protocol_id}/stories/
20
30
 
21
31
  - name: implement
@@ -4,33 +4,44 @@ budget: 2000000 # 2M tokens
4
4
 
5
5
  phases:
6
6
  - name: discover
7
- description: Research, analyze codebase, produce discovery spec
7
+ description: Research, analyze codebase, produce discovery spec and PRD
8
8
  agents:
9
9
  - analyst
10
10
  spawn_strategy: single # One agent, no team needed
11
+ interactive_review: true # User reviews spec/PRD before architecture begins
11
12
  gate:
12
13
  checklist: discover
13
- human_approval: false
14
+ human_approval: true
14
15
  outputs:
15
16
  - .sniper/artifacts/spec.md # Living master doc
16
17
  - .sniper/artifacts/codebase-overview.md # Living master doc
17
18
 
18
19
  - name: plan
19
- description: Architecture design, PRD creation, story breakdown
20
+ description: Architecture design and PRD refinement
20
21
  agents:
21
22
  - architect
22
23
  - product-manager
23
24
  spawn_strategy: team # Multiple agents, use TeamCreate
24
- interactive_review: true # Present plan to user for review/feedback before proceeding
25
+ interactive_review: true # User reviews architecture before story sharding
25
26
  coordination:
26
27
  - between: [architect, product-manager]
27
- topic: Architecture must be approved before stories reference it
28
+ topic: Architecture must be finalized before PRD is updated
28
29
  gate:
29
30
  checklist: plan
30
- human_approval: true # Human reviews the plan before implementation
31
+ human_approval: true # Human reviews architecture before stories are created
31
32
  outputs:
32
33
  - .sniper/artifacts/{protocol_id}/plan.md
33
34
  - .sniper/artifacts/{protocol_id}/prd.md
35
+
36
+ - name: solve
37
+ description: Epic sharding and story creation from approved architecture
38
+ agents:
39
+ - product-manager
40
+ spawn_strategy: single
41
+ gate:
42
+ checklist: solve
43
+ human_approval: false
44
+ outputs:
34
45
  - .sniper/artifacts/{protocol_id}/stories/
35
46
 
36
47
  - name: implement
@@ -76,6 +76,33 @@ properties:
76
76
  minimum: 0
77
77
  maximum: 100
78
78
  description: Phase completion percentage.
79
+ stories:
80
+ type: array
81
+ description: Per-story status tracking for the current protocol run.
82
+ items:
83
+ type: object
84
+ required:
85
+ - id
86
+ - title
87
+ - status
88
+ properties:
89
+ id:
90
+ type: string
91
+ description: Story identifier (e.g., "001", "002").
92
+ title:
93
+ type: string
94
+ description: Story title.
95
+ status:
96
+ type: string
97
+ enum:
98
+ - pending
99
+ - in_progress
100
+ - completed
101
+ - skipped
102
+ description: Current status of the story.
103
+ assigned_agent:
104
+ type: string
105
+ description: Agent assigned to implement this story.
79
106
  gate_results:
80
107
  type: array
81
108
  description: Results from completed gate reviews.
@@ -84,6 +84,8 @@ commits: [git SHAs produced]
84
84
 
85
85
  Update `.sniper/live-status.yaml` with current phase, agent statuses, and cost percentage.
86
86
 
87
+ After the `solve` phase completes, populate the `stories` array in `.sniper/live-status.yaml` by reading story files from `.sniper/artifacts/{protocol_id}/stories/`. During `implement`, update each story's status (`in_progress` → `completed`) as agents finish work on it.
88
+
87
89
  ### Gate
88
90
 
89
91
  1. Write `.sniper/pending-gate.yaml` with phase name and checklist reference
@@ -180,8 +182,10 @@ For agents working in worktrees (after all implementation agents complete):
180
182
 
181
183
  When a phase has `interactive_review: true`:
182
184
 
183
- 1. Read produced artifacts from `.sniper/artifacts/{protocol_id}/` (e.g., `plan.md`, `prd.md`, `stories/`)
184
- 2. Present a structured summary: key architectural decisions, component overview, story count, open questions
185
+ 1. Read produced artifacts from `.sniper/artifacts/{protocol_id}/` (e.g., `spec.md`, `plan.md`, `prd.md`)
186
+ 2. Present a structured summary appropriate to the phase:
187
+ - **discover:** scope, requirements, key findings, open questions
188
+ - **plan:** key architectural decisions, component overview, data model, trade-offs
185
189
  3. Offer options:
186
190
  - **Approve** — continue to next phase
187
191
  - **Request changes** — describe changes (architect/PM will revise, then re-present)
@@ -13,6 +13,12 @@ phases:
13
13
  # status: active | completed | failed
14
14
  progress: 0 # percentage
15
15
 
16
+ stories: []
17
+ # - id: "001"
18
+ # title: ""
19
+ # status: pending # pending | in_progress | completed | skipped
20
+ # assigned_agent: ""
21
+
16
22
  gate_results: []
17
23
  # - phase: discover
18
24
  # result: pass
@@ -1,3 +1,10 @@
1
+ ---
2
+ status: pending # pending | in_progress | completed | skipped
3
+ assigned_agent:
4
+ started_at:
5
+ completed_at:
6
+ ---
7
+
1
8
  # Story: [TITLE]
2
9
  <!-- Budget: 1500 tokens max -->
3
10