@vibes.diy/prompts 14.3.20 → 14.3.22
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.draft.md +47 -0
- package/llms/fireproof.initial.md +33 -29
- package/llms/fireproof.js +1 -0
- package/llms/fireproof.js.map +1 -1
- package/llms/fireproof.md +38 -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/types.d.ts +1 -0
- 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/prompts.d.ts +1 -1
- package/prompts.js +54 -11
- package/prompts.js.map +1 -1
- package/recovery-stitch-addendum.md +3 -2
- package/system-prompt-initial-draft.md +128 -0
- package/system-prompt-initial-oneshot.md +14 -6
- package/system-prompt-initial.md +13 -5
- package/system-prompt.md +32 -24
package/prompts.js
CHANGED
|
@@ -35,6 +35,15 @@ export function generateImportStatements(llms) {
|
|
|
35
35
|
.join("");
|
|
36
36
|
}
|
|
37
37
|
const keyedLoadAsset = new KeyedResolvOnce();
|
|
38
|
+
const DRAFT_REPLACED_SKILLS = new Set([
|
|
39
|
+
"fireproof",
|
|
40
|
+
"image-gen",
|
|
41
|
+
"use-vibe",
|
|
42
|
+
"use-viewer",
|
|
43
|
+
"callai",
|
|
44
|
+
"access",
|
|
45
|
+
"backend",
|
|
46
|
+
]);
|
|
38
47
|
const DEFAULT_PKG_BASE_URL = "https://esm.sh/@vibes.diy/prompts/";
|
|
39
48
|
export async function makeBaseSystemPrompt(model, sessionDoc) {
|
|
40
49
|
const userPrompt = sessionDoc?.userPrompt || "";
|
|
@@ -48,25 +57,43 @@ export async function makeBaseSystemPrompt(model, sessionDoc) {
|
|
|
48
57
|
if (selectedNames.length === 0) {
|
|
49
58
|
selectedNames = [...(await getDefaultSkills())];
|
|
50
59
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
60
|
+
const isDraft = sessionDoc?.variant === "initial-draft";
|
|
61
|
+
const draftWantsImages = isDraft && selectedNames.includes("image-gen");
|
|
62
|
+
const draftExtras = isDraft
|
|
63
|
+
? llmsCatalog.filter((l) => selectedNames.includes(l.name) && DRAFT_REPLACED_SKILLS.has(l.name) === false).map((l) => l.name)
|
|
64
|
+
: [];
|
|
65
|
+
if (isDraft) {
|
|
66
|
+
selectedNames = ["fireproof", ...(draftWantsImages ? ["image-gen"] : []), ...draftExtras].filter((name) => llmsCatalogNames.has(name));
|
|
67
|
+
}
|
|
68
|
+
if (!isDraft) {
|
|
69
|
+
for (const required of ["use-vibe", "use-viewer"]) {
|
|
70
|
+
if (llmsCatalogNames.has(required) && !selectedNames.includes(required)) {
|
|
71
|
+
selectedNames.push(required);
|
|
72
|
+
}
|
|
54
73
|
}
|
|
55
74
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
selectedNames.
|
|
75
|
+
if (!isDraft) {
|
|
76
|
+
for (const capability of ["image-gen", "callai"]) {
|
|
77
|
+
if (llmsCatalogNames.has(capability) && !selectedNames.includes(capability)) {
|
|
78
|
+
selectedNames.push(capability);
|
|
79
|
+
}
|
|
59
80
|
}
|
|
60
81
|
}
|
|
61
|
-
const isFirstTurn = sessionDoc?.variant === "initial" || sessionDoc?.variant === "initial-oneshot";
|
|
82
|
+
const isFirstTurn = sessionDoc?.variant === "initial" || sessionDoc?.variant === "initial-oneshot" || sessionDoc?.variant === "initial-draft";
|
|
62
83
|
if (isFirstTurn === false && llmsCatalogNames.has("backend") && selectedNames.includes("backend") === false) {
|
|
63
84
|
selectedNames.push("backend");
|
|
64
85
|
}
|
|
65
86
|
const includeDemoData = sessionDoc?.demoData === true;
|
|
66
|
-
const chosenLlms =
|
|
87
|
+
const chosenLlms = isDraft
|
|
88
|
+
? selectedNames.flatMap((name) => llmsCatalog.filter((l) => l.name === name))
|
|
89
|
+
: llmsCatalog.filter((l) => selectedNames.includes(l.name));
|
|
67
90
|
const concatenatedLlmsTxts = [];
|
|
68
91
|
for (const llm of chosenLlms) {
|
|
69
|
-
const docFile =
|
|
92
|
+
const docFile = isDraft && llm.draftVariant === true
|
|
93
|
+
? `${llm.name}.draft.md`
|
|
94
|
+
: isFirstTurn && llm.initialVariant === true
|
|
95
|
+
? `${llm.name}.initial.md`
|
|
96
|
+
: `${llm.name}.md`;
|
|
70
97
|
const rText = await keyedLoadAsset.get(docFile).once(async () => {
|
|
71
98
|
return loadAsset(`./llms/${docFile}`, {
|
|
72
99
|
fallBackUrl: pkgBaseUrl,
|
|
@@ -169,9 +196,25 @@ export async function makeBaseSystemPrompt(model, sessionDoc) {
|
|
|
169
196
|
? "system-prompt-initial.md"
|
|
170
197
|
: sessionDoc?.variant === "initial-oneshot"
|
|
171
198
|
? "system-prompt-initial-oneshot.md"
|
|
172
|
-
: "
|
|
199
|
+
: sessionDoc?.variant === "initial-draft"
|
|
200
|
+
? "system-prompt-initial-draft.md"
|
|
201
|
+
: "system-prompt.md";
|
|
173
202
|
const template = await getSystemPromptTemplate(pkgBaseUrl, templateFilename, sessionDoc.fetch);
|
|
174
|
-
const
|
|
203
|
+
const extraImports = chosenLlms
|
|
204
|
+
.filter((l) => draftExtras.includes(l.name))
|
|
205
|
+
.map((l) => {
|
|
206
|
+
const statement = generateImportStatements([l]).trim();
|
|
207
|
+
return statement.length > 0
|
|
208
|
+
? `, plus \`${statement}\` for ${l.label} (its doc is below)`
|
|
209
|
+
: `, plus the browser's own ${l.label} for what the brief asks of it (its doc is below)`;
|
|
210
|
+
})
|
|
211
|
+
.join("");
|
|
212
|
+
const imageLine = (draftWantsImages ? ', plus `import { ImgGen } from "use-vibes"` for the pictures the brief asks for (its doc is below)' : "") +
|
|
213
|
+
extraImports;
|
|
214
|
+
const substituteStable = (s) => s
|
|
215
|
+
.replaceAll("{{DEMO_DATA}}", demoDataLines)
|
|
216
|
+
.replaceAll("{{IMPORT_STATEMENTS}}", importStatements)
|
|
217
|
+
.replaceAll("{{IMAGE_LINE}}", imageLine);
|
|
175
218
|
const llmsMarker = "{{CONCATENATED_LLMS}}";
|
|
176
219
|
const markerIdx = template.indexOf(llmsMarker);
|
|
177
220
|
const headPre = markerIdx === -1 ? substituteStable(template) : substituteStable(template.slice(0, markerIdx));
|
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,uBAAuB,EAAE,oBAAoB,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AAClH,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClG,OAAO,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAEzF,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;AAkCD,MAAM,UAAU,wBAAwB,CAAC,IAAuB;IAC9D,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,OAAO,IAAI;SACR,MAAM,CAAC,CAAC,CAAC,E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AC;IACD,OAAO,KAAK,CAAC,EAAE,EAAE,CAAC;AACpB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,IAAY;IAC7C,MAAM,KAAK,GAAG,MAAM,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE;QAC3D,OAAO,SAAS,CAAC,UAAU,IAAI,KAAK,EAAE;YACpC,WAAW,EAAE,oBAAoB;YACjC,QAAQ,EAAE,GAAG,EAAE,CAAC,OAAO,IAAI,CAAC,GAAG;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;AAED,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,IAAY;IAC7C,MAAM,KAAK,GAAG,MAAM,cAAc,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE;QACtE,OAAO,SAAS,CAAC,YAAY,IAAI,KAAK,EAAE;YACtC,WAAW,EAAE,oBAAoB;YACjC,QAAQ,EAAE,GAAG,EAAE,CAAC,OAAO,IAAI,CAAC,GAAG;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"}
|
|
@@ -9,5 +9,6 @@ good state to base the rewrite on. Trust it as ground truth for what
|
|
|
9
9
|
already works; do not regress features that are present there.
|
|
10
10
|
|
|
11
11
|
Do not split the rewrite across multiple SEARCH/REPLACE blocks. One
|
|
12
|
-
block, full file, fresh contents.
|
|
13
|
-
|
|
12
|
+
block, full file, fresh contents. A heading naming the file,
|
|
13
|
+
with its path in backticks (### `App.jsx`), then a single fenced ```jsx
|
|
14
|
+
block directly below it with the entire file inside.
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
You write the first draft of a small React web app on vibes.diy. Below is one complete draft in exactly the shape yours takes: a sentence, `App.jsx`, `seed.json`, then a `Stand-ins` list. Read it once, then write the app the brief at the end of this prompt asks for, in the same shape, with the person's interaction working end to end on realistic seed data.
|
|
2
|
+
|
|
3
|
+
## The shape, complete
|
|
4
|
+
|
|
5
|
+
A guest book for a mountain cabin where visitors leave a note and the owner can pin favourites.
|
|
6
|
+
|
|
7
|
+
### `App.jsx`
|
|
8
|
+
```jsx
|
|
9
|
+
import React, { useState } from "react";
|
|
10
|
+
import { useFireproof } from "use-fireproof";
|
|
11
|
+
import { Button, Card, CardHeader, CardTitle, CardContent, Input, Textarea, Badge, Tabs, TabsList, TabsTrigger, TabsContent } from "@vibes.diy/look";
|
|
12
|
+
|
|
13
|
+
const MOODS = ["cozy", "snowed in", "sunburnt", "wildlife!"];
|
|
14
|
+
|
|
15
|
+
function formatDate(ms) {
|
|
16
|
+
return new Date(ms).toLocaleDateString(undefined, { month: "short", day: "numeric" });
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function NoteCard({ note, onPin }) {
|
|
20
|
+
return (
|
|
21
|
+
<Card className="mt-4">
|
|
22
|
+
<CardHeader>
|
|
23
|
+
<CardTitle>{note.author}</CardTitle>
|
|
24
|
+
</CardHeader>
|
|
25
|
+
<CardContent>
|
|
26
|
+
<p className="text-card-foreground">{note.text}</p>
|
|
27
|
+
<div className="mt-3 flex items-center gap-3">
|
|
28
|
+
<Badge variant="secondary">{note.mood}</Badge>
|
|
29
|
+
<span className="text-muted-foreground">{formatDate(note.createdAt)}</span>
|
|
30
|
+
<Button size="sm" variant={note.pinned ? "default" : "outline"} onClick={() => onPin(note)}>
|
|
31
|
+
{note.pinned ? "Pinned" : "Pin"}
|
|
32
|
+
</Button>
|
|
33
|
+
</div>
|
|
34
|
+
</CardContent>
|
|
35
|
+
</Card>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export default function App() {
|
|
40
|
+
const { database, useLiveQuery } = useFireproof("cabinGuestBook");
|
|
41
|
+
const { docs: notes } = useLiveQuery("type", { key: "note", descending: true });
|
|
42
|
+
const [author, setAuthor] = useState("");
|
|
43
|
+
const [text, setText] = useState("");
|
|
44
|
+
const [mood, setMood] = useState(MOODS[0]);
|
|
45
|
+
|
|
46
|
+
const addNote = () => {
|
|
47
|
+
if (text.trim().length === 0) return;
|
|
48
|
+
database.put({ type: "note", author: author.trim() || "A guest", text: text.trim(), mood, pinned: false, createdAt: Date.now(), authorHandle: "guest" });
|
|
49
|
+
setText("");
|
|
50
|
+
};
|
|
51
|
+
const togglePin = (note) => database.put({ ...note, pinned: !note.pinned });
|
|
52
|
+
const pinned = notes.filter((n) => n.pinned);
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<main className="min-h-screen bg-background text-foreground font-sans p-6">
|
|
56
|
+
<h1 className="text-3xl font-bold">Pine Hollow Guest Book</h1>
|
|
57
|
+
<p className="mt-1 text-muted-foreground">Leave a note for the next family through the door.</p>
|
|
58
|
+
|
|
59
|
+
<Card className="mt-6">
|
|
60
|
+
<CardHeader>
|
|
61
|
+
<CardTitle>Sign the book</CardTitle>
|
|
62
|
+
</CardHeader>
|
|
63
|
+
<CardContent>
|
|
64
|
+
<div className="grid gap-4">
|
|
65
|
+
<Input value={author} onChange={(e) => setAuthor(e.target.value)} placeholder="Your name" />
|
|
66
|
+
<Textarea value={text} onChange={(e) => setText(e.target.value)} placeholder="What did the cabin give you this weekend?" />
|
|
67
|
+
<div className="flex flex-wrap gap-2">
|
|
68
|
+
{MOODS.map((m) => (
|
|
69
|
+
<Button key={m} size="sm" variant={m === mood ? "default" : "outline"} onClick={() => setMood(m)}>{m}</Button>
|
|
70
|
+
))}
|
|
71
|
+
</div>
|
|
72
|
+
<Button onClick={addNote}>Add my note</Button>
|
|
73
|
+
</div>
|
|
74
|
+
</CardContent>
|
|
75
|
+
</Card>
|
|
76
|
+
|
|
77
|
+
<Tabs defaultValue="all" className="mt-8">
|
|
78
|
+
<TabsList>
|
|
79
|
+
<TabsTrigger value="all">All notes ({notes.length})</TabsTrigger>
|
|
80
|
+
<TabsTrigger value="pinned">Pinned ({pinned.length})</TabsTrigger>
|
|
81
|
+
</TabsList>
|
|
82
|
+
<TabsContent value="all">
|
|
83
|
+
{notes.map((n) => <NoteCard key={n._id} note={n} onPin={togglePin} />)}
|
|
84
|
+
</TabsContent>
|
|
85
|
+
<TabsContent value="pinned">
|
|
86
|
+
{pinned.map((n) => <NoteCard key={n._id} note={n} onPin={togglePin} />)}
|
|
87
|
+
</TabsContent>
|
|
88
|
+
</Tabs>
|
|
89
|
+
|
|
90
|
+
<Card className="mt-8">
|
|
91
|
+
<CardHeader>
|
|
92
|
+
<CardTitle>Owner's corner</CardTitle>
|
|
93
|
+
</CardHeader>
|
|
94
|
+
<CardContent>
|
|
95
|
+
<Badge variant="secondary">Coming in the next pass</Badge>
|
|
96
|
+
<p className="mt-2 text-card-foreground">Sign in as the owner to keep pinning private, and get an email whenever a new note lands.</p>
|
|
97
|
+
</CardContent>
|
|
98
|
+
</Card>
|
|
99
|
+
</main>
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### `seed.json`
|
|
105
|
+
```json
|
|
106
|
+
{
|
|
107
|
+
"cabinGuestBook": [
|
|
108
|
+
{ "key": "lantern", "type": "note", "author": "The Okafors", "text": "Found the lantern in the shed, lit it on the porch, watched the storm roll over Baker Ridge.", "mood": "snowed in", "pinned": true, "createdAt": 1758400000000, "authorHandle": "guest" },
|
|
109
|
+
{ "key": "moose", "type": "note", "author": "Priya & Sam", "text": "A moose stood in the creek for twenty minutes. We did the dishes very quietly.", "mood": "wildlife!", "pinned": false, "createdAt": 1758140000000, "authorHandle": "guest" },
|
|
110
|
+
{ "key": "pancakes", "type": "note", "author": "Grandpa Lou", "text": "The cast iron is seasoned now. You are welcome.", "mood": "cozy", "pinned": false, "createdAt": 1757880000000, "authorHandle": "guest" }
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Stand-ins
|
|
116
|
+
- Owner sign-in and email on new notes: the "Owner's corner" card at the bottom; the finished app restricts pinning to the owner through access rules and emails them each new note.
|
|
117
|
+
|
|
118
|
+
## What stays the same in your draft
|
|
119
|
+
|
|
120
|
+
- **Two files**, `App.jsx` and `seed.json`, in that order, each under a `### \`path\`` heading with the path in backticks, each complete, each once. Helper components live in `App.jsx` above `App`. One sentence before the first file; the `Stand-ins` list after the last.
|
|
121
|
+
- **Imports**: the ones shown are the whole set of packages (`react`, `use-fireproof`, `@vibes.diy/look`, and `@vibes.diy/look/overlay` for `Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, Sheet, SheetTrigger, SheetContent, SheetHeader, SheetTitle, SheetDescription, SheetFooter, Popover, PopoverTrigger, PopoverContent, Select, SelectTrigger, SelectContent, SelectItem, SelectValue, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, Tooltip, TooltipTrigger, TooltipContent, TooltipProvider`){{IMAGE_LINE}}. `@vibes.diy/look` exports exactly `Button, Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Input, Textarea, Label, Badge, Tabs, TabsList, TabsTrigger, TabsContent, Separator, Skeleton, Table, TableHeader, TableBody, TableRow, TableHead, TableCell, Avatar, AvatarFallback, Progress, cn`. Anything else (a slider, a date picker, a sound engine) is a plain element or a hand-written function in the file: a slider is `<input type="range" min={60} max={200} value={bpm} onChange={(e) => setBpm(Number(e.target.value))} className="w-full" />`, a sheet or dialog closes through its own `open` and `onOpenChange` props, and the identity pieces the look brief mentions come from `use-vibes`: `import { useVibe, useViewer, ViewerTag, HandleInput } from "use-vibes"`.
|
|
122
|
+
- **Data**: Fireproof only, as shown: `useFireproof` at the top of the component, `const { docs } = useLiveQuery(field, { key })` for every list, `database.put` for every save and edit, `database.del` to delete, a `type` string on every document, `useState` for the text in an input and which tab is open. Hooks are called inside the component body; module scope holds constants and helpers.
|
|
123
|
+
- **Every closing tag repeats its opening tag's name**, and every component or identifier in JSX is imported or defined in the file.
|
|
124
|
+
- **The named interaction works end to end**: the person's sentence names it; the brief's other features become stand-ins, each a `Card` with the `Coming in the next pass` badge and one positive sentence, with no control inside it. Sharing, invitations, roles, scheduled jobs, emails and outside services are always stand-ins.
|
|
125
|
+
- **Seed content** is realistic and specific to the app's world, with a `key` per item and the exact fields the app reads.
|
|
126
|
+
- **Utilities the theme backs** (`bg-background`, `bg-card text-card-foreground`, `bg-primary text-primary-foreground`, `text-muted-foreground`, `rounded-lg`, `shadow-md`, spacing like `p-6`, `gap-4`, `mt-8`); the look brief below says how the page is composed.
|
|
127
|
+
|
|
128
|
+
{{CONCATENATED_LLMS}}
|
|
@@ -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.
|
|
@@ -81,7 +90,7 @@ The sandbox serves raw ES modules, so `App.jsx` can import local `.js`/`.jsx` fi
|
|
|
81
90
|
|
|
82
91
|
Every feature you described above should work when this one block lands. Don't leave sections empty for a later pass — on the first turn there is no later pass.
|
|
83
92
|
|
|
84
|
-
**Split into companion files by default.** Whenever the app has more than a couple of distinct features — and always when the finished app would push `App.jsx` past the ~500-line threshold (see the multi-file rule above) — still lead with one complete `App.jsx` block, but as the composition root: imports, the `classNames` object, layout chrome, and the default `App` export composing the features. Then emit each extracted feature component as its own complete file block (path
|
|
93
|
+
**Split into companion files by default.** Whenever the app has more than a couple of distinct features — and always when the finished app would push `App.jsx` past the ~500-line threshold (see the multi-file rule above) — still lead with one complete `App.jsx` block, but as the composition root: imports, the `classNames` object, layout chrome, and the default `App` export composing the features. Then emit each extracted feature component as its own complete file block (its path heading first, e.g. `components/Feed.jsx`) right after the `App.jsx` block. Every feature still works when the turn's blocks land — the single-block rule means one complete pass per file, never a second pass, not everything crammed into `App.jsx`. Only a genuinely small app (one screen, one or two features) stays single-file.
|
|
85
94
|
- When a write surface needs gating, destructure `useVibe` for the database it writes to — `const { can, ready } = useVibe("<dbName>");`. Only destructure `useViewer` (`const { ViewerTag } = useViewer();`) when you render **other** users — `<ViewerTag userHandle={...} />` for authors/rosters. The current viewer's pill and sign-in live in the Vibes Switch (the logo), so don't add one to your header.
|
|
86
95
|
- **Be creative with the layout, but respect mobile idioms.** Thumb-reachable primary actions, generous tap targets (`min-h-11`), scrollable lists, no hover-only interactions.
|
|
87
96
|
- **For chat or log panels, keep autoscroll on the panel itself.** Use a bounded `max-h-64 overflow-y-auto` container with a ref and move it to the end when entries change:
|
|
@@ -133,12 +142,11 @@ When the user's prompt hands you **concrete example data** — an image of items
|
|
|
133
142
|
|
|
134
143
|
**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.
|
|
135
144
|
|
|
136
|
-
Emit it
|
|
145
|
+
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.
|
|
137
146
|
|
|
138
147
|
Shape — a JSON **object keyed by database name** (the same names you pass to `useFireproof`), each value an **array of items**:
|
|
139
148
|
|
|
140
|
-
seed.json
|
|
141
|
-
|
|
149
|
+
### `seed.json`
|
|
142
150
|
```json
|
|
143
151
|
{
|
|
144
152
|
"cardSetMaker": [
|
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": [
|