Execution contracts (spec)¶
Input contract (context)¶
A pipeline run consumes a mapping called the context.
Required keys:
task_goal(string)
Optional keys:
context_id(string)text(string) — inline inputfile_path(string) — path to a file containing the input
Constraints:
- At least one of
textorfile_pathMUST be provided. - Additional keys MAY be present to support domain-specific workflows.
CLI mapping¶
The CLI constructs context from:
task_goalfrom YAML config (task_goal, or a built-in default)file_pathfrom the input path (file) or each file in the input directorycontext_idderived from the file stem
API v1 mapping¶
The API v1 handler constructs context from:
textandtask_goalin the requestcontext_id(defaultapi-v1)- a deterministic on-disk snapshot path written under
./artifacts/api/inputs/
Output contract¶
The pipeline returns a mapping with (at minimum):
stages:{stage_name: stage_output}final_status: a summary object
final_status MUST include:
success(bool)termination_reasonstages_processed(list of strings)iterations(int)
Dry-run semantics¶
- Dry-run MUST NOT claim model-derived outputs.
- Dry-run MUST still produce a coherent
final_result.jsonsuitable for wiring checks.