| name | code-review |
| description | Use when reviewing completed work before committing, pushing, creating a PR, or merging |
Code Review
Project-specific review workflow for Pre-Sales Agent.
Workflow
- Scope — identify all changed files with
git diff --name-only and git status --short.
- MCP isolation gate — run
npm run check:mcp-isolation.
- Checklist — review every applicable item in
references/checklist.md.
- TypeScript gate — run
npm run typecheck.
- Test gate — run
npm test.
- Build gate — run
npm run build.
- Vercel output gate — run
npm run check:vercel-output.
- Dependency audit gate — run
npm run audit:high.
- Secret scan gate — run
npm run scan:secrets.
- AI docs drift gate — run
npm run check:ai-docs.
- Lessons check — check whether the change risks any pitfall in
.ai/lessons.md.
- Output — list findings by severity.
Severity Levels
| Level | Meaning | Action |
|---|
| Critical | Security issue, data loss risk, prompt-injection regression, MCP isolation violation | Must fix before merge |
| High | Architecture violation, broken pipeline stage, wrong Pinecone/Voyage config, generated-output regression | Must fix before merge |
| Medium | Convention violation, missing test, hidden error handling, stale AI docs | Should fix |
| Low | Style, naming, local clarity issue | Optional |
Output Format
## Code Review: [scope]
### Critical
- [ ] Finding description (`file:line`)
### High
- [ ] Finding description (`file:line`)
### Medium
- [ ] Finding description (`file:line`)
### Low
- [ ] Finding description (`file:line`)
### Gates
- [ ] MCP isolation: PASS/FAIL
- [ ] TypeScript: PASS/FAIL
- [ ] Tests: PASS/FAIL
- [ ] Build: PASS/FAIL
- [ ] Vercel output: PASS/FAIL
- [ ] Dependency audit: PASS/FAIL
- [ ] Secret scan: PASS/FAIL
- [ ] AI docs drift: PASS/FAIL
- [ ] Lessons check: PASS/FAIL