Skip to content

Auto-generate wt.example.toml from mod.rs source#1835

Merged
max-sixty merged 3 commits intomainfrom
example-config-files
Mar 31, 2026
Merged

Auto-generate wt.example.toml from mod.rs source#1835
max-sixty merged 3 commits intomainfrom
example-config-files

Conversation

@max-sixty
Copy link
Copy Markdown
Owner

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

max-sixty and others added 3 commits March 30, 2026 23:25
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>
@max-sixty max-sixty merged commit 75dd894 into main Mar 31, 2026
33 of 34 checks passed
@max-sixty max-sixty deleted the example-config-files branch March 31, 2026 07:09
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>
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.

2 participants