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) on the Perforce depot.
What "automatic agent review" actually needs¶
A model cannot silently watch every keystroke. 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 submit — a server-side Perforce trigger on the USC Helix Core server can run checks (or call an LLM) when someone submits and reject the change. Centralized, but it needs a Perforce admin to install and costs money/data-policy attention for an LLM step.
There is no switch in a workspace that turns on background review for all engineers without one of the above.
Recommended team default (no extra infrastructure)¶
Before every submit: stay in the same coding-agent session (whichever harness you use) and say you are done / want to submit. The agent must run convention_check then request_review (see Rephrased MCP). You compile and PIE. For a pre-submit human look, request_review can p4 shelve the changelist so a reviewer pulls the exact change.
Do not ask engineers to invoke named skills. The harness is MCP + AGENTS.md.
Enforcement: server-side, not local¶
There is no local branch-guard hook under Perforce (that was a git concept, now legacy). The place to enforce "reviewed before it lands" is a submit trigger on the Perforce server, which requires a USC Perforce admin. Until that exists:
convention_check+request_revieware the automated gate (advisory, run by your agent).- A human reviewer on the shelved changelist is required for anything non-trivial.
- Exclusive checkout (binary locks) prevents concurrent clobbering at the file level.
Lead expectations¶
- Coding-agent self-review does not replace a teammate reviewing the change.
- C++ that touches persistence, networking, or security-sensitive paths should get human eyes even when the model passed.
Change history¶
-
2026-09-05 — Gabriel Li — Rewrote for Perforce: dropped local git branch-guard hooks (legacy), enforcement is now a server-side submit trigger (admin-only); review default is
convention_check→request_reviewwith optionalp4 shelvefor a human pre-submit look. -
2026-08-27 - Gabriel Li - Replaced reminder-only hook wording with local branch guard enforcement for no-main and valid task branch names.
- 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-hooksso pulls keep hooks current; addedpre-commitchecklist; 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-pushhook, and CI caveats.