decisions

package
v0.1.101 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package decisions keeps an app's decision log, docs/decisions.md: why the app is built the way it is (a pack added, Rust chosen for a module, a dependency taken, a schema tradeoff), one dated entry each, written by people and agents alike and read before working in those areas. A recipe says how this app does something; a decision says why.

Index

Constants

View Source
const File = "docs/decisions.md"

File is the log, relative to the app root.

Variables

This section is empty.

Functions

func Ensure

func Ensure(dir, app string) (bool, error)

Ensure writes the log with its header when the app has none.

Types

type Entry

type Entry struct {
	Date    string `json:"date"`
	Title   string `json:"title"`
	Why     string `json:"why"`
	Touches string `json:"touches,omitempty"`
}

Entry is one decision.

func Add

func Add(dir, title, why, touches string) (Entry, error)

Add appends a dated entry. The title and the why are required; touches names the files, packs or tables it concerns.

func Load

func Load(dir string) ([]Entry, error)

Load reads the entries, oldest first; no log is no entries.

Jump to

Keyboard shortcuts

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