一键导入
maestroreview
Code review for a track against its spec and plan. Verifies implementation matches requirements, checks code quality and security.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Code review for a track against its spec and plan. Verifies implementation matches requirements, checks code quality and security.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | maestro:review |
| description | Code review for a track against its spec and plan. Verifies implementation matches requirements, checks code quality and security. |
| argument-hint | [<track-name>] [--current] |
Review the implementation of a track against its specification and plan. Verifies intent match, code quality, test coverage, and security.
$ARGUMENTS
<track-name>: Match track by name or ID substring--current: Auto-select the in-progress ([~]) track--current: Find the [~] track in .maestro/tracks.mdgit diff HEADRead all track files:
.maestro/tracks/{track_id}/spec.md -- requirements to verify against.maestro/tracks/{track_id}/plan.md -- task SHAs and completion status.maestro/tracks/{track_id}/metadata.json -- track metadata.maestro/context/code_styleguides/ -- code style references (if exist).maestro/context/product-guidelines.md -- product/brand/UX guidelines (if exists)If metadata.json has beads_epic_id: use br list --status closed --parent {epic_id} --all --json and parse close_reason for SHAs (sha:{7char}). Otherwise: parse plan.md for all [x] {sha} markers.
If no SHAs found (and a track was selected): "Nothing to review." Stop.
If operating in arbitrary scope (no track), skip -- diff collected in Step 4.
# Track mode
git diff {first_sha}^..{last_sha}
# Arbitrary scope (no track)
git diff HEAD
If diff > 300 lines, offer Iterative Review Mode (per-file review).
Run all applicable checks and interpret results before manual review. Automated checks catch mechanical issues so manual review can focus on logic and design.
Detect from project config (package.json, Makefile, pyproject.toml, etc.):
CI=true {test_command} # e.g., bun test, uv run pytest, ./gradlew test
{lint_command} # e.g., eslint ., ruff check, clippy
{typecheck_command} # e.g., tsc --noEmit, mypy, cargo check
{format_check_command} # e.g., prettier --check ., ruff format --check
Run targeted checks based on which file types appear in the diff:
| File type | Check | What it catches |
|---|---|---|
.ts, .tsx | tsc --noEmit | Type errors, missing imports, incorrect generics |
.ts, .tsx | eslint --no-warn-ignored {files} | Lint violations, unused vars, style drift |
.py | ruff check {files} | Lint, import order, complexity |
.py | mypy {files} | Type errors, None handling |
.rs | cargo check | Borrow checker, lifetime errors |
.rs | cargo clippy -- -D warnings | Idiomatic Rust violations |
.go | go vet ./... | Suspicious constructs |
.go | staticcheck ./... | Bug-prone patterns |
.java | ./gradlew check or ./mvnw verify | Compile errors, checkstyle |
.json | Validate with jq . < file > /dev/null | Syntax errors |
.yaml, .yml | Validate with language-appropriate parser | Syntax errors, indentation |
Dockerfile | hadolint (if available) | Best practice violations |
.sql | sqlfluff lint (if available) | SQL anti-patterns |
For each check, report:
[ok] TypeScript: 0 errors
[!] ESLint: 3 errors in 2 files (2 auto-fixable)
[ok] Tests: 47 passed, 0 failed
[--] Format: not configured
Classification:
Auto-fixable results: If a linter reports auto-fixable issues (e.g., eslint --fix, ruff format), note the count separately. These feed into Step 8's auto-fix protocol.
Analyze the diff against 5 dimensions: intent match, code quality, test coverage, security, product guidelines.
See reference/review-dimensions.md for full criteria per dimension.
Format findings with severity ratings and checkbox verification.
See reference/report-template.md for the full report format and verdict options.
Every finding gets exactly one severity. Use these definitions consistently:
| Severity | Label | Meaning | Blocks approval? |
|---|---|---|---|
| Blocker | [!!] | Incorrect behavior, data loss risk, security vulnerability, spec violation | Yes -- must fix |
| Major | [!] | Significant quality issue, missing error handling, untested path, performance trap | Yes -- must fix or justify |
| Minor | [?] | Style inconsistency, naming, missing edge case test, documentation gap | No -- should fix |
| Nit | [.] | Formatting, subjective preference, trivial improvement | No -- optional |
Rules for severity assignment:
If verdict is not PASS, offer auto-fix options.
See reference/report-template.md for the auto-fix protocol and the boundary between auto-fixable and human-judgment issues.
Offer archive, delete, keep, or skip for the track.
See reference/report-template.md for cleanup options.
When reviewing a task completed in a worktree (common in maestro workflows):
.maestro/features/{feature}/tasks/{task}/worker-prompt.md contains the full spec the worker received.maestro/features/{feature}/tasks/{task}/report.md for the worker's self-assessmentgit diff main...{task-branch} to see only changes from this taskWhen multiple tasks are complete:
.maestro/ metadata changes (should not happen)These principles govern every review, whether track-scoped or ad-hoc.
1) Identify Scope -- List all files changed. For each file, state why it changed (what requirement it serves). Flag changes that do not map to the task/plan.
2) Plan/Task Adherence (Non-Negotiable) -- Create a checklist: what the task says must happen, evidence in code/tests that it happens. Flag missing requirements, partial implementations with no follow-up task, and behavior changes not in the plan.
3) Correctness -- Edge cases and error paths. Incorrect assumptions about inputs/types. Inconsistent behavior across platforms. Broken invariants. Prefer "fail fast, fail loud": invalid states should become clear errors, not silent fallbacks.
4) Simplicity / YAGNI -- Remove dead branches, unused flags/options, unreachable code. Remove speculative TODOs and "reserved for future" scaffolding. Inline one-off abstractions. Replace cleverness with obvious code. Reduce nesting with guard clauses / early returns. Avoid nested ternary operators; prefer if/else or switch when branches matter.
5) De-Slop Pass (AI Artifacts / Style Drift) -- Scan the diff for AI-generated slop:
as any, as unknown as X) without necessity6) Risk (Security / Performance / Maintainability) -- No secrets in code/logs. No injection vectors introduced. Authz/authn checks preserved. Avoid N+1 queries, repeated parsing, large sync operations. Clear naming, consistent error handling, API boundaries not blurred.
7) Primary Recommendation -- One clear path to reach approval. Mention alternatives only when they have materially different trade-offs.
8) Effort Estimate -- Tag required follow-up: Quick (<1h), Short (1-4h), Medium (1-2d), Large (3d+).
Task/plan adherence:
YAGNI / dead code:
AI slop / inconsistency:
as any used to silence type errors instead of fixing typesCorrectness:
Maintainability:
Files Reviewed: [list]
Plan/Task Reference: [task name + link/path to plan section if known]
Overall Assessment: [APPROVE | REQUEST_CHANGES | NEEDS_DISCUSSION]
Bottom Line: 2-3 sentences describing whether it matches the task/plan and what must change.
[Quick | Short | Medium | Large]
Use NEEDS_DISCUSSION (instead of REQUEST_CHANGES) when:
Recommended workflow:
/maestro:setup -- Scaffold project context (run first)/maestro:new-track -- Create a feature/bug track with spec and plan/maestro:implement -- Execute the implementation/maestro:review -- You are here. Verify implementation correctness/maestro:status -- Check progress across all tracks/maestro:revert -- Undo implementation if needed/maestro:note -- Capture decisions and context to persistent notepadReview works best after commits are made, as it analyzes git history to understand what was implemented. It compares the implementation against the spec from /maestro:new-track and the plan from /maestro:implement. If issues are found, use /maestro:revert to undo and re-implement, or apply fixes directly.
Remember: Good validation catches issues before they reach production. Be constructive but thorough in identifying gaps or improvements.
Use when bootstrapping, updating, or reviewing AGENTS.md — teaches what makes effective agent memory, how to structure sections, signal vs noise filtering, and when to prune stale entries
Use before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
Deep discovery and specification for ambitious features. Full BMAD-inspired interview with classification, vision, journeys, domain analysis, and FR synthesis. Same output contract (spec.md + plan.md) as a standard feature but far richer. Use for multi-component systems, regulated domains, or unclear requirements.
Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies
Use when working with Docker containers — debugging container failures, writing Dockerfiles, docker-compose for integration tests, image optimization, or deploying containerized applications