Documentation
¶
Overview ¶
Package layout locates the f10 configuration layers for a working directory: the checkout root, the instruction layers in precedence order, their layering mode, and the storage root. bin/bundle.sh is the semantics oracle - the parity test in this package runs both against the same fixtures, so a change to either side fails loudly until both move.
Index ¶
Constants ¶
const ( LayeringExtends = "extends" LayeringReplaces = "replaces" )
Layering modes: a worktree layer either extends main's instructions or replaces them wholesale.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Layer ¶
type Layer struct {
Label string `json:"label"` // "main", "checkout", "worktree" or "out-of-tree"
Dir string `json:"dir"`
}
A Layer is one instructions directory contributing configuration. Layers are ordered by precedence: a later layer's field beats an earlier one's.
type Layout ¶
type Layout struct {
Cwd string // where the run started
CheckoutRoot string // root of the checkout the run started in
MainRoot string // root of the main checkout; empty when git cannot name one
Project string // basename of the main checkout, or of the cwd outside git
StorageRoot string // where plans (and in-repo instructions) live
Layering string // LayeringExtends or LayeringReplaces
LayeringDeclared bool // a worktree project.md carries the Layering line
Layers []Layer // precedence order: later wins
Source string // human description; wording matches bundle.sh
NestedIgnored string // a .f10/instructions below the root, noted and ignored
}
A Layout names where configuration lives for one working directory. Path fields are physical (symlinks resolved), matching bundle.sh.