Apply software design principles across architecture and implementation using deterministic decision workflows, SOLID checks, structural patterns, and anti-pattern detection; use when reviewing designs, refactoring modules, or resolving maintainability and coupling risks.
Does it follow best practices?
Evaluation — 99%
↑ 1.01xAgent success when using this tile
Validation for skill structure
A good architecture allows major decisions about frameworks, databases, and delivery mechanisms to be deferred until the last responsible moment. The longer you wait, the more information you have.
Incorrect (early commitment to specifics):
// Day 1: "Let's use Prisma with PostgreSQL and Next.js"
// domain/Order.ts - Coupled to Prisma from the start
import { PrismaClient } from '@prisma/client'
const prisma = new PrismaClient()
export async function createOrder(data: OrderInput) {
// Business logic intertwined with Prisma
const order = await prisma.order.create({
data: {
items: {
create: data.items.map(item => ({
productId: item.productId,
quantity: item.quantity,
price: item.price
}))
},
total: data.items.reduce((sum, i) => sum + i.price * i.quantity, 0)
},
include: { items: true }
})
return order
}
// 6 months later: "PostgreSQL doesn't scale for our read patterns,
// we need DynamoDB" - Massive rewrite requiredCorrect (defer database decision):
// Day 1: Focus on business rules, defer database choice
// domain/Order.ts - Pure business logic
export class Order {
private items: OrderItem[] = []
addItem(product: Product, quantity: number): void {
if (quantity <= 0) throw new InvalidQuantityError()
this.items.push(new OrderItem(product, quantity))
}
calculateTotal(): Money {
return this.items.reduce(
(sum, item) => sum.add(item.lineTotal()),
Money.zero()
)
}
}
// application/ports/OrderRepository.ts - Interface only
export interface OrderRepository {
save(order: Order): Promise<void>
findById(id: OrderId): Promise<Order | null>
}
// For now: Simple in-memory implementation for testing
// infrastructure/InMemoryOrderRepository.ts
export class InMemoryOrderRepository implements OrderRepository {
private orders = new Map<string, Order>()
async save(order: Order): Promise<void> {
this.orders.set(order.id.value, order)
}
}
// Later, when you know more: Add real database
// infrastructure/PrismaOrderRepository.ts
// OR
// infrastructure/DynamoOrderRepository.ts
// OR
// infrastructure/MongoOrderRepository.ts
// The domain never changes regardless of database choiceDecisions worth deferring:
Benefits:
Install with Tessl CLI
npx tessl i pantheon-ai/software-design-principles@0.1.4evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
references