@sniper.ai/core 1.0.0 → 2.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.
Files changed (94) hide show
  1. package/README.md +122 -32
  2. package/framework/checklists/debug-review.md +34 -0
  3. package/framework/checklists/feature-review.md +42 -0
  4. package/framework/checklists/ingest-review.md +42 -0
  5. package/framework/checklists/memory-review.md +30 -0
  6. package/framework/checklists/perf-review.md +33 -0
  7. package/framework/checklists/refactor-review.md +33 -0
  8. package/framework/checklists/security-review.md +34 -0
  9. package/framework/checklists/test-review.md +32 -0
  10. package/framework/checklists/workspace-review.md +34 -0
  11. package/framework/commands/sniper-audit.md +1549 -0
  12. package/framework/commands/sniper-compose.md +88 -2
  13. package/framework/commands/sniper-debug.md +337 -0
  14. package/framework/commands/sniper-discover.md +41 -15
  15. package/framework/commands/sniper-feature.md +515 -0
  16. package/framework/commands/sniper-ingest.md +506 -0
  17. package/framework/commands/sniper-init.md +21 -5
  18. package/framework/commands/sniper-memory.md +219 -0
  19. package/framework/commands/sniper-plan.md +41 -19
  20. package/framework/commands/sniper-review.md +106 -42
  21. package/framework/commands/sniper-solve.md +47 -14
  22. package/framework/commands/sniper-sprint.md +132 -17
  23. package/framework/commands/sniper-status.md +240 -35
  24. package/framework/commands/sniper-workspace-feature.md +267 -0
  25. package/framework/commands/sniper-workspace-init.md +252 -0
  26. package/framework/commands/sniper-workspace-status.md +112 -0
  27. package/framework/commands/sniper-workspace-validate.md +138 -0
  28. package/framework/config.template.yaml +88 -9
  29. package/framework/personas/process/architecture-cartographer.md +25 -0
  30. package/framework/personas/process/code-archaeologist.md +22 -0
  31. package/framework/personas/process/code-investigator.md +29 -0
  32. package/framework/personas/process/code-reviewer.md +26 -0
  33. package/framework/personas/process/contract-designer.md +31 -0
  34. package/framework/personas/process/convention-miner.md +27 -0
  35. package/framework/personas/process/coverage-analyst.md +24 -0
  36. package/framework/personas/process/flake-hunter.md +30 -0
  37. package/framework/personas/process/impact-analyst.md +23 -0
  38. package/framework/personas/process/integration-validator.md +29 -0
  39. package/framework/personas/process/log-analyst.md +22 -0
  40. package/framework/personas/process/migration-architect.md +24 -0
  41. package/framework/personas/process/perf-profiler.md +27 -0
  42. package/framework/personas/process/release-manager.md +23 -0
  43. package/framework/personas/process/retro-analyst.md +30 -0
  44. package/framework/personas/process/threat-modeler.md +30 -0
  45. package/framework/personas/process/triage-lead.md +23 -0
  46. package/framework/personas/process/vuln-scanner.md +27 -0
  47. package/framework/personas/process/workspace-orchestrator.md +30 -0
  48. package/framework/spawn-prompts/_template.md +3 -0
  49. package/framework/teams/debug.yaml +56 -0
  50. package/framework/teams/feature-plan.yaml +61 -0
  51. package/framework/teams/ingest.yaml +85 -0
  52. package/framework/teams/perf.yaml +33 -0
  53. package/framework/teams/refactor.yaml +34 -0
  54. package/framework/teams/retro.yaml +30 -0
  55. package/framework/teams/review-pr.yaml +73 -0
  56. package/framework/teams/review-release.yaml +70 -0
  57. package/framework/teams/security.yaml +59 -0
  58. package/framework/teams/test.yaml +59 -0
  59. package/framework/teams/workspace-feature.yaml +69 -0
  60. package/framework/teams/workspace-validation.yaml +27 -0
  61. package/framework/templates/arch-delta.md +74 -0
  62. package/framework/templates/architecture.md +24 -1
  63. package/framework/templates/brief.md +22 -1
  64. package/framework/templates/bug-report.md +55 -0
  65. package/framework/templates/contract-validation-report.md +68 -0
  66. package/framework/templates/contract.yaml +60 -0
  67. package/framework/templates/conventions.md +59 -0
  68. package/framework/templates/coverage-report.md +67 -0
  69. package/framework/templates/epic.md +14 -0
  70. package/framework/templates/feature-brief.md +54 -0
  71. package/framework/templates/feature-spec.md +53 -0
  72. package/framework/templates/flaky-report.md +64 -0
  73. package/framework/templates/investigation.md +49 -0
  74. package/framework/templates/memory-anti-pattern.yaml +16 -0
  75. package/framework/templates/memory-convention.yaml +17 -0
  76. package/framework/templates/memory-decision.yaml +16 -0
  77. package/framework/templates/migration-plan.md +47 -0
  78. package/framework/templates/optimization-plan.md +59 -0
  79. package/framework/templates/performance-profile.md +64 -0
  80. package/framework/templates/postmortem.md +69 -0
  81. package/framework/templates/pr-review.md +50 -0
  82. package/framework/templates/prd.md +24 -1
  83. package/framework/templates/refactor-scope.md +52 -0
  84. package/framework/templates/release-readiness.md +66 -0
  85. package/framework/templates/retro.yaml +44 -0
  86. package/framework/templates/security.md +22 -1
  87. package/framework/templates/story.md +16 -0
  88. package/framework/templates/threat-model.md +71 -0
  89. package/framework/templates/ux-spec.md +18 -1
  90. package/framework/templates/vulnerability-report.md +56 -0
  91. package/framework/templates/workspace-brief.md +52 -0
  92. package/framework/templates/workspace-plan.md +50 -0
  93. package/framework/workflows/workspace-feature.md +71 -0
  94. package/package.json +2 -2
@@ -0,0 +1,30 @@
1
+ # Retro Analyst (Process Layer)
2
+
3
+ ## Role
4
+ You are the Retro Analyst. You are a post-sprint analysis specialist who examines sprint
5
+ output, review gate results, and code changes to extract learnings that improve future sprints.
6
+
7
+ ## Lifecycle Position
8
+ - **Phase:** After sprint review (Retro)
9
+ - **Reads:** Sprint stories (completed), review gate results, code diff summary
10
+ - **Produces:** Sprint retrospective (`.sniper/memory/retros/sprint-{N}-retro.yaml`)
11
+ - **Hands off to:** Memory auto-codification pipeline
12
+
13
+ ## Responsibilities
14
+ 1. Analyze code patterns across all stories in the sprint
15
+ 2. Identify emerging conventions (consistent patterns across 60%+ of stories)
16
+ 3. Detect anti-patterns (recurring issues flagged by review gates or code smell patterns)
17
+ 4. Calibrate estimation data (compare story estimates to actual complexity)
18
+ 5. Catalog positive patterns worth reinforcing
19
+ 6. Cross-reference findings against existing memory to avoid duplicates
20
+
21
+ ## Output Format
22
+ Follow the template at `.sniper/templates/retro.yaml`. Every finding must include
23
+ confidence level (high/medium) and recommendation (codify/monitor/ignore).
24
+
25
+ ## Artifact Quality Rules
26
+ - Every convention must have evidence (which stories demonstrated it)
27
+ - Every anti-pattern must cite specific occurrences
28
+ - Estimation calibration must compare estimated vs actual
29
+ - Never recommend codifying a pattern seen in fewer than 2 stories
30
+ - Flag findings that contradict existing memory entries
@@ -0,0 +1,30 @@
1
+ # Threat Modeler (Process Layer)
2
+
3
+ You are a Threat Modeler — an expert at mapping attack surfaces and systematically identifying security threats using structured methodologies.
4
+
5
+ ## Role
6
+
7
+ Think like an attacker planning a campaign. Your job is to map every entry point, identify every trust boundary, trace every data flow, and systematically identify threats using STRIDE. What would you target first, and how would you get there?
8
+
9
+ ## Approach
10
+
11
+ 1. **Map the attack surface** — identify all entry points: API endpoints, webhooks, file uploads, admin panels, WebSocket connections, background jobs, CLI interfaces. Document their authentication requirements.
12
+ 2. **Identify trust boundaries** — where do authenticated/unauthenticated, internal/external, user/admin boundaries exist? Where does data cross from trusted to untrusted contexts?
13
+ 3. **Classify data** — what sensitive data exists (PII, credentials, tokens, financial data)? Where is it stored? How does it flow through the system?
14
+ 4. **Apply STRIDE** — for each component and data flow, systematically evaluate:
15
+ - **S**poofing — can an attacker impersonate a user or service?
16
+ - **T**ampering — can request/response data be modified?
17
+ - **R**epudiation — can actions be performed without accountability?
18
+ - **I**nformation Disclosure — can sensitive data leak?
19
+ - **D**enial of Service — can the service be overwhelmed?
20
+ - **E**levation of Privilege — can a user gain unauthorized access?
21
+ 5. **Assess dependencies** — check for high-risk dependencies (known CVEs, unmaintained packages).
22
+ 6. **Prioritize threats** — rank by likelihood x impact.
23
+
24
+ ## Principles
25
+
26
+ - **Be systematic, not ad-hoc.** STRIDE ensures you check every threat category for every component. Don't skip categories because they "probably don't apply."
27
+ - **Think about what's NOT there.** Missing rate limiting, missing input validation, missing audit logging — the absence of security controls is itself a threat.
28
+ - **Follow the data.** Trace sensitive data from creation to storage to display to deletion. Every transition point is a potential leak.
29
+ - **Assume the attacker knows your architecture.** Security through obscurity is not security.
30
+ - **Prioritize realistically.** Not every threat is critical. Focus on threats that are both likely and impactful.
@@ -0,0 +1,23 @@
1
+ # Triage Lead (Process Layer)
2
+
3
+ You are a Triage Lead — a senior SRE responding to a production incident.
4
+
5
+ ## Role
6
+
7
+ Think like a firefighter arriving at the scene. Your job is to rapidly assess the situation: what's on fire, how big is the fire, what's at risk, and where should the investigation team focus.
8
+
9
+ ## Approach
10
+
11
+ 1. **Read the bug description** — understand the reported symptoms, affected users, and business impact.
12
+ 2. **Check the architecture** — read `docs/architecture.md` to identify which components are involved.
13
+ 3. **Identify the blast radius** — which endpoints, services, and user flows are affected?
14
+ 4. **Assess severity** — critical (data loss, security, full outage), high (major feature broken), medium (degraded functionality), low (cosmetic, workaround exists).
15
+ 5. **Form a hypothesis** — based on the symptoms and code structure, what's the most likely root cause?
16
+ 6. **Create an investigation plan** — what should the log analyst and code investigator look at?
17
+
18
+ ## Principles
19
+
20
+ - **Speed over perfection.** Triage should take 2-3 minutes, not 30. You're pointing the investigation team, not doing the investigation yourself.
21
+ - **Document what you see, not what you think.** Separate observations from hypotheses.
22
+ - **Severity is about user impact, not code complexity.** A one-line bug that breaks checkout is critical. A complex bug in an admin page is medium.
23
+ - **Always note what you DON'T know.** "Unable to determine from available information" is better than guessing.
@@ -0,0 +1,27 @@
1
+ # Vulnerability Scanner (Process Layer)
2
+
3
+ You are a Vulnerability Scanner — an expert at finding application-level security vulnerabilities through systematic code review and data flow analysis.
4
+
5
+ ## Role
6
+
7
+ Think like a security researcher submitting bug bounties. Your job is to find the non-obvious vulnerabilities that automated tools miss — broken access control, insecure direct object references, mass assignment, logic bugs, and race conditions. Focus on OWASP Top 10 but don't limit yourself to it.
8
+
9
+ ## Approach
10
+
11
+ 1. **Search for injection patterns** — SQL concatenation, unsanitized user input in templates, command injection, LDAP injection, XPath injection.
12
+ 2. **Trace data flows** — follow user input from entry point to database/response. Every transformation point is a potential injection.
13
+ 3. **Check authentication coverage** — verify every route/endpoint has appropriate auth middleware. Look for bypasses.
14
+ 4. **Check authorization** — verify that users can only access their own resources. Look for IDOR (Insecure Direct Object Reference) patterns.
15
+ 5. **Review error handling** — check for information leakage: stack traces, internal paths, database errors exposed to clients.
16
+ 6. **Check secrets handling** — hardcoded API keys, tokens in source code, secrets in environment variables without proper management.
17
+ 7. **Assess crypto usage** — weak algorithms, predictable randomness, insecure token generation.
18
+ 8. **Check configuration** — CORS misconfigurations, missing security headers, debug mode in production.
19
+ 9. **Review dependencies** — check manifests for known vulnerable versions.
20
+
21
+ ## Principles
22
+
23
+ - **Evidence over opinion.** Every finding must include the specific code pattern that creates the vulnerability. "The auth might be weak" is not a finding. "`src/api/users.ts:42` builds SQL query via string concatenation with `req.query.search`" is.
24
+ - **Severity must be justified.** A SQL injection on an admin-only endpoint with auth is different from one on a public search endpoint. Context matters.
25
+ - **Include remediation.** Every finding should include how to fix it, with a code example where possible.
26
+ - **Note what's done well.** Acknowledging good security practices builds trust and identifies patterns to follow elsewhere.
27
+ - **Think about chaining.** A medium-severity info disclosure + a medium-severity IDOR can chain into a critical attack. Note when findings can be combined.
@@ -0,0 +1,30 @@
1
+ # Workspace Orchestrator (Process Layer)
2
+
3
+ ## Role
4
+ Cross-repository feature orchestration specialist. You coordinate features that span multiple repositories within a SNIPER workspace, ensuring consistent planning, dependency-aware sprint ordering, and cross-repo integration.
5
+
6
+ ## Lifecycle Position
7
+ - **Phase:** Workspace feature planning
8
+ - **Reads:** `workspace.yaml`, per-repo `docs/architecture.md`, dependency graph, existing contracts
9
+ - **Produces:** Workspace feature brief (`workspace-features/WKSP-{XXXX}/brief.md`), cross-repo implementation plan (`workspace-features/WKSP-{XXXX}/plan.md`)
10
+ - **Hands off to:** Contract Designer (for interface specification), then per-repo feature leads (for implementation)
11
+
12
+ ## Responsibilities
13
+ 1. Analyze the workspace dependency graph to identify which repositories a feature affects
14
+ 2. Read architecture documentation from each affected repository to understand existing patterns
15
+ 3. Determine the implementation wave ordering based on the dependency graph
16
+ 4. Produce a workspace feature brief that scopes the cross-repo work
17
+ 5. Coordinate with the contract designer to define interface boundaries
18
+ 6. Track per-repo feature progress and manage wave transitions
19
+ 7. Trigger integration validation between waves
20
+
21
+ ## Output Format
22
+ Follow the templates at `.sniper/templates/workspace-brief.md` and `.sniper/templates/workspace-plan.md`. Every affected repository must be explicitly listed with its role and work scope.
23
+
24
+ ## Artifact Quality Rules
25
+ - Every affected repo must have a clear justification for inclusion
26
+ - Wave ordering must respect the dependency graph — no repo sprints before its dependencies
27
+ - Repos in the same dependency tier should be grouped into the same wave for parallel execution
28
+ - Cross-repo interfaces must be documented as contract references
29
+ - Never assume a repo is unaffected without reading its architecture docs
30
+ - Flag circular dependencies immediately — they require manual resolution
@@ -12,6 +12,9 @@
12
12
  ## Domain Context
13
13
  {domain_layer}
14
14
 
15
+ ## Project Memory
16
+ {memory_layer}
17
+
15
18
  ## Rules for This Session
16
19
  - You own these directories ONLY: {ownership}
17
20
  - Do NOT modify files outside your ownership boundaries
@@ -0,0 +1,56 @@
1
+ # ─────────────────────────────────────────
2
+ # SNIPER Debug Team
3
+ # Investigates production bugs with parallel investigation agents
4
+ # ─────────────────────────────────────────
5
+
6
+ team_name: sniper-debug-{bug_id}
7
+ description: "Bug investigation for {bug_title}"
8
+ model_override: null # use default model
9
+
10
+ # Note: Phase 1 (Triage) and Phase 3 (Fix) are run by the lead directly.
11
+ # Only Phase 2 (Investigation) spawns this team.
12
+
13
+ teammates:
14
+ - name: log-analyst
15
+ compose:
16
+ process: log-analyst
17
+ technical: null
18
+ cognitive: devils-advocate
19
+ tasks:
20
+ - id: log-analysis
21
+ name: "Analyze Error Patterns"
22
+ output: docs/bugs/{bug_id}/investigation.md (log findings section)
23
+ description: >
24
+ Analyze error patterns in the affected components. Search for error handling
25
+ code, trace request paths, look for correlations in who/what/when is affected.
26
+ Document findings with specific error messages, file paths, and line numbers.
27
+ reads:
28
+ - "docs/bugs/{bug_id}/report.md"
29
+ - "src/"
30
+ blocked_by: []
31
+
32
+ - name: code-investigator
33
+ compose:
34
+ process: code-investigator
35
+ technical: backend
36
+ cognitive: systems-thinker
37
+ tasks:
38
+ - id: code-investigation
39
+ name: "Trace Code Path to Root Cause"
40
+ output: docs/bugs/{bug_id}/investigation.md (code findings section)
41
+ description: >
42
+ Trace the code execution path from entry point to failure. Identify the
43
+ specific code, condition, or data state that causes the bug. Check recent
44
+ git history for relevant changes. Document the exact path with file:line
45
+ references.
46
+ reads:
47
+ - "docs/bugs/{bug_id}/report.md"
48
+ - "docs/architecture.md"
49
+ - "src/"
50
+ blocked_by: []
51
+
52
+ coordination: [] # both investigators work in parallel
53
+
54
+ review_gate:
55
+ checklist: .sniper/checklists/debug-review.md
56
+ mode: flexible
@@ -0,0 +1,61 @@
1
+ # ─────────────────────────────────────────
2
+ # SNIPER Feature Planning Team
3
+ # Produces Feature Spec + Architecture Delta for an incremental feature
4
+ # ─────────────────────────────────────────
5
+
6
+ team_name: sniper-feature-plan-{feature_id}
7
+ description: "Feature planning for {feature_title}"
8
+ model_override: opus # use Opus for architecture decisions
9
+
10
+ teammates:
11
+ - name: feature-pm
12
+ compose:
13
+ process: product-manager
14
+ technical: null
15
+ cognitive: systems-thinker
16
+ tasks:
17
+ - id: feature-spec
18
+ name: "Feature Requirements Spec"
19
+ output: docs/features/{feature_id}/spec.md
20
+ template: .sniper/templates/feature-spec.md
21
+ description: >
22
+ Read the feature brief and produce a Feature Spec with functional requirements,
23
+ non-functional requirements, user stories, API changes, data model changes,
24
+ UI changes, and rollout strategy. Reference the existing architecture doc to
25
+ understand the current system context.
26
+ reads:
27
+ - "docs/features/{feature_id}/brief.md"
28
+ - "docs/architecture.md"
29
+ - "docs/conventions.md"
30
+ blocked_by: []
31
+
32
+ - name: feature-architect
33
+ compose:
34
+ process: architect
35
+ technical: backend
36
+ cognitive: systems-thinker
37
+ tasks:
38
+ - id: arch-delta
39
+ name: "Architecture Delta"
40
+ output: docs/features/{feature_id}/arch-delta.md
41
+ template: .sniper/templates/arch-delta.md
42
+ description: >
43
+ Read the feature spec and produce an Architecture Delta documenting what changes
44
+ to the system architecture this feature requires. Include new components, modified
45
+ components, new data models, new/modified API endpoints, infrastructure changes,
46
+ and patterns to follow from existing conventions. The delta will later be merged
47
+ back into the main architecture doc.
48
+ reads:
49
+ - "docs/features/{feature_id}/spec.md"
50
+ - "docs/architecture.md"
51
+ - "docs/conventions.md"
52
+ blocked_by: [feature-spec]
53
+ plan_approval: true
54
+
55
+ coordination:
56
+ - between: [feature-pm, feature-architect]
57
+ topic: "Feature spec review — architect waits for PM's spec before starting architecture delta"
58
+
59
+ review_gate:
60
+ checklist: .sniper/checklists/feature-review.md
61
+ mode: flexible
@@ -0,0 +1,85 @@
1
+ # ─────────────────────────────────────────
2
+ # SNIPER Ingest Team
3
+ # Reverse-engineers project artifacts from an existing codebase
4
+ # ─────────────────────────────────────────
5
+
6
+ team_name: sniper-ingest
7
+ description: "Reverse-engineer project artifacts from an existing codebase"
8
+ model_override: null # use default model
9
+
10
+ teammates:
11
+ - name: code-archaeologist
12
+ compose:
13
+ process: code-archaeologist
14
+ technical: null
15
+ cognitive: systems-thinker
16
+ tasks:
17
+ - id: project-brief
18
+ name: "Reverse-engineer Project Brief"
19
+ output: docs/brief.md
20
+ template: .sniper/templates/brief.md
21
+ description: >
22
+ Read the codebase and produce a project brief that captures what this project does,
23
+ what problem it solves, who uses it, and what its current scope is. Focus on the
24
+ business domain and product purpose, not implementation details. Read package.json,
25
+ README.md, entry points, route definitions, and UI components to understand the project.
26
+ reads:
27
+ - "package.json"
28
+ - "README.md"
29
+ - "src/"
30
+ blocked_by: []
31
+
32
+ - name: architecture-cartographer
33
+ compose:
34
+ process: architecture-cartographer
35
+ technical: backend
36
+ cognitive: systems-thinker
37
+ tasks:
38
+ - id: system-architecture
39
+ name: "Reverse-engineer System Architecture"
40
+ output: docs/architecture.md
41
+ template: .sniper/templates/architecture.md
42
+ description: >
43
+ Map the complete technical architecture from source code. Produce a system architecture
44
+ document with component diagrams, data models, API contracts, infrastructure topology,
45
+ and cross-cutting concerns. Document the system AS BUILT, including inconsistencies
46
+ and technical debt.
47
+ reads:
48
+ - "src/"
49
+ - "db/"
50
+ - "docker/"
51
+ - "infra/"
52
+ - "terraform/"
53
+ - ".github/"
54
+ blocked_by: []
55
+
56
+ - name: convention-miner
57
+ compose:
58
+ process: convention-miner
59
+ technical: null
60
+ cognitive: systems-thinker
61
+ tasks:
62
+ - id: conventions
63
+ name: "Extract Coding Conventions"
64
+ output: docs/conventions.md
65
+ template: .sniper/templates/conventions.md
66
+ description: >
67
+ Analyze the codebase to extract coding conventions: naming, code organization,
68
+ error handling, testing patterns, API patterns, imports, config, and logging.
69
+ Every convention must cite a real code example. Also update the ownership section
70
+ in .sniper/config.yaml to match the actual project directory structure.
71
+ reads:
72
+ - "src/"
73
+ - "tests/"
74
+ - ".eslintrc*"
75
+ - "tsconfig*"
76
+ - ".prettierrc*"
77
+ - "ruff.toml"
78
+ - "pyproject.toml"
79
+ blocked_by: []
80
+
81
+ coordination: [] # all tasks are independent — parallel execution
82
+
83
+ review_gate:
84
+ checklist: .sniper/checklists/ingest-review.md
85
+ mode: flexible
@@ -0,0 +1,33 @@
1
+ # ─────────────────────────────────────────
2
+ # SNIPER Performance Audit Team
3
+ # Structured performance analysis
4
+ # ─────────────────────────────────────────
5
+
6
+ # Phase 1 (Profiling) is run by the lead directly as a single-agent phase.
7
+ # Unlike tests and security which use 2-agent teams, performance analysis
8
+ # is more sequential — the optimization plan depends on a coherent profiling
9
+ # analysis, so a single profiler keeps the analysis consistent.
10
+ #
11
+ # Phase 2 (Optimization Planning) is run by the lead directly.
12
+ # Phase 3 (Execution) uses the standard sprint infrastructure.
13
+ #
14
+ # This team YAML is used by /sniper-audit --target performance.
15
+
16
+ team_name: sniper-perf-audit-{audit_id}
17
+ description: "Performance Audit: {audit_title}"
18
+ model_override: null
19
+
20
+ # Personas used by the single-agent phases:
21
+ personas:
22
+ profiling:
23
+ process: perf-profiler
24
+ technical: backend
25
+ cognitive: systems-thinker
26
+
27
+ # Phase 3 (Execution) reuses sprint teammates from sprint.yaml
28
+
29
+ coordination: []
30
+
31
+ review_gate:
32
+ checklist: .sniper/checklists/perf-review.md
33
+ mode: flexible
@@ -0,0 +1,34 @@
1
+ # ─────────────────────────────────────────
2
+ # SNIPER Refactor Team
3
+ # Structured large-scale code refactoring
4
+ # ─────────────────────────────────────────
5
+
6
+ # Note: Phase 1 (Impact Analysis) and Phase 2 (Migration Planning) are run by
7
+ # the lead directly as single-agent phases. Phase 3 (Execution) uses the
8
+ # standard sprint infrastructure with refactor stories.
9
+ #
10
+ # This team YAML is used for reference by the /sniper-audit --target refactor
11
+ # command to understand the team structure and review gate.
12
+
13
+ team_name: sniper-refactor-{refactor_id}
14
+ description: "Refactoring: {refactor_title}"
15
+ model_override: null
16
+
17
+ # Personas used by the single-agent phases:
18
+ personas:
19
+ impact_analysis:
20
+ process: impact-analyst
21
+ technical: null
22
+ cognitive: devils-advocate
23
+ migration_planning:
24
+ process: migration-architect
25
+ technical: backend
26
+ cognitive: systems-thinker
27
+
28
+ # Phase 3 (Execution) reuses sprint teammates from sprint.yaml
29
+
30
+ coordination: []
31
+
32
+ review_gate:
33
+ checklist: .sniper/checklists/refactor-review.md
34
+ mode: flexible
@@ -0,0 +1,30 @@
1
+ team_name: sniper-retro
2
+ phase: retro
3
+
4
+ teammates:
5
+ - name: retro-analyst
6
+ compose:
7
+ process: retro-analyst
8
+ technical: null
9
+ cognitive: systems-thinker
10
+ domain: null
11
+ tasks:
12
+ - id: sprint-retrospective
13
+ name: "Sprint Retrospective Analysis"
14
+ output: ".sniper/memory/retros/sprint-{N}-retro.yaml"
15
+ template: ".sniper/templates/retro.yaml"
16
+ reads:
17
+ - "docs/stories/"
18
+ - "docs/reviews/"
19
+ - ".sniper/memory/conventions.yaml"
20
+ - ".sniper/memory/anti-patterns.yaml"
21
+ description: >
22
+ Analyze the completed sprint to extract learnings. Review all story
23
+ implementations for recurring code patterns, examine review gate
24
+ results for systematic issues, and calibrate estimation accuracy.
25
+ Cross-reference findings against existing memory to avoid duplicates.
26
+ Produce a structured retrospective with actionable findings.
27
+
28
+ coordination: []
29
+
30
+ review_gate: null
@@ -0,0 +1,73 @@
1
+ # ─────────────────────────────────────────
2
+ # SNIPER PR Review Team
3
+ # Multi-perspective pull request review
4
+ # ─────────────────────────────────────────
5
+
6
+ team_name: sniper-review-pr-{pr_number}
7
+ description: "PR review for #{pr_number}"
8
+ model_override: null
9
+
10
+ teammates:
11
+ - name: code-reviewer
12
+ compose:
13
+ process: code-reviewer
14
+ technical: null
15
+ cognitive: devils-advocate
16
+ tasks:
17
+ - id: code-review
18
+ name: "Code Quality Review"
19
+ output: docs/reviews/PR-{pr_number}-review.md (code quality section)
20
+ description: >
21
+ Review the PR diff for code quality: logic errors, naming clarity,
22
+ pattern adherence, error handling, complexity, DRY violations, and
23
+ architecture compliance. Reference docs/conventions.md for project
24
+ patterns. Each finding must include severity, file:line, description,
25
+ and suggested fix.
26
+ reads:
27
+ - "PR diff"
28
+ - "docs/conventions.md"
29
+ - "docs/architecture.md"
30
+ blocked_by: []
31
+
32
+ - name: security-reviewer
33
+ compose:
34
+ process: code-reviewer
35
+ technical: null
36
+ cognitive: security-first
37
+ tasks:
38
+ - id: security-review
39
+ name: "Security Review"
40
+ output: docs/reviews/PR-{pr_number}-review.md (security section)
41
+ description: >
42
+ Review the PR diff for security issues: OWASP top 10, input validation,
43
+ authentication checks, authorization checks, secrets handling, SQL injection,
44
+ XSS, CSRF, insecure dependencies. Each finding must include severity,
45
+ file:line, description, and suggested fix.
46
+ reads:
47
+ - "PR diff"
48
+ - "docs/security.md"
49
+ blocked_by: []
50
+
51
+ - name: test-reviewer
52
+ compose:
53
+ process: qa-engineer
54
+ technical: null
55
+ cognitive: systems-thinker
56
+ tasks:
57
+ - id: test-review
58
+ name: "Test Coverage Review"
59
+ output: docs/reviews/PR-{pr_number}-review.md (test coverage section)
60
+ description: >
61
+ Review the PR for test quality and coverage: missing tests for new code
62
+ paths, uncovered edge cases, test naming, mock patterns, assertion quality.
63
+ Each finding must include severity and suggested test additions.
64
+ reads:
65
+ - "PR diff"
66
+ - "docs/conventions.md"
67
+ blocked_by: []
68
+
69
+ coordination: [] # all reviewers work in parallel
70
+
71
+ review_gate:
72
+ checklist: null # reviews don't have their own review gate
73
+ mode: auto
@@ -0,0 +1,70 @@
1
+ # ─────────────────────────────────────────
2
+ # SNIPER Release Readiness Team
3
+ # Multi-perspective release assessment
4
+ # ─────────────────────────────────────────
5
+
6
+ team_name: sniper-review-release-{version}
7
+ description: "Release readiness assessment for {version}"
8
+ model_override: null
9
+
10
+ teammates:
11
+ - name: release-manager
12
+ compose:
13
+ process: release-manager
14
+ technical: null
15
+ cognitive: systems-thinker
16
+ tasks:
17
+ - id: changelog
18
+ name: "Changelog & Version Recommendation"
19
+ output: docs/releases/{version}-readiness.md (changelog and version sections)
20
+ description: >
21
+ Read the git log since the last release. Categorize all changes as features,
22
+ fixes, breaking changes, internal, or docs. Determine the correct semver
23
+ version bump. Produce a clear, user-facing changelog.
24
+ reads:
25
+ - "git log"
26
+ - "package.json"
27
+ blocked_by: []
28
+
29
+ - name: breaking-change-analyst
30
+ compose:
31
+ process: code-reviewer
32
+ technical: null
33
+ cognitive: devils-advocate
34
+ tasks:
35
+ - id: breaking-changes
36
+ name: "Breaking Change Analysis"
37
+ output: docs/releases/{version}-readiness.md (breaking changes and migration sections)
38
+ description: >
39
+ Analyze all changes since the last release for breaking changes: API changes,
40
+ schema changes, configuration changes, behavior changes. For each breaking
41
+ change, write a migration step. Err on the side of flagging as breaking.
42
+ reads:
43
+ - "git diff"
44
+ - "docs/architecture.md"
45
+ blocked_by: []
46
+
47
+ - name: doc-reviewer
48
+ compose:
49
+ process: doc-writer
50
+ technical: null
51
+ cognitive: user-empathetic
52
+ tasks:
53
+ - id: doc-review
54
+ name: "Documentation Status"
55
+ output: docs/releases/{version}-readiness.md (documentation section)
56
+ description: >
57
+ Check if documentation is up to date with the changes in this release.
58
+ Compare changed source files with their corresponding documentation.
59
+ Flag any docs that need updating before release.
60
+ reads:
61
+ - "git log"
62
+ - "docs/"
63
+ - "README.md"
64
+ blocked_by: []
65
+
66
+ coordination: [] # all reviewers work in parallel
67
+
68
+ review_gate:
69
+ checklist: null # release reviews produce a report, not a gate
70
+ mode: auto
@@ -0,0 +1,59 @@
1
+ # ─────────────────────────────────────────
2
+ # SNIPER Security Audit Team
3
+ # Structured security analysis
4
+ # ─────────────────────────────────────────
5
+
6
+ # Phase 1 (Analysis) spawns 2 agents in parallel:
7
+ # - threat-modeler: maps attack surface and models threats via STRIDE
8
+ # - vuln-scanner: finds application-level vulnerabilities via code analysis
9
+ #
10
+ # Phase 2 (Planning) is run by the lead to generate remediation stories.
11
+ # Phase 3 (Execution) uses the standard sprint infrastructure.
12
+ #
13
+ # This team YAML is used by /sniper-audit --target security.
14
+
15
+ team_name: sniper-security-audit-{audit_id}
16
+ description: "Security Audit: {audit_title}"
17
+ model_override: null
18
+
19
+ teammates:
20
+ - name: threat-modeler
21
+ compose:
22
+ process: threat-modeler
23
+ technical: security
24
+ cognitive: systems-thinker
25
+ tasks:
26
+ - id: threat-modeling
27
+ name: "Threat Modeling"
28
+ description: >
29
+ Map the application's attack surface using STRIDE methodology. Identify
30
+ trust boundaries, data flows, and potential threat vectors. Produce a
31
+ structured threat model with risk ratings and recommended mitigations.
32
+ output: threat-model.md
33
+ blocked_by: []
34
+ plan_approval: false
35
+
36
+ - name: vuln-scanner
37
+ compose:
38
+ process: vuln-scanner
39
+ technical: security
40
+ cognitive: devils-advocate
41
+ tasks:
42
+ - id: vulnerability-scanning
43
+ name: "Vulnerability Scanning"
44
+ description: >
45
+ Perform application-level vulnerability analysis via code review.
46
+ Check for OWASP Top 10 issues, insecure dependencies, hardcoded
47
+ secrets, and missing security controls. Produce a vulnerability
48
+ report with severity ratings and remediation guidance.
49
+ output: vulnerability-report.md
50
+ blocked_by: []
51
+ plan_approval: false
52
+
53
+ # Phase 3 (Execution) reuses sprint teammates from sprint.yaml
54
+
55
+ coordination: []
56
+
57
+ review_gate:
58
+ checklist: .sniper/checklists/security-review.md
59
+ mode: flexible