Skip to content

Add mise run new to scaffold a kata - #5

Open
TimHacker wants to merge 1 commit into
add-mise-ci-and-containersfrom
add-new-kata-task
Open

Add mise run new to scaffold a kata#5
TimHacker wants to merge 1 commit into
add-mise-ci-and-containersfrom
add-new-kata-task

Conversation

@TimHacker

Copy link
Copy Markdown
Collaborator

Starting a kata currently means knowing three things before you can write a
line: which directory the solution goes in, what the test file must be called,
and how tests import solutions. This turns that into one command.

mise run new roman-numerals

It creates the solution file and a matching test, and the generated test
fails — so you start red, which is where TDD starts, rather than at a blank
file.

Names are slugified and converted to whatever this language expects, so
roman-numerals produces correctly-cased filenames and identifiers.

Implementation is scripts/new-kata.sh (~30 lines) plus one [tasks.new]
entry in mise.toml. It refuses to overwrite existing files, and works both
via mise run new <name> and by calling the script directly.

Verified: scaffolds correctly, the suite goes red with the generated test
present, and green again once it is removed.

Worth noting the cost: this is the first file in the repo whose content is
genuinely language-specific logic rather than configuration, so it is the one
piece that has to be maintained separately per starter. If that trade is not
worth it, closing this PR loses nothing else.

@TimHacker
TimHacker force-pushed the add-new-kata-task branch 5 times, most recently from 9368957 to 57c2d14 Compare August 7, 2026 08:30
Starting a kata means knowing the directory layout, the file-naming rule and
the import convention. This collapses that to one command, and generates a
failing test so you start red rather than staring at a blank file.

Names are slugified and converted to whatever this language expects, so
`mise run new roman-numerals` produces correctly-named files and identifiers.

Co-Authored-By: Claude Opus 5 <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