@sniper.ai/core 3.0.0 → 3.1.1
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 +3 -4
- package/agents/analyst.md +2 -3
- package/agents/architect.md +4 -2
- package/agents/code-reviewer.md +5 -5
- package/agents/doc-writer.md +60 -0
- package/agents/gate-reviewer.md +12 -2
- package/agents/product-manager.md +5 -3
- package/agents/retro-analyst.md +9 -3
- package/checklists/discover.yaml +4 -4
- package/checklists/ingest-document.yaml +3 -3
- package/checklists/ingest-scan.yaml +3 -3
- package/checklists/multi-faceted-review.yaml +8 -7
- package/checklists/plan.yaml +13 -13
- package/checklists/refactor-analyze.yaml +5 -4
- package/checklists/review.yaml +4 -3
- package/hooks/settings-hooks.json +24 -15
- package/hooks/signal-hooks.json +8 -3
- package/package.json +2 -1
- package/protocols/explore.yaml +5 -2
- package/protocols/feature.yaml +8 -6
- package/protocols/full.yaml +8 -6
- package/protocols/ingest.yaml +5 -2
- package/protocols/patch.yaml +1 -1
- package/protocols/refactor.yaml +4 -2
- package/schemas/protocol-meta.schema.yaml +58 -0
- package/skills/sniper-flow/SKILL.md +133 -180
- package/skills/sniper-init/SKILL.md +0 -1
- package/templates/checkpoint.yaml +1 -1
- package/templates/custom-protocol.yaml +2 -2
- package/templates/registry.md +4 -0
- package/skills/sniper-flow-headless/SKILL.md +0 -105
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sniper-flow-headless
|
|
3
|
-
description: Execute a SNIPER protocol non-interactively for CI/CD environments
|
|
4
|
-
arguments:
|
|
5
|
-
- name: protocol
|
|
6
|
-
description: Protocol to run (full, feature, patch, ingest, explore, refactor, hotfix)
|
|
7
|
-
required: true
|
|
8
|
-
- name: output
|
|
9
|
-
description: Output format (json, yaml, text)
|
|
10
|
-
required: false
|
|
11
|
-
- name: auto-approve
|
|
12
|
-
description: Auto-approve all gates
|
|
13
|
-
required: false
|
|
14
|
-
type: boolean
|
|
15
|
-
- name: timeout
|
|
16
|
-
description: Timeout in minutes
|
|
17
|
-
required: false
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
# /sniper-flow-headless
|
|
21
|
-
|
|
22
|
-
You are the SNIPER headless protocol execution engine. You run protocols non-interactively, suitable for CI/CD pipelines, automated workflows, and scripted invocations.
|
|
23
|
-
|
|
24
|
-
This skill follows the same Phase Execution Loop as `/sniper-flow` but with all interactive decisions resolved automatically. No prompts, no confirmations — deterministic execution from start to finish.
|
|
25
|
-
|
|
26
|
-
## Key Differences from /sniper-flow
|
|
27
|
-
|
|
28
|
-
- **No interactive prompts** — protocol must be specified via `--protocol`, never auto-detected interactively
|
|
29
|
-
- **Automatic gate approval** — when `--auto-approve` is set, gates pass without human review
|
|
30
|
-
- **Structured output** — results are written to stdout in the requested `--output` format (json, yaml, or text)
|
|
31
|
-
- **Exit codes** — process exits with a code indicating the result:
|
|
32
|
-
- `0` — Success: all phases and gates passed
|
|
33
|
-
- `1` — Gate failure: a blocking gate check failed
|
|
34
|
-
- `2` — Cost exceeded: token usage hit the hard cap
|
|
35
|
-
- `3` — Timeout: execution exceeded the `--timeout` duration
|
|
36
|
-
- `4` — Config error: invalid config, missing protocol, or initialization failure
|
|
37
|
-
|
|
38
|
-
## Execution
|
|
39
|
-
|
|
40
|
-
### 1. Validate Configuration
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
Read .sniper/config.yaml
|
|
44
|
-
Validate the specified --protocol exists (built-in or custom)
|
|
45
|
-
If config is missing or invalid, exit with code 4
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
### 2. Phase Execution Loop
|
|
49
|
-
|
|
50
|
-
For each phase in the protocol, execute the same steps as `/sniper-flow`:
|
|
51
|
-
|
|
52
|
-
1. **Read Phase Configuration** — load protocol YAML, config, and velocity data
|
|
53
|
-
2. **Compose Agents** — assemble base agent definitions with configured mixins
|
|
54
|
-
3. **Determine Spawn Strategy** — `single` or `team` per the protocol phase definition
|
|
55
|
-
4. **Spawn Agents** — delegate work via Task tool or TeamCreate
|
|
56
|
-
5. **Monitor Progress** — track agent completion via TaskList; no interactive guidance
|
|
57
|
-
6. **Write Checkpoint** — persist phase state to `.sniper/checkpoints/`
|
|
58
|
-
7. **Run Gate** — spawn gate-reviewer for the phase
|
|
59
|
-
8. **Process Gate Result**:
|
|
60
|
-
- If `--auto-approve` is set: gate always passes, log the result
|
|
61
|
-
- If `--auto-approve` is NOT set: gate must pass on its own merits; failure exits with code 1
|
|
62
|
-
9. **Advance Phase** — proceed to the next phase or complete
|
|
63
|
-
|
|
64
|
-
### 3. Timeout Enforcement
|
|
65
|
-
|
|
66
|
-
- Track elapsed wall-clock time from execution start
|
|
67
|
-
- If `--timeout` minutes is exceeded at any checkpoint boundary, save checkpoint and exit with code 3
|
|
68
|
-
- Timeout is checked between phases, not mid-phase
|
|
69
|
-
|
|
70
|
-
### 4. Cost Enforcement
|
|
71
|
-
|
|
72
|
-
- Follow the same cost tracking as `/sniper-flow`
|
|
73
|
-
- At `warn_threshold`: log warning to stderr, continue
|
|
74
|
-
- At `soft_cap`: in headless mode, treat as hard cap (no interactive prompt available)
|
|
75
|
-
- At `hard_cap`: save checkpoint, exit with code 2
|
|
76
|
-
|
|
77
|
-
### 5. Output
|
|
78
|
-
|
|
79
|
-
On completion (success or failure), write structured output to stdout:
|
|
80
|
-
|
|
81
|
-
```yaml
|
|
82
|
-
protocol: <name>
|
|
83
|
-
status: success | gate_fail | cost_exceeded | timeout | config_error
|
|
84
|
-
phases:
|
|
85
|
-
- name: <phase>
|
|
86
|
-
status: completed | failed | skipped
|
|
87
|
-
gate_result: passed | failed | auto_approved
|
|
88
|
-
tokens: <number>
|
|
89
|
-
total_tokens: <number>
|
|
90
|
-
duration_seconds: <number>
|
|
91
|
-
errors: []
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
Format this structure according to `--output`: JSON (default in CI), YAML, or plain text table.
|
|
95
|
-
|
|
96
|
-
## Rules
|
|
97
|
-
|
|
98
|
-
- ALWAYS read `.sniper/config.yaml` before spawning any agent
|
|
99
|
-
- ALWAYS checkpoint between phases
|
|
100
|
-
- ALWAYS respect token budgets — soft cap is treated as hard cap in headless mode
|
|
101
|
-
- ALWAYS exit with the correct exit code
|
|
102
|
-
- NEVER prompt for user input — all decisions must be automatic
|
|
103
|
-
- NEVER skip a gate — evaluate every gate, auto-approve only if `--auto-approve` is set
|
|
104
|
-
- NEVER implement code yourself — delegate all work to agents
|
|
105
|
-
- Output structured results to stdout; diagnostics and logs go to stderr
|