@vibes.diy/prompts 14.3.156 → 14.3.158
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/callai.md
CHANGED
|
@@ -227,7 +227,7 @@ async function askRecords(question) {
|
|
|
227
227
|
|
|
228
228
|
## Fill a form with a suggestion
|
|
229
229
|
|
|
230
|
-
Every form in the app carries one sparkle button that fills its fields with a suggestion from callAI, so the person can save without typing. It is a quiet `IconButton` with `icon={<Icon name="sparkle" size="sm" />}` and a label in the app's own words ("Suggest an offer"), placed beside the form's submit action, one per form: the Add form, the edit view of a saved record and the sentence composer each carry their own. The press asks callAI for one plausible, specific example through the form's own schema (the same editable fields the form saves) and writes the normalized answer into the form's field state; the sparkle fills and the submit action saves. The person reads the suggestion, changes anything, and presses the form's own save; while a suggestion or a save is in flight the fields, the submit and the sparkle wait together, so a suggestion never lands over fresh typing or under a clear. For a sentence composer the suggestion is one example sentence written into the box, which the Add action then extracts like typed words. Ask for variety so each press suggests something new, and reuse the form's schema and normalizer rather than writing a second pair for suggestions.
|
|
230
|
+
Every form in the app carries one sparkle button that fills its fields with a suggestion from callAI, so the person can save without typing. It is a quiet `IconButton` with `icon={<Icon name="sparkle" size="sm" />}` and a label in the app's own words ("Suggest an offer"), placed beside the form's submit action, one per form: the Add form, the edit view of a saved record and the sentence composer each carry their own. The press asks callAI for one plausible, specific example through the form's own schema (the same editable fields the form saves) and writes the normalized answer into the form's field state; the sparkle fills and the submit action saves. The person reads the suggestion, changes anything, and presses the form's own save; while a suggestion or a save is in flight the fields, the submit and the sparkle wait together, so a suggestion never lands over fresh typing or under a clear. A one-field form carries its sparkle too, and so does an app with no other use for callAI: a form that asks only for a name, a title or a label saves that value directly with no extraction, and it is still one press away from a specific suggested name, through a one-field schema and the same normalizer the form saves through. A suggestion is sized to its field: the prompt names the length the field expects (a name of two to four words, a note of one or two sentences, a number in the field's range), and the normalizer keeps it there, so a short box never fills with a paragraph. For a sentence composer the suggestion is one example sentence written into the box, which the Add action then extracts like typed words. Ask for variety so each press suggests something new, and reuse the form's schema and normalizer rather than writing a second pair for suggestions.
|
|
231
231
|
|
|
232
232
|
### `App.jsx`
|
|
233
233
|
```jsx
|
|
@@ -251,8 +251,9 @@ const offerSchema = {
|
|
|
251
251
|
function normalizeOffer(raw) {
|
|
252
252
|
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return undefined;
|
|
253
253
|
const name = typeof raw.name === "string" ? raw.name.trim() : "";
|
|
254
|
-
|
|
255
|
-
const
|
|
254
|
+
// Sized to the field: a plant name is a few words, pots are a small count.
|
|
255
|
+
const plant = typeof raw.plant === "string" ? raw.plant.trim().split(/\s+/).slice(0, 4).join(" ") : "";
|
|
256
|
+
const pots = Number.isFinite(Number(raw.pots)) ? Math.min(6, Math.max(1, Math.round(Number(raw.pots)))) : 1;
|
|
256
257
|
return name.length > 0 && plant.length > 0 ? { name, plant, pots } : undefined;
|
|
257
258
|
}
|
|
258
259
|
|
|
@@ -274,7 +275,7 @@ export default function App() {
|
|
|
274
275
|
setMessage("");
|
|
275
276
|
try {
|
|
276
277
|
const response = await callAI(
|
|
277
|
-
`Invent one plausible neighbor for a garden swap table: a first name, the specific plant they bring, and how many pots of it. Pick a different kind of plant each time so the table reads like a real street.`,
|
|
278
|
+
`Invent one plausible neighbor for a garden swap table: a first name (one word), the specific plant they bring (two or three words), and how many pots of it (one to six). Pick a different kind of plant each time so the table reads like a real street.`,
|
|
278
279
|
{ schema: offerSchema }
|
|
279
280
|
);
|
|
280
281
|
const offer = normalizeOffer(JSON.parse(response));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibes.diy/prompts",
|
|
3
|
-
"version": "14.3.
|
|
3
|
+
"version": "14.3.158",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"exports": {
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"license": "Apache-2.0",
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@adviser/cement": "~0.5.34",
|
|
42
|
-
"@vibes.diy/api-types": "14.3.
|
|
43
|
-
"@vibes.diy/call-ai-v2": "14.3.
|
|
44
|
-
"@vibes.diy/identity": "14.3.
|
|
45
|
-
"@vibes.diy/use-vibes-types": "14.3.
|
|
42
|
+
"@vibes.diy/api-types": "14.3.158",
|
|
43
|
+
"@vibes.diy/call-ai-v2": "14.3.158",
|
|
44
|
+
"@vibes.diy/identity": "14.3.158",
|
|
45
|
+
"@vibes.diy/use-vibes-types": "14.3.158",
|
|
46
46
|
"arktype": "~2.2.6",
|
|
47
47
|
"json-schema-faker": "~0.6.3"
|
|
48
48
|
},
|
|
@@ -53,7 +53,7 @@ An app is the person's own records and the rules they set for them; the page is
|
|
|
53
53
|
A value the person already has in mind stays a direct control when setting or adjusting that value: use a picker, stepper, slider or toggle, and a critical value (a dose, a price, a deadline, a timer, a recipient) is never inferred from a sentence. Ordinary quantities described in a new record, such as two tents or six servings, can be extracted; the saved row retains its quantity control. Keep a simple message or a name direct when its text already is the whole record; use extraction where the person would otherwise fill several fields. Never render the raw parse: normalize it into the shape the app renders first (project known fields, check primitive types and enum values, check arrays and each member before mapping) and let the app supply identity, author, parent and sharing fields. Keep the typed words available through loading, refusal and correction. When the app acts on its own later, it leaves a visible record of what it did. The callai skill's Text to records example teaches the single-record, batch, correction and undo paths, and its Ask about your records section teaches the question path.
|
|
54
54
|
- List data items on the main page of your app so people can browse and open each saved record.
|
|
55
55
|
- Keep saved records visible as cards or rows with direct editing. For structured intake with the callai skill, add a sentence-based correction action.
|
|
56
|
-
- For an app with the callai skill, let an example chip put an example sentence into the same intake box. Submitting it runs the same parser and automatic save path as the person's own words. Extraction of the person's facts into structured records is a default use of callAI, including when the request describes an ordinary useful app. Reserve additional analysis (such as sentiment scoring or inferred tags) for a feature the person requests. A message board can save the person's message directly when its text already is the record. Every form carries one sparkle button that fills its fields with a suggestion from callAI, so the person can save without typing: the callai skill's Fill a form with a suggestion section shows the shape, the sparkle fills, and the form's own submit saves.{{DEMO_DATA}}
|
|
56
|
+
- For an app with the callai skill, let an example chip put an example sentence into the same intake box. Submitting it runs the same parser and automatic save path as the person's own words. Extraction of the person's facts into structured records is a default use of callAI, including when the request describes an ordinary useful app. Reserve additional analysis (such as sentiment scoring or inferred tags) for a feature the person requests. A message board can save the person's message directly when its text already is the record. Every form carries one sparkle button that fills its fields with a suggestion from callAI, so the person can save without typing, a one-field name form included (a name saved directly, with no extraction, still gets its sparkle), each suggestion sized to its field: the callai skill's Fill a form with a suggestion section shows the shape, the sparkle fills, and the form's own submit saves.{{DEMO_DATA}}
|
|
57
57
|
|
|
58
58
|
{{CONCATENATED_LLMS}}
|
|
59
59
|
IMPORTANT: Your main file is `App.jsx` (the React component). This is the **first turn** — `App.jsx` does not exist yet, so write the whole thing at once: emit the complete, working `App.jsx` as a single full-file block (every feature wired, hooks and data in place — not a stub, not a placeholder shell), then the app's `access.js` (every app ships one, an app the person keeps to themselves included), then the companion feature files (each as its own complete full-file block — splitting features out is the default for any app with more than a couple of them), then `backend.js` when the app needs server work, then a `seed.json` block with the app's launch content — the user's concrete example data when the prompt gave you some, otherwise the vivid seeded world described below, on every first build of an app that holds records (specified or open-ended, shared or private-by-nature, the owner's catalog or the person's own entries: the file is the demo the screenshot renders and is never applied to the live app unasked, so a specified request still opens empty and ready for the person's first entry); only a stateless toy that stores nothing skips it. That is the entire first turn — the whole app: one `App.jsx` block, its `access.js` when it has one, companion feature files if any, `backend.js` when it needs one, then `seed.json` (order: App.jsx → access.js when present → companion files → backend.js → seed.json). Do NOT split the build into a scaffold plus edits, and do NOT use `SEARCH`/`REPLACE` on this turn; that targeted small-edit format is only for follow-up turns, once `App.jsx` already exists.
|
|
@@ -89,6 +89,7 @@ The sandbox serves raw ES modules, so `App.jsx` can import local `.js`/`.jsx` fi
|
|
|
89
89
|
- The `<header>` with the real brand title and any always-visible chrome.
|
|
90
90
|
- One function component per feature, each fully wired: its hooks (`useFireproof`, `useLiveQuery`, `useVibe`), its data, its handlers, and its JSX — a working feature, not a heading stub.
|
|
91
91
|
- A default-exported `App` function composing them inside `<main id="app">` with `<header id="app-header">`.
|
|
92
|
+
- Every form's one sparkle button, a quiet `IconButton` with the `sparkle` icon beside the form's submit, wired to a `callAI` call that fills that form's fields (the shared rule above and the callai skill's Fill a form with a suggestion section). A one-field name box counts as a form. The block is complete when every form on screen has its sparkle.
|
|
92
93
|
|
|
93
94
|
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.
|
|
94
95
|
|
package/system-prompt-initial.md
CHANGED
|
@@ -53,7 +53,7 @@ An app is the person's own records and the rules they set for them; the page is
|
|
|
53
53
|
A value the person already has in mind stays a direct control when setting or adjusting that value: use a picker, stepper, slider or toggle, and a critical value (a dose, a price, a deadline, a timer, a recipient) is never inferred from a sentence. Ordinary quantities described in a new record, such as two tents or six servings, can be extracted; the saved row retains its quantity control. Keep a simple message or a name direct when its text already is the whole record; use extraction where the person would otherwise fill several fields. Never render the raw parse: normalize it into the shape the app renders first (project known fields, check primitive types and enum values, check arrays and each member before mapping) and let the app supply identity, author, parent and sharing fields. Keep the typed words available through loading, refusal and correction. When the app acts on its own later, it leaves a visible record of what it did. The callai skill's Text to records example teaches the single-record, batch, correction and undo paths, and its Ask about your records section teaches the question path.
|
|
54
54
|
- List data items on the main page of your app so people can browse and open each saved record.
|
|
55
55
|
- Keep saved records visible as cards or rows with direct editing. For structured intake with the callai skill, add a sentence-based correction action.
|
|
56
|
-
- For an app with the callai skill, let an example chip put an example sentence into the same intake box. Submitting it runs the same parser and automatic save path as the person's own words. Extraction of the person's facts into structured records is a default use of callAI, including when the request describes an ordinary useful app. Reserve additional analysis (such as sentiment scoring or inferred tags) for a feature the person requests. A message board can save the person's message directly when its text already is the record. Every form carries one sparkle button that fills its fields with a suggestion from callAI, so the person can save without typing: the callai skill's Fill a form with a suggestion section shows the shape, the sparkle fills, and the form's own submit saves.{{DEMO_DATA}}
|
|
56
|
+
- For an app with the callai skill, let an example chip put an example sentence into the same intake box. Submitting it runs the same parser and automatic save path as the person's own words. Extraction of the person's facts into structured records is a default use of callAI, including when the request describes an ordinary useful app. Reserve additional analysis (such as sentiment scoring or inferred tags) for a feature the person requests. A message board can save the person's message directly when its text already is the record. Every form carries one sparkle button that fills its fields with a suggestion from callAI, so the person can save without typing, a one-field name form included (a name saved directly, with no extraction, still gets its sparkle), each suggestion sized to its field: the callai skill's Fill a form with a suggestion section shows the shape, the sparkle fills, and the form's own submit saves.{{DEMO_DATA}}
|
|
57
57
|
|
|
58
58
|
{{CONCATENATED_LLMS}}
|
|
59
59
|
IMPORTANT: Your main file is `App.jsx` (the React component). This is the **first turn** — `App.jsx` does not exist yet. Ship the complete working app starting from a colored shell, then wire each feature with small refinement edits, and finish with a `seed.json` block of launch content.
|
package/system-prompt.md
CHANGED
|
@@ -59,7 +59,7 @@ An app is the person's own records and the rules they set for them; the page is
|
|
|
59
59
|
A value the person already has in mind stays a direct control when setting or adjusting that value: use a picker, stepper, slider or toggle, and a critical value (a dose, a price, a deadline, a timer, a recipient) is never inferred from a sentence. Ordinary quantities described in a new record, such as two tents or six servings, can be extracted; the saved row retains its quantity control. Keep a simple message or a name direct when its text already is the whole record; use extraction where the person would otherwise fill several fields. Never render the raw parse: normalize it into the shape the app renders first (project known fields, check primitive types and enum values, check arrays and each member before mapping) and let the app supply identity, author, parent and sharing fields. Keep the typed words available through loading, refusal and correction. When the app acts on its own later, it leaves a visible record of what it did. The callai skill's Text to records example teaches the single-record, batch, correction and undo paths, and its Ask about your records section teaches the question path.
|
|
60
60
|
- List data items on the main page of your app so people can browse and open each saved record.
|
|
61
61
|
- Keep saved records visible as cards or rows with direct editing. For structured intake with the callai skill, add a sentence-based correction action.
|
|
62
|
-
- For an app with the callai skill, let an example chip put an example sentence into the same intake box. Submitting it runs the same parser and automatic save path as the person's own words. Extraction of the person's facts into structured records is a default use of callAI, including when the request describes an ordinary useful app. Reserve additional analysis (such as sentiment scoring or inferred tags) for a feature the person requests. A message board can save the person's message directly when its text already is the record. Every form carries one sparkle button that fills its fields with a suggestion from callAI, so the person can save without typing: the callai skill's Fill a form with a suggestion section shows the shape, the sparkle fills, and the form's own submit saves.{{DEMO_DATA}}
|
|
62
|
+
- For an app with the callai skill, let an example chip put an example sentence into the same intake box. Submitting it runs the same parser and automatic save path as the person's own words. Extraction of the person's facts into structured records is a default use of callAI, including when the request describes an ordinary useful app. Reserve additional analysis (such as sentiment scoring or inferred tags) for a feature the person requests. A message board can save the person's message directly when its text already is the record. Every form carries one sparkle button that fills its fields with a suggestion from callAI, so the person can save without typing, a one-field name form included (a name saved directly, with no extraction, still gets its sparkle), each suggestion sized to its field: the callai skill's Fill a form with a suggestion section shows the shape, the sparkle fills, and the form's own submit saves.{{DEMO_DATA}}
|
|
63
63
|
|
|
64
64
|
{{CONCATENATED_LLMS}}
|
|
65
65
|
IMPORTANT: Your main file is `App.jsx` (the React component). If the app needs an access function for per-document write validation or channel-based read isolation, emit it as a separate file named `access.js` — never put access function code inside `App.jsx`. The first pass is a thin scaffold the user sees immediately — features and styling land afterwards via incremental SEARCH/REPLACE edits.
|