@vibes.diy/prompts 13.1.12 → 13.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/llms/access.md CHANGED
@@ -445,7 +445,7 @@ This example shows the full round-trip — access.js declares channels and grant
445
445
  - **Channel identity:** Channel docs use `_id: "ch:" + name` so names are unique. The `_id` is the channel identifier everywhere — in `channels`, `grant`, and `ctx.requireAccess()`.
446
446
  - **Channel grant:** A channel document grants the creator (`grant.users`), adds `grant.public` so all members can read, and `grant.roles` so posters can write.
447
447
  - **Write surfaces** are gated with `useVibe(dbName).can.create/edit/delete` — it runs this same access function, so the UI verdict matches the server. Render `.reason` when denied. (See use-vibe docs.)
448
- - **`ViewerTag`** takes `userHandle` to render another user (authors, rosters). The current viewer's own pill and sign-in button are system chrome in the Vibes Switch (the logo) — don't add one to the app's UI, except a guarded no-prop `{viewer && <ViewerTag />}` when you want inline avatar self-edit for any signed-in member (see use-viewer docs).
448
+ - **`ViewerTag`** takes `userHandle` to render another user (authors, rosters). The current viewer's own pill is system chrome in the Vibes Switch (the logo) — don't add one to the app's UI, except a guarded no-prop `{viewer && <ViewerTag />}` when you want inline avatar self-edit for any signed-in member (see use-viewer docs). The sign-in ASK is the app's, though: `useViewer().requestLogin()` from your own button, at the moment the visitor's work becomes worth keeping.
449
449
 
450
450
  access.js
451
451
 
package/llms/backend.md CHANGED
@@ -232,14 +232,38 @@ const gh = await ctx.github.fetch("/repos/acme/site/issues", { method: "POST", b
232
232
  `fetch` binding, so a bare `fetch(url)` anywhere in the file resolves to **your
233
233
  own handler** — a `fetch` handler calling out recurses into itself, and a
234
234
  `scheduled`/`onChange` call passes the URL where a `Request` is expected. `ctx.fetch`
235
- always reaches the real HTTP client. **It is policy-gated**: `backend.js` can call
236
- external https APIs that either (a) are CORS-open — the platform forwards the
237
- request exactly as a browser on the app's own page could (same preflight rules,
238
- same `Access-Control-Allow-Origin` check, browser-forbidden headers like `Cookie`
239
- are stripped) — or (b) are on the platform's curated list (`api.github.com` is
240
- seeded; additions are a PR to the platform repo). A denied call returns
241
- `403 {"vibesEgressDenied":true,"gate":"floor"|"owner-blocked"|"cors"|"rate-limit","host":...}` —
242
- check for it and surface a useful error. Remedies: use a CORS-open endpoint,
235
+ always reaches the real HTTP client. **It is policy-gated**, and three lanes
236
+ admit a call.
237
+
238
+ - **A plain read of a public URL goes through.** `ctx.fetch(url)` with no
239
+ `method` (or `GET`/`HEAD`), carrying at most `accept`/`accept-language` and no
240
+ credentials, reaches any ordinary https host from `fetch`, `onChange` and
241
+ `scheduled` alike — so **an RSS or Atom feed, a public JSON API, an `.ics`
242
+ file or a plain web page is readable today**, with no key, no arrangement and
243
+ nothing to configure. The platform makes the request itself, identified as
244
+ this app, and serves a repeated read from a cache — for about five minutes by
245
+ default, or for whatever lifetime the response asks for, held to between a
246
+ minute and an hour. **Nothing is cached for less than a minute**, so a poll
247
+ faster than that re-reads bytes the cache already holds. `"5m"` is the sound
248
+ default for a feed that states no lifetime of its own, and slower suits a feed
249
+ that changes a few times a day; a feed asking to be re-read sooner
250
+ (`Cache-Control: max-age=60`) is the one case a faster tick earns.
251
+ - **A CORS-open endpoint takes anything a browser could send** from the app's
252
+ own page — same preflight rules, same `Access-Control-Allow-Origin` check,
253
+ browser-forbidden headers like `Cookie` stripped. This is the lane a `POST`,
254
+ an `Authorization:` header, or any custom header name travels on, so a write
255
+ or a keyed API call needs the host itself to say yes.
256
+ - **The platform's curated list** carries server-to-server APIs that send no
257
+ CORS headers (`api.github.com` is seeded; additions are a PR to the platform
258
+ repo).
259
+
260
+ A call outside all three returns
261
+ `403 {"vibesEgressDenied":true,"gate":"floor"|"owner-blocked"|"cors"|"read-rate"|"rate-limit","host":...}`,
262
+ and `gate` says which lane refused: `cors` is a write or a credentialed call to
263
+ a host that never opted us in, and `read-rate` means the read lane's own tighter
264
+ budget (10 per 10s, 60 per minute) is spent for the moment, which the next tick
265
+ clears. Check for that shape and surface a useful error. Remedies: read it as a
266
+ plain `GET`, use a CORS-open endpoint,
243
267
  request a curated-list addition, or ask about owner blessing. Limits: https
244
268
  on port 443 only, 15s per request, 10MB responses, per-vibe rate caps
245
269
  (30/10s, 300/min). Make all outbound calls **before returning** the Response —
@@ -316,7 +340,8 @@ const gh = await ctx.github.fetch("/repos/acme/site/issues", { method: "POST", b
316
340
 
317
341
  ## Worked external-data pattern — cache into the live database
318
342
 
319
- A URL that worked during generation may still be denied by runtime egress.
343
+ A public feed reads fine from a handler, and a run can still come back empty —
344
+ the host is down, the shape changed, the read budget is spent for the minute.
320
345
  Never fetch an external feed from render or a React effect. Poll once per tick,
321
346
  normalize a bounded number of rows into the exact database and document shape
322
347
  the UI queries, and keep the last successful rows when refresh fails. Seed a
@@ -595,6 +620,25 @@ arithmetic. Keep the schedule control in those terms too: label it with the zone
595
620
  you captured ("every day at 12:00, America/Detroit"), so the setting reads back
596
621
  the way they set it.
597
622
 
623
+ **A timestamp you show a person is rendered in their zone, never the server's.**
624
+ The rule above is about an hour the owner *chose*; this one is about every other
625
+ moment your app puts in front of them — a date in a notification body, a "next
626
+ event" label, a log line they read. A backend has no locale and no zone, so
627
+ `toLocaleDateString()` there silently means UTC, and a moment at `02:07 UTC` is
628
+ already tomorrow for half the world. Pass the stored zone every time you format:
629
+
630
+ ```js
631
+ const label = new Intl.DateTimeFormat("en-US", {
632
+ timeZone: settings.timeZone ?? "UTC",
633
+ month: "long",
634
+ day: "numeric",
635
+ }).format(new Date(moment));
636
+ ```
637
+
638
+ And **only say a thing you computed.** "Tonight", "this morning", "in an hour"
639
+ are claims about the reader's clock; if the code did not derive them from that
640
+ reader's zone, name the moment instead and let them place it.
641
+
598
642
  ### An unattended tick reports what it did
599
643
 
600
644
  **An unattended tick earns its spend.** Nobody is watching a scheduled run, so
@@ -605,6 +649,26 @@ nothing to work from. A model call on an empty input set produces confident text
605
649
  about nothing, bills the owner for it, and does it again on the next tick,
606
650
  forever.
607
651
 
652
+ **Every tick leaves a trace, even the ones with nothing to do.** Returning early
653
+ when there is no work is right — it saves a read and a spend — but a handler that
654
+ returns *silently* is indistinguishable from one that never ran, and `app logs`
655
+ is the only place an owner can tell. For a job that acts twice a month that means
656
+ weeks of silence that reads exactly like a dead alarm. So log once per tick,
657
+ before any early return:
658
+
659
+ ```js
660
+ export async function scheduled(event, ctx) {
661
+ const due = eventsDueNow(event.scheduledTime);
662
+ ctx.log("debug", "tick", { due: due.length }); // proof of life; no reads, no spend
663
+ if (due.length === 0) return;
664
+ …
665
+ }
666
+ ```
667
+
668
+ One line, and "is this thing still alive?" becomes answerable on any cadence.
669
+ The rarer the job, the more it needs this: for an infrequent handler, silence is
670
+ the *only* symptom a stopped alarm ever produces.
671
+
608
672
  **A tick that repeats is not a run that repeats.** The interval is how often the
609
673
  handler is *woken*, not how often the work should *happen*: a `15m` interval
610
674
  wakes four times inside the owner's noon, so the handler names the unit of work —
@@ -613,6 +677,38 @@ document it reads by id, plus a copy in module scope. A missing or failed state
613
677
  read means *"don't know — use the copy"*, never *"nothing has run yet"*; that
614
678
  second reading is what bills the owner four times for one noon.
615
679
 
680
+ ### Firing on a real-world event
681
+
682
+ **An averaged cycle is not a calendar.** When the moment comes from nature
683
+ rather than from a clock the owner set — a moon phase, a tide, sunrise, a
684
+ planetary conjunction — the tempting shape is a mean period since a known epoch:
685
+
686
+ ```js
687
+ const SYNODIC = 29.530588861; // mean lunation, in days
688
+ const t = KNOWN_NEW_MOON + k * SYNODIC * 86400000; // ← wrong by hours
689
+ ```
690
+
691
+ The average is exact and the individual events are not. Orbits are elliptical
692
+ and perturbed, so real events run early or late against their own mean. Measured
693
+ for the lunar case: that formula is **up to 18 hours out**, and across the next
694
+ six months it puts two of six new moons on the **wrong calendar day**. It also
695
+ fails asymmetrically — full moons land within a couple of hours while new moons
696
+ run ~15 hours late — so testing one and shipping both proves nothing.
697
+
698
+ An app that merely *displays* a countdown can live with this if it says
699
+ "approximately". An app that **notifies** cannot: a notification is a claim that
700
+ the thing is happening now, and firing a ±20-minute window around a mean instant
701
+ lands it precisely on a time that is precisely wrong.
702
+
703
+ So: derive the event from a real algorithm with periodic-correction terms (the
704
+ standard treatments are short — a dozen sine terms gets a lunar phase to within
705
+ minutes), or fetch it from an ephemeris and cache it. If you can do neither,
706
+ widen the claim rather than the window: give the day, say "around", and never
707
+ attach a time-of-day word to it.
708
+
709
+ The same rule holds anywhere a natural cycle has a tidy average — the average is
710
+ a description of the series, never a prediction of the next member of it.
711
+
616
712
  **Claim the unit of work before you spend on it, not after.** Write the key
617
713
  first, then do the expensive, externally visible part: an isolate that dies
618
714
  between a finished draft and an unwritten claim comes back and buys the same day
package/llms/use-vibe.md CHANGED
@@ -24,7 +24,7 @@ Never stamp author fields from `me` while the verdict is pending — `me` is nul
24
24
 
25
25
  ## The rule
26
26
 
27
- Gate every write affordance on `can.*`. Hold it while `pending`, and write your own copy when denied. Never branch write permission on `viewer`, `access.hasRole()`/`access.hasChannel()`, or document fields — those drift from what `access.js` actually does. Rendering **other** users (authors, rosters) is `useViewer()`'s `<ViewerTag userHandle={...} />`, not `useVibe`. The current viewer's own pill and the "signed in as" / sign-in button are system chrome in the Vibes Switch (the logo) — don't build them into the app. (The one exception is inline avatar self-edit: a guarded no-prop `{viewer && <ViewerTag />}` lets any signed-in member change their own photo in place — see use-viewer docs.)
27
+ Gate every write affordance on `can.*`. Hold it while `pending`, and write your own copy when denied. Never branch write permission on `viewer`, `access.hasRole()`/`access.hasChannel()`, or document fields — those drift from what `access.js` actually does. Rendering **other** users (authors, rosters) is `useViewer()`'s `<ViewerTag userHandle={...} />`, not `useVibe`. The current viewer's own pill and the "signed in as" label are system chrome in the Vibes Switch (the logo) — don't build them into the app. Asking an anonymous visitor to sign in is a different thing and it IS yours: `useViewer().requestLogin()`, at the moment their work becomes worth keeping (see use-viewer docs). A resolved denial is one such moment — write the sign-in copy in your app's own words and wire it to that callable, never to a sentence about the logo. (The one exception is inline avatar self-edit: a guarded no-prop `{viewer && <ViewerTag />}` lets any signed-in member change their own photo in place — see use-viewer docs.)
28
28
 
29
29
  ```jsx
30
30
  import { useVibe } from "use-vibes";
@@ -2,13 +2,15 @@
2
2
 
3
3
  `useViewer()` is a **read-only window** into viewer identity. The platform owns the rules — who's the owner, who has been granted read or write — and `useViewer()` lets your app see who's signed in and render identity. You cannot grant or revoke access from code; you can only reflect the runtime's verdict in your UI.
4
4
 
5
- **The signed-in viewer's own pill and the Sign in button are system chrome — you don't build them.** The platform shows the current user (and a "Sign in" button when anonymous) inside the **Vibes Switch**, the panel that opens when you click the logo. A visitor always has a way to see who they are and sign in from there, so your app does **not** need to add a header pill or a login button for the current viewer — don't render a no-prop `<ViewerTag />` just to show "who's signed in" or to offer sign-in. To find the login button, click the logo.
5
+ **The current viewer's pill is system chrome — you don't build it.** The platform shows the current user inside the **Vibes Switch**, the panel that opens when you click the logo. So your app does **not** need a header pill for whoever is looking — don't render a no-prop `<ViewerTag />` just to show "who's signed in".
6
+
7
+ **The sign-in _ask_ is yours.** `requestLogin()` from `useViewer()` opens the platform sign-in UI from anywhere in your app, so you can word, place and time the ask yourself. Reach for it at the moment your app becomes worth keeping. The Switch is chrome outside your app's frame, and pointing at the logo is not a call to action — it is a scavenger hunt. See **Asking a visitor to sign in** below.
6
8
 
7
9
  Use `useViewer()` to render **other** people's identity — comment authors, rosters, "added by" labels — with `<ViewerTag userHandle={...} />`, and to read `viewer`/`can` when your UI needs to branch on who's looking. **Write surfaces are gated with `useVibe(dbName).can`** (see use-vibe docs), not with `viewer`/`access.*`.
8
10
 
9
11
  ## Basic Usage
10
12
 
11
- Start with a minimal component that reads the viewer identity. You don't render a sign-in button or a current-user pill — those live in the Vibes Switch (click the logo). Just branch on `viewer` for any welcome/empty copy your app needs:
13
+ Start with a minimal component that reads the viewer identity. You don't render a current-user pill — that lives in the Vibes Switch (click the logo). Branch on `viewer` for any welcome/empty copy. Note there is **no sign-in button here**: the ask belongs at the moment the visitor has made something worth keeping, not on arrival — see **Asking a visitor to sign in** below.
12
14
 
13
15
  App.jsx
14
16
 
@@ -24,9 +26,12 @@ export default function App() {
24
26
 
25
27
  return (
26
28
  <div>
27
- {/* No sign-in button here — the logo opens the Vibes Switch, which shows
28
- the current user and a "Sign in" button as system chrome. */}
29
- {viewer ? <p>Welcome back, {viewer.displayName ?? viewer.userHandle}!</p> : <p>Sign in from the logo menu to get started.</p>}
29
+ {/* No current-user pill here — that's the Vibes Switch's job. */}
30
+ {viewer ? (
31
+ <p>Welcome back, {viewer.displayName ?? viewer.userHandle}!</p>
32
+ ) : (
33
+ <p>Everything you make here is saved on this device.</p>
34
+ )}
30
35
  </div>
31
36
  );
32
37
  }
@@ -37,7 +42,8 @@ export default function App() {
37
42
  - `viewer` — `{ userHandle, displayName? }` or `null` for anonymous visitors. Avatars are not on the payload — render them with `<ViewerTag userHandle={...} />`, which resolves the avatar from the handle. Don't build avatar URLs yourself.
38
43
  - `isViewerPending` — `true` while the platform is still resolving the viewer identity (e.g. on first render before the parent shell has pushed the identity update). **Gate any auth-dependent UI on `!isViewerPending`** to avoid flashing the wrong state. Once it becomes `false`, `viewer` is either populated or definitively `null`.
39
44
  - `can(action)` — membership boolean for `"read"`/`"write"`/`"delete"`: is the viewer through the door? Access functions enforce per-document and per-database rules server-side. Prefer `useVibe(dbName).can.create/edit/delete` for write gating; it runs the app's access function and returns a `reason`.
40
- - `viewerLapsed` — `true` when `viewer` is the identity this device *remembers* and the platform's answer came back anonymous: the sign-in lapsed (an expired session, a cold boot before auth restores), rather than the person signing out. Keep rendering their stuff — the local data is still theirs, and writes queue locally and sync once they sign back in — and offer a quiet "Sign back in to sync" nudge. Never fall back to the anonymous copy ("Sign in to get started") while `viewerLapsed` is true; that reads as if their work is gone. `can()` and every access gate stay closed while lapsed, so gate *writes* on `can`, not on this flag, and `isViewerPending` is `false` (lapsed is a settled state, not a loading one).
45
+ - `viewerLapsed` — `true` when `viewer` is the identity this device *remembers* and the platform's answer came back anonymous: the sign-in lapsed (an expired session, a cold boot before auth restores), rather than the person signing out. Keep rendering their stuff — the local data is still theirs, and writes queue locally and sync once they sign back in — and offer a quiet "Sign back in to sync" nudge wired to `requestLogin()`. Never fall back to the anonymous copy ("Sign in to get started") while `viewerLapsed` is true; that reads as if their work is gone. `can()` and every access gate stay closed while lapsed, so gate *writes* on `can`, not on this flag, and `isViewerPending` is `false` (lapsed is a settled state, not a loading one).
46
+ - `requestLogin()` — opens the platform sign-in UI. Fire-and-forget: there is nothing to await and no result to branch on, because the new identity arrives on its own through `viewer`. This is how your app asks — see **Asking a visitor to sign in** below.
41
47
  - `ViewerTag` — ready-made user pill; see the ViewerTag section below.
42
48
  - `HandleInput` — ready-made handle-lookup text input; see the HandleInput section below.
43
49
 
@@ -70,7 +76,11 @@ App.jsx
70
76
 
71
77
  ```jsx
72
78
  <<<<<<< SEARCH
73
- {viewer ? <p>Welcome back, {viewer.displayName ?? viewer.userHandle}!</p> : <p>Sign in from the logo menu to get started.</p>}
79
+ {viewer ? (
80
+ <p>Welcome back, {viewer.displayName ?? viewer.userHandle}!</p>
81
+ ) : (
82
+ <p>Everything you make here is saved on this device.</p>
83
+ )}
74
84
  =======
75
85
  {/* write gate: useVibe().can, not viewer */}
76
86
  {!ready ? null : (() => {
@@ -100,7 +110,6 @@ App.jsx
100
110
  import { useViewer, useVibe } from "use-vibes";
101
111
  =======
102
112
  import { useViewer, useVibe } from "use-vibes";
103
- import { useFireproof } from "use-fireproof";
104
113
  >>>>>>> REPLACE
105
114
  ```
106
115
 
@@ -183,6 +192,75 @@ Key points:
183
192
  - **Avatars are stable** — ViewerTag resolves the avatar from the handle; if the author changes their avatar, the URL stays the same and the bytes update. ViewerTag handles this for you.
184
193
  - **One source of identity** — persist `authorHandle` on the doc. ViewerTag does the rest.
185
194
 
195
+ ## Asking a visitor to sign in
196
+
197
+ An anonymous visitor is having a legitimately good time. Under local-first their work is already saved on their device and your app should keep working for them — the account buys **sync, followers and durability**, not permission. So the ask is an **offer to keep what they already have — never a wall in front of it**. A visitor who never signs in should still get a working app; one who does should feel like they kept something.
198
+
199
+ Three rules separate a CTA that converts from the two shapes that don't.
200
+
201
+ **Ask at the moment of value.** The ask lands when the person has just made something they'd hate to lose — posted their first comment, starred their first pick, saved their first note. A prompt on arrival asks a stranger to commit before they know what the app does; a prompt after the first save offers to keep something they can already see.
202
+
203
+ **Wire the ask to `requestLogin()`, never to a sentence about the logo.** Copy like "sign in via the logo" points at platform chrome outside your app's frame and sends the reader hunting for it. It is not a call to action and it does not convert. Render a real control: `<button onClick={requestLogin}>Keep these</button>`.
204
+
205
+ **Only ask once identity has settled.** `isViewerPending` is `true` while the platform is still resolving who's looking, and a CTA rendered in that window shows signed-in people a SIGN IN button on every load. Compute the settled-signed-out state once and gate on it — `const settledSignedOut = !isViewerPending && !viewer;`.
206
+
207
+ Layer it onto the comment app: the visitor can already read and post, and once they've posted, we offer to keep it.
208
+
209
+ ```jsx
210
+ <<<<<<< SEARCH
211
+ const { viewer, isViewerPending, ViewerTag } = useViewer();
212
+ =======
213
+ const { viewer, isViewerPending, ViewerTag, requestLogin } = useViewer();
214
+ >>>>>>> REPLACE
215
+ ```
216
+
217
+ ```jsx
218
+ <<<<<<< SEARCH
219
+ const [body, setBody] = React.useState("");
220
+ =======
221
+ const [body, setBody] = React.useState("");
222
+
223
+ // Settled AND anonymous — never merely anonymous, or signed-in viewers flash
224
+ // this on every load while their identity is still resolving (#3639).
225
+ const settledSignedOut = !isViewerPending && !viewer;
226
+ // The moment of value: a comment THIS visitor wrote. An anonymous write
227
+ // stamps `authorHandle: me?.userHandle` with `me` still null, so an undefined
228
+ // author is our own unclaimed work — which is exactly what signing in keeps.
229
+ // Reading `comments.length` instead would nag people who only ever read.
230
+ const hasSomethingToKeep = comments.some((c) => c.authorHandle === undefined);
231
+ >>>>>>> REPLACE
232
+ ```
233
+
234
+ ```jsx
235
+ <<<<<<< SEARCH
236
+ {/* write gate: useVibe().can, not viewer */}
237
+ =======
238
+ {settledSignedOut && hasSomethingToKeep && (
239
+ <div>
240
+ {/* Says what they GET. Never "you must sign in to continue" — they
241
+ can continue, and their comment above is already saved locally.
242
+ And never "post it under your name": signing in syncs the comment
243
+ they already wrote, it does not rewrite the author stamped on it.
244
+ Promise continuity, which is true — not attribution, which isn't. */}
245
+ <p>Your comment is saved on this device.</p>
246
+ <button onClick={requestLogin}>Sign in to keep it on all your devices</button>
247
+ </div>
248
+ )}
249
+
250
+ {/* write gate: useVibe().can, not viewer */}
251
+ >>>>>>> REPLACE
252
+ ```
253
+
254
+ Copy that works, and copy that doesn't:
255
+
256
+ | Write this | Not this |
257
+ | --- | --- |
258
+ | "Sign in to sync your picks everywhere" | "Sign in to continue" |
259
+ | "Keep these on all your devices" | "You must sign in to save" |
260
+ | "Saved on this device — sign in to sync" | "Sign in via the Vibes DIY logo" |
261
+
262
+ And never disable the app's real controls on `!viewer`. If favoriting works signed out, keep it working signed out — the access function refuses the *cloud* write on its own, calmly, while the local write still succeeds. Turning a working app into a signup wall is worse than never asking at all.
263
+
186
264
  ## Notes
187
265
 
188
266
  - Never use Clerk user IDs. Only `userHandle` crosses into vibe code.
@@ -200,17 +278,17 @@ Key points:
200
278
  <ViewerTag userHandle={member.userHandle} style={{ borderRadius: 8, fontSize: 12 }} />
201
279
  ```
202
280
 
203
- **The current viewer's identity and sign-in are system chrome, not app UI.** The platform already shows the current user — and offers a "Sign in" button to anonymous viewers — inside the Vibes Switch that opens from the logo. So don't add a no-prop `<ViewerTag />` as a header pill or login button just to show who's signed in; reach for `userHandle` to render someone else instead.
281
+ **The current viewer's pill is system chrome, not app UI.** The platform already shows the current user inside the Vibes Switch that opens from the logo, so don't add a no-prop `<ViewerTag />` as a header pill just to show who's signed in; reach for `userHandle` to render someone else instead. To *ask* an anonymous visitor to sign in, use `requestLogin()` and your own copy (see **Asking a visitor to sign in**) — that ask belongs at the moment of value, which is a place only your app knows.
204
282
 
205
283
  **The one in-app reason to render a no-prop `<ViewerTag />` is inline avatar self-edit.** A no-prop tag shows the signed-in viewer a dashed edit ring that lets them change their _own_ avatar in place, and that works for **every** signed-in viewer — the Switch's avatar editing is owner-only. So if your app wants any member (not just the owner) to update their photo without leaving the app, render a guarded `{viewer && <ViewerTag />}` for that — otherwise leave the current-viewer pill to the Switch.
206
284
 
207
285
  **Undefined safety.** If `userHandle` is present in props but falsy (e.g. a missing field from a loop lookup), `ViewerTag` renders a dim italic placeholder instead of the edit ring. This prevents a broken data source from accidentally granting photo-edit access to an arbitrary pill.
208
286
 
209
- **Anonymous & always-safe.** `ViewerTag` never throws regardless of login state. A no-prop `<ViewerTag />` would render a "Sign in" button for anonymous viewers, but you don't need to place one for sign-in — the logo's Vibes Switch already offers it.
287
+ **Anonymous & always-safe.** `ViewerTag` never throws regardless of login state. A no-prop `<ViewerTag />` renders a "Sign in" button for anonymous viewers — a fine fallback, but it is an identity chip in whatever spot you put it, not a CTA you can word or time. When the goal is conversion, write the prompt yourself and wire it to `requestLogin()`.
210
288
 
211
289
  **Theming.** `ViewerTag` reads the canonical palette variables — `--surface`, `--text-primary`, `--border`, and `--accent` (plus optional `--accent-text` to override the on-accent text color) — from the app's CSS with sensible fallbacks. If your app defines these on `:root` (which every generated theme does), `ViewerTag` inherits the theme automatically with no extra props. The one exception is the signed-out **Sign in** CTA, which deliberately stays the Vibes brand blue: it is a platform affordance matched to the Vibes Switch shown to the same visitor, so it is not theme-inherited.
212
290
 
213
- Pass `<ViewerTag userHandle={...} />` to render other people. The no-prop `<ViewerTag />` (current user) covers identity and sign-in too, but the logo's Vibes Switch already does that — reach for it only when you specifically want inline avatar self-edit for any signed-in member.
291
+ Pass `<ViewerTag userHandle={...} />` to render other people. Reach for the no-prop `<ViewerTag />` when you specifically want inline avatar self-edit for any signed-in member; for the current-user pill the Switch already covers it, and for a sign-in ask use `requestLogin()`.
214
292
 
215
293
  ## HandleInput
216
294
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibes.diy/prompts",
3
- "version": "13.1.12",
3
+ "version": "13.1.14",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "description": "",
@@ -24,9 +24,9 @@
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
26
  "@adviser/cement": "~0.5.34",
27
- "@vibes.diy/call-ai-v2": "^13.1.12",
28
- "@vibes.diy/identity": "^13.1.12",
29
- "@vibes.diy/use-vibes-types": "^13.1.12",
27
+ "@vibes.diy/call-ai-v2": "^13.1.14",
28
+ "@vibes.diy/identity": "^13.1.14",
29
+ "@vibes.diy/use-vibes-types": "^13.1.14",
30
30
  "arktype": "~2.2.3",
31
31
  "json-schema-faker": "~0.6.3"
32
32
  },
package/prompts.d.ts CHANGED
@@ -71,6 +71,25 @@ export declare const preAllocSchema: {
71
71
  };
72
72
  };
73
73
  };
74
+ readonly clarify: {
75
+ readonly type: "object";
76
+ readonly description: string;
77
+ readonly required: readonly ["question", "assumed"];
78
+ readonly properties: {
79
+ readonly question: {
80
+ readonly type: "string";
81
+ readonly description: "One short question in the owner's own words, naming the single missing input. No preamble, no second question, no compound 'and' question.";
82
+ };
83
+ readonly why: {
84
+ readonly type: "string";
85
+ readonly description: "A short phrase saying what the answer changes about the app, e.g. 'so it reads the right feed'. Written for the owner, no file names or code identifiers.";
86
+ };
87
+ readonly assumed: {
88
+ readonly type: "string";
89
+ readonly description: "REQUIRED whenever a question is asked: the concrete default the app is built against right now, phrased as the answer itself ('your campus paper's main news feed'), never as a placeholder to fill in later. Without a usable assumption the question is dropped, because a build that waits for an answer is the thing this must never become.";
90
+ };
91
+ };
92
+ };
74
93
  readonly enrichedPrompt: {
75
94
  readonly type: "string";
76
95
  readonly description: string;
@@ -106,6 +125,11 @@ export declare const preAllocParsed: import("arktype/internal/variants/object.ts
106
125
  why?: string | undefined;
107
126
  } | undefined;
108
127
  } | undefined;
128
+ clarify?: {
129
+ question?: string | undefined;
130
+ why?: string | undefined;
131
+ assumed?: string | undefined;
132
+ } | undefined;
109
133
  }, {}>;
110
134
  export type PreAllocParsed = typeof preAllocParsed.infer;
111
135
  export interface PromptSegments {
package/prompts.js CHANGED
@@ -9,6 +9,7 @@ export async function getDefaultSkills() {
9
9
  }
10
10
  const PRE_ALLOC_PLATFORM_PARAGRAPH = "Platform capabilities: every app is a small web app that anyone can open in a browser. Its data is saved automatically in the cloud and stays in sync for everyone at once, so when one person adds or changes something, everyone else viewing the app sees it update right away. Apps can call on a built-in AI assistant that returns a structured result the app saves and displays — for example suggesting or filling in a value, rewriting or extending something someone wrote, or tagging and scoring content as it's added. Apps know who is signed in, so they can show people's names and avatars next to their contributions. Most apps treat every signed-in visitor as a first-class participant who adds and edits their own contributions while everyone reads what others made; and many are built around a shared thing a group joins and co-edits — a list, a trip, a team space, a board or canvas people can ask to join — where the people who've joined edit it together and a newcomer can request in. Whichever fits, editing controls are hidden automatically for people who aren't allowed to use them. When pictures are a natural part of the experience, an app can show a generated illustration instead of requiring an upload.";
11
11
  const DEFERRED_TASK_LINE = "Then record under `deferred` what the user asked for that the first build will not include: work that happens away from the screen goes under `backend`, a sharing-readiness step goes under `access`, each with a `why` written as the chip the owner reads.";
12
+ const CLARIFY_TASK_LINE = "Then, only if one concrete input this app needs is genuinely missing from the request — a name, a source, a place — record it under `clarify` as ONE question with the default you would build against; leave `clarify` out entirely when the request already says everything the app needs.";
12
13
  export async function makePreAllocUserMessage(userPrompt, variety) {
13
14
  const catalog = await getLlmCatalog();
14
15
  const catalogText = catalog.map((l) => `- ${l.name}: ${l.description}`).join("\n");
@@ -20,7 +21,7 @@ export async function makePreAllocUserMessage(userPrompt, variety) {
20
21
  PRE_ALLOC_PLATFORM_PARAGRAPH,
21
22
  "",
22
23
  varietyContext.length > 0
23
- ? `Pick skills from this catalog that fit the user's app request, propose 3 title/slug pairs for naming, propose a one-line icon subject, pick a theme that matches the app's mood, write a 3-sentence enriched-prompt preamble that shapes THIS specific app around our platform's capabilities, described in plain user-friendly language, and write one short texture note about what should dominate this app visually. ${DEFERRED_TASK_LINE}`
24
+ ? `Pick skills from this catalog that fit the user's app request, propose 3 title/slug pairs for naming, propose a one-line icon subject, pick a theme that matches the app's mood, write a 3-sentence enriched-prompt preamble that shapes THIS specific app around our platform's capabilities, described in plain user-friendly language, and write one short texture note about what should dominate this app visually. ${DEFERRED_TASK_LINE} ${CLARIFY_TASK_LINE}`
24
25
  : `Pick skills from this catalog that fit the user's app request, propose 3 title/slug pairs for naming, propose a one-line icon subject, pick a theme that matches the app's mood, and write a 3-sentence enriched-prompt preamble that shapes THIS specific app around our platform's capabilities, described in plain user-friendly language. ${DEFERRED_TASK_LINE}`,
25
26
  "",
26
27
  "Skill catalog:",
@@ -88,6 +89,30 @@ export const preAllocSchema = {
88
89
  },
89
90
  },
90
91
  },
92
+ clarify: {
93
+ type: "object",
94
+ description: [
95
+ "AT MOST ONE question, asked only when a concrete input this app needs is genuinely missing from the request — a name, a source, a place, an account. Omit this whole object when the request already names everything the app needs to be built: an unambiguous request gets NO question, and over-asking is as much a defect as under-asking, because a builder that interrogates every request has become a form.",
96
+ "The question NEVER holds up the build. `assumed` is REQUIRED and is what the app is actually built against, so the app exists and works before the owner ever sees the question; the question is offered beside the finished app so a one-tap answer can correct it.",
97
+ 'Example, for "check my college paper\'s news feed and draft 6 jokes for my college radio show at noon every day": question "Which college paper?", why "so it reads the right feed", assumed "your campus paper\'s main news feed".',
98
+ "Do NOT ask about anything the platform decides for the user (who can read or edit, the look, the name), anything you could reasonably pick yourself, or a preference rather than a missing fact.",
99
+ ].join(" "),
100
+ required: ["question", "assumed"],
101
+ properties: {
102
+ question: {
103
+ type: "string",
104
+ description: "One short question in the owner's own words, naming the single missing input. No preamble, no second question, no compound 'and' question.",
105
+ },
106
+ why: {
107
+ type: "string",
108
+ description: "A short phrase saying what the answer changes about the app, e.g. 'so it reads the right feed'. Written for the owner, no file names or code identifiers.",
109
+ },
110
+ assumed: {
111
+ type: "string",
112
+ description: "REQUIRED whenever a question is asked: the concrete default the app is built against right now, phrased as the answer itself ('your campus paper's main news feed'), never as a placeholder to fill in later. Without a usable assumption the question is dropped, because a build that waits for an answer is the thing this must never become.",
113
+ },
114
+ },
115
+ },
91
116
  enrichedPrompt: {
92
117
  type: "string",
93
118
  description: [
@@ -115,7 +140,7 @@ export const preAllocSchema = {
115
140
  export function preAllocSchemaFor({ textureNote }) {
116
141
  if (textureNote)
117
142
  return preAllocSchema;
118
- const { textureNote: _dropped, ...properties } = preAllocSchema.properties;
143
+ const { textureNote: _dropped, clarify: _alsoDropped, ...properties } = preAllocSchema.properties;
119
144
  return { ...preAllocSchema, properties };
120
145
  }
121
146
  export const preAllocParsed = type({
@@ -131,6 +156,7 @@ export const preAllocParsed = type({
131
156
  "access?": { "needed?": "boolean", "why?": "string" },
132
157
  "backend?": { "recommended?": "boolean", "why?": "string" },
133
158
  },
159
+ "clarify?": { "question?": "string", "why?": "string", "assumed?": "string" },
134
160
  });
135
161
  export function generateImportStatements(llms) {
136
162
  const seen = new Set();
@@ -254,6 +280,11 @@ export async function makeBaseSystemPrompt(model, sessionDoc) {
254
280
  const userPromptSection = userPrompt ? `${userPrompt}\n\n` : "";
255
281
  const enrichedPromptRaw = typeof sessionDoc?.enrichedPrompt === "string" ? sessionDoc.enrichedPrompt.trim() : "";
256
282
  const enrichedPromptSection = enrichedPromptRaw ? `<app-workflow>\n${enrichedPromptRaw}\n</app-workflow>\n\n` : "";
283
+ const clarifyAssumedRaw = typeof sessionDoc?.clarifyAssumed === "string" ? sessionDoc.clarifyAssumed.trim() : "";
284
+ const clarifyAssumedSection = clarifyAssumedRaw
285
+ ? `<assumed>\nThe request left one thing unstated. Build against this: ${clarifyAssumedRaw}\n` +
286
+ `Make it concrete in the app rather than leaving a blank for the user to fill in; it is easy to change later.\n</assumed>\n\n`
287
+ : "";
257
288
  const importStatements = `import React from "react"${generateImportStatements(chosenLlms)}`;
258
289
  const templateFilename = sessionDoc?.variant === "initial"
259
290
  ? "system-prompt-initial.md"
@@ -267,7 +298,14 @@ export async function makeBaseSystemPrompt(model, sessionDoc) {
267
298
  const headPre = markerIdx === -1 ? substituteStable(template) : substituteStable(template.slice(0, markerIdx));
268
299
  const headDocs = markerIdx === -1 ? "" : concatenatedLlmsTxt + substituteStable(template.slice(markerIdx + llmsMarker.length));
269
300
  const stylePromptLine = stylePrompt ? `- Don't use words from the style prompt in your copy: ${stylePrompt}` : "";
270
- const tailSections = [stylePromptLine, themeDesignSection, titleSection, enrichedPromptSection, userPromptSection]
301
+ const tailSections = [
302
+ stylePromptLine,
303
+ themeDesignSection,
304
+ titleSection,
305
+ enrichedPromptSection,
306
+ clarifyAssumedSection,
307
+ userPromptSection,
308
+ ]
271
309
  .map((s) => s.replace(/\n+$/, ""))
272
310
  .filter((s) => s.length > 0);
273
311
  const tail = tailSections.length === 0 ? "" : `\n${tailSections.join("\n\n")}\n`;
package/prompts.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"prompts.js","sourceRoot":"","sources":["../jsr/prompts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAmB,MAAM,gBAAgB,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACjG,OAAO,EAEL,wBAAwB,EACxB,+BAA+B,EAC/B,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,OAAO,CAAC,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;AAC1D,CAAC;AAWD,MAAM,4BAA4B,GAChC,msCAAmsC,CAAC;AAStsC,MAAM,kBAAkB,GACtB,+PAA+P,CAAC;AAUlQ,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,UAAkB,EAAE,OAAoC;IACpG,MAA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AG;SAChC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,IAAI,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC;QAClB,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;IACrC,CAAC;IACD,OAAO,KAAK,CAAC,EAAE,EAAE,CAAC;AACpB,CAAC"}
package/settings.d.ts CHANGED
@@ -12,5 +12,6 @@ export interface UserSettings {
12
12
  textureNote?: string;
13
13
  title?: string;
14
14
  enrichedPrompt?: string;
15
+ clarifyAssumed?: string;
15
16
  demoData?: boolean;
16
17
  }
@@ -34,7 +34,7 @@ You are an AI assistant tasked with creating React components. You should create
34
34
  - Database reads are not a network operation — never show a loading state or spinner for them. `useLiveQuery` reads a hydrated local replica, so the first render already contains the data; an empty result means the database is genuinely empty. Render an inviting empty-state instead (friendly copy that prompts the first action), never a loading state.
35
35
  - Give instant feedback for Fireproof writes too, not just for callAI/fetch. A `database.put` (toggling a checkbox, marking done, inline edits, reorder, like/vote counters) resolves against the local replica instantly — there is no visible in-flight window to spinner over — but the UI must still react the moment the user acts. Apply the change optimistically: flip the visible value immediately and let `useLiveQuery` reconcile. If the server refuses a synced write, the local value converges to the server's version automatically — your code never catches it, so don't `try/catch` writes. The person may see a short explanation, but a refusal can also converge silently — so keep your UI driven by the live data instead of expecting a popup, and the current state will be right. Transport and offline failures are handled by the built-in queue, so don't hand-roll retry either. Never let a checkbox tap, toggle, or saved inline edit sit with no visible response.
36
36
  - For file uploads use drag and drop and store using the `doc._files` API; for AI image generation use `<ImgGen prompt="..." />`
37
- - Access control is decided by the runtime, not your code. Gate every write surface — forms, submit/edit/delete buttons, any mutating action — on `useVibe(dbName).can`. `const { me, can, ready } = useVibe("comments")` from `"use-vibes"`, passing the Fireproof database name you write to. Show the editor when `can.create(draft).ok` (or `can.edit(doc)` / `can.delete(doc)`); the verdict has three states — while it is `pending` (or `ready` is false) hold the surface in a quiet checking state, and on a resolved denial write the sign-in or join copy in your app's own words, letting `reason` inform the sentence you write. `can.*` asks the server's permission rules — the same rules the server enforces — so NEVER derive write permission from `viewer`, `access.hasRole()`/`access.hasChannel()`, or document fields. `useViewer()` is identity/display only: `const { ViewerTag } = useViewer()` renders **other** people (`<ViewerTag userHandle={...} />` for comment authors, rosters, "added by" labels). The current viewer's own pill and the sign-in button are system chrome in the Vibes Switch (the panel the logo opens) — don't add a header pill or login button for the current user. Owner-only management UI is gated on `can.*` too (the runtime knows the owner). This applies to every app — the runtime decides sharing, not the prompt. Writes can still be rejected server-side even when `can.*` allows, so keep the optimistic-write + rollback handling. See use-vibe docs.
37
+ - Access control is decided by the runtime, not your code. Gate every write surface — forms, submit/edit/delete buttons, any mutating action — on `useVibe(dbName).can`. `const { me, can, ready } = useVibe("comments")` from `"use-vibes"`, passing the Fireproof database name you write to. Show the editor when `can.create(draft).ok` (or `can.edit(doc)` / `can.delete(doc)`); the verdict has three states — while it is `pending` (or `ready` is false) hold the surface in a quiet checking state, and on a resolved denial write the sign-in or join copy in your app's own words, letting `reason` inform the sentence you write. `can.*` asks the server's permission rules — the same rules the server enforces — so NEVER derive write permission from `viewer`, `access.hasRole()`/`access.hasChannel()`, or document fields. `useViewer()` is identity/display only: `const { ViewerTag } = useViewer()` renders **other** people (`<ViewerTag userHandle={...} />` for comment authors, rosters, "added by" labels). The current viewer's own pill is system chrome in the Vibes Switch (the panel the logo opens) — don't add a header pill for the current user. But ASKING an anonymous visitor to sign in is the app's job: call `useViewer().requestLogin()` from your own button, gated on `!isViewerPending`, at the moment the visitor has made something worth keeping — never a sentence telling them to find the logo, and never a wall in front of an app that already works for them. Owner-only management UI is gated on `can.*` too (the runtime knows the owner). This applies to every app — the runtime decides sharing, not the prompt. Writes can still be rejected server-side even when `can.*` allows, so keep the optimistic-write + rollback handling. See use-vibe docs.
38
38
  - Don't try to generate png or base64 data, use placeholder image APIs instead, like https://picsum.photos/400 where 400 is the square size
39
39
  - Never use emojis in the UI. Use inline SVG icons instead — simple, single-color, stroke-based SVGs (24x24 viewBox, strokeWidth 2, strokeLinecap round, strokeLinejoin round). Build icons directly in JSX, do not import icon libraries.
40
40
  - List data items on the main page of your app so users don't have to hunt for them
@@ -34,7 +34,7 @@ You are an AI assistant tasked with creating React components. You should create
34
34
  - Database reads are not a network operation — never show a loading state or spinner for them. `useLiveQuery` reads a hydrated local replica, so the first render already contains the data; an empty result means the database is genuinely empty. Render an inviting empty-state instead (friendly copy that prompts the first action), never a loading state.
35
35
  - Give instant feedback for Fireproof writes too, not just for callAI/fetch. A `database.put` (toggling a checkbox, marking done, inline edits, reorder, like/vote counters) resolves against the local replica instantly — there is no visible in-flight window to spinner over — but the UI must still react the moment the user acts. Apply the change optimistically: flip the visible value immediately and let `useLiveQuery` reconcile. If the server refuses a synced write, the local value converges to the server's version automatically — your code never catches it, so don't `try/catch` writes. The person may see a short explanation, but a refusal can also converge silently — so keep your UI driven by the live data instead of expecting a popup, and the current state will be right. Transport and offline failures are handled by the built-in queue, so don't hand-roll retry either. Never let a checkbox tap, toggle, or saved inline edit sit with no visible response.
36
36
  - For file uploads use drag and drop and store using the `doc._files` API; for AI image generation use `<ImgGen prompt="..." />`
37
- - Access control is decided by the runtime, not your code. Gate every write surface — forms, submit/edit/delete buttons, any mutating action — on `useVibe(dbName).can`. `const { me, can, ready } = useVibe("comments")` from `"use-vibes"`, passing the Fireproof database name you write to. Show the editor when `can.create(draft).ok` (or `can.edit(doc)` / `can.delete(doc)`); the verdict has three states — while it is `pending` (or `ready` is false) hold the surface in a quiet checking state, and on a resolved denial write the sign-in or join copy in your app's own words, letting `reason` inform the sentence you write. `can.*` asks the server's permission rules — the same rules the server enforces — so NEVER derive write permission from `viewer`, `access.hasRole()`/`access.hasChannel()`, or document fields. `useViewer()` is identity/display only: `const { ViewerTag } = useViewer()` renders **other** people (`<ViewerTag userHandle={...} />` for comment authors, rosters, "added by" labels). The current viewer's own pill and the sign-in button are system chrome in the Vibes Switch (the panel the logo opens) — don't add a header pill or login button for the current user. Owner-only management UI is gated on `can.*` too (the runtime knows the owner). This applies to every app — the runtime decides sharing, not the prompt. Writes can still be rejected server-side even when `can.*` allows, so keep the optimistic-write + rollback handling. See use-vibe docs.
37
+ - Access control is decided by the runtime, not your code. Gate every write surface — forms, submit/edit/delete buttons, any mutating action — on `useVibe(dbName).can`. `const { me, can, ready } = useVibe("comments")` from `"use-vibes"`, passing the Fireproof database name you write to. Show the editor when `can.create(draft).ok` (or `can.edit(doc)` / `can.delete(doc)`); the verdict has three states — while it is `pending` (or `ready` is false) hold the surface in a quiet checking state, and on a resolved denial write the sign-in or join copy in your app's own words, letting `reason` inform the sentence you write. `can.*` asks the server's permission rules — the same rules the server enforces — so NEVER derive write permission from `viewer`, `access.hasRole()`/`access.hasChannel()`, or document fields. `useViewer()` is identity/display only: `const { ViewerTag } = useViewer()` renders **other** people (`<ViewerTag userHandle={...} />` for comment authors, rosters, "added by" labels). The current viewer's own pill is system chrome in the Vibes Switch (the panel the logo opens) — don't add a header pill for the current user. But ASKING an anonymous visitor to sign in is the app's job: call `useViewer().requestLogin()` from your own button, gated on `!isViewerPending`, at the moment the visitor has made something worth keeping — never a sentence telling them to find the logo, and never a wall in front of an app that already works for them. Owner-only management UI is gated on `can.*` too (the runtime knows the owner). This applies to every app — the runtime decides sharing, not the prompt. Writes can still be rejected server-side even when `can.*` allows, so keep the optimistic-write + rollback handling. See use-vibe docs.
38
38
  - Don't try to generate png or base64 data, use placeholder image APIs instead, like https://picsum.photos/400 where 400 is the square size
39
39
  - Never use emojis in the UI. Use inline SVG icons instead — simple, single-color, stroke-based SVGs (24x24 viewBox, strokeWidth 2, strokeLinecap round, strokeLinejoin round). Build icons directly in JSX, do not import icon libraries.
40
40
  - List data items on the main page of your app so users don't have to hunt for them
package/system-prompt.md CHANGED
@@ -34,7 +34,7 @@ You are an AI assistant tasked with creating React components. You should create
34
34
  - Database reads are not a network operation — never show a loading state or spinner for them. `useLiveQuery` reads a hydrated local replica, so the first render already contains the data; an empty result means the database is genuinely empty. Render an inviting empty-state instead (friendly copy that prompts the first action), never a loading state.
35
35
  - Give instant feedback for Fireproof writes too, not just for callAI/fetch. A `database.put` (toggling a checkbox, marking done, inline edits, reorder, like/vote counters) resolves against the local replica instantly — there is no visible in-flight window to spinner over — but the UI must still react the moment the user acts. Apply the change optimistically: flip the visible value immediately and let `useLiveQuery` reconcile. If a synced write is refused, the local optimistic revision converges to the server's version automatically — server-wins, and your code never catches it, so don't `try/catch` writes or hand-roll retry UI. Keep your UI reactive to the store (`useLiveQuery`/`useDocument`) so the converged state shows the truth. When `access.js` provides a reason (`forbidden("…")`) the platform surfaces it to the person; a reason-less refusal converges silently, so don't strip your own UI expecting a popup — gate write surfaces up front with `useVibe(dbName).can`. Transport and offline failures are handled by the built-in queue, so don't hand-roll retry either. Never let a checkbox tap, toggle, or saved inline edit sit with no visible response.
36
36
  - For file uploads use drag and drop and store using the `doc._files` API; for AI image generation use `<ImgGen prompt="..." />`
37
- - Access control is decided by the runtime, not your code. Gate every write surface — forms, submit/edit/delete buttons, any mutating action — on `useVibe(dbName).can`. `const { me, can, ready } = useVibe("comments")` from `"use-vibes"`, passing the Fireproof database name you write to. Show the editor when `can.create(draft).ok` (or `can.edit(doc)` / `can.delete(doc)`); the verdict has three states — while it is `pending` (or `ready` is false) hold the surface in a quiet checking state, and on a resolved denial write the sign-in or join copy in your app's own words, letting `reason` inform the sentence you write. `can.*` runs the app's own `access.js` — the same function the server enforces — so NEVER derive write permission from `viewer`, `access.hasRole()`/`access.hasChannel()`, or document fields. `useViewer()` is identity/display only: `const { ViewerTag } = useViewer()` renders **other** people (`<ViewerTag userHandle={...} />` for comment authors, rosters, "added by" labels). The current viewer's own pill and the sign-in button are system chrome in the Vibes Switch (the panel the logo opens) — don't add a header pill or login button for the current user. Owner-only management UI is gated on `can.*` too (the access.js encodes the owner rule). This applies to every app — the runtime decides sharing, not the prompt. Writes can still be rejected server-side even when `can.*` allows, so keep the optimistic-write + rollback handling. See use-vibe docs.
37
+ - Access control is decided by the runtime, not your code. Gate every write surface — forms, submit/edit/delete buttons, any mutating action — on `useVibe(dbName).can`. `const { me, can, ready } = useVibe("comments")` from `"use-vibes"`, passing the Fireproof database name you write to. Show the editor when `can.create(draft).ok` (or `can.edit(doc)` / `can.delete(doc)`); the verdict has three states — while it is `pending` (or `ready` is false) hold the surface in a quiet checking state, and on a resolved denial write the sign-in or join copy in your app's own words, letting `reason` inform the sentence you write. `can.*` runs the app's own `access.js` — the same function the server enforces — so NEVER derive write permission from `viewer`, `access.hasRole()`/`access.hasChannel()`, or document fields. `useViewer()` is identity/display only: `const { ViewerTag } = useViewer()` renders **other** people (`<ViewerTag userHandle={...} />` for comment authors, rosters, "added by" labels). The current viewer's own pill is system chrome in the Vibes Switch (the panel the logo opens) — don't add a header pill for the current user. But ASKING an anonymous visitor to sign in is the app's job: call `useViewer().requestLogin()` from your own button, gated on `!isViewerPending`, at the moment the visitor has made something worth keeping — never a sentence telling them to find the logo, and never a wall in front of an app that already works for them. Owner-only management UI is gated on `can.*` too (the access.js encodes the owner rule). This applies to every app — the runtime decides sharing, not the prompt. Writes can still be rejected server-side even when `can.*` allows, so keep the optimistic-write + rollback handling. See use-vibe docs.
38
38
  - Don't try to generate png or base64 data, use placeholder image APIs instead, like https://picsum.photos/400 where 400 is the square size
39
39
  - Never use emojis in the UI. Use inline SVG icons instead — simple, single-color, stroke-based SVGs (24x24 viewBox, strokeWidth 2, strokeLinecap round, strokeLinejoin round). Build icons directly in JSX, do not import icon libraries.
40
40
  - Consider and potentially reuse/extend code from previous responses if relevant