From specialist-agent
Transforms project architecture patterns (e.g., flat to modular, MVC to clean, monolith to modular monolith) while preserving functionality. Supports frontend/backend with full/lite variants.
npx claudepluginhub herbertjulio/specialist-agent --plugin specialist-agentThis skill is limited to using the following tools:
Migrate a project's architecture from one pattern to another while preserving all functionality.
Implements Clean Architecture, Hexagonal Architecture, and Domain-Driven Design for backend systems. Use for architecting complex backends or refactoring monoliths for maintainability.
Generates folder structures, module contracts, middleware pipelines, and frontend/backend boundaries for TypeScript full-stack apps. Useful for project setup, monorepos, and architecture design.
Plans whole-codebase architectural transformations from current to target state, producing a living .lattice/transform/plan.md for incremental execution. For audits, roadmaps, migrations, drift assessments.
Share bugs, ideas, or general feedback.
Migrate a project's architecture from one pattern to another while preserving all functionality.
Arguments: $ARGUMENTS (e.g., "flat to modular full project", "mvc to clean lite src/modules/auth")
| Pattern | Description |
|---|---|
| Flat / Component-Driven | Single components/ dir, minimal structure |
| Modular (Feature-Based) | Vertical slicing by feature with services/adapters/types |
| Feature-Sliced Design (FSD) | Strict layered: app > pages > features > entities > shared |
| Atomic Design | Components by granularity: atoms > molecules > organisms |
| Clean Architecture | Domain > Use Cases > Adapters > Frameworks |
| Hexagonal (Ports & Adapters) | Core with ports, infrastructure in adapters |
| Pattern | Description |
|---|---|
| MVC / Layered | Horizontal: controllers, services, repositories |
| Modular Monolith | Single deployment, strict module boundaries |
| Clean Architecture | Concentric layers, dependency rule inward |
| Hexagonal | Ports & Adapters, domain isolated |
| DDD | Bounded contexts, aggregates, domain events |
| CQRS | Separate command/query paths |
| Event-Driven | Async communication via events |
| Microservices | Independent services, own databases |
| Variant | Description |
|---|---|
| Full | Complete implementation with all layers and patterns |
| Lite (Simplified) | Fewer layers, same principles. For smaller teams |
docs/ARCHITECTURE.md if it existssrc/ (or root if no src/)── Architecture Assessment ──
Current: [detected pattern] (confidence: high/medium/low)
Target: [requested pattern] ([variant])
Scope: [project | specific module/path]
Estimated files to move: X
Estimated files to create: X
Risk: low/medium/high
Execute the migration plan step by step:
docs/ARCHITECTURE.md for the target patternnpx tsc --noEmit 2>&1 | head -50
npm test 2>&1 | tail -20
── Architecture Migration Complete ──
From: [source pattern]
To: [target pattern] ([variant])
Files moved: X
Files created: X
Imports updated: X
Barrel exports created: X
Validation:
TypeScript: ✓ compiles
Import rules: ✓ no violations
Tests: ✓ passing (or N/A)
docs/ARCHITECTURE.md: ✓ generated
modules/[feature]/components/ for each groupshared/components/| Mistake | Correct Approach |
|---|---|
| Moving files without updating imports | Use TypeScript compiler to verify after each move |
| Creating empty architectural layers | Only create layers with actual content |
| Migrating everything at once | One module at a time, least coupled first |
| Skipping barrel exports | Always create index.ts - it enforces boundaries |
| Copying patterns blindly | Adapt to the project's actual needs (Full vs Lite) |
| Ignoring existing tests | Move tests alongside their source files |