tribunal-kit 3.1.0 → 4.0.1
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/agents/precedence-reviewer.md +213 -0
- package/.agent/scripts/append_flow.js +72 -0
- package/.agent/scripts/case_law_manager.py +525 -0
- package/.agent/scripts/skill_evolution.py +563 -0
- package/.agent/skills/agent-organizer/SKILL.md +8 -0
- package/.agent/skills/ai-prompt-injection-defense/SKILL.md +8 -0
- package/.agent/skills/app-builder/SKILL.md +8 -0
- package/.agent/skills/appflow-wireframe/SKILL.md +8 -0
- package/.agent/skills/architecture/SKILL.md +169 -161
- package/.agent/skills/bash-linux/SKILL.md +9 -0
- package/.agent/skills/brainstorming/SKILL.md +8 -0
- package/.agent/skills/building-native-ui/SKILL.md +9 -0
- package/.agent/skills/clean-code/SKILL.md +8 -0
- package/.agent/skills/config-validator/SKILL.md +8 -0
- package/.agent/skills/deployment-procedures/SKILL.md +8 -0
- package/.agent/skills/devops-incident-responder/SKILL.md +8 -0
- package/.agent/skills/documentation-templates/SKILL.md +8 -0
- package/.agent/skills/edge-computing/SKILL.md +8 -0
- package/.agent/skills/extract-design-system/SKILL.md +8 -0
- package/.agent/skills/game-design-expert/SKILL.md +8 -0
- package/.agent/skills/game-engineering-expert/SKILL.md +8 -0
- package/.agent/skills/geo-fundamentals/SKILL.md +8 -0
- package/.agent/skills/i18n-localization/SKILL.md +9 -0
- package/.agent/skills/intelligent-routing/SKILL.md +8 -0
- package/.agent/skills/lint-and-validate/SKILL.md +8 -0
- package/.agent/skills/local-first/SKILL.md +8 -0
- package/.agent/skills/mcp-builder/SKILL.md +8 -0
- package/.agent/skills/parallel-agents/SKILL.md +8 -0
- package/.agent/skills/plan-writing/SKILL.md +8 -0
- package/.agent/skills/platform-engineer/SKILL.md +8 -0
- package/.agent/skills/playwright-best-practices/SKILL.md +9 -0
- package/.agent/skills/project-idioms/SKILL.md +87 -0
- package/.agent/skills/python-patterns/SKILL.md +8 -0
- package/.agent/skills/readme-builder/SKILL.md +8 -0
- package/.agent/skills/red-team-tactics/SKILL.md +8 -0
- package/.agent/skills/seo-fundamentals/SKILL.md +9 -0
- package/.agent/skills/server-management/SKILL.md +8 -0
- package/.agent/skills/shadcn-ui-expert/SKILL.md +9 -0
- package/.agent/skills/skill-creator/SKILL.md +8 -0
- package/.agent/skills/supabase-postgres-best-practices/SKILL.md +9 -0
- package/.agent/skills/swiftui-expert/SKILL.md +9 -0
- package/.agent/skills/systematic-debugging/SKILL.md +8 -0
- package/.agent/skills/tdd-workflow/SKILL.md +8 -0
- package/.agent/skills/ui-ux-pro-max/SKILL.md +8 -0
- package/.agent/skills/web-accessibility-auditor/SKILL.md +9 -0
- package/.agent/skills/web-design-guidelines/SKILL.md +8 -0
- package/.agent/skills/webapp-testing/SKILL.md +8 -0
- package/.agent/workflows/generate.md +1 -0
- package/.agent/workflows/tribunal-backend.md +2 -1
- package/.agent/workflows/tribunal-database.md +2 -1
- package/.agent/workflows/tribunal-frontend.md +2 -1
- package/.agent/workflows/tribunal-full.md +1 -0
- package/.agent/workflows/tribunal-mobile.md +2 -1
- package/.agent/workflows/tribunal-performance.md +2 -1
- package/README.md +30 -1
- package/bin/tribunal-kit.js +182 -20
- package/package.json +28 -4
|
@@ -1,161 +1,169 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: architecture
|
|
3
|
-
description: Software architecture mastery. System design patterns, clean architecture, hexagonal/ports-and-adapters, event-driven architecture, microservices vs monolith decision framework, CQRS, domain-driven design, Architecture Decision Records (ADRs), and scalability patterns. Use when making architecture decisions, designing systems, or documenting technical decisions.
|
|
4
|
-
allowed-tools: Read, Write, Edit, Glob, Grep
|
|
5
|
-
version: 3.1.0
|
|
6
|
-
last-updated: 2026-04-07
|
|
7
|
-
applies-to-model: gemini-3-1-pro, claude-3-7-sonnet
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
class
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
**
|
|
130
|
-
|
|
131
|
-
**
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
1
|
+
---
|
|
2
|
+
name: architecture
|
|
3
|
+
description: Software architecture mastery. System design patterns, clean architecture, hexagonal/ports-and-adapters, event-driven architecture, microservices vs monolith decision framework, CQRS, domain-driven design, Architecture Decision Records (ADRs), and scalability patterns. Use when making architecture decisions, designing systems, or documenting technical decisions.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Glob, Grep
|
|
5
|
+
version: 3.1.0
|
|
6
|
+
last-updated: 2026-04-07
|
|
7
|
+
applies-to-model: gemini-3-1-pro, claude-3-7-sonnet
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Hallucination Traps (Read First)
|
|
11
|
+
- ❌ Choosing microservices for a team of 1-3 developers -> ✅ Start monolith, extract services only when team/scale demands it
|
|
12
|
+
- ❌ Using event-driven architecture without understanding eventual consistency -> ✅ Events mean data will be stale; design for it
|
|
13
|
+
- ❌ Skipping ADRs (Architecture Decision Records) -> ✅ Every non-obvious decision needs a written 'why' for future maintainers
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# Architecture — System Design Mastery
|
|
19
|
+
|
|
20
|
+
## Architecture Selection
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
Team size? Scale? Cadence?
|
|
24
|
+
1–5 → Monolith <10K RPM → Monolith Weekly → Monolith
|
|
25
|
+
5–20 → Mod. Mono <100K RPM → Mono+CDN Daily → Modular Mono
|
|
26
|
+
20+ → Microsvcs >100K RPM → Microsvcs Per-svc → Microsvcs
|
|
27
|
+
|
|
28
|
+
❌ Microservices are NOT inherently better.
|
|
29
|
+
A well-structured monolith beats a poorly designed microservice system.
|
|
30
|
+
Start monolith. Extract services only when proven necessary.
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**3 Questions Before Any Pattern:**
|
|
34
|
+
1. What SPECIFIC problem does this pattern solve?
|
|
35
|
+
2. Is there a simpler solution?
|
|
36
|
+
3. Can we add this LATER when proven needed?
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Clean Architecture (Dependency Rule)
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
Presentation → Application → Domain ← Infrastructure
|
|
44
|
+
(Controllers) (Use Cases) (Entities) (DB, APIs)
|
|
45
|
+
|
|
46
|
+
Dependency Rule: arrows point INWARD. Domain knows NOTHING about infra.
|
|
47
|
+
Application defines interfaces (ports). Infrastructure implements them (adapters).
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
```typescript
|
|
51
|
+
// Domain — pure business logic, zero external dependencies
|
|
52
|
+
interface UserRepository { findById(id: string): Promise<User | null>; }
|
|
53
|
+
class User {
|
|
54
|
+
promote(): void {
|
|
55
|
+
if (this._role === UserRole.ADMIN) throw new DomainError("Already admin");
|
|
56
|
+
this._role = UserRole.ADMIN;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Application — orchestrates use cases
|
|
61
|
+
class PromoteUserUseCase {
|
|
62
|
+
async execute(userId: string): Promise<void> {
|
|
63
|
+
const user = await this.userRepo.findById(userId);
|
|
64
|
+
if (!user) throw new NotFoundError("User", userId);
|
|
65
|
+
user.promote();
|
|
66
|
+
await this.userRepo.save(user);
|
|
67
|
+
await this.eventBus.publish(new UserPromotedEvent(userId));
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Infrastructure — concrete implementations of ports
|
|
72
|
+
class PostgresUserRepository implements UserRepository {
|
|
73
|
+
async findById(id: string) { /* db.query(...) */ }
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## CQRS
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
Commands (Write) → Normalized Write DB
|
|
83
|
+
Queries (Read) → Denormalized/Cached Read Model
|
|
84
|
+
|
|
85
|
+
When to use: ✅ Read/write patterns diverge ✅ 10:1+ read:write ratio ✅ Event sourcing
|
|
86
|
+
When NOT to: ❌ Simple CRUD ❌ Team < 3 devs ❌ Read/write models are identical
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Event-Driven Architecture
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
Event Types:
|
|
95
|
+
Domain Events → "OrderPlaced" within a bounded context
|
|
96
|
+
Integration Events → Cross-service via message queue
|
|
97
|
+
Notification Events → Fire-and-forget (logging, analytics)
|
|
98
|
+
|
|
99
|
+
Broker Selection:
|
|
100
|
+
BullMQ / Redis Streams → Simple, single-service queues
|
|
101
|
+
RabbitMQ → Complex routing, dead-letter queues
|
|
102
|
+
Apache Kafka → High throughput, replay, event log
|
|
103
|
+
AWS SQS/SNS → Managed, serverless-friendly
|
|
104
|
+
|
|
105
|
+
Outbox Pattern (reliable publishing):
|
|
106
|
+
1. Save entity + event in ONE DB transaction
|
|
107
|
+
2. Background worker polls outbox → publishes to broker
|
|
108
|
+
3. Mark as published → guarantees at-least-once delivery
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Anti-Patterns Reference
|
|
114
|
+
|
|
115
|
+
| Pattern | When it's an Anti-Pattern | Simpler Alternative |
|
|
116
|
+
|---------|--------------------------|---------------------|
|
|
117
|
+
| Microservices | Before team or scale justifies it | Modular monolith |
|
|
118
|
+
| Clean/Hexagonal | Over-abstraction for simple CRUD | Concrete first, interfaces later |
|
|
119
|
+
| Event Sourcing | No business requirement for audit/replay | Append-only audit log |
|
|
120
|
+
| CQRS | Simple data model, no read/write divergence | Single model |
|
|
121
|
+
| Repository | Simple CRUD, single database | ORM direct access |
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Architecture Decision Records (ADRs)
|
|
126
|
+
|
|
127
|
+
```markdown
|
|
128
|
+
## ADR-001: [Decision Title]
|
|
129
|
+
**Status:** Proposed | Accepted | Deprecated | Superseded by ADR-XXX
|
|
130
|
+
|
|
131
|
+
**Context:** [Problem + constraints: team, scale, timeline]
|
|
132
|
+
|
|
133
|
+
**Decision:** [What was chosen — be specific]
|
|
134
|
+
|
|
135
|
+
**Rationale:** [Why — tied to requirements]
|
|
136
|
+
|
|
137
|
+
**Trade-offs:** [What we consciously give up]
|
|
138
|
+
|
|
139
|
+
**Consequences:**
|
|
140
|
+
- Positive: [Benefits]
|
|
141
|
+
- Negative: [Costs/Risks]
|
|
142
|
+
- Mitigation: [How to address negatives]
|
|
143
|
+
|
|
144
|
+
**Revisit when:** [Trigger conditions]
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
ADR storage: `docs/architecture/adr-001-title.md`
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Scalability Patterns
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
Read scaling: Redis cache → Read replicas → CDN for static assets
|
|
155
|
+
Write scaling: Queue writes → Partition data → Event sourcing
|
|
156
|
+
Stateless: Sessions in Redis → JWT → No server affinity
|
|
157
|
+
DB scaling: Connection pooling → Read replicas → Partitioning → Sharding (last resort)
|
|
158
|
+
Cache layers: L1: In-memory (process) L2: Redis (shared) L3: CDN (edge)
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Scale-to-Architecture Matrix
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
MVP SaaS Enterprise
|
|
165
|
+
Scale: <1K 1K–100K 100K+
|
|
166
|
+
Team: Solo 2–10 10+
|
|
167
|
+
Architecture: Simple Mono Modular Mono Distributed
|
|
168
|
+
Framework: Next.js API NestJS Microservices
|
|
169
|
+
```
|
|
@@ -7,6 +7,15 @@ last-updated: 2026-04-02
|
|
|
7
7
|
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## Hallucination Traps (Read First)
|
|
11
|
+
- ❌ Scripts without `set -euo pipefail` -> ✅ Always enable strict mode to catch silent failures
|
|
12
|
+
- ❌ Using `[ ]` instead of `[[ ]]` for conditionals -> ✅ `[[ ]]` handles spaces in variables and supports regex
|
|
13
|
+
- ❌ Parsing `ls` output -> ✅ Use `find` or glob expansion instead; `ls` output is not portable
|
|
14
|
+
- ❌ `cat file | grep` (useless use of cat) -> ✅ `grep pattern file` directly
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
|
|
10
19
|
# Bash & Linux — Shell Scripting Mastery
|
|
11
20
|
|
|
12
21
|
---
|
|
@@ -7,6 +7,14 @@ last-updated: 2026-04-06
|
|
|
7
7
|
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## Hallucination Traps (Read First)
|
|
11
|
+
- ❌ Jumping to implementation during brainstorming -> ✅ Brainstorming is exploration only; no code is written in this phase
|
|
12
|
+
- ❌ Presenting only one option -> ✅ Always present 3+ distinct approaches with tradeoffs
|
|
13
|
+
- ❌ Assuming the user's first request is their real need -> ✅ Ask 'what problem does this solve for your users?' before generating ideas
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
|
|
10
18
|
# Brainstorming — Socratic Exploration Mastery
|
|
11
19
|
|
|
12
20
|
---
|
|
@@ -7,6 +7,15 @@ last-updated: 2026-04-02
|
|
|
7
7
|
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## Hallucination Traps (Read First)
|
|
11
|
+
- ❌ `SafeAreaView` wrapping everything -> ✅ Use `SafeAreaProvider` + `useSafeAreaInsets()` for granular control
|
|
12
|
+
- ❌ Using `ScrollView` for long lists -> ✅ `FlatList` or `FlashList` for virtualized rendering; ScrollView renders ALL items
|
|
13
|
+
- ❌ `Dimensions.get('window')` for responsive layouts -> ✅ Use `useWindowDimensions()` hook (reactive to rotation/resize)
|
|
14
|
+
- ❌ Animating with `Animated.timing` by default -> ✅ Use `Reanimated 3` with `useSharedValue` for 120fps worklet-based animations
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
|
|
10
19
|
# Building Native UI — React Native & Expo Mastery
|
|
11
20
|
|
|
12
21
|
A mobile app isn't a website confined to a small screen.
|
|
@@ -7,6 +7,14 @@ last-updated: 2026-04-01
|
|
|
7
7
|
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## Hallucination Traps (Read First)
|
|
11
|
+
- ❌ Over-abstracting code that is used in only one place -> ✅ Don't DRY single-use code; premature abstraction is worse than duplication
|
|
12
|
+
- ❌ Adding comments that restate what the code does -> ✅ Comments explain WHY, not WHAT; the code explains what
|
|
13
|
+
- ❌ Creating utility functions for trivial one-liners -> ✅ Inline is clearer when the operation is self-documenting
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
|
|
10
18
|
# Clean Code — The Art of Readable Software
|
|
11
19
|
|
|
12
20
|
---
|
|
@@ -7,6 +7,14 @@ last-updated: 2026-04-02
|
|
|
7
7
|
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## Hallucination Traps (Read First)
|
|
11
|
+
- ❌ Silently using default values for missing config -> ✅ Fail fast with a clear error message naming the missing field
|
|
12
|
+
- ❌ Trusting environment variables without validation -> ✅ Validate ALL env vars at startup with Zod or a schema, not at usage time
|
|
13
|
+
- ❌ Mixing config source precedence without documenting it -> ✅ Document: CLI args > env vars > config file > defaults
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
|
|
10
18
|
# Config Validator — System Integrity Mastery
|
|
11
19
|
|
|
12
20
|
---
|
|
@@ -7,6 +7,14 @@ last-updated: 2026-04-02
|
|
|
7
7
|
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## Hallucination Traps (Read First)
|
|
11
|
+
- ❌ Running database migrations and code deploy in the same step -> ✅ Migrate FIRST, deploy code SECOND (expand-and-contract)
|
|
12
|
+
- ❌ Deploying without a rollback plan -> ✅ Every deploy needs a tested rollback: previous Docker image tag or git revert
|
|
13
|
+
- ❌ Using `latest` tags in production container images -> ✅ Always use specific version tags or SHA digests
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
|
|
10
18
|
# Deployment Procedures — Production Execution Mastery
|
|
11
19
|
|
|
12
20
|
---
|
|
@@ -7,6 +7,14 @@ last-updated: 2026-04-02
|
|
|
7
7
|
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## Hallucination Traps (Read First)
|
|
11
|
+
- ❌ Changing code during an active incident -> ✅ STABILIZE first (rollback, feature flag, traffic shift), investigate AFTER
|
|
12
|
+
- ❌ Assigning blame in post-mortems -> ✅ Blameless post-mortems focus on systemic causes, not individual errors
|
|
13
|
+
- ❌ Skipping the 'what went well' section -> ✅ Understanding what prevented worse outcomes is as valuable as the root cause
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
|
|
10
18
|
# Incident Responder — Production Stabilization Mastery
|
|
11
19
|
|
|
12
20
|
---
|
|
@@ -7,6 +7,14 @@ last-updated: 2026-03-12
|
|
|
7
7
|
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## Hallucination Traps (Read First)
|
|
11
|
+
- ❌ Writing documentation that only AI-generated code can understand -> ✅ Docs are for HUMANS; use clear language and real examples
|
|
12
|
+
- ❌ Documenting implementation details instead of behavior -> ✅ Document WHAT it does and WHY, not HOW (code shows how)
|
|
13
|
+
- ❌ Skipping the 'Quick Start' section -> ✅ The first 30 seconds of a README determine if someone uses your project
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
|
|
10
18
|
# Documentation Standards
|
|
11
19
|
|
|
12
20
|
---
|
|
@@ -7,6 +7,14 @@ last-updated: 2026-04-02
|
|
|
7
7
|
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## Hallucination Traps (Read First)
|
|
11
|
+
- ❌ Importing Node.js-only APIs (fs, net, child_process) in edge functions -> ✅ Edge runtime has NO Node.js APIs; use Web APIs only
|
|
12
|
+
- ❌ Using `global` or module-level mutable state in edge -> ✅ Edge functions are stateless across requests; use KV/Durable Objects for state
|
|
13
|
+
- ❌ Assuming edge functions have unlimited execution time -> ✅ Cloudflare Workers: 30s, Vercel Edge: 25s; design for millisecond responses
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
|
|
10
18
|
# Edge Computing — Global Latency Mastery
|
|
11
19
|
|
|
12
20
|
---
|
|
@@ -7,6 +7,14 @@ last-updated: 2026-04-02
|
|
|
7
7
|
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## Hallucination Traps (Read First)
|
|
11
|
+
- ❌ Creating CSS variables for every possible value -> ✅ Only tokenize values that appear 3+ times across components
|
|
12
|
+
- ❌ Extracting a design system before the UI is stable -> ✅ Wait until patterns are proven by real usage before standardizing
|
|
13
|
+
- ❌ Naming tokens by appearance (`--blue-500`) instead of purpose (`--color-primary`) -> ✅ Semantic names survive theme changes
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
|
|
10
18
|
# Extract Design System — Tokenization Mastery
|
|
11
19
|
|
|
12
20
|
---
|
|
@@ -7,6 +7,14 @@ last-updated: 2026-04-02
|
|
|
7
7
|
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## Hallucination Traps (Read First)
|
|
11
|
+
- ❌ Designing reward systems without testing for compulsion loops -> ✅ Playtesting must verify engagement without addiction patterns
|
|
12
|
+
- ❌ Assuming all players have the same skill level -> ✅ Design difficulty curves that adapt or offer accessibility options
|
|
13
|
+
- ❌ Adding mechanics without testing the core loop first -> ✅ Core loop must be fun in isolation before adding complexity
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
|
|
10
18
|
# Game Design Expert — Player Experience & Flow Mastery
|
|
11
19
|
|
|
12
20
|
---
|
|
@@ -7,6 +7,14 @@ last-updated: 2026-04-02
|
|
|
7
7
|
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## Hallucination Traps (Read First)
|
|
11
|
+
- ❌ Using deltaTime without clamping -> ✅ Unclamped deltaTime causes physics explosions on frame spikes; clamp to max 0.05s
|
|
12
|
+
- ❌ Allocating memory in the game loop (new objects, arrays) -> ✅ Pre-allocate and pool objects to avoid GC pauses during gameplay
|
|
13
|
+
- ❌ Using floating-point equality checks for game state -> ✅ Use epsilon comparisons or integer-based fixed-point for deterministic logic
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
|
|
10
18
|
# Game Engineering Expert — Performance & State Mastery
|
|
11
19
|
|
|
12
20
|
---
|
|
@@ -7,6 +7,14 @@ last-updated: 2026-04-02
|
|
|
7
7
|
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## Hallucination Traps (Read First)
|
|
11
|
+
- ❌ Assuming SEO and GEO are the same -> ✅ GEO optimizes for AI crawlers and LLM ingestion, not just search engine ranking
|
|
12
|
+
- ❌ Using complex nested HTML for content -> ✅ AI parsers prefer flat, semantic HTML with clear heading hierarchies
|
|
13
|
+
- ❌ Ignoring structured data (JSON-LD) -> ✅ LLMs heavily weight structured data for citation and fact extraction
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
|
|
10
18
|
# Generative Engine Optimization (GEO)
|
|
11
19
|
|
|
12
20
|
---
|
|
@@ -7,6 +7,15 @@ last-updated: 2026-04-02
|
|
|
7
7
|
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## Hallucination Traps (Read First)
|
|
11
|
+
- ❌ Concatenating translated strings (`'Hello ' + name`) -> ✅ Use interpolation: `t('greeting', { name })` to handle word order differences
|
|
12
|
+
- ❌ Hardcoding date/number formats -> ✅ Use `Intl.DateTimeFormat` and `Intl.NumberFormat` with the user's locale
|
|
13
|
+
- ❌ Assuming all languages read left-to-right -> ✅ Arabic, Hebrew, Farsi are RTL; use CSS `dir='auto'` and logical properties
|
|
14
|
+
- ❌ Using string length for validation on translated text -> ✅ Translations can be 30-200% longer than English; design for expansion
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
|
|
10
19
|
# i18n & Localization — Global Scale Mastery
|
|
11
20
|
|
|
12
21
|
---
|
|
@@ -7,6 +7,14 @@ last-updated: 2026-04-06
|
|
|
7
7
|
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## Hallucination Traps (Read First)
|
|
11
|
+
- ❌ Routing based on exact keyword matching -> ✅ Use intent classification with confidence scores; keywords miss synonyms and context
|
|
12
|
+
- ❌ No fallback for low-confidence classifications -> ✅ Always have a default handler when confidence is below threshold (e.g., 0.7)
|
|
13
|
+
- ❌ Routing to a single agent when the task spans multiple domains -> ✅ Detect multi-domain requests and route to the orchestrator
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
|
|
10
18
|
# Intelligent Routing — Intent Gateway Mastery
|
|
11
19
|
|
|
12
20
|
---
|
|
@@ -7,6 +7,14 @@ last-updated: 2026-03-12
|
|
|
7
7
|
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## Hallucination Traps (Read First)
|
|
11
|
+
- ❌ Auto-fixing lint errors without reviewing the diff -> ✅ Some auto-fixes change logic (e.g., removing 'unused' variables that are side-effects)
|
|
12
|
+
- ❌ Treating warnings as non-blocking in CI -> ✅ Warnings accumulate; enforce zero-warning policy or they become permanent
|
|
13
|
+
- ❌ Running linters only on changed files -> ✅ Run on full codebase periodically; cross-file issues are only caught with full runs
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
|
|
10
18
|
# Linting & Validation
|
|
11
19
|
|
|
12
20
|
---
|
|
@@ -7,6 +7,14 @@ last-updated: 2026-04-02
|
|
|
7
7
|
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## Hallucination Traps (Read First)
|
|
11
|
+
- ❌ Assuming server data is always newer than local data -> ✅ Conflicts are inevitable; design merge strategy (LWW, CRDTs) before writing code
|
|
12
|
+
- ❌ Using localStorage for anything beyond 5MB -> ✅ Use IndexedDB (via Dexie or idb) for structured local storage; localStorage is synchronous and tiny
|
|
13
|
+
- ❌ Syncing entire datasets on every connection -> ✅ Use incremental sync with watermarks/timestamps to minimize bandwidth
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
|
|
10
18
|
# Local-First Architecture — Offline-capable Mastery
|
|
11
19
|
|
|
12
20
|
---
|
|
@@ -7,6 +7,14 @@ last-updated: 2026-04-02
|
|
|
7
7
|
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## Hallucination Traps (Read First)
|
|
11
|
+
- ❌ Exposing tools without input validation schemas -> ✅ Every MCP tool MUST have JSON Schema for parameters; the protocol requires it
|
|
12
|
+
- ❌ Returning unstructured strings from tool calls -> ✅ Return structured JSON that the LLM can reliably parse and act on
|
|
13
|
+
- ❌ Not handling tool call timeouts -> ✅ Always set execution timeouts; hanging tools block the entire LLM conversation loop
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
|
|
10
18
|
# MCP Builder — Context Protocol Mastery
|
|
11
19
|
|
|
12
20
|
---
|
|
@@ -7,6 +7,14 @@ last-updated: 2026-04-02
|
|
|
7
7
|
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## Hallucination Traps (Read First)
|
|
11
|
+
- ❌ Assuming parallel agents can write to the same file -> ✅ Use file-level locking or assign each agent a distinct file scope
|
|
12
|
+
- ❌ Not implementing fan-in synthesis after fan-out -> ✅ Parallel results must be merged with conflict resolution, not blindly concatenated
|
|
13
|
+
- ❌ Running more than 5 agents in parallel without resource limits -> ✅ Context window and API rate limits scale with agent count
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
|
|
10
18
|
# Parallel Agents — Concurrent Orchestration Mastery
|
|
11
19
|
|
|
12
20
|
---
|