wand-decks-kit 0.8.3 → 0.8.6

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/PROMPT.md CHANGED
@@ -421,13 +421,15 @@ DejaVu Sans / Carlito / Liberation Sans, never Geist. Consequences:
421
421
  **Garbled digits in exported PDFs.** The reference PDFs show `$ǿǹT+` where the deck says `$60T+`.
422
422
  Cause: Google Slides subsets the embedded Geist and writes a `ToUnicode` map offset by +457, so
423
423
  digits decode to Latin Extended-B in the PDF text layer. **The `.pptx` is correct — do not "fix"
424
- these strings.** Our LibreOffice export is clean. To confirm any deck you ship:
424
+ these strings.** Our own export is clean, and `wand.js ship` confirms it on every run —
425
+ the `text layer` line and the `pdf text` gate. To check a PDF by hand, use the portable
426
+ form (sandbox grep has no `-P`, so the old `grep -P` command errors there):
425
427
 
426
428
  ```bash
427
- pdftotext output.pdf - | grep -P '[\x{01C9}-\x{0250}]'
429
+ python3 -c "import subprocess;t=subprocess.run(['pdftotext','output.pdf','-'],capture_output=True,text=True).stdout;print([c for c in t if 0x01C9<=ord(c)<=0x024F] or 'clean')"
428
430
  ```
429
431
 
430
- Empty output is a pass. Hits mean subsetted fonts got in — set `saveSubsetFonts="0"` and re-embed.
432
+ `clean` is a pass. Listed characters mean subsetted fonts got in — set `saveSubsetFonts="0"` and re-embed.
431
433
 
432
434
  **Other:** the reference decks use `roundRect` with per-shape `adj`, so copying a card and resizing
433
435
  it changes its corner radius — recompute. Icon glyphs are separate PNGs layered over tile shapes;
package/SKILL.md CHANGED
@@ -99,6 +99,20 @@ Decks built here carry their own spec inside the file. Change only what was
99
99
  asked, then `ship`. If the deck carries no spec it was not built here — treat it
100
100
  as a rebrand.
101
101
 
102
+ ## Spend tool calls like they are metered — they are
103
+
104
+ Chat turns cap the number of tool invocations, and a rebuild is command-heavy.
105
+ Batch aggressively:
106
+
107
+ - Setup is ONE call: `npm install ... && node wand.js doctor`
108
+ - Gates are ONE call: `node wand.js validate spec && node wand.js check spec`
109
+ - Write the whole spec in one write, never slide by slide
110
+ - `ship` is already the whole pipeline — one call, at the end
111
+ - The visual pass is ONE image: `slides/sheet.png`
112
+
113
+ A smooth job fits in about ten calls. If a turn is cut off mid-way, continuing
114
+ is safe: the sandbox and its installed kit survive within the same chat.
115
+
102
116
  ## Work in fast loops, ship once
103
117
 
104
118
  `node wand.js validate` and `node wand.js check` run in seconds; `ship` runs the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wand-decks-kit",
3
- "version": "0.8.3",
3
+ "version": "0.8.6",
4
4
  "description": "Rebuilds or authors a client-ready .pptx on the Wand design system: measured fit, embedded Geist, verbatim content.",
5
5
  "license": "SEE LICENSE IN PROMPT.md",
6
6
  "bin": {
package/wand.js CHANGED
@@ -203,6 +203,24 @@ function ship(specPath, outArg) {
203
203
  console.log(rule("7 file"));
204
204
  const fileErrs = inspect(out);
205
205
 
206
+ // Garbled-digit check, automated. The manual command in PROMPT.md used
207
+ // grep -P, which the sandbox's grep does not have — a field run had to
208
+ // improvise around it. A gate nobody types cannot be mistyped.
209
+ let garbled = null;
210
+ if (has("pdftotext") && fs.existsSync(pdfOut)) {
211
+ const r = spawnSync("pdftotext", [pdfOut, "-"], { encoding: "utf8" });
212
+ if (r.status === 0) {
213
+ garbled = 0;
214
+ for (const c of r.stdout || "") {
215
+ const p = c.codePointAt(0);
216
+ if (p >= 0x01c9 && p <= 0x024f) garbled++;
217
+ }
218
+ console.log(garbled
219
+ ? `text layer : ${garbled} garbled glyph(s) — subsetted fonts got in; set saveSubsetFonts="0" and re-embed`
220
+ : "text layer : digits decode clean");
221
+ }
222
+ }
223
+
206
224
  console.log(rule("8 visual"));
207
225
  node([path.join(KIT, "build.js"), path.resolve(specPath), "--preview"]);
208
226
  let shots = 0;
@@ -227,7 +245,8 @@ function ship(specPath, outArg) {
227
245
  }
228
246
 
229
247
  const gates = [["fit + bounds", bad === 0], ["coverage", cov === null ? null : cov === 0],
230
- ["file", fileErrs === 0], ["renders", shots > 0 ? true : null]];
248
+ ["file", fileErrs === 0], ["pdf text", garbled === null ? null : garbled === 0],
249
+ ["renders", shots > 0 ? true : null]];
231
250
  console.log(rule("gates"));
232
251
  for (const [n, ok] of gates) console.log(` ${ok === null ? "skip" : ok ? " ok " : "FAIL"} ${n}`);
233
252
  console.log(`\n${rel(out)}${fs.existsSync(pdfOut) ? "\n" + rel(pdfOut) : ""}\n`);
package/wand_kit.js CHANGED
@@ -999,7 +999,7 @@ function productMap(pres, { tag, titleText, subtitleText, bandRow, cards, split,
999
999
 
1000
1000
 
1001
1001
  module.exports = {
1002
- VERSION: "0.8.3",
1002
+ VERSION: "0.8.6",
1003
1003
  T, F, COLS, ASSETS, radius, theme, autoSize, measure: M,
1004
1004
  background, chrome, footer, title, subtitle, kicker, contentTop,
1005
1005
  card, iconTile, pill,