adr

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package adr parses ADR files under docs/decisions and renders the ACTIVE.md index. Generated by awf sync (regenerates docs/decisions/ACTIVE.md).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderActiveMD

func RenderActiveMD(dir string) (string, error)

RenderActiveMD renders the ACTIVE.md index for dir, grouped by status. It returns a placeholder index when dir holds no ADRs (ADR-0020).

func RenderDomainIndex

func RenderDomainIndex(dir, domain string) (string, error)

RenderDomainIndex renders the per-domain ADR index for the decisions directory dir: every ADR whose domains frontmatter includes domain, grouped by status in the same order as ACTIVE.md, with links relative to docs/domains/ (one dir over) and each superseded entry annotated with its successor. Returns a placeholder line when no ADR matches, so the rendered section is never empty.

Types

type ADR

type ADR struct {
	Number            string            // e.g. "0001"
	Title             string            // e.g. "ADR-0001: Template Overlay Rendering Engine"
	Status            string            // e.g. "Accepted"
	Filename          string            // e.g. "0001-template-overlay-rendering-engine.md"
	Path              string            // path as globbed
	Domains           []string          // `domains:` frontmatter (ADR-0014)
	SupersededBy      string            // `superseded_by:` frontmatter (e.g. "0008", or "")
	RetiresInvariants []string          // `retires_invariants:` frontmatter (ADR-0031)
	Sections          map[string]string // `## ` heading -> section body
}

ADR is a parsed ADR record.

func ParseDir

func ParseDir(dir string) ([]ADR, error)

ParseDir scans dir for ADR files (NNNN-*.md) and parses each into an ADR.

Jump to

Keyboard shortcuts

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