plan

package
v0.1.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscoverCapabilityDeltas

func DiscoverCapabilityDeltas(owner *corepath.Owner, change string) ([]CapabilityDelta, []Diagnostic)

func NormalizeRequirementIdentity

func NormalizeRequirementIdentity(name string) string

func Scaffold

func Scaffold(owner *corepath.Owner, change, capability string) ([]string, error)

Scaffold creates only absent planning artifacts. Existing bytes are untouched.

func Template

func Template(name TemplateName) ([]byte, error)

func Templates

func Templates() map[TemplateName][]byte

func WriteArtifacts

func WriteArtifacts(dir, capability string) ([]string, error)

WriteArtifacts writes the absent planning artifacts under dir from embedded bytes and returns the created paths. It takes no lock and validates no state: callers own locking, state validation, and path-safety checks. Existing bytes are untouched.

Types

type CapabilityDelta

type CapabilityDelta struct {
	Capability  string
	Purpose     []byte
	Source      Source
	Operations  []Operation
	Diagnostics []Diagnostic
}

func ParseCapabilityDelta

func ParseCapabilityDelta(source Source, capability string, accepted Source) CapabilityDelta

ParseCapabilityDelta projects one capability delta. accepted is the accepted capability spec this delta targets; an absent Source means a new capability.

type Change

type Change struct {
	Root        string
	Name        string
	Proposal    Proposal
	Deltas      []CapabilityDelta
	Design      Design
	Tasks       Tasks
	Trace       Trace
	Diagnostics []Diagnostic
}

Change is the only semantic projection of one authored change.

func ParseChange

func ParseChange(owner *corepath.Owner, name string) Change

func (*Change) Inspection

func (change *Change) Inspection() Inspection

func (*Change) Validation

func (change *Change) Validation() Validation

type DeltaOperation

type DeltaOperation string
const (
	Added    DeltaOperation = "ADDED"
	Modified DeltaOperation = "MODIFIED"
	Removed  DeltaOperation = "REMOVED"
	Renamed  DeltaOperation = "RENAMED"
)

type Design

type Design struct {
	Source      Source
	Sections    []Section
	References  []RequirementReference
	Diagnostics []Diagnostic
}

func ParseDesign

func ParseDesign(source Source) Design

type Diagnostic

type Diagnostic struct {
	Code     string
	Location Location
	Message  string
	Repair   string
}

type Inspection

type Inspection struct{ Canonical *Change }

Inspection and Validation deliberately point at the same canonical result. Later consumers may add view-only helpers without reading Markdown again.

type Location

type Location struct {
	Path   string
	Offset int
	Line   int
	Column int
}

Location identifies authored bytes in one artifact.

type Operation

type Operation struct {
	Kind        DeltaOperation
	Requirement *Requirement
	From        string
	To          string
	Reason      string
	Migration   string
	Raw         []byte
	Location    Location
}

type Proposal

type Proposal struct {
	Source      Source
	Sections    []Section
	Diagnostics []Diagnostic
}

func ParseProposal

func ParseProposal(source Source) Proposal

type Requirement

type Requirement struct {
	Name      string
	Identity  string
	Raw       []byte
	Location  Location
	Scenarios []Scenario
}

type RequirementReference

type RequirementReference struct {
	Capability  string
	Requirement string
	Location    Location
}

type RequirementTrace

type RequirementTrace struct {
	Capability  string
	Requirement string
	Location    Location
	Tasks       []string
}

type Scenario

type Scenario struct {
	Name     string
	Raw      []byte
	Location Location
}

type Section

type Section struct {
	Name        string
	Heading     string
	Content     []byte
	Location    Location
	ContentFrom Location
	Placeholder bool
}

type Source

type Source struct {
	Path    string
	Bytes   []byte
	Present bool
}

Source preserves an artifact exactly as read.

type Task

type Task struct {
	ID         string
	Role       string
	Files      []string
	DependsOn  []string
	References []RequirementReference
	Verify     string
	Acceptance string
	Source     []byte
	Location   Location
	Valid      bool
}

type TaskTrace

type TaskTrace struct {
	TaskID       string
	Requirements []RequirementReference
}

type TaskWave

type TaskWave struct {
	Number int
	Tasks  []string
}

type Tasks

type Tasks struct {
	Source      Source
	Tasks       []Task
	Waves       []TaskWave
	Diagnostics []Diagnostic
}

func ParseTasks

func ParseTasks(source Source) Tasks

type TemplateName

type TemplateName string
const (
	ProposalTemplate TemplateName = "proposal"
	SpecTemplate     TemplateName = "spec"
	DesignTemplate   TemplateName = "design"
	TasksTemplate    TemplateName = "tasks"
)

type Trace

type Trace struct {
	Requirements []RequirementTrace
	Tasks        []TaskTrace
}

type Validation

type Validation struct{ Canonical *Change }

Jump to

Keyboard shortcuts

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