Skip to content

docs: name the file every config sample belongs in - #4173

Merged
max-sixty merged 5 commits into
mainfrom
extending
Sep 17, 2026
Merged

max-sixty merged 5 commits into
mainfrom
extending

Conversation

@max-sixty

@max-sixty max-sixty commented Sep 17, 2026 •

Copy link
Copy Markdown
Owner

Every config sample on the site now names the file it belongs in. Expressive Code lifts a leading # <path> comment out of a code block and renders it as a file-name tab — a convention some blocks already used, now applied to all 56 TOML samples across extending, hook, config, step, switch, list, llm-commits, and tips-patterns, plus the .envrc, mise.toml, and scripts/pre-start-setup.py samples. The two that can't carry a comment, a settings.json and a CLAUDE.md fragment, use the title= fence attribute.

Each assignment was checked rather than eyeballed: a script writes every titled block into the file it names and runs wt config show, failing on any unknown-field or "belongs in user config" warning. All 56 pass, and the check was confirmed non-vacuous against a misplaced commit.generation.command and a bogus section.

The generated # User Configuration and # Project Configuration regions keep bare blocks. Those sections state their file once at the top, and every line in them is # -prefixed into dev/config.example.toml, where a path comment would double-comment and name the file it already is.

Extending page prose

"Deferring expansion to a nested wt command" becomes "Nesting templates", opening with the case — an alias passing a template to the wt command it calls — and showing both aliases in one block. Probing the old text against a scratch repo showed its sh -c '…' wrapper, described as a for-each catch, was never needed: quoting is what keeps the deferred template one shell token, and that is the same rule wt switch --execute follows. Four inbound links move to #nesting-templates.

The wt up recipe's three closing paragraphs collapse to the one trap worth stating, --no-autostash overriding a global rebase.autostash.

Naming a file on each sample made [aliases] visible under both config files, so the Aliases section now says it takes either.

This was written by Claude Code on behalf of max-sixty

max-sixty and others added 2 commits September 17, 2026 11:57
Expressive Code lifts a leading `# <path>` comment out of a code block and
renders it as a file-name tab, a convention some blocks already used. Extend it
to every config sample on the site, so a reader knows whether a block goes in
`.config/wt.toml` or `~/.config/worktrunk/config.toml` without reading back to
the surrounding prose. Two samples that cannot carry a comment — a
`settings.json` and a `CLAUDE.md` fragment — use the `title=` fence attribute
instead.

The generated `# User Configuration` / `# Project Configuration` regions keep
bare blocks: those sections state their file once at the top, and every line in
them is `# `-prefixed into `dev/config.example.toml`, where a path comment would
double-comment and name the file it already is.

Rewrite "Deferring expansion to a nested `wt` command" to open with the alias
that gets it wrong, then the fix. The `sh -c '…'` wrapper the old text called a
`for-each` catch was never needed: quoting is what keeps the deferred template
one shell token, and it is the same rule `wt switch --execute` follows. Cut the
`wt up` recipe's three closing paragraphs to the one trap worth stating.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
"Nesting templates" names what the section is for. It now opens with the case —
an alias passing a template to the `wt` command it calls — shows both aliases in
one block, and states the mechanism once. The four inbound links move to
`#nesting-templates`.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

@worktrunk-bot worktrunk-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Titling the samples is a clear win, especially for the skills/ mirrors where the path survives as a literal comment an agent reads. Two places where the new titles leave the reader without the answer the PR sets out to give.

[aliases] now appears under two different files with no rule connecting them. The intro block is .config/wt.toml; s = "wt switch {{ args }}", show-branches, up, and hook-log are ~/.config/worktrunk/config.toml. Each assignment reads deliberate on its own — project-specific recipes in project config, personal shorthands in user config — but "Aliases are configured under [aliases]" never says both files accept them, so the page now asserts two answers and explains neither. This is also the section where the choice has a consequence worth one clause: an alias in project config is arbitrary code from a repo the reader may have just cloned and runs only behind the approval gate, while a user-config one doesn't, and it follows them across every repo. Happy to push the wording if you'd rather not bikeshed it.

The wt up recipe's ; is now unexplained — suggestion inline. Of the three trimmed closing paragraphs, --no-autostash is the right one to keep, but the ; is still visible in the recipe body, so a reader adapting it reads it as style rather than the deliberate choice it is, and "fixing" it to && silently changes what the sweep does when one remote fails.

Comment thread docs/src/content/docs/extending.md Resolved
max-sixty and others added 3 commits September 17, 2026 13:53
Naming a file on each sample made `[aliases]` visible under both, with nothing
in the Aliases section saying both accept it.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Third-person indicative, and the two homes are the whole point.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit af9276d into main Sep 17, 2026
39 checks passed
@max-sixty
max-sixty deleted the extending branch September 17, 2026 21:31
max-sixty added a commit that referenced this pull request Sep 17, 2026
Follow-on to #4173, which gave every config sample on the site a
file-name tab but left the convention itself unwritten.

`docs/CLAUDE.md` owns the code-block rules a contributor reads before
editing a page. It now carries the leading `# <path>` comment that
Expressive Code lifts into the tab, the `title="<path>"` fallback for a
language with no comment syntax, and the exclusions — a block showing
values for one key, or a counter-example, stays untitled. It also
records the `USER_CONFIG_START` / `PROJECT_CONFIG_START` exception and
why it exists: every line in those regions is `# `-prefixed into
`dev/config.example.toml`, so a path comment would double-comment and
name the file it already is.

The one sample left untitled, the three `command` values under "Other
tools" on the LLM commit page, now says what it is — "Any of these
replaces the `command` line above" — so the missing tab reads as a
distinction rather than an oversight.

> _This was written by Claude Code on behalf of max-sixty_

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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