Repository navigation
Conversation
`docs/CLAUDE.md` owns the code-block rules a contributor reads before editing a page, and said nothing about naming the file a config sample belongs in. It now carries the leading `# <path>` comment, the `title="<path>"` fallback for a language with no comment syntax, and the `USER_CONFIG_START` / `PROJECT_CONFIG_START` exception — those regions are `# `-prefixed wholesale into `dev/config.example.toml`, where a path comment would double-comment. The one sample that stays untitled, the `command` values under "Other tools" on the LLM commit page, now says it is a list of alternatives rather than a file. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
worktrunk-bot
left a comment
There was a problem hiding this comment.
Two points on the convention text, both in docs/CLAUDE.md.
The USER_CONFIG_START / PROJECT_CONFIG_START exception restates a rule the same file already carries under "Command-page generation": "Config examples between USER_CONFIG_START / USER_CONFIG_END and PROJECT_CONFIG_START / PROJECT_CONFIG_END also generate commented TOML files. Put prose before a code block instead of adding standalone TOML comment lines that would become double-commented." That paragraph already rules out the comment line a path would live on, so the new one re-derives the # -prefix mechanism about 75 lines from where the file states it, and a change to transform_config_source_to_toml acquires a second place it has to stay true. Root CLAUDE.md under Project Status asks to "Consolidate or remove existing prose and machinery before adding another explanation, mode, or special case". The inline suggestion keeps the exception where the convention's reader needs it without the second copy; folding the sentence into the earlier paragraph instead would do as well.
The title="<path>" fallback is scoped to "a language with no comment syntax". That describes the json title="~/.claude/settings.json" fence on the Claude Code page, but not the markdown title="CLAUDE.md" fence on tips & patterns: Markdown has <!-- … -->, and Expressive Code accepts <!-- as a file-name comment start with markdown/md/mdx as their own language group (getFileNameFromComment in @expressive-code/plugin-frames, pinned here at 0.44.2), so <!-- CLAUDE.md --> would be lifted into the tab. A contributor applying the rule literally would therefore "correct" that block and put a stray HTML comment into a fragment readers copy into their own CLAUDE.md. The inline suggestion widens the condition so it covers both existing uses.
The double-comment rule under "Command-page generation" already rules out the comment line a path would need, so the exception cross-references it rather than re-deriving the `# `-prefix mechanism. `title="<path>"` is for a sample where the comment would be invalid or noisy, not one whose language lacks comments: Expressive Code reads `<!--` as a file-name comment for `markdown`, so the old wording invited a stray HTML comment into a fragment readers paste into their own CLAUDE.md. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Follow-on to #4173, which gave every config sample on the site a file-name tab but left the convention itself unwritten.
docs/CLAUDE.mdowns 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, thetitle="<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 theUSER_CONFIG_START/PROJECT_CONFIG_STARTexception and why it exists: every line in those regions is#-prefixed intodev/config.example.toml, so a path comment would double-comment and name the file it already is.The one sample left untitled, the three
commandvalues under "Other tools" on the LLM commit page, now says what it is — "Any of these replaces thecommandline above" — so the missing tab reads as a distinction rather than an oversight.