synth

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package synth provides spec synthesis (generation) capabilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanSynthesize

func CanSynthesize(specType types.SpecType) bool

CanSynthesize returns whether a spec type can be synthesized.

func RequiredSources

func RequiredSources(targetType types.SpecType) []types.SpecType

RequiredSources returns the source spec types needed to synthesize a target type. This implements the Working Backwards flow where:

MRD → Press → FAQ → PRD → (UXD) → TRD → IRD

Types

type LLMClient

type LLMClient interface {
	Complete(ctx context.Context, prompt string) (string, error)
}

LLMClient defines the interface for LLM operations.

type SynthesisInput

type SynthesisInput struct {
	MRD          string // Market Requirements Document
	PRD          string // Product Requirements Document
	UXD          string // User Experience Design
	TRD          string // Technical Requirements Document (for IRD synthesis)
	Constitution string // Project/org constitution
	Press        string // Press Release (for FAQ and PRD synthesis)
	FAQ          string // FAQ document (for PRD synthesis)
	Context      string // Aggregated context summary (for grounding)
}

SynthesisInput contains the input documents for synthesis.

type SynthesisResult

type SynthesisResult struct {
	SpecType types.SpecType
	Content  string
	Sources  []types.SpecType // Source specs used
}

SynthesisResult contains the generated document and metadata.

type Synthesizer

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

Synthesizer generates specs from source documents using LLM.

func NewSynthesizer

func NewSynthesizer(client LLMClient) *Synthesizer

NewSynthesizer creates a new synthesizer with the given LLM client.

func (*Synthesizer) Synthesize

func (s *Synthesizer) Synthesize(ctx context.Context, targetType types.SpecType, input SynthesisInput) (*SynthesisResult, error)

Synthesize generates a spec of the given type from input documents.

Jump to

Keyboard shortcuts

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