tribunal-kit 1.0.0 โ 2.4.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/.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/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/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 +329 -75
- package/package.json +10 -6
|
@@ -1,143 +1,197 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: performance-profiling
|
|
3
3
|
description: Performance profiling principles. Measurement, analysis, and optimization techniques.
|
|
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
|
-
# Performance Profiling
|
|
10
|
+
# Performance Profiling Principles
|
|
8
11
|
|
|
9
|
-
>
|
|
12
|
+
> Never optimize code you haven't measured.
|
|
13
|
+
> The bottleneck is almost never where you expect it to be.
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## The Measurement-First Rule
|
|
12
18
|
|
|
13
|
-
|
|
19
|
+
Every performance investigation follows the same sequence:
|
|
14
20
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
21
|
+
```
|
|
22
|
+
Measure โ Identify hotspot โ Form hypothesis โ Change one thing โ Measure again
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Breaking this sequence โ jumping straight to "fix" โ wastes time and creates new problems.
|
|
18
26
|
|
|
19
27
|
---
|
|
20
28
|
|
|
21
|
-
##
|
|
29
|
+
## What to Measure
|
|
22
30
|
|
|
23
|
-
###
|
|
31
|
+
### Backend
|
|
24
32
|
|
|
25
|
-
| Metric |
|
|
26
|
-
|
|
27
|
-
|
|
|
28
|
-
|
|
|
29
|
-
|
|
|
33
|
+
| Metric | Tool | Target |
|
|
34
|
+
|---|---|---|
|
|
35
|
+
| Request throughput | ab, k6, wrk | Baseline + stress test |
|
|
36
|
+
| P50/P95/P99 latency | DataDog, Grafana, k6 | P99 < SLA threshold |
|
|
37
|
+
| Memory usage | `process.memoryUsage()`, heap snapshot | Stable under load (no growth) |
|
|
38
|
+
| CPU usage | clinic.js flame chart | Identify blocking operations |
|
|
39
|
+
| Database query time | Query logs, pg_stat_statements | No query > 100ms without index |
|
|
30
40
|
|
|
31
|
-
###
|
|
41
|
+
### Frontend
|
|
32
42
|
|
|
33
|
-
|
|
|
34
|
-
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
43
|
+
| Metric | Tool | Target (2025 Core Web Vitals) |
|
|
44
|
+
|---|---|---|
|
|
45
|
+
| LCP (Largest Contentful Paint) | Lighthouse, CrUX | < 2.5s |
|
|
46
|
+
| INP (Interaction to Next Paint) | Lighthouse, Web Vitals | < 200ms |
|
|
47
|
+
| CLS (Cumulative Layout Shift) | Lighthouse | < 0.1 |
|
|
48
|
+
| Bundle size (JS) | `npm run build` + analyzer | < 200kB initial JS |
|
|
38
49
|
|
|
39
50
|
---
|
|
40
51
|
|
|
41
|
-
##
|
|
52
|
+
## Common Backend Bottlenecks
|
|
53
|
+
|
|
54
|
+
### N+1 Queries (most common)
|
|
42
55
|
|
|
43
|
-
|
|
56
|
+
```ts
|
|
57
|
+
// โ 1 + N queries
|
|
58
|
+
const posts = await db.post.findMany();
|
|
59
|
+
for (const post of posts) {
|
|
60
|
+
post.author = await db.user.findUnique({ where: { id: post.authorId } });
|
|
61
|
+
}
|
|
44
62
|
|
|
63
|
+
// โ
2 queries total
|
|
64
|
+
const posts = await db.post.findMany({ include: { author: true } });
|
|
45
65
|
```
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
66
|
+
|
|
67
|
+
**Detection:** Enable query logging. Repeated identical queries differing only by ID = N+1.
|
|
68
|
+
|
|
69
|
+
### Missing Database Indexes
|
|
70
|
+
|
|
71
|
+
```sql
|
|
72
|
+
-- EXPLAIN ANALYZE tells you if a query is doing a sequential scan
|
|
73
|
+
EXPLAIN ANALYZE SELECT * FROM orders WHERE user_id = $1;
|
|
74
|
+
|
|
75
|
+
-- Sequential scan on large table โ add index
|
|
76
|
+
CREATE INDEX idx_orders_user_id ON orders(user_id);
|
|
50
77
|
```
|
|
51
78
|
|
|
52
|
-
###
|
|
79
|
+
### Blocking the Event Loop (Node.js)
|
|
53
80
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
81
|
+
```ts
|
|
82
|
+
// โ Synchronous CPU work blocks all requests
|
|
83
|
+
const result = JSON.parse(fs.readFileSync('huge.json', 'utf8'));
|
|
84
|
+
|
|
85
|
+
// โ
Non-blocking
|
|
86
|
+
const content = await fs.promises.readFile('huge.json', 'utf8');
|
|
87
|
+
const result = JSON.parse(content); // still sync but no disk I/O blocking
|
|
88
|
+
```
|
|
61
89
|
|
|
62
90
|
---
|
|
63
91
|
|
|
64
|
-
##
|
|
92
|
+
## Common Frontend Bottlenecks
|
|
93
|
+
|
|
94
|
+
### Bundle Size
|
|
65
95
|
|
|
66
|
-
|
|
96
|
+
- Identify large packages with `npx vite-bundle-visualizer` or `@next/bundle-analyzer`
|
|
97
|
+
- Replace heavy packages with lighter alternatives (e.g., `date-fns` instead of `moment`)
|
|
98
|
+
- Code-split routes โ don't ship all JavaScript on first load
|
|
67
99
|
|
|
68
|
-
|
|
69
|
-
|-------|-----------|
|
|
70
|
-
| Large dependencies | Top of bundle |
|
|
71
|
-
| Duplicate code | Multiple chunks |
|
|
72
|
-
| Unused code | Low coverage |
|
|
73
|
-
| Missing splits | Single large chunk |
|
|
100
|
+
### Render Performance
|
|
74
101
|
|
|
75
|
-
|
|
102
|
+
```ts
|
|
103
|
+
// โ Recalculates on every render
|
|
104
|
+
function ExpensiveList({ items }) {
|
|
105
|
+
const sorted = items.sort((a, b) => a.name.localeCompare(b.name));
|
|
106
|
+
return sorted.map(item => <Item key={item.id} item={item} />);
|
|
107
|
+
}
|
|
76
108
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
109
|
+
// โ
Recalculates only when items change
|
|
110
|
+
function ExpensiveList({ items }) {
|
|
111
|
+
const sorted = useMemo(
|
|
112
|
+
() => [...items].sort((a, b) => a.name.localeCompare(b.name)),
|
|
113
|
+
[items]
|
|
114
|
+
);
|
|
115
|
+
return sorted.map(item => <Item key={item.id} item={item} />);
|
|
116
|
+
}
|
|
117
|
+
```
|
|
83
118
|
|
|
84
119
|
---
|
|
85
120
|
|
|
86
|
-
##
|
|
121
|
+
## Profiling Tools
|
|
87
122
|
|
|
88
|
-
|
|
123
|
+
| Tool | Platform | Best For |
|
|
124
|
+
|---|---|---|
|
|
125
|
+
| `clinic.js` (`clinic doctor`) | Node.js | CPU flame charts, memory leaks |
|
|
126
|
+
| Chrome DevTools โ Performance | Browser | JS execution, paint, layout |
|
|
127
|
+
| `EXPLAIN ANALYZE` | PostgreSQL | Query plan analysis |
|
|
128
|
+
| Lighthouse | Web | Full Core Web Vitals audit |
|
|
129
|
+
| `k6` | Backend load testing | Throughput and latency under load |
|
|
89
130
|
|
|
90
|
-
|
|
91
|
-
|---------|---------|
|
|
92
|
-
| Long tasks (>50ms) | UI blocking |
|
|
93
|
-
| Many small tasks | Possible batching opportunity |
|
|
94
|
-
| Layout/paint | Rendering bottleneck |
|
|
95
|
-
| Script | JavaScript execution |
|
|
131
|
+
---
|
|
96
132
|
|
|
97
|
-
|
|
133
|
+
## Scripts
|
|
98
134
|
|
|
99
|
-
|
|
|
100
|
-
|
|
101
|
-
|
|
|
102
|
-
| Large retained | Check references |
|
|
103
|
-
| Detached DOM | Not cleaned up |
|
|
135
|
+
| Script | Purpose | Run With |
|
|
136
|
+
|---|---|---|
|
|
137
|
+
| `scripts/lighthouse_audit.py` | Lighthouse performance audit | `python scripts/lighthouse_audit.py <url>` |
|
|
104
138
|
|
|
105
139
|
---
|
|
106
140
|
|
|
107
|
-
##
|
|
141
|
+
## Output Format
|
|
142
|
+
|
|
143
|
+
When this skill produces a recommendation or design decision, structure your output as:
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
โโโ Performance Profiling Recommendation โโโโโโโโโโโโโโโโ
|
|
147
|
+
Decision: [what was chosen / proposed]
|
|
148
|
+
Rationale: [why โ one concise line]
|
|
149
|
+
Trade-offs: [what is consciously accepted]
|
|
150
|
+
Next action: [concrete next step for the user]
|
|
151
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
152
|
+
Pre-Flight: โ
All checks passed
|
|
153
|
+
or โ [blocking item that must be resolved first]
|
|
154
|
+
```
|
|
108
155
|
|
|
109
|
-
### By Symptom
|
|
110
156
|
|
|
111
|
-
| Symptom | Likely Cause |
|
|
112
|
-
|---------|--------------|
|
|
113
|
-
| Slow initial load | Large JS, render blocking |
|
|
114
|
-
| Slow interactions | Heavy event handlers |
|
|
115
|
-
| Jank during scroll | Layout thrashing |
|
|
116
|
-
| Growing memory | Leaks, retained refs |
|
|
117
157
|
|
|
118
158
|
---
|
|
119
159
|
|
|
120
|
-
##
|
|
160
|
+
## ๐ค LLM-Specific Traps
|
|
161
|
+
|
|
162
|
+
AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
|
|
121
163
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
| 4 | Cache static assets | Medium |
|
|
128
|
-
| 5 | Optimize images | Medium |
|
|
164
|
+
1. **Over-engineering:** Proposing complex abstractions or distributed systems when a simpler approach suffices.
|
|
165
|
+
2. **Hallucinated Libraries/Methods:** Using non-existent methods or packages. Always `// VERIFY` or check `package.json` / `requirements.txt`.
|
|
166
|
+
3. **Skipping Edge Cases:** Writing the "happy path" and ignoring error handling, timeouts, or data validation.
|
|
167
|
+
4. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
|
|
168
|
+
5. **Silent Degradation:** Catching and suppressing errors without logging or re-raising.
|
|
129
169
|
|
|
130
170
|
---
|
|
131
171
|
|
|
132
|
-
##
|
|
172
|
+
## ๐๏ธ Tribunal Integration (Anti-Hallucination)
|
|
133
173
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
| Guess at problems | Profile first |
|
|
137
|
-
| Micro-optimize | Fix biggest issue |
|
|
138
|
-
| Optimize early | Optimize when needed |
|
|
139
|
-
| Ignore real users | Use RUM data |
|
|
174
|
+
**Slash command: `/review` or `/tribunal-full`**
|
|
175
|
+
**Active reviewers: `logic-reviewer` ยท `security-auditor`**
|
|
140
176
|
|
|
141
|
-
|
|
177
|
+
### โ Forbidden AI Tropes
|
|
178
|
+
|
|
179
|
+
1. **Blind Assumptions:** Never make an assumption without documenting it clearly with `// VERIFY: [reason]`.
|
|
180
|
+
2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
|
|
181
|
+
3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
|
|
182
|
+
|
|
183
|
+
### โ
Pre-Flight Self-Audit
|
|
184
|
+
|
|
185
|
+
Review these questions before confirming output:
|
|
186
|
+
```
|
|
187
|
+
โ
Did I rely ONLY on real, verified tools and methods?
|
|
188
|
+
โ
Is this solution appropriately scoped to the user's constraints?
|
|
189
|
+
โ
Did I handle potential failure modes and edge cases?
|
|
190
|
+
โ
Have I avoided generic boilerplate that doesn't add value?
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### ๐ Verification-Before-Completion (VBC) Protocol
|
|
142
194
|
|
|
143
|
-
|
|
195
|
+
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
196
|
+
- โ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
197
|
+
- โ
**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,152 +1,188 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: plan-writing
|
|
3
3
|
description: Structured task planning with clear breakdowns, dependencies, and verification criteria. Use when implementing features, refactoring, or any multi-step work.
|
|
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
|
+
# Task Planning Standards
|
|
8
11
|
|
|
9
|
-
>
|
|
12
|
+
> A plan is not a promise. It is a map.
|
|
13
|
+
> Maps get updated when the terrain doesn't match them.
|
|
10
14
|
|
|
11
|
-
|
|
12
|
-
This skill provides a framework for breaking down work into clear, actionable tasks with verification criteria.
|
|
15
|
+
---
|
|
13
16
|
|
|
14
|
-
##
|
|
17
|
+
## When to Write a Plan
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
19
|
+
Write a plan before implementation when:
|
|
20
|
+
- The task touches more than 2 files in non-trivial ways
|
|
21
|
+
- The task has dependencies (thing B can't start until thing A is done)
|
|
22
|
+
- The task involves a risky operation (migration, data transformation, breaking change)
|
|
23
|
+
- The team needs to review the approach before time is spent implementing it
|
|
20
24
|
|
|
21
|
-
|
|
22
|
-
- How do you know it's done?
|
|
23
|
-
- What can you check/test?
|
|
24
|
-
- What's the expected output?
|
|
25
|
+
Skip the formal plan for: single-function fixes, typo corrections, config tweaks.
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
- Dependencies identified
|
|
28
|
-
- Parallel work where possible
|
|
29
|
-
- Critical path highlighted
|
|
30
|
-
- **Phase X: Verification is always LAST**
|
|
27
|
+
---
|
|
31
28
|
|
|
32
|
-
|
|
33
|
-
- Plan files are saved as `{task-slug}.md` in the PROJECT ROOT
|
|
34
|
-
- Name derived from task (e.g., "add auth" โ `auth-feature.md`)
|
|
35
|
-
- **NEVER** inside `.claude/`, `docs/`, or temp folders
|
|
29
|
+
## Plan Structure
|
|
36
30
|
|
|
37
|
-
|
|
31
|
+
```markdown
|
|
32
|
+
# Plan: [Feature or Task Name]
|
|
38
33
|
|
|
39
|
-
|
|
34
|
+
## Goal
|
|
35
|
+
One sentence: what outcome does this achieve?
|
|
40
36
|
|
|
41
|
-
|
|
37
|
+
## Context
|
|
38
|
+
- Why is this being done?
|
|
39
|
+
- What problem does it solve or what requirement does it satisfy?
|
|
40
|
+
- What exists today that this changes?
|
|
42
41
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
| Every micro-step listed | Only actionable items |
|
|
47
|
-
| Verbose descriptions | One-line per task |
|
|
42
|
+
## Approach
|
|
43
|
+
High-level strategy. Enough detail for someone unfamiliar with the code to understand the direction.
|
|
44
|
+
Not implementation details โ those go in the tasks.
|
|
48
45
|
|
|
49
|
-
|
|
46
|
+
## Tasks
|
|
50
47
|
|
|
51
|
-
|
|
48
|
+
### Phase 1 โ [Name] (prerequisite for Phase 2)
|
|
49
|
+
- [ ] Task 1.1: Description
|
|
50
|
+
- [ ] Task 1.2: Description (depends on 1.1)
|
|
52
51
|
|
|
53
|
-
###
|
|
52
|
+
### Phase 2 โ [Name] (can run after Phase 1 is complete)
|
|
53
|
+
- [ ] Task 2.1: Description
|
|
54
|
+
- [ ] Task 2.2: Description
|
|
54
55
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
## Verification
|
|
57
|
+
How will we know this is done and working?
|
|
58
|
+
- [ ] Specific behavior that can be tested
|
|
59
|
+
- [ ] Metric or log line that confirms success
|
|
60
|
+
- [ ] Edge case that must not regress
|
|
60
61
|
|
|
61
|
-
|
|
62
|
+
## Risks and Open Questions
|
|
63
|
+
- [Risk]: What might go wrong, and what's the mitigation?
|
|
64
|
+
- [Open]: What decision hasn't been made yet that could change this plan?
|
|
65
|
+
|
|
66
|
+
## Files That Will Change
|
|
67
|
+
- `path/to/file.ts` โ what changes
|
|
68
|
+
- `path/to/schema.sql` โ what changes
|
|
69
|
+
```
|
|
62
70
|
|
|
63
71
|
---
|
|
64
72
|
|
|
65
|
-
|
|
73
|
+
## Dependency Notation
|
|
66
74
|
|
|
67
|
-
|
|
68
|
-
- What tech stack? (decide first)
|
|
69
|
-
- What's the MVP? (minimal features)
|
|
70
|
-
- What's the file structure?
|
|
75
|
+
When tasks have a strict order, mark it:
|
|
71
76
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
77
|
+
```
|
|
78
|
+
Task A โ (no dependencies, do first)
|
|
79
|
+
Task B โ (requires A complete)
|
|
80
|
+
Task C โ (can run parallel with B)
|
|
81
|
+
Task D โ (requires B and C complete)
|
|
82
|
+
```
|
|
76
83
|
|
|
77
|
-
|
|
78
|
-
- What's the root cause?
|
|
79
|
-
- What file/line to change?
|
|
80
|
-
- How to test the fix?
|
|
84
|
+
This prevents teams from working on D while B is still broken.
|
|
81
85
|
|
|
82
86
|
---
|
|
83
87
|
|
|
84
|
-
|
|
88
|
+
## Task Granularity
|
|
85
89
|
|
|
86
|
-
|
|
90
|
+
Each task should be:
|
|
91
|
+
- Completable in one session by one person
|
|
92
|
+
- Independently reviewable (a PR could represent one task)
|
|
93
|
+
- Testable: there is a concrete way to know if it's done
|
|
87
94
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
| Frontend/React | `ux_audit.py`, `accessibility_checker.py` |
|
|
91
|
-
| Backend/API | `api_validator.py`, `security_scan.py` |
|
|
92
|
-
| Mobile | `mobile_audit.py` |
|
|
93
|
-
| Database | `schema_validator.py` |
|
|
94
|
-
| Full-stack | Mix of above based on what you touched |
|
|
95
|
-
|
|
96
|
-
**Wrong:** Adding all scripts to every plan
|
|
97
|
-
**Right:** Only scripts relevant to THIS task
|
|
95
|
+
**Too vague:** "Implement the auth system"
|
|
96
|
+
**Right size:** "Add `POST /api/auth/login` endpoint with JWT issuance and Zod validation"
|
|
98
97
|
|
|
99
98
|
---
|
|
100
99
|
|
|
101
|
-
|
|
100
|
+
## Updating the Plan
|
|
101
|
+
|
|
102
|
+
Plans are living documents:
|
|
102
103
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
| "Test the API" | "curl localhost:3000/api/users returns 200" |
|
|
107
|
-
| "Check styles" | "Open browser, verify dark mode toggle works" |
|
|
104
|
+
- Mark tasks `[x]` when complete, not when started
|
|
105
|
+
- Add `[!]` to blocked tasks with a note on what is blocking
|
|
106
|
+
- When an assumption proves wrong, update the approach section โ don't silently deviate from the plan
|
|
108
107
|
|
|
109
108
|
---
|
|
110
109
|
|
|
111
|
-
##
|
|
110
|
+
## Verification Criteria Rules
|
|
111
|
+
|
|
112
|
+
Verification criteria are not optional. For each task:
|
|
113
|
+
|
|
114
|
+
- At least one must be **observable** (you can see it, not just believe it)
|
|
115
|
+
- At least one must cover a **failure mode** (what should NOT happen)
|
|
112
116
|
|
|
113
117
|
```
|
|
114
|
-
|
|
118
|
+
โ
Observable: `POST /api/users` returns 201 with a user ID in the response body
|
|
119
|
+
โ
Failure mode: `POST /api/users` with a duplicate email returns 409, not 500
|
|
120
|
+
```
|
|
115
121
|
|
|
116
|
-
|
|
117
|
-
One sentence: What are we building/fixing?
|
|
122
|
+
---
|
|
118
123
|
|
|
119
|
-
##
|
|
120
|
-
- [ ] Task 1: [Specific action] โ Verify: [How to check]
|
|
121
|
-
- [ ] Task 2: [Specific action] โ Verify: [How to check]
|
|
122
|
-
- [ ] Task 3: [Specific action] โ Verify: [How to check]
|
|
124
|
+
## ๐ Verification-Before-Completion (VBC) Protocol
|
|
123
125
|
|
|
124
|
-
|
|
125
|
-
-
|
|
126
|
-
|
|
126
|
+
**CRITICAL:** Every plan must integrate a strict "evidence-based closeout" state machine for its tasks.
|
|
127
|
+
- โ **Forbidden:** Writing vague verification steps like "Check that it looks right," "Ensure the code makes sense," or "Verify the logic."
|
|
128
|
+
- โ
**Required:** Verification criteria MUST demand **concrete terminal/compiler evidence** (e.g., test success logs, CLI execution outputs, compiler success states, or network trace results). Explicitly state that an agent CANNOT consider the task complete until it captures this hard evidence.
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Output Format
|
|
127
133
|
|
|
128
|
-
|
|
129
|
-
> Keep it minimal. Add complexity only when required.
|
|
134
|
+
When this skill produces a recommendation or design decision, structure your output as:
|
|
130
135
|
|
|
131
|
-
## Notes
|
|
132
|
-
[Any important considerations]
|
|
133
136
|
```
|
|
137
|
+
โโโ Plan Writing Recommendation โโโโโโโโโโโโโโโโ
|
|
138
|
+
Decision: [what was chosen / proposed]
|
|
139
|
+
Rationale: [why โ one concise line]
|
|
140
|
+
Trade-offs: [what is consciously accepted]
|
|
141
|
+
Next action: [concrete next step for the user]
|
|
142
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
143
|
+
Pre-Flight: โ
All checks passed
|
|
144
|
+
or โ [blocking item that must be resolved first]
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
|
|
134
148
|
|
|
135
149
|
---
|
|
136
150
|
|
|
137
|
-
##
|
|
151
|
+
## ๐ค LLM-Specific Traps
|
|
152
|
+
|
|
153
|
+
AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
|
|
138
154
|
|
|
139
|
-
1. **
|
|
140
|
-
2. **
|
|
141
|
-
3. **
|
|
142
|
-
4. **
|
|
143
|
-
5. **
|
|
155
|
+
1. **Over-engineering:** Proposing complex abstractions or distributed systems when a simpler approach suffices.
|
|
156
|
+
2. **Hallucinated Libraries/Methods:** Using non-existent methods or packages. Always `// VERIFY` or check `package.json` / `requirements.txt`.
|
|
157
|
+
3. **Skipping Edge Cases:** Writing the "happy path" and ignoring error handling, timeouts, or data validation.
|
|
158
|
+
4. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
|
|
159
|
+
5. **Silent Degradation:** Catching and suppressing errors without logging or re-raising.
|
|
144
160
|
|
|
145
161
|
---
|
|
146
162
|
|
|
147
|
-
##
|
|
163
|
+
## ๐๏ธ Tribunal Integration (Anti-Hallucination)
|
|
164
|
+
|
|
165
|
+
**Slash command: `/review` or `/tribunal-full`**
|
|
166
|
+
**Active reviewers: `logic-reviewer` ยท `security-auditor`**
|
|
167
|
+
|
|
168
|
+
### โ Forbidden AI Tropes
|
|
169
|
+
|
|
170
|
+
1. **Blind Assumptions:** Never make an assumption without documenting it clearly with `// VERIFY: [reason]`.
|
|
171
|
+
2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
|
|
172
|
+
3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
|
|
173
|
+
|
|
174
|
+
### โ
Pre-Flight Self-Audit
|
|
175
|
+
|
|
176
|
+
Review these questions before confirming output:
|
|
177
|
+
```
|
|
178
|
+
โ
Did I rely ONLY on real, verified tools and methods?
|
|
179
|
+
โ
Is this solution appropriately scoped to the user's constraints?
|
|
180
|
+
โ
Did I handle potential failure modes and edge cases?
|
|
181
|
+
โ
Have I avoided generic boilerplate that doesn't add value?
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### ๐ Verification-Before-Completion (VBC) Protocol
|
|
148
185
|
|
|
149
|
-
-
|
|
150
|
-
-
|
|
151
|
-
-
|
|
152
|
-
- Refactoring multiple files
|
|
186
|
+
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
187
|
+
- โ **Forbidden:** Declaring a task complete because the output "looks correct."
|
|
188
|
+
- โ
**Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
|