Skip to content

feat: curated preset builds for quick pet selection#15

Closed
Co-Messi wants to merge 1 commit into
cpaczek:mainfrom
Co-Messi:feat/preset-builds-v2
Closed

feat: curated preset builds for quick pet selection#15
Co-Messi wants to merge 1 commit into
cpaczek:mainfrom
Co-Messi:feat/preset-builds-v2

Conversation

@Co-Messi

@Co-Messi Co-Messi commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Rebased onto the TypeScript rewrite (replaces #13).

  • 23 curated presets covering all 18 species — users can pick a themed build in one step
  • Full ASCII sprite preview shown below the highlighted preset via inquirer's description field
  • --preset CLI flag for non-interactive use (e.g., any-buddy --preset "Arcane Dragon" -y)
  • Backwards compatible — selecting "Customize" falls through to the existing manual flow

New files

  • src/presets.ts — typed Preset interface + 23 preset definitions
  • tests/presets.test.ts — validates coverage, types, constraints, uniqueness

Modified files

  • src/types.ts — added preset to CliFlags
  • src/cli.ts--preset flag parsing + help text
  • src/tui/prompts.tsselectMode() and selectPreset() with sprite previews
  • src/tui/commands/interactive.tsresolvePreset() + selectCoreTraits() flow

UX flow

? How do you want to pick?
❯ Browse presets — curated themed builds
  Customize — pick each attribute yourself

? Pick a preset
❯ Arcane Dragon         ★★★★★  <✦~✦>  A legendary wizard dragon with starry eyes
  Dragon King           ★★★★   <◉~◉>  An epic crowned dragon — ruler of all pets
  ...
    (full ASCII sprite renders below the highlighted choice)

Quality checks

  • pnpm run build — compiles cleanly
  • pnpm run test — 149/149 tests pass (5 new preset tests)
  • pnpm run lint — 0 errors
  • pnpm run format:check — all files formatted
  • pnpm run typecheck — no type errors
  • Pre-commit hooks (husky + lint-staged) pass

Test plan

  • Run any-buddy → select "Browse presets" → verify sprite preview + correct application
  • Run any-buddy → select "Customize" → verify existing flow unchanged
  • Run any-buddy --preset "Arcane Dragon" -y → verify non-interactive preset
  • Run any-buddy --preset "nonexistent" → verify clear error listing available presets
  • Run any-buddy -s dragon -r legendary → verify flags skip preset prompt entirely

🤖 Generated with Claude Code

Adds 23 curated themed presets (one+ per species) that users can browse
with full ASCII sprite previews instead of picking each attribute
individually. Includes --preset CLI flag for non-interactive use.

- New src/presets.ts with typed Preset interface and preset data
- selectMode() and selectPreset() prompts with sprite + rarity preview
- resolvePreset() for --preset flag (case-insensitive name matching)
- Vitest tests for preset validity, coverage, and constraints
- All existing flows preserved — "Customize" falls through to manual

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cpaczek

cpaczek commented Apr 2, 2026

Copy link
Copy Markdown
Owner

Will review this in the morning if all looks good it'll be in next release

@cpaczek

cpaczek commented Apr 2, 2026

Copy link
Copy Markdown
Owner

Hey looks like @Ahmad8864 is working on a profile system seems similar to this but more built out @Co-Messi could we do both of these in 1 pr or do you think these should be separate features

@Co-Messi

Co-Messi commented Apr 2, 2026

Copy link
Copy Markdown
Contributor Author

I think these should stay as separate features — they solve different problems:

  • Presets (this PR): helps new users quickly pick a pet without going through 4+ selection screens. It's a shortcut into the creation flow — "I don't know what I want, show me curated combos."

  • Profiles (Feat/buddy-profiles #17): helps existing users manage multiple saved pets and switch between them. It's a post-creation feature.

They don't overlap in code either — presets live in the selection/prompts layer, profiles live in config/gallery. No conflicting file changes.

If anything, they work great together: pick a preset to quickly create a pet → it gets auto-saved as a profile → switch between profiles later.

Happy to coordinate with @Ahmad8864 if you'd prefer a combined PR though!

@Ahmad8864

Ahmad8864 commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Agreed with @Co-Messi, these should stay separate. presets (#15) is a creation UX shortcut, profiles (#17) is post-creation management. They touch 3 common files but the changes don't overlap semantically.

We could present the presets as part of the buddies gallery view by default (instead of having to save them first), but we'd need to save a salt as part of each preset in presets.ts

cpaczek added a commit that referenced this pull request Apr 2, 2026
…rated preset builds for quick pet selection
@cpaczek

cpaczek commented Apr 2, 2026

Copy link
Copy Markdown
Owner

Merged manually after resolving rebase conflict (MIN_SALT_COUNT removal in interactive.ts). All tests pass.

@cpaczek cpaczek closed this Apr 2, 2026
@cpaczek

cpaczek commented Apr 2, 2026

Copy link
Copy Markdown
Owner

@Co-Messi Applied this to codebase ty for the PR just doing some code quality checks and fixes before I release

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.

3 participants