Use before implementing or refactoring software when the task requires designing module boundaries, APIs, layers, abstractions, services, repositories, adapters, or architecture. Helps coding agents reduce total system complexity by creating deep modules, hiding implementation knowledge, avoiding leakage and pass-through APIs, comparing alternative designs, documenting interfaces before coding, and critiquing existing architecture.
93
94%
Does it follow best practices?
Impact
93%
1.13xAverage score across 5 eval scenarios
Passed
No known issues
{
"context": "Tests layered design, information hiding, domain value types, error/special-case design, and storage insulation.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Storage hidden",
"description": "Does not expose db handles, transactions, SQL, table names, lock timeouts, or row dictionaries in the public reservation interface.",
"max_score": 12
},
{
"name": "Domain types",
"description": "Uses stable domain/application concepts such as ReservationRequest, OrderId, Sku, Quantity, Reservation, or ReservationResult instead of raw rows/status codes.",
"max_score": 10
},
{
"name": "Layer distinction",
"description": "Separates boundary/application/domain/infrastructure responsibilities or otherwise makes layer abstractions distinct.",
"max_score": 10
},
{
"name": "Small operation",
"description": "Offers a small caller-intent operation for reserving inventory rather than many persistence-step methods.",
"max_score": 8
},
{
"name": "Errors actionable",
"description": "Exposes only caller-actionable outcomes such as unavailable/backorder policy decisions rather than raw storage exceptions/status codes.",
"max_score": 10
},
{
"name": "Special cases designed",
"description": "Centralizes backorder/insufficient-stock handling or converts allow_backorder into a clearer domain policy/concept.",
"max_score": 10
},
{
"name": "Storage swap localized",
"description": "Explains how changing SQL storage to a warehouse API is localized behind the infrastructure boundary.",
"max_score": 8
},
{
"name": "Invariants documented",
"description": "Documents invariants/side effects such as atomic reservation, stock non-negativity, and idempotency or concurrency assumptions.",
"max_score": 8
},
{
"name": "Two designs",
"description": "Considers at least two designs before choosing one.",
"max_score": 8
},
{
"name": "Leakage audit",
"description": "Audits leakage, pass-through variables, duplicate layers, and special-case spread.",
"max_score": 8
},
{
"name": "No pattern chasing",
"description": "Does not justify the design primarily by generic pattern compliance, extra classes, or fewer lines.",
"max_score": 8
}
]
}