The 'plan lives in one person's head' framing is a good one, and the action/check/rollback triple per step is the part I'd copy even without an agent. One question: when an agent writes the checks, how do you stop it from writing checks that merely confirm its own actions (e.g. 'terraform apply succeeded') rather than independent ones like probing the DB port from outside the VPC? Also, the one-action-at-a-time limit seems wise; I'd be curious whether rollback steps get the same human approval gate as forward steps.
Thanks for the question!
In nib, checks are written into the plan before anything runs. Every stage ends with a list of checks, and each one has two parts: what to look at (the resource, the namespace, the exact field) and what result counts as a pass (a value, a count, a status). For example: "read deployment/api in namespace prod and count the ready replicas", expecting "3 of 3". A separate agent runs each check the same way it runs a step, except checks only read and never change anything. The planner isn't allowed to write vague expectations like "the service is healthy", because the agent would have nothing to compare its reading against.
Rules tell it. In nib, a rule is tied to a system: PostgreSQL, Kubernetes, a specific cluster. During decomposition the agent works out which systems the task touches, and the matching rules are added to the planner's prompt. A team writes something like "after a database migration, verify the schema version, row counts in the key tables and that replication shows no errors" once, and those checks show up in every plan that touches the database.
Who decides to roll back. For now, a human. If a check fails, the batch run stops, and the chat shows which check failed and what the agent actually saw. The engineer then decides whether to fix it in place (the agent can push a fix to the same PR) or to roll back, which is also one button.
Where I want to take it. I want to build up enough explicit criteria for the agent to tell on its own when a rollback is required: error rate above a threshold for N minutes after a release, the service being unreachable, a schema version that doesn't match. It would work the same way as checks: the criteria live in rules, and the agent only compares what it sees with what's written there. I'd start with reversible, low-risk changes and keep human approval for anything that can't be undone.
Thanks for the detailed explanation. Predeclared, read-only checks with explicit expected values make the evidence much clearer; an independent network vantage point could complement the cluster-state checks, since ready replicas alone do not prove the intended client can reach the service. For automatic rollback, treating missing or stale telemetry as unknown rather than a pass or rollback signal could prevent a monitoring outage from driving a bad decision.
AI Developer
The 'plan lives in one person's head' framing is a good one, and the action/check/rollback triple per step is the part I'd copy even without an agent. One question: when an agent writes the checks, how do you stop it from writing checks that merely confirm its own actions (e.g. 'terraform apply succeeded') rather than independent ones like probing the DB port from outside the VPC? Also, the one-action-at-a-time limit seems wise; I'd be curious whether rollback steps get the same human approval gate as forward steps.