ワンクリックで
advisor
Use when choosing between architecture patterns (VSA, Clean Architecture, DDD, Modular Monolith, Microservices) for a new project.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use when choosing between architecture patterns (VSA, Clean Architecture, DDD, Modular Monolith, Microservices) for a new project.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use when designing gRPC services, proto files, or adding gRPC-Web or JSON transcoding.
Use when writing async code, propagating CancellationTokens, or fixing async/await pitfalls.
Use when applying or enforcing C# coding style — namespaces, sealed classes, var usage, XML docs.
Use when applying modern C# idioms — records, pattern matching, primary constructors, collection expressions.
Use when registering services, choosing lifetimes, or implementing DI patterns like decorator or keyed services.
Use when selecting or implementing design patterns in C# — factory, builder, strategy, decorator, or mediator.
| name | advisor |
| description | Use when choosing between architecture patterns (VSA, Clean Architecture, DDD, Modular Monolith, Microservices) for a new project. |
| metadata | {"category":"architecture","agent":"dotnet-architect"} |
| when_to_use | When evaluating architecture options or recommending an architectural approach |
| 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