tribunal-kit 1.0.0 → 2.4.2
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/.shared/ui-ux-pro-max/README.md +3 -3
- package/.agent/ARCHITECTURE.md +205 -10
- package/.agent/GEMINI.md +37 -7
- package/.agent/agents/accessibility-reviewer.md +134 -0
- package/.agent/agents/ai-code-reviewer.md +129 -0
- package/.agent/agents/frontend-specialist.md +3 -0
- package/.agent/agents/game-developer.md +21 -21
- package/.agent/agents/logic-reviewer.md +12 -0
- package/.agent/agents/mobile-reviewer.md +79 -0
- package/.agent/agents/orchestrator.md +56 -26
- package/.agent/agents/performance-reviewer.md +36 -0
- package/.agent/agents/supervisor-agent.md +156 -0
- package/.agent/agents/swarm-worker-contracts.md +166 -0
- package/.agent/agents/swarm-worker-registry.md +92 -0
- package/.agent/rules/GEMINI.md +134 -5
- package/.agent/scripts/bundle_analyzer.py +259 -0
- package/.agent/scripts/dependency_analyzer.py +247 -0
- package/.agent/scripts/lint_runner.py +188 -0
- package/.agent/scripts/patch_skills_meta.py +177 -0
- package/.agent/scripts/patch_skills_output.py +285 -0
- package/.agent/scripts/schema_validator.py +279 -0
- package/.agent/scripts/security_scan.py +224 -0
- package/.agent/scripts/session_manager.py +144 -3
- package/.agent/scripts/skill_integrator.py +234 -0
- package/.agent/scripts/strengthen_skills.py +220 -0
- package/.agent/scripts/swarm_dispatcher.py +317 -0
- package/.agent/scripts/test_runner.py +192 -0
- package/.agent/scripts/test_swarm_dispatcher.py +163 -0
- package/.agent/skills/agent-organizer/SKILL.md +132 -0
- package/.agent/skills/agentic-patterns/SKILL.md +335 -0
- package/.agent/skills/api-patterns/SKILL.md +226 -50
- package/.agent/skills/app-builder/SKILL.md +215 -52
- package/.agent/skills/architecture/SKILL.md +176 -31
- package/.agent/skills/bash-linux/SKILL.md +150 -134
- package/.agent/skills/behavioral-modes/SKILL.md +152 -160
- package/.agent/skills/brainstorming/SKILL.md +148 -101
- package/.agent/skills/brainstorming/dynamic-questioning.md +10 -0
- package/.agent/skills/clean-code/SKILL.md +139 -134
- package/.agent/skills/code-review-checklist/SKILL.md +177 -80
- package/.agent/skills/config-validator/SKILL.md +165 -0
- package/.agent/skills/csharp-developer/SKILL.md +107 -0
- package/.agent/skills/database-design/SKILL.md +252 -29
- package/.agent/skills/deployment-procedures/SKILL.md +122 -175
- package/.agent/skills/devops-engineer/SKILL.md +134 -0
- package/.agent/skills/devops-incident-responder/SKILL.md +98 -0
- package/.agent/skills/documentation-templates/SKILL.md +175 -121
- package/.agent/skills/dotnet-core-expert/SKILL.md +103 -0
- package/.agent/skills/edge-computing/SKILL.md +213 -0
- package/.agent/skills/frontend-design/SKILL.md +76 -0
- package/.agent/skills/frontend-design/color-system.md +18 -0
- package/.agent/skills/frontend-design/typography-system.md +18 -0
- package/.agent/skills/game-development/SKILL.md +69 -0
- package/.agent/skills/geo-fundamentals/SKILL.md +158 -99
- package/.agent/skills/github-operations/SKILL.md +354 -0
- package/.agent/skills/i18n-localization/SKILL.md +158 -96
- package/.agent/skills/intelligent-routing/SKILL.md +89 -285
- package/.agent/skills/intelligent-routing/router-manifest.md +65 -0
- package/.agent/skills/lint-and-validate/SKILL.md +229 -27
- package/.agent/skills/llm-engineering/SKILL.md +258 -0
- package/.agent/skills/local-first/SKILL.md +203 -0
- package/.agent/skills/mcp-builder/SKILL.md +159 -111
- package/.agent/skills/mobile-design/SKILL.md +102 -282
- package/.agent/skills/nextjs-react-expert/SKILL.md +143 -227
- package/.agent/skills/nodejs-best-practices/SKILL.md +201 -254
- package/.agent/skills/observability/SKILL.md +285 -0
- package/.agent/skills/parallel-agents/SKILL.md +124 -118
- package/.agent/skills/performance-profiling/SKILL.md +143 -89
- package/.agent/skills/plan-writing/SKILL.md +133 -97
- package/.agent/skills/platform-engineer/SKILL.md +135 -0
- package/.agent/skills/powershell-windows/SKILL.md +167 -104
- package/.agent/skills/python-patterns/SKILL.md +149 -361
- package/.agent/skills/python-pro/SKILL.md +114 -0
- package/.agent/skills/react-specialist/SKILL.md +107 -0
- package/.agent/skills/readme-builder/SKILL.md +270 -0
- package/.agent/skills/realtime-patterns/SKILL.md +296 -0
- package/.agent/skills/red-team-tactics/SKILL.md +136 -134
- package/.agent/skills/rust-pro/SKILL.md +237 -173
- package/.agent/skills/seo-fundamentals/SKILL.md +134 -82
- package/.agent/skills/server-management/SKILL.md +155 -104
- package/.agent/skills/sql-pro/SKILL.md +104 -0
- package/.agent/skills/systematic-debugging/SKILL.md +156 -79
- package/.agent/skills/tailwind-patterns/SKILL.md +163 -205
- package/.agent/skills/tdd-workflow/SKILL.md +148 -88
- package/.agent/skills/test-result-analyzer/SKILL.md +299 -0
- package/.agent/skills/testing-patterns/SKILL.md +141 -114
- package/.agent/skills/trend-researcher/SKILL.md +228 -0
- package/.agent/skills/ui-ux-pro-max/SKILL.md +107 -0
- package/.agent/skills/ui-ux-researcher/SKILL.md +234 -0
- package/.agent/skills/vue-expert/SKILL.md +118 -0
- package/.agent/skills/vulnerability-scanner/SKILL.md +228 -188
- package/.agent/skills/web-design-guidelines/SKILL.md +148 -33
- package/.agent/skills/webapp-testing/SKILL.md +171 -122
- package/.agent/skills/whimsy-injector/SKILL.md +349 -0
- package/.agent/skills/workflow-optimizer/SKILL.md +219 -0
- package/.agent/workflows/api-tester.md +279 -0
- package/.agent/workflows/audit.md +168 -0
- package/.agent/workflows/brainstorm.md +65 -19
- package/.agent/workflows/changelog.md +144 -0
- package/.agent/workflows/create.md +67 -14
- package/.agent/workflows/debug.md +122 -30
- package/.agent/workflows/deploy.md +82 -31
- package/.agent/workflows/enhance.md +59 -27
- package/.agent/workflows/fix.md +143 -0
- package/.agent/workflows/generate.md +84 -20
- package/.agent/workflows/migrate.md +163 -0
- package/.agent/workflows/orchestrate.md +66 -17
- package/.agent/workflows/performance-benchmarker.md +305 -0
- package/.agent/workflows/plan.md +76 -33
- package/.agent/workflows/preview.md +73 -17
- package/.agent/workflows/refactor.md +153 -0
- package/.agent/workflows/review-ai.md +140 -0
- package/.agent/workflows/review.md +83 -16
- package/.agent/workflows/session.md +154 -0
- package/.agent/workflows/status.md +74 -18
- package/.agent/workflows/strengthen-skills.md +99 -0
- package/.agent/workflows/swarm.md +194 -0
- package/.agent/workflows/test.md +80 -31
- package/.agent/workflows/tribunal-backend.md +55 -13
- package/.agent/workflows/tribunal-database.md +62 -18
- package/.agent/workflows/tribunal-frontend.md +58 -12
- package/.agent/workflows/tribunal-full.md +70 -11
- package/.agent/workflows/tribunal-mobile.md +123 -0
- package/.agent/workflows/tribunal-performance.md +152 -0
- package/.agent/workflows/ui-ux-pro-max.md +100 -82
- package/README.md +117 -62
- package/bin/tribunal-kit.js +542 -288
- package/package.json +10 -6
|
@@ -1,129 +1,181 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: seo-fundamentals
|
|
3
3
|
description: SEO fundamentals, E-E-A-T, Core Web Vitals, and Google algorithm principles.
|
|
4
|
-
allowed-tools: Read, Glob, Grep
|
|
4
|
+
allowed-tools: Read, Write, Edit, Glob, Grep
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
last-updated: 2026-03-12
|
|
7
|
+
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
5
8
|
---
|
|
6
9
|
|
|
7
10
|
# SEO Fundamentals
|
|
8
11
|
|
|
9
|
-
>
|
|
12
|
+
> SEO is not a trick. It is the practice of making content genuinely useful
|
|
13
|
+
> for the people searching for it, and technically accessible to the crawlers that index it.
|
|
10
14
|
|
|
11
15
|
---
|
|
12
16
|
|
|
13
|
-
##
|
|
17
|
+
## What Search Engines Actually Rank
|
|
14
18
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
Google's stated ranking factors, simplified:
|
|
20
|
+
|
|
21
|
+
1. **Relevance** — does the content match the search intent?
|
|
22
|
+
2. **Quality** — is it accurate, original, and valuable?
|
|
23
|
+
3. **Authority** — do other credible sources link to it?
|
|
24
|
+
4. **Experience** — is the page fast and easy to use?
|
|
25
|
+
|
|
26
|
+
The manipulation era is over. Keyword stuffing gets pages penalized. Thin AI-generated content is actively filtered. The only reliable long-term SEO is making something worth ranking.
|
|
21
27
|
|
|
22
28
|
---
|
|
23
29
|
|
|
24
|
-
##
|
|
30
|
+
## E-E-A-T Framework
|
|
31
|
+
|
|
32
|
+
Google evaluates content on Experience, Expertise, Authoritativeness, and Trustworthiness.
|
|
25
33
|
|
|
26
|
-
|
|
|
27
|
-
|
|
28
|
-
|
|
|
29
|
-
|
|
|
30
|
-
|
|
|
34
|
+
| Signal | What It Means | How to Demonstrate |
|
|
35
|
+
|---|---|---|
|
|
36
|
+
| Experience | First-hand use of the topic | Case studies, screenshots, real examples |
|
|
37
|
+
| Expertise | Deep knowledge of the domain | Accurate detail, citations, author credentials |
|
|
38
|
+
| Authoritativeness | Recognized by others in the field | External links, mentions, speaking/publishing |
|
|
39
|
+
| Trustworthiness | Safe and reliable site | HTTPS, privacy policy, correct contact info |
|
|
40
|
+
|
|
41
|
+
E-E-A-T matters most for YMYL content (health, finance, legal, safety).
|
|
31
42
|
|
|
32
43
|
---
|
|
33
44
|
|
|
34
|
-
##
|
|
45
|
+
## Technical SEO Checklist
|
|
35
46
|
|
|
36
|
-
###
|
|
47
|
+
### Page-Level Requirements
|
|
37
48
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
| robots.txt | Control access |
|
|
42
|
-
| Canonical tags | Prevent duplicates |
|
|
43
|
-
| HTTPS | Security signal |
|
|
49
|
+
```html
|
|
50
|
+
<!-- Title: 50–60 chars, includes primary keyword -->
|
|
51
|
+
<title>Tribunal Agent Kit — Anti-Hallucination AI Tools</title>
|
|
44
52
|
|
|
45
|
-
|
|
53
|
+
<!-- Description: 120–160 chars, actionable, includes keyword -->
|
|
54
|
+
<meta name="description" content="Install the Tribunal Kit with npx tribunal-kit init.
|
|
55
|
+
27 specialist agents and 17 slash commands for Cursor, Windsurf, and Antigravity.">
|
|
46
56
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
| Page speed | Core Web Vital |
|
|
50
|
-
| Mobile-friendly | Ranking factor |
|
|
51
|
-
| Clean URLs | Crawlability |
|
|
57
|
+
<!-- One H1 per page — matches the title intent -->
|
|
58
|
+
<h1>Anti-Hallucination Agent Kit for AI IDEs</h1>
|
|
52
59
|
|
|
53
|
-
|
|
60
|
+
<!-- Canonical — prevent duplicate content -->
|
|
61
|
+
<link rel="canonical" href="https://yoursite.com/page">
|
|
54
62
|
|
|
55
|
-
|
|
63
|
+
<!-- Open Graph (social sharing) -->
|
|
64
|
+
<meta property="og:title" content="...">
|
|
65
|
+
<meta property="og:description" content="...">
|
|
66
|
+
<meta property="og:image" content="https://yoursite.com/og-image.jpg">
|
|
67
|
+
```
|
|
56
68
|
|
|
57
|
-
###
|
|
69
|
+
### Core Web Vitals (2025 Targets)
|
|
58
70
|
|
|
59
|
-
|
|
|
60
|
-
|
|
61
|
-
|
|
|
62
|
-
|
|
|
63
|
-
|
|
|
64
|
-
| H2-H6 | Logical hierarchy |
|
|
65
|
-
| Alt text | Descriptive, not stuffed |
|
|
71
|
+
| Metric | Good | Needs Work | Poor |
|
|
72
|
+
|---|---|---|---|
|
|
73
|
+
| LCP (Largest Contentful Paint) | < 2.5s | 2.5–4s | > 4s |
|
|
74
|
+
| INP (Interaction to Next Paint) | < 200ms | 200–500ms | > 500ms |
|
|
75
|
+
| CLS (Cumulative Layout Shift) | < 0.1 | 0.1–0.25 | > 0.25 |
|
|
66
76
|
|
|
67
|
-
|
|
77
|
+
**Most common LCP fix:** The hero image or heading is the LCP element. Preload it:
|
|
78
|
+
```html
|
|
79
|
+
<link rel="preload" href="/hero.webp" as="image" fetchpriority="high">
|
|
80
|
+
```
|
|
68
81
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
| Uniqueness | Original value |
|
|
74
|
-
| Readability | Clear writing |
|
|
82
|
+
**Most common CLS fix:** Images without explicit width/height cause layout shifts:
|
|
83
|
+
```html
|
|
84
|
+
<img src="..." width="800" height="450" alt="...">
|
|
85
|
+
```
|
|
75
86
|
|
|
76
87
|
---
|
|
77
88
|
|
|
78
|
-
##
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
+
## Content Structure
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
Page structure that works:
|
|
93
|
+
H1: Primary topic (one per page)
|
|
94
|
+
H2: Major sections
|
|
95
|
+
H3: Subsections
|
|
96
|
+
|
|
97
|
+
Content patterns that help:
|
|
98
|
+
- Answer the question in the first paragraph
|
|
99
|
+
- Use tables and lists for comparative or step-by-step info
|
|
100
|
+
- Add FAQ sections for long-tail queries
|
|
101
|
+
- Internal links to related content
|
|
102
|
+
- External links to authoritative sources
|
|
103
|
+
```
|
|
89
104
|
|
|
90
105
|
---
|
|
91
106
|
|
|
92
|
-
##
|
|
107
|
+
## What Not to Do
|
|
108
|
+
|
|
109
|
+
- **Keyword stuffing** — unreadable text written for bots; penalized
|
|
110
|
+
- **Thin content** — pages with nothing to say; filtered
|
|
111
|
+
- **Duplicate content** — same content on multiple URLs without canonical; splits authority
|
|
112
|
+
- **Hidden text** — same color as background, `display:none` with keywords; penalized
|
|
113
|
+
- **Link schemes** — buying links; can result in manual penalty
|
|
93
114
|
|
|
94
|
-
|
|
115
|
+
---
|
|
95
116
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
|
99
|
-
|
|
100
|
-
|
|
|
101
|
-
| Follow E-E-A-T | Keyword stuffing |
|
|
117
|
+
## Scripts
|
|
118
|
+
|
|
119
|
+
| Script | Purpose | Run With |
|
|
120
|
+
|---|---|---|
|
|
121
|
+
| `scripts/seo_checker.py` | Audits page-level technical SEO | `python scripts/seo_checker.py <url>` |
|
|
102
122
|
|
|
103
123
|
---
|
|
104
124
|
|
|
105
|
-
##
|
|
125
|
+
## Output Format
|
|
126
|
+
|
|
127
|
+
When this skill produces a recommendation or design decision, structure your output as:
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
━━━ Seo Fundamentals Recommendation ━━━━━━━━━━━━━━━━
|
|
131
|
+
Decision: [what was chosen / proposed]
|
|
132
|
+
Rationale: [why — one concise line]
|
|
133
|
+
Trade-offs: [what is consciously accepted]
|
|
134
|
+
Next action: [concrete next step for the user]
|
|
135
|
+
─────────────────────────────────────────────────
|
|
136
|
+
Pre-Flight: ✅ All checks passed
|
|
137
|
+
or ❌ [blocking item that must be resolved first]
|
|
138
|
+
```
|
|
139
|
+
|
|
106
140
|
|
|
107
|
-
| Priority | Factor |
|
|
108
|
-
|----------|--------|
|
|
109
|
-
| 1 | Quality, relevant content |
|
|
110
|
-
| 2 | Backlinks from authority sites |
|
|
111
|
-
| 3 | Page experience (Core Web Vitals) |
|
|
112
|
-
| 4 | Mobile optimization |
|
|
113
|
-
| 5 | Technical SEO fundamentals |
|
|
114
141
|
|
|
115
142
|
---
|
|
116
143
|
|
|
117
|
-
##
|
|
144
|
+
## 🤖 LLM-Specific Traps
|
|
145
|
+
|
|
146
|
+
AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
|
|
118
147
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
| Indexing | Search Console |
|
|
125
|
-
| Backlinks | Ahrefs, Semrush |
|
|
148
|
+
1. **Over-engineering:** Proposing complex abstractions or distributed systems when a simpler approach suffices.
|
|
149
|
+
2. **Hallucinated Libraries/Methods:** Using non-existent methods or packages. Always `// VERIFY` or check `package.json` / `requirements.txt`.
|
|
150
|
+
3. **Skipping Edge Cases:** Writing the "happy path" and ignoring error handling, timeouts, or data validation.
|
|
151
|
+
4. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
|
|
152
|
+
5. **Silent Degradation:** Catching and suppressing errors without logging or re-raising.
|
|
126
153
|
|
|
127
154
|
---
|
|
128
155
|
|
|
129
|
-
|
|
156
|
+
## 🏛️ Tribunal Integration (Anti-Hallucination)
|
|
157
|
+
|
|
158
|
+
**Slash command: `/review` or `/tribunal-full`**
|
|
159
|
+
**Active reviewers: `logic-reviewer` · `security-auditor`**
|
|
160
|
+
|
|
161
|
+
### ❌ Forbidden AI Tropes
|
|
162
|
+
|
|
163
|
+
1. **Blind Assumptions:** Never make an assumption without documenting it clearly with `// VERIFY: [reason]`.
|
|
164
|
+
2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
|
|
165
|
+
3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
|
|
166
|
+
|
|
167
|
+
### ✅ Pre-Flight Self-Audit
|
|
168
|
+
|
|
169
|
+
Review these questions before confirming output:
|
|
170
|
+
```
|
|
171
|
+
✅ Did I rely ONLY on real, verified tools and methods?
|
|
172
|
+
✅ Is this solution appropriately scoped to the user's constraints?
|
|
173
|
+
✅ Did I handle potential failure modes and edge cases?
|
|
174
|
+
✅ Have I avoided generic boilerplate that doesn't add value?
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### 🛑 Verification-Before-Completion (VBC) Protocol
|
|
178
|
+
|
|
179
|
+
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
180
|
+
- ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
181
|
+
- ✅ **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,161 +1,212 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: server-management
|
|
3
3
|
description: Server management principles and decision-making. Process management, monitoring strategy, and scaling decisions. Teaches thinking, not commands.
|
|
4
|
-
allowed-tools: Read, Write, Edit, Glob, Grep
|
|
4
|
+
allowed-tools: Read, Write, Edit, Glob, Grep
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
last-updated: 2026-03-12
|
|
7
|
+
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
5
8
|
---
|
|
6
9
|
|
|
7
|
-
# Server Management
|
|
10
|
+
# Server Management Principles
|
|
8
11
|
|
|
9
|
-
>
|
|
10
|
-
>
|
|
12
|
+
> A server you can't observe is a server you can't operate.
|
|
13
|
+
> Monitoring is not optional — it is how you find out about problems before your users do.
|
|
11
14
|
|
|
12
15
|
---
|
|
13
16
|
|
|
14
|
-
##
|
|
17
|
+
## Process Management
|
|
15
18
|
|
|
16
|
-
|
|
19
|
+
Never run Node.js or Python processes directly in production with `node app.js`. Use a process manager.
|
|
17
20
|
|
|
18
|
-
|
|
|
19
|
-
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
21
|
+
| Tool | Best For | Why |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| PM2 | Single-server Node.js | Auto-restart, log rotation, cluster mode |
|
|
24
|
+
| systemd | Linux servers, any language | Native to most Linux distros, reliable |
|
|
25
|
+
| Supervisor | Python, Ruby, any language | Simple config, battle-tested |
|
|
26
|
+
| Docker (+restart policy) | Containerized apps | Portable, consistent across environments |
|
|
24
27
|
|
|
25
|
-
|
|
28
|
+
**Core requirement:** If the process crashes, it restarts automatically. If it can't restart, you are alerted.
|
|
26
29
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
```bash
|
|
31
|
+
# PM2 example — stays running, auto-restarts, survives reboots
|
|
32
|
+
pm2 start app.js --name "api" --instances max
|
|
33
|
+
pm2 save
|
|
34
|
+
pm2 startup # generates the command to run at boot
|
|
35
|
+
```
|
|
33
36
|
|
|
34
37
|
---
|
|
35
38
|
|
|
36
|
-
##
|
|
39
|
+
## What to Monitor
|
|
37
40
|
|
|
38
|
-
|
|
41
|
+
The minimum viable monitoring stack:
|
|
39
42
|
|
|
40
|
-
|
|
|
41
|
-
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
|
|
|
43
|
+
| Signal | What To Alert On |
|
|
44
|
+
|---|---|
|
|
45
|
+
| Process health | Process is not running |
|
|
46
|
+
| Response time | P95 latency > SLA threshold |
|
|
47
|
+
| Error rate | Error rate > 2x baseline |
|
|
48
|
+
| Disk usage | > 80% full |
|
|
49
|
+
| Memory | Growing without bound (memory leak) |
|
|
50
|
+
| CPU | Sustained > 80% for more than 5 minutes |
|
|
46
51
|
|
|
47
|
-
|
|
52
|
+
**Alert on symptoms, not just causes.** "Error rate spiked" is a better alert than "CPU is high" — users don't feel CPU, they feel slow responses and errors.
|
|
48
53
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Log Management
|
|
57
|
+
|
|
58
|
+
Logs are useless without structure. Structured logs can be queried and aggregated.
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
// ❌ Unstructured — hard to query
|
|
62
|
+
console.log(`User ${userId} failed to login at ${new Date()}`);
|
|
63
|
+
|
|
64
|
+
// ✅ Structured — can be filtered, aggregated, alerted on
|
|
65
|
+
logger.warn('login_failed', {
|
|
66
|
+
userId,
|
|
67
|
+
ip: req.ip,
|
|
68
|
+
reason: 'invalid_password',
|
|
69
|
+
timestamp: new Date().toISOString(),
|
|
70
|
+
});
|
|
71
|
+
```
|
|
54
72
|
|
|
55
|
-
|
|
73
|
+
**Log levels, used correctly:**
|
|
74
|
+
- `ERROR` — something failed that requires attention
|
|
75
|
+
- `WARN` — something unexpected but non-fatal happened
|
|
76
|
+
- `INFO` — key business events (user registered, payment processed)
|
|
77
|
+
- `DEBUG` — useful for troubleshooting, never on in production by default
|
|
56
78
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
| Error tracking | Sentry |
|
|
62
|
-
| Uptime | UptimeRobot, Pingdom |
|
|
79
|
+
**Never log:**
|
|
80
|
+
- Passwords, tokens, or full credit card numbers
|
|
81
|
+
- PII without a documented retention policy
|
|
82
|
+
- Full request bodies on auth endpoints
|
|
63
83
|
|
|
64
84
|
---
|
|
65
85
|
|
|
66
|
-
##
|
|
86
|
+
## Scaling Decision Framework
|
|
67
87
|
|
|
68
|
-
|
|
88
|
+
Before scaling, answer:
|
|
69
89
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
| **Access logs** | Traffic analysis |
|
|
74
|
-
| **Error logs** | Issue detection |
|
|
90
|
+
**Is the bottleneck identified?**
|
|
91
|
+
- Profile first. Is it CPU, memory, database, or network?
|
|
92
|
+
- Scaling horizontally when the bottleneck is a single database query helps nothing.
|
|
75
93
|
|
|
76
|
-
|
|
94
|
+
| Bottleneck | Scaling Approach |
|
|
95
|
+
|---|---|
|
|
96
|
+
| CPU-bound app logic | Horizontal scale (more instances) |
|
|
97
|
+
| Memory limit | Vertical scale (more RAM per instance) |
|
|
98
|
+
| I/O-bound (DB, external calls) | Connection pooling, caching, async patterns |
|
|
99
|
+
| Database reads | Read replicas, query optimization, caching |
|
|
100
|
+
| Database writes | Sharding, write queuing, schema redesign |
|
|
77
101
|
|
|
78
|
-
|
|
79
|
-
2. **Structured logging** (JSON) for parsing
|
|
80
|
-
3. **Appropriate levels** (error/warn/info/debug)
|
|
81
|
-
4. **No sensitive data** in logs
|
|
102
|
+
**Cached responses don't need scaling.** Add caching before adding instances.
|
|
82
103
|
|
|
83
104
|
---
|
|
84
105
|
|
|
85
|
-
##
|
|
106
|
+
## Nginx Configuration Essentials
|
|
107
|
+
|
|
108
|
+
```nginx
|
|
109
|
+
server {
|
|
110
|
+
listen 80;
|
|
111
|
+
server_name example.com;
|
|
112
|
+
|
|
113
|
+
# Redirect HTTP → HTTPS
|
|
114
|
+
return 301 https://$host$request_uri;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
server {
|
|
118
|
+
listen 443 ssl;
|
|
119
|
+
server_name example.com;
|
|
120
|
+
|
|
121
|
+
# Security headers
|
|
122
|
+
add_header X-Frame-Options DENY;
|
|
123
|
+
add_header X-Content-Type-Options nosniff;
|
|
124
|
+
add_header Strict-Transport-Security "max-age=31536000" always;
|
|
125
|
+
|
|
126
|
+
# Proxy to Node.js app
|
|
127
|
+
location / {
|
|
128
|
+
proxy_pass http://127.0.0.1:3000;
|
|
129
|
+
proxy_set_header Host $host;
|
|
130
|
+
proxy_set_header X-Real-IP $remote_addr;
|
|
131
|
+
proxy_set_header X-Forwarded-Proto https;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
# Serve static files directly (don't proxy to Node)
|
|
135
|
+
location /static/ {
|
|
136
|
+
root /var/www/myapp;
|
|
137
|
+
expires 1y;
|
|
138
|
+
add_header Cache-Control "public, immutable";
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
```
|
|
86
142
|
|
|
87
|
-
|
|
143
|
+
---
|
|
88
144
|
|
|
89
|
-
|
|
90
|
-
|---------|----------|
|
|
91
|
-
| High CPU | Add instances (horizontal) |
|
|
92
|
-
| High memory | Increase RAM or fix leak |
|
|
93
|
-
| Slow response | Profile first, then scale |
|
|
94
|
-
| Traffic spikes | Auto-scaling |
|
|
145
|
+
## Backup Strategy
|
|
95
146
|
|
|
96
|
-
|
|
147
|
+
The 3-2-1 rule:
|
|
148
|
+
- **3** copies of data
|
|
149
|
+
- **2** on different storage media
|
|
150
|
+
- **1** offsite (different data center, cloud region)
|
|
97
151
|
|
|
98
|
-
|
|
99
|
-
|------|-------------|
|
|
100
|
-
| **Vertical** | Quick fix, single instance |
|
|
101
|
-
| **Horizontal** | Sustainable, distributed |
|
|
102
|
-
| **Auto** | Variable traffic |
|
|
152
|
+
Test restores on a schedule — a backup you've never restored is a backup you don't know works.
|
|
103
153
|
|
|
104
154
|
---
|
|
105
155
|
|
|
106
|
-
##
|
|
156
|
+
## Output Format
|
|
107
157
|
|
|
108
|
-
|
|
158
|
+
When this skill produces a recommendation or design decision, structure your output as:
|
|
109
159
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
160
|
+
```
|
|
161
|
+
━━━ Server Management Recommendation ━━━━━━━━━━━━━━━━
|
|
162
|
+
Decision: [what was chosen / proposed]
|
|
163
|
+
Rationale: [why — one concise line]
|
|
164
|
+
Trade-offs: [what is consciously accepted]
|
|
165
|
+
Next action: [concrete next step for the user]
|
|
166
|
+
─────────────────────────────────────────────────
|
|
167
|
+
Pre-Flight: ✅ All checks passed
|
|
168
|
+
or ❌ [blocking item that must be resolved first]
|
|
169
|
+
```
|
|
116
170
|
|
|
117
|
-
### Health Check Implementation
|
|
118
171
|
|
|
119
|
-
- Simple: Just return 200
|
|
120
|
-
- Deep: Check all dependencies
|
|
121
|
-
- Choose based on load balancer needs
|
|
122
172
|
|
|
123
173
|
---
|
|
124
174
|
|
|
125
|
-
##
|
|
175
|
+
## 🤖 LLM-Specific Traps
|
|
176
|
+
|
|
177
|
+
AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
|
|
126
178
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
| **Secrets** | Environment vars, not files |
|
|
133
|
-
| **Audit** | Log access and changes |
|
|
179
|
+
1. **Over-engineering:** Proposing complex abstractions or distributed systems when a simpler approach suffices.
|
|
180
|
+
2. **Hallucinated Libraries/Methods:** Using non-existent methods or packages. Always `// VERIFY` or check `package.json` / `requirements.txt`.
|
|
181
|
+
3. **Skipping Edge Cases:** Writing the "happy path" and ignoring error handling, timeouts, or data validation.
|
|
182
|
+
4. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
|
|
183
|
+
5. **Silent Degradation:** Catching and suppressing errors without logging or re-raising.
|
|
134
184
|
|
|
135
185
|
---
|
|
136
186
|
|
|
137
|
-
##
|
|
187
|
+
## 🏛️ Tribunal Integration (Anti-Hallucination)
|
|
138
188
|
|
|
139
|
-
|
|
189
|
+
**Slash command: `/review` or `/tribunal-full`**
|
|
190
|
+
**Active reviewers: `logic-reviewer` · `security-auditor`**
|
|
140
191
|
|
|
141
|
-
|
|
142
|
-
2. **Check logs** (error messages)
|
|
143
|
-
3. **Check resources** (disk, memory, CPU)
|
|
144
|
-
4. **Check network** (ports, DNS)
|
|
145
|
-
5. **Check dependencies** (database, APIs)
|
|
192
|
+
### ❌ Forbidden AI Tropes
|
|
146
193
|
|
|
147
|
-
|
|
194
|
+
1. **Blind Assumptions:** Never make an assumption without documenting it clearly with `// VERIFY: [reason]`.
|
|
195
|
+
2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
|
|
196
|
+
3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
|
|
148
197
|
|
|
149
|
-
|
|
198
|
+
### ✅ Pre-Flight Self-Audit
|
|
150
199
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
200
|
+
Review these questions before confirming output:
|
|
201
|
+
```
|
|
202
|
+
✅ Did I rely ONLY on real, verified tools and methods?
|
|
203
|
+
✅ Is this solution appropriately scoped to the user's constraints?
|
|
204
|
+
✅ Did I handle potential failure modes and edge cases?
|
|
205
|
+
✅ Have I avoided generic boilerplate that doesn't add value?
|
|
206
|
+
```
|
|
158
207
|
|
|
159
|
-
|
|
208
|
+
### 🛑 Verification-Before-Completion (VBC) Protocol
|
|
160
209
|
|
|
161
|
-
|
|
210
|
+
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
211
|
+
- ❌ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
212
|
+
- ✅ **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.
|