@vibes.diy/prompts 14.1.61 → 14.2.1

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.
@@ -25,57 +25,170 @@ Use granular documents, e.g. one document per user action, so saving a form or c
25
25
 
26
26
  ### Basic Example
27
27
 
28
- This complete app shows Fireproof's core: `useFireproof` gives you hooks, `useDocument` manages form state, and `useLiveQuery` sorts by `_id` for temporal ordering.
28
+ Wire these visible actions in the first working app, using its own record names. One composer has Add and Ask actions. Add extracts and normalizes facts, saves each record immediately, and shows saved records with edit actions; one item and a pasted batch share this action. Each saved row has Change by sentence: selecting it changes Add to Apply correction, which saves onto that same record id. Ask sends the typed question with the relevant saved records and displays a read-only answer beside the composer. Edit opens the selected row’s populated fields. One parent-owned Undo restores the latest successful creation batch or the previous document from either a sentence correction or a field edit.
29
29
 
30
- App.jsx
30
+ With the callai skill available, submitting words extracts and normalizes every task they name, then immediately saves one document per task. The saved task is the confirmation and remains editable, with Undo beside the intake after each save. The parent keeps the ids from the last creation or the previous version from an edit, so intake and saved-detail editors share one Undo action. `useLiveQuery` keeps saved tasks visible; `useDocument` supplies the detail editor only after a record exists. For a plain message whose text is already the whole record, save that text directly.
31
31
 
32
- ```jsx
33
- import React from "react";
32
+ ```jsx file=App.jsx
33
+ import React, { useState } from "react";
34
+ import { callAI } from "call-ai";
34
35
  import { useFireproof } from "use-fireproof";
36
+ import { useVibe } from "use-vibes";
35
37
 
36
- export default function App() {
37
- const { useDocument, useLiveQuery } = useFireproof("myLedger");
38
+ const taskSchema = {
39
+ type: "object",
40
+ properties: {
41
+ title: { type: "string", description: "The task in the person's words" },
42
+ details: { type: "string", description: "Supporting details in the person’s words" },
43
+ },
44
+ required: ["title", "details"],
45
+ };
46
+
47
+ function normalizeTask(raw) {
48
+ if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return undefined;
49
+ const title = typeof raw.title === "string" ? raw.title.trim() : "";
50
+ const details = typeof raw.details === "string" ? raw.details.trim() : "";
51
+ return title.length > 0 ? { title, details } : undefined;
52
+ }
38
53
 
39
- const { doc, merge, submit } = useDocument({ text: "" });
54
+ // Single-record extraction and edit-by-sentence share a schema and normalizer.
55
+ async function readTask(sentence, current) {
56
+ const facts = current === undefined ? {} : { title: current.title, details: current.details };
57
+ const response = await callAI(
58
+ `Extract one task’s title and supporting details from the person's words. Update only what the correction mentions when a current task is supplied. Today: ${new Date().toISOString().slice(0, 10)}. Current: ${JSON.stringify(facts)}. Person: ${sentence}`,
59
+ { schema: taskSchema }
60
+ );
61
+ const task = normalizeTask(JSON.parse(response));
62
+ if (task === undefined) throw new Error("Add a task in your own words and try again.");
63
+ return task;
64
+ }
40
65
 
41
- // _id is roughly temporal, this is most recent first
42
- const { docs } = useLiveQuery("_id", { descending: true, limit: 100 });
66
+ // A pasted list uses an array of the same flat document fields.
67
+ async function readTasks(sentence) {
68
+ const response = await callAI(
69
+ `Extract every task from these words as a separate item, including when the person names just one task. Keep their title and supporting details. Today: ${new Date().toISOString().slice(0, 10)}. List: ${sentence}`,
70
+ { schema: { properties: { items: { type: "array", items: taskSchema } }, required: ["items"] } }
71
+ );
72
+ const raw = JSON.parse(response);
73
+ const items = Array.isArray(raw?.items) ? raw.items.map(normalizeTask) : [];
74
+ if (items.length === 0 || items.some((item) => item === undefined)) {
75
+ throw new Error("Describe the tasks you want to add and try again.");
76
+ }
77
+ return items;
78
+ }
43
79
 
44
- return (
45
- <div>
46
- <form onSubmit={submit}>
47
- <input value={doc.text} onChange={(e) => merge({ text: e.target.value })} placeholder="New document" />
48
- <button type="submit">Submit</button>
49
- </form>
80
+ function TaskCard({ task, database, can, onCorrect, onSaved, disabled }) {
81
+ const { useDocument } = useFireproof(database);
82
+ const { doc, merge, save } = useDocument(task);
83
+ const [editing, setEditing] = useState(false);
84
+ return <article>
85
+ <h2>{task.title}</h2><p>{task.details}</p><p>{task.dueDate}</p>
86
+ {can.edit(task).ok && <>
87
+ <button type="button" disabled={disabled} onClick={() => onCorrect(task)}>Change by sentence</button>
88
+ <button type="button" disabled={disabled} onClick={() => setEditing(true)}>Edit details</button>
89
+ {editing && <form onSubmit={async (event) => { event.preventDefault(); if (disabled) return; await save(); onSaved(task); setEditing(false); }}>
90
+ <input disabled={disabled} aria-label="Task" value={doc.title} onChange={(event) => merge({ title: event.target.value })} />
91
+ <textarea disabled={disabled} aria-label="Details" value={doc.details} onChange={(event) => merge({ details: event.target.value })} />
92
+ <input disabled={disabled} aria-label="Due date" type="date" value={doc.dueDate} onChange={(event) => merge({ dueDate: event.target.value })} />
93
+ <button type="submit" disabled={disabled}>Save details</button>
94
+ </form>}
95
+ </>}
96
+ </article>;
97
+ }
50
98
 
51
- <h3>Recent Documents</h3>
52
- <ul>
53
- {docs.map((doc) => (
54
- <li key={doc._id}>{doc.text}</li>
55
- ))}
56
- </ul>
57
- </div>
58
- );
99
+ export default function App() {
100
+ const { database, useLiveQuery } = useFireproof("tasks");
101
+ const { me, can, ready } = useVibe("tasks");
102
+ const { docs } = useLiveQuery("type", { key: "task" });
103
+ const [sentence, setSentence] = useState("");
104
+ const [current, setCurrent] = useState(undefined);
105
+ const [pending, setPending] = useState(undefined);
106
+ const [answer, setAnswer] = useState("");
107
+ const [busy, setBusy] = useState(false);
108
+ const [message, setMessage] = useState("");
109
+ // Creation, sentence correction and detail editing replace this one Undo receipt after a successful write.
110
+ const [lastWrite, setLastWrite] = useState(undefined);
111
+ async function submitSentence(event) {
112
+ event.preventDefault();
113
+ if (busy || !ready) return;
114
+ setBusy(true); setMessage("");
115
+ try {
116
+ // A failed local batch resumes its unsaved tail without extracting or duplicating earlier records.
117
+ let operation = pending;
118
+ if (operation === undefined) {
119
+ const target = current === undefined ? undefined : docs.find((doc) => doc._id === current._id);
120
+ if (current !== undefined && target === undefined) throw new Error("Choose a saved task to correct.");
121
+ const items = target === undefined ? await readTasks(sentence) : [await readTask(sentence, target)];
122
+ const remaining = items.map((item) => target === undefined
123
+ ? { _id: crypto.randomUUID(), type: "task", title: item.title, details: item.details, dueDate: "", authorHandle: me?.userHandle }
124
+ : { ...target, title: item.title, details: item.details });
125
+ operation = { remaining, created: [], replaced: target };
126
+ }
127
+ if (operation.remaining.some((doc) => operation.replaced === undefined ? can.create(doc).ok === false : can.edit(doc).ok === false)) {
128
+ throw new Error("This task is not editable right now.");
129
+ }
130
+ setPending(operation);
131
+ while (operation.remaining.length > 0) {
132
+ const doc = operation.remaining[0];
133
+ await database.put(doc);
134
+ operation = { ...operation, remaining: operation.remaining.slice(1), created: operation.replaced === undefined ? [...operation.created, doc._id] : [] };
135
+ setPending(operation);
136
+ setLastWrite({ created: operation.created, replaced: operation.replaced });
137
+ }
138
+ setPending(undefined);
139
+ setSentence(""); setCurrent(undefined);
140
+ } catch (error) {
141
+ // Preserve the words and any unsaved tail on local errors. Synced refusals converge through useLiveQuery.
142
+ setMessage(error.reason === "refusal" ? "Try describing the task another way." : error.message);
143
+ } finally { setBusy(false); }
144
+ }
145
+ async function askRecords() {
146
+ if (busy || !ready || pending !== undefined || sentence.trim().length === 0) return;
147
+ setBusy(true); setMessage("");
148
+ try {
149
+ const response = await callAI(
150
+ `Answer from these records. Today: ${new Date().toISOString().slice(0, 10)}. Records: ${JSON.stringify(docs.map(({ title, details, dueDate }) => ({ title, details, dueDate })))}. Question: ${sentence}`,
151
+ { schema: { properties: { answer: { type: "string" } }, required: ["answer"] } }
152
+ );
153
+ const raw = JSON.parse(response);
154
+ if (typeof raw?.answer !== "string") throw new Error("Ask your question again.");
155
+ setAnswer(raw.answer); setSentence("");
156
+ } catch (error) {
157
+ setMessage(error.message);
158
+ } finally { setBusy(false); }
159
+ }
160
+ // A new record is one del away; a corrected one is one put of its previous version away.
161
+ async function undoLast() {
162
+ if (busy || lastWrite === undefined) return;
163
+ setBusy(true); setMessage("");
164
+ try {
165
+ for (const id of lastWrite.created) await database.del(id);
166
+ if (lastWrite.replaced !== undefined) await database.put(lastWrite.replaced);
167
+ setLastWrite(undefined); setPending(undefined); setCurrent(undefined);
168
+ } catch (error) {
169
+ setMessage(error.message);
170
+ } finally { setBusy(false); }
171
+ }
172
+ return <main>
173
+ <h1>Tasks in your own words</h1>
174
+ <form onSubmit={submitSentence}>
175
+ <textarea aria-label="Describe tasks, a correction, or ask a question" value={sentence} disabled={busy || pending !== undefined} onChange={(event) => setSentence(event.target.value)} />
176
+ {current !== undefined && <p>Changing: {current.title} <button type="button" disabled={busy || pending !== undefined} onClick={() => { setCurrent(undefined); setSentence(""); }}>Add a new task</button></p>}
177
+ <button type="submit" disabled={!ready || busy || sentence.trim().length === 0}>{busy ? "Adding your changes…" : pending !== undefined ? "Retry remaining tasks" : current === undefined ? "Add tasks" : "Apply correction"}</button>
178
+ <button type="button" disabled={!ready || busy || pending !== undefined || sentence.trim().length === 0} onClick={askRecords}>Ask about tasks</button>
179
+ </form>
180
+ <p>{answer}</p>
181
+ <p role="status">{message}</p>
182
+ {lastWrite !== undefined && <button type="button" disabled={busy} onClick={undoLast}>Undo</button>}
183
+ {pending !== undefined && !busy && <button type="button" onClick={() => { setPending(undefined); setSentence(""); setCurrent(undefined); }}>Discard unsaved tasks</button>}
184
+ {docs.map((task) => <TaskCard key={task._id} task={task} database={database} can={can} disabled={busy || pending !== undefined} onSaved={(previous) => setLastWrite({ created: [], replaced: previous })} onCorrect={(doc) => { if (busy || pending !== undefined) return; setCurrent(doc); setSentence(""); }} />)}
185
+ </main>;
59
186
  }
60
187
  ```
61
188
 
62
189
  ### Editing Documents
63
190
 
64
- Address documents by a known `_id` if you want to force conflict resolution or work with a real world resource, like a schedule slot or a user profile. In a complex app this might come from a route parameter or correspond to an outside identifier. To add a profile editor to the app above:
65
-
66
- App.jsx
67
-
68
- ```jsx
69
- <<<<<<< SEARCH
70
- const { doc, merge, submit } = useDocument({ text: "" });
71
- =======
72
- const { doc, merge, submit } = useDocument({ text: "" });
73
-
74
- const { doc: profile, merge: mergeProfile, save: saveProfile } = useDocument({ _id: "user-profile:abc@example.com" });
75
- >>>>>>> REPLACE
76
- ```
77
-
78
- The `useDocument` hook provides several methods: `merge(updates)` updates the document with new fields without saving (use this instead of keeping a `useState` for document data), `submit(e)` handles form submission by preventing default, saving, and resetting, `save()` saves the current document state, and `reset()` resets to initial state. When you call submit, the document is reset, so if you didn't provide an `_id` then you can use the form to create a stream of new documents as in the basic example above.
191
+ Address an existing record by its `_id`. `useDocument(task)` above holds the selected record's editable fields: `merge(updates)` changes the draft, `save()` writes it, and `reset()` restores its initial state. `submit(event)` combines prevent-default, save and reset. Choose the operation that matches the editor's lifecycle. For correction by sentence, pass the current editable fields and the person's correction to the same extraction schema, normalize the result and immediately update the existing document in that submit action with its trusted `_id` and identity fields intact. The callai skill's Text to records example includes that path and pasted lists.
79
192
 
80
193
  ## Required starting records
81
194
 
package/llms/fireproof.md CHANGED
@@ -25,57 +25,170 @@ Use granular documents, e.g. one document per user action, so saving a form or c
25
25
 
26
26
  ### Basic Example
27
27
 
28
- This complete app shows Fireproof's core: `useFireproof` gives you hooks, `useDocument` manages form state, and `useLiveQuery` sorts by `_id` for temporal ordering.
28
+ Wire these visible actions in the first working app, using its own record names. One composer has Add and Ask actions. Add extracts and normalizes facts, saves each record immediately, and shows saved records with edit actions; one item and a pasted batch share this action. Each saved row has Change by sentence: selecting it changes Add to Apply correction, which saves onto that same record id. Ask sends the typed question with the relevant saved records and displays a read-only answer beside the composer. Edit opens the selected row’s populated fields. One parent-owned Undo restores the latest successful creation batch or the previous document from either a sentence correction or a field edit.
29
29
 
30
- App.jsx
30
+ With the callai skill available, submitting words extracts and normalizes every task they name, then immediately saves one document per task. The saved task is the confirmation and remains editable, with Undo beside the intake after each save. The parent keeps the ids from the last creation or the previous version from an edit, so intake and saved-detail editors share one Undo action. `useLiveQuery` keeps saved tasks visible; `useDocument` supplies the detail editor only after a record exists. For a plain message whose text is already the whole record, save that text directly.
31
31
 
32
32
  ```jsx file=App.jsx
33
- import React from "react";
33
+ import React, { useState } from "react";
34
+ import { callAI } from "call-ai";
34
35
  import { useFireproof } from "use-fireproof";
36
+ import { useVibe } from "use-vibes";
35
37
 
36
- export default function App() {
37
- const { useDocument, useLiveQuery } = useFireproof("myLedger");
38
+ const taskSchema = {
39
+ type: "object",
40
+ properties: {
41
+ title: { type: "string", description: "The task in the person's words" },
42
+ details: { type: "string", description: "Supporting details in the person’s words" },
43
+ },
44
+ required: ["title", "details"],
45
+ };
46
+
47
+ function normalizeTask(raw) {
48
+ if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return undefined;
49
+ const title = typeof raw.title === "string" ? raw.title.trim() : "";
50
+ const details = typeof raw.details === "string" ? raw.details.trim() : "";
51
+ return title.length > 0 ? { title, details } : undefined;
52
+ }
38
53
 
39
- const { doc, merge, submit } = useDocument({ text: "" });
54
+ // Single-record extraction and edit-by-sentence share a schema and normalizer.
55
+ async function readTask(sentence, current) {
56
+ const facts = current === undefined ? {} : { title: current.title, details: current.details };
57
+ const response = await callAI(
58
+ `Extract one task’s title and supporting details from the person's words. Update only what the correction mentions when a current task is supplied. Today: ${new Date().toISOString().slice(0, 10)}. Current: ${JSON.stringify(facts)}. Person: ${sentence}`,
59
+ { schema: taskSchema }
60
+ );
61
+ const task = normalizeTask(JSON.parse(response));
62
+ if (task === undefined) throw new Error("Add a task in your own words and try again.");
63
+ return task;
64
+ }
40
65
 
41
- // _id is roughly temporal, this is most recent first
42
- const { docs } = useLiveQuery("_id", { descending: true, limit: 100 });
66
+ // A pasted list uses an array of the same flat document fields.
67
+ async function readTasks(sentence) {
68
+ const response = await callAI(
69
+ `Extract every task from these words as a separate item, including when the person names just one task. Keep their title and supporting details. Today: ${new Date().toISOString().slice(0, 10)}. List: ${sentence}`,
70
+ { schema: { properties: { items: { type: "array", items: taskSchema } }, required: ["items"] } }
71
+ );
72
+ const raw = JSON.parse(response);
73
+ const items = Array.isArray(raw?.items) ? raw.items.map(normalizeTask) : [];
74
+ if (items.length === 0 || items.some((item) => item === undefined)) {
75
+ throw new Error("Describe the tasks you want to add and try again.");
76
+ }
77
+ return items;
78
+ }
43
79
 
44
- return (
45
- <div>
46
- <form onSubmit={submit}>
47
- <input value={doc.text} onChange={(e) => merge({ text: e.target.value })} placeholder="New document" />
48
- <button type="submit">Submit</button>
49
- </form>
80
+ function TaskCard({ task, database, can, onCorrect, onSaved, disabled }) {
81
+ const { useDocument } = useFireproof(database);
82
+ const { doc, merge, save } = useDocument(task);
83
+ const [editing, setEditing] = useState(false);
84
+ return <article>
85
+ <h2>{task.title}</h2><p>{task.details}</p><p>{task.dueDate}</p>
86
+ {can.edit(task).ok && <>
87
+ <button type="button" disabled={disabled} onClick={() => onCorrect(task)}>Change by sentence</button>
88
+ <button type="button" disabled={disabled} onClick={() => setEditing(true)}>Edit details</button>
89
+ {editing && <form onSubmit={async (event) => { event.preventDefault(); if (disabled) return; await save(); onSaved(task); setEditing(false); }}>
90
+ <input disabled={disabled} aria-label="Task" value={doc.title} onChange={(event) => merge({ title: event.target.value })} />
91
+ <textarea disabled={disabled} aria-label="Details" value={doc.details} onChange={(event) => merge({ details: event.target.value })} />
92
+ <input disabled={disabled} aria-label="Due date" type="date" value={doc.dueDate} onChange={(event) => merge({ dueDate: event.target.value })} />
93
+ <button type="submit" disabled={disabled}>Save details</button>
94
+ </form>}
95
+ </>}
96
+ </article>;
97
+ }
50
98
 
51
- <h3>Recent Documents</h3>
52
- <ul>
53
- {docs.map((doc) => (
54
- <li key={doc._id}>{doc.text}</li>
55
- ))}
56
- </ul>
57
- </div>
58
- );
99
+ export default function App() {
100
+ const { database, useLiveQuery } = useFireproof("tasks");
101
+ const { me, can, ready } = useVibe("tasks");
102
+ const { docs } = useLiveQuery("type", { key: "task" });
103
+ const [sentence, setSentence] = useState("");
104
+ const [current, setCurrent] = useState(undefined);
105
+ const [pending, setPending] = useState(undefined);
106
+ const [answer, setAnswer] = useState("");
107
+ const [busy, setBusy] = useState(false);
108
+ const [message, setMessage] = useState("");
109
+ // Creation, sentence correction and detail editing replace this one Undo receipt after a successful write.
110
+ const [lastWrite, setLastWrite] = useState(undefined);
111
+ async function submitSentence(event) {
112
+ event.preventDefault();
113
+ if (busy || !ready) return;
114
+ setBusy(true); setMessage("");
115
+ try {
116
+ // A failed local batch resumes its unsaved tail without extracting or duplicating earlier records.
117
+ let operation = pending;
118
+ if (operation === undefined) {
119
+ const target = current === undefined ? undefined : docs.find((doc) => doc._id === current._id);
120
+ if (current !== undefined && target === undefined) throw new Error("Choose a saved task to correct.");
121
+ const items = target === undefined ? await readTasks(sentence) : [await readTask(sentence, target)];
122
+ const remaining = items.map((item) => target === undefined
123
+ ? { _id: crypto.randomUUID(), type: "task", title: item.title, details: item.details, dueDate: "", authorHandle: me?.userHandle }
124
+ : { ...target, title: item.title, details: item.details });
125
+ operation = { remaining, created: [], replaced: target };
126
+ }
127
+ if (operation.remaining.some((doc) => operation.replaced === undefined ? can.create(doc).ok === false : can.edit(doc).ok === false)) {
128
+ throw new Error("This task is not editable right now.");
129
+ }
130
+ setPending(operation);
131
+ while (operation.remaining.length > 0) {
132
+ const doc = operation.remaining[0];
133
+ await database.put(doc);
134
+ operation = { ...operation, remaining: operation.remaining.slice(1), created: operation.replaced === undefined ? [...operation.created, doc._id] : [] };
135
+ setPending(operation);
136
+ setLastWrite({ created: operation.created, replaced: operation.replaced });
137
+ }
138
+ setPending(undefined);
139
+ setSentence(""); setCurrent(undefined);
140
+ } catch (error) {
141
+ // Preserve the words and any unsaved tail on local errors. Synced refusals converge through useLiveQuery.
142
+ setMessage(error.reason === "refusal" ? "Try describing the task another way." : error.message);
143
+ } finally { setBusy(false); }
144
+ }
145
+ async function askRecords() {
146
+ if (busy || !ready || pending !== undefined || sentence.trim().length === 0) return;
147
+ setBusy(true); setMessage("");
148
+ try {
149
+ const response = await callAI(
150
+ `Answer from these records. Today: ${new Date().toISOString().slice(0, 10)}. Records: ${JSON.stringify(docs.map(({ title, details, dueDate }) => ({ title, details, dueDate })))}. Question: ${sentence}`,
151
+ { schema: { properties: { answer: { type: "string" } }, required: ["answer"] } }
152
+ );
153
+ const raw = JSON.parse(response);
154
+ if (typeof raw?.answer !== "string") throw new Error("Ask your question again.");
155
+ setAnswer(raw.answer); setSentence("");
156
+ } catch (error) {
157
+ setMessage(error.message);
158
+ } finally { setBusy(false); }
159
+ }
160
+ // A new record is one del away; a corrected one is one put of its previous version away.
161
+ async function undoLast() {
162
+ if (busy || lastWrite === undefined) return;
163
+ setBusy(true); setMessage("");
164
+ try {
165
+ for (const id of lastWrite.created) await database.del(id);
166
+ if (lastWrite.replaced !== undefined) await database.put(lastWrite.replaced);
167
+ setLastWrite(undefined); setPending(undefined); setCurrent(undefined);
168
+ } catch (error) {
169
+ setMessage(error.message);
170
+ } finally { setBusy(false); }
171
+ }
172
+ return <main>
173
+ <h1>Tasks in your own words</h1>
174
+ <form onSubmit={submitSentence}>
175
+ <textarea aria-label="Describe tasks, a correction, or ask a question" value={sentence} disabled={busy || pending !== undefined} onChange={(event) => setSentence(event.target.value)} />
176
+ {current !== undefined && <p>Changing: {current.title} <button type="button" disabled={busy || pending !== undefined} onClick={() => { setCurrent(undefined); setSentence(""); }}>Add a new task</button></p>}
177
+ <button type="submit" disabled={!ready || busy || sentence.trim().length === 0}>{busy ? "Adding your changes…" : pending !== undefined ? "Retry remaining tasks" : current === undefined ? "Add tasks" : "Apply correction"}</button>
178
+ <button type="button" disabled={!ready || busy || pending !== undefined || sentence.trim().length === 0} onClick={askRecords}>Ask about tasks</button>
179
+ </form>
180
+ <p>{answer}</p>
181
+ <p role="status">{message}</p>
182
+ {lastWrite !== undefined && <button type="button" disabled={busy} onClick={undoLast}>Undo</button>}
183
+ {pending !== undefined && !busy && <button type="button" onClick={() => { setPending(undefined); setSentence(""); setCurrent(undefined); }}>Discard unsaved tasks</button>}
184
+ {docs.map((task) => <TaskCard key={task._id} task={task} database={database} can={can} disabled={busy || pending !== undefined} onSaved={(previous) => setLastWrite({ created: [], replaced: previous })} onCorrect={(doc) => { if (busy || pending !== undefined) return; setCurrent(doc); setSentence(""); }} />)}
185
+ </main>;
59
186
  }
60
187
  ```
61
188
 
62
189
  ### Editing Documents
63
190
 
64
- Address documents by a known `_id` if you want to force conflict resolution or work with a real world resource, like a schedule slot or a user profile. In a complex app this might come from a route parameter or correspond to an outside identifier. To add a profile editor to the app above:
65
-
66
- App.jsx
67
-
68
- ```jsx
69
- <<<<<<< SEARCH
70
- const { doc, merge, submit } = useDocument({ text: "" });
71
- =======
72
- const { doc, merge, submit } = useDocument({ text: "" });
73
-
74
- const { doc: profile, merge: mergeProfile, save: saveProfile } = useDocument({ _id: "user-profile:abc@example.com" });
75
- >>>>>>> REPLACE
76
- ```
77
-
78
- The `useDocument` hook provides several methods: `merge(updates)` updates the document with new fields without saving (use this instead of keeping a `useState` for document data), `submit(e)` handles form submission by preventing default, saving, and resetting, `save()` saves the current document state, and `reset()` resets to initial state. When you call submit, the document is reset, so if you didn't provide an `_id` then you can use the form to create a stream of new documents as in the basic example above.
191
+ Address an existing record by its `_id`. `useDocument(task)` above holds the selected record's editable fields: `merge(updates)` changes the draft, `save()` writes it, and `reset()` restores its initial state. `submit(event)` combines prevent-default, save and reset. Choose the operation that matches the editor's lifecycle. For correction by sentence, pass the current editable fields and the person's correction to the same extraction schema, normalize the result and immediately update the existing document in that submit action with its trusted `_id` and identity fields intact. The callai skill's Text to records example includes that path and pasted lists.
79
192
 
80
193
  ## Required starting records
81
194
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibes.diy/prompts",
3
- "version": "14.1.61",
3
+ "version": "14.2.1",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "exports": {
@@ -37,9 +37,9 @@
37
37
  "license": "Apache-2.0",
38
38
  "dependencies": {
39
39
  "@adviser/cement": "~0.5.34",
40
- "@vibes.diy/call-ai-v2": "14.1.61",
41
- "@vibes.diy/identity": "14.1.61",
42
- "@vibes.diy/use-vibes-types": "14.1.61",
40
+ "@vibes.diy/call-ai-v2": "14.2.1",
41
+ "@vibes.diy/identity": "14.2.1",
42
+ "@vibes.diy/use-vibes-types": "14.2.1",
43
43
  "arktype": "~2.2.3",
44
44
  "json-schema-faker": "~0.6.3"
45
45
  },
package/prompts.js CHANGED
@@ -8,7 +8,7 @@ import { defaultStylePrompt } from "./style-prompts.js";
8
8
  export async function getDefaultSkills() {
9
9
  return ["fireproof", "callai", "image-gen", "use-vibe"];
10
10
  }
11
- 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
+ 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 turning a sentence or a pasted list into editable records, showing what was understood before saving, updating an existing record from a correction, or rewriting and extending something someone wrote. 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.";
12
12
  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.";
13
13
  export async function makePreAllocUserMessage(userPrompt, variety) {
14
14
  const catalog = await getLlmCatalog();
@@ -282,7 +282,7 @@ export async function makeBaseSystemPrompt(model, sessionDoc) {
282
282
  const styleFallback = sessionDoc?.suppressDefaultStylePrompt ? "" : defaultStylePrompt;
283
283
  const stylePrompt = sessionDoc?.stylePrompt || (validatedTheme === undefined ? styleFallback : "");
284
284
  const demoDataLines = includeDemoData
285
- ? "\n- Demo data goes in `seed.json`, never behind an in-app button. If your app has a function that uses callAI with a schema to save data, write the seed items as documents of the shape that function saves — the same fields and `type`, plus the required seed `key` on each item — so the launch content illustrates what it looks like to use the app. Do NOT add a button, menu item, or empty-state control that loads, applies, or clears launch data; the app has no such feature. The AI suggestion buttons above are different and still belong: they fill in fields for the user to save, they never seed the database.\n- Never have an instance of callAI that is only used to generate demo data, always use the same calls that are triggered by user actions in the app."
285
+ ? "\n- Demo data goes in `seed.json`, never behind an in-app button. If your app has a function that uses callAI with a schema to save data, write the seed items as documents of the shape that function saves — the same fields and `type`, plus the required seed `key` on each item — so the launch content illustrates what it looks like to use the app. Do NOT add a button, menu item, or empty-state control that loads, applies, or clears launch data; the app has no such feature. The example chips above belong to the intake flow: they fill the composer with a sentence; submitting it uses the same extraction and automatic-save flow as typed input, then shows the saved record with an edit option.\n- Never have an instance of callAI that is only used to generate demo data, always use the same calls that are triggered by user actions in the app."
286
286
  : "";
287
287
  const titleSection = sessionDoc?.title
288
288
  ? `The app is called "${sessionDoc.title}". Use this exact name in the app's heading and anywhere the app refers to itself.\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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