spec

package
v0.3.0-alpha.1 Latest Latest
Warning

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

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

Documentation

Overview

Package spec provides types and functions for generating epics and tasks from design specifications

Package spec provides types and functions for generating epics and tasks from design specifications

Package spec provides types and functions for generating epics and tasks from design specifications

Package spec provides types and functions for generating epics and tasks from design specifications

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

type Analyzer struct {
	// contains filtered or unexported fields
}

Analyzer uses AI to break down specs into epics and tasks

func NewAnalyzer

func NewAnalyzer(llmClient *llmclient.Client, model string) *Analyzer

NewAnalyzer creates a new spec analyzer

func NewAnalyzerWithDirectAPI

func NewAnalyzerWithDirectAPI(apiKey, model string) *Analyzer

NewAnalyzerWithDirectAPI creates a new spec analyzer that uses Anthropic API directly

func (*Analyzer) AnalyzeSpec

func (a *Analyzer) AnalyzeSpec(ctx context.Context, content string) (*SpecAnalysis, error)

AnalyzeSpec analyzes design content and generates epics/tasks

type EpicSpec

type EpicSpec struct {
	Title       string     `json:"title"`
	Description string     `json:"description"`
	Tasks       []TaskSpec `json:"tasks"`
}

EpicSpec represents an epic with its tasks

type Parser

type Parser struct{}

Parser reads and parses design spec files

func NewParser

func NewParser() *Parser

NewParser creates a new spec parser

func (*Parser) ParseInput

func (p *Parser) ParseInput(path string) (string, []string, error)

ParseInput reads from a file or folder and returns combined content

type SpecAnalysis

type SpecAnalysis struct {
	Epics []EpicSpec `json:"epics"`
}

SpecAnalysis represents the AI's analysis of design specs

type SubTaskSpec

type SubTaskSpec struct {
	Title       string   `json:"title"`
	Description string   `json:"description"`
	Priority    int      `json:"priority"`
	BlockedBy   []string `json:"blocked_by,omitempty"`
}

SubTaskSpec represents a subtask

type TaskSpec

type TaskSpec struct {
	Title              string        `json:"title"`
	Description        string        `json:"description"`
	Type               string        `json:"type"` // feature, bug, refactor, test, docs, research, fix, other
	Priority           int           `json:"priority"`
	AcceptanceCriteria []string      `json:"acceptance_criteria"`
	TestMode           string        `json:"test_mode"`  // strict, lenient, disabled
	TestScope          string        `json:"test_scope"` // all, diff, skip
	SubTasks           []SubTaskSpec `json:"sub_tasks,omitempty"`
	BlockedBy          []string      `json:"blocked_by,omitempty"`
}

TaskSpec represents a task (story) with optional subtasks

type ValidationResult

type ValidationResult struct {
	Valid  bool     `json:"valid"`
	Errors []string `json:"errors"`
}

ValidationResult represents validation errors

type WriteResult

type WriteResult struct {
	Epics    []*types.Epic
	Tasks    []*types.Task
	SubTasks []*types.Task
}

WriteResult tracks what was created

type Writer

type Writer struct {
	// contains filtered or unexported fields
}

Writer creates epics and tasks in the database

func NewWriter

func NewWriter(store *db.Store) *Writer

NewWriter creates a new spec writer

func (*Writer) WriteAnalysis

func (w *Writer) WriteAnalysis(analysis *SpecAnalysis) (*WriteResult, error)

WriteAnalysis creates epics and tasks from the analysis

Jump to

Keyboard shortcuts

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