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.
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]| Flag | Description |
|---|---|
--test-cmd "CMD" | Run CMD via sh -c; expect exit 0. Output tail shown on failure. |
--gh | Run gh auth status; expect exit 0. |
--llm | Call detectProvider() and assert non-null. No API call is made; reports which provider was found. |
--worktrees | Run a git worktree add --detach … HEAD then remove cycle. |
--json | Machine-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
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