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.
Files changed (250) hide show
  1. package/.agent/ARCHITECTURE.md +99 -99
  2. package/.agent/GEMINI.md +52 -52
  3. package/.agent/agents/accessibility-reviewer.md +139 -86
  4. package/.agent/agents/ai-code-reviewer.md +160 -90
  5. package/.agent/agents/backend-specialist.md +164 -127
  6. package/.agent/agents/code-archaeologist.md +115 -73
  7. package/.agent/agents/database-architect.md +130 -110
  8. package/.agent/agents/debugger.md +137 -97
  9. package/.agent/agents/dependency-reviewer.md +78 -30
  10. package/.agent/agents/devops-engineer.md +161 -118
  11. package/.agent/agents/documentation-writer.md +151 -87
  12. package/.agent/agents/explorer-agent.md +117 -99
  13. package/.agent/agents/frontend-reviewer.md +127 -47
  14. package/.agent/agents/frontend-specialist.md +169 -109
  15. package/.agent/agents/game-developer.md +28 -164
  16. package/.agent/agents/logic-reviewer.md +87 -49
  17. package/.agent/agents/mobile-developer.md +151 -103
  18. package/.agent/agents/mobile-reviewer.md +133 -50
  19. package/.agent/agents/orchestrator.md +121 -110
  20. package/.agent/agents/penetration-tester.md +103 -77
  21. package/.agent/agents/performance-optimizer.md +136 -92
  22. package/.agent/agents/performance-reviewer.md +139 -69
  23. package/.agent/agents/product-manager.md +104 -70
  24. package/.agent/agents/product-owner.md +6 -25
  25. package/.agent/agents/project-planner.md +95 -95
  26. package/.agent/agents/qa-automation-engineer.md +174 -87
  27. package/.agent/agents/security-auditor.md +133 -129
  28. package/.agent/agents/seo-specialist.md +160 -99
  29. package/.agent/agents/sql-reviewer.md +132 -44
  30. package/.agent/agents/supervisor-agent.md +137 -109
  31. package/.agent/agents/swarm-worker-contracts.md +17 -17
  32. package/.agent/agents/swarm-worker-registry.md +46 -46
  33. package/.agent/agents/test-coverage-reviewer.md +132 -53
  34. package/.agent/agents/test-engineer.md +0 -21
  35. package/.agent/agents/type-safety-reviewer.md +143 -33
  36. package/.agent/patterns/generator.md +9 -9
  37. package/.agent/patterns/inversion.md +12 -12
  38. package/.agent/patterns/pipeline.md +9 -9
  39. package/.agent/patterns/reviewer.md +13 -13
  40. package/.agent/patterns/tool-wrapper.md +9 -9
  41. package/.agent/rules/GEMINI.md +63 -63
  42. package/.agent/scripts/__pycache__/auto_preview.cpython-311.pyc +0 -0
  43. package/.agent/scripts/__pycache__/bundle_analyzer.cpython-311.pyc +0 -0
  44. package/.agent/scripts/__pycache__/checklist.cpython-311.pyc +0 -0
  45. package/.agent/scripts/__pycache__/dependency_analyzer.cpython-311.pyc +0 -0
  46. package/.agent/scripts/__pycache__/security_scan.cpython-311.pyc +0 -0
  47. package/.agent/scripts/__pycache__/session_manager.cpython-311.pyc +0 -0
  48. package/.agent/scripts/__pycache__/skill_integrator.cpython-311.pyc +0 -0
  49. package/.agent/scripts/__pycache__/swarm_dispatcher.cpython-311.pyc +0 -0
  50. package/.agent/scripts/__pycache__/test_runner.cpython-311.pyc +0 -0
  51. package/.agent/scripts/__pycache__/verify_all.cpython-311.pyc +0 -0
  52. package/.agent/scripts/compress_skills.py +167 -0
  53. package/.agent/scripts/consolidate_skills.py +173 -0
  54. package/.agent/scripts/deep_compress.py +202 -0
  55. package/.agent/scripts/minify_context.py +80 -0
  56. package/.agent/scripts/security_scan.py +1 -1
  57. package/.agent/scripts/strip_tribunal.py +41 -0
  58. package/.agent/skills/agent-organizer/SKILL.md +60 -100
  59. package/.agent/skills/agentic-patterns/SKILL.md +0 -70
  60. package/.agent/skills/ai-prompt-injection-defense/SKILL.md +108 -53
  61. package/.agent/skills/api-patterns/SKILL.md +197 -257
  62. package/.agent/skills/api-security-auditor/SKILL.md +125 -57
  63. package/.agent/skills/app-builder/SKILL.md +326 -50
  64. package/.agent/skills/app-builder/templates/SKILL.md +13 -15
  65. package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +16 -16
  66. package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +22 -22
  67. package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +18 -18
  68. package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +20 -20
  69. package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +17 -17
  70. package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +18 -18
  71. package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +21 -21
  72. package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +19 -19
  73. package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +26 -26
  74. package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +26 -26
  75. package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +19 -19
  76. package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +18 -18
  77. package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +20 -20
  78. package/.agent/skills/appflow-wireframe/SKILL.md +71 -98
  79. package/.agent/skills/architecture/SKILL.md +161 -200
  80. package/.agent/skills/authentication-best-practices/SKILL.md +121 -54
  81. package/.agent/skills/bash-linux/SKILL.md +71 -166
  82. package/.agent/skills/behavioral-modes/SKILL.md +8 -69
  83. package/.agent/skills/brainstorming/SKILL.md +345 -127
  84. package/.agent/skills/building-native-ui/SKILL.md +125 -57
  85. package/.agent/skills/clean-code/SKILL.md +266 -149
  86. package/.agent/skills/code-review-checklist/SKILL.md +0 -62
  87. package/.agent/skills/config-validator/SKILL.md +73 -131
  88. package/.agent/skills/csharp-developer/SKILL.md +434 -73
  89. package/.agent/skills/database-design/SKILL.md +190 -275
  90. package/.agent/skills/deployment-procedures/SKILL.md +81 -158
  91. package/.agent/skills/devops-engineer/SKILL.md +255 -94
  92. package/.agent/skills/devops-incident-responder/SKILL.md +50 -69
  93. package/.agent/skills/doc.md +5 -5
  94. package/.agent/skills/documentation-templates/SKILL.md +19 -63
  95. package/.agent/skills/edge-computing/SKILL.md +75 -165
  96. package/.agent/skills/extract-design-system/SKILL.md +84 -58
  97. package/.agent/skills/framer-motion-expert/SKILL.md +195 -0
  98. package/.agent/skills/frontend-design/SKILL.md +151 -499
  99. package/.agent/skills/game-design-expert/SKILL.md +71 -0
  100. package/.agent/skills/game-engineering-expert/SKILL.md +88 -0
  101. package/.agent/skills/geo-fundamentals/SKILL.md +52 -178
  102. package/.agent/skills/github-operations/SKILL.md +197 -272
  103. package/.agent/skills/gsap-expert/SKILL.md +194 -0
  104. package/.agent/skills/i18n-localization/SKILL.md +60 -172
  105. package/.agent/skills/intelligent-routing/SKILL.md +123 -103
  106. package/.agent/skills/lint-and-validate/SKILL.md +8 -52
  107. package/.agent/skills/llm-engineering/SKILL.md +281 -195
  108. package/.agent/skills/local-first/SKILL.md +76 -159
  109. package/.agent/skills/mcp-builder/SKILL.md +48 -188
  110. package/.agent/skills/mobile-design/SKILL.md +213 -219
  111. package/.agent/skills/motion-engineering/SKILL.md +184 -0
  112. package/.agent/skills/nextjs-react-expert/SKILL.md +184 -203
  113. package/.agent/skills/nodejs-best-practices/SKILL.md +403 -185
  114. package/.agent/skills/observability/SKILL.md +211 -203
  115. package/.agent/skills/parallel-agents/SKILL.md +53 -146
  116. package/.agent/skills/performance-profiling/SKILL.md +171 -151
  117. package/.agent/skills/plan-writing/SKILL.md +49 -153
  118. package/.agent/skills/platform-engineer/SKILL.md +57 -103
  119. package/.agent/skills/playwright-best-practices/SKILL.md +110 -63
  120. package/.agent/skills/powershell-windows/SKILL.md +61 -179
  121. package/.agent/skills/python-patterns/SKILL.md +7 -35
  122. package/.agent/skills/python-pro/SKILL.md +273 -114
  123. package/.agent/skills/react-specialist/SKILL.md +227 -108
  124. package/.agent/skills/readme-builder/SKILL.md +15 -85
  125. package/.agent/skills/realtime-patterns/SKILL.md +216 -243
  126. package/.agent/skills/red-team-tactics/SKILL.md +10 -51
  127. package/.agent/skills/rust-pro/SKILL.md +525 -142
  128. package/.agent/skills/seo-fundamentals/SKILL.md +92 -153
  129. package/.agent/skills/server-management/SKILL.md +110 -166
  130. package/.agent/skills/shadcn-ui-expert/SKILL.md +154 -55
  131. package/.agent/skills/skill-creator/SKILL.md +18 -58
  132. package/.agent/skills/sql-pro/SKILL.md +543 -68
  133. package/.agent/skills/supabase-postgres-best-practices/SKILL.md +28 -68
  134. package/.agent/skills/swiftui-expert/SKILL.md +124 -57
  135. package/.agent/skills/systematic-debugging/SKILL.md +49 -151
  136. package/.agent/skills/tailwind-patterns/SKILL.md +433 -149
  137. package/.agent/skills/tdd-workflow/SKILL.md +63 -169
  138. package/.agent/skills/test-result-analyzer/SKILL.md +33 -73
  139. package/.agent/skills/testing-patterns/SKILL.md +437 -130
  140. package/.agent/skills/trend-researcher/SKILL.md +30 -71
  141. package/.agent/skills/ui-ux-pro-max/SKILL.md +0 -41
  142. package/.agent/skills/ui-ux-researcher/SKILL.md +51 -91
  143. package/.agent/skills/vue-expert/SKILL.md +225 -119
  144. package/.agent/skills/vulnerability-scanner/SKILL.md +264 -226
  145. package/.agent/skills/web-accessibility-auditor/SKILL.md +141 -58
  146. package/.agent/skills/web-design-guidelines/SKILL.md +17 -61
  147. package/.agent/skills/webapp-testing/SKILL.md +71 -196
  148. package/.agent/skills/whimsy-injector/SKILL.md +58 -132
  149. package/.agent/skills/workflow-optimizer/SKILL.md +28 -68
  150. package/.agent/workflows/api-tester.md +96 -224
  151. package/.agent/workflows/audit.md +81 -122
  152. package/.agent/workflows/brainstorm.md +69 -105
  153. package/.agent/workflows/changelog.md +65 -97
  154. package/.agent/workflows/create.md +73 -88
  155. package/.agent/workflows/debug.md +80 -111
  156. package/.agent/workflows/deploy.md +119 -92
  157. package/.agent/workflows/enhance.md +80 -91
  158. package/.agent/workflows/fix.md +68 -97
  159. package/.agent/workflows/generate.md +165 -164
  160. package/.agent/workflows/migrate.md +106 -109
  161. package/.agent/workflows/orchestrate.md +103 -86
  162. package/.agent/workflows/performance-benchmarker.md +77 -268
  163. package/.agent/workflows/plan.md +120 -98
  164. package/.agent/workflows/preview.md +39 -96
  165. package/.agent/workflows/refactor.md +105 -97
  166. package/.agent/workflows/review-ai.md +63 -102
  167. package/.agent/workflows/review.md +71 -110
  168. package/.agent/workflows/session.md +53 -113
  169. package/.agent/workflows/status.md +42 -88
  170. package/.agent/workflows/strengthen-skills.md +90 -51
  171. package/.agent/workflows/swarm.md +114 -129
  172. package/.agent/workflows/test.md +125 -102
  173. package/.agent/workflows/tribunal-backend.md +60 -78
  174. package/.agent/workflows/tribunal-database.md +62 -100
  175. package/.agent/workflows/tribunal-frontend.md +62 -82
  176. package/.agent/workflows/tribunal-full.md +56 -100
  177. package/.agent/workflows/tribunal-mobile.md +65 -94
  178. package/.agent/workflows/tribunal-performance.md +62 -105
  179. package/.agent/workflows/ui-ux-pro-max.md +72 -121
  180. package/README.md +11 -15
  181. package/package.json +1 -1
  182. package/.agent/skills/api-patterns/api-style.md +0 -42
  183. package/.agent/skills/api-patterns/auth.md +0 -24
  184. package/.agent/skills/api-patterns/documentation.md +0 -26
  185. package/.agent/skills/api-patterns/graphql.md +0 -41
  186. package/.agent/skills/api-patterns/rate-limiting.md +0 -31
  187. package/.agent/skills/api-patterns/response.md +0 -37
  188. package/.agent/skills/api-patterns/rest.md +0 -40
  189. package/.agent/skills/api-patterns/security-testing.md +0 -122
  190. package/.agent/skills/api-patterns/trpc.md +0 -41
  191. package/.agent/skills/api-patterns/versioning.md +0 -22
  192. package/.agent/skills/app-builder/agent-coordination.md +0 -71
  193. package/.agent/skills/app-builder/feature-building.md +0 -53
  194. package/.agent/skills/app-builder/project-detection.md +0 -34
  195. package/.agent/skills/app-builder/scaffolding.md +0 -118
  196. package/.agent/skills/app-builder/tech-stack.md +0 -40
  197. package/.agent/skills/architecture/context-discovery.md +0 -43
  198. package/.agent/skills/architecture/examples.md +0 -94
  199. package/.agent/skills/architecture/pattern-selection.md +0 -68
  200. package/.agent/skills/architecture/patterns-reference.md +0 -50
  201. package/.agent/skills/architecture/trade-off-analysis.md +0 -77
  202. package/.agent/skills/brainstorming/dynamic-questioning.md +0 -360
  203. package/.agent/skills/database-design/database-selection.md +0 -43
  204. package/.agent/skills/database-design/indexing.md +0 -39
  205. package/.agent/skills/database-design/migrations.md +0 -48
  206. package/.agent/skills/database-design/optimization.md +0 -36
  207. package/.agent/skills/database-design/orm-selection.md +0 -30
  208. package/.agent/skills/database-design/schema-design.md +0 -56
  209. package/.agent/skills/dotnet-core-expert/SKILL.md +0 -103
  210. package/.agent/skills/framer-motion-animations/SKILL.md +0 -74
  211. package/.agent/skills/frontend-design/animation-guide.md +0 -331
  212. package/.agent/skills/frontend-design/color-system.md +0 -329
  213. package/.agent/skills/frontend-design/decision-trees.md +0 -418
  214. package/.agent/skills/frontend-design/motion-graphics.md +0 -306
  215. package/.agent/skills/frontend-design/typography-system.md +0 -363
  216. package/.agent/skills/frontend-design/ux-psychology.md +0 -1116
  217. package/.agent/skills/frontend-design/visual-effects.md +0 -383
  218. package/.agent/skills/game-development/2d-games/SKILL.md +0 -119
  219. package/.agent/skills/game-development/3d-games/SKILL.md +0 -135
  220. package/.agent/skills/game-development/SKILL.md +0 -236
  221. package/.agent/skills/game-development/game-art/SKILL.md +0 -185
  222. package/.agent/skills/game-development/game-audio/SKILL.md +0 -190
  223. package/.agent/skills/game-development/game-design/SKILL.md +0 -129
  224. package/.agent/skills/game-development/mobile-games/SKILL.md +0 -108
  225. package/.agent/skills/game-development/multiplayer/SKILL.md +0 -132
  226. package/.agent/skills/game-development/pc-games/SKILL.md +0 -144
  227. package/.agent/skills/game-development/vr-ar/SKILL.md +0 -123
  228. package/.agent/skills/game-development/web-games/SKILL.md +0 -150
  229. package/.agent/skills/intelligent-routing/router-manifest.md +0 -65
  230. package/.agent/skills/mobile-design/decision-trees.md +0 -516
  231. package/.agent/skills/mobile-design/mobile-backend.md +0 -491
  232. package/.agent/skills/mobile-design/mobile-color-system.md +0 -420
  233. package/.agent/skills/mobile-design/mobile-debugging.md +0 -122
  234. package/.agent/skills/mobile-design/mobile-design-thinking.md +0 -357
  235. package/.agent/skills/mobile-design/mobile-navigation.md +0 -458
  236. package/.agent/skills/mobile-design/mobile-performance.md +0 -767
  237. package/.agent/skills/mobile-design/mobile-testing.md +0 -356
  238. package/.agent/skills/mobile-design/mobile-typography.md +0 -433
  239. package/.agent/skills/mobile-design/platform-android.md +0 -666
  240. package/.agent/skills/mobile-design/platform-ios.md +0 -561
  241. package/.agent/skills/mobile-design/touch-psychology.md +0 -537
  242. package/.agent/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +0 -312
  243. package/.agent/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +0 -240
  244. package/.agent/skills/nextjs-react-expert/3-server-server-side-performance.md +0 -490
  245. package/.agent/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +0 -264
  246. package/.agent/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +0 -581
  247. package/.agent/skills/nextjs-react-expert/6-rendering-rendering-performance.md +0 -432
  248. package/.agent/skills/nextjs-react-expert/7-js-javascript-performance.md +0 -684
  249. package/.agent/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +0 -150
  250. package/.agent/skills/vulnerability-scanner/checklists.md +0 -121
@@ -1,188 +1,111 @@
1
1
  ---
2
2
  name: deployment-procedures
3
- description: Production deployment principles and decision-making. Safe deployment workflows, rollback strategies, and verification. Teaches thinking, not scripts.
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: 1.0.0
6
- last-updated: 2026-03-12
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 Principles
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
- ## Five Phases of Safe Deployment
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
- **Never:**
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
- ### Phase 3 โ€” Code Deploy
56
-
57
- Deploy with traffic distribution:
58
-
59
- | Strategy | Risk | When to Use |
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
- ## Rollback vs. Roll Forward
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
- | Scenario | Recommendation |
97
- |---|---|
98
- | Bug in new code, no data mutations | Roll back (redeploy previous version) |
99
- | Bug in new code, data already mutated | Roll forward (fix the mutation in a follow-up deploy) |
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
- ## What a Deployment Runbook Contains
116
-
117
- For any significant deployment, document before starting:
118
-
119
- ```
120
- Date/Time:
121
- Engineer:
122
- What is changing:
123
- Why:
124
- Expected behavior:
125
- How to verify:
126
- Rollback plan:
127
- Time to rollback:
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
- ## Output Format
87
+ ## 3. Database Migration Safety Rules
133
88
 
134
- When this skill produces a recommendation or design decision, structure your output as:
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
- ## ๐Ÿค– LLM-Specific Traps
102
+ ## 4. The 5-Minute Rollback Guarantee
152
103
 
153
- AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
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. **Over-engineering:** Proposing complex abstractions or distributed systems when a simpler approach suffices.
156
- 2. **Hallucinated Libraries/Methods:** Using non-existent methods or packages. Always `// VERIFY` or check `package.json` / `requirements.txt`.
157
- 3. **Skipping Edge Cases:** Writing the "happy path" and ignoring error handling, timeouts, or data validation.
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: Senior DevOps engineer with expertise in building scalable, automated infrastructure and deployment pipelines. Your focus spans CI/CD implementation, Infrastructure as Code, container orchestration, and monitoring.
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: 1.0.0
6
- last-updated: 2026-03-12
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
- # Devops Engineer - Claude Code Sub-Agent
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
- ## The DevOps Excellence Checklist
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
- ## Core Architecture Decision Framework
18
+ ```dockerfile
19
+ # โœ… Multi-stage build โ€” minimal final image
20
+ FROM node:22-alpine AS builder
21
+ WORKDIR /app
36
22
 
37
- ### Infrastructure as Code & Orchestration
38
- * **IaC Mastery:** Terraform modules, CloudFormation templates, Ansible playbooks, Pulumi.
39
- * **State & Drift:** Configuration management, Version control, State management, Drift detection.
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
- ### CI/CD Implementation & SecOps
43
- * **CI/CD:** Pipeline design, Build optimization, Quality gates, Artifact management, Rollback procedures.
44
- * **Security Integration:** DevSecOps practices, Vulnerability scanning, Compliance automation, Access management.
27
+ # Build
28
+ COPY . .
29
+ RUN npm run build
45
30
 
46
- ### Cloud Platform Expertise & Performance
47
- * **Cloud Platforms:** AWS, Azure, GCP, Multi-cloud strategies, Cost optimization, Disaster recovery.
48
- * **Performance:** Application profiling, Resource optimization, Load balancing, Auto-scaling.
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
- ## Output Format
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
- When this skill produces a recommendation or design decision, structure your output as:
44
+ USER appuser
45
+ EXPOSE 3000
46
+ ENV NODE_ENV=production
56
47
 
57
- ```
58
- โ”โ”โ” Devops Engineer Recommendation โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
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
- ## ๐Ÿ›๏ธ Tribunal Integration (Anti-Hallucination)
65
+ ### .dockerignore
72
66
 
73
- **Slash command: `/tribunal-backend`** (or invoke directly for devops)
74
- **Active reviewers: `logic` ยท `security` ยท `dependency`**
67
+ ```
68
+ node_modules
69
+ .git
70
+ .env
71
+ .env.*
72
+ *.md
73
+ .github
74
+ coverage
75
+ dist
76
+ ```
75
77
 
76
- ### โŒ Forbidden AI Tropes in DevOps
77
- 1. **Hardcoded Secrets/Credentials** โ€” never generate scripts or IaC configurations with embedded secrets. Always use secret managers (AWS Secrets Manager, Azure Key Vault, HashiCorp Vault) or CI/CD environment variables.
78
- 2. **Missing State Management** โ€” never generate Terraform code without defining a remote state backend.
79
- 3. **Latest Tags in Containers** โ€” never use `FROM image:latest` in Dockerfiles or Kubernetes manifests in production configurations; always pin specific tags or SHAs.
80
- 4. **Permissive IAM Roles** โ€” avoid wildcard `*` permissions in cloud IAM configurations; adhere to least privilege.
81
- 5. **Ignoring Platform Cost** โ€” avoid over-provisioning default resource requests/limits in Kubernetes without proper analysis.
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
- ### โœ… Pre-Flight Self-Audit
123
+ ---
84
124
 
85
- Review these questions before generating DevOps scripts or configurations:
86
- ```text
87
- โœ… Did I strictly avoid hardcoding any sensitive credentials or API keys?
88
- โœ… Are all Docker or container image tags explicitly pinned?
89
- โœ… Does the generated Infrastructure as Code (IaC) include appropriate networking defaults (private subnets, proper firewall rules)?
90
- โœ… Are the Kubernetes manifests configured with resource limits and health probes?
91
- โœ… Has logging and monitoring been wired up for the deployed components?
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
- ## ๐Ÿค– LLM-Specific Traps
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
- 1. **Over-engineering:** Proposing complex abstractions or distributed systems when a simpler approach suffices.
102
- 2. **Hallucinated Libraries/Methods:** Using non-existent methods or packages. Always `// VERIFY` or check `package.json` / `requirements.txt`.
103
- 3. **Skipping Edge Cases:** Writing the "happy path" and ignoring error handling, timeouts, or data validation.
104
- 4. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
105
- 5. **Silent Degradation:** Catching and suppressing errors without logging or re-raising.
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
- ## ๐Ÿ›๏ธ Tribunal Integration (Anti-Hallucination)
110
-
111
- **Slash command: `/review` or `/tribunal-full`**
112
- **Active reviewers: `logic-reviewer` ยท `security-auditor`**
113
-
114
- ### โŒ Forbidden AI Tropes
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
- 1. **Blind Assumptions:** Never make an assumption without documenting it clearly with `// VERIFY: [reason]`.
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
- ### โœ… Pre-Flight Self-Audit
262
+ ## Production Readiness Checklist
121
263
 
122
- Review these questions before confirming output:
123
264
  ```
124
- โœ… Did I rely ONLY on real, verified tools and methods?
125
- โœ… Is this solution appropriately scoped to the user's constraints?
126
- โœ… Did I handle potential failure modes and edge cases?
127
- โœ… Have I avoided generic boilerplate that doesn't add value?
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
- ### ๐Ÿ›‘ Verification-Before-Completion (VBC) Protocol
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
+ ---