Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## [0.21.1] - 2026-04-05 — HTML-Only Design Skills

Design skills no longer try to call the OpenAI image API. Every mockup, variant, and preview is now a self-contained HTML file with inline CSS, real fonts from Google Fonts, and real color palettes. Opens in any browser, no API key needed. Affects `/design-shotgun`, `/design-consultation`, `/design-html`, `/design-review`, `/plan-design-review`, and `/office-hours`.

### Fixed

- All 6 design skills default to HTML previews instead of attempting the design binary (which required OpenAI API access and frequently 403'd)
- Removed all `$D generate`, `$D variants`, `$D compare`, `$D check`, `$D iterate`, `$D evolve`, and `$D extract` references from templates and resolvers
- Fixed zsh-unsafe `for f in` glob pattern in design-shotgun and plan-design-review

### Changed

- `generateDesignSetup` resolver no longer checks for design binary, only browse binary
- `generateDesignMockup` resolver generates HTML variant pages instead of PNG via API
- `generateDesignShotgunLoop` resolver uses `open` + AskUserQuestion instead of `$D compare --serve` board
- `/design-consultation` Phase 5 is now a single HTML preview path (no more Path A/Path B split)
- `/design-html` reads HTML variants directly instead of calling `$D prompt --image`

## [0.21.0] - 2026-04-05 — Brand Design Library + Rebrand

Say "design like Stripe" and mean it. `/design-ref` loads professional design systems from 55+ companies — Stripe, Airbnb, Apple, Linear, Figma, Notion, and more — as DESIGN.md references. Pick a brand, apply its tokens (colors, typography, spacing, components), and every design skill uses them automatically. Powered by [awesome-design-md](https://github.com/VoltAgent/awesome-design-md).
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.21.0
0.21.1
180 changes: 10 additions & 170 deletions design-consultation/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -558,20 +558,12 @@ If `NEEDS_SETUP`:

If browse is not available, that's fine — visual research is optional. The skill works without it using WebSearch and your built-in design knowledge.

**Find the gstack designer (optional — enables AI mockup generation):**
**Check for browse binary (enables opening previews in browser):**

## DESIGN SETUP (run this check BEFORE any design mockup command)
## DESIGN SETUP (run this check BEFORE any design work)

```bash
_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
D=""
[ -n "$_ROOT" ] && [ -x "$_ROOT/.claude/skills/gstack/design/dist/design" ] && D="$_ROOT/.claude/skills/gstack/design/dist/design"
[ -z "$D" ] && D=~/.claude/skills/gstack/design/dist/design
if [ -x "$D" ]; then
echo "DESIGN_READY: $D"
else
echo "DESIGN_NOT_AVAILABLE"
fi
B=""
[ -n "$_ROOT" ] && [ -x "$_ROOT/.claude/skills/gstack/browse/dist/browse" ] && B="$_ROOT/.claude/skills/gstack/browse/dist/browse"
[ -z "$B" ] && B=~/.claude/skills/gstack/browse/dist/browse
Expand All @@ -582,30 +574,20 @@ else
fi
```

If `DESIGN_NOT_AVAILABLE`: skip visual mockup generation and fall back to the
existing HTML wireframe approach (`DESIGN_SKETCH`). Design mockups are a
progressive enhancement, not a hard requirement.
**Design approach:** Always use HTML wireframes and previews (the `DESIGN_SKETCH`
approach). Generate design artifacts as HTML files — they render real fonts, real
colors, and can be opened in any browser. Never use the design binary (`$D`).

If `BROWSE_NOT_AVAILABLE`: use `open file://...` instead of `$B goto` to open
comparison boards. The user just needs to see the HTML file in any browser.

If `DESIGN_READY`: the design binary is available for visual mockup generation.
Commands:
- `$D generate --brief "..." --output /path.png` — generate a single mockup
- `$D variants --brief "..." --count 3 --output-dir /path/` — generate N style variants
- `$D compare --images "a.png,b.png,c.png" --output /path/board.html --serve` — comparison board + HTTP server
- `$D serve --html /path/board.html` — serve comparison board and collect feedback via HTTP
- `$D check --image /path.png --brief "..."` — vision quality gate
- `$D iterate --session /path/session.json --feedback "..." --output /path.png` — iterate

**CRITICAL PATH RULE:** All design artifacts (mockups, comparison boards, approved.json)
MUST be saved to `~/.gstack/projects/$SLUG/designs/`, NEVER to `.context/`,
`docs/designs/`, `/tmp/`, or any project-local directory. Design artifacts are USER
data, not project files. They persist across branches, conversations, and workspaces.

If `DESIGN_READY`: Phase 5 will generate AI mockups of your proposed design system applied to real screens, instead of just an HTML preview page. Much more powerful — the user sees what their product could actually look like.

If `DESIGN_NOT_AVAILABLE`: Phase 5 falls back to the HTML preview page (still good).
Phase 5 generates HTML preview pages showing your proposed design system applied to
real screens. These render actual fonts, colors, and components in the browser.

---

Expand Down Expand Up @@ -938,149 +920,7 @@ Each drill-down is one focused AskUserQuestion. After the user decides, re-check

## Phase 5: Design System Preview (default ON)

This phase generates visual previews of the proposed design system. Two paths depending on whether the gstack designer is available.

### Path A: AI Mockups (if DESIGN_READY)

Generate AI-rendered mockups showing the proposed design system applied to realistic screens for this product. This is far more powerful than an HTML preview — the user sees what their product could actually look like.

```bash
eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)"
_DESIGN_DIR=~/.gstack/projects/$SLUG/designs/design-system-$(date +%Y%m%d)
mkdir -p "$_DESIGN_DIR"
echo "DESIGN_DIR: $_DESIGN_DIR"
```

Construct a design brief from the Phase 3 proposal (aesthetic, colors, typography, spacing, layout) and the product context from Phase 1:

```bash
$D variants --brief "<product name: [name]. Product type: [type]. Aesthetic: [direction]. Colors: primary [hex], secondary [hex], neutrals [range]. Typography: display [font], body [font]. Layout: [approach]. Show a realistic [page type] screen with [specific content for this product].>" --count 3 --output-dir "$_DESIGN_DIR/"
```

Run quality check on each variant:

```bash
$D check --image "$_DESIGN_DIR/variant-A.png" --brief "<the original brief>"
```

Show each variant inline (Read tool on each PNG) for instant preview.

Tell the user: "I've generated 3 visual directions applying your design system to a realistic [product type] screen. Pick your favorite in the comparison board that just opened in your browser. You can also remix elements across variants."

### Comparison Board + Feedback Loop

Create the comparison board and serve it over HTTP:

```bash
$D compare --images "$_DESIGN_DIR/variant-A.png,$_DESIGN_DIR/variant-B.png,$_DESIGN_DIR/variant-C.png" --output "$_DESIGN_DIR/design-board.html" --serve
```

This command generates the board HTML, starts an HTTP server on a random port,
and opens it in the user's default browser. **Run it in the background** with `&`
because the server needs to stay running while the user interacts with the board.

Parse the port from stderr output: `SERVE_STARTED: port=XXXXX`. You need this
for the board URL and for reloading during regeneration cycles.

**PRIMARY WAIT: AskUserQuestion with board URL**

After the board is serving, use AskUserQuestion to wait for the user. Include the
board URL so they can click it if they lost the browser tab:

"I've opened a comparison board with the design variants:
http://127.0.0.1:<PORT>/ — Rate them, leave comments, remix
elements you like, and click Submit when you're done. Let me know when you've
submitted your feedback (or paste your preferences here). If you clicked
Regenerate or Remix on the board, tell me and I'll generate new variants."

**Do NOT use AskUserQuestion to ask which variant the user prefers.** The comparison
board IS the chooser. AskUserQuestion is just the blocking wait mechanism.

**After the user responds to AskUserQuestion:**

Check for feedback files next to the board HTML:
- `$_DESIGN_DIR/feedback.json` — written when user clicks Submit (final choice)
- `$_DESIGN_DIR/feedback-pending.json` — written when user clicks Regenerate/Remix/More Like This

```bash
if [ -f "$_DESIGN_DIR/feedback.json" ]; then
echo "SUBMIT_RECEIVED"
cat "$_DESIGN_DIR/feedback.json"
elif [ -f "$_DESIGN_DIR/feedback-pending.json" ]; then
echo "REGENERATE_RECEIVED"
cat "$_DESIGN_DIR/feedback-pending.json"
rm "$_DESIGN_DIR/feedback-pending.json"
else
echo "NO_FEEDBACK_FILE"
fi
```

The feedback JSON has this shape:
```json
{
"preferred": "A",
"ratings": { "A": 4, "B": 3, "C": 2 },
"comments": { "A": "Love the spacing" },
"overall": "Go with A, bigger CTA",
"regenerated": false
}
```

**If `feedback.json` found:** The user clicked Submit on the board.
Read `preferred`, `ratings`, `comments`, `overall` from the JSON. Proceed with
the approved variant.

**If `feedback-pending.json` found:** The user clicked Regenerate/Remix on the board.
1. Read `regenerateAction` from the JSON (`"different"`, `"match"`, `"more_like_B"`,
`"remix"`, or custom text)
2. If `regenerateAction` is `"remix"`, read `remixSpec` (e.g. `{"layout":"A","colors":"B"}`)
3. Generate new variants with `$D iterate` or `$D variants` using updated brief
4. Create new board: `$D compare --images "..." --output "$_DESIGN_DIR/design-board.html"`
5. Reload the board in the user's browser (same tab):
`curl -s -X POST http://127.0.0.1:PORT/api/reload -H 'Content-Type: application/json' -d '{"html":"$_DESIGN_DIR/design-board.html"}'`
6. The board auto-refreshes. **AskUserQuestion again** with the same board URL to
wait for the next round of feedback. Repeat until `feedback.json` appears.

**If `NO_FEEDBACK_FILE`:** The user typed their preferences directly in the
AskUserQuestion response instead of using the board. Use their text response
as the feedback.

**POLLING FALLBACK:** Only use polling if `$D serve` fails (no port available).
In that case, show each variant inline using the Read tool (so the user can see them),
then use AskUserQuestion:
"The comparison board server failed to start. I've shown the variants above.
Which do you prefer? Any feedback?"

**After receiving feedback (any path):** Output a clear summary confirming
what was understood:

"Here's what I understood from your feedback:
PREFERRED: Variant [X]
RATINGS: [list]
YOUR NOTES: [comments]
DIRECTION: [overall]

Is this right?"

Use AskUserQuestion to verify before proceeding.

**Save the approved choice:**
```bash
echo '{"approved_variant":"<V>","feedback":"<FB>","date":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","screen":"<SCREEN>","branch":"'$(git branch --show-current 2>/dev/null)'"}' > "$_DESIGN_DIR/approved.json"
```

After the user picks a direction:

- Use `$D extract --image "$_DESIGN_DIR/variant-<CHOSEN>.png"` to analyze the approved mockup and extract design tokens (colors, typography, spacing) that will populate DESIGN.md in Phase 6. This grounds the design system in what was actually approved visually, not just what was described in text.
- If the user wants to iterate further: `$D iterate --feedback "<user's feedback>" --output "$_DESIGN_DIR/refined.png"`

**Plan mode vs. implementation mode:**
- **If in plan mode:** Add the approved mockup path (the full `$_DESIGN_DIR` path) and extracted tokens to the plan file under an "## Approved Design Direction" section. The design system gets written to DESIGN.md when the plan is implemented.
- **If NOT in plan mode:** Proceed directly to Phase 6 and write DESIGN.md with the extracted tokens.

### Path B: HTML Preview Page (fallback if DESIGN_NOT_AVAILABLE)

Generate a polished HTML preview page and open it in the user's browser. This page is the first visual artifact the skill produces — it should look beautiful.
Generate a polished HTML preview page showing the proposed design system applied to realistic screens. This page is the first visual artifact the skill produces — it should look beautiful and make the design system tangible.

```bash
PREVIEW_FILE="/tmp/design-consultation-preview-$(date +%s).html"
Expand All @@ -1092,7 +932,7 @@ Write the preview HTML to `$PREVIEW_FILE`, then open it:
open "$PREVIEW_FILE"
```

### Preview Page Requirements (Path B only)
### Preview Page Requirements

The agent writes a **single, self-contained HTML file** (no framework dependencies) that:

Expand Down Expand Up @@ -1127,7 +967,7 @@ If the user says skip the preview, go directly to Phase 6.

## Phase 6: Write DESIGN.md & Confirm

If `$D extract` was used in Phase 5 (Path A), use the extracted tokens as the primary source for DESIGN.md values — colors, typography, and spacing grounded in the approved mockup rather than text descriptions alone. Merge extracted tokens with the Phase 3 proposal (the proposal provides rationale and context; the extraction provides exact values).
Use the Phase 3 proposal as the primary source for DESIGN.md values. If the user approved an HTML preview in Phase 5 and requested changes, incorporate those into the final values.

**If in plan mode:** Write the DESIGN.md content into the plan file as a "## Proposed DESIGN.md" section. Do NOT write the actual file — that happens at implementation time.

Expand Down
55 changes: 6 additions & 49 deletions design-consultation/SKILL.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,12 @@ If the codebase is empty and purpose is unclear, say: *"I don't have a clear pic

If browse is not available, that's fine — visual research is optional. The skill works without it using WebSearch and your built-in design knowledge.

**Find the gstack designer (optional — enables AI mockup generation):**
**Check for browse binary (enables opening previews in browser):**

{{DESIGN_SETUP}}

If `DESIGN_READY`: Phase 5 will generate AI mockups of your proposed design system applied to real screens, instead of just an HTML preview page. Much more powerful — the user sees what their product could actually look like.

If `DESIGN_NOT_AVAILABLE`: Phase 5 falls back to the HTML preview page (still good).
Phase 5 generates HTML preview pages showing your proposed design system applied to
real screens. These render actual fonts, colors, and components in the browser.

---

Expand Down Expand Up @@ -308,49 +307,7 @@ Each drill-down is one focused AskUserQuestion. After the user decides, re-check

## Phase 5: Design System Preview (default ON)

This phase generates visual previews of the proposed design system. Two paths depending on whether the gstack designer is available.

### Path A: AI Mockups (if DESIGN_READY)

Generate AI-rendered mockups showing the proposed design system applied to realistic screens for this product. This is far more powerful than an HTML preview — the user sees what their product could actually look like.

```bash
eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)"
_DESIGN_DIR=~/.gstack/projects/$SLUG/designs/design-system-$(date +%Y%m%d)
mkdir -p "$_DESIGN_DIR"
echo "DESIGN_DIR: $_DESIGN_DIR"
```

Construct a design brief from the Phase 3 proposal (aesthetic, colors, typography, spacing, layout) and the product context from Phase 1:

```bash
$D variants --brief "<product name: [name]. Product type: [type]. Aesthetic: [direction]. Colors: primary [hex], secondary [hex], neutrals [range]. Typography: display [font], body [font]. Layout: [approach]. Show a realistic [page type] screen with [specific content for this product].>" --count 3 --output-dir "$_DESIGN_DIR/"
```

Run quality check on each variant:

```bash
$D check --image "$_DESIGN_DIR/variant-A.png" --brief "<the original brief>"
```

Show each variant inline (Read tool on each PNG) for instant preview.

Tell the user: "I've generated 3 visual directions applying your design system to a realistic [product type] screen. Pick your favorite in the comparison board that just opened in your browser. You can also remix elements across variants."

{{DESIGN_SHOTGUN_LOOP}}

After the user picks a direction:

- Use `$D extract --image "$_DESIGN_DIR/variant-<CHOSEN>.png"` to analyze the approved mockup and extract design tokens (colors, typography, spacing) that will populate DESIGN.md in Phase 6. This grounds the design system in what was actually approved visually, not just what was described in text.
- If the user wants to iterate further: `$D iterate --feedback "<user's feedback>" --output "$_DESIGN_DIR/refined.png"`

**Plan mode vs. implementation mode:**
- **If in plan mode:** Add the approved mockup path (the full `$_DESIGN_DIR` path) and extracted tokens to the plan file under an "## Approved Design Direction" section. The design system gets written to DESIGN.md when the plan is implemented.
- **If NOT in plan mode:** Proceed directly to Phase 6 and write DESIGN.md with the extracted tokens.

### Path B: HTML Preview Page (fallback if DESIGN_NOT_AVAILABLE)

Generate a polished HTML preview page and open it in the user's browser. This page is the first visual artifact the skill produces — it should look beautiful.
Generate a polished HTML preview page showing the proposed design system applied to realistic screens. This page is the first visual artifact the skill produces — it should look beautiful and make the design system tangible.

```bash
PREVIEW_FILE="/tmp/design-consultation-preview-$(date +%s).html"
Expand All @@ -362,7 +319,7 @@ Write the preview HTML to `$PREVIEW_FILE`, then open it:
open "$PREVIEW_FILE"
```

### Preview Page Requirements (Path B only)
### Preview Page Requirements

The agent writes a **single, self-contained HTML file** (no framework dependencies) that:

Expand Down Expand Up @@ -397,7 +354,7 @@ If the user says skip the preview, go directly to Phase 6.

## Phase 6: Write DESIGN.md & Confirm

If `$D extract` was used in Phase 5 (Path A), use the extracted tokens as the primary source for DESIGN.md values — colors, typography, and spacing grounded in the approved mockup rather than text descriptions alone. Merge extracted tokens with the Phase 3 proposal (the proposal provides rationale and context; the extraction provides exact values).
Use the Phase 3 proposal as the primary source for DESIGN.md values. If the user approved an HTML preview in Phase 5 and requested changes, incorporate those into the final values.

**If in plan mode:** Write the DESIGN.md content into the plan file as a "## Proposed DESIGN.md" section. Do NOT write the actual file — that happens at implementation time.

Expand Down
Loading
Loading