skills/architecture/advisor/SKILL.md
Use when choosing between architecture patterns (VSA, Clean Architecture, DDD, Modular Monolith, Microservices) for a new project.
npx skillsauth add faysilalshareef/dotnet-ai-kit advisorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
| Factor | VSA | Clean Arch | DDD | Modular Monolith | Microservices | |--------|-----|-----------|-----|-------------------|---------------| | Team size | 1-3 | 2-8 | 3-10 | 4-15 | 5+ per service | | Domain complexity | Low | Medium | High | High | Very High | | Expected scale | Small-Medium | Medium | Medium-Large | Large | Very Large | | Deployment model | Single | Single | Single | Single | Independent | | Data isolation | Shared DB | Shared DB | Bounded contexts | Schema per module | DB per service | | Time to first feature | Fastest | Fast | Medium | Medium | Slowest | | Long-term maintainability | Good | Very Good | Excellent | Excellent | Excellent (per service) |
Choose when: Small team, simple-to-moderate domain, rapid prototyping.
Features/
├── CreateOrder/
│ ├── CreateOrderCommand.cs
│ ├── CreateOrderHandler.cs
│ └── CreateOrderEndpoint.cs
└── GetOrders/
├── GetOrdersQuery.cs
└── GetOrdersEndpoint.cs
Pros: Minimal boilerplate, feature-focused, easy to understand. Cons: Harder to enforce boundaries as project grows.
Choose when: Medium team, moderate complexity, clear layer boundaries needed.
Domain/ → Entities, value objects (zero dependencies)
Application/ → Commands, queries, handlers (depends on Domain)
Infrastructure/ → EF Core, external services (depends on Application)
Api/ → Controllers, endpoints (depends on Application)
Pros: Clear dependency direction, testable, well-documented pattern. Cons: More boilerplate than VSA, can feel heavy for simple features.
Choose when: Complex domain with rich business rules, multiple aggregates.
Domain/
├── Aggregates/Order/
│ ├── Order.cs (aggregate root)
│ ├── OrderItem.cs (entity)
│ └── Money.cs (value object)
├── Events/
│ └── OrderCreated.cs
└── Interfaces/
└── IOrderRepository.cs
Pros: Models complex business logic accurately, ubiquitous language. Cons: Steeper learning curve, overkill for simple CRUD.
Choose when: Large team, multiple feature areas, want independence without microservice overhead.
Modules/
├── Orders/
│ ├── OrdersModule.cs
│ ├── Domain/
│ ├── Application/
│ └── Infrastructure/ (own DbContext, own schema)
└── Customers/
├── CustomersModule.cs
└── ...
Pros: Module independence, single deployment, easier than microservices. Cons: Requires discipline to maintain module boundaries.
Choose when: Very large scale, independent deployment needed, multiple teams per service.
{Company}.{Domain}.Commands/ → Event-sourced aggregates
{Company}.{Domain}.Queries/ → Read-side projections
{Company}.{Domain}.Processor/ → Event routing
{Company}.Gateways.{Domain}/ → REST API gateway
Pros: Independent scaling/deployment, fault isolation, team autonomy. Cons: Operational complexity, eventual consistency, network overhead.
VSA → Clean Architecture (add layers when complexity grows)
Clean Architecture → DDD (add aggregates, domain events when needed)
DDD → Modular Monolith (split into modules when team grows)
Modular Monolith → Microservices (extract modules to services when scale demands)
| Anti-Pattern | Correct Approach | |---|---| | Starting with microservices | Start monolithic, extract later | | DDD for simple CRUD | Use VSA or Clean Architecture | | Mixing architecture styles in one project | Pick one, be consistent | | Choosing based on hype | Choose based on team size + domain complexity |
# Check for VSA (feature folders)
find . -type d -name "Features" | head -5
# Check for Clean Architecture (layer folders)
ls -d */Domain */Application */Infrastructure */Api 2>/dev/null
# Check for DDD (aggregates)
grep -r "AggregateRoot\|IAggregateRoot" --include="*.cs" | head -3
# Check for Modular Monolith (modules)
find . -type d -name "Modules" | head -3
# Check for Microservices
grep -r "Aggregate<\|Event<\|IEventData" --include="*.cs" | head -3
data-ai
Use when about to claim work is complete, fixed, passing, or ready — before committing, creating PRs, or moving to the next task. Requires running verification commands and confirming output before making any success claims.
development
Use when encountering any bug, test failure, build error, or unexpected behavior — before proposing fixes or making changes.
development
Use when checkpointing, wrapping up, or handing off an AI-assisted development session.
development
Use when following the Specification-Driven Development lifecycle from plan through ship.