Documentation
¶
Overview ¶
Package plan parses plan files under docs/plans and scaffolds new plans from the rendered plans template (awf new plan). Unlike internal/adr it is not coupled to sequential numbering - plans are date-prefixed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var FilenameRe = regexp.MustCompile(`^\d{4}-\d{2}-\d{2}-.+\.md$`)
FilenameRe matches a plan filename (YYYY-MM-DD-slug.md); it excludes template.md and README.md just as adr.FilenameRe's numeric form does.
var ValidStatuses = map[string]bool{"Proposed": true, "Implemented": true}
ValidStatuses are the two plan lifecycle states (ADR-0097): mutable while Proposed, frozen at Implemented.
Functions ¶
func NewFile ¶
NewFile scaffolds a new plan under dir from the rendered plans template (dir/template.md): today's date filled, marker comments stripped, named YYYY-MM-DD-slug.md. No sequential number is allocated. Refuses to overwrite. touches-invariant: plan-new-unnumbered - unnumbered dated plan scaffold; proof in plan_test.go
Types ¶
type Plan ¶
type Plan struct {
Filename string
Path string
Date string
ADRs []int
Status string
HasFrontmatter bool
// CommitSubjects are the planned commit subjects a plan marks with “`commit
// fences (ADR-0111): the first non-empty line of each fenced block whose info
// string's first token is `commit` and which carries no `awf-ignore` opt-out.
CommitSubjects []string
}
Plan is a parsed plan record. HasFrontmatter is false for the grandfathered pre-convention corpus (ADR-0098), which the checks skip.