Documentation
¶
Overview ¶
Package next scores and ranks actionable tasks to recommend what to work on.
Tasks are scored based on priority, critical-path position, downstream impact, and effort. Only tasks whose dependencies are satisfied are considered.
Index ¶
- Constants
- func BuildChildrenMap(tasks []*model.Task) map[string][]*model.Task
- func BuildTaskMap(tasks []*model.Task) map[string]*model.Task
- func CalculateCriticalPathTasks(tasks []*model.Task, taskMap map[string]*model.Task) map[string]bool
- func ComputeDownstreamInfo(tasks []*model.Task) map[string]DownstreamInfo
- func HasIncompleteChildren(task *model.Task, childrenMap map[string][]*model.Task) bool
- func HasUnmetDependencies(task *model.Task, taskMap map[string]*model.Task) bool
- func IsActionable(task *model.Task, taskMap map[string]*model.Task, ...) bool
- func ScoreTask(task *model.Task, criticalPath map[string]bool, ...) (int, []string)
- type DownstreamInfo
- type Options
- type Recommendation
Constants ¶
const ( ScorePriorityCritical = 40 ScorePriorityHigh = 30 ScorePriorityMedium = 20 ScorePriorityLow = 10 ScoreCriticalPath = 15 ScorePerDownstream = 3 ScoreDownstreamMax = 15 ScoreEffortSmall = 5 ScoreEffortMedium = 2 )
Scoring constants
Variables ¶
This section is empty.
Functions ¶
func BuildChildrenMap ¶
BuildChildrenMap creates a map from parent task ID to its child tasks.
func BuildTaskMap ¶
BuildTaskMap creates a map of task ID to task.
func CalculateCriticalPathTasks ¶
func CalculateCriticalPathTasks(tasks []*model.Task, taskMap map[string]*model.Task) map[string]bool
CalculateCriticalPathTasks identifies tasks on the critical path.
func ComputeDownstreamInfo ¶
func ComputeDownstreamInfo(tasks []*model.Task) map[string]DownstreamInfo
ComputeDownstreamInfo computes downstream counts and max priority for each task.
func HasIncompleteChildren ¶
HasIncompleteChildren returns true if the task has any children that are not resolved.
func HasUnmetDependencies ¶
HasUnmetDependencies checks if any dependency is not completed.
Types ¶
type DownstreamInfo ¶
DownstreamInfo holds both the count and max priority of downstream tasks.
type Options ¶
type Options struct {
Limit int
Filters []string
QuickWins bool
Critical bool
Scope string
ScopeExact bool
ArchivedTasks []*model.Task
}
Options controls recommendation behaviour.
type Recommendation ¶
type Recommendation struct {
Rank int `json:"rank" yaml:"rank"`
ID string `json:"id" yaml:"id"`
Title string `json:"title" yaml:"title"`
FilePath string `json:"file_path" yaml:"file_path"`
Status string `json:"status" yaml:"status"`
Priority string `json:"priority" yaml:"priority"`
Effort string `json:"effort,omitempty" yaml:"effort,omitempty"`
Score int `json:"score" yaml:"score"`
Reasons []string `json:"reasons" yaml:"reasons"`
DownstreamCount int `json:"downstream_count" yaml:"downstream_count"`
OnCriticalPath bool `json:"on_critical_path" yaml:"on_critical_path"`
}
Recommendation represents a scored task recommendation.