Kernel K4: spaces/ scaffold — a second app proving the kernel seam - #39
Merged
Conversation
The payoff PR for the extraction: a real, on-platform second Bento app
built entirely on the shared kernel, which is what the fan-out agents will
clone as their starting point.
spaces/ is a Notion/notes-like app, deliberately minimal (a flat list of
text blocks) so the seam stays legible. It wires every kernel module a
Bento app needs:
- configureApp({appId:'bento-spaces', appName, manifestUrl}) — its own
update manifest path, its own display name in window titles and the
save picker (the K2 seam doing its job).
- kernel save (FSA + download fallback, ⌘S), autosave/recovery keyed by
docId with a restore/discard banner, the i18n engine via a local facade
with its own (empty) catalogs, and the window.bento AI round-trip.
- Its own model: format 'bento/spaces', parseDoc that mints a missing
docId, preserves unknown fields, and rejects other apps' documents;
docContentKey stays app-side per PLATFORM §9.
- The shared build pipeline via the K3 flags (--generator bento-spaces
--title 'Bento Spaces').
No workspaces: spaces carries its own package.json/lockfile, consistent
with the K1 decision. Note for later — with two apps now duplicating
vite+typescript, the workspace trigger condition the audit named is
visible; worth revisiting when dash lands.
CI gains install/typecheck/build/gate steps for spaces and caches on both
lockfiles.
Verified on the BUILT single file (not the dev server): boots from a
served .bento.html at 9.8KB, passes the splice conformance gate, and
round-trips a real edit — edit → serialize() → re-extract #bento-doc →
re-parse returns the edited content, title persisted, docId stable,
runtime still compressed, and the file has zero external script/link
refs. Autosave wrote a recovery snapshot through the kernel. parseDoc
correctly rejects a bento/slides document and garbage. Zero console
errors.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The payoff PR. Stacked on #38 → #37 → #36 — merge bottom-up.
A real, on-platform second Bento app built entirely on the shared kernel. This
is what the fan-out agents clone as their starting point, so it's a working
reference rather than a stub.
What it is
bento/spaces— Notion/notes-like, deliberately minimal (a flat list of textblocks) so the kernel seam stays legible. Every kernel module a Bento app needs
is wired:
configureApp— its own app id, display name (window title + save-pickerlabel) and update manifest path. The K2 seam doing exactly its job.
docIdwith a restore/discard banner, i18n via a local facade with itsown catalogs,
window.bentoAI round-trip.format: 'bento/spaces',parseDocthat mints a missingdocId, preserves unknown fields for forward compatibility, and rejectsother apps' documents.
docContentKeystays app-side per PLATFORM §9.Verification — on the BUILT single file, not the dev server
.bento.htmlat 9.8 KB, passes the spliceconformance gate.
serialize()→ re-extract#bento-doc→re-parse returns the edited content; title persisted,
docIdstable, runtimestill compressed, and the file has zero external script/link references.
parseDoccorrectly rejects abento/slidesdocument and garbage.Notes
with K1. But with two apps now duplicating vite+typescript, the trigger
condition the planning audit named is visible; worth revisiting when
dashlands rather than now.
lockfiles.
docs/PLATFORM.md§9 anddocs/PARALLEL-WORK.md§1 shouldname
kernel/andspaces/as zones — they live on the unmerged Docs: coordination layer for multi-app, multi-agent development #34, soI've left them alone to avoid a conflict.
wired;
spaces/README.mddocuments exactly what's stubbed and why.