@ranimontagna/agent-toolkit 0.1.20 → 0.1.22

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.
package/README.md CHANGED
@@ -489,12 +489,12 @@ Defaults come from `tools.lock.json`:
489
489
  CAVEMAN_PACKAGE=github:JuliusBrussee/caveman#25d22f864ad68cc447a4cb93aefde918aa4aec9f
490
490
  GRAPHIFY_PACKAGE=graphifyy==0.8.51
491
491
  GRAPHIFY_INSTALLER=uv
492
- GSD_PACKAGE=get-shit-done-cc@1.42.3
492
+ GSD_PACKAGE=@opengsd/gsd-core@1.6.1
493
493
  SKILLS_CLI_PACKAGE=skills@1.5.13
494
494
  ANTIGRAVITY_INSTALL_SCRIPT=https://antigravity.google/cli/install.sh
495
- CLAUDE_CLI_PACKAGE=@anthropic-ai/claude-code@2.1.195
496
- CODEX_CLI_PACKAGE=@openai/codex@0.142.3
497
- OPENCODE_CLI_PACKAGE=opencode-ai@1.17.11
495
+ CLAUDE_CLI_PACKAGE=@anthropic-ai/claude-code@2.1.204
496
+ CODEX_CLI_PACKAGE=@openai/codex@0.143.0
497
+ OPENCODE_CLI_PACKAGE=opencode-ai@1.17.15
498
498
  GEMINI_CLI_PACKAGE=@google/gemini-cli@0.49.0
499
499
  ```
500
500
 
@@ -524,7 +524,7 @@ Current external sources:
524
524
  | RTK | GitHub release `rtk-ai/rtk@v0.43.0` | Verifies the selected asset SHA-256 before extraction |
525
525
  | Caveman | `JuliusBrussee/caveman` at commit `25d22f864ad68cc447a4cb93aefde918aa4aec9f` | Immutable GitHub npm spec |
526
526
  | Graphify | `graphifyy==0.8.51` | Blocks unpinned package overrides |
527
- | GSD | `get-shit-done-cc@1.42.3` | Blocks `@latest` unless explicitly allowed |
527
+ | GSD | `@opengsd/gsd-core@1.6.1` | Blocks `@latest` unless explicitly allowed |
528
528
  | Improve | `shadcn/improve` at commit `03369ee6d7cafbfcecc4346539b05b3dc0a603bb` | Clones the pinned ref before Agent Skills CLI install |
529
529
  | Frontend Skills | `skills@1.5.13`, `pbakaus/impeccable` and `Leonxlnx/taste-skill` at pinned commits | Clones pinned refs before install |
530
530
  | Runtime CLIs | Exact npm versions for Claude, Codex, OpenCode and Gemini | Installed or updated only when `--install-missing-clis` is enabled; Antigravity uses the official `agy` installer instead of npm |
@@ -666,8 +666,8 @@ Release a new npm version by updating `package.json`, pushing the change to
666
666
  `main`, then pushing a matching tag:
667
667
 
668
668
  ```bash
669
- git tag v0.1.20
670
- git push origin v0.1.20
669
+ git tag v0.1.22
670
+ git push origin v0.1.22
671
671
  ```
672
672
 
673
673
  For normal releases, prefer the scripted flow. It bumps `package.json`, updates
@@ -211,10 +211,27 @@ export function listCustomSkills() {
211
211
  }
212
212
  return true;
213
213
  }
214
+ function assertDirectoryPath(targetRoot) {
215
+ let current = targetRoot;
216
+ const seen = [];
217
+ while (true) {
218
+ seen.push(current);
219
+ const parent = path.dirname(current);
220
+ if (parent === current)
221
+ break;
222
+ current = parent;
223
+ }
224
+ for (const segment of seen.reverse()) {
225
+ if (fs.existsSync(segment) && !fs.statSync(segment).isDirectory()) {
226
+ throw new Error(`Cannot create skills directory: "${segment}" exists but is a file, not a directory. Remove or rename it and rerun the installer.`);
227
+ }
228
+ }
229
+ }
214
230
  function copySkillDir(sourceDir, targetRoot) {
215
231
  const name = path.basename(sourceDir);
216
232
  const destination = path.join(targetRoot, name);
217
233
  const tempDestination = `${destination}.tmp.${process.pid}`;
234
+ assertDirectoryPath(targetRoot);
218
235
  fs.mkdirSync(targetRoot, { recursive: true });
219
236
  fs.rmSync(tempDestination, { recursive: true, force: true });
220
237
  fs.cpSync(sourceDir, tempDestination, { recursive: true });
@@ -249,8 +266,14 @@ function installCustomSkillsForRuntime(runtime, skillDirs) {
249
266
  }
250
267
  else {
251
268
  for (const targetRoot of targetRoots) {
252
- const destination = copySkillDir(skillDir, targetRoot);
253
- recordSkillInstall(runtime, skillDir, destination);
269
+ try {
270
+ const destination = copySkillDir(skillDir, targetRoot);
271
+ recordSkillInstall(runtime, skillDir, destination);
272
+ }
273
+ catch (error) {
274
+ err(error instanceof Error ? error.message : String(error));
275
+ return false;
276
+ }
254
277
  }
255
278
  }
256
279
  installed += 1;
@@ -1 +1 @@
1
- {"version":3,"file":"skills.js","sourceRoot":"","sources":["../../src/skills.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,qBAAqB,EAErB,YAAY,EACZ,KAAK,GACN,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAK9D,SAAS,iBAAiB;IACxB,IAAI,OAAO,CAAC,GAAG,CAAC,mBAAmB;QAAE,OAAO,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC;IAC5E,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IACnD,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe;QAC7B,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;IAC5D,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAChD,CAAC;AAED,SAAS,eAAe;IACtB,OAAO,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;A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
1
1
  {
2
2
  "name": "@ranimontagna/agent-toolkit",
3
- "version": "0.1.20",
3
+ "version": "0.1.22",
4
4
  "description": "Personal AI agent toolkit installer for Claude Code, Codex CLI, OpenCode, Gemini CLI, Antigravity and graph-aware workflows.",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@11.8.0",
@@ -0,0 +1,98 @@
1
+ ---
2
+ name: design-to-code
3
+ description: "Convert design artifacts into React + TypeScript + Tailwind code that follows the target repository's design system and conventions. Inputs auto-detected: local HTML mockups (Claude Design / Open Design output), artifact URLs, or screenshots. Use when asked to 'transformar design em código', 'implementar mockup', 'implementar design', 'design to code', turn a Claude Design / Open Design artifact into components, or convert an HTML mockup to React. Requires the target repo to use React, TypeScript, and Tailwind. Output: components + assembled page, wired to the repo's routing/state/data-fetching patterns when detectable, with structural visual verification."
4
+ ---
5
+
6
+ # Design to Code
7
+
8
+ Convert a design artifact into production React + TypeScript + Tailwind code that looks like it was written by the target repo's own team.
9
+
10
+ ## Golden rule
11
+
12
+ **Design = intent, repo = law.**
13
+
14
+ The design tells you *what* to build — structure, hierarchy, content, interaction. The target repository tells you *how* — tokens, components, naming, wiring. When they conflict, the repo wins.
15
+
16
+ Consequences:
17
+
18
+ - Never use arbitrary Tailwind values (`bg-[#3B82F6]`, `p-[18px]`). Map every design value to the nearest repo token. The only escape is a documented exception with written justification (see `mapping.md`).
19
+ - Never invent a token, variant, or pattern the repo lacks. If the design needs one, propose it as an **explicit extension** and get approval at the Phase 3 gate.
20
+ - Reuse existing components before creating new ones. New components only when no equivalent exists.
21
+
22
+ ## Preconditions
23
+
24
+ The target repo MUST have React + TypeScript + Tailwind.
25
+
26
+ - **No Tailwind** → abort. Tell the user exactly what is missing and that this skill only targets react+ts+tailwind repos.
27
+ - **No design system** (no custom tokens, no reusable components) → degrade gracefully: use the default Tailwind scale, mark every component NEW, and warn the user that nothing could be reused.
28
+ - **Monorepo** → ask which app/package is the target before Phase 1.
29
+
30
+ ## Pipeline
31
+
32
+ Five phases, strictly gated. On entering a phase, read its reference file (same directory as this SKILL.md). Do not read phase files ahead of time — progressive disclosure keeps context lean.
33
+
34
+ | Phase | Reference | Output artifact | Gate to proceed |
35
+ |---|---|---|---|
36
+ | 1. Discovery | `discovery.md` | `repo-map.md` | Artifact written |
37
+ | 2. Input analysis | `input-analysis.md` | `design-spec.md` | Artifact written |
38
+ | 3. Mapping | `mapping.md` | `mapping-table.md` | **USER APPROVAL** |
39
+ | 4. Generation | `generation.md` | Code in target repo | Static checks pass |
40
+ | 5. Verification | `verification.md` | Verification report | Checklist passes or 3 rounds |
41
+
42
+ Phase N may not start until phase N−1's gate is satisfied. Phases 1 and 2 are independent of each other in content but run in this order so component candidates in Phase 2 can be named in the repo's style.
43
+
44
+ **Create a todo per phase when the pipeline starts.** Mark each in_progress/completed as you go.
45
+
46
+ ## Artifacts
47
+
48
+ Write intermediate artifacts to the session scratchpad directory:
49
+
50
+ - `repo-map.md` — what the repo offers (tokens, components, conventions, wiring patterns)
51
+ - `design-spec.md` — what the design asks for (component tree, observed tokens, content, states)
52
+ - `mapping-table.md` — the crossing of the two (REUSE / EXTEND / NEW decisions, token mapping, exceptions)
53
+ - `screen-backlog.md` — multi-screen runs only (see below)
54
+
55
+ Later phases **read artifacts instead of re-analyzing**. If a session is resumed mid-pipeline, read the existing artifacts and continue from the first missing one.
56
+
57
+ **Persistence across sessions:** for work likely to span sessions (multi-screen designs, large repos), write the artifacts to `.design-to-code/` at the target repo root instead of the scratchpad, and add that directory to the repo's `.gitignore` if not already ignored. A new session then resumes by reading `.design-to-code/` — repo-map and mapping decisions survive, only staleness needs re-checking (did tokens/components change since the artifact was written? `git log` on the token/component paths answers it).
58
+
59
+ ## Multi-screen designs
60
+
61
+ A design with more than ~2 screens does not fit one pipeline pass. Structure it:
62
+
63
+ 1. Phase 2 produces one `design-spec.md` **per screen** (or per tight screen group), plus `screen-backlog.md`:
64
+
65
+ ```markdown
66
+ # Screen backlog — <design>
67
+ | # | Screen | Depends on | Status | Commit |
68
+ |---|---|---|---|---|
69
+ | 1 | Chrome (sidebar+topbar) | — | done | abc123 |
70
+ | 2 | Home | 1 | done | def456 |
71
+ | 3 | Search | 1 | in progress | |
72
+ | 4 | Detail + booking modal | 1 | pending | |
73
+ ```
74
+
75
+ 2. Order the backlog: shared chrome/layout first, then screens leaf-to-complex. Phases 3–5 run **per batch** (1–2 screens), each batch ending in a commit and a backlog status update.
76
+ 3. Phase 1 runs once; Phase 3's mapping-table grows incrementally — new screens append rows, and components created by earlier batches become REUSE candidates for later ones.
77
+ 4. The consolidation pass (see `verification.md`) runs once at the end, across everything the run created.
78
+
79
+ ## The Phase 3 gate (hard stop)
80
+
81
+ `mapping-table.md` is presented to the user before any code is generated:
82
+
83
+ - EXTEND decisions modify existing components — the user must see the API diff and approve.
84
+ - Token mappings change the design's raw values — the user must see what diverges and why.
85
+
86
+ Wait for explicit approval. Apply any requested changes to the table, then enter Phase 4. Never skip this gate, even when every decision is REUSE.
87
+
88
+ **Autonomous runs:** when the user has explicitly pre-authorized unattended execution (batch run, "não precisa me perguntar", scheduled/loop mode), self-approve the gate — but record in `mapping-table.md` that it was auto-approved and why, keep every EXTEND strictly additive, and surface the full table in the final report so the user reviews it after the fact.
89
+
90
+ ## Input priority
91
+
92
+ When multiple design inputs exist for the same design:
93
+
94
+ 1. **Local HTML file** — structural source of truth
95
+ 2. **Artifact URL** — fetch, then treat as HTML
96
+ 3. **Screenshot** — vision extraction; when HTML also exists, the screenshot only validates appearance
97
+
98
+ Multiple candidate designs (e.g., two HTML files, unclear which) → ask the user. Never guess.
@@ -0,0 +1,82 @@
1
+ # Phase 1 — Discovery
2
+
3
+ ## Purpose
4
+
5
+ Inventory the target repository so every later decision (naming, reuse, tokens, wiring) is grounded in what actually exists. This phase reads the repo; it changes nothing.
6
+
7
+ ## Inputs
8
+
9
+ - Target repository working directory (ask which app/package first if monorepo).
10
+
11
+ ## Procedure
12
+
13
+ 1. **Stack detection**
14
+ - Tailwind version: `tailwind.config.{js,ts,cjs,mjs}` → v3-style config; CSS with `@theme` / `@import "tailwindcss"` → v4. Record where tokens live.
15
+ - shadcn: `components.json` present → record its aliases and `ui/` path.
16
+ - Routing: `app/` or `pages/` dir (Next.js), `react-router` / `@tanstack/react-router` in package.json. Record the idiom (file-based vs route objects) and one example route file.
17
+ - State: grep imports for `zustand`, `@reduxjs/toolkit`, `jotai`, `valtio`; note context-based patterns in `providers/` or `context/`.
18
+ - Data-fetching: `@tanstack/react-query`, `swr`, or plain `fetch` wrappers (`lib/api`, `services/`). Record one example usage.
19
+
20
+ 2. **Token inventory**
21
+ - From the Tailwind config (v3) or `@theme` block / CSS vars (v4): colors, spacing overrides, font families, radii, shadows.
22
+ - Record every custom token as `name → value`. Note whether colors are semantic (`primary`, `destructive`) or palette-step (`brand-500`).
23
+ - No custom tokens at all → note "default Tailwind scale only" (triggers the degraded mode from SKILL.md).
24
+
25
+ 3. **Component inventory**
26
+ - Scan `components/`, `src/components/`, `ui/`, and the shadcn path if present.
27
+ - Per component record: name, file path, props signature, variants (cva variants, union-typed props). **Read signatures and variant definitions only — not full implementations.**
28
+ - Large codebases: inventory `ui/` primitives fully; feature-level components by name + one-line role only.
29
+
30
+ 4. **Convention detection**
31
+ - File naming (PascalCase.tsx vs kebab-case.tsx), folder-per-feature vs flat, export style (default vs named, barrel `index.ts` or not), test file pattern (`*.test.tsx` location), class-merge helper (`cn`, `clsx`, `twMerge`).
32
+
33
+ 5. **Verify build commands**
34
+ - Actually run the repo's typecheck and build once, now. If `pnpm exec`/`npx` wrappers misbehave (hook/proxy environments can break them), fall back to `./node_modules/.bin/<tool>` and record whichever form worked — Phases 4–5 depend on these commands.
35
+
36
+ ## Output: `repo-map.md`
37
+
38
+ Write to the session scratchpad, in this shape:
39
+
40
+ ```markdown
41
+ # Repo Map — <repo name>
42
+
43
+ ## Stack
44
+ - Tailwind: v4 (tokens in src/styles/globals.css @theme)
45
+ - shadcn: yes (components.json → @/components/ui)
46
+ - Routing: Next.js app router | react-router v7 | none detected
47
+ - State: zustand (src/stores/) | none detected
48
+ - Data-fetching: react-query (src/hooks/queries/) | none detected
49
+
50
+ ## Tokens
51
+ | Kind | Token | Value |
52
+ |---|---|---|
53
+ | color | primary | #4f46e5 |
54
+ | radius | radius-lg | 12px |
55
+
56
+ ## Components
57
+ | Name | File | Props | Variants |
58
+ |---|---|---|---|
59
+ | Button | components/ui/button.tsx | variant, size, asChild | solid/ghost/outline; sm/md/lg |
60
+
61
+ ## Conventions
62
+ - Naming: kebab-case files, named exports, no barrels
63
+ - Class merge: cn() from lib/utils
64
+ - Tests: colocated *.test.tsx
65
+
66
+ ## Verified commands
67
+ - Typecheck: ./node_modules/.bin/tsc -b
68
+ - Build: ./node_modules/.bin/vite build
69
+ - Dev/preview: ./node_modules/.bin/vite preview --port 4180
70
+
71
+ ## Wiring patterns
72
+ - Route example: app/dashboard/page.tsx
73
+ - Query example: useQuery in src/hooks/queries/use-orders.ts
74
+ ```
75
+
76
+ Mark absent things explicitly as "none detected" — Phase 4 uses that to decide mock-only wiring.
77
+
78
+ ## Failure modes
79
+
80
+ - **No Tailwind** → stop, abort per SKILL.md preconditions.
81
+ - **Monorepo, target ambiguous** → ask the user which app; do not inventory everything.
82
+ - **Hundreds of components** → primitives fully, feature components as name + role. Never dump full implementations into the map.
@@ -0,0 +1,60 @@
1
+ # Phase 4 — Generation
2
+
3
+ ## Purpose
4
+
5
+ Produce the code exactly as `mapping-table.md` (approved at the gate) prescribes, written in the target repo's own style.
6
+
7
+ ## Inputs
8
+
9
+ - `mapping-table.md` (approved) — the only source of component decisions and token choices
10
+ - `design-spec.md` — structure, content, states
11
+ - `repo-map.md` — conventions and wiring patterns
12
+
13
+ ## Procedure
14
+
15
+ 1. **Order of work**
16
+ 1. **Extensions first** — smallest diffs, and they unblock reuse everywhere else. Apply each approved API diff additively; never alter existing variant behavior.
17
+ 2. **NEW components, leaf-first** — primitives before composites, so composites import real code.
18
+ 3. **Page / composition** — assemble per the design-spec component tree, preserving section order and heading hierarchy.
19
+ 4. **Wiring last** — see step 3.
20
+
21
+ 2. **Style rules (every file)**
22
+ - Strict TS: typed props (interface or type per repo habit), no `any`, no `@ts-ignore`.
23
+ - Follow `repo-map.md` conventions exactly: file naming, export style, folder placement, class-merge helper (`cn`/`clsx`).
24
+ - Tailwind classes only from the approved token mapping. Class order: layout → spacing → typography → color → states.
25
+ - No inline `style=` attributes.
26
+ - Repeated visual units (cards, rows, tiers) render from a typed data array, never copy-pasted JSX.
27
+
28
+ 3. **Wiring**
29
+ - `repo-map.md` shows a routing pattern → create the route in that idiom (app-router page, route object, etc.).
30
+ - Shows a data-fetching pattern → wire it in the repo's idiom (e.g., a `useQuery` hook) backed by the mock data, so swapping to a real endpoint is a one-line change.
31
+ - Shows a state pattern and the design needs shared state → follow it. Local UI state stays `useState`.
32
+ - Pattern "none detected" → typed mock data only: put it in the repo's `mocks/` dir if one exists, else colocate a `*.mock.ts` next to the page. Mock content comes from the design-spec Content inventory — real texts and numbers, not lorem ipsum.
33
+
34
+ 4. **Filling design gaps with restraint**
35
+ When the design doesn't specify something you must build anyway (responsive collapse it never drew, empty/error/loading states, a screen edge case):
36
+ - Default to restraint: no invented badges/pills/decorative micro-UI, no cards nested inside cards, preserve the design's negative space and rhythm.
37
+ - Reuse the design's own motifs (from the design-spec) instead of importing generic patterns.
38
+ - Every invented piece goes in the Phase 5 report under "accepted differences" — gap-filling is fine, silent invention is not.
39
+
40
+ 5. **Accessibility baseline (mandatory)**
41
+ - Semantic landmarks: `nav`, `main`, `header`, `footer`, `aside`.
42
+ - Heading hierarchy exactly as extracted in the design-spec.
43
+ - `alt` on images, labels on form controls, `button` vs `a` used by behavior (action vs navigation).
44
+ - Interactive elements keyboard-reachable with visible focus (repo's focus ring token if one exists).
45
+
46
+ 6. **Per-file self-check (before moving to the next file)**
47
+ - Does it compile in your head — every import exists per `repo-map.md`?
48
+ - Every class traceable to the approved mapping? Zero arbitrary values outside the Exceptions table?
49
+ - Props typed, mock data typed?
50
+ - Only use component APIs the repo actually has (per the `repo-map.md` props column). Don't assume shadcn idioms (`asChild`, `forwardRef` wrappers, slot props) on hand-rolled components that look similar.
51
+
52
+ ## Output
53
+
54
+ Code in the target repo. No artifact file — Phase 5 verifies directly.
55
+
56
+ ## Failure modes
57
+
58
+ - **Extension was rejected at the gate** → NEW component that wraps the existing one instead of modifying it.
59
+ - **Ambiguous wiring** (two routers present, two fetch idioms) → ask the user; don't pick silently.
60
+ - **Design-spec node impossible with approved mapping** (e.g., needs a variant the user removed at the gate) → go back to the gate with a revised proposal; don't improvise.
@@ -0,0 +1,83 @@
1
+ # Phase 2 — Input analysis
2
+
3
+ ## Purpose
4
+
5
+ Turn the design artifact into a structured spec: what sections exist, how they're laid out, what values they use, what content they carry. The spec is the contract Phase 4 implements and Phase 5 verifies against.
6
+
7
+ ## Inputs
8
+
9
+ - Design artifact(s): local HTML, artifact URL, and/or screenshot.
10
+ - `repo-map.md` (for naming component candidates in the repo's style).
11
+
12
+ ## Procedure
13
+
14
+ 1. **Detect inputs**
15
+ - Use what the user pointed at. If nothing explicit, look for obvious candidates: `*.html` mockups in cwd, `temp/`, `designs/`, or recently mentioned files/URLs.
16
+ - Multiple candidate designs and it's unclear which → **ask the user, never guess**.
17
+ - Priority when the same design exists in several forms: **design source folder > local HTML > URL (fetch it, then treat as HTML) > screenshot**. HTML + screenshot together → HTML is the structural truth; use the screenshot only to validate rendered appearance.
18
+ - **Design source folders** (Claude Design / Open Design exports) are the richest input. Recognize them by: a folder with `.jsx`/`.tsx` source files, one or more small `*.html` shells, large `*Standalone.html` bundles, and often a `HANDOFF*.md`/`README` doc. Handle each part by role:
19
+ - `.jsx/.tsx` sources → structural truth: real component boundaries, props, state, interactions. Read these instead of parsing rendered HTML.
20
+ - Handoff/README docs → often carry tokens, TypeScript types, mock data, and behavior notes **verbatim** — lift them directly into the spec instead of re-deriving. But its stack prescriptions (e.g. "don't use Tailwind") do NOT override the target repo: design = intent, repo = law.
21
+ - `*Standalone.html` bundles (hundreds of KB to MB, inline React/Babel) → **never read as text** (they destroy context). Use them only as the render reference: screenshot with a headless browser for Phase 5 comparison. They need a generous render budget (e.g. `--virtual-time-budget=15000`) because they compile in-browser.
22
+
23
+ 2. **Extract structure** (HTML: read markup + styles; screenshot: vision)
24
+ - Section hierarchy top to bottom (nav, hero, content regions, footer...).
25
+ - Layout system per section: grid vs flex, column counts, alignment, sidebar widths, breakpoints if declared.
26
+ - Heading hierarchy (h1/h2/h3) — Phase 4 must preserve it.
27
+
28
+ 3. **Extract observed tokens**
29
+ - Colors (hex/rgb) with role: background, surface, text, accent, success/danger.
30
+ - Typography: families, the distinct size/weight steps actually used — and the **scale relationships** (how much bigger is the h1 than the sub? than body?), which survive token mapping even when exact px don't.
31
+ - Spacing rhythm: the distinct paddings/gaps in use (e.g., 18/22/28px) — record raw values; mapping to repo scale happens in Phase 3, not here. Also record **cadence relationships**: headline↔subheadline distance vs section gaps vs card gaps — relative rhythm is what Phase 5 checks.
32
+ - Radii, shadows, borders.
33
+ - Repeated visual motifs (a texture, a chip style, a decorative pattern) — name them once; they anchor cross-screen consistency later.
34
+
35
+ 4. **Extract states and interactions**
36
+ - Hover/active/disabled styles present in CSS; focus styles; anything animated.
37
+ - Screenshots can't show hover — note "states not observable" so Phase 4 falls back to repo component defaults.
38
+
39
+ 5. **Extract content**
40
+ - Real texts, numbers, table rows, labels — **verbatim**, including CTA microcopy, section headings, and small labels. These become **typed mock data** in Phase 4 — never lorem ipsum, never paraphrased copy, when the design has real content.
41
+
42
+ 6. **Decompose into candidate components**
43
+ - One responsibility per node. Repeated visual units (cards, rows, tiers) → one component + data array.
44
+ - Name candidates in the repo's naming style (from `repo-map.md`).
45
+
46
+ ## Output: `design-spec.md`
47
+
48
+ Write to the session scratchpad, in this shape:
49
+
50
+ ```markdown
51
+ # Design Spec — <artifact name>
52
+
53
+ ## Overview
54
+ Analytics dashboard: fixed sidebar, header, stats row, revenue table, chart panel.
55
+
56
+ ## Component tree
57
+ - DashboardPage
58
+ - Sidebar — logo, nav list (5 items, active state), user footer
59
+ - Header — search input, avatar
60
+ - StatCard ×4 — label, value, delta (up/down)
61
+ - RevenueTable — 5 rows, status badge per row
62
+ - ChartPanel — bar chart placeholder
63
+
64
+ ## Observed tokens
65
+ | Kind | Value | Role / where |
66
+ |---|---|---|
67
+ | color | #4f6ef7 | accent: active nav, primary button |
68
+ | spacing | 22px | card padding |
69
+
70
+ ## States & interactions
71
+ - Nav item hover: background lightens
72
+ - Table row hover: surface tint
73
+
74
+ ## Content inventory
75
+ - Stat cards: "Revenue $48,2k +12%", ...
76
+ - Table rows: (Acme Corp, $1,200, Paid), ...
77
+ ```
78
+
79
+ ## Failure modes
80
+
81
+ - **Illegible / low-res screenshot** → request a better export or the HTML. Do not invent details vision can't confirm.
82
+ - **URL unreachable** → ask for an HTML export instead.
83
+ - **Design spans multiple screens/pages** → one `design-spec.md` per screen plus `screen-backlog.md`, per the Multi-screen designs section of SKILL.md. Confirm scope/order with the user unless running autonomously (then: chrome first, leaf-to-complex).
@@ -0,0 +1,73 @@
1
+ # Phase 3 — Mapping
2
+
3
+ ## Purpose
4
+
5
+ Cross `design-spec.md` against `repo-map.md`: decide for every component candidate whether to reuse, extend, or create, and map every observed design value to a repo token. Ends in a **hard user-approval gate**.
6
+
7
+ ## Inputs
8
+
9
+ - `design-spec.md` (what the design asks for)
10
+ - `repo-map.md` (what the repo offers)
11
+
12
+ ## Procedure
13
+
14
+ 1. **Component decisions** — for each candidate in the component tree:
15
+ - **REUSE** — a repo component has the same role and a compatible API. Record which props/variants will be used.
16
+ - **EXTEND** — a repo component has the role but lacks a variant/prop the design needs (e.g., Button has sm/md but design needs an xl hero button). Write an **explicit API diff**:
17
+ ```
18
+ Button (components/ui/button.tsx)
19
+ size: "sm" | "md" | "lg" → size: "sm" | "md" | "lg" | "xl"
20
+ ```
21
+ Extensions must be additive — never change existing variant behavior.
22
+ - **NEW** — no equivalent exists. Decide its path per repo conventions (`repo-map.md` → Conventions).
23
+
24
+ 2. **Color mapping** — for each observed color, pick the nearest repo token:
25
+ - Compare hue first, then lightness. A same-hue token two lightness steps away beats a closer-lightness token in a different hue.
26
+ - Ties → prefer semantic tokens (`primary`, `destructive`) over palette steps (`blue-500`).
27
+ - Record the mapping and a one-word distance note (exact / close / far).
28
+
29
+ 3. **Spacing / typography / radii mapping** — nearest scale step. Round consistently within a section (don't map 18px→4 and 22px→6 in the same card; pick one direction so rhythm survives).
30
+
31
+ 4. **Exceptions** — arbitrary values (`h-[57px]`) are forbidden. The only escape: an Exceptions table row with written justification (e.g., brand asset with fixed aspect ratio). Target: empty table.
32
+
33
+ ## Output: `mapping-table.md`
34
+
35
+ Write to the session scratchpad, three tables:
36
+
37
+ ```markdown
38
+ # Mapping — <design> → <repo>
39
+
40
+ ## Components
41
+ | Candidate | Decision | Target / new path | Notes |
42
+ |---|---|---|---|
43
+ | StatCard | NEW | components/dashboard/stat-card.tsx | no equivalent |
44
+ | Button (hero) | EXTEND | components/ui/button.tsx | size: +"xl" — diff below |
45
+ | Badge | REUSE | components/ui/badge.tsx | variant="success" |
46
+
47
+ ### EXTEND diffs
48
+ Button: size "sm"|"md"|"lg" → "sm"|"md"|"lg"|"xl"
49
+
50
+ ## Tokens
51
+ | Design value | Repo token | Distance |
52
+ |---|---|---|
53
+ | #4f6ef7 | primary (#4f46e5) | close |
54
+ | 22px card padding | p-5 (20px) | close |
55
+
56
+ ## Exceptions
57
+ | Value | Justification |
58
+ |---|---|
59
+ | (none) | |
60
+ ```
61
+
62
+ ## Gate (hard stop — from SKILL.md)
63
+
64
+ Present all three tables to the user. Wait for explicit approval.
65
+
66
+ - EXTEND rows modify existing code — user must see each API diff.
67
+ - Token rows change the design's raw values — user must see what diverges.
68
+ - Apply requested changes to the table **before** entering Phase 4. Never skip the gate, even when everything is REUSE.
69
+
70
+ ## Failure modes
71
+
72
+ - **No token remotely close** (design is neon green, repo palette is earth tones) → design-system conflict. Don't silently pick either side. Ask the user: (a) map to nearest anyway, (b) propose a new token as an extension, (c) keep the raw value as a justified exception.
73
+ - **Two repo components could serve the same role** → pick the one used more often in the repo; note the alternative in the table.
@@ -0,0 +1,68 @@
1
+ # Phase 5 — Verification
2
+
3
+ ## Purpose
4
+
5
+ Prove the generated code matches the design **structurally** — not pixel-for-pixel, since Phase 3 intentionally remapped raw values to repo tokens.
6
+
7
+ ## Inputs
8
+
9
+ - Generated code (Phase 4)
10
+ - Original design artifact (HTML/screenshot/URL)
11
+ - `design-spec.md`, `mapping-table.md`
12
+
13
+ ## Procedure
14
+
15
+ 1. **Static verification (must pass before the visual loop)**
16
+ - Discover the target repo's scripts from its `package.json`: typecheck (`tsc --noEmit` or a `typecheck` script), lint, build.
17
+ - Run all three. Fix failures before any screenshot — a broken build makes visual comparison meaningless.
18
+ - If `pnpm exec`/`npx` misbehaves (hangs, OOMs, "missing script" for a binary that exists — shell hooks/proxies can break these wrappers), bypass with the direct binary: `./node_modules/.bin/<tool>`. Record the working commands in `repo-map.md` so later phases reuse them.
19
+ - **Arbitrary-value gate (mechanical):** grep the generated/modified files for arbitrary Tailwind values — `grep -nE '\[(#|[0-9]+px)' <new files>` catches `bg-[#...]`, `p-[18px]`, `h-[57px]`. Every hit must correspond to a row in the mapping-table's Exceptions table. A hit with no exception row is a Phase 4 bug: fix the code or (rarely) go back to the gate to justify it. Decorative parametric styles passed via `style=` (per-datum gradients) are exempt only if the Exceptions table names them.
20
+
21
+ 2. **Visual loop**
22
+ 1. Start the repo's dev server (its `dev` script) in the background; wait for it to report ready.
23
+ 2. Screenshot the new page/components. Tooling, in detection order:
24
+ - Playwright already in the repo → use it
25
+ - `npx playwright screenshot` available → use that
26
+ - Headless Chrome/Chromium (`chromium --headless --screenshot`) → fallback
27
+ 3. Compare against the original design artifact side by side.
28
+ 4. **Responsive matrix:** when the design-spec declares breakpoints or responsive behavior (sidebar collapse, grid → single column), screenshot at three widths — mobile 390, tablet 768, desktop 1440 — and run the fidelity checklist per viewport. Desktop-only designs skip this, but say so in the report rather than silently checking one width.
29
+
30
+ 3. **Interactive states (don't skip — static screenshots miss them)**
31
+ Route screenshots never capture modals, hover states, dropdowns, or multi-step flows. For every spec'd state that needs interaction to reach:
32
+ - **Preferred:** drive the real flow — a throwaway Playwright script (repo's Playwright or `./node_modules/.bin/playwright`), or headless Chrome via DevTools Protocol, that clicks through and screenshots each state (e.g., open the booking modal, advance each step; log in through the app's own mock auth to reach protected screens). Real-flow driving beats state injection: it also proves the transitions work.
33
+ - **Fallback — state injection:** temporarily flip the state's source to render it directly (store default, seeded route param, initial-step prop), screenshot, then revert before committing. Same technique as auth-state parity.
34
+ - **Neither possible:** the state goes in the report under **"Spec'd states NOT visually verified"** with the reason. This list is mandatory in the final report — an empty list is a claim, so make it explicitly ("all interactive states exercised"), not by omission.
35
+ - **Match app state to the design's depicted state before comparing** (auth logged in/out, active tab, filters, seeded data). A state mismatch reads as dozens of false layout diffs.
36
+ - `file://` screenshot pitfalls: spaces/unicode in filenames break the URL — copy the file to a space-free scratch path instead of fighting encoding. A suspiciously small screenshot (~15–20 KB dark page) is Chrome's error page (`ERR_FILE_NOT_FOUND`), not your render — check the path before debugging the code.
37
+ - **SPA prototypes with state-based routing** (route in `useState`/localStorage, no URL routing) can't deep-link to inner views. To screenshot an inner view, patch a *copy* of the prototype's initial-route expression (`sed` on the copy — never the original). If the bundle is compiled/minified and the pattern doesn't match, don't fight it: verify that view against the design-spec derived from the JSX sources instead, and note in the report that the pixel reference was home-only.
38
+
39
+ 4. **Fidelity checklist (structural, not pixel)**
40
+ - [ ] Section order and hierarchy match the design-spec component tree
41
+ - [ ] Layout system matches per section: column counts, alignment, sidebar placement
42
+ - [ ] Relative spacing rhythm preserved (tighter/looser relationships, not exact px)
43
+ - [ ] Typography hierarchy matches: same number of distinct levels, same ordering of prominence
44
+ - [ ] Interactive states present (hover/focus/disabled where the spec lists them)
45
+ - [ ] Colors correct **per mapping-table** — the repo token was applied where the mapping says; divergence from the design's raw hex is correct behavior, divergence from the mapping is a bug
46
+ - [ ] Content matches the spec's content inventory (real texts/numbers, no placeholder lorem)
47
+ - [ ] **No design drift**: the result keeps the design's visual identity and mood — its motifs, its type-scale relationships, its negative space — instead of collapsing into a generic template that merely has the same sections
48
+
49
+ 5. **Iterate**
50
+ - Any unchecked item → fix the code, re-screenshot, re-run the checklist.
51
+ - **Maximum 3 rounds.** After the third, stop and report the remaining differences honestly, with the screenshots, and let the user decide.
52
+
53
+ 6. **Consolidation pass (multi-screen runs)**
54
+ After several screens/batches, generated components drift: near-duplicates appear (two card variants that are one component with a prop), and components born inside a feature turn out to be app-wide primitives. Before the final report:
55
+ - Scan the components created this run for near-duplicates → merge into one component + variant prop.
56
+ - Any component used by 2+ features that has no feature-specific logic → promote to the repo's primitive layer (`ui/`), following its conventions.
57
+ - **Cross-screen consistency audit**: batches drift visually, not just structurally. Compare screens for the same type-scale logic, the same spacing discipline, the same CTA styling, the same recurring motifs (from the design-spec). A screen built in batch 5 that renders its CTAs or section headings differently from batch 1 is a bug even if each screen individually passes.
58
+ - Re-run static verification after consolidating.
59
+ Single-screen runs skip this step.
60
+
61
+ 7. **Report**
62
+ - Static results (commands + pass/fail, arbitrary-value gate outcome), rounds used, final checklist state per viewport, screenshots compared, the "spec'd states NOT visually verified" list, consolidation changes, any accepted differences and why.
63
+
64
+ ## Failure modes
65
+
66
+ - **Dev server won't start** → fall back to static verification + a line-by-line self-review of the generated code against `design-spec.md` (every tree node implemented? every state handled? every content item present?). State clearly in the report that the visual loop did not run.
67
+ - **No screenshot tooling available** → same fallback, same disclosure.
68
+ - **Screenshot renders blank/broken** → check the route is correct and the server finished compiling before concluding the code is wrong.
package/tools.lock.json CHANGED
@@ -35,8 +35,8 @@
35
35
  },
36
36
  "gsd": {
37
37
  "source": "npm",
38
- "package": "get-shit-done-cc",
39
- "version": "1.42.3"
38
+ "package": "@opengsd/gsd-core",
39
+ "version": "1.6.1"
40
40
  },
41
41
  "improve": {
42
42
  "source": "github",
@@ -69,17 +69,17 @@
69
69
  "claude": {
70
70
  "source": "npm",
71
71
  "package": "@anthropic-ai/claude-code",
72
- "version": "2.1.195"
72
+ "version": "2.1.204"
73
73
  },
74
74
  "codex": {
75
75
  "source": "npm",
76
76
  "package": "@openai/codex",
77
- "version": "0.142.3"
77
+ "version": "0.143.0"
78
78
  },
79
79
  "opencode": {
80
80
  "source": "npm",
81
81
  "package": "opencode-ai",
82
- "version": "1.17.11"
82
+ "version": "1.17.15"
83
83
  },
84
84
  "gemini": {
85
85
  "source": "npm",