| name | sniper-init |
| description | Initialize SNIPER v3 in a new or existing project |
| arguments | [{"name":"language","description":"Primary language (auto-detected if omitted)","required":false}] |
/sniper-init
Initialize SNIPER v3 framework in the current project.
Process
1. Check Existing State
- If
.sniper/config.yaml exists, ask user: "SNIPER is already initialized. Reinitialize? (existing config will be backed up)"
- If reinitializing, copy
.sniper/config.yaml to .sniper/config.yaml.bak
2. Auto-Detect Project
Scan the project directory to detect:
Language (check in order):
tsconfig.json or *.ts files → TypeScript
package.json → JavaScript
pyproject.toml or requirements.txt → Python
go.mod → Go
Cargo.toml → Rust
pom.xml or build.gradle → Java
- Fall back to
--language argument or ask user
Package Manager:
pnpm-lock.yaml → pnpm
yarn.lock → yarn
bun.lockb → bun
package-lock.json → npm
uv.lock → uv
poetry.lock → poetry
Framework:
next.config.* → Next.js
nuxt.config.* → Nuxt
vite.config.* → Vite
angular.json → Angular
Test Runner:
vitest.config.* → Vitest
jest.config.* → Jest
pytest.ini or conftest.py → Pytest
Commands (from package.json scripts or Makefile):
- Look for
test, lint, build, typecheck scripts
3. Gather User Input
Ask the user (with auto-detected defaults pre-filled):
- Project name (default: directory name)
- Project type (saas, api, mobile, cli, library, monorepo)
- One-line description
- Max concurrent teammates (default: 5)
- Confirm detected stack
4. Scaffold Structure
Create the following directory structure:
.sniper/
config.yaml ← Generated from template + user input + auto-detection
checkpoints/
gates/
retros/
self-reviews/
checklists/ ← Copied from @sniper.ai/core/checklists/
memory/
learnings/ ← Unified learning store (replaces signals/)
signals/ ← Legacy — kept for backward compat, migrated by memory-curator
archive/ ← Deprecated learnings archived here
.claude/
agents/ ← Copied from @sniper.ai/core/agents/
settings.json ← Merge hooks from @sniper.ai/core/hooks/
CLAUDE.md ← Generated from template
5. Apply Plugins
If plugins are configured (or auto-detected):
- Read each plugin's
plugin.yaml
- Merge plugin commands into config
- Copy plugin mixins to
.claude/personas/cognitive/
- Merge plugin hooks into
.claude/settings.json
6. Confirm
Display summary:
- Files created/modified
- Detected stack
- Suggested next step: "Run
/sniper-flow to start your first protocol"
Rules
- NEVER overwrite existing project source files
- ALWAYS back up existing config before reinitializing
- ALWAYS show the user what will be created before doing it
- Respect
.gitignore — add .sniper/checkpoints/ and .sniper/gates/ if not present