scope

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package scope detects and reports scope creep across plan evolution.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Narrate

func Narrate(ctx context.Context, prov provider.Provider, model string, r *Report) error

Narrate calls the AI provider to generate a scope creep narrative and attaches it to the report. It mutates r.Narrative in place.

func NarratePrompt

func NarratePrompt(r *Report) string

NarratePrompt returns the AI prompt for scope creep narration.

Types

type PriorityChange

type PriorityChange struct {
	TaskID      int
	TaskTitle   string
	OldPriority int
	NewPriority int
}

PriorityChange records a task whose priority changed between snapshots.

type Report

type Report struct {
	BaselineVersion   int
	CurrentVersion    int
	BaselineTimestamp time.Time
	CurrentTimestamp  time.Time
	BaselineGoal      string
	CurrentGoal       string
	GoalDrifted       bool

	TasksAdded          []*pm.Task
	TasksRemoved        []*pm.Task
	PriorityEscalated   []PriorityChange
	PriorityDeescalated []PriorityChange

	BaselineTaskCount int
	CurrentTaskCount  int

	// ScopeCreepScore is 0–100. Higher means more scope has been added.
	ScopeCreepScore int

	// Narrative is the AI-generated assessment.
	Narrative string
}

Report holds the full scope creep analysis result.

func Analyze

func Analyze(workDir string, baselineVersion int) (*Report, error)

Analyze compares a baseline snapshot against the current plan and returns a scope creep Report. workDir is the project root. baselineVersion is the version number to use as the baseline (0 = first snapshot). If no snapshots exist an error is returned.

Jump to

Keyboard shortcuts

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