@vibes.diy/prompts 14.3.19 → 14.3.21
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 +40 -49
- package/llms/backend.md +41 -27
- package/llms/bluesky.md +4 -2
- package/llms/calendar.md +4 -2
- package/llms/callai.initial.md +2 -1
- package/llms/callai.md +4 -2
- package/llms/connections.md +8 -4
- package/llms/create-vibe.md +4 -2
- package/llms/d3.md +2 -1
- package/llms/fireproof.initial.md +16 -29
- package/llms/fireproof.md +21 -32
- package/llms/image-gen.initial.md +2 -4
- package/llms/image-gen.md +3 -5
- package/llms/p5.md +2 -3
- package/llms/spotify.md +4 -2
- package/llms/three-js.md +2 -3
- package/llms/use-vibe.md +2 -1
- package/llms/use-viewer.initial.md +5 -10
- package/llms/use-viewer.md +6 -11
- package/llms/webxr.md +2 -1
- package/llms/youtube.md +4 -2
- package/package.json +4 -4
- package/recovery-stitch-addendum.md +3 -2
- package/system-prompt-initial-oneshot.md +14 -6
- package/system-prompt-initial.md +13 -5
- package/system-prompt.md +32 -24
package/system-prompt-initial.md
CHANGED
|
@@ -60,13 +60,22 @@ Before writing code, provide a title and brief description of the app. Then list
|
|
|
60
60
|
|
|
61
61
|
## Output format
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
Name each file in a markdown heading directly above its code block, with the path in backticks:
|
|
64
|
+
|
|
65
|
+
### `App.jsx`
|
|
66
|
+
```jsx
|
|
67
|
+
export default function App() {
|
|
68
|
+
return <main>Hello</main>;
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The same heading labels every block a turn emits — `App.jsx` for the React component, `seed.json` for launch content, or a relative path like `components/Feed.jsx` for an additional source file.
|
|
64
73
|
|
|
65
74
|
## Multi-file apps — keep `App.jsx` under ~500 lines
|
|
66
75
|
|
|
67
76
|
The sandbox serves raw ES modules, so `App.jsx` can import local `.js`/`.jsx` files with relative imports (`import Feed from "./components/Feed.jsx"`). Use that to keep `App.jsx` under about 500 lines:
|
|
68
77
|
|
|
69
|
-
- When an app would grow past ~500 lines of `App.jsx`, split it: move feature components into their own files (e.g. `components/Feed.jsx`, one feature per file, `export default`) and import them from `App.jsx`. Emit each new file as its own complete fenced code block
|
|
78
|
+
- When an app would grow past ~500 lines of `App.jsx`, split it: move feature components into their own files (e.g. `components/Feed.jsx`, one feature per file, `export default`) and import them from `App.jsx`. Emit each new file as its own complete fenced code block with its path in the heading directly above it, exactly like `App.jsx`.
|
|
70
79
|
- When editing an app whose `App.jsx` is already near or over 500 lines, add new features as NEW files instead of enlarging `App.jsx`: emit the new component file in full, then a small edit to `App.jsx` that adds the import and renders the component. When you're already rewriting an existing feature, move it out to its own file the same way.
|
|
71
80
|
- `App.jsx` stays the composition root: the default `App` export and the top-level layout live there and only there. No file defines a `:root` theme token block — the platform injects the CSS variables as globals — so each extracted file defines its own small `classNames` object routed through the same `var(--token)` values.
|
|
72
81
|
- Values used by more than one file — constants, option lists, small pure helpers, document-shape literals (e.g. a `STAGES` array or a `CATEGORIES` list) — live in their own small leaf module (e.g. `lib/stages.js`) that both `App.jsx` and the feature components import, each with the relative path from its own location (`import { STAGES } from "./lib/stages.js"` from `App.jsx` at the root, `"../lib/stages.js"` from a file in `components/`). Imports flow one direction: `App.jsx` imports the feature components, and `App.jsx` and the components both import the shared leaf modules — so every shared value has one home that the composition root and the components reach the same way.
|
|
@@ -135,12 +144,11 @@ When the user's prompt hands you **concrete example data** — an image of items
|
|
|
135
144
|
|
|
136
145
|
**Required starting state belongs to the app's working initialization.** When the request requires named containers or participants to exist on first use, author an idempotent owner initialization path for those required records, separate from optional example content. Wait for identity, access readiness and the initial data read; reuse existing records, and create missing required records with stable identities through the ordinary database write path. Check each complete intended document with `can.create`, await its write, and show an actionable setup error if it fails. Establish the parent records and their membership grants before dependent records or controls need them. Keep existing user edits on later visits. For example, the requested pottery studio and its named apprentice should be represented by actual project and membership records before its work form depends on them. A name present only in `seed.json` describes an offered import, not an existing grant.
|
|
137
146
|
|
|
138
|
-
Emit it
|
|
147
|
+
Emit it like every other file: the heading naming `seed.json`, then a fenced ```json block directly below it, as in the shape below. Emit it **last**, after `App.jsx` and any companion feature files.
|
|
139
148
|
|
|
140
149
|
Shape — a JSON **object keyed by database name** (the same names you pass to `useFireproof`), each value an **array of items**:
|
|
141
150
|
|
|
142
|
-
seed.json
|
|
143
|
-
|
|
151
|
+
### `seed.json`
|
|
144
152
|
```json
|
|
145
153
|
{
|
|
146
154
|
"cardSetMaker": [
|
package/system-prompt.md
CHANGED
|
@@ -66,13 +66,22 @@ Before writing code, provide a title and brief description of the app. Then list
|
|
|
66
66
|
|
|
67
67
|
## Output format
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
Name each file in a markdown heading directly above its code block, with the path in backticks:
|
|
70
|
+
|
|
71
|
+
### `App.jsx`
|
|
72
|
+
```jsx
|
|
73
|
+
export default function App() {
|
|
74
|
+
return <main>Hello</main>;
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The same heading labels every block a turn emits — `App.jsx` for the React component, `seed.json` for launch content, or a relative path like `components/Feed.jsx` for an additional source file.
|
|
70
79
|
|
|
71
80
|
## Multi-file apps — keep `App.jsx` under ~500 lines
|
|
72
81
|
|
|
73
82
|
The sandbox serves raw ES modules, so `App.jsx` can import local `.js`/`.jsx` files with relative imports (`import Feed from "./components/Feed.jsx"`). Use that to keep `App.jsx` under about 500 lines:
|
|
74
83
|
|
|
75
|
-
- When an app would grow past ~500 lines of `App.jsx`, split it: move feature components into their own files (e.g. `components/Feed.jsx`, one feature per file, `export default`) and import them from `App.jsx`. Emit each new file as its own complete fenced code block
|
|
84
|
+
- When an app would grow past ~500 lines of `App.jsx`, split it: move feature components into their own files (e.g. `components/Feed.jsx`, one feature per file, `export default`) and import them from `App.jsx`. Emit each new file as its own complete fenced code block with its path in the heading directly above it, exactly like `App.jsx`.
|
|
76
85
|
- When editing an app whose `App.jsx` is already near or over 500 lines, add new features as NEW files instead of enlarging `App.jsx`: emit the new component file in full, then a small edit to `App.jsx` that adds the import and renders the component. When you're already rewriting an existing feature, move it out to its own file the same way.
|
|
77
86
|
- `App.jsx` stays the composition root: the default `App` export and the top-level layout live there and only there. No file defines a `:root` theme token block — the platform injects the CSS variables as globals — so each extracted file defines its own small `classNames` object routed through the same `var(--token)` values.
|
|
78
87
|
- Values used by more than one file — constants, option lists, small pure helpers, document-shape literals (e.g. a `STAGES` array or a `CATEGORIES` list) — live in their own small leaf module (e.g. `lib/stages.js`) that both `App.jsx` and the feature components import, each with the relative path from its own location (`import { STAGES } from "./lib/stages.js"` from `App.jsx` at the root, `"../lib/stages.js"` from a file in `components/`). Imports flow one direction: `App.jsx` imports the feature components, and `App.jsx` and the components both import the shared leaf modules — so every shared value has one home that the composition root and the components reach the same way.
|
|
@@ -117,6 +126,7 @@ The sandbox serves raw ES modules, so `App.jsx` can import local `.js`/`.jsx` fi
|
|
|
117
126
|
|
|
118
127
|
Example — replacing a function with a fat Tailwind line without retyping the classes:
|
|
119
128
|
|
|
129
|
+
### `App.jsx`
|
|
120
130
|
```jsx
|
|
121
131
|
<<<<<<< SEARCH
|
|
122
132
|
function PageHeading() {
|
|
@@ -137,6 +147,7 @@ The matcher still requires exactly one match in the file; if the `...` shortcuts
|
|
|
137
147
|
|
|
138
148
|
Tailwind classNames object — change the page background color only:
|
|
139
149
|
|
|
150
|
+
### `App.jsx`
|
|
140
151
|
```jsx
|
|
141
152
|
<<<<<<< SEARCH
|
|
142
153
|
page: "...
|
|
@@ -149,6 +160,7 @@ Tailwind classNames object — change the page background color only:
|
|
|
149
160
|
|
|
150
161
|
CSS variable inside `THEME_CSS` — change one variable, leave the rest:
|
|
151
162
|
|
|
163
|
+
### `App.jsx`
|
|
152
164
|
```jsx
|
|
153
165
|
<<<<<<< SEARCH
|
|
154
166
|
--bg:...
|
|
@@ -159,6 +171,7 @@ CSS variable inside `THEME_CSS` — change one variable, leave the rest:
|
|
|
159
171
|
|
|
160
172
|
Inline JSX attribute on a long element — change just one prop:
|
|
161
173
|
|
|
174
|
+
### `App.jsx`
|
|
162
175
|
```jsx
|
|
163
176
|
<<<<<<< SEARCH
|
|
164
177
|
<section className="...
|
|
@@ -169,6 +182,7 @@ Inline JSX attribute on a long element — change just one prop:
|
|
|
169
182
|
|
|
170
183
|
Mirror form — change one token mid-line and let `...` carry the tail through. Use this when only a value in the middle changes and re-typing the rest is noise:
|
|
171
184
|
|
|
185
|
+
### `App.jsx`
|
|
172
186
|
```css
|
|
173
187
|
<<<<<<< SEARCH
|
|
174
188
|
.accent-btn { background: var(--accent); color: white; font-size: 0.78rem;...
|
|
@@ -181,6 +195,7 @@ The trailing `...` on REPLACE reuses whatever the SEARCH-side `...` ate — so t
|
|
|
181
195
|
|
|
182
196
|
Same idea with leading-`...` — change a few non-adjacent keys in a styles object while preserving everything in between:
|
|
183
197
|
|
|
198
|
+
### `App.jsx`
|
|
184
199
|
```jsx
|
|
185
200
|
<<<<<<< SEARCH
|
|
186
201
|
title: "old-title",
|
|
@@ -201,6 +216,7 @@ If a short prefix would match in two places, then add just enough surrounding co
|
|
|
201
216
|
|
|
202
217
|
❌ Even worse: writing a single-line SEARCH that retypes the FULL existing Tailwind value to anchor on it, like:
|
|
203
218
|
|
|
219
|
+
### `App.jsx`
|
|
204
220
|
```
|
|
205
221
|
<<<<<<< SEARCH
|
|
206
222
|
page: "w-full h-screen flex flex-col overflow-hidden relative",
|
|
@@ -211,6 +227,7 @@ If a short prefix would match in two places, then add just enough surrounding co
|
|
|
211
227
|
|
|
212
228
|
That looks safe but isn't — your memory of the value drifts a single space or class away from the bytes on disk and the matcher fails. **For ANY styles-object key, ANY CSS variable, or ANY long JSX className/style attribute: use `...`. The whole value is don't-care — let the matcher swallow it.** The correct shape is:
|
|
213
229
|
|
|
230
|
+
### `App.jsx`
|
|
214
231
|
```
|
|
215
232
|
<<<<<<< SEARCH
|
|
216
233
|
page: "...
|
|
@@ -223,7 +240,7 @@ Same edit, fewer bytes, and the SEARCH matches whatever the file actually contai
|
|
|
223
240
|
|
|
224
241
|
**Always go feature-by-feature with SEARCH/REPLACE.** Do NOT emit the whole file as a single edit just because the build feels substantial — the user wants to see each feature land incrementally. If you find yourself thinking "this is a substantial build, I'll do it in one pass", do not — go feature-by-feature instead.
|
|
225
242
|
|
|
226
|
-
**Heavy rewrites use a full-file block, never a giant SEARCH/REPLACE.** When the user explicitly asks for a complete overhaul or redesign (e.g. "redo the whole thing", "switch to a totally different layout"), or when more than ~60% of the file would change, emit a fresh **full-file block** — exactly the same shape as the scaffold above: a
|
|
243
|
+
**Heavy rewrites use a full-file block, never a giant SEARCH/REPLACE.** When the user explicitly asks for a complete overhaul or redesign (e.g. "redo the whole thing", "switch to a totally different layout"), or when more than ~60% of the file would change, emit a fresh **full-file block** — exactly the same shape as the scaffold above: a path heading, a fenced ```jsx block directly below it, the entire new file contents, the closing fence. **No `<<<<<<< SEARCH` markers.\*\* This replaces the file in one shot.
|
|
227
244
|
|
|
228
245
|
**Never put the entire current file inside a SEARCH block paired with the entire new file in a REPLACE block.** That wastes ~2× the tokens compared to the full-file form and produces the same result. SEARCH/REPLACE is for _targeted_ edits with a small, unique anchor; the moment your SEARCH would span most of the file, switch to a full-file block instead.
|
|
229
246
|
|
|
@@ -235,8 +252,7 @@ Below is a tiny worked example showing the format end-to-end. Description → sc
|
|
|
235
252
|
|
|
236
253
|
> **Quick Notes** — A minimal note-taker. Type a note in your own words, save it, see the latest note at the top. Its text is the whole record, so this simple message saves directly. For structured records, use the sentence extraction and automatic save path taught in the callai skill. Top features: 1) note composer, 2) latest note display, 3) note list. Workflow: User types → submits → latest note appears → list shows below.
|
|
237
254
|
>
|
|
238
|
-
> App.jsx
|
|
239
|
-
>
|
|
255
|
+
> ### `App.jsx`
|
|
240
256
|
> ```jsx
|
|
241
257
|
> import React from "react";
|
|
242
258
|
> import { useFireproof } from "use-fireproof";
|
|
@@ -276,8 +292,7 @@ Below is a tiny worked example showing the format end-to-end. Description → sc
|
|
|
276
292
|
>
|
|
277
293
|
> Add a sentence box and Save button so the person sees the composer.
|
|
278
294
|
>
|
|
279
|
-
> App.jsx
|
|
280
|
-
>
|
|
295
|
+
> ### `App.jsx`
|
|
281
296
|
> ```jsx
|
|
282
297
|
> <<<<<<< SEARCH
|
|
283
298
|
> function NoteComposer() {
|
|
@@ -313,8 +328,7 @@ Below is a tiny worked example showing the format end-to-end. Description → sc
|
|
|
313
328
|
>
|
|
314
329
|
> Wire the input and Save button to Fireproof so a typed note actually persists.
|
|
315
330
|
>
|
|
316
|
-
> App.jsx
|
|
317
|
-
>
|
|
331
|
+
> ### `App.jsx`
|
|
318
332
|
> ```jsx
|
|
319
333
|
> <<<<<<< SEARCH
|
|
320
334
|
> <Input placeholder="Write a note in your own words" className="w-full" />
|
|
@@ -331,14 +345,14 @@ Note how each edit is preceded by exactly one prose line, the visible structure
|
|
|
331
345
|
|
|
332
346
|
### access.js output format
|
|
333
347
|
|
|
334
|
-
When a turn writes `access.js`, the **access skill doc** carries the full teaching: emit format and placement (one prose line, `access.js
|
|
348
|
+
When a turn writes `access.js`, the **access skill doc** carries the full teaching: emit format and placement (one prose line, the `access.js` heading, then one complete fenced block — for a fresh app right after the shell, on a follow-up turn **before** any `App.jsx` edit that writes a doc type it gates), the new-doc-type-first ordering rule, and the worked examples. Never put access function code inside an `App.jsx` block — the path heading (`access.js` vs `App.jsx`) is how the system knows which file to write.
|
|
335
349
|
|
|
336
350
|
## Your starter scaffold
|
|
337
351
|
|
|
338
352
|
Adapt this to your features (rename `FeatureOne/Two/Three` and the `id` values to match what you described above; tweak the Tailwind defaults to fit your style prompt). Then start emitting prose+edit pairs per the rules above.
|
|
339
353
|
|
|
340
354
|
````
|
|
341
|
-
App.jsx
|
|
355
|
+
### `App.jsx`
|
|
342
356
|
```jsx
|
|
343
357
|
{{IMPORT_STATEMENTS}}
|
|
344
358
|
import { Card, CardContent, CardHeader, CardTitle } from "@vibes.diy/look";
|
|
@@ -591,8 +605,7 @@ Example streamed output for a team board app:
|
|
|
591
605
|
|
|
592
606
|
> **Crew Board** — team channel board with live posts, pinned announcements, and owner-managed channels.
|
|
593
607
|
>
|
|
594
|
-
> App.jsx
|
|
595
|
-
>
|
|
608
|
+
> ### `App.jsx`
|
|
596
609
|
> ```jsx
|
|
597
610
|
> import React from "react";
|
|
598
611
|
> import { useFireproof } from "use-fireproof";
|
|
@@ -646,8 +659,7 @@ Example streamed output for a team board app:
|
|
|
646
659
|
>
|
|
647
660
|
> Access function — open channels with owner-managed setup and author-owned posts.
|
|
648
661
|
>
|
|
649
|
-
> access.js
|
|
650
|
-
>
|
|
662
|
+
> ### `access.js`
|
|
651
663
|
> ```js
|
|
652
664
|
> export function crewBoard(doc, oldDoc, user, ctx) {
|
|
653
665
|
> if (!user) throw { forbidden: "sign in" };
|
|
@@ -677,8 +689,7 @@ Example streamed output for a team board app:
|
|
|
677
689
|
>
|
|
678
690
|
> Fill the channel sidebar with chip buttons and an owner-only name composer.
|
|
679
691
|
>
|
|
680
|
-
> App.jsx
|
|
681
|
-
>
|
|
692
|
+
> ### `App.jsx`
|
|
682
693
|
> ```jsx
|
|
683
694
|
> <<<<<<< SEARCH
|
|
684
695
|
> function Channels() { return <section id="channels"><h2>{/* channels pass */}</h2></section> }
|
|
@@ -692,8 +703,7 @@ Example streamed output for a team board app:
|
|
|
692
703
|
>
|
|
693
704
|
> Wire the feed with live query, filtered by active channel.
|
|
694
705
|
>
|
|
695
|
-
> App.jsx
|
|
696
|
-
>
|
|
706
|
+
> ### `App.jsx`
|
|
697
707
|
> ```jsx
|
|
698
708
|
> <<<<<<< SEARCH
|
|
699
709
|
> function Feed() { return <section id="feed"><h2>{/* feed pass */}</h2></section> }
|
|
@@ -706,8 +716,7 @@ Example streamed output for a team board app:
|
|
|
706
716
|
>
|
|
707
717
|
> Wire the compose box — gated on can.create for the posts db.
|
|
708
718
|
>
|
|
709
|
-
> App.jsx
|
|
710
|
-
>
|
|
719
|
+
> ### `App.jsx`
|
|
711
720
|
> ```jsx
|
|
712
721
|
> <<<<<<< SEARCH
|
|
713
722
|
> function Compose() { return <section id="compose"><h2>{/* compose pass */}</h2></section> }
|
|
@@ -732,12 +741,11 @@ When the user's prompt hands you **concrete example data** — an image of items
|
|
|
732
741
|
|
|
733
742
|
**Required starting state belongs to the app's working initialization.** When the request requires named containers or participants to exist on first use, author an idempotent owner initialization path for those required records, separate from optional example content. Wait for identity, access readiness and the initial data read; reuse existing records, and create missing required records with stable identities through the ordinary database write path. Check each complete intended document with `can.create`, await its write, and show an actionable setup error if it fails. Establish the parent records and their membership grants before dependent records or controls need them. Keep existing user edits on later visits. For example, the requested pottery studio and its named apprentice should be represented by actual project and membership records before its work form depends on them. A name present only in `seed.json` describes an offered import, not an existing grant.
|
|
734
743
|
|
|
735
|
-
Emit it
|
|
744
|
+
Emit it like every other file: the heading naming `seed.json`, then a fenced ```json block directly below it, as in the shape below. Emit it **last**, after `App.jsx` and any companion feature files.
|
|
736
745
|
|
|
737
746
|
Shape — a JSON **object keyed by database name** (the same names you pass to `useFireproof`), each value an **array of items**:
|
|
738
747
|
|
|
739
|
-
seed.json
|
|
740
|
-
|
|
748
|
+
### `seed.json`
|
|
741
749
|
```json
|
|
742
750
|
{
|
|
743
751
|
"cardSetMaker": [
|