decisionlog

package
v0.2.15 Latest Latest
Warning

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

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

Documentation

Overview

Package decisionlog parses and validates the decision-log file-format contract used by the cy-capture-decisions extension: the per-decision record bodies (.compozy/decisions/AD-NNN.md) and the terse active-proven index (.compozy/DECISIONS.md). It ships no runtime behavior — it is a CI/test-only asset (ADR-004) that gives `make verify` a deterministic gate over the log contract authored in the extension's references/ files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(fsys fs.FS) error

Validate validates a full decision log rooted at fsys: the DECISIONS.md index, every AD-NNN.md body under decisions/, that each index line resolves to an existing active-proven body whose denormalized fields match, that every active-proven body is itself indexed (the membership biconditional), and that supersession metadata is consistent.

Types

type DecisionRecordMeta

type DecisionRecordMeta struct {
	ID           string   `yaml:"id"`
	Title        string   `yaml:"title"`
	Status       string   `yaml:"status"`
	Tags         []string `yaml:"tags"`
	SourceSlug   string   `yaml:"source_slug"`
	SourceADR    string   `yaml:"source_adr"`
	PromotedAt   string   `yaml:"promoted_at"`
	Supersedes   []string `yaml:"supersedes"`
	SupersededBy string   `yaml:"superseded_by"`
	Evidence     string   `yaml:"evidence"`
}

DecisionRecordMeta is the YAML frontmatter of a .compozy/decisions/AD-NNN.md decision record. Field order and tags mirror the canonical template so a hand-authored or skill-produced record round-trips through this validator.

Jump to

Keyboard shortcuts

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