reconcile

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

Documentation

Overview

Package reconcile provides spec reconciliation capabilities.

Package reconcile provides spec reconciliation capabilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckApprovals

func CheckApprovals(approvals map[types.SpecType]*types.Approval) ([]types.SpecType, []types.SpecType)

CheckApprovals verifies that required specs are approved.

Types

type Conflict

type Conflict struct {
	ID          string           `json:"id"`
	Type        string           `json:"type"` // requirement, constraint, tradeoff
	Description string           `json:"description"`
	Sources     []types.SpecType `json:"sources"`
	Severity    string           `json:"severity"` // high, medium, low
	Resolution  string           `json:"resolution,omitempty"`
}

Conflict represents a detected conflict between specs.

func ParseConflictsFromOutput

func ParseConflictsFromOutput(content string) []Conflict

ParseConflictsFromOutput extracts resolved conflicts from LLM output.

type ConflictDetector

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

ConflictDetector analyzes specs for potential conflicts.

func NewConflictDetector

func NewConflictDetector() *ConflictDetector

NewConflictDetector creates a new conflict detector.

func (*ConflictDetector) DetectConflicts

func (d *ConflictDetector) DetectConflicts(input ReconcileInput) []DetectedConflict

DetectConflicts analyzes input specs and returns potential conflicts.

type ConflictSeverity

type ConflictSeverity string

ConflictSeverity represents the severity of a conflict.

const (
	SeverityHigh   ConflictSeverity = "high"
	SeverityMedium ConflictSeverity = "medium"
	SeverityLow    ConflictSeverity = "low"
)

type ConflictType

type ConflictType string

ConflictType represents the type of conflict between specs.

const (
	ConflictTypeRequirement ConflictType = "requirement"
	ConflictTypeConstraint  ConflictType = "constraint"
	ConflictTypeTradeoff    ConflictType = "tradeoff"
	ConflictTypeMissing     ConflictType = "missing"
)

type DetectedConflict

type DetectedConflict struct {
	Conflict
	Confidence float64 `json:"confidence"` // 0.0-1.0
}

DetectedConflict represents a potential conflict found during analysis.

type LLMClient

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

LLMClient defines the interface for LLM operations.

type ReconcileInput

type ReconcileInput struct {
	ProjectName  string
	MRD          string
	PRD          string
	UXD          string
	TRD          string
	IRD          string
	Press        string
	FAQ          string
	Constitution string
}

ReconcileInput contains all approved specs for reconciliation.

type ReconcileResult

type ReconcileResult struct {
	Content     string           `json:"content"`
	Sources     []types.SpecType `json:"sources"`
	Conflicts   []Conflict       `json:"conflicts,omitempty"`
	GeneratedAt time.Time        `json:"generated_at"`
	DecisionLog []string         `json:"decision_log,omitempty"`
}

ReconcileResult contains the unified spec and metadata.

type Reconciler

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

Reconciler generates unified specs from approved source specs.

func NewReconciler

func NewReconciler(client LLMClient) *Reconciler

NewReconciler creates a new reconciler with the given LLM client.

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, input ReconcileInput) (*ReconcileResult, error)

Reconcile generates a unified spec.md from approved specs.

Jump to

Keyboard shortcuts

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