liteagents 2.9.0 → 2.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 (117) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.md +27 -33
  3. package/installer/cli.js +6 -2
  4. package/package.json +3 -3
  5. package/packages/ampcode/AGENT.md +11 -16
  6. package/packages/ampcode/agents/code-developer.md +11 -12
  7. package/packages/ampcode/agents/quality-assurance.md +1 -1
  8. package/packages/{droid/commands/systematic-debugging.md → ampcode/commands/debug-method.md} +9 -9
  9. package/packages/ampcode/commands/diff-review.md +78 -0
  10. package/packages/ampcode/commands/friction/friction.js +28 -6
  11. package/packages/ampcode/commands/optimize.md +45 -4
  12. package/packages/ampcode/commands/refactor.md +33 -1
  13. package/packages/ampcode/commands/release.md +88 -0
  14. package/packages/ampcode/commands/remember.md +34 -3
  15. package/packages/ampcode/commands/security.md +28 -1
  16. package/packages/ampcode/commands/stash.md +7 -0
  17. package/packages/{droid/commands/test-driven-development.md → ampcode/commands/tdd-flow.md} +2 -2
  18. package/packages/ampcode/commands/test-generate.md +64 -15
  19. package/packages/{opencode/command/testing-anti-patterns.md → ampcode/commands/test-traps.md} +77 -3
  20. package/packages/{droid/commands/root-cause-tracing.md → ampcode/commands/trace-back.md} +3 -3
  21. package/packages/ampcode/commands/{verification-before-completion.md → verify-done.md} +3 -3
  22. package/packages/claude/CLAUDE.md +10 -15
  23. package/packages/claude/agents/code-developer.md +11 -12
  24. package/packages/claude/agents/quality-assurance.md +1 -1
  25. package/packages/claude/commands/diff-review.md +78 -0
  26. package/packages/claude/commands/friction/friction.js +28 -6
  27. package/packages/claude/commands/optimize.md +45 -4
  28. package/packages/claude/commands/refactor.md +33 -1
  29. package/packages/claude/commands/release.md +88 -0
  30. package/packages/claude/commands/remember.md +34 -3
  31. package/packages/claude/commands/security.md +28 -1
  32. package/packages/claude/commands/stash.md +7 -0
  33. package/packages/claude/commands/test-generate.md +64 -15
  34. package/packages/claude/plugins/live-canvas-marketplace/plugins/live-canvas-channel/package-lock.json +3 -3
  35. package/packages/claude/skills/{systematic-debugging → debug-method}/CREATION-LOG.md +1 -1
  36. package/packages/claude/skills/{systematic-debugging → debug-method}/SKILL.md +9 -9
  37. package/packages/claude/skills/{systematic-debugging → debug-method}/test-academic.md +1 -1
  38. package/packages/claude/skills/{systematic-debugging → debug-method}/test-pressure-1.md +1 -1
  39. package/packages/claude/skills/{systematic-debugging → debug-method}/test-pressure-2.md +1 -1
  40. package/packages/claude/skills/{systematic-debugging → debug-method}/test-pressure-3.md +1 -1
  41. package/packages/claude/skills/{test-driven-development → tdd-flow}/SKILL.md +3 -3
  42. package/packages/claude/skills/{testing-anti-patterns → test-traps}/SKILL.md +77 -3
  43. package/packages/claude/skills/{root-cause-tracing → trace-back}/SKILL.md +3 -3
  44. package/packages/claude/skills/{verification-before-completion → verify-done}/SKILL.md +3 -3
  45. package/packages/droid/AGENTS.md +9 -14
  46. package/packages/{opencode/command/systematic-debugging.md → droid/commands/debug-method.md} +9 -9
  47. package/packages/droid/commands/diff-review.md +78 -0
  48. package/packages/droid/commands/friction/friction.js +28 -6
  49. package/packages/droid/commands/optimize.md +45 -4
  50. package/packages/droid/commands/refactor.md +33 -1
  51. package/packages/droid/commands/release.md +88 -0
  52. package/packages/droid/commands/remember.md +34 -3
  53. package/packages/droid/commands/security.md +28 -1
  54. package/packages/droid/commands/stash.md +7 -0
  55. package/packages/{opencode/command/test-driven-development.md → droid/commands/tdd-flow.md} +2 -2
  56. package/packages/droid/commands/test-generate.md +64 -15
  57. package/packages/droid/commands/{testing-anti-patterns.md → test-traps.md} +77 -3
  58. package/packages/{opencode/command/root-cause-tracing.md → droid/commands/trace-back.md} +3 -3
  59. package/packages/droid/commands/{verification-before-completion.md → verify-done.md} +3 -3
  60. package/packages/droid/droids/code-developer.md +11 -12
  61. package/packages/droid/droids/quality-assurance.md +1 -1
  62. package/packages/opencode/AGENTS.md +9 -14
  63. package/packages/opencode/agent/code-developer.md +11 -12
  64. package/packages/opencode/agent/quality-assurance.md +1 -1
  65. package/packages/{ampcode/commands/systematic-debugging.md → opencode/command/debug-method.md} +9 -9
  66. package/packages/opencode/command/diff-review.md +78 -0
  67. package/packages/opencode/command/friction/friction.js +28 -6
  68. package/packages/opencode/command/optimize.md +45 -4
  69. package/packages/opencode/command/refactor.md +33 -1
  70. package/packages/opencode/command/release.md +88 -0
  71. package/packages/opencode/command/remember.md +34 -3
  72. package/packages/opencode/command/security.md +28 -1
  73. package/packages/opencode/command/stash.md +7 -0
  74. package/packages/{ampcode/commands/test-driven-development.md → opencode/command/tdd-flow.md} +2 -2
  75. package/packages/opencode/command/test-generate.md +64 -15
  76. package/packages/{ampcode/commands/testing-anti-patterns.md → opencode/command/test-traps.md} +77 -3
  77. package/packages/{ampcode/commands/root-cause-tracing.md → opencode/command/trace-back.md} +3 -3
  78. package/packages/opencode/command/{verification-before-completion.md → verify-done.md} +3 -3
  79. package/packages/opencode/opencode.jsonc +16 -36
  80. package/packages/subagentic-manual.md +56 -51
  81. package/packages/ampcode/commands/code-review.md +0 -107
  82. package/packages/ampcode/commands/condition-based-waiting.md +0 -122
  83. package/packages/ampcode/commands/debug.md +0 -20
  84. package/packages/ampcode/commands/explain.md +0 -18
  85. package/packages/ampcode/commands/friction.md +0 -139
  86. package/packages/ampcode/commands/git-commit.md +0 -14
  87. package/packages/ampcode/commands/review.md +0 -18
  88. package/packages/claude/commands/debug.md +0 -20
  89. package/packages/claude/commands/explain.md +0 -18
  90. package/packages/claude/commands/friction.md +0 -139
  91. package/packages/claude/commands/git-commit.md +0 -14
  92. package/packages/claude/commands/review.md +0 -18
  93. package/packages/claude/skills/code-review/SKILL.md +0 -107
  94. package/packages/claude/skills/code-review/code-reviewer.md +0 -146
  95. package/packages/claude/skills/condition-based-waiting/SKILL.md +0 -122
  96. package/packages/droid/commands/code-review.md +0 -107
  97. package/packages/droid/commands/condition-based-waiting.md +0 -122
  98. package/packages/droid/commands/debug.md +0 -20
  99. package/packages/droid/commands/explain.md +0 -18
  100. package/packages/droid/commands/friction.md +0 -139
  101. package/packages/droid/commands/git-commit.md +0 -14
  102. package/packages/droid/commands/review.md +0 -18
  103. package/packages/opencode/command/code-review.md +0 -107
  104. package/packages/opencode/command/condition-based-waiting.md +0 -122
  105. package/packages/opencode/command/debug.md +0 -20
  106. package/packages/opencode/command/explain.md +0 -18
  107. package/packages/opencode/command/friction.md +0 -139
  108. package/packages/opencode/command/git-commit.md +0 -14
  109. package/packages/opencode/command/review.md +0 -18
  110. /package/packages/ampcode/commands/{condition-based-waiting → test-traps}/example.ts +0 -0
  111. /package/packages/ampcode/commands/{root-cause-tracing → trace-back}/find-polluter.sh +0 -0
  112. /package/packages/claude/skills/{condition-based-waiting → test-traps}/example.ts +0 -0
  113. /package/packages/claude/skills/{root-cause-tracing → trace-back}/find-polluter.sh +0 -0
  114. /package/packages/droid/commands/{condition-based-waiting → test-traps}/example.ts +0 -0
  115. /package/packages/droid/commands/{root-cause-tracing → trace-back}/find-polluter.sh +0 -0
  116. /package/packages/opencode/command/{condition-based-waiting → test-traps}/example.ts +0 -0
  117. /package/packages/opencode/command/{root-cause-tracing → trace-back}/find-polluter.sh +0 -0
@@ -1,139 +0,0 @@
1
- ---
2
- name: friction
3
- description: Analyze session behavior patterns
4
- usage: /friction <sessions-path>
5
- argument-hint: <sessions-path>
6
- ---
7
-
8
- Analyze Claude Code session logs for friction signals, behavioral patterns, and failure antigens.
9
-
10
- **Guardrails**
11
- - Favor straightforward, minimal implementations first and add complexity only when requested or clearly required.
12
- - Keep changes tightly scoped to the requested outcome.
13
-
14
- **Argument: sessions-path (required)**
15
-
16
- Path to the Amp sessions directory containing JSONL files.
17
- - Example: `/friction ~/.config/amp/projects/-home-hamr-PycharmProjects-aurora/`
18
- - If no argument provided, ask the user for the path. Do NOT guess.
19
-
20
- **What it does**
21
-
22
- Runs friction analysis on session JSONL files and writes results to `.amp/friction/` in the current project.
23
-
24
- **Steps**
25
-
26
- 1. **Validate path**
27
- - The argument `$ARGUMENTS` is the sessions path
28
- - Verify the path exists and contains `.jsonl` files
29
- - If path doesn't exist or has no JSONL files, tell the user and stop
30
- - Count total session files found
31
-
32
- 2. **Run friction.js** (bundled at `commands/friction/friction.js`)
33
- - Look for friction.js in order:
34
- 1. `~/.config/amp/commands/friction/friction.js` (installed)
35
- 2. `packages/ampcode/commands/friction/friction.js` (package development)
36
- - If found, run: `node <path-to-friction.js> "$ARGUMENTS"`
37
- - If it does NOT exist anywhere, fall back to running the analysis manually (step 3)
38
- - If friction.js succeeds, skip to step 7
39
-
40
- 3. **Manual analysis fallback** (only if friction.js not available)
41
- - For each `.jsonl` session file in the path:
42
- - Read the file
43
- - Extract signals using these patterns:
44
-
45
- | Signal | Weight | How to detect |
46
- |---|---|---|
47
- | `user_intervention` | 10 | User message contains `/stash` |
48
- | `session_abandoned` | 10 | Last 3 turns have friction > 15 and no `exit_success` |
49
- | `false_success` | 8 | LLM text contains "done"/"complete"/"fixed" AND next tool result has error |
50
- | `no_resolution` | 8 | Session has `exit_error` signals but no `exit_success` after them |
51
- | `tool_loop` | 6 | Same tool called 3+ times with identical arguments |
52
- | `rapid_exit` | 6 | <3 turns AND ends with error |
53
- | `interrupt_cascade` | 5 | Multiple `request_interrupted` within 60 seconds |
54
- | `user_curse` | 5 | User message matches profanity patterns |
55
- | `request_interrupted` | 2.5 | Turn has `is_interrupted: true` or ESC/Ctrl+C signal |
56
- | `exit_error` | 1 | Tool result has non-zero exit code |
57
- | `repeated_question` | 1 | User asks same question twice (fuzzy match) |
58
- | `long_silence` | 0.5 | >10 minute gap between turns |
59
- | `user_negation` | 0.5 | User message starts with "no", "wrong", "didn't work" |
60
- | `compaction` | 0.5 | System message indicates context compaction |
61
-
62
- 4. **Score each session**
63
- - Accumulate weighted signal scores (no subtraction, only accumulation)
64
- - Track peak friction score
65
- - Classify session quality:
66
- - **BAD**: has `user_intervention` or `session_abandoned`
67
- - **FRICTION**: has `user_curse` or `false_success`
68
- - **ROUGH**: peak friction >= 15, no intervention
69
- - **OK**: low friction, completed normally
70
- - **ONE-SHOT**: single turn, not interactive (filter out)
71
-
72
- 5. **Aggregate stats**
73
- - Count sessions by quality
74
- - Calculate BAD rate
75
- - Identify worst and best sessions
76
- - Daily trend if sessions span multiple days
77
-
78
- 6. **Extract antigen candidates from BAD sessions**
79
- - For each BAD session, extract:
80
- - Anchor signal (what triggered BAD classification)
81
- - Tool sequence around the failure
82
- - Error messages
83
- - Pattern description
84
- - Write as antigen candidates
85
-
86
- 7. **Write output to `.amp/friction/`**
87
- - Create `.amp/friction/` directory if it doesn't exist
88
- - Write these files:
89
- - `friction_analysis.json` — per-session breakdown (quality, peak, signals)
90
- - `friction_summary.json` — aggregate stats, verdict, daily trend
91
- - `friction_raw.jsonl` — all raw signals with timestamps
92
- - `antigen_candidates.json` — raw extracted failure patterns
93
- - `antigen_clusters.json` — clustered patterns (primary artifact for /remember)
94
- - `antigen_review.md` — human-readable clustered review
95
-
96
- 8. **Report to user**
97
- - Sessions analyzed count
98
- - BAD / FRICTION / ROUGH / OK counts
99
- - BAD rate percentage
100
- - Worst session ID and peak friction
101
- - Path to `antigen_review.md` for review
102
- - Remind: run `/remember` to consolidate into project memory
103
-
104
- **Output format for antigen_review.md**
105
-
106
- ```markdown
107
- # Friction Antigen Clusters
108
-
109
- Generated: [date]
110
- BAD sessions: [count] | Raw candidates: [count] | Clusters: [count]
111
-
112
- ## Cluster Summary
113
-
114
- | # | Signal | Tool Pattern | Count | Sessions | Score | Median Peak |
115
- |---|--------|-------------|-------|----------|-------|-------------|
116
- | 1 | false_success | Bash,Bash | 35 | 23 | 280 | 73 |
117
- | 2 | user_intervention | (none) | 34 | 24 | 340 | 65 |
118
-
119
- ## Cluster 1: false_success | Bash,Bash
120
-
121
- **Occurrences:** 35 across 23 sessions | **Score:** 280
122
-
123
- ### User Context (what the user said)
124
- > [actual user quote from session]
125
-
126
- ### Errors
127
- [error messages if any]
128
-
129
- ### Files involved
130
- - [file paths]
131
- ```
132
-
133
- **File locations**
134
- - Design doc: `docs/02-features/memory/LONG_TERM_MEMORY.md`
135
- - Input: JSONL session files from `$ARGUMENTS` path
136
- - Output: `.amp/friction/` (project-local)
137
- - JS script: `commands/friction/friction.js` (bundled alongside this command)
138
- - Python equivalent: `scripts/friction.py` (aurora users, same logic)
139
- - Manual fallback: built into this command if friction.js unavailable
@@ -1,14 +0,0 @@
1
- ---
2
- name: git-commit
3
- description: Analyze changes and commit
4
- usage: /git-commit
5
- allowed-tools: Bash(git *)
6
- ---
7
- 1. Run `git diff --staged` to see changes
8
- 2. Analyze what was changed and why
9
- 3. Create a commit message:
10
- - Format: type(scope): description
11
- - Types: feat, fix, refactor, docs, test, chore
12
- - Under 72 chars
13
- - Body explains WHY if non-obvious
14
- 4. Execute the commit
@@ -1,18 +0,0 @@
1
- ---
2
- name: review
3
- description: Review code [file]
4
- usage: /review
5
- argument-hint: [file or leave empty for staged changes]
6
- ---
7
- Review $ARGUMENTS (or staged changes if not specified).
8
-
9
- ## Check For
10
- - Security: OWASP Top 10, auth issues, data exposure
11
- - Performance: N+1 queries, memory leaks, blocking calls
12
- - Correctness: Edge cases, error handling, type safety
13
- - Maintainability: Complexity, naming, duplication
14
-
15
- ## Output Format
16
- ### 🚨 Critical (blocks merge)
17
- ### ⚠️ Warnings (should fix)
18
- ### 💡 Suggestions (nice to have)
@@ -1,20 +0,0 @@
1
- ---
2
- name: debug
3
- description: Debug issue [issue]
4
- usage: /debug <issue-description>
5
- argument-hint: [description of the problem]
6
- ---
7
- Debug: $ARGUMENTS
8
-
9
- ## Process
10
- 1. Clarify: What's expected vs actual behavior?
11
- 2. Reproduce: What triggers the issue?
12
- 3. Isolate: Which component/function is responsible?
13
- 4. Trace: Follow the data flow
14
- 5. Fix: Implement and verify the solution
15
-
16
- ## Output
17
- - Root cause
18
- - Affected code paths
19
- - Fix with explanation
20
- - Prevention strategy
@@ -1,18 +0,0 @@
1
- ---
2
- name: explain
3
- description: Explain [code]
4
- usage: /explain <code-section>
5
- argument-hint: [file, function, or concept]
6
- model: claude-3-5-haiku-20241022
7
- ---
8
- Explain $ARGUMENTS.
9
-
10
- ## Cover
11
- - What it does (purpose)
12
- - How it works (step by step)
13
- - Why it's designed this way
14
- - Dependencies and side effects
15
- - Potential gotchas
16
-
17
- Assume reader knows the language but not this codebase.
18
-
@@ -1,139 +0,0 @@
1
- ---
2
- name: friction
3
- description: Analyze session behavior patterns
4
- usage: /friction <sessions-path>
5
- argument-hint: <sessions-path>
6
- ---
7
-
8
- Analyze Claude Code session logs for friction signals, behavioral patterns, and failure antigens.
9
-
10
- **Guardrails**
11
- - Favor straightforward, minimal implementations first and add complexity only when requested or clearly required.
12
- - Keep changes tightly scoped to the requested outcome.
13
-
14
- **Argument: sessions-path (required)**
15
-
16
- Path to the Claude Code sessions directory containing JSONL files.
17
- - Example: `/friction ~/.claude/projects/-home-hamr-PycharmProjects-aurora/`
18
- - If no argument provided, ask the user for the path. Do NOT guess.
19
-
20
- **What it does**
21
-
22
- Runs friction analysis on session JSONL files and writes results to `.claude/friction/` in the current project.
23
-
24
- **Steps**
25
-
26
- 1. **Validate path**
27
- - The argument `$ARGUMENTS` is the sessions path
28
- - Verify the path exists and contains `.jsonl` files
29
- - If path doesn't exist or has no JSONL files, tell the user and stop
30
- - Count total session files found
31
-
32
- 2. **Run friction.js** (bundled at `commands/friction/friction.js`)
33
- - Look for friction.js in order:
34
- 1. `~/.claude/commands/friction/friction.js` (installed)
35
- 2. `packages/claude/commands/friction/friction.js` (package development)
36
- - If found, run: `node <path-to-friction.js> "$ARGUMENTS"`
37
- - If it does NOT exist anywhere, fall back to running the analysis manually (step 3)
38
- - If friction.js succeeds, skip to step 7
39
-
40
- 3. **Manual analysis fallback** (only if friction.js not available)
41
- - For each `.jsonl` session file in the path:
42
- - Read the file
43
- - Extract signals using these patterns:
44
-
45
- | Signal | Weight | How to detect |
46
- |---|---|---|
47
- | `user_intervention` | 10 | User message contains `/stash` |
48
- | `session_abandoned` | 10 | Last 3 turns have friction > 15 and no `exit_success` |
49
- | `false_success` | 8 | LLM text contains "done"/"complete"/"fixed" AND next tool result has error |
50
- | `no_resolution` | 8 | Session has `exit_error` signals but no `exit_success` after them |
51
- | `tool_loop` | 6 | Same tool called 3+ times with identical arguments |
52
- | `rapid_exit` | 6 | <3 turns AND ends with error |
53
- | `interrupt_cascade` | 5 | Multiple `request_interrupted` within 60 seconds |
54
- | `user_curse` | 5 | User message matches profanity patterns |
55
- | `request_interrupted` | 2.5 | Turn has `is_interrupted: true` or ESC/Ctrl+C signal |
56
- | `exit_error` | 1 | Tool result has non-zero exit code |
57
- | `repeated_question` | 1 | User asks same question twice (fuzzy match) |
58
- | `long_silence` | 0.5 | >10 minute gap between turns |
59
- | `user_negation` | 0.5 | User message starts with "no", "wrong", "didn't work" |
60
- | `compaction` | 0.5 | System message indicates context compaction |
61
-
62
- 4. **Score each session**
63
- - Accumulate weighted signal scores (no subtraction, only accumulation)
64
- - Track peak friction score
65
- - Classify session quality:
66
- - **BAD**: has `user_intervention` or `session_abandoned`
67
- - **FRICTION**: has `user_curse` or `false_success`
68
- - **ROUGH**: peak friction >= 15, no intervention
69
- - **OK**: low friction, completed normally
70
- - **ONE-SHOT**: single turn, not interactive (filter out)
71
-
72
- 5. **Aggregate stats**
73
- - Count sessions by quality
74
- - Calculate BAD rate
75
- - Identify worst and best sessions
76
- - Daily trend if sessions span multiple days
77
-
78
- 6. **Extract antigen candidates from BAD sessions**
79
- - For each BAD session, extract:
80
- - Anchor signal (what triggered BAD classification)
81
- - Tool sequence around the failure
82
- - Error messages
83
- - Pattern description
84
- - Write as antigen candidates
85
-
86
- 7. **Write output to `.claude/friction/`**
87
- - Create `.claude/friction/` directory if it doesn't exist
88
- - Write these files:
89
- - `friction_analysis.json` — per-session breakdown (quality, peak, signals)
90
- - `friction_summary.json` — aggregate stats, verdict, daily trend
91
- - `friction_raw.jsonl` — all raw signals with timestamps
92
- - `antigen_candidates.json` — raw extracted failure patterns
93
- - `antigen_clusters.json` — clustered patterns (primary artifact for /remember)
94
- - `antigen_review.md` — human-readable clustered review
95
-
96
- 8. **Report to user**
97
- - Sessions analyzed count
98
- - BAD / FRICTION / ROUGH / OK counts
99
- - BAD rate percentage
100
- - Worst session ID and peak friction
101
- - Path to `antigen_review.md` for review
102
- - Remind: run `/remember` to consolidate into project memory
103
-
104
- **Output format for antigen_review.md**
105
-
106
- ```markdown
107
- # Friction Antigen Clusters
108
-
109
- Generated: [date]
110
- BAD sessions: [count] | Raw candidates: [count] | Clusters: [count]
111
-
112
- ## Cluster Summary
113
-
114
- | # | Signal | Tool Pattern | Count | Sessions | Score | Median Peak |
115
- |---|--------|-------------|-------|----------|-------|-------------|
116
- | 1 | false_success | Bash,Bash | 35 | 23 | 280 | 73 |
117
- | 2 | user_intervention | (none) | 34 | 24 | 340 | 65 |
118
-
119
- ## Cluster 1: false_success | Bash,Bash
120
-
121
- **Occurrences:** 35 across 23 sessions | **Score:** 280
122
-
123
- ### User Context (what the user said)
124
- > [actual user quote from session]
125
-
126
- ### Errors
127
- [error messages if any]
128
-
129
- ### Files involved
130
- - [file paths]
131
- ```
132
-
133
- **File locations**
134
- - Design doc: `docs/02-features/memory/LONG_TERM_MEMORY.md`
135
- - Input: JSONL session files from `$ARGUMENTS` path
136
- - Output: `.claude/friction/` (project-local)
137
- - JS script: `commands/friction/friction.js` (bundled alongside this command)
138
- - Python equivalent: `scripts/friction.py` (aurora users, same logic)
139
- - Manual fallback: built into this command if friction.js unavailable
@@ -1,14 +0,0 @@
1
- ---
2
- name: git-commit
3
- description: Analyze changes and commit
4
- usage: /git-commit
5
- allowed-tools: Bash(git:*)
6
- ---
7
- 1. Run `git diff --staged` to see changes
8
- 2. Analyze what was changed and why
9
- 3. Create a commit message:
10
- - Format: type(scope): description
11
- - Types: feat, fix, refactor, docs, test, chore
12
- - Under 72 chars
13
- - Body explains WHY if non-obvious
14
- 4. Execute the commit
@@ -1,18 +0,0 @@
1
- ---
2
- name: review
3
- description: Review code [file]
4
- usage: /review
5
- argument-hint: [file or leave empty for staged changes]
6
- ---
7
- Review $ARGUMENTS (or staged changes if not specified).
8
-
9
- ## Check For
10
- - Security: OWASP Top 10, auth issues, data exposure
11
- - Performance: N+1 queries, memory leaks, blocking calls
12
- - Correctness: Edge cases, error handling, type safety
13
- - Maintainability: Complexity, naming, duplication
14
-
15
- ## Output Format
16
- ### 🚨 Critical (blocks merge)
17
- ### ⚠️ Warnings (should fix)
18
- ### 💡 Suggestions (nice to have)
@@ -1,107 +0,0 @@
1
- ---
2
- name: code-review
3
- description: Use when completing tasks, implementing major features, or before merging to verify work meets requirements - reviews implementation against plan or requirements before proceeding
4
- usage: /code-review <review-scope> <focus-areas>
5
- auto_trigger: false
6
- ---
7
-
8
- # Requesting Code Review
9
-
10
- Review code thoroughly to catch issues before they cascade.
11
-
12
- **Core principle:** Review early, review often.
13
-
14
- ## When to Request Review
15
-
16
- **Mandatory:**
17
- - After each task in subagent-driven development
18
- - After completing major feature
19
- - Before merge to main
20
-
21
- **Optional but valuable:**
22
- - When stuck (fresh perspective)
23
- - Before refactoring (baseline check)
24
- - After fixing complex bug
25
-
26
- ## How to Request
27
-
28
- **1. Get git SHAs:**
29
- ```bash
30
- BASE_SHA=$(git rev-parse HEAD~1) # or origin/main
31
- HEAD_SHA=$(git rev-parse HEAD)
32
- ```
33
-
34
- **2. Conduct code review:**
35
-
36
- Review implementation against requirements and plan
37
-
38
- **Placeholders:**
39
- - `{WHAT_WAS_IMPLEMENTED}` - What you just built
40
- - `{PLAN_OR_REQUIREMENTS}` - What it should do
41
- - `{BASE_SHA}` - Starting commit
42
- - `{HEAD_SHA}` - Ending commit
43
- - `{DESCRIPTION}` - Brief summary
44
-
45
- **3. Act on feedback:**
46
- - Fix Critical issues immediately
47
- - Fix Important issues before proceeding
48
- - Note Minor issues for later
49
- - Push back if reviewer is wrong (with reasoning)
50
-
51
- ## Example
52
-
53
- ```
54
- [Just completed Task 2: Add verification function]
55
-
56
- You: Let me request code review before proceeding.
57
-
58
- BASE_SHA=$(git log --oneline | grep "Task 1" | head -1 | awk '{print $1}')
59
- HEAD_SHA=$(git rev-parse HEAD)
60
-
61
- [Conduct code review]
62
- WHAT_WAS_IMPLEMENTED: Verification and repair functions for conversation index
63
- PLAN_OR_REQUIREMENTS: Task 2 from docs/plans/deployment-plan.md
64
- BASE_SHA: a7981ec
65
- HEAD_SHA: 3df7661
66
- DESCRIPTION: Added verifyIndex() and repairIndex() with 4 issue types
67
-
68
- [Subagent returns]:
69
- Strengths: Clean architecture, real tests
70
- Issues:
71
- Important: Missing progress indicators
72
- Minor: Magic number (100) for reporting interval
73
- Assessment: Ready to proceed
74
-
75
- You: [Fix progress indicators]
76
- [Continue to Task 3]
77
- ```
78
-
79
- ## Integration with Workflows
80
-
81
- **Subagent-Driven Development:**
82
- - Review after EACH task
83
- - Catch issues before they compound
84
- - Fix before moving to next task
85
-
86
- **Executing Plans:**
87
- - Review after each batch (3 tasks)
88
- - Get feedback, apply, continue
89
-
90
- **Ad-Hoc Development:**
91
- - Review before merge
92
- - Review when stuck
93
-
94
- ## Red Flags
95
-
96
- **Never:**
97
- - Skip review because "it's simple"
98
- - Ignore Critical issues
99
- - Proceed with unfixed Important issues
100
- - Argue with valid technical feedback
101
-
102
- **If reviewer wrong:**
103
- - Push back with technical reasoning
104
- - Show code/tests that prove it works
105
- - Request clarification
106
-
107
- See template at: requesting-code-review/code-reviewer.md
@@ -1,146 +0,0 @@
1
- # Code Review Agent
2
-
3
- You are reviewing code changes for production readiness.
4
-
5
- **Your task:**
6
- 1. Review {WHAT_WAS_IMPLEMENTED}
7
- 2. Compare against {PLAN_OR_REQUIREMENTS}
8
- 3. Check code quality, architecture, testing
9
- 4. Categorize issues by severity
10
- 5. Assess production readiness
11
-
12
- ## What Was Implemented
13
-
14
- {DESCRIPTION}
15
-
16
- ## Requirements/Plan
17
-
18
- {PLAN_REFERENCE}
19
-
20
- ## Git Range to Review
21
-
22
- **Base:** {BASE_SHA}
23
- **Head:** {HEAD_SHA}
24
-
25
- ```bash
26
- git diff --stat {BASE_SHA}..{HEAD_SHA}
27
- git diff {BASE_SHA}..{HEAD_SHA}
28
- ```
29
-
30
- ## Review Checklist
31
-
32
- **Code Quality:**
33
- - Clean separation of concerns?
34
- - Proper error handling?
35
- - Type safety (if applicable)?
36
- - DRY principle followed?
37
- - Edge cases handled?
38
-
39
- **Architecture:**
40
- - Sound design decisions?
41
- - Scalability considerations?
42
- - Performance implications?
43
- - Security concerns?
44
-
45
- **Testing:**
46
- - Tests actually test logic (not mocks)?
47
- - Edge cases covered?
48
- - Integration tests where needed?
49
- - All tests passing?
50
-
51
- **Requirements:**
52
- - All plan requirements met?
53
- - Implementation matches spec?
54
- - No scope creep?
55
- - Breaking changes documented?
56
-
57
- **Production Readiness:**
58
- - Migration strategy (if schema changes)?
59
- - Backward compatibility considered?
60
- - Documentation complete?
61
- - No obvious bugs?
62
-
63
- ## Output Format
64
-
65
- ### Strengths
66
- [What's well done? Be specific.]
67
-
68
- ### Issues
69
-
70
- #### Critical (Must Fix)
71
- [Bugs, security issues, data loss risks, broken functionality]
72
-
73
- #### Important (Should Fix)
74
- [Architecture problems, missing features, poor error handling, test gaps]
75
-
76
- #### Minor (Nice to Have)
77
- [Code style, optimization opportunities, documentation improvements]
78
-
79
- **For each issue:**
80
- - File:line reference
81
- - What's wrong
82
- - Why it matters
83
- - How to fix (if not obvious)
84
-
85
- ### Recommendations
86
- [Improvements for code quality, architecture, or process]
87
-
88
- ### Assessment
89
-
90
- **Ready to merge?** [Yes/No/With fixes]
91
-
92
- **Reasoning:** [Technical assessment in 1-2 sentences]
93
-
94
- ## Critical Rules
95
-
96
- **DO:**
97
- - Categorize by actual severity (not everything is Critical)
98
- - Be specific (file:line, not vague)
99
- - Explain WHY issues matter
100
- - Acknowledge strengths
101
- - Give clear verdict
102
-
103
- **DON'T:**
104
- - Say "looks good" without checking
105
- - Mark nitpicks as Critical
106
- - Give feedback on code you didn't review
107
- - Be vague ("improve error handling")
108
- - Avoid giving a clear verdict
109
-
110
- ## Example Output
111
-
112
- ```
113
- ### Strengths
114
- - Clean database schema with proper migrations (db.ts:15-42)
115
- - Comprehensive test coverage (18 tests, all edge cases)
116
- - Good error handling with fallbacks (summarizer.ts:85-92)
117
-
118
- ### Issues
119
-
120
- #### Important
121
- 1. **Missing help text in CLI wrapper**
122
- - File: index-conversations:1-31
123
- - Issue: No --help flag, users won't discover --concurrency
124
- - Fix: Add --help case with usage examples
125
-
126
- 2. **Date validation missing**
127
- - File: search.ts:25-27
128
- - Issue: Invalid dates silently return no results
129
- - Fix: Validate ISO format, throw error with example
130
-
131
- #### Minor
132
- 1. **Progress indicators**
133
- - File: indexer.ts:130
134
- - Issue: No "X of Y" counter for long operations
135
- - Impact: Users don't know how long to wait
136
-
137
- ### Recommendations
138
- - Add progress reporting for user experience
139
- - Consider config file for excluded projects (portability)
140
-
141
- ### Assessment
142
-
143
- **Ready to merge: With fixes**
144
-
145
- **Reasoning:** Core implementation is solid with good architecture and tests. Important issues (help text, date validation) are easily fixed and don't affect core functionality.
146
- ```