Agent crew task spec (issue #1333 / design #1327)
Machine-readable task contracts live in .agentic/tasks/<id>.yml. They extend the narrow delegation packet from #395: the YAML is primary; hosts render a short prompt from these fields instead of copying broad policy.
Schema
- Version:
task_spec_version: "1.0"(JSON Schema atsrc/plate_core/data/task_spec.schema.jsonin plate-core). - Identity:
id(kebab-case),role(abaseline_catalog.ymlagent id),kind(PLATE issue type label value). - Routing (spec fields, not labels):
level(junior|senior|staff),route(docs|tests|fix|feature|review). - Typed IO:
inputs/outputslists of{id, type, description?, required?}with types such asissue_ref,file_path,artifact_ref. - Acceptance:
acceptance.checks(human/agent checklist strings) andacceptance.success_signal(done signal for prompt rendering). - Tools:
tools.allow(explicit MCP tool names) and/ortools.profiles(names fromsrc/plate_core/mcp/tool_profiles.py). - Model policy:
model_policy.tiers,start_tier, optional singleescalationstep,max_cost_usd; whenT3is allowed,model_policy.t3_requires_approval: humanand a humanapprovalgate are required. - Budget:
budget.max_tokens_per_run. - Workflow edges:
nextlists{task_id, when?}static links to other spec ids;.agentic/procedures/remains the workflow layer that chains specs.
Role vs level vs route
When dispatching from a GitHub issue, role may be inferred from issue type and labels (see infer_role_from_issue() in plate_core.task_spec). The spec still declares role for deterministic delegation packets. Level and route are always spec fields—do not encode them as GitHub labels for crew routing.
Validation
gh plate tasks validate [--repo-root PATH] [--json]
python -m plate_core.task_spec [--repo-root PATH] [--path FILE ...] [--json]
Validates every *.yml / *.yaml under .agentic/tasks/ (or explicit --path files). Cross-checks next.task_id references within the validated set. Enforces the level-to-tier policy table (#1355): allowed tiers per level, mapped initial start_tier, optional acceptance.ci_validates_output for junior docs/tests cheaper-first start, and optional issue_labels for risk:critical human approval when validating dispatch packets.
Escalation validation (#1381): model_policy.escalation.from must equal model_policy.start_tier, and to must be exactly one tier higher (no multi-step jumps). Hosts may use pure next_run_state() in plate_core.task_spec for run-time transitions; persist the run step before invoking a model.
Per-run state machine (#1381)
States: start(tier = s) · escalated · stopped_reported · awaiting_human (T3 escalation) · done.
| From | Event / guard | To | Side effects | In code? |
|---|---|---|---|---|
| (none) | route the task: level, route, ci_validates_output |
start(s = recommended_start_tier) |
validation only | |
| start(s) | acceptance fails, escalation.from == s, to = next tier |
escalated(to) | ledger spend interval (metadata.tier_step) |
next_run_state |
| start(s) | acceptance fails, no escalation | stopped_reported | report | next_run_state |
| escalated | acceptance fails again | stopped_reported | report; no further step | next_run_state |
| any | next tier is T3 on failed start | awaiting_human | human approves per task | next_run_state |
| start / escalated | acceptance passes | done | next_run_state |
|
| awaiting_human | human approves (human_escalation_approved=True) |
escalated | next_run_state |
|
| awaiting_human | human declines (human_escalation_approved=False) |
stopped_reported | next_run_state |
|
| done / stopped_reported | any further outcome | (unchanged) | idempotent | next_run_state |
| any | downgrade below allowed tiers | (illegal) | not checked at run time |
next_run_state rejects unknown run states and refuses outcome_ok from awaiting_human without an explicit human gate. Terminal: done, stopped_reported. Initial: start(s).
Examples
Shipped under src/plate_core/data/examples/:
task-spec-research-synthesis.ymltask-spec-design-from-research.yml
Copy into .agentic/tasks/ as a starting point for crew pilots (DentalCoach, Happyhouses, etc.).
Related design
- agent-crews.md — parent design (#1327 / #1354): crew model, tiers, measurement, pilot, Jev shadow mode
- agent-crews-resource-router.md — registry record, routing inputs/outputs, Consumption Tracker and Lull reads, reviewer-differs rule (#1337; implementation deferred).
- agent-crews-pilot-protocol.md — paired single-agent vs crew pilot on plate and DentalCoach (#1353 / #1338): task mix, ledger fields, stop rules, report format.
Out of scope for #1333
Resource registry/router runtime, new GitHub labels, label-check workflow changes, and procedure authoring are tracked under design #1327 and sibling issues (interface spec for the router is in the linked doc above). Reviewer-differs checking lives in #1334 (plate_core.pr_reviewer_model_gate).