refactor: implement command registry pattern to eliminate boilerplate - #26
Merged
ccmdi merged 3 commits intoNov 19, 2025
Merged
Conversation
Major DX improvements to CLI architecture: - Commands now self-register via COMMAND export pattern - Each command file defines its own argparse setup - Eliminated 127 lines (48%) from main.py (263 -> 136 lines) - Zero manual imports or routing logic in main.py Changes: - Add setup_parser() and COMMAND export to all command files - Create commands/__init__.py with ALL_COMMANDS registry - Add new edit_cmd.py wrapper for edit mode - Simplify main.py to auto-register and auto-dispatch commands Adding new commands now requires: 1. Create command file with setup_parser/handler/COMMAND 2. Add one import line to commands/__init__.py 3. Done - no main.py changes needed
ccmdi
deleted the
claude/brainstorm-llm-features-012fA9qvDF7AJT2BycR6Jorm
branch
November 19, 2025 21:44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes: