status

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package status generates project status reports.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderFindings added in v0.10.0

func RenderFindings(w io.Writer, findings []Finding) error

RenderFindings renders the medium findings list.

func RenderHTML

func RenderHTML(w io.Writer, report *Report) error

RenderHTML renders the report as HTML.

func RenderKeyDecisions added in v0.10.0

func RenderKeyDecisions(w io.Writer, decisions []KeyDecision) error

RenderKeyDecisions renders the key decisions table with box-drawing.

func RenderMarkdown

func RenderMarkdown(w io.Writer, report *Report) error

RenderMarkdown renders the report as Markdown.

func RenderNextSteps added in v0.10.0

func RenderNextSteps(w io.Writer, steps []string) error

RenderNextSteps renders the next steps list.

func RenderPipelineProgress added in v0.10.0

func RenderPipelineProgress(w io.Writer, pipeline []PipelineStage) error

RenderPipelineProgress renders the pipeline visualization with arrows and status icons.

func RenderRichMarkdown added in v0.10.0

func RenderRichMarkdown(w io.Writer, rr *RichReport) error

RenderRichMarkdown renders the rich report as Markdown with code blocks for tables.

func RenderRichText added in v0.10.0

func RenderRichText(w io.Writer, rr *RichReport) error

RenderRichText renders the rich report as terminal text with box-drawing.

func RenderSummaryTable added in v0.10.0

func RenderSummaryTable(w io.Writer, rr *RichReport) error

RenderSummaryTable renders the summary table with box-drawing characters.

func RenderText

func RenderText(w io.Writer, report *Report) error

RenderText renders the report as terminal text.

Types

type CategoryBreakdown added in v0.10.0

type CategoryBreakdown struct {
	Pass    int `json:"pass"`
	Partial int `json:"partial"`
	Fail    int `json:"fail"`
	Total   int `json:"total"`
}

CategoryBreakdown represents category pass/partial/fail counts.

type EvalStatus

type EvalStatus struct {
	Exists   bool   `json:"exists"`
	Decision string `json:"decision"` // pass, conditional, fail
	Findings struct {
		Critical int `json:"critical"`
		High     int `json:"high"`
		Medium   int `json:"medium"`
		Low      int `json:"low"`
		Info     int `json:"info"`
	} `json:"findings"`
	// Categories breakdown from rubric evaluation
	Categories *CategoryBreakdown `json:"categories,omitempty"`
}

EvalStatus represents evaluation results.

type Finding added in v0.10.0

type Finding struct {
	Spec        types.SpecType `json:"spec"`
	Severity    string         `json:"severity"` // critical, high, medium, low, info
	Description string         `json:"description"`
}

Finding represents a single evaluation finding with description.

type GraphMetrics

type GraphMetrics struct {
	TotalRequirements int     `json:"total_requirements"`
	TotalUserStories  int     `json:"total_user_stories"`
	TotalConstraints  int     `json:"total_constraints"`
	TotalDecisions    int     `json:"total_decisions"`
	TraceCoverage     float64 `json:"trace_coverage"` // Percentage of requirements traced to TRD
	ConflictCount     int     `json:"conflict_count"`
	GraphPath         string  `json:"graph_path,omitempty"`
}

GraphMetrics contains traceability and graph statistics.

type KeyDecision added in v0.10.0

type KeyDecision struct {
	Area   string `json:"area"`   // e.g., "Local Dev", "Cloud", "IaC"
	Choice string `json:"choice"` // e.g., "AWS with Pulumi Go SDK"
}

KeyDecision represents an architectural or design decision.

type PipelineStage added in v0.10.0

type PipelineStage struct {
	Type   types.SpecType `json:"type"`
	Status StageStatus    `json:"status"` // complete, pending, missing
	Label  string         `json:"label"`  // Display label (e.g., "MRD", "spec.md")
}

PipelineStage represents a single stage in the pipeline visualization.

type Report

type Report struct {
	Project      string                `json:"project"`
	Path         string                `json:"path"`
	GeneratedAt  time.Time             `json:"generated_at"`
	Readiness    types.ReadinessStatus `json:"readiness"`
	Specs        []SpecStatus          `json:"specs"`
	Summary      Summary               `json:"summary"`
	GraphMetrics *GraphMetrics         `json:"graph_metrics,omitempty"`
}

Report represents a project status report.

func Generate

func Generate(project *types.Project) (*Report, error)

Generate generates a status report for a project.

func GenerateWithConfig

func GenerateWithConfig(project *types.Project, specConfig *types.SpecConfig) (*Report, error)

GenerateWithConfig generates a status report using a custom SpecConfig.

func (*Report) WithGraphMetrics

func (r *Report) WithGraphMetrics(metrics *GraphMetrics) *Report

WithGraphMetrics adds graph metrics to a report. This is a separate call because graph extraction can be expensive.

type RichReport added in v0.10.0

type RichReport struct {
	*Report

	// Pipeline is the ordered list of specs with their statuses for visualization.
	Pipeline []PipelineStage `json:"pipeline"`

	// AggregateCategories is the total category breakdown across all specs.
	AggregateCategories CategoryBreakdown `json:"aggregate_categories"`

	// CompletionPercent is the percentage of specs that are complete.
	CompletionPercent int `json:"completion_percent"`

	// Highlights maps spec type to a brief highlight string (LLM-generated).
	// Example: "MRD" -> "Market analysis, competitive positioning"
	Highlights map[types.SpecType]string `json:"highlights,omitempty"`

	// MediumFindings is a list of non-blocking medium-severity findings (LLM-generated).
	MediumFindings []Finding `json:"medium_findings,omitempty"`

	// NextSteps is a prioritized list of recommended next actions (LLM-generated).
	NextSteps []string `json:"next_steps,omitempty"`

	// KeyDecisions are important architectural/design decisions extracted from specs (LLM-generated).
	KeyDecisions []KeyDecision `json:"key_decisions,omitempty"`

	// ReadySummary is a one-line summary of readiness state (LLM-generated).
	ReadySummary string `json:"ready_summary,omitempty"`
}

RichReport extends Report with LLM-filled semantic fields for enhanced display. The deterministic fields (Pipeline, AggregateCategories) are computed from specs. The semantic fields (Highlights, MediumFindings, NextSteps, KeyDecisions) are LLM-generated.

func NewRichReport added in v0.10.0

func NewRichReport(report *Report) *RichReport

NewRichReport creates a RichReport from a Report, computing deterministic fields. LLM-filled fields (Highlights, MediumFindings, NextSteps, KeyDecisions) are left empty and should be populated separately via the Set* methods.

func (*RichReport) SetHighlight added in v0.10.0

func (rr *RichReport) SetHighlight(specType types.SpecType, highlight string)

SetHighlight sets the LLM-generated highlight for a spec type.

func (*RichReport) SetKeyDecisions added in v0.10.0

func (rr *RichReport) SetKeyDecisions(decisions []KeyDecision)

SetKeyDecisions sets the LLM-generated key decisions.

func (*RichReport) SetMediumFindings added in v0.10.0

func (rr *RichReport) SetMediumFindings(findings []Finding)

SetMediumFindings sets the LLM-generated medium findings.

func (*RichReport) SetNextSteps added in v0.10.0

func (rr *RichReport) SetNextSteps(steps []string)

SetNextSteps sets the LLM-generated next steps.

func (*RichReport) SetReadySummary added in v0.10.0

func (rr *RichReport) SetReadySummary(summary string)

SetReadySummary sets the LLM-generated readiness summary.

type SpecStatus

type SpecStatus struct {
	Type       types.SpecType     `json:"type"`
	Category   types.SpecCategory `json:"category"`
	Filename   string             `json:"filename"`
	Exists     bool               `json:"exists"`
	Required   bool               `json:"required"`
	Status     types.SpecStatus   `json:"status"`
	EvalStatus *EvalStatus        `json:"eval_status,omitempty"`
	Approval   *types.Approval    `json:"approval,omitempty"`
}

SpecStatus represents the status of a single spec.

type StageStatus added in v0.10.0

type StageStatus string

StageStatus represents the status of a pipeline stage.

const (
	StageComplete StageStatus = "complete"
	StagePending  StageStatus = "pending"
	StageMissing  StageStatus = "missing"
)

type Summary

type Summary struct {
	TotalSpecs     int `json:"total_specs"`
	PresentSpecs   int `json:"present_specs"`
	EvaluatedSpecs int `json:"evaluated_specs"`
	ApprovedSpecs  int `json:"approved_specs"`
	BlockingIssues int `json:"blocking_issues"`
}

Summary provides aggregate statistics.

Jump to

Keyboard shortcuts

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