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 evalaidokit verify --all-facetsaidokit 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:

  1. Tier 1 — aidokit goal plan (ADR-0023): emits a run-plan script the human executes. Already shipped.
  2. 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.
  3. 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)

  1. runTaskScore — advisory quality score (does not gate).
  2. runGoalDraft — write agent-artifacts/goals/<id>-goal.md.
  3. runGoalPlan — write agent-artifacts/goals/<id>-plan.sh.
  4. Print the score, the two artifact paths, and the ordered next steps: review contract → run YOUR adapter → aidokit evalaidokit verify --all-facetsaidokit 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