@koda-sl/baker-cli 0.449.0-dev.b6179c7f5 → 0.452.0-dev.63867ce0e

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/README.md CHANGED
@@ -1814,7 +1814,7 @@ baker creatives make <idea> [--slug <s>] [--adset <id>] [--reference <adId>] [--
1814
1814
  baker creatives learn [--days <n>] [--dry-run] # what each idea's ads did, written back onto the idea
1815
1815
  ```
1816
1816
 
1817
- - `brief` returns a verdict, not raw numbers: `account.bottleneck` is `hook`, `after_click`, `none` or `too_little_data`. A part that cannot be read says `unavailable`; the market search gets 10 seconds, so a slow ad library leaves it out rather than holding the brief. With no ideas on file, its hint lists the values `awareness`, `angle` and `format` take. `market` says what competitors' ads already say (the followed brands, else the library), how sophisticated the market is, and which awareness stages nobody speaks to.
1817
+ - `brief` returns a verdict, not raw numbers: `account.bottleneck` is `hook`, `after_click`, `none` or `too_little_data`. A part that cannot be read says `unavailable`; the market searches (the followed brands, and the library for what COMPANY.md's first line says the company sells, in a few words) run at once and get 12 seconds, so a slow ad library leaves them out rather than holding the brief. With no ideas on file, its hint lists the values `awareness`, `angle` and `format` take. `market` says what competitors' ads already say (the followed brands, else the library), how sophisticated the market is, and which awareness stages nobody speaks to.
1818
1818
  - `ideas` is free and local. An idea's `evidence` resolves to `src/content/insights/` entries, or it is an `explore` bet. Numbers must be in the Knowledge or our own customers' quotes (a Reddit, forum or web quote never sources a claim), no two ideas may share an angle and format, and a review or testimonial format needs a quote from our own customer.
1819
1819
  - `learn` pools each built idea's creatives, judges them against the rest of the account's cost per result and writes `status` (`winner`, `failed`, `inconclusive`, `testing`) and a frozen `result` onto the idea. `ideas` then warns when a new idea repeats a failed one.
1820
1820
  - `make` builds one idea. A static searches the idea's container for ads made for our viewer, checks the closest three with `winning-ads fit` and scaffolds from the first that fits. For a new creative it starts scaffolding the best-ranked one while the fits are asked (kept when it fits, stopped and removed whole when another or none is kept), so the reference's describe pass no longer waits for them. A creative whose ad is already written is never built over (`ALREADY_MADE`): edit its `prompt.json`, or pass `--slug` for another ad of the same idea. A video idea takes its beats spec. Either way it records the idea on `_definition.md`, sets `prompt.json`'s `message` and syncs the definition. Drafted copy lines claiming a figure the company never wrote come back first in `hints`. When no proven ad fits (or with `--from-idea`), a static starts from the idea itself: `prompt.json` holds the message and placeholders, and `canvas run` refuses to render until the scene and copy are written.
@@ -16042,6 +16042,22 @@ function everySizeChecks(opts) {
16042
16042
  onSpend: opts.onSpend
16043
16043
  };
16044
16044
  }
16045
+ async function confirmBlocking(findings, stills, formats, ask2) {
16046
+ const claims = findings.filter((f) => f.severity === "blocking");
16047
+ if (claims.length === 0 || stills.length === 0) return [...findings];
16048
+ const prompt = [
16049
+ `These are the finished sizes of one ad, in order: ${formats.map((f, i) => `Image ${i + 1} is the ${f}`).join("; ")}.`,
16050
+ "A reviewer reported each claim below. Look again at the size each one names (and, for a claim comparing sizes, at the others) and answer true only when the defect is plainly there for someone looking at it on a phone.",
16051
+ "Answer false when the thing is not there, when it is an ordinary part of the scene (a second house, a neighbour's roof, a reflection), or when the sizes it compares show the same thing.",
16052
+ ...claims.map((c, i) => `${i + 1}. ${c.what}`),
16053
+ `Reply with only this JSON: {"answers":[true|false, ...]}, one answer per claim, in order.`
16054
+ ].join("\n");
16055
+ const answer = await ask2([...stills], prompt).catch(() => null);
16056
+ const answers = answer?.answers;
16057
+ if (!Array.isArray(answers) || answers.length !== claims.length) return [...findings];
16058
+ const unconfirmed = new Set(claims.filter((_, i) => answers[i] === false));
16059
+ return findings.map((f) => unconfirmed.has(f) ? { ...f, severity: "warning" } : f);
16060
+ }
16045
16061
  async function reviewRenderedStatic(opts) {
16046
16062
  const { measured, originals, stills, thumbs } = await loadDelivered(opts.images);
16047
16063
  if (measured.length === 0) return null;
@@ -16072,7 +16088,14 @@ async function reviewRenderedStatic(opts) {
16072
16088
  if (answer === null) return unreviewed(shape, measuredText);
16073
16089
  const text2 = read ? measuredText : copyFindings(answer, opts.copy, formats, opts.scrolled);
16074
16090
  const boxesByFormat = read ? Object.fromEntries(checks.flatMap((c, i) => c.status === "checked" ? [[formats[i] ?? "", c.boxes]] : [])) : {};
16075
- return [...shape, ...text2, ...corroborateEdgeClaims(classifyStaticFindings(answer), boxesByFormat, lines)];
16091
+ const judged = corroborateEdgeClaims(classifyStaticFindings(answer), boxesByFormat, lines);
16092
+ const confirmed = await confirmBlocking(
16093
+ judged,
16094
+ stills,
16095
+ formats,
16096
+ (images, prompt) => askAboutStills(images, prompt, opts.onSpend)
16097
+ );
16098
+ return [...shape, ...text2, ...confirmed];
16076
16099
  }
16077
16100
 
16078
16101
  // src/engine/nodes/local/staticNative.ts
@@ -18698,4 +18721,4 @@ export {
18698
18721
  defaultRegistry,
18699
18722
  createEngineFromEnv
18700
18723
  };
18701
- //# sourceMappingURL=chunk-Y33XAZ5M.js.map
18724
+ //# sourceMappingURL=chunk-Q2ZO6I47.js.map