Skip to content

vehiclegen — cmd/vehiclegen CLI #364

Description

@philoserf

internal/vehiclegen (#355) is the only generator without a command. Add cmd/vehiclegen under the internal/cli conventions:

  • Records to stdout, everything else stderr; cli.Fatalf exit 2 on bad input; cli.Notef for true-but-empty.
  • Seed drawn/reported via cli.Roller + deferred reportSeed only after flags validate; cli.RejectUnusable for flags the chosen path cannot read (mirror shipgen's split: explicit design flags vs a random roll that reads none of them).
  • Design flags mapping to Spec (category, type, mission, motive, enhancers, endurance class) plus -n/-seed; Generate for the random path (already constrained to legal combos per Notes G/B).
  • clitest end-to-end coverage including AssertReportedSeed/AssertRejected, per the standing obligation that every command has a test that fails if the seed report is dropped.
  • README sample block pinned from a real seeded run (systemgen: GenerateForMap and Generate diverge in dice consumption, so one seed gives two different systems #321 rule); candidate for the golden-stdout fixtures of clitest — golden stdout fixtures with -update for the formatting-heavy CLIs #361.

Book: B3 pp.150-153. Depends on: nothing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgeneratorA new content/rules generator

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions