AgentFlow
Workflows

CI workflow

Use AgentFlow in CI with dry-run, validation, and docs checks.

CI workflow

Continuous integration should exercise AgentFlow without prompting, ideally in dry-run mode where that matches your intent, and without ever echoing secrets into job logs.

A typical lane builds the CLI, initializes project metadata, runs doctor, and performs a work dry-run plus plan-only pass so pipelines stay fast and deterministic. Adapt paths and caching to your platform; the excerpt below sketches the ordering:

# excerpt — adapt to your CI
- run: go build -o bin/agentflow ./application/cmd/agentflow
- run: bin/agentflow init
  working-directory: ${{ github.workspace }}
- run: bin/agentflow doctor
- run: bin/agentflow work "smoke feature" --dry-run --plan-only
- run: go test -race ./...

Environment variables

When you prefer flags-as-env rather than repeating CLI switches, AgentFlow honours the usual mirrors:

VariableEffect
AGENTFLOW_DRY_RUN=1Same as global --dry-run
AGENTFLOW_YES=1Auto-confirm prompts (use carefully in CI)
NOTION_TOKENRequired only for Notion sync jobs

See Environment variables.

Docs CI

This repository also validates that the published docs remain buildable and that CLI reference generation stays in sync with code. The sequence below mirrors what runs on push:

cd docs-site && npm ci && npm run build
go run ./application/cmd/agentflow docs generate-cli --output docs-site/content/docs/en/cli/generated
go test ./application/internal/cli/docgen/...

Workflow file: .github/workflows/docs.yml.

What not to do in CI

Treat CI as rehearsal and hygiene, not unattended production automation unless you have deliberately pinned agents, secrets scopes, and review gates.

  • Do not run real dev/review without pinned agents and secrets
  • Do not commit .agentflow/config.yaml with tokens
  • Do not treat --estimate-only as a license skip for go test