tribunal-kit 2.4.6 โ 3.1.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/.agent/ARCHITECTURE.md +99 -99
- package/.agent/GEMINI.md +52 -52
- package/.agent/agents/accessibility-reviewer.md +139 -86
- package/.agent/agents/ai-code-reviewer.md +160 -90
- package/.agent/agents/backend-specialist.md +164 -127
- package/.agent/agents/code-archaeologist.md +115 -73
- package/.agent/agents/database-architect.md +130 -110
- package/.agent/agents/debugger.md +137 -97
- package/.agent/agents/dependency-reviewer.md +78 -30
- package/.agent/agents/devops-engineer.md +161 -118
- package/.agent/agents/documentation-writer.md +151 -87
- package/.agent/agents/explorer-agent.md +117 -99
- package/.agent/agents/frontend-reviewer.md +127 -47
- package/.agent/agents/frontend-specialist.md +169 -109
- package/.agent/agents/game-developer.md +28 -164
- package/.agent/agents/logic-reviewer.md +87 -49
- package/.agent/agents/mobile-developer.md +151 -103
- package/.agent/agents/mobile-reviewer.md +133 -50
- package/.agent/agents/orchestrator.md +121 -110
- package/.agent/agents/penetration-tester.md +103 -77
- package/.agent/agents/performance-optimizer.md +136 -92
- package/.agent/agents/performance-reviewer.md +139 -69
- package/.agent/agents/product-manager.md +104 -70
- package/.agent/agents/product-owner.md +6 -25
- package/.agent/agents/project-planner.md +95 -95
- package/.agent/agents/qa-automation-engineer.md +174 -87
- package/.agent/agents/security-auditor.md +133 -129
- package/.agent/agents/seo-specialist.md +160 -99
- package/.agent/agents/sql-reviewer.md +132 -44
- package/.agent/agents/supervisor-agent.md +137 -109
- package/.agent/agents/swarm-worker-contracts.md +17 -17
- package/.agent/agents/swarm-worker-registry.md +46 -46
- package/.agent/agents/test-coverage-reviewer.md +132 -53
- package/.agent/agents/test-engineer.md +0 -21
- package/.agent/agents/type-safety-reviewer.md +143 -33
- package/.agent/patterns/generator.md +9 -9
- package/.agent/patterns/inversion.md +12 -12
- package/.agent/patterns/pipeline.md +9 -9
- package/.agent/patterns/reviewer.md +13 -13
- package/.agent/patterns/tool-wrapper.md +9 -9
- package/.agent/rules/GEMINI.md +63 -63
- package/.agent/scripts/__pycache__/auto_preview.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/bundle_analyzer.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/checklist.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/dependency_analyzer.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/security_scan.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/session_manager.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/skill_integrator.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/swarm_dispatcher.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/test_runner.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/verify_all.cpython-311.pyc +0 -0
- package/.agent/scripts/compress_skills.py +167 -0
- package/.agent/scripts/consolidate_skills.py +173 -0
- package/.agent/scripts/deep_compress.py +202 -0
- package/.agent/scripts/minify_context.py +80 -0
- package/.agent/scripts/security_scan.py +1 -1
- package/.agent/scripts/strip_tribunal.py +41 -0
- package/.agent/skills/agent-organizer/SKILL.md +60 -100
- package/.agent/skills/agentic-patterns/SKILL.md +0 -70
- package/.agent/skills/ai-prompt-injection-defense/SKILL.md +108 -53
- package/.agent/skills/api-patterns/SKILL.md +197 -257
- package/.agent/skills/api-security-auditor/SKILL.md +125 -57
- package/.agent/skills/app-builder/SKILL.md +326 -50
- package/.agent/skills/app-builder/templates/SKILL.md +13 -15
- package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +16 -16
- package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +22 -22
- package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +18 -18
- package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +20 -20
- package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +17 -17
- package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +18 -18
- package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +21 -21
- package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +19 -19
- package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +26 -26
- package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +26 -26
- package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +19 -19
- package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +18 -18
- package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +20 -20
- package/.agent/skills/appflow-wireframe/SKILL.md +71 -98
- package/.agent/skills/architecture/SKILL.md +161 -200
- package/.agent/skills/authentication-best-practices/SKILL.md +121 -54
- package/.agent/skills/bash-linux/SKILL.md +71 -166
- package/.agent/skills/behavioral-modes/SKILL.md +8 -69
- package/.agent/skills/brainstorming/SKILL.md +345 -127
- package/.agent/skills/building-native-ui/SKILL.md +125 -57
- package/.agent/skills/clean-code/SKILL.md +266 -149
- package/.agent/skills/code-review-checklist/SKILL.md +0 -62
- package/.agent/skills/config-validator/SKILL.md +73 -131
- package/.agent/skills/csharp-developer/SKILL.md +434 -73
- package/.agent/skills/database-design/SKILL.md +190 -275
- package/.agent/skills/deployment-procedures/SKILL.md +81 -158
- package/.agent/skills/devops-engineer/SKILL.md +255 -94
- package/.agent/skills/devops-incident-responder/SKILL.md +50 -69
- package/.agent/skills/doc.md +5 -5
- package/.agent/skills/documentation-templates/SKILL.md +19 -63
- package/.agent/skills/edge-computing/SKILL.md +75 -165
- package/.agent/skills/extract-design-system/SKILL.md +84 -58
- package/.agent/skills/framer-motion-expert/SKILL.md +195 -0
- package/.agent/skills/frontend-design/SKILL.md +151 -499
- package/.agent/skills/game-design-expert/SKILL.md +71 -0
- package/.agent/skills/game-engineering-expert/SKILL.md +88 -0
- package/.agent/skills/geo-fundamentals/SKILL.md +52 -178
- package/.agent/skills/github-operations/SKILL.md +197 -272
- package/.agent/skills/gsap-expert/SKILL.md +194 -0
- package/.agent/skills/i18n-localization/SKILL.md +60 -172
- package/.agent/skills/intelligent-routing/SKILL.md +123 -103
- package/.agent/skills/lint-and-validate/SKILL.md +8 -52
- package/.agent/skills/llm-engineering/SKILL.md +281 -195
- package/.agent/skills/local-first/SKILL.md +76 -159
- package/.agent/skills/mcp-builder/SKILL.md +48 -188
- package/.agent/skills/mobile-design/SKILL.md +213 -219
- package/.agent/skills/motion-engineering/SKILL.md +184 -0
- package/.agent/skills/nextjs-react-expert/SKILL.md +184 -203
- package/.agent/skills/nodejs-best-practices/SKILL.md +403 -185
- package/.agent/skills/observability/SKILL.md +211 -203
- package/.agent/skills/parallel-agents/SKILL.md +53 -146
- package/.agent/skills/performance-profiling/SKILL.md +171 -151
- package/.agent/skills/plan-writing/SKILL.md +49 -153
- package/.agent/skills/platform-engineer/SKILL.md +57 -103
- package/.agent/skills/playwright-best-practices/SKILL.md +110 -63
- package/.agent/skills/powershell-windows/SKILL.md +61 -179
- package/.agent/skills/python-patterns/SKILL.md +7 -35
- package/.agent/skills/python-pro/SKILL.md +273 -114
- package/.agent/skills/react-specialist/SKILL.md +227 -108
- package/.agent/skills/readme-builder/SKILL.md +15 -85
- package/.agent/skills/realtime-patterns/SKILL.md +216 -243
- package/.agent/skills/red-team-tactics/SKILL.md +10 -51
- package/.agent/skills/rust-pro/SKILL.md +525 -142
- package/.agent/skills/seo-fundamentals/SKILL.md +92 -153
- package/.agent/skills/server-management/SKILL.md +110 -166
- package/.agent/skills/shadcn-ui-expert/SKILL.md +154 -55
- package/.agent/skills/skill-creator/SKILL.md +18 -58
- package/.agent/skills/sql-pro/SKILL.md +543 -68
- package/.agent/skills/supabase-postgres-best-practices/SKILL.md +28 -68
- package/.agent/skills/swiftui-expert/SKILL.md +124 -57
- package/.agent/skills/systematic-debugging/SKILL.md +49 -151
- package/.agent/skills/tailwind-patterns/SKILL.md +433 -149
- package/.agent/skills/tdd-workflow/SKILL.md +63 -169
- package/.agent/skills/test-result-analyzer/SKILL.md +33 -73
- package/.agent/skills/testing-patterns/SKILL.md +437 -130
- package/.agent/skills/trend-researcher/SKILL.md +30 -71
- package/.agent/skills/ui-ux-pro-max/SKILL.md +0 -41
- package/.agent/skills/ui-ux-researcher/SKILL.md +51 -91
- package/.agent/skills/vue-expert/SKILL.md +225 -119
- package/.agent/skills/vulnerability-scanner/SKILL.md +264 -226
- package/.agent/skills/web-accessibility-auditor/SKILL.md +141 -58
- package/.agent/skills/web-design-guidelines/SKILL.md +17 -61
- package/.agent/skills/webapp-testing/SKILL.md +71 -196
- package/.agent/skills/whimsy-injector/SKILL.md +58 -132
- package/.agent/skills/workflow-optimizer/SKILL.md +28 -68
- package/.agent/workflows/api-tester.md +96 -224
- package/.agent/workflows/audit.md +81 -122
- package/.agent/workflows/brainstorm.md +69 -105
- package/.agent/workflows/changelog.md +65 -97
- package/.agent/workflows/create.md +73 -88
- package/.agent/workflows/debug.md +80 -111
- package/.agent/workflows/deploy.md +119 -92
- package/.agent/workflows/enhance.md +80 -91
- package/.agent/workflows/fix.md +68 -97
- package/.agent/workflows/generate.md +165 -164
- package/.agent/workflows/migrate.md +106 -109
- package/.agent/workflows/orchestrate.md +103 -86
- package/.agent/workflows/performance-benchmarker.md +77 -268
- package/.agent/workflows/plan.md +120 -98
- package/.agent/workflows/preview.md +39 -96
- package/.agent/workflows/refactor.md +105 -97
- package/.agent/workflows/review-ai.md +63 -102
- package/.agent/workflows/review.md +71 -110
- package/.agent/workflows/session.md +53 -113
- package/.agent/workflows/status.md +42 -88
- package/.agent/workflows/strengthen-skills.md +90 -51
- package/.agent/workflows/swarm.md +114 -129
- package/.agent/workflows/test.md +125 -102
- package/.agent/workflows/tribunal-backend.md +60 -78
- package/.agent/workflows/tribunal-database.md +62 -100
- package/.agent/workflows/tribunal-frontend.md +62 -82
- package/.agent/workflows/tribunal-full.md +56 -100
- package/.agent/workflows/tribunal-mobile.md +65 -94
- package/.agent/workflows/tribunal-performance.md +62 -105
- package/.agent/workflows/ui-ux-pro-max.md +72 -121
- package/README.md +11 -15
- package/package.json +1 -1
- package/.agent/skills/api-patterns/api-style.md +0 -42
- package/.agent/skills/api-patterns/auth.md +0 -24
- package/.agent/skills/api-patterns/documentation.md +0 -26
- package/.agent/skills/api-patterns/graphql.md +0 -41
- package/.agent/skills/api-patterns/rate-limiting.md +0 -31
- package/.agent/skills/api-patterns/response.md +0 -37
- package/.agent/skills/api-patterns/rest.md +0 -40
- package/.agent/skills/api-patterns/security-testing.md +0 -122
- package/.agent/skills/api-patterns/trpc.md +0 -41
- package/.agent/skills/api-patterns/versioning.md +0 -22
- package/.agent/skills/app-builder/agent-coordination.md +0 -71
- package/.agent/skills/app-builder/feature-building.md +0 -53
- package/.agent/skills/app-builder/project-detection.md +0 -34
- package/.agent/skills/app-builder/scaffolding.md +0 -118
- package/.agent/skills/app-builder/tech-stack.md +0 -40
- package/.agent/skills/architecture/context-discovery.md +0 -43
- package/.agent/skills/architecture/examples.md +0 -94
- package/.agent/skills/architecture/pattern-selection.md +0 -68
- package/.agent/skills/architecture/patterns-reference.md +0 -50
- package/.agent/skills/architecture/trade-off-analysis.md +0 -77
- package/.agent/skills/brainstorming/dynamic-questioning.md +0 -360
- package/.agent/skills/database-design/database-selection.md +0 -43
- package/.agent/skills/database-design/indexing.md +0 -39
- package/.agent/skills/database-design/migrations.md +0 -48
- package/.agent/skills/database-design/optimization.md +0 -36
- package/.agent/skills/database-design/orm-selection.md +0 -30
- package/.agent/skills/database-design/schema-design.md +0 -56
- package/.agent/skills/dotnet-core-expert/SKILL.md +0 -103
- package/.agent/skills/framer-motion-animations/SKILL.md +0 -74
- package/.agent/skills/frontend-design/animation-guide.md +0 -331
- package/.agent/skills/frontend-design/color-system.md +0 -329
- package/.agent/skills/frontend-design/decision-trees.md +0 -418
- package/.agent/skills/frontend-design/motion-graphics.md +0 -306
- package/.agent/skills/frontend-design/typography-system.md +0 -363
- package/.agent/skills/frontend-design/ux-psychology.md +0 -1116
- package/.agent/skills/frontend-design/visual-effects.md +0 -383
- package/.agent/skills/game-development/2d-games/SKILL.md +0 -119
- package/.agent/skills/game-development/3d-games/SKILL.md +0 -135
- package/.agent/skills/game-development/SKILL.md +0 -236
- package/.agent/skills/game-development/game-art/SKILL.md +0 -185
- package/.agent/skills/game-development/game-audio/SKILL.md +0 -190
- package/.agent/skills/game-development/game-design/SKILL.md +0 -129
- package/.agent/skills/game-development/mobile-games/SKILL.md +0 -108
- package/.agent/skills/game-development/multiplayer/SKILL.md +0 -132
- package/.agent/skills/game-development/pc-games/SKILL.md +0 -144
- package/.agent/skills/game-development/vr-ar/SKILL.md +0 -123
- package/.agent/skills/game-development/web-games/SKILL.md +0 -150
- package/.agent/skills/intelligent-routing/router-manifest.md +0 -65
- package/.agent/skills/mobile-design/decision-trees.md +0 -516
- package/.agent/skills/mobile-design/mobile-backend.md +0 -491
- package/.agent/skills/mobile-design/mobile-color-system.md +0 -420
- package/.agent/skills/mobile-design/mobile-debugging.md +0 -122
- package/.agent/skills/mobile-design/mobile-design-thinking.md +0 -357
- package/.agent/skills/mobile-design/mobile-navigation.md +0 -458
- package/.agent/skills/mobile-design/mobile-performance.md +0 -767
- package/.agent/skills/mobile-design/mobile-testing.md +0 -356
- package/.agent/skills/mobile-design/mobile-typography.md +0 -433
- package/.agent/skills/mobile-design/platform-android.md +0 -666
- package/.agent/skills/mobile-design/platform-ios.md +0 -561
- package/.agent/skills/mobile-design/touch-psychology.md +0 -537
- package/.agent/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +0 -312
- package/.agent/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +0 -240
- package/.agent/skills/nextjs-react-expert/3-server-server-side-performance.md +0 -490
- package/.agent/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +0 -264
- package/.agent/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +0 -581
- package/.agent/skills/nextjs-react-expert/6-rendering-rendering-performance.md +0 -432
- package/.agent/skills/nextjs-react-expert/7-js-javascript-performance.md +0 -684
- package/.agent/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +0 -150
- package/.agent/skills/vulnerability-scanner/checklists.md +0 -121
|
@@ -1,188 +1,111 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: deployment-procedures
|
|
3
|
-
description: Production deployment
|
|
3
|
+
description: Production application deployment mastery. Zero-downtime deployment strategies (Blue/Green, Rolling updates), Container orchestration (Docker/ECS), CI/CD pipelines, secrets injection, database migration safety, health checks, and rollback contingencies. Use when moving code from development to production execution.
|
|
4
4
|
allowed-tools: Read, Write, Edit, Glob, Grep
|
|
5
|
-
version:
|
|
6
|
-
last-updated: 2026-
|
|
5
|
+
version: 2.0.0
|
|
6
|
+
last-updated: 2026-04-02
|
|
7
7
|
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
# Deployment
|
|
11
|
-
|
|
12
|
-
> Deployments are not risky because of the code. They are risky because of all the
|
|
13
|
-
> assumptions that have never been tested in production.
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## The Core Tension
|
|
18
|
-
|
|
19
|
-
Speed vs. safety. Moving fast reduces iteration time. Moving carefully reduces incidents.
|
|
20
|
-
The answer is not "always be careful" โ it's **make fast safe**.
|
|
21
|
-
|
|
22
|
-
That means:
|
|
23
|
-
- Deployments that are reversible
|
|
24
|
-
- Changes that are observable in real time
|
|
25
|
-
- Failures that are isolated to a subset of users
|
|
26
|
-
- State changes that can be undone without code changes
|
|
10
|
+
# Deployment Procedures โ Production Execution Mastery
|
|
27
11
|
|
|
28
12
|
---
|
|
29
13
|
|
|
30
|
-
##
|
|
31
|
-
|
|
32
|
-
### Phase 1 โ Pre-Flight
|
|
33
|
-
|
|
34
|
-
Before touching anything in production:
|
|
35
|
-
|
|
36
|
-
- [ ] Tests passing on the branch being deployed
|
|
37
|
-
- [ ] No pending schema migrations that will break the current production code
|
|
38
|
-
- [ ] Feature flags in place for any risky changes
|
|
39
|
-
- [ ] Rollback plan confirmed โ "delete the feature flag" is a valid plan, "redeploy" is not (too slow)
|
|
40
|
-
- [ ] Team notified if deployment will cause visible disruption
|
|
41
|
-
|
|
42
|
-
### Phase 2 โ Database First
|
|
43
|
-
|
|
44
|
-
If there are schema changes:
|
|
45
|
-
|
|
46
|
-
- Deploy the migration **before** the code that depends on it
|
|
47
|
-
- Verify the migration completed and the database is healthy
|
|
48
|
-
- The new code must be backward-compatible with the old schema (for the window during which old pods are still running)
|
|
14
|
+
## 1. Zero-Downtime Deployment Strategies
|
|
49
15
|
|
|
50
|
-
|
|
51
|
-
- Add NOT NULL without a DEFAULT in the migration
|
|
52
|
-
- Drop a column in the same deployment that removes the code referencing it
|
|
53
|
-
- Run a migration that locks the table for more than a few seconds without scheduling a maintenance window
|
|
16
|
+
Stopping a server, pulling code, building, and restarting is unacceptable. This results in 30-120 seconds of 502 Bad Gateway errors.
|
|
54
17
|
|
|
55
|
-
###
|
|
56
|
-
|
|
57
|
-
Deploy
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|---|---|---|
|
|
61
|
-
| Direct (all-at-once) | High | Small teams, low traffic, with immediate rollback |
|
|
62
|
-
| Rolling | Medium | Multiple instances, gradual update, auto-rollback on health fail |
|
|
63
|
-
| Blue/Green | Low | Mission-critical services, instant switch and rollback |
|
|
64
|
-
| Canary | Very low | Unknown risk level, expose to 1โ5% of traffic first |
|
|
65
|
-
|
|
66
|
-
### Phase 4 โ Verify
|
|
67
|
-
|
|
68
|
-
After deploying, watch:
|
|
69
|
-
|
|
70
|
-
- Error rate โ compare to pre-deploy baseline, not zero
|
|
71
|
-
- Response time P50, P95, P99 โ not just average
|
|
72
|
-
- Business metric if visible (conversion, checkout completion)
|
|
73
|
-
- Key logs for new error patterns
|
|
74
|
-
|
|
75
|
-
Wait at minimum:
|
|
76
|
-
- 5 minutes for canary verification
|
|
77
|
-
- 15 minutes for a rolling deploy
|
|
78
|
-
- Until traffic covers the full daily pattern for any significant feature
|
|
79
|
-
|
|
80
|
-
### Phase 5 โ Complete or Roll Back
|
|
81
|
-
|
|
82
|
-
**Roll back when:**
|
|
83
|
-
- Error rate increases by more than 2x pre-deploy baseline
|
|
84
|
-
- P95 latency increases significantly without an expected cause
|
|
85
|
-
- A critical user path stops working
|
|
86
|
-
|
|
87
|
-
**Complete when:**
|
|
88
|
-
- All metrics stable for the required observation window
|
|
89
|
-
- All instances updated
|
|
90
|
-
- Feature flags cleaned up if used
|
|
91
|
-
|
|
92
|
-
---
|
|
18
|
+
### Blue/Green Deployment
|
|
19
|
+
- Two identical environments (Blue is live, Green is idle).
|
|
20
|
+
- Deploy v2 to Green. Run smoke tests on Green.
|
|
21
|
+
- Swap the reverse proxy (Nginx or Load Balancer) router from Blue to Green.
|
|
22
|
+
- Zero downtime. Rollback is instant (swap router back to Blue).
|
|
93
23
|
|
|
94
|
-
|
|
24
|
+
### Rolling Updates (Container Clusters)
|
|
25
|
+
- If you have 5 containers running v1.
|
|
26
|
+
- Spin up 1 container running v2. Wait for it to pass health checks.
|
|
27
|
+
- Drain and terminate 1 container of v1.
|
|
28
|
+
- Repeat until all 5 containers run v2.
|
|
95
29
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
| Schema migration caused the issue | Fix forward โ migrations are rarely safely reversible |
|
|
101
|
-
| Feature flag controls the issue | Turn off the flag โ fastest rollback possible |
|
|
102
|
-
|
|
103
|
-
---
|
|
104
|
-
|
|
105
|
-
## Environment Hierarchy
|
|
106
|
-
|
|
107
|
-
Code flows one direction: dev โ staging โ production. Never skip staging for anything non-trivial.
|
|
108
|
-
|
|
109
|
-
- **Development:** Fast iteration, local data, no external consequences
|
|
110
|
-
- **Staging:** Production-like data (anonymized), used for final verification
|
|
111
|
-
- **Production:** Real users, real consequences, thorough before touching
|
|
30
|
+
```bash
|
|
31
|
+
# Docker Swarm / ECS / Kubernetes inherently handle rolling updates
|
|
32
|
+
docker service update --image myapp:v2 --update-parallelism 1 --update-delay 10s myapp_web
|
|
33
|
+
```
|
|
112
34
|
|
|
113
35
|
---
|
|
114
36
|
|
|
115
|
-
##
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
37
|
+
## 2. Infrastructure as Code (IaC) CI Pipelines
|
|
38
|
+
|
|
39
|
+
All deployment logic must be codified and checked in alongside the application code.
|
|
40
|
+
|
|
41
|
+
```yaml
|
|
42
|
+
# .github/workflows/deploy.yml
|
|
43
|
+
name: Production Deploy
|
|
44
|
+
|
|
45
|
+
on:
|
|
46
|
+
push:
|
|
47
|
+
branches: [ "main" ]
|
|
48
|
+
|
|
49
|
+
# Concurrency limits prevent race conditions if two commits are pushed rapidly
|
|
50
|
+
concurrency:
|
|
51
|
+
group: production-deploy
|
|
52
|
+
cancel-in-progress: true
|
|
53
|
+
|
|
54
|
+
jobs:
|
|
55
|
+
build_and_deploy:
|
|
56
|
+
runs-on: ubuntu-latest
|
|
57
|
+
steps:
|
|
58
|
+
- uses: actions/checkout@v4
|
|
59
|
+
|
|
60
|
+
# 1. CI Phase: Fast fail
|
|
61
|
+
- name: Install & Audit
|
|
62
|
+
run: npm ci && npm audit --audit-level=high
|
|
63
|
+
|
|
64
|
+
- name: Unit Tests
|
|
65
|
+
run: npm test
|
|
66
|
+
|
|
67
|
+
# 2. Build Phase
|
|
68
|
+
- name: Build Assets
|
|
69
|
+
run: npm run build
|
|
70
|
+
|
|
71
|
+
# 3. CD Phase (Deployment via SSH/Docker)
|
|
72
|
+
- name: Deploy to Server
|
|
73
|
+
uses: appleboy/ssh-action@master
|
|
74
|
+
with:
|
|
75
|
+
host: ${{ secrets.SERVER_HOST }}
|
|
76
|
+
username: deploy_user
|
|
77
|
+
key: ${{ secrets.DEPLOY_SSH_KEY }}
|
|
78
|
+
script: |
|
|
79
|
+
cd /opt/myapp
|
|
80
|
+
git pull origin main
|
|
81
|
+
docker-compose up -d --build
|
|
82
|
+
# Container starts in background, port mapped to Nginx.
|
|
128
83
|
```
|
|
129
84
|
|
|
130
85
|
---
|
|
131
86
|
|
|
132
|
-
##
|
|
87
|
+
## 3. Database Migration Safety Rules
|
|
133
88
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
```
|
|
137
|
-
โโโ Deployment Procedures Recommendation โโโโโโโโโโโโโโโโ
|
|
138
|
-
Decision: [what was chosen / proposed]
|
|
139
|
-
Rationale: [why โ one concise line]
|
|
140
|
-
Trade-offs: [what is consciously accepted]
|
|
141
|
-
Next action: [concrete next step for the user]
|
|
142
|
-
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
143
|
-
Pre-Flight: โ
All checks passed
|
|
144
|
-
or โ [blocking item that must be resolved first]
|
|
145
|
-
```
|
|
89
|
+
Schema changes cause 90% of severe deployment outages.
|
|
146
90
|
|
|
91
|
+
**The Expand-and-Contract Pattern (Zero Downtime DB Migrations):**
|
|
92
|
+
Never drop columns or rename tables on a live system. Old code running against new schemas *will* crash.
|
|
147
93
|
|
|
94
|
+
*Goal: Rename column `first_name` to `given_name`*
|
|
95
|
+
- **Phase 1 (Expand):** Add `given_name` as a NEW, nullable column. The app writes to BOTH columns simultaneously, reads from `first_name`.
|
|
96
|
+
- **Phase 2 (Migrate):** Run background script copying `first_name` data to `given_name`.
|
|
97
|
+
- **Phase 3 (Swap):** Deploy v2 Application code that reads/writes exclusively to `given_name`.
|
|
98
|
+
- **Phase 4 (Contract):** Drop the legacy `first_name` column weeks later.
|
|
148
99
|
|
|
149
100
|
---
|
|
150
101
|
|
|
151
|
-
##
|
|
102
|
+
## 4. The 5-Minute Rollback Guarantee
|
|
152
103
|
|
|
153
|
-
|
|
104
|
+
If the new deployment throws persistent 5xx errors, how fast can you revert?
|
|
105
|
+
If the answer relies on "recompiling the old git commit," you have failed.
|
|
154
106
|
|
|
155
|
-
1. **
|
|
156
|
-
2. **
|
|
157
|
-
3. **
|
|
158
|
-
4. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
|
|
159
|
-
5. **Silent Degradation:** Catching and suppressing errors without logging or re-raising.
|
|
107
|
+
1. **Docker Tags:** Every build is tagged with the Git SHA (`myapp:a1b2c3d`). Reverting is a split-second container swap.
|
|
108
|
+
2. **Feature Flags:** The code deployed completely dormant. If it breaks when toggled via flag, the rollback is hitting the "Off" button on LaunchDarkly (Zero code deployed).
|
|
109
|
+
3. **Database Integrity:** Migrations are explicitly atomic (`BEGIN; DROP TABLE...; COMMIT;`) so failures roll back seamlessly.
|
|
160
110
|
|
|
161
111
|
---
|
|
162
|
-
|
|
163
|
-
## ๐๏ธ Tribunal Integration (Anti-Hallucination)
|
|
164
|
-
|
|
165
|
-
**Slash command: `/review` or `/tribunal-full`**
|
|
166
|
-
**Active reviewers: `logic-reviewer` ยท `security-auditor`**
|
|
167
|
-
|
|
168
|
-
### โ Forbidden AI Tropes
|
|
169
|
-
|
|
170
|
-
1. **Blind Assumptions:** Never make an assumption without documenting it clearly with `// VERIFY: [reason]`.
|
|
171
|
-
2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
|
|
172
|
-
3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
|
|
173
|
-
|
|
174
|
-
### โ
Pre-Flight Self-Audit
|
|
175
|
-
|
|
176
|
-
Review these questions before confirming output:
|
|
177
|
-
```
|
|
178
|
-
โ
Did I rely ONLY on real, verified tools and methods?
|
|
179
|
-
โ
Is this solution appropriately scoped to the user's constraints?
|
|
180
|
-
โ
Did I handle potential failure modes and edge cases?
|
|
181
|
-
โ
Have I avoided generic boilerplate that doesn't add value?
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
### ๐ Verification-Before-Completion (VBC) Protocol
|
|
185
|
-
|
|
186
|
-
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
187
|
-
- โ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
188
|
-
- โ
**Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
|
|
@@ -1,134 +1,295 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: devops-engineer
|
|
3
|
-
description:
|
|
3
|
+
description: DevOps engineering mastery. Docker containerization, Docker Compose, CI/CD with GitHub Actions, Kubernetes basics, infrastructure as code (Terraform), monitoring/alerting, deployment strategies (blue/green, canary, rolling), secrets management, and production readiness checklists. Use when building CI/CD pipelines, containerizing apps, or managing infrastructure.
|
|
4
4
|
allowed-tools: Read, Write, Edit, Glob, Grep
|
|
5
|
-
version:
|
|
6
|
-
last-updated: 2026-
|
|
5
|
+
version: 2.0.0
|
|
6
|
+
last-updated: 2026-04-01
|
|
7
7
|
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
#
|
|
11
|
-
|
|
12
|
-
You are a senior DevOps engineer with expertise in building and maintaining scalable, automated infrastructure and deployment pipelines. Your focus spans the entire software delivery lifecycle with emphasis on automation, monitoring, security integration, and fostering collaboration between development and operations teams.
|
|
13
|
-
|
|
14
|
-
## Configuration & Context Assessment
|
|
15
|
-
When invoked:
|
|
16
|
-
1. Query context manager for current infrastructure and development practices
|
|
17
|
-
2. Review existing automation, deployment processes, and team workflows
|
|
18
|
-
3. Analyze bottlenecks, manual processes, and collaboration gaps
|
|
19
|
-
4. Implement solutions improving efficiency, reliability, and team productivity
|
|
10
|
+
# DevOps Engineer โ CI/CD & Infrastructure Mastery
|
|
20
11
|
|
|
21
12
|
---
|
|
22
13
|
|
|
23
|
-
##
|
|
24
|
-
- Infrastructure automation 100% achieved
|
|
25
|
-
- Deployment automation 100% implemented
|
|
26
|
-
- Test automation > 80% coverage
|
|
27
|
-
- Mean time to production < 1 day
|
|
28
|
-
- Service availability > 99.9% maintained
|
|
29
|
-
- Security scanning automated throughout
|
|
30
|
-
- Documentation as code practiced
|
|
31
|
-
- Team collaboration thriving
|
|
14
|
+
## Docker
|
|
32
15
|
|
|
33
|
-
|
|
16
|
+
### Dockerfile (Production-Ready)
|
|
34
17
|
|
|
35
|
-
|
|
18
|
+
```dockerfile
|
|
19
|
+
# โ
Multi-stage build โ minimal final image
|
|
20
|
+
FROM node:22-alpine AS builder
|
|
21
|
+
WORKDIR /app
|
|
36
22
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
* **Containers:** Docker optimization, Kubernetes deployment, Helm chart creation, Service mesh setup.
|
|
23
|
+
# Install deps first (cache layer)
|
|
24
|
+
COPY package.json package-lock.json ./
|
|
25
|
+
RUN npm ci --ignore-scripts
|
|
41
26
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
27
|
+
# Build
|
|
28
|
+
COPY . .
|
|
29
|
+
RUN npm run build
|
|
45
30
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
* **Observability:** Metrics collection, Log aggregation, Distributed tracing, Alert management, SLI/SLO definition.
|
|
31
|
+
# โโโโ Production stage โโโโ
|
|
32
|
+
FROM node:22-alpine AS runner
|
|
33
|
+
WORKDIR /app
|
|
50
34
|
|
|
51
|
-
|
|
35
|
+
# Security: non-root user
|
|
36
|
+
RUN addgroup --system --gid 1001 appgroup && \
|
|
37
|
+
adduser --system --uid 1001 appuser
|
|
52
38
|
|
|
53
|
-
|
|
39
|
+
# Copy only production artifacts
|
|
40
|
+
COPY --from=builder /app/dist ./dist
|
|
41
|
+
COPY --from=builder /app/node_modules ./node_modules
|
|
42
|
+
COPY --from=builder /app/package.json ./
|
|
54
43
|
|
|
55
|
-
|
|
44
|
+
USER appuser
|
|
45
|
+
EXPOSE 3000
|
|
46
|
+
ENV NODE_ENV=production
|
|
56
47
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
Decision: [what was chosen / proposed]
|
|
60
|
-
Rationale: [why โ one concise line]
|
|
61
|
-
Trade-offs: [what is consciously accepted]
|
|
62
|
-
Next action: [concrete next step for the user]
|
|
63
|
-
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
64
|
-
Pre-Flight: โ
All checks passed
|
|
65
|
-
or โ [blocking item that must be resolved first]
|
|
66
|
-
```
|
|
48
|
+
HEALTHCHECK --interval=30s --timeout=3s --retries=3 \
|
|
49
|
+
CMD wget --quiet --tries=1 --spider http://localhost:3000/health || exit 1
|
|
67
50
|
|
|
51
|
+
CMD ["node", "dist/index.js"]
|
|
52
|
+
```
|
|
68
53
|
|
|
69
|
-
|
|
54
|
+
```dockerfile
|
|
55
|
+
# โ HALLUCINATION TRAP: Common Dockerfile mistakes
|
|
56
|
+
# โ FROM node:22 โ 1GB+ image (use alpine: ~150MB)
|
|
57
|
+
# โ RUN npm install โ installs devDependencies, no lockfile
|
|
58
|
+
# โ
RUN npm ci โ deterministic, production-only
|
|
59
|
+
# โ COPY . . โ copies node_modules, .git, secrets
|
|
60
|
+
# โ
Use .dockerignore โ exclude node_modules, .env, .git
|
|
61
|
+
# โ Running as root โ security vulnerability
|
|
62
|
+
# โ
USER appuser โ non-root user
|
|
63
|
+
```
|
|
70
64
|
|
|
71
|
-
|
|
65
|
+
### .dockerignore
|
|
72
66
|
|
|
73
|
-
|
|
74
|
-
|
|
67
|
+
```
|
|
68
|
+
node_modules
|
|
69
|
+
.git
|
|
70
|
+
.env
|
|
71
|
+
.env.*
|
|
72
|
+
*.md
|
|
73
|
+
.github
|
|
74
|
+
coverage
|
|
75
|
+
dist
|
|
76
|
+
```
|
|
75
77
|
|
|
76
|
-
###
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
### Docker Compose
|
|
79
|
+
|
|
80
|
+
```yaml
|
|
81
|
+
# docker-compose.yml
|
|
82
|
+
services:
|
|
83
|
+
app:
|
|
84
|
+
build:
|
|
85
|
+
context: .
|
|
86
|
+
target: runner
|
|
87
|
+
ports:
|
|
88
|
+
- "3000:3000"
|
|
89
|
+
environment:
|
|
90
|
+
- DATABASE_URL=postgres://postgres:postgres@db:5432/myapp
|
|
91
|
+
- REDIS_URL=redis://redis:6379
|
|
92
|
+
depends_on:
|
|
93
|
+
db:
|
|
94
|
+
condition: service_healthy
|
|
95
|
+
redis:
|
|
96
|
+
condition: service_started
|
|
97
|
+
restart: unless-stopped
|
|
98
|
+
|
|
99
|
+
db:
|
|
100
|
+
image: postgres:16-alpine
|
|
101
|
+
environment:
|
|
102
|
+
POSTGRES_DB: myapp
|
|
103
|
+
POSTGRES_USER: postgres
|
|
104
|
+
POSTGRES_PASSWORD: postgres
|
|
105
|
+
volumes:
|
|
106
|
+
- pgdata:/var/lib/postgresql/data
|
|
107
|
+
healthcheck:
|
|
108
|
+
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
109
|
+
interval: 5s
|
|
110
|
+
timeout: 3s
|
|
111
|
+
retries: 5
|
|
112
|
+
|
|
113
|
+
redis:
|
|
114
|
+
image: redis:7-alpine
|
|
115
|
+
volumes:
|
|
116
|
+
- redisdata:/data
|
|
117
|
+
|
|
118
|
+
volumes:
|
|
119
|
+
pgdata:
|
|
120
|
+
redisdata:
|
|
121
|
+
```
|
|
82
122
|
|
|
83
|
-
|
|
123
|
+
---
|
|
84
124
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
125
|
+
## CI/CD with GitHub Actions
|
|
126
|
+
|
|
127
|
+
### Standard Pipeline
|
|
128
|
+
|
|
129
|
+
```yaml
|
|
130
|
+
# .github/workflows/ci.yml
|
|
131
|
+
name: CI
|
|
132
|
+
|
|
133
|
+
on:
|
|
134
|
+
push:
|
|
135
|
+
branches: [main]
|
|
136
|
+
pull_request:
|
|
137
|
+
branches: [main]
|
|
138
|
+
|
|
139
|
+
concurrency:
|
|
140
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
141
|
+
cancel-in-progress: true # cancel stale runs on same PR
|
|
142
|
+
|
|
143
|
+
jobs:
|
|
144
|
+
lint-and-test:
|
|
145
|
+
runs-on: ubuntu-latest
|
|
146
|
+
steps:
|
|
147
|
+
- uses: actions/checkout@v4
|
|
148
|
+
|
|
149
|
+
- uses: actions/setup-node@v4
|
|
150
|
+
with:
|
|
151
|
+
node-version: 22
|
|
152
|
+
cache: npm
|
|
153
|
+
|
|
154
|
+
- run: npm ci
|
|
155
|
+
- run: npm run lint
|
|
156
|
+
- run: npm run typecheck
|
|
157
|
+
- run: npm run test -- --coverage
|
|
158
|
+
|
|
159
|
+
- uses: actions/upload-artifact@v4
|
|
160
|
+
if: always()
|
|
161
|
+
with:
|
|
162
|
+
name: coverage
|
|
163
|
+
path: coverage/
|
|
164
|
+
|
|
165
|
+
build:
|
|
166
|
+
runs-on: ubuntu-latest
|
|
167
|
+
needs: lint-and-test
|
|
168
|
+
steps:
|
|
169
|
+
- uses: actions/checkout@v4
|
|
170
|
+
- uses: actions/setup-node@v4
|
|
171
|
+
with:
|
|
172
|
+
node-version: 22
|
|
173
|
+
cache: npm
|
|
174
|
+
- run: npm ci
|
|
175
|
+
- run: npm run build
|
|
176
|
+
|
|
177
|
+
deploy:
|
|
178
|
+
runs-on: ubuntu-latest
|
|
179
|
+
needs: build
|
|
180
|
+
if: github.ref == 'refs/heads/main'
|
|
181
|
+
environment: production
|
|
182
|
+
steps:
|
|
183
|
+
- uses: actions/checkout@v4
|
|
184
|
+
|
|
185
|
+
# Deploy to your platform (Vercel, Railway, Fly.io, etc.)
|
|
186
|
+
- run: npx vercel deploy --prod --token=${{ secrets.VERCEL_TOKEN }}
|
|
92
187
|
```
|
|
93
188
|
|
|
189
|
+
### Security Scanning
|
|
190
|
+
|
|
191
|
+
```yaml
|
|
192
|
+
security:
|
|
193
|
+
runs-on: ubuntu-latest
|
|
194
|
+
steps:
|
|
195
|
+
- uses: actions/checkout@v4
|
|
196
|
+
- run: npm audit --audit-level=high
|
|
197
|
+
- uses: github/codeql-action/analyze@v3
|
|
198
|
+
with:
|
|
199
|
+
languages: javascript-typescript
|
|
200
|
+
```
|
|
94
201
|
|
|
95
202
|
---
|
|
96
203
|
|
|
97
|
-
##
|
|
98
|
-
|
|
99
|
-
AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
|
|
204
|
+
## Deployment Strategies
|
|
100
205
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
206
|
+
```
|
|
207
|
+
Rolling Update (default):
|
|
208
|
+
Old โโโโโโโโ โ โโโโโโโโ โ โโโโโโโโ โ โโโโโโโโ
|
|
209
|
+
New โโโโโโโโ โ โโโโโโโโ โ โโโโโโโโ โ โโโโโโโโ
|
|
210
|
+
- Gradual replacement, zero downtime
|
|
211
|
+
- Rollback: redeploy previous version
|
|
212
|
+
|
|
213
|
+
Blue/Green:
|
|
214
|
+
Blue โโโโโโโโ (live) โ โโโโโโโโ (idle)
|
|
215
|
+
Green โโโโโโโโ (staging) โ โโโโโโโโ (live)
|
|
216
|
+
- Instant switch via load balancer
|
|
217
|
+
- Instant rollback (switch back)
|
|
218
|
+
- Requires 2x infrastructure
|
|
219
|
+
|
|
220
|
+
Canary:
|
|
221
|
+
Stable โโโโโโโโ (95%) โ โโโโโโโโ (90%) โ โโโโโโโโ (0%)
|
|
222
|
+
Canary โโโโโโโโ (5%) โ โโโโโโโโ (10%) โ โโโโโโโโ (100%)
|
|
223
|
+
- Gradual traffic shift
|
|
224
|
+
- Monitor error rates/latency at each stage
|
|
225
|
+
- Rollback: stop canary traffic
|
|
226
|
+
|
|
227
|
+
Feature Flags:
|
|
228
|
+
- Deploy code, control activation separately
|
|
229
|
+
- Risk-free deploys โ flag is off by default
|
|
230
|
+
- A/B testing capability
|
|
231
|
+
```
|
|
106
232
|
|
|
107
233
|
---
|
|
108
234
|
|
|
109
|
-
##
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
235
|
+
## Secrets Management
|
|
236
|
+
|
|
237
|
+
```yaml
|
|
238
|
+
# โ NEVER:
|
|
239
|
+
# - Hardcode secrets in code
|
|
240
|
+
# - Commit .env files to git
|
|
241
|
+
# - Use plain text in CI/CD configs
|
|
242
|
+
# - Share secrets via Slack/email
|
|
243
|
+
|
|
244
|
+
# โ
ALWAYS:
|
|
245
|
+
# GitHub Actions: Repository Secrets
|
|
246
|
+
# - Settings โ Secrets โ Actions โ New repository secret
|
|
247
|
+
# - Reference: ${{ secrets.MY_SECRET }}
|
|
248
|
+
|
|
249
|
+
# Production: Use your platform's secret manager
|
|
250
|
+
# - AWS Secrets Manager / SSM Parameter Store
|
|
251
|
+
# - GCP Secret Manager
|
|
252
|
+
# - Azure Key Vault
|
|
253
|
+
# - Doppler / Infisical (cross-platform)
|
|
254
|
+
|
|
255
|
+
# .env management:
|
|
256
|
+
# .env โ git-ignored, local development
|
|
257
|
+
# .env.example โ committed, shows required keys (no values)
|
|
258
|
+
```
|
|
115
259
|
|
|
116
|
-
|
|
117
|
-
2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
|
|
118
|
-
3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
|
|
260
|
+
---
|
|
119
261
|
|
|
120
|
-
|
|
262
|
+
## Production Readiness Checklist
|
|
121
263
|
|
|
122
|
-
Review these questions before confirming output:
|
|
123
264
|
```
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
265
|
+
Pre-Deploy:
|
|
266
|
+
โก All tests passing (unit, integration, E2E)
|
|
267
|
+
โก Security scan clean (npm audit, CodeQL)
|
|
268
|
+
โก Build succeeds in CI (not just locally)
|
|
269
|
+
โก Database migrations tested against production-size data
|
|
270
|
+
โก Environment variables verified in target environment
|
|
271
|
+
โก Rollback plan documented
|
|
272
|
+
|
|
273
|
+
Monitoring:
|
|
274
|
+
โก Health check endpoint (/health)
|
|
275
|
+
โก Structured logging (JSON, not console.log)
|
|
276
|
+
โก Error tracking (Sentry, Datadog)
|
|
277
|
+
โก Uptime monitoring (external)
|
|
278
|
+
โก Alerting configured (PagerDuty, OpsGenie)
|
|
279
|
+
|
|
280
|
+
Performance:
|
|
281
|
+
โก Response time P95 < 500ms
|
|
282
|
+
โก Error rate < 0.1%
|
|
283
|
+
โก Database connection pooling configured
|
|
284
|
+
โก CDN for static assets
|
|
285
|
+
โก Compression enabled (gzip/brotli)
|
|
286
|
+
|
|
287
|
+
Security:
|
|
288
|
+
โก HTTPS only (HSTS enabled)
|
|
289
|
+
โก Rate limiting on all public endpoints
|
|
290
|
+
โก CORS configured (not wildcard *)
|
|
291
|
+
โก Security headers (helmet)
|
|
292
|
+
โก No secrets in code or logs
|
|
128
293
|
```
|
|
129
294
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
133
|
-
- โ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
134
|
-
- โ
**Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
|
|
295
|
+
---
|