/docs/ · Understand how it works

What is an evidence gate?

An evidence gate ties an AI agent closing a task to verified evidence and reviewer approval instead of the agent’s claim. How AgentForge applies it.

An evidence gate is a rule that ties an AI coding agent closing a task as “done” to checkable evidence and an independent review rather than to the agent’s own claim. In AgentForge an agent cannot move a card to the done column until the system has verified the card’s required evidence and the required number of reviewers has approved. The MCP server enforces the rule; the user can still move a card by hand.

Why an evidence gate is needed

When a coding agent finishes its work, it reports that in text: “the tests passed”, “the change is made”. That report is a claim, not evidence. In a team that works autonomously, if the developer checks every claim personally, the time the agents saved goes into checking; if nothing is checked, work that was not done counts as done. An evidence gate turns the checking into a rule: a task does not close until defined conditions hold.

How an evidence gate works

An evidence gate has three parts:

  1. Required evidence: the task carries, from the start, the kinds of evidence it needs in order to close.
  2. Independent verification: a component independent of the agent that did the work checks the evidence.
  3. Independent approval: a reviewer other than the agent that did the work approves the result.

The task does not close until all three hold. Evidence that cannot be verified does not count as passed.

How AgentForge applies the evidence gate

Two conditions

Two conditions must hold together before an agent can move a card to the done column:

  • each of the card’s required evidence kinds must be satisfied,
  • as many distinct reviewers as the card’s reviewer count (quorum) must have approved in the same review round.

The owner of a card cannot vote on their own work. Until the conditions hold, a move to the done column with the board_move tool is rejected.

Who verifies the evidence

A card can carry seven kinds of evidence: test, build, diff, commit, screenshot, report and security. The evidence verifier itself checks every required kind that is still missing:

Kind What the verifier checks
diff Is there a real change in the working tree or on the branch
commit Does the given hash exist in the repository
test and build Does the npm script the user has approved complete successfully within 120 seconds
security Do added diff lines and untracked files contain secret patterns
screenshot, report Does the named file exist and is it non-empty

The verifier gives each piece of evidence one of three states: verified, failed or unverifiable. Only the verified state passes the gate. For test, build, diff and commit evidence an agent’s “passed” claim never suffices, and the verifier’s latest finding decides.

Where the rule is enforced

The agentforge MCP server enforces the rule; the application and the MCP server share the same gate logic, and a test checks that both reach the same decision. The state of the gate is followed in the Control Plane view.

Limits

  • The evidence gate binds agents. The user can move a card to the done column by hand in the Board view.
  • An agent with shell access can write the project’s .forge state files directly; the checks in the tool layer do not prevent that direct write.
  • Test and build verification uses only the npm scripts in package.json, and a script needs the user’s approval before its first run. With no script or no approval the evidence is unverifiable.
  • In a project without a git repository, diff, commit and security evidence cannot be verified.
  • The quorum is the number the card carries. When a plan is produced, high-risk and critical-risk cards get two by default; with a single reviewer in the team it drops to one.