superkit-mcp-server 1.2.4 → 1.2.6
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/ARCHITECTURE.md +102 -102
- package/README.md +71 -71
- package/SUPERKIT.md +168 -168
- package/agents/code-archaeologist.md +106 -106
- package/agents/coder.md +90 -90
- package/agents/data-engineer.md +28 -28
- package/agents/devops-engineer.md +242 -242
- package/agents/git-manager.md +203 -203
- package/agents/orchestrator.md +420 -420
- package/agents/penetration-tester.md +188 -188
- package/agents/performance-optimizer.md +187 -187
- package/agents/planner.md +270 -270
- package/agents/qa-automation-engineer.md +103 -103
- package/agents/quant-developer.md +32 -32
- package/agents/reviewer.md +100 -100
- package/agents/scout.md +222 -222
- package/agents/tester.md +274 -274
- package/agents/ui-designer.md +208 -208
- package/build/__tests__/test_apply_prompt_args.js +104 -0
- package/build/index.js +106 -45
- package/build/tools/todoTools.js +39 -39
- package/build/tools/validators/__tests__/apiSchema.test.js +23 -23
- package/build/tools/validators/__tests__/convertRules.test.js +5 -5
- package/build/tools/validators/__tests__/frontendDesign.test.js +12 -12
- package/build/tools/validators/__tests__/geoChecker.test.js +19 -19
- package/build/tools/validators/__tests__/mobileAudit.test.js +12 -12
- package/build/tools/validators/__tests__/reactPerformanceChecker.test.js +17 -17
- package/build/tools/validators/__tests__/securityScan.test.js +6 -6
- package/build/tools/validators/__tests__/seoChecker.test.js +16 -16
- package/build/tools/validators/__tests__/typeCoverage.test.js +14 -14
- package/commands/README.md +122 -122
- package/commands/ask.toml +72 -72
- package/commands/brainstorm.toml +119 -119
- package/commands/chat.toml +77 -77
- package/commands/code-preview.toml +37 -37
- package/commands/code.toml +28 -28
- package/commands/content.toml +200 -200
- package/commands/cook.toml +77 -77
- package/commands/copywrite.toml +131 -131
- package/commands/db.toml +192 -192
- package/commands/debug.toml +166 -166
- package/commands/design.toml +158 -158
- package/commands/dev-rules.toml +14 -14
- package/commands/do.toml +117 -117
- package/commands/doc-rules.toml +14 -14
- package/commands/docs.toml +148 -148
- package/commands/fix.toml +440 -440
- package/commands/fullstack.toml +175 -175
- package/commands/git.toml +235 -235
- package/commands/help.toml +84 -84
- package/commands/integrate.toml +127 -127
- package/commands/journal.toml +136 -136
- package/commands/kit-setup.toml +40 -40
- package/commands/mcp.toml +183 -183
- package/commands/orchestration.toml +15 -15
- package/commands/plan.toml +206 -172
- package/commands/pm.toml +148 -148
- package/commands/pr.toml +50 -50
- package/commands/project.toml +32 -32
- package/commands/research.toml +117 -117
- package/commands/review-pr.toml +63 -63
- package/commands/review.toml +190 -190
- package/commands/scout-ext.toml +97 -97
- package/commands/scout.toml +79 -79
- package/commands/screenshot.toml +65 -65
- package/commands/session.toml +102 -102
- package/commands/skill.toml +384 -384
- package/commands/status.toml +22 -22
- package/commands/team.toml +56 -56
- package/commands/test.toml +164 -164
- package/commands/ticket.toml +70 -70
- package/commands/use.toml +106 -106
- package/commands/video.toml +83 -83
- package/commands/watzup.toml +71 -71
- package/commands/workflow.toml +14 -14
- package/package.json +35 -35
- package/skills/meta/README.md +30 -30
- package/skills/meta/api-design/SKILL.md +134 -134
- package/skills/meta/code-review/SKILL.md +44 -44
- package/skills/meta/code-review/checklists/pre-merge.md +25 -25
- package/skills/meta/code-review/workflows/architecture-pass.md +26 -26
- package/skills/meta/code-review/workflows/performance-pass.md +27 -27
- package/skills/meta/code-review/workflows/security-pass.md +29 -29
- package/skills/meta/compound-docs/SKILL.md +133 -133
- package/skills/meta/debug/SKILL.md +40 -40
- package/skills/meta/debug/templates/bug-report.template.md +31 -31
- package/skills/meta/debug/workflows/reproduce-issue.md +20 -20
- package/skills/meta/docker/SKILL.md +126 -126
- package/skills/meta/examples/supabase/SKILL.md +46 -46
- package/skills/meta/examples/supabase/references/best-practices.md +319 -319
- package/skills/meta/examples/supabase/references/common-patterns.md +373 -373
- package/skills/meta/examples/supabase/templates/migration-template.sql +49 -49
- package/skills/meta/examples/supabase/templates/rls-policy-template.sql +77 -77
- package/skills/meta/examples/supabase/workflows/debugging.md +260 -260
- package/skills/meta/examples/supabase/workflows/migration-workflow.md +211 -211
- package/skills/meta/examples/supabase/workflows/rls-policies.md +244 -244
- package/skills/meta/examples/supabase/workflows/schema-design.md +321 -321
- package/skills/meta/file-todos/SKILL.md +88 -88
- package/skills/meta/mobile/SKILL.md +140 -140
- package/skills/meta/nextjs/SKILL.md +101 -101
- package/skills/meta/performance/SKILL.md +130 -130
- package/skills/meta/react-patterns/SKILL.md +83 -83
- package/skills/meta/security/SKILL.md +114 -114
- package/skills/meta/session-resume/SKILL.md +96 -96
- package/skills/meta/tailwind/SKILL.md +139 -139
- package/skills/meta/testing/SKILL.md +43 -43
- package/skills/meta/testing/references/vitest-patterns.md +45 -45
- package/skills/meta/testing/templates/component-test.template.tsx +37 -37
- package/skills/tech/alpha-vantage/SKILL.md +142 -142
- package/skills/tech/alpha-vantage/references/commodities.md +153 -153
- package/skills/tech/alpha-vantage/references/economic-indicators.md +158 -158
- package/skills/tech/alpha-vantage/references/forex-crypto.md +154 -154
- package/skills/tech/alpha-vantage/references/fundamentals.md +223 -223
- package/skills/tech/alpha-vantage/references/intelligence.md +138 -138
- package/skills/tech/alpha-vantage/references/options.md +93 -93
- package/skills/tech/alpha-vantage/references/technical-indicators.md +374 -374
- package/skills/tech/alpha-vantage/references/time-series.md +157 -157
- package/skills/tech/financial-modeling/SKILL.md +18 -18
- package/skills/tech/financial-modeling/skills/3-statements/SKILL.md +368 -368
- package/skills/tech/financial-modeling/skills/3-statements/references/formatting.md +118 -118
- package/skills/tech/financial-modeling/skills/3-statements/references/formulas.md +292 -292
- package/skills/tech/financial-modeling/skills/3-statements/references/sec-filings.md +125 -125
- package/skills/tech/financial-modeling/skills/dcf-model/SKILL.md +1210 -1210
- package/skills/tech/financial-modeling/skills/dcf-model/TROUBLESHOOTING.md +40 -40
- package/skills/tech/financial-modeling/skills/dcf-model/requirements.txt +8 -8
- package/skills/tech/financial-modeling/skills/dcf-model/scripts/validate_dcf.py +292 -292
- package/skills/tech/financial-modeling/skills/lbo-model/SKILL.md +236 -236
- package/skills/tech/financial-modeling/skills/merger-model/SKILL.md +108 -108
- package/skills/workflows/README.md +203 -203
- package/skills/workflows/adr.md +174 -174
- package/skills/workflows/changelog.md +74 -74
- package/skills/workflows/compound.md +323 -323
- package/skills/workflows/compound_health.md +74 -74
- package/skills/workflows/create-agent-skill.md +138 -138
- package/skills/workflows/cycle.md +144 -144
- package/skills/workflows/deploy-docs.md +84 -84
- package/skills/workflows/development-rules.md +42 -42
- package/skills/workflows/doc.md +95 -95
- package/skills/workflows/documentation-management.md +34 -34
- package/skills/workflows/explore.md +146 -146
- package/skills/workflows/generate_command.md +106 -106
- package/skills/workflows/heal-skill.md +97 -97
- package/skills/workflows/housekeeping.md +229 -229
- package/skills/workflows/kit-setup.md +102 -102
- package/skills/workflows/map-codebase.md +78 -78
- package/skills/workflows/orchestration-protocol.md +43 -43
- package/skills/workflows/plan-compound.md +439 -439
- package/skills/workflows/plan_review.md +269 -269
- package/skills/workflows/primary-workflow.md +37 -37
- package/skills/workflows/promote_pattern.md +86 -86
- package/skills/workflows/release-docs.md +82 -82
- package/skills/workflows/report-bug.md +135 -135
- package/skills/workflows/reproduce-bug.md +118 -118
- package/skills/workflows/resolve_pr.md +133 -133
- package/skills/workflows/resolve_todo.md +128 -128
- package/skills/workflows/review-compound.md +376 -376
- package/skills/workflows/skill-review.md +127 -127
- package/skills/workflows/specs.md +257 -257
- package/skills/workflows/triage-sprint.md +102 -102
- package/skills/workflows/triage.md +152 -152
- package/skills/workflows/work.md +399 -399
- package/skills/workflows/xcode-test.md +93 -93
|
@@ -1,376 +1,376 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: (Compound) Perform comprehensive multi-pass code review with security, performance, and architecture checks.
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# /review-compound - Comprehensive Code Review
|
|
6
|
-
|
|
7
|
-
Perform exhaustive code reviews using multi-perspective analysis to catch issues before they ship.
|
|
8
|
-
|
|
9
|
-
> **Sequential Review:** Unlike parallel agent systems, this review runs sequentially through each review perspective. Focus on depth over breadth.
|
|
10
|
-
>
|
|
11
|
-
> **Note:** This is the Compound version with multi-pass review. For quick review, use `/review`.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## When To Use
|
|
15
|
-
|
|
16
|
-
- Before merging any PR
|
|
17
|
-
- Self-review before pushing
|
|
18
|
-
- After `/work` completion
|
|
19
|
-
- When reviewing others' code
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## Workflow
|
|
24
|
-
|
|
25
|
-
### Step -1: Resume Context (If New Session)
|
|
26
|
-
|
|
27
|
-
> [!CAUTION]
|
|
28
|
-
> **BLOCKING STEP.** If this is a NEW CONVERSATION, follow the session-resume skill first.
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
cat skills/session-resume/SKILL.md
|
|
32
|
-
Call MCP `call_tool_logger_manager` { action: "logSkill", name: "session-resume", outcome: "workflow" }
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### Step 0: Load Code Review Skill (MANDATORY)
|
|
36
|
-
|
|
37
|
-
> [!TIP]
|
|
38
|
-
> Use the **code-review skill** for checklists, security guards, and reference patterns.
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
# Data collection
|
|
42
|
-
Call MCP `call_tool_logger_manager` { action: "logWorkflow", name: "/review", outcome: "success" }
|
|
43
|
-
|
|
44
|
-
cat skills/code-review/SKILL.md
|
|
45
|
-
Call MCP `call_tool_logger_manager` { action: "logSkill", name: "code-review", outcome: "workflow" }
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
### Step 1: Determine Review Target
|
|
49
|
-
|
|
50
|
-
**Identify what to review:**
|
|
51
|
-
|
|
52
|
-
| Input | Action |
|
|
53
|
-
|-------|--------|
|
|
54
|
-
| PR number | `gh pr view {number} --json title,body,files` |
|
|
55
|
-
| GitHub URL | Extract PR number, fetch metadata |
|
|
56
|
-
| Branch name | `git diff main...{branch}` |
|
|
57
|
-
| Empty | Review current branch vs main |
|
|
58
|
-
|
|
59
|
-
**Setup:**
|
|
60
|
-
```bash
|
|
61
|
-
# If reviewing a PR, checkout the branch
|
|
62
|
-
gh pr checkout {PR_NUMBER}
|
|
63
|
-
|
|
64
|
-
# Or compare current branch
|
|
65
|
-
git diff main --stat
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
### Step 2: Gather Context
|
|
69
|
-
|
|
70
|
-
Before reviewing, understand:
|
|
71
|
-
|
|
72
|
-
- [ ] **What changed:** Files modified, lines added/removed
|
|
73
|
-
- [ ] **Why it changed:** PR description, linked issues
|
|
74
|
-
- [ ] **What's affected:** Dependencies, downstream code
|
|
75
|
-
|
|
76
|
-
**Prior Knowledge Check:**
|
|
77
|
-
> Use search to find similar past issues or patterns.
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
Call MCP `call_tool_compound_manager` { action: "search", terms: [ "{change type or component keywords}"] }
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
```bash
|
|
84
|
-
# View changed files
|
|
85
|
-
git diff main --name-only
|
|
86
|
-
|
|
87
|
-
# View detailed changes
|
|
88
|
-
git diff main
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
### Step 3: Sequential Review Passes
|
|
92
|
-
|
|
93
|
-
Run through each review perspective sequentially:
|
|
94
|
-
|
|
95
|
-
---
|
|
96
|
-
|
|
97
|
-
#### Pass 1: 🔒 Security Review
|
|
98
|
-
|
|
99
|
-
**Action:** Perform a comprehensive security review utilizing `@mcp:superkit` security analysis capabilities.
|
|
100
|
-
|
|
101
|
-
- [ ] Use `@mcp:superkit` to execute a security audit on the modified files to check for vulnerabilities.
|
|
102
|
-
- [ ] Have you verified there are NO hardcoded secrets?
|
|
103
|
-
- [ ] Have you verified Auth guards and Access Controls?
|
|
104
|
-
- [ ] If vulnerabilities are found, produce a structured report and actionable recommendations assigning severity using the Security Severity Assessment rubric.
|
|
105
|
-
|
|
106
|
-
```bash
|
|
107
|
-
# Optional manual fallback if @mcp:superkit tools are unavailable for specific checks
|
|
108
|
-
grep -rn "eval\|exec\|dangerouslySetInnerHTML" --include="*.ts" --include="*.js" src/
|
|
109
|
-
grep -rn "password\|secret\|api_key" --include="*.ts" --include="*.js" src/
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
---
|
|
113
|
-
|
|
114
|
-
#### Pass 2: ⚡ Performance Review
|
|
115
|
-
|
|
116
|
-
Check for:
|
|
117
|
-
- [ ] Unnecessary re-renders
|
|
118
|
-
- [ ] N+1 queries
|
|
119
|
-
- [ ] Large bundle sizes
|
|
120
|
-
|
|
121
|
-
```bash
|
|
122
|
-
# Look for loop patterns with async calls
|
|
123
|
-
grep -rn "forEach.*await\|map.*await" --include="*.ts" src/
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
---
|
|
127
|
-
|
|
128
|
-
#### Pass 3: 🏛️ Architecture & Visual Review
|
|
129
|
-
|
|
130
|
-
Check structural integrity and visual communication:
|
|
131
|
-
|
|
132
|
-
- [ ] **Single Responsibility:** Each function does one thing?
|
|
133
|
-
- [ ] **Dependencies:** Proper layering? No circular deps?
|
|
134
|
-
- [ ] **Schematics:** Are complex workflows visually documented (mermaid/diagrams)?
|
|
135
|
-
- [ ] **Naming:** Clear, consistent naming?
|
|
136
|
-
- [ ] **Patterns:** Following project conventions?
|
|
137
|
-
- [ ] **Tests:** Adequate test coverage?
|
|
138
|
-
|
|
139
|
-
---
|
|
140
|
-
|
|
141
|
-
#### Pass 4: 💾 Data Integrity Review
|
|
142
|
-
|
|
143
|
-
Check database and data handling:
|
|
144
|
-
|
|
145
|
-
- [ ] **Migrations:** Reversible? Production-safe?
|
|
146
|
-
- [ ] **Transactions:** Multi-step ops wrapped?
|
|
147
|
-
- [ ] **Constraints:** Foreign keys, unique constraints?
|
|
148
|
-
- [ ] **Nullability:** Null cases handled?
|
|
149
|
-
|
|
150
|
-
---
|
|
151
|
-
|
|
152
|
-
#### Pass 5: 🎯 Simplicity Review
|
|
153
|
-
|
|
154
|
-
Check for unnecessary complexity:
|
|
155
|
-
|
|
156
|
-
- [ ] **YAGNI:** Features not needed yet?
|
|
157
|
-
- [ ] **Dead Code:** Unused imports, functions?
|
|
158
|
-
- [ ] **Over-Engineering:** Simpler solution exists?
|
|
159
|
-
- [ ] **Duplication:** Code that should be extracted?
|
|
160
|
-
|
|
161
|
-
---
|
|
162
|
-
|
|
163
|
-
#### Pass 6: 🔬 Algorithmic & State Rigor (Scientific Review)
|
|
164
|
-
|
|
165
|
-
Apply rigorous scientific evaluation to the core logic:
|
|
166
|
-
|
|
167
|
-
- [ ] **Circular Logic Check:** Are conclusions/states derived independently?
|
|
168
|
-
- [ ] **Control Variables:** Are side-effects properly controlled/isolated?
|
|
169
|
-
- [ ] **Statistical/Algorithmic Soundness:** Are the algorithms appropriate for the scale? Are edge-cases proven handled?
|
|
170
|
-
- [ ] **Reproducibility:** If this fails in production, is there enough logging to perfectly reproduce the state?
|
|
171
|
-
|
|
172
|
-
---
|
|
173
|
-
|
|
174
|
-
### Step 4: Stakeholder Perspective Analysis
|
|
175
|
-
|
|
176
|
-
Think through each stakeholder's view:
|
|
177
|
-
|
|
178
|
-
| Stakeholder | Key Questions |
|
|
179
|
-
|-------------|---------------|
|
|
180
|
-
| **Developer** | Is this easy to understand/modify? Can I test this? |
|
|
181
|
-
| **Operations** | How do I deploy safely? What metrics available? |
|
|
182
|
-
| **End User** | Is it intuitive? Good error messages? |
|
|
183
|
-
| **Security** | What's the attack surface? Data protected? |
|
|
184
|
-
| **Business** | Does this solve the problem? Any risks? |
|
|
185
|
-
|
|
186
|
-
### Step 5: Scenario Exploration
|
|
187
|
-
|
|
188
|
-
Test mental models against edge cases:
|
|
189
|
-
|
|
190
|
-
- [ ] **Happy Path:** Normal operation works?
|
|
191
|
-
- [ ] **Invalid Inputs:** Handles null, empty, malformed?
|
|
192
|
-
- [ ] **Boundary Conditions:** Min/max values?
|
|
193
|
-
- [ ] **Concurrent Access:** Race conditions?
|
|
194
|
-
- [ ] **Failures:** Network issues, timeouts?
|
|
195
|
-
|
|
196
|
-
### Step 6: Synthesize Findings
|
|
197
|
-
|
|
198
|
-
Categorize all findings by severity:
|
|
199
|
-
|
|
200
|
-
**🔴 P1 - Critical (Must fix before merge):**
|
|
201
|
-
- Security vulnerabilities
|
|
202
|
-
- Data loss risks
|
|
203
|
-
- Breaking changes without migration
|
|
204
|
-
|
|
205
|
-
**🟡 P2 - Important (Should fix):**
|
|
206
|
-
- Performance issues
|
|
207
|
-
- Missing error handling
|
|
208
|
-
- Test coverage gaps
|
|
209
|
-
|
|
210
|
-
**🔵 P3 - Nice to Have (Consider for follow-up):**
|
|
211
|
-
- Style improvements
|
|
212
|
-
- Minor refactors
|
|
213
|
-
- Documentation updates
|
|
214
|
-
- Changelog entry missing (run `npm run changelog:gen`)
|
|
215
|
-
|
|
216
|
-
### Step 7: Create Actionable Todos & Capture Deferred Work
|
|
217
|
-
|
|
218
|
-
For each P1/P2 finding, create a todo.
|
|
219
|
-
|
|
220
|
-
**Crucially, capture DEFERRED WORK here:**
|
|
221
|
-
- [ ] Are there P3 items we decided not to do now?
|
|
222
|
-
- [ ] Did we reject alternatives that have future value?
|
|
223
|
-
- [ ] Are there implementation tasks left over from `/work`?
|
|
224
|
-
|
|
225
|
-
> [!IMPORTANT]
|
|
226
|
-
> **Single Source of Truth.** If you close/reject a PR or defer work for later, that work **must** become a todo file NOW. Do not rely on capturing it later in `/compound`.
|
|
227
|
-
|
|
228
|
-
```bash
|
|
229
|
-
# Create todos using the centralized generator
|
|
230
|
-
Call MCP `call_tool_todo_manager` { action: "create", priority: "p1", title: "Security: SQL Injection in User Query", description: "TODO description" }
|
|
231
|
-
"Raw user input is used in database query at src/api/users.ts:45. This enables potential SQL injection attacks allowing unauthorized data access." \
|
|
232
|
-
"Replace raw query with parameterized version" \
|
|
233
|
-
"Add input validation" \
|
|
234
|
-
"Add test case for injection attempt"
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
### Step 8: Generate Review Summary
|
|
238
|
-
|
|
239
|
-
```markdown
|
|
240
|
-
## Peer Review Report: {PR Title}
|
|
241
|
-
|
|
242
|
-
**Reviewed:** {date}
|
|
243
|
-
**Files Changed:** {count}
|
|
244
|
-
**Lines:** +{added} / -{removed}
|
|
245
|
-
|
|
246
|
-
### Summary Statement
|
|
247
|
-
Provide a concise overall assessment containing:
|
|
248
|
-
- Brief synopsis of the changes
|
|
249
|
-
- Overall recommendation (APPROVE, REQUEST_CHANGES, NEEDS_DISCUSSION)
|
|
250
|
-
- Key strengths
|
|
251
|
-
- Key weaknesses
|
|
252
|
-
|
|
253
|
-
### Major Comments (Critical/P1)
|
|
254
|
-
Critical flaws that must be addressed (security, architectural errors, data loss):
|
|
255
|
-
- 1. {Finding 1} - *Suggested fix*
|
|
256
|
-
- 2. {Finding 2} - *Suggested fix*
|
|
257
|
-
|
|
258
|
-
### Minor Comments (P2/P3)
|
|
259
|
-
Important to Nice-to-Have improvements (performance, conventions, dead code):
|
|
260
|
-
- 1. {Finding 1} - *Suggested fix*
|
|
261
|
-
- 2. {Finding 2} - *Suggested fix*
|
|
262
|
-
|
|
263
|
-
### Questions for Author
|
|
264
|
-
Requests for clarification, unstated assumptions, or missing reproduction steps:
|
|
265
|
-
- 1. Why was {approach} chosen over {alternative}?
|
|
266
|
-
- 2. How are we handling {edge case} in {file}?
|
|
267
|
-
|
|
268
|
-
### Next Steps
|
|
269
|
-
- [ ] Address Major Comments
|
|
270
|
-
- [ ] Answer Questions
|
|
271
|
-
- [ ] Create follow-up issues for Minor Comments (if deferred)
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
### Step 9: Offer Next Actions
|
|
275
|
-
|
|
276
|
-
```
|
|
277
|
-
✓ Review complete
|
|
278
|
-
|
|
279
|
-
Findings: {P1_count} critical, {P2_count} important, {P3_count} nice-to-have
|
|
280
|
-
|
|
281
|
-
What's next?
|
|
282
|
-
1. Address findings - Fix critical issues first
|
|
283
|
-
2. Approve - No blocking issues found
|
|
284
|
-
3. Create follow-up issues - For P3 items
|
|
285
|
-
4. Document learnings - Run /compound if found interesting patterns
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
### Step 10: Compound Learning
|
|
289
|
-
|
|
290
|
-
Before closing the review, ask yourself:
|
|
291
|
-
|
|
292
|
-
- Did you discover a reusable pattern?
|
|
293
|
-
- Did you find a non-obvious solution?
|
|
294
|
-
- Would this help future agents/developers?
|
|
295
|
-
|
|
296
|
-
If **yes** to any → Run `/compound` to document the learning.
|
|
297
|
-
|
|
298
|
-
**See also:** `skills/compound-docs/SKILL.md` for pattern promotion guidelines.
|
|
299
|
-
|
|
300
|
-
> [!TIP]
|
|
301
|
-
> Reviews often surface insights that aren't captured in the code itself. Don't let them evaporate.
|
|
302
|
-
|
|
303
|
-
### Step 11: Final Validation Gate
|
|
304
|
-
|
|
305
|
-
> [!CAUTION]
|
|
306
|
-
> **Do not skip.**
|
|
307
|
-
|
|
308
|
-
Before closing, run:
|
|
309
|
-
```bash
|
|
310
|
-
Call MCP `call_tool_compound_manager` { action: "validate" }
|
|
311
|
-
```
|
|
312
|
-
|
|
313
|
-
- [ ] Script passed?
|
|
314
|
-
- [ ] Deferred work converted to todos?
|
|
315
|
-
|
|
316
|
-
---
|
|
317
|
-
|
|
318
|
-
## Quality Guidelines
|
|
319
|
-
|
|
320
|
-
**Thorough reviews:**
|
|
321
|
-
- ✅ Check every changed file
|
|
322
|
-
- ✅ Think about edge cases
|
|
323
|
-
- ✅ Consider the broader system
|
|
324
|
-
- ✅ Provide actionable feedback
|
|
325
|
-
|
|
326
|
-
**Avoid:**
|
|
327
|
-
- ❌ Rubber-stamping without reading
|
|
328
|
-
- ❌ Style-only feedback
|
|
329
|
-
- ❌ Vague comments ("this could be better")
|
|
330
|
-
- ❌ Missing the forest for the trees
|
|
331
|
-
|
|
332
|
-
---
|
|
333
|
-
|
|
334
|
-
## References
|
|
335
|
-
|
|
336
|
-
- Create todos: `todos/` directory
|
|
337
|
-
- Document patterns: `/compound`
|
|
338
|
-
- Execute fixes: `/work`
|
|
339
|
-
|
|
340
|
-
---
|
|
341
|
-
|
|
342
|
-
### Phase 5: Completion & Handoff
|
|
343
|
-
|
|
344
|
-
#### Step 1: Establish Terminal UI State
|
|
345
|
-
|
|
346
|
-
> [!IMPORTANT]
|
|
347
|
-
> **Visual Completion Signal**
|
|
348
|
-
> Call `task_boundary` one last time to signal completion in the user's UI. This prevents the "task" from appearing active after you've finished.
|
|
349
|
-
|
|
350
|
-
```javascript
|
|
351
|
-
await task_boundary({
|
|
352
|
-
TaskName: "[COMPLETED] Review: {PR Title / Target}",
|
|
353
|
-
TaskStatus: "Review complete. Findings categorized. Offering next steps.",
|
|
354
|
-
Mode: "VERIFICATION",
|
|
355
|
-
TaskSummary: "Completed comprehensive review. Identified {P1_count} critical, {P2_count} important, and {P3_count} nice-to-have items."
|
|
356
|
-
});
|
|
357
|
-
```
|
|
358
|
-
|
|
359
|
-
#### Step 2: Mandatory Handoff
|
|
360
|
-
|
|
361
|
-
> [!IMPORTANT]
|
|
362
|
-
> **Exit Transition**
|
|
363
|
-
> Do not stop here. Choose your next move based on the review outcome.
|
|
364
|
-
|
|
365
|
-
```bash
|
|
366
|
-
✓ Review complete
|
|
367
|
-
|
|
368
|
-
Findings: {P1_count} critical, {P2_count} important, {P3_count} nice-to-have
|
|
369
|
-
|
|
370
|
-
Next steps:
|
|
371
|
-
1. /triage - Prioritize and plan fixes for P1/P2 findings
|
|
372
|
-
2. /work - Start implementing immediate fixes (Self-Review)
|
|
373
|
-
3. /housekeeping - Cleanup and archive if no immediate work remains
|
|
374
|
-
4. /compound - Document interesting patterns/solutions discovered
|
|
375
|
-
```
|
|
376
|
-
|
|
1
|
+
---
|
|
2
|
+
description: (Compound) Perform comprehensive multi-pass code review with security, performance, and architecture checks.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /review-compound - Comprehensive Code Review
|
|
6
|
+
|
|
7
|
+
Perform exhaustive code reviews using multi-perspective analysis to catch issues before they ship.
|
|
8
|
+
|
|
9
|
+
> **Sequential Review:** Unlike parallel agent systems, this review runs sequentially through each review perspective. Focus on depth over breadth.
|
|
10
|
+
>
|
|
11
|
+
> **Note:** This is the Compound version with multi-pass review. For quick review, use `/review`.
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## When To Use
|
|
15
|
+
|
|
16
|
+
- Before merging any PR
|
|
17
|
+
- Self-review before pushing
|
|
18
|
+
- After `/work` completion
|
|
19
|
+
- When reviewing others' code
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Workflow
|
|
24
|
+
|
|
25
|
+
### Step -1: Resume Context (If New Session)
|
|
26
|
+
|
|
27
|
+
> [!CAUTION]
|
|
28
|
+
> **BLOCKING STEP.** If this is a NEW CONVERSATION, follow the session-resume skill first.
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
cat skills/session-resume/SKILL.md
|
|
32
|
+
Call MCP `call_tool_logger_manager` { action: "logSkill", name: "session-resume", outcome: "workflow" }
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Step 0: Load Code Review Skill (MANDATORY)
|
|
36
|
+
|
|
37
|
+
> [!TIP]
|
|
38
|
+
> Use the **code-review skill** for checklists, security guards, and reference patterns.
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# Data collection
|
|
42
|
+
Call MCP `call_tool_logger_manager` { action: "logWorkflow", name: "/review", outcome: "success" }
|
|
43
|
+
|
|
44
|
+
cat skills/code-review/SKILL.md
|
|
45
|
+
Call MCP `call_tool_logger_manager` { action: "logSkill", name: "code-review", outcome: "workflow" }
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Step 1: Determine Review Target
|
|
49
|
+
|
|
50
|
+
**Identify what to review:**
|
|
51
|
+
|
|
52
|
+
| Input | Action |
|
|
53
|
+
|-------|--------|
|
|
54
|
+
| PR number | `gh pr view {number} --json title,body,files` |
|
|
55
|
+
| GitHub URL | Extract PR number, fetch metadata |
|
|
56
|
+
| Branch name | `git diff main...{branch}` |
|
|
57
|
+
| Empty | Review current branch vs main |
|
|
58
|
+
|
|
59
|
+
**Setup:**
|
|
60
|
+
```bash
|
|
61
|
+
# If reviewing a PR, checkout the branch
|
|
62
|
+
gh pr checkout {PR_NUMBER}
|
|
63
|
+
|
|
64
|
+
# Or compare current branch
|
|
65
|
+
git diff main --stat
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Step 2: Gather Context
|
|
69
|
+
|
|
70
|
+
Before reviewing, understand:
|
|
71
|
+
|
|
72
|
+
- [ ] **What changed:** Files modified, lines added/removed
|
|
73
|
+
- [ ] **Why it changed:** PR description, linked issues
|
|
74
|
+
- [ ] **What's affected:** Dependencies, downstream code
|
|
75
|
+
|
|
76
|
+
**Prior Knowledge Check:**
|
|
77
|
+
> Use search to find similar past issues or patterns.
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
Call MCP `call_tool_compound_manager` { action: "search", terms: [ "{change type or component keywords}"] }
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# View changed files
|
|
85
|
+
git diff main --name-only
|
|
86
|
+
|
|
87
|
+
# View detailed changes
|
|
88
|
+
git diff main
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Step 3: Sequential Review Passes
|
|
92
|
+
|
|
93
|
+
Run through each review perspective sequentially:
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
#### Pass 1: 🔒 Security Review
|
|
98
|
+
|
|
99
|
+
**Action:** Perform a comprehensive security review utilizing `@mcp:superkit` security analysis capabilities.
|
|
100
|
+
|
|
101
|
+
- [ ] Use `@mcp:superkit` to execute a security audit on the modified files to check for vulnerabilities.
|
|
102
|
+
- [ ] Have you verified there are NO hardcoded secrets?
|
|
103
|
+
- [ ] Have you verified Auth guards and Access Controls?
|
|
104
|
+
- [ ] If vulnerabilities are found, produce a structured report and actionable recommendations assigning severity using the Security Severity Assessment rubric.
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# Optional manual fallback if @mcp:superkit tools are unavailable for specific checks
|
|
108
|
+
grep -rn "eval\|exec\|dangerouslySetInnerHTML" --include="*.ts" --include="*.js" src/
|
|
109
|
+
grep -rn "password\|secret\|api_key" --include="*.ts" --include="*.js" src/
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
#### Pass 2: ⚡ Performance Review
|
|
115
|
+
|
|
116
|
+
Check for:
|
|
117
|
+
- [ ] Unnecessary re-renders
|
|
118
|
+
- [ ] N+1 queries
|
|
119
|
+
- [ ] Large bundle sizes
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
# Look for loop patterns with async calls
|
|
123
|
+
grep -rn "forEach.*await\|map.*await" --include="*.ts" src/
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
#### Pass 3: 🏛️ Architecture & Visual Review
|
|
129
|
+
|
|
130
|
+
Check structural integrity and visual communication:
|
|
131
|
+
|
|
132
|
+
- [ ] **Single Responsibility:** Each function does one thing?
|
|
133
|
+
- [ ] **Dependencies:** Proper layering? No circular deps?
|
|
134
|
+
- [ ] **Schematics:** Are complex workflows visually documented (mermaid/diagrams)?
|
|
135
|
+
- [ ] **Naming:** Clear, consistent naming?
|
|
136
|
+
- [ ] **Patterns:** Following project conventions?
|
|
137
|
+
- [ ] **Tests:** Adequate test coverage?
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
#### Pass 4: 💾 Data Integrity Review
|
|
142
|
+
|
|
143
|
+
Check database and data handling:
|
|
144
|
+
|
|
145
|
+
- [ ] **Migrations:** Reversible? Production-safe?
|
|
146
|
+
- [ ] **Transactions:** Multi-step ops wrapped?
|
|
147
|
+
- [ ] **Constraints:** Foreign keys, unique constraints?
|
|
148
|
+
- [ ] **Nullability:** Null cases handled?
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
#### Pass 5: 🎯 Simplicity Review
|
|
153
|
+
|
|
154
|
+
Check for unnecessary complexity:
|
|
155
|
+
|
|
156
|
+
- [ ] **YAGNI:** Features not needed yet?
|
|
157
|
+
- [ ] **Dead Code:** Unused imports, functions?
|
|
158
|
+
- [ ] **Over-Engineering:** Simpler solution exists?
|
|
159
|
+
- [ ] **Duplication:** Code that should be extracted?
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
#### Pass 6: 🔬 Algorithmic & State Rigor (Scientific Review)
|
|
164
|
+
|
|
165
|
+
Apply rigorous scientific evaluation to the core logic:
|
|
166
|
+
|
|
167
|
+
- [ ] **Circular Logic Check:** Are conclusions/states derived independently?
|
|
168
|
+
- [ ] **Control Variables:** Are side-effects properly controlled/isolated?
|
|
169
|
+
- [ ] **Statistical/Algorithmic Soundness:** Are the algorithms appropriate for the scale? Are edge-cases proven handled?
|
|
170
|
+
- [ ] **Reproducibility:** If this fails in production, is there enough logging to perfectly reproduce the state?
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
### Step 4: Stakeholder Perspective Analysis
|
|
175
|
+
|
|
176
|
+
Think through each stakeholder's view:
|
|
177
|
+
|
|
178
|
+
| Stakeholder | Key Questions |
|
|
179
|
+
|-------------|---------------|
|
|
180
|
+
| **Developer** | Is this easy to understand/modify? Can I test this? |
|
|
181
|
+
| **Operations** | How do I deploy safely? What metrics available? |
|
|
182
|
+
| **End User** | Is it intuitive? Good error messages? |
|
|
183
|
+
| **Security** | What's the attack surface? Data protected? |
|
|
184
|
+
| **Business** | Does this solve the problem? Any risks? |
|
|
185
|
+
|
|
186
|
+
### Step 5: Scenario Exploration
|
|
187
|
+
|
|
188
|
+
Test mental models against edge cases:
|
|
189
|
+
|
|
190
|
+
- [ ] **Happy Path:** Normal operation works?
|
|
191
|
+
- [ ] **Invalid Inputs:** Handles null, empty, malformed?
|
|
192
|
+
- [ ] **Boundary Conditions:** Min/max values?
|
|
193
|
+
- [ ] **Concurrent Access:** Race conditions?
|
|
194
|
+
- [ ] **Failures:** Network issues, timeouts?
|
|
195
|
+
|
|
196
|
+
### Step 6: Synthesize Findings
|
|
197
|
+
|
|
198
|
+
Categorize all findings by severity:
|
|
199
|
+
|
|
200
|
+
**🔴 P1 - Critical (Must fix before merge):**
|
|
201
|
+
- Security vulnerabilities
|
|
202
|
+
- Data loss risks
|
|
203
|
+
- Breaking changes without migration
|
|
204
|
+
|
|
205
|
+
**🟡 P2 - Important (Should fix):**
|
|
206
|
+
- Performance issues
|
|
207
|
+
- Missing error handling
|
|
208
|
+
- Test coverage gaps
|
|
209
|
+
|
|
210
|
+
**🔵 P3 - Nice to Have (Consider for follow-up):**
|
|
211
|
+
- Style improvements
|
|
212
|
+
- Minor refactors
|
|
213
|
+
- Documentation updates
|
|
214
|
+
- Changelog entry missing (run `npm run changelog:gen`)
|
|
215
|
+
|
|
216
|
+
### Step 7: Create Actionable Todos & Capture Deferred Work
|
|
217
|
+
|
|
218
|
+
For each P1/P2 finding, create a todo.
|
|
219
|
+
|
|
220
|
+
**Crucially, capture DEFERRED WORK here:**
|
|
221
|
+
- [ ] Are there P3 items we decided not to do now?
|
|
222
|
+
- [ ] Did we reject alternatives that have future value?
|
|
223
|
+
- [ ] Are there implementation tasks left over from `/work`?
|
|
224
|
+
|
|
225
|
+
> [!IMPORTANT]
|
|
226
|
+
> **Single Source of Truth.** If you close/reject a PR or defer work for later, that work **must** become a todo file NOW. Do not rely on capturing it later in `/compound`.
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
# Create todos using the centralized generator
|
|
230
|
+
Call MCP `call_tool_todo_manager` { action: "create", priority: "p1", title: "Security: SQL Injection in User Query", description: "TODO description" }
|
|
231
|
+
"Raw user input is used in database query at src/api/users.ts:45. This enables potential SQL injection attacks allowing unauthorized data access." \
|
|
232
|
+
"Replace raw query with parameterized version" \
|
|
233
|
+
"Add input validation" \
|
|
234
|
+
"Add test case for injection attempt"
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### Step 8: Generate Review Summary
|
|
238
|
+
|
|
239
|
+
```markdown
|
|
240
|
+
## Peer Review Report: {PR Title}
|
|
241
|
+
|
|
242
|
+
**Reviewed:** {date}
|
|
243
|
+
**Files Changed:** {count}
|
|
244
|
+
**Lines:** +{added} / -{removed}
|
|
245
|
+
|
|
246
|
+
### Summary Statement
|
|
247
|
+
Provide a concise overall assessment containing:
|
|
248
|
+
- Brief synopsis of the changes
|
|
249
|
+
- Overall recommendation (APPROVE, REQUEST_CHANGES, NEEDS_DISCUSSION)
|
|
250
|
+
- Key strengths
|
|
251
|
+
- Key weaknesses
|
|
252
|
+
|
|
253
|
+
### Major Comments (Critical/P1)
|
|
254
|
+
Critical flaws that must be addressed (security, architectural errors, data loss):
|
|
255
|
+
- 1. {Finding 1} - *Suggested fix*
|
|
256
|
+
- 2. {Finding 2} - *Suggested fix*
|
|
257
|
+
|
|
258
|
+
### Minor Comments (P2/P3)
|
|
259
|
+
Important to Nice-to-Have improvements (performance, conventions, dead code):
|
|
260
|
+
- 1. {Finding 1} - *Suggested fix*
|
|
261
|
+
- 2. {Finding 2} - *Suggested fix*
|
|
262
|
+
|
|
263
|
+
### Questions for Author
|
|
264
|
+
Requests for clarification, unstated assumptions, or missing reproduction steps:
|
|
265
|
+
- 1. Why was {approach} chosen over {alternative}?
|
|
266
|
+
- 2. How are we handling {edge case} in {file}?
|
|
267
|
+
|
|
268
|
+
### Next Steps
|
|
269
|
+
- [ ] Address Major Comments
|
|
270
|
+
- [ ] Answer Questions
|
|
271
|
+
- [ ] Create follow-up issues for Minor Comments (if deferred)
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
### Step 9: Offer Next Actions
|
|
275
|
+
|
|
276
|
+
```
|
|
277
|
+
✓ Review complete
|
|
278
|
+
|
|
279
|
+
Findings: {P1_count} critical, {P2_count} important, {P3_count} nice-to-have
|
|
280
|
+
|
|
281
|
+
What's next?
|
|
282
|
+
1. Address findings - Fix critical issues first
|
|
283
|
+
2. Approve - No blocking issues found
|
|
284
|
+
3. Create follow-up issues - For P3 items
|
|
285
|
+
4. Document learnings - Run /compound if found interesting patterns
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
### Step 10: Compound Learning
|
|
289
|
+
|
|
290
|
+
Before closing the review, ask yourself:
|
|
291
|
+
|
|
292
|
+
- Did you discover a reusable pattern?
|
|
293
|
+
- Did you find a non-obvious solution?
|
|
294
|
+
- Would this help future agents/developers?
|
|
295
|
+
|
|
296
|
+
If **yes** to any → Run `/compound` to document the learning.
|
|
297
|
+
|
|
298
|
+
**See also:** `skills/compound-docs/SKILL.md` for pattern promotion guidelines.
|
|
299
|
+
|
|
300
|
+
> [!TIP]
|
|
301
|
+
> Reviews often surface insights that aren't captured in the code itself. Don't let them evaporate.
|
|
302
|
+
|
|
303
|
+
### Step 11: Final Validation Gate
|
|
304
|
+
|
|
305
|
+
> [!CAUTION]
|
|
306
|
+
> **Do not skip.**
|
|
307
|
+
|
|
308
|
+
Before closing, run:
|
|
309
|
+
```bash
|
|
310
|
+
Call MCP `call_tool_compound_manager` { action: "validate" }
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
- [ ] Script passed?
|
|
314
|
+
- [ ] Deferred work converted to todos?
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
## Quality Guidelines
|
|
319
|
+
|
|
320
|
+
**Thorough reviews:**
|
|
321
|
+
- ✅ Check every changed file
|
|
322
|
+
- ✅ Think about edge cases
|
|
323
|
+
- ✅ Consider the broader system
|
|
324
|
+
- ✅ Provide actionable feedback
|
|
325
|
+
|
|
326
|
+
**Avoid:**
|
|
327
|
+
- ❌ Rubber-stamping without reading
|
|
328
|
+
- ❌ Style-only feedback
|
|
329
|
+
- ❌ Vague comments ("this could be better")
|
|
330
|
+
- ❌ Missing the forest for the trees
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
## References
|
|
335
|
+
|
|
336
|
+
- Create todos: `todos/` directory
|
|
337
|
+
- Document patterns: `/compound`
|
|
338
|
+
- Execute fixes: `/work`
|
|
339
|
+
|
|
340
|
+
---
|
|
341
|
+
|
|
342
|
+
### Phase 5: Completion & Handoff
|
|
343
|
+
|
|
344
|
+
#### Step 1: Establish Terminal UI State
|
|
345
|
+
|
|
346
|
+
> [!IMPORTANT]
|
|
347
|
+
> **Visual Completion Signal**
|
|
348
|
+
> Call `task_boundary` one last time to signal completion in the user's UI. This prevents the "task" from appearing active after you've finished.
|
|
349
|
+
|
|
350
|
+
```javascript
|
|
351
|
+
await task_boundary({
|
|
352
|
+
TaskName: "[COMPLETED] Review: {PR Title / Target}",
|
|
353
|
+
TaskStatus: "Review complete. Findings categorized. Offering next steps.",
|
|
354
|
+
Mode: "VERIFICATION",
|
|
355
|
+
TaskSummary: "Completed comprehensive review. Identified {P1_count} critical, {P2_count} important, and {P3_count} nice-to-have items."
|
|
356
|
+
});
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
#### Step 2: Mandatory Handoff
|
|
360
|
+
|
|
361
|
+
> [!IMPORTANT]
|
|
362
|
+
> **Exit Transition**
|
|
363
|
+
> Do not stop here. Choose your next move based on the review outcome.
|
|
364
|
+
|
|
365
|
+
```bash
|
|
366
|
+
✓ Review complete
|
|
367
|
+
|
|
368
|
+
Findings: {P1_count} critical, {P2_count} important, {P3_count} nice-to-have
|
|
369
|
+
|
|
370
|
+
Next steps:
|
|
371
|
+
1. /triage - Prioritize and plan fixes for P1/P2 findings
|
|
372
|
+
2. /work - Start implementing immediate fixes (Self-Review)
|
|
373
|
+
3. /housekeeping - Cleanup and archive if no immediate work remains
|
|
374
|
+
4. /compound - Document interesting patterns/solutions discovered
|
|
375
|
+
```
|
|
376
|
+
|