@esreekarreddy/ai-prompts 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +361 -0
  3. package/chains/_index.md +33 -0
  4. package/chains/bug-fix.md +222 -0
  5. package/chains/new-feature.md +216 -0
  6. package/chains/production-launch.md +291 -0
  7. package/chains/refactor.md +210 -0
  8. package/chains/security-hardening.md +242 -0
  9. package/contexts/guides/api-design.md +229 -0
  10. package/contexts/guides/error-handling.md +219 -0
  11. package/contexts/patterns/agentic-coding.md +368 -0
  12. package/contexts/patterns/mcp-server-patterns.md +267 -0
  13. package/contexts/patterns/repository-pattern.md +163 -0
  14. package/contexts/patterns/service-layer.md +185 -0
  15. package/contexts/stacks/fastapi.md +187 -0
  16. package/contexts/stacks/nextjs-14.md +149 -0
  17. package/contexts/stacks/prisma.md +228 -0
  18. package/dist/index.d.ts +129 -0
  19. package/dist/index.d.ts.map +1 -0
  20. package/dist/index.js +284 -0
  21. package/dist/index.js.map +1 -0
  22. package/examples/architecture-docs/sample-architecture.md +270 -0
  23. package/examples/code-reviews/sample-review.md +232 -0
  24. package/examples/prds/sample-prd.md +179 -0
  25. package/instructions/_index.md +57 -0
  26. package/instructions/personas/code-reviewer.md +83 -0
  27. package/instructions/personas/devops-engineer.md +90 -0
  28. package/instructions/personas/security-expert.md +69 -0
  29. package/instructions/personas/senior-engineer.md +243 -0
  30. package/instructions/personas/ux-engineer.md +88 -0
  31. package/instructions/standards/fastapi.md +241 -0
  32. package/instructions/standards/go.md +427 -0
  33. package/instructions/standards/nextjs.md +350 -0
  34. package/instructions/standards/nodejs.md +284 -0
  35. package/instructions/standards/python.md +245 -0
  36. package/instructions/standards/react.md +227 -0
  37. package/instructions/standards/rust.md +318 -0
  38. package/instructions/standards/typescript-react.md +822 -0
  39. package/instructions/standards/typescript.md +294 -0
  40. package/instructions/workflows/feature-development.md +222 -0
  41. package/instructions/workflows/incident-response.md +192 -0
  42. package/instructions/workflows/pr-review.md +149 -0
  43. package/instructions/workflows/tdd.md +160 -0
  44. package/package.json +84 -0
  45. package/prompts/_index.md +70 -0
  46. package/prompts/agentic/agentic-loop.md +83 -0
  47. package/prompts/agentic/context-manager.md +37 -0
  48. package/prompts/agentic/test-driven-fix.md +41 -0
  49. package/prompts/analysis/deep-debugger.md +488 -0
  50. package/prompts/design/design-system-extractor.md +147 -0
  51. package/prompts/development/code-cleaner.md +119 -0
  52. package/prompts/development/debugger.md +64 -0
  53. package/prompts/development/tech-debt-audit.md +88 -0
  54. package/prompts/planning/architecture-analyzer.md +72 -0
  55. package/prompts/planning/implementation-plan.md +98 -0
  56. package/prompts/planning/prd-generator.md +66 -0
  57. package/prompts/planning/scope-killer.md +74 -0
  58. package/prompts/quality/critical-path-tester.md +133 -0
  59. package/prompts/quality/pre-launch-checklist.md +137 -0
  60. package/prompts/quality/security-audit.md +115 -0
  61. package/prompts/quality/security-fixer.md +117 -0
  62. package/prompts/quality/security-hardening.md +157 -0
  63. package/prompts/system/master-system-prompt.md +252 -0
  64. package/skills/_index.md +60 -0
  65. package/skills/code-review-advanced.md +435 -0
  66. package/skills/code-review.md +86 -0
  67. package/skills/debugging.md +86 -0
  68. package/skills/documentation.md +97 -0
  69. package/skills/pr-description.md +116 -0
  70. package/skills/project-setup.md +123 -0
  71. package/skills/refactoring.md +93 -0
  72. package/skills/testing.md +134 -0
  73. package/snippets/_index.md +57 -0
  74. package/snippets/constraints/mvp-only.md +50 -0
  75. package/snippets/constraints/no-external-deps.md +45 -0
  76. package/snippets/constraints/read-only.md +45 -0
  77. package/snippets/constraints/security-first.md +50 -0
  78. package/snippets/modifiers/be-ruthless.md +52 -0
  79. package/snippets/modifiers/be-thorough.md +50 -0
  80. package/snippets/modifiers/effort-high.md +56 -0
  81. package/snippets/modifiers/explain-reasoning.md +50 -0
  82. package/snippets/modifiers/megathink.md +314 -0
  83. package/snippets/modifiers/meta-cot.md +101 -0
  84. package/snippets/modifiers/no-code-yet.md +55 -0
  85. package/snippets/modifiers/step-by-step.md +50 -0
  86. package/snippets/modifiers/ultrathink.md +359 -0
  87. package/snippets/output-formats/checklist.md +61 -0
  88. package/snippets/output-formats/json.md +53 -0
  89. package/snippets/output-formats/markdown-table.md +44 -0
  90. package/snippets/output-formats/numbered-list.md +44 -0
  91. package/templates/_index.md +101 -0
  92. package/templates/claude-md/auto-enhance.md +258 -0
  93. package/templates/claude-md/cli-tool.md +243 -0
  94. package/templates/claude-md/full.md +449 -0
  95. package/templates/claude-md/minimal.md +52 -0
  96. package/templates/claude-md/nextjs-app.md +207 -0
  97. package/templates/claude-md/nodejs-service.md +251 -0
  98. package/templates/claude-md/python-api.md +236 -0
  99. package/templates/copilot/instructions.md +33 -0
  100. package/templates/cursor-rules/fullstack.txt +98 -0
  101. package/templates/cursor-rules/minimal.txt +20 -0
  102. package/templates/cursor-rules/nextjs.txt +61 -0
  103. package/templates/cursor-rules/python.txt +79 -0
  104. package/templates/docs/adr-template.md +119 -0
  105. package/templates/docs/api-spec-template.md +277 -0
  106. package/templates/docs/prd-template.md +140 -0
  107. package/templates/docs/runbook-template.md +238 -0
@@ -0,0 +1,238 @@
1
+ # Runbook Template
2
+
3
+ > Operational Runbook for [Service/System Name]
4
+
5
+ **Last Updated**: [Date]
6
+ **Owner**: [Team/Person]
7
+ **On-Call**: [Link to on-call schedule]
8
+
9
+ ---
10
+
11
+ ## Service Overview
12
+
13
+ **Service Name**: [Name]
14
+ **Description**: [What this service does]
15
+ **Dependencies**: [List critical dependencies]
16
+ **Repository**: [Link to repo]
17
+ **Dashboard**: [Link to monitoring dashboard]
18
+ **Logs**: [Link to log aggregator]
19
+
20
+ ---
21
+
22
+ ## Quick Reference
23
+
24
+ | Action | Command/Link |
25
+ |--------|-------------|
26
+ | Check health | `curl https://service.com/health` |
27
+ | View logs | [Link to logs] |
28
+ | View metrics | [Link to dashboard] |
29
+ | Deploy | `npm run deploy` |
30
+ | Rollback | `npm run rollback` |
31
+
32
+ ---
33
+
34
+ ## Architecture
35
+
36
+ ```
37
+ [Simple architecture diagram or description]
38
+
39
+ User → Load Balancer → Service → Database
40
+
41
+ Cache
42
+ ```
43
+
44
+ ---
45
+
46
+ ## Common Issues and Resolutions
47
+
48
+ ### Issue 1: [High Latency]
49
+
50
+ **Symptoms:**
51
+ - Response times > 500ms
52
+ - Dashboard shows latency spike
53
+
54
+ **Diagnosis:**
55
+ ```bash
56
+ # Check current latency
57
+ curl -w "@curl-format.txt" https://service.com/health
58
+
59
+ # Check database connections
60
+ [command to check db]
61
+ ```
62
+
63
+ **Resolution:**
64
+ 1. Check database load
65
+ 2. Check cache hit rate
66
+ 3. If overloaded, scale horizontally: `[scaling command]`
67
+ 4. If cache miss, restart cache: `[restart command]`
68
+
69
+ **Escalation**: If unresolved after 15 minutes, escalate to [team/person]
70
+
71
+ ---
72
+
73
+ ### Issue 2: [Service Unavailable]
74
+
75
+ **Symptoms:**
76
+ - 5xx errors
77
+ - Health check failing
78
+
79
+ **Diagnosis:**
80
+ ```bash
81
+ # Check pod/container status
82
+ kubectl get pods -n [namespace]
83
+
84
+ # Check recent logs
85
+ kubectl logs -n [namespace] [pod-name] --tail=100
86
+ ```
87
+
88
+ **Resolution:**
89
+ 1. Check recent deployments - rollback if needed
90
+ 2. Check dependencies (database, external APIs)
91
+ 3. Restart service: `kubectl rollout restart deployment/[name]`
92
+
93
+ ---
94
+
95
+ ### Issue 3: [Database Connection Issues]
96
+
97
+ **Symptoms:**
98
+ - Connection timeout errors in logs
99
+ - Queries timing out
100
+
101
+ **Diagnosis:**
102
+ ```bash
103
+ # Check connection pool
104
+ [command]
105
+
106
+ # Check database status
107
+ [command]
108
+ ```
109
+
110
+ **Resolution:**
111
+ 1. Check database health
112
+ 2. Check connection pool limits
113
+ 3. Restart connection pool: `[command]`
114
+
115
+ ---
116
+
117
+ ## Alerts
118
+
119
+ | Alert | Severity | Meaning | Action |
120
+ |-------|----------|---------|--------|
121
+ | HighLatency | Warning | p95 > 500ms | Check Issue 1 |
122
+ | ServiceDown | Critical | Health check failing | Check Issue 2 |
123
+ | ErrorRateHigh | Critical | Error rate > 5% | Check logs |
124
+ | DiskSpaceLow | Warning | Disk > 80% | Clear old logs |
125
+
126
+ ---
127
+
128
+ ## Deployment
129
+
130
+ ### Standard Deployment
131
+
132
+ ```bash
133
+ # 1. Run tests
134
+ npm test
135
+
136
+ # 2. Build
137
+ npm run build
138
+
139
+ # 3. Deploy to staging
140
+ npm run deploy:staging
141
+
142
+ # 4. Verify staging
143
+ curl https://staging.service.com/health
144
+
145
+ # 5. Deploy to production
146
+ npm run deploy:production
147
+
148
+ # 6. Verify production
149
+ curl https://service.com/health
150
+ ```
151
+
152
+ ### Rollback
153
+
154
+ ```bash
155
+ # Immediate rollback to previous version
156
+ npm run rollback
157
+
158
+ # Or specific version
159
+ npm run rollback -- --version=1.2.3
160
+ ```
161
+
162
+ ---
163
+
164
+ ## Scaling
165
+
166
+ ### Horizontal Scaling
167
+
168
+ ```bash
169
+ # Scale to N replicas
170
+ kubectl scale deployment/[name] --replicas=N
171
+
172
+ # Or auto-scale
173
+ kubectl autoscale deployment/[name] --min=2 --max=10 --cpu-percent=70
174
+ ```
175
+
176
+ ### When to Scale
177
+ - CPU usage sustained > 70%
178
+ - Latency increasing despite healthy pods
179
+ - Scheduled high-traffic events
180
+
181
+ ---
182
+
183
+ ## Maintenance
184
+
185
+ ### Database Migrations
186
+
187
+ ```bash
188
+ # Run pending migrations
189
+ npm run db:migrate
190
+
191
+ # Rollback last migration
192
+ npm run db:rollback
193
+ ```
194
+
195
+ ### Log Rotation
196
+
197
+ Logs are rotated automatically every 7 days. If disk space is critical:
198
+ ```bash
199
+ # Clear old logs manually
200
+ [command]
201
+ ```
202
+
203
+ ---
204
+
205
+ ## Contacts
206
+
207
+ | Role | Contact | When |
208
+ |------|---------|------|
209
+ | Primary On-Call | [Link to schedule] | First response |
210
+ | Engineering Lead | [Name/Contact] | Escalation |
211
+ | Database Admin | [Name/Contact] | Database issues |
212
+ | Security | [Name/Contact] | Security incidents |
213
+
214
+ ---
215
+
216
+ ## Appendix
217
+
218
+ ### Useful Commands
219
+
220
+ ```bash
221
+ # Check service health
222
+ curl https://service.com/health
223
+
224
+ # Watch logs
225
+ kubectl logs -f deployment/[name]
226
+
227
+ # Get pod details
228
+ kubectl describe pod [pod-name]
229
+
230
+ # Port forward for local debugging
231
+ kubectl port-forward service/[name] 8080:80
232
+ ```
233
+
234
+ ### Related Documentation
235
+
236
+ - [Architecture Doc](../architecture/SERVICE_NAME.md) <!-- Update with actual path -->
237
+ - [API Documentation](../api/SERVICE_NAME.md) <!-- Update with actual path -->
238
+ - [Incident History](../incidents/SERVICE_NAME.md) <!-- Update with actual path -->