status

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

Documentation

Overview

Package status generates project status reports.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderHTML

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

RenderHTML renders the report as HTML.

func RenderMarkdown

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

RenderMarkdown renders the report as Markdown.

func RenderText

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

RenderText renders the report as terminal text.

Types

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"`
	} `json:"findings"`
}

EvalStatus represents evaluation results.

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 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 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 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