diff --git a/AGENTS.md b/AGENTS.md index 296c6b8..8a3f42c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -114,7 +114,7 @@ In [docs/decisions.md](docs/decisions.md): - The US given names come from a mirror of the SSA file - `List` advertises direct descents only - A path draws through its compiled steps -- A name lives in the category binding it, or in the repeat binding it, and is drawn on its first read +- A name lives in the category binding it, or in the repeat or choice item binding it, and is drawn on its first read - comprehension floor: every dimension and the overall at 7.0 or above - The template engine stays the root package until item 107; what reads no engine type, a table's rows included, sits in `internal/` - Goal 5.1's `{…}` covers `{{`, `}}` and a lone `}`, so the goal names no escape diff --git a/docs/decisions.md b/docs/decisions.md index 3252ae1..afad4d1 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -825,14 +825,15 @@ struct's fields as one, and a repeat of a reference path rose from 66 to 106 all benchmark gained an allocation. Valid while Go's escape analysis tracks a struct's fields as one. -## A name lives in the category binding it, or in the repeat binding it, and is drawn on its first read +## A name lives in the category binding it, or in the repeat or choice item binding it, and is drawn on its first read 2026-10-03, larv-review in PR #145; approved by Lilleman auf Larv. Goals 5.3 and 5.6. `bindNames` scopes a name at compile, and a render keeps one `pickFrame` per scope. One field binds a name where another reads it, `"first": "{/person as p}{p.first}"` beside `"last": "{p.last}"`, so the scope cannot be the template holding the binding; the category -is the smallest unit holding every field and record column. A choice's item binds no name, -since a read outside the item would see a binding another item leaves out. A pick is drawn on +is the smallest unit holding every field and record column. A choice's item binds a name +for its own reads, picked anew each time the item is drawn; a read outside the item is +refused, since it would see a binding another item leaves out. A pick is drawn on its first read, so a record's columns, rendered in name order, read one pick whichever binds it.