Skip to content
This repository was archived by the owner on Jul 11, 2026. It is now read-only.
This repository was archived by the owner on Jul 11, 2026. It is now read-only.

[Refactoring] Split CLI Commands into Domain Modules #14

Description

@gloomcheng

Problem

`src/cli/mcp-commands.ts` is 720 lines with all CLI commands in one file.

Impact

  • Hard to find specific commands
  • Difficult to maintain
  • No clear separation of concerns

Proposed Solution

Split by Domain

```
cli/
commands/
server.ts (MCP server commands - start, stop, restart)
workflow.ts (workflow commands - spec, plan, implement)
memory.ts (memory commands - learn, context, correct)
release.ts (release commands - release, version)
team.ts (team commands - share, view, learn-pr)
index.ts (command registration)
```

Benefits

✅ Clarity: Commands grouped by domain
✅ Maintainability: Easier to find and modify
✅ Testability: Each domain can be tested independently
✅ Extensibility: Easy to add new domains

Acceptance Criteria

  • mcp-commands.ts split into 5-6 domain files
  • Each file <150 lines
  • All commands still work
  • Tests updated
  • Documentation updated

Priority

🟡 High

Effort Estimate

1 day

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions