opencodekit 0.10.0 → 0.11.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 (46) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/template/.opencode/agent/planner.md +3 -2
  3. package/dist/template/.opencode/command/accessibility-check.md +293 -30
  4. package/dist/template/.opencode/command/analyze-mockup.md +406 -20
  5. package/dist/template/.opencode/command/analyze-project.md +439 -30
  6. package/dist/template/.opencode/command/brainstorm.md +288 -5
  7. package/dist/template/.opencode/command/commit.md +226 -17
  8. package/dist/template/.opencode/command/create.md +138 -35
  9. package/dist/template/.opencode/command/design-audit.md +477 -29
  10. package/dist/template/.opencode/command/design.md +609 -6
  11. package/dist/template/.opencode/command/edit-image.md +223 -20
  12. package/dist/template/.opencode/command/finish.md +162 -71
  13. package/dist/template/.opencode/command/fix-ci.md +296 -24
  14. package/dist/template/.opencode/command/fix-types.md +345 -13
  15. package/dist/template/.opencode/command/fix-ui.md +293 -13
  16. package/dist/template/.opencode/command/fix.md +256 -9
  17. package/dist/template/.opencode/command/generate-diagram.md +327 -26
  18. package/dist/template/.opencode/command/generate-icon.md +266 -22
  19. package/dist/template/.opencode/command/generate-image.md +232 -12
  20. package/dist/template/.opencode/command/generate-pattern.md +234 -20
  21. package/dist/template/.opencode/command/generate-storyboard.md +231 -21
  22. package/dist/template/.opencode/command/handoff.md +202 -30
  23. package/dist/template/.opencode/command/implement.md +162 -50
  24. package/dist/template/.opencode/command/import-plan.md +247 -51
  25. package/dist/template/.opencode/command/init.md +154 -35
  26. package/dist/template/.opencode/command/integration-test.md +405 -24
  27. package/dist/template/.opencode/command/issue.md +171 -21
  28. package/dist/template/.opencode/command/new-feature.md +382 -54
  29. package/dist/template/.opencode/command/plan.md +144 -118
  30. package/dist/template/.opencode/command/pr.md +229 -28
  31. package/dist/template/.opencode/command/quick-build.md +234 -5
  32. package/dist/template/.opencode/command/research-and-implement.md +436 -12
  33. package/dist/template/.opencode/command/research-ui.md +444 -34
  34. package/dist/template/.opencode/command/research.md +173 -45
  35. package/dist/template/.opencode/command/restore-image.md +416 -22
  36. package/dist/template/.opencode/command/resume.md +439 -63
  37. package/dist/template/.opencode/command/revert-feature.md +341 -64
  38. package/dist/template/.opencode/command/review-codebase.md +193 -4
  39. package/dist/template/.opencode/command/skill-create.md +506 -14
  40. package/dist/template/.opencode/command/skill-optimize.md +487 -16
  41. package/dist/template/.opencode/command/status.md +320 -60
  42. package/dist/template/.opencode/command/summarize.md +374 -33
  43. package/dist/template/.opencode/command/triage.md +355 -0
  44. package/dist/template/.opencode/command/ui-review.md +292 -25
  45. package/dist/template/.opencode/skill/playwriter/SKILL.md +148 -0
  46. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  ---
2
- description: Smart git-aware revert for a bead/feature
3
- argument-hint: "<bead-id> [--phase=N] [--task=N] [--soft]"
2
+ description: Smart git-aware revert for a bead/feature with safety checks
3
+ argument-hint: "<bead-id> [--phase=N] [--task=N] [--soft] [--dry-run] [--interactive]"
4
4
  agent: build
5
5
  model: proxypal/gemini-3-flash-preview
6
6
  ---
@@ -9,119 +9,396 @@ model: proxypal/gemini-3-flash-preview
9
9
 
10
10
  **Load skill:** `skill({ name: "verification-before-completion" })`
11
11
 
12
- Intelligently revert changes for a bead with git awareness.
12
+ Intelligently revert changes for a bead with comprehensive safety checks.
13
13
 
14
- ## Instructions
14
+ ## Parse Arguments
15
15
 
16
- Parse from `$ARGUMENTS`:
16
+ | Argument | Default | Description |
17
+ | ---------------------- | -------- | --------------------------------- |
18
+ | Bead ID | required | Feature to revert |
19
+ | `--phase=N` | all | Revert only specific phase |
20
+ | `--task=N` | all | Revert only specific task |
21
+ | `--soft` | false | Stage reverts without committing |
22
+ | `--dry-run` | false | Preview changes without executing |
23
+ | `--interactive` | false | Choose which commits to revert |
24
+ | `--include-migrations` | false | Also revert database migrations |
17
25
 
18
- - Bead ID (required)
19
- - `--phase=N`: Revert only specific phase
20
- - `--task=N`: Revert only specific task
21
- - `--soft`: Stage reverts without committing
26
+ ---
27
+
28
+ ## Phase 1: Pre-Revert Checklist
29
+
30
+ Before any action, verify:
31
+
32
+ ```bash
33
+ # Check for uncommitted changes
34
+ git status --short
35
+
36
+ # Check CI status
37
+ gh run list --limit 1
38
+
39
+ # Check if on correct branch
40
+ git branch --show-current
41
+ ```
22
42
 
23
- ## Workflow
43
+ ### Safety Gates
24
44
 
25
- ### Step 1: Analyze Bead History
45
+ | Check | Pass | Action if Fail |
46
+ | ------------------ | ---------------------- | -------------------------- |
47
+ | Clean working tree | No uncommitted changes | Stash or commit first |
48
+ | CI passing | Latest run succeeded | Warn, confirm continue |
49
+ | Not on main/master | On feature branch | Require `--force` for main |
50
+ | Bead exists | `bd_show` returns data | Abort with error |
51
+
52
+ ---
53
+
54
+ ## Phase 2: Analyze Bead History
26
55
 
27
56
  ```typescript
28
57
  bd_show({ id: "[bead-id]" });
29
58
  ```
30
59
 
31
- Identify:
60
+ ```bash
61
+ # Find all commits for this bead
62
+ git log --oneline --all --grep="[bead-id]"
63
+
64
+ # Show affected files
65
+ git log --name-only --grep="[bead-id]" --pretty=format:""
66
+
67
+ # Count changes
68
+ git log --shortstat --grep="[bead-id]"
69
+ ```
70
+
71
+ ### Impact Report
32
72
 
33
- - All commits associated with this bead
34
- - Files changed per phase/task
35
- - Current phase and task
73
+ ```
74
+ Revert Analysis: [bead-id]
75
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━
76
+
77
+ Bead: [title]
78
+ Status: [in_progress/closed]
79
+ Created: [date]
80
+
81
+ Commits found: 5
82
+ ├── abc1234 feat: add login form (Phase 1)
83
+ ├── def5678 feat: add validation (Phase 1)
84
+ ├── ghi9012 feat: JWT tokens (Phase 2)
85
+ ├── jkl3456 test: add auth tests (Phase 3)
86
+ └── mno7890 docs: update README (Phase 3)
87
+
88
+ Files affected: 12
89
+ ├── src/auth/login.ts (created)
90
+ ├── src/auth/jwt.ts (created)
91
+ ├── src/api/routes.ts (modified)
92
+ ├── tests/auth.test.ts (created)
93
+ └── ... 8 more files
94
+
95
+ Lines: +456 / -23
96
+ ```
36
97
 
37
- ### Step 2: Determine Revert Scope
98
+ ---
38
99
 
39
- **Full revert (no flags):**
100
+ ## Phase 3: Check Downstream Impact
40
101
 
41
- - All commits for this bead
42
- - Reset bead status to initial
102
+ Before reverting, check what depends on this:
43
103
 
44
- **Phase revert (--phase=N):**
104
+ ```typescript
105
+ // Check for dependent beads
106
+ bd_ls({ status: "all", limit: 50, offset: 0 });
107
+ // Filter for beads that depend on this one
108
+ ```
45
109
 
46
- - Only commits tagged with phase N
47
- - Reset bead to previous phase
110
+ ```bash
111
+ # Check for imports of new files
112
+ grep -r "from './auth/" src/ --include="*.ts"
48
113
 
49
- **Task revert (--task=N):**
114
+ # Check for references in other features
115
+ git log --oneline --all -- src/auth/ | grep -v "[bead-id]"
116
+ ```
117
+
118
+ ### Downstream Report
119
+
120
+ ```
121
+ Downstream Impact Analysis
122
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━
50
123
 
51
- - Only commits for specific task
52
- - Keep bead in current phase
124
+ Dependent beads:
125
+ ⚠ bd-xyz789: "User dashboard" imports from src/auth/
126
+ ⚠ bd-uvw456: "Profile page" uses JWT utilities
53
127
 
54
- ### Step 3: Git Analysis
128
+ Other code referencing these files:
129
+ - src/api/middleware.ts:15 imports { verifyToken }
130
+ - src/pages/profile.tsx:8 imports { useAuth }
131
+
132
+ Database migrations:
133
+ - 001_create_users.sql (would need revert)
134
+ - 002_add_sessions.sql (would need revert)
135
+
136
+ Feature flags:
137
+ - AUTH_ENABLED flag in production
138
+
139
+ CAUTION: Reverting may break dependent features.
140
+ Proceed? (yes/abort/revert-cascade)
141
+ ```
142
+
143
+ ---
144
+
145
+ ## Phase 4: Determine Revert Scope
146
+
147
+ | Scope | Flag | What Gets Reverted |
148
+ | ----------- | --------------- | -------------------------------- |
149
+ | Full | (default) | All commits for bead |
150
+ | Phase | `--phase=N` | Only commits tagged with phase N |
151
+ | Task | `--task=N` | Only commits for specific task |
152
+ | Interactive | `--interactive` | User selects commits |
153
+
154
+ ### Interactive Mode
155
+
156
+ ```
157
+ Select commits to revert:
158
+ ━━━━━━━━━━━━━━━━━━━━━━━━
159
+
160
+ [x] abc1234 feat: add login form
161
+ [x] def5678 feat: add validation
162
+ [ ] ghi9012 feat: JWT tokens (skip - needed by other features)
163
+ [x] jkl3456 test: add auth tests
164
+ [ ] mno7890 docs: update README (skip - harmless)
165
+
166
+ Selected: 3 commits
167
+ Press Enter to continue, or 'a' to abort
168
+ ```
169
+
170
+ ---
171
+
172
+ ## Phase 5: Create Backup
173
+
174
+ Before reverting, create safety backup:
55
175
 
56
176
  ```bash
57
- # Find commits for this bead
58
- git log --oneline --all --grep="[bead-id]"
177
+ # Create backup branch
178
+ git branch backup/[bead-id]-pre-revert
179
+
180
+ # Or stash current state
181
+ git stash push -m "pre-revert-[bead-id]"
182
+ ```
59
183
 
60
- # Show files that would be affected
61
- git diff --stat [commit-range]
62
184
  ```
185
+ Backup Created
186
+ ━━━━━━━━━━━━━━
187
+
188
+ Branch: backup/[bead-id]-pre-revert
189
+ Commit: [current-sha]
190
+
191
+ To undo this revert later:
192
+ git checkout backup/[bead-id]-pre-revert
193
+ git cherry-pick [reverted-commits]
194
+ ```
195
+
196
+ ---
63
197
 
64
- Present:
198
+ ## Phase 6: Handle Database Migrations
65
199
 
66
- - Commits to revert
67
- - Files affected
68
- - Potential conflicts
200
+ If `--include-migrations` or migrations detected:
69
201
 
70
- ### Step 4: Confirm and Execute
202
+ ```bash
203
+ # Check for migration files in commits
204
+ git log --name-only --grep="[bead-id]" -- "**/migrations/**"
205
+ ```
71
206
 
72
- Ask for confirmation before reverting.
207
+ ### Migration Revert Strategy
73
208
 
74
- **Hard revert (default):**
209
+ | Scenario | Action |
210
+ | ------------------------------ | ------------------------------ |
211
+ | Migrations not yet run in prod | Safe to delete migration files |
212
+ | Migrations run in prod | Need down migration |
213
+ | No down migration exists | Manual intervention required |
214
+
215
+ ```bash
216
+ # Run down migrations (if applicable)
217
+ npm run migrate:down -- --to=[pre-feature-version]
218
+ # or
219
+ python manage.py migrate [app] [previous_migration]
220
+ ```
221
+
222
+ **CAUTION:** Database reverts can cause data loss. Always backup first.
223
+
224
+ ---
225
+
226
+ ## Phase 7: Handle Feature Flags
227
+
228
+ If feature is behind a flag:
229
+
230
+ ```bash
231
+ # Disable feature flag first
232
+ # This prevents errors while code is being reverted
233
+
234
+ # Example: Update feature flag config
235
+ echo "AUTH_ENABLED=false" >> .env
236
+ ```
237
+
238
+ ### Feature Flag Checklist
239
+
240
+ - [ ] Disable flag in development
241
+ - [ ] Disable flag in staging
242
+ - [ ] Disable flag in production
243
+ - [ ] THEN revert code
244
+
245
+ ---
246
+
247
+ ## Phase 8: Execute Revert
248
+
249
+ ### Dry Run (--dry-run)
250
+
251
+ ```bash
252
+ # Show what WOULD be reverted
253
+ git revert --no-commit [commits...] --dry-run 2>&1 || \
254
+ git diff [oldest-commit]^..[newest-commit] --stat
255
+ ```
256
+
257
+ ```
258
+ DRY RUN - No changes made
259
+ ━━━━━━━━━━━━━━━━━━━━━━━━━
260
+
261
+ Would revert:
262
+ ├── abc1234 feat: add login form
263
+ ├── def5678 feat: add validation
264
+ └── jkl3456 test: add auth tests
265
+
266
+ Files that would be modified:
267
+ ├── src/auth/login.ts (deleted)
268
+ ├── src/api/routes.ts (restored to previous)
269
+ └── tests/auth.test.ts (deleted)
270
+
271
+ Run without --dry-run to execute.
272
+ ```
273
+
274
+ ### Soft Revert (--soft)
75
275
 
76
276
  ```bash
77
277
  git revert --no-commit [commits...]
78
- git commit -m "revert: [bead-id] [scope]"
278
+ # Changes staged but not committed
79
279
  ```
80
280
 
81
- **Soft revert (--soft):**
281
+ ### Hard Revert (default)
82
282
 
83
283
  ```bash
84
284
  git revert --no-commit [commits...]
85
- # Leave changes staged for review
285
+ git commit -m "revert([bead-id]): [scope description]
286
+
287
+ Reverts commits: [list]
288
+ Reason: [user-provided or default]
289
+
290
+ Backup branch: backup/[bead-id]-pre-revert"
291
+ ```
292
+
293
+ ---
294
+
295
+ ## Phase 9: Handle Conflicts
296
+
297
+ If conflicts occur:
298
+
86
299
  ```
300
+ Conflicts Detected
301
+ ━━━━━━━━━━━━━━━━━━
302
+
303
+ Conflicting files:
304
+ ├── src/api/routes.ts
305
+ └── src/config/index.ts
87
306
 
88
- ### Step 5: Update Bead
307
+ Options:
308
+ 1. Abort revert (git revert --abort)
309
+ 2. Resolve manually and continue
310
+ 3. Accept theirs (keep current)
311
+ 4. Accept ours (use reverted)
89
312
 
90
- Update bead status by adding a note via `bd_msg` about the revert.
313
+ Select option (1/2/3/4):
314
+ ```
91
315
 
92
- ## Safety Checks
316
+ ### Conflict Resolution Guidance
93
317
 
94
- Before reverting:
318
+ ```bash
319
+ # To abort
320
+ git revert --abort
95
321
 
96
- - [ ] Check for uncommitted changes
97
- - [ ] Verify bead exists and has commits
98
- - [ ] Check for dependent beads
99
- - [ ] Identify potential merge conflicts
322
+ # To resolve manually
323
+ # Edit conflicting files, then:
324
+ git add [resolved-files]
325
+ git revert --continue
100
326
 
101
- If conflicts detected:
327
+ # To accept one side
328
+ git checkout --theirs [file] # Keep current
329
+ git checkout --ours [file] # Use reverted
330
+ ```
102
331
 
103
- 1. List conflicting files
104
- 2. Offer to abort or continue with manual resolution
105
- 3. Provide conflict resolution guidance
332
+ ---
333
+
334
+ ## Phase 10: Update Bead Status
335
+
336
+ ```typescript
337
+ bd_msg({
338
+ subj: "Reverted: [bead-id]",
339
+ body: "Feature reverted at [timestamp]\nReason: [reason]\nBackup: backup/[bead-id]-pre-revert",
340
+ to: "all",
341
+ importance: "normal",
342
+ global: false,
343
+ });
344
+
345
+ // Optionally close or re-open bead
346
+ bd_update({ id: "[bead-id]", status: "open" });
347
+ ```
348
+
349
+ ---
106
350
 
107
351
  ## Output
108
352
 
109
- Report:
353
+ ```
354
+ Revert Complete: [bead-id]
355
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━
110
356
 
111
- - Commits reverted
112
- - Files restored
113
- - Bead status updated
114
- - Next steps
357
+ Commits reverted: 3
358
+ Files restored: 8
359
+ Lines removed: +456 / -23 net -433
115
360
 
116
- ## Related Commands
361
+ Revert commit: [new-sha]
362
+ Backup branch: backup/[bead-id]-pre-revert
363
+
364
+ Bead status: Updated to 'open'
365
+
366
+ To undo this revert:
367
+ git revert [new-sha]
368
+ # or
369
+ git cherry-pick [original-commits]
370
+
371
+ Next steps:
372
+ ├── Verify app works: npm test
373
+ ├── Check dependent features
374
+ └── Re-implement if needed: /implement [bead-id]
375
+ ```
376
+
377
+ ---
378
+
379
+ ## Undo the Revert
380
+
381
+ If the revert was wrong:
117
382
 
118
383
  ```bash
119
- # View bead history
120
- bd_show({ id: "[bead-id]" })
384
+ # Option 1: Revert the revert
385
+ git revert [revert-commit-sha]
121
386
 
122
- # Check current status
123
- bd_status({ include_agents: false })
387
+ # Option 2: Cherry-pick original commits
388
+ git cherry-pick [original-commits...]
124
389
 
125
- # Re-implement after revert
126
- /implement [bead-id]
390
+ # Option 3: Restore from backup branch
391
+ git checkout backup/[bead-id]-pre-revert -- .
392
+ git commit -m "restore: [bead-id] from backup"
127
393
  ```
394
+
395
+ ---
396
+
397
+ ## Related Commands
398
+
399
+ | Need | Command |
400
+ | -------------------- | ------------------------------ |
401
+ | View bead history | `bd_show({ id: "[bead-id]" })` |
402
+ | Re-implement feature | `/implement [bead-id]` |
403
+ | Check status | `/status [bead-id]` |
404
+ | Create new feature | `/new-feature` |
@@ -1,13 +1,202 @@
1
1
  ---
2
- description: Review code for quality and compliance
3
- argument-hint: "[path or task-id]"
2
+ description: Review code for quality, security, and compliance
3
+ argument-hint: "[path|bead-id|pr-number|'all'] [--quick|--thorough]"
4
4
  agent: review
5
5
  ---
6
6
 
7
7
  # Review: $ARGUMENTS
8
8
 
9
+ ## Phase 1: Determine Scope
10
+
11
+ Parse `$ARGUMENTS` to determine what to review:
12
+
13
+ | Input | Scope | How to Get Code |
14
+ | ------------------------ | ---------------------- | ------------------------------------------- |
15
+ | File/directory path | That path only | `read` or `glob` + `read` |
16
+ | Bead ID (e.g., `bd-123`) | Implementation vs spec | `bd_show()` then `git diff` from spec |
17
+ | PR number (e.g., `#45`) | PR changes | `gh pr diff 45` |
18
+ | `all` or empty | Recent changes | `git diff main...HEAD` or `git diff HEAD~5` |
19
+
20
+ If bead exists, load spec from `.beads/artifacts/$ID/spec.md` and review against constraints.
21
+
22
+ ## Phase 2: Automated Analysis
23
+
24
+ Run these checks first (batch for speed):
25
+
26
+ ```
27
+ # Type/lint errors
28
+ lsp_diagnostics() for each changed file
29
+ npm run type-check || tsc --noEmit
30
+ npm run lint || true
31
+
32
+ # Anti-pattern detection with ast-grep
33
+ ast-grep pattern="console.log($$$)" # Debug statements
34
+ ast-grep pattern="any" # TypeScript any
35
+ ast-grep pattern="// TODO" OR grep "TODO|FIXME|HACK|XXX"
36
+ ast-grep pattern="password = \"$$$\"" # Hardcoded secrets
37
+
38
+ # Test status
39
+ npm test || pytest || cargo test
40
+ ```
41
+
42
+ Collect all automated findings before manual review.
43
+
44
+ ## Phase 3: Manual Review Categories
45
+
9
46
  skill({ name: "requesting-code-review" })
10
47
 
11
- If bead exists, review against `.beads/artifacts/$ARGUMENTS/spec.md` constraints.
48
+ Review each category with specific focus:
49
+
50
+ ### Security
51
+
52
+ - Authentication/authorization checks on all endpoints
53
+ - Input validation and sanitization
54
+ - No secrets in code (API keys, passwords, tokens)
55
+ - SQL/command injection prevention
56
+ - XSS prevention (output encoding)
57
+
58
+ ### Performance
59
+
60
+ - N+1 query patterns
61
+ - Unbounded loops or recursion
62
+ - Missing pagination on large datasets
63
+ - Expensive operations in hot paths
64
+ - Missing caching where appropriate
65
+
66
+ ### Maintainability
67
+
68
+ - Cyclomatic complexity (functions > 10 branches)
69
+ - DRY violations (duplicated logic)
70
+ - Dead code or unreachable branches
71
+ - Naming clarity (can you understand without comments?)
72
+ - Single Responsibility violations
73
+
74
+ ### Error Handling
75
+
76
+ - All async operations have error handling
77
+ - Errors are logged with context
78
+ - User-facing errors are sanitized (no stack traces)
79
+ - Graceful degradation where appropriate
80
+
81
+ ### Testing
82
+
83
+ - Test coverage on new/changed code
84
+ - Tests verify behavior, not implementation
85
+ - Edge cases covered (empty, null, boundary)
86
+ - No excessive mocking (tests actually test something)
87
+
88
+ ### Type Safety (TypeScript/typed languages)
89
+
90
+ - No `any` types without justification
91
+ - Proper null/undefined handling
92
+ - Generic types used appropriately
93
+ - Return types explicit on public APIs
94
+
95
+ ## Phase 4: Create Tracking Issues
96
+
97
+ For each Critical or Important finding:
98
+
99
+ ```
100
+ bd_add({
101
+ title: "[Review] <brief issue description>",
102
+ desc: "File: <path>:<line>\nIssue: <what's wrong>\nFix: <how to fix>",
103
+ type: "bug",
104
+ pri: 1, # Critical=0, Important=1, Minor=2
105
+ tags: ["review", "security|perf|maintainability"]
106
+ })
107
+ ```
108
+
109
+ Skip creating beads for Minor issues (just report them).
110
+
111
+ ## Phase 5: Output Format
112
+
113
+ ### Summary
114
+
115
+ | Metric | Value |
116
+ | ------------------ | ------- |
117
+ | Files reviewed | X |
118
+ | Lines changed | +X / -Y |
119
+ | Critical issues | X |
120
+ | Important issues | X |
121
+ | Minor issues | X |
122
+ | Automated findings | X |
123
+
124
+ ### Automated Findings
125
+
126
+ ```
127
+ [LSP] src/auth.ts:45 - Type 'string' is not assignable to type 'User'
128
+ [AST] src/utils.ts:12 - console.log detected
129
+ [GREP] src/config.ts:8 - TODO: implement rate limiting
130
+ ```
131
+
132
+ ### Manual Findings
133
+
134
+ #### Critical (Must Fix Before Merge)
135
+
136
+ | File:Line | Issue | Category | Fix |
137
+ | ---------------- | ------------------------------------ | -------- | ------------------------------ |
138
+ | `src/auth.ts:45` | Missing auth check on admin endpoint | Security | Add `requireAuth()` middleware |
139
+
140
+ #### Important (Should Fix)
141
+
142
+ | File:Line | Issue | Category | Fix |
143
+ | -------------- | ---------------------- | ----------- | ---------------------------- |
144
+ | `src/db.ts:89` | N+1 query in user list | Performance | Use `include` or batch query |
145
+
146
+ #### Minor (Nice to Have)
147
+
148
+ | File:Line | Issue | Category | Fix |
149
+ | ----------------- | ------------------------ | --------------- | --------------------------- |
150
+ | `src/utils.ts:12` | Console.log left in code | Maintainability | Remove or use proper logger |
151
+
152
+ ### Strengths
153
+
154
+ - [What's done well - be specific with file:line]
155
+
156
+ ### Recommendations
157
+
158
+ - [Improvements beyond immediate fixes]
159
+
160
+ ### Verdict
161
+
162
+ **Ready to merge:** Yes | No | With Fixes
163
+
164
+ **Reasoning:** [1-2 sentences explaining the decision]
165
+
166
+ **Beads created:** [List bead IDs for Critical/Important findings, or "None"]
167
+
168
+ ---
169
+
170
+ ## Depth Levels
171
+
172
+ **--quick** (~5-10 min): Automated checks + skim changed files, focus on Critical only
173
+ **--thorough** (default, ~15-30 min): Full automated + manual review of all categories
174
+ **--security**: Focus only on security category with deeper analysis
175
+
176
+ ## Examples
177
+
178
+ ```bash
179
+ # Review a specific file
180
+ /review-codebase src/auth/login.ts
181
+
182
+ # Review against a bead spec
183
+ /review-codebase bd-feature-auth
184
+
185
+ # Review a PR
186
+ /review-codebase #45
187
+
188
+ # Quick review of recent changes
189
+ /review-codebase all --quick
190
+
191
+ # Security-focused review
192
+ /review-codebase src/api/ --security
193
+ ```
194
+
195
+ ## Anti-Patterns (Don't Do This)
12
196
 
13
- Otherwise, general code quality review.
197
+ - "LGTM" without actually reviewing
198
+ - Marking style issues as Critical
199
+ - Reviewing code you didn't read
200
+ - Vague feedback ("improve error handling" - WHERE? HOW?)
201
+ - Skipping automated checks "to save time"
202
+ - Not creating beads for real issues (they get forgotten)