Documentation
¶
Overview ¶
Package layout locates the f10 configuration layers for a working directory. bin/f10-load-project.sh is the semantics oracle: the parity test runs both against the same fixtures, so a change to either side fails 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 ¶
func SplitFrontmatter ¶ added in v0.58.0
SplitFrontmatter returns the YAML between a leading `---` line and the next `---` line, and the body after it. Without a leading block, ok is false and the body is the whole input; an opened block that never closes is not a block.
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 storage.Root // where plans, reviews, verdicts and lore live: main's .f10 for every checkout, or the out-of-tree root
Layering string // LayeringExtends or LayeringReplaces
LayeringDeclared bool // a worktree project.md declares Layering
Layers []Layer // precedence order: later wins
Source string // human description; wording matches f10-load-project.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 f10-load-project.sh.