Documentation
¶
Overview ¶
Package plan is the lead's plan: a DAG of subtasks, each for one model. The lead keeps the full plan; it publishes a compact copy (without specs) as the halo.plan artifact on the run's root task, which is how the TUI sees it.
Index ¶
Constants ¶
const ( Pending = "pending" // waiting for approval or dependencies Running = "running" // a worker has it Asking = "asking" // its worker asked the lead something Ready = "ready" // the worker finished; the lead decides what next Review = "review" // the reviewer has it Changes = "changes" // the reviewer asked for changes Done = "done" // merged into the run's branch Failed = "failed" // the worker failed; escalate or retry Conflict = "conflict" // merging failed )
Statuses of a subtask.
const ArtifactName = "halo.plan"
ArtifactName names the artifact that carries the plan on the root task.
Variables ¶
var Ladder = []string{"haiku", "sonnet", "opus"}
Ladder orders the models from cheapest to strongest.
Functions ¶
Types ¶
type Plan ¶
type Plan struct {
Goal string `json:"goal"`
Branch string `json:"branch,omitempty"`
Approved bool `json:"approved,omitempty"`
// MergedInto is the base branch the run branch was merged into.
MergedInto string `json:"merged_into,omitempty"`
Subtasks []*Subtask `json:"subtasks"`
}
Plan is a run's plan.
type Subtask ¶
type Subtask struct {
ID string `json:"id"`
Title string `json:"title"`
Model string `json:"model"`
Deps []string `json:"deps,omitempty"`
Spec string `json:"spec,omitempty"`
Acceptance string `json:"acceptance,omitempty"`
Status string `json:"status"`
Worker string `json:"worker,omitempty"`
Task string `json:"task,omitempty"`
Round int `json:"round,omitempty"` // review rounds so far
Attempts int `json:"attempts,omitempty"` // dispatches so far, escalations included
Escalated bool `json:"escalated,omitempty"` // moved up the ladder at least once
StartedAt int64 `json:"startedAt,omitempty"` // unix ms
EndedAt int64 `json:"endedAt,omitempty"` // unix ms
Note string `json:"note,omitempty"` // the latest outcome, one line
}
Subtask is one piece of the plan.