Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Changes to 10 files
Maximilian Roosca448ab8f8e0
diff --git a/CLAUDE.md b/CLAUDE.mdindex 1b4aad4f2..f4cb01360 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -100,7 +100,9 @@ Six canonical message patterns with their emojis:3. **Errors**: β + red text (failures, invalid states)4. **Warnings**: π‘ + yellow text (non-blocking issues)5. **Hints**: π‘ + dimmed text (actionable suggestions, tips for user)-6. **Info**: βͺ + dimmed text (neutral status, system feedback, metadata)+6. **Info**: βͺ + text (neutral status, system feedback, metadata)+ - **NOT dimmed**: Primary status messages that answer the user's question+ - **Dimmed**: Supplementary metadata and contextual information**Core Principle: Every user-facing message must have EITHER an emoji OR a gutter.**@@ -114,8 +116,13 @@ This provides consistent visual separation and hierarchy:// β GOOD - standalone message with emojiprintln!("{SUCCESS_EMOJI} {GREEN}Created worktree{GREEN:#}");-// β GOOD - info message for neutral status-println!("{INFO_EMOJI} {dim}post-create declined{dim:#}");+// β GOOD - info message for primary status (NOT dimmed - answers user's question)+output::info("All commands already approved")?;+output::info("Commands declined")?;++// β GOOD - info message for supplementary metadata (dimmed)+let dim = AnstyleStyle::new().dimmed();+println!("{INFO_EMOJI} {dim}Showing 5 worktrees, 2 with changes...{dim:#}");// β GOOD - quoted content with gutterprint!("{}", format_with_gutter(&command));@@ -133,6 +140,9 @@ println!("{dim}Operation declined{dim:#}");// β BAD - section header without emojiprintln!("Config: {bold}{}{bold:#}", path); // Should have INFO_EMOJI++// β BAD - dimming primary status that answers user's question+output::info(format!("{dim}Commands declined{dim:#}"))?; // Should NOT be dim```### stdout vs stderr: Separation by Sourcediff --git a/src/commands/command_approval.rs b/src/commands/command_approval.rsindex 1c496fa4b..2a10b891b 100644--- a/src/commands/command_approval.rs+++ b/src/commands/command_approval.rs@@ -46,7 +46,6 @@ pub fn approve_command_batch(};if !approved {- let dim = AnstyleStyle::new().dimmed();// Derive phase from commands - if all same phase, show it; otherwise show generic messagelet phase_str = if commands.len() == 1 {commands[0].phase.to_string()@@ -58,7 +57,7 @@ pub fn approve_command_batch("commands".to_string()}};- println!("{INFO_EMOJI} {dim}{phase_str} declined{dim:#}");+ println!("{INFO_EMOJI} {phase_str} declined");return Ok(false);}diff --git a/src/commands/standalone.rs b/src/commands/standalone.rsindex 491670dc6..0bbd665e7 100644--- a/src/commands/standalone.rs+++ b/src/commands/standalone.rs@@ -324,8 +324,7 @@ pub fn handle_standalone_ask_approvals(force: bool, show_all: bool) -> Result<()let commands = collect_commands_for_hooks(&project_config, &all_hooks);if commands.is_empty() {- let dim = worktrunk::styling::AnstyleStyle::new().dimmed();- crate::output::info(format!("{dim}No commands configured in project{dim:#}"))?;+ crate::output::info("No commands configured in project")?;return Ok(());}@@ -337,8 +336,7 @@ pub fn handle_standalone_ask_approvals(force: bool, show_all: bool) -> Result<().collect();if unapproved.is_empty() {- let dim = worktrunk::styling::AnstyleStyle::new().dimmed();- crate::output::info(format!("{dim}All commands already approved{dim:#}"))?;+ crate::output::info("All commands already approved")?;return Ok(());}@@ -369,8 +367,7 @@ pub fn handle_standalone_ask_approvals(force: bool, show_all: bool) -> Result<()))?;}} else {- let dim = worktrunk::styling::AnstyleStyle::new().dimmed();- crate::output::info(format!("{dim}Commands declined{dim:#}"))?;+ crate::output::info("Commands declined")?;}Ok(())diff --git a/src/styling/constants.rs b/src/styling/constants.rsindex 0bb77322f..792803436 100644--- a/src/styling/constants.rs+++ b/src/styling/constants.rs@@ -76,5 +76,7 @@ pub const WARNING_EMOJI: &str = "π‘";/// Hint emoji - use with HINT style: `println!("{HINT_EMOJI} {HINT}message{HINT:#}");`pub const HINT_EMOJI: &str = "π‘";-/// Info emoji - use with dimmed style: `println!("{INFO_EMOJI} {dim}message{dim:#}");`+/// Info emoji - use for neutral status (primary status NOT dimmed, metadata may be dimmed)+/// Primary status: `output::info("All commands already approved")?;`+/// Metadata: `println!("{INFO_EMOJI} {dim}Showing 5 worktrees...{dim:#}");`pub const INFO_EMOJI: &str = "βͺ";diff --git a/tests/snapshots/integration__integration_tests__approval_ui__approval_mixed_approved_unapproved.snap b/tests/snapshots/integration__integration_tests__approval_ui__approval_mixed_approved_unapproved.snapindex 0a032c367..d02a8ca7d 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__approval_mixed_approved_unapproved.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__approval_mixed_approved_unapproved.snap@@ -4,7 +4,7 @@ expression: combined---exit_code: 0----- stdout ------βͺ [2mpost-create declined[0m+βͺ post-create declinedβ [32mCreated new worktree for [1m[32mtest-mixed[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].test-mixed[0m[0mπ‘ [2mTo enable automatic cd, run: wt config shell[0mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__approval_multiple_commands.snap b/tests/snapshots/integration__integration_tests__approval_ui__approval_multiple_commands.snapindex a6bd8e5f2..c49db2e60 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__approval_multiple_commands.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__approval_multiple_commands.snap@@ -4,7 +4,7 @@ expression: combined---exit_code: 0----- stdout ------βͺ [2mpost-create declined[0m+βͺ post-create declinedβ [32mCreated new worktree for [1m[32mtest/nested-branch[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].test-nested-branch[0m[0mπ‘ [2mTo enable automatic cd, run: wt config shell[0mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__approval_named_commands.snap b/tests/snapshots/integration__integration_tests__approval_ui__approval_named_commands.snapindex da36a7bc4..4d7fc0bb5 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__approval_named_commands.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__approval_named_commands.snap@@ -4,7 +4,7 @@ expression: combined---exit_code: 0----- stdout ------βͺ [2mpost-create declined[0m+βͺ post-create declinedβ [32mCreated new worktree for [1m[32mtest-named[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].test-named[0m[0mπ‘ [2mTo enable automatic cd, run: wt config shell[0mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__approval_single_command.snap b/tests/snapshots/integration__integration_tests__approval_ui__approval_single_command.snapindex e14ec6651..d9da6f7b5 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__approval_single_command.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__approval_single_command.snap@@ -4,7 +4,7 @@ expression: combined---exit_code: 0----- stdout ------βͺ [2mpost-create declined[0m+βͺ post-create declinedβ [32mCreated new worktree for [1m[32mfeature/test-approval[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].feature-test-approval[0m[0mπ‘ [2mTo enable automatic cd, run: wt config shell[0mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__decline_approval_skips_only_unapproved.snap b/tests/snapshots/integration__integration_tests__approval_ui__decline_approval_skips_only_unapproved.snapindex aa84dc388..81018d718 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__decline_approval_skips_only_unapproved.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__decline_approval_skips_only_unapproved.snap@@ -4,7 +4,7 @@ expression: combined---exit_code: 0----- stdout ------βͺ [2mpost-create declined[0m+βͺ post-create declinedβ [32mCreated new worktree for [1m[32mtest-decline[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].test-decline[0m[0mπ‘ [2mTo enable automatic cd, run: wt config shell[0mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_second_run.snap b/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_second_run.snapindex e13c93d82..046d236dc 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_second_run.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_second_run.snap@@ -4,7 +4,7 @@ expression: combined---exit_code: 0----- stdout ------βͺ [2mpost-create declined[0m+βͺ post-create declinedβ [32mCreated new worktree for [1m[32mtest-force-2[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].test-force-2[0m[0mπ‘ [2mTo enable automatic cd, run: wt config shell[0m