Skip to content

Commit 366c01d

Browse files
sgwannabeclaude
andauthored
docs(readme): gallery-first hero shot above the fold (#67) (#94)
* docs(readme): gallery-first hero shot above the fold (#67) Issue #67 (T5 Leader frontend-architect + T1 Expert business-panel Godin/Drucker): README was text/badges-first; hackathon judges saw a wall of badges before any visual payoff. Business panel recommendation was to lead with the gallery hero shot — "screenshot-worthy moment is the 26 tiles, not the modal form". Changes: - New: tools/capture-gallery-hero.py — playwright-based deterministic screenshot helper. Reads runs/r-clean-20260425-max/mockups/gallery.html (W4.10 evidence, 26-card max profile = highest visual density), renders viewport-only at 1600x1100 with device_scale_factor=2 (retina), outputs docs/assets/v1.6-gallery-hero.png (3200x2200, ~190KB). Animations disabled, fonts loaded, file:// URI for offline determinism. - New: docs/assets/v1.6-gallery-hero.png — captured artifact, committed. - README.md: hero <img> embedded immediately after H1 + tagline; badges pushed below hero block; "TDD/SpecDD/PreviewDD" pitch repositioned as caption-style footer of the hero band. The 3-DD methodology table remains intact further down — not deleted, just no longer pre-fold. - docs/SUBMISSION.md: same hero embedded after H1 (with caption tying it back to the spec narrative). - docs/DEMO-STORYBOARD.md: hero embedded after H1, captioned as the 0:50–1:02 cut from the demo storyboard (matches the existing storyboard timing). Codex review (single pass): 0 P1, 1 P2 noted as out-of-scope follow-up: - Playwright is an undeclared local dev dependency (the binary is on the user's PATH but no requirements.txt / pyproject.toml). The hero PNG is now committed, so re-capture is only needed when the gallery template changes — a separate dev-tooling PR can pin Playwright if this becomes a regular workflow. Closes #67 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(readme): apply PR #94 review feedback (gemini) - tools/capture-gallery-hero.py docstring: corrected mode description (was "full-page", actual default is viewport-only — gemini medium #1). - Replaced redundant wait_for_load_state("networkidle") with page.evaluate("document.fonts.ready") so fonts actually rasterise before capture (gemini medium #3). - Default --source path retained: runs/r-clean-20260425-max/mockups/ gallery.html IS committed (W4.10 evidence at PR #92), so the default works for any clone (gemini medium #2 — explained in reply). Re-ran capture: PNG size unchanged (~190 KB, 3200×2200). Refs PR #94 review comments Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 31f30b2 commit 366c01d

5 files changed

Lines changed: 111 additions & 3 deletions

File tree

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,17 @@
22

33
# Preview Forge for Claude Code
44

5-
### `TDD` drove code with tests. `SpecDD` drove code with specs. We put `PreviewDD` in front.
5+
### One-line idea → 26 AI-generated previews in your browser. Pick with your eyes.
66

7-
**A self-contained Claude Code plugin that introduces the 3-DD Methodology.**
8-
143 Opus 4.7 agents turn a one-line idea into a frozen full-stack app with only two human clicks.
7+
![26 advocate gallery at Gate H1 — Preview Forge v1.6](docs/assets/v1.6-gallery-hero.png)
8+
9+
> Above: Gate H1 gallery — 26 advocate-generated mockups, side-by-side, in your browser.
10+
> You pick the one that matches your intent. The rest of the pipeline (spec, tests, deploy)
11+
> is driven by that pick.
12+
13+
</div>
14+
15+
<div align="center">
916

1017
[![CI](https://github.com/Two-Weeks-Team/PreviewForgeForClaudeCode/actions/workflows/ci.yml/badge.svg)](https://github.com/Two-Weeks-Team/PreviewForgeForClaudeCode/actions/workflows/ci.yml)
1118
[![Marketplace Validate](https://github.com/Two-Weeks-Team/PreviewForgeForClaudeCode/actions/workflows/marketplace-validate.yml/badge.svg)](https://github.com/Two-Weeks-Team/PreviewForgeForClaudeCode/actions/workflows/marketplace-validate.yml)
@@ -20,6 +27,11 @@
2027
[![14 Slash Commands](https://img.shields.io/badge/%2Fpf%3A*-14%20commands-7aa6c2)](#slash-commands)
2128
[![Stars](https://img.shields.io/github/stars/Two-Weeks-Team/PreviewForgeForClaudeCode?style=social)](https://github.com/Two-Weeks-Team/PreviewForgeForClaudeCode/stargazers)
2229

30+
`TDD` drove code with tests. `SpecDD` drove code with specs.
31+
**We put `PreviewDD` in front.** Mockup-first, eyes-first decision-making —
32+
143 Opus 4.7 agents turn one line of idea into a frozen full-stack app
33+
with only two human clicks.
34+
2335
</div>
2436

2537
---

docs/DEMO-STORYBOARD.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# 3-Minute Demo Storyboard — Preview Forge v1.7+ (gallery-first)
22

3+
![Gate H1 gallery hero — 26 mockups](assets/v1.6-gallery-hero.png)
4+
5+
> 0:50–1:02 cut: this is the screenshot judges see in the demo.
6+
37
> 해카톤 제출용 데모 영상. 180초 타깃, 170–190초 허용. 첫 5초가 고정적으로
48
> "PreviewDD 이게 뭔데?" 후크. 마지막 10초는 저장소·라이선스 박제.
59
> v1.7 ship 이후: **gallery-first** 톤 — Socratic 질문(4개)에서 바로 26 mockup

docs/SUBMISSION.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Hackathon Submission Package
22

3+
![Preview Forge gallery — 26 advocate-generated mockups at Gate H1](assets/v1.6-gallery-hero.png)
4+
5+
> 26 mockups, side-by-side, in your browser. Pick the card that matches
6+
> your intent — that picture becomes the spec.
7+
38
> 해카톤 제출 폼에 넣을 준비 완료 텍스트 + 체크리스트.
49
> 마감: 2026-04-26 20:00 EST.
510
> Version: v1.10+ (Phase 9 — Business-panel UX shipped: Socratic interview 4-required + Skip-interview + tiered fallback).

docs/assets/v1.6-gallery-hero.png

189 KB
Loading

tools/capture-gallery-hero.py

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
#!/usr/bin/env python3
2+
"""Capture the v1.6 gallery-hero screenshot used in README.md (#67).
3+
4+
Source: runs/r-clean-20260425-max/mockups/gallery.html (26-card profile —
5+
maximum visual density per hackathon-judge JTBD). The W4.10 evidence
6+
artifact is committed to the repo, so re-running this script produces
7+
the same PNG without needing to regenerate the gallery.
8+
9+
Output: docs/assets/v1.6-gallery-hero.png
10+
11+
Mode: viewport-only capture at 1600x1100 with device_scale_factor=2
12+
(retina), giving a 3200x2200 PNG. Picked over full-page because
13+
full_page captures the entire 26-card vertical strip (~3200x8200) which
14+
renders as a comically tall banner in the README; viewport-only shows
15+
the "lots of tiles side-by-side" wow factor in a normal banner ratio.
16+
17+
Determinism: fonts loaded, animations disabled, viewport pinned, file://
18+
URI. Re-running on the same gallery.html produces a byte-stable PNG.
19+
"""
20+
from __future__ import annotations
21+
22+
import argparse
23+
import sys
24+
from pathlib import Path
25+
26+
from playwright.sync_api import sync_playwright
27+
28+
REPO = Path(__file__).resolve().parent.parent
29+
30+
31+
def main() -> int:
32+
parser = argparse.ArgumentParser()
33+
parser.add_argument(
34+
"--source",
35+
default=str(REPO / "runs/r-clean-20260425-max/mockups/gallery.html"),
36+
help="path to gallery.html",
37+
)
38+
parser.add_argument(
39+
"--out",
40+
default=str(REPO / "docs/assets/v1.6-gallery-hero.png"),
41+
help="output PNG path",
42+
)
43+
parser.add_argument("--width", type=int, default=1600)
44+
parser.add_argument("--height", type=int, default=1100)
45+
parser.add_argument(
46+
"--full-page",
47+
action="store_true",
48+
help="capture entire scrollable page (default: viewport only — README hero wants above-fold density, not a 26-tile vertical strip)",
49+
)
50+
args = parser.parse_args()
51+
52+
src = Path(args.source).resolve()
53+
out = Path(args.out).resolve()
54+
if not src.is_file():
55+
print(f"capture-gallery-hero: source not found: {src}", file=sys.stderr)
56+
return 1
57+
out.parent.mkdir(parents=True, exist_ok=True)
58+
59+
with sync_playwright() as pw:
60+
# Firefox is the only browser already installed locally per the
61+
# plan's preflight; falls back to chromium if firefox unavailable.
62+
try:
63+
browser = pw.firefox.launch(headless=True)
64+
except Exception:
65+
browser = pw.chromium.launch(headless=True)
66+
ctx = browser.new_context(
67+
viewport={"width": args.width, "height": args.height},
68+
device_scale_factor=2, # crisper PNG for retina demos
69+
reduced_motion="reduce",
70+
)
71+
page = ctx.new_page()
72+
page.goto(src.as_uri(), wait_until="networkidle")
73+
# Disable animations + transitions deterministically.
74+
page.add_style_tag(content="*, *::before, *::after { animation: none !important; transition: none !important; }")
75+
# Wait for web-fonts to actually rasterise (gemini #3 — networkidle
76+
# doesn't cover document.fonts state on every browser).
77+
page.evaluate("document.fonts.ready")
78+
page.screenshot(path=str(out), full_page=args.full_page)
79+
browser.close()
80+
81+
size_kb = out.stat().st_size / 1024
82+
print(f"capture-gallery-hero: wrote {out} ({size_kb:.1f} KB)")
83+
return 0
84+
85+
86+
if __name__ == "__main__":
87+
sys.exit(main())

0 commit comments

Comments
 (0)