gosalyn: Case 2 design ruling after r11, playgrounds at three levels: book level inside a book folder, universe level outside every book folder, and a draft universe entry with only playground prefixes where a new universe starts; library-playground-other-universe replaces library-playground-outside-book; REQ-LIB-2 scope reads prefixes first, REQ-LIB-3 holds since a draft is a universe; build row C2-01c (mos-1233, Vikunja 464, TARGET.md:92-95)

This commit is contained in:
jason.woltje committed 2026-10-21 17:24:18 -05:00
1 parent 6242128422
commit 7a7c00464f
1 file changed
+56 -9
+56 -9
View File
@@ -46,6 +46,50 @@ prompts for the configured host and user, and exits 1 on anything else. The URL
helper reads the slot path, so the bus never holds the value, and that is why it doesn't use row 199's
fd 3. Section 7.2 says so.
## Ruling after r11: playgrounds at three levels (mos-1233)
TARGET.md:92-95 asks for a playground "where new universes can be created", a playground "for books in a
universe", and says "universe-level and book-level playgrounds must be provided". 1.1 put every
playground prefix inside a book folder (B1 under "Changes from r2"), so a playground with no book, and one
with no universe yet, had no place. Mos asked for this ruling (mos-1233, Vikunja 464). Ruling: a
playground has one of three levels, set by where its prefix sits.
- Book level. A prefix in `universes.<u>.playground` that lies inside one of `<u>`'s book folders, as
today. Its files have universe `<u>` and that book.
- Universe level. A prefix in `universes.<u>.playground` that lies outside every book folder of every
universe. Its files have universe `<u>` and book `null`.
- New universe. A draft universe is a `universes` entry with `"kind": "draft"`, a `name` and one or more
`playground` prefixes, and no `books`. Its prefixes lie outside every book folder. Every file under them
is playground, with universe `<draft id>` and book `null`. She starts a new universe there. When it is
real, she edits the business file to turn it into a plain universe with books and moves the files in
Obsidian. M9 keeps agents off that edit, as for every mapping change.
The validator replaces `library-playground-outside-book` with two refusals. A prefix that lies inside
another universe's book folder refuses `library-playground-other-universe`. A draft with `books`, or
with no `playground` prefix, refuses `library-mapping-invalid`. The rule that no prefix holds another, and
no prefix is listed twice, covers all three levels. A prefix equal to a book folder is still refused.
A hybrid's `sources` can't name a draft, since a draft has no canon.
REQ-LIB-2's scope rule still reads from the path alone, and a playground at any level is never canon.
The rule checks prefixes first. A `.md` file under any universe's or draft's playground prefix is
`playground`, with that entry's universe and the book folder that holds the prefix, or `null`. Otherwise
a `.md` file in a book folder is `canon`. Everything else is `unmapped`. Prefixes never overlap, so one
prefix at most matches. The lookups' canon default, `playground-cited-as-canon` and the Console's scope
badge apply at every level unchanged.
REQ-LIB-3's one-universe rule holds as written, because a draft is a universe entry. Every lookup still
names one universe, and its results never leave it. A lookup in a draft with the canon default returns
nothing, so a lookup there passes `scope: "playground"`. A universe-level playground file comes back from
a lookup with `book: null`, and a lookup that names a `book` leaves it out. `library_manuscript` needs a
book, so it doesn't read universe-level or draft files. `citation-cross-universe` treats a draft as its
own universe. R5 covers a canon file that refers into any playground, and R6 covers one that refers into
a draft. `library_universe` on a draft returns its kind, name and prefixes.
The build is a new row, C2-01c, in `packages/library` `mapping.mjs` and `scope.mjs`, with a test per
level, per new refusal and per lookup rule above. It goes before C2-05a and C2-06 read `classify`, or into
their candidates if they've started. C2-12's setup sheet gets one line per level. Sections 1.1 and 1.2 say
so.
## Changes from r10
Webby returned r10 with B1-B3 and N1-N5 (webby-0036, `agents/webby/work/case2-r10/REVIEW.md` at
@@ -431,12 +475,14 @@ The mapping is a new form of business file project entry. Business files live in
- Every value in `<>` comes from the survey and Melanie's say, through Jason (10 step 7).
- `universes` groups her book folders. If she has one world, it is one universe holding every book
folder. Jason's `universe.book.{character,place,...}` then reads as universe, book folder, type folder.
- `playground` is a list of path prefixes inside each universe entry (B1). Each prefix must start with
one of that universe's book folders, and no prefix may hold another. A prefix outside its universe's
book folders refuses the business file with `library-playground-outside-book`, so every playground
file has a universe and a book, and the one-universe cite check (5.2) has something to compare. Her
repo has no playground today as far as I know. The setup sheet suggests one folder per book, for
example `<book>/playground/`. Until she makes one, everything mapped is canon.
- `playground` is a list of path prefixes inside each universe entry (B1). A prefix inside one of that
universe's book folders is book level. A prefix outside every book folder is universe level. A
`"kind": "draft"` entry has prefixes and no books, and is where a new universe starts. No prefix may
hold another. A prefix inside another universe's book folder refuses the business file with
`library-playground-other-universe`, so every playground file has one universe, and the one-universe
cite check (5.2) has something to compare (ruling after r11, three levels). Her repo has no playground
today as far as I know. The setup sheet suggests one folder per book, for example
`<book>/playground/`. Until she makes one, everything mapped is canon.
- `types` maps a type folder name to a type. A file's front matter `type`, if present, is shown next to
it but doesn't change scope.
@@ -456,13 +502,14 @@ Each path in her repo, relative to the repo root, gets one scope:
| Scope | Rule |
|---|---|
| `playground` | A `.md` file that starts with a playground prefix of its book's universe |
| `playground` | A `.md` file that starts with a playground prefix of any universe entry, drafts included |
| `canon` | Otherwise, a `.md` file inside a configured book folder |
| `unmapped` | Everything else: top-level notes, `.base`, `.canvas` (under a playground prefix too), attachments, anything outside a book folder |
Lookups default to canon and return playground only on request. Unmapped files are never returned or
citable. The universe of a file is the universe whose `books` list holds its book folder. Because every
playground prefix lies inside a book folder (1.1), that holds for playground files too.
citable. The universe of a canon file is the universe whose `books` list holds its book folder. The
universe of a playground file is the entry whose prefix holds it, and its book is the book folder that
holds the prefix, or `null` at universe level and in a draft (ruling after r11, three levels).
### 1.3 Reading and reporting