Skip to content

feat(lifeboard): packs, recipes and the shopping-list arithmetic - #316

Open
ivanmkc wants to merge 1 commit into
lifeboard/04-agentfrom
lifeboard/05-packs
Open

feat(lifeboard): packs, recipes and the shopping-list arithmetic#316
ivanmkc wants to merge 1 commit into
lifeboard/04-agentfrom
lifeboard/05-packs

Conversation

@ivanmkc

@ivanmkc ivanmkc commented Sep 2, 2026

Copy link
Copy Markdown
Owner

The stack

# PR What it adds Tests at this point
1 #311 A real localStorage for the test suite on Node 25 viewer 747
2 #312 @ivanmkc/termchart-canvas; injectable interact transport canvas 473 · viewer 278
3 #313 lifeboard PWA: fact log, boards, service worker lifeboard 36
4 #314 Shell, family profiles, tap layer lifeboard 82
5 #315 The agent turn, four providers, Connections lifeboard 142
6 #316 Packs, recipes, shopping-list arithmetic lifeboard 231
7 #317 Provenance and lineage lifeboard 257
8 #318 Calendar, Gmail, mail triage lifeboard 301
9 #319 The bridge and long jobs cli 314 · lifeboard 320
10 #310 Proactivity, scheduled boards, Google sign-in cli 320 · lifeboard 343
11 #320 Persistence audit fixes: multi-tab, stale builds, no-storage boot lifeboard 350
12 #321 User guide, bridge setup, QA guide, persistence audit lifeboard 350
13 #322 A plan for third-party integrations (docs only) unchanged
14 #323 A practice drill a board can define: audio + Q&A canvas 485 · lifeboard 372
15 #325 Export and restore lifeboard 389
16 #326 Draft a message, approve it, then send lifeboard 399
17 #327 Hand long work to the Mac lifeboard 406
18 #328 A Packs screen, and authoring one by describing it lifeboard 418
19 #329 Activity — what changed, who changed it, undo lifeboard 428
20 #330 Four defects found reviewing the stack cli 323 · lifeboard 431

Every branch in the stack was checked out on its own and verified independently: npm install, tsc --noEmit for every package, npm test across the workspace, and the offline e2e where it exists. All twenty are green — no branch depends on a later one to build or pass. Full viewer e2e (11 suites, 106 assertions) was run on #312 as the behaviour-preservation evidence for the extraction.


Stack position: 6 of 10. Base: lifeboard/04-agent.

Packs — recurring operations as data — and recipes as the first consumer.

Packs are data, never code. A pack names a capability and a view builder; the app owns both and looks them up in a table. Installing one can never introduce behaviour the app did not already have. Validation is the security boundary and is written as one: allow-lists throughout, https-only feeds, a refresh floor of 30 seconds, and a declared writes set enforced at the point of application rather than trusted in each capability.

Selection caps at two packs per turn. Each adds a few hundred tokens of instructions, and a prompt carrying six answers worse than one carrying the right one.

The arithmetic is code, and this is where every competitor is visibly wrong. An item's quantity is the sum of its contributions, one per recipe, so re-scaling pancakes from 6 servings to 4 updates that recipe's share of a line already on the list instead of adding a second flour. Amounts that cannot honestly be summed — 100 g butter plus 1 cup butter, or "a handful" — are shown as the part we know plus "+ more", never as an invented total. Ranges take the top: running out is worse than a spare onion.

Nothing is ever silently removed. Pantry staples are marked and left on the list to tick; taking a recipe back off leaves its lines with a note rather than deleting them. Plan to Eat shipped the opposite and withdrew it.

Instacart's schema is adopted rather than hand-rolledname separate from display_text, the measurements array rather than the deprecated flat pair. The call is written and injectable but off without a key, which this app has nowhere to keep; the floor that always works is a prefilled search per item. Amazon's legacy add-to-cart URL is deliberately unused: it is not a contractual API.

A bound board is authored once and re-rendered from data forever after — no model on a timer. A failed refresh keeps the last good data behind a visible stale marker instead of blanking, and probeSource runs at authoring time so "your browser cannot read this feed" is said while the board is being made.

Verified: 231 unit tests, including the 6→4 re-scale, the staples rule, and a pack that declares an undeclared write being refused.

🤖 Generated with Claude Code

Packs are data, never code. A pack names a capability and a view builder; the
app owns both and looks them up in a table. Validation is the security boundary
and is written as one: allow-lists throughout, https-only feeds, a refresh floor
of 30 seconds, and a declared `writes` set that is enforced at the point of
application rather than trusted in each capability.

Selection caps at two packs per turn. Each one adds a few hundred tokens of
instructions, and a prompt carrying six answers worse than one carrying the
right one.

The arithmetic is code, and this is the part every competitor gets visibly
wrong. An item's quantity is the sum of its contributions, one per recipe, so
re-scaling pancakes from 6 servings to 4 updates that recipe's share of a line
already on the list instead of adding a second flour. Amounts that cannot be
honestly summed -- 100 g butter plus 1 cup butter, or "a handful" -- are shown
as the part we know plus "+ more", never as an invented total. Ranges take the
top: running out is worse than a spare onion.

Nothing is ever silently removed. Pantry staples are marked and left on the
list for you to tick; taking a recipe back off leaves its lines with a note
rather than deleting them. Plan to Eat shipped the opposite and withdrew it.

Instacart's schema is adopted rather than hand-rolled -- name separate from
display_text, the measurements array rather than the deprecated flat pair. The
call is written and injectable but off without a key, which this app has nowhere
to keep; the floor that always works is a prefilled search per item. Amazon's
legacy add-to-cart URL is deliberately unused: it is not a contractual API.

A bound board is authored once and re-rendered from data forever after -- no
model on a timer. A failed refresh keeps the last good data behind a visible
stale marker instead of blanking, and probeSource runs at authoring time so
"your browser cannot read this feed" is said while the board is being made
rather than silently every hour afterwards.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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