@vibes.diy/prompts 14.3.280 → 14.3.282

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/llms/access.md CHANGED
@@ -63,15 +63,21 @@ The question that decides which one a doc wants is whose thing it is: **personal
63
63
 
64
64
  ### Two controls: a followers checkbox and an individual buddy picker
65
65
 
66
- A privacy-sensitive app — a workout log, a journal, a health or money tracker — shares nothing until the person says so, and its sharing surface is exactly **two visually distinct controls**, because they run on two different mechanisms: the PLATFORM's follower list, and the APP's own grant list. Build both controls in every privacy-sensitive app unless the person asked, in their own words, to keep it to themselves — that app is the collection shape below instead: no public read, no followers box and no invite form standing open, and its quiet add-a-friend door is the way to let someone in later. A sensitive domain is the reason the controls start off, never a reason to leave them out.
66
+ A privacy-sensitive app — a workout log, a journal, a health or money tracker — shares nothing until the person says so, and its sharing surface is exactly **two visually distinct controls**, because they run on two different mechanisms: the PLATFORM's follower list, and the APP's own grant list. Build both controls in every privacy-sensitive app unless the person asked, in their own words, to keep it to themselves — that app is the collection shape below instead: no public read, no followers box and no invite form standing open, and its quiet add-a-friend door is the way to let someone in later. A sensitive domain is the reason the controls start off, never a reason to leave them out. A team's records about other people are the other exception, with one control instead of two: _A team's records about other people_ below.
67
67
 
68
68
  1. **A "Shared with followers" checkbox** — the platform half. It starts UNCHECKED in a privacy-sensitive app and the app must never pre-check it or arm it on mount; checking the box IS the consent, so call `requestFollowersAccess()` from that one change handler and nowhere else. The box is a real two-way switch, so the same handler must branch on the new checked state and turn sharing back OFF with `setVisibility("private")` when it is unchecked — a handler that calls the consent verb on both edges is an enable-only button that can never be undone. Make the word "followers" in the label tappable and have it preview the viewer's real follower list from `useSocial().followers` — that list is platform-wide, already established, and the same in every app, which is exactly why the box cannot start checked.
69
69
  2. **An "Add buddies" individual picker** — the app half, named for the app's own domain (workout buddies, reading buddies, a care circle). The person picks individuals by handle, and adding an individual buddy writes a share doc grant, never a change to the follow graph: the access fn returns `grant: { users: { [doc.buddyHandle]: [ch] } }` for that one chosen handle. It is follow-independent — a buddy need not follow you, adding one never checks the followers box, and this list belongs to the app.
70
70
 
71
+ **In a privacy-sensitive app, adding a person asks first.** Picking a handle opens a confirm dialog, not a write. The dialog names who is joining with `<ViewerTag userHandle={handle} />`, lists what they will see by count and by field, in the app's own nouns ("12 people, with their names, release dates and intake notes; 30 goals and milestones; anyone added from now on"), and says what they can change ("They can add people and log progress too"). Its confirm button writes the share doc; Cancel writes nothing. It carries one checkbox, "Skip this step next time I add a colleague" (worded for the app's own people: a buddy, a colleague, a care circle), which the confirm button saves to `localStorage` inside try/catch, so a private window simply asks every time; while it is on, the sharing card shows one quiet "Ask me again" button that clears it. The followers checkbox is its own confirmation and needs no dialog.
72
+
71
73
  Keep the two visually distinct (a checkbox with its own explanatory line; a separately labelled list with an add-a-handle field below it), and never let one write the other's state. Re-render both from what actually took effect — `followersEnabled` after the await, the share docs the app has written — never from what was asked for. Unchecking the box (`setVisibility("private")`) or removing a buddy means that person **stops receiving new data** — never write copy promising their existing copies are erased, or that they can no longer see what they already have.
72
74
 
73
75
  **When the owner asks you to add publish or sharing to a privacy-sensitive app, build exactly this consent-first shape and nothing wider.** The two controls above for follower and buddy sharing, or a per-item publish behind one tap for a single finished thing (the per-item channel whose read-grant flips from a `visibility` field); never an always-on `grant.public` channel for the records themselves, never a box that starts checked or a verb called on mount, and no "Anyone" rung — the platform refuses a `"public"` level on a sensitive app, so that control would be a button that does nothing. The sensitivity mark itself is not yours to change from code: if the ask is really "this app is not sensitive", say so and point at the app's settings, where the owner makes that call.
74
76
 
77
+ ### A team's records about other people
78
+
79
+ A caseload, a clinic's patients, a tutor's students, a coach's young athletes: records a team keeps about people who never signed in are privacy-sensitive, even though the app exists to be shared, because whoever sees them reads someone else's history. Each staff member's records live on their own tree (`user:<handle>`), and the first screen carries the add-a-colleague control, the `member` doc that grants the colleague that tree's channel (the add-a-friend shape in _The sharing shape follows what one record is_ below), with its who-can-see line beside it ("Colleagues you add can see and update this caseload"). It builds no followers checkbox, since a caseload is shared colleague by colleague, and no public read of the records. Each add asks first, through the confirm dialog above.
80
+
75
81
  App.jsx — the checkbox is the consent call; the picker is a doc write:
76
82
 
77
83
  ### `App.jsx`
@@ -1,15 +1,16 @@
1
1
  export const boardGamesConfig = {
2
2
  name: "board-games",
3
3
  label: "Board, tile and card games",
4
- description: "Load it for every board, tile, card or word game — chess, checkers, tic-tac-toe, connect four, go, mancala, sudoku, " +
4
+ description: "Load it for every board, tile, card or word game — checkers, tic-tac-toe, connect four, go, mancala, sudoku, " +
5
5
  "minesweeper, 2048, solitaire — turn-based play one move, tap, guess or card at a time, alone, against the app, passing " +
6
6
  "one phone or against a friend on their own phone from a shared link; also bingo " +
7
7
  "cards dealt per player from a shared pool, daily word guesses with an on-screen keyboard and a share grid, crosswords, word " +
8
8
  "searches, grouping puzzles, letter hives, hex, poker and other card games with hidden hands, trivia rooms and dice " +
9
- "scoresheets with house rules. Covers SVG boards in the app's theme tokens (square, hex, ring, graph and stacked " +
9
+ "scoresheets with house rules (chess has its own skill, which loads this one). Covers SVG boards in the app's theme tokens (square, hex, ring, graph and stacked " +
10
10
  "shapes) dressed in a look from the request's world (a dauber on paper, skate wheels, poker chips, wooden tiles), seeded deals and daily seeds, win-line detection, turns, undo, AI opponents, and who sees what — public tables, " +
11
11
  "private hands, members-only clubs.",
12
12
  needs: ["live-rooms", "surface-board"],
13
+ teaches: ["legalMoves", "applyMove"],
13
14
  cues: [
14
15
  "bingo",
15
16
  "word game",
@@ -17,7 +18,6 @@ export const boardGamesConfig = {
17
18
  "crossword",
18
19
  "word search",
19
20
  "sudoku",
20
- "chess",
21
21
  "checkers",
22
22
  "solitaire",
23
23
  "card game",
@@ -1 +1 @@
1
- {"version":3,"file":"board-games.js","sourceRoot":"","sources":["../../jsr/llms/board-games.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,gBAAgB,GAAc;IACzC,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,4BAA4B;IACnC,WAAW,EACT,sHAAsH;QACtH,yHAAyH;QACzH,kFAAkF;QAClF,8HAA8H;QAC9H,qHAAqH;QACrH,kHAAkH;QAClH,mOAAmO;QACnO,oCAAoC;IAEtC,KAAK,EAAE,CAAC,YAAY,EAAE,eAAe,CAAC;IACtC,IAAI,EAAE;QACJ,OAAO;QACP,WAAW;QACX,QAAQ;QACR,WAAW;QACX,aAAa;QACb,QAAQ;QACR,OAAO;QACP,UAAU;QACV,WAAW;QACX,WAAW;QACX,YAAY;QACZ,eAAe;QACf,cAAc;QACd,aAAa;QACb,SAAS;QACT,aAAa;QACb,aAAa;QACb,cAAc;KACf;CACF,CAAC"}
1
+ {"version":3,"file":"board-games.js","sourceRoot":"","sources":["../../jsr/llms/board-games.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,gBAAgB,GAAc;IACzC,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,4BAA4B;IACnC,WAAW,EACT,+GAA+G;QAC/G,yHAAyH;QACzH,kFAAkF;QAClF,8HAA8H;QAC9H,qHAAqH;QACrH,kKAAkK;QAClK,mOAAmO;QACnO,oCAAoC;IAEtC,KAAK,EAAE,CAAC,YAAY,EAAE,eAAe,CAAC;IAEtC,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,CAAC;IACpC,IAAI,EAAE;QACJ,OAAO;QACP,WAAW;QACX,QAAQ;QACR,WAAW;QACX,aAAa;QACb,QAAQ;QACR,UAAU;QACV,WAAW;QACX,WAAW;QACX,YAAY;QACZ,eAAe;QACf,cAAc;QACd,aAAa;QACb,SAAS;QACT,aAAa;QACb,aAAa;QACb,cAAc;KACf;CACF,CAAC"}
@@ -2,7 +2,7 @@
2
2
 
3
3
  Reach for this whenever the app is played on a board, a grid, a set of tiles or a deck of cards:
4
4
  bingo cards, a daily word guess, a mini crossword, a word search, a grouping puzzle, a letter
5
- hive, sudoku, minesweeper, a 2048 merge, checkers or chess, go, hex, mancala, solitaire, a memory
5
+ hive, sudoku, minesweeper, a 2048 merge, checkers, go, hex, mancala, solitaire, a memory
6
6
  match, a trick-taking card game, a trivia board, a dice scoresheet. Real-time action games
7
7
  (platformers, pinball, paddle-and-ball) are a `p5` or `three-js` job; this skill is for games
8
8
  that move one tap, one guess or one card at a time.
@@ -450,7 +450,7 @@ Each entry: the board shape, the state, the one trick — and who sees what.
450
450
  - **Sudoku** — 9×9 (or 4×4, 6×6, colours or glyphs as symbols). State: givens, entries, notes. Trick: conflicts are any duplicate in a row, column or box, highlighted in `fill-destructive`; notes mode stores a set per cell; a killer cage is a dashed `<path>` with its sum. Seeded puzzle; best time per difficulty on the public board.
451
451
  - **Minesweeper** — square grid. State: mines, revealed, flags. Trick: place mines after the first tap so it is always safe, flood-fill zeros with a queue; long-press flags on phones. Seeded board; public best times.
452
452
  - **2048 / colour merge** — 4×4. State: tile grid, score. Trick: one `slideRow` for left, and rotate the grid for the other three directions; spawn from the seed so a replay matches; swipe = pointer delta > 30 px, arrows on a keyboard. Public high scores.
453
- - **Checkers / chess** — 8×8 (or a torus, hex chess, stacked layers). State: one state doc with the position, `turn`, `seats`. Trick: `legalMoves` drives highlights, the AI and validation alike; a coverage puzzle colours every attacked square from the same move generator. Public table; only the seat whose turn it is writes. Three stacked layers are a three-js view over the same rules.
453
+ - **Checkers** — 8×8 (or a torus, stacked layers). State: one state doc with the position, `turn`, `seats`. Trick: `legalMoves` drives highlights, the AI and validation alike; a jump that can continue keeps the turn. Public table; only the seat whose turn it is writes. Chess is its own skill, `chess`, which loads this one.
454
454
  - **Go** — 9×9 or 19×19 intersections (draw lines, stones at crossings). State: stones, captures, `turn`. Trick: after a placement, remove each adjacent enemy group with no liberties (flood fill), then reject a placement that leaves its own group with none. Public table; turn rule.
455
455
  - **Hex** — rhombus of hexagons. State: owners per cell. Trick: a win is a union-find (or flood fill) path from your two edges; no draws are possible. Placement games on a hex board with holes run on the same cells. Public table; turn rule.
456
456
  - **Mancala** — ring of pits and two stores. State: seeds per pit. Trick: sow one seed per pit round the ring, skipping the opponent's store; last seed in your store earns another turn; last seed in your empty pit captures the opposite pit. Public table; turn rule.
@@ -0,0 +1,2 @@
1
+ import type { LlmConfig } from "./types.js";
2
+ export declare const chessConfig: LlmConfig;
package/llms/chess.js ADDED
@@ -0,0 +1,12 @@
1
+ export const chessConfig = {
2
+ name: "chess",
3
+ label: "Chess",
4
+ description: "Load it for every chess app — play the computer at a chosen strength, play a friend from a shared link, puzzles, " +
5
+ "opening trainers, blunder coaches, game reviews, club ladders, chess variants. Real rules from chess.js (castling, " +
6
+ "en passant, promotion, check, mate, every draw), a Stockfish engine opponent and analysis in a Web Worker, move " +
7
+ "lists, PGN and FEN, clocks, and the board drawn in SVG, with react-chessboard drag-and-drop, or in 3D.",
8
+ needs: ["board-games"],
9
+ cues: ["chess", "chessboard", "stockfish", "checkmate", "chess puzzle", "chess puzzles", "pgn"],
10
+ teaches: ["Chessboard", "Stockfish"],
11
+ };
12
+ //# sourceMappingURL=chess.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chess.js","sourceRoot":"","sources":["../../jsr/llms/chess.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,MAAM,WAAW,GAAc;IACpC,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,OAAO;IACd,WAAW,EACT,mHAAmH;QACnH,qHAAqH;QACrH,kHAAkH;QAClH,wGAAwG;IAE1G,KAAK,EAAE,CAAC,aAAa,CAAC;IACtB,IAAI,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe,EAAE,KAAK,CAAC;IAC/F,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,CAAC;CACrC,CAAC"}
package/llms/chess.md ADDED
@@ -0,0 +1,448 @@
1
+ # Chess — the rules from chess.js, the opponent from Stockfish, the board drawn your way
2
+
3
+ Load this for any chess app: play against the computer, play a friend from a shared link, a
4
+ puzzle or opening trainer, a blunder coach, a game review, a club ladder, a chess variant on the
5
+ standard rules. It stands on the board-games skill, which loads with it and owns the board's
6
+ geometry, its look, turns, seats and who sees what. This doc owns the three things chess gets
7
+ wrong when an app writes them itself:
8
+
9
+ 1. **The rules come from `chess.js`.** Castling (and losing the right to castle), en passant,
10
+ promotion to any piece, check, pins, checkmate, stalemate, threefold repetition, the fifty-move
11
+ rule and insufficient material are all the library's. An app never writes its own move
12
+ generator for chess: a hand-written one ships without castling or en passant and promotes
13
+ every pawn to a queen.
14
+ 2. **The computer opponent is Stockfish**, running in a Web Worker, never `callAI` and never a
15
+ hand-written search. It plays at any strength from beginner to far beyond a grandmaster,
16
+ answers in under a second, and keeps the page responsive while it thinks.
17
+ 3. **The board is drawn whichever way the app's look asks for**, from the same `chess.js`
18
+ game: the board-games SVG board (the default), `react-chessboard` for drag-and-drop with
19
+ classic piece art, or a 3D stage.
20
+
21
+ ## The rules — `chess.js`
22
+
23
+ `chess.js` is the board-games rule functions, written for chess: `game.moves()` is `legalMoves`,
24
+ `game.move()` is `applyMove`, and `isGameOver()` with its reasons is `winner`.
25
+
26
+ ```js
27
+ import { Chess } from "chess.js";
28
+
29
+ const game = new Chess(); // or new Chess(fen) for a puzzle or a set position
30
+ game.moves({ square: "e2", verbose: true }); // [{ from, to, san, promotion?, flags }, …] the legal moves from e2
31
+ game.move({ from: "e2", to: "e4" }); // throws on an illegal move
32
+ game.move({ from: "e7", to: "e8", promotion: "n" }); // promotion names its piece: q, r, b or n
33
+ game.move("Nf3"); // SAN works too
34
+ game.turn(); // "w" | "b"
35
+ game.fen(); // the position, one line
36
+ game.history(); // ["e4", "e5", "Nf3"] in SAN
37
+ game.board(); // 8 rows (rank 8 first) of 8 cells, each { square, type, color } or null
38
+ game.get("e1"); // { type: "k", color: "w" } or undefined
39
+ game.findPiece({ type: "k", color: "w" }); // ["e1"]
40
+ game.inCheck(); game.isCheckmate(); game.isStalemate(); game.isDraw();
41
+ game.isThreefoldRepetition(); game.isInsufficientMaterial(); game.isGameOver();
42
+ game.undo(); // takes back the last move
43
+ game.load(fen); game.loadPgn(pgnText);
44
+ ```
45
+
46
+ - **Store the SAN move list; derive the game.** The record holds `moves: ["e4", "e5", …]`, and the
47
+ page rebuilds the game with `new Chess()` and one `move` per entry. The list carries the history
48
+ that threefold repetition and the move list need, which a FEN alone drops. A game that starts
49
+ from a set position stores its `startFen` too and replays from `new Chess(startFen)`.
50
+ - **A move is legal when `chess.js` accepts it.** Wrap `move` in `try`/`catch`: a throw means the
51
+ board stays as it was. The board's highlights, a hint, the engine's reply and a friend's move
52
+ from another phone all go through the same `move` call.
53
+ - **Promotion asks.** When the chosen square's legal moves carry `promotion`, show a four-button
54
+ picker (Queen, Rook, Bishop, Knight) and send the pick as `promotion`. A drop that auto-queens
55
+ takes an underpromotion away from the player.
56
+ - **`pgn()` starts with a block of placeholder headers** (`[Event "?"]` …). For an on-screen move
57
+ list, number the SAN list yourself (`1. e4 e5 2. Nf3`); keep `pgn()` for a Download PGN button,
58
+ after `setHeader("White", …)` and its siblings.
59
+ - **The game is over when `isGameOver()` says so**, and the reason is the first of
60
+ `isCheckmate`, `isStalemate`, `isThreefoldRepetition`, `isInsufficientMaterial`, then the
61
+ fifty-move rule, the remaining `isDraw`.
62
+
63
+ ## The opponent — Stockfish in a Web Worker
64
+
65
+ `lib/engine.js` below is the whole engine module. It loads Stockfish 19's **lite single-threaded**
66
+ build (a 1.8 MB `.wasm`) from unpkg, version-pinned. Three details are load-bearing:
67
+
68
+ - **The worker is a blob that `importScripts` the engine.** A page cannot start a Worker from
69
+ another origin's URL, so the module makes a tiny same-origin blob whose one line imports it.
70
+ - **The `.wasm` address rides in the worker URL's `#hash`.** stockfish.js finds its `.wasm` next
71
+ to its own script URL, which inside a blob is `blob:`, so the fetch fails. Stockfish reads the
72
+ hash first: `new Worker(`${blobUrl}#${encodeURIComponent(wasmUrl)}`)`.
73
+ - **Use the `-lite-single` build from unpkg.** The multi-threaded builds need
74
+ `SharedArrayBuffer`, which a vibe's page does not have, and the full builds carry a 99 MB
75
+ network file. jsDelivr refuses the `stockfish` package outright for its size.
76
+
77
+ Strength is two knobs: `Skill Level` (0 to 20) and the thinking time. Level 0 at 150 ms is a
78
+ gentle beginner; 20 at 1 s is far stronger than any human. Every reply is UCI (`e7e8q`): the
79
+ first four letters are the from and to squares, a fifth is the promotion piece, and the reply
80
+ goes through `chess.js` `move` like any other.
81
+
82
+ - **Scores are from the side to move**, in centipawns (100 is a pawn), and a forced mate is
83
+ ±10000. A blunder check evaluates the position before and after the player's move: the
84
+ player's loss is `before.score + after.score` (the second is from the opponent's side), and
85
+ 200 or more is a blunder, 100 a mistake. `evaluate` returns the engine's best reply too, which
86
+ is the hint and the better move to show.
87
+ - **`callAI` explains, Stockfish chooses.** A coach that talks sends `callAI` the position, the
88
+ move played and the engine's better move and score, and asks for one or two plain sentences on
89
+ why. The language model never picks or judges a chess move itself.
90
+ - **When the engine cannot load** (offline, a blocked CDN) the promise rejects. Keep the game
91
+ playable with a random legal move and say "Engine offline" in the status line.
92
+ - **Credit the engine.** Stockfish is GPL-3 and runs unmodified, straight from unpkg, in its own
93
+ worker; a muted line under the board says "Engine: Stockfish".
94
+
95
+ ## Drawing the board — three ways, one game
96
+
97
+ The board is a view of `game.board()`; tapping a square asks `game.moves({ square, verbose: true })`
98
+ for the targets. Pick the drawing that suits the app's look:
99
+
100
+ - **The board-games SVG board (the default).** An 8×8 grid of `<rect>`s in `fill-card` and
101
+ `fill-muted`, dressed by the board surface (an inlaid wood board, a park table, the request's
102
+ own world). Pieces are the solid Unicode glyphs ♚♛♜♝♞♟ in `<text>`, both sides from the same
103
+ glyph: White is `fill-card stroke-foreground`, Black `fill-foreground stroke-foreground`, so
104
+ both sides follow the palette. Append `︎` to each glyph, or iOS draws the pawn as an
105
+ emoji. Tap a piece, then a target; the last move is `fill-accent opacity-40`, the king in check
106
+ `fill-destructive`. The worked example below draws this board.
107
+ - **`react-chessboard` for drag-and-drop and classic piece art.** `import { Chessboard } from
108
+ "react-chessboard"` (v5: one `options` prop). Pass `position: game.fen()`,
109
+ `onPieceDrop: ({ sourceSquare, targetSquare }) => tryMove(sourceSquare, targetSquare)` (return
110
+ `false` to snap the piece back), `onSquareClick: ({ square }) => …` for tap-to-move,
111
+ `boardOrientation: "black"` to flip, and `squareStyles` to mark targets. It styles with inline
112
+ styles, so give its squares the room's colours through CSS variables:
113
+ `darkSquareStyle: { backgroundColor: "var(--muted, var(--border))" }` and
114
+ `lightSquareStyle: { backgroundColor: "var(--card, var(--surface))" }`.
115
+ - **A 3D board** is the three-js skill's stage over the same `chess.js` game: the squares are a
116
+ plane of tiles, the pieces lathe geometry, and a raycast tap calls the same `onSquare`.
117
+
118
+ Flip the board for the player on Black: draw rank 1 at the top and file h on the left, and keep
119
+ the square names unchanged, since every rule speaks in square names.
120
+
121
+ ## Two players, puzzles and clocks
122
+
123
+ - **A friend on their own phone** is the board-games turn rule: one game doc holds `moves`,
124
+ `white` and `black` handles, and only the seat whose colour is `turn` writes. Each phone checks
125
+ the move with `chess.js` before writing; `access.js` cannot import the library, so it checks the
126
+ seat, the turn and that `moves` grew by exactly one.
127
+ - **A puzzle** is a `startFen` plus the solution as UCI moves. The player's move is right when it
128
+ matches the next solution move or when the engine's `evaluate` says it is as good; the reply
129
+ move plays itself.
130
+ - **An opening trainer** stores each line as SAN moves and plays the book reply until the player
131
+ leaves the line, then hands the position to the engine.
132
+ - **A clock** stores each side's remaining milliseconds and the time the turn started on the game
133
+ doc; every phone counts down from those, so both screens agree.
134
+
135
+ ## Worked example — play Stockfish, games saved
136
+
137
+ You play White at three strengths, every move saves the game where only its player reads it, and
138
+ finished games are public like a club scoresheet. The board is the board-games SVG board.
139
+
140
+ ### `lib/engine.js`
141
+ ```js
142
+ // Stockfish 19 lite: the single-threaded WASM build (1.8 MB), which needs no cross-origin isolation.
143
+ // A Worker must be same-origin, so a blob worker importScripts the engine, and the .wasm address
144
+ // rides in the worker URL's #hash, which is where stockfish.js looks for it.
145
+ const SF = "https://unpkg.com/stockfish@19.0.1/bin/stockfish-19-lite-single";
146
+
147
+ export const LEVELS = [
148
+ { id: "easy", label: "Easy", skill: 0, ms: 150 },
149
+ { id: "club", label: "Club", skill: 8, ms: 400 },
150
+ { id: "strong", label: "Strong", skill: 20, ms: 1200 },
151
+ ];
152
+
153
+ export function startEngine() {
154
+ const boot = URL.createObjectURL(new Blob([`importScripts("${SF}.js");`], { type: "application/javascript" }));
155
+ const worker = new Worker(`${boot}#${encodeURIComponent(`${SF}.wasm`)}`);
156
+ let current = null; // the search in flight: { resolve, reject, score }
157
+ let queue = Promise.resolve(); // one search at a time, in the order asked
158
+ let broken = null;
159
+
160
+ worker.onmessage = (e) => {
161
+ const line = String(e.data);
162
+ const s = line.match(/ score (cp|mate) (-?\d+)/);
163
+ if (s && current) current.score = s[1] === "mate" ? (Number(s[2]) > 0 ? 10000 : -10000) : Number(s[2]);
164
+ if (line.startsWith("bestmove") && current) {
165
+ const uci = line.split(" ")[1];
166
+ const done = current;
167
+ current = null;
168
+ done.resolve({ uci: uci && uci !== "(none)" ? uci : null, score: done.score });
169
+ }
170
+ };
171
+ worker.onerror = () => {
172
+ broken = new Error("engine unavailable");
173
+ if (current) current.reject(broken);
174
+ current = null;
175
+ };
176
+ worker.postMessage("uci");
177
+
178
+ // `score` is in centipawns from the side to move's point of view; a mate is ±10000.
179
+ function search(fen, go, skill) {
180
+ const run = () =>
181
+ new Promise((resolve, reject) => {
182
+ if (broken) return reject(broken);
183
+ current = { resolve, reject, score: 0 };
184
+ worker.postMessage(`setoption name Skill Level value ${skill}`);
185
+ worker.postMessage(`position fen ${fen}`);
186
+ worker.postMessage(`go ${go}`);
187
+ });
188
+ const next = queue.then(run, run);
189
+ queue = next.catch(() => {});
190
+ return next;
191
+ }
192
+
193
+ return {
194
+ bestMove: (fen, level) => search(fen, `movetime ${level.ms}`, level.skill),
195
+ evaluate: (fen, depth = 12) => search(fen, `depth ${depth}`, 20),
196
+ stop: () => worker.terminate(),
197
+ };
198
+ }
199
+ ```
200
+
201
+ ### `App.jsx`
202
+ ```jsx
203
+ import React, { useEffect, useMemo, useRef, useState } from "react";
204
+ import { Chess } from "chess.js";
205
+ import { useFireproof } from "use-fireproof";
206
+ import { useVibe, useViewer } from "use-vibes";
207
+ import { Badge, Button, Card, Heading, Row, Skeleton, Stack, Text } from "@vibes.diy/ui";
208
+ import { LEVELS, startEngine } from "./lib/engine.js";
209
+
210
+ const S = 100; // one square, in board units
211
+ const FILES = "abcdefgh";
212
+ // Solid glyphs for both sides, coloured by class; ︎ keeps iOS from drawing the pawn as an emoji.
213
+ const GLYPH = { k: "♚", q: "♛", r: "♜", b: "♝", n: "♞", p: "♟" };
214
+ const PROMOTE = [
215
+ { piece: "q", label: "Queen" },
216
+ { piece: "r", label: "Rook" },
217
+ { piece: "b", label: "Bishop" },
218
+ { piece: "n", label: "Knight" },
219
+ ];
220
+
221
+ // The game is its SAN move list; chess.js replays it, so every rule (castling, en passant,
222
+ // promotion, check, repetition) is the library's and nothing here re-derives one.
223
+ function replay(moves) {
224
+ const game = new Chess();
225
+ for (const san of moves) game.move(san);
226
+ return game;
227
+ }
228
+
229
+ // "1. e4 e5 2. Nf3": the move list without the PGN header block chess.js puts in front of pgn().
230
+ const moveText = (moves) => moves.map((san, i) => (i % 2 ? san : `${i / 2 + 1}. ${san}`)).join(" ");
231
+
232
+ function outcome(game) {
233
+ if (game.isCheckmate()) return game.turn() === "w" ? "Black wins by checkmate" : "White wins by checkmate";
234
+ if (game.isStalemate()) return "Draw by stalemate";
235
+ if (game.isThreefoldRepetition()) return "Draw by repetition";
236
+ if (game.isInsufficientMaterial()) return "Draw, not enough pieces to mate";
237
+ if (game.isDraw()) return "Draw by the fifty-move rule";
238
+ return null;
239
+ }
240
+
241
+ function ChessBoard({ game, flip, selected, lastMove, onSquare }) {
242
+ const targets = selected ? game.moves({ square: selected, verbose: true }).map((m) => m.to) : [];
243
+ const kingInCheck = game.inCheck() ? game.findPiece({ type: "k", color: game.turn() })[0] : null;
244
+ const cells = [];
245
+ game.board().forEach((rank, r) =>
246
+ rank.forEach((piece, f) => {
247
+ const square = FILES[f] + (8 - r);
248
+ const x = (flip ? 7 - f : f) * S;
249
+ const y = (flip ? 7 - r : r) * S;
250
+ const dark = (r + f) % 2 === 1;
251
+ const name = piece ? `${square}, ${piece.color === "w" ? "white" : "black"} ${piece.type}` : square;
252
+ cells.push(
253
+ <g
254
+ key={square}
255
+ role="button"
256
+ tabIndex={0}
257
+ aria-label={name}
258
+ aria-pressed={selected === square}
259
+ onClick={() => onSquare(square)}
260
+ onKeyDown={(e) => (e.key === "Enter" || e.key === " ") && (e.preventDefault(), onSquare(square))}
261
+ className="cursor-pointer"
262
+ >
263
+ <rect x={x} y={y} width={S} height={S} className={dark ? "fill-muted" : "fill-card"} />
264
+ {lastMove?.includes(square) && <rect x={x} y={y} width={S} height={S} className="fill-accent opacity-40" />}
265
+ {kingInCheck === square && <rect x={x} y={y} width={S} height={S} className="fill-destructive opacity-50" />}
266
+ {selected === square && <rect x={x + 4} y={y + 4} width={S - 8} height={S - 8} strokeWidth="8" className="fill-none stroke-primary" />}
267
+ {piece && (
268
+ <text x={x + S / 2} y={y + S / 2 + 4} textAnchor="middle" dominantBaseline="central" fontSize="78" strokeWidth="3" className={piece.color === "w" ? "fill-card stroke-foreground" : "fill-foreground stroke-foreground"}>
269
+ {GLYPH[piece.type] + "︎"}
270
+ </text>
271
+ )}
272
+ {targets.includes(square) && <circle cx={x + S / 2} cy={y + S / 2} r={piece ? 44 : 14} strokeWidth={piece ? 6 : 0} className={piece ? "fill-none stroke-primary" : "fill-primary opacity-70"} />}
273
+ </g>
274
+ );
275
+ })
276
+ );
277
+ return (
278
+ <svg viewBox={`0 0 ${8 * S} ${8 * S}`} className="w-full max-w-md aspect-square touch-manipulation select-none" role="group" aria-label="Chess board">
279
+ {cells}
280
+ </svg>
281
+ );
282
+ }
283
+
284
+ export default function App() {
285
+ const { database, useLiveQuery } = useFireproof("chess");
286
+ const { me, can, ready } = useVibe("chess");
287
+ const { requestLogin } = useViewer();
288
+ const { docs: games } = useLiveQuery("type", { key: "game" });
289
+ const [moves, setMoves] = useState([]);
290
+ const [gameId, setGameId] = useState(() => `game:${Date.now()}`);
291
+ const [level, setLevel] = useState(LEVELS[1]);
292
+ const [selected, setSelected] = useState(null);
293
+ const [promotion, setPromotion] = useState(null); // { from, to } waiting for a piece
294
+ const [thinking, setThinking] = useState(false);
295
+ const [engineDown, setEngineDown] = useState(false);
296
+ const engine = useRef(null);
297
+
298
+ useEffect(() => {
299
+ engine.current = startEngine();
300
+ return () => engine.current.stop();
301
+ }, []);
302
+
303
+ const game = useMemo(() => replay(moves), [moves]);
304
+ const verbose = game.history({ verbose: true });
305
+ const last = verbose[verbose.length - 1];
306
+ const result = outcome(game);
307
+ const handle = me?.userHandle;
308
+ const record = { _id: gameId, type: "game", playerHandle: handle, moves, level: level.id, result };
309
+ const canSave = ready && handle && can.create(record).ok;
310
+
311
+ // Pick up this player's newest unfinished game once their games load, on a reload or another
312
+ // device. A game already under way here is left alone.
313
+ const resumed = useRef(false);
314
+ useEffect(() => {
315
+ if (resumed.current || !handle) return;
316
+ const open = games.filter((g) => g.playerHandle === handle && !g.result).sort((a, b) => (b.updatedAt ?? 0) - (a.updatedAt ?? 0))[0];
317
+ if (moves.length || open) resumed.current = true;
318
+ if (moves.length || !open) return;
319
+ setGameId(open._id);
320
+ setMoves(open.moves ?? []);
321
+ setLevel(LEVELS.find((l) => l.id === open.level) ?? LEVELS[1]);
322
+ }, [games, handle]);
323
+
324
+ function play(next) {
325
+ setMoves(next);
326
+ setSelected(null);
327
+ // Each move saves the game, so a reload or another device picks it up mid-game.
328
+ if (canSave) database.put({ ...record, moves: next, result: outcome(replay(next)), updatedAt: Date.now() });
329
+ }
330
+
331
+ function tryMove(from, to, piece) {
332
+ const g = replay(moves);
333
+ try {
334
+ g.move({ from, to, promotion: piece });
335
+ } catch {
336
+ return false; // chess.js throws on an illegal move; the board just stays put
337
+ }
338
+ play(g.history());
339
+ return true;
340
+ }
341
+
342
+ function onSquare(square) {
343
+ if (result || thinking || game.turn() !== "w") return;
344
+ const options = selected ? game.moves({ square: selected, verbose: true }).filter((m) => m.to === square) : [];
345
+ if (options.some((m) => m.promotion)) return setPromotion({ from: selected, to: square });
346
+ if (options.length) return tryMove(selected, square);
347
+ const piece = game.get(square);
348
+ setSelected(piece?.color === "w" ? square : null);
349
+ }
350
+
351
+ // The engine answers whenever it is Black's turn.
352
+ useEffect(() => {
353
+ if (result || game.turn() !== "b" || !engine.current) return;
354
+ let live = true;
355
+ setThinking(true);
356
+ engine.current
357
+ .bestMove(game.fen(), level)
358
+ .then(({ uci }) => live && uci && tryMove(uci.slice(0, 2), uci.slice(2, 4), uci[4]))
359
+ .catch(() => {
360
+ // Offline or blocked: keep the game going with a random legal move, and say so.
361
+ setEngineDown(true);
362
+ const pick = game.moves({ verbose: true })[Math.floor(Math.random() * game.moves().length)];
363
+ if (live && pick) tryMove(pick.from, pick.to, pick.promotion);
364
+ })
365
+ .finally(() => live && setThinking(false));
366
+ return () => {
367
+ live = false;
368
+ };
369
+ }, [moves]);
370
+
371
+ if (!ready) {
372
+ return (
373
+ <main className="min-h-screen bg-background text-foreground font-sans p-4 flex flex-col items-center gap-4">
374
+ <Skeleton />
375
+ </main>
376
+ );
377
+ }
378
+
379
+ const status = result ?? (thinking ? "Stockfish is thinking…" : game.inCheck() ? "Check! Your move" : "Your move, you play White");
380
+ const mine = games.filter((g) => g.playerHandle === handle && g.result);
381
+
382
+ return (
383
+ <main className="min-h-screen bg-background text-foreground font-sans p-4 flex flex-col items-center gap-4">
384
+ <Heading level={1}>Chess</Heading>
385
+ <Row gap={2} align="center">
386
+ <Badge tone={result ? "up" : "info"}>{status}</Badge>
387
+ {engineDown && <Text size="sm" muted>Engine offline, playing random moves</Text>}
388
+ </Row>
389
+
390
+ <ChessBoard game={game} flip={false} selected={selected} lastMove={last ? [last.from, last.to] : null} onSquare={onSquare} />
391
+
392
+ {promotion && (
393
+ <Row gap={2} wrap>
394
+ {PROMOTE.map((p) => (
395
+ <Button key={p.piece} type="button" size="sm" onClick={() => (tryMove(promotion.from, promotion.to, p.piece), setPromotion(null))}>
396
+ {p.label}
397
+ </Button>
398
+ ))}
399
+ </Row>
400
+ )}
401
+
402
+ <Row gap={2} wrap>
403
+ {LEVELS.map((l) => (
404
+ <Button key={l.id} type="button" size="sm" variant={l.id === level.id ? "solid" : "quiet"} onClick={() => setLevel(l)}>
405
+ {l.label}
406
+ </Button>
407
+ ))}
408
+ <Button type="button" size="sm" variant="quiet" disabled={thinking || moves.length < 2} onClick={() => play(moves.slice(0, -2))}>
409
+ Take back
410
+ </Button>
411
+ <Button type="button" size="sm" variant="quiet" onClick={() => (setMoves([]), setGameId(`game:${Date.now()}`), setSelected(null), setThinking(false), setPromotion(null))}>
412
+ New game
413
+ </Button>
414
+ </Row>
415
+
416
+ {!handle && <Button type="button" variant="quiet" onClick={requestLogin}>Sign in to keep your games</Button>}
417
+
418
+ <div className="w-full max-w-md">
419
+ <Card>
420
+ <Stack gap={2}>
421
+ <Heading level={2}>Moves</Heading>
422
+ <Text size="sm">{moveText(moves) || "No moves yet."}</Text>
423
+ {mine.length > 0 && <Text size="sm" muted>{mine.length} finished games saved.</Text>}
424
+ </Stack>
425
+ </Card>
426
+ </div>
427
+ <Text size="sm" muted>Engine: Stockfish (GPL-3), loaded from unpkg.</Text>
428
+ </main>
429
+ );
430
+ }
431
+ ```
432
+
433
+ ### `access.js`
434
+ ```js
435
+ export function chess(doc, oldDoc, user, ctx) {
436
+ if (!user) throw { forbidden: "sign in to keep your games" };
437
+ if (doc.type === "game") {
438
+ // A player saves only their own games. A game in progress is theirs alone; a finished game
439
+ // moves to the public channel, like a club's scoresheet.
440
+ const player = oldDoc ? oldDoc.playerHandle : doc.playerHandle;
441
+ if (player !== user.userHandle || doc.playerHandle !== user.userHandle) throw { forbidden: "your own games" };
442
+ if (doc.result) return { channels: ["games"], grant: { public: ["games"] } };
443
+ const mine = `player:${user.userHandle}`;
444
+ return { channels: [mine], grant: { users: { [user.userHandle]: [mine] } } };
445
+ }
446
+ throw { forbidden: "unknown document type" };
447
+ }
448
+ ```
package/llms/index.d.ts CHANGED
@@ -2,6 +2,7 @@ import type { LlmConfig } from "./types.js";
2
2
  export { backendConfig } from "./backend.js";
3
3
  export { calendarConfig } from "./calendar.js";
4
4
  export { boardGamesConfig } from "./board-games.js";
5
+ export { chessConfig } from "./chess.js";
5
6
  export { surfaceBoardConfig } from "./surface-board.js";
6
7
  export { ownerSecretConfig } from "./owner-secret.js";
7
8
  export { thirdPartyEmbedConfig } from "./third-party-embed.js";
@@ -79,7 +80,7 @@ export { uiTestimonialsConfig } from "./ui-testimonials.js";
79
80
  export type { LlmConfig, SkillCredential, SkillEgress } from "./types.js";
80
81
  export { cueMatches, cueMatchedSkills, type CueCatalogEntry } from "./cues.js";
81
82
  export { expandSkills, onSkillMenu, skillGraphProblems, universalSkillNames, type NeedsCatalogEntry } from "./needs.js";
82
- export declare const allConfigs: readonly [LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig];
83
+ export declare const allConfigs: readonly [LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig, LlmConfig];
83
84
  export { mapsConfig } from "./maps.js";
84
85
  export declare const SKILL_ALIASES: ReadonlyMap<string, string>;
85
86
  export declare function canonicalSkillName(name: string): string;
package/llms/index.js CHANGED
@@ -2,6 +2,7 @@ import { backendConfig } from "./backend.js";
2
2
  import { mapsConfig } from "./maps.js";
3
3
  import { calendarConfig } from "./calendar.js";
4
4
  import { boardGamesConfig } from "./board-games.js";
5
+ import { chessConfig } from "./chess.js";
5
6
  import { surfaceBoardConfig } from "./surface-board.js";
6
7
  import { ownerSecretConfig } from "./owner-secret.js";
7
8
  import { thirdPartyEmbedConfig } from "./third-party-embed.js";
@@ -79,6 +80,7 @@ import { uiTestimonialsConfig } from "./ui-testimonials.js";
79
80
  export { backendConfig } from "./backend.js";
80
81
  export { calendarConfig } from "./calendar.js";
81
82
  export { boardGamesConfig } from "./board-games.js";
83
+ export { chessConfig } from "./chess.js";
82
84
  export { surfaceBoardConfig } from "./surface-board.js";
83
85
  export { ownerSecretConfig } from "./owner-secret.js";
84
86
  export { thirdPartyEmbedConfig } from "./third-party-embed.js";
@@ -185,6 +187,7 @@ export const allConfigs = [
185
187
  calendarConfig,
186
188
  surfaceBoardConfig,
187
189
  boardGamesConfig,
190
+ chessConfig,
188
191
  accessConfig,
189
192
  connectionsConfig,
190
193
  socialPostConfig,
package/llms/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../jsr/llms/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,m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AE,KAAK,EAAE,CAAC,EAAE,CAAC;IACtE,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;CACvD,CAAC,CAAC;AAWH,MAAM,UAAU,gBAAgB,CAAC,KAAwB,EAAE,OAAgB;IACzE,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,SAAS,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAC3C,MAAM,KAAK,GAAG,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAC1C,MAAM,IAAI,GAAG,KAAK,KAAK,SAAS,IAAI,CAAC,OAAO,KAAK,SAAS,IAAI,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QAChH,KAAK,MAAM,CAAC,IAAI,IAAI;YAAE,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,KAAK;gBAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACnE,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibes.diy/prompts",
3
- "version": "14.3.280",
3
+ "version": "14.3.282",
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.280",
43
- "@vibes.diy/call-ai-v2": "14.3.280",
44
- "@vibes.diy/identity": "14.3.280",
45
- "@vibes.diy/use-vibes-types": "14.3.280",
42
+ "@vibes.diy/api-types": "14.3.282",
43
+ "@vibes.diy/call-ai-v2": "14.3.282",
44
+ "@vibes.diy/identity": "14.3.282",
45
+ "@vibes.diy/use-vibes-types": "14.3.282",
46
46
  "arktype": "~2.2.9",
47
47
  "json-schema-faker": "~0.6.3"
48
48
  },
@@ -480,7 +480,7 @@ A second visitor should arrive at a party, not a parking lot: within five second
480
480
  </Row>
481
481
  ```
482
482
 
483
- A privacy-sensitive app — a diary, journal, health or money log — keeps its sharing off until the person turns it on, and for a request that names nobody the invite screen is one of the closing `▸` options.
483
+ A privacy-sensitive app — a diary, journal, health or money log — keeps its sharing off until the person turns it on, and for a request that names nobody the invite screen is one of the closing `▸` options. A team's records about other people (a caseload, a clinic's patients) are sensitive too, and share colleague by colleague from the first screen. In every sensitive app, adding a person opens a confirm dialog that names them and lists what they will see, with a "Skip this step next time" checkbox (access skill doc).
484
484
 
485
485
  **How specific the request is sets what reaches the screen.** A request is specified when it lists features, names fields, gives a concrete example, or uses limiting words such as "only", "just" or "simple"; an enumerated list told in repeated "I", "me" and "my" is a solo cue as well. A first build shows what the platform can do inside the ask's own scope. It carries the features the ask names, each a direct control of its own. Beside them sits the baseline every app gets: a sparkle on every form, a way to share with its reason on the first screen of an app that is not privacy-sensitive, Ask where there are records to ask about, and a button that makes a picture wherever a picture would be great. Your bigger ideas — server work, a connection, taking payments, a generated world — become the options. A vague ask gets its alive defaults on screen, each wired, with the rest as options. Someone who does not know a capability exists cannot ask for it, so the baseline is how they meet it, in the place _The first phone screen_ gives it: a first vibe is the platform's own demo of itself, built around the thing the person asked for. Its sample content is the `seed.json` demo, and whether the app opens on it is the call above.
486
486
 
@@ -482,7 +482,7 @@ A second visitor should arrive at a party, not a parking lot: within five second
482
482
  </Row>
483
483
  ```
484
484
 
485
- A privacy-sensitive app — a diary, journal, health or money log — keeps its sharing off until the person turns it on, and for a request that names nobody the invite screen is one of the closing `▸` options.
485
+ A privacy-sensitive app — a diary, journal, health or money log — keeps its sharing off until the person turns it on, and for a request that names nobody the invite screen is one of the closing `▸` options. A team's records about other people (a caseload, a clinic's patients) are sensitive too, and share colleague by colleague from the first screen. In every sensitive app, adding a person opens a confirm dialog that names them and lists what they will see, with a "Skip this step next time" checkbox (access skill doc).
486
486
 
487
487
  **How specific the request is sets what reaches the screen.** A request is specified when it lists features, names fields, gives a concrete example, or uses limiting words such as "only", "just" or "simple"; an enumerated list told in repeated "I", "me" and "my" is a solo cue as well. A first build shows what the platform can do inside the ask's own scope. It carries the features the ask names, each a direct control of its own. Beside them sits the baseline every app gets: a sparkle on every form, a way to share with its reason on the first screen of an app that is not privacy-sensitive, Ask where there are records to ask about, and a button that makes a picture wherever a picture would be great. Your bigger ideas — server work, a connection, taking payments, a generated world — become the options. A vague ask gets its alive defaults on screen, each wired, with the rest as options. Someone who does not know a capability exists cannot ask for it, so the baseline is how they meet it, in the place _The first phone screen_ gives it: a first vibe is the platform's own demo of itself, built around the thing the person asked for. Its sample content is the `seed.json` demo, and whether the app opens on it is the call above.
488
488
 
package/system-prompt.md CHANGED
@@ -776,7 +776,7 @@ A second visitor should arrive at a party, not a parking lot: within five second
776
776
  </Row>
777
777
  ```
778
778
 
779
- A privacy-sensitive app — a diary, journal, health or money log — keeps its sharing off until the person turns it on, and for a request that names nobody the invite screen is one of the closing `▸` options.
779
+ A privacy-sensitive app — a diary, journal, health or money log — keeps its sharing off until the person turns it on, and for a request that names nobody the invite screen is one of the closing `▸` options. A team's records about other people (a caseload, a clinic's patients) are sensitive too, and share colleague by colleague from the first screen. In every sensitive app, adding a person opens a confirm dialog that names them and lists what they will see, with a "Skip this step next time" checkbox (access skill doc).
780
780
 
781
781
  **How specific the request is sets what reaches the screen.** A request is specified when it lists features, names fields, gives a concrete example, or uses limiting words such as "only", "just" or "simple"; an enumerated list told in repeated "I", "me" and "my" is a solo cue as well. A first build shows what the platform can do inside the ask's own scope. It carries the features the ask names, each a direct control of its own. Beside them sits the baseline every app gets: a sparkle on every form, a way to share with its reason on the first screen of an app that is not privacy-sensitive, Ask where there are records to ask about, and a button that makes a picture wherever a picture would be great. Your bigger ideas — server work, a connection, taking payments, a generated world — become the options. A vague ask gets its alive defaults on screen, each wired, with the rest as options. Someone who does not know a capability exists cannot ask for it, so the baseline is how they meet it, in the place _The first phone screen_ gives it: a first vibe is the platform's own demo of itself, built around the thing the person asked for. Its sample content is the `seed.json` demo, and whether the app opens on it is the call above.
782
782