Documentation
¶
Overview ¶
Package reorder implements AI-powered task priority re-ranking for PM mode. It asks the AI to analyze the current plan state (completed tasks, project history, dependency graph) and return an optimal execution order for all pending tasks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyOrder ¶
func ApplyOrder(plan *pm.Plan, rankedTasks []RankedTask) error
ApplyOrder reassigns priorities to pending tasks based on the AI-provided order. Tasks are assigned priorities 1, 2, 3, ... in the given order. Non-pending tasks (done/skipped/failed) are left unchanged. Returns an error if any ID in orderedIDs is not found in the plan.
func OrderedPendingIDs ¶
OrderedPendingIDs returns the IDs of all pending tasks sorted by current priority.
Types ¶
type RankedTask ¶
RankedTask is one entry in the AI's reorder response.
type ReorderResponse ¶
type ReorderResponse struct {
Order []RankedTask `json:"order"`
}
ReorderResponse is the full JSON structure returned by the AI.