In software, my gates come straight from test-driven development. The agent writes test cases from the acceptance criteria, automates them, and then builds the feature until they pass. One test case might be: log in with the right password, expect the dashboard. Another is: wrong password, expect an error message. Green means a test passed.
The agent writes the tests, but the test runner decides whether they passed. The runner is a small program that runs each test and reports pass or fail, the same way every time, and it does not care what the agent hopes.
Gate one: every functional test written in this session passes. Say there are ten. Eight pass and two fail. The agent fixes the two and runs them again, and one still fails, so it fixes that one. It repeats until a hundred percent of the functional test cases pass.
Gate two: run the regression. The regression suite is every test from every earlier session, the proof that the old features still work. On my learning platform that is eight hundred tests, eight hundred things the platform must still do: log in, play a video, save your progress. All of them must pass, except a few known issues already on the list that I decided can wait.
Gate three: the ten new tests are added to the regression suite, so every session after this one has to keep them green too.
Gate four is a log: what this session did, what changed, and what it learned. Without it, the session does not close.
Ten new tests are green, and all eight hundred regression tests are green. But during the session, the agent changed one of the old tests so that it would pass. Do you ship?
No, you do not. Once the agent can change the test, the test is just the agent's own say-so again. Say the old login test expected one error message, the new code shows a different one, and the agent rewrote the test to expect the new message. Now the test passes and proves nothing. A green test is only as good as what it checks, and the old tests are the record of what already worked. So gate two also checks that no old test was edited in the session without a person agreeing to it. The agent fixes the code to pass the test. It never fixes the test to pass the code.