Skip to content

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

docs: add snapshot update guidance for CLI help text changes (#1529)

worktrunk-botc2e1718d07db
diff --git a/CLAUDE.md b/CLAUDE.md
index 7a5fba15c..76d89b8c2 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -146,6 +146,12 @@ After any doc changes, run tests to sync:
cargo test --test integration test_command_pages_and_skill_files_are_in_sync
```
+After editing `after_long_help` text, also update the help snapshots:
+
+```bash
+cargo insta test --accept -- --test integration "test_help"
+```
+
## Data Safety
Never risk data loss without explicit user consent. A failed command that preserves data is better than a "successful" command that silently destroys work.
diff --git a/tests/CLAUDE.md b/tests/CLAUDE.md
index 25ad4d86e..a8df5544e 100644
--- a/tests/CLAUDE.md
+++ b/tests/CLAUDE.md
@@ -320,6 +320,16 @@ using the qualified `insta::assert_snapshot!` form.
For first-time snapshot creation, leave the inline value empty (`@""`), then
run `cargo insta test --accept` to fill it.
+To update existing file-based snapshots (e.g., after editing CLI help text),
+use `cargo insta test --accept`:
+
+```bash
+cargo insta test --accept -- --test integration "test_help"
+```
+
+Do not manually edit `.snap` files — they contain ANSI escape sequences that
+are difficult to reproduce by hand.
+
### One test per belief
Group related inputs into a single test when they verify the same belief about