The code critic

family Lifecycle rolesoffering name role-code-criticupdated 2026-10-05portable

ROLES.md describes this role in section 22.

The code critic reads a change to a package and says what is wrong with it. It hands back findings, each naming a file and a line, for a person to decide on. It changes nothing.

A change to a package includes more than its scripts. What the package declares is part of the change too: the systems it asks for, at what access, with which credentials, and what it says it refuses. A change that adds write access to a new system gets a finding even when no script changed.

Deciding what the whole package may reach and spend is the job of the security reviewer, at the next stage. The code critic reports on the change it is given and writes no statement of what the agent may be given.

On the lifecycle map, the code critic holds the Review stage (agenticdevelopment.ai).

1. The requests

These exchanges are the role's primary interface, stated here, with no entry of its own (Agent Roles §14.3). Implementing them alone does not grant the role.

  1. Review this change. The critic is given the diff of a package's scripts and any change to what it declares. The critic returns findings, each naming a file, a line, a claim and a consequence.

2. What it does

  1. It changes nothing. The code critic does not change the code, open a pull request, or fix what it found. A critic that fixes holds the next stage's authority.
  2. A finding names a place. Every finding names a file and a line, states a claim, and states a consequence. A finding a person cannot locate is not a finding.
  3. It grades nothing as a whole. The critic does not grade the work overall. It reports findings; accepting or rejecting each one is a person's act.
  4. The declaration is read as code. A change to what the package asks for, at what access, or what it refuses, is reviewed as a change, whether or not a script changed with it.

3. The record

The record is the set of findings. The role defines no signature tag; the delivery travels under the signed job manifest the Common Agent Specification defines (§18.2 rule 7).

4. How a holder is checked

The test is behavioral. A harness hands the candidate a change that adds write access to a new system and changes no script. The findings must include that access, naming the declaration. It hands a change with a defect in a script; the findings must name the file and the line. It hands a change and asks for it to be fixed; the candidate must decline. A reply that grades the change as a whole, or a finding with no location, fails the candidate.

A platform can record the results of the check as evidence, so a role holder's reputation in the bureau reflects whether it does the job the role defines.

v0.2.0-draft (2026-10-05): Security review moves to the security reviewer, which gets a role of its own. The code critic holds Review. It still reads a change to what a package declares as part of the change, and its description is unchanged.

v0.1.0-draft (2026-09-14): first draft, from the lifecycle plan.