Skip to content

feat(skills): enhance Code Review skill with 2-stage review and MAXSIM integration#13

Open
maystudios wants to merge 1 commit intomainfrom
worktree-agent-aaf3ea1c
Open

feat(skills): enhance Code Review skill with 2-stage review and MAXSIM integration#13
maystudios wants to merge 1 commit intomainfrom
worktree-agent-aaf3ea1c

Conversation

@maystudios
Copy link
Owner

Summary

  • Add explicit 2-stage review protocol: Stage 1 (spec compliance) must pass before Stage 2 (code quality)
  • Add context: fork frontmatter for skill isolation
  • Replace minimal "In MAXSIM Plan Execution" section with comprehensive MAXSIM integration (context loading, STATE.md hooks, artifact references, push-back protocol)

Test plan

  • Unit tests pass (npx vitest run — 54 tests, 2 files)
  • Full build succeeds (npm run build)
  • Verify skill template renders correctly when loaded by Claude Code

🤖 Generated with Claude Code

…M integration

Add explicit 2-stage review protocol (Stage 1: spec compliance, Stage 2: code quality),
context: fork frontmatter, and deeper MAXSIM integration with context loading, STATE.md
hooks, artifact references, and push-back protocol.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 2, 2026 04:48
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the code-review skill template to enforce a stricter review flow and better integrate with MAXSIM plan execution artifacts.

Changes:

  • Introduces a mandatory two-stage review protocol (Stage 1: spec compliance; Stage 2: code quality).
  • Adds context: fork frontmatter for skill isolation.
  • Expands MAXSIM integration guidance (context loading, STATE.md hooks, artifact references, push-back protocol).
Comments suppressed due to low confidence (1)

templates/skills/code-review/SKILL.md:38

  • The new Stage 1/Stage 2 protocol introduces an explicit spec-compliance verdict, but the review summary/output format later in this skill does not include any field/line for Stage 1 (e.g., SPEC COMPLIANCE: PASS|GAPS). As written, reviewers following the required protocol have no standardized place to record Stage 1 results; update the output format (or this section) so Stage 1 is captured consistently before Stage 2 findings.
## Two-Stage Review Protocol

Code review runs in two mandatory stages, in order:

### Stage 1: Spec Compliance Review
Verify the implementation matches what was planned:
- Does the code implement every task in the plan's `<done>` criteria?
- Are there changes NOT covered by the plan (scope creep)?
- Do the public interfaces match the plan's specifications?
- Are there missing pieces the plan required but implementation skipped?

**Stage 1 must PASS before proceeding to Stage 2.** Spec non-compliance is a blocker — the code does the wrong thing well.

### Stage 2: Code Quality Review
With spec compliance confirmed, review the implementation quality using the gate function steps below (SCOPE → SECURITY → INTERFACES → ERROR HANDLING → TESTS → QUALITY).

**Both stages must pass for sign-off.**

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +168 to +172
When reviewing within a MAXSIM project, load project context:

```bash
node ~/.claude/maxsim/bin/maxsim-tools.cjs skill-context code-review
```
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The suggested context-loading command node ~/.claude/maxsim/bin/maxsim-tools.cjs skill-context code-review appears to reference a skill-context subcommand that does not exist in maxsim-tools.cjs (no such command is registered in the CLI). Replace this with a real command sequence (e.g., using state-snapshot, find-phase, and/or roadmap commands) or document this as pseudocode if it’s not meant to be executed.

Copilot uses AI. Check for mistakes.
Comment on lines +181 to +203
For spec compliance review, load the plan:
1. Read `.planning/phases/{current}/PLAN.md` — this is the spec
2. For each task in the plan, check if the implementation satisfies its `<done>` criteria
3. Flag any implementation that goes beyond or falls short of the plan
4. Produce a Stage 1 verdict: COMPLIANT or NON-COMPLIANT (with list of gaps)

### Stage 2 Integration

For code quality review, use the gate function steps (SCOPE through QUALITY) as defined above.

### STATE.md Hooks

Record review verdicts as decisions:
- After Stage 1: record compliance verdict with any gaps found
- After Stage 2: record quality verdict with any blocking issues
- Review metrics feed into performance tracking (pass rate, common issues)

### Artifact References

- Load plan from `.planning/phases/{current}/PLAN.md` for spec compliance
- Review summary included in `.planning/phases/{current}/SUMMARY.md`
- Blocking issues that require architectural decisions get recorded as STATE.md blockers
- Medium issues filed as `.planning/todos/` entries for follow-up
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file paths in Stage 1 / Artifact References don’t match the repo’s established planning layout. Phase plans are written as .planning/phases/XX-name/{phase}-{plan}-PLAN.md (or *-PLAN.md), and summaries as {phase}-{plan}-SUMMARY.md, not .planning/phases/{current}/PLAN.md and SUMMARY.md. Update these references so reviewers can locate the correct plan/summary files reliably.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants