What problem does it solve? Designing a backend Service layer requires translating API specs, database models, and business rules into consistent method definitions, transactions, permissions, caching, and queue designs, which is slow and error-prone when done manually. ## Core Features & Use Cases - Service Identification and Method Design: Derives Service classes (e.g., ScriptService, NovelService) from entities and defines methods, DTOs, and return models without exposing raw database models. - Cross-Cutting Design: Produces transaction boundaries (Prisma $transaction), permission rules, state machine transitions, Redis cache TTLs, BullMQ queue jobs, and AI pipeline flows. - Risk and Performance Analysis: Flags risks like AI generation timeouts and recommends mitigations such as async BullMQ execution and retry mechanisms. - Use Case: Given API_SPECS.md and DATABASE_SCHEMA.md for a novel-to-script tool, generate a complete SERVICE_SPECS.md covering ScriptService, AIService, and TaskService with all design sections. ## Quick Start Ask the agent to generate a Service layer design document from your API_SPECS.md, DATABASE_SCHEMA.md, and business logic description.