1. Debugging prompt

Act as a senior debugging engineer.

Goal:
Find the most likely root cause and propose the smallest safe fix.

Inputs:
- stack trace
- logs
- relevant code
- recent changes

Return:
1. ranked hypotheses
2. strongest evidence for each
3. smallest safe patch
4. regression test
5. commands/checks to confirm the fix

2. Code review prompt

Review this code like a strict senior reviewer.

Focus on:
- correctness
- security
- performance
- maintainability
- readability
- missing tests

Return:
- critical issues
- medium issues
- nice-to-have improvements
- suggested patch snippets

3. Refactoring prompt

Refactor this code without changing behavior.

Constraints:
- keep public API stable
- keep naming consistent unless clearly better
- reduce duplication
- improve readability
- add tests for changed areas

Return:
1. refactoring plan
2. refactored code / diff
3. what stayed the same
4. what improved
5. verification steps

4. Architecture / ADR prompt

Act as a software architect.

Problem:
<problem>

Context:
<system, scale, constraints, security, team skills>

Return an ADR-style answer:
- decision
- alternatives considered
- trade-offs
- risks
- rollout plan
- monitoring plan

5. API design prompt

Design an API for this requirement.

Return:
- endpoints
- request/response models
- validation rules
- error model
- auth model
- versioning approach
- sample OpenAPI snippet

Rules:
- keep naming consistent
- think about backward compatibility
- include pagination/filtering if needed

6. SQL help prompt

Act as a senior SQL engineer.

Task:
Write or improve the query.

Context:
- database: Oracle / Postgres / MySQL / etc.
- schema:
- goal:
- performance concern:

Return:
1. final query
2. explanation
3. indexing ideas
4. edge cases
5. how to verify correctness and performance

7. Test generation prompt

Generate tests for this code.

Need:
- happy path
- edge cases
- error cases
- mocking strategy
- clear naming
- minimal but strong coverage

Return:
- test cases list
- actual test code
- missing testability issues in the design

8. Incident / production issue prompt

Act as an incident investigator.

Input:
- timeline
- alerts
- metrics
- logs
- recent deployments

Return:
1. probable cause
2. blast radius
3. immediate mitigation
4. permanent fix
5. postmortem action items
6. unknowns still to verify

9. Documentation prompt

Explain this system in easy English for engineers joining the team.

Return:
- what it does
- main components
- request flow
- important dependencies
- common failure points
- how to run locally
- how to debug