diff --git a/art/STYLE.md b/art/STYLE.md index 3865193..980446f 100644 --- a/art/STYLE.md +++ b/art/STYLE.md @@ -13,6 +13,14 @@ A picture that is off-style goes back for another try. It is never shipped. > **The fox and the Phase 2–3 pictures** (F1–F4 in §0, §3a, the new rows in §2 and §4, review > points 8–9) were added later the same day and **approved by Mark** with one change: the fox's > coat is a deep red-orange, not the drafted muted russet. +> +> **Rewritten 2026-11-07, at Mark's request.** The first `rose-sheet` came back as wet, pale +> watercolour with a smiley face on a round ball inside the petals: a children's sticker sheet, +> and the opposite of S1. Mark did not like it. The choices S1–S5 stand; the words that carry +> them were too weak. §1 now leads with the look and says it positively, §3 puts the face *on* +> the petals, and §6 makes prompts short enough for a generator to follow. The book's motifs +> are no longer named in prompts (naming them invites them); they stay in §4 and §7, where the +> review catches them. The picture list grew to every picture Phases 1–5 need (§4). --- @@ -39,17 +47,21 @@ A picture that is off-style goes back for another try. It is never shipped. ## 1. The system prompt (paste word for word) -> Soft, hand-made 2D storybook illustration painted in matte gouache with a gentle dry-brush -> texture on warm off-white paper. Simple rounded shapes built from flat, soft colour areas with -> two or three gentle tonal steps; no wet watercolour blooms, no thin scratchy pen line. Outlines -> are soft, slightly irregular brush lines in deep plum-brown, never pure black, never a hard -> vector line. Light is low and warm, as late in the day, coming from the left. The mood is -> quiet, tender and hopeful, with generous calm space that never feels empty or bleak. -> Characters are cute but alive, with small gentle eyes, often half-closed, and tiny mouths. No -> text, letters or numbers anywhere in the image. No humans, no human figures, hands or faces, -> no photographs, no logos, no brand characters. No 3D render look, no glossy highlights, no lens -> effects, no gradients that look digital. Original artwork, not in the style of any existing -> book, illustrator or film. +> A hand-painted picture in opaque, matte gouache on warm off-white paper, for a quiet game made +> for grown-ups. Flat, chalky areas of colour with visible dry-brush strokes and the grain of the +> paper showing through; two or three soft tonal steps in each shape, no smooth blending. +> Every form is edged with a soft brush line in deep plum-brown that swells and thins, slightly +> uneven, as a painter's line does. Simple, confident shapes with a clear silhouette that still +> reads when the picture is small. Low, warm evening light from the left: each form has a warm +> lit side and a cooler, slightly violet shaded side. A restrained palette of dusty rose, sage, +> moss green, honey and warm umber; amber gold and coral appear only in evening light. The mood is +> calm, tender and quietly hopeful, with a little dry humour, like a page from a finely printed +> book for adults: understated, never sugary, never a children's sticker or a cute mascot. +> Characters are alive but small-featured: their faces are a few tiny marks painted directly on +> them, with eyes as small dark dots or crescents, often half-closed. No text, letters or numbers +> anywhere. No people, hands or human faces. Not watercolour: no wet washes, bleeding edges, blooms or +> pale tints. Not digital: no 3D rendering, gloss, airbrush gradients or lens effects. An +> original design, in the manner of no existing artist, book or film. --- @@ -94,10 +106,16 @@ The rose is the only character in Phase 1. Every rose picture follows the charac - **One garden rose** on a single slender stem. She is about three blooms tall, from the bloom down to where the stem meets the soil. She has three leaves, two low and one high, and a few small thorns with rounded tips. The thorns are part of her and never look threatening. -- **The bloom is her head.** It is made of soft, layered petals in rose (`#C85A6E`) that turn - pale petal (`#F2B5BE`) at the edges. Her face sits in the middle of the bloom: two small dark - eyes, often half-closed, and a tiny mouth. When she is tended, a faint blush (`#E8899B`) shows - on the petals by her cheeks. +- **The bloom is her head.** It is a real old garden rose: cupped, many-petalled, the outer + petals curling back, in rose (`#C85A6E`) turning pale petal (`#F2B5BE`) at the edges. It is + her head by its posture, not by a drawn-in head. +- **Her face is painted on the petals** at the heart of the bloom, where the inner petals fold + together: two tiny dark eyes (dots or crescents, often half-closed) and a short mouth curve, + the whole face no wider than a fifth of the bloom. **There is no round face, ball or bare + patch inside the petals**: the petals curl round the face as they would round the heart of a + real rose. When she is tended, a faint blush (`#E8899B`) warms the petals beside her eyes. +- **Proportions:** the bloom is about as wide as a third of her height; the stem is slender but + strong enough to hold it up proudly. - **A little vain.** She holds her head high and keeps her petals neat. Her leaves move like small arms: one raised when she speaks, both lowered when she is thirsty. - **Stages:** a tight bud, an opening bud, a half bloom and a full bloom. Each stage has the same @@ -106,7 +124,8 @@ The rose is the only character in Phase 1. Every rose picture follows the charac closed a little, eyes looking down. She is never wilted, broken, crying, dead or losing petals in pain. Fallen petals are a care task, not damage. - **Expressions:** content, sleepy, blushing, speaking, thirsty, too much water, windblown, - waiting. Never angry, crying hard, frightened or hurt. + waiting, tickled (a touch), and *gently* (a rush of touches: one leaf raised, calm, never + cross — thorns.md). Never angry, crying hard, frightened or hurt. --- @@ -157,6 +176,18 @@ The fox is the second character. Every fox picture follows the character sheet ` - **Paths and lanterns (Phase 3, F4):** a path through the meadow grows from paw prints, to a trodden trail, to a soft earth road edged with stones. A lantern is a small iron-and-glass hand lantern hanging from a shepherd's-crook post, never a street lamp. +- **The planets (Phase 2, drafts).** Each lonely grown-up has a small place of their own: a + grassy hilltop seen from the side, its edge dropping away below — never a ball or a sphere. + **The grown-up is never drawn**; the place shows who lives there, and the emptiness is the + point. The pictures are drafts until each planet's feature doc decides it. The sixth + grown-up's place is left out on purpose until its feature doc decides how it can be shown + gently. +- **Visitors and mementos (Phase 2):** small garden creatures that come by (a hedgehog, a robin + at dawn, a snail, a moth, a ladybird, a small owl) and the small things they leave. +- **The shared sky (Phase 4):** the sky is code; only small lights and the lamps of the + sunset wave are pictures. +- **The share frame (Phase 5):** a border of meadow round an empty middle where the player's + sky is drawn. - No flags, religious symbols, buildings, vehicles or people. --- @@ -185,15 +216,22 @@ of those sizes. The art board writes every prompt. Nobody types them by hand. Each prompt is §1, then: ``` -Asset: -Purpose: -Subject: -Setting / Canvas / Layout: -Size: -Must include: <…> -Must avoid: +Make: +Reference: (character pictures only) +Subject: +Setting / Layout: +Canvas: +Include: <…> +Avoid: +Board id: ``` +Why this shape (2026-11-07): generators follow the first lines and drift on the rest. So the +look comes first (§1), the picture second, and nothing a generator cannot use: no pixel +coordinates (the board's cutting overlay and `art:accept` keep those), and no long lists of +things not to draw. Naming a motif, even to forbid it, makes it likelier; the book's motifs are +therefore checked in review (§4, §7), not written into prompts. + `tools/art-prep` builds the prompts from `art/manifest.json` (`pnpm art:board`), and a test checks that each one starts with §1 word for word. @@ -204,7 +242,8 @@ checks that each one starts with §1 word for word. The board shows these under each card, and Claude's review checks them. Mark doesn't have to tick them: *Accept* is one tap. -0. It reads as one living garden rose with a soft face in her bloom: small eyes, a tiny mouth. +0. It reads as one living garden rose, her face a few tiny marks painted on her inner petals, + with no round ball face, and calm enough for grown-ups, not a sticker. 1. She matches `rose-sheet`: the same bloom, petal colours, three leaves and rounded thorns. 2. The colours stay within §2, with soft plum-brown outlines, in matte gouache, not wet watercolour. 3. Nothing from the book: no glass dome, screen, tiny planet, desert, child or scarf, and no diff --git a/tools/art-prep/src/prompt.ts b/tools/art-prep/src/prompt.ts index faa4bb3..bb98f44 100644 --- a/tools/art-prep/src/prompt.ts +++ b/tools/art-prep/src/prompt.ts @@ -58,62 +58,66 @@ export function soloCanvas(a: Asset): { width: number; height: number } { return { width: 1024, height: 1024 }; } -const KIND: Record = { - sheet: 'character sheet', - spritesheet: 'sprite sheet', - sprite: 'single picture', - layer: 'garden layer', - icon: 'app icon' +/** + * The first line after the style: what kind of image this is, in words a generator + * understands (STYLE.md §6). Generators follow the first lines best. + */ +const MAKE: Record, string> = { + sheet: 'a character reference sheet: the same character painted several times on plain paper, so that every later picture can match it.', + sprite: 'one small painted picture of a single thing, on a transparent background, to be placed into a game scene.', + layer: 'a tall painted scene for a phone screen, with transparent areas exactly where the setting says, because the sky is painted separately behind it.', + icon: 'an app icon: one bold, simple painted image filling a square, readable even when very small.' }; -const bg = (b: Asset['background']): string => (b === 'transparent' ? 'transparent background' : 'full background'); const list = (items: readonly string[]): string => items.join('; '); -/** Extra things a sprite sheet must never have, so it can be cut cleanly. */ -const SHEET_AVOID = [ - 'grid lines, cell borders or frames', - 'a background colour or paper behind the drawings', - 'ground or cast shadows', - 'drawings touching or overlapping', - 'cropped petals, leaves or stems' -]; +/** A sheet is cut apart, so its pictures must not touch. Everything else is said positively in the layout. */ +const SHEET_AVOID = ['pictures touching or overlapping', 'grid lines, frames or labels']; -/** The character the picture shows, with the sheet to attach, or the sheet's own description. */ -function subjectLine(a: Asset, m: Manifest, subject: string): string { - const c = a.character === undefined ? undefined : m.characters[a.character]; - if (!c) return subject; - if (c.sheet === a.id) return `${subject} ${c.description}`; - return `${subject} Attach the character sheet ${c.sheet} as the reference picture and match it exactly. ${c.description}`.trim(); +/** The character the picture shows, if any, and its name. */ +function characterOf(a: Asset, m: Manifest): { name: string; sheet: string; description: string } | null { + if (a.character === undefined) return null; + const c = m.characters[a.character]; + return c ? { name: a.character, ...c } : null; } /** The reference pictures to attach when making `a`. */ export function attachments(a: Asset, m: Manifest): string[] { - const c = a.character === undefined ? undefined : m.characters[a.character]; + const c = characterOf(a, m); return c && c.sheet !== a.id ? [c.sheet] : []; } -function canvasLine(width: number, height: number): string { - const mx = Math.round(width * 0.15), my = Math.round(height * 0.15); - return `Canvas: ${width} × ${height} px, fully transparent background. One subject, centred on (${width / 2}, ${height / 2}), whole and uncropped, filling about 70 % of the canvas: everything inside x ${mx}–${width - mx}, y ${my}–${height - my}, nothing touching an edge. No background colour or paper behind it, no ground, no cast shadow.`; +/** "Reference: …", for a picture of a character made after its sheet. */ +function referenceLines(a: Asset, m: Manifest): string[] { + const c = characterOf(a, m); + if (!c || c.sheet === a.id) return []; + return [`Reference: attach the image ${c.sheet}, the ${c.name}'s character sheet, and match it exactly: the same shapes, colours, proportions and face.`]; } +/** The subject, followed by the character's description when the picture shows one. */ +function subjectLine(a: Asset, m: Manifest, subject: string): string { + const c = characterOf(a, m); + return c ? `${subject} ${c.description}`.trim() : subject; +} + +function canvasLine(width: number, height: number, background: Asset['background'], single: boolean): string { + if (!single) return `Canvas: ${width} × ${height} px, ${background === 'transparent' ? 'transparent background' : 'painted to every edge'}.`; + return `Canvas: ${width} × ${height} px, transparent background. One subject, whole and centred, filling about 70 % of the canvas with clear space all round; no ground and no cast shadow.`; +} + +const board = (id: string): string => `Board id: ${id}`; + /** The prompt for one picture, or for a whole sprite sheet. */ export function promptFor(a: Asset, m: Manifest, style: string): string { if (a.type === 'spritesheet') return sheetPrompt(a, m, style); - const lines = [ - style, - '', - `Asset: ${a.id}`, - `Purpose: ${a.purpose}`, - `Subject: ${subjectLine(a, m, a.subject ?? '')}` - ]; + const lines = [style, '', `Make: ${MAKE[a.type]}`, ...referenceLines(a, m), `Subject: ${subjectLine(a, m, a.subject ?? '')}`]; if (a.setting) lines.push(`Setting: ${a.setting}`); - if (a.type === 'sprite') lines.push(canvasLine(a.width, a.height)); if (a.composition) lines.push(`Composition: ${a.composition}`); lines.push( - `Size: ${a.width} × ${a.height} px, ${bg(a.background)} (STYLE.md §5, ${KIND[a.type]})`, - `Must include: ${list(a.include)}`, - `Must avoid: ${list([...a.avoid, ...m.avoid])}` + canvasLine(a.width, a.height, a.background, a.type === 'sprite'), + `Include: ${list(a.include)}`, + `Avoid: ${list([...a.avoid, ...m.avoid])}`, + board(a.id) ); return lines.join('\n'); } @@ -121,44 +125,21 @@ export function promptFor(a: Asset, m: Manifest, style: string): string { function sheetPrompt(a: Asset, m: Manifest, style: string): string { const g = a.grid ?? { cols: 1, rows: 1 }; const cells = a.cells ?? []; - const { width: cw, height: ch } = cellSize(a); - const boxes = cellBoxes(a.width, a.height, g.cols, g.rows); - const margin = Math.round(SAFE_MARGIN * Math.min(cw, ch)); - const xs = cutLines(a.width, g.cols).slice(1, -1); - const ys = cutLines(a.height, g.rows).slice(1, -1); - const cuts = [ - xs.length ? `Cut lines down the image at x = ${xs.join(', ')}.` : '', - ys.length ? `Cut lines across the image at y = ${ys.join(', ')}.` : '' - ].filter(Boolean).join(' '); - + const many = (n: number, word: string): string => `${n} ${word}${n === 1 ? '' : 's'}`; return [ style, '', - `Asset: ${a.id}`, - `Kind: a sprite sheet. One image holding ${cells.length} separate pictures on a clean grid; it is cut apart along the grid and each cell becomes its own picture in the app. The sheet itself is never shown.`, - `Purpose: ${a.purpose}`, - `Subject: ${subjectLine(a, m, '') || 'Each cell holds its own thing, described in the cell list below.'}`, - `Angle and scale: ${a.angle ?? ''}`, - `Canvas: ${a.width} × ${a.height} px, transparent background: a size image generators offer, and the size the grid below is measured on. The app divides the image into ${g.cols} × ${g.rows} equal cells whatever its size.`, - `Layout: a clean grid of ${g.cols} column${g.cols === 1 ? '' : 's'} × ${g.rows} row${g.rows === 1 ? '' : 's'} of equal, invisible cells, each ${cw} × ${ch} px, read like a book (left to right, top row first). One subject per cell, centred in its cell, whole and uncropped, with generous empty gutters, so nothing touches the edge of its cell or reaches into a neighbour. No grid lines, borders, frames, numbers, labels or captions anywhere. Fully transparent background between and around the subjects: no paper colour, no ground, no cast shadows. The same light from the left, the same outline weight and the same gouache texture in every cell.`, - `Cells (${cells.length}, in reading order):`, - ...cells.map((c, i) => { - const b = boxes[i]; - return `${i + 1}. ${c.id} (row ${(b?.row ?? 0) + 1}, column ${(b?.col ?? 0) + 1}): ${c.does}`; - }), - `Grid in pixels:`, - `- ${cuts} The lines are never drawn: they are where the scissors go.`, - `- Each drawing stays whole inside its own safe box, at least ${margin} px clear of every edge of its cell, so a band of at least ${margin * 2} px of empty transparency runs along every cut line and round the outside. Nothing crosses a cut line: no petal, leaf, stem, shadow or sparkle.`, - ...cells.map((c, i) => { - const b = boxes[i]; - if (!b) return ''; - return `- Cell ${i + 1}, ${c.id}: starts at (${b.x0}, ${b.y0}), ends at (${b.x1}, ${b.y1}); centre the drawing on (${b.cx}, ${b.cy}); safe box x ${b.safe.x0}–${b.safe.x1}, y ${b.safe.y0}–${b.safe.y1}.`; - }).filter(Boolean), - `- One scale for the whole sheet: the largest drawing fills its safe box and every other cell is drawn at that same scale, centred on its cell's centre.`, - `- If the tool makes the image another size, keep the same ${g.cols} × ${g.rows} division into equal cells and scale every number above by the same factor.`, - `Size: generate at ${a.width} × ${a.height} px (see Canvas); each cell ships at up to ${cw} × ${ch} px, transparent (STYLE.md §5 and §9).`, - `Must include: ${list(a.include)}`, - `Must avoid: ${list([...a.avoid, ...SHEET_AVOID, ...m.avoid])}` + `Make: a sprite sheet: ${cells.length} separate painted pictures on one image, which will be cut apart so that each becomes its own picture in the game.`, + ...referenceLines(a, m), + `Subject: ${subjectLine(a, m, '') || 'each picture is its own thing, described in the list below.'}`, + `Drawn alike: ${a.angle ?? ''}`, + `Layout: ${many(g.cols, 'column')} × ${many(g.rows, 'row')} of equal, invisible cells, read left to right, top row first. One picture in the middle of each cell, all at one scale, each whole and uncropped, with wide empty gaps between them and round the edge, so they can be cut apart cleanly. The same light from the left and the same brush line in every picture.`, + `Canvas: ${a.width} × ${a.height} px, transparent between and round the pictures; no ground and no cast shadows.`, + 'Pictures:', + ...cells.map((c, i) => `${i + 1}. ${c.does}`), + `Include: ${list(a.include)}`, + `Avoid: ${list([...a.avoid, ...SHEET_AVOID, ...m.avoid])}`, + board(a.id) ].join('\n'); } @@ -168,14 +149,13 @@ export function cellPromptFor(a: Asset, cell: Cell, m: Manifest, style: string): return [ style, '', - `Asset: ${cell.id} (one picture of ${a.id}, made on its own)`, - 'Kind: a single picture on a transparent background; it becomes one picture in the app.', - `Purpose: ${a.purpose}`, - `Subject: ${subjectLine(a, m, '') || 'Each cell holds its own thing, described in the cell list below.'}`, - `Angle and scale: ${a.angle ?? ''}`, - `This picture: ${cell.does}`, - canvasLine(width, height), - `Must include: ${list(a.include)}`, - `Must avoid: ${list([...a.avoid, ...m.avoid])}` + `Make: ${MAKE.sprite}`, + ...referenceLines(a, m), + `Subject: ${subjectLine(a, m, cell.does)}`, + `Drawn alike: ${a.angle ?? ''}`, + canvasLine(width, height, 'transparent', true), + `Include: ${list(a.include)}`, + `Avoid: ${list([...a.avoid, ...m.avoid])}`, + board(`${cell.id} (one picture of ${a.id})`) ].join('\n'); } diff --git a/tools/art-prep/test/prompt.test.ts b/tools/art-prep/test/prompt.test.ts index c68a922..1702853 100644 --- a/tools/art-prep/test/prompt.test.ts +++ b/tools/art-prep/test/prompt.test.ts @@ -11,10 +11,16 @@ const allPrompts = data.assets.flatMap((a) => [a.prompt, ...(a.cells ?? []).map( describe('STYLE.md', () => { it('§1 is the quoted system prompt, line breaks kept and the markers gone', () => { - expect(style.startsWith('Soft, hand-made 2D storybook illustration painted in matte gouache')).toBe(true); + expect(style.startsWith('A hand-painted picture in opaque, matte gouache on warm off-white paper')).toBe(true); expect(style).toContain('\n'); expect(style).not.toMatch(/^>/m); - expect(style.endsWith('book, illustrator or film.')).toBe(true); + expect(style.endsWith('in the manner of no existing artist, book or film.')).toBe(true); + }); + + it('§1 says the look positively and asks for grown-ups, not a sticker (the 2026-11-07 rewrite)', () => { + for (const words of ['dry-brush', 'paper showing through', 'plum-brown', 'from the left', 'for grown-ups', 'never a children\'s sticker', 'painted directly on them', 'Not watercolour']) { + expect(style.replace(/\n/g, ' ')).toContain(words); + } }); it('§7 has the ten review points, a point split over two lines read as one', () => { @@ -31,13 +37,28 @@ describe('STYLE.md', () => { }); describe('the prompts', () => { - it('every one starts with STYLE.md §1 word for word: 18 cards and 45 one-at-a-time prompts', () => { - expect(allPrompts).toHaveLength(18 + 45); - for (const p of allPrompts) expect(p.startsWith(style + '\n\nAsset: ')).toBe(true); + it('every one starts with STYLE.md §1 word for word, then says what to make: 35 cards and 66 one-at-a-time prompts', () => { + expect(allPrompts).toHaveLength(35 + 66); + for (const p of allPrompts) expect(p.startsWith(style + '\n\nMake: ')).toBe(true); }); - it('every one carries the shared avoid list, so the likeness guard is never left out', () => { - for (const p of allPrompts) expect(p).toMatch(/Must avoid: .*a glass dome or bell jar; a folding screen; a tiny round planet/); + it('every one ends with the shared avoid list and its board id', () => { + const shared = readManifest().avoid.join('; '); + for (const a of data.assets) { + expect(a.prompt).toContain(shared); + expect(a.prompt.endsWith(`\nBoard id: ${a.id}`)).toBe(true); + for (const c of a.cells ?? []) expect(c.prompt.endsWith(`\nBoard id: ${c.id} (one picture of ${a.id})`)).toBe(true); + } + }); + + it("never names the book's motifs, even to forbid them: naming one invites it; review checks them instead", () => { + const motifs = /glass dome|bell jar|folding screen|tiny round planet|scarf|desert|golden hair|wheat/i; + for (const p of allPrompts) expect(p).not.toMatch(motifs); + expect(data.checklist[3]).toMatch(/glass dome, screen, tiny planet, desert, child or scarf/); + }); + + it('carries no pixel coordinates a generator cannot use; the grid is said in words', () => { + for (const p of allPrompts) expect(p).not.toMatch(/starts at \(|safe box|Cut lines|centre the drawing on/); }); it('none names the book, Tolkien, or a medical or unnamed word', () => { @@ -47,26 +68,35 @@ describe('the prompts', () => { it('a rose picture asks for the rose sheet as its reference; the sheet itself does not', () => { const by = new Map(data.assets.map((a) => [a.id, a])); expect(by.get('rose-sheet')?.attach).toEqual([]); - expect(by.get('rose-sheet')?.prompt).not.toContain('Attach the character sheet'); - for (const id of ['rose-stages-sheet', 'rose-care-sheet', 'rose-moments-sheet', 'app-icon']) { + expect(by.get('rose-sheet')?.prompt).not.toContain('Reference:'); + for (const id of ['rose-stages-sheet', 'rose-care-sheet', 'rose-moments-sheet', 'rose-touch-sheet', 'app-icon', 'app-icon-maskable']) { expect(by.get(id)?.attach).toEqual(['rose-sheet']); - expect(by.get(id)?.prompt).toContain('Attach the character sheet rose-sheet as the reference picture'); + expect(by.get(id)?.prompt).toContain('Reference: attach the image rose-sheet'); + } + for (const id of ['care-props-sheet', 'favicon-mark', 'letter-header']) expect(by.get(id)?.attach).toEqual([]); + }); + + it('every rose prompt puts her face on the petals, never on a round head', () => { + for (const a of data.assets.filter((x) => x.attach.includes('rose-sheet') || x.id === 'rose-sheet')) { + for (const p of [a.prompt, ...(a.cells ?? []).map((c) => c.prompt)]) { + expect(p).toContain('Her face is painted directly on the inner petals'); + expect(p).toContain('There is no round face, ball or bare patch inside the petals'); + } } - expect(by.get('care-props-sheet')?.attach).toEqual([]); }); it('a fox picture asks for the fox sheet, never the rose sheet, and every one-at-a-time fox prompt does too', () => { const by = new Map(data.assets.map((a) => [a.id, a])); expect(by.get('fox-sheet')?.attach).toEqual([]); - for (const id of ['fox-trust-sheet', 'fox-moments-sheet']) { + for (const id of ['fox-trust-sheet', 'fox-moments-sheet', 'foxes-meeting']) { const a = by.get(id); expect(a?.attach).toEqual(['fox-sheet']); for (const p of [a?.prompt ?? '', ...(a?.cells ?? []).map((c) => c.prompt)]) { - expect(p).toContain('Attach the character sheet fox-sheet as the reference picture'); + expect(p).toContain('Reference: attach the image fox-sheet'); expect(p).not.toContain('rose-sheet'); } } - for (const id of ['berries-sheet', 'berry-bush-sheet', 'paths-sheet', 'lanterns-sheet']) expect(by.get(id)?.attach).toEqual([]); + for (const id of ['berries-sheet', 'berry-bush-sheet', 'paths-sheet', 'lanterns-sheet', 'visitors-sheet', 'planet-king']) expect(by.get(id)?.attach).toEqual([]); }); it('a manifest with a forbidden name never reaches the board', () => { @@ -91,13 +121,12 @@ describe('the grid', () => { } }); - it("a sheet's prompt gives each cell the numbers cellBoxes computes", () => { + it("a sheet's prompt says its grid in words and lists its pictures in reading order", () => { const props = data.assets.find((a) => a.id === 'care-props-sheet'); - expect(props?.prompt).toContain('Cut lines down the image at x = 512, 1024. Cut lines across the image at y = 512.'); - expect(props?.prompt).toContain('- Cell 5, petal-folded: starts at (512, 512), ends at (1024, 1024); centre the drawing on (768, 768); safe box x 573–963, y 573–963.'); + expect(props?.prompt).toContain('Layout: 3 columns × 2 rows of equal, invisible cells, read left to right, top row first.'); + expect(props?.prompt).toContain('\n5. one large rose petal folded over itself'); const stages = data.assets.find((a) => a.id === 'rose-stages-sheet'); - expect(stages?.prompt).toContain('each 384 × 1024 px'); - expect(stages?.prompt).not.toContain('Cut lines across'); + expect(stages?.prompt).toContain('Layout: 4 columns × 1 row of equal'); }); it('a tall cell made on its own is made on the tall canvas, a square one on the square', () => { @@ -105,7 +134,7 @@ describe('the grid', () => { expect(soloCanvas(m.assets.find((a) => a.id === 'rose-stages-sheet')!)).toEqual({ width: 1024, height: 1536 }); expect(soloCanvas(m.assets.find((a) => a.id === 'care-props-sheet')!)).toEqual({ width: 1024, height: 1024 }); const bud = data.assets.find((a) => a.id === 'rose-stages-sheet')?.cells?.[0]; - expect(bud?.prompt).toContain('Canvas: 1024 × 1536 px, fully transparent background. One subject, centred on (512, 768)'); - expect(bud?.prompt).toContain('This picture: a tight bud'); + expect(bud?.prompt).toContain('Canvas: 1024 × 1536 px, transparent background. One subject, whole and centred'); + expect(bud?.prompt).toContain('Subject: a tight bud'); }); });