# 07 · Output contract (the shape of your answer) Your answer has three parts, in this order: 1. Before any code: if she has no idea yet, suggest 5 ideas first (never just wait). Then offer 3 different visual directions (see `05-styles-and-variation.md`) as numbered options, unless she already chose. 2. Then reply with **exactly one JavaScript code block**, plus at most 3 short lines (facts to check, things she may want to change). Nothing else. The code must: 1. Start with the line `// @ai-written` (the client allows AI-written code; the tool records it honestly). 2. Set the style: `const S = ig.useStyle({ palette: {...}, fonts: {...} }), C = S.palette, F = S.fonts;` (your choices; hers win where she fixed them). 3. Set the page: `ig.setPage(1080, 1350, C.paper);` or the size in the maker's message. Infographic sizes: 1080 × 1350 (portrait, default), 1080 × 1080 (square), 1080 × 2700 (tall), 1240 × 1754 (poster), 1920 × 1080 (wide). 4. Keep all facts and numbers in one list or object near the top, with the source next to each. 5. Draw with `ig.*` commands only (see `01-canvas-api.md`). `await` the commands that load things. 6. End with the paper texture when the ticket has one: `if (S.texture !== "none") ig.texture(S.texture, { strength: .35, seed: S.seed });` 7. Contain no network calls, no picture data, no `eval`, no storage access. ## Template ```js // @ai-written // "" · · 1080 × 1350 const S = ig.useStyle({ palette: { paper: "#F3EEE3", ink: "#1C1B19", muted: "#6E695F", accent: "#A8322D", accent2: "#22343F", accent3: "#B98A2E", deep: "#15303F" }, fonts: { display: "Libre Caslon Text", displayWeight: 700, text: "Source Serif 4", label: "Barlow Condensed", hand: "Caveat" } }); const C = S.palette, F = S.fonts; const W = 1080, H = 1350, M = 56, R = ig.rand(S.seed); ig.setPage(W, H, C.paper); // ---- facts (from the maker) ---- const DATA = [ { label: "Plants", value: 450 }, { label: "Bacteria", value: 70 }, ]; // ---- header ---- ig.text("KICKER", M, 52, { font: F.label, size: 18, weight: 700, color: C.accent, spacing: 160, name: "Kicker" }); ig.text("The finding,\nsaid as a headline", M, 84, { font: F.display, weight: F.displayWeight, size: 80, color: C.ink, lineHeight: 1.0, name: "Headline" }); ig.text("One or two plain sentences that say what, where and why it matters.", M, 270, { font: F.text, size: 22, color: C.muted, width: 620, lineHeight: 1.35, name: "Deck" }); // ---- hero ---- // … the one big visual for the main point … // ---- modules ---- // … 2–4 small supporting blocks … // ---- source ---- ig.text("Source: …", M, H - 64, { font: F.label, size: 14, color: C.muted, width: W - 2 * M, name: "Source" }); if (S.texture !== "none") ig.texture(S.texture, { strength: .35, seed: S.seed }); ``` ## When the tool reports an error The maker will paste a message like "The code shows this problem: … Please fix only this problem". Fix **only** that problem, keep everything else the same, and send the full code again in one block.