ctchargen

module
v1.0.0-alpha.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2026 License: MIT

README

ctchargen

A Go CLI that generates rules-accurate Classic Traveller characters per the Books 1–3 prior-service procedure (© 1977 text): characteristics, service, terms, skills, aging, mustering out — or death, which is a completed generation too. Sibling to t5chargen.

docs/PRD.md is the v1 contract; all four milestones are implemented. docs/COVERAGE.md maps every rule of Book 1 pp. 4–25 to its page cite, implementation, and test; docs/ERRATA.md records every interpretation; docs/POLICY.md is the auto mode's decision table; docs/PRERELEASE_REVIEW.md is the v1.0.0 bar and where it stands.

Usage

ctchargen new --auto                     # one character, policy decides, JSON to stdout
ctchargen new --auto --skills rounded    # ...and steer how the policy decides
ctchargen new --seed 42 --service navy   # interactive: you answer each choice
ctchargen batch --count 20 --auto -o npcs.jsonl
ctchargen render character.json          # Markdown character sheet
ctchargen render --history character.json   # the full generation transcript
ctchargen replay character.json          # verify a record reproduces exactly
ctchargen version

Every record carries its seed, versions, inputs, and the complete event log; replay re-runs the engine from the seed and recorded choices and exits non-zero at the first mismatch. Death is an outcome, not an error: the dead get complete records too.

Development

task deps   # install the toolchain (brew bundle + NilAway at tip)
task hooks  # install the pre-push gate
task        # check (modernize + fmt + vet + lint + nilaway) + test

Directories

Path Synopsis
Package chargen is the prior-service procedure of Book 1 pp.
Package chargen is the prior-service procedure of Book 1 pp.
cmd
ctchargen command
Command ctchargen generates Classic Traveller characters (Books 1-3, © 1977 text).
Command ctchargen generates Classic Traveller characters (Books 1-3, © 1977 text).
Package dice is the rules' die-roll mechanics (Book 1 pp.
Package dice is the rules' die-roll mechanics (Book 1 pp.
internal
fixture
Package fixture is the one definition of the golden-fixture set: the characters the chargen and render packages both compare their output against, byte for byte.
Package fixture is the one definition of the golden-fixture set: the characters the chargen and render packages both compare their output against, byte for byte.
Package render turns the canonical JSON character record into Markdown: the character sheet in the style the book itself summarizes a character (the UPP line plus skills, as in the Jamison example, pp.
Package render turns the canonical JSON character record into Markdown: the character sheet in the style the book itself summarizes a character (the UPP line plus skills, as in the Jamison example, pp.
Package service holds the data-driven definitions of the six prior services: the Prior Service Table (Book 1 p.
Package service holds the data-driven definitions of the six prior services: the Prior Service Table (Book 1 p.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL