Skip to content

refactor: migrate MCP, Plugin, File, Memory domains to features directory#39

Merged
ohing504 merged 4 commits intomainfrom
refactor/migrate-remaining-domains-to-features
Mar 20, 2026
Merged

refactor: migrate MCP, Plugin, File, Memory domains to features directory#39
ohing504 merged 4 commits intomainfrom
refactor/migrate-remaining-domains-to-features

Conversation

@ohing504
Copy link
Owner

Summary

  • MCP, Plugin, File, Memory 4개 도메인을 src/features/로 이관하여 전체 7개 엔티티 도메인의 co-located feature directory 패턴 완성
  • 약 50개 import 참조 업데이트, 산재된 파일(services/, server/, hooks/, lib/, components/, config/entities/) 정리
  • Integration 테스트 16개 신규 작성 + getPluginMcpServers 단위 테스트 19개 복원
  • ARCHITECTURE.md, CONVENTIONS.md, ROADMAP.md 문서 동기화

Changes

Domain Files Moved Lines
MCP 8 ~1,004
Plugin 7 ~1,605
File 7 (+merge) ~394
Memory 5 ~249

Test plan

  • pnpm typecheck — 0 errors
  • pnpm lint — clean
  • pnpm test — 336 tests, 33 files, all passed
  • Stale import grep — 0 matches across all old paths
  • Entity registry integrity — all 8 entity types registered
  • Manual: Dashboard MCP/Plugin/File/Memory 카드 렌더링 확인
  • Manual: Inspector open/toggle/delete 동작 확인

🤖 Generated with Claude Code

ohing504 and others added 2 commits March 20, 2026 14:23
…tory (#38)

Move remaining 4 entity domains (mcp, plugin, file, memory) to
src/features/ completing the co-located feature directory pattern
for all 7 domains (hook, skill, subagent already migrated).

Each domain now follows the standard structure:
  src/features/{domain}/
    config.ts, service.ts, server.ts, queries.ts,
    utils.ts/constants.ts, components/, *.test.ts

Removed scattered files from services/, server/, hooks/, lib/,
components/, config/entities/. Updated ~50 import references
across the codebase. Added 16 integration tests for migration
integrity and restored 19 getPluginMcpServers unit tests.

Constraint: shared files (entity-inspector, entities/index, BoardLayout) updated in separate phase to avoid parallel agent conflicts
Rejected: separate worktrees per domain | shared file merge conflicts outweigh isolation benefit
Confidence: high
Scope-risk: broad
Not-tested: runtime UI rendering (only static imports and unit tests verified)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove 6 re-export files that only forwarded imports:
- files-editor/api/files.{queries,functions}.ts
- files-editor/constants.ts
- config-editor/api/config.{queries,functions}.ts
- config-editor/constants.ts

Strip barrel exports from config/entities/index.ts (keep
registration side-effect only). Update 7 consumer files to
import directly from source modules.

Delete feature-migration.test.ts (export existence checks
are not meaningful integration tests).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ohing504 ohing504 force-pushed the refactor/migrate-remaining-domains-to-features branch from 8ee8a86 to 6176010 Compare March 20, 2026 06:18
ohing504 and others added 2 commits March 20, 2026 15:25
mcp/service.test.ts and plugin/service.test.ts use real filesystem
(createTmpDir/removeTmpDir), making them integration tests per
TESTING.md rules. Move from co-located src/features/ to
tests/integration/ where they belong.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Now that the integration test moved to tests/integration/, the
co-located unit test can use the standard service.test.ts name
matching its test target (mcp/service.ts).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ohing504 ohing504 merged commit 2004533 into main Mar 20, 2026
1 check passed
@ohing504 ohing504 deleted the refactor/migrate-remaining-domains-to-features branch March 20, 2026 06:43
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.

1 participant