Skip to content

Kernel K4: spaces/ scaffold — a second app proving the kernel seam - #39

Merged
nyblnet merged 1 commit into
mainfrom
kernel-k4-spaces-scaffold
Jul 24, 2026
Merged

Kernel K4: spaces/ scaffold — a second app proving the kernel seam#39
nyblnet merged 1 commit into
mainfrom
kernel-k4-spaces-scaffold

Conversation

@nyblnet

@nyblnet nyblnet commented Jul 24, 2026

Copy link
Copy Markdown
Owner

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 text
blocks) 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-picker
    label) and update manifest path. The K2 seam doing exactly its job.
  • Self-save (FSA + download fallback, ⌘S), autosave/recovery keyed by
    docId with a restore/discard banner, i18n via a local facade with its
    own catalogs, window.bento AI round-trip.
  • Its own modelformat: 'bento/spaces', parseDoc that mints a missing
    docId, preserves unknown fields for forward compatibility, and rejects
    other apps' documents. docContentKey stays app-side per PLATFORM §9.
  • The shared build pipeline via K3's flags.

Verification — on the BUILT single file, not the dev server

  • Boots from a served .bento.html at 9.8 KB, passes the splice
    conformance gate.
  • Round-trip proof: 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 references.
  • Autosave wrote a recovery snapshot through the kernel.
  • parseDoc correctly rejects a bento/slides document and garbage.
  • Zero console errors.

Notes

  • No workspaces — spaces carries its own package.json/lockfile, consistent
    with K1. But with two apps now duplicating vite+typescript, the trigger
    condition the planning audit named is visible; worth revisiting when dash
    lands rather than now.
  • CI gains install/typecheck/build/gate steps for spaces, caching on both
    lockfiles.
  • Follow-up: docs/PLATFORM.md §9 and docs/PARALLEL-WORK.md §1 should
    name kernel/ and spaces/ as zones — they live on the unmerged Docs: coordination layer for multi-app, multi-agent development #34, so
    I've left them alone to avoid a conflict.
  • Collab, encryption UI, rich text and update-checking are deliberately not
    wired; spaces/README.md documents exactly what's stubbed and why.

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.
@nyblnet
nyblnet changed the base branch from kernel-k3-buildparams to main July 24, 2026 23:45
@nyblnet
nyblnet merged commit 79564c0 into main Jul 24, 2026
1 check passed
@nyblnet
nyblnet deleted the kernel-k4-spaces-scaffold branch July 24, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant