mirror of
https://github.com/max-sixty/worktrunk.git
synced 2026-11-22 00:52:51 +08:00
Follows #4153, which cut two `wt config update` paragraphs describing internals and deprecated behavior. This sweeps the rest of the docs for passages of the same kind: how a command is implemented, edge cases the command already reports with an error or warning when they happen, and deprecated or removed behavior. The edits are to the help text in `src/cli/*.rs` and the non-command docs pages; everything else in the diff is regenerated (command pages, skill mirrors, help snapshots, `dev/*.example.toml`). What went, by kind: - **Deprecated or removed:** the `wt hook --var` paragraph and its row in the extending guide's hooks-vs-aliases table; the page for the hidden `wt config state ci-status` subcommand; the `approved-commands` sentence in user config (now about pattern keys in `approvals.toml`); the "retired wrapper" wording in the "shell wrapper is out of date" warning. - **Internals:** `wt step diff`'s "How it works"; `copy-ignored`'s background-priority section and `WORKTRUNK_FOREGROUND`; `promote`'s `rename()`; the three env vars marked "Internal:" in the config page's table; how the OpenCode plugin loads; skim query operators in the picker; the `--prs` log tab's data source. - **Edge cases the command reports itself:** `post-commit` hooks skipped when `wt merge` removes their worktree; a branch retained because a second worktree has it checked out (the FAQ keeps this); a registered worktree whose directory is gone and rollback races in `wt step push`; template errors in `for-each`; `.bak-2` backup names in `relocate`. - **Mechanics a user doesn't act on:** measuring against the upstream when the local default branch lags (`wt merge`, `wt step rebase`, `wt list`); default-branch cache internals other than the rule that a guess made during an outage isn't cached; the statusline pace forecast and cell-dropping rules; the FAQ's fsmonitor and shell-install migration detail, trimmed down to the facts; the "Three things to get right" list for agent CLIs without a plugin; the `wt up` recipe's guard explanations, condensed to the two details that matter when adapting it. A few label-then-colon-then-link sentences ("How the fragment renders: [the LLM commits guide]") are rewritten as sentences. The built-site test's heading count for the config page's table of contents drops from 33 to 32 with the `ci-status` section gone. Kept on purpose: the "Local CI" section, the homepage, the FAQ's lists of files Worktrunk creates and deletes, the warning that `post-*` hooks from user and project config can race, the direct `git config` marker example, `wt remove`'s notes on the capped default-branch walk and what "target" means (the command reports neither), the troubleshooting entry for the retired `template-file` keys (the unknown-field warning doesn't name the replacement), and the `wt list` "Schema 1" mapping table (`json-schema = 1` is still supported without a deprecation warning). > _This was written by Claude Code on behalf of max-sixty_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
62 lines
3.0 KiB
TOML
Generated
62 lines
3.0 KiB
TOML
Generated
# # Project Configuration
|
|
#
|
|
# Project configuration lets teams share repository-specific settings — hooks, dev server URLs, and other defaults. The file lives in `.config/wt.toml` and is typically checked into version control.
|
|
#
|
|
# To create a starter file with commented-out examples, run `wt config create --project`.
|
|
#
|
|
# ## Project hooks
|
|
#
|
|
# Project hooks apply to this repository only. See `wt hook` (https://worktrunk.dev/hook/) for hook types, execution order, and examples.
|
|
#
|
|
# pre-start = "npm ci"
|
|
# post-start = "npm run dev"
|
|
# pre-merge = "npm test"
|
|
#
|
|
# ## Dev server URL
|
|
#
|
|
# URL column in `wt list` (dimmed when port not listening):
|
|
#
|
|
# [list]
|
|
# url = "http://localhost:{{ branch | hash_port }}"
|
|
#
|
|
# ## Forge platform
|
|
#
|
|
# The forge is read from the remote's hostname: any host carrying `github`, `gitlab`, or `gitea` anywhere in it, plus the Azure DevOps service domains. Name the forge explicitly for a host carrying none of those, such as a Forgejo instance at `forge.example.com`:
|
|
#
|
|
# [forge]
|
|
# platform = "github" # or "gitlab", "gitea" (experimental), "azure-devops" (experimental)
|
|
# hostname = "github.example.com" # Example: API host (GHE / self-hosted GitLab)
|
|
#
|
|
# When many repositories share one self-hosted host, name it once in user config with a pattern-keyed `[projects]` entry (https://worktrunk.dev/config/#user-project-specific-settings) instead of repeating this block in each repo. A repository's own `[forge]` still wins, field by field.
|
|
#
|
|
# ## Commit-message append
|
|
#
|
|
# `template-append` adds project-wide conventions to the LLM commit and squash prompts, shared so every teammate's LLM sees the same style guide:
|
|
#
|
|
# [commit.generation]
|
|
# template-append = """
|
|
# - Use conventional commits (feat:, fix:, docs:, …)
|
|
# - Reference the relevant issue ID in the body
|
|
# """
|
|
#
|
|
# The first time the fragment is used (and whenever it changes), `wt` prompts the user to approve it — the same one-shot gate as project-defined hooks. Only `template-append` is honored from the project file; the LLM command and the main prompt template stay in user config (https://worktrunk.dev/config/). See the LLM commits guide (https://worktrunk.dev/llm-commits/#appending-to-the-prompt) for how the fragment renders.
|
|
#
|
|
# ## Copy-ignored excludes
|
|
#
|
|
# Additional excludes for `wt step copy-ignored`:
|
|
#
|
|
# [step.copy-ignored]
|
|
# exclude = [".cache/", ".turbo/"]
|
|
#
|
|
# Built-in excludes (VCS metadata and tool-state directories) always apply; the `wt step copy-ignored` docs (https://worktrunk.dev/step/#wt-step-copy-ignored) list them. User config and project config exclusions are combined.
|
|
#
|
|
# ## Project aliases
|
|
#
|
|
# Command templates that run as `wt <name>`. See the Extending Worktrunk guide (https://worktrunk.dev/extending/#aliases) for usage and flags.
|
|
#
|
|
# [aliases]
|
|
# deploy = "make deploy BRANCH={{ branch }}"
|
|
# url = "echo http://localhost:{{ branch | hash_port }}"
|
|
#
|
|
# Aliases defined here are shared with teammates. For personal aliases, use the user config (https://worktrunk.dev/config/#user-aliases) `[aliases]` section instead.
|