feat: add $D gallery command for design history timeline

Generates a self-contained HTML page showing all prior design explorations
for a project: every variant (approved or not), feedback notes, organized
by date (newest first). Images embedded as base64. Handles corrupted
approved.json gracefully (skips, still shows the session). Empty state
shows "No history yet" with /design-shotgun prompt.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-03-27 08:37:12 -06:00
parent eb6126b404
commit e7816fc5ad
3 changed files with 264 additions and 0 deletions

View File

@@ -64,6 +64,11 @@ export const COMMANDS = new Map<string, {
usage: "extract --image approved.png",
flags: ["--image"],
}],
["gallery", {
description: "Generate HTML timeline of all design explorations for a project",
usage: "gallery --designs-dir ~/.gstack/projects/$SLUG/designs/ --output /path/gallery.html",
flags: ["--designs-dir", "--output"],
}],
["serve", {
description: "Serve comparison board over HTTP and collect user feedback",
usage: "serve --html /path/board.html [--timeout 600]",