Layer 4.1: Project, memory, skills, utility extraction (FEAT-007)#3652
Conversation
…or FEAT-007 Move CommandInfo statics from group mod.rs files into their respective command modules via the RegisterCommand trait pattern. Group files now contain only group wiring (CommandGroup impls with FunctionCommand adapters). This is the data layer and contract boundary for all 15 mandatory FEAT-007 commands: Project: init, goal, share, lsp (new lsp.rs module created) Memory: memory, note Skills: skills, skill, review, restore Utility: attach, task, jobs, mcp, network Key changes: - Each command module now owns its CommandInfo, XxxCmd struct, and RegisterCommand impl with info() and execute() methods - Group mod.rs files simplified to group wiring only - /lsp module created as project/lsp.rs delegating to config::config::lsp_command() - /plugins remains inline in utility/mod.rs as discretionary scope - All imports updated: super::CommandResult -> crate::commands::CommandResult - Registration order and user-command precedence preserved unchanged - All 127+ command-specific and 11+ contract-level tests pass
Make standalone command functions private/limited-visibility to complete the ownership transfer to RegisterCommand pattern: - Changed 13 command functions from pub fn to fn (private) across project, memory, skills, and utility command modules - Changed run_skill_by_name from pub fn to pub(in crate::commands) (preserving the re-export through skills/mod.rs) - Kept share::perform_share as pub (external caller from tui/ui.rs) All existing dispatch, argument parsing, and precedence behavior is preserved. All group and contract tests pass unchanged.
Move the discretionary /plugins command from inline registration in utility/mod.rs (with old commands/plugins.rs dispatch) into a focused plugins command group at commands/groups/plugins/mod.rs. Changes: - Create commands/groups/plugins/mod.rs with PluginsCommands group and extracted PluginsCmd implementing RegisterCommand - Remove inline PLUGINS_INFO and run_plugins from utility/mod.rs - Remove mod plugins; from commands/mod.rs (orphaned) - Add pub mod plugins and PluginsCommands to groups/mod.rs - Add 4 unit tests for plugins listing, empty, detail, and not-found - Add plugin_e2e_acceptance.rs and .feature for E2E coverage - Fix trailing blank line at EOF in utility/mod.rs
cargo fmt --all fixes: - plugins/mod.rs import ordering - memory/memory.rs, memory/note.rs fn signature wrapping - project/init.rs, project/share.rs formatting - skills/restore.rs, skills/review.rs, skills/skills.rs formatting - utility/attachment.rs, utility/network.rs formatting - plugin_e2e_acceptance.rs formatting
|
Thanks @aboimpinto. I’m leaving this out of the immediate 0.8.65 release lane for now. The direction looks aligned with the command-group extraction work, and the added plugin coverage is useful, but this is a broad structural refactor across project, memory, skills, utility, and plugin command registration. macOS/Windows are still running at the moment, and even if they pass, this deserves a focused command-surface review rather than being folded in as a last-minute release-watch merge. I’d treat this as 0.8.66/future unless Hunter explicitly wants the command extraction layer in 0.8.65 after full CI and manual slash-command smoke coverage. |
|
Thanks for the review, @Hmbown. Agreed on all points — this touches several group boundaries and deserves a focused command-surface review cycle rather than a last-minute merge. Given the feedback, I'll target this for 0.8.66. Noted that:
No rush from my side — happy to wait for the proper review slot. Paulo Aboim Pinto |
|
Merged for the 0.8.66 lane. Thank you @aboimpinto for keeping this extraction structured and for the thoughtful follow-up after the earlier release-lane note. Extra local verification before merge:
The command registration and plugin surfaces stayed intact, and GitHub CI was green across the required jobs. |
… FEAT-008 draft Phase 7 code review (F1) found the FEAT-008 PR Summary Draft did not follow the required PR #3652 pattern: it jumped directly from the heading to ## Summary without the PR title or Refs #2870. opening line. Added the title line (Layer 4.4: Registry cleanup, docs, and full validation (FEAT-008)) as a reference outside the markdown fence, and Refs #2870. as the first line of the PR body markdown. This is a code-review recovery fix for FEAT-008 Phase 7.
Refs #2870.
Follows #3330.
Summary
Layer 4.1 completes the FEAT-007 command extraction: migrating project, memory, skills, and utility into group-owned command files. This pairs with Layer 4 (FEAT-006, PR #3330) which handled core, config, session, and debug.
As a bonus cleanup during the utility extraction, the
/pluginscommand — which was previously stranded inline in the utility group with a "discretionary" marker — was extracted into its ownPluginsCommandsgroup.What Changed
commands/groups/plugins/mod.rswithPluginsCommandsgroup andPluginsCmdimplementingRegisterCommand.commands/plugins.rs).PLUGINS_INFOstatic andrun_pluginsdispatch fromcommands/groups/utility/mod.rs.PluginsCommandsincommands/groups/mod.rs.mod plugins;fromcommands/mod.rs.Gherkin / Acceptance Coverage
tests/features/plugin_e2e_acceptance.featurewith 3 scenarios: plugin discovery with approval levels, empty directory, and missing directory.tests/plugin_e2e_acceptance.rswith Cucumber step definitions and a binary smoke test.Validation
cargo check -p codewhale-tuicargo test -p codewhale-tui commands::cargo test -p codewhale-tui plugin_— 4 E2E + 8 unit tests passcargo test -p codewhale-tui every_registered_command_dispatches_to_a_handler— dispatch smoke test passesPaulo Aboim Pinto