SKILL.md
Language Markdown8.8 KB163 lines
---name: artwork-template-rebuilderdescription: >-Rebuild a vendor artwork template into the Meridian Display Co. house standard. Use whenever Matt drops aprint/artwork template PDF from a vendor (step-and-repeat backdrop, banner, feather flag, tensionfabric, trade-show display, canopy, tent, umbrella, inflatable, etc.) that is off-standard and needsreformatting to match Meridian's templates. Trigger phrases: "fix this template", "rebuild thistemplate", "reformat this vendor template", "make this template match ours", "this template isn't toour standard", "standardize this artwork template", or any time a vendor template PDF appears andthe goal is to bring its layers, fonts, colors, labeling, and help text in line with the Meridianstandard. Produces a print-ready PDF with four toggleable layers (Layout Area, Artwork Area, SafeLines, Help Info), Arial, CMYK black + red, the [SKU] - Product Name title, the standard legend, andthe Notes to Designers / file-format boilerplate. ALWAYS start by collecting the product name andSKU from the user.---# Artwork Template RebuilderTakes any off-standard vendor template and rebuilds it as a clean Meridian template. The standardwas reverse-engineered from the confirmed-correct TD20 / BD08 (flat) and CP10 canopy (die-line)templates and is documented in `references/house-standard.md`; read it if anything below isunclear. Keep your own confirmed die-line reference files in `references/examples/` (not included in this repo).## Step 1: ALWAYS query the user first (non-negotiable)Before doing anything else, use the user-input tool to collect:1. **Product name**: the full display name (e.g. "Adjustable Backdrop Stand, 8 ft").2. **SKU**: the Meridian product code (e.g. "BD08"). This rarely lives in the vendor file, so itmust come from the user. Do not infer it from the filename or guess it.Pre-fill the product name from the filename/source only as a suggested default the user can correct.The SKU and name may contain intentional placeholders (e.g. SKU `DM-[#]`, name `[PLACEHOLDER]`).Use them verbatim; do not "fix" them.## Step 2: Classify as a FLAT product or a DIE-LINE product (this decides everything)**FLAT / single-panel**: backdrops, banners, tension fabric, feather flags, rigid signs.One artwork rectangle with one inset safe line. → **Flat path (Steps 3F-5F).****DIE-LINE / multi-panel**: tents, canopies, umbrellas, inflatables (domes), teardrop/pole-pocketflags, anything that is a nest of panels or an unfolded 3D shape. Each panel carries its own layoutoutline and safe line; there is NO single rectangle. → **Die-line path (Steps 3D-5D).**How to tell quickly: run the measurer (Step 3F). If it returns a sane, near-centered visual sizeclose to the page size, it's flat. If it returns a tiny fragment, warns "not centered," or you cansee multiple panels in a thumbnail, it's a die-line, so switch to the die-line path. When in doubt,render a thumbnail (`pdftoppm -png -r 8 in.pdf chk`) and look.> **Do not force a die-line through the flat path.** `build_template.py` redraws ONE rectangle from> two numbers; on a canopy or dome that throws away every panel and produces an official-looking> but useless file. This was the original gap in this skill: it only ever handled flat products.---## FLAT PATH### Step 3F: Measure the source (do not guess the safe margin)```bashpython scripts/measure_template.py /mnt/user-data/uploads/<vendor>.pdf```The safe margin is **measured from the vendor file, template by template**: whatever inset thevendor drew. It reports bleed (page MediaBox), finds the dashed safe rectangle, and prints theexact `--bleed-w/--bleed-h --visual-w/--visual-h` flags. Insets may be non-uniform per axis; themeasured visual size reproduces that exactly.- If it warns the safe line is **not centered**, the builder centers the visual area and can'treproduce that exactly. Flag it to the user rather than shipping a silent mismatch.- If it finds **no dashed rect**, fall back to a stated visual size or a documented default and**tell the user you fell back and to what.**- If it says the found safe line is **tiny / a die-line fragment**, you are on the wrong path;go to the die-line path.### Step 4F: Build```bashpython scripts/build_template.py \--sku "<SKU>" --name "<Product Name>" \--bleed-w <W> --bleed-h <H> \[--visual-w <W> --visual-h <H>] \[--safe-margin <inches>] \--out /mnt/user-data/outputs/Artwork_Template_<SKU>_<slug>.pdf```Pass `--visual-w/--visual-h` straight from the measurer (normal path). Use `--safe-margin` only onthe documented fallback when no safe line was found. The script handles the four OCG layers, Arial(Liberation Sans), CMYK black/red/teal, the title, spec block, legend, and all boilerplate.### Step 5F: Verify & presentRender a thumbnail (`pdftoppm -png -r 18 out.pdf chk`) and confirm against `references/house-standard.md`§7. Then `present_files` the output PDF and tell the user the SKU/name, dimensions, safe margin, and aone-line list of what was off-standard that you corrected.---## DIE-LINE PATH (multi-panel / unfolded products)You cannot redraw these from two dimensions, because the panel geometry only exists in the vendor file.The rebuild **preserves the vendor's real panel paths and re-layers them** onto the four standardlayers. Keep confirmed examples of the target format in `references/examples/` (not included here); these are the ones worth having:- `example_CP10_canopy_top.pdf`: the closest analog for angled/triangular panel nests (tents, canopies).- `example_CP10_canopy_back_wall_and_sides.pdf`: rectangular multi-panel.- `example_UM06_umbrella_hexagon.pdf`: hexagon-panel radial layout (umbrellas, domes).Open the matching example alongside the vendor file and match it. The four layers, named exactly:| Layer | Holds ||-------|-------|| `Layout Area` | every panel's solid **black** outer layout/cut outline || `Safe Lines` | every panel's **red dashed** safe line, inset inside its layout outline || `Artwork Area` | empty; the designer drops art here || `Help Info` | the title, spec block, legend, and Notes to Designers boilerplate |### Step 3D: Re-layer in Illustrator (the geometry work)This is a designer step; automation cannot reliably do it on a flattened vendor PDF (outlined text,one layer, non-readable stroke colors). Follow the example file:1. Place / open the vendor die-line. Create the four layers above, named exactly.2. **Layout Area:** move the vendor's outer panel outlines here. Recolor to CMYK black`C0 M0 Y0 K100`, solid.3. **Safe Lines:** move the vendor's safe outlines here (vendors often draw these green; recolorto CMYK red `C0 M100 Y100 K0` and make them **dashed**). One safe line per panel, inset insidethat panel's layout outline. Drop the vendor's separate "finished/cut" line unless the productgenuinely needs all three, since the Meridian standard is two lines (black layout + red safe).4. **Artwork Area:** leave empty.5. Delete the vendor chrome: their title bar, their template key, their spec block, their stitch/leather-circle callouts unless a callout is genuinely needed (keep needed ones in red, per thestandard, e.g. "allow for stitching").6. Convert any remaining live text to **Arial** (ArialMT / Arial-BoldMT).### Step 4D: Stamp the Help Info blockOn the `Help Info` layer, add the standard block (the same content the flat builder emits; see`build_template.py` for the verbatim text, or copy from the example file):- Title `[SKU] - Product Name` (Arial Bold, black, largest), then `Artwork Template` under it.- **Visual Area:** spec, one line per panel type with its finished size in inches + cm, e.g.`Canopy Top: 123" x 76" (312cm x 193cm)`.- Legend: `Visual area` (solid black sample) and `Safe Visual Line` (red dashed sample).- `Notes to Designers:` (bold + underlined): the five standard bullets, teal key terms(`150dpi`, `CMYK`, `PMS`, `flatten`, `outline`), final bullet in red.- `Preferred File Formats:` and `Acceptable File Formats:` sections.### Step 5D: Verify & presentConfirm the four layers exist, are named exactly, and each toggles independently (flip a couple OFFand re-render). Confirm black layout + red dashed safe per panel, Arial + CMYK throughout, Help Infopresent. `present_files` the PDF and tell the user what you corrected.---## Notes- Output is always CMYK and always Arial, because these are print files. RGB or a substitute display fontis a defect, not a stylistic choice.- The inline key-term highlight in the boilerplate is a muted **teal**, not red (only the finalwarning line and stitching callouts are true red). Keep the teal unless the user confirms a change.- Layer names are exact and case-sensitive: `Layout Area`, `Artwork Area`, `Safe Lines`, `Help Info`.(An earlier version of this skill used `Safe Line` and `Artwork Layer`; both were wrong and are fixed.)