Review a change

From compartmentdev/compartment · View interactive version

Review a change is an AI agent skill from the GitHub repository compartmentdev/compartment. Use when the user invokes $review-a-change or asks for a compartment repo code review; always use the delegated subagent review path by splitting review into separate parallel passes for contracts, architecture, runtime surface, validation, and changed slices, then report findings first with file an

How to use this skill

Skill file

Review a Change

Use this skill for code review in the compartment repo.

Invocation notes

Source of truth

Review workflow

  1. Identify the owning package, entry boundary, contracts, runtime surface, and the single canonical path touched by the change.
  2. Always launch separate subagents for the independent passes below and keep the main agent as the integrator. Do not choose or name a model, reasoning effort, speed, latency, or quality mode in this skill.
  3. Let review subagents inherit the user's current session configuration. If the client requires explicit values, pass only the current user-selected values exposed by the client/runtime. Prefer a subagent type that preserves that configuration.
  4. Start these required subagents in parallel. If the client only allows sequential spawn calls, start them one after another before reviewing:
  1. Split the remaining changed surface into 1 to 3 additional slice subagents by owning package or boundary, not by arbitrary file count. Ask each slice pass to look only for bugs, regressions, clean-code issues, oversized functions, and KISS drift inside its slice.
  2. For tiny diffs, still run the contracts, runtime-hygiene, and validation subagents plus at least one slice subagent. Do not collapse back to one slow serial review.
  3. Tell each subagent to return findings only, with file and line references, and not to edit files or resolve findings.
  4. If the current agent is already one of the delegated review subagents, run only the assigned pass and do not re-delegate.
  5. Do not perform a main-agent-only fallback or do the same review dimensions serially.
  6. Treat any new fallback behavior, alternate selection path, or legacy compatibility check as a finding unless the diff or request makes that path explicit and necessary.
  7. Treat any new or widened external exposure of /internal/*, internal-token routes, control-plane health probes, undocumented public host aliases, or internal/public URL mixing as a blocking security finding, not an advisory note.
  8. Check architecture fit before commenting on local style.
  9. Review the smallest correct surface, not just whether the code works.
  10. Integrate all passes into one deduplicated findings list ordered by severity, then do one short main-agent sweep for cross-slice interactions that the parallel passes could miss.
  11. If a review finds a real issue that should not be fixed in the current PR, keep it explicit in the review findings or PR discussion. Create a GitHub follow-up issue only when the user asks for issue tracking or the current PR workflow explicitly requires it.

Review focus

Output

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.