promote

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package promote implements deadline-aware automatic priority escalation. It examines pending/in-progress tasks with deadlines and escalates their priority by 1 when the deadline is within the configured threshold (days). Tasks that block overdue tasks are also escalated.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Promotion

type Promotion struct {
	TaskID      int
	Title       string
	OldPriority int
	NewPriority int
	Reason      string
}

Promotion records a single priority escalation event.

func Run

func Run(plan *pm.Plan, thresholdDays int, dryRun bool) []Promotion

Run evaluates the plan and returns the list of promotions. When dryRun is false the task priorities in the plan are mutated in place; callers must persist state afterwards. thresholdDays is the number of days-remaining at which escalation is triggered (default 3; any task whose deadline is within this window and whose priority > 1 is promoted).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL