@hahlex/millar-mcp 0.0.0-stage → 0.1.0-draft.1

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.
Files changed (62) hide show
  1. package/LICENSE +21 -0
  2. package/dist/docs/CHANGELOG.md +21 -0
  3. package/dist/docs/GLOSSARY.md +77 -0
  4. package/dist/http.d.ts +3 -0
  5. package/dist/http.d.ts.map +1 -0
  6. package/dist/http.js +39566 -0
  7. package/dist/http.js.map +1 -0
  8. package/dist/index.d.ts +3 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +2 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/server.d.ts +6 -0
  13. package/dist/server.d.ts.map +1 -0
  14. package/dist/server.js +1115 -0
  15. package/dist/server.js.map +1 -0
  16. package/dist/skills/millar-animation/SKILL.md +66 -0
  17. package/dist/skills/millar-animation/references/animation-research-patterns.md +28 -0
  18. package/dist/skills/millar-animation/references/motion-choreography.md +80 -0
  19. package/dist/skills/millar-build-web/SKILL.md +59 -0
  20. package/dist/skills/millar-build-web/references/seo-cwv-and-copy.md +24 -0
  21. package/dist/skills/millar-build-web/references/web-architecture-checklist.md +47 -0
  22. package/dist/skills/millar-create-image/SKILL.md +62 -0
  23. package/dist/skills/millar-create-image/references/human-editorial-photography.md +74 -0
  24. package/dist/skills/millar-create-image/references/hybrid-plate-compositing.md +43 -0
  25. package/dist/skills/millar-create-image/references/image-art-direction.md +74 -0
  26. package/dist/skills/millar-create-image/references/multi-page-asset-map.md +27 -0
  27. package/dist/skills/millar-create-image/references/natural-editorial-illustration.md +57 -0
  28. package/dist/skills/millar-create-image/references/procedural-gallery-craft.md +84 -0
  29. package/dist/skills/millar-create-image/scripts/embed-provenance.mjs +185 -0
  30. package/dist/skills/millar-deep-research/SKILL.md +62 -0
  31. package/dist/skills/millar-deep-research/references/visual-extraction-protocol.md +36 -0
  32. package/dist/skills/millar-deep-research/references/world-class-benchmarks.md +30 -0
  33. package/dist/skills/millar-design/SKILL.md +83 -0
  34. package/dist/skills/millar-design/references/aesthetic-movements.md +49 -0
  35. package/dist/skills/millar-design/references/cross-page-sync-audit.md +25 -0
  36. package/dist/skills/millar-design/references/style-dna-contract.md +89 -0
  37. package/dist/skills/millar-verify-web/SKILL.md +76 -0
  38. package/dist/skills/millar-verify-web/references/five-layer-qa-gate.md +104 -0
  39. package/dist/skills/millar-verify-web/references/two-axis-review-rubric.md +23 -0
  40. package/dist/skills/millar-verify-web/scripts/millar-audit.mjs +617 -0
  41. package/dist/skills/millar-web-workflow/SKILL.md +60 -0
  42. package/dist/skills/millar-web-workflow/references/creative-divergence-protocol.md +52 -0
  43. package/dist/skills/millar-web-workflow/references/track-routing-and-gates.md +32 -0
  44. package/dist/skills-loader.d.ts +47 -0
  45. package/dist/skills-loader.d.ts.map +1 -0
  46. package/dist/skills-loader.js +204 -0
  47. package/dist/skills-loader.js.map +1 -0
  48. package/dist/sources/packages/marketing/src/assets/BrandAndGeometricAssets.tsx +373 -0
  49. package/dist/sources/packages/marketing/src/assets/SchematicAndProductAssets.tsx +497 -0
  50. package/dist/sources/packages/marketing/src/sections/MarketingSections.tsx +946 -0
  51. package/dist/sources/packages/marketing/src/templates/PageTemplates.tsx +304 -0
  52. package/dist/sources/packages/ui/src/components/Button.tsx +162 -0
  53. package/dist/sources/packages/ui/src/components/FormControls.tsx +476 -0
  54. package/dist/sources/packages/ui/src/components/Layout.tsx +176 -0
  55. package/dist/sources/packages/ui/src/components/OverlaysAndFeedback.tsx +291 -0
  56. package/dist/sources/packages/ui/src/components/SurfacesAndData.tsx +564 -0
  57. package/dist/stdio.d.ts +3 -0
  58. package/dist/stdio.d.ts.map +1 -0
  59. package/dist/stdio.js +37380 -0
  60. package/dist/stdio.js.map +1 -0
  61. package/package.json +48 -3
  62. package/README.md +0 -3
@@ -0,0 +1,43 @@
1
+ # Hybrid Tactile Photo + 2K Precision Vector Compositing Playbook (`Path H`, v0.5)
2
+
3
+ Consult this playbook whenever an editorial plate, system diagram, brand architecture graphic, or campaign visual requires **BOTH** rich physical materiality (real cotton paper grain, hand-torn deckle edges, studio wood/espresso boards, tilted paper cards, soft natural shadows) **AND** mathematically exact semantic elements (countable steps `1..9`, exact brand SVG emblems, crisp transitions, or clean typography).
4
+
5
+ **Critical v0.5 Rule: Printed-on-Paper Organic Integration (NEVER Photoshop Stickers!):**
6
+ Early hybrid plates failed naturalness by pasting sterile web-UI pill boxes and shiny plastic 3D bevel balls on top of real paper. Every composited vector layer in `Path H` MUST feel **physically letterpress-printed, hand-inked, or softly hot-foiled INTO the real cotton paper fibers**, NEVER floating like website buttons!
7
+
8
+ ---
9
+
10
+ ## 1. Medium Routing Matrix (Pick the Right Path Before Prompting)
11
+
12
+ | Subject Type | Image Generator Online? | Mandatory Path | Why |
13
+ |---|---|---|---|
14
+ | **Teaching, human scenes, hands-in-action photography** | Yes | **`Path A` Photo** (`human-editorial-photography.md`) | Bright open natural daylight + concrete kinetic mid-action + authentic film grain. |
15
+ | **Warm hand-drawn editorial illustration, ink & watercolor storytelling** | Yes | **`Path A` Illustration** (`natural-editorial-illustration.md`) | Organic tapered linework + translucent watercolor/gouache washes + breathing paper tooth. |
16
+ | **System architecture, numbered loop (`1..9`), exact brand SVG emblem, split transformation** | Yes | **`Path H` Hybrid** (Tactile Photo Stage + Organic Letterpress 2K SVG Composite) | Real paper/deckle materiality + 100% mathematical accuracy + organic ink-soak integration. |
17
+ | **503/Offline OR Pure Code-Native Monograph** | No / Code-only | **`Path B` Procedural** (`procedural-gallery-craft.md`) | Honest Medium Pivot Law (orthographic elevations, intaglio stipple, organic engraving). |
18
+
19
+ ---
20
+
21
+ ## 2. The 3-Step Organic Path H Pipeline (`2048x1152` Native 2K)
22
+
23
+ ### Step 1: Generate the Pure Photographic Material Stage (ZERO Text / ZERO Numbers / ZERO Diagrams)
24
+ Prompt the image generator ONLY for the **physical studio backdrop and tangible paper/wood surfaces**, reserving clean uncluttered open areas where printed vectors will sit:
25
+ - Describe real studio surfaces and natural daylight without raw `#HEX` filter distortion (e.g., matte dark roasted-espresso archival matboard on the left, 3-4 small blank warm-sand paper slips lightly tilted near outer left corners, a real heavyweight hand-torn cream cotton paper sheet with organic deckle fibers splitting the frame vertically near `44%`, bathed in warm natural upper-left daylight casting soft real paper relief shadows).
26
+ - **CRITICAL EXCLUSION:** Explicitly state *"completely blank paper and board surfaces, zero text, zero numbers, zero icons, zero logos, zero drawn diagrams"*.
27
+ - **Inspect Stage 1 via Vision BEFORE Compositing:** Verify exact seam contour (`x ~ 44-48%`), warm natural lighting consistency, and clean unobstructed margins.
28
+
29
+ ### Step 2: Composite Organic Print-on-Paper 2K Vector Layer (`Playwright Chromium` at `2048x1152`)
30
+ Load Stage 1 photo as full-bleed `<img>` underneath an inline `<svg viewBox="0 0 2048 1152">`, measuring exact pixel coordinates along the real photographed torn-paper edge:
31
+ - **BAN Floating Web-UI Pill Capsules on Paper:** Never wrap dark-side or light-side diagram labels (`Teachers`, `Data Silos`, `Manual Workflows`) inside rounded CSS button pills with uniform `1px` borders! Render clean editorial typography paired with small tactile registration dots, callout ticks, or subtle ink underlines so they read like an **editorial print folio**, not a web dashboard!
32
+ - **BAN Shiny Plastic 3D Specular Marbles:** Never use harsh glossy white-highlight `radialGradient` spheres for numbered steps! Render numbered nodes (`1..9`) and foundation bars as **matte warm-bronze letterpress medallions / softly debossed foil rings** (subtle tonal shift `#8F5B1E -> #B8803B`, crisp hairline inner ring, soft low-opacity warm paper shadow `opacity 0.16-0.22`)!
33
+ - **Ink-Soak Blend & Subtle Letterpress Edge (`feDisplacementMap`):**
34
+ - Set `mix-blend-mode: multiply` on dark inks, bronze hairlines, and light-ground typography so the real cotton paper fibers visibly breathe right through every stroke!
35
+ - Apply an ultra-subtle organic print filter (`<feTurbulence type="fractalNoise" baseFrequency="0.04" numOctaves="2"/><feDisplacementMap scale="0.7"/>`) on drawn arcs, dashed lines, and thin decorative rings so linework carries warm human print tooth instead of sterile laser-cut CAD stiffness!
36
+ - **SVG Axis-Aligned Gradient Trap:** Never apply a default `gradientUnits="objectBoundingBox"` `<linearGradient>` to a purely vertical or horizontal `<line>` (its zero-width/zero-height bounding box renders invisible); always use `gradientUnits="userSpaceOnUse"` or a solid calibrated stroke color on axis-aligned connectors.
37
+ - **Canonical Brand Emblem & Exact Math:** Embed the exact brand vector SVG (e.g., `hahlex-mark-color.svg`) and mathematically exact clockwise angles (`theta = -90deg + i * 360 / N`), fading left-side tension curves (`< 1.5%` accent area) cleanly behind the pixel-measured torn edge mask!
38
+
39
+ ### Step 3: Pass 2 Organic Cohesion & Provenance Polish
40
+ Open the rendered `2048x1152` PNG via vision and check:
41
+ - Does EVERY vector stroke look printed/foiled INTO the paper rather than pasted like a shiny sticker?
42
+ - Are all `1..9` counts, spelling, arrows, and label clearances (`>= 18px` from nodes/seams) 100% spotless?
43
+ - Run `node <skill-dir>/scripts/embed-provenance.mjs <plate.png> --prompt="..." --brand="..." --method="path-h-organic-hybrid-2k" --aspect="16:9" --sidecar`.
@@ -0,0 +1,74 @@
1
+ # Image Art Direction & Subject-First English Prompt Engineering (v0.5)
2
+
3
+ Always author image-generation prompts in **crisp, idiomatic English**, regardless of the user's conversation language. Never hardcode another brand's colors: derive every palette, material, and **Iconic Brand Motif** dynamically from `.millar/research-dossier.md`, `.millar/style-dna.md`, local `DESIGN.md`, or live Brand MCP tokens.
4
+
5
+ ---
6
+
7
+ ## 1. The `65/35` Subject-First Prompt Architecture (`80-135` Words Total)
8
+
9
+ Modern image models (`Gemini Image`, `Imagen`, `Flux`) divide attention across every word you write. Old `80% boilerplate / 20% subject` prompts (`230+` words) starve the focal story and yield stiff, posed rooms. Use this crisp structure:
10
+
11
+ ```text
12
+ [65-75% CONCRETE MID-ACTION SUBJECT, CONTEXT-RIGHT LIGHT & ICONIC BRAND MOTIFS]
13
+ 1. Honest context-appropriate lighting (bright airy daylight for teaching/schools/community; low-key ONLY for genuine night/dark stages).
14
+ 2. Specific kinetic mid-action verb + real lived-in props + genuine mutual human reaction (NEVER frozen "pointing softly" or awkward hovering hands).
15
+ 3. Elevated Iconic Brand Motifs rendered in living tactile materials (NO raw #HEX strings in natural photo/illustration prompts!).
16
+
17
+ + [25-35% COMPACT LOCKED WORLD TAIL]
18
+ 4. Shared optical/illustration medium (35mm film grain OR hand-held sepia fountain-pen & translucent watercolor wash) bridging the series.
19
+ 5. Max 4-6 surgical exclusions (zero dark gloom, zero stiff poses, zero text clutter, zero cold neon).
20
+ ```
21
+
22
+ ---
23
+
24
+ ## 2. Brand Motif Elevation Without Artificial Gloom or Stiffness
25
+
26
+ During Pass 1, list EVERY signature motif discovered in `DESIGN.md` / brand deck / live site, then elevate each one naturally:
27
+
28
+ | Brand Motif Discovered in Research | Failure Modes to REJECT | Millar v0.5 Natural Kinetic Craft Execution |
29
+ |---|---|---|
30
+ | **"Every learner seen" (classroom focus & mentorship)** | Pitch-black gloomy cave classroom with theatrical spotlight OR empty desks with a stern standing proctor | **Bright, sunlit morning classroom**: teacher crouched at eye-level actively sketching a geometry step in a student's open notebook margin while the teenager leans in smiling in real discovery; classmates work softly out-of-focus in bright open window daylight behind them (`f/2.0` optical focus, zero gloom!) |
31
+ | **Human + Warm AI collaboration** | Anonymous ceramic orb on a napkin OR two stiff hands hovering awkwardly touching fingertips in mid-air | **Concrete mid-action collaboration**: teacher's hand actively drawing/circling a diagram with a brass pen in a sunlit open sketchbook while the warm matte-ivory ceramic & satin-bronze companion hand naturally steadies the paper corner or slides a cream index slip beside the sketch |
32
+ | **Warm hand-drawn brand storytelling** | Uniform `1px` CAD vector outlines or flat corporate Memphis cartoons | **`Path A-Illustration` (`natural-editorial-illustration.md`)**: expressive variable-weight sepia fountain-pen/graphite linework + loose translucent watercolor/gouache washes + 30-45% breathing warm cotton paper reserve |
33
+ | **Fragmented chaos -> exact numbered loop (`1..9`) + brand emblem** | Pure AI diffusion (miscounts `1,2,4,6,6`) OR sterile web-UI pill buttons & shiny plastic 3D bevel marbles pasted on paper | **`Path H` Organic Hybrid (`hybrid-plate-compositing.md`)**: pure blank photographic paper/board/torn-edge stage + 2K Playwright letterpress SVG (`mix-blend-mode: multiply`, subtle edge tooth, matte foil medallions, bare editorial labels, canonical brand SVG mark) |
34
+
35
+ ---
36
+
37
+ ## 3. Natural Pigment & Material Translation (Drop `#HEX` From Natural Art Prompts!)
38
+
39
+ Raw `#HEX` strings inside natural photography or watercolor illustration prompts push models toward artificial flat digital color-grading. Reserve exact `#HEX` strictly for CSS/SVG tokens (`Path H` Stage 2 & `Path B`); translate them into living light and artist pigments for `Path A`:
40
+
41
+ | Brand Token Role (From Research / MCP / DESIGN.md) | Natural Material / Pigment Language for `Path A` Prompts |
42
+ |---|---|
43
+ | **Light Primary Ground** | `unbleached warm cream cotton paper`, `sunlit pale plaster wall`, `cold-press archival rag paper`, `pale raw linen` |
44
+ | **Alternating Secondary Surface** | `warm oat linen shirt`, `pale travertine stone`, `weathered honey teak desk`, `raw sand paper slip` |
45
+ | **Dark Structural Anchor** | `oiled dark walnut tabletop`, `matte roasted-espresso matboard`, `deep walnut-sepia ink`, `dark slate chalkboard` |
46
+ | **Primary Positive Accent** | `burnished brass fountain pen`, `satin honey-bronze wash`, `raw sienna watercolor`, `warm ochre daylight` |
47
+ | **High-Tension Focal Accent** | `single touch of warm vermilion pencil`, `delicate carmine red marking ink` (kept strictly within researched accent ratio) |
48
+
49
+ ---
50
+
51
+ ## 4. Dual Provenance: Embedded PNG `tEXt` + `.prompt.json` Sidecar
52
+
53
+ Embed provenance directly into every shipping `2048px` PNG AND write a human-readable sidecar using the bundled zero-dependency Node script:
54
+
55
+ ```bash
56
+ node <skill-dir>/scripts/embed-provenance.mjs path/to/plate-01.png \
57
+ --prompt="<exact English prompt>" \
58
+ --brand="DESIGN.md (Researched Brand DNA)" \
59
+ --method="path-a-daylight-editorial-photography" \
60
+ --aspect="16:9" \
61
+ --sidecar
62
+
63
+ # Verify embedded chunks anytime:
64
+ node <skill-dir>/scripts/embed-provenance.mjs --read path/to/plate-01.png
65
+ ```
66
+
67
+ ---
68
+
69
+ ## 5. Routing to Specialist Craft Playbooks
70
+
71
+ - **Bright Sunlit Classrooms, Teaching & Concrete Kinetic Human Photography:** Read [human-editorial-photography.md](human-editorial-photography.md).
72
+ - **Natural Hand-Drawn Editorial Illustration & Organic Linework:** Read [natural-editorial-illustration.md](natural-editorial-illustration.md).
73
+ - **Organic Printed-on-Paper Hybrid Photo + 2K Vector Diagrams (`Path H`):** Read [hybrid-plate-compositing.md](hybrid-plate-compositing.md).
74
+ - **503/Offline Fallback OR Pure Code-Native Monograph Plates (`Path B`):** Read [procedural-gallery-craft.md](procedural-gallery-craft.md).
@@ -0,0 +1,27 @@
1
+ # Multi-Page Visual Asset Mapping Blueprint
2
+
3
+ Prevent secondary pages from falling into bare "industrial wireframe" mode by planning a cohesive multi-scale visual series across the entire site before coding.
4
+
5
+ ## Scale Variation Matrix (Freeze Style, Vary Scale)
6
+
7
+ | Page / Route | Section Role | Recommended Subject Scale | Aspect Ratio | Framing & Integration Rule |
8
+ |---|---|---|---|---|
9
+ | **Home (`/`)** | Hero Stage | Wide establishing scene or flagship stylized product showcase | `16:9` or `3:2` | Reserve clean negative space for H1 + CTA; never obscure headline contrast |
10
+ | **Features (`/features`)** | Capability Deep-Dives | Medium architectural objects, bespoke diagram plates, or interactive UI chrome | `4:3` or `16:10` | Alternate asymmetric Editorial Split and Spatial Stage; zero identical 3-card icon spam |
11
+ | **How It Works / Architecture** | Process & System Flow | Code-native SVG schematic (`ClosedLoopSchematic`, `LayerStackDiagram`) or precision macro geometry | `16:9` | Crisp 1px hairlines, tabular step numbering, zero text-stroke overlap |
12
+ | **Pricing (`/pricing`)** | Trust & Commitment | Quiet atmospheric horizon band or subtle tactile material plate | `21:9` / `16:9` | Ultra-low visual noise so pricing comparison table stays effortless to scan |
13
+ | **About / Craft (`/about`)** | Editorial Narrative | Human-scale studio environment, candid tactile details, or *Measured Warmth* poster plate | `3:2` or `4:5` | Pair with `65ch` editorial essay split and hairline pull-quote |
14
+ | **Blog / Docs (`/docs`)** | Reading Companion | Minimalist geometric chapter header plate (`4:1` or `16:9`) + inline clean diagrams | `16:9` | Restrained `Read` mode: imagery illuminates architecture rather than distracting from prose |
15
+ | **Product App (`/app`)** | Empty States & Onboarding | Crisp 1.5px icon mark or single restrained vector spot plate (`max 160px`), zero CSS gradients | `1:1` | Calm `Operate` mode: crisp solid surfaces, clear recovery action |
16
+
17
+ ## Dedicated Single-Subject Catalog Plate Rule (Track M Anti-Crop Guard)
18
+
19
+ - **NEVER crop a multi-object hero or collection composite image into individual product/SKU/feature cards.** Cropping leaves sliced neighboring objects on card edges and shows wrong silhouettes in Quick-View drawers.
20
+ - Every distinct catalog item, SKU, or capability card that displays a visual MUST receive its own **dedicated single-subject plate** sharing the exact series lighting, margin, and background polarity.
21
+
22
+ ## Visual Quality Self-Check Before Committing Any Image
23
+
24
+ 1. Put Hero image and Secondary-page images side by side: do they look like they belong to the same exhibition/publication?
25
+ 2. Does color temperature match the page background without harsh white-box or mismatched tint edges?
26
+ 3. Are there zero garbled AI letters, warped hands, duplicated geometry, or unrequested watermarks?
27
+ 4. Does the crop still frame the focal subject cleanly at `375px` mobile width?
@@ -0,0 +1,57 @@
1
+ # Natural Editorial Illustration & Organic Linework Playbook (v0.5)
2
+
3
+ Consult this playbook whenever producing **editorial illustrations, narrative drawings, educational/classroom artwork, hand-drawn spot plates, or organic illustrated web hero scenes** (via AI image generation OR hybrid ink-and-wash craft).
4
+
5
+ **Core Goal:** Produce artwork that feels genuinely drawn by a master human editorial illustrator (New Yorker, Kinfolk, Monocle, Studio Ghibli sunlit sketchbook, warm Japanese ink-and-watercolor), NEVER stiff mechanical CAD, flat corporate Memphis cartoons, glossy 3D plastic renders, or dark gloomy drama.
6
+
7
+ ---
8
+
9
+ ## 1. The 5 Laws of Natural Drawing & Linework
10
+
11
+ 1. **Variable Hand-Held Line Weight (NEVER Uniform Digital Outlines):**
12
+ - Name real tactile drawing tools: *warm sepia fountain-pen linework with gentle thick-to-thin nib pressure*, *soft 2B graphite pencil contour lines*, *slightly dry Japanese brush-pen ink*, or *loose architectural ink-and-wash*.
13
+ - Allow natural slight taper, expressive micro-imperfection, and occasional broken contour lines where sunlight hits an edge (light dissolves outlines!).
14
+ - **BANNED:** Uniform `1px` mathematical vector outlines, rigid CAD geometry, flat corporate Memphis blob people, heavy black comic outlines.
15
+ 2. **Translucent Wash & Breathing Paper Reserve:**
16
+ - Layer *translucent watercolor washes, dry-brush matte gouache, or soft colored-pencil shading* with subtle loose register (pigment softly feathers slightly inside or past the ink line instead of filling edges like a paint-bucket tool).
17
+ - Leave **30-45% of raw warm paper tooth visible** as sunlit breathing room and negative space.
18
+ 3. **Kinetic Mid-Action Storytelling (Specific Concrete Verbs!):**
19
+ - Every human or narrative drawing MUST capture a **specific physical action mid-motion** with real everyday props:
20
+ - *Good:* A teacher kneeling beside a wooden desk sketching a small triangle with a pencil in a student's open margin while the student leans in with chin propped on one hand, eyes brightening mid-realization; ruler, pencil shavings, open textbook, and classmates chatting quietly by sunlit windows behind them.
21
+ - *Bad (REJECT):* Two stiff figures standing beside a desk, one pointing vaguely at a blank page.
22
+ 4. **Bright, Airy Natural Daylight Default (NO Artificial Gloom!):**
23
+ - Education, learning, mentorship, community, and everyday craft scenes **default to bright sunlit morning or warm afternoon daylight** with open, breathable shadows tinted warm ochre, soft slate, or pale sepia (NEVER heavy black shadows or dark dungeon backgrounds!).
24
+ - Reserve dark night/chiaroscuro illustrations strictly for briefs explicitly set at night, evening, or on dark theatrical themes.
25
+ 5. **Pigment Language Only (NO Raw `#HEX` Codes Inside Art Prompts!):**
26
+ - Never inject `#1A130D` or `#FFFCF8` hex strings inside illustration prompts; raw hexes push diffusion models toward synthetic flat digital fills. Describe real artist pigments harmonized to the researched brand palette (e.g., *unbleached warm cream cotton paper, raw sienna and warm ochre washes, deep walnut-sepia ink, soft olive chalk green, single touch of warm vermilion pencil*).
27
+
28
+ ---
29
+
30
+ ## 2. Concise `75-125` Word Natural Illustration Prompt Patterns
31
+
32
+ ### A. Sunlit Editorial Ink-and-Watercolor Classroom / Human Story (`16:9`)
33
+ ```text
34
+ Warm hand-drawn editorial ink-and-watercolor illustration on textured unbleached cream cotton paper, bright sunlit morning classroom in Vietnam filled with open natural window light and lively warmth.
35
+ In the foreground, a teacher in a pale oat linen shirt kneels at eye level beside a wooden desk, actively sketching a geometry arc in the margin of a student's open notebook while the teenager leans forward resting her chin on one hand, smiling with sudden understanding; a wooden ruler, eraser, and stacked textbooks clutter the desk naturally.
36
+ Softly sketched classmates work near tall bright sunlit windows in the airy background.
37
+ Expressive variable-weight sepia fountain-pen linework with tapered strokes and loose translucent washes of warm ochre, pale sage, and walnut ink, leaving generous untouched cream paper breathing space.
38
+ Authentic handmade sketchbook warmth, zero stiff vector outlines, zero flat corporate clip-art, zero dark gloom, zero text or watermarks.
39
+ ```
40
+
41
+ ### B. Expressive Editorial Spot Illustration / Object & Gesture Vignette (`4:3` or `16:9`)
42
+ ```text
43
+ Loose editorial ink-and-gouache illustration on warm cold-press cotton rag paper, bright airy natural daylight.
44
+ <Specific concrete hands-in-action moment: e.g., a teacher's hand holding a worn brass fountain pen mid-sketch circling a lesson idea on an open notebook while a warm matte-ivory & brushed-bronze companion hand gently steadies the paper corner and tucks a small cream index tab beside the drawing>.
45
+ Organic tapered walnut-ink nib lines with subtle dry-brush texture, delicate translucent washes of warm honey bronze and raw umber with slight hand-printed imperfect register, open cream paper margins on all sides.
46
+ Natural human drawing rhythm, zero glossy 3D plastic, zero mechanical CAD perfection, zero neon, zero text.
47
+ ```
48
+
49
+ ---
50
+
51
+ ## 3. Pass 4 Naturalness Vision Audit (Instant Reject Triggers)
52
+
53
+ Inspect every rendered illustration at full resolution (`2048px`) before accepting:
54
+ - [ ] **Alive Linework:** Do strokes taper, breathe, and feel genuinely drawn by a human hand? (Reject uniform sterile vector outlines or stiff CAD geometry!)
55
+ - [ ] **Concrete Mid-Action:** Can a viewer immediately name the EXACT physical action happening (sketching, measuring, explaining, passing, building) rather than a frozen vague pose?
56
+ - [ ] **Airy Context-Right Light:** Are teaching/daytime scenes bright, warm, and hopeful with open shadows? (Reject underexposed dark/gloomy rooms!)
57
+ - [ ] **Paper & Pigment Honesty:** Do washes soak softly into visible paper grain with natural negative space? (Reject shiny digital airbrush gradients or flat paint-bucket fills!)
@@ -0,0 +1,84 @@
1
+ # Procedural Gallery Craft Playbook (Museum-Grade Code-Native Artwork)
2
+
3
+ Consult this playbook whenever AI image generation returns `503`/offline OR when producing code-native editorial plates, posters, architectural schematics, or visual illustrations via HTML5 Canvas, Playwright-rendered HTML/SVG, or Python (Cairo / Pillow / Skia / ReportLab).
4
+
5
+ **Goal:** Reach **>= 9.2 / 10** museum-grade graphic quality by uniting `canvas-design`'s dense engraving discipline and Zero-Addition Pass 2 polish with `Impeccable`'s 1-second chiaroscuro storytelling, rendered strictly in the **researched brand's palette and light/dark polarity** (never hardcoded!).
6
+
7
+ ---
8
+
9
+ ## 1. Absolute Bans (Instant Rejection Triggers)
10
+
11
+ Never render these amateur code-art failures:
12
+ - **Flat Clip-Art People:** Circle heads + trapezoid bodies + stick limbs. Replace with *rim-lit atmospheric silhouettes* OR *human presence evoked through architectural traces* (illuminated open pages, twin glowing study apertures, drafted courtyard plans).
13
+ - **Boxy Clip-Art Buildings:** Triangle roof on flat rectangle with 4 square windows. Replace with *precision orthographic architectural elevation linework* (`0.5px-1px` drafted elevations, cutaway cross-hatching, receding contour planes).
14
+ - **Faux-3D Perspective Canvas Rooms & Fake Photorealistic Tabletops (CRITICAL BAN):** NEVER try to paint 3D-projected perspective interiors, bookshelves, 3D-shaded mugs/vases/bottles, or vector tabletops using Canvas 2D filled polygons and linear gradients! They ALWAYS read as amateur 2005 Flash clip-art (`<= 7.5/10`).
15
+ - **PowerPoint Flowcharts & Slide Icons:** 4-6 rounded boxes connected by `->` arrows or circle-plus-line-icon bullets. Replace with *continuous parametric visual systems*: 20-36 strand harmonic guilloche loops, orbital vernier instruments, topographic contour fields, or drafting schematics where ONE focal accent deflection signals tension.
16
+ - **Flat Vector Fills Under Thin Outlines (`Impeccable` print craft rule):** Flat opaque shapes under a 1px stroke read instantly as clip-art. Render engraved/print subjects through *fine ink strokes, clipped cross-hatching or stippling patterns, and translucent tonal washes*.
17
+ - **Hard-Edged Light Triangles:** Never draw unfeathered straight-edged polygons for light beams; always feather directional light cones with `ctx.filter = "blur(18px-28px)"` or smooth multi-stop radial falloff so light melts organically into grain.
18
+ - **Collision & Encoding Bugs:** Text touching strokes, cramped margins (`< 6%`), or broken/clipped locale diacritics (such as Vietnamese `ệ, ư, ỗ, ắ, ồ, ử`).
19
+
20
+ ---
21
+
22
+ ## 2. The Honest Medium Pivot Law (When AI Image Gen Returns `503` on Photo/Human/Product Briefs)
23
+
24
+ When a brief asks for **real human photography, interior scenes, or studio product photos** AND AI image generation is unavailable (`503`/offline):
25
+ 1. **DO NOT fake a photograph in Canvas 2D.** Never draw faux-3D rooms, faux-3D human portraits, or faux-3D tabletop cups.
26
+ 2. **Pivot intentionally and honestly to Native Museum Printmaking & Orthographic Monograph Craft**, the 4 mediums where procedural code genuinely achieves `9.3-9.7 / 10`:
27
+ - **Architectural Orthographic Elevation / Section Blueprints:** Pure 2D architectural front/section drawings (`0.5px-1.0px` ink linework, sun-angle rays, millimeter dimension ticks, fine cross-hatching, translucent sunlit tonal washes).
28
+ - **Intaglio & Stipple Botanical / Material Monographs:** Fine ink contour engraving paired with variable-density stipple dots (`3,000-15,000` dots) or clipped diagonal pen hatching (`45 deg / 135 deg`), echoing Japanese woodblock prints or botanical folios.
29
+ - **Parametric Optical & Harmonic Systems:** `24-36` strand guilloche ribbons, orbital vernier rings, thermal/acoustic wave plates, and feathered chiaroscuro glow pools.
30
+ - **Halftone Topographic Cartography & Equal-Luminance Architectural Apertures:** Stipple elevation maps paired with finely hatched twin architectural window frames casting soft blurred daylight washes.
31
+ 3. **Preserve Path A Photographic Readiness:** Always save the complete **100% English Path A Documentary Photography Prompt** inside `<asset>.prompt.json` (with `"renderMode": "path-b-archival-monograph"`, `"pathAReady": true`) so real photography can drop straight into the exact slots whenever an image model is online.
32
+
33
+ ---
34
+
35
+ ## 3. Pull Palette & Polarity Dynamically From Brand Research (Zero Hardcoding)
36
+
37
+ Read verified tokens dynamically from `.millar/style-dna.md`, `.millar/research-dossier.md`, local `DESIGN.md`, or live Brand MCP:
38
+ - `--plate-light-ground` & `--plate-light-vignette` (light-polarity plates)
39
+ - `--plate-dark-ground` & `--plate-dark-focal` (dark-polarity plates)
40
+ - `--plate-ink-strong`, `--plate-ink-mid`, `--plate-ink-whisper` (3-plane depth inks tinted from brand temperature, NEVER raw uncalibrated gray)
41
+ - `--plate-accent-focal` + researched accent ceiling (e.g., `< 1.5%` for restrained editorial brands)
42
+ - **Series Polarity Cadence:** Match the researched brand's light/dark identity across multi-plate sets (e.g., `2 Light + 2 Dark` or `3 Light + 1 Dark` for light-canvas brands; never accidental `4/4` dark monochrome unless dark-first).
43
+
44
+ ---
45
+
46
+ ## 4. The 4-Layer Procedural Craft Stack (Required on Every Artwork)
47
+
48
+ Render at **2x HiDPI** (`>= 1920x1080` for `16:9` or `>= 1600x1200` for `4:3`) with explicitly loaded local/web TTF/WOFF2 fonts:
49
+
50
+ ### Layer 1: Tactile Material Ground (Never Flat Solid Color)
51
+ - **Light-Polarity Plates:** Soft radial paper/mineral wash + `4,000-12,000` ultra-fine low-opacity (`2%-5%`) tinted paper-fiber grain speckles (or SVG `feTurbulence`) + delicate `0.75px` archival registration border inset `5%-6%` with corner crop ticks.
52
+ - **Dark-Polarity Plates:** Layered deep tonal vignette + `600-1,500` luminous mineral dust motes (`0.5px-1.8px`, opacity `0.06-0.35`) concentrated organically along light cones.
53
+
54
+ ### Layer 2: Feathered Volumetric Chiaroscuro Light & 3 Spatial Depth Planes
55
+ Build **Background -> Midground -> Foreground** depth on BOTH polarities:
56
+ - **Dark Plates:** Cast feathered volumetric light shafts (`ctx.filter = "blur(22px)"` or smooth multi-stop radial pools) illuminating one unmistakable focal aperture, manuscript, or parametric core.
57
+ - **Light Plates:** Cast soft blurred north-window diagonal shadow bands (`3%-6%` tinted shadow opacity) paired with warm/calibrated highlight washes across the focal center, delivering sunlit depth WITHOUT darkening the surface.
58
+
59
+ ### Layer 3: High-Density Master Craft Motifs (Match the Brief's Subject)
60
+ - **Harmonic Guilloche (`20-36` phased strands, `0.5px-0.9px` stroke):** Encode friction or tension through ONE surgical `--plate-accent-focal` strand deflection that smoothly rejoins harmony.
61
+ - **Halftone & Stipple Cartography / Topography:** Variable-radius dot matrices (`0.8px-3.2px`) paired with razor-sharp optical sightlines and equal-aperture calibration reticles.
62
+ - **Orthographic Architectural Elevations & Hatched Window Apertures:** `0.5px-1px` precision elevations, multi-pane window frames with clipped diagonal hatching, fine book-page contours (`20+` fanned ink hairlines), or single-subject technical vessel blueprints with millimeter dimension lines.
63
+ - **Precision Optical & Vernier Instruments:** `360`-degree fine graduated scale ticks (`0.4px` minor, major ticks every `15` deg) and balanced negative space.
64
+
65
+ ### Layer 4: Museum-Grade Integrated Typography (`90%` Visual / `10%` Text)
66
+ - **Explicit Locale-Safe Font Loading:** Load real TTF/WOFF2 fonts supporting full script glyphs (for Vietnamese: `Be Vietnam Pro`, `Archivo` Vietnamese subset, `Inter`, `Geist`, `IBM Plex Mono`; NEVER use Latin-only `Poppins` or `Bebas Neue` on Vietnamese accented words!).
67
+ - **Restraint:** Maximum 1 concise display title + 2-4 whisper-small mono coordinate/index captions (`11px-14px` on `1600px+` canvas). Zero paragraphs inside artwork.
68
+ - **Collision-Free Safe Zones:** Enforce `>= 6%` margins on all sides and inspect rendered PNGs directly to verify zero text-stroke overlaps.
69
+
70
+ ### Canvas 2D & Vector Rendering Gotchas (Avoid Silent Fallbacks)
71
+ - **`ctx.font` Rejects Percentage Stretch:** HTML5 Canvas rejects percentage font-stretch values (such as `"800 125% 54px 'Archivo'"`) and silently falls back to `10px sans-serif`. Always use CSS stretch keywords (`"800 expanded 54px 'Archivo'"`) or standard weight + size syntax.
72
+ - **`ctx.restore()` Preserves the Active Path:** `ctx.restore()` resets the clipping region without clearing the active subpath. Always call `ctx.beginPath()` immediately before AND after clipped cross-hatching/stipple passes so hatching lines never bleed unclipped.
73
+ - **Responsive Organic SVG Dividers:** On deckle or torn-paper SVG dividers, set `preserveAspectRatio="xMidYMid slice"` (never `"none"`) so mobile viewports never compress gentle edge rhythms into jagged sawteeth.
74
+
75
+ ---
76
+
77
+ ## 5. `canvas-design` Zero-Addition Pass 2 Refinement Law (MANDATORY)
78
+
79
+ After Pass 1 renders, open EVERY actual PNG directly via vision and execute Pass 2:
80
+
81
+ 1. **STOP Adding New Shapes:** If tempted to add another box, badge, icon, or label to "make it look richer", **STOP immediately**.
82
+ 2. **Sharpen Only What Exists:** Soften any hard-edged light beam with Gaussian blur, refine stroke-weight hierarchy (`0.4px` whisper vs `1.2px` focal), enrich cross-hatching/stipple density, tune paper/lacquer grain subtlety, fix orphan line wraps, and widen cramped margins (`>= 6%`).
83
+ 3. **Verify Technical Perfection:** Zero faux-3D clip-art, zero text-stroke collisions, razor-sharp unclipped locale diacritics (`ệ, ư, ỗ, ắ, ồ`), accurate researched brand polarity, and `.prompt.json` provenance saved.
84
+ 4. **Re-render and Re-inspect:** Ship ONLY when Pass 2 visibly reads like hours of master museum printmaking (`>= 9.2 / 10`).
@@ -0,0 +1,185 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Zero-dependency PNG tEXt provenance embedder & reader for Millar Create Image v0.4.
4
+ *
5
+ * Embeds standard PNG tEXt chunks (MillarPrompt, MillarBrandSource, MillarMethod, MillarVersion)
6
+ * cleanly before IEND with valid IEEE CRC32 checksums, and optionally writes <image>.prompt.json.
7
+ *
8
+ * Usage:
9
+ * node embed-provenance.mjs <image.png> --prompt="..." [--brand="..."] [--method="..."] [--sidecar]
10
+ * node embed-provenance.mjs --read <image.png>
11
+ */
12
+
13
+ import fs from "node:fs";
14
+ import path from "node:path";
15
+
16
+ const PNG_SIG = Buffer.from([137, 80, 78, 71, 13, 10, 26, 10]);
17
+
18
+ // Standard IEEE 802.3 CRC32 table for PNG chunks
19
+ const CRC_TABLE = new Uint32Array(256);
20
+ for (let n = 0; n < 256; n++) {
21
+ let c = n;
22
+ for (let k = 0; k < 8; k++) {
23
+ c = (c & 1) !== 0 ? 0xedb88320 ^ (c >>> 1) : c >>> 1;
24
+ }
25
+ CRC_TABLE[n] = c >>> 0;
26
+ }
27
+
28
+ function crc32(buf) {
29
+ let c = 0xffffffff;
30
+ for (let i = 0; i < buf.length; i++) {
31
+ c = CRC_TABLE[(c ^ buf[i]) & 0xff] ^ (c >>> 8);
32
+ }
33
+ return (c ^ 0xffffffff) >>> 0;
34
+ }
35
+
36
+ function toLatin1Safe(str) {
37
+ return String(str)
38
+ .replace(/[\u2014\u2013]/g, "-")
39
+ .replace(/[\u2018\u2019]/g, "'")
40
+ .replace(/[\u201C\u201D]/g, '"')
41
+ .replace(/\u2192/g, "->")
42
+ .replace(/[^\x09\x0A\x0D\x20-\x7E\xA0-\xFF]/g, " ");
43
+ }
44
+
45
+ function makeTextChunk(keyword, value) {
46
+ const keyBuf = Buffer.from(toLatin1Safe(keyword).slice(0, 79), "latin1");
47
+ const valBuf = Buffer.from(toLatin1Safe(value), "latin1");
48
+ const data = Buffer.concat([keyBuf, Buffer.from([0]), valBuf]);
49
+ const type = Buffer.from("tEXt", "ascii");
50
+ const len = Buffer.alloc(4);
51
+ len.writeUInt32BE(data.length, 0);
52
+ const crc = Buffer.alloc(4);
53
+ crc.writeUInt32BE(crc32(Buffer.concat([type, data])), 0);
54
+ return Buffer.concat([len, type, data, crc]);
55
+ }
56
+
57
+ function parseChunks(buf) {
58
+ if (buf.length < 8 || !buf.subarray(0, 8).equals(PNG_SIG)) {
59
+ throw new Error("Input file is not a valid PNG.");
60
+ }
61
+ const chunks = [];
62
+ let offset = 8;
63
+ while (offset + 8 <= buf.length) {
64
+ const length = buf.readUInt32BE(offset);
65
+ const type = buf.subarray(offset + 4, offset + 8).toString("ascii");
66
+ const dataStart = offset + 8;
67
+ const dataEnd = dataStart + length;
68
+ const crcEnd = dataEnd + 4;
69
+ if (crcEnd > buf.length) throw new Error(`Truncated PNG chunk ${type} at offset ${offset}`);
70
+ chunks.push({
71
+ type,
72
+ data: buf.subarray(dataStart, dataEnd),
73
+ raw: buf.subarray(offset, crcEnd),
74
+ });
75
+ offset = crcEnd;
76
+ }
77
+ return chunks;
78
+ }
79
+
80
+ function readProvenance(filePath) {
81
+ const buf = fs.readFileSync(filePath);
82
+ const chunks = parseChunks(buf);
83
+ const meta = {};
84
+ for (const ch of chunks) {
85
+ if (ch.type === "tEXt") {
86
+ const nul = ch.data.indexOf(0);
87
+ if (nul > 0) {
88
+ const key = ch.data.subarray(0, nul).toString("latin1");
89
+ const val = ch.data.subarray(nul + 1).toString("latin1");
90
+ meta[key] = val;
91
+ }
92
+ }
93
+ }
94
+ return meta;
95
+ }
96
+
97
+ function embedProvenance(filePath, entries) {
98
+ const buf = fs.readFileSync(filePath);
99
+ const chunks = parseChunks(buf);
100
+ const keysToReplace = new Set(Object.keys(entries));
101
+ const outChunks = [];
102
+
103
+ for (const ch of chunks) {
104
+ if (ch.type === "tEXt") {
105
+ const nul = ch.data.indexOf(0);
106
+ const key = nul > 0 ? ch.data.subarray(0, nul).toString("latin1") : "";
107
+ if (keysToReplace.has(key)) continue;
108
+ }
109
+ if (ch.type === "IEND") {
110
+ for (const [k, v] of Object.entries(entries)) {
111
+ if (v !== undefined && v !== "") {
112
+ outChunks.push(makeTextChunk(k, v));
113
+ }
114
+ }
115
+ }
116
+ outChunks.push(ch.raw);
117
+ }
118
+
119
+ fs.writeFileSync(filePath, Buffer.concat([PNG_SIG, ...outChunks]));
120
+ }
121
+
122
+ function main() {
123
+ const args = process.argv.slice(2);
124
+ if (args.length === 0 || args.includes("--help")) {
125
+ console.log(
126
+ 'Usage:\n node embed-provenance.mjs <image.png> --prompt="..." [--brand="..."] [--method="..."] [--aspect="16:9"] [--sidecar]\n node embed-provenance.mjs --read <image.png>',
127
+ );
128
+ process.exit(0);
129
+ }
130
+
131
+ if (args[0] === "--read") {
132
+ const file = path.resolve(args[1] ?? "");
133
+ console.log(JSON.stringify(readProvenance(file), null, 2));
134
+ return;
135
+ }
136
+
137
+ const filePath = path.resolve(args[0]);
138
+ const getFlag = (name) => {
139
+ const hit = args.find((a) => a.startsWith(`--${name}=`));
140
+ return hit ? hit.slice(name.length + 3) : undefined;
141
+ };
142
+ const prompt = getFlag("prompt") ?? "";
143
+ const brand = getFlag("brand") ?? "";
144
+ const method = getFlag("method") ?? "millar-create-image-v0.4";
145
+ const aspect = getFlag("aspect") ?? "16:9";
146
+ const writeSidecar = args.includes("--sidecar");
147
+
148
+ if (!prompt) {
149
+ console.error("ERROR: --prompt=... is required.");
150
+ process.exit(1);
151
+ }
152
+
153
+ embedProvenance(filePath, {
154
+ MillarVersion: "0.4.0",
155
+ MillarMethod: method,
156
+ MillarBrandSource: brand,
157
+ MillarAspect: aspect,
158
+ MillarPrompt: prompt,
159
+ });
160
+
161
+ if (writeSidecar) {
162
+ const parsed = path.parse(filePath);
163
+ const sidecarPath = path.join(parsed.dir, `${parsed.name}.prompt.json`);
164
+ fs.writeFileSync(
165
+ sidecarPath,
166
+ JSON.stringify(
167
+ {
168
+ file: filePath,
169
+ version: "0.4.0",
170
+ aspectRatio: aspect,
171
+ brandSource: brand,
172
+ method,
173
+ promptEn: prompt,
174
+ pngTextEmbedded: true,
175
+ },
176
+ null,
177
+ 2,
178
+ ),
179
+ );
180
+ }
181
+
182
+ console.log(`PASS: Embedded PNG tEXt provenance into ${path.basename(filePath)}${writeSidecar ? " + .prompt.json sidecar" : ""}.`);
183
+ }
184
+
185
+ main();
@@ -0,0 +1,62 @@
1
+ ---
2
+ name: millar-deep-research
3
+ description: "Brand-first research, visual & motion DNA extraction, user-intent decoding, and world-class craft benchmarking skill (v0.3.0). Use BEFORE designing, coding, or prompting images whenever the user names a brand, supplies existing images/animations, shares reference URLs, or describes a target feel. Never hardcode another brand's palette or tropes: research the actual brand, local DESIGN.md/MCP tokens, and audience culture first, and emit crisp English Visual & Motion DNA specifications."
4
+ version: 0.3.0-draft.1
5
+ license: MIT
6
+ ---
7
+
8
+ # Millar Deep Research v0.3: Brand-First Research & Visual DNA Extraction
9
+
10
+ Turn brand mentions, user-supplied assets, live references, and open briefs into an evidence-backed **Visual Research Dossier** (`.millar/research-dossier.md`). Downstream skills (`millar-design`, `millar-create-image`, `millar-animation`) consume this dossier with zero guesswork, zero hardcoded brand assumptions, and zero cross-page style drift.
11
+
12
+ ## Non-Negotiable Principles
13
+
14
+ 1. **Research Every Named Brand First (Zero Hardcoding):** Never hardcode any brand's hex palette, surface polarity, or visual tropes inside generic prompts or defaults. Whenever the user mentions ANY brand (Hahlex, an external company, an institution, or a client), research its real identity before picking a single color, typeface, lighting direction, or motif.
15
+ 2. **Author All Extracted Prompts & Specs in English:** Write every Visual DNA description, photographic art-direction rule, and motion brief in crisp, idiomatic English so image models and coding agents execute at peak precision. Keep only visible rendered UI/artwork copy in the user's target locale (e.g., Vietnamese).
16
+ 3. **Visual Authority Is Evidence, Not a Filename:** Missing `DESIGN.md` does not make an existing site greenfield. Inspect rendered pages, CSS variables, brand kits, and user-supplied files directly.
17
+
18
+ ## Execution Sequence
19
+
20
+ ### Step 1: Decode User Intent & Run Mandatory Brand Discovery Gate
21
+
22
+ Classify the request across three explicit lists:
23
+ 1. **Named Brand & Pinned Truth:** Any named brand, supplied images/animations, target locale (`vi`, `en`, etc.), required pages, or explicit constraints.
24
+ 2. **Audience & Physical Scene:** Who uses this surface, where, on which devices, under what ambient lighting, and what earns trust in their real world.
25
+ 3. **Open Aesthetic Axes:** Dimensions the user left free (composition rhythm, visual medium, motion signature, secondary-page treatment).
26
+
27
+ Then execute the matching **Brand Discovery Branch** (never skip when a brand is named):
28
+ - **Branch 1A (Local Workspace Truth Exists):** Read `DESIGN.md`, `PRODUCT.md`, `BRAND.md`, token JSON/CSS files, existing pages, and supplied images/animations.
29
+ - **Branch 1B (Brand Design-System MCP Connected):** For an ecosystem with an active MCP server (for example, Millar MCP when working on Hahlex), query live canonical rules dynamically (`get_design_guidelines`, `get_design_tokens`, `get_visual_assets`, `get_motion_presets`) instead of relying on memorized or hardcoded hex values.
30
+ - **Branch 1C (External / Real-World Brand Named Without Local Docs):** Use your host's web research or browser tools (`search_web`, official brand press kits, live website, product photography) to extract the brand's actual palette, light/dark surface balance, typography, cultural roots, and visual voice. Cite exact observed sources and never invent unverified commercial claims.
31
+ - **Branch 1D (Greenfield / Unnamed Brand):** Do NOT reuse another brand's palette. Mark the visual world as open for `millar-web-workflow`'s Creative Divergence & Anti-Slop Calibration.
32
+
33
+ **Completion criterion:** Brand discovery completed from real sources (local files, live MCP, or web research), pinned constraints separated from open axes, and audience physical scene recorded.
34
+
35
+ ### Step 2: Extract Visual & Motion DNA from Supplied Assets
36
+
37
+ Whenever the user supplies photos, illustrations, screenshots, videos, Lottie/Rive/CSS animations, or an existing hero page, read [references/visual-extraction-protocol.md](references/visual-extraction-protocol.md) and inspect EVERY supplied artifact directly via vision/file tools:
38
+ - **Images & Flagship Pages:** Extract exact lighting direction/softness, surface materiality, color temperature & light/dark polarity ratio, lens/medium grammar, grain density, aspect ratios, framing margins, and negative space rhythm.
39
+ - **Animations & Code:** Extract easing curves (`cubic-bezier` or spring `{ stiffness, damping, mass }`), duration register, travel distance, trigger discipline, stagger cap, and interruptibility.
40
+ - **Secondary-Page Gap Diagnosis:** Explicitly document what would break if secondary routes only copied the font family and accent hex without inheriting materiality, lighting, and layout craft.
41
+
42
+ **Completion criterion:** Concrete observed Visual & Motion DNA table grounded in real files with zero invented values.
43
+
44
+ ### Step 3: Benchmark World-Class Craft & Cultural Context
45
+
46
+ Read [references/world-class-benchmarks.md](references/world-class-benchmarks.md) and research 2-3 high-craft references aligned with the brand's actual domain and geography:
47
+ - Study structural discipline (layout variety, typographic tension, framing margins, motion restraint, photographic authenticity) without copying copyrighted artwork verbatim.
48
+ - For human photography or regional products (such as Vietnamese education, healthcare, architecture, or consumer brands), research authentic local environments, daylight character, everyday clothing, and architectural cues so visuals never collapse into generic Western stock tropes.
49
+ - **Offline fallback:** If running without web access, rely on local workspace truth, connected MCP resources, and [references/world-class-benchmarks.md](references/world-class-benchmarks.md), disclosing offline mode honestly.
50
+
51
+ **Completion criterion:** 2-4 concrete structural, cultural, and motion craft takeaways grounded in real references.
52
+
53
+ ### Step 4: Emit `.millar/research-dossier.md` (English Technical Spec)
54
+
55
+ Save `.millar/research-dossier.md` in crisp English with five actionable blocks:
56
+ 1. **Brand Research Summary:** Verified palette tokens, exact light/dark surface polarity ratio (e.g., `70% light canvas / 20% secondary tint / 10% dark stage`), accent budget ceiling, typography, and non-negotiable brand invariants.
57
+ 2. **Extracted Visual & Motion DNA:** Exact hex-to-physical-material translations (in English) and motion physics constants.
58
+ 3. **Cultural & Environmental Authenticity Notes:** Real-world visual cues for the target audience and region.
59
+ 4. **Secondary-Page Propagation Rules:** Concrete guarantees preventing `/features`, `/pricing`, `/about`, or `/app` from collapsing into plain boilerplate cards.
60
+ 5. **Downstream Handoff Blueprint:** Asset scale/ratio plan for `millar-create-image` and choreography cues for `millar-animation`.
61
+
62
+ **Completion criterion:** `.millar/research-dossier.md` written cleanly in English, grounded in verified brand/asset research, and ready for `millar-design`.
@@ -0,0 +1,36 @@
1
+ # Visual & Motion DNA Extraction Protocol
2
+
3
+ Use this protocol whenever the user names a brand, supplies existing images/screenshots/animations, or provides an already-styled flagship page. Never skip directly to coding secondary pages using only a font family and accent hex, and never substitute hardcoded tokens from an unrelated brand.
4
+
5
+ ## 1. Brand & Visual Artifact Inspection Checklist (Write Output in English)
6
+
7
+ Inspect every supplied image, rendered page, brand guideline, or token file directly and record these 8 concrete observations in crisp English:
8
+
9
+ 1. **Medium & Materiality:** Editorial documentary photography, tactile matte 3D, architectural linework, fine engraving/halftone print, archival paper texture, dark lacquer/obsidian, or crisp solid product UI chrome?
10
+ 2. **Lighting Paradigm:** Soft diffused north-window daylight, humid tropical louver daylight, golden-hour low side-light, warm chiaroscuro lamp cone, studio softbox, or clean flat print matte? Always specify exact light direction (e.g., top-left 35 deg, warm backlight, grazing horizon light).
11
+ 3. **Color Temperature & Polarity Ratio:** Record the brand's ACTUAL light/dark surface balance (for example, predominantly light archival surfaces with one dark anchor band vs. dark-native instrument UI vs. saturated color-blocked editorial). Translate verified hex tokens into physical material language in English (for example: `<light-ground-hex>` -> "unbleached cotton archival paper", `<dark-stage-hex>` -> "matte roasted walnut lacquer", `<focal-accent-hex>` -> "sparingly applied carmine registration mark").
12
+ 4. **Contrast & Shadow Character:** Wide soft offset shadow, razor-thin 1px structural hairline with zero shadow, or dramatic chiaroscuro depth?
13
+ 5. **Framing & Negative Space:** Full-bleed edge-to-edge, matted inside >= 6% archival margins, asymmetric 60/40 crop leaving calm headline headroom, or tight macro focal crop?
14
+ 6. **Surface Grain & Finish:** Fine 35mm photographic grain, subtle archival cotton-paper tooth, matte ceramic/stone texture, or clean high-DPI vector precision?
15
+ 7. **Detail Density:** Quiet gallery stillness vs. intricate engraving/cartographic precision vs. dense operational data clarity?
16
+ 8. **Cultural & Environmental Truth:** Real-world architecture, furniture, clothing, signage language, and regional daylight belonging authentically to the brand's audience (avoiding generic stock-photo clichés).
17
+ 9. **Iconic Brand Motifs & Signature Visual Mechanics (NON-NEGOTIABLE):** Extract every explicit visual motif from `DESIGN.md`, brand decks, or live assets (e.g., hand-torn cotton paper seams, unseen-to-seen spotlight contrasts, human-and-warm-AI hand pairings, tilted physical collage slips, canonical SVG emblems, exact countable process loops like `1..9`). Record them as binding **Motif Elevation Requirements** so downstream art direction elevates them into tactile museum craft instead of dodging or replacing them with generic placeholders.
18
+
19
+ ## 2. Existing Animation & Interaction Extraction Checklist
20
+
21
+ Inspect existing CSS, Tailwind, Motion/Framer, GSAP, Lottie, or video references and record:
22
+
23
+ 1. **Tempo Register:** Snappy productive (`120-240ms`) vs. calm editorial expressive (`320-640ms`) vs. interruptible physical spring.
24
+ 2. **Curve Family:** Exponential ease-out (`cubic-bezier(0.16, 1, 0.3, 1)`), smooth cubic (`cubic-bezier(0.22, 1, 0.36, 1)`), or spring `{ stiffness, damping, mass }`.
25
+ 3. **Motion Material:** Subtle `translateY` + opacity settle, clip-path/mask reveal, tactile scale micro-feedback, or shared-element View Transition.
26
+ 4. **Trigger Discipline:** Direct user action (hover/click/tab switch), single hero choreography, or scroll-linked progress without trapping content at `opacity: 0`.
27
+ 5. **Stagger Cadence:** Sibling delay step (e.g., `40ms` per item, capped total delay `<= 280ms`).
28
+
29
+ ## 3. Translation into Cross-Page Propagation Rules
30
+
31
+ Convert observed findings into binding rules for EVERY secondary page:
32
+
33
+ - **Surface Polarity Echo:** Secondary pages inherit the exact researched ground/alternating/counter-weight surface cadence (never reverting to generic white + uncalibrated gray Tailwind boxes).
34
+ - **Visual Anchor Rule:** If Page 1 features documentary photography, editorial still-life, or engraved visual plates, secondary pages (`/features`, `/pricing`, `/about`, `/docs`) MUST pair copy with matching style-locked assets produced via `millar-create-image` using the same English Master Style Prefix.
35
+ - **Border, Radius & Elevation Lock:** Reuse the identical corner-radius ladder, 1px hairline or soft shadow discipline, and image framing rules across every route.
36
+ - **Motion Parity:** Export shared CSS custom properties or spring constants so Page 2..N move with identical physical weight as Page 1.
@@ -0,0 +1,30 @@
1
+ # World-Class Design & Motion Benchmark Reference
2
+
3
+ Use these verified design-engineering benchmarks to calibrate research queries and elevate aesthetic decisions. Extract *discipline* (hierarchy, pacing, proportion, motion clarity) rather than copying brand assets.
4
+
5
+ ## 1. Visual Craft & Design System Benchmarks
6
+
7
+ | Reference Class | Benchmark Examples | What Discipline to Study |
8
+ |---|---|---|
9
+ | **Design System Portals & Docs** | Vercel Geist, Stripe Docs, Radix, Apple HIG | 3-column reading ergonomics, interactive live playgrounds, strict typographic hierarchy, crisp 1px structural rules, instant search (`Cmd+K`) |
10
+ | **Warm Editorial & Human AI** | Anthropic, Stripe Press, Are.na, Kinfolk | Archival cream/sand warmth, generous `65ch` prose rhythm, calm authority without stock-photo clutter, subtle earth pigments |
11
+ | **Precision Product Workspaces** | Linear, Raycast, Cron / Notion Calendar, Figma | High-density 1-glance clarity, keyboard-first affordances, zero decorative clutter, hairline tonal layering, tabular numeric precision |
12
+ | **Photo-Led & Narrative Launches** | Apple Product Pages, Teenage Engineering, Framer Showcases | Single focal hero statement, deliberate pacing between full-bleed visuals and quiet typographic pauses, cohesive lighting across every crop |
13
+ | **Architectural / Swiss Web** | Dieter Rams Braun Archive, Swiss Design Awards, Mono-grid portfolios | Exposed grid math, flush-left optical tension, extreme scale contrast, disciplined 1-accent focus |
14
+
15
+ ## 2. Motion & Interaction Engineering Benchmarks
16
+
17
+ | Practitioner / Standard | Core Lesson to Apply |
18
+ |---|---|
19
+ | **Emil Kowalski (Animations on the Web / Sonner / Vaul)** | Fast interruptible springs for touch/pointer actions; realistic origin scaling (never `scale(0)` from nowhere); `scale(0.97)` tactile press; zero-delay consecutive tooltip swaps; exit faster than entrance. |
20
+ | **Rauno Freiberg (Interaction Design Guidelines)** | Compounding micro-details, velocity inheritance on gestures, fluid command palettes, physical restraint so motion feels felt rather than watched. |
21
+ | **W3C View Transitions API & CSS Scroll-Driven Animations** | Compositor-thread route morphing (`view-transition-name`) and declarative `animation-timeline: view()` / `scroll()` replacing heavy JS scroll listeners, with clean progressive fallbacks. |
22
+ | **WCAG 2.1 / 2.2 Motion Accessibility** | Mandatory `prefers-reduced-motion: reduce` alternative that strips spatial translation/parallax while preserving instant opacity/state confirmation so feedback remains legible. |
23
+
24
+ ## 3. Targeted Web Search Queries for Agents
25
+
26
+ When running live research via `search_web` or `WebSearch`, combine domain + craft axis:
27
+ - **Layout & Editorial Pacing:** `"editorial web design" "<industry>" typography grid layout case study`
28
+ - **Animation Patterns:** `"Emil Kowalski" OR "Motion.dev" OR "CSS View Transitions" "<interaction type>" spring easing`
29
+ - **Color & Materiality:** `"editorial color palette" "<mood/material>" warm paper dark stage typography contrast`
30
+ - **Multi-Page Cohesion:** `"brand guidelines" web art direction photography lighting framing consistency`