Commands Cheatsheet
Quick reference for every SNIPER v3 command. For detailed usage, see the commands reference.
Slash Commands
In v3, all work flows through five slash commands. The core engine (/sniper-flow) selects a protocol and drives agent teams through structured phases automatically.
| Command | Purpose |
|---|---|
/sniper-flow | Core execution engine -- runs any protocol |
/sniper-init | Scaffold .sniper/ directory and project config |
/sniper-learn | Submit, review, or deprecate project learnings |
/sniper-review | Manually trigger a quality gate review |
/sniper-status | Show protocol progress and recent activity |
/sniper-flow
The core protocol execution engine. Orchestrates agent teams through structured phases. Auto-detects the appropriate protocol from your request, or accepts an explicit --protocol flag.
Arguments:
| Flag | Description |
|---|---|
--protocol <name> | Run a specific protocol (full, feature, patch, ingest, explore, refactor, hotfix) |
--resume | Resume from the last checkpoint |
--phase <name> | Start from a specific phase (skips earlier phases) |
Usage examples:
/sniper-flow # Auto-detect protocol from request
/sniper-flow --protocol full # Full lifecycle (discover -> define -> design -> solve -> implement -> review -> retro)
/sniper-flow --protocol feature # Feature mini-lifecycle (define -> design -> solve -> implement -> review -> retro)
/sniper-flow --protocol patch # Quick bug fix (implement -> review)
/sniper-flow --protocol ingest # Reverse-engineer an existing codebase
/sniper-flow --protocol explore # Exploratory analysis only
/sniper-flow --protocol refactor # Code improvement (analyze -> implement -> review)
/sniper-flow --protocol hotfix # Emergency fix, fastest path to production
/sniper-flow --resume # Resume from last checkpoint
/sniper-flow --phase plan # Jump to a specific phaseAuto-detection rules:
| Scope | Protocol |
|---|---|
| New project (no source files) | full |
| Critical / urgent / production fix | hotfix |
| Bug fix or small change (< 5 files) | patch |
| New feature or enhancement (5--20 files) | feature |
| Major rework or multi-component change (20+ files) | full |
| Understand / document an existing codebase | ingest |
| Exploratory analysis or research | explore |
| Code improvement, no new features | refactor |
/sniper-learn
Submit, review, or deprecate project learnings. Manages conventions, anti-patterns, and decisions in .sniper/memory/.
Usage:
/sniper-learn # Interactive — choose submit, review, or deprecateHeadless / CI/CD Execution
For non-interactive protocol execution in CI/CD pipelines, use the sniper run CLI command instead of a slash command. See Headless & CI/CD for details.
/sniper-init
Scaffold the .sniper/ directory, detect your project stack, and walk through interactive configuration.
Arguments:
| Flag | Description |
|---|---|
--language <name> | Primary language (auto-detected if omitted) |
Creates:
| Path | Contents |
|---|---|
.sniper/config.yaml | Project configuration |
.sniper/checkpoints/ | Phase checkpoint storage |
.sniper/gates/ | Gate result storage |
.sniper/checklists/ | Quality gate checklists |
.claude/agents/ | Agent definitions |
.claude/settings.json | Hooks and settings |
docs/ | Documentation directory |
CLAUDE.md | Project instructions |
/sniper-review
Manually trigger a quality gate review outside of the normal protocol flow.
Arguments:
| Flag | Description |
|---|---|
--phase <name> | Phase to review (defaults to current active phase) |
Spawns a gate-reviewer agent, runs the phase checklist, and writes the result to .sniper/gates/. This does not advance the protocol -- it is a manual check only.
/sniper-status
Display project info, active protocol progress, and recent activity. Read-only -- never modifies any files.
Takes no arguments.
Protocols
Every protocol is a YAML state machine that defines a sequence of phases, agent assignments, spawn strategies, and quality gates. Use /sniper-flow --protocol <name> to run one explicitly, or let auto-detection choose for you.
Protocol Summary
| Protocol | Phases | Auto Retro | Use Case |
|---|---|---|---|
full | discover → define → design → solve → implement → review → retro | Yes | New projects, major reworks |
feature | define → design → solve → implement → review → retro | Yes | New features (5--20 files) |
patch | implement → review | No | Bug fixes, small changes |
ingest | scan → document → extract | No | Reverse-engineer existing codebases |
explore | discover | No | Research and analysis |
refactor | analyze → implement → review → retro | Yes | Code improvement, no new features |
hotfix | implement | No | Critical production fixes |
full
Complete project lifecycle from discovery through retrospective.
| Phase | Agents | Spawn | Gate | Human Approval | Key Outputs |
|---|---|---|---|---|---|
| discover | analyst | single | discover | No | docs/discovery-brief.md, docs/codebase-overview.md |
| define | product-manager | single | define | Yes | docs/prd.md |
| design | architect | single | design | Yes | docs/architecture.md |
| solve | product-manager | single | solve | Yes | docs/stories/ |
| implement | fullstack-dev, qa-engineer | team | implement | No | Source code, test files |
| review | code-reviewer | single | review | Yes | docs/review-report.md |
| retro | retro-analyst | single | — | No | .sniper/memory/ updates |
feature
Incremental feature -- define, design, solve, implement, review, and retro.
| Phase | Agents | Spawn | Gate | Human Approval | Key Outputs |
|---|---|---|---|---|---|
| define | product-manager | single | define | Yes | docs/prd.md |
| design | architect | single | design | Yes | docs/architecture.md |
| solve | product-manager | single | solve | Yes | docs/stories/ |
| implement | fullstack-dev, qa-engineer | team | implement | No | Source code, test files |
| review | code-reviewer | single | review | Yes | docs/review-report.md |
| retro | retro-analyst | single | — | No | .sniper/memory/ updates |
patch
Quick fix -- implement and review only.
| Phase | Agents | Spawn | Gate | Human Approval | Key Outputs |
|---|---|---|---|---|---|
| implement | fullstack-dev | single | implement | No | Source code, test files |
| review | code-reviewer | single | review | Yes | docs/review-report.md |
ingest
Codebase ingestion -- scan, document, and extract conventions.
| Phase | Agents | Spawn | Gate | Human Approval | Key Outputs |
|---|---|---|---|---|---|
| scan | analyst | single | ingest-scan | No | docs/codebase-overview.md |
| document | analyst | single | ingest-document | No | docs/spec.md |
| extract | analyst | single | ingest-extract | No | .sniper/conventions.yaml |
explore
Exploratory analysis -- research and document findings.
| Phase | Agents | Spawn | Gate | Human Approval | Key Outputs |
|---|---|---|---|---|---|
| discover | analyst | single | discover | No | docs/spec.md, docs/codebase-overview.md |
refactor
Code improvement -- analyze, refactor, and review.
| Phase | Agents | Spawn | Gate | Human Approval | Key Outputs |
|---|---|---|---|---|---|
| analyze | analyst | single | refactor-analyze | No | docs/spec.md |
| implement | fullstack-dev | single | implement | No | Source code, test files |
| review | code-reviewer | single | review | Yes | docs/review-report.md |
hotfix
Critical fix -- fastest path to production. Single phase, non-blocking gate.
| Phase | Agents | Spawn | Gate | Human Approval | Key Outputs |
|---|---|---|---|---|---|
| implement | fullstack-dev | single | implement (non-blocking) | No | Source code, test files |
CLI Subcommands
The sniper binary provides project scaffolding, management, and CI/CD support.
Core
| Command | Description |
|---|---|
sniper init | Interactive project initialization (scaffolds .sniper/) |
sniper status | Show project status and protocol progress |
sniper migrate | Migrate v2 config to v3 format |
Protocol Execution
| Command | Description |
|---|---|
sniper run <protocol> | Run a protocol headlessly |
sniper run <protocol> --auto-approve | Auto-approve all gates |
sniper run <protocol> --output <format> | Output format: json, yaml, text |
sniper run <protocol> --timeout <minutes> | Set execution timeout |
sniper protocol create <name> | Create a custom protocol YAML |
sniper protocol list | List built-in and custom protocols |
sniper protocol validate <name> | Validate a custom protocol |
Plugins and Packs
| Command | Description |
|---|---|
sniper plugin install <package> | Install a language plugin or domain pack |
sniper plugin remove <name> | Remove a plugin |
sniper plugin list | List installed plugins |
sniper marketplace search <query> | Search for plugins and packs |
Project Management
| Command | Description |
|---|---|
sniper dashboard | Open the project dashboard |
sniper revert | Revert changes from a protocol phase using checkpointed commits |
sniper signal | Record a learning signal for agent memory |
sniper sphere | Manage project spheres (bounded contexts) |
sniper workspace init [name] | Initialize a multi-repo workspace |
sniper knowledge | Manage domain knowledge sources |
TIP
See the Headless & CI/CD guide for integrating sniper run into your pipelines.
