Skip to content

Self-review while developing

This page defines what can be automated in-repo versus what still needs a human or paid API, and a default workflow for engineers using a coding agent (Cursor, Claude Code, Codex, Antigravity, or another IDE that can run the team MCP).

What “automatic agent review” actually needs

A model cannot silently watch every keystroke from Git alone. Continuous review requires one of:

  • IDE integration (coding-agent hooks or extensions) calling an API on save or on stop—per-machine setup, usage limits, and cost.
  • CI on push or pull request (GitHub Actions, etc.) calling an API using repository secrets—centralized, but costs money and must stay within AGP data rules.
  • Local Git hooks—can remind or run static tools (formatters, linters, compile); an LLM step in a hook implies scripting a vendor CLI with keys on each laptop.

There is no single switch in this repository that turns on a background coding agent for all engineers without one of the above.

Before every push or before opening a PR: stay in the same coding-agent session (whichever harness you use) and say you are done / want to commit. The agent must run convention_check then request_review (see Rephrased MCP). You compile and PIE.

Do not ask engineers to invoke named skills. The harness is MCP + AGENTS.md.

Optional: advisory Git hooks (reminder only)

The repo ships versioned hooks under scripts/git-hooks/:

  • pre-commit — MCP review checklist (convention_check → compile → request_reviewdevlog)
  • pre-push — short self-review reminder

They never block commit or push (exit 0).

One-time enable per clone

Git cannot auto-run installers on git pull (by design). Instead we set local core.hooksPath to the versioned folder. After that, every pull updates the hook scripts automatically.

powershell -ExecutionPolicy Bypass -File scripts/Install-ReviewHook.ps1

MCP onboarding (check or register) also enables this. To disable:

git config --unset core.hooksPath

Optional: CI on pull requests

If the org allows API keys in GitHub Secrets, a workflow can post an automated review on each PR. That is a separate policy decision (cost, data residency, who owns the key). This repo does not ship a vendor PR bot by default.

Lead expectations

  • Coding-agent self-review does not replace a teammate reviewing the PR.
  • C++ that touches persistence, networking, or security-sensitive paths should get human eyes even when the model passed.

Change history

  • 2026-08-14 — Gabriel Li — Named Cursor, Claude Code, Codex, and Antigravity as valid harnesses.
  • 2026-08-13 — Gabriel Li — Self-review is MCP convention_check / request_review; engineers do not invoke skill names.
  • 2026-08-10 — Gabriel Li — Switched to core.hooksPath=scripts/git-hooks so pulls keep hooks current; added pre-commit checklist; wired MCP onboarding enable.
  • 2026-05-23 — Gabriel Li — Generic coding-agent wording throughout.
  • 2026-05-10 — Gabriel Li — Documented self-review options, reviewer pass, optional advisory pre-push hook, and CI caveats.