ADLC
Toolkit

preflight

Batches every environment and permission check the agent fleet needs into one pass before fan-out, so failures front-load instead of stalling mid-flight.

preflight

ADLC phase: P0 Triage · Gate: every operation class the fleet needs is proven to work before a single agent spawns.

The ADLC lifecycle, with P0 highlighted. Read the theory for P0

What it defends against

A permission prompt or config failure that surfaces mid-flight is a hidden serialization point: one blocked agent stalls its N siblings, races half-started state, and wrecks the parallel wall-clock math. preflight front-loads bash, git, filesystem-write, and branch checks (plus optional worktree, test-command, gh, and LLM-provider checks) into one batch so the environment is proven deterministic before fan-out, rather than discovered non-deterministic during it.

Usage

adlc preflight [--test-cmd "..."] [--gh] [--llm] [--worktrees] [--json]
FlagDescription
--test-cmd "CMD"Run CMD via sh -c; expect exit 0. Output tail shown on failure.
--ghRun gh auth status; expect exit 0.
--llmCall detectProvider() and assert non-null. No API call is made; reports which provider was found.
--worktreesRun a git worktree add --detach … HEAD then remove cycle.
--jsonMachine-readable output: { checks, verdict, failedNames }.

With no flags, the four required checks (bash, git, write, branch) run. Each optional flag adds a check that becomes required for that run. Every check that creates a side effect cleans up in a finally block.

Exit codes

0: gate passes. Every required and explicitly requested check passed.1: operational / internal error.2: gate fails. One or more required or requested checks failed.

Example

$ adlc preflight --gh
──────────────────────
check      status  detail
──────────────────────
bash PASS    echo preflight-ok succeeded
git PASS    git status succeeded
write PASS    .adlc/tmp/preflight-test written and removed
branch PASS    branch 'preflight-test-branch' created and removed
gh PASS    gh auth status exited 0
──────────────────────

verdict: ALL CHECKS PASSED environment is ready.
exit 0

Go deeper

packages/preflight

On this page