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,99 +1,138 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Strengthen skills by appending Tribunal guardrails (LLM Traps, Pre-Flight checklist, VBC Protocol) to any SKILL.md missing them.
|
|
2
|
+
description: Strengthen skills by appending Tribunal guardrails (LLM Traps, Pre-Flight checklist, VBC Protocol) to any SKILL.md missing them. Reads each skill, checks for guardrails, appends if missing, skips if present.
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
# /strengthen-skills
|
|
5
|
+
# /strengthen-skills — Skill Hardening Pipeline
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
the standard Tribunal guardrails block.
|
|
7
|
+
$ARGUMENTS
|
|
9
8
|
|
|
10
9
|
---
|
|
11
10
|
|
|
12
|
-
##
|
|
11
|
+
## When to Use /strengthen-skills
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
|Use `/strengthen-skills` when...||
|
|
14
|
+
|:---|:---|
|
|
15
|
+
|New skills were just created|Append guardrails|
|
|
16
|
+
|Auditing existing skills|Check which are missing guardrails|
|
|
17
|
+
|After adding skills from external sources|Harden before activating|
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Phase 1 — Skill Inventory
|
|
19
22
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
- Forbidden AI Tropes
|
|
24
|
-
- Pre-Flight Self-Audit checklist
|
|
25
|
-
- VBC Protocol
|
|
23
|
+
```bash
|
|
24
|
+
# Find all SKILL.md files
|
|
25
|
+
find .agent/skills/ -name "SKILL.md" | sort
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
# Count total
|
|
28
|
+
find .agent/skills/ -name "SKILL.md" | wc -l
|
|
29
|
+
```
|
|
28
30
|
|
|
29
31
|
---
|
|
30
32
|
|
|
31
|
-
##
|
|
33
|
+
## Phase 2 — Guardrail Check
|
|
32
34
|
|
|
33
|
-
|
|
35
|
+
For each SKILL.md, check if it already has guardrails:
|
|
34
36
|
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
+
```bash
|
|
38
|
+
# Check which skills are MISSING LLM Trap table
|
|
39
|
+
grep -rL "LLM Trap\|LLM Traps\|\*\*Trap\|TRAP TABLE" .agent/skills/*/SKILL.md
|
|
40
|
+
|
|
41
|
+
# Check which skills are MISSING Pre-Flight checklist
|
|
42
|
+
grep -rL "Pre-Flight\|Pre-flight\|Preflight\|Self-Audit" .agent/skills/*/SKILL.md
|
|
43
|
+
|
|
44
|
+
# Check which skills are MISSING VBC Protocol
|
|
45
|
+
grep -rL "VBC\|Verify.*Build.*Confirm\|verify.*build.*confirm" .agent/skills/*/SKILL.md
|
|
37
46
|
```
|
|
38
47
|
|
|
39
|
-
|
|
48
|
+
---
|
|
40
49
|
|
|
41
|
-
|
|
42
|
-
> If unexpected skills are listed, investigate before proceeding.
|
|
50
|
+
## Phase 3 — Append Guardrails (For Missing Skills Only)
|
|
43
51
|
|
|
52
|
+
For each skill missing guardrails, append the three sections:
|
|
53
|
+
|
|
54
|
+
```markdown
|
|
44
55
|
---
|
|
45
56
|
|
|
46
|
-
|
|
57
|
+
## 🚨 LLM Trap Table
|
|
47
58
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
59
|
+
|Pattern|What AI Does Wrong|What Is Actually Correct|
|
|
60
|
+
|:---|:---|:---|
|
|
61
|
+
|[domain-specific trap 1]|[hallucination]|[correct behavior]|
|
|
62
|
+
|[domain-specific trap 2]|[hallucination]|[correct behavior]|
|
|
63
|
+
|[domain-specific trap 3]|[hallucination]|[correct behavior]|
|
|
51
64
|
|
|
52
65
|
---
|
|
53
66
|
|
|
54
|
-
|
|
67
|
+
## ✅ Pre-Flight Self-Audit
|
|
55
68
|
|
|
56
|
-
|
|
69
|
+
Before producing any output, verify:
|
|
57
70
|
```
|
|
58
|
-
✅
|
|
59
|
-
|
|
60
|
-
|
|
71
|
+
✅ Did I read the actual files before making claims about them?
|
|
72
|
+
✅ Did I verify all method names against official documentation?
|
|
73
|
+
✅ Did I add // VERIFY: on any uncertain API calls?
|
|
74
|
+
✅ Are all imports from packages that actually exist in package.json?
|
|
75
|
+
✅ Did I test my logic with edge cases (null, empty, 0, max)?
|
|
76
|
+
✅ Did I avoid generating code for more than one module at a time?
|
|
77
|
+
✅ Am I working from evidence, not assumption?
|
|
61
78
|
```
|
|
62
79
|
|
|
63
|
-
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## 🔁 VBC Protocol (Verify → Build → Confirm)
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
VERIFY: Read the actual codebase before writing anything
|
|
86
|
+
BUILD: Generate the smallest meaningful unit of code
|
|
87
|
+
CONFIRM: Verify the output is correct before presenting
|
|
88
|
+
```
|
|
89
|
+
```
|
|
64
90
|
|
|
65
91
|
---
|
|
66
92
|
|
|
67
|
-
|
|
93
|
+
## Phase 4 — Report
|
|
68
94
|
|
|
69
|
-
|
|
95
|
+
After processing all skills:
|
|
70
96
|
|
|
71
|
-
```powershell
|
|
72
|
-
python .agent/scripts/strengthen_skills.py . --skill <skill-name>
|
|
73
97
|
```
|
|
98
|
+
━━━ Skill Strengthening Report ━━━━━━━━━━━━
|
|
99
|
+
|
|
100
|
+
Total skills found: [N]
|
|
101
|
+
Already have guardrails: [N] (skipped)
|
|
102
|
+
Guardrails added: [N]
|
|
103
|
+
Failed: [N]
|
|
104
|
+
|
|
105
|
+
━━━ Strengthened Skills ━━━━━━━━━━━━━━━━━━
|
|
106
|
+
✅ [skill-name] — LLM Trap + Pre-Flight + VBC added
|
|
74
107
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
108
|
+
━━━ Already Hardened (Skipped) ━━━━━━━━━━━
|
|
109
|
+
⏭️ [skill-name]
|
|
110
|
+
⏭️ [skill-name]
|
|
78
111
|
```
|
|
79
112
|
|
|
80
113
|
---
|
|
81
114
|
|
|
82
|
-
|
|
115
|
+
## Guardrail Quality Guidelines
|
|
83
116
|
|
|
84
|
-
|
|
117
|
+
LLM Trap tables should be domain-specific — not generic:
|
|
85
118
|
|
|
86
|
-
```powershell
|
|
87
|
-
python .agent/scripts/strengthen_skills.py . --skills-path /path/to/skills
|
|
88
119
|
```
|
|
120
|
+
❌ Generic (useless):
|
|
121
|
+
"Don't use wrong method names"
|
|
122
|
+
|
|
123
|
+
✅ Specific (valuable):
|
|
124
|
+
"React 19: useFormState() was renamed to useActionState().
|
|
125
|
+
AI generates old name — import fails at runtime."
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
The Pre-Flight checklist should match the skill's specific domain — add domain-specific checks beyond the universal ones.
|
|
89
129
|
|
|
90
130
|
---
|
|
91
131
|
|
|
92
|
-
##
|
|
132
|
+
## Usage Examples
|
|
93
133
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
| `python .agent/scripts/config_validator.py .` | Validate all agent config consistency |
|
|
134
|
+
```
|
|
135
|
+
/strengthen-skills → Check and harden all skills
|
|
136
|
+
/strengthen-skills nextjs-react-expert → Harden only this skill
|
|
137
|
+
/strengthen-skills --check-only → Audit without modifying
|
|
138
|
+
```
|
|
@@ -1,194 +1,179 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Multi-Agent Swarm Orchestration
|
|
2
|
+
description: Multi-Agent Swarm Orchestration. Supervisor decomposes a complex goal into sub-tasks, dispatches to specialist Workers via structured JSON contracts, collects results via allSettled fan-in, and synthesizes a unified deliverable. Validates payloads via swarm_dispatcher.py before dispatch.
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
# /swarm — Multi-Agent Swarm
|
|
5
|
+
# /swarm — Multi-Agent Swarm Execution
|
|
6
6
|
|
|
7
7
|
$ARGUMENTS
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## When to Use /swarm Over /orchestrate
|
|
12
12
|
|
|
13
|
-
`/swarm`
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
3. **Collects** all results
|
|
20
|
-
4. **Synthesizes** a unified, coherent response
|
|
21
|
-
|
|
22
|
-
Use `/swarm` when your request spans **2+ domains** (e.g., backend API + database schema + docs) or when you want specialist-quality output for each component.
|
|
13
|
+
|Use `/swarm` when...|Use `/orchestrate` when...|
|
|
14
|
+
|:---|:---|
|
|
15
|
+
|5+ workers needed simultaneously|2-4 workers in a review|
|
|
16
|
+
|Tasks are explicitly JSON-contracted|Tasks can be described informally|
|
|
17
|
+
|Supervisor/Worker role separation matters|Simple coordination needed|
|
|
18
|
+
|Wave execution needs session persisting across time|Single-session orchestration|
|
|
23
19
|
|
|
24
20
|
---
|
|
25
21
|
|
|
26
|
-
##
|
|
22
|
+
## Phase 1 — Swarm Initialization
|
|
27
23
|
|
|
28
|
-
|
|
29
|
-
|---|---|
|
|
30
|
-
| Goal spans 2+ specialist domains | Single-domain task → `/generate` |
|
|
31
|
-
| You want parallel specialist output | Simple question → just ask |
|
|
32
|
-
| Task needs backend + DB + docs together | Need a plan only → `/plan` |
|
|
33
|
-
| Complex refactor across multiple files | Debugging one bug → `/debug` |
|
|
34
|
-
| Maximum specialist coverage on large feature | Step-by-step incremental work → `/orchestrate` |
|
|
24
|
+
The Supervisor agent activates and:
|
|
35
25
|
|
|
36
|
-
|
|
26
|
+
1. Reads the goal and identifies all atomic sub-tasks
|
|
27
|
+
2. Validates that sub-tasks don't share output files
|
|
28
|
+
3. Estimates context budget per worker
|
|
29
|
+
4. Writes initial state to task.md
|
|
37
30
|
|
|
38
|
-
|
|
31
|
+
---
|
|
39
32
|
|
|
33
|
+
## Phase 2 — Worker Dispatch Contracts
|
|
34
|
+
|
|
35
|
+
Every worker receives a structured JSON contract (not natural language):
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"task_id": "audit-auth-routes",
|
|
40
|
+
"worker_type": "backend-specialist",
|
|
41
|
+
"scope": "Audit all files in src/app/api/auth/ for security and type safety",
|
|
42
|
+
"files_to_read": [
|
|
43
|
+
"src/app/api/auth/login/route.ts",
|
|
44
|
+
"src/app/api/auth/register/route.ts",
|
|
45
|
+
"src/middleware.ts"
|
|
46
|
+
],
|
|
47
|
+
"files_to_write": [],
|
|
48
|
+
"context_summary": [
|
|
49
|
+
"Next.js 15 App Router project",
|
|
50
|
+
"Auth uses next-auth v5 (auth.ts pattern)",
|
|
51
|
+
"Database: Prisma 6 on PostgreSQL"
|
|
52
|
+
],
|
|
53
|
+
"constraints": [
|
|
54
|
+
"Report findings only — do not modify files",
|
|
55
|
+
"Report BLOCKED if you cannot determine auth pattern from provided files"
|
|
56
|
+
],
|
|
57
|
+
"output_format": {
|
|
58
|
+
"status": "COMPLETE | BLOCKED | ERROR",
|
|
59
|
+
"findings": ["list of specific issues found with file+line references"],
|
|
60
|
+
"summary": "2-3 sentence summary"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
40
63
|
```
|
|
41
|
-
/swarm [your goal]
|
|
42
|
-
│
|
|
43
|
-
▼
|
|
44
|
-
supervisor-agent (triage)
|
|
45
|
-
→ Reads: swarm-worker-registry.md
|
|
46
|
-
→ Validates: swarm-worker-contracts.md
|
|
47
|
-
→ Emits: WorkerRequest JSON (validated) for each sub-task
|
|
48
|
-
│
|
|
49
|
-
├─── Worker 1: [agent-name] ──── WorkerResult 1
|
|
50
|
-
├─── Worker 2: [agent-name] ──── WorkerResult 2
|
|
51
|
-
└─── Worker N: [agent-name] ──── WorkerResult N
|
|
52
|
-
│
|
|
53
|
-
▼
|
|
54
|
-
supervisor-agent (synthesize)
|
|
55
|
-
│
|
|
56
|
-
▼
|
|
57
|
-
━━━ Swarm Complete ━━━
|
|
58
|
-
Human Gate → Y / N / R
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
**Constraints:**
|
|
62
|
-
- Maximum **5 Workers** per swarm invocation
|
|
63
|
-
- Workers are **independent** — no Worker depends on another's pending result
|
|
64
|
-
- Workers that fail are **retried up to 3 times** with targeted feedback
|
|
65
|
-
- Workers that still fail after 3 retries are **escalated** (not silently dropped)
|
|
66
|
-
- Tribunal rules apply **inside each Worker** — no invented libraries, guessed columns, or uncited calls
|
|
67
64
|
|
|
68
65
|
---
|
|
69
66
|
|
|
70
|
-
##
|
|
67
|
+
## Phase 3 — Payload Validation
|
|
71
68
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
**Format:**
|
|
69
|
+
Before dispatching, validate all worker contracts:
|
|
75
70
|
|
|
71
|
+
```bash
|
|
72
|
+
python .agent/scripts/swarm_dispatcher.py --file payload.json
|
|
76
73
|
```
|
|
77
|
-
━━━ Swarm Triage ━━━━━━━━━━━━━━━━━━━━━━━━
|
|
78
74
|
|
|
79
|
-
|
|
75
|
+
If validation passes → dispatch workers in parallel.
|
|
76
|
+
If validation fails → fix payload before dispatch.
|
|
80
77
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
Worker 1
|
|
84
|
-
task_id: [uuid]
|
|
85
|
-
type: [generate_code | research | review_code | write_docs | analyze]
|
|
86
|
-
agent: [agent-name from swarm-worker-registry.md]
|
|
87
|
-
goal: [single-sentence sub-task]
|
|
88
|
-
context: [minimal context — only what this worker needs]
|
|
78
|
+
---
|
|
89
79
|
|
|
90
|
-
|
|
91
|
-
...
|
|
80
|
+
## Phase 4 — Fan-Out Execution
|
|
92
81
|
|
|
93
|
-
|
|
82
|
+
```
|
|
83
|
+
Wave dispatch: POST all contracts simultaneously
|
|
84
|
+
↓
|
|
85
|
+
Wait for completion via allSettled (not Promise.all)
|
|
86
|
+
↓
|
|
87
|
+
Collect ALL results — COMPLETE + BLOCKED + ERROR
|
|
88
|
+
↓
|
|
89
|
+
Fan-In: Supervisor aggregates, resolves conflicts
|
|
90
|
+
↓
|
|
91
|
+
Human Gate before writing anything to disk
|
|
94
92
|
```
|
|
95
93
|
|
|
96
|
-
|
|
94
|
+
**allSettled vs Promise.all:** A single failed worker must NOT cancel all sibling workers. Collect all results, then handle failures.
|
|
97
95
|
|
|
98
96
|
---
|
|
99
97
|
|
|
100
|
-
##
|
|
101
|
-
|
|
102
|
-
Each Worker receives its `WorkerRequest` in **isolation** — no Worker sees another Worker's prompt.
|
|
98
|
+
## Phase 5 — Status Protocol
|
|
103
99
|
|
|
104
|
-
Workers
|
|
100
|
+
Workers report exactly one of three terminal statuses:
|
|
105
101
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
- No guessed database column names
|
|
109
|
-
- `// VERIFY:` tags on any uncertain call
|
|
110
|
-
- Retry limit: 3 per Worker
|
|
102
|
+
```
|
|
103
|
+
COMPLETE: Work done. Include output_format fields.
|
|
111
104
|
|
|
112
|
-
|
|
105
|
+
BLOCKED: Cannot proceed without missing prerequisite.
|
|
106
|
+
blocked_by: [specific missing information]
|
|
107
|
+
unblocked_by: [what must happen first]
|
|
108
|
+
→ Supervisor: provide missing input or escalate to human
|
|
113
109
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
110
|
+
ERROR: Unrecoverable after 3 attempts.
|
|
111
|
+
error: [specific message]
|
|
112
|
+
attempts: 3
|
|
113
|
+
→ Supervisor: report to human with ⚠️ Agent Failure Report
|
|
117
114
|
```
|
|
118
115
|
|
|
119
|
-
A schema validation failure **halts the swarm** — it is not silently ignored.
|
|
120
|
-
|
|
121
116
|
---
|
|
122
117
|
|
|
123
|
-
##
|
|
118
|
+
## Phase 6 — Session Persistence
|
|
124
119
|
|
|
125
|
-
|
|
120
|
+
Supervisor writes task.md after each wave:
|
|
126
121
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
| `status: "success"` | Worker completed | Output included in synthesis |
|
|
130
|
-
| `status: "failure"` | Worker errored | Re-dispatch with failure context (up to 3 retries) |
|
|
131
|
-
| `status: "escalate"` | Worker hit retry limit | Noted as ⚠️ in report, not retried |
|
|
122
|
+
```markdown
|
|
123
|
+
# Swarm Session: [goal-slug]
|
|
132
124
|
|
|
133
|
-
|
|
125
|
+
## Wave 1 — [timestamp]
|
|
126
|
+
- [task-id]: COMPLETE — [2-line summary]
|
|
127
|
+
- [task-id]: BLOCKED — [reason] → redispatched with [context added]
|
|
134
128
|
|
|
135
|
-
##
|
|
129
|
+
## Issues Carrying Forward
|
|
130
|
+
- [cross-task issue affecting Wave 2]
|
|
136
131
|
|
|
132
|
+
## Human Gate Status
|
|
133
|
+
- [ ] Pending review
|
|
137
134
|
```
|
|
138
|
-
━━━ Swarm Complete ━━━━━━━━━━━━━━━━━━━━━━━━
|
|
139
|
-
|
|
140
|
-
Workers dispatched: [N]
|
|
141
|
-
Workers succeeded: [N]
|
|
142
|
-
Workers escalated: [N]
|
|
143
|
-
|
|
144
|
-
━━━ [Worker 1 goal] ━━━━━━━━━━━━━━━━━━━━━━
|
|
145
|
-
|
|
146
|
-
[Worker 1 output — reviewed by Tribunal]
|
|
147
|
-
|
|
148
|
-
━━━ [Worker 2 goal] ━━━━━━━━━━━━━━━━━━━━━━
|
|
149
135
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
━━━ Escalations ━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
153
|
-
|
|
154
|
-
⚠️ [task_id] — [agent] — [reason for escalation after 3 retries]
|
|
136
|
+
---
|
|
155
137
|
|
|
156
|
-
|
|
138
|
+
## Phase 7 — Human Gate
|
|
157
139
|
|
|
158
|
-
Write to disk? Y = approve | N = discard | R = revise with feedback
|
|
159
140
|
```
|
|
141
|
+
━━━ Swarm Complete ━━━━━━━━━━━━━━━━━━━━━░░░
|
|
160
142
|
|
|
161
|
-
|
|
143
|
+
Workers: [N dispatched / N complete / N blocked / N error]
|
|
162
144
|
|
|
163
|
-
|
|
145
|
+
━━━ Synthesized Results ━━━━━━━━━━━━━━━━━━
|
|
146
|
+
[Findings by severity — critical → high → medium → low]
|
|
164
147
|
|
|
165
|
-
|
|
148
|
+
━━━ Files to Write ━━━━━━━━━━━━━━━━━━━━━━
|
|
149
|
+
[List all files with change summaries]
|
|
166
150
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
- `swarm_dispatcher.py` exits `1` on any schema violation — swarm halted, not silently degraded
|
|
171
|
-
- Synthesis only combines verified Worker outputs — the Supervisor does not add new logic during synthesis
|
|
151
|
+
━━━ Human Gate ━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
152
|
+
Approve? Y = write to disk | N = discard | R = revise
|
|
153
|
+
```
|
|
172
154
|
|
|
173
155
|
---
|
|
174
156
|
|
|
175
|
-
##
|
|
157
|
+
## Failure Report Format
|
|
176
158
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
159
|
+
```
|
|
160
|
+
⚠️ Agent Failure Report
|
|
161
|
+
━━━━━━━━━━━━━━━━━━━━━
|
|
162
|
+
Agent: backend-specialist (Worker A)
|
|
163
|
+
Task: audit-auth-routes
|
|
164
|
+
Attempts: 3 of 3
|
|
165
|
+
Last Error: Could not resolve auth.ts import path — tsconfig paths not in scope
|
|
166
|
+
Context: Files provided: src/app/api/auth/*.ts — missing: tsconfig.json
|
|
167
|
+
Suggestion: Include tsconfig.json in files_to_read for next dispatch
|
|
168
|
+
```
|
|
183
169
|
|
|
184
170
|
---
|
|
185
171
|
|
|
186
172
|
## Usage Examples
|
|
187
173
|
|
|
188
174
|
```
|
|
189
|
-
/swarm
|
|
190
|
-
/swarm analyze
|
|
191
|
-
/swarm
|
|
192
|
-
/swarm
|
|
193
|
-
/swarm generate a full feature: file upload API + storage service + frontend uploader + tests
|
|
175
|
+
/swarm comprehensive pre-launch audit: security + tests + performance + accessibility
|
|
176
|
+
/swarm analyze all API routes for OWASP vulnerabilities simultaneously
|
|
177
|
+
/swarm generate full test suite for auth, checkout, and user management
|
|
178
|
+
/swarm review and optimize all N+1 query patterns across the codebase
|
|
194
179
|
```
|