Skip to content

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

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

feat: /hance skill (install, run, try, batch, ui)#28
RichardBray wants to merge 6 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 6 commits May 10, 2026 21: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>
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