@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.
- package/LICENSE +21 -0
- package/README.md +361 -0
- package/chains/_index.md +33 -0
- package/chains/bug-fix.md +222 -0
- package/chains/new-feature.md +216 -0
- package/chains/production-launch.md +291 -0
- package/chains/refactor.md +210 -0
- package/chains/security-hardening.md +242 -0
- package/contexts/guides/api-design.md +229 -0
- package/contexts/guides/error-handling.md +219 -0
- package/contexts/patterns/agentic-coding.md +368 -0
- package/contexts/patterns/mcp-server-patterns.md +267 -0
- package/contexts/patterns/repository-pattern.md +163 -0
- package/contexts/patterns/service-layer.md +185 -0
- package/contexts/stacks/fastapi.md +187 -0
- package/contexts/stacks/nextjs-14.md +149 -0
- package/contexts/stacks/prisma.md +228 -0
- package/dist/index.d.ts +129 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +284 -0
- package/dist/index.js.map +1 -0
- package/examples/architecture-docs/sample-architecture.md +270 -0
- package/examples/code-reviews/sample-review.md +232 -0
- package/examples/prds/sample-prd.md +179 -0
- package/instructions/_index.md +57 -0
- package/instructions/personas/code-reviewer.md +83 -0
- package/instructions/personas/devops-engineer.md +90 -0
- package/instructions/personas/security-expert.md +69 -0
- package/instructions/personas/senior-engineer.md +243 -0
- package/instructions/personas/ux-engineer.md +88 -0
- package/instructions/standards/fastapi.md +241 -0
- package/instructions/standards/go.md +427 -0
- package/instructions/standards/nextjs.md +350 -0
- package/instructions/standards/nodejs.md +284 -0
- package/instructions/standards/python.md +245 -0
- package/instructions/standards/react.md +227 -0
- package/instructions/standards/rust.md +318 -0
- package/instructions/standards/typescript-react.md +822 -0
- package/instructions/standards/typescript.md +294 -0
- package/instructions/workflows/feature-development.md +222 -0
- package/instructions/workflows/incident-response.md +192 -0
- package/instructions/workflows/pr-review.md +149 -0
- package/instructions/workflows/tdd.md +160 -0
- package/package.json +84 -0
- package/prompts/_index.md +70 -0
- package/prompts/agentic/agentic-loop.md +83 -0
- package/prompts/agentic/context-manager.md +37 -0
- package/prompts/agentic/test-driven-fix.md +41 -0
- package/prompts/analysis/deep-debugger.md +488 -0
- package/prompts/design/design-system-extractor.md +147 -0
- package/prompts/development/code-cleaner.md +119 -0
- package/prompts/development/debugger.md +64 -0
- package/prompts/development/tech-debt-audit.md +88 -0
- package/prompts/planning/architecture-analyzer.md +72 -0
- package/prompts/planning/implementation-plan.md +98 -0
- package/prompts/planning/prd-generator.md +66 -0
- package/prompts/planning/scope-killer.md +74 -0
- package/prompts/quality/critical-path-tester.md +133 -0
- package/prompts/quality/pre-launch-checklist.md +137 -0
- package/prompts/quality/security-audit.md +115 -0
- package/prompts/quality/security-fixer.md +117 -0
- package/prompts/quality/security-hardening.md +157 -0
- package/prompts/system/master-system-prompt.md +252 -0
- package/skills/_index.md +60 -0
- package/skills/code-review-advanced.md +435 -0
- package/skills/code-review.md +86 -0
- package/skills/debugging.md +86 -0
- package/skills/documentation.md +97 -0
- package/skills/pr-description.md +116 -0
- package/skills/project-setup.md +123 -0
- package/skills/refactoring.md +93 -0
- package/skills/testing.md +134 -0
- package/snippets/_index.md +57 -0
- package/snippets/constraints/mvp-only.md +50 -0
- package/snippets/constraints/no-external-deps.md +45 -0
- package/snippets/constraints/read-only.md +45 -0
- package/snippets/constraints/security-first.md +50 -0
- package/snippets/modifiers/be-ruthless.md +52 -0
- package/snippets/modifiers/be-thorough.md +50 -0
- package/snippets/modifiers/effort-high.md +56 -0
- package/snippets/modifiers/explain-reasoning.md +50 -0
- package/snippets/modifiers/megathink.md +314 -0
- package/snippets/modifiers/meta-cot.md +101 -0
- package/snippets/modifiers/no-code-yet.md +55 -0
- package/snippets/modifiers/step-by-step.md +50 -0
- package/snippets/modifiers/ultrathink.md +359 -0
- package/snippets/output-formats/checklist.md +61 -0
- package/snippets/output-formats/json.md +53 -0
- package/snippets/output-formats/markdown-table.md +44 -0
- package/snippets/output-formats/numbered-list.md +44 -0
- package/templates/_index.md +101 -0
- package/templates/claude-md/auto-enhance.md +258 -0
- package/templates/claude-md/cli-tool.md +243 -0
- package/templates/claude-md/full.md +449 -0
- package/templates/claude-md/minimal.md +52 -0
- package/templates/claude-md/nextjs-app.md +207 -0
- package/templates/claude-md/nodejs-service.md +251 -0
- package/templates/claude-md/python-api.md +236 -0
- package/templates/copilot/instructions.md +33 -0
- package/templates/cursor-rules/fullstack.txt +98 -0
- package/templates/cursor-rules/minimal.txt +20 -0
- package/templates/cursor-rules/nextjs.txt +61 -0
- package/templates/cursor-rules/python.txt +79 -0
- package/templates/docs/adr-template.md +119 -0
- package/templates/docs/api-spec-template.md +277 -0
- package/templates/docs/prd-template.md +140 -0
- 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 -->
|