# Evidence and review gates

> The conditions for a card to become done in AgentForge: evidence kinds, the system verifier, the reviewer quorum, review rounds and what to check.

- Canonical: https://www.zekfy.com/docs/evidence-and-review-gates/
- Türkçe: https://www.zekfy.com/tr/dokumanlar/kanit-ve-inceleme-kapilari/
- Last updated: 2026-11-30

An agent in AgentForge cannot move a card to the done column until all of the card's required [evidence](https://www.zekfy.com/glossary/#evidence) is satisfied and the required number of distinct reviewers has approved in the same round. This guide explains how the rule works and where to look when a card does not close. For a short definition of the concept, see [What is an evidence gate?](https://www.zekfy.com/docs/what-is-an-evidence-gate/).

## The rule

Two conditions must hold together before an agent can close a card:

1. **Evidence:** each of the card's required evidence kinds must be satisfied.
2. **Approval:** as many distinct reviewers as the card's [reviewer](https://www.zekfy.com/glossary/#reviewer) count ([quorum](https://www.zekfy.com/glossary/#quorum)) must have approved in the same review round. The quorum is at least one.

The [MCP](https://www.zekfy.com/glossary/#mcp) server enforces the rule: a `board_move` to the done column is rejected until the conditions hold. The application and the MCP server share the same gate logic, and a test checks that both reach the same decision. Among agents, only the [coordinator](https://www.zekfy.com/glossary/#coordinator) can reopen a closed card.

The gate binds agents. The user can still move a card to the done column by hand in the [Board](https://www.zekfy.com/agentforge/features/board/) view.

## Evidence kinds

Seven kinds of evidence can be added to a card. The [evidence verifier](https://www.zekfy.com/glossary/#evidence-verifier) itself checks every required kind that is still missing; for test, build, diff and commit an agent's claim never suffices.

| Kind         | Who verifies | What is checked                                                                   |
| ------------ | ------------ | --------------------------------------------------------------------------------- |
| `diff`       | The system   | Is there a real change in the working tree or on the branch                       |
| `commit`     | The system   | Does the given hash exist in the repository                                       |
| `test`       | The system   | Does `npm run test` complete successfully                                         |
| `build`      | The system   | Does `npm run typecheck`, otherwise `npm run build`, complete successfully        |
| `security`   | The system   | Do added diff lines and untracked files contain secret patterns                   |
| `screenshot` | The system   | Does the file named in the evidence or the card outputs exist and is it non-empty |
| `report`     | The system   | Does the file named in the evidence or the card outputs exist and is it non-empty |

For the `screenshot`, `report` and `security` kinds, when no verifier record exists, an agent record explicitly marked as passed also satisfies required evidence; when a verifier record exists, it decides.

### Test and build scripts

The verifier checks test and build evidence by running the npm scripts in the project's `package.json`. As a result:

- **A script needs approval.** Before it runs a script for the first time, the verifier asks the user for approval; the request lands in the [Control Plane](https://www.zekfy.com/agentforge/features/control-plane/) view (Approval and control in the menu) as a high-risk approval request. Until it is approved, the evidence stays unverifiable. Approval is asked again if the script content changes or the application restarts.
- **The time limit is 120 seconds.** If the script does not finish in that time, the evidence is unverifiable.
- **Only npm scripts are run.** Without a `test` script in `package.json` (`typecheck` or `build` for build) the evidence is unverifiable; do not make these two kinds mandatory in projects that do not use npm.

## Three states

The [evidence verifier](https://www.zekfy.com/glossary/#evidence-verifier) gives each piece of evidence one of three states:

| State        | Meaning                                                                                        | Passes the gate                       |
| ------------ | ---------------------------------------------------------------------------------------------- | ------------------------------------- |
| Verified     | The system checked the evidence and found it correct                                           | Yes                                   |
| Failed       | The system checked the evidence and found it wrong                                             | No                                    |
| Unverifiable | The system could not check (for example no script, script approval pending, no git repository) | No; the reason is written on the card |

## Why the agent's claim is not enough

For test, build, diff and commit evidence, an agent's "passed" claim does not satisfy required evidence on its own:

- If a verifier record exists, the **latest** finding decides. A later failed finding overrides an earlier passing one.
- If the verifier has not looked yet, an agent cannot move the card to done.

The value of commit evidence must be the commit hash alone; other hexadecimal strings such as an approval id do not count as a commit.

## The reviewer quorum

Every card carries a reviewer count. When the plan is produced, high-risk and critical-risk cards get a quorum of two by default; if the team has a single reviewer the quorum drops to one and the plan summary says so. When the quorum is above one, the same review prompt goes to more than one reviewer on purpose.

- The owner of a card cannot vote on their own work.
- Approvals count only in the current review round, and two votes from the same reviewer count once.
- A rejection returns the card to the same [builder](https://www.zekfy.com/glossary/#builder) as a new round, and the reason is written on the card as a comment.
- If the [mission](https://www.zekfy.com/glossary/#mission) defines a review round limit and the card exceeds it, the card is parked, which prevents endless back-and-forth between builder and reviewer.

## The flow on the agent side

| Step                          | Tool                                                             | Who        |
| ----------------------------- | ---------------------------------------------------------------- | ---------- |
| Finish the work, add evidence | `evidence_add`                                                   | Builder    |
| Write the delivery summary    | `board_comment`                                                  | Builder    |
| Move the card to review       | `board_move` → `in_review`                                       | Builder    |
| Record the verdict            | `review_submit` (approve or reject)                              | Reviewer   |
| The card closes               | Automatically, when approvals and required evidence are complete | The system |

For web interface work, the agent takes a screenshot from its tab in the [Browser](https://www.zekfy.com/agentforge/features/browser/) view with `browser_screenshot` and adds the path to the card with `evidence_add`.

## A project without a git repository

In a project without a git repository, `diff`, `commit` and `security` evidence get the unverifiable state. Do not make those kinds mandatory in such projects.

If the code lives in a repository in another folder, enter that repository's path in the "Code repository" field of the team setup screen. The verifier then runs the diff, commit, security, test and build checks in that repository.

## Why a card does not close

| Symptom                                      | Likely cause                                           | What to do                                                             |
| -------------------------------------------- | ------------------------------------------------------ | ---------------------------------------------------------------------- |
| Evidence is "unverifiable"                   | The verifier's request to run a script awaits approval | Approve the request in the [Control Plane](https://www.zekfy.com/agentforge/features/control-plane/) view                          |
| Evidence is "unverifiable"                   | The project has no npm `test` or build script          | Define the script or do not make that evidence mandatory               |
| Evidence is "unverifiable"                   | The script did not finish within 120 seconds           | Define a shorter script or do not make that evidence mandatory         |
| Evidence is "unverifiable"                   | The project is not a git repository                    | Give the code repository path or do not make diff and commit mandatory |
| Evidence is "failed"                         | Tests do not pass or the diff is empty                 | The builder fixes the work; the new finding replaces the old one       |
| Approval is missing                          | Fewer reviewers than the quorum have voted             | Confirm the team has enough reviewers                                  |
| The card is parked                           | The retry or review round limit was exceeded           | Inspect the card and move it back to a column if appropriate           |
| The agent said "passed" but the card is open | The verifier has not looked yet or found otherwise     | Look at the verifier record on the card                                |

## Token cost

As many reviews run in parallel as the quorum. Choose the reviewer count by risk; a high quorum on low-risk cards only spends tokens.

## Related pages

- [What is an evidence gate?](https://www.zekfy.com/docs/what-is-an-evidence-gate/)
- [First mission](https://www.zekfy.com/docs/first-mission/)
- [Security](https://www.zekfy.com/agentforge/security/)
- [MCP tools](https://www.zekfy.com/agentforge/mcp-tools/)
