Skip to content

Layer 4.1: Project, memory, skills, utility extraction (FEAT-007)#3652

Merged
Hmbown merged 4 commits into
Hmbown:mainfrom
aboimpinto:feat/FEAT-007-plugins-extraction
Jun 26, 2026
Merged

Layer 4.1: Project, memory, skills, utility extraction (FEAT-007)#3652
Hmbown merged 4 commits into
Hmbown:mainfrom
aboimpinto:feat/FEAT-007-plugins-extraction

Conversation

@aboimpinto

@aboimpinto aboimpinto commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

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 /plugins command — which was previously stranded inline in the utility group with a "discretionary" marker — was extracted into its own PluginsCommands group.

What Changed

  • Created commands/groups/plugins/mod.rs with PluginsCommands group and PluginsCmd implementing RegisterCommand.
  • Moved all plugin listing/detail logic inline into the group module (previously in orphaned commands/plugins.rs).
  • Removed inline PLUGINS_INFO static and run_plugins dispatch from commands/groups/utility/mod.rs.
  • Registered PluginsCommands in commands/groups/mod.rs.
  • Removed orphaned mod plugins; from commands/mod.rs.

Gherkin / Acceptance Coverage

  • Added tests/features/plugin_e2e_acceptance.feature with 3 scenarios: plugin discovery with approval levels, empty directory, and missing directory.
  • Added tests/plugin_e2e_acceptance.rs with Cucumber step definitions and a binary smoke test.

Validation

  • cargo check -p codewhale-tui
  • cargo test -p codewhale-tui commands::
  • cargo test -p codewhale-tui plugin_ — 4 E2E + 8 unit tests pass
  • cargo test -p codewhale-tui every_registered_command_dispatches_to_a_handler — dispatch smoke test passes

Paulo Aboim Pinto

Paulo Aboim Pinto added 3 commits June 25, 2026 22:47
…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
@aboimpinto
aboimpinto requested a review from Hmbown as a code owner June 26, 2026 10:20
@aboimpinto aboimpinto changed the title Layer 4: Extract /plugins into its own command group (FEAT-007) Layer 4.1: Extract /plugins into its own command group Jun 26, 2026
@aboimpinto aboimpinto changed the title Layer 4.1: Extract /plugins into its own command group Layer 4.1: Extract /plugins into its own command group (bonus cleanup) Jun 26, 2026
@aboimpinto aboimpinto changed the title Layer 4.1: Extract /plugins into its own command group (bonus cleanup) Layer 4.1: Project, memory, skills, utility extraction (FEAT-007) Jun 26, 2026
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
@Hmbown

Hmbown commented Jun 26, 2026

Copy link
Copy Markdown
Owner

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.

@aboimpinto

Copy link
Copy Markdown
Contributor Author

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:

  1. The direction (command-group extraction) is aligned.
  2. The plugin coverage should remain as-is — it passed CI including macOS/Windows.
  3. For the focused review, the main areas to look at are: the new PluginsCommands group structure in commands/groups/plugins/mod.rs, the utility group cleanup, and the Gherkin E2E acceptance tests.

No rush from my side — happy to wait for the proper review slot.

Paulo Aboim Pinto

@Hmbown
Hmbown merged commit 5b74d74 into Hmbown:main Jun 26, 2026
11 checks passed
@Hmbown

Hmbown commented Jun 26, 2026

Copy link
Copy Markdown
Owner

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:

  • cargo fmt --all --check
  • CARGO_TARGET_DIR=/Volumes/VIXinSSD/codewhale-target cargo test -p codewhale-tui --bin codewhale-tui --locked every_registered_command_dispatches_to_a_handler
  • CARGO_TARGET_DIR=/Volumes/VIXinSSD/codewhale-target cargo test -p codewhale-tui --bin codewhale-tui --locked plugins
  • CARGO_TARGET_DIR=/Volumes/VIXinSSD/codewhale-target cargo test -p codewhale-tui --test plugin_e2e_acceptance --locked

The command registration and plugin surfaces stayed intact, and GitHub CI was green across the required jobs.

Hmbown pushed a commit that referenced this pull request Jun 27, 2026
… 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants