The no-merge path in add_repo has 3 near-identical JSON/YAML save dispatch blocks (~10 lines each) at lines 844-854, 901-911, 961-970.
The merge and no-merge paths each have duplicated "save workspace label adjustments" blocks in SKIP_PINNED and SKIP_EXISTING branches (lines 662-735 merge, 832-917 no-merge).
Suggested refactor:
- Extract
_save_ordered_config(config_file_path, ordered_items) for the dispatch
- Extract
_save_relabel_adjustments(...) for the label adjustment blocks
Found by multi-model code review (Claude, 1/3 consensus). Findings #3 + #4 combined.