Skip to content

feat: /hance skill (install, run, try, batch, ui)#28

Open
RichardBray wants to merge 14 commits into
mainfrom
feat/hance-skill
Open

feat: /hance skill (install, run, try, batch, ui)#28
RichardBray wants to merge 14 commits into
mainfrom
feat/hance-skill

Conversation

@RichardBray
Copy link
Copy Markdown
Member

Summary

  • New `/hance` skill at `skills/hance/` with SKILL.md routing + 5 subcommand docs (setup, run, try, batch, ui) and 2 reference docs (preset-index, compare-page). Replaces the deleted `skills/match-look` skill.
  • New `/compare` route in `packages/ui` (path-based dispatch in `index.tsx`) renders a 2×2 grid of original + 3 variants; Edit button seeds the editor with the chosen `.hlook`.
  • Server endpoints: `/api/local-file` (allowlist-gated), `/api/initial-look`, `/api/seed-edit`. New exports: `setInitialLook`, `allowFilePath`.
  • Preset index rebuild wired into UI server write paths (POST/PUT/DELETE/rename/import) and CLI `hance preset save` via new `packages/core/src/preset-index.ts` (`buildPresetIndex` / `rebuildPresetIndex`).
  • `scripts/install-agent.sh` (terse agent-friendly installer) and `presets/index.json` (committed, builtin-only) ship with this PR.

Test plan

  • `bun test` passes (184/184 locally)
  • `bun run scripts/build-preset-index.ts` regenerates `presets/index.json` cleanly
  • Open editor, save/edit/delete/rename/import a look — verify `~/.hance/presets/index.json` is rebuilt each time
  • `hance preset save foo …` rebuilds the user index
  • Manually navigate to `/compare?...` with valid params; Edit on a variant lands on `/` with file + look seeded
  • `sh scripts/install-agent.sh` on macOS — installs binary, prints terse line-per-step output, no-op on second run

🤖 Generated with Claude Code

Richard Oliver Bray and others added 13 commits May 22, 2026 14:52
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Two pieces of infra for the upcoming /hance skill (spec: docs/superpowers/specs/2026-05-01-hance-skill-design.md):

- scripts/install-agent.sh: terse, line-per-step installer for the skill's setup subcommand. Refuses Windows, no interactive prompts, prints OK on success.

- scripts/build-preset-index.ts + presets/index.json: canonical preset metadata index (name, description, keywords, characteristics, path) so the look-matching logic in 'try' doesn't need to read every .hlook.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- skills/hance/ with SKILL.md routing + 5 subcommand docs (setup, run, try,
  batch, ui) and 2 reference docs (preset-index, compare-page)
- delete skills/match-look (subsumed by /hance try)
- /compare route in packages/ui via path-based dispatch in index.tsx, new
  ComparePage component renders 2x2 grid with Edit hand-off
- server.ts: /api/local-file (allowlisted), /api/initial-look,
  /api/seed-edit endpoints, plus setInitialLook / allowFilePath exports
- App.tsx seeds editor with initial look on mount when present
- core/preset-index.ts exports buildPresetIndex / rebuildPresetIndex;
  rebuild wired into UI server (POST/PUT/DELETE/rename/import) and
  CLI hance preset save; build-preset-index.ts delegates to it

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Also adds the skill files (previously silently ignored) and teaches
/hance setup to offer ffmpeg install per OS package manager.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…gitignore preset index

- /compare → editor hand-off now uses ?look= query param instead of POST /api/seed-edit + GET /api/initial-look. Removes server-side mutable state.
- Delete scripts/install-agent.sh; setup skill now verifies bun + ffmpeg and shows example bunx invocations.
- Gitignore presets/index.json (generated artifact); skill rebuilds it on demand.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…al file load

useUpload's upload callback depended on state.objectUrl, so its identity changed
on every upload. useInitialFile depended on [upload], re-fetching /api/initial-file
each time — creating an infinite loop that repeatedly destroyed and recreated the
WebGPU renderer. Fixed by tracking the previous URL in a ref so upload has stable
identity. Also converted setSource to use ImageBitmap for reliable GPU texture upload.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add bleach-bypass, ektachrome, ektar-100, portra-160, tri-x-400, and
vision3-500t. Tune halation hue on cinestill-800t, grain on hp5 and
vision3-250d.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
C-41 color, Reversal E6, and B&W stocks covering popular consumer,
professional, and specialty films. Also updates skill runner from
bunx hance@latest to bunx @orva-studio/hance.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ly section

Repositions the hero tagline and "Why hance?" bullets to highlight the
visual preview → batch CLI workflow as the core differentiator. Adds a
new section showing the Claude Code skill with example commands.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Clarify the three target audiences (solo creators, automation pipelines,
developers) and draw the boundary with professional grading tools.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Label compare options A/B/C instead of Variant 1/2/3 and show an indigo
banner prompting the user to tell their agent which option to use. The
editor also shows a banner when opened from compare via ?look= param,
but not in the regular UI flow. Skill docs updated to match.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…, typo

- Empty catch in App.tsx now explicitly falls through to default state
- /api/local-file resolves paths before allowlist check to prevent
  mismatches from non-canonical paths
- Fix "a option" → "an option" typo in compare-page.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pruned similar-looking presets, keeping the most distinctive variant
from each group: Delta 3200, Ektachrome, Fomapan 400, Ortho 80,
Portra 400, StreetPan 400, Tri-X 400, UltraMax 400, and Velvia 50.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant