Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

docs(llm-commits): Update template documentation (#854)

Maximilian Roos68210a8c0eec
diff --git a/.claude-plugin/skills/worktrunk/reference/llm-commits.md b/.claude-plugin/skills/worktrunk/reference/llm-commits.md
index 027aabd12..6edee2658 100644
--- a/.claude-plugin/skills/worktrunk/reference/llm-commits.md
+++ b/.claude-plugin/skills/worktrunk/reference/llm-commits.md
@@ -84,22 +84,9 @@ See [`wt merge`](https://worktrunk.dev/merge/) and [`wt step`](https://worktrunk
Worktrunk uses [minijinja](https://docs.rs/minijinja/) templates (Jinja2-like syntax) to build prompts. There are sensible defaults, but templates are fully customizable.
-### Template variables
-
-All variables are available in both templates:
-
-| Variable | Description |
-|----------|-------------|
-| `{{ git_diff }}` | The diff (staged changes or combined diff for squash) |
-| `{{ branch }}` | Current branch name |
-| `{{ recent_commits }}` | Recent commit subjects (for style reference) |
-| `{{ repo }}` | Repository name |
-| `{{ commits }}` | Commit messages being squashed (chronological order) |
-| `{{ target_branch }}` | Branch being merged into |
-
### Custom templates
-Override the defaults with inline templates or external files:
+Override the defaults with inline templates:
```toml
[commit.generation]
@@ -124,6 +111,18 @@ Diff:
"""
```
+### Template variables
+
+| Variable | Description |
+|----------|-------------|
+| `{{ git_diff }}` | The diff (staged changes or combined diff for squash) |
+| `{{ git_diff_stat }}` | Diff statistics (files changed, insertions, deletions) |
+| `{{ branch }}` | Current branch name |
+| `{{ repo }}` | Repository name |
+| `{{ recent_commits }}` | Recent commit subjects (for style reference) |
+| `{{ commits }}` | Commits being squashed (squash template only) |
+| `{{ target_branch }}` | Merge target branch (squash template only) |
+
### Template syntax
Templates use [minijinja](https://docs.rs/minijinja/latest/minijinja/syntax/index.html), which supports:
diff --git a/docs/content/llm-commits.md b/docs/content/llm-commits.md
index 8aa456a65..f22cd2b64 100644
--- a/docs/content/llm-commits.md
+++ b/docs/content/llm-commits.md
@@ -97,22 +97,9 @@ See [`wt merge`](@/merge.md) and [`wt step`](@/step.md) for full documentation.
Worktrunk uses [minijinja](https://docs.rs/minijinja/) templates (Jinja2-like syntax) to build prompts. There are sensible defaults, but templates are fully customizable.
-### Template variables
-
-All variables are available in both templates:
-
-| Variable | Description |
-|----------|-------------|
-| `{{ git_diff }}` | The diff (staged changes or combined diff for squash) |
-| `{{ branch }}` | Current branch name |
-| `{{ recent_commits }}` | Recent commit subjects (for style reference) |
-| `{{ repo }}` | Repository name |
-| `{{ commits }}` | Commit messages being squashed (chronological order) |
-| `{{ target_branch }}` | Branch being merged into |
-
### Custom templates
-Override the defaults with inline templates or external files:
+Override the defaults with inline templates:
```toml
[commit.generation]
@@ -137,6 +124,18 @@ Diff:
"""
```
+### Template variables
+
+| Variable | Description |
+|----------|-------------|
+| `{{ git_diff }}` | The diff (staged changes or combined diff for squash) |
+| `{{ git_diff_stat }}` | Diff statistics (files changed, insertions, deletions) |
+| `{{ branch }}` | Current branch name |
+| `{{ repo }}` | Repository name |
+| `{{ recent_commits }}` | Recent commit subjects (for style reference) |
+| `{{ commits }}` | Commits being squashed (squash template only) |
+| `{{ target_branch }}` | Merge target branch (squash template only) |
+
### Template syntax
Templates use [minijinja](https://docs.rs/minijinja/latest/minijinja/syntax/index.html), which supports: