Repository navigation
docs(aliases): teach [[aliases.NAME]] pipeline blocks - #2144
Merged
Merged
Conversation
Aliases already share the `CommandConfig` deserializer with hooks, so `[[aliases.NAME]]` blocks deserialize into pipeline steps with zero code changes. Teach the block form as the canonical shape for multi-step aliases, alongside the existing single-string and named-table forms. Also drop the "named-table technically works, single-string is the expected usage" framing from the `aliases` field rustdoc — all three shapes are first-class. Co-Authored-By: Claude <[email protected]>
worktrunk-bot
approved these changes
Apr 13, 2026
max-sixty
added a commit
that referenced
this pull request
Apr 13, 2026
…fig::commands (#2149) Cut over hook pipeline docs from inline-list form (`hook = [{name = "..."}, ...]`) to `[[hook]]` array-of-tables blocks. The deserializer already accepts this shape — no code changes were needed; the change is purely teaching. This mirrors what landed for aliases in #2144. The summary in `Pipeline Ordering` now foregrounds the TOML shape progression instead of a labeled taxonomy: - `post-start = "npm install"` — one command - `[post-start]` — one section of concurrent commands - `[[post-start]]` — one of multiple sections, run in order The bracket count itself tracks the structural escalation (value → section → array-of-sections). Also adds a module-level doccomment to `src/config/commands.rs` describing the three primitive TOML shapes the hook deserializer accepts (string / dict / list) and the asymmetry between dict-at-top (always `Concurrent`) vs dict-in-list (1-entry → `Single(named)`). This is the analysis that motivated the cutover and is retained so future readers can orient on the deserialization rules without re-deriving them. The Databases example in `hook.md` and `tips-patterns.md` got its first pipeline step named (`set-vars`) since `[[post-start]]` blocks can't hold anonymous bare strings the way inline lists could. > _This was written by Claude Code on behalf of Maximilian_ --------- Co-authored-by: Claude <[email protected]>
3 tasks done
max-sixty
added a commit
that referenced
this pull request
Apr 13, 2026
…2151) ## Summary - Pre-\* table-form migration now emits `[[pre-merge]]` array-of-tables blocks instead of an inline `pre-merge = [{...}, {...}]` pipeline, matching the block form taught in #2144 for `[[aliases.NAME]]`. - Sections stay where the user wrote them: iterate pre-\* keys in document order and replace via `get_mut` rather than `remove` + `insert` (which appended at the end). Generated diff before/after: ```diff -[pre-merge] -test = "cargo test" -lint = "cargo clippy" +[[pre-merge]] +test = "cargo test" + +[[pre-merge]] +lint = "cargo clippy" ``` ## Test plan - [x] `cargo test --lib config::deprecation` (139 passed) - [x] `cargo test --test integration config_show` (97 passed) - [x] Re-accepted two snapshots (`snapshot_migrate_pre_hook_table_form`, `config_show_displays_pre_hook_table_form_deprecation`) > _This was written by Claude Code on behalf of max-sixty_ Co-authored-by: Claude <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Aliases share the
CommandConfigdeserializer with hooks, so[[aliases.NAME]]blocks already deserialize into pipeline steps with zero code changes — analogous to the recent[[hook]]cutover in 32bc617. Teach the block form as the canonical shape for multi-step aliases.Changes:
src/cli/mod.rs— new paragraph +[[aliases.release]]example in thewt stepAliases section, explaining sequential blocks with concurrent keys and fail-fast on step failuresrc/config/project.rs— rewrite thealiasesfield rustdoc to treat string / named-table /[[aliases.NAME]]as three first-class forms (drops the "single-string is the expected usage" framing)docs/content/step.md+skills/worktrunk/reference/step.md— auto-syncedNo deserializer work — covered by existing
test_deserialize_pipeline_named_singleinsrc/config/commands.rs.