Expand description
AI Decision Definition
A Decision is the terminal verdict of a Run.
After the agent finishes generating and validating PatchSets, the
orchestrator (or the agent itself) creates a Decision to record what
should happen next.
§Position in Lifecycle
⑤ Run
├─ PatchSet* (⑦)
├─ Evidence* (⑧)
└─▶ ⑨ Decision (terminal for this Run)
│
├─ Commit → applied patch recorded in Intent/Task context
├─ Checkpoint→ saved progress
├─ Retry → new Run for same Task
└─ Abandon/Rollback → stop or revert
│
▼
⑩ Intent terminalizationA Decision is created once per Run, at the end of execution.
It selects which PatchSet (if any) to apply and records the
resulting commit hash. Evidence
objects may reference the Decision to provide supporting data
(test results, lint reports) that justified the verdict.
§Decision Types
Commit: Accept the chosen PatchSet and apply it to the repository.chosen_patchsetandresult_commitshould be set.Checkpoint: Save intermediate progress without finishing. The Run may continue or be resumed later.checkpoint_ididentifies the saved state.Abandon: Give up on the Task. The goal is deemed impossible or not worth pursuing. No PatchSet is applied.Retry: The current attempt failed but the Task is still viable. The orchestrator should create a new Run to try again, potentially with different parameters or prompts.Rollback: Revert previously applied changes. Used when a committed PatchSet is later found to be incorrect.
§Flow
Run completes
│
▼
Orchestrator creates Decision
│
├─ Commit ──▶ apply PatchSet, record result_commit
├─ Checkpoint ──▶ save state, record checkpoint_id
├─ Abandon ──▶ mark Task as Failed
├─ Retry ──▶ create new Run for same Task
└─ Rollback ──▶ revert applied PatchSet§How Libra should use this object
- Create one terminal
DecisionperRun. - Fill
chosen_patchset_id,result_commit_sha,checkpoint_id, andrationalebefore persistence as appropriate for the verdict. - Use the decision to advance thread heads, selected plan, release status, and UI state in Libra projections.
- Do not encode those mutable current-state choices back onto
Intent,Task,Run, orPatchSet.
Structs§
Enums§
- Decision
Type - Type of decision.