the package-authoring round: fork is the verb, the scaffold flag is the ready-to-run gate, the package editor is the owner's surface, and /packages is the launchpad
The design conversation settled the verb question (developer, 2026-11-19): a "create new package" with a base selector is fork under another name, so the SPA gains one list at /packages with three acts per card -- start (the run-create flow, unchanged), fork (any package, system or user, by anyone: the copy lands in state/packages owned by the forker, pc stripped, display name asked inline, the fork landing straight in the editor -- nobody forks to immediately start), and edit (the owner's own user packages only). /new retires to a redirect onto /packages; the source link (code.fleshless.org/hackmaster/tiny-worlds) rides the header.
The template's unplayability became machinery instead of a naming special-case: settings.json carries the "scaffold" flag (the records-bool precedent -- authored content carries the marker, machinery reads it). Create refuses a scaffold loudly on both ends ("fork it to author, then flip scaffold off in the editor"), the listing marks it, the SPA disables its start. The developer's ruling over my clear-the-flag draft: the flag RIDES FORKS UNTOUCHED -- a scaffold fork stays a scaffold until its author flips it off, so the flag is the package's doneness state, and publishing your own scaffold for others to fork is free. The settings editor is raw JSON for now (native UI later, the developer's "ready to run" toggle its eventual shape), with a hint teaching the keys.
The package editor (/packages/:name): every file of a user package is authoring material -- settings included -- with the cheap save lints (memory.json and settings.json must parse as JSON objects; the carryover passes the authored lint, the run surface's exact gate), the deep checks staying at the start gate where they already lived. The gates mirror the run precedent: system packages are repo-side and refuse ("fork to edit"); an ownerless user package is readable, forkable, never editable -- and an ownerless package IS forkable, the copy is yours.
The refactor the editor forced: the setup view's file-editor machinery (nav, textarea + the sigil/var highlight overlay, drafts, dirty marks, the save flow) extracted into widgets.mjs's fileEditor factory, parameterized over DOM ids and a PUT call -- setup keeps its run-side couplings (the phase-gated rw, the addressed session), the package editor is the simpler parameterization, and the editor CSS generalized from id selectors to classes so both surfaces share it.
En-route bug found and fixed: cmdCreate always copied the REPO's handbook.md into the run, so a user package's handbook -- which save-package faithfully copies out -- was silently ignored on re-create; the author's craft edit died in the round-trip. Create now prefers the package's own handbook when it carries one, else the repo's shared copy. The smoke proves the round-trip: a handbook marker authored through the package editor surfaces in the created run's files.
Browser-pass find: the pkgedit header state span and the editor's save-state span shared the id pkgedit-state, so the widget's select() wiped the header line -- the editor's span renamed (pkgedit-edit-state), verified rendering.
Verified: typecheck green both programs; smoke ALL PASS (+20 -- the fork battery: the template fork owner-stamped scaffold-preserved pc-stripped, create refusing the scaffold on both ends, the playable fork carrying no scaffold, fork validation, the editor gates owner-200/non-owner-403/system-repo-side-403/unknown-404, the raw-JSON and carryover save lints, the ready-to-run flip, create from the flipped fork, the handbook round-trip; and the ownerless pair: the editor refuses, the fork succeeds); restart + reminder checks green (6 runs); a browser pass on --mock --debug end to end -- the paste token re-landing after the state wipe, /new redirecting with the URL honest, the template card disabled with the scaffold note, boutique disabled as incomplete, the fork form prefill and submit landing in the editor, the scaffold state line, the settings flip and save making the card startable, the start-form flow intact, zero console errors; check-repo clean; the debug server back on the real state. Docs: README's packages passage (fork, scaffold, the editor, the gates), the booting flow, the layout tree (the clerk's fork-package verb, the view list, widgets.mjs); DICTIONARY's package, scaffold, and fork entries. The developer's queue line ('"create new package" in SPA') is struck by them in the same round. packages/detention stays untracked WIP, untouched.
This commit is contained in:
+67
@@ -9,6 +9,73 @@ file is the "where did we leave off" map.
|
||||
|
||||
## Where we are
|
||||
|
||||
- **The package-authoring round is BUILT and verified (2026-11-19,
|
||||
developer-designed in conversation): fork is the verb, the scaffold
|
||||
flag is the ready-to-run gate, and the package editor is the
|
||||
owner's surface.** The design conversation settled it: a
|
||||
"create new package" with a base selector is fork under another
|
||||
name, so one list at /packages carries three acts per card --
|
||||
start (the run-create flow, unchanged), fork (any package, system
|
||||
or user, by anyone; the copy lands in state/packages owned by the
|
||||
forker, pc stripped, display name asked, forked: naming the
|
||||
source), edit (the owner's own user packages only). The template's
|
||||
unplayability became machinery: settings.json carries the
|
||||
"scaffold" flag (the records-bool precedent -- authored content
|
||||
carries the marker), create refuses a scaffold loudly on both
|
||||
ends, the listing marks it, the SPA disables its start -- and the
|
||||
flag RIDES FORKS UNTOUCHED (the developer's ruling over my
|
||||
clear-the-flag draft): a scaffold fork stays a scaffold until its
|
||||
author flips it off, so the flag is the package's doneness state
|
||||
and publishing your own scaffold for others to fork is free. The
|
||||
editor (/packages/:name): every file of a user package is
|
||||
authoring material -- settings included, raw JSON for now (native
|
||||
UI later, the developer's "ready to run" toggle its eventual
|
||||
shape) -- with the cheap save lints (memory.json and settings.json
|
||||
must parse as JSON objects; the carryover passes the authored
|
||||
lint), the deep checks staying at the start gate. The gates:
|
||||
system packages are repo-side and refuse ("fork to edit");
|
||||
ownerless user packages refuse too (the run precedent -- readable,
|
||||
forkable, never editable), and an ownerless package IS forkable
|
||||
(the copy is yours). Fork lands in the editor (the developer's
|
||||
ruling: nobody forks to immediately start). The refactor the
|
||||
editor forced: the setup view's file-editor machinery (nav,
|
||||
textarea + highlight overlay, drafts, dirty marks, save flow)
|
||||
extracted into widgets.mjs's fileEditor factory, parameterized
|
||||
over DOM ids and a PUT call -- setup keeps its run-side couplings
|
||||
(the phase-gated rw, the addressed session), pkgedit is the
|
||||
simpler parameterization; the editor CSS generalized from ids to
|
||||
classes. /new retired to a redirect onto /packages (old muscle
|
||||
memory lands honest). The source link (the developer's ask) rides
|
||||
the header: code.fleshless.org/hackmaster/tiny-worlds. EN-ROUTE
|
||||
BUG FOUND AND FIXED: cmdCreate always copied the REPO's
|
||||
handbook.md into the run, so a user package's handbook (which
|
||||
save-package faithfully copies out) was silently ignored on
|
||||
re-create -- the author's craft edit died. Create now prefers the
|
||||
package's own handbook when it carries one, else the repo's shared
|
||||
copy; the smoke proves the round-trip. Browser-pass find: the
|
||||
pkgedit header state span and the editor's save-state span shared
|
||||
the id pkgedit-state, so the widget's select() wiped the header
|
||||
line -- renamed (pkgedit-edit-state), the header line renders.
|
||||
Verified: typecheck green both programs, smoke ALL PASS (+20: the
|
||||
fork battery -- the template fork owner-stamped scaffold-preserved
|
||||
pc-stripped, create refusing the scaffold on both ends, the
|
||||
playable fork carrying no scaffold, fork validation, the editor
|
||||
gates -- owner 200, non-owner 403, system repo-side 403, unknown
|
||||
404, the raw-JSON and carryover save lints, the ready-to-run flip,
|
||||
create from the flipped fork, the handbook round-trip; and the
|
||||
ownerless pair -- the editor refuses, the fork succeeds), restart
|
||||
+ reminder checks green (6 runs), a browser pass on --mock --debug
|
||||
end to end (the paste token re-lands after the state wipe, /new
|
||||
redirects with the URL honest, the template card disabled with the
|
||||
scaffold note, boutique disabled as incomplete, fork form prefill
|
||||
and submit landing in the editor, the scaffold state line, the
|
||||
settings flip and save making the card startable, the start-form
|
||||
flow intact, zero console errors), check-repo clean, and the debug
|
||||
server back on the real state. Docs: README's packages passage,
|
||||
the booting flow, the layout tree; DICTIONARY's package, scaffold,
|
||||
and fork entries. The developer's operator-queue line ('"create
|
||||
new package" in SPA') is struck by them in the same round.
|
||||
|
||||
- **The debug round is BUILT and verified (2026-11-19, developer-designed
|
||||
in conversation): server.json is deleted, the bind is code, the
|
||||
debug superuser is token-gated, and the context meter reads the
|
||||
|
||||
Reference in New Issue
Block a user