Release and deployment
AgentFlow treats “released” as a conclusion reached through gates, not a button pressed by a worker. Two tools guard the path from task to merge, and a dedicated role guards the path from merge to production.
Acceptance gates
Every Task File carries a ## Checks section: the exact commands that prove
its acceptance criteria. python .agentflow/tools/gate.py verify T-NNN runs
those commands verbatim - no wider filter, no substitutions - so the evidence
is reproducible by anyone, including a detached trial-merge checkout.
python .agentflow/tools/accept.py T-NNN performs acceptance itself: it
verifies, runs the integrated check, merges the task branch into main, marks
the ledger done and removes the worktree and branch, stopping at the first
failure. A task is done only after this; a failed verify rejects the task
and produces a successor Task File containing the findings.
Preflight deny rules in the project’s ## Preflight section (for example
denying git push) are enforced by the same gate before a worker ever
launches.
The Deployer role
The Deployer consumes only an accepted commit and is always launched
manually: run_task.py prepares the attempt with --manual, and a human
starts the tool. Deployment therefore requires an explicit human decision -
no code path inside AgentFlow deploys unattended. The Deployer’s Result
reports deployed, rolled-back or not-started; a rollback rejects the
deploy task while the accepted code stays done, and the fix becomes a new
developer task.
How this site deploys
This website is itself built and released under the same workflow. It is a
static Astro site: npm run build renders every page into dist/ as plain
HTML, CSS and assets that any static host can serve - there is no database
and no server runtime requirement.
The prepared release path is a portable static bundle plus a production
Docker image: a multi-stage Dockerfile builds the Astro output and serves it
from an unprivileged Nginx with static cache headers and HTML revalidation,
plus a docker-compose.yml and health check for local verification. Because
the output is just dist/, hosting stays interchangeable - a VPS, object
storage or any static platform can serve the identical build. The exact
commands and expected results are recorded in the project runbook once they
are verified end to end.
The same evidence rule applies here as everywhere else in AgentFlow: a deployment is claimed only after the check that proves it has actually run.