원클릭으로
clean-architecture
Apply Clean Architecture boundaries to keep domain logic isolated from frameworks and infrastructure.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Apply Clean Architecture boundaries to keep domain logic isolated from frameworks and infrastructure.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Optimize token usage and context window discipline. Reduce costs and improve response quality through smart context management.
Unified context lifecycle for FlowDeck sessions — ingest, filter, prune, protect, summarize, and persist with telemetry.
Predict affected files, modules, APIs, tests, and DB paths before changes. Returns an impact map for human review.
Map architecture, conventions, and file structure into `.codebase/`. Use when onboarding or before deep feature work.
Plan differently when the agent has low certainty — ask for clarification or narrow scope instead of pretending full understanding.
Protect critical context from pruning during compaction. Preserve active plans, safety files, pending operations, and user intent anchors.
| name | clean-architecture |
| description | Apply Clean Architecture boundaries to keep domain logic isolated from frameworks and infrastructure. |
| origin | FlowDeck |
When designing or implementing a new feature or service that needs clear separation of concerns, testability, and independence from frameworks, databases, or UI libraries.
// Domain Layer - Enterprise Business Rules (innermost circle)
class Order {
constructor(
private readonly id: string,
private readonly items: OrderItem[],
private readonly status: OrderStatus
) {}
get total(): number {
return this.items.reduce((sum, item) => sum + item.price * item.quantity, 0)
}
canBeFulfilled(): boolean {
return this.status === 'pending' && this.items.length > 0
}
}
// Application Layer - Application Business Rules
interface OrderRepository {
findById(id: string): Promise<Order | null>
save(order: Order): Promise<void>
}
interface NotificationService {
sendOrderConfirmation(order: Order): Promise<void>
}
class PlaceOrderUseCase {
constructor(
private readonly orderRepo: OrderRepository,
private readonly notifier: NotificationService
) {}
async execute(orderData: OrderData): Promise<Order> {
const order = new Order(orderData.id, orderData.items, 'pending')
if (!order.canBeFulfilled()) {
throw new InvalidOrderError('Order cannot be fulfilled')
}
await this.orderRepo.save(order)
await this.notifier.sendOrderConfirmation(order)
return order
}
}
// Infrastructure Layer - Interface Adapters (outermost circle)
class PostgresOrderRepository implements OrderRepository {
async findById(id: string): Promise<Order | null> {
// Database implementation
}
async save(order: Order): Promise<void> {
// Database implementation
}
}
class EmailNotificationService implements NotificationService {
async sendOrderConfirmation(order: Order): Promise<void> {
// Email implementation
}
}