Conversation
- Consolidate project storage to single 'projects' section with rich metadata - Add automatic migration from old format to new format - Update all replacement functions to use new unified structure - Add comprehensive default commands and patterns - Update README documentation with new configuration format Closes #6
|
Claude finished @Helmi's task —— View job PR Review: Refactor replacements.json structureSummaryThis PR successfully refactors the ✅ StrengthsMigration Logic
Code Quality
Structure Improvements
|
Summary
projectssectionChanges Made
Core Refactoring
_auto_discovered.projectsandproject_names.replacementsby consolidating into a singleprojectssection with rich metadata (folder, display_name, pronunciation)migrate_replacements_format()function to automatically convert old configurations to new format on first loadload_replacements()- Now includes migration logic and returns new default structureauto_add_project_to_replacements()- Writes to singleprojectssectionget_project_pronunciation()- Reads fromprojects[name].pronunciationapply_project_name_replacement()- Usesprojects[name].display_nameapply_command_replacement()- AccessescommandsandpatternsdirectlyDefault Configuration
Documentation
Testing Performed
Migration Path
Existing users' configurations will be automatically migrated when ccnotify loads the replacements file for the first time after this update. The migration preserves all existing data while reorganizing it into the cleaner structure.
Example of New Structure
{ "projects": { "ccnotify": { "folder": "-Users-helmi-code-ccnotify", "display_name": "CCNotify", "pronunciation": "CC notify" } }, "commands": { "ls": "list", "rm": "remove" }, "patterns": [ { "pattern": "npm run (\\w+)", "replacement": "N P M run {1}" } ] }