gabriel / muse public
feat BREAKING branch task/branch-intent-created-by #1 / 1
AI Agent gabriel · 163 days ago · Apr 16, 2026 · Diff

feat(branch): add --intent, --resumable, and created_by to branch listing

- branch.py: --intent TEXT stores short description in config.toml - branch.py: --resumable flag marks branch as agent checkpoint; used as listing filter when no name positional is given - branch.py: JSON listing includes intent, resumable, created_by on every entry (created_by = tip commit agent_id, empty string when none) - config.py: BranchMeta TypedDict with intent/resumable/remote/merge fields - config.py: write_branch_meta() / read_branch_meta() public helpers - config.py: _load_config() and _dump_toml() handle [branch.*] sections - tests: 50 TDD tests covering unit/integration/e2e/security/data_integrity/perf

sha256:bf01627851dc3cc0aaf8ccfe2a431841bff46729ec30a0c3f840730e2f743b46 sha
+84 ~6 symbols
sha256:19eee2d2a4ab021eb5f1c5087bea38733ba4a18fc0b3c855ee7ce220b8e03fef snapshot
+84
symbols added
~6
symbols modified
0
dead code introduced
Semantic Changes 90 symbols
+ TestCreateWithIntent class class TestCreateWithIntent L242–277
+ test_create_json_includes_intent method method test_create_json_includes_intent L263–267
+ test_create_json_includes_resumable method method test_create_json_includes_resumable L269–272
+ test_create_json_resumable_false_when_not_set method method test_create_json_resumable_false_when_not_set L274–277
+ test_create_stores_intent_in_config method method test_create_stores_intent_in_config L247–250
+ test_create_stores_resumable_in_config method method test_create_stores_resumable_in_config L252–255
+ test_create_with_intent_exits_0 method method test_create_with_intent_exits_0 L243–245
+ test_create_without_intent_no_config_entry method method test_create_without_intent_no_config_entry L257–261
+ TestDataIntegrity class class TestDataIntegrity L492–515
+ test_config_toml_valid_toml_after_write method method test_config_toml_valid_toml_after_write L509–515
+ test_intent_not_lost_on_second_branch_create method method test_intent_not_lost_on_second_branch_create L493–499
+ test_resumable_preserved_across_other_branch_operations method method test_resumable_preserved_across_other_branch_operations L501–507
+ TestE2eRoundTrips class class TestE2eRoundTrips L410–444
+ test_create_intent_resumable_json_schema method method test_create_intent_resumable_json_schema L429–436
+ test_created_by_survives_new_branch_on_agent_repo method method test_created_by_survives_new_branch_on_agent_repo L419–427
+ test_intent_survives_list_cycle method method test_intent_survives_list_cycle L411–417
+ test_resumable_filter_with_r_flag method method test_resumable_filter_with_r_flag L438–444
+ TestIntentSecurity class class TestIntentSecurity L452–484
+ _has_ansi method method _has_ansi L453–454
+ test_ansi_in_intent_stripped_from_output method method test_ansi_in_intent_stripped_from_output L456–461
+ test_intent_truncated_to_reasonable_length method method test_intent_truncated_to_reasonable_length L477–484
+ test_newline_in_intent_escaped_in_toml method method test_newline_in_intent_escaped_in_toml L463–468
+ test_toml_metachar_in_intent_safe method method test_toml_metachar_in_intent_safe L470–475
+ TestListJsonNewFields class class TestListJsonNewFields L285–353
+ test_list_json_created_by_empty_for_empty_branch method method test_list_json_created_by_empty_for_empty_branch L337–344
+ test_list_json_created_by_empty_for_human_commit method method test_list_json_created_by_empty_for_human_commit L328–335
+ test_list_json_created_by_from_agent_commit method method test_list_json_created_by_from_agent_commit L320–326
+ test_list_json_has_created_by_field method method test_list_json_has_created_by_field L315–318
+ test_list_json_has_intent_field method method test_list_json_has_intent_field L286–292
+ test_list_json_has_resumable_field method method test_list_json_has_resumable_field L301–307
+ test_list_json_intent_null_for_plain_branch method method test_list_json_intent_null_for_plain_branch L294–299
+ test_list_json_resumable_false_for_plain_branch method method test_list_json_resumable_false_for_plain_branch L309–313
+ test_schema_complete method method test_schema_complete L346–353
+ TestParserFlags class class TestParserFlags L207–234
+ _parse method method _parse L208–214
+ test_intent_default_none method method test_intent_default_none L220–222
+ test_intent_flag method method test_intent_flag L216–218
+ test_resumable_default_false method method test_resumable_default_false L228–230
+ test_resumable_filter_flag method method test_resumable_filter_flag L232–234
+ test_resumable_flag method method test_resumable_flag L224–226
+ TestPerformance class class TestPerformance L523–550
+ test_list_50_branches_with_intent_under_1s method method test_list_50_branches_with_intent_under_1s L524–535
+ test_resumable_filter_50_branches_under_500ms method method test_resumable_filter_50_branches_under_500ms L537–550
+ TestReadBranchMeta class class TestReadBranchMeta L182–199
+ test_returns_empty_for_unknown_branch method method test_returns_empty_for_unknown_branch L192–194
+ test_returns_empty_when_no_config method method test_returns_empty_when_no_config L196–199
+ test_returns_intent_and_resumable method method test_returns_intent_and_resumable L185–190
+ TestResumableFilter class class TestResumableFilter L361–402
+ test_resumable_combined_with_merged_filter method method test_resumable_combined_with_merged_filter L394–402
+ test_resumable_filter_all_resumable_returned method method test_resumable_filter_all_resumable_returned L387–392
+ test_resumable_filter_empty_when_none method method test_resumable_filter_empty_when_none L375–379
+ test_resumable_filter_shows_only_resumable method method test_resumable_filter_shows_only_resumable L362–373
+ test_resumable_filter_text_output method method test_resumable_filter_text_output L381–385
+ TestWriteBranchMeta class class TestWriteBranchMeta L110–179
+ test_creates_config_file_if_absent method method test_creates_config_file_if_absent L172–179
+ test_does_not_clobber_upstream_fields method method test_does_not_clobber_upstream_fields L139–151
+ test_multiple_branches_independent method method test_multiple_branches_independent L162–170
+ test_updates_existing_entry method method test_updates_existing_entry L153–160
+ test_writes_both_fields method method test_writes_both_fields L131–137
+ test_writes_intent_to_config method method test_writes_intent_to_config L113–117
+ test_writes_resumable_false method method test_writes_resumable_false L125–129
+ test_writes_resumable_true method method test_writes_resumable_true L119–123
+ _branch function function _branch L58–59
+ _commit function function _commit L62–63
+ _config function function _config L66–71
+ _invoke function function _invoke L49–55
+ agent_repo function function agent_repo L88–102
+ CliRunner import import CliRunner L38–38
+ InvokeResult import import InvokeResult L38–38
+ annotations import import annotations L28–28
+ get_head_commit_id import import get_head_commit_id L39–39
+ json import import json L30–30
+ os import import os L31–31
+ pathlib import import pathlib L32–32
+ pytest import import pytest L36–36
+ time import import time L33–33
+ tomllib import import tomllib L34–34
+ repo function function repo L75–84
+ runner variable variable runner L41–41
~ muse/cli/commands/branch.py .py 2 symbols added, 3 symbols modified
+ read_branch_meta import import read_branch_meta L61–61
+ write_branch_meta import import write_branch_meta L61–61
~ run
~ muse/cli/config.py .py 3 symbols added, 3 symbols modified
+ BranchMeta class class BranchMeta L117–135
+ read_branch_meta function function read_branch_meta L952–971
+ write_branch_meta function function write_branch_meta L918–949
← Older Oldest on task/branch-intent-created-by
All commits
Newer → Latest on task/branch-intent-created-by

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:bf01627851dc3cc0aaf8ccfe2a431841bff46729ec30a0c3f840730e2f743b46 --body "your comment"