Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Revert "docs(config): add H1 major sections with TOC support (#857)"
Maximilian Roos400f22d2c060
diff --git a/.claude-plugin/skills/worktrunk/reference/config.md b/.claude-plugin/skills/worktrunk/reference/config.mdindex 0d1a4a510..1f54c15a6 100644--- a/.claude-plugin/skills/worktrunk/reference/config.md+++ b/.claude-plugin/skills/worktrunk/reference/config.md@@ -59,7 +59,7 @@ test = "npm test"---<!-- USER_CONFIG_START -->-# User Configuration+## Worktrunk User ConfigurationCreate with `wt config create`.@@ -105,7 +105,7 @@ Generate commit messages automatically during merge. Requires an external CLI toSee [LLM commits docs](https://worktrunk.dev/llm-commits/) for setup and [Custom prompt templates](#custom-prompt-templates) for template customization.-## Command config+## Commands### List@@ -280,7 +280,7 @@ Combine these commits into a single commit message.----# Project Configuration+## Project configurationProject config (`.config/wt.toml`) defines lifecycle hooks and project-specific settings. This file is checked into version control and shared with the team. Create with `wt config create --project`.@@ -302,7 +302,7 @@ platform = "github" # or "gitlab"----# Shell Integration+## Shell integrationWorktrunk needs shell integration to change directories when switching worktrees. Install with:@@ -339,8 +339,6 @@ Or via environment variable:export WORKTRUNK_SKIP_SHELL_INTEGRATION_PROMPT=true```-# Other-## Environment variablesAll user config options can be overridden with environment variables using the `WORKTRUNK_` prefix.@@ -407,8 +405,6 @@ Usage: <b><span class=c>wt config</span></b> <span class=c>[OPTIONS]</span> <spa<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>Verbose output (-v: hooks, templates; -vv: debug report)-# Subcommands-## wt config showShow configuration files & locations.diff --git a/.claude-plugin/skills/worktrunk/reference/hook.md b/.claude-plugin/skills/worktrunk/reference/hook.mdindex 449e51634..4d74c45e0 100644--- a/.claude-plugin/skills/worktrunk/reference/hook.md+++ b/.claude-plugin/skills/worktrunk/reference/hook.md@@ -429,8 +429,6 @@ Usage: <b><span class=c>wt hook</span></b> <span class=c>[OPTIONS]</span> <span<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>Verbose output (-v: hooks, templates; -vv: debug report)-# Subcommands-## wt hook approvalsManage command approvals.diff --git a/.claude-plugin/skills/worktrunk/reference/step.md b/.claude-plugin/skills/worktrunk/reference/step.mdindex 256562b03..77cee4f40 100644--- a/.claude-plugin/skills/worktrunk/reference/step.md+++ b/.claude-plugin/skills/worktrunk/reference/step.md@@ -60,8 +60,6 @@ Usage: <b><span class=c>wt step</span></b> <span class=c>[OPTIONS]</span> <span<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>Verbose output (-v: hooks, templates; -vv: debug report)-# Subcommands-## wt step commitStage and commit with LLM-generated message.diff --git a/dev/config.example.toml b/dev/config.example.tomlindex 49abff16e..1d382e644 100644--- a/dev/config.example.toml+++ b/dev/config.example.toml@@ -1,4 +1,4 @@-# # User Configuration+# ## Worktrunk User Configuration## Create with `wt config create`.#@@ -42,7 +42,7 @@## See LLM commits docs (https://worktrunk.dev/llm-commits/) for setup and Custom prompt templates (#custom-prompt-templates) for template customization.#-# ## Command config+# ## Commands## ### List#diff --git a/docs/content/config.md b/docs/content/config.mdindex 7d7400945..b55dd4c17 100644--- a/docs/content/config.md+++ b/docs/content/config.md@@ -67,7 +67,7 @@ test = "npm test"---<!-- USER_CONFIG_START -->-# User Configuration+## Worktrunk User ConfigurationCreate with `wt config create`.@@ -113,7 +113,7 @@ Generate commit messages automatically during merge. Requires an external CLI toSee [LLM commits docs](@/llm-commits.md) for setup and [Custom prompt templates](#custom-prompt-templates) for template customization.-## Command config+## Commands### List@@ -288,7 +288,7 @@ Combine these commits into a single commit message.----# Project Configuration+## Project configurationProject config (`.config/wt.toml`) defines lifecycle hooks and project-specific settings. This file is checked into version control and shared with the team. Create with `wt config create --project`.@@ -310,7 +310,7 @@ platform = "github" # or "gitlab"----# Shell Integration+## Shell integrationWorktrunk needs shell integration to change directories when switching worktrees. Install with:@@ -347,8 +347,6 @@ Or via environment variable:export WORKTRUNK_SKIP_SHELL_INTEGRATION_PROMPT=true```-# Other-## Environment variablesAll user config options can be overridden with environment variables using the `WORKTRUNK_` prefix.@@ -417,8 +415,6 @@ Usage: <b><span class=c>wt config</span></b> <span class=c>[OPTIONS]</span> <spaVerbose output (-v: hooks, templates; -vv: debug report){% end %}-# Subcommands-## wt config showShow configuration files & locations.diff --git a/docs/content/hook.md b/docs/content/hook.mdindex ae2a09a62..bf9eec0ba 100644--- a/docs/content/hook.md+++ b/docs/content/hook.md@@ -446,8 +446,6 @@ Usage: <b><span class=c>wt hook</span></b> <span class=c>[OPTIONS]</span> <spanVerbose output (-v: hooks, templates; -vv: debug report){% end %}-# Subcommands-## wt hook approvalsManage command approvals.diff --git a/docs/content/step.md b/docs/content/step.mdindex 46f04e9f8..cc13eb6c8 100644--- a/docs/content/step.md+++ b/docs/content/step.md@@ -75,8 +75,6 @@ Usage: <b><span class=c>wt step</span></b> <span class=c>[OPTIONS]</span> <spanVerbose output (-v: hooks, templates; -vv: debug report){% end %}-# Subcommands-## wt step commitStage and commit with LLM-generated message.diff --git a/docs/sass/custom.scss b/docs/sass/custom.scssindex 7993cae0a..54f16d8ea 100644--- a/docs/sass/custom.scss+++ b/docs/sass/custom.scss@@ -52,34 +52,11 @@ h1, h2, h3, h4, h5, h6 {}h1 {- font-size: 1.5rem;+ font-size: 1.75rem;font-weight: 650;letter-spacing: -0.02em;- margin-top: 2rem;+ margin-top: 0;margin-bottom: 0.5rem;- position: relative;- width: fit-content; // Block-level but sized to content (for underline effect)-- // Same underline treatment as h2- > a {- &::after {- content: "";- position: absolute;- left: 0;- bottom: -0.3rem;- width: 45%;- height: 2px;- background: var(--wt-color-craft-brown);- opacity: 0.5;- border-radius: 1px;- transition: background 150ms ease-out, opacity 150ms ease-out;- }-- &:hover::after {- background: var(--wt-color-accent);- opacity: 1;- }- }}h2 {@@ -130,7 +107,6 @@ h4 {// Heading anchor links - entire heading is clickable// .heading-anchor = custom anchors in templates, .zola-anchor = Zola-generatedh1 > a.heading-anchor,-h1 > a.zola-anchor,h2 > a.zola-anchor,h3 > a.zola-anchor,h4 > a.zola-anchor {@@ -720,7 +696,7 @@ main {}.toc-item-child {- padding: 0 0.45rem 0.15rem 1rem;+ padding: 0 0.45rem 0.2rem 1rem;margin: 0 0.4rem;a {@@ -744,31 +720,6 @@ main {font-size: 0.7rem;}}-- // H1 entries in TOC - section markers- // Left border provides visual grouping- &.toc-h1 {- margin-top: 0.35rem;- padding-left: 0.65rem;-- a {- font-weight: 550;- font-size: 0.75rem;- color: var(--wt-color-text-muted);- border-left: 2px solid var(--wt-color-border-subtle);- padding-left: 0.35rem;-- &:hover {- color: var(--wt-color-text);- background: var(--wt-color-bg-soft);- }- }- }-- // H2s under H1s - same alignment as standalone H2s- &.toc-h2-under-h1 {- // No extra indent - aligns with standalone H2s- }}// ============================================================================diff --git a/docs/templates/macros.html b/docs/templates/macros.htmlindex efbfbe7b5..66a636b8e 100644--- a/docs/templates/macros.html+++ b/docs/templates/macros.html@@ -18,27 +18,10 @@</a></div>- {# Show page TOC for current page (h1s with nested h2s, or standalone h2s) #}+ {# Show page TOC for current page (h2s only) #}{% if is_current and current_page.toc %}{% for h in current_page.toc %}- {% if h.level == 1 %}- <div class="toc-item-child toc-h1">- <a class="subtext" href="{{ h.permalink | safe }}">- <small>{{ h.title }}</small>- </a>- </div>- {# Show H2 children nested under this H1 #}- {% for child in h.children | default(value=[]) %}- {% if child.level == 2 %}- <div class="toc-item-child toc-h2-under-h1">- <a class="subtext" href="{{ child.permalink | safe }}">- <small>{{ child.title }}</small>- </a>- </div>- {% endif %}- {% endfor %}- {% elif h.level == 2 %}- {# Standalone H2s (before any H1) #}+ {% if h.level == 2 %}<div class="toc-item-child"><a class="subtext" href="{{ h.permalink | safe }}"><small>{{ h.title }}</small>diff --git a/src/cli/mod.rs b/src/cli/mod.rsindex 16fa716b5..6d8160eb6 100644--- a/src/cli/mod.rs+++ b/src/cli/mod.rs@@ -1507,7 +1507,7 @@ test = "npm test"---<!-- USER_CONFIG_START -->-# User Configuration+## Worktrunk User ConfigurationCreate with `wt config create`.@@ -1553,7 +1553,7 @@ Generate commit messages automatically during merge. Requires an external CLI toSee [LLM commits docs](@/llm-commits.md) for setup and [Custom prompt templates](#custom-prompt-templates) for template customization.-## Command config+## Commands### List@@ -1728,7 +1728,7 @@ Combine these commits into a single commit message.----# Project Configuration+## Project configurationProject config (`.config/wt.toml`) defines lifecycle hooks and project-specific settings. This file is checked into version control and shared with the team. Create with `wt config create --project`.@@ -1750,7 +1750,7 @@ platform = "github" # or "gitlab"----# Shell Integration+## Shell integrationWorktrunk needs shell integration to change directories when switching worktrees. Install with:@@ -1787,8 +1787,6 @@ Or via environment variable:export WORKTRUNK_SKIP_SHELL_INTEGRATION_PROMPT=true```-# Other-## Environment variablesAll user config options can be overridden with environment variables using the `WORKTRUNK_` prefix.diff --git a/src/help.rs b/src/help.rsindex 5c69d51a5..8d1d87234 100644--- a/src/help.rs+++ b/src/help.rs@@ -301,8 +301,6 @@ Commands with pages: merge, switch, remove, list"let subdocs_expanded = expand_subdoc_placeholders(subdocs, sub, &parent_name);let subdocs_processed = colorize_ci_status_for_html(&subdocs_expanded);std::println!();- std::println!("# Subcommands");- std::println!();std::println!("{}", subdocs_processed.trim());}diff --git a/tests/snapshots/integration__integration_tests__help__help_config_create.snap b/tests/snapshots/integration__integration_tests__help__help_config_create.snapindex 453bfc924..31c21b669 100644--- a/tests/snapshots/integration__integration_tests__help__help_config_create.snap+++ b/tests/snapshots/integration__integration_tests__help__help_config_create.snap@@ -50,7 +50,7 @@ Usage: [1m[36mwt config create[0m [36m[OPTIONS][0mCreates [2m~/.config/worktrunk/config.toml[0m with the following content:- [2m# # User Configuration[0m+ [2m# ## Worktrunk User Configuration[0m[2m#[0m[2m# Create with `wt config create`.[0m[2m#[0m@@ -94,7 +94,7 @@ Creates [2m~/.config/worktrunk/config.toml[0m with the following content:[2m#[0m[2m# See LLM commits docs (https://worktrunk.dev/llm-commits/) for setup and Custom prompt templates (#custom-prompt-templates) for template customization.[0m[2m#[0m- [2m# ## Command config[0m+ [2m# ## Commands[0m[2m#[0m[2m# ### List[0m[2m#[0mdiff --git a/tests/snapshots/integration__integration_tests__help__help_config_long.snap b/tests/snapshots/integration__integration_tests__help__help_config_long.snapindex 132ca2878..e5f801b1a 100644--- a/tests/snapshots/integration__integration_tests__help__help_config_long.snap+++ b/tests/snapshots/integration__integration_tests__help__help_config_long.snap@@ -94,7 +94,7 @@ Show current configuration and file locations:[2m────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[0m-[32mUSER CONFIGURATION[0m+[1m[32mWorktrunk User Configuration[0mCreate with [2mwt config create[0m.@@ -138,7 +138,7 @@ Generate commit messages automatically during merge. Requires an external CLI toSee LLM commits docs for setup and Custom prompt templates for template customization.-[1m[32mCommand config[0m+[1m[32mCommands[0m[32mList[0m@@ -292,7 +292,7 @@ Default template:[2m────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[0m-[32mPROJECT CONFIGURATION[0m+[1m[32mProject configuration[0mProject config ([2m.config/wt.toml[0m) defines lifecycle hooks and project-specific settings. This file is checked into version control and shared with the team. Create with [2mwt config create --project[0m.@@ -312,7 +312,7 @@ See [2mwt hook[0m for hook types, execution order, template variables, and exa[2m────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[0m-[32mSHELL INTEGRATION[0m+[1m[32mShell integration[0mWorktrunk needs shell integration to change directories when switching worktrees. Install with:@@ -341,8 +341,6 @@ Or via environment variable:[2mexport WORKTRUNK_SKIP_SHELL_INTEGRATION_PROMPT=true[0m-[32mOTHER[0m-[1m[32mEnvironment variables[0mAll user config options can be overridden with environment variables using the [2mWORKTRUNK_[0m prefix.