epic

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: 6 Imported by: 0

Documentation

Overview

Package epic clusters a task plan into named epics/themes using AI. Each epic groups semantically related tasks by business value and domain.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyTags

func ApplyTags(plan *pm.Plan, epics []*Epic) int

ApplyTags writes an "epic:<name>" tag to each task referenced by an epic. Existing epic: tags are removed before applying the new assignment.

func ClusterPrompt

func ClusterPrompt(plan *pm.Plan) string

ClusterPrompt builds the prompt sent to the AI provider.

Types

type Epic

type Epic struct {
	Name        string `json:"name"`
	Description string `json:"description"` // one-sentence summary
	TaskIDs     []int  `json:"task_ids"`
}

Epic is a named theme grouping related tasks.

func Cluster

func Cluster(ctx context.Context, p provider.Provider, model string, plan *pm.Plan) ([]*Epic, error)

Cluster calls the provider and returns a structured list of epics.

func EpicsFromTags

func EpicsFromTags(plan *pm.Plan) []*Epic

EpicsFromTags rebuilds epics from existing "epic:<name>" tags in the plan. Returns nil if no tasks have epic tags.

func ParseResponse

func ParseResponse(raw string) ([]*Epic, error)

ParseResponse parses the AI's JSON response into a slice of Epics.

type EpicProgress

type EpicProgress struct {
	Epic
	Total   int `json:"total"`
	Done    int `json:"done"`
	Failed  int `json:"failed"`
	Skipped int `json:"skipped"`
	Pending int `json:"pending"`
}

EpicProgress augments Epic with live completion statistics.

func Progress

func Progress(plan *pm.Plan, epics []*Epic) []*EpicProgress

Progress computes EpicProgress for each epic based on current task statuses.

Jump to

Keyboard shortcuts

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