@hegemonart/get-design-done 1.34.2 → 1.34.4

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.
@@ -0,0 +1,155 @@
1
+ /**
2
+ * print/validate-print-css.cjs — static print-CSS constraint validator
3
+ * (Phase 34.3-01).
4
+ *
5
+ * Pure, deterministic regex/string analysis of a print CSS/HTML STRING. Same
6
+ * input -> identical output. It checks the statically-verifiable SUBSET of the
7
+ * constraint catalogue in `reference/print-design.md` §8 — the spec is the
8
+ * authority; the `rule` ids emitted here are constraint-ids defined there.
9
+ *
10
+ * WHAT IS CHECKED (the five deterministic classes, emitted in a stable order):
11
+ * PR-PAGE-01 an `@page` rule is present — the print box model. Its absence in
12
+ * a print stylesheet means no defined page geometry. (Absence flagged.)
13
+ * PR-BLEED-01 a bleed box / crop-marks signal is present — a CSS `bleed:`
14
+ * declaration, a `marks:` (crop|cross) declaration, or a documented
15
+ * bleed/crop-marks note. (Total absence flagged.)
16
+ * PR-CMYK-01 a CMYK-awareness signal is present — a `cmyk(` color, a
17
+ * `color-profile` / `@color-profile` reference, or a documented CMYK
18
+ * note. (Total RGB-only absence flagged.)
19
+ * PR-FONT-01 a font-embed signal is present — an `@font-face` rule carrying a
20
+ * `src:` (embedded font), or a documented font-embed/outline note. A
21
+ * bare system-font-stack with no embed is flagged.
22
+ * PR-DPI-01 a 300dpi raster-fallback signal is present — an `image-resolution:`
23
+ * declaration (300dpi / from-image), a `min-resolution` query, or a
24
+ * documented 300dpi note. (Absence flagged.)
25
+ *
26
+ * WHAT IS *NOT* CHECKED (catalogued in reference/print-design.md as render-tested
27
+ * guidance — verified by the optional Paged.js-headless-Chrome / PDFKit render
28
+ * connection at 34.3-02, never by this validator): exact overprint/knockout
29
+ * behavior, ICC-profile correctness / on-press gamut matching, trap/registration,
30
+ * true vector tessellation, and per-output preflight (PR-*-02/03, PR-UNIT-01,
31
+ * PR-COLOR-01..03).
32
+ *
33
+ * PURITY (D-02 / D-10): operates only on the passed string — no fs of the
34
+ * document, no network, no child-process spawn, no pdfkit/paged/puppeteer/
35
+ * playwright runtime import, no Date, no process.env. This file has zero
36
+ * require() calls (node builtins included).
37
+ */
38
+
39
+ 'use strict';
40
+
41
+ // --- PR-PAGE-01: an @page rule is present ---------------------------------
42
+ // Require an actual @page RULE (an optional `:pseudo` selector then a `{` block),
43
+ // not the bare token — so negative prose like "NO @page rule" in a comment does
44
+ // not count as a present rule.
45
+ const AT_PAGE_RE = /@page\b[^;{}]*\{/i;
46
+
47
+ // --- PR-BLEED-01: a bleed box / crop-marks signal -------------------------
48
+ // A CSS `bleed:` descriptor, a `marks:` (crop|cross) descriptor, or a
49
+ // documented bleed/crop-marks note. The declaration forms require a value after
50
+ // the colon (so a negative-prose "NO bleed box" comment does NOT match); the
51
+ // note form requires the word "crop"/"registration" adjacent to "mark(s)".
52
+ const BLEED_DECL_RE = /\bbleed\s*:\s*\S/i;
53
+ const MARKS_DECL_RE = /\bmarks\s*:\s*(?:crop|cross)\b/i;
54
+ const CROP_MARKS_NOTE_RE = /\b(?:crop|registration)\s+marks?\b/i;
55
+
56
+ // --- PR-CMYK-01: a CMYK-awareness signal ----------------------------------
57
+ // A cmyk() color, a color-profile / @color-profile reference, or a documented
58
+ // "CMYK" note (the word CMYK anywhere — a comment recording production intent).
59
+ const CMYK_FN_RE = /\bcmyk\s*\(/i;
60
+ const COLOR_PROFILE_RE = /@?color-profile\b/i;
61
+ const CMYK_NOTE_RE = /\bCMYK\b/i;
62
+
63
+ // --- PR-FONT-01: a font-embed signal --------------------------------------
64
+ // An @font-face rule whose body carries a `src:` (an embedded font), or a
65
+ // documented font-embed/outline note.
66
+ const FONT_FACE_SRC_RE = /@font-face\s*\{[^{}]*\bsrc\s*:/i;
67
+ const FONT_EMBED_NOTE_RE = /\b(?:font[\s-]*embed(?:ding|ded)?|embed(?:ded)?\s+font|outline(?:d)?\s+(?:to\s+)?(?:vector|font)|font[\s-]*outline)\b/i;
68
+
69
+ // --- PR-DPI-01: a 300dpi raster-fallback signal ---------------------------
70
+ // An image-resolution declaration, a min-resolution query, or a documented
71
+ // 300dpi note (300 immediately followed by dpi/ppi, optionally spaced/hyphenated).
72
+ const IMAGE_RESOLUTION_RE = /\bimage-resolution\s*:/i;
73
+ const MIN_RESOLUTION_RE = /\bmin-resolution\b/i;
74
+ const DPI_300_NOTE_RE = /\b300\s*-?\s*(?:dpi|ppi)\b/i;
75
+
76
+ /**
77
+ * Validate a print CSS/HTML string against the statically-checkable constraint
78
+ * subset of reference/print-design.md §8.
79
+ *
80
+ * @param {string} input the print CSS (or HTML carrying a print stylesheet);
81
+ * the caller reads the file and passes the content — this function never
82
+ * touches the filesystem
83
+ * @param {{ checks?: string[] }} [opts] reserved for future toggles; default
84
+ * runs all five classes
85
+ * @returns {{ ok: boolean, violations: Array<{ rule: string, detail: string }> }}
86
+ * `ok === (violations.length === 0)`; each violation's `rule` is a catalogued
87
+ * constraint-id and `detail` is a short human string.
88
+ */
89
+ function validatePrintCss(input, opts) {
90
+ if (typeof input !== 'string') {
91
+ throw new TypeError('validatePrintCss(input): input must be a string');
92
+ }
93
+ void opts; // reserved
94
+ /** @type {Array<{ rule: string, detail: string }>} */
95
+ const violations = [];
96
+
97
+ // --- PR-PAGE-01: an @page rule is present (the print box model) -----------
98
+ if (!AT_PAGE_RE.test(input)) {
99
+ violations.push({
100
+ rule: 'PR-PAGE-01',
101
+ detail: 'a print stylesheet must declare an @page rule (the print box model — size/margin/marks); none found',
102
+ });
103
+ }
104
+
105
+ // --- PR-BLEED-01: a bleed box / crop-marks signal -------------------------
106
+ const hasBleed =
107
+ BLEED_DECL_RE.test(input) ||
108
+ MARKS_DECL_RE.test(input) ||
109
+ CROP_MARKS_NOTE_RE.test(input);
110
+ if (!hasBleed) {
111
+ violations.push({
112
+ rule: 'PR-BLEED-01',
113
+ detail: 'declare a bleed box / crop marks (a `bleed:` declaration, a `marks: crop|cross` declaration, or a documented bleed/crop-marks note) so edge-to-edge content survives the trim',
114
+ });
115
+ }
116
+
117
+ // --- PR-CMYK-01: a CMYK-awareness signal ----------------------------------
118
+ const hasCmyk =
119
+ CMYK_FN_RE.test(input) ||
120
+ COLOR_PROFILE_RE.test(input) ||
121
+ CMYK_NOTE_RE.test(input);
122
+ if (!hasCmyk) {
123
+ violations.push({
124
+ rule: 'PR-CMYK-01',
125
+ detail: 'signal CMYK awareness (a cmyk() color, a color-profile/@color-profile reference, or a documented CMYK-target note); print is subtractive CMYK, not screen RGB',
126
+ });
127
+ }
128
+
129
+ // --- PR-FONT-01: a font-embed signal --------------------------------------
130
+ const hasFontEmbed =
131
+ FONT_FACE_SRC_RE.test(input) ||
132
+ FONT_EMBED_NOTE_RE.test(input);
133
+ if (!hasFontEmbed) {
134
+ violations.push({
135
+ rule: 'PR-FONT-01',
136
+ detail: 'embed or outline fonts (an @font-face with an embedded src:, or a documented font-embed/outline note); print RIPs have no web fonts and no system-font fallback',
137
+ });
138
+ }
139
+
140
+ // --- PR-DPI-01: a 300dpi raster-fallback signal ---------------------------
141
+ const hasDpi =
142
+ IMAGE_RESOLUTION_RE.test(input) ||
143
+ MIN_RESOLUTION_RE.test(input) ||
144
+ DPI_300_NOTE_RE.test(input);
145
+ if (!hasDpi) {
146
+ violations.push({
147
+ rule: 'PR-DPI-01',
148
+ detail: 'provide a 300dpi raster-fallback signal (image-resolution: 300dpi/from-image, a min-resolution query, or a documented 300dpi note); screen 72/96dpi rasters pixelate in print',
149
+ });
150
+ }
151
+
152
+ return { ok: violations.length === 0, violations };
153
+ }
154
+
155
+ module.exports = { validatePrintCss };
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: gdd-connections
3
- description: "Interactive onboarding wizard for the 12 external integrations the pipeline supports — probes all (`figma`, `refero`, `preview`, `storybook`, `chromatic`, `graphify`, `pinterest`, `claude-design`, `paper-design`, `pencil-dev`, `21st-dev`, `magic-patterns`), recommends based on project type, walks the user through setup (auto-run MCP install or copy-command fallback), writes results to `STATE.md <connections>`. Use after `/gdd:new-project` or whenever the user wants to add, inspect, or skip a connection. Re-runnable anytime."
3
+ description: "Interactive onboarding wizard for the 14 external integrations the pipeline supports — probes all (`figma`, `refero`, `preview`, `storybook`, `chromatic`, `graphify`, `pinterest`, `claude-design`, `paper-design`, `pencil-dev`, `21st-dev`, `magic-patterns`, `lazyweb`, `mobbin`), recommends based on project type, walks the user through setup (auto-run MCP install or copy-command fallback), writes results to `STATE.md <connections>`. Use after `/gdd:new-project` or whenever the user wants to add, inspect, or skip a connection. Re-runnable anytime."
4
4
  argument-hint: "[list | <connection-name> | --auto]"
5
5
  user-invocable: true
6
6
  tools: Read, Write, Bash, Glob, Grep, AskUserQuestion, ToolSearch
@@ -8,11 +8,11 @@ tools: Read, Write, Bash, Glob, Grep, AskUserQuestion, ToolSearch
8
8
 
9
9
  # /gdd:connections
10
10
 
11
- Interactive onboarding for the 12 external integrations the pipeline supports. Replaces "probe silently at scan entry and hope the user noticed" with an explicit "here is what can plug in, here is how."
11
+ Interactive onboarding for the 14 external integrations the pipeline supports. Replaces "probe silently at scan entry and hope the user noticed" with an explicit "here is what can plug in, here is how."
12
12
 
13
13
  Canonical per-connection specs live in `../../connections/<name>.md` (one file per integration). The capability matrix + probe-pattern spec live in `../../connections/connections.md`. This skill is the **user-facing front end** for those specs.
14
14
 
15
- For the 12 probe scripts (MCP + HTTP + CLI + file probes), bucket categorization, per-connection setup screen, auto-run eligibility matrix, value-prop one-liners, and STATE.md / config.json write contracts, see `./connections-onboarding.md`. For the cross-skill probe pattern + connection-handshake summary, see `../../reference/shared-preamble.md#connection-handshake-summary`. For the cross-skill output discipline, see `../../reference/shared-preamble.md#output-contract-reminders`.
15
+ For the 14 probe scripts (MCP + HTTP + CLI + file probes), bucket categorization, per-connection setup screen, auto-run eligibility matrix, value-prop one-liners, and STATE.md / config.json write contracts, see `./connections-onboarding.md`. For the cross-skill probe pattern + connection-handshake summary, see `../../reference/shared-preamble.md#connection-handshake-summary`. For the cross-skill output discipline, see `../../reference/shared-preamble.md#output-contract-reminders`.
16
16
 
17
17
  ---
18
18
 
@@ -38,7 +38,7 @@ For the 12 probe scripts (MCP + HTTP + CLI + file probes), bucket categorization
38
38
 
39
39
  ## Workflow
40
40
 
41
- 1. **Probe all 12 connections** — run every probe script per `./connections-onboarding.md#step-1--probe-all-12-connections`. MCP probes use `ToolSearch` first; HTTP / CLI / file probes follow non-MCP patterns. Merge results into `STATE.md <connections>` with the three-value schema (`available | unavailable | not_configured`) — never add new values.
41
+ 1. **Probe all 14 connections** — run every probe script per `./connections-onboarding.md#step-1--probe-all-14-connections`. MCP probes use `ToolSearch` first; HTTP / CLI / file probes follow non-MCP patterns. Merge results into `STATE.md <connections>` with the three-value schema (`available | unavailable | not_configured`) — never add new values.
42
42
  2. **Categorize + build summary** — bucket each probe result (available / recommended / optional / skipped / unavailable) using project-hint detection. Detail + recommendation mapping: `./connections-onboarding.md#step-2--bucket-categorization`.
43
43
  3. **Print summary table** — show buckets + value-prop one-liners (verbatim from `./connections-onboarding.md#step-3--summary-table`).
44
44
  4. **Route by mode** — `list` / `--auto` exits after summary; `<name>` jumps straight to Step 5; default mode opens an AskUserQuestion (configure recommended / pick one by one / configure all optional / re-check specific / exit). Routing detail: `./connections-onboarding.md#step-4--route-by-mode`.
@@ -9,7 +9,7 @@ last_updated: 2026-05-18
9
9
 
10
10
  Source: extracted from `skills/connections/SKILL.md` (Phase 28.5 rework — D-10 extract-then-link).
11
11
  The skill's load-bearing routing + invocation-mode dispatch stays in `../skills/connections/SKILL.md`;
12
- this file holds the 12 probe scripts, bucket categorization, per-connection setup screen,
12
+ this file holds the 14 probe scripts, bucket categorization, per-connection setup screen,
13
13
  auto-run eligibility matrix, value-prop one-liners, and STATE.md / config.json write contracts.
14
14
 
15
15
  # Connections Onboarding Procedure
@@ -27,7 +27,7 @@ this file does NOT duplicate them; it points at them by name.
27
27
 
28
28
  ---
29
29
 
30
- ## Step 1 — Probe all 12 connections
30
+ ## Step 1 — Probe all 14 connections
31
31
 
32
32
  Run every probe below in order. MCP probes call `ToolSearch` first (deferred tools fail silently without it). Write every result to `STATE.md <connections>` when done.
33
33
 
@@ -86,6 +86,20 @@ ToolSearch({ query: "mcp__magic_patterns", max_results: 5 })
86
86
  → Non-empty → magic_patterns: available
87
87
  ```
88
88
 
89
+ **lazyweb:** (discover Tier 1 — free, tried first; D-01)
90
+ ```
91
+ ToolSearch({ query: "lazyweb", max_results: 5 })
92
+ → Empty → lazyweb: not_configured
93
+ → Non-empty → lazyweb: available
94
+ ```
95
+
96
+ **mobbin:** (discover Tier 2 — paid, mobile/flow-level; D-01)
97
+ ```
98
+ ToolSearch({ query: "mobbin", max_results: 5 })
99
+ → Empty → mobbin: not_configured
100
+ → Non-empty → mobbin: available
101
+ ```
102
+
89
103
  ### Non-MCP probes
90
104
 
91
105
  **storybook** (HTTP):
@@ -131,7 +145,7 @@ Bash: ls .design/handoff/ 2>/dev/null || find . -maxdepth 3 \
131
145
  → Non-empty → claude_design: available
132
146
  ```
133
147
 
134
- After all 12 probes complete, merge results into `STATE.md <connections>`. Preserve the three-value schema verbatim (`available | unavailable | not_configured`). Do not add new values.
148
+ After all 14 probes complete, merge results into `STATE.md <connections>`. Preserve the three-value schema verbatim (`available | unavailable | not_configured`). Do not add new values.
135
149
 
136
150
  ---
137
151
 
@@ -167,7 +181,7 @@ HAS_FIGMA_HINT=$( grep -r "figma\.com/file" -l . --include="*.md" 2>/dev/null |
167
181
  | `HAS_STORYBOOK_DIR` or storybook available | storybook, chromatic |
168
182
  | `HAS_PEN_FILES` | pencil-dev |
169
183
  | `HAS_REACT` | 21st-dev, magic-patterns |
170
- | Always | refero, preview |
184
+ | Always | refero, preview, lazyweb (free — cost-aware default, D-01) |
171
185
 
172
186
  ---
173
187
 
@@ -212,6 +226,8 @@ One-line value props (use verbatim):
212
226
  | pencil-dev | `.pen` spec files as canonical design source |
213
227
  | 21st-dev | AI component generator (marketplace search) |
214
228
  | magic-patterns | AI component generator (DS-aware) |
229
+ | lazyweb | free design reference search (pricing/onboarding/redesign) — discover Tier 1 |
230
+ | mobbin | curated mobile + flow-level references (paid) — discover Tier 2 |
215
231
 
216
232
  ---
217
233
 
@@ -239,7 +255,7 @@ options:
239
255
  - "Exit" → emit ## CONNECTIONS COMPLETE, exit
240
256
  ```
241
257
 
242
- If recommended bucket is empty, swap that option for "Show all 12 and pick."
258
+ If recommended bucket is empty, swap that option for "Show all 14 and pick."
243
259
 
244
260
  ---
245
261
 
@@ -296,6 +312,8 @@ options:
296
312
  | 21st-dev | `npx @21st-dev/magic init` + env var | ✗ no | Env var required — force manual |
297
313
  | pencil-dev | VS Code extension | ✗ no | IDE-level install — force manual |
298
314
  | claude-design | handoff bundle drop | ✗ no | User-driven file drop — force manual |
315
+ | mobbin | `claude mcp add mobbin --transport http https://api.mobbin.com/mcp` | ✓ yes | Reversible MCP add; no credential filesystem-write (OAuth on first call) |
316
+ | lazyweb | `claude plugin install lazyweb@lazyweb` (after token write to `~/.lazyweb/`) | ✗ no | Writes a bearer token to disk — force manual (user-consent step) |
299
317
 
300
318
  For non-auto-run connections, hide the "Run install command now" option entirely in 5.3.
301
319
 
@@ -68,7 +68,25 @@ C2. Empty result -> pinterest: not_configured
68
68
 
69
69
  No live `pinterest_search` call at probe time — ToolSearch presence is sufficient. The synthesizer makes the actual search calls.
70
70
 
71
- After all probes (A, B, C), update `.design/STATE.md` `<connections>` with the results and continue. Downstream stages (design-context-builder) read `<connections>` from STATE.md rather than re-probing.
71
+ ### D Lazyweb probe (ToolSearch-only free, discover Tier 1 per D-01)
72
+
73
+ ```
74
+ D1. ToolSearch({ query: "lazyweb", max_results: 5 })
75
+ D2. Empty result -> lazyweb: not_configured
76
+ Non-empty -> lazyweb: available
77
+ ```
78
+
79
+ ### E — Mobbin probe (ToolSearch-only — paid, discover Tier 2 per D-01)
80
+
81
+ ```
82
+ E1. ToolSearch({ query: "mobbin", max_results: 5 })
83
+ E2. Empty result -> mobbin: not_configured
84
+ Non-empty -> mobbin: available
85
+ ```
86
+
87
+ **Reference-source tier order (cost-aware, D-01):** Lazyweb (free, tried first) → Mobbin / Refero (paid, whichever is bound + subscribed) → Pinterest → awesome-design-md → WebFetch.
88
+
89
+ After all probes (A, B, C, D, E), update `.design/STATE.md` `<connections>` with the results and continue. Downstream stages (design-context-builder) read `<connections>` from STATE.md rather than re-probing.
72
90
 
73
91
  ---
74
92