@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,52 @@
1
+ # Creative Divergence & Anti-Slop Calibration Protocol
2
+
3
+ AI models converge toward a handful of predictable templates unless steered intentionally. Run this protocol during Track L (and on open visual axes in Track M) before locking `.millar/style-dna.md`.
4
+
5
+ ## 1. Brand-First Gate: Research Before Diverging
6
+
7
+ - **If the user named a brand:** Research its real palette, surface polarity, typography, and visual voice first (local `DESIGN.md`/`PRODUCT.md`, live Brand MCP such as Millar MCP for Hahlex, or web search). Apply creativity to *composition, pacing, storytelling, and interactive craft* inside that verified brand world rather than replacing its identity or hardcoding another brand's tokens.
8
+ - **If the brief is greenfield / unbranded:** Run Steps 2-5 below to invent an authentic world from scratch.
9
+
10
+ ## 2. Name and Ban All Four AI Ruts (`Impeccable` Calibration Distilled)
11
+
12
+ Reject ALL four statistical defaults on open briefs (each is legitimate ONLY when explicitly pinned by the user or researched brand):
13
+ 1. **Dark-Slate Neon SaaS Rut:** Near-black slate + floating purple/cyan radial glow + centered white H1 with uppercase eyebrow pill + 3 equal glass icon-cards + fake vanity stats.
14
+ 2. **Warm-Cream Editorial AI Rut:** Warm cream ground + high-contrast serif display + terracotta or signal-red accent applied blindly to every bookish, warm, or human subject (even when that subject's real world is vibrant, industrial, or photographic!).
15
+ 3. **Broadsheet Costume Rut:** Generic hairline boxes + italic display serif + decorative tracked uppercase mono labels mimicking a newspaper without real editorial substance.
16
+ 4. **Flat Brutalist Costume Rut:** Saturated ink + heavy condensed type + hard zero-blur `4px 4px 0` black shadows used as decoration without genuine structural intent.
17
+
18
+ **Training-Data Overused Display Fonts (Avoid on Open Briefs):** `Fraunces`, `Playfair Display`, `Cormorant`, `Lora`, `Crimson`, `Newsreader`, `Syne`, `Space Grotesk`, `Space Mono`, `IBM Plex`, `Inter`-as-display, `DM Sans`, `DM Serif`, `Outfit`, `Plus Jakarta Sans`, `Instrument Sans`. Use one ONLY when a researched brand pins it or a concrete functional requirement (such as full Vietnamese glyph clarity in a UI workhorse face) earns it.
19
+
20
+ ## 3. Choose Color Strategy & Polarity From the Physical Scene
21
+
22
+ - **Pick Color Strategy Before Picking Hexes:**
23
+ - *Restrained:* Palette-tinted neutrals + 1 disciplined accent (ideal for `Operate` / `Read` or research-pinned quiet editorial brands).
24
+ - *Committed:* One saturated surface color owns `30%-60%` of the page.
25
+ - *Full Palette:* 3-4 intentional structural color roles at page scale.
26
+ - *Drenched:* The color field IS the page ground.
27
+ - **Derive Light vs. Dark From Physical Reality:** Write one sentence naming *who uses this surface, where they sit, and under what ambient lighting*, and let that physical scene determine light vs. dark polarity, never category habit.
28
+ - **Three-Family Cultural Derivation:** List concrete references spanning at least **3 material/graphic families** from the audience's real world (print traditions, physical architecture/materials, real-world instruments/rituals) rather than copying competitor websites.
29
+
30
+ ## 4. Dual-Soul Art Direction (`canvas-design` + `Impeccable` Essence)
31
+
32
+ Fuse BOTH qualities across every hero and editorial visual (keeping all art prompts in crisp English):
33
+ - **Soul A (1-Second Human Warmth & Chiaroscuro Depth):** Tell the story in 1 second via authentic human scenes, candid daylight photography (`human-editorial-photography.md`), or illuminated architectural thresholds with 3 depth planes.
34
+ - **Soul B (Systematic Museum Craft):** When producing code-native plates (`procedural-gallery-craft.md`), reward close zoom with dense engraving craft (18-32 strand parametric curves, halftone topographies, fine hatching, tactile paper/surface grain, `90%` visual form / `10%` typography) and a strict **Zero-Addition Pass 2 polish**.
35
+ - **Balanced Polarity Rhythm:** Honor the researched brand's light/dark balance across multi-asset series (never defaulting to 4/4 monochrome dark on a light-canvas brand).
36
+
37
+ ## 5. Author One Unforgettable Signature Moment per Surface
38
+
39
+ Every `Persuade` or `Experience` page earns **one** dominant authored centerpiece (never 10 competing gimmicks):
40
+ - **Live Interactive Specimen:** A real, working micro-version of the product right in the viewport (live filterable audit view, interactive calculator, real component sandbox).
41
+ - **Decisive Documentary Visual:** One honest, film-grade human photograph or museum-caliber procedural plate carrying real visual authority.
42
+ - **Tactile Spatial Continuity:** Shared-element View Transition or calibrated spatial scroll rhythm where surfaces hold physical mass.
43
+ - **Curated Material Contrast:** Deliberate polarity shift across sections obeying the researched brand's surface proportion budget.
44
+
45
+ On `Operate` and `Read` pages, spend craft on **compounding precision**: instant `Cmd+K` search, snappy keyboard navigation, `tabular-nums`, themed browser surfaces (`::selection`, focus rings, scrollbars), and calm zero-clutter empty states.
46
+
47
+ ## 6. Three-Question Creative Self-Challenge
48
+
49
+ Before finalizing `.millar/style-dna.md`:
50
+ 1. *If I hide the logo, would Page 3 still be unmistakably recognizable as the same brand and craft caliber as Page 1?*
51
+ 2. *Could someone guess my aesthetic purely from the product category (or from "avoid generic SaaS")?* (If yes -> dig deeper.)
52
+ 3. *Are any two adjacent sections repeating the same card grid, or is any eyebrow chip / decorative gradient / fake metric cluttering truth?* (If yes -> cut it.)
@@ -0,0 +1,32 @@
1
+ # Track Routing, Phase Gates & Cross-Skill Handoffs
2
+
3
+ Use this reference to select the exact track and enforce clean phase handoffs across Antigravity, Claude Code, Codex, and Cursor.
4
+
5
+ ## 1. Track Decision Matrix
6
+
7
+ | Signal in User Request | Track | Rationale |
8
+ |---|---|---|
9
+ | "Fix button spacing", "Fix broken filter", "Update one component prop" | **Track S** | Surgical minimal diff (`agency-minimal-change-engineer` discipline); avoid unsolicited refactors or re-researching the whole site. |
10
+ | "I already have hero images/animations; build the rest of the site", "Add /pricing and /about matching our homepage" | **Track M** | Mandatory Visual/Motion DNA extraction (`millar-deep-research`) + `.millar/style-dna.md` + matching secondary visuals (`millar-create-image`) + 6-axis Cross-Page Continuity audit. |
11
+ | "Build a new web app / marketing site from scratch", "Redesign our whole website" | **Track L** | Full discovery, Creative Divergence Protocol, Style DNA Contract, bespoke assets/motion, vertical-slice architecture, and full 5-layer QA gate. |
12
+
13
+ ## 2. Phase Gate Artifacts (`.millar/`)
14
+
15
+ Store lightweight handoff documents in `.millar/` inside the project workspace (or in the task scratch directory if the repo restricts untracked files):
16
+
17
+ | Gate | Producer Skill | Artifact | Exit Condition |
18
+ |---|---|---|---|
19
+ | **Gate 1: Intent & DNA** | `millar-deep-research` | `.millar/research-dossier.md` | Every user asset/animation dissected; pinned constraints separated from open axes. |
20
+ | **Gate 2: Creative & Style Lock** | `millar-design` | `.millar/style-dna.md` | 12-axis Style DNA locked, Rut named & excluded, Secondary-Page Richness Contract written for every route. |
21
+ | **Gate 3: Visual & Motion Readiness** | `millar-create-image` + `millar-animation` | Assets + `.prompt.json` + Motion Thesis | Anchor + secondary-page visuals inspected; shared motion tokens & `prefers-reduced-motion` ready. |
22
+ | **Gate 4: Production Code** | `millar-build-web` | Working routes + unit tests | Deep modules, Server-First leaves, 5 UI states, zero mock placeholders, `typecheck` & `build` green. |
23
+ | **Gate 5: Ship-Readiness QA** | `millar-verify-web` | Test logs + screenshots | `validate_design` clean, Playwright interactive E2E green, `axe-core` 0 critical/serious, cross-page continuity `>= 4/5`, 2-axis Spec/Standards review clean. |
24
+
25
+ ## 3. Clean Escalation to Non-Frontend Specialists
26
+
27
+ When a web project requires server infrastructure beyond frontend UI, keep Millar skills focused on design/frontend/QA and route backend domains cleanly:
28
+ - **API contracts / auth / multi-tenant permissions:** `agency-backend-architect`, `agency-api-platform-engineer`, `agency-identity-access-engineer`
29
+ - **Database schema / indexing / migrations:** `agency-database-optimizer`, `agency-database-reliability-engineer`
30
+ - **Payments / billing / webhooks:** `agency-payments-billing-engineer`
31
+ - **CI/CD, Cloudflare Workers, edge caching:** `agency-devops-automator`
32
+ - **Complex debugging loop:** `diagnosing-bugs` (reproduce -> isolate -> fix -> regression test)
@@ -0,0 +1,47 @@
1
+ export interface MillarSkillReference {
2
+ file: string;
3
+ title: string;
4
+ uri: string;
5
+ content: string;
6
+ }
7
+ export interface MillarSkillRecord {
8
+ id: string;
9
+ name: string;
10
+ description: string;
11
+ version: string;
12
+ license: string;
13
+ roleLens: string[];
14
+ recommendedWith: string[];
15
+ mcpToolsUsed: string[];
16
+ solves: string;
17
+ uri: string;
18
+ skillMarkdown: string;
19
+ references: MillarSkillReference[];
20
+ }
21
+ export declare const SKILL_COMBINATION_RECIPES: readonly [{
22
+ readonly id: "track-m-sync-hero-assets";
23
+ readonly title: "Track M: Existing Hero Images/Animations -> Sync Entire Multi-Page Site";
24
+ readonly when: "You already supplied images or custom animations for Page 1 and need Features, Pricing, About, Docs, or App pages to feel equally bespoke (never industrial).";
25
+ readonly chain: readonly ["millar-web-workflow", "millar-deep-research", "millar-design", "millar-create-image", "millar-animation", "millar-build-web", "millar-verify-web"];
26
+ readonly mcpCalls: readonly ["get_skill", "get_design_tokens", "get_component", "validate_design"];
27
+ }, {
28
+ readonly id: "track-l-greenfield-creative";
29
+ readonly title: "Track L: Greenfield Website / Creative Redesign (Anti-Slop Full Pipeline)";
30
+ readonly when: "Starting a new brand direction or full multi-page web app needing creative divergence, custom visual series, signature motion, clean RSC architecture, and 5-layer QA.";
31
+ readonly chain: readonly ["millar-web-workflow", "millar-deep-research", "millar-design", "millar-create-image", "millar-animation", "millar-build-web", "millar-verify-web"];
32
+ readonly mcpCalls: readonly ["list_skills", "get_skill", "get_design_guidelines", "validate_design"];
33
+ }, {
34
+ readonly id: "photo-free-hahlex-launch";
35
+ readonly title: "Photo-Free Hahlex Marketing Launch (Measured Warmth)";
36
+ readonly when: "Building a high-craft Hahlex marketing site with zero external photos or videos using Millar's 14 code-native assets and 6 composition patterns.";
37
+ readonly chain: readonly ["millar-web-workflow", "millar-design", "millar-animation", "millar-build-web", "millar-verify-web"];
38
+ readonly mcpCalls: readonly ["get_design_guidelines", "get_visual_assets", "search_sections", "get_motion_presets", "validate_design"];
39
+ }, {
40
+ readonly id: "track-s-surgical-feature";
41
+ readonly title: "Track S: Surgical Fix, Single Component or Product Screen";
42
+ readonly when: "Fixing a UI bug, refining one component, or shipping a dense zero-gradient Product/App screen with minimal diff and strict WCAG/E2E verification.";
43
+ readonly chain: readonly ["millar-web-workflow", "millar-build-web", "millar-verify-web"];
44
+ readonly mcpCalls: readonly ["get_design_guidelines", "search_components", "get_component", "validate_design"];
45
+ }];
46
+ export declare function loadMillarSkills(rootDir: string): MillarSkillRecord[];
47
+ //# sourceMappingURL=skills-loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skills-loader.d.ts","sourceRoot":"","sources":["../src/skills-loader.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,oBAAoB,EAAE,CAAC;CACpC;AAqFD,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;EA6C5B,CAAC;AAsCX,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,iBAAiB,EAAE,CA2DrE"}
@@ -0,0 +1,204 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
+ const SKILL_META = {
4
+ "millar-web-workflow": {
5
+ roleLens: ["Engineering Conductor", "Creative Director", "UX Architect", "QA Lead"],
6
+ recommendedWith: [
7
+ "millar-deep-research",
8
+ "millar-design",
9
+ "millar-create-image",
10
+ "millar-animation",
11
+ "millar-build-web",
12
+ "millar-verify-web",
13
+ ],
14
+ mcpToolsUsed: ["list_skills", "get_skill", "get_design_guidelines", "validate_design"],
15
+ solves: "End-to-end web engineering conductor routing Track S (surgical fix), Track M (syncing secondary pages to hero assets), and Track L (full greenfield site) with Creative Divergence anti-slop gates and Matt Pocock / Agency Agents handoffs.",
16
+ },
17
+ "millar-design": {
18
+ roleLens: ["Brand Guardian", "UI Designer", "UX Architect", "Visual Storyteller", "Motion Choreographer"],
19
+ recommendedWith: ["millar-web-workflow", "millar-deep-research", "millar-create-image", "millar-animation", "millar-build-web"],
20
+ mcpToolsUsed: [
21
+ "get_design_guidelines",
22
+ "get_design_tokens",
23
+ "search_components",
24
+ "get_component",
25
+ "search_sections",
26
+ "get_visual_assets",
27
+ "validate_design",
28
+ ],
29
+ solves: "Flagship multi-page design director solving cross-page style drift so secondary pages inherit full visual materiality, framing, composition rhythm, and motion from hero assets instead of collapsing into generic industrial cards.",
30
+ },
31
+ "millar-deep-research": {
32
+ roleLens: ["UX Architect", "Visual Storyteller", "Brand Guardian"],
33
+ recommendedWith: ["millar-web-workflow", "millar-design", "millar-create-image", "millar-animation"],
34
+ mcpToolsUsed: ["get_design_guidelines", "get_design_tokens", "get_visual_assets", "get_motion_presets"],
35
+ solves: "Extracts concrete Visual & Motion DNA from user-supplied images, animations, or live references and benchmarks world-class design craft before writing code or prompts.",
36
+ },
37
+ "millar-create-image": {
38
+ roleLens: ["Visual Storyteller", "Brand Guardian", "Master Illustrator"],
39
+ recommendedWith: ["millar-deep-research", "millar-design", "millar-build-web"],
40
+ mcpToolsUsed: ["get_design_guidelines", "get_design_tokens", "get_visual_assets"],
41
+ solves: "English-only style-locked art direction (80% prefix / 20% subject), authentic human editorial photography (anti-wax-skin, cross-shot film roll continuity), and 4-layer museum-grade procedural gallery craft + Zero-Addition Pass 2 polish on 503/offline.",
42
+ },
43
+ "millar-animation": {
44
+ roleLens: ["Motion Choreographer", "Whimsy Injector", "UI Designer"],
45
+ recommendedWith: ["millar-deep-research", "millar-design", "millar-build-web", "millar-verify-web"],
46
+ mcpToolsUsed: ["get_motion_presets", "get_design_guidelines", "validate_design"],
47
+ solves: "Researches user-aligned motion patterns and implements compositor-safe, interruptible springs, View Transitions, and static-first prefers-reduced-motion choreography matching existing hero animations.",
48
+ },
49
+ "millar-build-web": {
50
+ roleLens: ["Frontend Developer", "Software Architect", "Minimal Change Engineer"],
51
+ recommendedWith: ["millar-web-workflow", "millar-design", "millar-animation", "millar-verify-web"],
52
+ mcpToolsUsed: [
53
+ "get_design_tokens",
54
+ "search_components",
55
+ "get_component",
56
+ "search_sections",
57
+ "get_section",
58
+ "search_templates",
59
+ "get_template",
60
+ "validate_design",
61
+ ],
62
+ solves: "Production frontend engineering combining deep modules, TDD vertical slices, Server-First React/Next.js boundaries, 5 mandatory interactive UI states, Core Web Vitals (LCP/INP/CLS), semantic SEO, and minimal-change restraint.",
63
+ },
64
+ "millar-verify-web": {
65
+ roleLens: ["QA Engineer", "Harsh Art Critic", "Section 508 Accessibility Specialist", "Code Reviewer"],
66
+ recommendedWith: ["millar-web-workflow", "millar-build-web", "millar-design", "millar-animation"],
67
+ mcpToolsUsed: ["validate_design", "get_design_guidelines"],
68
+ solves: "Five-layer ship-readiness QA gate with bundled Zero-MCP standalone CLI (scripts/millar-audit.mjs), Playwright interactive E2E, anti-clip-art/anti-wax-skin Layer 3B critique, axe-core WCAG 2.1 AA, and Fresh-Context Independent Finish Reviewer.",
69
+ },
70
+ };
71
+ export const SKILL_COMBINATION_RECIPES = [
72
+ {
73
+ id: "track-m-sync-hero-assets",
74
+ title: "Track M: Existing Hero Images/Animations -> Sync Entire Multi-Page Site",
75
+ when: "You already supplied images or custom animations for Page 1 and need Features, Pricing, About, Docs, or App pages to feel equally bespoke (never industrial).",
76
+ chain: [
77
+ "millar-web-workflow",
78
+ "millar-deep-research",
79
+ "millar-design",
80
+ "millar-create-image",
81
+ "millar-animation",
82
+ "millar-build-web",
83
+ "millar-verify-web",
84
+ ],
85
+ mcpCalls: ["get_skill", "get_design_tokens", "get_component", "validate_design"],
86
+ },
87
+ {
88
+ id: "track-l-greenfield-creative",
89
+ title: "Track L: Greenfield Website / Creative Redesign (Anti-Slop Full Pipeline)",
90
+ when: "Starting a new brand direction or full multi-page web app needing creative divergence, custom visual series, signature motion, clean RSC architecture, and 5-layer QA.",
91
+ chain: [
92
+ "millar-web-workflow",
93
+ "millar-deep-research",
94
+ "millar-design",
95
+ "millar-create-image",
96
+ "millar-animation",
97
+ "millar-build-web",
98
+ "millar-verify-web",
99
+ ],
100
+ mcpCalls: ["list_skills", "get_skill", "get_design_guidelines", "validate_design"],
101
+ },
102
+ {
103
+ id: "photo-free-hahlex-launch",
104
+ title: "Photo-Free Hahlex Marketing Launch (Measured Warmth)",
105
+ when: "Building a high-craft Hahlex marketing site with zero external photos or videos using Millar's 14 code-native assets and 6 composition patterns.",
106
+ chain: ["millar-web-workflow", "millar-design", "millar-animation", "millar-build-web", "millar-verify-web"],
107
+ mcpCalls: ["get_design_guidelines", "get_visual_assets", "search_sections", "get_motion_presets", "validate_design"],
108
+ },
109
+ {
110
+ id: "track-s-surgical-feature",
111
+ title: "Track S: Surgical Fix, Single Component or Product Screen",
112
+ when: "Fixing a UI bug, refining one component, or shipping a dense zero-gradient Product/App screen with minimal diff and strict WCAG/E2E verification.",
113
+ chain: ["millar-web-workflow", "millar-build-web", "millar-verify-web"],
114
+ mcpCalls: ["get_design_guidelines", "search_components", "get_component", "validate_design"],
115
+ },
116
+ ];
117
+ function parseFrontmatter(markdown) {
118
+ const match = markdown.match(/^---\r?\n([\s\S]*?)\r?\n---/);
119
+ if (!match?.[1])
120
+ return {};
121
+ const result = {};
122
+ for (const line of match[1].split(/\r?\n/)) {
123
+ const kv = line.match(/^([a-zA-Z0-9_-]+):\s*(.+)$/);
124
+ if (!kv?.[1] || !kv[2])
125
+ continue;
126
+ result[kv[1]] = kv[2].trim().replace(/^"(.*)"$/, "$1").replace(/^'(.*)'$/, "$1");
127
+ }
128
+ return result;
129
+ }
130
+ function extractFirstHeading(markdown, fallback) {
131
+ const match = markdown.match(/^#\s+(.+)$/m);
132
+ return match?.[1]?.trim() ?? fallback;
133
+ }
134
+ function resolveSkillsRoot(rootDir) {
135
+ const candidates = [
136
+ path.join(rootDir, "skills"),
137
+ path.join(import.meta.dirname, "skills"),
138
+ path.resolve(import.meta.dirname, "../dist/skills"),
139
+ ];
140
+ for (const candidate of candidates) {
141
+ if (fs.existsSync(candidate) && fs.statSync(candidate).isDirectory()) {
142
+ return candidate;
143
+ }
144
+ }
145
+ return null;
146
+ }
147
+ export function loadMillarSkills(rootDir) {
148
+ const skillsRoot = resolveSkillsRoot(rootDir);
149
+ if (!skillsRoot)
150
+ return [];
151
+ const entries = fs
152
+ .readdirSync(skillsRoot, { withFileTypes: true })
153
+ .filter((d) => d.isDirectory())
154
+ .map((d) => d.name)
155
+ .sort();
156
+ const records = [];
157
+ for (const dirName of entries) {
158
+ const skillPath = path.join(skillsRoot, dirName, "SKILL.md");
159
+ if (!fs.existsSync(skillPath))
160
+ continue;
161
+ const skillMarkdown = fs.readFileSync(skillPath, "utf8");
162
+ const fm = parseFrontmatter(skillMarkdown);
163
+ const id = fm.name ?? dirName;
164
+ const curated = SKILL_META[id] ?? {
165
+ roleLens: ["UI Designer"],
166
+ recommendedWith: ["millar-design"],
167
+ mcpToolsUsed: ["validate_design"],
168
+ solves: fm.description ?? "",
169
+ };
170
+ const refDir = path.join(skillsRoot, dirName, "references");
171
+ const references = [];
172
+ if (fs.existsSync(refDir) && fs.statSync(refDir).isDirectory()) {
173
+ const refFiles = fs
174
+ .readdirSync(refDir)
175
+ .filter((f) => f.endsWith(".md"))
176
+ .sort();
177
+ for (const file of refFiles) {
178
+ const content = fs.readFileSync(path.join(refDir, file), "utf8");
179
+ references.push({
180
+ file,
181
+ title: extractFirstHeading(content, file),
182
+ uri: `millar://skills/${id}/references/${file}`,
183
+ content,
184
+ });
185
+ }
186
+ }
187
+ records.push({
188
+ id,
189
+ name: id,
190
+ description: fm.description ?? "",
191
+ version: fm.version ?? "0.1.0-draft.1",
192
+ license: fm.license ?? "MIT",
193
+ roleLens: curated.roleLens,
194
+ recommendedWith: curated.recommendedWith,
195
+ mcpToolsUsed: curated.mcpToolsUsed,
196
+ solves: curated.solves,
197
+ uri: `millar://skills/${id}`,
198
+ skillMarkdown,
199
+ references,
200
+ });
201
+ }
202
+ return records;
203
+ }
204
+ //# sourceMappingURL=skills-loader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skills-loader.js","sourceRoot":"","sources":["../src/skills-loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AA+B7B,MAAM,UAAU,GAAqC;IACnD,qBAAqB,EAAE;QACrB,QAAQ,EAAE,CAAC,uBAAuB,EAAE,mBAAmB,EAAE,cAAc,EAAE,SAAS,CAAC;QACnF,eAAe,EAAE;YACf,sBAAsB;YACtB,eAAe;YACf,qBAAqB;YACrB,kBAAkB;YAClB,kBAAkB;YAClB,mBAAmB;SACpB;QACD,YAAY,EAAE,CAAC,aAAa,EAAE,WAAW,EAAE,uBAAuB,EAAE,iBAAiB,CAAC;QACtF,MAAM,EACJ,8OAA8O;KACjP;IACD,eAAe,EAAE;QACf,QAAQ,EAAE,CAAC,gBAAgB,EAAE,aAAa,EAAE,cAAc,EAAE,oBAAoB,EAAE,sBAAsB,CAAC;QACzG,eAAe,EAAE,CAAC,qBAAqB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,kBAAkB,CAAC;QAC/H,YAAY,EAAE;YACZ,uBAAuB;YACvB,mBAAmB;YACnB,mBAAmB;YACnB,eAAe;YACf,iBAAiB;YACjB,mBAAmB;YACnB,iBAAiB;SAClB;QACD,MAAM,EACJ,sOAAsO;KACzO;IACD,sBAAsB,EAAE;QACtB,QAAQ,EAAE,CAAC,cAAc,EAAE,oBAAoB,EAAE,gBAAgB,CAAC;QAClE,eAAe,EAAE,CAAC,qBAAqB,EAAE,eAAe,EAAE,qBAAqB,EAAE,kBAAkB,CAAC;QACpG,YAAY,EAAE,CAAC,uBAAuB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,oBAAoB,CAAC;QACvG,MAAM,EACJ,yKAAyK;KAC5K;IACD,qBAAqB,EAAE;QACrB,QAAQ,EAAE,CAAC,oBAAo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