report

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package report contains the structured, headless read-model for JACU state. Markdown is an output projection; it is never used as an input source.

Index

Constants

View Source
const (
	SchemaVersion   = "1"
	KindAdhoc       = "adhoc"
	KindPlan        = "plan"
	KindAudit       = "audit"
	QualityJSONName = "quality.json"
)

Variables

This section is empty.

Functions

func Digest

func Digest(report Report) (string, error)

func EncodeJSON added in v0.4.0

func EncodeJSON(report Report) ([]byte, error)

func Statusline

func Statusline(root string) (string, error)

func Validate

func Validate(report Report) error

Types

type ChartPoint

type ChartPoint struct {
	Label string `json:"label"`
	Value int    `json:"value"`
}

type DecisionPoint

type DecisionPoint struct {
	ID       string   `json:"id"`
	Question string   `json:"question"`
	Kind     string   `json:"kind"`
	Options  []string `json:"options,omitempty"`
	Answer   string   `json:"answer,omitempty"`
}

type FlowBlock

type FlowBlock struct {
	Nodes []FlowNode `json:"nodes"`
	Edges []FlowEdge `json:"edges"`
}

type FlowEdge

type FlowEdge struct {
	From string `json:"from"`
	To   string `json:"to"`
}

type FlowNode

type FlowNode struct {
	ID    string `json:"id"`
	Label string `json:"label"`
	Kind  string `json:"kind"`
	Tech  string `json:"tech,omitempty"`
}

type Metric

type Metric struct {
	Name      string `json:"name"`
	Value     int    `json:"value"`
	ValueText string `json:"value_text,omitempty"`
	Available bool   `json:"available"`
	Heuristic bool   `json:"heuristic,omitempty"`
}

type Report

type Report struct {
	SchemaVersion string       `json:"schema_version"`
	Kind          string       `json:"kind"`
	Title         string       `json:"title"`
	Summary       string       `json:"summary"`
	Blocks        ReportBlocks `json:"blocks"`
}

func BuildAudit

func BuildAudit(root string) (Report, error)

func Prepared added in v0.4.0

func Prepared(report Report) (Report, error)

Prepared normalizes and validates a report so a projector can render it without reimplementing sanitization.

type ReportBlocks

type ReportBlocks struct {
	Summary  []string        `json:"summary"`
	Steps    []ReportStep    `json:"steps"`
	Decision []DecisionPoint `json:"decision"`
	Risks    []string        `json:"risks"`
	Flow     FlowBlock       `json:"flow"`
	Chart    []ChartPoint    `json:"chart"`
	Table    TableBlock      `json:"table"`
	Metrics  []Metric        `json:"metrics"`
}

type ReportStep

type ReportStep struct {
	ID     string `json:"id"`
	Label  string `json:"label"`
	Status string `json:"status"`
}

type TableBlock

type TableBlock struct {
	Columns []string   `json:"columns"`
	Rows    [][]string `json:"rows"`
}

Jump to

Keyboard shortcuts

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