Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Add repo guidance: delegate other tools' rules, and don't defend improbable environments (#4137)
Worktrunk Botc20f9201acb3
diff --git a/CLAUDE.md b/CLAUDE.mdindex 7c83e2d5e..d7a3de552 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -183,6 +183,23 @@ Check `Cargo.toml` before hand-rolling a utility:| ANSI colors | `color_print::cformat!()` | raw escape codes || Template var detection | `minijinja::undeclared_variables(false)` | regex/substring on `{{ var }}` |+Delegation extends past utilities to **another tool's own rules** — where zsh+reads its config, which TOML keys a schema accepts, how MiniJinja scopes a+template binding. Ask the library; don't re-derive its rule inside `wt`. A+re-derived rule is correct on the cases that motivated it and drifts silently+afterwards. Where the library exposes no API that answers the question, keep+the substitute no larger than the question and say in the code why it exists.++### Don't Defend Improbable Environments++No resolvable home directory, a config directory the user moved out from under+the tool that owns it — `wt`'s behavior there is the least of that user's+problems. Take the working environment as a precondition and drop the fallback+chain rather than carrying code that is maintained forever and exercised by+nobody. Dropping a fallback still means failing with an error, never+`.expect()` — see **Error Handling**. Data safety is the exception, and it has+its own section.+### Other- **Don't suppress warnings** with `#[allow(dead_code)]` — delete the code or add `// TODO(topic): used by <upcoming work>`.