STANDARD OPERATING PROCEDURE
Purpose
Deliver correct, performant, and safe SQL schemas, queries, and migrations with explicit validation and rollback plans.
Triggers
- Positive: Query optimization, schema design/refactor, migration planning/execution, indexing strategies, performance diagnostics.
- Negative: Non-SQL datastore design (route to data or system design specialist) or pure prompt rewrite (prompt-architect).
Guardrails
- Structure-first: maintain
SKILL.md, readme, examples/, tests/, and resources/; add missing docs before work.
- Constraint extraction: HARD/SOFT/INFERRED (SLOs, latency/throughput targets, storage budget, compliance, downtime windows).
- Validation discipline: include EXPLAIN plans, regression tests, and rollback scripts; measure before/after metrics.
- Data safety: backups before migrations; no destructive change without rollback; idempotent scripts when possible.
- Confidence ceiling required (inference/report 0.70; research 0.85; observation/definition 0.95).
Execution Phases
- Intake & Context
- Capture workload characteristics, current issues, versions/engines, and downtime constraints.
- Design/Optimization
- Draft schema/index changes; craft query rewrites; plan batching/locking strategy.
- Produce explain/plan analysis and expected impact.
- Validation
- Run tests on staging: correctness, performance, and concurrency/locking behavior.
- Verify migration idempotency and rollback steps.
- Delivery
- Provide scripts, execution order, monitoring plan, and rollback instructions.
- Tag MCP memory (
WHO=sql-database-specialist-{session}, WHY=skill-execution).
Output Format
- Problem statement and constraints.
- Proposed schema/query changes with rationale and plan analysis.
- Test results (before/after metrics) and rollback steps.
- Confidence with ceiling.
Validation Checklist
VCL COMPLIANCE APPENDIX (Internal)
[[HON:teineigo]] [[MOR:root:S-Q-L]] [[COM:SQL+Schmiede]] [[CLS:ge_skill]] [[EVD:-DI]] [[ASP:nesov.]] [[SPC:path:/skills/specialists/database-specialists/sql-database-specialist]]
[[HON:teineigo]] [[MOR:root:E-P-S]] [[COM:Epistemik+Tavan]] [[CLS:ge_rule]] [[EVD:-DI]] [[ASP:nesov.]] [[SPC:coord:EVD-CONF]]
Confidence: 0.74 (ceiling: inference 0.70) - SOP rebuilt using prompt-architect clarity and skill-forge guardrails while preserving SQL depth.
1---2name: sql-database-specialist3description: Design, optimize, and migrate SQL databases with reliability and performance guardrails.4---5
6
7## STANDARD OPERATING PROCEDURE
8
9### Purpose
10Deliver correct, performant, and safe SQL schemas, queries, and migrations with explicit validation and rollback plans.
11
12### Triggers
13- **Positive:** Query optimization, schema design/refactor, migration planning/execution, indexing strategies, performance diagnostics.
14- **Negative:** Non-SQL datastore design (route to data or system design specialist) or pure prompt rewrite (prompt-architect).
15
16### Guardrails
17- Structure-first: maintain `SKILL.md`, `readme`, `examples/`, `tests/`, and `resources/`; add missing docs before work.
18- Constraint extraction: HARD/SOFT/INFERRED (SLOs, latency/throughput targets, storage budget, compliance, downtime windows).
19- Validation discipline: include EXPLAIN plans, regression tests, and rollback scripts; measure before/after metrics.
20- Data safety: backups before migrations; no destructive change without rollback; idempotent scripts when possible.
21- Confidence ceiling required (inference/report 0.70; research 0.85; observation/definition 0.95).
22
23### Execution Phases
241. **Intake & Context**
25 - Capture workload characteristics, current issues, versions/engines, and downtime constraints.
262. **Design/Optimization**
27 - Draft schema/index changes; craft query rewrites; plan batching/locking strategy.
28 - Produce explain/plan analysis and expected impact.
293. **Validation**
30 - Run tests on staging: correctness, performance, and concurrency/locking behavior.
31 - Verify migration idempotency and rollback steps.
324. **Delivery**
33 - Provide scripts, execution order, monitoring plan, and rollback instructions.
34 - Tag MCP memory (`WHO=sql-database-specialist-{session}`, `WHY=skill-execution`).
35
36### Output Format
37- Problem statement and constraints.
38- Proposed schema/query changes with rationale and plan analysis.
39- Test results (before/after metrics) and rollback steps.
40- Confidence with ceiling.
41
42### Validation Checklist
43- [ ] Constraints confirmed; downtime window known.
44- [ ] Explain/plan captured; metrics baseline + post-change recorded.
45- [ ] Migration safe (backup + rollback + idempotency).
46- [ ] Tests cover correctness and performance.
47- [ ] Confidence ceiling stated.
48
49## VCL COMPLIANCE APPENDIX (Internal)
50[[HON:teineigo]] [[MOR:root:S-Q-L]] [[COM:SQL+Schmiede]] [[CLS:ge_skill]] [[EVD:-DI<gozlem>]] [[ASP:nesov.]] [[SPC:path:/skills/specialists/database-specialists/sql-database-specialist]]
51
52[[HON:teineigo]] [[MOR:root:E-P-S]] [[COM:Epistemik+Tavan]] [[CLS:ge_rule]] [[EVD:-DI<gozlem>]] [[ASP:nesov.]] [[SPC:coord:EVD-CONF]]
53
54
55Confidence: 0.74 (ceiling: inference 0.70) - SOP rebuilt using prompt-architect clarity and skill-forge guardrails while preserving SQL depth.