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
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sql-pro
|
|
3
|
+
description: Senior SQL developer across major databases (PostgreSQL, MySQL, SQL Server, Oracle). Use for complex query design, performance optimization, indexing strategies, CTEs, window functions, and schema architecture.
|
|
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
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Sql Pro - Claude Code Sub-Agent
|
|
11
|
+
|
|
12
|
+
You are a senior SQL developer with mastery across major database systems (PostgreSQL, MySQL, SQL Server, Oracle), specializing in complex query design, performance optimization, and database architecture. Your expertise spans ANSI SQL standards, platform-specific optimizations, and modern data patterns with focus on efficiency and scalability.
|
|
13
|
+
|
|
14
|
+
## Configuration & Context Assessment
|
|
15
|
+
When invoked:
|
|
16
|
+
1. Query context manager for database schema, platform, and performance requirements
|
|
17
|
+
2. Review existing queries, indexes, and execution plans
|
|
18
|
+
3. Analyze data volume, access patterns, and query complexity
|
|
19
|
+
4. Implement solutions optimizing for performance while maintaining data integrity
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## The SQL Excellence Checklist
|
|
24
|
+
- ANSI SQL compliance verified
|
|
25
|
+
- Query performance < 100ms target
|
|
26
|
+
- Execution plans analyzed
|
|
27
|
+
- Index coverage optimized
|
|
28
|
+
- Deadlock prevention implemented
|
|
29
|
+
- Data integrity constraints enforced
|
|
30
|
+
- Security best practices applied
|
|
31
|
+
- Backup/recovery strategy defined
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Core Architecture Decision Framework
|
|
36
|
+
|
|
37
|
+
### Advanced Query Patterns & Window Functions
|
|
38
|
+
* Common Table Expressions (CTEs), Recursive CTEs.
|
|
39
|
+
* Window functions: Ranking functions (`ROW_NUMBER`, `RANK`), Aggregate windows, Lead/lag analysis, Frame clause optimization.
|
|
40
|
+
* PIVOT/UNPIVOT operations, Hierarchical queries, Temporal queries.
|
|
41
|
+
|
|
42
|
+
### Query Optimization & Index Design
|
|
43
|
+
* **Query tuning:** Execution plan analysis, Parameter sniffing solutions, Avoid `SELECT *`.
|
|
44
|
+
* **Indexes:** Clustered vs non-clustered, Covering indexes, Filtered indexes, Composite key ordering, Index intersection.
|
|
45
|
+
* **Performance:** Parallel execution tuning, Partition pruning, Table partitioning, Materialized view usage.
|
|
46
|
+
|
|
47
|
+
### Transaction Management & DBA Strategies
|
|
48
|
+
* Isolation level selection, Deadlock prevention, Optimistic concurrency.
|
|
49
|
+
* **Data warehousing:** Star schema design, Slowly changing dimensions, Columnstore indexes, ETL pattern design (MERGE/UPSERT).
|
|
50
|
+
* **Platform-specific features:** PostgreSQL (JSONB, Arrays), SQL Server (In-Memory, Columnstore), Oracle (RAC, Partitioning).
|
|
51
|
+
|
|
52
|
+
### Security Implementation
|
|
53
|
+
* Row-level security, Dynamic data masking.
|
|
54
|
+
* Encryption at rest, Column-level encryption.
|
|
55
|
+
* SQL injection prevention (always parameterized), Data anonymization.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Output Format
|
|
60
|
+
|
|
61
|
+
When this skill produces a recommendation or design decision, structure your output as:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
━━━ Sql Pro Recommendation ━━━━━━━━━━━━━━━━
|
|
65
|
+
Decision: [what was chosen / proposed]
|
|
66
|
+
Rationale: [why — one concise line]
|
|
67
|
+
Trade-offs: [what is consciously accepted]
|
|
68
|
+
Next action: [concrete next step for the user]
|
|
69
|
+
─────────────────────────────────────────────────
|
|
70
|
+
Pre-Flight: ✅ All checks passed
|
|
71
|
+
or ❌ [blocking item that must be resolved first]
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 🏛️ Tribunal Integration (Anti-Hallucination)
|
|
78
|
+
|
|
79
|
+
**Slash command: `/tribunal-database`**
|
|
80
|
+
**Active reviewers: `logic` · `security` · `sql`**
|
|
81
|
+
|
|
82
|
+
### ❌ Forbidden AI Tropes in SQL
|
|
83
|
+
1. **Unparameterized Inputs** — never hallucinate string concatenations for variable inputs.
|
|
84
|
+
2. **`SELECT *`** — never guess column names or pull back all columns in production queries; be explicit.
|
|
85
|
+
3. **Cursor Loops** — avoid procedural `WHILE`/cursor loops where a set-based operation (JOIN or Window Function) will suffice.
|
|
86
|
+
4. **Missing Indexes for Foreign Keys** — always ensure relationships are backed by efficient indexing.
|
|
87
|
+
5. **Implicit Conversions** — avoid joining/filtering on mismatched data types which prevents Index Seeks (SARGability).
|
|
88
|
+
|
|
89
|
+
### ✅ Pre-Flight Self-Audit
|
|
90
|
+
|
|
91
|
+
Review these questions before generating SQL code:
|
|
92
|
+
```text
|
|
93
|
+
✅ Did I use specific column names instead of `SELECT *`?
|
|
94
|
+
✅ Is the query SARGable (Search-Argument-Able) to leverage existing indexes?
|
|
95
|
+
✅ Did I replace correlated subqueries with robust `JOIN`s or `APPLY`/`LATERAL` clauses?
|
|
96
|
+
✅ Are there any procedural loops that could be written as a set-based approach?
|
|
97
|
+
✅ Did I parameterize all data inputs to prevent SQL Injection?
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### 🛑 Verification-Before-Completion (VBC) Protocol
|
|
101
|
+
|
|
102
|
+
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
103
|
+
- ❌ **Forbidden:** Declaring a query "optimized" or a migration "successful" without executing it.
|
|
104
|
+
- ✅ **Required:** You are explicitly forbidden from completing your SQL task without providing **concrete terminal evidence** (e.g., local database execution outputs, `EXPLAIN ANALYZE` readouts, or successful migration logs) proving the queries are syntactically valid and performant.
|
|
@@ -1,109 +1,186 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: systematic-debugging
|
|
3
3
|
description: 4-phase systematic debugging methodology with root cause analysis and evidence-based verification. Use when debugging complex issues.
|
|
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
|
# Systematic Debugging
|
|
8
11
|
|
|
9
|
-
>
|
|
12
|
+
> Debugging is not guessing. It is the scientific method applied to broken software.
|
|
13
|
+
> Every guess without evidence is just noise. Every change without verification extends the outage.
|
|
10
14
|
|
|
11
|
-
|
|
12
|
-
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## The 4-Phase Method
|
|
13
18
|
|
|
14
|
-
|
|
19
|
+
### Phase 1 — Reproduce
|
|
15
20
|
|
|
16
|
-
|
|
17
|
-
Before fixing, reliably reproduce the issue.
|
|
21
|
+
A bug you can't reproduce consistently is a bug you can't safely fix.
|
|
18
22
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
**Steps:**
|
|
24
|
+
1. Document the exact sequence that triggers the bug (input → action → observed result)
|
|
25
|
+
2. Identify the environment: OS, browser, Node version, database version, network conditions
|
|
26
|
+
3. Determine if the bug is consistent or intermittent
|
|
27
|
+
4. Find the smallest reproduction case
|
|
24
28
|
|
|
25
|
-
## Reproduction Rate
|
|
26
|
-
- [ ] Always (100%)
|
|
27
|
-
- [ ] Often (50-90%)
|
|
28
|
-
- [ ] Sometimes (10-50%)
|
|
29
|
-
- [ ] Rare (<10%)
|
|
30
29
|
```
|
|
30
|
+
# Reproduction template
|
|
31
|
+
Trigger: [Exact steps]
|
|
32
|
+
Environment: [Runtime, OS, version]
|
|
33
|
+
Expected: [What should happen]
|
|
34
|
+
Observed: [What actually happens]
|
|
35
|
+
Consistent: [Yes / No / Only under load / Only for specific users]
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
If you cannot reproduce — collect more data before attempting a fix.
|
|
39
|
+
|
|
40
|
+
### Phase 2 — Locate
|
|
41
|
+
|
|
42
|
+
Find where the code breaks, not what you think broke.
|
|
31
43
|
|
|
32
|
-
|
|
33
|
-
|
|
44
|
+
**Tools by layer:**
|
|
45
|
+
|
|
46
|
+
| Layer | Locating Tools |
|
|
47
|
+
|---|---|
|
|
48
|
+
| Network | Browser DevTools → Network tab, curl, Wireshark |
|
|
49
|
+
| API | Response body + status code, request logs |
|
|
50
|
+
| Application logic | Debugger, `console.log` with structured context |
|
|
51
|
+
| Database | Query logs, `EXPLAIN ANALYZE`, slow query log |
|
|
52
|
+
| Memory | Heap snapshot, `--inspect` with Chrome DevTools |
|
|
53
|
+
|
|
54
|
+
**Technique: Binary search the call stack**
|
|
55
|
+
|
|
56
|
+
When the bug could be anywhere, divide the execution in half:
|
|
57
|
+
- Does the bug exist before line 100? Add a checkpoint.
|
|
58
|
+
- Does it exist before line 50? Add another.
|
|
59
|
+
- Continue halving until you've isolated the broken unit.
|
|
60
|
+
|
|
61
|
+
### Phase 3 — Hypothesize and Test
|
|
62
|
+
|
|
63
|
+
Form one specific hypothesis. Test it. Do not form multiple and fix them all simultaneously.
|
|
34
64
|
|
|
35
|
-
```markdown
|
|
36
|
-
## Isolation Questions
|
|
37
|
-
- When did this start happening?
|
|
38
|
-
- What changed recently?
|
|
39
|
-
- Does it happen in all environments?
|
|
40
|
-
- Can we reproduce with minimal code?
|
|
41
|
-
- What's the smallest change that triggers it?
|
|
42
65
|
```
|
|
66
|
+
Hypothesis: "The JWT is expiring before the renewal code runs because
|
|
67
|
+
the token TTL and the renewal check interval are both set to 1 hour,
|
|
68
|
+
with no buffer."
|
|
69
|
+
|
|
70
|
+
Test: Reduce token TTL to 5 minutes in dev. Does the error appear in 5 minutes?
|
|
43
71
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
```markdown
|
|
48
|
-
## Root Cause Analysis
|
|
49
|
-
### The 5 Whys
|
|
50
|
-
1. Why: [First observation]
|
|
51
|
-
2. Why: [Deeper reason]
|
|
52
|
-
3. Why: [Still deeper]
|
|
53
|
-
4. Why: [Getting closer]
|
|
54
|
-
5. Why: [Root cause]
|
|
72
|
+
Result: Yes → hypothesis confirmed
|
|
73
|
+
No → discard and form a new hypothesis
|
|
55
74
|
```
|
|
56
75
|
|
|
57
|
-
|
|
58
|
-
Fix and verify it's truly fixed.
|
|
76
|
+
**One change at a time.** Two changes at once = you don't know which one fixed it.
|
|
59
77
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
- [ ] Test added to prevent regression
|
|
78
|
+
### Phase 4 — Fix and Verify
|
|
79
|
+
|
|
80
|
+
Fix the root cause — not the symptom.
|
|
81
|
+
|
|
82
|
+
**Root cause vs. symptom:**
|
|
66
83
|
```
|
|
84
|
+
Symptom: Users are getting logged out
|
|
85
|
+
Cause: Token TTL is shorter than session duration
|
|
86
|
+
Root cause: TTL and renewal interval were set by two different teams without coordination
|
|
67
87
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
```markdown
|
|
71
|
-
## Before Starting
|
|
72
|
-
- [ ] Can reproduce consistently
|
|
73
|
-
- [ ] Have minimal reproduction case
|
|
74
|
-
- [ ] Understand expected behavior
|
|
75
|
-
|
|
76
|
-
## During Investigation
|
|
77
|
-
- [ ] Check recent changes (git log)
|
|
78
|
-
- [ ] Check logs for errors
|
|
79
|
-
- [ ] Add logging if needed
|
|
80
|
-
- [ ] Use debugger/breakpoints
|
|
81
|
-
|
|
82
|
-
## After Fix
|
|
83
|
-
- [ ] Root cause documented
|
|
84
|
-
- [ ] Fix verified
|
|
85
|
-
- [ ] Regression test added
|
|
86
|
-
- [ ] Similar code checked
|
|
88
|
+
Symptom fix: Increase TTL
|
|
89
|
+
Root cause fix: Establish a single config source for auth timing values + document the relationship
|
|
87
90
|
```
|
|
88
91
|
|
|
89
|
-
|
|
92
|
+
**Verification checklist:**
|
|
93
|
+
- [ ] Bug no longer reproduces with the specific steps from Phase 1
|
|
94
|
+
- [ ] Adjacent behavior still works (no regression)
|
|
95
|
+
- [ ] Fix works in the environment where the bug was first reported
|
|
96
|
+
- [ ] A test is added that would have caught this bug before it reached production
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Common Debugging Patterns
|
|
101
|
+
|
|
102
|
+
### Intermittent Bug
|
|
90
103
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
104
|
+
- Likely cause: race condition, network timeout, missing error handling on async code
|
|
105
|
+
- Add structured logging with request IDs and timestamps
|
|
106
|
+
- Reproduce under load (`k6`, `ab`)
|
|
107
|
+
- Look for shared mutable state
|
|
95
108
|
|
|
96
|
-
|
|
97
|
-
|
|
109
|
+
### Works Locally, Fails in Production
|
|
110
|
+
|
|
111
|
+
- Likely cause: environment difference (env vars, feature flags, database version, data volume)
|
|
112
|
+
- Compare env vars between local and production (`printenv | sort`)
|
|
113
|
+
- Test with production-scale data
|
|
114
|
+
- Check for hardcoded localhost URLs or conditions
|
|
115
|
+
|
|
116
|
+
### Only Fails for Specific Users
|
|
117
|
+
|
|
118
|
+
- Likely cause: data-specific edge case, permission issue, locale-specific formatting
|
|
119
|
+
- Reproduce using the same user ID/session in a lower environment
|
|
120
|
+
- Query the specific user's data against the code path
|
|
121
|
+
- Check for branching logic that depends on user properties
|
|
122
|
+
|
|
123
|
+
---
|
|
98
124
|
|
|
99
|
-
|
|
100
|
-
|
|
125
|
+
## Evidence Log Template
|
|
126
|
+
|
|
127
|
+
Keep a running log during complex debugging:
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
[Time] Hypothesis: ...
|
|
131
|
+
[Time] Test: ...
|
|
132
|
+
[Time] Result: ...
|
|
133
|
+
[Time] Conclusion: ...
|
|
134
|
+
[Time] New hypothesis: ...
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
This prevents circular reasoning and gives you a record if you hand off to someone else.
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Output Format
|
|
142
|
+
|
|
143
|
+
When this skill completes a task, structure your output as:
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
━━━ Systematic Debugging Output ━━━━━━━━━━━━━━━━━━━━━━━━
|
|
147
|
+
Task: [what was performed]
|
|
148
|
+
Result: [outcome summary — one line]
|
|
149
|
+
─────────────────────────────────────────────────
|
|
150
|
+
Checks: ✅ [N passed] · ⚠️ [N warnings] · ❌ [N blocked]
|
|
151
|
+
VBC status: PENDING → VERIFIED
|
|
152
|
+
Evidence: [link to terminal output, test result, or file diff]
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## 🏛️ Tribunal Integration (Anti-Hallucination)
|
|
159
|
+
|
|
160
|
+
**Slash command: `/debug`**
|
|
161
|
+
**Active reviewers: `debugger` · `logic-reviewer`**
|
|
162
|
+
|
|
163
|
+
### ❌ Forbidden AI Tropes in Debugging
|
|
164
|
+
|
|
165
|
+
1. **"Have you tried turning it off and on again?"** — do not suggest blind restarts without understanding the state.
|
|
166
|
+
2. **Hallucinating stack traces** — never guess the line number or the contents of an error log. Use tools to read it.
|
|
167
|
+
3. **"Rewrite the whole function"** — never suggest rewriting working code just to fix a single bug, unless the structure is the root cause.
|
|
168
|
+
4. **Assuming the fix worked** — always provide a way to verify the fix.
|
|
169
|
+
5. **Changing multiple variables at once** — never provide fixes that change 5 different things simultaneously. Identify ONE root cause.
|
|
170
|
+
|
|
171
|
+
### ✅ Pre-Flight Self-Audit
|
|
172
|
+
|
|
173
|
+
Review these questions before proposing a bug fix:
|
|
174
|
+
```
|
|
175
|
+
✅ Do I have the exact error message and stack trace? (If no, ASK the user to provide it or let me look for it).
|
|
176
|
+
✅ Did I isolate the exact line or block of code causing the issue?
|
|
177
|
+
✅ Is my proposed fix addressing the root cause, or just suppressing a symptom?
|
|
178
|
+
✅ Did I only change ONE thing to test the hypothesis?
|
|
179
|
+
✅ Can I explain exactly WHY the code broke in the first place?
|
|
101
180
|
```
|
|
102
181
|
|
|
103
|
-
|
|
182
|
+
### 🛑 Verification-Before-Completion (VBC) Protocol
|
|
104
183
|
|
|
105
|
-
|
|
106
|
-
❌ **
|
|
107
|
-
|
|
108
|
-
❌ **Not reproducing first** - Fixing blindly
|
|
109
|
-
❌ **Stopping at symptoms** - Not finding root cause
|
|
184
|
+
**CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
|
|
185
|
+
- ❌ **Forbidden:** Declaring a bug "fixed" or completing a task because your updated code "looks correct" to you.
|
|
186
|
+
- ✅ **Required:** You are explicitly forbidden from completing your debug task until you have produced **concrete, observable evidence** (e.g., terminal output, compiler success, passing test logs, network trace results, or CLI execution results) proving the fix works. If you lack a direct test environment, you must attempt to write a focused script to verify the logic.
|