docs

package
v1.2.9 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const MaxRootBytes = 32 * 1024

MaxRootBytes is the ceiling on the root AGENTS.md. A harness reads that page at the start of every session, so a page that grows without a cap stops being read. The page carries the whole of docs/STANDARD.md (StandardDoc) beside the directory map, because everything someone needs to know while building or working on a tool is meant to be in the one file a harness loads; the ceiling is sized for the standard plus the map with headroom for catalog rows, and a growth past it is shortened at the standard's words or the catalog rows, never by raising the number unread. It is 32 KiB because the standard carries the whole of what a builder meets: the ten rules never to break, the onboarding points and every class rule by name, folded in from CONTRIBUTING.md and ONBOARDING.md so there is one standard, not three. The owner's rule: everything somebody should need to know while building or working on nova-tools goes into AGENTS.md. It rose from 24 KiB for two rules the standard states as a goal and its checks (every Go test uses testify, section 8; the standard library and the adopted modules are searched before a helper is written, section 7) and for the section "Doing it right the first time", which says which wrong turn each rule prevents; the page measures 30.2 KiB with all three.

View Source
const RootAgents = "AGENTS.md"
View Source
const StandardDoc = "docs/STANDARD.md"

StandardDoc is the one source of the standard every tool is built to. The root page embeds it whole, headings one level down.

Variables

View Source
var DefaultCatalog = []Entry{}/* 141 elements not displayed */

DefaultCatalog is the master catalog for nova-tools.

Functions

func Render

func Render(root string, cat []Entry) (map[string]string, []string)

Render builds STANDARD's class-rule list and every AGENTS.md page from the spec, live tree and catalog. Uncatalogued children still appear (as "-" rows) so a committed page goes stale the moment a mapped directory grows a child. Completeness issues are returned beside the pages; make map refuses to write when any are present.

func RepoRoot

func RepoRoot() (string, error)

RepoRoot walks up from the current working directory to find Makefile.

func RunAgentsMap

func RunAgentsMap(args []string) error

func Write

func Write(root string, pages map[string]string) error

Types

type CatalogIndex

type CatalogIndex map[string]Entry

func IndexCatalog

func IndexCatalog(cat []Entry) (CatalogIndex, []string)

type Entry

type Entry struct {
	Path    string // slash-separated, no trailing slash
	Purpose string
	Guard   string
	Command string
	Page    bool // write Path/AGENTS.md listing this directory's children
}

Entry is one mapped directory.

func E

func E(path, purpose, guard, command string) Entry

func Page

func Page(path, purpose, guard, command string) Entry

Jump to

Keyboard shortcuts

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