backlog

package
v0.0.3 Latest Latest
Warning

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

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

Documentation

Overview

Package backlog implements AI-driven product backlog generation. It analyzes a project's codebase and surfaces prioritized improvements, features, bugs, and tech debt organized by impact and effort.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildPrompt

func BuildPrompt(goal, instructions, fileTree, gitLog, memory, existingPlan string) string

BuildPrompt constructs the AI prompt for backlog generation. Pass empty strings for any context that is not available.

func EffortLabel

func EffortLabel(e Effort) string

EffortLabel returns a human-readable effort label.

Types

type Analysis

type Analysis struct {
	Items     []*Item
	Summary   string
	Timestamp time.Time
}

Analysis is the complete result of a backlog analysis run.

func Analyze

func Analyze(ctx context.Context, p provider.Provider, model string, timeout time.Duration, prompt string) (*Analysis, error)

Analyze calls the provider to generate a product backlog analysis.

func Parse

func Parse(output string) (*Analysis, error)

Parse extracts an Analysis from the AI's JSON response.

func (*Analysis) FormatMarkdown

func (a *Analysis) FormatMarkdown() string

FormatMarkdown returns a markdown representation of the backlog.

func (*Analysis) SortByScore

func (a *Analysis) SortByScore()

SortByScore sorts items in-place by their priority score (best first).

type Effort

type Effort string

Effort rates the implementation complexity of a backlog item.

const (
	EffortXS Effort = "xs" // < 1 hour
	EffortS  Effort = "s"  // 1–4 hours
	EffortM  Effort = "m"  // 4–16 hours (half to 2 days)
	EffortL  Effort = "l"  // 16–40 hours (2–5 days)
	EffortXL Effort = "xl" // > 40 hours (> 1 week)
)

type Impact

type Impact string

Impact rates the business/user value of a backlog item.

const (
	ImpactHigh   Impact = "high"
	ImpactMedium Impact = "medium"
	ImpactLow    Impact = "low"
)

type Item

type Item struct {
	ID          int      `json:"id"`
	Title       string   `json:"title"`
	Type        ItemType `json:"type"`
	Impact      Impact   `json:"impact"`
	Effort      Effort   `json:"effort"`
	Description string   `json:"description"`
	Rationale   string   `json:"rationale"`
}

Item is a single entry in the product backlog.

func (*Item) Score

func (item *Item) Score() int

Score returns a priority score for sorting (lower = higher priority). Maximizes impact-to-effort ratio: high impact + low effort ranks first.

type ItemType

type ItemType string

ItemType categorizes a backlog item.

const (
	TypeFeature     ItemType = "feature"
	TypeBug         ItemType = "bug"
	TypeTechDebt    ItemType = "tech_debt"
	TypePerformance ItemType = "performance"
	TypeSecurity    ItemType = "security"
	TypeDocs        ItemType = "docs"
)

Jump to

Keyboard shortcuts

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