FEATURES / 10
Verification
A command of yours that checks the stage after the agent's turn. If it fails, the stage is not done, even if the agent says it finished.
Updated for PrumoGrid 0.5.11
What it's for
The agent reporting that it finished means it stopped talking. Verification is a command of yours, such as npm test, that PrumoGrid runs after the turn to check the work. The exit code decides: if the command exits with the expected code, the stage passes; if not, it fails and does not release the next one. The command runs in the service, outside the agent's terminal, and the result shows the command, the exit code, the time, and the verdict.
Watch the video
A bug-fix operation with several agents. A bug fixed from start to finish by three agents: analysis, a fix confirmed by npm test and a review that waits for my approval. Captions and transcript ↗
When to use it and when not to
Use verification on stages that change code that someone will take in: a fix, a refactor, a new test. On a stage that only analyzes or writes a report, a command rarely proves anything, and the agent's report or your approval works better.
A verification is only worth something if it can fail. echo ok, or a command that always exits with zero, checks nothing. And a command that already passes before the work does not check the work either.
Step by step
Project verification
Each project can have a verification command, used by stages and routines.
- Look at the
loja-apicard. The line Verification: npm test · detected says PrumoGrid foundnpm testinpackage.json. - To check or change it, open the card's
···menu and choose Project verification…. The command palette (Ctrl+K) has the same command. - In the Verification · loja-api dialog, check Command, Folder and Time limit (min). The sentence Passes when the command exits with 0. states the rule.
- Click Test now. PrumoGrid asks "Will run npm test in C:\demo\loja-api. Run?". Click Run and see the exit code, the time, and whether it passed.
- Click Save.
Detection looks at files such as package.json, pom.xml, go.mod and the .NET manifests. When the command comes from somewhere else, the card says where: set by you, from CLAUDE.md, from AGENTS.md or suggested. With no command, the card shows No verification.
A criterion that fails first: the PRIMEIRA coupon
The PRIMEIRA coupon applies the discount twice when the cart has two items. loja-api has no coupon test, so npm test passes today, with the bug still there. Using npm test alone as the criterion would pass the stage even if the agent fixed nothing.
A criterion that catches the bug: a cart with one item at R$ 100 and another at R$ 50 should get R$ 15 off (10%), and today it gets R$ 30.
node -e "const {descontoDoCupom}=require('./src/cupom.cjs');process.exit(descontoDoCupom([{preco:100,quantidade:1},{preco:50,quantidade:1}],'PRIMEIRA',{})===15?0:1)"- Run the command in the
loja-apiPowerShell and check the code:$LASTEXITCODEshows1. The criterion fails now, which is what you want. - Click + New stage and write
Fix the PRIMEIRA coupon, which applies the discount twice with two items. Add a test that reproduces the case and run npm test. - In More options, choose Automatic with verification · the command passes and the next stage starts automatically.
- In Check with a command, paste the command above in place of
npm test. Leave passes when it exits with at success (0) and the time at 120 seconds. - Click Create stage.
When the agent finishes its turn, PrumoGrid runs the command. With the coupon fixed, it exits with 0, and the stage card says the command passed, with passed ✓. If the agent stopped halfway, it exits with 1, and the stage fails, with View output and correct on the card.
What you see on screen
| On screen | What it means |
|---|---|
| Verification: npm test · detected | The project command and where it came from. |
· project's: npm test | The stage uses the project command. Changing the text applies only to this stage; use the project's goes back. |
| passes when it exits with success (0) / error (1) | The expected exit code. Some checking commands exit with 1 when they find what they are looking for. |
| gives up after N seconds | The maximum time for the stage's verification, from 5 to 900 seconds. |
command ran at 23:50, rejected: exit 1 | On the card: the verification ran and failed with code 1. |
criterion rejected 1m06s ago: exit 1 (expected 0) | At the top of the Flow: the latest verdict, with Go to stage. |
Check whether the code changed
To require the stage to change something, regardless of the language, there is Check whether the code changed since this stage got its instruction. PrumoGrid takes a snapshot of the folder when it delivers the instruction and again at check time, and passes only if there is a new, modified or deleted file between the two. Changes that were already pending before do not count. This option does not check whether the change is right; use it together with a test when you can.
When verification fails
- Read the error in View output and correct or in View verification output, in the result.
- Decide what is wrong: the code, the dependencies, or the criterion itself.
- If the code needs fixing, ask the agent in the same conversation or return the stage.
- If the criterion was wrong, use Change criterion and then Check again… to run the new one now.
Changing the command, the folder or the pass condition invalidates the earlier evidence. The old result stays in the history, but it does not pass the new criterion.
Tips
- Before configuring it, run the command in the terminal while the work is still undone. If it passes, it does not verify the work, and PrumoGrid warns you when it recognizes this case.
- Prefer tests that exercise the requested change. A full suite that takes ten minutes delays every stage.
- The command runs through Windows (
cmd.exe), in the stage's folder. If the agent is in WSL and the command depends on Linux, wrap it:wsl -e sh -lc "npm test". - Use Verification and your approval when you want the command to pass and, on top of that, to read the result before releasing the next stage.
Known limitations
- The exit code proves only what the command tested. An
npm testthat passes says nothing about what no test covers. - Verification command: up to 512 characters. Stage verification time: from 5 to 900 seconds.
- Up to 16 verifications registered in the service.
- The result keeps up to 200 characters of the command output.
- Verification runs in the service, outside the agent's terminal: its output does not appear in that terminal.
- Detection suggests a command; it does not install tools or guarantee that the dependencies are ready.