[art] BoardV2: Prompts lead with the look, say the grid in words, and stop naming the book's motifs
This commit is contained in:
+63
-24
@@ -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
|
> **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
|
> 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.
|
> 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)
|
## 1. The system prompt (paste word for word)
|
||||||
|
|
||||||
> Soft, hand-made 2D storybook illustration painted in matte gouache with a gentle dry-brush
|
> A hand-painted picture in opaque, matte gouache on warm off-white paper, for a quiet game made
|
||||||
> texture on warm off-white paper. Simple rounded shapes built from flat, soft colour areas with
|
> for grown-ups. Flat, chalky areas of colour with visible dry-brush strokes and the grain of the
|
||||||
> two or three gentle tonal steps; no wet watercolour blooms, no thin scratchy pen line. Outlines
|
> paper showing through; two or three soft tonal steps in each shape, no smooth blending.
|
||||||
> are soft, slightly irregular brush lines in deep plum-brown, never pure black, never a hard
|
> Every form is edged with a soft brush line in deep plum-brown that swells and thins, slightly
|
||||||
> vector line. Light is low and warm, as late in the day, coming from the left. The mood is
|
> uneven, as a painter's line does. Simple, confident shapes with a clear silhouette that still
|
||||||
> quiet, tender and hopeful, with generous calm space that never feels empty or bleak.
|
> reads when the picture is small. Low, warm evening light from the left: each form has a warm
|
||||||
> Characters are cute but alive, with small gentle eyes, often half-closed, and tiny mouths. No
|
> lit side and a cooler, slightly violet shaded side. A restrained palette of dusty rose, sage,
|
||||||
> text, letters or numbers anywhere in the image. No humans, no human figures, hands or faces,
|
> moss green, honey and warm umber; amber gold and coral appear only in evening light. The mood is
|
||||||
> no photographs, no logos, no brand characters. No 3D render look, no glossy highlights, no lens
|
> calm, tender and quietly hopeful, with a little dry humour, like a page from a finely printed
|
||||||
> effects, no gradients that look digital. Original artwork, not in the style of any existing
|
> book for adults: understated, never sugary, never a children's sticker or a cute mascot.
|
||||||
> book, illustrator or film.
|
> 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
|
- **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
|
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.
|
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
|
- **The bloom is her head.** It is a real old garden rose: cupped, many-petalled, the outer
|
||||||
pale petal (`#F2B5BE`) at the edges. Her face sits in the middle of the bloom: two small dark
|
petals curling back, in rose (`#C85A6E`) turning pale petal (`#F2B5BE`) at the edges. It is
|
||||||
eyes, often half-closed, and a tiny mouth. When she is tended, a faint blush (`#E8899B`) shows
|
her head by its posture, not by a drawn-in head.
|
||||||
on the petals by her cheeks.
|
- **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
|
- **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.
|
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
|
- **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
|
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.
|
petals in pain. Fallen petals are a care task, not damage.
|
||||||
- **Expressions:** content, sleepy, blushing, speaking, thirsty, too much water, windblown,
|
- **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
|
- **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
|
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.
|
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.
|
- 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:
|
The art board writes every prompt. Nobody types them by hand. Each prompt is §1, then:
|
||||||
|
|
||||||
```
|
```
|
||||||
Asset: <id>
|
Make: <what kind of image, in one plain sentence>
|
||||||
Purpose: <where it appears and what it must say, in one sentence>
|
Reference: <the character sheet to attach, and to match exactly> (character pictures only)
|
||||||
Subject: <who or what, with the character sheet to attach>
|
Subject: <who or what, and the character's look>
|
||||||
Setting / Canvas / Layout: <by kind: see §5 and §9>
|
Setting / Layout: <the scene, or the grid in words: columns, rows, gaps>
|
||||||
Size: <made at W × H px, background>
|
Canvas: <W × H px, background>
|
||||||
Must include: <…>
|
Include: <…>
|
||||||
Must avoid: <the picture's own list, then the list every picture shares (§4)>
|
Avoid: <a short list: the picture's own, then the few every picture shares>
|
||||||
|
Board id: <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
|
`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.
|
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
|
The board shows these under each card, and Claude's review checks them. Mark doesn't have to
|
||||||
tick them: *Accept* is one tap.
|
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.
|
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.
|
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
|
3. Nothing from the book: no glass dome, screen, tiny planet, desert, child or scarf, and no
|
||||||
|
|||||||
@@ -58,62 +58,66 @@ export function soloCanvas(a: Asset): { width: number; height: number } {
|
|||||||
return { width: 1024, height: 1024 };
|
return { width: 1024, height: 1024 };
|
||||||
}
|
}
|
||||||
|
|
||||||
const KIND: Record<Asset['type'], string> = {
|
/**
|
||||||
sheet: 'character sheet',
|
* The first line after the style: what kind of image this is, in words a generator
|
||||||
spritesheet: 'sprite sheet',
|
* understands (STYLE.md §6). Generators follow the first lines best.
|
||||||
sprite: 'single picture',
|
*/
|
||||||
layer: 'garden layer',
|
const MAKE: Record<Exclude<Asset['type'], 'spritesheet'>, string> = {
|
||||||
icon: 'app icon'
|
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('; ');
|
const list = (items: readonly string[]): string => items.join('; ');
|
||||||
|
|
||||||
/** Extra things a sprite sheet must never have, so it can be cut cleanly. */
|
/** A sheet is cut apart, so its pictures must not touch. Everything else is said positively in the layout. */
|
||||||
const SHEET_AVOID = [
|
const SHEET_AVOID = ['pictures touching or overlapping', 'grid lines, frames or labels'];
|
||||||
'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'
|
|
||||||
];
|
|
||||||
|
|
||||||
/** The character the picture shows, with the sheet to attach, or the sheet's own description. */
|
/** The character the picture shows, if any, and its name. */
|
||||||
function subjectLine(a: Asset, m: Manifest, subject: string): string {
|
function characterOf(a: Asset, m: Manifest): { name: string; sheet: string; description: string } | null {
|
||||||
const c = a.character === undefined ? undefined : m.characters[a.character];
|
if (a.character === undefined) return null;
|
||||||
if (!c) return subject;
|
const c = m.characters[a.character];
|
||||||
if (c.sheet === a.id) return `${subject} ${c.description}`;
|
return c ? { name: a.character, ...c } : null;
|
||||||
return `${subject} Attach the character sheet ${c.sheet} as the reference picture and match it exactly. ${c.description}`.trim();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** The reference pictures to attach when making `a`. */
|
/** The reference pictures to attach when making `a`. */
|
||||||
export function attachments(a: Asset, m: Manifest): string[] {
|
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] : [];
|
return c && c.sheet !== a.id ? [c.sheet] : [];
|
||||||
}
|
}
|
||||||
|
|
||||||
function canvasLine(width: number, height: number): string {
|
/** "Reference: …", for a picture of a character made after its sheet. */
|
||||||
const mx = Math.round(width * 0.15), my = Math.round(height * 0.15);
|
function referenceLines(a: Asset, m: Manifest): string[] {
|
||||||
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.`;
|
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. */
|
/** The prompt for one picture, or for a whole sprite sheet. */
|
||||||
export function promptFor(a: Asset, m: Manifest, style: string): string {
|
export function promptFor(a: Asset, m: Manifest, style: string): string {
|
||||||
if (a.type === 'spritesheet') return sheetPrompt(a, m, style);
|
if (a.type === 'spritesheet') return sheetPrompt(a, m, style);
|
||||||
const lines = [
|
const lines = [style, '', `Make: ${MAKE[a.type]}`, ...referenceLines(a, m), `Subject: ${subjectLine(a, m, a.subject ?? '')}`];
|
||||||
style,
|
|
||||||
'',
|
|
||||||
`Asset: ${a.id}`,
|
|
||||||
`Purpose: ${a.purpose}`,
|
|
||||||
`Subject: ${subjectLine(a, m, a.subject ?? '')}`
|
|
||||||
];
|
|
||||||
if (a.setting) lines.push(`Setting: ${a.setting}`);
|
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}`);
|
if (a.composition) lines.push(`Composition: ${a.composition}`);
|
||||||
lines.push(
|
lines.push(
|
||||||
`Size: ${a.width} × ${a.height} px, ${bg(a.background)} (STYLE.md §5, ${KIND[a.type]})`,
|
canvasLine(a.width, a.height, a.background, a.type === 'sprite'),
|
||||||
`Must include: ${list(a.include)}`,
|
`Include: ${list(a.include)}`,
|
||||||
`Must avoid: ${list([...a.avoid, ...m.avoid])}`
|
`Avoid: ${list([...a.avoid, ...m.avoid])}`,
|
||||||
|
board(a.id)
|
||||||
);
|
);
|
||||||
return lines.join('\n');
|
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 {
|
function sheetPrompt(a: Asset, m: Manifest, style: string): string {
|
||||||
const g = a.grid ?? { cols: 1, rows: 1 };
|
const g = a.grid ?? { cols: 1, rows: 1 };
|
||||||
const cells = a.cells ?? [];
|
const cells = a.cells ?? [];
|
||||||
const { width: cw, height: ch } = cellSize(a);
|
const many = (n: number, word: string): string => `${n} ${word}${n === 1 ? '' : 's'}`;
|
||||||
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(' ');
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
style,
|
style,
|
||||||
'',
|
'',
|
||||||
`Asset: ${a.id}`,
|
`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.`,
|
||||||
`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.`,
|
...referenceLines(a, m),
|
||||||
`Purpose: ${a.purpose}`,
|
`Subject: ${subjectLine(a, m, '') || 'each picture is its own thing, described in the list below.'}`,
|
||||||
`Subject: ${subjectLine(a, m, '') || 'Each cell holds its own thing, described in the cell list below.'}`,
|
`Drawn alike: ${a.angle ?? ''}`,
|
||||||
`Angle and scale: ${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 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.`,
|
`Canvas: ${a.width} × ${a.height} px, transparent between and round the pictures; no ground and no cast shadows.`,
|
||||||
`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.`,
|
'Pictures:',
|
||||||
`Cells (${cells.length}, in reading order):`,
|
...cells.map((c, i) => `${i + 1}. ${c.does}`),
|
||||||
...cells.map((c, i) => {
|
`Include: ${list(a.include)}`,
|
||||||
const b = boxes[i];
|
`Avoid: ${list([...a.avoid, ...SHEET_AVOID, ...m.avoid])}`,
|
||||||
return `${i + 1}. ${c.id} (row ${(b?.row ?? 0) + 1}, column ${(b?.col ?? 0) + 1}): ${c.does}`;
|
board(a.id)
|
||||||
}),
|
|
||||||
`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])}`
|
|
||||||
].join('\n');
|
].join('\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -168,14 +149,13 @@ export function cellPromptFor(a: Asset, cell: Cell, m: Manifest, style: string):
|
|||||||
return [
|
return [
|
||||||
style,
|
style,
|
||||||
'',
|
'',
|
||||||
`Asset: ${cell.id} (one picture of ${a.id}, made on its own)`,
|
`Make: ${MAKE.sprite}`,
|
||||||
'Kind: a single picture on a transparent background; it becomes one picture in the app.',
|
...referenceLines(a, m),
|
||||||
`Purpose: ${a.purpose}`,
|
`Subject: ${subjectLine(a, m, cell.does)}`,
|
||||||
`Subject: ${subjectLine(a, m, '') || 'Each cell holds its own thing, described in the cell list below.'}`,
|
`Drawn alike: ${a.angle ?? ''}`,
|
||||||
`Angle and scale: ${a.angle ?? ''}`,
|
canvasLine(width, height, 'transparent', true),
|
||||||
`This picture: ${cell.does}`,
|
`Include: ${list(a.include)}`,
|
||||||
canvasLine(width, height),
|
`Avoid: ${list([...a.avoid, ...m.avoid])}`,
|
||||||
`Must include: ${list(a.include)}`,
|
board(`${cell.id} (one picture of ${a.id})`)
|
||||||
`Must avoid: ${list([...a.avoid, ...m.avoid])}`
|
|
||||||
].join('\n');
|
].join('\n');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,10 +11,16 @@ const allPrompts = data.assets.flatMap((a) => [a.prompt, ...(a.cells ?? []).map(
|
|||||||
|
|
||||||
describe('STYLE.md', () => {
|
describe('STYLE.md', () => {
|
||||||
it('§1 is the quoted system prompt, line breaks kept and the markers gone', () => {
|
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).toContain('\n');
|
||||||
expect(style).not.toMatch(/^>/m);
|
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', () => {
|
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', () => {
|
describe('the prompts', () => {
|
||||||
it('every one starts with STYLE.md §1 word for word: 18 cards and 45 one-at-a-time prompts', () => {
|
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(18 + 45);
|
expect(allPrompts).toHaveLength(35 + 66);
|
||||||
for (const p of allPrompts) expect(p.startsWith(style + '\n\nAsset: ')).toBe(true);
|
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', () => {
|
it('every one ends with the shared avoid list and its board id', () => {
|
||||||
for (const p of allPrompts) expect(p).toMatch(/Must avoid: .*a glass dome or bell jar; a folding screen; a tiny round planet/);
|
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', () => {
|
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', () => {
|
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]));
|
const by = new Map(data.assets.map((a) => [a.id, a]));
|
||||||
expect(by.get('rose-sheet')?.attach).toEqual([]);
|
expect(by.get('rose-sheet')?.attach).toEqual([]);
|
||||||
expect(by.get('rose-sheet')?.prompt).not.toContain('Attach the character sheet');
|
expect(by.get('rose-sheet')?.prompt).not.toContain('Reference:');
|
||||||
for (const id of ['rose-stages-sheet', 'rose-care-sheet', 'rose-moments-sheet', 'app-icon']) {
|
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)?.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', () => {
|
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]));
|
const by = new Map(data.assets.map((a) => [a.id, a]));
|
||||||
expect(by.get('fox-sheet')?.attach).toEqual([]);
|
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);
|
const a = by.get(id);
|
||||||
expect(a?.attach).toEqual(['fox-sheet']);
|
expect(a?.attach).toEqual(['fox-sheet']);
|
||||||
for (const p of [a?.prompt ?? '', ...(a?.cells ?? []).map((c) => c.prompt)]) {
|
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');
|
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', () => {
|
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');
|
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('Layout: 3 columns × 2 rows of equal, invisible cells, read left to right, top row first.');
|
||||||
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('\n5. one large rose petal folded over itself');
|
||||||
const stages = data.assets.find((a) => a.id === 'rose-stages-sheet');
|
const stages = data.assets.find((a) => a.id === 'rose-stages-sheet');
|
||||||
expect(stages?.prompt).toContain('each 384 × 1024 px');
|
expect(stages?.prompt).toContain('Layout: 4 columns × 1 row of equal');
|
||||||
expect(stages?.prompt).not.toContain('Cut lines across');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('a tall cell made on its own is made on the tall canvas, a square one on the square', () => {
|
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 === 'rose-stages-sheet')!)).toEqual({ width: 1024, height: 1536 });
|
||||||
expect(soloCanvas(m.assets.find((a) => a.id === 'care-props-sheet')!)).toEqual({ width: 1024, height: 1024 });
|
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];
|
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('Canvas: 1024 × 1536 px, transparent background. One subject, whole and centred');
|
||||||
expect(bud?.prompt).toContain('This picture: a tight bud');
|
expect(bud?.prompt).toContain('Subject: a tight bud');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user