gabriel / muse public
feat patch checkout task/checkout-intent-resumable #1 / 1
AI Agent gabriel · 151 days ago · Apr 17, 2026 · Diff

feat(checkout): add --intent and --resumable to checkout -b

Agents naturally reach for 'checkout -b' as a single atomic gesture to start work. Requiring a separate 'muse branch' call to attach metadata was an ergonomics trap that caused silent metadata loss.

- Add --intent and --resumable flags to checkout's register() - Validate that both flags require -b (error if used on branch switch) - Call write_branch_meta after branch creation when either flag is set - 19 new TDD tests: parser, integration (meta stored, branch switched, no-meta-when-absent), JSON output, branch --json listing, --resumable filter, ANSI security — all passing; 165/165 full suite green - Update agent-guide.md: one-command pattern is now canonical; remove the two-step workaround section

sha256:6149d0a5458b8728caaa5452b54607ed5bdebd6fd78d88a03fbd391a9cc7054c sha
+25 ~28 −4 symbols
sha256:00afb72fc60136678afe1bb9e3dd9b4fef26834d9735fa7f8652a42d6216a341 snapshot
+25
symbols added
~28
symbols modified
−4
symbols removed
0
dead code introduced
Semantic Changes 57 symbols
~ docs/agent-guide.md .md 2 symbols added, 4 symbols removed, 26 symbols modified
code[bash]@L214 variable variable code[bash]@L214 L214–233
code[bash]@L254 variable variable code[bash]@L254 L254–279
⚠️ --intent and --resumable belong on muse branch, NOT muse checkout section ⚠️ --intent and --resumable belong on muse branch, NOT muse checkout L236–252
code[bash]@L240 variable variable code[bash]@L240 L240–249
+ code[bash]@L216 variable variable code[bash]@L216 L216–234
+ code[bash]@L239 variable variable code[bash]@L239 L239–263
~ muse/cli/commands/checkout.py .py 1 symbol added, 2 symbols modified
+ write_branch_meta import import write_branch_meta L90–90
~ run
~ tests/test_cmd_checkout.py .py 22 symbols added
+ TestCheckoutCreateWithMeta class class TestCheckoutCreateWithMeta L1405–1537
+ _parse method method _parse L1410–1416
+ test_ansi_in_intent_sanitized_in_text_output method method test_ansi_in_intent_sanitized_in_text_output L1533–1537
+ test_branch_list_json_shows_intent method method test_branch_list_json_shows_intent L1508–1513
+ test_branch_list_json_shows_resumable method method test_branch_list_json_shows_resumable L1515–1520
+ test_branch_switched_after_create_with_meta method method test_branch_switched_after_create_with_meta L1467–1469
+ test_intent_and_resumable_together method method test_intent_and_resumable_together L1458–1465
+ test_intent_default_none method method test_intent_default_none L1426–1428
+ test_intent_flag_parsed method method test_intent_flag_parsed L1418–1420
+ test_intent_only_no_resumable_set method method test_intent_only_no_resumable_set L1477–1481
+ test_intent_stored_in_branch_meta method method test_intent_stored_in_branch_meta L1446–1450
+ test_intent_without_create_is_error method method test_intent_without_create_is_error L1434–1437
+ test_json_action_is_created method method test_json_action_is_created L1491–1497
+ test_json_branch_name_correct method method test_json_branch_name_correct L1499–1504
+ test_no_metadata_when_flags_absent method method test_no_metadata_when_flags_absent L1471–1475
+ test_resumable_default_false method method test_resumable_default_false L1430–1432
+ test_resumable_filter_finds_branch method method test_resumable_filter_finds_branch L1522–1529
+ test_resumable_flag_parsed method method test_resumable_flag_parsed L1422–1424
+ test_resumable_only_no_intent_set method method test_resumable_only_no_intent_set L1483–1487
+ test_resumable_stored_in_branch_meta method method test_resumable_stored_in_branch_meta L1452–1456
+ test_resumable_without_create_is_error method method test_resumable_without_create_is_error L1439–1442
+ read_branch_meta import import read_branch_meta L26–26
← Older Oldest on task/checkout-intent-resumable
All commits
Newer → Latest on task/checkout-intent-resumable

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:6149d0a5458b8728caaa5452b54607ed5bdebd6fd78d88a03fbd391a9cc7054c --body "your comment"