From quantum-loop
Orchestrates two-stage code review: spec compliance against story acceptance criteria first, then code quality. For quantum-loop pipeline after implementation or standalone via git diffs.
npx claudepluginhub andyzengmath/quantum-loop --plugin quantum-loopThis skill uses the workspace's default tool permissions.
You orchestrate a two-stage code review. Stage 1 (spec compliance) MUST pass before Stage 2 (code quality) begins. This order is absolute.
Orchestrates multi-file code reviews at track level against spec.md or project level with uncommitted changes, file patterns, commit ranges. Runs automated validation, spec compliance, code quality stages; optional bughunt integration.
Conducts single-pass code reviews enforcing test evidence gates (e.g., passing E2E tests), spec compliance, quality checks, and confidence-based issue reporting.
Reviews code implementation against specification: checks compliance with requirements, identifies deviations, reports score, triggers evolution if needed. Use after implementation or before merging.
Share bugs, ideas, or general feedback.
You orchestrate a two-stage code review. Stage 1 (spec compliance) MUST pass before Stage 2 (code quality) begins. This order is absolute.
Code that doesn't match the spec is waste -- no matter how well-written. Checking spec compliance first prevents spending review effort on code that needs to be rewritten anyway.
Called automatically by the execution loop after a story's quality checks pass. Receives story context from quantum.json.
User invokes /quantum-loop:review directly to review recent changes.
If the user specifies a story ID, use it. Otherwise:
quantum.json -- if exists, identify the most recent in_progress storygit merge-base HEAD main
Determine BASE_SHA and HEAD_SHA for the review range.
Dispatch the spec-reviewer agent with:
Wait for the review result.
If Stage 1 PASSES:
If Stage 1 FAILS:
Only reached if Stage 1 passed.
Dispatch the quality-reviewer agent with:
Wait for the review result.
If Stage 2 PASSES:
If Stage 2 FAILS:
/quantum-loop:review after fixingPresent the combined review report:
## Review Report: [Story ID or Branch Name]
### Stage 1: Spec Compliance
**Status:** PASSED / FAILED
[If failed: list unsatisfied criteria]
[If passed: "All N acceptance criteria satisfied."]
### Stage 2: Code Quality
**Status:** PASSED / FAILED / SKIPPED (if Stage 1 failed)
**Strengths:**
- [List from quality reviewer]
**Issues:**
- [Critical] [description] -- [file:line]
- [Important] [description] -- [file:line]
- [Minor] [description] -- [file:line]
### Recommendation
[Pass / Fix and re-review / specific guidance]
This stage runs when:
/quantum-loop:ql-review --integrationCall chain tracing: For every function created by an upstream story, verify it is called (not just imported) in downstream stories.
grep -rn "function_name" --include="*.py" | grep -v testType consistency: Check that return types from upstream stories match parameter types expected downstream.
Dead code scan: Every new export must have a caller outside its own file and tests.
Import resolution: Verify every import statement resolves to an actual file/module.
python -c "import main_module" or equivalent runtime test### Stage 3: Cross-Story Integration
**Status:** PASSED / FAILED
**Call chains verified:**
- US-007 validate_plan_item() → called in pipeline.py:45 ✓
- US-008 generate_stage2() → called in pipeline.py:78 ✓
**Unwired functions:**
- US-007 validate_plan_item() → NOT called in any pipeline code ✗
Fix: Add `validated = validate_plan_item(item, schema)` to pipeline.py:52
**Type mismatches:**
- US-009 returns List[str] but US-013 expects JSON string at pipeline.py:90
| Excuse | Reality |
|---|---|
| "Skip Stage 1, the code clearly matches the spec" | You don't know until you check systematically. Run Stage 1. |
| "Skip Stage 2, it's a small change" | Small changes are where subtle bugs hide. Run Stage 2. |
| "Run both stages in parallel to save time" | Stage 2 is wasted effort if Stage 1 fails. Sequential is correct. |
| "The Critical issue isn't really critical" | If it's security, data loss, or crashes, it's Critical. Period. |
| "Three Important issues is harsh" | Quality compounds. Three Important issues signal a pattern problem. |
| "The reviewer is wrong" | Verify their claim against the code. If they're wrong, explain why with evidence. Don't dismiss. |