Auto-generate wt.example.toml from mod.rs source#1835
Merged
Conversation
The project config example file was hand-maintained with no sync tests, while the user config had a robust auto-generation pipeline. This brings both to parity: mod.rs is the source of truth, sync tests generate the example files, and CI catches drift. Hooks documentation (~70 lines) replaced with a pointer to `wt hook --help`, which already has the comprehensive reference. The example file focuses on project-specific settings (list.url, ci.platform, step.copy-ignored, aliases). Co-Authored-By: Claude <noreply@anthropic.com>
# Conflicts: # dev/wt.example.toml # docs/content/config.md # skills/worktrunk/reference/config.md # src/cli/mod.rs # tests/snapshots/integration__integration_tests__help__help_config_create.snap # tests/snapshots/integration__integration_tests__help__help_config_long.snap
The hooks quick-reference showed string and named table formats but omitted the pipeline (list of maps) format. Co-Authored-By: Claude <noreply@anthropic.com>
worktrunk-bot
approved these changes
Mar 31, 2026
max-sixty
added a commit
that referenced
this pull request
Mar 31, 2026
The pointer to `wt hook --help` plus quick-reference of all three formats is sufficient for the created `.config/wt.toml`. Users get uncommentable examples for common hooks and a pointer to the full reference. Removes the evaluation TODO added in #1835. > _This was written by Claude Code on behalf of @max-sixty_ Co-authored-by: Claude <noreply@anthropic.com>
max-sixty
added a commit
that referenced
this pull request
Apr 1, 2026
The project config example file (`dev/wt.example.toml`) was hand-maintained with no sync tests, while the user config example had a robust auto-generation pipeline. This brings both to parity — `mod.rs` is the single source of truth, sync tests generate both example files, and CI catches drift. Hooks documentation (~70 lines of formats, template variables, and per-type examples) replaced with a pointer to `wt hook --help` plus a quick-reference showing all three hook formats (string, named table, pipeline). The example file now focuses on project-specific settings: `list.url`, `forge`, `step.copy-ignored`, and aliases. The sync test infrastructure is refactored from a user-config-specific function into shared `extract_config_section` and `assert_config_example_in_sync` helpers that both tests call. > _This was written by Claude Code on behalf of @max-sixty_ --------- Co-authored-by: Claude <noreply@anthropic.com>
max-sixty
added a commit
that referenced
this pull request
Apr 1, 2026
The pointer to `wt hook --help` plus quick-reference of all three formats is sufficient for the created `.config/wt.toml`. Users get uncommentable examples for common hooks and a pointer to the full reference. Removes the evaluation TODO added in #1835. > _This was written by Claude Code on behalf of @max-sixty_ Co-authored-by: Claude <noreply@anthropic.com>
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.
The project config example file (
dev/wt.example.toml) was hand-maintained with no sync tests, while the user config example had a robust auto-generation pipeline. This brings both to parity —mod.rsis the single source of truth, sync tests generate both example files, and CI catches drift.Hooks documentation (~70 lines of formats, template variables, and per-type examples) replaced with a pointer to
wt hook --helpplus a quick-reference showing all three hook formats (string, named table, pipeline). The example file now focuses on project-specific settings:list.url,forge,step.copy-ignored, and aliases.The sync test infrastructure is refactored from a user-config-specific function into shared
extract_config_sectionandassert_config_example_in_synchelpers that both tests call.