Versions in this module Expand all Collapse all v1 v1.5.1 Nov 6, 2026 Changes in this version + const ExtensionPrefix + const RenderedFileName + const RenderedHeader + func IsExtensionKey(key string) bool type PrdFrontmatterV2Json + SteeringVersion *string type Spec + SteeringVersion string + func (s *Spec) RenderedBytes() []byte v1.5.0 Nov 6, 2026 Changes in this version + const DefaultSpecDirName + const PRDFrontmatterSchemaName + const RequirementsSchemaName + const SchemaVersion + const SpecDirEnv + const TasksSchemaName + const TestSpecSchemaName + var GenerationSteps = []GenerationStep + func ArchiveDestination(specDir, root string) (string, error) + func ArtifactFileName(step GenerationStep) string + func ComputeExitCode(findings []LintFinding) int + func ComputeIntentHash(body string) (string, error) + func DecodeArtifact(step GenerationStep, content map[string]any) (any, error) + func EstimateTokens(text string) int + func FormatValidationEntries(entries []ValidationEntry) string + func HasIntent(body string) bool + func IsSpecDirName(name string) bool + func IsSpecName(s string) bool + func LoadDependentInterfaces(specID string, specRoot string) []map[string]any + func MarshalJSON(v interface{}) ([]byte, error) + func MoveToArchive(specDir, root string) error + func MoveUnderArchive(specDir, root string) (string, error) + func NextCriterionID(r Requirement) string + func NextExecutionPathID(req RequirementsV2Json) string + func NextRequirementID(req RequirementsV2Json) string + func NextTaskID(t TasksV2Json) int + func NextTestID(ts TestSpecV2Json) string + func ParseSpecDirName(name string) (string, string, error) + func ResolveSpecsDir(flag, root string) string + func SchemaNameForStep(step GenerationStep) (string, bool) + func Schemas() map[string][]byte + func UnknownFields(raw any, target any) []string + func ValidTaskTransition(current, target TaskState) bool + func ValidTransition(current, target string) bool + type BootstrapError struct + Err *SpecError + Msg string + func (e *BootstrapError) Error() string + func (e *BootstrapError) Unwrap() error + type BootstrapSpec struct + Architecture string + CreatedAt string + PRDBody string + Requirements *RequirementsV2Json + SpecID string + SpecName string + Tasks *TasksV2Json + TestSpec *TestSpecV2Json + Title string + UpdatedAt string + func NewBootstrapSpec(specID, specName string) *BootstrapSpec + func (b *BootstrapSpec) Finalize() (*Spec, []ValidationError) + type CoverageReport struct + Covered []string + Uncovered []string + type Criterion struct + Action string + Condition *string + Contract *string + Guard *string + Id string + Pattern CriterionPattern + System *string + func ComplexEventCriterion(id, condition, guard, system, action string) Criterion + func EventDrivenCriterion(id, condition, system, action string) Criterion + func GetCriterion(r Requirement, id string) (*Criterion, bool) + func OptionalCriterion(id, condition, system, action string) Criterion + func StateDrivenCriterion(id, condition, system, action string) Criterion + func UbiquitousCriterion(id, system, action string) Criterion + func UnwantedCriterion(id, condition, system, action, contract string) Criterion + func (c Criterion) ConditionText() string + func (c Criterion) ContractText() string + func (c Criterion) GuardText() string + func (c Criterion) RenderEARS() string + func (c Criterion) RenderEARSSentence() string + func (c Criterion) SystemName() string + func (c Criterion) WithContract(contract string) Criterion + type CriterionPattern string + const CriterionPatternComplexEvent + const CriterionPatternEventDriven + const CriterionPatternOptional + const CriterionPatternStateDriven + const CriterionPatternUbiquitous + const CriterionPatternUnwanted + type Dependency struct + Reason string + Spec string + type DependencyEdge struct + FromSpec string + Reason string + ToSpec string + type DependencyGraph struct + Edges []DependencyEdge + func BuildDependencyGraph(metas []SpecMeta, root string) (*DependencyGraph, error) + func (g *DependencyGraph) Dependencies(specID string) []DependencyEdge + func (g *DependencyGraph) Dependents(specID string) []DependencyEdge + func (g *DependencyGraph) TopologicalSort() ([]string, error) + type ExecutionPath struct + Id string + Steps []PathStep + Title string + type ExternalApi struct + Package string + Symbols []ExternalApiSymbol + Verified bool + Version string + type ExternalApiSymbol struct + ImportPath string + Name string + Notes *string + Signature string + type GenerationStep string + const StepRequirements + const StepTasks + const StepTestSpec + type IntentError struct + Err *SpecError + Msg string + func (e *IntentError) Error() string + func (e *IntentError) Unwrap() error + type LifecycleError struct + Err *SpecError + Msg string + func (e *LifecycleError) Error() string + func (e *LifecycleError) Unwrap() error + type LintFinding struct + File string + Line int + Message string + Rule string + Severity string + SpecName string + func SortFindings(findings []LintFinding) []LintFinding + type LintResult struct + ExitCode int + Findings []LintFinding + func RunLintSpecs(specsDir string, lintAll bool) (LintResult, error) + type LintSpecInfo struct + HasPRD bool + HasTasks bool + Name string + Path string + Prefix int + func DiscoverLintSpecs(specsDir, filterSpec string) ([]LintSpecInfo, error) + type LoadError struct + Err *SpecError + File string + Msg string + func (e *LoadError) Error() string + func (e *LoadError) Unwrap() error + type PartialSpec struct + Requirements *RequirementsV2Json + SpecID string + SpecName string + Tasks *TasksV2Json + TestSpec *TestSpecV2Json + type PathStep struct + Action string + Actor string + type PrdFrontmatterV2Json struct + CreatedAt string + IntentHash PrdFrontmatterV2JsonIntentHash + Owner *string + SchemaVersion int + Source *string + SpecId string + SpecName string + Status PrdFrontmatterV2JsonStatus + Supersedes []string + Tags []string + Title string + UpdatedAt string + type PrdFrontmatterV2JsonIntentHash *string + type PrdFrontmatterV2JsonStatus string + const PrdFrontmatterV2JsonStatusActive + const PrdFrontmatterV2JsonStatusArchived + const PrdFrontmatterV2JsonStatusDraft + const PrdFrontmatterV2JsonStatusSealed + const PrdFrontmatterV2JsonStatusSuperseded + type RenderOption func(*renderConfig) + func WithMaxTokens(n int) RenderOption + type Requirement struct + Criteria []Criterion + Id string + Rationale *string + Title string + func AddCriterion(r Requirement, c Criterion) (Requirement, error) + func GetRequirement(req RequirementsV2Json, id string) (*Requirement, bool) + type RequirementsV2Json struct + ExecutionPaths []ExecutionPath + ExternalApis []ExternalApi + Glossary RequirementsV2JsonGlossary + Introduction string + Requirements []Requirement + Schema string + SchemaVersion int + SpecId string + SpecName string + func AddExecutionPath(req RequirementsV2Json, p ExecutionPath) (RequirementsV2Json, error) + func AddExternalAPI(req RequirementsV2Json, api ExternalApi) (RequirementsV2Json, error) + func AddRequirement(req RequirementsV2Json, r Requirement) (RequirementsV2Json, error) + func RemoveGlossaryEntry(req RequirementsV2Json, term string) (RequirementsV2Json, bool) + func RemoveRequirement(req RequirementsV2Json, id string) (RequirementsV2Json, bool) + func SetGlossaryEntry(req RequirementsV2Json, term, definition string) RequirementsV2Json + func (r *RequirementsV2Json) Render() string + type RequirementsV2JsonGlossary map[string]string + type SaveError struct + Err *SpecError + Msg string + func (e *SaveError) Error() string + func (e *SaveError) Unwrap() error + type Spec struct + Architecture string + CreatedAt string + Dir string + IntentHash *string + Owner string + PRDBody string + Requirements *RequirementsV2Json + SchemaVersion int + Source string + SpecID string + SpecName string + Status string + Supersedes []string + Tags []string + Tasks *TasksV2Json + TestSpec *TestSpecV2Json + Title string + UpdatedAt string + func CreateSpec(specID, specName string) *Spec + func LoadSpec(dir string) (*Spec, error) + func (s *Spec) ComputeTraceability() TraceabilityMatrix + func (s *Spec) IsScaffold() bool + func (s *Spec) RenderCombined(opts ...RenderOption) string + func (s *Spec) RenderIndividual(opts ...RenderOption) map[string]string + func (s *Spec) RenderIndividualScoped(taskID int, opts ...RenderOption) map[string]string + func (s *Spec) Save(dir string) error + func (s *Spec) Supersede(supersedingSpecID, dir string) (*Spec, error) + func (s *Spec) Transition(target, dir string) (*Spec, error) + func (s *Spec) Validate() ValidationResult + func (s *Spec) ValidateCrossFile() ValidationResult + func (s *Spec) ValidateSchema() ValidationResult + func (s *Spec) ValidateStructured() map[string]any + type SpecError struct + Msg string + func (e *SpecError) Error() string + type SpecMeta struct + Dir string + SpecID string + SpecName string + Status string + func DiscoverSpecs(root string) ([]SpecMeta, error) + func LoadSpecLandscape(root string, includeArchive bool, currentSpecID string) ([]SpecMeta, error) + type Task struct + Criteria []string + DependsOn []int + DoneWhen []string + Id int + Kind TaskKind + Optional *bool + State TaskState + Steps []string + Tests []string + Title string + Touches []string + func (t Task) IsOptional() bool + type TaskKind string + const TaskKindImplement + const TaskKindIntegration + type TaskState string + const TaskStateDone + const TaskStateDropped + const TaskStateInProgress + const TaskStatePending + type TasksV2Json struct + Dependencies []Dependency + Schema string + SchemaVersion int + SpecId string + SpecName string + Tasks []Task + TestCommands TestCommands + func AddDependency(t TasksV2Json, d Dependency) TasksV2Json + func AddTask(t TasksV2Json, task Task) (TasksV2Json, error) + func (t *TasksV2Json) CompleteTaskStates(taskIDs []int) *TasksV2Json + func (t *TasksV2Json) GetTask(id int) (*Task, bool) + func (t *TasksV2Json) IsReady(id int) bool + func (t *TasksV2Json) NextTask() (*Task, bool) + func (t *TasksV2Json) Render() string + func (t *TasksV2Json) ResetTaskStates(taskIDs []int) *TasksV2Json + func (t *TasksV2Json) TransitionTask(taskID int, target string) (*TasksV2Json, error) + type Test struct + Given []string + Id string + Kind TestKind + Pseudocode *string + RealComponents []string + Then []string + Title string + Verifies []string + When string + func GetTest(ts TestSpecV2Json, id string) (*Test, bool) + type TestCommands struct + AllTests string + Linter string + SpecTests *string + type TestKind string + const TestKindIntegration + const TestKindProperty + const TestKindSmoke + const TestKindUnit + type TestSpecV2Json struct + Schema string + SchemaVersion int + SpecId string + SpecName string + Tests []Test + func AddTest(ts TestSpecV2Json, t Test) (TestSpecV2Json, error) + func (ts *TestSpecV2Json) ComputeCoverage(req *RequirementsV2Json) CoverageReport + func (ts *TestSpecV2Json) Render() string + func (ts *TestSpecV2Json) TestsOfKind(kind TestKind) []Test + type TraceLink struct + Covered bool + ID string + Kind string + Owned bool + Tasks []int + Tests []string + type TraceabilityMatrix struct + Links []TraceLink + type ValidationEntry struct + Artifact string + Category string + Check string + EntityID string + Keyword string + Message string + Path string + Value string + func ValidateArtifactSchema(artifact any, schemaName, artifactName string) []ValidationEntry + type ValidationError struct + Message string + Rule string + type ValidationResult struct + Errors []ValidationEntry + Valid bool + Warnings []ValidationEntry + func ValidateCrossSpec(specs []*Spec, graph *DependencyGraph) ValidationResult + func ValidateGenerationStep(step GenerationStep, partial PartialSpec) ValidationResult + func ValidateGenerationStepComplete(step GenerationStep, partial PartialSpec) ValidationResult