Cm code review

From tody-agent/codymaster · View interactive version

Cm code review is an AI agent skill from the GitHub repository tody-agent/codymaster. Full review lifecycle — request reviews, handle feedback with technical rigor, and complete branch integration. Use when completing tasks, receiving feedback, or finishing feature branches.

How to use this skill

Skill file

Code Review — Request + Receive + Complete

TL;DR

Full review lifecycle in one skill: Request → Receive → Integrate.

Part A: Requesting Code Review

When to Request

Mandatory:

Optional but valuable:

How to Request

  1. Get git SHAs:

```bash

BASE_SHA=$(git rev-parse HEAD~1)

HEAD_SHA=$(git rev-parse HEAD)

```

  1. Dispatch reviewer subagent with:
  1. Act on feedback:

Part B: Receiving Code Review

When to Use

When receiving feedback — whether from human reviewers, AI reviewers, or code review subagents.

The Protocol

1. READ feedback completely before responding
2. UNDERSTAND the technical reasoning
3. VERIFY if the feedback is technically correct
4. RESPOND with evidence, not agreement

Response Framework

| Feedback Type | Response |

|--------------|----------|

| Technically correct | Fix it. Thank reviewer. |

| Unclear intent | Ask for clarification with specific questions |

| Technically questionable | Challenge with evidence (code, tests, docs) |

| Stylistic preference | Discuss trade-offs, defer to team convention |

Red Flags — STOP

Anti-Pattern: Performative Agreement

❌ "Good catch! Fixed."  (without verifying it's actually a problem)
✅ "I verified this: [evidence]. The suggestion is correct because [reason]. Fixed."
✅ "I investigated this: [evidence]. The current code is correct because [reason]."

Part C: Finishing a Development Branch

When to Use

When implementation is complete and all tests pass.

The Process

  1. Verify current state:

```bash

npm run test:gate # All tests must pass

git status # Working tree should be clean

```

  1. Present options to user:

| Option | When | Command |

|--------|------|---------|

| Merge to main | Feature ready | git checkout main && git merge feature-branch |

| Create PR | Needs team review | git push origin feature-branch |

| Keep working | More tasks remain | Continue on branch |

| Cleanup only | Abandoned/merged | git worktree remove path |

  1. Execute chosen option
  1. Cleanup:

Rules


Step FINAL: Record Review Learnings

After processing review feedback, ALWAYS update .cm/CONTINUITY.md:

[Decision]: [Rationale] — scope: [global|module:{name}]

Anti-duplicate: If similar learning exists, reinforce it instead of creating new.

Token savings: Future code reviews in same project avoid repeating

the same feedback. Reviewer patterns become accumulated knowledge.


Integration

| Skill | Relationship |

|-------|-------------|

| cm-execution | Reviews after each task in execution |

| cm-quality-gate | Tests must pass before finishing branch |

| cm-identity-guard | Before git push |

| cm-execution | Cleanup isolated workspace after completion |

Karpathy Discipline — Review Checklist

Block any PR/diff that violates these regardless of green tests:

Review heuristic: if you can't answer "what task forced this line?" for every changed line, the diff is too wide.

The Bottom Line

Review early. Verify feedback. Ship with evidence, not hope.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.