specsmd 0.0.0-dev.6 → 0.0.0-dev.61
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 +10 -2
- package/flows/aidlc/commands/construction-agent.md +5 -1
- package/flows/aidlc/commands/inception-agent.md +4 -0
- package/flows/aidlc/commands/master-agent.md +4 -0
- package/flows/aidlc/commands/operations-agent.md +4 -0
- package/flows/aidlc/memory-bank.yaml +2 -1
- package/{scripts → flows/aidlc/scripts}/artifact-validator.js +3 -3
- package/{scripts → flows/aidlc/scripts}/bolt-complete.js +35 -4
- package/{scripts → flows/aidlc/scripts}/status-integrity.js +4 -4
- package/flows/aidlc/skills/construction/bolt-list.md +1 -1
- package/flows/aidlc/skills/construction/bolt-start.md +2 -2
- package/flows/aidlc/skills/construction/bolt-status.md +1 -1
- package/flows/aidlc/skills/construction/prototype-apply.md +305 -0
- package/flows/aidlc/skills/inception/bolt-plan.md +15 -2
- package/flows/aidlc/skills/inception/vibe-to-spec.md +406 -0
- package/flows/aidlc/skills/master/analyze-context.md +1 -1
- package/flows/aidlc/templates/construction/bolt-template.md +22 -1
- package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt.md +73 -11
- package/flows/aidlc/templates/construction/bolt-types/simple-construction-bolt.md +5 -0
- package/flows/aidlc/templates/standards/decision-index-template.md +32 -0
- package/flows/fire/README.md +19 -0
- package/flows/fire/agents/builder/agent.md +275 -0
- package/flows/fire/agents/builder/skills/code-review/SKILL.md +266 -0
- package/flows/fire/agents/builder/skills/code-review/references/auto-fix-rules.md +212 -0
- package/flows/fire/agents/builder/skills/code-review/references/review-categories.md +154 -0
- package/flows/fire/agents/builder/skills/code-review/templates/review-report.md.hbs +120 -0
- package/flows/fire/agents/builder/skills/run-execute/SKILL.md +503 -0
- package/flows/fire/agents/builder/skills/run-execute/scripts/complete-run.js +549 -0
- package/flows/fire/agents/builder/skills/run-execute/scripts/init-run.js +454 -0
- package/flows/fire/agents/builder/skills/run-execute/templates/plan.md.hbs +61 -0
- package/flows/fire/agents/builder/skills/run-execute/templates/test-report.md.hbs +81 -0
- package/flows/fire/agents/builder/skills/run-plan/SKILL.md +376 -0
- package/flows/fire/agents/builder/skills/run-status/SKILL.md +94 -0
- package/flows/fire/agents/builder/skills/walkthrough-generate/SKILL.md +140 -0
- package/flows/fire/agents/builder/skills/walkthrough-generate/scripts/render-walkthrough.ts +755 -0
- package/flows/fire/agents/builder/skills/walkthrough-generate/templates/walkthrough.md.hbs +77 -0
- package/flows/fire/agents/orchestrator/agent.md +113 -0
- package/flows/fire/agents/orchestrator/skills/project-init/SKILL.md +150 -0
- package/flows/fire/agents/orchestrator/skills/project-init/templates/coding-standards.md.hbs +149 -0
- package/flows/fire/agents/orchestrator/skills/project-init/templates/system-architecture.md.hbs +101 -0
- package/flows/fire/agents/orchestrator/skills/project-init/templates/tech-stack.md.hbs +136 -0
- package/flows/fire/agents/orchestrator/skills/project-init/templates/testing-standards.md.hbs +94 -0
- package/flows/fire/agents/orchestrator/skills/route/SKILL.md +123 -0
- package/flows/fire/agents/orchestrator/skills/status/SKILL.md +99 -0
- package/flows/fire/agents/planner/agent.md +122 -0
- package/flows/fire/agents/planner/skills/design-doc-generate/SKILL.md +213 -0
- package/flows/fire/agents/planner/skills/design-doc-generate/templates/design.md.hbs +76 -0
- package/flows/fire/agents/planner/skills/intent-capture/SKILL.md +155 -0
- package/flows/fire/agents/planner/skills/intent-capture/templates/brief.md.hbs +40 -0
- package/flows/fire/agents/planner/skills/work-item-decompose/SKILL.md +194 -0
- package/flows/fire/agents/planner/skills/work-item-decompose/templates/work-item.md.hbs +40 -0
- package/flows/fire/commands/fire-builder.md +56 -0
- package/flows/fire/commands/fire-planner.md +48 -0
- package/flows/fire/commands/fire.md +46 -0
- package/flows/fire/memory-bank.yaml +164 -0
- package/flows/fire/quick-start.md +130 -0
- package/flows/simple/README.md +190 -0
- package/flows/simple/agents/agent.md +404 -0
- package/flows/simple/commands/agent.md +60 -0
- package/flows/simple/context-config.yaml +34 -0
- package/flows/simple/memory-bank.yaml +66 -0
- package/flows/simple/quick-start.md +231 -0
- package/flows/simple/skills/design.md +96 -0
- package/flows/simple/skills/execute.md +190 -0
- package/flows/simple/skills/requirements.md +94 -0
- package/flows/simple/skills/tasks.md +136 -0
- package/flows/simple/templates/design-template.md +138 -0
- package/flows/simple/templates/requirements-template.md +85 -0
- package/flows/simple/templates/tasks-template.md +104 -0
- package/lib/analytics/tracker.js +6 -2
- package/lib/constants.js +17 -8
- package/lib/installer.js +5 -15
- package/lib/installers/KiroInstaller.js +55 -0
- package/lib/installers/OpenCodeInstaller.js +9 -1
- package/lib/installers/ToolInstaller.js +4 -1
- package/lib/installers/WindsurfInstaller.js +0 -54
- package/package.json +3 -52
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
# Auto-Fix Rules
|
|
2
|
+
|
|
3
|
+
This reference defines the criteria for determining whether an issue can be auto-fixed or requires user confirmation.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Decision Framework
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
CAN AUTO-FIX if ALL of these are true:
|
|
11
|
+
├── Change is mechanical (not semantic)
|
|
12
|
+
├── Change follows existing pattern in codebase
|
|
13
|
+
├── Change has no functional impact
|
|
14
|
+
├── Change is universally agreed best practice
|
|
15
|
+
├── Reverting is trivial if wrong
|
|
16
|
+
└── Tests will still pass (verified after fix)
|
|
17
|
+
|
|
18
|
+
MUST CONFIRM if ANY of these are true:
|
|
19
|
+
├── Change affects behavior/functionality
|
|
20
|
+
├── Change requires judgment call
|
|
21
|
+
├── Change involves security implications
|
|
22
|
+
├── Change affects public API
|
|
23
|
+
├── Multiple valid approaches exist
|
|
24
|
+
├── Change is significant (>10 lines affected)
|
|
25
|
+
└── Change could break dependent code
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Auto-Fix Criteria by Category
|
|
31
|
+
|
|
32
|
+
### 1. Removal Operations (SAFE)
|
|
33
|
+
|
|
34
|
+
These can be auto-fixed because removal of unused code has no functional impact:
|
|
35
|
+
|
|
36
|
+
| Operation | Criteria | Safe Because |
|
|
37
|
+
|-----------|----------|--------------|
|
|
38
|
+
| Remove unused import | Import not referenced anywhere | No runtime effect |
|
|
39
|
+
| Remove unused variable | Variable never read | No runtime effect |
|
|
40
|
+
| Remove console.log | Debug statement | No production effect |
|
|
41
|
+
| Remove console.debug | Debug statement | No production effect |
|
|
42
|
+
| Remove debugger | Debug statement | No production effect |
|
|
43
|
+
| Remove trailing whitespace | Whitespace only | No code effect |
|
|
44
|
+
| Remove empty lines (excess) | >2 consecutive blank lines | Formatting only |
|
|
45
|
+
|
|
46
|
+
### 2. Formatting Operations (SAFE)
|
|
47
|
+
|
|
48
|
+
These can be auto-fixed because they don't change semantics:
|
|
49
|
+
|
|
50
|
+
| Operation | Criteria | Safe Because |
|
|
51
|
+
|-----------|----------|--------------|
|
|
52
|
+
| Sort imports | Reorder import statements | No runtime effect |
|
|
53
|
+
| Standardize quotes | Use project's quote style | String value unchanged |
|
|
54
|
+
| Add missing semicolons | Project uses semicolons | Parser handles both |
|
|
55
|
+
| Fix indentation | Match project indent style | Whitespace only |
|
|
56
|
+
| Add trailing newline | File doesn't end with newline | POSIX standard |
|
|
57
|
+
|
|
58
|
+
### 3. Simple Substitutions (SAFE with verification)
|
|
59
|
+
|
|
60
|
+
These can be auto-fixed but require test verification:
|
|
61
|
+
|
|
62
|
+
| Operation | Criteria | Verify |
|
|
63
|
+
|-----------|----------|--------|
|
|
64
|
+
| `var` → `const` | Variable never reassigned | Run tests |
|
|
65
|
+
| `var` → `let` | Variable is reassigned | Run tests |
|
|
66
|
+
| `==` → `===` | Comparing same types | Run tests |
|
|
67
|
+
| `!=` → `!==` | Comparing same types | Run tests |
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Must-Confirm Criteria
|
|
72
|
+
|
|
73
|
+
### 1. Behavioral Changes
|
|
74
|
+
|
|
75
|
+
Any change that could affect runtime behavior:
|
|
76
|
+
|
|
77
|
+
| Change | Why Confirm |
|
|
78
|
+
|--------|-------------|
|
|
79
|
+
| Add null check | Changes control flow |
|
|
80
|
+
| Add try/catch | Changes error handling |
|
|
81
|
+
| Add validation | May reject valid input |
|
|
82
|
+
| Change function signature | Affects callers |
|
|
83
|
+
| Add/remove async | Changes execution model |
|
|
84
|
+
| Modify return value | Affects callers |
|
|
85
|
+
|
|
86
|
+
### 2. Security Changes
|
|
87
|
+
|
|
88
|
+
All security-related changes require confirmation:
|
|
89
|
+
|
|
90
|
+
| Change | Why Confirm |
|
|
91
|
+
|--------|-------------|
|
|
92
|
+
| Add input validation | May have false positives |
|
|
93
|
+
| Add authentication | May break intended access |
|
|
94
|
+
| Add authorization | May be too restrictive |
|
|
95
|
+
| Change crypto | May have compatibility issues |
|
|
96
|
+
| Add rate limiting | May affect legitimate users |
|
|
97
|
+
|
|
98
|
+
### 3. Architectural Changes
|
|
99
|
+
|
|
100
|
+
Changes affecting code structure:
|
|
101
|
+
|
|
102
|
+
| Change | Why Confirm |
|
|
103
|
+
|--------|-------------|
|
|
104
|
+
| Extract function | Multiple valid ways |
|
|
105
|
+
| Move code to different file | Affects imports |
|
|
106
|
+
| Add abstraction layer | Judgment on necessity |
|
|
107
|
+
| Change dependency injection | Affects instantiation |
|
|
108
|
+
| Modify error propagation | Affects error handling chain |
|
|
109
|
+
|
|
110
|
+
### 4. Size Threshold
|
|
111
|
+
|
|
112
|
+
Changes affecting many lines:
|
|
113
|
+
|
|
114
|
+
| Threshold | Action |
|
|
115
|
+
|-----------|--------|
|
|
116
|
+
| 1-5 lines | Can auto-fix if mechanical |
|
|
117
|
+
| 6-10 lines | Prefer confirmation |
|
|
118
|
+
| >10 lines | Must confirm |
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Rollback Protocol
|
|
123
|
+
|
|
124
|
+
If auto-fix causes test failure:
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
1. Immediately revert ALL auto-fix changes
|
|
128
|
+
2. Move the fix to CONFIRM category
|
|
129
|
+
3. Report: "Auto-fix for X caused test failure, moved to suggestions"
|
|
130
|
+
4. Continue with remaining auto-fixes
|
|
131
|
+
5. Re-run tests after each batch
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Project-Specific Overrides
|
|
137
|
+
|
|
138
|
+
The project can customize auto-fix behavior in `.specs-fire/standards/coding-standards.md`:
|
|
139
|
+
|
|
140
|
+
```yaml
|
|
141
|
+
# In coding-standards.md frontmatter
|
|
142
|
+
auto_fix:
|
|
143
|
+
allow:
|
|
144
|
+
- unused_imports
|
|
145
|
+
- console_statements
|
|
146
|
+
- trailing_whitespace
|
|
147
|
+
deny:
|
|
148
|
+
- quote_style # Team prefers manual control
|
|
149
|
+
- semicolons # Mixed codebase
|
|
150
|
+
|
|
151
|
+
# Custom patterns to auto-remove
|
|
152
|
+
remove_patterns:
|
|
153
|
+
- "// TODO: remove"
|
|
154
|
+
- "// DEBUG"
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
If `auto_fix` section exists, respect project preferences.
|
|
158
|
+
If not specified, use default rules from this document.
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Examples
|
|
163
|
+
|
|
164
|
+
### Auto-Fix Example
|
|
165
|
+
|
|
166
|
+
**Before:**
|
|
167
|
+
```javascript
|
|
168
|
+
import { unused } from './module'; // unused import
|
|
169
|
+
import { used } from './other';
|
|
170
|
+
|
|
171
|
+
function process() {
|
|
172
|
+
console.log('debug'); // debug statement
|
|
173
|
+
const result = used();
|
|
174
|
+
return result;
|
|
175
|
+
}
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
**After (auto-fixed):**
|
|
179
|
+
```javascript
|
|
180
|
+
import { used } from './other';
|
|
181
|
+
|
|
182
|
+
function process() {
|
|
183
|
+
const result = used();
|
|
184
|
+
return result;
|
|
185
|
+
}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
**Report:**
|
|
189
|
+
- Removed unused import `unused` from `./module`
|
|
190
|
+
- Removed console.log statement
|
|
191
|
+
|
|
192
|
+
### Confirm Example
|
|
193
|
+
|
|
194
|
+
**Issue Detected:**
|
|
195
|
+
```javascript
|
|
196
|
+
function getUser(id) {
|
|
197
|
+
return db.query(`SELECT * FROM users WHERE id = ${id}`);
|
|
198
|
+
}
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
**Suggested Fix:**
|
|
202
|
+
```javascript
|
|
203
|
+
function getUser(id) {
|
|
204
|
+
return db.query('SELECT * FROM users WHERE id = ?', [id]);
|
|
205
|
+
}
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
**Why Confirm:**
|
|
209
|
+
- Security fix (SQL injection)
|
|
210
|
+
- Changes how query is constructed
|
|
211
|
+
- May have edge cases with ID format
|
|
212
|
+
- Requires understanding of db.query API
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Code Review Categories
|
|
2
|
+
|
|
3
|
+
This reference defines what the code-review skill checks for in each category.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Code Quality
|
|
8
|
+
|
|
9
|
+
Issues related to code cleanliness and maintainability.
|
|
10
|
+
|
|
11
|
+
### Auto-Fixable
|
|
12
|
+
|
|
13
|
+
| Issue | Detection | Fix |
|
|
14
|
+
|-------|-----------|-----|
|
|
15
|
+
| Unused imports | Import not referenced in file | Remove import |
|
|
16
|
+
| Unused variables | Variable declared but never used | Remove declaration |
|
|
17
|
+
| Console statements | `console.log`, `console.debug`, `print()` | Remove statement |
|
|
18
|
+
| Commented-out code | Large blocks of commented code | Remove comments |
|
|
19
|
+
| Trailing whitespace | Whitespace at end of lines | Trim whitespace |
|
|
20
|
+
| Missing semicolons | JS/TS without semicolons (if project uses them) | Add semicolons |
|
|
21
|
+
| Inconsistent quotes | Mixed single/double quotes | Standardize |
|
|
22
|
+
| Empty blocks | Empty if/else/try/catch with no comment | Add TODO comment |
|
|
23
|
+
| Debugger statements | `debugger` keyword | Remove statement |
|
|
24
|
+
|
|
25
|
+
### Requires Confirmation
|
|
26
|
+
|
|
27
|
+
| Issue | Detection | Why Confirm |
|
|
28
|
+
|-------|-----------|-------------|
|
|
29
|
+
| Long functions | Function > 50 lines | Requires judgment on how to split |
|
|
30
|
+
| Deep nesting | > 4 levels of nesting | Multiple valid refactoring approaches |
|
|
31
|
+
| Duplicate code | Similar code blocks (>10 lines) | May be intentional |
|
|
32
|
+
| Magic numbers | Hardcoded numbers without context | Need to understand meaning |
|
|
33
|
+
| Complex conditionals | Complex boolean expressions | May need domain knowledge |
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 2. Security
|
|
38
|
+
|
|
39
|
+
Issues that could lead to security vulnerabilities.
|
|
40
|
+
|
|
41
|
+
### Auto-Fixable
|
|
42
|
+
|
|
43
|
+
| Issue | Detection | Fix |
|
|
44
|
+
|-------|-----------|-----|
|
|
45
|
+
| Hardcoded localhost | `localhost` or `127.0.0.1` in production code | Flag but usually intentional |
|
|
46
|
+
|
|
47
|
+
### Requires Confirmation (ALWAYS)
|
|
48
|
+
|
|
49
|
+
| Issue | Detection | Risk |
|
|
50
|
+
|-------|-----------|------|
|
|
51
|
+
| Hardcoded secrets | API keys, passwords, tokens in code | Critical - secrets exposure |
|
|
52
|
+
| SQL injection | String concatenation in SQL queries | Critical - data breach |
|
|
53
|
+
| XSS vulnerabilities | Unescaped user input in HTML | High - script injection |
|
|
54
|
+
| Command injection | User input in shell commands | Critical - RCE |
|
|
55
|
+
| Path traversal | User input in file paths | High - unauthorized access |
|
|
56
|
+
| Missing input validation | User input used without validation | Medium - various attacks |
|
|
57
|
+
| Insecure crypto | Weak algorithms (MD5, SHA1 for passwords) | High - broken encryption |
|
|
58
|
+
| CORS misconfiguration | `Access-Control-Allow-Origin: *` | Medium - CSRF |
|
|
59
|
+
| Missing auth checks | Endpoints without authentication | High - unauthorized access |
|
|
60
|
+
| Sensitive data in logs | PII, passwords logged | Medium - data leak |
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## 3. Architecture
|
|
65
|
+
|
|
66
|
+
Issues related to code organization and design.
|
|
67
|
+
|
|
68
|
+
### Auto-Fixable
|
|
69
|
+
|
|
70
|
+
| Issue | Detection | Fix |
|
|
71
|
+
|-------|-----------|-----|
|
|
72
|
+
| Import order | Imports not grouped/sorted | Sort imports |
|
|
73
|
+
|
|
74
|
+
### Requires Confirmation (ALWAYS)
|
|
75
|
+
|
|
76
|
+
| Issue | Detection | Why Confirm |
|
|
77
|
+
|-------|-----------|-------------|
|
|
78
|
+
| Wrong layer | Business logic in controller, DB in UI | Requires understanding architecture |
|
|
79
|
+
| Missing error handling | No try/catch for async/IO operations | May be intentional propagation |
|
|
80
|
+
| Tight coupling | Direct dependencies on concrete classes | Multiple valid solutions |
|
|
81
|
+
| Missing abstraction | Repeated patterns that could be extracted | Judgment on when to abstract |
|
|
82
|
+
| Circular dependencies | Module A imports B, B imports A | Requires refactoring design |
|
|
83
|
+
| God class/function | Class/function doing too many things | Domain knowledge needed |
|
|
84
|
+
| Inconsistent patterns | Different approaches for same problem | Need to pick canonical approach |
|
|
85
|
+
| Missing logging | No logging for important operations | Need to understand what matters |
|
|
86
|
+
| Synchronous blocking | Blocking calls in async context | May need architecture change |
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## 4. Testing
|
|
91
|
+
|
|
92
|
+
Issues related to test quality and coverage.
|
|
93
|
+
|
|
94
|
+
### Auto-Fixable
|
|
95
|
+
|
|
96
|
+
| Issue | Detection | Fix |
|
|
97
|
+
|-------|-----------|-----|
|
|
98
|
+
| Console in tests | `console.log` in test files | Remove statement |
|
|
99
|
+
|
|
100
|
+
### Requires Confirmation (ALWAYS)
|
|
101
|
+
|
|
102
|
+
| Issue | Detection | Why Confirm |
|
|
103
|
+
|-------|-----------|-------------|
|
|
104
|
+
| Missing tests | New function without corresponding test | Need to understand what to test |
|
|
105
|
+
| Missing edge cases | Tests only cover happy path | Need domain knowledge |
|
|
106
|
+
| Brittle tests | Tests rely on implementation details | Multiple valid approaches |
|
|
107
|
+
| Missing assertions | Test runs but doesn't assert | May be setup test |
|
|
108
|
+
| Test coverage gaps | Lines not covered by tests | Need to prioritize |
|
|
109
|
+
| Flaky test patterns | Random data, timing dependencies | Need to understand intent |
|
|
110
|
+
| Missing error tests | No tests for error conditions | Need to identify error cases |
|
|
111
|
+
| Mock overuse | Everything mocked, no integration | Judgment on test strategy |
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Language-Specific Checks
|
|
116
|
+
|
|
117
|
+
### JavaScript/TypeScript
|
|
118
|
+
|
|
119
|
+
| Issue | Category | Auto-Fix |
|
|
120
|
+
|-------|----------|----------|
|
|
121
|
+
| `var` instead of `let/const` | Quality | Yes |
|
|
122
|
+
| `==` instead of `===` | Quality | Yes (with caution) |
|
|
123
|
+
| Missing `await` | Quality | Confirm |
|
|
124
|
+
| `any` type usage | Quality | Confirm |
|
|
125
|
+
| Missing null checks | Security | Confirm |
|
|
126
|
+
|
|
127
|
+
### Go
|
|
128
|
+
|
|
129
|
+
| Issue | Category | Auto-Fix |
|
|
130
|
+
|-------|----------|----------|
|
|
131
|
+
| Ignored error returns | Quality | Confirm |
|
|
132
|
+
| Naked returns | Quality | Confirm |
|
|
133
|
+
| Empty interface{} | Quality | Confirm |
|
|
134
|
+
| Missing context | Architecture | Confirm |
|
|
135
|
+
|
|
136
|
+
### Python
|
|
137
|
+
|
|
138
|
+
| Issue | Category | Auto-Fix |
|
|
139
|
+
|-------|----------|----------|
|
|
140
|
+
| Bare except | Quality | Confirm |
|
|
141
|
+
| Mutable default args | Quality | Confirm |
|
|
142
|
+
| Missing type hints | Quality | Confirm |
|
|
143
|
+
| `import *` | Quality | Yes |
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Severity Levels
|
|
148
|
+
|
|
149
|
+
| Level | Description | Action |
|
|
150
|
+
|-------|-------------|--------|
|
|
151
|
+
| **Critical** | Security vulnerability, data loss risk | MUST address |
|
|
152
|
+
| **High** | Significant quality/maintainability issue | SHOULD address |
|
|
153
|
+
| **Medium** | Best practice violation | CONSIDER addressing |
|
|
154
|
+
| **Low** | Minor style/preference issue | OPTIONAL |
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# Code Review Report
|
|
2
|
+
|
|
3
|
+
**Run**: {{run_id}}
|
|
4
|
+
**Intent**: {{intent_id}}
|
|
5
|
+
**Reviewed**: {{timestamp}}
|
|
6
|
+
**Files Reviewed**: {{files_count}}
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Summary
|
|
11
|
+
|
|
12
|
+
| Category | Auto-Fixed | Applied | Skipped |
|
|
13
|
+
|----------|------------|---------|---------|
|
|
14
|
+
| Code Quality | {{quality.auto_fixed}} | {{quality.applied}} | {{quality.skipped}} |
|
|
15
|
+
| Security | {{security.auto_fixed}} | {{security.applied}} | {{security.skipped}} |
|
|
16
|
+
| Architecture | {{architecture.auto_fixed}} | {{architecture.applied}} | {{architecture.skipped}} |
|
|
17
|
+
| Testing | {{testing.auto_fixed}} | {{testing.applied}} | {{testing.skipped}} |
|
|
18
|
+
| **Total** | **{{totals.auto_fixed}}** | **{{totals.applied}}** | **{{totals.skipped}}** |
|
|
19
|
+
|
|
20
|
+
**Tests Status**: {{#if tests_passing}}Passing{{else}}Failed{{/if}}
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Files Reviewed
|
|
25
|
+
|
|
26
|
+
{{#each files_reviewed}}
|
|
27
|
+
- `{{path}}` ({{type}})
|
|
28
|
+
{{/each}}
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Auto-Fixed Issues
|
|
33
|
+
|
|
34
|
+
{{#if auto_fixed}}
|
|
35
|
+
These issues were automatically fixed (mechanical, non-semantic changes):
|
|
36
|
+
|
|
37
|
+
{{#each auto_fixed}}
|
|
38
|
+
### {{add @index 1}}. [{{category}}] {{title}}
|
|
39
|
+
|
|
40
|
+
- **File**: `{{file}}:{{line}}`
|
|
41
|
+
- **Description**: {{description}}
|
|
42
|
+
- **Diff**:
|
|
43
|
+
|
|
44
|
+
```diff
|
|
45
|
+
{{diff}}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
{{/each}}
|
|
49
|
+
{{else}}
|
|
50
|
+
No auto-fixes applied.
|
|
51
|
+
{{/if}}
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Applied Suggestions
|
|
56
|
+
|
|
57
|
+
{{#if applied}}
|
|
58
|
+
These suggestions were approved and applied:
|
|
59
|
+
|
|
60
|
+
{{#each applied}}
|
|
61
|
+
### {{add @index 1}}. [{{category}}] {{title}}
|
|
62
|
+
|
|
63
|
+
- **File**: `{{file}}:{{line}}`
|
|
64
|
+
- **Description**: {{description}}
|
|
65
|
+
- **Rationale**: {{rationale}}
|
|
66
|
+
- **Risk Level**: {{risk}}
|
|
67
|
+
- **Approved**: {{approved_at}}
|
|
68
|
+
- **Diff**:
|
|
69
|
+
|
|
70
|
+
```diff
|
|
71
|
+
{{diff}}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
{{/each}}
|
|
75
|
+
{{else}}
|
|
76
|
+
No suggestions were applied.
|
|
77
|
+
{{/if}}
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Skipped Suggestions
|
|
82
|
+
|
|
83
|
+
{{#if skipped}}
|
|
84
|
+
These suggestions were identified but not applied:
|
|
85
|
+
|
|
86
|
+
{{#each skipped}}
|
|
87
|
+
### {{add @index 1}}. [{{category}}] {{title}}
|
|
88
|
+
|
|
89
|
+
- **File**: `{{file}}:{{line}}`
|
|
90
|
+
- **Description**: {{description}}
|
|
91
|
+
- **Rationale**: {{rationale}}
|
|
92
|
+
- **Risk Level**: {{risk}}
|
|
93
|
+
- **Reason Skipped**: {{skip_reason}}
|
|
94
|
+
|
|
95
|
+
{{/each}}
|
|
96
|
+
{{else}}
|
|
97
|
+
No suggestions were skipped.
|
|
98
|
+
{{/if}}
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Project Tooling Used
|
|
103
|
+
|
|
104
|
+
{{#if linters_used}}
|
|
105
|
+
The following project linters were detected and used:
|
|
106
|
+
|
|
107
|
+
{{#each linters_used}}
|
|
108
|
+
- **{{name}}**: {{config_file}}
|
|
109
|
+
{{/each}}
|
|
110
|
+
{{else}}
|
|
111
|
+
No project linters detected. Used built-in review rules.
|
|
112
|
+
{{/if}}
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Standards Referenced
|
|
117
|
+
|
|
118
|
+
{{#each standards_loaded}}
|
|
119
|
+
- `{{path}}`
|
|
120
|
+
{{/each}}
|