Documentation
¶
Overview ¶
Package status generates project status reports.
Index ¶
- func RenderFindings(w io.Writer, findings []Finding) error
- func RenderHTML(w io.Writer, report *Report) error
- func RenderKeyDecisions(w io.Writer, decisions []KeyDecision) error
- func RenderMarkdown(w io.Writer, report *Report) error
- func RenderNextSteps(w io.Writer, steps []string) error
- func RenderPipelineProgress(w io.Writer, pipeline []PipelineStage) error
- func RenderRichMarkdown(w io.Writer, rr *RichReport) error
- func RenderRichText(w io.Writer, rr *RichReport) error
- func RenderSummaryTable(w io.Writer, rr *RichReport) error
- func RenderText(w io.Writer, report *Report) error
- type CategoryBreakdown
- type EvalStatus
- type Finding
- type GraphMetrics
- type KeyDecision
- type PipelineStage
- type Report
- type RichReport
- func (rr *RichReport) SetHighlight(specType types.SpecType, highlight string)
- func (rr *RichReport) SetKeyDecisions(decisions []KeyDecision)
- func (rr *RichReport) SetMediumFindings(findings []Finding)
- func (rr *RichReport) SetNextSteps(steps []string)
- func (rr *RichReport) SetReadySummary(summary string)
- type SpecStatus
- type StageStatus
- type Summary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderFindings ¶ added in v0.10.0
RenderFindings renders the medium findings list.
func RenderHTML ¶
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 ¶
RenderMarkdown renders the report as Markdown.
func RenderNextSteps ¶ added in v0.10.0
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.
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 GenerateWithConfig ¶
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" )