plans

package
v0.16.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package plans handles arc-owned design-spec markdown frontmatter.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoFrontmatter = errors.New("no frontmatter status line")

ErrNoFrontmatter is returned when a file has no frontmatter or no status line.

Functions

func EnsureFrontmatter

func EnsureFrontmatter(path string, meta Frontmatter) error

EnsureFrontmatter idempotently writes the arc-owned frontmatter block, preserving body. Atomic.

func SetStatus

func SetStatus(path, status string) error

SetStatus surgically replaces only the `status:` line in the leading frontmatter. Atomic. ErrNoFrontmatter (sentinel) if no frontmatter/status line — caller warns and continues.

Types

type ArcReview

type ArcReview struct {
	Kind string `yaml:"kind"` // always "legacy" going forward
	ID   string `yaml:"id"`
}

type Frontmatter

type Frontmatter struct {
	Title     string    `yaml:"title"`
	Date      string    `yaml:"date"`
	Project   string    `yaml:"project"`
	Status    string    `yaml:"status"`
	Tags      []string  `yaml:"tags"`
	ArcReview ArcReview `yaml:"arc_review"`
}

func ReadFrontmatter

func ReadFrontmatter(b []byte) (fm Frontmatter, body []byte, ok bool, err error)

ReadFrontmatter parses a leading --- block. ok=false if absent (legacy doc).

Jump to

Keyboard shortcuts

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