mattrguerra/meridian-skillsmainPrivate on GitHub, published here in full

SKILL.md

Language Markdown8.8 KB163 lines

skills/artwork-template-rebuilder/SKILL.md

  1. ---
  2. name: artwork-template-rebuilder
  3. description: >-
  4. Rebuild a vendor artwork template into the Meridian Display Co. house standard. Use whenever Matt drops a
  5. print/artwork template PDF from a vendor (step-and-repeat backdrop, banner, feather flag, tension
  6. fabric, trade-show display, canopy, tent, umbrella, inflatable, etc.) that is off-standard and needs
  7. reformatting to match Meridian's templates. Trigger phrases: "fix this template", "rebuild this
  8. template", "reformat this vendor template", "make this template match ours", "this template isn't to
  9. our standard", "standardize this artwork template", or any time a vendor template PDF appears and
  10. the goal is to bring its layers, fonts, colors, labeling, and help text in line with the Meridian
  11. standard. Produces a print-ready PDF with four toggleable layers (Layout Area, Artwork Area, Safe
  12. Lines, Help Info), Arial, CMYK black + red, the [SKU] - Product Name title, the standard legend, and
  13. the Notes to Designers / file-format boilerplate. ALWAYS start by collecting the product name and
  14. SKU from the user.
  15. ---
  16. # Artwork Template Rebuilder
  17. Takes any off-standard vendor template and rebuilds it as a clean Meridian template. The standard
  18. was reverse-engineered from the confirmed-correct TD20 / BD08 (flat) and CP10 canopy (die-line)
  19. templates and is documented in `references/house-standard.md`; read it if anything below is
  20. unclear. Keep your own confirmed die-line reference files in `references/examples/` (not included in this repo).
  21. ## Step 1: ALWAYS query the user first (non-negotiable)
  22. Before doing anything else, use the user-input tool to collect:
  23. 1. **Product name**: the full display name (e.g. "Adjustable Backdrop Stand, 8 ft").
  24. 2. **SKU**: the Meridian product code (e.g. "BD08"). This rarely lives in the vendor file, so it
  25. must come from the user. Do not infer it from the filename or guess it.
  26. Pre-fill the product name from the filename/source only as a suggested default the user can correct.
  27. The SKU and name may contain intentional placeholders (e.g. SKU `DM-[#]`, name `[PLACEHOLDER]`).
  28. Use them verbatim; do not "fix" them.
  29. ## Step 2: Classify as a FLAT product or a DIE-LINE product (this decides everything)
  30. **FLAT / single-panel**: backdrops, banners, tension fabric, feather flags, rigid signs.
  31. One artwork rectangle with one inset safe line. → **Flat path (Steps 3F-5F).**
  32. **DIE-LINE / multi-panel**: tents, canopies, umbrellas, inflatables (domes), teardrop/pole-pocket
  33. flags, anything that is a nest of panels or an unfolded 3D shape. Each panel carries its own layout
  34. outline and safe line; there is NO single rectangle. → **Die-line path (Steps 3D-5D).**
  35. How to tell quickly: run the measurer (Step 3F). If it returns a sane, near-centered visual size
  36. close to the page size, it's flat. If it returns a tiny fragment, warns "not centered," or you can
  37. see multiple panels in a thumbnail, it's a die-line, so switch to the die-line path. When in doubt,
  38. render a thumbnail (`pdftoppm -png -r 8 in.pdf chk`) and look.
  39. > **Do not force a die-line through the flat path.** `build_template.py` redraws ONE rectangle from
  40. > two numbers; on a canopy or dome that throws away every panel and produces an official-looking
  41. > but useless file. This was the original gap in this skill: it only ever handled flat products.
  42. ---
  43. ## FLAT PATH
  44. ### Step 3F: Measure the source (do not guess the safe margin)
  45. ```bash
  46. python scripts/measure_template.py /mnt/user-data/uploads/<vendor>.pdf
  47. ```
  48. The safe margin is **measured from the vendor file, template by template**: whatever inset the
  49. vendor drew. It reports bleed (page MediaBox), finds the dashed safe rectangle, and prints the
  50. exact `--bleed-w/--bleed-h --visual-w/--visual-h` flags. Insets may be non-uniform per axis; the
  51. measured visual size reproduces that exactly.
  52. - If it warns the safe line is **not centered**, the builder centers the visual area and can't
  53. reproduce that exactly. Flag it to the user rather than shipping a silent mismatch.
  54. - If it finds **no dashed rect**, fall back to a stated visual size or a documented default and
  55. **tell the user you fell back and to what.**
  56. - If it says the found safe line is **tiny / a die-line fragment**, you are on the wrong path;
  57. go to the die-line path.
  58. ### Step 4F: Build
  59. ```bash
  60. python scripts/build_template.py \
  61. --sku "<SKU>" --name "<Product Name>" \
  62. --bleed-w <W> --bleed-h <H> \
  63. [--visual-w <W> --visual-h <H>] \
  64. [--safe-margin <inches>] \
  65. --out /mnt/user-data/outputs/Artwork_Template_<SKU>_<slug>.pdf
  66. ```
  67. Pass `--visual-w/--visual-h` straight from the measurer (normal path). Use `--safe-margin` only on
  68. the documented fallback when no safe line was found. The script handles the four OCG layers, Arial
  69. (Liberation Sans), CMYK black/red/teal, the title, spec block, legend, and all boilerplate.
  70. ### Step 5F: Verify & present
  71. Render a thumbnail (`pdftoppm -png -r 18 out.pdf chk`) and confirm against `references/house-standard.md`
  72. §7. Then `present_files` the output PDF and tell the user the SKU/name, dimensions, safe margin, and a
  73. one-line list of what was off-standard that you corrected.
  74. ---
  75. ## DIE-LINE PATH (multi-panel / unfolded products)
  76. You cannot redraw these from two dimensions, because the panel geometry only exists in the vendor file.
  77. The rebuild **preserves the vendor's real panel paths and re-layers them** onto the four standard
  78. layers. Keep confirmed examples of the target format in `references/examples/` (not included here); these are the ones worth having:
  79. - `example_CP10_canopy_top.pdf`: the closest analog for angled/triangular panel nests (tents, canopies).
  80. - `example_CP10_canopy_back_wall_and_sides.pdf`: rectangular multi-panel.
  81. - `example_UM06_umbrella_hexagon.pdf`: hexagon-panel radial layout (umbrellas, domes).
  82. Open the matching example alongside the vendor file and match it. The four layers, named exactly:
  83. | Layer | Holds |
  84. |-------|-------|
  85. | `Layout Area` | every panel's solid **black** outer layout/cut outline |
  86. | `Safe Lines` | every panel's **red dashed** safe line, inset inside its layout outline |
  87. | `Artwork Area` | empty; the designer drops art here |
  88. | `Help Info` | the title, spec block, legend, and Notes to Designers boilerplate |
  89. ### Step 3D: Re-layer in Illustrator (the geometry work)
  90. This is a designer step; automation cannot reliably do it on a flattened vendor PDF (outlined text,
  91. one layer, non-readable stroke colors). Follow the example file:
  92. 1. Place / open the vendor die-line. Create the four layers above, named exactly.
  93. 2. **Layout Area:** move the vendor's outer panel outlines here. Recolor to CMYK black
  94. `C0 M0 Y0 K100`, solid.
  95. 3. **Safe Lines:** move the vendor's safe outlines here (vendors often draw these green; recolor
  96. to CMYK red `C0 M100 Y100 K0` and make them **dashed**). One safe line per panel, inset inside
  97. that panel's layout outline. Drop the vendor's separate "finished/cut" line unless the product
  98. genuinely needs all three, since the Meridian standard is two lines (black layout + red safe).
  99. 4. **Artwork Area:** leave empty.
  100. 5. Delete the vendor chrome: their title bar, their template key, their spec block, their stitch/
  101. leather-circle callouts unless a callout is genuinely needed (keep needed ones in red, per the
  102. standard, e.g. "allow for stitching").
  103. 6. Convert any remaining live text to **Arial** (ArialMT / Arial-BoldMT).
  104. ### Step 4D: Stamp the Help Info block
  105. On the `Help Info` layer, add the standard block (the same content the flat builder emits; see
  106. `build_template.py` for the verbatim text, or copy from the example file):
  107. - Title `[SKU] - Product Name` (Arial Bold, black, largest), then `Artwork Template` under it.
  108. - **Visual Area:** spec, one line per panel type with its finished size in inches + cm, e.g.
  109. `Canopy Top: 123" x 76" (312cm x 193cm)`.
  110. - Legend: `Visual area` (solid black sample) and `Safe Visual Line` (red dashed sample).
  111. - `Notes to Designers:` (bold + underlined): the five standard bullets, teal key terms
  112. (`150dpi`, `CMYK`, `PMS`, `flatten`, `outline`), final bullet in red.
  113. - `Preferred File Formats:` and `Acceptable File Formats:` sections.
  114. ### Step 5D: Verify & present
  115. Confirm the four layers exist, are named exactly, and each toggles independently (flip a couple OFF
  116. and re-render). Confirm black layout + red dashed safe per panel, Arial + CMYK throughout, Help Info
  117. present. `present_files` the PDF and tell the user what you corrected.
  118. ---
  119. ## Notes
  120. - Output is always CMYK and always Arial, because these are print files. RGB or a substitute display font
  121. is a defect, not a stylistic choice.
  122. - The inline key-term highlight in the boilerplate is a muted **teal**, not red (only the final
  123. warning line and stitching callouts are true red). Keep the teal unless the user confirms a change.
  124. - Layer names are exact and case-sensitive: `Layout Area`, `Artwork Area`, `Safe Lines`, `Help Info`.
  125. (An earlier version of this skill used `Safe Line` and `Artwork Layer`; both were wrong and are fixed.)