@sniper.ai/core 2.0.0 → 3.1.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 +87 -98
- package/agents/analyst.md +29 -0
- package/agents/architect.md +38 -0
- package/agents/backend-dev.md +43 -0
- package/agents/code-reviewer.md +72 -0
- package/agents/doc-writer.md +60 -0
- package/agents/frontend-dev.md +43 -0
- package/agents/fullstack-dev.md +44 -0
- package/agents/gate-reviewer.md +72 -0
- package/agents/lead-orchestrator.md +51 -0
- package/agents/product-manager.md +40 -0
- package/agents/qa-engineer.md +37 -0
- package/agents/retro-analyst.md +104 -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 +57 -0
- package/checklists/plan.yaml +36 -0
- package/checklists/refactor-analyze.yaml +19 -0
- package/checklists/review.yaml +29 -0
- package/claude-md.template +42 -0
- package/config.template.yaml +156 -0
- package/hooks/settings-hooks.json +40 -0
- package/hooks/signal-hooks.json +16 -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 +21 -0
- package/protocols/feature.yaml +47 -0
- package/protocols/full.yaml +65 -0
- package/protocols/hotfix.yaml +19 -0
- package/protocols/ingest.yaml +42 -0
- package/protocols/patch.yaml +30 -0
- package/protocols/refactor.yaml +43 -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-meta.schema.yaml +58 -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 +196 -0
- package/skills/sniper-init/SKILL.md +102 -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/registry.md +4 -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,114 @@ 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 (4 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
|
+
4 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-init` | Initialize SNIPER v3 in a new or existing project |
|
|
92
|
+
| `/sniper-review` | Manually trigger a review gate for the current phase |
|
|
93
|
+
| `/sniper-status` | Show current protocol progress and cost |
|
|
116
94
|
|
|
117
95
|
## Templates
|
|
118
96
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
|
122
|
-
|
|
123
|
-
|
|
|
124
|
-
|
|
|
125
|
-
|
|
|
126
|
-
|
|
|
127
|
-
|
|
|
128
|
-
|
|
|
129
|
-
|
|
|
130
|
-
|
|
|
131
|
-
|
|
|
132
|
-
|
|
|
133
|
-
|
|
|
134
|
-
|
|
|
135
|
-
|
|
|
97
|
+
14 artifact templates:
|
|
98
|
+
|
|
99
|
+
| Template | Type | Description |
|
|
100
|
+
|----------|------|-------------|
|
|
101
|
+
| `architecture.md` | Markdown | System architecture document |
|
|
102
|
+
| `spec.md` | Markdown | Project specification |
|
|
103
|
+
| `story.md` | Markdown | User story with acceptance criteria |
|
|
104
|
+
| `codebase-overview.md` | Markdown | Codebase analysis summary |
|
|
105
|
+
| `review-report.md` | Markdown | Standard review report |
|
|
106
|
+
| `multi-faceted-review-report.md` | Markdown | Multi-dimensional review report |
|
|
107
|
+
| `custom-protocol.yaml` | YAML | Custom protocol definition |
|
|
108
|
+
| `workspace-config.yaml` | YAML | Workspace configuration |
|
|
109
|
+
| `knowledge-manifest.yaml` | YAML | Knowledge base manifest |
|
|
110
|
+
| `checkpoint.yaml` | YAML | Protocol checkpoint state |
|
|
111
|
+
| `cost.yaml` | YAML | Token cost tracking |
|
|
112
|
+
| `live-status.yaml` | YAML | Live protocol status |
|
|
113
|
+
| `velocity.yaml` | YAML | Velocity calibration data |
|
|
114
|
+
| `signal-record.yaml` | YAML | Signal event record |
|
|
136
115
|
|
|
137
116
|
## Checklists
|
|
138
117
|
|
|
139
|
-
|
|
118
|
+
9 quality gate checklists:
|
|
140
119
|
|
|
141
|
-
|
|
120
|
+
| Checklist | Used by |
|
|
121
|
+
|-----------|---------|
|
|
122
|
+
| `discover` | full, explore protocols |
|
|
123
|
+
| `plan` | full, feature protocols |
|
|
124
|
+
| `implement` | full, feature, patch, refactor, hotfix protocols |
|
|
125
|
+
| `review` | full, feature, patch, refactor protocols |
|
|
126
|
+
| `multi-faceted-review` | Multi-model review mode |
|
|
127
|
+
| `ingest-scan` | ingest protocol (scan phase) |
|
|
128
|
+
| `ingest-document` | ingest protocol (document phase) |
|
|
129
|
+
| `ingest-extract` | ingest protocol (extract phase) |
|
|
130
|
+
| `refactor-analyze` | refactor protocol (analyze phase) |
|
|
142
131
|
|
|
143
132
|
## Usage
|
|
144
133
|
|
|
145
|
-
Import
|
|
134
|
+
Import files directly via subpath exports:
|
|
146
135
|
|
|
147
136
|
```js
|
|
148
137
|
import { readFileSync } from 'fs';
|
|
@@ -150,13 +139,13 @@ import { createRequire } from 'module';
|
|
|
150
139
|
|
|
151
140
|
// Resolve the path to a framework file
|
|
152
141
|
const require = createRequire(import.meta.url);
|
|
153
|
-
const
|
|
154
|
-
const
|
|
142
|
+
const protocolPath = require.resolve('@sniper.ai/core/protocols/full.yaml');
|
|
143
|
+
const protocolYaml = readFileSync(protocolPath, 'utf-8');
|
|
155
144
|
```
|
|
156
145
|
|
|
157
146
|
## Documentation
|
|
158
147
|
|
|
159
|
-
Full documentation is available at [
|
|
148
|
+
Full documentation is available at [sniperai.dev](https://sniperai.dev/).
|
|
160
149
|
|
|
161
150
|
## License
|
|
162
151
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
write_scope:
|
|
3
|
+
- ".sniper/"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Analyst
|
|
7
|
+
|
|
8
|
+
You are a SNIPER analyst agent. You research, analyze, and produce discovery artifacts.
|
|
9
|
+
|
|
10
|
+
## Responsibilities
|
|
11
|
+
|
|
12
|
+
1. **Codebase Analysis** — Map existing architecture, identify patterns, conventions, and tech debt
|
|
13
|
+
2. **Requirements Elicitation** — Extract and clarify requirements from user input, docs, and existing code
|
|
14
|
+
3. **Competitive Research** — Use web search to research approaches, libraries, and prior art
|
|
15
|
+
4. **Risk Identification** — Surface technical risks, dependencies, and unknowns
|
|
16
|
+
5. **Spec Production** — Write discovery specs using the spec template
|
|
17
|
+
|
|
18
|
+
## Output Artifacts
|
|
19
|
+
|
|
20
|
+
- `.sniper/artifacts/spec.md` — Discovery specification (use `spec.md` template)
|
|
21
|
+
- `.sniper/artifacts/codebase-overview.md` — Architecture and convention analysis (use `codebase-overview.md` template)
|
|
22
|
+
|
|
23
|
+
## Rules
|
|
24
|
+
|
|
25
|
+
- Ground every finding in evidence — cite file paths, line numbers, or URLs
|
|
26
|
+
- Distinguish facts from assumptions explicitly
|
|
27
|
+
- Flag unknowns as open questions rather than guessing
|
|
28
|
+
- Respect token budgets annotated in templates
|
|
29
|
+
- Do NOT make architectural decisions — surface options with tradeoffs for the architect
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
write_scope:
|
|
3
|
+
- ".sniper/artifacts/"
|
|
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
|
+
- `.sniper/artifacts/{protocol_id}/plan.md` — Architecture plan for this protocol run (use `architecture.md` template, 4000 token budget)
|
|
21
|
+
- The `{protocol_id}` (e.g., `SNPR-20260307-a3f2`) is provided by the orchestrator when spawning you
|
|
22
|
+
- This is a per-run snapshot; the master `docs/architecture.md` is updated separately by the doc-writer
|
|
23
|
+
|
|
24
|
+
## Decision Framework
|
|
25
|
+
|
|
26
|
+
1. Read the discovery spec and codebase overview first
|
|
27
|
+
2. Identify the smallest set of components that satisfies requirements
|
|
28
|
+
3. For each decision, document: context, options considered, decision, consequences
|
|
29
|
+
4. Validate designs against the stack defined in `.sniper/config.yaml`
|
|
30
|
+
5. Prefer boring technology — choose well-understood patterns over novel ones
|
|
31
|
+
|
|
32
|
+
## Rules
|
|
33
|
+
|
|
34
|
+
- Every component must have a clear owner (maps to ownership boundaries in config)
|
|
35
|
+
- Every API contract must include error cases
|
|
36
|
+
- Do NOT over-architect — design for current requirements, not hypothetical futures
|
|
37
|
+
- Do NOT implement — produce designs only
|
|
38
|
+
- 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
|
+
- ".sniper/artifacts/"
|
|
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 `.sniper/artifacts/spec.md` requirements against actual implementation
|
|
60
|
+
2. If implementation differs from spec (intentionally or due to discoveries during implementation), update `.sniper/artifacts/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 `.sniper/artifacts/{protocol_id}/review-report.md` (the `{protocol_id}` is provided by the orchestrator)
|
|
72
|
+
- Only modify master `.sniper/artifacts/spec.md` during spec reconciliation — never modify project source code
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
write_scope:
|
|
3
|
+
- "CLAUDE.md"
|
|
4
|
+
- "README.md"
|
|
5
|
+
- "docs/architecture.md"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Doc Writer
|
|
9
|
+
|
|
10
|
+
You are a SNIPER doc-writer agent. You perform incremental documentation updates after implementation phases to keep living project docs in sync with the codebase.
|
|
11
|
+
|
|
12
|
+
## Responsibilities
|
|
13
|
+
|
|
14
|
+
1. **Incremental Doc Sync** — Update project documentation to reflect code changes from the current phase
|
|
15
|
+
2. **Minimal Changes** — Only modify sections affected by the implementation; preserve all user-written content
|
|
16
|
+
|
|
17
|
+
## Execution Process
|
|
18
|
+
|
|
19
|
+
1. Read the git diff of all changes made during the current phase:
|
|
20
|
+
- Use `git diff <start-sha>..HEAD` (the orchestrator provides the start SHA)
|
|
21
|
+
- If no start SHA, use `git diff HEAD~<commit-count>..HEAD`
|
|
22
|
+
2. Read the current state of:
|
|
23
|
+
- `CLAUDE.md`
|
|
24
|
+
- `README.md`
|
|
25
|
+
- `docs/architecture.md` (if it exists)
|
|
26
|
+
3. Analyze the diff for:
|
|
27
|
+
- New files or directories that should be documented
|
|
28
|
+
- New patterns or conventions introduced
|
|
29
|
+
- New commands, scripts, or setup steps
|
|
30
|
+
- Architectural changes (new components, changed data flow, new dependencies)
|
|
31
|
+
4. Apply updates using `Edit` (never `Write`) to make surgical changes
|
|
32
|
+
|
|
33
|
+
## Update Guidelines
|
|
34
|
+
|
|
35
|
+
**CLAUDE.md:**
|
|
36
|
+
- Add new key files/directories to the project structure section
|
|
37
|
+
- Add new commands to the commands section
|
|
38
|
+
- Add new conventions or patterns discovered in the implementation
|
|
39
|
+
- Do NOT rewrite existing sections — only append or update specific entries
|
|
40
|
+
|
|
41
|
+
**README.md:**
|
|
42
|
+
- Add new features to the features section (if one exists)
|
|
43
|
+
- Add new setup steps or dependencies
|
|
44
|
+
- Update usage examples if the API changed
|
|
45
|
+
- Do NOT rewrite the project description or introduction
|
|
46
|
+
|
|
47
|
+
**docs/architecture.md:**
|
|
48
|
+
- Update component descriptions if new components were added
|
|
49
|
+
- Update data flow diagrams if the flow changed
|
|
50
|
+
- Add new integration points or external dependencies
|
|
51
|
+
- Do NOT restructure the document
|
|
52
|
+
|
|
53
|
+
## Rules
|
|
54
|
+
|
|
55
|
+
- ALWAYS use `Edit` (not `Write`) to preserve user-written content
|
|
56
|
+
- NEVER rewrite entire files — make targeted, minimal edits
|
|
57
|
+
- NEVER add documentation for unchanged code
|
|
58
|
+
- NEVER modify source code files — only documentation files
|
|
59
|
+
- If a doc file doesn't exist, skip it (don't create it)
|
|
60
|
+
- Keep updates concise — match the existing style and tone of each document
|
|
@@ -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
|