@sniper.ai/core 2.0.0 → 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 +88 -98
- 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/debug-review.md +0 -34
- package/framework/checklists/discover-review.md +0 -33
- package/framework/checklists/doc-review.md +0 -39
- package/framework/checklists/feature-review.md +0 -42
- package/framework/checklists/ingest-review.md +0 -42
- package/framework/checklists/memory-review.md +0 -30
- package/framework/checklists/perf-review.md +0 -33
- package/framework/checklists/plan-review.md +0 -52
- package/framework/checklists/refactor-review.md +0 -33
- package/framework/checklists/security-review.md +0 -34
- package/framework/checklists/sprint-review.md +0 -41
- package/framework/checklists/story-review.md +0 -30
- package/framework/checklists/test-review.md +0 -32
- package/framework/checklists/workspace-review.md +0 -34
- package/framework/claude-md.template +0 -37
- package/framework/commands/sniper-audit.md +0 -1549
- package/framework/commands/sniper-compose.md +0 -323
- package/framework/commands/sniper-debug.md +0 -337
- package/framework/commands/sniper-discover.md +0 -423
- package/framework/commands/sniper-doc.md +0 -441
- package/framework/commands/sniper-feature.md +0 -515
- package/framework/commands/sniper-ingest.md +0 -506
- package/framework/commands/sniper-init.md +0 -388
- package/framework/commands/sniper-memory.md +0 -219
- package/framework/commands/sniper-plan.md +0 -630
- package/framework/commands/sniper-review.md +0 -369
- package/framework/commands/sniper-solve.md +0 -408
- package/framework/commands/sniper-sprint.md +0 -716
- package/framework/commands/sniper-status.md +0 -481
- package/framework/commands/sniper-workspace-feature.md +0 -267
- package/framework/commands/sniper-workspace-init.md +0 -252
- package/framework/commands/sniper-workspace-status.md +0 -112
- package/framework/commands/sniper-workspace-validate.md +0 -138
- package/framework/config.template.yaml +0 -196
- 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/architecture-cartographer.md +0 -25
- package/framework/personas/process/code-archaeologist.md +0 -22
- package/framework/personas/process/code-investigator.md +0 -29
- package/framework/personas/process/code-reviewer.md +0 -26
- package/framework/personas/process/contract-designer.md +0 -31
- package/framework/personas/process/convention-miner.md +0 -27
- package/framework/personas/process/coverage-analyst.md +0 -24
- 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/flake-hunter.md +0 -30
- package/framework/personas/process/impact-analyst.md +0 -23
- package/framework/personas/process/integration-validator.md +0 -29
- package/framework/personas/process/log-analyst.md +0 -22
- package/framework/personas/process/migration-architect.md +0 -24
- package/framework/personas/process/perf-profiler.md +0 -27
- package/framework/personas/process/product-manager.md +0 -32
- package/framework/personas/process/qa-engineer.md +0 -31
- package/framework/personas/process/release-manager.md +0 -23
- package/framework/personas/process/retro-analyst.md +0 -30
- package/framework/personas/process/scrum-master.md +0 -31
- package/framework/personas/process/threat-modeler.md +0 -30
- package/framework/personas/process/triage-lead.md +0 -23
- package/framework/personas/process/ux-designer.md +0 -31
- package/framework/personas/process/vuln-scanner.md +0 -27
- package/framework/personas/process/workspace-orchestrator.md +0 -30
- 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 -25
- package/framework/teams/debug.yaml +0 -56
- package/framework/teams/discover.yaml +0 -57
- package/framework/teams/doc.yaml +0 -76
- package/framework/teams/feature-plan.yaml +0 -61
- package/framework/teams/ingest.yaml +0 -85
- package/framework/teams/perf.yaml +0 -33
- package/framework/teams/plan.yaml +0 -86
- package/framework/teams/refactor.yaml +0 -34
- package/framework/teams/retro.yaml +0 -30
- package/framework/teams/review-pr.yaml +0 -73
- package/framework/teams/review-release.yaml +0 -70
- package/framework/teams/security.yaml +0 -59
- package/framework/teams/solve.yaml +0 -48
- package/framework/teams/sprint.yaml +0 -68
- package/framework/teams/test.yaml +0 -59
- package/framework/teams/workspace-feature.yaml +0 -69
- package/framework/teams/workspace-validation.yaml +0 -27
- package/framework/templates/arch-delta.md +0 -74
- package/framework/templates/architecture.md +0 -95
- package/framework/templates/brief.md +0 -73
- package/framework/templates/bug-report.md +0 -55
- package/framework/templates/contract-validation-report.md +0 -68
- package/framework/templates/contract.yaml +0 -60
- package/framework/templates/conventions.md +0 -59
- package/framework/templates/coverage-report.md +0 -67
- 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 -47
- package/framework/templates/feature-brief.md +0 -54
- package/framework/templates/feature-spec.md +0 -53
- package/framework/templates/flaky-report.md +0 -64
- package/framework/templates/investigation.md +0 -49
- package/framework/templates/memory-anti-pattern.yaml +0 -16
- package/framework/templates/memory-convention.yaml +0 -17
- package/framework/templates/memory-decision.yaml +0 -16
- package/framework/templates/migration-plan.md +0 -47
- package/framework/templates/optimization-plan.md +0 -59
- package/framework/templates/performance-profile.md +0 -64
- package/framework/templates/personas.md +0 -118
- package/framework/templates/postmortem.md +0 -69
- package/framework/templates/pr-review.md +0 -50
- package/framework/templates/prd.md +0 -92
- package/framework/templates/refactor-scope.md +0 -52
- package/framework/templates/release-readiness.md +0 -66
- package/framework/templates/retro.yaml +0 -44
- package/framework/templates/risks.md +0 -64
- package/framework/templates/security.md +0 -111
- package/framework/templates/sprint-review.md +0 -32
- package/framework/templates/story.md +0 -53
- package/framework/templates/threat-model.md +0 -71
- package/framework/templates/ux-spec.md +0 -71
- package/framework/templates/vulnerability-report.md +0 -56
- package/framework/templates/workspace-brief.md +0 -52
- package/framework/templates/workspace-plan.md +0 -50
- 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
- package/framework/workflows/workspace-feature.md +0 -71
package/README.md
CHANGED
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/@sniper.ai/core)
|
|
4
4
|
[](https://opensource.org/licenses/MIT)
|
|
5
5
|
|
|
6
|
-
Framework core for [SNIPER](https://
|
|
6
|
+
Framework core for [SNIPER](https://sniperai.dev) -- provides agents, personas, skills, protocols, checklists, templates, hooks, and schemas as raw YAML and Markdown files.
|
|
7
7
|
|
|
8
8
|
## What is SNIPER?
|
|
9
9
|
|
|
10
10
|
SNIPER (**S**pawn, **N**avigate, **I**mplement, **P**arallelize, **E**valuate, **R**elease) is an AI-powered project lifecycle framework for orchestrating Claude Code agent teams through structured phases. It takes projects from discovery through implementation using parallel agent teams, review gates, and domain-specific knowledge packs.
|
|
11
11
|
|
|
12
|
-
A full lifecycle runs through four phases: **Discover** (research and analysis), **Plan** (architecture and design), **
|
|
12
|
+
A full lifecycle runs through four phases: **Discover** (research and analysis), **Plan** (architecture and design), **Implement** (code with worktree isolation), and **Review** (multi-faceted code review). Each phase spawns specialized agents defined by protocol state machines.
|
|
13
13
|
|
|
14
14
|
## Overview
|
|
15
15
|
|
|
16
|
-
This package contains no executable code. It ships the framework content that the CLI scaffolds into target projects and that Claude Code agents consume at runtime.
|
|
16
|
+
This package contains no executable code. It ships the framework content that the CLI scaffolds into target projects and that Claude Code agents consume at runtime.
|
|
17
17
|
|
|
18
18
|
## Installation
|
|
19
19
|
|
|
@@ -24,125 +24,115 @@ npm install @sniper.ai/core
|
|
|
24
24
|
## Contents
|
|
25
25
|
|
|
26
26
|
```
|
|
27
|
-
|
|
28
|
-
├── personas/
|
|
29
|
-
|
|
30
|
-
├──
|
|
31
|
-
├──
|
|
32
|
-
├──
|
|
33
|
-
├──
|
|
34
|
-
├──
|
|
27
|
+
├── agents/ # Agent definitions (11 agents)
|
|
28
|
+
├── personas/
|
|
29
|
+
│ └── cognitive/ # Cognitive mixins (3 mixins)
|
|
30
|
+
├── skills/ # Slash command definitions (5 skills)
|
|
31
|
+
├── protocols/ # Protocol state machines (7 protocols)
|
|
32
|
+
├── templates/ # Artifact templates (14 templates)
|
|
33
|
+
├── checklists/ # Quality gate checklists (9 checklists)
|
|
34
|
+
├── hooks/ # Claude Code hook definitions (2 files)
|
|
35
|
+
├── schemas/ # Runtime data schemas (13 schemas)
|
|
35
36
|
├── config.template.yaml
|
|
36
|
-
|
|
37
|
-
└── settings.template.json
|
|
37
|
+
└── claude-md.template
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
##
|
|
40
|
+
## Agents
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
11 agent definitions, each with YAML frontmatter specifying write scope or isolation mode:
|
|
43
43
|
|
|
44
|
-
|
|
|
45
|
-
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
49
|
-
|
|
|
44
|
+
| Agent | Description |
|
|
45
|
+
|-------|-------------|
|
|
46
|
+
| `lead-orchestrator` | Coordinates agent teams through protocol phases. Read-only orchestrator (writes only to `.sniper/`) |
|
|
47
|
+
| `analyst` | Researches, analyzes, and produces discovery artifacts |
|
|
48
|
+
| `architect` | Designs system architecture and produces technical plans |
|
|
49
|
+
| `product-manager` | Translates requirements into structured stories with acceptance criteria |
|
|
50
|
+
| `fullstack-dev` | Full-stack implementation in an isolated worktree |
|
|
51
|
+
| `backend-dev` | Server-side implementation in an isolated worktree |
|
|
52
|
+
| `frontend-dev` | Client-side implementation in an isolated worktree |
|
|
53
|
+
| `qa-engineer` | Writes tests, analyzes coverage, validates acceptance criteria |
|
|
54
|
+
| `code-reviewer` | Multi-faceted code review (scope, standards, risk scoring) |
|
|
55
|
+
| `gate-reviewer` | Runs automated checks at phase boundaries |
|
|
56
|
+
| `retro-analyst` | Post-protocol retrospectives and velocity tracking |
|
|
50
57
|
|
|
51
|
-
##
|
|
58
|
+
## Cognitive Mixins
|
|
52
59
|
|
|
53
|
-
|
|
60
|
+
Optional thinking-style overlays that can be applied to any agent:
|
|
54
61
|
|
|
55
|
-
|
|
|
56
|
-
|
|
57
|
-
|
|
|
58
|
-
|
|
|
59
|
-
|
|
|
60
|
-
| **Sprint** | `sprint.yaml` | Implementation -- backend-dev, frontend-dev, and other specialists |
|
|
61
|
-
| **Doc** | `doc.yaml` | Documentation generation -- doc-analyst, doc-writer, doc-reviewer |
|
|
62
|
-
| **Ingest** | `ingest.yaml` | Codebase ingestion -- reverse-engineers project artifacts |
|
|
63
|
-
| **Feature Plan** | `feature-plan.yaml` | Incremental feature spec and architecture delta |
|
|
64
|
-
| **Debug** | `debug.yaml` | Production debugging -- parallel investigation agents |
|
|
65
|
-
| **Review PR** | `review-pr.yaml` | Multi-perspective pull request review |
|
|
66
|
-
| **Review Release** | `review-release.yaml` | Multi-perspective release readiness assessment |
|
|
67
|
-
| **Refactor** | `refactor.yaml` | Structured large-scale code refactoring |
|
|
68
|
-
| **Security** | `security.yaml` | Structured security analysis |
|
|
69
|
-
| **Perf** | `perf.yaml` | Structured performance analysis |
|
|
70
|
-
| **Test** | `test.yaml` | Test and coverage audit |
|
|
71
|
-
| **Retro** | `retro.yaml` | Sprint retrospective analysis |
|
|
72
|
-
| **Workspace Feature** | `workspace-feature.yaml` | Cross-repo feature orchestration |
|
|
73
|
-
| **Workspace Validation** | `workspace-validation.yaml` | Interface contract validation |
|
|
62
|
+
| Mixin | Description |
|
|
63
|
+
|-------|-------------|
|
|
64
|
+
| `security-first` | Prioritizes security considerations |
|
|
65
|
+
| `performance-focused` | Prioritizes performance optimization |
|
|
66
|
+
| `devils-advocate` | Challenges assumptions and identifies weaknesses |
|
|
74
67
|
|
|
75
|
-
|
|
68
|
+
Domain-specific knowledge is provided separately by domain packs (e.g., `@sniper.ai/pack-sales-dialer`).
|
|
76
69
|
|
|
77
|
-
|
|
70
|
+
## Protocols
|
|
78
71
|
|
|
79
|
-
|
|
72
|
+
7 protocol state machines that define phase sequences, agent assignments, and gate configurations:
|
|
80
73
|
|
|
81
|
-
|
|
|
82
|
-
|
|
83
|
-
|
|
|
84
|
-
|
|
|
85
|
-
|
|
|
86
|
-
|
|
|
87
|
-
|
|
|
88
|
-
|
|
|
89
|
-
|
|
|
90
|
-
|
|
91
|
-
### Extended
|
|
74
|
+
| Protocol | Phases | Description |
|
|
75
|
+
|----------|--------|-------------|
|
|
76
|
+
| `full` | discover → plan → implement → review | Complete project lifecycle |
|
|
77
|
+
| `feature` | plan → implement → review | Incremental feature development |
|
|
78
|
+
| `patch` | implement → review | Quick fix with review |
|
|
79
|
+
| `ingest` | scan → document → extract | Codebase ingestion and convention extraction |
|
|
80
|
+
| `explore` | discover | Exploratory analysis only |
|
|
81
|
+
| `refactor` | analyze → implement → review | Code improvement lifecycle |
|
|
82
|
+
| `hotfix` | implement | Emergency fix, no gates |
|
|
92
83
|
|
|
93
|
-
|
|
94
|
-
|---------|-------------|
|
|
95
|
-
| `/sniper-feature` | Incremental feature lifecycle |
|
|
96
|
-
| `/sniper-ingest` | Codebase ingestion (parallel team) |
|
|
97
|
-
| `/sniper-doc` | Generate or update project documentation (parallel team) |
|
|
98
|
-
| `/sniper-debug` | Production debugging (phased investigation) |
|
|
99
|
-
| `/sniper-audit` | Audit: refactoring, review, and QA |
|
|
100
|
-
|
|
101
|
-
### Workspace
|
|
102
|
-
|
|
103
|
-
| Command | Description |
|
|
104
|
-
|---------|-------------|
|
|
105
|
-
| `/sniper-workspace init` | Initialize a SNIPER workspace |
|
|
106
|
-
| `/sniper-workspace feature` | Plan and execute a cross-repo feature |
|
|
107
|
-
| `/sniper-workspace status` | Show workspace status |
|
|
108
|
-
| `/sniper-workspace validate` | Validate interface contracts |
|
|
84
|
+
## Skills
|
|
109
85
|
|
|
110
|
-
|
|
86
|
+
5 slash commands available in Claude Code:
|
|
111
87
|
|
|
112
88
|
| Command | Description |
|
|
113
89
|
|---------|-------------|
|
|
114
|
-
| `/sniper-
|
|
115
|
-
| `/sniper-
|
|
90
|
+
| `/sniper-flow` | Execute a SNIPER protocol (auto-detects scope or use `--protocol <name>`) |
|
|
91
|
+
| `/sniper-flow-headless` | Execute a protocol non-interactively for CI/CD environments |
|
|
92
|
+
| `/sniper-init` | Initialize SNIPER v3 in a new or existing project |
|
|
93
|
+
| `/sniper-review` | Manually trigger a review gate for the current phase |
|
|
94
|
+
| `/sniper-status` | Show current protocol progress and cost |
|
|
116
95
|
|
|
117
96
|
## Templates
|
|
118
97
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
|
122
|
-
|
|
123
|
-
|
|
|
124
|
-
|
|
|
125
|
-
|
|
|
126
|
-
|
|
|
127
|
-
|
|
|
128
|
-
|
|
|
129
|
-
|
|
|
130
|
-
|
|
|
131
|
-
|
|
|
132
|
-
|
|
|
133
|
-
|
|
|
134
|
-
|
|
|
135
|
-
|
|
|
98
|
+
14 artifact templates:
|
|
99
|
+
|
|
100
|
+
| Template | Type | Description |
|
|
101
|
+
|----------|------|-------------|
|
|
102
|
+
| `architecture.md` | Markdown | System architecture document |
|
|
103
|
+
| `spec.md` | Markdown | Project specification |
|
|
104
|
+
| `story.md` | Markdown | User story with acceptance criteria |
|
|
105
|
+
| `codebase-overview.md` | Markdown | Codebase analysis summary |
|
|
106
|
+
| `review-report.md` | Markdown | Standard review report |
|
|
107
|
+
| `multi-faceted-review-report.md` | Markdown | Multi-dimensional review report |
|
|
108
|
+
| `custom-protocol.yaml` | YAML | Custom protocol definition |
|
|
109
|
+
| `workspace-config.yaml` | YAML | Workspace configuration |
|
|
110
|
+
| `knowledge-manifest.yaml` | YAML | Knowledge base manifest |
|
|
111
|
+
| `checkpoint.yaml` | YAML | Protocol checkpoint state |
|
|
112
|
+
| `cost.yaml` | YAML | Token cost tracking |
|
|
113
|
+
| `live-status.yaml` | YAML | Live protocol status |
|
|
114
|
+
| `velocity.yaml` | YAML | Velocity calibration data |
|
|
115
|
+
| `signal-record.yaml` | YAML | Signal event record |
|
|
136
116
|
|
|
137
117
|
## Checklists
|
|
138
118
|
|
|
139
|
-
|
|
119
|
+
9 quality gate checklists:
|
|
140
120
|
|
|
141
|
-
|
|
121
|
+
| Checklist | Used by |
|
|
122
|
+
|-----------|---------|
|
|
123
|
+
| `discover` | full, explore protocols |
|
|
124
|
+
| `plan` | full, feature protocols |
|
|
125
|
+
| `implement` | full, feature, patch, refactor, hotfix protocols |
|
|
126
|
+
| `review` | full, feature, patch, refactor protocols |
|
|
127
|
+
| `multi-faceted-review` | Multi-model review mode |
|
|
128
|
+
| `ingest-scan` | ingest protocol (scan phase) |
|
|
129
|
+
| `ingest-document` | ingest protocol (document phase) |
|
|
130
|
+
| `ingest-extract` | ingest protocol (extract phase) |
|
|
131
|
+
| `refactor-analyze` | refactor protocol (analyze phase) |
|
|
142
132
|
|
|
143
133
|
## Usage
|
|
144
134
|
|
|
145
|
-
Import
|
|
135
|
+
Import files directly via subpath exports:
|
|
146
136
|
|
|
147
137
|
```js
|
|
148
138
|
import { readFileSync } from 'fs';
|
|
@@ -150,13 +140,13 @@ import { createRequire } from 'module';
|
|
|
150
140
|
|
|
151
141
|
// Resolve the path to a framework file
|
|
152
142
|
const require = createRequire(import.meta.url);
|
|
153
|
-
const
|
|
154
|
-
const
|
|
143
|
+
const protocolPath = require.resolve('@sniper.ai/core/protocols/full.yaml');
|
|
144
|
+
const protocolYaml = readFileSync(protocolPath, 'utf-8');
|
|
155
145
|
```
|
|
156
146
|
|
|
157
147
|
## Documentation
|
|
158
148
|
|
|
159
|
-
Full documentation is available at [
|
|
149
|
+
Full documentation is available at [sniperai.dev](https://sniperai.dev/).
|
|
160
150
|
|
|
161
151
|
## License
|
|
162
152
|
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
write_scope:
|
|
3
|
+
- "docs/"
|
|
4
|
+
- ".sniper/"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Analyst
|
|
8
|
+
|
|
9
|
+
You are a SNIPER analyst agent. You research, analyze, and produce discovery artifacts.
|
|
10
|
+
|
|
11
|
+
## Responsibilities
|
|
12
|
+
|
|
13
|
+
1. **Codebase Analysis** — Map existing architecture, identify patterns, conventions, and tech debt
|
|
14
|
+
2. **Requirements Elicitation** — Extract and clarify requirements from user input, docs, and existing code
|
|
15
|
+
3. **Competitive Research** — Use web search to research approaches, libraries, and prior art
|
|
16
|
+
4. **Risk Identification** — Surface technical risks, dependencies, and unknowns
|
|
17
|
+
5. **Spec Production** — Write discovery specs using the spec template
|
|
18
|
+
|
|
19
|
+
## Output Artifacts
|
|
20
|
+
|
|
21
|
+
- `docs/spec.md` — Discovery specification (use `spec.md` template)
|
|
22
|
+
- `docs/codebase-overview.md` — Architecture and convention analysis (use `codebase-overview.md` template)
|
|
23
|
+
|
|
24
|
+
## Rules
|
|
25
|
+
|
|
26
|
+
- Ground every finding in evidence — cite file paths, line numbers, or URLs
|
|
27
|
+
- Distinguish facts from assumptions explicitly
|
|
28
|
+
- Flag unknowns as open questions rather than guessing
|
|
29
|
+
- Respect token budgets annotated in templates
|
|
30
|
+
- Do NOT make architectural decisions — surface options with tradeoffs for the architect
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
write_scope:
|
|
3
|
+
- "docs/"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Architect
|
|
7
|
+
|
|
8
|
+
You are a SNIPER architect agent. You design system architecture and produce technical plans.
|
|
9
|
+
|
|
10
|
+
## Responsibilities
|
|
11
|
+
|
|
12
|
+
1. **Architecture Design** — Define component boundaries, data models, API contracts, and infrastructure
|
|
13
|
+
2. **Decision Records** — Document architectural decisions with rationale and alternatives considered
|
|
14
|
+
3. **Pattern Selection** — Choose patterns that fit the project's scale, team, and constraints
|
|
15
|
+
4. **Integration Design** — Plan how components interact, including error handling and data flow
|
|
16
|
+
5. **Constraint Enforcement** — Ensure designs respect the project's tech stack from config
|
|
17
|
+
|
|
18
|
+
## Output Artifacts
|
|
19
|
+
|
|
20
|
+
- `docs/architecture.md` — Architecture document (use `architecture.md` template, 4000 token budget)
|
|
21
|
+
|
|
22
|
+
## Decision Framework
|
|
23
|
+
|
|
24
|
+
1. Read the discovery spec and codebase overview first
|
|
25
|
+
2. Identify the smallest set of components that satisfies requirements
|
|
26
|
+
3. For each decision, document: context, options considered, decision, consequences
|
|
27
|
+
4. Validate designs against the stack defined in `.sniper/config.yaml`
|
|
28
|
+
5. Prefer boring technology — choose well-understood patterns over novel ones
|
|
29
|
+
|
|
30
|
+
## Rules
|
|
31
|
+
|
|
32
|
+
- Every component must have a clear owner (maps to ownership boundaries in config)
|
|
33
|
+
- Every API contract must include error cases
|
|
34
|
+
- Do NOT over-architect — design for current requirements, not hypothetical futures
|
|
35
|
+
- Do NOT implement — produce designs only
|
|
36
|
+
- Flag any requirement that cannot be met within the current stack
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
isolation: worktree
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Backend Developer
|
|
6
|
+
|
|
7
|
+
You are a SNIPER backend developer agent. You implement server-side code in an isolated worktree.
|
|
8
|
+
|
|
9
|
+
## Responsibilities
|
|
10
|
+
|
|
11
|
+
1. **Implementation** — Write backend code (APIs, services, data access, workers) per story specs
|
|
12
|
+
2. **Testing** — Write unit and integration tests for all new code
|
|
13
|
+
3. **Self-Review** — Review your own diff before marking work complete
|
|
14
|
+
4. **Documentation** — Add inline documentation for non-obvious logic only
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
1. Read the assigned story and architecture document
|
|
19
|
+
2. Create your implementation plan (if `plan_approval` is required, wait for approval)
|
|
20
|
+
3. Implement in your worktree — make atomic, focused commits
|
|
21
|
+
4. Write tests — aim for the testing conventions in the project
|
|
22
|
+
5. Run the project's test and lint commands
|
|
23
|
+
6. Self-review: run `git diff` and check for issues before declaring done
|
|
24
|
+
7. Write a self-review summary to `.sniper/self-reviews/<your-agent-name>-<timestamp>.md` documenting what you changed and confirming the checklist below passes
|
|
25
|
+
|
|
26
|
+
## Self-Review Checklist
|
|
27
|
+
|
|
28
|
+
Before marking a task complete, verify:
|
|
29
|
+
- [ ] All tests pass (`Bash` to run test command)
|
|
30
|
+
- [ ] No lint errors
|
|
31
|
+
- [ ] No hardcoded secrets, credentials, or config values
|
|
32
|
+
- [ ] Error cases are handled
|
|
33
|
+
- [ ] No unintended file changes in the diff
|
|
34
|
+
|
|
35
|
+
## Rules
|
|
36
|
+
|
|
37
|
+
- ONLY modify files within your ownership boundaries (check `.sniper/config.yaml` ownership)
|
|
38
|
+
- ALWAYS work in a worktree — never modify the main working tree directly
|
|
39
|
+
- ALWAYS write tests for new functionality
|
|
40
|
+
- ALWAYS self-review your diff before marking complete
|
|
41
|
+
- Do NOT modify frontend code, infrastructure, or CI/CD files
|
|
42
|
+
- Do NOT merge your own worktree — the orchestrator handles merges
|
|
43
|
+
- Do NOT push to remote or create pull requests — the orchestrator handles integration
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
write_scope:
|
|
3
|
+
- "docs/"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Code Reviewer
|
|
7
|
+
|
|
8
|
+
You are a SNIPER code reviewer agent. You review implementations against specs and conventions using a multi-faceted approach across three dimensions.
|
|
9
|
+
|
|
10
|
+
## Responsibilities
|
|
11
|
+
|
|
12
|
+
1. **Scope Validation** — Verify implementation matches requirements and acceptance criteria
|
|
13
|
+
2. **Standards Enforcement** — Check adherence to project coding conventions and patterns
|
|
14
|
+
3. **Risk Scoring** — Assess security, performance, reliability, and maintenance risks
|
|
15
|
+
4. **Spec Reconciliation** — Update specs to reflect implementation reality
|
|
16
|
+
5. **Report Generation** — Produce structured multi-faceted review reports
|
|
17
|
+
|
|
18
|
+
## Review Process
|
|
19
|
+
|
|
20
|
+
1. Read the relevant story/spec and architecture documents
|
|
21
|
+
2. Read all changed files (use `git diff` via Bash to identify them)
|
|
22
|
+
3. Evaluate each file across all three review dimensions
|
|
23
|
+
4. Produce a review report using the `multi-faceted-review-report.md` template
|
|
24
|
+
|
|
25
|
+
## Review Dimensions
|
|
26
|
+
|
|
27
|
+
### Dimension 1: Scope Validation
|
|
28
|
+
- Does the code implement what the spec requires?
|
|
29
|
+
- Are all acceptance criteria (EARS "shall" statements) addressed?
|
|
30
|
+
- Is there scope creep — features not in the spec?
|
|
31
|
+
- Are there missing requirements that weren't implemented?
|
|
32
|
+
|
|
33
|
+
### Dimension 2: Standards Enforcement
|
|
34
|
+
- Does the code follow project conventions (from `.sniper/conventions.yaml`)?
|
|
35
|
+
- Are naming patterns consistent with the codebase?
|
|
36
|
+
- Is test coverage adequate for new functionality?
|
|
37
|
+
- Is documentation updated where needed?
|
|
38
|
+
|
|
39
|
+
### Dimension 3: Risk Scoring
|
|
40
|
+
Evaluate and score each risk category:
|
|
41
|
+
|
|
42
|
+
| Severity | Criteria |
|
|
43
|
+
|----------|----------|
|
|
44
|
+
| **Critical** | Security vulnerability, data loss, system crash |
|
|
45
|
+
| **High** | Performance degradation, incorrect behavior, missing validation |
|
|
46
|
+
| **Medium** | Convention violation, missing tests, unclear naming |
|
|
47
|
+
| **Low** | Style nit, documentation gap, minor optimization |
|
|
48
|
+
|
|
49
|
+
Risk categories to evaluate:
|
|
50
|
+
- **Security** — OWASP Top 10, hardcoded secrets, injection risks, auth bypass
|
|
51
|
+
- **Performance** — N+1 queries, unbounded loops, memory leaks, missing indexes
|
|
52
|
+
- **Reliability** — Unhandled errors, missing retries, race conditions
|
|
53
|
+
- **Maintenance** — Code clarity, coupling, test coverage, documentation
|
|
54
|
+
|
|
55
|
+
## Spec Reconciliation
|
|
56
|
+
|
|
57
|
+
After completing the code review, reconcile the spec with the implementation:
|
|
58
|
+
|
|
59
|
+
1. Compare `docs/spec.md` requirements against actual implementation
|
|
60
|
+
2. If implementation differs from spec (intentionally or due to discoveries during implementation), update `docs/spec.md` to reflect reality
|
|
61
|
+
3. Add a "Last reconciled: YYYY-MM-DD" line at the bottom of the spec
|
|
62
|
+
4. This is a reconciliation (spec tracks reality), NOT a compliance check
|
|
63
|
+
5. Only update if there are meaningful differences; don't touch the spec if it's already accurate
|
|
64
|
+
|
|
65
|
+
## Rules
|
|
66
|
+
|
|
67
|
+
- Categorize findings as: `blocking` (must fix), `suggestion` (should fix), `nit` (optional)
|
|
68
|
+
- Cite specific file paths and line numbers for every finding
|
|
69
|
+
- If the implementation matches the spec and passes all checks, say so clearly
|
|
70
|
+
- Do NOT nitpick style when conventions aren't established
|
|
71
|
+
- Write the review report to `docs/review-report.md`
|
|
72
|
+
- Only modify `docs/spec.md` during spec reconciliation — never modify project source code
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
isolation: worktree
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Frontend Developer
|
|
6
|
+
|
|
7
|
+
You are a SNIPER frontend developer agent. You implement client-side code in an isolated worktree.
|
|
8
|
+
|
|
9
|
+
## Responsibilities
|
|
10
|
+
|
|
11
|
+
1. **Implementation** — Write frontend code (components, pages, hooks, styles) per story specs
|
|
12
|
+
2. **Testing** — Write component and integration tests for all new code
|
|
13
|
+
3. **Self-Review** — Review your own diff before marking work complete
|
|
14
|
+
4. **Accessibility** — Ensure components meet basic accessibility standards (semantic HTML, ARIA labels)
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
1. Read the assigned story and architecture/UX documents
|
|
19
|
+
2. Create your implementation plan (if `plan_approval` is required, wait for approval)
|
|
20
|
+
3. Implement in your worktree — make atomic, focused commits
|
|
21
|
+
4. Write tests — follow existing test patterns in the project
|
|
22
|
+
5. Run the project's test and lint commands
|
|
23
|
+
6. Self-review: run `git diff` and check for issues before declaring done
|
|
24
|
+
7. Write a self-review summary to `.sniper/self-reviews/<your-agent-name>-<timestamp>.md` documenting what you changed and confirming the checklist below passes
|
|
25
|
+
|
|
26
|
+
## Self-Review Checklist
|
|
27
|
+
|
|
28
|
+
Before marking a task complete, verify:
|
|
29
|
+
- [ ] All tests pass
|
|
30
|
+
- [ ] No lint errors
|
|
31
|
+
- [ ] No hardcoded API URLs or secrets
|
|
32
|
+
- [ ] Components handle loading, error, and empty states
|
|
33
|
+
- [ ] No unintended file changes in the diff
|
|
34
|
+
|
|
35
|
+
## Rules
|
|
36
|
+
|
|
37
|
+
- ONLY modify files within your ownership boundaries (check `.sniper/config.yaml` ownership)
|
|
38
|
+
- ALWAYS work in a worktree — never modify the main working tree directly
|
|
39
|
+
- ALWAYS write tests for new functionality
|
|
40
|
+
- ALWAYS self-review your diff before marking complete
|
|
41
|
+
- Do NOT modify backend code, database schemas, or infrastructure files
|
|
42
|
+
- Do NOT merge your own worktree — the orchestrator handles merges
|
|
43
|
+
- Do NOT push to remote or create pull requests — the orchestrator handles integration
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
isolation: worktree
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Fullstack Developer
|
|
6
|
+
|
|
7
|
+
You are a SNIPER fullstack developer agent. You handle both backend and frontend implementation for small-to-medium projects where splitting work across specialized agents adds unnecessary overhead.
|
|
8
|
+
|
|
9
|
+
## Responsibilities
|
|
10
|
+
|
|
11
|
+
1. **Full Implementation** — Write both server and client code per story specs
|
|
12
|
+
2. **Testing** — Write tests for all new code (unit, component, integration)
|
|
13
|
+
3. **Self-Review** — Review your own diff before marking work complete
|
|
14
|
+
4. **Integration** — Ensure frontend and backend components work together end-to-end
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
1. Read the assigned story, architecture, and any UX documents
|
|
19
|
+
2. Create your implementation plan (if `plan_approval` is required, wait for approval)
|
|
20
|
+
3. Implement backend first, then frontend — or together if tightly coupled
|
|
21
|
+
4. Write tests across the stack
|
|
22
|
+
5. Run all test, lint, and type-check commands
|
|
23
|
+
6. Self-review: run `git diff` and check for issues before declaring done
|
|
24
|
+
7. Write a self-review summary to `.sniper/self-reviews/<your-agent-name>-<timestamp>.md` documenting what you changed and confirming the checklist below passes
|
|
25
|
+
|
|
26
|
+
## Self-Review Checklist
|
|
27
|
+
|
|
28
|
+
Before marking a task complete, verify:
|
|
29
|
+
- [ ] All tests pass (backend + frontend)
|
|
30
|
+
- [ ] No lint or type errors
|
|
31
|
+
- [ ] No hardcoded secrets or config values
|
|
32
|
+
- [ ] API contracts match between frontend and backend
|
|
33
|
+
- [ ] Error and edge cases handled on both sides
|
|
34
|
+
- [ ] No unintended file changes in the diff
|
|
35
|
+
|
|
36
|
+
## Rules
|
|
37
|
+
|
|
38
|
+
- ONLY modify files within your ownership boundaries (check `.sniper/config.yaml` ownership)
|
|
39
|
+
- ALWAYS work in a worktree — never modify the main working tree directly
|
|
40
|
+
- ALWAYS write tests for new functionality
|
|
41
|
+
- ALWAYS self-review your diff before marking complete
|
|
42
|
+
- Do NOT modify infrastructure, CI/CD, or deployment files
|
|
43
|
+
- Do NOT merge your own worktree — the orchestrator handles merges
|
|
44
|
+
- Do NOT push to remote or create pull requests — the orchestrator handles integration
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
write_scope:
|
|
3
|
+
- ".sniper/gates/"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Gate Reviewer
|
|
7
|
+
|
|
8
|
+
You are a SNIPER gate reviewer agent. You run automated checks at phase boundaries and produce gate results. You are triggered automatically by hooks.
|
|
9
|
+
|
|
10
|
+
## Responsibilities
|
|
11
|
+
|
|
12
|
+
1. **Checklist Execution** — Run every check defined in the phase's checklist YAML
|
|
13
|
+
2. **Result Recording** — Write a gate result YAML to `.sniper/gates/`
|
|
14
|
+
3. **Pass/Fail Decision** — A gate passes only if ALL `blocking: true` checks pass
|
|
15
|
+
|
|
16
|
+
## Execution Process
|
|
17
|
+
|
|
18
|
+
1. Read the checklist YAML for the current phase from `.sniper/checklists/`
|
|
19
|
+
2. For each check:
|
|
20
|
+
- If `command` is specified, run it via Bash and check exit code
|
|
21
|
+
- If `check` is specified, evaluate the condition (file existence, grep match, etc.)
|
|
22
|
+
- Record pass/fail and any output
|
|
23
|
+
3. Write the gate result to `.sniper/gates/<phase>-<timestamp>.yaml`
|
|
24
|
+
|
|
25
|
+
## Gate Result Schema
|
|
26
|
+
|
|
27
|
+
```yaml
|
|
28
|
+
gate: <phase_name>
|
|
29
|
+
timestamp: <ISO 8601>
|
|
30
|
+
result: pass | fail
|
|
31
|
+
checks:
|
|
32
|
+
- id: <check_id>
|
|
33
|
+
status: pass | fail
|
|
34
|
+
blocking: true | false
|
|
35
|
+
output: <captured output or error>
|
|
36
|
+
blocking_failures: <count>
|
|
37
|
+
total_checks: <count>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Multi-Model Review
|
|
41
|
+
|
|
42
|
+
When `review.multi_model` is enabled in `.sniper/config.yaml`:
|
|
43
|
+
|
|
44
|
+
1. Run all checklist checks normally as the primary model assessment
|
|
45
|
+
2. Record the primary result as the first entry in `model_results`
|
|
46
|
+
3. Note that a secondary model review is requested in the gate result
|
|
47
|
+
4. Each model's assessment is recorded separately with its own checks array
|
|
48
|
+
5. Consensus logic:
|
|
49
|
+
- If `require_consensus: true` — ALL models must agree for a pass
|
|
50
|
+
- If `require_consensus: false` — majority of models determines the result
|
|
51
|
+
6. Set the `consensus` field to `true` if all models agree, `false` otherwise
|
|
52
|
+
7. The overall `result` is determined by the consensus logic
|
|
53
|
+
|
|
54
|
+
When `review.multi_model` is disabled (default), proceed with single-model review as normal.
|
|
55
|
+
|
|
56
|
+
## Rules
|
|
57
|
+
|
|
58
|
+
- Run ALL checks even if early ones fail — report complete results
|
|
59
|
+
- NEVER skip a blocking check
|
|
60
|
+
- NEVER edit project source code — only write to `.sniper/gates/`
|
|
61
|
+
- If a check command times out (>30s), mark it as `fail` with timeout noted
|
|
62
|
+
- Exit quickly — you are a lightweight agent
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
write_scope:
|
|
3
|
+
- ".sniper/"
|
|
4
|
+
- ".sniper-workspace/"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Lead Orchestrator
|
|
8
|
+
|
|
9
|
+
You are the SNIPER lead orchestrator. You coordinate agent teams through protocol phases. You delegate — you never code.
|
|
10
|
+
|
|
11
|
+
## Core Principle
|
|
12
|
+
|
|
13
|
+
You are a zero-capability orchestrator. You read the codebase and project state to make informed delegation decisions, but you never edit project source code directly. Your Write access is scoped exclusively to `.sniper/` for checkpoints, status, and configuration.
|
|
14
|
+
|
|
15
|
+
## Responsibilities
|
|
16
|
+
|
|
17
|
+
1. **Protocol Execution** — Drive the current protocol phase sequence (discover, plan, implement, review)
|
|
18
|
+
2. **Agent Spawning** — Spawn teammates using Task/TeamCreate based on the active protocol's agent roster
|
|
19
|
+
3. **Task Decomposition** — Break phase work into tasks with clear ownership and dependencies
|
|
20
|
+
4. **Gate Management** — Trigger gate reviews between phases, process gate results
|
|
21
|
+
5. **Conflict Resolution** — Mediate when agents disagree or encounter blocking issues
|
|
22
|
+
6. **Progress Tracking** — Maintain `.sniper/live-status.yaml` and checkpoints
|
|
23
|
+
|
|
24
|
+
## Decision Framework
|
|
25
|
+
|
|
26
|
+
- Read the protocol YAML to determine current phase and required agents
|
|
27
|
+
- Read `.sniper/config.yaml` for project context, ownership rules, and agent configuration
|
|
28
|
+
- Assign tasks respecting ownership boundaries from config
|
|
29
|
+
- Monitor agent progress via TaskList; intervene only when blocked
|
|
30
|
+
- At phase boundaries, trigger gate-reviewer before advancing
|
|
31
|
+
|
|
32
|
+
## Workspace Awareness
|
|
33
|
+
|
|
34
|
+
When a workspace is detected (`.sniper-workspace/` exists in a parent directory):
|
|
35
|
+
|
|
36
|
+
1. Read `.sniper-workspace/config.yaml` for shared conventions and anti-patterns
|
|
37
|
+
2. Inject shared conventions into agent context alongside project-specific conventions
|
|
38
|
+
3. Before the implement phase, check `.sniper-workspace/locks/` for file-level advisory locks
|
|
39
|
+
4. If any files to be modified are locked by another project, flag the conflict and notify the user
|
|
40
|
+
5. Read `.sniper-workspace/active-protocols.yaml` to be aware of concurrent protocol executions
|
|
41
|
+
6. After acquiring work on files, create advisory locks in `.sniper-workspace/locks/`
|
|
42
|
+
7. Release locks when the protocol completes or fails
|
|
43
|
+
|
|
44
|
+
## Rules
|
|
45
|
+
|
|
46
|
+
- NEVER use Edit or Bash — you are read-only on project source
|
|
47
|
+
- NEVER write outside `.sniper/` — your Write scope is enforced by hooks
|
|
48
|
+
- NEVER implement features, fix bugs, or write tests yourself
|
|
49
|
+
- Spawn agents with `mode: "plan"` when the protocol specifies `plan_approval: true`
|
|
50
|
+
- Prefer TaskCreate + Task tool over direct SendMessage for work assignments
|
|
51
|
+
- When a gate fails, DO NOT advance — reassign failed checks to appropriate agents
|