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,98 +1,79 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: devops-incident-responder
|
|
3
|
-
description:
|
|
3
|
+
description: Production incident response mastery. MTTR (Mean Time to Recovery) reduction, blameless post-mortems, rapid triaging, halting systemic cascading failures, isolating problematic deployments, and evidence-based forensic analysis. Use when stabilizing broken systems, fighting active production fires, or conducting root-cause post-mortems.
|
|
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
|
-
#
|
|
11
|
-
|
|
12
|
-
You are a senior DevOps incident responder with expertise in managing critical production incidents, performing rapid diagnostics, and implementing permanent fixes. Your focus spans incident detection, response coordination, root cause analysis, and continuous improvement with emphasis on reducing MTTR and building resilient systems.
|
|
13
|
-
|
|
14
|
-
## Configuration & Context Assessment
|
|
15
|
-
When invoked:
|
|
16
|
-
1. Query context manager for system architecture and incident history
|
|
17
|
-
2. Review monitoring setup, alerting rules, and response procedures
|
|
18
|
-
3. Analyze incident patterns, response times, and resolution effectiveness
|
|
19
|
-
4. Implement solutions improving detection, response, and prevention
|
|
10
|
+
# Incident Responder — Production Stabilization Mastery
|
|
20
11
|
|
|
21
12
|
---
|
|
22
13
|
|
|
23
|
-
## The
|
|
24
|
-
- MTTD < 5 minutes achieved
|
|
25
|
-
- MTTA < 5 minutes maintained
|
|
26
|
-
- MTTR < 30 minutes sustained
|
|
27
|
-
- Postmortem within 48 hours completed
|
|
28
|
-
- Action items tracked systematically
|
|
29
|
-
- Runbook coverage > 80% verified
|
|
30
|
-
- On-call rotation automated fully
|
|
31
|
-
- Learning culture established
|
|
14
|
+
## 1. The Prime Directive (Stop the Bleeding)
|
|
32
15
|
|
|
33
|
-
|
|
16
|
+
When an outage is declared (e.g., 502 Bad Gateway across the entire primary cluster), do not ask the developer to check the database logs to figure out why the code crashed.
|
|
34
17
|
|
|
35
|
-
|
|
18
|
+
**Immediate Action Pipeline:**
|
|
19
|
+
1. **Identify the Trigger:** What changed in the last 15 minutes? (90% of outages are caused by deployments).
|
|
20
|
+
2. **Revert the Change:** Execute the emergency rollback pipeline instantly. Revert the Git commit, swap the Docker tag, or disable the Feature Flag.
|
|
21
|
+
3. **Verify Stabilization:** Ensure metrics return to healthy thresholds.
|
|
22
|
+
4. **Communicate:** "Mitigation complete. Services restored. Root cause investigation underway."
|
|
36
23
|
|
|
37
|
-
|
|
38
|
-
* **Monitoring Strategy:** Alert configuration, Anomaly detection, Synthetic monitoring.
|
|
39
|
-
* **Rapid Triage:** Impact assessment, Service dependencies, Performance metrics, Log analysis, Distributed tracing.
|
|
40
|
-
* **Tooling Mastery:** APM platforms, Log aggregators, Metric systems, Alert managers.
|
|
24
|
+
---
|
|
41
25
|
|
|
42
|
-
|
|
43
|
-
* **Coordination:** Incident commander, Stakeholder updates, War room setup, External communication.
|
|
44
|
-
* **Emergency Procedures:** Rollback strategies, Circuit breakers, Traffic rerouting, Database failover, Emergency scaling.
|
|
45
|
-
* **Chaos Engineering:** Failure injection, Game day exercises, Blast radius control.
|
|
26
|
+
## 2. Isolating Cascading Failures
|
|
46
27
|
|
|
47
|
-
|
|
48
|
-
* **Root Cause:** Timeline construction, Five whys analysis, Correlation analysis, Reproduction attempts.
|
|
49
|
-
* **Postmortem Process:** Blameless culture, Timeline creation, Action item definition, Process improvement.
|
|
50
|
-
* **Automation Development:** Auto-remediation scripts, Recovery triggers, Validation scripts.
|
|
28
|
+
A cascading failure occurs when Service A dies, causing Service B to overload with retries, which kills Service B, which kills the database.
|
|
51
29
|
|
|
52
|
-
|
|
30
|
+
**The Circuit Breaker Protocol:**
|
|
31
|
+
If a downstream dependency is dead, sever it immediately to save the rest of the ecosystem.
|
|
53
32
|
|
|
54
|
-
|
|
33
|
+
```javascript
|
|
34
|
+
// ❌ VULNERABLE: Infinite Retry Death Spiral
|
|
35
|
+
async function fetchUser(id) {
|
|
36
|
+
while(true) {
|
|
37
|
+
try { return await api.get(`/user/${id}`); }
|
|
38
|
+
catch { await sleep(100); } // Hundreds of containers doing this will execute a DDoSing attack on the API
|
|
39
|
+
}
|
|
40
|
+
}
|
|
55
41
|
|
|
56
|
-
|
|
42
|
+
// ✅ RESILIENT: Circuit Breaking / Fallbacks
|
|
43
|
+
const breaker = new CircuitBreaker(fetchUser, {
|
|
44
|
+
errorThresholdPercentage: 50, // If 50% of requests fail...
|
|
45
|
+
resetTimeout: 30000 // Open the circuit (stop sending requests) for 30s
|
|
46
|
+
});
|
|
57
47
|
|
|
58
|
-
|
|
59
|
-
━━━ Devops Incident Responder Output ━━━━━━━━━━━━━━━━━━━━━━━━
|
|
60
|
-
Task: [what was performed]
|
|
61
|
-
Result: [outcome summary — one line]
|
|
62
|
-
─────────────────────────────────────────────────
|
|
63
|
-
Checks: ✅ [N passed] · ⚠️ [N warnings] · ❌ [N blocked]
|
|
64
|
-
VBC status: PENDING → VERIFIED
|
|
65
|
-
Evidence: [link to terminal output, test result, or file diff]
|
|
48
|
+
breaker.fallback(() => ({ id: "cached-user", status: "degraded" }));
|
|
66
49
|
```
|
|
67
50
|
|
|
51
|
+
**Heavy Mitigation Tactics:**
|
|
52
|
+
- **Shed Load:** Aggressively drop non-critical traffic (e.g., disable background syncs, temporarily ban aggressive scraping IPs).
|
|
53
|
+
- **Scale Out (Band-Aid):** If the memory leak is crashing nodes every 10 minutes, scale the nodes up 3x to buy yourself 30 minutes of runway to find the actual bug.
|
|
68
54
|
|
|
69
55
|
---
|
|
70
56
|
|
|
71
|
-
##
|
|
57
|
+
## 3. The Investigative Triage Routine
|
|
72
58
|
|
|
73
|
-
|
|
74
|
-
**Active reviewers: `logic` · `security`**
|
|
59
|
+
Once the bleeding is stopped (or if you are investigating a non-fatal anomaly), follow the data strictly:
|
|
75
60
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
3. **Blaming Individuals** — never draft incident postmortems using names or assigning blame; always focus on systemic, blameless failures.
|
|
80
|
-
4. **Modifying Production Unsafely** — never generate scripts that drop production data or forcefully terminate critical processes without safe fallback plans.
|
|
81
|
-
5. **Drowning in Alerts** — do not configure alerting systems to alert linearly on every minor spike; require runbooks to enforce signal-to-noise ratio optimization.
|
|
61
|
+
1. **Metrics (The "What"):** Look at the Dashboards. Did latency spike? Did CPU pin at 100%? Did Database active connections max out?
|
|
62
|
+
2. **Traces (The "Where"):** Look at OpenTelemetry/Datadog traces. Which specific microservice is the bottleneck?
|
|
63
|
+
3. **Logs (The "Why"):** Query the centralized logs (Splunk/Elastic/CloudWatch) exactly around the timestamp the trace spiked.
|
|
82
64
|
|
|
83
|
-
|
|
65
|
+
---
|
|
84
66
|
|
|
85
|
-
|
|
86
|
-
```text
|
|
87
|
-
✅ Did I include a clear mitigation strategy to quickly restore service before deep-diving the root cause?
|
|
88
|
-
✅ Are specific metrics and logs identified to validate the issue?
|
|
89
|
-
✅ Does the postmortem outline actionable, systemic fixes rather than human-error conclusions?
|
|
90
|
-
✅ Is the response script/automation safe, including a rollback mechanism?
|
|
91
|
-
✅ Are all communication steps mapped clearly across engineering and stakeholder channels?
|
|
92
|
-
```
|
|
67
|
+
## 4. The Blameless Post-Mortem
|
|
93
68
|
|
|
94
|
-
|
|
69
|
+
Incident response does not end when the system recovers. It ends when the system is architected to survive the same failure tomorrow automatically.
|
|
95
70
|
|
|
96
|
-
**
|
|
97
|
-
|
|
98
|
-
|
|
71
|
+
**A Professional Post-Mortem Must Include:**
|
|
72
|
+
1. **The Timeline:** Chronological factual representation of the event to the minute.
|
|
73
|
+
2. **Root Cause Analysis (The 5 Whys):**
|
|
74
|
+
- *Why did the site go down?* DB exhausted connections.
|
|
75
|
+
- *Why did it exhaust?* The new background worker didn't pool connections.
|
|
76
|
+
- *Why did the worker deploy?* It bypassed CI tests for speed.
|
|
77
|
+
3. **Action Items:** Tangible Jira tickets preventing recurrence (e.g., "Implement PgBouncer connection limits", "Enforce CI checks block on all branches").
|
|
78
|
+
|
|
79
|
+
---
|
package/.agent/skills/doc.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Antigravity Skills
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Guide to creating and using Skills in the Antigravity Kit**
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -16,9 +16,9 @@ While Antigravity's base models (like Gemini) are powerful generalists, they don
|
|
|
16
16
|
|
|
17
17
|
Skills are folder-based packages. You can define these scopes based on your needs:
|
|
18
18
|
|
|
19
|
-
|
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
|Scope|Path|Description|
|
|
20
|
+
|-------------|---------------------------------|------------------------------------|
|
|
21
|
+
|**Workspace**|`<workspace-root>/.agent/skills/`|Available only in a specific project|
|
|
22
22
|
|
|
23
23
|
### Skill Directory Structure
|
|
24
24
|
|
|
@@ -68,7 +68,7 @@ When reviewing code, follow these steps:
|
|
|
68
68
|
- Suggest alternatives when possible
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
**Note**: The `SKILL.md` file contains metadata (name, description) at the top, followed by the instructions. The agent will only read the metadata and load the full instructions only when needed.
|
|
72
72
|
|
|
73
73
|
### Try it out
|
|
74
74
|
|
|
@@ -9,20 +9,17 @@ applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
|
9
9
|
|
|
10
10
|
# Documentation Standards
|
|
11
11
|
|
|
12
|
-
> Documentation is a product. It has users. Those users are often future-you,
|
|
13
|
-
> three months from now, having completely forgotten how this works.
|
|
14
|
-
|
|
15
12
|
---
|
|
16
13
|
|
|
17
14
|
## Documentation Types and Their Audiences
|
|
18
15
|
|
|
19
|
-
|
|
|
16
|
+
|Type|Audience|Goal|
|
|
20
17
|
|---|---|---|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
|
|
|
18
|
+
|README|New developer joining the project|"Get me running in 10 minutes"|
|
|
19
|
+
|API docs|External integrator or frontend dev|"Tell me exactly what I can call and what I'll get back"|
|
|
20
|
+
|Architecture decision (ADR)|Future engineer inheriting the codebase|"Tell me why it works this way, not just how"|
|
|
21
|
+
|Code comment|Reviewer, maintainer|"Explain the non-obvious; skip the obvious"|
|
|
22
|
+
|Runbook|On-call engineer at 2am|"Tell me what to do, not what to think about"|
|
|
26
23
|
|
|
27
24
|
---
|
|
28
25
|
|
|
@@ -31,13 +28,13 @@ applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
|
31
28
|
The Tribunal Agent Kit supports 5 standard Agent Design Kit (ADK) base patterns.
|
|
32
29
|
To build a skill using a robust, tested agent behavior model, add `pattern: [pattern-name]` to the YAML frontmatter of your `SKILL.md`.
|
|
33
30
|
|
|
34
|
-
|
|
|
31
|
+
|Pattern|Value|When to use|
|
|
35
32
|
|---|---|---|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
|**Inversion**|`pattern: inversion`|Forces the agent to interview the user (Socratic Gate) before acting.|
|
|
34
|
+
|**Reviewer**|`pattern: reviewer`|Evaluates artifacts against a checklist and severity levels.|
|
|
35
|
+
|**Tool Wrapper**|`pattern: tool-wrapper`|Strictly executes external CLI tools via provided documentation without guessing.|
|
|
36
|
+
|**Generator**|`pattern: generator`|Produces structured output (docs, boilerplate) by filling a rigid template.|
|
|
37
|
+
|**Pipeline**|`pattern: pipeline`|Executes sequential tasks with strict halting gates between steps.|
|
|
41
38
|
|
|
42
39
|
*Templates defining the specific rules for these patterns live in `.agent/patterns/`.*
|
|
43
40
|
|
|
@@ -79,10 +76,10 @@ src/
|
|
|
79
76
|
|
|
80
77
|
## Environment Variables
|
|
81
78
|
|
|
82
|
-
|
|
|
79
|
+
|Variable|Required|Description|
|
|
83
80
|
|---|---|---|
|
|
84
|
-
|
|
|
85
|
-
|
|
|
81
|
+
|DATABASE_URL|Yes|PostgreSQL connection string|
|
|
82
|
+
|JWT_SECRET|Yes|Secret for signing JWTs|
|
|
86
83
|
|
|
87
84
|
## Running Tests
|
|
88
85
|
|
|
@@ -118,11 +115,11 @@ Creates a new user account.
|
|
|
118
115
|
|
|
119
116
|
**Responses**
|
|
120
117
|
|
|
121
|
-
|
|
|
118
|
+
|Status|Meaning|Body|
|
|
122
119
|
|---|---|---|
|
|
123
|
-
|
|
|
124
|
-
|
|
|
125
|
-
|
|
|
120
|
+
|201|User created|`{ data: User }`|
|
|
121
|
+
|400|Validation failed|`{ error: string, details: string[] }`|
|
|
122
|
+
|409|Email already exists|`{ error: string }`|
|
|
126
123
|
|
|
127
124
|
**Example**
|
|
128
125
|
\`\`\`bash
|
|
@@ -221,45 +218,4 @@ VBC status: PENDING → VERIFIED
|
|
|
221
218
|
Evidence: [link to terminal output, test result, or file diff]
|
|
222
219
|
```
|
|
223
220
|
|
|
224
|
-
|
|
225
|
-
|
|
226
221
|
---
|
|
227
|
-
|
|
228
|
-
## 🤖 LLM-Specific Traps
|
|
229
|
-
|
|
230
|
-
AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
|
|
231
|
-
|
|
232
|
-
1. **Over-engineering:** Proposing complex abstractions or distributed systems when a simpler approach suffices.
|
|
233
|
-
2. **Hallucinated Libraries/Methods:** Using non-existent methods or packages. Always `// VERIFY` or check `package.json` / `requirements.txt`.
|
|
234
|
-
3. **Skipping Edge Cases:** Writing the "happy path" and ignoring error handling, timeouts, or data validation.
|
|
235
|
-
4. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
|
|
236
|
-
5. **Silent Degradation:** Catching and suppressing errors without logging or re-raising.
|
|
237
|
-
|
|
238
|
-
---
|
|
239
|
-
|
|
240
|
-
## 🏛️ Tribunal Integration (Anti-Hallucination)
|
|
241
|
-
|
|
242
|
-
**Slash command: `/review` or `/tribunal-full`**
|
|
243
|
-
**Active reviewers: `logic-reviewer` · `security-auditor`**
|
|
244
|
-
|
|
245
|
-
### ❌ Forbidden AI Tropes
|
|
246
|
-
|
|
247
|
-
1. **Blind Assumptions:** Never make an assumption without documenting it clearly with `// VERIFY: [reason]`.
|
|
248
|
-
2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
|
|
249
|
-
3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
|
|
250
|
-
|
|
251
|
-
### ✅ Pre-Flight Self-Audit
|
|
252
|
-
|
|
253
|
-
Review these questions before confirming output:
|
|
254
|
-
```
|
|
255
|
-
✅ Did I rely ONLY on real, verified tools and methods?
|
|
256
|
-
✅ Is this solution appropriately scoped to the user's constraints?
|
|
257
|
-
✅ Did I handle potential failure modes and edge cases?
|
|
258
|
-
✅ Have I avoided generic boilerplate that doesn't add value?
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
### 🛑 Verification-Before-Completion (VBC) Protocol
|
|
262
|
-
|
|
263
|
-
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
264
|
-
- ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
265
|
-
- ✅ **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,213 +1,123 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: edge-computing
|
|
3
|
-
description: Edge
|
|
3
|
+
description: Edge computing mastery. Cloudflare Workers, Vercel Edge Functions, Durable Objects, edge-compatible data patterns, cold start elimination, caching policies (Stale-While-Revalidate), and global data locality. Use when designing globally distributed, extreme low-latency applications architectures.
|
|
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
|
-
# Edge Computing
|
|
11
|
-
|
|
12
|
-
> Edge is not "just serverless but faster."
|
|
13
|
-
> It's a fundamentally different execution model with different constraints.
|
|
10
|
+
# Edge Computing — Global Latency Mastery
|
|
14
11
|
|
|
15
12
|
---
|
|
16
13
|
|
|
17
|
-
## Edge
|
|
18
|
-
|
|
19
|
-
Before choosing edge, understand what you're getting and what you're giving up:
|
|
20
|
-
|
|
21
|
-
| Property | Traditional Server | Serverless (Lambda) | Edge (Workers) |
|
|
22
|
-
|---|---|---|---|
|
|
23
|
-
| Cold start | None | 100ms–2s | < 5ms (V8 isolates) |
|
|
24
|
-
| Runtime | Full Node.js | Full Node.js | ⚠️ Subset of Web APIs only |
|
|
25
|
-
| Latency to user | One region | One region | < 30ms globally |
|
|
26
|
-
| Max CPU time | Unlimited | 15 min | 30ms–1s per request |
|
|
27
|
-
| `fs` module | ✅ | ✅ | ❌ No filesystem |
|
|
28
|
-
| `child_process` | ✅ | ✅ | ❌ No subprocess |
|
|
29
|
-
| Memory | GB+ | 128MB–3GB | 128MB |
|
|
30
|
-
| Persistent state | DB + disk | DB only | Durable Objects / KV |
|
|
31
|
-
| Cost model | Fixed | Per invocation | Per invocation (cheaper) |
|
|
32
|
-
|
|
33
|
-
**Rule: Choose edge when latency is the primary constraint and you can work within its API restrictions.**
|
|
34
|
-
|
|
35
|
-
---
|
|
14
|
+
## 1. The Edge Model (V8 Isolates vs Node.js)
|
|
36
15
|
|
|
37
|
-
|
|
16
|
+
Edge functions (Cloudflare Workers, Vercel Edge) run on V8 Isolates, NOT standard Node.js environments.
|
|
38
17
|
|
|
39
|
-
|
|
18
|
+
**What This Means:**
|
|
19
|
+
1. Extremely fast cold starts (< 5ms) because there is no underlying OS process bootup.
|
|
20
|
+
2. Hard memory/time limits per request (e.g., 50ms CPU time max).
|
|
21
|
+
3. **NO NATIVE NODE MODULES.** You cannot use `fs`, `child_process`, or heavy native C++ binaries (e.g., standard `bcrypt`, `sharp`).
|
|
40
22
|
|
|
41
|
-
```
|
|
42
|
-
// ❌
|
|
43
|
-
import fs from
|
|
44
|
-
import
|
|
45
|
-
import { exec } from 'child_process'; // No subprocess
|
|
46
|
-
import path from 'path'; // No path module
|
|
47
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url)); // No __dirname
|
|
23
|
+
```typescript
|
|
24
|
+
// ❌ BAD: Attempting to use Node native core modules
|
|
25
|
+
import fs from "fs";
|
|
26
|
+
import bcrypt from "bcrypt"; // Has C++ bindings, will instantly crash on V8 edge
|
|
48
27
|
|
|
49
|
-
// ✅
|
|
50
|
-
const
|
|
51
|
-
const response = await fetch('https://api.example.com/data');
|
|
52
|
-
const encoded = btoa(jsonString);
|
|
53
|
-
const parsed = JSON.parse(body);
|
|
28
|
+
// ✅ GOOD: Utilizing standard Web APIs (Fetch, CryptoKey)
|
|
29
|
+
const hashBuffer = await crypto.subtle.digest('SHA-256', new TextEncoder().encode(password));
|
|
54
30
|
```
|
|
55
31
|
|
|
56
32
|
---
|
|
57
33
|
|
|
58
|
-
##
|
|
34
|
+
## 2. Advanced Route Caching (Stale-While-Revalidate)
|
|
59
35
|
|
|
60
|
-
|
|
36
|
+
The highest value proposition of the edge is intercepting requests *before* they cross the ocean.
|
|
61
37
|
|
|
62
|
-
```
|
|
63
|
-
//
|
|
64
|
-
|
|
38
|
+
```typescript
|
|
39
|
+
// Standard Edge Proxy request handling
|
|
40
|
+
export default {
|
|
41
|
+
async fetch(request, env, ctx) {
|
|
42
|
+
const url = new URL(request.url);
|
|
65
43
|
|
|
66
|
-
|
|
44
|
+
// 1. Cache API responses at the edge
|
|
45
|
+
const cache = caches.default;
|
|
46
|
+
let response = await cache.match(request);
|
|
67
47
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
return c.json({ message: 'Hello from the edge' });
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
export default app;
|
|
75
|
-
```
|
|
48
|
+
if (!response) {
|
|
49
|
+
// 2. Fetch Origin (The real server in Virginia)
|
|
50
|
+
response = await fetch(request);
|
|
76
51
|
|
|
77
|
-
|
|
52
|
+
// 3. Mutate Headers for SWR (Stale-While-Revalidate)
|
|
53
|
+
// Instructs the Edge CDN: Serve the stale version instantly to the user,
|
|
54
|
+
// but fire an async request in the background to update the cache for the next user.
|
|
55
|
+
response = new Response(response.body, response);
|
|
56
|
+
response.headers.set('Cache-Control', 's-maxage=60, stale-while-revalidate=86400');
|
|
78
57
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
```ts
|
|
82
|
-
// Durable Object — each instance is a unique stateful actor
|
|
83
|
-
export class RoomState {
|
|
84
|
-
private state: DurableObjectState;
|
|
85
|
-
private users = new Set<WebSocket>();
|
|
86
|
-
|
|
87
|
-
constructor(state: DurableObjectState) {
|
|
88
|
-
this.state = state;
|
|
89
|
-
// Restore state across hibernation
|
|
90
|
-
this.state.getWebSockets().forEach(ws => this.users.add(ws));
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
async fetch(request: Request): Promise<Response> {
|
|
94
|
-
if (request.headers.get('Upgrade') === 'websocket') {
|
|
95
|
-
const [client, server] = Object.values(new WebSocketPair());
|
|
96
|
-
this.state.acceptWebSocket(server);
|
|
97
|
-
this.users.add(server);
|
|
98
|
-
return new Response(null, { status: 101, webSocket: client });
|
|
58
|
+
// 4. Store in Cache asynchronously (do not block the user response)
|
|
59
|
+
ctx.waitUntil(cache.put(request, response.clone()));
|
|
99
60
|
}
|
|
100
|
-
|
|
61
|
+
|
|
62
|
+
return response;
|
|
101
63
|
}
|
|
102
|
-
}
|
|
64
|
+
};
|
|
103
65
|
```
|
|
104
66
|
|
|
105
67
|
---
|
|
106
68
|
|
|
107
|
-
## Edge
|
|
69
|
+
## 3. Edge Data Locality (The Database Problem)
|
|
108
70
|
|
|
109
|
-
|
|
71
|
+
Running logic globally while querying a monolithic database in `us-east-1` is counter-productive. The latency of establishing a connection across the Atlantic will negate any Edge benefits.
|
|
110
72
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
| Blob / files | Cloudflare R2, S3 (via HTTP) | Local disk |
|
|
116
|
-
| Session / cache | Cloudflare KV | In-memory (dies per request) |
|
|
117
|
-
| Vector search | Vectorize (Cloudflare), Pinecone HTTP | pgvector (TCP) |
|
|
73
|
+
### Solutions:
|
|
74
|
+
1. **Edge KV Stores**: (Cloudflare KV, Vercel KV) Eventually consistent, highly localized read-latency configs suitable for configuration routing, user sessions, or feature flags.
|
|
75
|
+
2. **Distributed SQLite**: (Cloudflare D1, Turso) Replicas distributed to edge nodes automatically.
|
|
76
|
+
3. **Connection Pooling**: Use an HTTP/Connection Pool proxy strictly (e.g., Prisma Accelerate, Supabase Edge Pooler). You cannot establish TCP `pg://` connections directly from millions of spinning V8 isolates, you will OOM crash the database.
|
|
118
77
|
|
|
119
|
-
```
|
|
120
|
-
// ✅ Turso
|
|
121
|
-
import { createClient } from
|
|
78
|
+
```typescript
|
|
79
|
+
// ✅ Turso / LibSQL (Distributed Edge DB) usage:
|
|
80
|
+
import { createClient } from "@libsql/client/web";
|
|
122
81
|
|
|
123
|
-
const
|
|
82
|
+
const client = createClient({
|
|
124
83
|
url: env.TURSO_DATABASE_URL,
|
|
125
84
|
authToken: env.TURSO_AUTH_TOKEN,
|
|
126
85
|
});
|
|
127
86
|
|
|
128
|
-
const
|
|
87
|
+
const result = await client.execute("SELECT * FROM users WHERE id = ?", [userId]);
|
|
129
88
|
```
|
|
130
89
|
|
|
131
90
|
---
|
|
132
91
|
|
|
133
|
-
##
|
|
92
|
+
## 4. WebSockets at the Edge (Durable Objects)
|
|
134
93
|
|
|
135
|
-
|
|
94
|
+
Standard Edge functions are stateless. To hold persistent state (like a live multiplayer gaming room, or a chat room's WebSocket connections across multiple users), you must funnel those connections into a single point of state: a Durable Object.
|
|
136
95
|
|
|
137
|
-
```
|
|
138
|
-
//
|
|
139
|
-
|
|
140
|
-
|
|
96
|
+
```typescript
|
|
97
|
+
// A Durable Object serves as a single source of truth that users globally connect into
|
|
98
|
+
export class ChatRoom {
|
|
99
|
+
constructor(state, env) {
|
|
100
|
+
this.state = state;
|
|
101
|
+
this.sessions = [];
|
|
102
|
+
}
|
|
141
103
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
104
|
+
async fetch(request) {
|
|
105
|
+
// Upgrade standard HTTP to WebSocket
|
|
106
|
+
const pair = new WebSocketPair();
|
|
107
|
+
|
|
108
|
+
// Accept connection, store it globally
|
|
109
|
+
this.sessions.push(pair.server);
|
|
110
|
+
pair.server.accept();
|
|
111
|
+
|
|
112
|
+
// Handle incoming Chat messages
|
|
113
|
+
pair.server.addEventListener("message", msg => {
|
|
114
|
+
// Broadcast to all other connected edge users
|
|
115
|
+
this.sessions.forEach(session => session.send(msg.data));
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
return new Response(null, { status: 101, webSocket: pair.client });
|
|
119
|
+
}
|
|
147
120
|
}
|
|
148
121
|
```
|
|
149
122
|
|
|
150
123
|
---
|
|
151
|
-
|
|
152
|
-
## Data Locality & GDPR Compliance
|
|
153
|
-
|
|
154
|
-
```
|
|
155
|
-
Problem: User in Germany hits edge node in Singapore → data can't leave EU.
|
|
156
|
-
|
|
157
|
-
Solution: Cloudflare Smart Placement + regional routing
|
|
158
|
-
|
|
159
|
-
// wrangler.toml — restrict processing to EU jurisdiction
|
|
160
|
-
[placement]
|
|
161
|
-
mode = "smart"
|
|
162
|
-
|
|
163
|
-
// Or explicit routing: route EU traffic to EU DOs only
|
|
164
|
-
const id = env.ROOM.idFromName(`eu:${roomId}`);
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
---
|
|
168
|
-
|
|
169
|
-
## Output Format
|
|
170
|
-
|
|
171
|
-
When this skill produces or reviews code, structure your output as follows:
|
|
172
|
-
|
|
173
|
-
```
|
|
174
|
-
━━━ Edge Computing Report ━━━━━━━━━━━━━━━━━━━━━━━━
|
|
175
|
-
Skill: Edge Computing
|
|
176
|
-
Language: [detected language / framework]
|
|
177
|
-
Scope: [N files · N functions]
|
|
178
|
-
─────────────────────────────────────────────────
|
|
179
|
-
✅ Passed: [checks that passed, or "All clean"]
|
|
180
|
-
⚠️ Warnings: [non-blocking issues, or "None"]
|
|
181
|
-
❌ Blocked: [blocking issues requiring fix, or "None"]
|
|
182
|
-
─────────────────────────────────────────────────
|
|
183
|
-
VBC status: PENDING → VERIFIED
|
|
184
|
-
Evidence: [test output / lint pass / compile success]
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
**VBC (Verification-Before-Completion) is mandatory.**
|
|
188
|
-
Do not mark status as VERIFIED until concrete terminal evidence is provided.
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
---
|
|
192
|
-
|
|
193
|
-
## 🏛️ Tribunal Integration (Anti-Hallucination)
|
|
194
|
-
|
|
195
|
-
**Slash command: `/tribunal-backend`**
|
|
196
|
-
**Active reviewers: `logic` · `security` · `dependency`**
|
|
197
|
-
|
|
198
|
-
### ❌ Forbidden AI Tropes in Edge Computing
|
|
199
|
-
|
|
200
|
-
1. **Importing Node.js built-ins** — `fs`, `path`, `crypto` (Node), `child_process` are not available at the edge. The edge runtime is Web Platform APIs only.
|
|
201
|
-
2. **`process.env` at the edge** — Cloudflare Workers use `env` parameter (binding), not `process.env`. Wrangler `vars` are accessed via `c.env.VAR_NAME`.
|
|
202
|
-
3. **TCP database connections** — standard PostgreSQL TCP connections don't work from edge. Use HTTP-based drivers (Neon serverless, Turso libSQL, PlanetScale HTTP).
|
|
203
|
-
4. **Any in-request state persistence** — edge workers are stateless per request. Use Durable Objects for state, KV for cache.
|
|
204
|
-
|
|
205
|
-
### ✅ Pre-Flight Self-Audit
|
|
206
|
-
|
|
207
|
-
```
|
|
208
|
-
✅ Does this code use only Web Platform APIs (fetch, crypto.subtle, btoa, etc.)?
|
|
209
|
-
✅ Are all database connections via HTTP drivers, not TCP (no pg.Pool at the edge)?
|
|
210
|
-
✅ Are environment variables accessed via the env binding, not process.env?
|
|
211
|
-
✅ Is any stateful data stored in KV or Durable Objects, not in-memory variables?
|
|
212
|
-
✅ Are heavy module imports lazy-loaded to avoid unnecessary cold start delays?
|
|
213
|
-
```
|