review-architecture
Verify DDD patterns, Clean Architecture boundaries, and bITdevKit-specific conventions in modular monolith projects
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Verify DDD patterns, Clean Architecture boundaries, and bITdevKit-specific conventions in modular monolith projects
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Create a new implementation plan file for new features, refactoring existing code or upgrading packages, design, architecture or infrastructure.
Use when documenting significant technical or architectural decisions that need context, rationale, and consequences recorded. Invoke when choosing between technology options, making infrastructure decisions, establishing standards, migrating systems, or when team needs to understand why a decision was made. Use when user mentions ADR, architecture decision, technical decision record, or decision documentation.
Use when designing new system architecture, reviewing existing designs, or making architectural decisions. Invoke for system design, architecture review, design patterns, ADRs, scalability planning.
Automatically creates or updates changelogs from git commits by analyzing commit history, categorizing changes and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.
Write modern, high-performance C# code using records, pattern matching, value objects, async/await, Span<T>/Memory<T>, and best-practice API design patterns. Emphasizes functional-style programming with C# 12+ features.
Manage NuGet packages using Central Package Management (CPM), dotnet CLI, and dotnet-outdated (command `dotnet outdated`) to inspect/update dependencies and diagnose restore issues. Never edit XML directly—prefer dotnet commands and dotnet-outdated.
| name | review-architecture |
| description | Verify DDD patterns, Clean Architecture boundaries, and bITdevKit-specific conventions in modular monolith projects |
Specialized architectural review for modular monoliths using Domain-Driven Design (DDD), Clean/Onion Architecture, and bITdevKit patterns. This skill verifies layer boundaries, domain purity, CQRS patterns, and proper use of Result error handling.
Use this skill when:
Dependencies flow inward only from outer layers to inner layers:
┌─────────────────────────────────────────┐
│ Presentation (Outermost) │ Minimal API endpoints, DTOs
│ ┌───────────────────────────────────┐ │
│ │ Infrastructure │ │ EF Core, Repositories, Jobs
│ │ ┌─────────────────────────────┐ │ │
│ │ │ Application │ │ │ Commands, Queries, Handlers
│ │ │ ┌───────────────────────┐ │ │ │
│ │ │ │ Domain (Innermost) │ │ │ │ Aggregates, Entities, Value Objects
│ │ │ │ Pure Business Logic │ │ │ │ Domain Events, Enumerations
│ │ │ │ ZERO Dependencies │ │ │ │
│ │ │ └───────────────────────┘ │ │ │
│ │ └─────────────────────────────┘ │ │
│ └───────────────────────────────────┘ │
└─────────────────────────────────────────┘
Each module under src/Modules/<ModuleName> follows this structure:
CoreModule/
├── CoreModule.Domain/ # Pure business logic (NO external dependencies)
│ └── Model/
│ ├── CustomerAggregate/
│ │ ├── Customer.cs (Aggregate Root)
│ │ └── Events/
│ ├── EmailAddress.cs (Value Object)
│ └── CustomerStatus.cs (Enumeration)
├── CoreModule.Application/ # Use case orchestration (references Domain only)
│ ├── Commands/
│ │ ├── CustomerCreateCommand.cs
│ │ └── CustomerCreateCommandHandler.cs
│ └── Queries/
├── CoreModule.Infrastructure/ # Technical implementation (references Domain + Application)
│ ├── EntityFramework/
│ │ ├── CoreModuleDbContext.cs
│ │ └── Configurations/
│ └── Repositories/
└── CoreModule.Presentation/ # Endpoints & DTOs (references Application via IRequester)
└── Web/
└── Endpoints/
└── CustomerEndpoints.cs
These violations break architectural boundaries or introduce serious design flaws:
These issues affect maintainability, consistency, or future extensibility:
[Entity][Action]Command/Query pattern[TypedEntityId<Guid>] attributesThese improve code quality but are not blocking:
This skill includes comprehensive checklists, examples, and templates:
Determine which modules and layers are affected:
# Check which files changed in a PR
git diff main...feature-branch --name-only | grep "src/Modules/"
# Example output:
# src/Modules/CoreModule/CoreModule.Domain/Model/CustomerAggregate/Customer.cs
# src/Modules/CoreModule/CoreModule.Application/Commands/CustomerCreateCommand.cs
# src/Modules/CoreModule/CoreModule.Presentation/Web/Endpoints/CustomerEndpoints.cs
Layers affected: Domain, Application, Presentation
Use: checklists/01-layer-boundaries.md
Verify dependencies flow inward only:
using statements referencing Application, Infrastructure, or Presentationusing statements referencing DomainIRequester.SendAsync() to call Application layerReference: ADR-0001 (Clean/Onion Architecture)
Use: checklists/02-domain-patterns.md
Check aggregate Customer.cs:
Customer.Create() returns Result<Customer>ChangeName, ChangeEmail) return Result<Customer>CustomerCreatedDomainEvent)[TypedEntityId<Guid>] attribute on CustomerIdIReadOnlyCollection<Address>Reference: ADR-0012 (Domain Logic in Domain Layer), ADR-0008 (Typed Entity IDs)
Use: checklists/03-cqrs-patterns.md
Check CustomerCreateCommand.cs:
CustomerCreateCommand (follows [Entity][Action]Command pattern)Validator class using AbstractValidator<T>IGenericRepository<Customer>, NOT DbContextCustomer.Create() (domain), not business logic in handlerResult<CustomerId>Reference: ADR-0011 (Application Logic in Commands/Queries), ADR-0009 (FluentValidation)
Use: checklists/04-repository-data-access.md
Check handler:
IGenericRepository<Customer> (abstraction)CoreModuleDbContext directly → WRONG (ADR-0004 violation)Fix: Replace DbContext with repository abstraction.
Reference: ADR-0004 (Repository Pattern with Decorator Behaviors)
Use: checklists/05-presentation-endpoints.md
Check CustomerEndpoints.cs:
EndpointsBaseIRequester.SendAsync(command, ct) to delegate to Application.MapHttpCreated() to map Result<CustomerId> to HTTP 201CancellationToken ct parameter.WithName("CreateCustomer") → SUGGESTION (🟢)Reference: ADR-0014 (Minimal API Endpoints), ADR-0005 (Requester/Notifier)
Use: checklists/06-result-error-handling.md
Check error handling:
Customer.Create() returns Result<Customer>Result.Failure("error message")throw new ValidationException() in domain method → WRONG (ADR-0002 violation)Fix: Replace exception with Result<T>.
Reference: ADR-0002 (Result Pattern for Error Handling)
Use: templates/review-summary-template.md
Create summary with:
This skill references 20 Architectural Decision Records (ADRs) located in docs/ADR/. Each ADR documents a key architectural decision with context, rationale, and consequences.
Core Architecture:
Domain & Data:
Application Layer:
Error Handling:
Presentation & API:
Infrastructure:
See docs/adr-quick-reference.md for complete list with one-paragraph summaries.
Symptom: Domain layer references Application types (commands, queries, handlers)
// WRONG: Domain references Application
namespace MyApp.Domain.CustomerAggregate;
using MyApp.Application.Commands; // ❌ Domain → Application dependency
public class Customer : AggregateRoot<CustomerId>
{
public CustomerCreatedCommand ToCommand() // ❌ Domain knows about Application
{
return new CustomerCreatedCommand(this.FirstName, this.LastName);
}
}
Why Critical: Violates ADR-0001 (Clean/Onion Architecture). Domain must be pure business logic with ZERO external dependencies.
Fix: Remove Application reference. Application layer creates commands from domain entities, not vice versa.
Reference: examples/layer-violations.md
Symptom: Application handlers inject DbContext directly
// WRONG: Application uses DbContext
namespace MyApp.Application.Commands;
using MyApp.Infrastructure.EntityFramework; // ❌ Application → Infrastructure dependency
public class CustomerCreateCommandHandler
{
private readonly CoreModuleDbContext context; // ❌ Direct DbContext usage
public async Task<Result<CustomerId>> Handle(CustomerCreateCommand request, CancellationToken ct)
{
var customer = Customer.Create(...);
this.context.Customers.Add(customer); // ❌ Application knows about EF Core
await this.context.SaveChangesAsync(ct);
}
}
Why Critical: Violates ADR-0001 (layer boundaries) and ADR-0004 (repository pattern). Application layer cannot reference Infrastructure.
Fix: Use IGenericRepository<Customer> abstraction.
Reference: examples/layer-violations.md, checklists/04-repository-data-access.md
Symptom: Domain methods throw exceptions for validation failures
// WRONG: Exception for business rule
public static Customer Create(string name, string email)
{
if (string.IsNullOrWhiteSpace(name))
{
throw new ValidationException("Name is required"); // ❌ Exception for expected failure
}
return new Customer(name, email);
}
Why Critical: Violates ADR-0002 (Result Pattern). Exceptions should only be used for truly exceptional cases, not expected failures.
Fix: Return Result<Customer> instead.
Reference: examples/result-pattern-examples.md
Symptom: Commands/queries not following naming conventions
// WRONG: Poor naming
public sealed record CreateCustomerRequest(...) : IRequest<Result<CustomerId>>; // ❌ "Request" suffix
public sealed record GetCustomer(...) : IRequest<Result<CustomerModel>>; // ❌ Missing "Query" suffix
Why Important: Violates ADR-0011 (CQRS patterns). Inconsistent naming makes codebase harder to navigate.
Fix: Use [Entity][Action]Command and [Entity][Action]Query patterns.
Reference: checklists/03-cqrs-patterns.md
Symptom: Missing .Include() causes multiple database round-trips
// WRONG: N+1 query problem
var customers = await repository.FindAllAsync(cancellationToken: ct);
foreach (var customer in customers)
{
// Each iteration triggers a separate query for addresses!
var addresses = customer.Addresses.ToList();
}
Why Important: Performance issue. Can cause significant slowdowns with large datasets.
Fix: Use eager loading with specifications.
Reference: checklists/04-repository-data-access.md
Code passes architectural review when:
IGenericRepository<T>, not DbContext[Entity][Action]Command/Query patternIRequester.SendAsync()Version: 1.0 Last Updated: 2026-01-14 Maintainer: bITdevKit Team