Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
850cac9
docs: add dogfood findings and fix plan
claude Nov 20, 2026
d9e175b
build: scaffold-check gains fmt/doc gates and --name, keeps CARGO_TAR…
claude Nov 20, 2026
eff8d91
ci: drop the checkout credential in generated workflows
claude Nov 20, 2026
c67252a
ci: build generated releases without the Actions cache
claude Nov 20, 2026
3ce7a92
ci: pin setup-node and drop the checkout credential in this repo's CI
claude Nov 20, 2026
0d5b1b2
fix(validate): reject Rust keywords, reserved names and names over 64…
claude Nov 20, 2026
99f5439
fix(cli): note when a positional folder name can't be the crate name
claude Nov 20, 2026
7a38d56
fix(args): reject an MSRV newer than the toolchain or older than the …
claude Nov 20, 2026
166fe1d
fix(cli): note options the kind ignores; blank guiStack in --json wit…
claude Nov 21, 2026
ae820f7
fix(context): resolve an empty tagline once so README and Cargo.toml …
claude Nov 21, 2026
7445c64
fix(git): commit into a fresh empty repository; truthful summary when…
claude Nov 21, 2026
b51a54a
fix: keep generated Rust rustfmt-stable for any project name length
claude Nov 21, 2026
6d57531
fix: ship the CHANGELOG.md each project's generator writes
claude Nov 21, 2026
9505f95
fix(write): clean up after a failed write; list files --force overwrote
claude Nov 21, 2026
5bcdfde
fix: GUI rustdoc builds cleanly under -D warnings
claude Nov 21, 2026
9209843
fix: generated docs name only what the project has
claude Nov 21, 2026
80e32b1
build: bump the TUI template to ratatui 0.30 and crossterm 0.29
claude Nov 21, 2026
c11038a
docs: correct statements in generated docs
claude Nov 21, 2026
7712459
fix(reproduce): carry author, GitHub, accent and the real target folder
claude Nov 21, 2026
4a651ac
docs: align this repo's docs with the code
claude Nov 21, 2026
8710457
docs(cli): say --json writes files but skips post-steps
claude Nov 21, 2026
92d5f6f
test: expect the CLI config dir from CARGO_PKG_NAME
claude Nov 21, 2026
ac959a0
fix: header banners fit 100 columns for any project name
claude Nov 21, 2026
c317284
Merge CLI validation, notices and recreate-command fixes
claude Nov 21, 2026
019ffe7
fix: cli db.rs docs no longer link the private MIGRATIONS
claude Nov 21, 2026
5f05a17
Merge workflow hardening, changelog consistency and doc corrections
claude Nov 21, 2026
69684ec
test: follow the first-commit message's new home in the changelog test
claude Nov 21, 2026
62d2899
Merge commit '69684ec' into worktree-agent-a24b6153cb9a62199
claude Nov 21, 2026
7b4b366
fix: gate the workspace xtask changelog command on changelogGen
claude Nov 21, 2026
fbc3408
test: run the name-length rustfmt check on every preset, no exemptions
claude Nov 21, 2026
e07c741
Merge template fmt/rustdoc fixes, scaffold-check gates and TUI pins
claude Nov 21, 2026
c052781
docs: gate the workspace decision note on changelogGen; record name-w…
claude Nov 21, 2026
b66cd19
fix(prompts): Esc inside Customize steps back instead of quitting
claude Nov 21, 2026
f1f08c9
fix(ui): restore the terminal when Ctrl-C interrupts the run steps
claude Nov 21, 2026
8cf4351
fix(prompts): a re-picked preset beats --kind; review hint names the …
claude Nov 21, 2026
abcd6b0
fix(prompts): cross-check MSRV, toolchain and edition in Licence + Rust
claude Nov 21, 2026
6eab8cb
fix(ui): window tall lists and fit option rows to narrow terminals
claude Nov 21, 2026
78aa367
fix(ui): visible focus and text cursor without colour; --no-color emi…
claude Nov 21, 2026
58847b6
Merge interactive prompt fixes
claude Nov 21, 2026
eed41b0
docs: add the dogfood report and evidence
claude Nov 21, 2026
f84bd94
docs: correct the commit count in the dogfood report
claude Nov 21, 2026
2170a4d
fix: show the target folder with / separators on Windows
claude Nov 21, 2026
380e65e
test: emit SIGINT in the Ctrl-C test on Windows
claude Nov 21, 2026
b929a36
test: expect a native CARGO_TARGET_DIR path in scaffold-check
claude Nov 21, 2026
fa62f7a
test: wait for the prompt and retry a ConPTY that never started
claude Nov 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ jobs:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@v7 # TODO: pin to a reviewed full commit SHA.
with:
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: ${{ matrix.node }}
cache: npm
Expand Down Expand Up @@ -60,7 +62,9 @@ jobs:
gate: check
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@v7 # TODO: pin to a reviewed full commit SHA.
with:
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 22
cache: npm
Expand Down
6 changes: 5 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@ Reference projects, usually checked out next to this repo (read-only, copy from
npm run typecheck && npm test && npm run build
node scripts/scaffold-check.mjs <preset> # scaffold + fmt + clippy -D warnings + test
node scripts/scaffold-check.mjs <preset> --gate check # faster: cargo check only
node scripts/scaffold-check.mjs <preset> --gate fmt # cargo fmt --check only, no build
node scripts/scaffold-check.mjs <preset> --gate doc # cargo doc --no-deps, RUSTDOCFLAGS=-D warnings
```

Presets: `rustaman strobe cli tui lib minimal`. Override any answer with `--set features.tray=true`.
Presets: `rustaman strobe cli tui lib minimal`. Override any answer with `--set features.tray=true`
(split on the first `=`), the project name with `--name <name>`. The doc gate is not part of the
default full gate; run it too when you touch doc comments. An existing `CARGO_TARGET_DIR` is used.

## Rules

Expand Down
101 changes: 100 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,79 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- On Windows the target folder in the review hint, the `cd` line and the recreate command uses `/`
separators (`out/app`, `D:/proj/app`), so Git Bash no longer eats the backslashes and the
recreate command needs no quoting for them.
- A workspace without the changelog generator no longer mentions `cargo xtask changelog` in
`docs/decisions/D1.md`.
- A workspace scaffolded `--without changelogGen` no longer ships `cargo xtask changelog`, which
would have rewritten the hand-edited CHANGELOG.md: the module, command and help text are gated.
- Generated projects are `cargo fmt --check` clean for every project name from 1 to 64 characters:
lines that grew with the name (GUI `build.rs`, `main.rs`, `config.rs`, the screenshot and brand
examples, CLI `main.rs` and tests, the TUI log path) now name the crate through a short alias
(`use <crate> as app;`) or a constant, so rustfmt's layout no longer depends on the name.
GUI projects of 14+ characters, workspaces of 16+, used to fail. `test/name-length.test.ts`
guards it.
- Projects with long names pass their own header check: `Dependencies:` lines name "the library
crate" instead of its (up to 68-character) path, and the check no longer counts the `Module:`
line, whose value is the file's path, against the 100-column limit.
- `RUSTDOCFLAGS="-D warnings" cargo doc --no-deps` passes on eframe GUI projects (a private and a
redundant intra-doc link in `src/gui/run.rs`) and with `--with tray` off Windows (`src/tray.rs`
linked the Windows-only `win::tray`), and for a `cli` with SQLite (`src/db.rs` linked the private
`MIGRATIONS`).
- Generated docs say what the project has: the `unsafe` boundary check names `src/win/` (plus
`src/gui/run/` on winit-glow) instead of a `src/gui/run/` an eframe project doesn't have, and
the app and shortcut docs mention the tray and command palette only when they are enabled.
- Project names that cannot build are refused up front, on the command line and in the name
prompt: Rust keywords from every edition (`fn`, `type`, `gen`, `try` …), Cargo-reserved names
(`build`, `deps` …), Windows device names (`con`, `nul` …), and names over 64 characters (the
crates.io limit, which `--bin` now shares). A long name used to die mid-write.
- A target folder whose name can't be a crate name (`create-rust-app MyDir -y`) still gets the
default crate name, but a one-line note on stderr now says so and points at `--name`.
- An MSRV newer than the pinned toolchain, or older than the edition allows (2024 needs 1.85),
is an argument error (exit 2), whether it came from `--msrv`, `--toolchain`, `--set` or a preset.
It used to scaffold a project cargo then refused to build.
- Options the chosen kind ignores (`--preset lib --with tray`, `--preset lib --bin foo`,
`--preset cli --gui winit-glow`, `subcommands` on a TUI or without clap) each print a one-line
note on stderr instead of vanishing silently; `--quiet` hides them. `--json` reports `guiStack`
as `""` for kinds without a GUI, as it already did `themeBase`.
- An empty tagline reads as the project name everywhere: the README's bold line used to come out
as `****` while `Cargo.toml` already fell back to the name.
- Scaffolding into a folder that holds only a fresh `git init` makes the first commit there,
staging the generated files by path (anything else in the folder stays untracked). Inside some
other repository git is still skipped, and the finished summary no longer promises a commit.
- A write that fails midway no longer leaves a partial project: a folder the run created is
removed, and in an existing folder only the files the run added are, with the error saying
which. `--force` lists the existing files it overwrote on stderr.
- The "again without prompts" command recreates the same project: it carries `--accent`,
`--author`, `--github`, display name and email, names the real target folder, and adds `--name`
when the crate name differs from the folder's.
- `--help`, the README and CONTRACTS say what `--json` does without `--dry-run`: it writes the
files but skips fetch, git, cargo check and `--open`.
- Esc inside Customize steps back instead of quitting the run: on the Customize menu it returns
to the review, inside a section (or "Start over from a preset") it reopens the menu and drops
only that section's edits. The footer there says `esc back`. Ctrl-C still quits everywhere,
and Esc on the name, kind and review screens still cancels.
- Ctrl-C during the run steps (writing, `cargo fetch`, `git init`, `cargo check`) shows the
cursor again, settles the spinner line and says the partly created folder was left in place,
then exits 130. The cursor used to stay hidden, with no message.
- "Start over from a preset" uses the preset you pick even when `--kind` or `--preset` was given;
it used to keep the flag's kind (`--kind lib`, start over as a desktop app: still a library).
- With a positional folder, the review's "Create it" hint names that folder
(`create-rust-app fl-dir`, renamed in Customize: `writes ./fl-dir`, not the new name).
- The Licence + Rust prompts cross-check what you type, as the flags do: an MSRV older than the
edition allows, or a toolchain older than the MSRV, is refused inline with the reason; spaces
around a version are trimmed. A long message wraps on the rail instead of past the edge.
- Lists taller than the terminal scroll: the window follows the focused row, with "↑ n more" /
"↓ n more" lines, and no stale frame lines are left in the scrollback after a choice.
- At 40 columns no option row, footer or prompt message wraps: descriptions shorten, then drop,
then labels are cut with an ellipsis, and footers drop their least useful hints first. The
terminal size is read on every frame, so a resize is honoured.
- Without colour (`NO_COLOR`, `--no-color`) the focused multi-select row gets a `›` mark (`>` in
ASCII) and the text cursor shows as a caret glyph, where both used to be invisible.
`--no-color` now emits no colour escape codes at all: the text prompt's inverse-video cursor
ignored the flag.

- A release build of a GUI app run from a terminal prints its `--help`, `--version`, usage errors
and headless output: it attaches to the parent console just before printing
(`src/win/console.rs`). Opening the window never attaches, so closing the terminal doesn't close
Expand All @@ -32,9 +105,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
committed what was there, printed success and exited 0. Occupied folders are now refused before
any question (unless `--force`), and a failed write stops the run with exit code 1.
- Animated prompts no longer flicker.
- Generated workflows check out with `persist-credentials: false`, so the job token is not left
in `.git/config` for build scripts to read (zizmor `artipacked`). No step needed it: `gh`
authenticates with `GH_TOKEN`.
- The generated release build no longer restores `Swatinem/rust-cache`: the Actions cache is
writable from any branch's CI, so a tagged build could have shipped a poisoned entry (zizmor
`cache-poisoning`, high).
- A fresh project's `CHANGELOG.md` is what its generator writes: `cargo run --example changelog --
--check` passes straight after scaffolding and regenerating is a no-op (`cargo xtask changelog`
on workspaces too). Both generators share the header, `Unreleased` entries carry no commit hash
(released ones still do), and CLAUDE.md / CONTRIBUTING.md say the file is generated and name
the command whenever the generator ships.
- Generated docs: the README says a theme is eleven colours, as the themes do; CLAUDE.md and
CONTRIBUTING.md no longer claim a check enforces `assert!` messages, and list every place the
header check walks (`benches/`, `build.rs` too) with each module-name form; the GUI README lists
the Linux runtime libraries; CONTRIBUTING says attestation needs a public repository or GitHub
Enterprise Cloud; the release workflow's matrix comment says what else a new target needs.
- This repo's docs match the code: CONTRACTS lists `post.fetch` and every binary extension the
engine copies raw, PLAN's `npm pack` check names `dist/` and `templates/`, and the changelog's
CI line names Node 22 and 26 (the `engines` floor is 22.18).
- This repo's CI pins `actions/setup-node` to a full commit SHA (v7.1.0) and checks out without
persisting the token.

### Changed

- TUI projects build on ratatui 0.30 and crossterm 0.29 (were 0.29 and 0.28); the templates needed
no code changes, and the scaffold still builds on the 1.98 MSRV.
- The classic Windows console gets 24-bit colour, block letters and a glyph set its font can draw,
instead of an ASCII fallback.
- Motion: shimmering focused option, cycling marker, wave spinner, live file and crate counters,
Expand All @@ -53,6 +149,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- `scaffold-check` gains `--gate fmt` (rustfmt only, no build), `--gate doc` (`cargo doc --no-deps`
with `RUSTDOCFLAGS=-D warnings`, opt-in) and `--name <name>`; it splits `--set` on the first `=`
and keeps an existing `CARGO_TARGET_DIR`.
- `--with subcommands` on desktop apps: `app <job>` runs a headless job (`themes`, `paths` to start
with) and exits, a bare run opens the window as before, and `tests/cli.rs` covers both paths.
- `--base <theme>`: lay the signature theme's accent on any shipped theme's surfaces, e.g.
Expand All @@ -69,7 +168,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- README documents `--set`, `--bin` and `--preset custom`.
- Project README covering presets, CLI flags, Rust conventions, and contributing.
- MIT license, copyright 2026 Lawrence Norton.
- Node 20, 22, and 26 CI on Linux and Windows, plus per-preset Rust scaffold checks.
- Node 22 and 26 CI on Linux and Windows, plus per-preset Rust scaffold checks.
- Weekly Dependabot updates for npm dependencies and GitHub Actions.
- In-process preset e2e checks for rendered tokens, directives, unique destinations,
and path-derived Rust module headers.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ create-rust-app [dir] [options]
| Flag | Meaning |
|---|---|
| `[dir]` | Target directory (defaults to the project name) |
| `--name <kebab>` | Crate / project name, `^[a-z][a-z0-9-]*$` |
| `--bin <name>` | Executable name when it differs from the crate (writes `[[bin]]`; clap, README and release follow it) |
| `--name <kebab>` | Crate / project name, `^[a-z][a-z0-9-]*$`, at most 64 characters; not a Rust keyword (`fn`, `type`, `gen` …), `test`/`std`/`core`/`alloc`/`proc-macro`, a Cargo-reserved name (`build`, `deps`, `examples`, `incremental`) or a Windows device name (`con`, `nul` …) |
| `--bin <name>` | Executable name when it differs from the crate (writes `[[bin]]`; clap, README and release follow it). Lowercase letters, digits, `-` and `_`, at most 64 characters, same Cargo and Windows reserved names |
| `--preset <p>` | `rustaman` `strobe` `cli` `tui` `lib` `minimal`, or `custom` for no preset (the defaults) |
| `--kind <k>` | `cli` `gui` `tui` `lib` `workspace` |
| `--gui <stack>` | `eframe` (wgpu) or `winit-glow` (winit + glutin + egui_glow) |
| `--base <theme>` | Surfaces the signature theme lays your accent on: any shipped theme id, e.g. `graphite` for neutral greys (default `midnight`) |
| `--edition <e>` | `2024` or `2021` |
| `--msrv <v>` | `rust-version` in Cargo.toml (default `1.98`) |
| `--msrv <v>` | `rust-version` in Cargo.toml (default `1.98`); no newer than `--toolchain`, and at least `1.85` for edition 2024 (`1.56` for 2021) |
| `--toolchain <v>` | Exact channel pinned in `rust-toolchain.toml` and CI (default `1.99.1`) |
| `--license <l>` | `MIT`, `MIT+CommonsClause`, `Apache-2.0`, `MIT OR Apache-2.0` |
| `--author <name>` | Author for Cargo.toml, LICENSE, headers |
Expand All @@ -110,10 +110,10 @@ create-rust-app [dir] [options]
| `--no-cargo-check` | Skip `cargo check` even if a preset turns it on |
| `--open <editor>` | Open the project in `code` or `cursor` when done |
| `--dry-run` | Print the plan, write nothing |
| `--json` | Machine-readable output |
| `--json` | Machine-readable output: prints only `{ answers, files }` on stdout (notes go to stderr). Without `--dry-run` it still writes the files, but skips `cargo fetch`, git, `cargo check` and `--open`; `answers.post` shows what was asked, not what ran |
| `--no-color` | Plain output (also honoured: `NO_COLOR`, non-TTY, `CI`) |
| `--quiet` | Only errors |
| `--force` | Write into a non-empty directory |
| `--force` | Write into a non-empty directory; lists the existing files it overwrote on stderr |
| `--help`, `--version` | The usual |

A non-TTY stdin implies `--yes`. Answer flags apply left to right, so a later `--set` or
Expand Down
Loading