Skip to content

JSON Output & Help Text Updates #225

@SorraTheOrc

Description

@SorraTheOrc

Summary

Extend --json output to include category and tags per recipe with filter metadata, and update printListHelp() with documentation of the new --search, --category, and --tags flags with examples.

Player Experience Change

Game developers will:

  • Get richer JSON output from toneforge list recipes --json including category and tags for each recipe, enabling programmatic filtering and integration with other tools
  • See clear documentation in toneforge list --help explaining the new filter flags with usage examples, reducing discovery friction

Acceptance Criteria

  • --json output includes category (string) and tags (string[]) fields for each recipe object
  • JSON output includes a total field with the total number of recipes (before filtering)
  • When filters are active, JSON output includes a filters object indicating which filters were applied
  • JSON output conforms to schema: { command: "list", resource: "recipes", recipes: Array<{name, description, category, tags}>, total: number, filters?: {search?: string, category?: string, tags?: string[]} }
  • toneforge list --help documents --search, --category, and --tags flags in the Options section
  • Help text includes at least 3 examples showing filter usage (individual and combined)
  • Help text follows the established pattern from classify search help (src/cli.ts:270-318)

Minimal Implementation

  1. Update JSON output block in src/cli.ts to emit enriched schema with category, tags, total, and optional filters
  2. Update printListHelp() (line 325) with new Options section entries and Examples

Dependencies

  • Registry API: listDetailed with Filter (TF-0MM7K1K371LIKKZZ)
  • CLI Filter Flags & Four-Column Table (TF-0MM7K1YHL12T4EJH)

Deliverables

  • Updated JSON output in src/cli.ts list recipes handler
  • Updated printListHelp() in src/cli.ts

Reference Files

  • src/cli.ts:1215-1216 -- Current JSON output block
  • src/cli.ts:324-350 -- Current printListHelp() function
  • src/cli.ts:270-318 -- classify search help text pattern

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions