@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.
- package/README.md +122 -32
- package/framework/checklists/debug-review.md +34 -0
- package/framework/checklists/feature-review.md +42 -0
- package/framework/checklists/ingest-review.md +42 -0
- package/framework/checklists/memory-review.md +30 -0
- package/framework/checklists/perf-review.md +33 -0
- package/framework/checklists/refactor-review.md +33 -0
- package/framework/checklists/security-review.md +34 -0
- package/framework/checklists/test-review.md +32 -0
- package/framework/checklists/workspace-review.md +34 -0
- package/framework/commands/sniper-audit.md +1549 -0
- package/framework/commands/sniper-compose.md +88 -2
- package/framework/commands/sniper-debug.md +337 -0
- package/framework/commands/sniper-discover.md +41 -15
- package/framework/commands/sniper-feature.md +515 -0
- package/framework/commands/sniper-ingest.md +506 -0
- package/framework/commands/sniper-init.md +21 -5
- package/framework/commands/sniper-memory.md +219 -0
- package/framework/commands/sniper-plan.md +41 -19
- package/framework/commands/sniper-review.md +106 -42
- package/framework/commands/sniper-solve.md +47 -14
- package/framework/commands/sniper-sprint.md +132 -17
- package/framework/commands/sniper-status.md +240 -35
- package/framework/commands/sniper-workspace-feature.md +267 -0
- package/framework/commands/sniper-workspace-init.md +252 -0
- package/framework/commands/sniper-workspace-status.md +112 -0
- package/framework/commands/sniper-workspace-validate.md +138 -0
- package/framework/config.template.yaml +88 -9
- package/framework/personas/process/architecture-cartographer.md +25 -0
- package/framework/personas/process/code-archaeologist.md +22 -0
- package/framework/personas/process/code-investigator.md +29 -0
- package/framework/personas/process/code-reviewer.md +26 -0
- package/framework/personas/process/contract-designer.md +31 -0
- package/framework/personas/process/convention-miner.md +27 -0
- package/framework/personas/process/coverage-analyst.md +24 -0
- package/framework/personas/process/flake-hunter.md +30 -0
- package/framework/personas/process/impact-analyst.md +23 -0
- package/framework/personas/process/integration-validator.md +29 -0
- package/framework/personas/process/log-analyst.md +22 -0
- package/framework/personas/process/migration-architect.md +24 -0
- package/framework/personas/process/perf-profiler.md +27 -0
- package/framework/personas/process/release-manager.md +23 -0
- package/framework/personas/process/retro-analyst.md +30 -0
- package/framework/personas/process/threat-modeler.md +30 -0
- package/framework/personas/process/triage-lead.md +23 -0
- package/framework/personas/process/vuln-scanner.md +27 -0
- package/framework/personas/process/workspace-orchestrator.md +30 -0
- package/framework/spawn-prompts/_template.md +3 -0
- package/framework/teams/debug.yaml +56 -0
- package/framework/teams/feature-plan.yaml +61 -0
- package/framework/teams/ingest.yaml +85 -0
- package/framework/teams/perf.yaml +33 -0
- package/framework/teams/refactor.yaml +34 -0
- package/framework/teams/retro.yaml +30 -0
- package/framework/teams/review-pr.yaml +73 -0
- package/framework/teams/review-release.yaml +70 -0
- package/framework/teams/security.yaml +59 -0
- package/framework/teams/test.yaml +59 -0
- package/framework/teams/workspace-feature.yaml +69 -0
- package/framework/teams/workspace-validation.yaml +27 -0
- package/framework/templates/arch-delta.md +74 -0
- package/framework/templates/architecture.md +24 -1
- package/framework/templates/brief.md +22 -1
- package/framework/templates/bug-report.md +55 -0
- package/framework/templates/contract-validation-report.md +68 -0
- package/framework/templates/contract.yaml +60 -0
- package/framework/templates/conventions.md +59 -0
- package/framework/templates/coverage-report.md +67 -0
- package/framework/templates/epic.md +14 -0
- package/framework/templates/feature-brief.md +54 -0
- package/framework/templates/feature-spec.md +53 -0
- package/framework/templates/flaky-report.md +64 -0
- package/framework/templates/investigation.md +49 -0
- package/framework/templates/memory-anti-pattern.yaml +16 -0
- package/framework/templates/memory-convention.yaml +17 -0
- package/framework/templates/memory-decision.yaml +16 -0
- package/framework/templates/migration-plan.md +47 -0
- package/framework/templates/optimization-plan.md +59 -0
- package/framework/templates/performance-profile.md +64 -0
- package/framework/templates/postmortem.md +69 -0
- package/framework/templates/pr-review.md +50 -0
- package/framework/templates/prd.md +24 -1
- package/framework/templates/refactor-scope.md +52 -0
- package/framework/templates/release-readiness.md +66 -0
- package/framework/templates/retro.yaml +44 -0
- package/framework/templates/security.md +22 -1
- package/framework/templates/story.md +16 -0
- package/framework/templates/threat-model.md +71 -0
- package/framework/templates/ux-spec.md +18 -1
- package/framework/templates/vulnerability-report.md +56 -0
- package/framework/templates/workspace-brief.md +52 -0
- package/framework/templates/workspace-plan.md +50 -0
- package/framework/workflows/workspace-feature.md +71 -0
- package/package.json +2 -2
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Coverage Report: {title}
|
|
2
|
+
|
|
3
|
+
> **Audit ID:** TST-{NNN}
|
|
4
|
+
> **Status:** Analyzing
|
|
5
|
+
> **Date:** {date}
|
|
6
|
+
> **Author:** Coverage Analyst
|
|
7
|
+
|
|
8
|
+
## Coverage Summary
|
|
9
|
+
<!-- sniper:managed:coverage-summary:start -->
|
|
10
|
+
|
|
11
|
+
| Metric | Coverage | Target |
|
|
12
|
+
|--------|----------|--------|
|
|
13
|
+
| Lines | | |
|
|
14
|
+
| Branches | | |
|
|
15
|
+
| Functions | | |
|
|
16
|
+
| Statements | | |
|
|
17
|
+
|
|
18
|
+
<!-- sniper:managed:coverage-summary:end -->
|
|
19
|
+
|
|
20
|
+
## Critical Gaps
|
|
21
|
+
<!-- sniper:managed:critical-gaps:start -->
|
|
22
|
+
<!-- Uncovered code ranked by risk — public APIs first, then business logic, then utilities -->
|
|
23
|
+
|
|
24
|
+
### Gap 1: {description}
|
|
25
|
+
- **File:** `path/to/file.ts:42-67`
|
|
26
|
+
- **Risk:** Critical / High / Medium / Low
|
|
27
|
+
- **What's uncovered:** {description of the uncovered code path}
|
|
28
|
+
- **Why it matters:** {production impact if this code fails}
|
|
29
|
+
- **Suggested test approach:** {how to test it}
|
|
30
|
+
- **Effort:** S / M / L
|
|
31
|
+
|
|
32
|
+
<!-- sniper:managed:critical-gaps:end -->
|
|
33
|
+
|
|
34
|
+
## Integration Boundaries
|
|
35
|
+
<!-- sniper:managed:integration-boundaries:start -->
|
|
36
|
+
<!-- Places where modules/services interact that lack integration tests -->
|
|
37
|
+
|
|
38
|
+
| Boundary | Components | Integration Tests? | Risk |
|
|
39
|
+
|----------|------------|-------------------|------|
|
|
40
|
+
| | A ↔ B | None / Partial / Good | |
|
|
41
|
+
|
|
42
|
+
<!-- sniper:managed:integration-boundaries:end -->
|
|
43
|
+
|
|
44
|
+
## Test Pattern Analysis
|
|
45
|
+
<!-- sniper:managed:test-patterns:start -->
|
|
46
|
+
<!-- Assessment of testing consistency across the codebase -->
|
|
47
|
+
|
|
48
|
+
| Aspect | Current State | Recommendation |
|
|
49
|
+
|--------|--------------|----------------|
|
|
50
|
+
| Assertion style | | |
|
|
51
|
+
| Mock patterns | | |
|
|
52
|
+
| Test structure | | |
|
|
53
|
+
| Naming conventions | | |
|
|
54
|
+
| Setup/teardown | | |
|
|
55
|
+
|
|
56
|
+
<!-- sniper:managed:test-patterns:end -->
|
|
57
|
+
|
|
58
|
+
## Prioritized Recommendations
|
|
59
|
+
<!-- sniper:managed:recommendations:start -->
|
|
60
|
+
<!-- Ordered list of what to test next, with effort estimates -->
|
|
61
|
+
|
|
62
|
+
| Priority | Recommendation | Effort | Impact |
|
|
63
|
+
|----------|---------------|--------|--------|
|
|
64
|
+
| 1 | | S/M/L | |
|
|
65
|
+
| 2 | | S/M/L | |
|
|
66
|
+
|
|
67
|
+
<!-- sniper:managed:recommendations:end -->
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
# Epic {number}: {title}
|
|
2
2
|
|
|
3
|
+
> **Version:** 1
|
|
3
4
|
> **Status:** Draft
|
|
5
|
+
> **Last Updated:** {date}
|
|
4
6
|
> **Priority:** P{0|1|2}
|
|
5
7
|
> **Estimated Points:** {total}
|
|
6
8
|
> **Dependencies:** {epic dependencies or "None"}
|
|
9
|
+
> **Change Log:**
|
|
10
|
+
> - v1 ({date}): Initial version
|
|
7
11
|
|
|
8
12
|
## Scope
|
|
13
|
+
<!-- sniper:managed:scope:start -->
|
|
9
14
|
<!-- What this epic covers and what it explicitly does NOT cover -->
|
|
10
15
|
|
|
11
16
|
### In Scope
|
|
@@ -13,21 +18,30 @@
|
|
|
13
18
|
|
|
14
19
|
### Out of Scope
|
|
15
20
|
-
|
|
21
|
+
<!-- sniper:managed:scope:end -->
|
|
16
22
|
|
|
17
23
|
## Architecture Context
|
|
24
|
+
<!-- sniper:managed:architecture-context:start -->
|
|
18
25
|
<!-- EMBED relevant sections from docs/architecture.md — don't just reference -->
|
|
26
|
+
<!-- sniper:managed:architecture-context:end -->
|
|
19
27
|
|
|
20
28
|
## Stories
|
|
29
|
+
<!-- sniper:managed:stories:start -->
|
|
21
30
|
| # | Story | Complexity | Dependencies | Owner |
|
|
22
31
|
|---|-------|-----------|-------------|-------|
|
|
23
32
|
| {epic}.1 | | S/M/L/XL | | backend/frontend/infra |
|
|
24
33
|
| {epic}.2 | | | | |
|
|
34
|
+
<!-- sniper:managed:stories:end -->
|
|
25
35
|
|
|
26
36
|
## Acceptance Criteria
|
|
37
|
+
<!-- sniper:managed:acceptance-criteria:start -->
|
|
27
38
|
<!-- Epic-level acceptance criteria — what must be true when ALL stories are done -->
|
|
28
39
|
1.
|
|
29
40
|
2.
|
|
30
41
|
3.
|
|
42
|
+
<!-- sniper:managed:acceptance-criteria:end -->
|
|
31
43
|
|
|
32
44
|
## Technical Notes
|
|
45
|
+
<!-- sniper:managed:technical-notes:start -->
|
|
33
46
|
<!-- Any technical considerations specific to this epic -->
|
|
47
|
+
<!-- sniper:managed:technical-notes:end -->
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Feature Brief: {title}
|
|
2
|
+
|
|
3
|
+
> **Feature ID:** SNPR-{XXXX}
|
|
4
|
+
> **Version:** 1
|
|
5
|
+
> **Status:** Draft
|
|
6
|
+
> **Date:** {date}
|
|
7
|
+
> **Author:** Feature Scoping Agent
|
|
8
|
+
> **Change Log:**
|
|
9
|
+
> - v1 ({date}): Initial version
|
|
10
|
+
|
|
11
|
+
## Feature Description
|
|
12
|
+
<!-- sniper:managed:feature-description:start -->
|
|
13
|
+
<!-- What this feature does, in user-facing terms -->
|
|
14
|
+
<!-- sniper:managed:feature-description:end -->
|
|
15
|
+
|
|
16
|
+
## Motivation
|
|
17
|
+
<!-- sniper:managed:motivation:start -->
|
|
18
|
+
<!-- Why this feature is needed. What user problem does it solve? -->
|
|
19
|
+
<!-- sniper:managed:motivation:end -->
|
|
20
|
+
|
|
21
|
+
## Affected Areas
|
|
22
|
+
<!-- sniper:managed:affected-areas:start -->
|
|
23
|
+
|
|
24
|
+
### Components Affected
|
|
25
|
+
| Component | Impact | Notes |
|
|
26
|
+
|-----------|--------|-------|
|
|
27
|
+
| | Low / Medium / High | |
|
|
28
|
+
|
|
29
|
+
### Files Likely Modified
|
|
30
|
+
- `path/to/file.ts` — reason
|
|
31
|
+
|
|
32
|
+
<!-- sniper:managed:affected-areas:end -->
|
|
33
|
+
|
|
34
|
+
## Scope
|
|
35
|
+
|
|
36
|
+
### In Scope
|
|
37
|
+
<!-- sniper:managed:in-scope:start -->
|
|
38
|
+
-
|
|
39
|
+
<!-- sniper:managed:in-scope:end -->
|
|
40
|
+
|
|
41
|
+
### Out of Scope
|
|
42
|
+
<!-- sniper:managed:out-of-scope:start -->
|
|
43
|
+
-
|
|
44
|
+
<!-- sniper:managed:out-of-scope:end -->
|
|
45
|
+
|
|
46
|
+
## Risks & Open Questions
|
|
47
|
+
<!-- sniper:managed:risks:start -->
|
|
48
|
+
1.
|
|
49
|
+
<!-- sniper:managed:risks:end -->
|
|
50
|
+
|
|
51
|
+
## Dependencies
|
|
52
|
+
<!-- sniper:managed:dependencies:start -->
|
|
53
|
+
<!-- External services, libraries, or other features needed -->
|
|
54
|
+
<!-- sniper:managed:dependencies:end -->
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Feature Spec: {title}
|
|
2
|
+
|
|
3
|
+
> **Feature ID:** SNPR-{XXXX}
|
|
4
|
+
> **Version:** 1
|
|
5
|
+
> **Status:** Draft
|
|
6
|
+
> **Date:** {date}
|
|
7
|
+
> **Author:** Feature Planning Team — PM
|
|
8
|
+
> **Source:** `docs/features/SNPR-{XXXX}/brief.md`
|
|
9
|
+
> **Change Log:**
|
|
10
|
+
> - v1 ({date}): Initial version
|
|
11
|
+
|
|
12
|
+
## Requirements
|
|
13
|
+
|
|
14
|
+
### Functional Requirements
|
|
15
|
+
<!-- sniper:managed:functional-requirements:start -->
|
|
16
|
+
| ID | Requirement | Priority | Acceptance Criteria |
|
|
17
|
+
|----|------------|----------|-------------------|
|
|
18
|
+
| FR-001 | | P0 | |
|
|
19
|
+
<!-- sniper:managed:functional-requirements:end -->
|
|
20
|
+
|
|
21
|
+
### Non-Functional Requirements
|
|
22
|
+
<!-- sniper:managed:nonfunctional-requirements:start -->
|
|
23
|
+
| Category | Requirement | Target |
|
|
24
|
+
|----------|------------|--------|
|
|
25
|
+
| | | |
|
|
26
|
+
<!-- sniper:managed:nonfunctional-requirements:end -->
|
|
27
|
+
|
|
28
|
+
## User Stories
|
|
29
|
+
<!-- sniper:managed:user-stories:start -->
|
|
30
|
+
| ID | As a... | I want to... | So that... |
|
|
31
|
+
|----|---------|-------------|-----------|
|
|
32
|
+
| US-001 | | | |
|
|
33
|
+
<!-- sniper:managed:user-stories:end -->
|
|
34
|
+
|
|
35
|
+
## API Changes
|
|
36
|
+
<!-- sniper:managed:api-changes:start -->
|
|
37
|
+
<!-- New endpoints, modified endpoints, deprecated endpoints -->
|
|
38
|
+
<!-- sniper:managed:api-changes:end -->
|
|
39
|
+
|
|
40
|
+
## Data Model Changes
|
|
41
|
+
<!-- sniper:managed:data-model-changes:start -->
|
|
42
|
+
<!-- New tables/collections, modified schemas, migrations needed -->
|
|
43
|
+
<!-- sniper:managed:data-model-changes:end -->
|
|
44
|
+
|
|
45
|
+
## UI Changes
|
|
46
|
+
<!-- sniper:managed:ui-changes:start -->
|
|
47
|
+
<!-- New screens, modified screens, new components -->
|
|
48
|
+
<!-- sniper:managed:ui-changes:end -->
|
|
49
|
+
|
|
50
|
+
## Rollout Strategy
|
|
51
|
+
<!-- sniper:managed:rollout:start -->
|
|
52
|
+
<!-- Feature flag? Gradual rollout? Migration needed? -->
|
|
53
|
+
<!-- sniper:managed:rollout:end -->
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Flaky Test Report: {title}
|
|
2
|
+
|
|
3
|
+
> **Audit ID:** TST-{NNN}
|
|
4
|
+
> **Status:** Analyzing
|
|
5
|
+
> **Date:** {date}
|
|
6
|
+
> **Author:** Flake Hunter
|
|
7
|
+
|
|
8
|
+
## Flake Summary
|
|
9
|
+
<!-- sniper:managed:flake-summary:start -->
|
|
10
|
+
|
|
11
|
+
| Root Cause Category | Count |
|
|
12
|
+
|-------------------|-------|
|
|
13
|
+
| Timing | |
|
|
14
|
+
| Shared state | |
|
|
15
|
+
| Network dependency | |
|
|
16
|
+
| Race condition | |
|
|
17
|
+
| Non-deterministic data | |
|
|
18
|
+
| Environment coupling | |
|
|
19
|
+
| **Total** | |
|
|
20
|
+
|
|
21
|
+
<!-- sniper:managed:flake-summary:end -->
|
|
22
|
+
|
|
23
|
+
## Flaky Test Inventory
|
|
24
|
+
<!-- sniper:managed:flaky-tests:start -->
|
|
25
|
+
|
|
26
|
+
### {Test Name}
|
|
27
|
+
- **File:** `path/to/test.ts:42`
|
|
28
|
+
- **Root cause:** Timing / Shared state / Network / Race condition / Non-deterministic data / Environment
|
|
29
|
+
- **Evidence:** {how the flakiness was detected or reproduced}
|
|
30
|
+
- **Suggested fix:** {specific remediation approach}
|
|
31
|
+
- **Effort:** S / M / L
|
|
32
|
+
|
|
33
|
+
<!-- sniper:managed:flaky-tests:end -->
|
|
34
|
+
|
|
35
|
+
## Systemic Issues
|
|
36
|
+
<!-- sniper:managed:systemic-issues:start -->
|
|
37
|
+
<!-- Patterns that cause multiple flaky tests -->
|
|
38
|
+
|
|
39
|
+
### {Issue Title}
|
|
40
|
+
- **Affected tests:** {count} tests
|
|
41
|
+
- **Root cause:** {description of the systemic pattern}
|
|
42
|
+
- **Examples:** {list of affected test files}
|
|
43
|
+
- **Fix approach:** {how to fix the systemic issue}
|
|
44
|
+
|
|
45
|
+
<!-- sniper:managed:systemic-issues:end -->
|
|
46
|
+
|
|
47
|
+
## Quick Wins
|
|
48
|
+
<!-- sniper:managed:quick-wins:start -->
|
|
49
|
+
<!-- Flaky tests that can be fixed with minimal effort -->
|
|
50
|
+
|
|
51
|
+
| Test | Fix | Effort |
|
|
52
|
+
|------|-----|--------|
|
|
53
|
+
| | | S |
|
|
54
|
+
|
|
55
|
+
<!-- sniper:managed:quick-wins:end -->
|
|
56
|
+
|
|
57
|
+
## Prevention Recommendations
|
|
58
|
+
<!-- sniper:managed:prevention:start -->
|
|
59
|
+
<!-- Patterns and guardrails to prevent future flaky tests -->
|
|
60
|
+
|
|
61
|
+
1. {Recommendation}
|
|
62
|
+
2. {Recommendation}
|
|
63
|
+
|
|
64
|
+
<!-- sniper:managed:prevention:end -->
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Investigation: {title}
|
|
2
|
+
|
|
3
|
+
> **Bug ID:** BUG-{NNN}
|
|
4
|
+
> **Status:** Investigating
|
|
5
|
+
> **Date:** {date}
|
|
6
|
+
> **Based on:** `docs/bugs/BUG-{NNN}/report.md`
|
|
7
|
+
|
|
8
|
+
## Log Findings
|
|
9
|
+
<!-- sniper:managed:log-findings:start -->
|
|
10
|
+
<!-- Findings from the Log Analyst -->
|
|
11
|
+
|
|
12
|
+
### Error Patterns
|
|
13
|
+
<!-- What errors were found, their frequency, and timing -->
|
|
14
|
+
|
|
15
|
+
### Correlations
|
|
16
|
+
<!-- Patterns in who/what/when is affected -->
|
|
17
|
+
|
|
18
|
+
### Evidence
|
|
19
|
+
<!-- Specific error messages, stack traces, and their locations -->
|
|
20
|
+
|
|
21
|
+
<!-- sniper:managed:log-findings:end -->
|
|
22
|
+
|
|
23
|
+
## Code Findings
|
|
24
|
+
<!-- sniper:managed:code-findings:start -->
|
|
25
|
+
<!-- Findings from the Code Investigator -->
|
|
26
|
+
|
|
27
|
+
### Execution Path
|
|
28
|
+
<!-- The code path from entry point to failure: file:line → file:line → FAILURE -->
|
|
29
|
+
|
|
30
|
+
### Root Cause Identification
|
|
31
|
+
<!-- The specific code, condition, or data state that causes the failure -->
|
|
32
|
+
|
|
33
|
+
### Recent Changes
|
|
34
|
+
<!-- Relevant git history for affected files -->
|
|
35
|
+
|
|
36
|
+
### Related Fragile Code
|
|
37
|
+
<!-- Other code nearby with similar vulnerability patterns -->
|
|
38
|
+
|
|
39
|
+
<!-- sniper:managed:code-findings:end -->
|
|
40
|
+
|
|
41
|
+
## Root Cause
|
|
42
|
+
<!-- sniper:managed:root-cause:start -->
|
|
43
|
+
<!-- Combined analysis: the definitive root cause explanation -->
|
|
44
|
+
<!-- sniper:managed:root-cause:end -->
|
|
45
|
+
|
|
46
|
+
## Recommended Fix
|
|
47
|
+
<!-- sniper:managed:recommended-fix:start -->
|
|
48
|
+
<!-- What should be changed to fix the issue -->
|
|
49
|
+
<!-- sniper:managed:recommended-fix:end -->
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Anti-Pattern Entry Template
|
|
2
|
+
# Add to: .sniper/memory/anti-patterns.yaml
|
|
3
|
+
|
|
4
|
+
# - id: ap-XXX # Auto-assigned sequential ID
|
|
5
|
+
# description: "" # What the anti-pattern is
|
|
6
|
+
# why_bad: "" # Why it's problematic
|
|
7
|
+
# fix_pattern: "" # What to do instead
|
|
8
|
+
# source:
|
|
9
|
+
# type: review_gate | retro | manual | imported
|
|
10
|
+
# ref: "" # Source reference
|
|
11
|
+
# story: "" # Story where it was found (optional)
|
|
12
|
+
# date: "" # ISO 8601 date
|
|
13
|
+
# detection_hint: "" # Grep/search pattern to detect this
|
|
14
|
+
# applies_to: [] # Agent roles
|
|
15
|
+
# severity: high | medium | low
|
|
16
|
+
# status: confirmed | candidate
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Convention Entry Template
|
|
2
|
+
# Add to: .sniper/memory/conventions.yaml
|
|
3
|
+
|
|
4
|
+
# - id: conv-XXX # Auto-assigned sequential ID
|
|
5
|
+
# rule: "" # Clear, imperative statement of the convention
|
|
6
|
+
# rationale: "" # Why this convention exists
|
|
7
|
+
# source:
|
|
8
|
+
# type: review_gate | retro | manual | imported
|
|
9
|
+
# ref: "" # Source reference (sprint name, review ID, etc.)
|
|
10
|
+
# date: "" # ISO 8601 date
|
|
11
|
+
# applies_to: [] # Agent roles: backend-engineer, frontend-engineer, architect, etc.
|
|
12
|
+
# enforcement: review_gate | spawn_prompt | both
|
|
13
|
+
# scope: project | workspace # project = this repo only, workspace = all repos
|
|
14
|
+
# status: confirmed | candidate # candidate = needs one more occurrence to confirm
|
|
15
|
+
# examples:
|
|
16
|
+
# positive: "" # Example of correct usage
|
|
17
|
+
# negative: "" # Example of incorrect usage
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Decision Entry Template
|
|
2
|
+
# Add to: .sniper/memory/decisions.yaml
|
|
3
|
+
|
|
4
|
+
# - id: dec-XXX # Auto-assigned sequential ID
|
|
5
|
+
# title: "" # Short title for the decision
|
|
6
|
+
# context: "" # What problem or question prompted this decision
|
|
7
|
+
# decision: "" # What was decided
|
|
8
|
+
# alternatives_considered: # What other options were evaluated
|
|
9
|
+
# - ""
|
|
10
|
+
# source:
|
|
11
|
+
# type: review_gate | retro | manual | imported
|
|
12
|
+
# ref: "" # Source reference
|
|
13
|
+
# date: "" # ISO 8601 date
|
|
14
|
+
# applies_to: [] # Agent roles
|
|
15
|
+
# status: active | superseded | deprecated
|
|
16
|
+
# superseded_by: null # ID of the decision that replaced this one
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Migration Plan: {title}
|
|
2
|
+
|
|
3
|
+
> **Refactor ID:** REF-{NNN}
|
|
4
|
+
> **Status:** Planning
|
|
5
|
+
> **Date:** {date}
|
|
6
|
+
> **Author:** Migration Architect
|
|
7
|
+
> **Based on:** `docs/refactors/REF-{NNN}/scope.md`
|
|
8
|
+
|
|
9
|
+
## Migration Strategy
|
|
10
|
+
<!-- sniper:managed:strategy:start -->
|
|
11
|
+
<!-- Big-bang vs incremental vs strangler fig, with justification -->
|
|
12
|
+
<!-- sniper:managed:strategy:end -->
|
|
13
|
+
|
|
14
|
+
## Step-by-Step Approach
|
|
15
|
+
<!-- sniper:managed:steps:start -->
|
|
16
|
+
|
|
17
|
+
### Step 1: {description}
|
|
18
|
+
- **What changes:**
|
|
19
|
+
- **Why this order:**
|
|
20
|
+
- **Verification:**
|
|
21
|
+
|
|
22
|
+
### Step 2: {description}
|
|
23
|
+
- **What changes:**
|
|
24
|
+
- **Why this order:**
|
|
25
|
+
- **Verification:**
|
|
26
|
+
|
|
27
|
+
<!-- sniper:managed:steps:end -->
|
|
28
|
+
|
|
29
|
+
## Coexistence Plan
|
|
30
|
+
<!-- sniper:managed:coexistence:start -->
|
|
31
|
+
<!-- How old and new patterns coexist during migration -->
|
|
32
|
+
<!-- sniper:managed:coexistence:end -->
|
|
33
|
+
|
|
34
|
+
## Compatibility Layer
|
|
35
|
+
<!-- sniper:managed:compatibility:start -->
|
|
36
|
+
<!-- Adapter patterns, deprecation warnings, backward-compatible wrappers -->
|
|
37
|
+
<!-- sniper:managed:compatibility:end -->
|
|
38
|
+
|
|
39
|
+
## Verification Strategy
|
|
40
|
+
<!-- sniper:managed:verification:start -->
|
|
41
|
+
<!-- How to verify each step worked: tests, canary, metrics -->
|
|
42
|
+
<!-- sniper:managed:verification:end -->
|
|
43
|
+
|
|
44
|
+
## Rollback Plan
|
|
45
|
+
<!-- sniper:managed:rollback:start -->
|
|
46
|
+
<!-- How to undo each step if something goes wrong -->
|
|
47
|
+
<!-- sniper:managed:rollback:end -->
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Optimization Plan: {title}
|
|
2
|
+
|
|
3
|
+
> **Audit ID:** PERF-{NNN}
|
|
4
|
+
> **Status:** Planning
|
|
5
|
+
> **Date:** {date}
|
|
6
|
+
> **Author:** Lead
|
|
7
|
+
|
|
8
|
+
## Priority Matrix
|
|
9
|
+
<!-- sniper:managed:priority-matrix:start -->
|
|
10
|
+
<!-- Bottlenecks ranked by impact / effort ratio -->
|
|
11
|
+
|
|
12
|
+
| Rank | Bottleneck | Impact | Effort | Ratio | Category |
|
|
13
|
+
|------|-----------|--------|--------|-------|----------|
|
|
14
|
+
| 1 | | High/Med/Low | S/M/L | | Quick win / Standard / Major |
|
|
15
|
+
|
|
16
|
+
<!-- sniper:managed:priority-matrix:end -->
|
|
17
|
+
|
|
18
|
+
## Optimization Recommendations
|
|
19
|
+
<!-- sniper:managed:recommendations:start -->
|
|
20
|
+
|
|
21
|
+
### Optimization 1: {title}
|
|
22
|
+
- **Bottleneck:** {reference to bottleneck from profile report}
|
|
23
|
+
- **What to change:** {specific change description}
|
|
24
|
+
- **Expected improvement:** {e.g., "reduces O(n) DB calls to O(1)"}
|
|
25
|
+
- **Implementation approach:** {how to implement}
|
|
26
|
+
- **Risks and trade-offs:** {e.g., "caching adds complexity, requires cache invalidation strategy"}
|
|
27
|
+
- **Benchmark:** {how to verify the improvement}
|
|
28
|
+
|
|
29
|
+
<!-- sniper:managed:recommendations:end -->
|
|
30
|
+
|
|
31
|
+
## Benchmark Requirements
|
|
32
|
+
<!-- sniper:managed:benchmarks:start -->
|
|
33
|
+
<!-- What benchmarks should be written to verify each optimization -->
|
|
34
|
+
|
|
35
|
+
| Optimization | Benchmark Description | Metrics to Capture |
|
|
36
|
+
|-------------|----------------------|-------------------|
|
|
37
|
+
| | | Latency / Throughput / Memory / DB calls |
|
|
38
|
+
|
|
39
|
+
<!-- sniper:managed:benchmarks:end -->
|
|
40
|
+
|
|
41
|
+
## Quick Wins
|
|
42
|
+
<!-- sniper:managed:quick-wins:start -->
|
|
43
|
+
<!-- Low-effort, high-impact optimizations -->
|
|
44
|
+
|
|
45
|
+
| Optimization | Effort | Expected Impact |
|
|
46
|
+
|-------------|--------|-----------------|
|
|
47
|
+
| | S | |
|
|
48
|
+
|
|
49
|
+
<!-- sniper:managed:quick-wins:end -->
|
|
50
|
+
|
|
51
|
+
## Monitoring Recommendations
|
|
52
|
+
<!-- sniper:managed:monitoring:start -->
|
|
53
|
+
<!-- Metrics to track for regression prevention -->
|
|
54
|
+
|
|
55
|
+
| Metric | Current Baseline | Target | Alert Threshold |
|
|
56
|
+
|--------|-----------------|--------|----------------|
|
|
57
|
+
| | | | |
|
|
58
|
+
|
|
59
|
+
<!-- sniper:managed:monitoring:end -->
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Performance Profile: {title}
|
|
2
|
+
|
|
3
|
+
> **Audit ID:** PERF-{NNN}
|
|
4
|
+
> **Status:** Analyzing
|
|
5
|
+
> **Date:** {date}
|
|
6
|
+
> **Author:** Performance Profiler
|
|
7
|
+
|
|
8
|
+
## Performance Context
|
|
9
|
+
<!-- sniper:managed:context:start -->
|
|
10
|
+
<!-- What was investigated and why -->
|
|
11
|
+
<!-- sniper:managed:context:end -->
|
|
12
|
+
|
|
13
|
+
## Critical Path Analysis
|
|
14
|
+
<!-- sniper:managed:critical-paths:start -->
|
|
15
|
+
<!-- The most performance-sensitive paths in the application -->
|
|
16
|
+
|
|
17
|
+
### Path: {name}
|
|
18
|
+
- **Type:** Request handling / Data pipeline / Background job
|
|
19
|
+
- **Flow:** {entry} → {step 1} → {step 2} → {response}
|
|
20
|
+
- **I/O Operations:** {count} database calls, {count} external service calls
|
|
21
|
+
- **Estimated Latency Contribution:** {description}
|
|
22
|
+
|
|
23
|
+
<!-- sniper:managed:critical-paths:end -->
|
|
24
|
+
|
|
25
|
+
## Bottleneck Inventory
|
|
26
|
+
<!-- sniper:managed:bottlenecks:start -->
|
|
27
|
+
|
|
28
|
+
### Bottleneck 1: {title}
|
|
29
|
+
- **Location:** `path/to/file.ts:42`
|
|
30
|
+
- **Category:** N+1 query / Missing index / Synchronous I/O / Unbounded loop / Missing cache / Excessive serialization / Memory leak pattern / Large payload
|
|
31
|
+
- **Evidence:** {the code pattern that causes the bottleneck}
|
|
32
|
+
- **Impact:** Critical / High / Medium / Low
|
|
33
|
+
- **Complexity:** S / M / L
|
|
34
|
+
- **Details:** {explanation of why this is a bottleneck}
|
|
35
|
+
|
|
36
|
+
<!-- sniper:managed:bottlenecks:end -->
|
|
37
|
+
|
|
38
|
+
## Resource Usage Patterns
|
|
39
|
+
<!-- sniper:managed:resource-patterns:start -->
|
|
40
|
+
|
|
41
|
+
| Resource | Observation | Concern Level |
|
|
42
|
+
|----------|------------|---------------|
|
|
43
|
+
| Memory allocation | | Low / Medium / High |
|
|
44
|
+
| Connection pools | | Low / Medium / High |
|
|
45
|
+
| Compute operations | | Low / Medium / High |
|
|
46
|
+
|
|
47
|
+
<!-- sniper:managed:resource-patterns:end -->
|
|
48
|
+
|
|
49
|
+
## Existing Optimizations
|
|
50
|
+
<!-- sniper:managed:existing-optimizations:start -->
|
|
51
|
+
<!-- Caching, indexing, and optimization patterns already in place -->
|
|
52
|
+
|
|
53
|
+
- {Optimization — e.g., "Redis cache on product catalog with 5-minute TTL"}
|
|
54
|
+
|
|
55
|
+
<!-- sniper:managed:existing-optimizations:end -->
|
|
56
|
+
|
|
57
|
+
## Benchmark Coverage
|
|
58
|
+
<!-- sniper:managed:benchmark-coverage:start -->
|
|
59
|
+
|
|
60
|
+
| Critical Path | Has Benchmark? | Benchmark File |
|
|
61
|
+
|--------------|---------------|----------------|
|
|
62
|
+
| | Yes / No | |
|
|
63
|
+
|
|
64
|
+
<!-- sniper:managed:benchmark-coverage:end -->
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Post-Mortem: {title}
|
|
2
|
+
|
|
3
|
+
> **Bug ID:** BUG-{NNN}
|
|
4
|
+
> **Severity:** {critical/high/medium/low}
|
|
5
|
+
> **Status:** Complete
|
|
6
|
+
> **Date:** {date}
|
|
7
|
+
> **Resolution Date:** {date}
|
|
8
|
+
|
|
9
|
+
## Root Cause
|
|
10
|
+
<!-- sniper:managed:root-cause:start -->
|
|
11
|
+
<!-- What specifically was wrong — the definitive explanation -->
|
|
12
|
+
<!-- sniper:managed:root-cause:end -->
|
|
13
|
+
|
|
14
|
+
## Fix Summary
|
|
15
|
+
<!-- sniper:managed:fix-summary:start -->
|
|
16
|
+
<!-- What was changed and why -->
|
|
17
|
+
|
|
18
|
+
### Files Changed
|
|
19
|
+
| File | Change |
|
|
20
|
+
|------|--------|
|
|
21
|
+
| | |
|
|
22
|
+
|
|
23
|
+
### Code Changes
|
|
24
|
+
<!-- Brief description of the fix approach -->
|
|
25
|
+
|
|
26
|
+
<!-- sniper:managed:fix-summary:end -->
|
|
27
|
+
|
|
28
|
+
## Impact Assessment
|
|
29
|
+
<!-- sniper:managed:impact:start -->
|
|
30
|
+
<!-- Who was affected, for how long, what was the business impact -->
|
|
31
|
+
<!-- sniper:managed:impact:end -->
|
|
32
|
+
|
|
33
|
+
## Prevention
|
|
34
|
+
<!-- sniper:managed:prevention:start -->
|
|
35
|
+
<!-- What should change to prevent similar bugs in the future -->
|
|
36
|
+
|
|
37
|
+
### Process Changes
|
|
38
|
+
-
|
|
39
|
+
|
|
40
|
+
### Code Changes
|
|
41
|
+
-
|
|
42
|
+
|
|
43
|
+
### Monitoring/Alerting
|
|
44
|
+
-
|
|
45
|
+
|
|
46
|
+
<!-- sniper:managed:prevention:end -->
|
|
47
|
+
|
|
48
|
+
## Regression Tests
|
|
49
|
+
<!-- sniper:managed:regression-tests:start -->
|
|
50
|
+
<!-- What tests were added to prevent recurrence -->
|
|
51
|
+
|
|
52
|
+
| Test | File | Verifies |
|
|
53
|
+
|------|------|----------|
|
|
54
|
+
| | | |
|
|
55
|
+
|
|
56
|
+
<!-- sniper:managed:regression-tests:end -->
|
|
57
|
+
|
|
58
|
+
## Timeline
|
|
59
|
+
<!-- sniper:managed:timeline:start -->
|
|
60
|
+
|
|
61
|
+
| Time | Event |
|
|
62
|
+
|------|-------|
|
|
63
|
+
| {timestamp} | Bug reported |
|
|
64
|
+
| {timestamp} | Triage complete |
|
|
65
|
+
| {timestamp} | Investigation complete |
|
|
66
|
+
| {timestamp} | Fix applied |
|
|
67
|
+
| {timestamp} | Regression tests passing |
|
|
68
|
+
|
|
69
|
+
<!-- sniper:managed:timeline:end -->
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# PR Review: #{pr_number} — {pr_title}
|
|
2
|
+
|
|
3
|
+
> **Review ID:** PR-{NNN}
|
|
4
|
+
> **Date:** {date}
|
|
5
|
+
> **Reviewers:** Code Reviewer, Security Reviewer, Test Reviewer
|
|
6
|
+
> **Recommendation:** {approve / request-changes / comment}
|
|
7
|
+
|
|
8
|
+
## Summary
|
|
9
|
+
<!-- sniper:managed:summary:start -->
|
|
10
|
+
<!-- Overall assessment of the PR -->
|
|
11
|
+
<!-- sniper:managed:summary:end -->
|
|
12
|
+
|
|
13
|
+
## Code Quality
|
|
14
|
+
<!-- sniper:managed:code-quality:start -->
|
|
15
|
+
|
|
16
|
+
| Severity | File:Line | Finding | Suggested Fix |
|
|
17
|
+
|----------|-----------|---------|---------------|
|
|
18
|
+
| critical / warning / suggestion | | | |
|
|
19
|
+
|
|
20
|
+
<!-- sniper:managed:code-quality:end -->
|
|
21
|
+
|
|
22
|
+
## Security
|
|
23
|
+
<!-- sniper:managed:security:start -->
|
|
24
|
+
|
|
25
|
+
| Severity | File:Line | Finding | Suggested Fix |
|
|
26
|
+
|----------|-----------|---------|---------------|
|
|
27
|
+
| critical / warning / suggestion | | | |
|
|
28
|
+
|
|
29
|
+
<!-- sniper:managed:security:end -->
|
|
30
|
+
|
|
31
|
+
## Test Coverage
|
|
32
|
+
<!-- sniper:managed:test-coverage:start -->
|
|
33
|
+
|
|
34
|
+
| Severity | Finding | Suggested Fix |
|
|
35
|
+
|----------|---------|---------------|
|
|
36
|
+
| critical / warning / suggestion | | |
|
|
37
|
+
|
|
38
|
+
### Missing Tests
|
|
39
|
+
-
|
|
40
|
+
|
|
41
|
+
### Edge Cases Not Covered
|
|
42
|
+
-
|
|
43
|
+
|
|
44
|
+
<!-- sniper:managed:test-coverage:end -->
|
|
45
|
+
|
|
46
|
+
## Recommendation
|
|
47
|
+
<!-- sniper:managed:recommendation:start -->
|
|
48
|
+
<!-- Final recommendation: approve, request changes, or comment -->
|
|
49
|
+
<!-- List of items that must be addressed before merge (if any) -->
|
|
50
|
+
<!-- sniper:managed:recommendation:end -->
|