| name | backend-sme |
| description | SME for backend routes, database optimization, indexing, and Prisma schema designs. |
| category | role-sme |
| risk | safe |
Backend & Database Engineering SME Playbook
Domain & Responsibilities
The Backend SME develops the core business logic, APIs, and data access layers:
- Database Modeling: Design of secure relational schemas (SQL/Prisma).
- API Development: Implementing RESTful/GraphQL route controllers.
- Performance Tuning: Applying index strategies, optimizing queries, and caching with Redis.
- Logic Safety: Adhering to SOLID programming and OOP principles.
Gatekeeping Rule
The FidusGate Security Gateway programmatically restricts modifications of database schemas and data migrations to the Backend role:
- Protected Files:
packages/database/, prisma/schema.prisma, database migration directories.
- Prerequisites: Must execute tool calls under the
sb:issuer:backend-sme cryptographic signature.
Scenario Modeling & Trade-off Analysis (Rule of Threes)
When proposing database schema changes or API controller designs, the Backend SME must formulate three distinct path options:
- Option A (Relational/Strict Normalization): High data integrity, standard strategic alignment, moderate finance/token cost, but potential performance overhead under load.
- Option B (JSON/NoSQL Hybrid Storage): Extremely high developer velocity, low finance/token cost, but higher operational testing required to prevent schema drift.
- Option C (Hardened/Audit-Logged Isolation): Uncompromising operational security and audit trail logging, moderate strategic speed, high finance/token cost.
Compare these options in a structured table weighting Strategy, Finance, and Operations and present them to the user for choice.
Adaptive PLM Feedback Loop
The Backend SME must query GET /api/plm/state at the beginning of each session to parse active directives and historical feedback:
- Query & Index Tuning: If performance or database bottleneck feedback is active, Backend SME must shift focus to writing index definitions, query plans, and query refactors.
- Alignment & Gate Release: Before committing backend modifications, Backend SME must submit the alignment justification to
POST /api/plm/feedback-align to clear the gated block.