Strategic architecture, tactical design, and testable code principles (SOLID, Clean Architecture, Design Patterns, Testable Design)
97
97%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
{
"context": "Agent must extract an interface from a concrete repository and refactor a service class to accept the interface via constructor injection",
"type": "weighted_checklist",
"checklist": [
{
"name": "IOrderRepository interface file produced",
"description": "A file named IOrderRepository.ts exists and exports an interface or type named IOrderRepository",
"max_score": 15
},
{
"name": "Interface declares findById",
"description": "IOrderRepository includes a findById method signature returning a Promise of an Order or null",
"max_score": 15
},
{
"name": "Interface declares save",
"description": "IOrderRepository includes a save method signature accepting an Order and returning Promise<void>",
"max_score": 15
},
{
"name": "OrderService accepts interface via constructor",
"description": "The refactored OrderService.ts has a constructor parameter typed to IOrderRepository (not PostgresOrderRepository)",
"max_score": 25
},
{
"name": "No concrete import in refactored service",
"description": "OrderService.ts does not import PostgresOrderRepository anywhere",
"max_score": 20
},
{
"name": "Business logic preserved",
"description": "getOrderTotal and markShipped methods are present and contain the same calculation and status-update logic as the original",
"max_score": 10
}
]
}clean-architecture
evals
references
design-patterns
solid-principles
testable-design