ADR 0027: task run pre-flight orchestrator
| Field | Value |
|---|---|
| Status | Accepted |
| Date | 2026-06-01 |
| Deciders | Project maintainers |
| Supersedes | — |
| Superseded by | — |
| Related ADRs | ADR-0021 (task-quality-score), ADR-0023 (goal-contract) |
Summary
aidokit task run <id|path> runs aidokit's own deterministic pre-flight
chain for a task in one command — score the brief, draft the goal contract,
emit the run-plan — and then stops before the model step. It composes the
existing runTaskScore, runGoalDraft, and runGoalPlan functions; it adds no
new logic and makes zero model calls. The command prints the produced
artifacts plus the ordered next steps (run your adapter → aidokit eval →
aidokit verify --all-facets → aidokit pr packet).
This is the "Tier 2" orchestrator. It is explicitly not the autonomous runner (ROI #2's executing form) — that requires LLM calls and auto-progression, both permanent non-goals (CLAUDE.md §11, ROADMAP §Non-goals).
Context
ROI #2 asked for a one-command task pipeline. Three tiers exist:
- Tier 1 —
aidokit goal plan(ADR-0023): emits a run-plan script the human executes. Already shipped. - Tier 2 — this ADR: a command that runs the deterministic, model-free steps in sequence and halts at the boundary where a model (the user's own coding CLI) must act.
- Tier 3 — autonomous runner: generate → drive a model → verify → loop. Permanent non-goal; not built.
The legitimate, in-charter slice is Tier 2: aidokit already owns several
deterministic per-task steps (task score, goal draft, goal plan). Running
them by hand, in order, is busywork. Orchestrating aidokit's own commands —
not a model — is consistent with the deterministic-scaffolder charter.
Decision
Command
aidokit task run <id|path> [--brief <path>] [--json], registered as a
subcommand of the existing task group. Brief resolution matches task score /
goal / eval.
Behaviour (in order, all deterministic, no model)
runTaskScore— advisory quality score (does not gate).runGoalDraft— writeagent-artifacts/goals/<id>-goal.md.runGoalPlan— writeagent-artifacts/goals/<id>-plan.sh.- Print the score, the two artifact paths, and the ordered next steps:
review contract → run YOUR adapter →
aidokit eval→aidokit verify --all-facets→aidokit pr packet.
A missing brief raises AidokitError (BAD_INVOCATION). No new finding codes.
Hard boundary
task run never invokes a model, never auto-progresses past the human/adapter
step, and runs no daemon. Step 2 of the printed chain (run your adapter) is a
manual placeholder, exactly as in the goal plan script.
Consequences
- Positive: one command for the model-free pre-flight; less manual command stacking; composition-only, so it inherits the behaviour (and tests) of the commands it calls.
- Positive: the model boundary is explicit and visible in the output, reinforcing the no-autonomy charter.
- Negative / deferred: it does not orchestrate the post-model steps
(
eval/verify/pr packet) — those need the model to have run first, so they remain separate commands the user runs after. A futuretask verifyresume step could chain the post-model half; deferred until there is demand. - Alternative rejected: shelling out to the CLI binary per step. Calling the exported functions directly is hermetic, faster, and keeps error handling in one process.