@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
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sniper-status
|
|
3
|
+
description: Show current SNIPER protocol progress and cost
|
|
4
|
+
arguments: []
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /sniper-status
|
|
8
|
+
|
|
9
|
+
Display the current state of SNIPER in this project.
|
|
10
|
+
|
|
11
|
+
## Process
|
|
12
|
+
|
|
13
|
+
### 1. Read State Files
|
|
14
|
+
|
|
15
|
+
Read the following files (skip if they don't exist):
|
|
16
|
+
- `.sniper/config.yaml` — Project configuration
|
|
17
|
+
- `.sniper/live-status.yaml` — Active protocol progress
|
|
18
|
+
- `.sniper/cost.yaml` — Token usage tracking
|
|
19
|
+
|
|
20
|
+
If `.sniper/config.yaml` doesn't exist, display: "SNIPER is not initialized. Run `/sniper-init` first."
|
|
21
|
+
|
|
22
|
+
### 2. Display Status
|
|
23
|
+
|
|
24
|
+
Format and display:
|
|
25
|
+
|
|
26
|
+
**Project Info**:
|
|
27
|
+
- Project name and type
|
|
28
|
+
- Stack summary (language, framework, database)
|
|
29
|
+
- Plugins installed
|
|
30
|
+
|
|
31
|
+
**Protocol Status** (if active):
|
|
32
|
+
- Protocol name and current phase
|
|
33
|
+
- Phase progress (completed/total phases)
|
|
34
|
+
- Agent status per active phase
|
|
35
|
+
- Gate results for completed phases
|
|
36
|
+
|
|
37
|
+
**Cost Summary** (if tracking enabled):
|
|
38
|
+
- Tokens used vs budget
|
|
39
|
+
- Budget percentage with visual bar
|
|
40
|
+
- Warning if approaching soft/hard cap
|
|
41
|
+
|
|
42
|
+
**Recent Activity**:
|
|
43
|
+
- Last 3 checkpoints with timestamps
|
|
44
|
+
- Last gate result
|
|
45
|
+
|
|
46
|
+
**Velocity Trends** (if velocity data exists):
|
|
47
|
+
- Read `.sniper/memory/velocity.yaml`
|
|
48
|
+
- Show last 5 executions per protocol with tokens used
|
|
49
|
+
- Show calibrated budget vs configured budget comparison
|
|
50
|
+
- Show trend direction: ↑ (increasing usage), ↓ (decreasing usage), → (stable)
|
|
51
|
+
|
|
52
|
+
### 3. Format Output
|
|
53
|
+
|
|
54
|
+
Use clear formatting:
|
|
55
|
+
```
|
|
56
|
+
Project: my-app (saas)
|
|
57
|
+
Stack: TypeScript, Next.js, PostgreSQL
|
|
58
|
+
|
|
59
|
+
Protocol: feature (phase 2/3)
|
|
60
|
+
Phase: implement [===========-----] 68%
|
|
61
|
+
backend-dev: implementing (3/5 tasks)
|
|
62
|
+
qa-engineer: waiting
|
|
63
|
+
|
|
64
|
+
Gates:
|
|
65
|
+
plan: PASS (2025-01-15)
|
|
66
|
+
|
|
67
|
+
Cost: 245K / 800K tokens (31%)
|
|
68
|
+
[======--------------] 31%
|
|
69
|
+
|
|
70
|
+
Velocity:
|
|
71
|
+
feature: 612K avg (calibrated: 750K, configured: 800K) →
|
|
72
|
+
patch: 145K avg (calibrated: 180K, configured: 200K) ↓
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Rules
|
|
76
|
+
|
|
77
|
+
- Read-only — this skill never modifies any files
|
|
78
|
+
- If no protocol is active, show config summary only
|
|
79
|
+
- If cost tracking is disabled, skip cost section
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Architecture
|
|
2
|
+
<!-- Budget: 4000 tokens max -->
|
|
3
|
+
|
|
4
|
+
## Context
|
|
5
|
+
<!-- ~400 tokens: Technical context, constraints, existing system landscape -->
|
|
6
|
+
|
|
7
|
+
## Decisions
|
|
8
|
+
<!-- ~800 tokens: Key architectural decisions with rationale -->
|
|
9
|
+
<!-- For each decision: Context | Options Considered | Decision | Consequences -->
|
|
10
|
+
|
|
11
|
+
## Components
|
|
12
|
+
<!-- ~1000 tokens: Component breakdown with responsibilities -->
|
|
13
|
+
<!-- For each component: Name | Responsibility | Dependencies | Owner -->
|
|
14
|
+
|
|
15
|
+
## Data Model
|
|
16
|
+
<!-- ~600 tokens: Core entities and relationships -->
|
|
17
|
+
|
|
18
|
+
## API Contracts
|
|
19
|
+
<!-- ~800 tokens: Key API interfaces including error cases -->
|
|
20
|
+
<!-- For each endpoint: Method | Path | Request | Response | Errors -->
|
|
21
|
+
|
|
22
|
+
## Infrastructure
|
|
23
|
+
<!-- ~400 tokens: Deployment, scaling, monitoring considerations -->
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Phase checkpoint — snapshot of protocol state
|
|
2
|
+
protocol: ""
|
|
3
|
+
phase: ""
|
|
4
|
+
timestamp: ""
|
|
5
|
+
status: "" # in_progress | completed | failed
|
|
6
|
+
|
|
7
|
+
agents:
|
|
8
|
+
- name: ""
|
|
9
|
+
status: "" # active | completed | failed
|
|
10
|
+
tasks_completed: 0
|
|
11
|
+
tasks_total: 0
|
|
12
|
+
|
|
13
|
+
gate_result: null # null if gate not yet run
|
|
14
|
+
# gate_result:
|
|
15
|
+
# result: pass | fail
|
|
16
|
+
# blocking_failures: 0
|
|
17
|
+
|
|
18
|
+
artifacts_produced: []
|
|
19
|
+
# - path: .sniper/artifacts/spec.md
|
|
20
|
+
# status: draft | complete
|
|
21
|
+
|
|
22
|
+
token_usage:
|
|
23
|
+
phase_tokens: 0
|
|
24
|
+
cumulative_tokens: 0
|
|
25
|
+
budget_remaining: 0
|
|
26
|
+
|
|
27
|
+
notes: ""
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Codebase Overview
|
|
2
|
+
<!-- Budget: 2000 tokens max -->
|
|
3
|
+
|
|
4
|
+
## Architecture
|
|
5
|
+
<!-- ~400 tokens: High-level architecture pattern and key design decisions -->
|
|
6
|
+
|
|
7
|
+
## Key Modules
|
|
8
|
+
<!-- ~500 tokens: Core modules/packages with responsibilities -->
|
|
9
|
+
| Module | Path | Responsibility |
|
|
10
|
+
|--------|------|---------------|
|
|
11
|
+
|
|
12
|
+
## Data Flow
|
|
13
|
+
<!-- ~400 tokens: How data moves through the system -->
|
|
14
|
+
|
|
15
|
+
## Conventions
|
|
16
|
+
<!-- ~400 tokens: Coding patterns, naming conventions, project-specific rules -->
|
|
17
|
+
|
|
18
|
+
## Risks
|
|
19
|
+
<!-- ~300 tokens: Technical debt, fragile areas, known issues -->
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Cost tracking for protocol execution
|
|
2
|
+
protocol: ""
|
|
3
|
+
started_at: ""
|
|
4
|
+
budget: 0
|
|
5
|
+
|
|
6
|
+
phases: []
|
|
7
|
+
# - name: discover
|
|
8
|
+
# started_at: ""
|
|
9
|
+
# completed_at: ""
|
|
10
|
+
# tokens_used: 0
|
|
11
|
+
# agents:
|
|
12
|
+
# - name: analyst
|
|
13
|
+
# tokens_used: 0
|
|
14
|
+
|
|
15
|
+
totals:
|
|
16
|
+
tokens_used: 0
|
|
17
|
+
budget_remaining: 0
|
|
18
|
+
budget_percent_used: 0
|
|
19
|
+
|
|
20
|
+
enforcement:
|
|
21
|
+
warn_threshold: 0.7 # Warn at 70% budget
|
|
22
|
+
soft_cap: 0.9 # Soft cap at 90% — agents must justify continuation
|
|
23
|
+
hard_cap: 1.0 # Hard cap at 100% — stop execution
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# ─────────────────────────────────────────────────────────────
|
|
2
|
+
# SNIPER Custom Protocol Template
|
|
3
|
+
# ─────────────────────────────────────────────────────────────
|
|
4
|
+
# Copy this file to .sniper/protocols/<name>.yaml and customize.
|
|
5
|
+
# Run `sniper protocol validate <name>` to check your protocol.
|
|
6
|
+
# See built-in protocols in @sniper.ai/core/protocols/ for examples.
|
|
7
|
+
# ─────────────────────────────────────────────────────────────
|
|
8
|
+
|
|
9
|
+
# name (required): Unique identifier for your protocol.
|
|
10
|
+
# Used in --protocol flag: /sniper-flow --protocol my-protocol
|
|
11
|
+
name: my-protocol
|
|
12
|
+
|
|
13
|
+
# description (required): What this protocol accomplishes.
|
|
14
|
+
description: Describe the goal of your custom protocol
|
|
15
|
+
|
|
16
|
+
# budget (required): Maximum token budget for the entire execution.
|
|
17
|
+
# Common ranges: 100K (hotfix), 800K (feature), 2M (full lifecycle)
|
|
18
|
+
budget: 500000
|
|
19
|
+
|
|
20
|
+
# phases (required): Ordered list of phases. Each phase runs sequentially.
|
|
21
|
+
# The protocol engine executes phases top-to-bottom, gating between each.
|
|
22
|
+
phases:
|
|
23
|
+
# ── Phase 1: Plan ──────────────────────────────────────────
|
|
24
|
+
- name: plan
|
|
25
|
+
# description (required): What this phase accomplishes.
|
|
26
|
+
description: Design the approach and break down into tasks
|
|
27
|
+
|
|
28
|
+
# agents (required): Which agent personas to assign.
|
|
29
|
+
# Available built-in agents: analyst, architect, product-manager,
|
|
30
|
+
# fullstack-dev, backend-dev, frontend-dev, qa-engineer,
|
|
31
|
+
# code-reviewer, retro-analyst
|
|
32
|
+
agents:
|
|
33
|
+
- architect
|
|
34
|
+
|
|
35
|
+
# spawn_strategy (required): How to launch agents.
|
|
36
|
+
# "single" — one agent works alone
|
|
37
|
+
# "team" — multiple agents coordinate via TeamCreate
|
|
38
|
+
spawn_strategy: single
|
|
39
|
+
|
|
40
|
+
# gate (optional): Quality gate evaluated before moving to next phase.
|
|
41
|
+
# Omit to skip gating (like hotfix protocol).
|
|
42
|
+
gate:
|
|
43
|
+
# checklist: Name of checklist from packages/core/checklists/
|
|
44
|
+
# Available: discover, plan, implement, review
|
|
45
|
+
checklist: plan
|
|
46
|
+
# human_approval: If true, a human must approve before proceeding.
|
|
47
|
+
human_approval: true
|
|
48
|
+
|
|
49
|
+
# outputs (optional): Expected artifacts this phase produces.
|
|
50
|
+
# Used for tracking and checkpoint reporting.
|
|
51
|
+
outputs:
|
|
52
|
+
- .sniper/artifacts/{protocol_id}/design.md
|
|
53
|
+
|
|
54
|
+
# ── Phase 2: Implement ─────────────────────────────────────
|
|
55
|
+
- name: implement
|
|
56
|
+
description: Build the feature according to the plan
|
|
57
|
+
|
|
58
|
+
agents:
|
|
59
|
+
- fullstack-dev
|
|
60
|
+
- qa-engineer
|
|
61
|
+
spawn_strategy: team
|
|
62
|
+
|
|
63
|
+
# plan_approval (optional): If true, each agent must get their
|
|
64
|
+
# execution plan approved before writing code.
|
|
65
|
+
plan_approval: true
|
|
66
|
+
|
|
67
|
+
gate:
|
|
68
|
+
checklist: implement
|
|
69
|
+
human_approval: false
|
|
70
|
+
|
|
71
|
+
outputs:
|
|
72
|
+
- source code changes
|
|
73
|
+
- test files
|
|
74
|
+
|
|
75
|
+
# coordination (optional): Constraints between agents in team phases.
|
|
76
|
+
# Only meaningful when spawn_strategy is "team".
|
|
77
|
+
# coordination:
|
|
78
|
+
# - between: [fullstack-dev, qa-engineer]
|
|
79
|
+
# topic: Tests must cover all new public APIs
|
|
80
|
+
|
|
81
|
+
# ── Phase 3: Review ────────────────────────────────────────
|
|
82
|
+
- name: review
|
|
83
|
+
description: Code review and final quality check
|
|
84
|
+
|
|
85
|
+
agents:
|
|
86
|
+
- code-reviewer
|
|
87
|
+
spawn_strategy: single
|
|
88
|
+
|
|
89
|
+
gate:
|
|
90
|
+
checklist: review
|
|
91
|
+
human_approval: true
|
|
92
|
+
|
|
93
|
+
outputs:
|
|
94
|
+
- .sniper/artifacts/{protocol_id}/review-report.md
|
|
95
|
+
|
|
96
|
+
# auto_retro (optional, default: false): Whether to run the retro-analyst
|
|
97
|
+
# after protocol completion to record velocity metrics.
|
|
98
|
+
auto_retro: true
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Knowledge Manifest — domain knowledge sources for agent injection
|
|
2
|
+
# Place this file at .sniper/knowledge/manifest.yaml
|
|
3
|
+
# Agents consult this manifest to load relevant domain context before execution
|
|
4
|
+
|
|
5
|
+
# Each source entry declares a Markdown file containing domain expertise.
|
|
6
|
+
# During protocol execution, agents match their task context against topics
|
|
7
|
+
# and tags to selectively load only the knowledge they need.
|
|
8
|
+
|
|
9
|
+
sources:
|
|
10
|
+
# topic: Short identifier for the knowledge domain
|
|
11
|
+
# file: Path relative to .sniper/knowledge/
|
|
12
|
+
# tokens: Estimated token count (used for budget planning — measure with `wc -w file | awk '{print int($1 * 1.3)}'`)
|
|
13
|
+
# tags: Searchable labels for contextual matching (optional)
|
|
14
|
+
# description: What this knowledge covers, so agents know when to load it (optional)
|
|
15
|
+
|
|
16
|
+
- topic: "telephony"
|
|
17
|
+
file: "telephony-protocols.md"
|
|
18
|
+
tokens: 2500
|
|
19
|
+
tags: [voip, sip, pbx, otp]
|
|
20
|
+
description: "VoIP telephony protocols, SIP signaling, and PBX integration patterns"
|
|
21
|
+
|
|
22
|
+
- topic: "compliance"
|
|
23
|
+
file: "tcpa-rules.md"
|
|
24
|
+
tokens: 1800
|
|
25
|
+
tags: [tcpa, compliance, legal, consent]
|
|
26
|
+
description: "TCPA compliance rules for outbound dialing and consent management"
|
|
27
|
+
|
|
28
|
+
- topic: "crm"
|
|
29
|
+
file: "crm-integration.md"
|
|
30
|
+
tokens: 1200
|
|
31
|
+
tags: [salesforce, hubspot, api, leads]
|
|
32
|
+
description: "CRM integration patterns, lead lifecycle, and API conventions"
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Real-time protocol progress
|
|
2
|
+
protocol: ""
|
|
3
|
+
status: "" # idle | running | paused | completed | failed
|
|
4
|
+
current_phase: ""
|
|
5
|
+
started_at: ""
|
|
6
|
+
updated_at: ""
|
|
7
|
+
|
|
8
|
+
phases:
|
|
9
|
+
- name: ""
|
|
10
|
+
status: "" # pending | running | paused | completed | failed
|
|
11
|
+
agents: []
|
|
12
|
+
# - name: analyst
|
|
13
|
+
# status: active | completed | failed
|
|
14
|
+
progress: 0 # percentage
|
|
15
|
+
|
|
16
|
+
gate_results: []
|
|
17
|
+
# - phase: discover
|
|
18
|
+
# result: pass
|
|
19
|
+
# timestamp: ""
|
|
20
|
+
|
|
21
|
+
cost:
|
|
22
|
+
tokens_used: 0
|
|
23
|
+
budget: 0
|
|
24
|
+
percent: 0
|
|
25
|
+
|
|
26
|
+
next_action: "" # Human-readable description of what's next
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Multi-Faceted Review Report
|
|
2
|
+
<!-- Budget: 2000 tokens max -->
|
|
3
|
+
|
|
4
|
+
## Summary
|
|
5
|
+
<!-- ~200 tokens: Overall assessment across all dimensions -->
|
|
6
|
+
|
|
7
|
+
## Scope Validation
|
|
8
|
+
<!-- ~400 tokens: Does the implementation match requirements? -->
|
|
9
|
+
| Requirement | Status | Notes |
|
|
10
|
+
|-------------|--------|-------|
|
|
11
|
+
|
|
12
|
+
## Standards Enforcement
|
|
13
|
+
<!-- ~400 tokens: Does the code follow project conventions? -->
|
|
14
|
+
| Standard | Status | Finding |
|
|
15
|
+
|----------|--------|---------|
|
|
16
|
+
|
|
17
|
+
## Risk Assessment
|
|
18
|
+
<!-- ~400 tokens: Security, performance, reliability, and maintenance risks -->
|
|
19
|
+
| Risk | Severity | Mitigation |
|
|
20
|
+
|------|----------|------------|
|
|
21
|
+
|
|
22
|
+
## Overall Risk Score
|
|
23
|
+
<!-- ~200 tokens: Aggregate risk level (critical/high/medium/low) with justification -->
|
|
24
|
+
|
|
25
|
+
**Risk Level:** <!-- critical | high | medium | low -->
|
|
26
|
+
|
|
27
|
+
## Decision
|
|
28
|
+
<!-- ~200 tokens: APPROVE / REQUEST_CHANGES / COMMENT with reasoning -->
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Review Report
|
|
2
|
+
<!-- Budget: 1000 tokens max -->
|
|
3
|
+
|
|
4
|
+
## Summary
|
|
5
|
+
<!-- ~200 tokens: Overall assessment — pass/fail with brief rationale -->
|
|
6
|
+
|
|
7
|
+
## Checks
|
|
8
|
+
<!-- ~300 tokens: Checklist results -->
|
|
9
|
+
| Check | Status | Notes |
|
|
10
|
+
|-------|--------|-------|
|
|
11
|
+
|
|
12
|
+
## Findings
|
|
13
|
+
<!-- ~400 tokens: Issues found, categorized by severity -->
|
|
14
|
+
|
|
15
|
+
### Blocking
|
|
16
|
+
<!-- Must fix before merge -->
|
|
17
|
+
|
|
18
|
+
### Suggestions
|
|
19
|
+
<!-- Should fix, but not blocking -->
|
|
20
|
+
|
|
21
|
+
### Nits
|
|
22
|
+
<!-- Optional improvements -->
|
|
23
|
+
|
|
24
|
+
## Decision
|
|
25
|
+
<!-- ~100 tokens: APPROVE / REQUEST_CHANGES / COMMENT -->
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Signal Record — captures an external learning for future agent context
|
|
2
|
+
#
|
|
3
|
+
# Signals are stored in .sniper/memory/signals/ and are ingested from
|
|
4
|
+
# CI failures, PR review comments, production errors, or manually.
|
|
5
|
+
# Agents query relevant signals before implementation to avoid repeating mistakes.
|
|
6
|
+
|
|
7
|
+
# Required: one of ci_failure | pr_review_comment | production_error | manual
|
|
8
|
+
type: ci_failure
|
|
9
|
+
|
|
10
|
+
# Required: where this signal originated (e.g., "github-actions", "pr-42", "datadog")
|
|
11
|
+
source: github-actions
|
|
12
|
+
|
|
13
|
+
# Required: ISO 8601 timestamp of when the signal was observed
|
|
14
|
+
timestamp: "2026-01-15T10:30:00Z"
|
|
15
|
+
|
|
16
|
+
# Required: one-line summary of what happened
|
|
17
|
+
summary: "Jest test suite failed — missing mock for PaymentService"
|
|
18
|
+
|
|
19
|
+
# Optional: full error message, review comment text, or stack trace
|
|
20
|
+
details: |
|
|
21
|
+
FAIL src/services/payment.test.ts
|
|
22
|
+
TypeError: Cannot read properties of undefined (reading 'charge')
|
|
23
|
+
Expected PaymentService to be mocked in test setup.
|
|
24
|
+
|
|
25
|
+
# Optional: the takeaway to apply in future work
|
|
26
|
+
learning: "Always mock external service dependencies in unit tests before calling the handler."
|
|
27
|
+
|
|
28
|
+
# Optional: tags for matching this signal to relevant agent context
|
|
29
|
+
relevance_tags:
|
|
30
|
+
- testing
|
|
31
|
+
- mocking
|
|
32
|
+
- payment-service
|
|
33
|
+
|
|
34
|
+
# Optional: file paths that were involved
|
|
35
|
+
affected_files:
|
|
36
|
+
- src/services/payment.test.ts
|
|
37
|
+
- src/services/payment.ts
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Specification
|
|
2
|
+
<!-- Budget: 3000 tokens max -->
|
|
3
|
+
|
|
4
|
+
## Context
|
|
5
|
+
<!-- ~300 tokens: What exists today and why this work is needed -->
|
|
6
|
+
|
|
7
|
+
## Problem
|
|
8
|
+
<!-- ~400 tokens: What specific problem are we solving -->
|
|
9
|
+
|
|
10
|
+
## Users
|
|
11
|
+
<!-- ~200 tokens: Who are the users and what do they need -->
|
|
12
|
+
|
|
13
|
+
## Requirements
|
|
14
|
+
<!-- ~1000 tokens: EARS-format requirements -->
|
|
15
|
+
<!-- Use: "The <system> shall <action>" for each requirement -->
|
|
16
|
+
|
|
17
|
+
### Functional Requirements
|
|
18
|
+
|
|
19
|
+
### Non-Functional Requirements
|
|
20
|
+
|
|
21
|
+
## Out of Scope
|
|
22
|
+
<!-- ~200 tokens: Explicitly list what this work does NOT cover -->
|
|
23
|
+
|
|
24
|
+
## Success Metrics
|
|
25
|
+
<!-- ~200 tokens: How we measure success -->
|
|
26
|
+
|
|
27
|
+
## Open Questions
|
|
28
|
+
<!-- ~200 tokens: Unresolved questions that need answers before planning -->
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Story: [TITLE]
|
|
2
|
+
<!-- Budget: 1500 tokens max -->
|
|
3
|
+
|
|
4
|
+
## Context
|
|
5
|
+
<!-- ~200 tokens: Why this story exists, link to architecture/spec -->
|
|
6
|
+
|
|
7
|
+
## Task
|
|
8
|
+
<!-- ~400 tokens: What needs to be done, specific and actionable -->
|
|
9
|
+
|
|
10
|
+
## Acceptance Criteria
|
|
11
|
+
<!-- ~600 tokens: EARS-format criteria -->
|
|
12
|
+
<!-- Each criterion must be independently testable -->
|
|
13
|
+
|
|
14
|
+
1. When [event], the system shall [action]
|
|
15
|
+
2. The system shall [action]
|
|
16
|
+
3. If [condition], then the system shall [action]
|
|
17
|
+
|
|
18
|
+
## Technical Notes
|
|
19
|
+
<!-- ~300 tokens: Implementation hints, relevant code locations, gotchas -->
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# SNIPER Workspace Configuration
|
|
2
|
+
# Place this file at .sniper-workspace/config.yaml in your workspace root.
|
|
3
|
+
# A workspace coordinates multiple SNIPER-enabled projects that share
|
|
4
|
+
# conventions, architectural decisions, and memory.
|
|
5
|
+
|
|
6
|
+
# Workspace name — used in status output and logs
|
|
7
|
+
name: "my-workspace"
|
|
8
|
+
|
|
9
|
+
# Projects managed by this workspace.
|
|
10
|
+
# Each entry maps a logical name to a relative directory path.
|
|
11
|
+
projects:
|
|
12
|
+
- name: api
|
|
13
|
+
path: ./services/api # relative to workspace root
|
|
14
|
+
type: api # optional label (api, frontend, library, cli, etc.)
|
|
15
|
+
- name: web
|
|
16
|
+
path: ./apps/web
|
|
17
|
+
type: frontend
|
|
18
|
+
|
|
19
|
+
# Shared conventions and decisions applied to every project in the workspace.
|
|
20
|
+
# These supplement (not replace) each project's own .sniper/config.yaml.
|
|
21
|
+
shared:
|
|
22
|
+
# Coding conventions enforced across all projects
|
|
23
|
+
conventions:
|
|
24
|
+
- "All public APIs must have OpenAPI specs"
|
|
25
|
+
- "Use structured logging (JSON) in all services"
|
|
26
|
+
- "Error responses follow RFC 7807 Problem Details"
|
|
27
|
+
|
|
28
|
+
# Patterns to avoid workspace-wide
|
|
29
|
+
anti_patterns:
|
|
30
|
+
- "No direct database access from frontend projects"
|
|
31
|
+
- "No shared mutable state between services"
|
|
32
|
+
|
|
33
|
+
# Architecture Decision Records
|
|
34
|
+
architectural_decisions:
|
|
35
|
+
- id: ADR-001
|
|
36
|
+
title: Event-driven communication between services
|
|
37
|
+
decision: Use an event bus for inter-service communication instead of direct HTTP calls.
|
|
38
|
+
rationale: Reduces coupling and improves resilience when services are unavailable.
|
|
39
|
+
date: "2025-12-01"
|
|
40
|
+
|
|
41
|
+
# Shared memory directory for cross-project context.
|
|
42
|
+
# Agents can read from this directory to understand workspace-wide patterns.
|
|
43
|
+
memory:
|
|
44
|
+
directory: .sniper-workspace/memory
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# Per-Story Code Review Checklist
|
|
2
|
-
|
|
3
|
-
Used by QA engineer and team lead to review individual story implementations.
|
|
4
|
-
|
|
5
|
-
## Functionality
|
|
6
|
-
- [ ] All acceptance criteria from the story are implemented
|
|
7
|
-
- [ ] Error cases are handled (not just the happy path)
|
|
8
|
-
- [ ] Edge cases considered (empty input, max values, concurrent access)
|
|
9
|
-
|
|
10
|
-
## Code Quality
|
|
11
|
-
- [ ] Code is readable — another developer can understand it without explanation
|
|
12
|
-
- [ ] No dead code, commented-out code, or TODO items left behind
|
|
13
|
-
- [ ] Functions are focused — each does one thing
|
|
14
|
-
- [ ] Naming is clear and consistent with codebase conventions
|
|
15
|
-
- [ ] No unnecessary complexity — simplest solution that works
|
|
16
|
-
|
|
17
|
-
## Testing
|
|
18
|
-
- [ ] Unit tests cover the public API of new modules
|
|
19
|
-
- [ ] Integration tests verify end-to-end behavior
|
|
20
|
-
- [ ] Tests are deterministic (no timing dependencies, no flakiness)
|
|
21
|
-
- [ ] Test names describe the behavior being tested
|
|
22
|
-
|
|
23
|
-
## Security
|
|
24
|
-
- [ ] User input is validated before processing
|
|
25
|
-
- [ ] SQL queries use parameterized statements
|
|
26
|
-
- [ ] No secrets in code or config
|
|
27
|
-
- [ ] Auth checks in place for protected endpoints
|
|
28
|
-
|
|
29
|
-
## Performance
|
|
30
|
-
- [ ] No N+1 query patterns
|
|
31
|
-
- [ ] Database queries are indexed appropriately
|
|
32
|
-
- [ ] Large datasets use pagination
|
|
33
|
-
- [ ] No blocking operations on the main thread
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# Debug Review Checklist
|
|
2
|
-
|
|
3
|
-
Use this checklist to review artifacts produced during a bug investigation.
|
|
4
|
-
|
|
5
|
-
## Bug Report (`docs/bugs/BUG-{NNN}/report.md`)
|
|
6
|
-
|
|
7
|
-
- [ ] **Summary clarity:** Bug is described in terms of observed behavior, not implementation
|
|
8
|
-
- [ ] **Severity justified:** Severity level matches the described user impact
|
|
9
|
-
- [ ] **Affected components identified:** Components are traced to actual architecture doc entries
|
|
10
|
-
- [ ] **Reproduction steps:** Steps are specific enough to reproduce (or clearly marked "unable to determine")
|
|
11
|
-
- [ ] **Investigation plan:** Specific guidance for log analyst and code investigator
|
|
12
|
-
|
|
13
|
-
## Investigation (`docs/bugs/BUG-{NNN}/investigation.md`)
|
|
14
|
-
|
|
15
|
-
- [ ] **Log findings present:** Error patterns documented with specific messages and locations
|
|
16
|
-
- [ ] **Code findings present:** Execution path traced with file:line references
|
|
17
|
-
- [ ] **Root cause identified:** A specific root cause is proposed (not vague)
|
|
18
|
-
- [ ] **Evidence-based:** Findings are backed by specific code references, not speculation
|
|
19
|
-
- [ ] **Recommended fix:** A concrete fix approach is proposed
|
|
20
|
-
- [ ] **Consistency:** Log findings and code findings point to the same root cause
|
|
21
|
-
|
|
22
|
-
## Post-Mortem (`docs/bugs/BUG-{NNN}/postmortem.md`)
|
|
23
|
-
|
|
24
|
-
- [ ] **Fix addresses root cause:** The fix targets the actual root cause, not just symptoms
|
|
25
|
-
- [ ] **Files changed listed:** All modified files are documented
|
|
26
|
-
- [ ] **Regression tests added:** Tests specifically prevent this bug from recurring
|
|
27
|
-
- [ ] **Prevention strategy:** At least one process or code change to prevent similar bugs
|
|
28
|
-
- [ ] **Timeline accurate:** Key events are timestamped
|
|
29
|
-
|
|
30
|
-
## Overall
|
|
31
|
-
|
|
32
|
-
- [ ] **Artifacts consistent:** Report, investigation, and postmortem tell a coherent story
|
|
33
|
-
- [ ] **No speculation presented as fact:** Hypotheses are clearly labeled
|
|
34
|
-
- [ ] **Actionable:** Another developer could understand and verify the fix
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# Discovery Review Checklist
|
|
2
|
-
|
|
3
|
-
Gate mode: **FLEXIBLE** (auto-advance, async review)
|
|
4
|
-
|
|
5
|
-
## Project Brief (`docs/brief.md`)
|
|
6
|
-
- [ ] Problem statement is specific and evidence-based
|
|
7
|
-
- [ ] At least 3 direct competitors identified with features and pricing
|
|
8
|
-
- [ ] Unique value proposition clearly differentiates from competitors
|
|
9
|
-
- [ ] Target market segment is defined with size estimates
|
|
10
|
-
- [ ] Key assumptions are listed explicitly
|
|
11
|
-
- [ ] Technical constraints are identified
|
|
12
|
-
- [ ] v1 scope recommendation separates in-scope from out-of-scope
|
|
13
|
-
- [ ] Open questions are documented for planning phase
|
|
14
|
-
|
|
15
|
-
## Risk Assessment (`docs/risks.md`)
|
|
16
|
-
- [ ] Technical feasibility risks are identified with specifics
|
|
17
|
-
- [ ] Integration risks are assessed (third-party APIs, services)
|
|
18
|
-
- [ ] Compliance and regulatory risks are documented
|
|
19
|
-
- [ ] Scalability concerns are noted with thresholds
|
|
20
|
-
- [ ] Each risk has a mitigation strategy
|
|
21
|
-
- [ ] Assumptions are challenged — at least 2 devil's advocate findings
|
|
22
|
-
|
|
23
|
-
## User Personas (`docs/personas.md`)
|
|
24
|
-
- [ ] At least 2 distinct user personas defined
|
|
25
|
-
- [ ] Each persona has: role, goals, pain points, workflows
|
|
26
|
-
- [ ] Primary user journey mapped for each persona
|
|
27
|
-
- [ ] Key friction points identified
|
|
28
|
-
- [ ] Personas are realistic (not idealized)
|
|
29
|
-
|
|
30
|
-
## Overall
|
|
31
|
-
- [ ] All three artifacts are internally consistent
|
|
32
|
-
- [ ] No critical contradictions between brief, risks, and personas
|
|
33
|
-
- [ ] Sufficient depth for planning phase to begin
|