architecture-advisor
Skill229 starsChanged 3 months agoApache-2.0View on GitHub
Architecture selection advisor for .NET applications. Asks structured questions about domain complexity, team size, system lifetime, compliance, and integration needs, then recommends the best-fit architecture: Vertical Slice, Clean Architecture, DDD + Clean Architecture, or Modular Monolith. Load this skill when the user asks "which architecture", "choose architecture", "set up project", "new project", "architecture decision", "restructure", or "how should I organize". Always load BEFORE any architecture-specific skill.
We split this skill into the rules it gives an agent
2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
Before recommending an architecture, ask questions across these 6 categories.
- Distinctive: line 87
If signals point to different architectures:
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Architecture Advisor
Core Principles
- Ask before recommending — Never prescribe an architecture without understanding the project. Run the questionnaire first to gather context about domain, team, lifetime, and constraints.
- Right-size the architecture — The best architecture is the simplest one that handles the project's actual complexity. CRUD apps do not need DDD. Startups do not need Clean Architecture. Match complexity to real requirements, not aspirations.
- Architecture is not permanent — Every architecture has an evolution path. Start simple and add structure when complexity demands it. Document the decision so the team knows when to evolve.
- Four supported architectures — dotnet-Codex-kit provides first-class patterns for Vertical Slice Architecture (VSA), Clean Architecture (CA), DDD + Clean Architecture, and Modular Monolith. Each has specific strengths and trade-offs.
The Architecture Questionnaire
Before recommending an architecture, ask questions across these 6 categories. Not every question applies to every project — skip irrelevant ones.
Category 1: Domain Complexity
| # | Question | Low Signal | High Signal |
| 1 | How many distinct business entities does the system manage? | < 10 entities | 20+ entities with relationships |
| 2 | Do business rules involve multiple entities interacting? | Rules are per-entity CRUD | Complex invariants across entity groups |
| 3 | Are there business workflows with multiple steps? | Simple request → response | Sagas, approval chains, state machines |
| 4 | Do domain experts use specialized vocabulary? | Generic terms (create, update) | Ubiquitous language (underwrite, adjudicate) |
Category 2: Team & Organization
| # | Question | Low Signal | High Signal |
| 5 | How large is the development team? | 1-3 developers | 8+ developers, multiple teams |
| 6 | Do different teams own different parts of the system? | Single team owns everything | Teams aligned to business domains |
| 7 | What is the team's experience level with .NET? | Junior or mixed | Senior, experienced with patterns |
Category 3: System Lifetime & Scale
| # | Question | Low Signal | High Signal |
| 8 | Expected system lifetime? | < 2 years, MVP/prototype | 5+ years, long-lived product |
| 9 | How many concurrent users or requests per second? | < 100 RPS | 1000+ RPS, variable load |
| 10 | Will the system need to scale independently by feature area? | Uniform load | Hot spots need independent scaling |
Category 4: Regulatory & Compliance
| # | Question | Low Signal | High Signal |
| 11 | Are there audit trail or compliance requirements? | Basic logging sufficient | Full audit trail, SOX/HIPAA/PCI |
| 12 | Do different parts of the system have different security boundaries? | Single auth boundary | Multi-tenant, data isolation |
Category 5: Existing Codebase
| # | Question | Low Signal | High Signal |
| 13 | Is this greenfield or brownfield? | Greenfield, starting fresh | Brownfield, migrating from legacy |
| 14 | Are there existing architectural patterns the team follows? | No established patterns | Strong conventions in place |
Category 6: Integration Complexity
| # | Question | Low Signal | High Signal |
| 15 | How many external systems does this integrate with? | 0-2 simple APIs | 5+ systems with complex contracts |
| 16 | Are there event-driven or async communication needs? | Synchronous request/response | Event sourcing, pub/sub, eventual consistency |
Decision Matrix
Map questionnaire answers to architecture recommendations:
| Profile | Recommended Architecture | Why |
| Low domain complexity, small team, short lifetime | Vertical Slice Architecture | Minimal ceremony, fast feature delivery, easy to understand |
| Low-medium domain complexity, any team size, API-focused | Vertical Slice Architecture | Feature cohesion, one file per operation, natural fit for minimal APIs |
| Medium domain complexity, medium team, long lifetime | Clean Architecture | Enforced boundaries via project references, testable domain, clear dependency direction |
| High domain complexity, specialized vocabulary, complex invariants | DDD + Clean Architecture | Aggregates protect invariants, value objects model domain concepts, domain events decouple side effects |
| Multiple bounded contexts, team-per-domain, independent deployment potential | Modular Monolith | Module isolation, independent data stores, evolution path to microservices |
| Brownfield with existing layered architecture | Clean Architecture | Familiar to teams coming from N-tier, preserves layer separation with better dependency direction |
When Signals Conflict
If signals point to different architectures:
- Default to simpler — When in doubt, start with VSA and evolve
- Domain complexity wins — High domain complexity overrides team size and lifetime signals
- Team familiarity matters — A team experienced with CA will be more productive with CA than learning VSA, even if VSA is technically simpler
- Compliance drives structure — Regulatory requirements often force stricter boundaries (CA or DDD)
Patterns
Vertical Slice Architecture (VSA)
Organize by feature, not by layer. Each operation is a self-contained slice.
src/MyApp.Api/
Features/
Orders/CreateOrder.cs # Request + Handler + Response + Endpoint
Orders/GetOrder.cs
Common/
Behaviors/ValidationBehavior.cs
Persistence/AppDbContext.csBest for: CRUD-heavy apps, APIs, MVPs, small-medium teams, short-medium lifetime.
Load skill: vertical-slice
Clean Architecture (CA)
Concentric layers with dependency inversion. Domain at the center, infrastructure at the edge.
src/
MyApp.Domain/ # Entities, interfaces, domain logic
MyApp.Application/ # Use cases, DTOs, validation
MyApp.Infrastructure/ # EF Core, external services
MyApp.Api/ # Endpoints, middlewareBest for: Medium complexity, long-lived systems, teams familiar with layered patterns.
Load skill: clean-architecture
DDD + Clean Architecture
Clean Architecture with tactical DDD patterns: aggregates, value objects, domain events.
src/
MyApp.Domain/ # Aggregates, value objects, domain events, domain services
MyApp.Application/ # Use cases orchestrating aggregates
MyApp.Infrastructure/ # Persistence, external service adapters
MyApp.Api/ # Thin endpointsBest for: Complex domains, specialized vocabulary, strict invariants, experienced teams.
Load skill: ddd + clean-architecture
Modular Monolith
Independent modules in a single deployable unit, each with its own architecture internally.
src/
MyApp.Host/ # Wires modules together
Modules/
Orders/ # Own features, own DbContext, own architecture
Catalog/ # Can use VSA, CA, or DDD internally
MyApp.Shared/ # Integration event contracts onlyBest for: Multiple bounded contexts, team-per-domain, future microservices extraction.
Load template: modular-monolith
Evolution Paths
Architecture is not a one-time decision. Systems evolve. Here are the common migration paths:
| From | To | Trigger | How |
| VSA | CA | Domain logic growing beyond handlers | Extract Domain + Application layers, keep features as use cases |
| VSA | Modular Monolith | Multiple bounded contexts emerging | Group features into modules, add module boundaries |
| CA | DDD + CA | Invariants becoming complex, primitive obsession | Introduce aggregates, value objects, domain events |
| Monolith | Modular Monolith | Teams stepping on each other, shared database coupling | Split into modules with own DbContexts and schemas |
| Modular Monolith | Microservices | Independent scaling needs, independent deployment | Extract modules into separate deployable services |
Anti-patterns
Picking Clean Architecture for a CRUD App
// BAD — 4 projects, 6+ files per feature for simple CRUD
src/MyApp.Domain/Entities/Product.cs
src/MyApp.Application/Products/CreateProduct/CreateProductCommand.cs
src/MyApp.Application/Products/CreateProduct/CreateProductHandler.cs
src/MyApp.Application/Products/CreateProduct/CreateProductValidator.cs
src/MyApp.Infrastructure/Persistence/ProductRepository.cs
src/MyApp.Api/Endpoints/ProductEndpoints.cs
// GOOD — VSA: 1 file for a simple CRUD feature
src/MyApp.Api/Features/Products/CreateProduct.csDDD Everywhere
// BAD — value objects and aggregates for a settings table
public class UserSettings : AggregateRoot // overkill
{
public ThemeName Theme { get; private set; } // value object for "dark"/"light"?
public void ChangeTheme(ThemeName theme) { /* domain event? really? */ }
}
// GOOD — simple entity for simple data
public class UserSettings
{
public Guid UserId { get; init; }
public string Theme { get; set; } = "light";
}Premature Microservices
// BAD — splitting into 5 microservices on day one with 2 developers
OrderService (own repo, own DB, own CI/CD)
CatalogService (own repo, own DB, own CI/CD)
IdentityService (own repo, own DB, own CI/CD)
NotificationService (own repo, own DB, own CI/CD)
GatewayService (own repo, own CI/CD)
// GOOD — start as a modular monolith, extract when you have evidence
src/
Modules/Orders/
Modules/Catalog/
Modules/Identity/
Modules/Notifications/Skipping the Questionnaire
// BAD — "I always use Clean Architecture"
User: "Set up a new project for a todo app"
Agent: *immediately scaffolds 4-project CA solution*
// GOOD — ask first, then recommend
User: "Set up a new project for a todo app"
Agent: "Let me ask a few questions about your project to recommend the best architecture..."
Agent: *runs questionnaire, recommends VSA for low-complexity app*Decision Guide
| Scenario | Recommendation |
| New project, unknown requirements | Run the questionnaire |
| Simple CRUD API, 1-3 developers | VSA |
| Medium complexity, long-lived, experienced team | Clean Architecture |
| Complex domain, specialized vocabulary | DDD + Clean Architecture |
| Multiple bounded contexts, multiple teams | Modular Monolith |
| Existing N-tier codebase, needs modernization | Clean Architecture (familiar migration) |
| MVP / startup, speed is priority | VSA |
| Regulatory / compliance-heavy | Clean Architecture or DDD (enforced boundaries) |
| Will need independent scaling later | Modular Monolith (extraction-ready) |
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- aws-solutions/konductor★ 10same name
- turkeryildirim/ai-skills★ 4same name
- me-cedric/agent-compass★ 3same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository96 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- 80-20-reviewSkill
- api-versioningSkill
- aspireSkill
- authenticationSkill
- autonomous-loopsSkill
- cachingSkill
- ci-cdSkill
- clean-architectureSkill
- code-review-workflowSkill
- configurationSkill
- container-publishSkill
- context-disciplineSkill
- convention-learnerSkill
- dddSkill
- dependency-injectionSkill
- de-sloppifySkill
- dockerSkill
- ef-coreSkill
- error-handlingSkill
- health-checkSkill
- httpclient-factorySkill
- instinct-systemSkill
- learning-logSkill
- loggingSkill
- messagingSkill
- migration-workflowSkill
- minimal-apiSkill
- model-selectionSkill
- modern-csharpSkill
- openapiSkill
- opentelemetrySkill
- project-setupSkill
- project-structureSkill
- resilienceSkill
- scaffoldingSkill
- scalarSkill
- security-scanSkill
- self-correction-loopSkill
- serilogSkill
- session-managementSkill
- split-memorySkill
- testingSkill
- verification-loopSkill
- vertical-sliceSkill
- workflow-masterySkill
- wrap-up-ritualSkill
- 80-20-reviewSkill
- api-versioningSkill
- architecture-advisorSkill
- aspireSkill
- authenticationSkill
- autonomous-loopsSkill
- cachingSkill
- ci-cdSkill
- clean-architectureSkill
- code-review-workflowSkill
- configurationSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

