tribunal-kit 2.4.6 → 3.0.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/agents/accessibility-reviewer.md +220 -134
- package/.agent/agents/ai-code-reviewer.md +233 -129
- package/.agent/agents/backend-specialist.md +238 -178
- package/.agent/agents/code-archaeologist.md +181 -119
- package/.agent/agents/database-architect.md +207 -164
- package/.agent/agents/debugger.md +218 -151
- package/.agent/agents/dependency-reviewer.md +136 -55
- package/.agent/agents/devops-engineer.md +238 -175
- package/.agent/agents/documentation-writer.md +221 -137
- package/.agent/agents/explorer-agent.md +180 -142
- package/.agent/agents/frontend-reviewer.md +194 -80
- package/.agent/agents/frontend-specialist.md +237 -188
- package/.agent/agents/game-developer.md +52 -184
- package/.agent/agents/logic-reviewer.md +149 -78
- package/.agent/agents/mobile-developer.md +223 -152
- package/.agent/agents/mobile-reviewer.md +195 -79
- package/.agent/agents/orchestrator.md +211 -170
- package/.agent/agents/penetration-tester.md +174 -131
- package/.agent/agents/performance-optimizer.md +203 -139
- package/.agent/agents/performance-reviewer.md +211 -108
- package/.agent/agents/product-manager.md +162 -108
- package/.agent/agents/project-planner.md +162 -142
- package/.agent/agents/qa-automation-engineer.md +242 -138
- package/.agent/agents/security-auditor.md +194 -170
- package/.agent/agents/seo-specialist.md +213 -132
- package/.agent/agents/sql-reviewer.md +194 -73
- package/.agent/agents/supervisor-agent.md +203 -156
- package/.agent/agents/test-coverage-reviewer.md +193 -81
- package/.agent/agents/type-safety-reviewer.md +208 -65
- package/.agent/scripts/__pycache__/auto_preview.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/bundle_analyzer.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/checklist.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/dependency_analyzer.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/security_scan.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/session_manager.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/skill_integrator.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/swarm_dispatcher.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/test_runner.cpython-311.pyc +0 -0
- package/.agent/scripts/__pycache__/verify_all.cpython-311.pyc +0 -0
- package/.agent/skills/agent-organizer/SKILL.md +126 -132
- package/.agent/skills/ai-prompt-injection-defense/SKILL.md +155 -66
- package/.agent/skills/api-patterns/SKILL.md +289 -257
- package/.agent/skills/api-security-auditor/SKILL.md +172 -70
- package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +1 -1
- package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +1 -1
- package/.agent/skills/appflow-wireframe/SKILL.md +107 -100
- package/.agent/skills/architecture/SKILL.md +331 -200
- package/.agent/skills/authentication-best-practices/SKILL.md +168 -67
- package/.agent/skills/bash-linux/SKILL.md +154 -215
- package/.agent/skills/brainstorming/SKILL.md +104 -210
- package/.agent/skills/building-native-ui/SKILL.md +169 -70
- package/.agent/skills/clean-code/SKILL.md +360 -206
- package/.agent/skills/config-validator/SKILL.md +141 -165
- package/.agent/skills/csharp-developer/SKILL.md +528 -107
- package/.agent/skills/database-design/SKILL.md +455 -275
- package/.agent/skills/deployment-procedures/SKILL.md +145 -188
- package/.agent/skills/devops-engineer/SKILL.md +332 -134
- package/.agent/skills/devops-incident-responder/SKILL.md +113 -98
- package/.agent/skills/edge-computing/SKILL.md +157 -213
- package/.agent/skills/extract-design-system/SKILL.md +129 -69
- package/.agent/skills/framer-motion-expert/SKILL.md +939 -0
- package/.agent/skills/game-design-expert/SKILL.md +105 -0
- package/.agent/skills/game-engineering-expert/SKILL.md +122 -0
- package/.agent/skills/geo-fundamentals/SKILL.md +124 -215
- package/.agent/skills/github-operations/SKILL.md +314 -354
- package/.agent/skills/gsap-expert/SKILL.md +901 -0
- package/.agent/skills/i18n-localization/SKILL.md +138 -216
- package/.agent/skills/intelligent-routing/SKILL.md +127 -139
- package/.agent/skills/llm-engineering/SKILL.md +357 -258
- package/.agent/skills/local-first/SKILL.md +154 -203
- package/.agent/skills/mcp-builder/SKILL.md +118 -224
- package/.agent/skills/nextjs-react-expert/SKILL.md +783 -203
- package/.agent/skills/nodejs-best-practices/SKILL.md +559 -280
- package/.agent/skills/observability/SKILL.md +330 -285
- package/.agent/skills/parallel-agents/SKILL.md +122 -181
- package/.agent/skills/performance-profiling/SKILL.md +254 -197
- package/.agent/skills/plan-writing/SKILL.md +118 -188
- package/.agent/skills/platform-engineer/SKILL.md +123 -135
- package/.agent/skills/playwright-best-practices/SKILL.md +157 -76
- package/.agent/skills/powershell-windows/SKILL.md +146 -230
- package/.agent/skills/python-pro/SKILL.md +879 -114
- package/.agent/skills/react-specialist/SKILL.md +931 -108
- package/.agent/skills/realtime-patterns/SKILL.md +304 -296
- package/.agent/skills/rust-pro/SKILL.md +701 -240
- package/.agent/skills/seo-fundamentals/SKILL.md +154 -181
- package/.agent/skills/server-management/SKILL.md +190 -212
- package/.agent/skills/shadcn-ui-expert/SKILL.md +201 -68
- package/.agent/skills/sql-pro/SKILL.md +633 -104
- package/.agent/skills/swiftui-expert/SKILL.md +171 -70
- package/.agent/skills/systematic-debugging/SKILL.md +118 -186
- package/.agent/skills/tailwind-patterns/SKILL.md +576 -232
- package/.agent/skills/tdd-workflow/SKILL.md +137 -209
- package/.agent/skills/testing-patterns/SKILL.md +573 -205
- package/.agent/skills/vue-expert/SKILL.md +964 -119
- package/.agent/skills/vulnerability-scanner/SKILL.md +269 -316
- package/.agent/skills/web-accessibility-auditor/SKILL.md +188 -71
- package/.agent/skills/webapp-testing/SKILL.md +145 -236
- package/.agent/workflows/api-tester.md +151 -279
- package/.agent/workflows/audit.md +138 -168
- package/.agent/workflows/brainstorm.md +110 -146
- package/.agent/workflows/changelog.md +112 -144
- package/.agent/workflows/create.md +124 -139
- package/.agent/workflows/debug.md +189 -196
- package/.agent/workflows/deploy.md +189 -153
- package/.agent/workflows/enhance.md +151 -139
- package/.agent/workflows/fix.md +135 -143
- package/.agent/workflows/generate.md +157 -164
- package/.agent/workflows/migrate.md +160 -163
- package/.agent/workflows/orchestrate.md +168 -151
- package/.agent/workflows/performance-benchmarker.md +123 -305
- package/.agent/workflows/plan.md +173 -151
- package/.agent/workflows/preview.md +80 -137
- package/.agent/workflows/refactor.md +183 -153
- package/.agent/workflows/review-ai.md +129 -140
- package/.agent/workflows/review.md +116 -155
- package/.agent/workflows/session.md +94 -154
- package/.agent/workflows/status.md +79 -125
- package/.agent/workflows/strengthen-skills.md +139 -99
- package/.agent/workflows/swarm.md +179 -194
- package/.agent/workflows/test.md +211 -166
- package/.agent/workflows/tribunal-backend.md +113 -111
- package/.agent/workflows/tribunal-database.md +115 -132
- package/.agent/workflows/tribunal-frontend.md +118 -115
- package/.agent/workflows/tribunal-full.md +133 -136
- package/.agent/workflows/tribunal-mobile.md +119 -123
- package/.agent/workflows/tribunal-performance.md +133 -152
- package/.agent/workflows/ui-ux-pro-max.md +143 -171
- package/README.md +11 -15
- package/package.json +1 -1
- package/.agent/skills/dotnet-core-expert/SKILL.md +0 -103
- package/.agent/skills/framer-motion-animations/SKILL.md +0 -74
- package/.agent/skills/game-development/2d-games/SKILL.md +0 -119
- package/.agent/skills/game-development/3d-games/SKILL.md +0 -135
- package/.agent/skills/game-development/SKILL.md +0 -236
- package/.agent/skills/game-development/game-art/SKILL.md +0 -185
- package/.agent/skills/game-development/game-audio/SKILL.md +0 -190
- package/.agent/skills/game-development/game-design/SKILL.md +0 -129
- package/.agent/skills/game-development/mobile-games/SKILL.md +0 -108
- package/.agent/skills/game-development/multiplayer/SKILL.md +0 -132
- package/.agent/skills/game-development/pc-games/SKILL.md +0 -144
- package/.agent/skills/game-development/vr-ar/SKILL.md +0 -123
- package/.agent/skills/game-development/web-games/SKILL.md +0 -150
|
@@ -1,354 +1,314 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: github-operations
|
|
3
|
-
description:
|
|
4
|
-
allowed-tools: Read, Write, Edit, Glob, Grep
|
|
5
|
-
version:
|
|
6
|
-
last-updated: 2026-
|
|
7
|
-
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# GitHub Operations
|
|
11
|
-
|
|
12
|
-
> Git is
|
|
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
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
feat(auth): add
|
|
77
|
-
fix(
|
|
78
|
-
docs(
|
|
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
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
#
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
#
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
#
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
.
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
Operation: [commit / push / PR / merge / etc.]
|
|
316
|
-
─────────────────────────────────────────────────────
|
|
317
|
-
✅ Passed: [checks that passed, or "All clean"]
|
|
318
|
-
⚠️ Warnings: [non-blocking issues, or "None"]
|
|
319
|
-
❌ Blocked: [blocking issues requiring fix, or "None"]
|
|
320
|
-
─────────────────────────────────────────────────────
|
|
321
|
-
VBC status: PENDING → VERIFIED
|
|
322
|
-
Evidence: [git output / push confirmation / PR link]
|
|
323
|
-
```
|
|
324
|
-
|
|
325
|
-
**VBC (Verification-Before-Completion) is mandatory.**
|
|
326
|
-
Do not mark status as VERIFIED until concrete terminal evidence (e.g., push success, PR link) is provided.
|
|
327
|
-
|
|
328
|
-
---
|
|
329
|
-
|
|
330
|
-
## 🏛️ Tribunal Integration (Anti-Hallucination)
|
|
331
|
-
|
|
332
|
-
**Slash command: `/review` or `/audit`**
|
|
333
|
-
**Active reviewers: `logic` · `security` · `devops`**
|
|
334
|
-
|
|
335
|
-
### ❌ Forbidden AI Tropes in GitHub Operations
|
|
336
|
-
|
|
337
|
-
1. **Inventing commit hashes** — never fabricate SHA hashes; always use `git log` to retrieve real ones.
|
|
338
|
-
2. **Assuming branch names** — always confirm the current branch with `git branch --show-current` before operating.
|
|
339
|
-
3. **Silently force-pushing** — never suggest `git push --force` without explicitly warning about history rewrite risks.
|
|
340
|
-
4. **Hallucinating `gh` subcommands** — only use `gh` commands from the official GitHub CLI docs.
|
|
341
|
-
5. **Skipping `git pull` before push** — always sync with remote first, especially on shared branches.
|
|
342
|
-
|
|
343
|
-
### ✅ Pre-Flight Self-Audit
|
|
344
|
-
|
|
345
|
-
Review these questions before any git operation:
|
|
346
|
-
|
|
347
|
-
```
|
|
348
|
-
✅ Did I check `git status` before staging changes?
|
|
349
|
-
✅ Is the commit message following Conventional Commits format?
|
|
350
|
-
✅ Did I verify the correct branch is active with `git branch --show-current`?
|
|
351
|
-
✅ Did I pull from remote before pushing to avoid conflicts?
|
|
352
|
-
✅ Are there any secrets, API keys, or credentials in the staged diff?
|
|
353
|
-
✅ If force-pushing, did I explicitly warn the user about history rewrite?
|
|
354
|
-
```
|
|
1
|
+
---
|
|
2
|
+
name: github-operations
|
|
3
|
+
description: Git and GitHub workflow mastery. Branching strategies (Git Flow, trunk-based), commit message conventions, interactive rebase, merge conflict resolution, pull request best practices, GitHub Actions, branch protection rules, monorepo strategies, and git hooks. Use when working with Git, GitHub Actions, or any version control operations.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Glob, Grep
|
|
5
|
+
version: 2.0.0
|
|
6
|
+
last-updated: 2026-04-01
|
|
7
|
+
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# GitHub Operations — Git & CI/CD Workflow Mastery
|
|
11
|
+
|
|
12
|
+
> Git is not a backup tool. It's a communication system for your team.
|
|
13
|
+
> Every commit tells a story. Every PR is a conversation. Every branch has a purpose.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Branching Strategy
|
|
18
|
+
|
|
19
|
+
### Trunk-Based Development (Recommended)
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
main ────●────●────●────●────●────●────●──→
|
|
23
|
+
\ / \ / \ /
|
|
24
|
+
\/ \/ \/
|
|
25
|
+
feat/auth fix/typo feat/dashboard
|
|
26
|
+
|
|
27
|
+
Rules:
|
|
28
|
+
- main is always deployable
|
|
29
|
+
- Feature branches live < 2 days
|
|
30
|
+
- Merge via squash PR
|
|
31
|
+
- Deploy on every merge to main
|
|
32
|
+
- Use feature flags for incomplete features
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Git Flow (For Released Software)
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
main ────●──────────────●──────────●──→
|
|
39
|
+
\ / \ /
|
|
40
|
+
develop ──●───●──●──●──●───●──●──●──●──→
|
|
41
|
+
\ / \ / \ /
|
|
42
|
+
\/ \ / \/
|
|
43
|
+
feature release hotfix
|
|
44
|
+
|
|
45
|
+
Use when:
|
|
46
|
+
- Versioned releases (mobile apps, libraries, SDKs)
|
|
47
|
+
- Multiple environments (staging, production)
|
|
48
|
+
- Long-lived feature development
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Commit Messages
|
|
54
|
+
|
|
55
|
+
### Conventional Commits
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
type(scope): description
|
|
59
|
+
|
|
60
|
+
Body (optional): WHY this change was made, not WHAT
|
|
61
|
+
|
|
62
|
+
Closes #123
|
|
63
|
+
|
|
64
|
+
Types:
|
|
65
|
+
feat: New feature
|
|
66
|
+
fix: Bug fix
|
|
67
|
+
docs: Documentation only
|
|
68
|
+
style: Formatting, whitespace (not CSS)
|
|
69
|
+
refactor: Code change that neither fixes nor adds
|
|
70
|
+
perf: Performance improvement
|
|
71
|
+
test: Adding or updating tests
|
|
72
|
+
chore: Build process, dependencies
|
|
73
|
+
ci: CI/CD changes
|
|
74
|
+
|
|
75
|
+
Examples:
|
|
76
|
+
✅ feat(auth): add OAuth2 Google login
|
|
77
|
+
✅ fix(cart): prevent negative quantities
|
|
78
|
+
✅ docs(api): add pagination examples to README
|
|
79
|
+
✅ refactor(users): extract validation to separate module
|
|
80
|
+
✅ perf(search): add database index for full-text queries
|
|
81
|
+
✅ chore(deps): upgrade React to v19
|
|
82
|
+
|
|
83
|
+
❌ BAD:
|
|
84
|
+
❌ "fixed stuff"
|
|
85
|
+
❌ "wip"
|
|
86
|
+
❌ "updates"
|
|
87
|
+
❌ "asdf"
|
|
88
|
+
❌ "final fix (for real this time)"
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Breaking Changes
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
feat(api)!: rename /users endpoint to /accounts
|
|
95
|
+
|
|
96
|
+
BREAKING CHANGE: The /api/v1/users endpoint has been renamed to
|
|
97
|
+
/api/v1/accounts. All clients must update their API calls.
|
|
98
|
+
|
|
99
|
+
Migration:
|
|
100
|
+
- Replace all /api/v1/users → /api/v1/accounts
|
|
101
|
+
- Update API documentation
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Pull Request Best Practices
|
|
107
|
+
|
|
108
|
+
```markdown
|
|
109
|
+
## PR Template
|
|
110
|
+
|
|
111
|
+
### What
|
|
112
|
+
Brief description of what this PR does.
|
|
113
|
+
|
|
114
|
+
### Why
|
|
115
|
+
Why is this change needed? Link to issue/ticket.
|
|
116
|
+
|
|
117
|
+
### How
|
|
118
|
+
Technical approach. What was the design decision?
|
|
119
|
+
|
|
120
|
+
### Testing
|
|
121
|
+
- [ ] Unit tests added/updated
|
|
122
|
+
- [ ] Manual testing completed
|
|
123
|
+
- [ ] E2E tests passing
|
|
124
|
+
|
|
125
|
+
### Screenshots (if UI change)
|
|
126
|
+
Before | After
|
|
127
|
+
--- | ---
|
|
128
|
+
 | 
|
|
129
|
+
|
|
130
|
+
### Checklist
|
|
131
|
+
- [ ] Self-reviewed the diff
|
|
132
|
+
- [ ] No console.log/debugger statements
|
|
133
|
+
- [ ] Types are correct (no `any`)
|
|
134
|
+
- [ ] Error cases handled
|
|
135
|
+
- [ ] Documentation updated (if needed)
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
PR Rules:
|
|
140
|
+
1. < 400 lines changed (split larger PRs)
|
|
141
|
+
2. One logical change per PR
|
|
142
|
+
3. Write a clear title (not "fix things")
|
|
143
|
+
4. Link the issue/ticket
|
|
144
|
+
5. Self-review before requesting reviews
|
|
145
|
+
6. Respond to reviews within 24h
|
|
146
|
+
7. Squash merge to main (clean history)
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Common Git Operations
|
|
152
|
+
|
|
153
|
+
### Interactive Rebase
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
# Clean up messy commits before merge
|
|
157
|
+
git rebase -i HEAD~3
|
|
158
|
+
|
|
159
|
+
# In the editor:
|
|
160
|
+
pick abc1234 feat(auth): add login endpoint
|
|
161
|
+
squash def5678 fix typo in login
|
|
162
|
+
squash ghi9012 add missing test
|
|
163
|
+
|
|
164
|
+
# Result: One clean commit instead of three
|
|
165
|
+
|
|
166
|
+
# ❌ HALLUCINATION TRAP: Never rebase commits that are already pushed/shared
|
|
167
|
+
# Rebasing rewrites history → force push needed → breaks others' branches
|
|
168
|
+
# Only rebase LOCAL, unpushed commits
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Merge Conflict Resolution
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
# Step 1: Update your branch
|
|
175
|
+
git fetch origin
|
|
176
|
+
git rebase origin/main
|
|
177
|
+
|
|
178
|
+
# Step 2: When conflicts appear
|
|
179
|
+
# Open conflicted files, look for:
|
|
180
|
+
<<<<<<< HEAD
|
|
181
|
+
your changes
|
|
182
|
+
=======
|
|
183
|
+
their changes
|
|
184
|
+
>>>>>>> main
|
|
185
|
+
|
|
186
|
+
# Step 3: Resolve, stage, continue
|
|
187
|
+
git add resolved-file.ts
|
|
188
|
+
git rebase --continue
|
|
189
|
+
|
|
190
|
+
# If things go wrong:
|
|
191
|
+
git rebase --abort # undo everything, back to before rebase
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Stash
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
# Save work without committing
|
|
198
|
+
git stash push -m "WIP: auth feature"
|
|
199
|
+
|
|
200
|
+
# List stashes
|
|
201
|
+
git stash list
|
|
202
|
+
|
|
203
|
+
# Apply and remove
|
|
204
|
+
git stash pop
|
|
205
|
+
|
|
206
|
+
# Apply without removing
|
|
207
|
+
git stash apply stash@{0}
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Undo Mistakes
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
# Undo last commit (keep changes staged)
|
|
214
|
+
git reset --soft HEAD~1
|
|
215
|
+
|
|
216
|
+
# Undo last commit (keep changes unstaged)
|
|
217
|
+
git reset HEAD~1
|
|
218
|
+
|
|
219
|
+
# Undo last commit (discard changes) ⚠️ DESTRUCTIVE
|
|
220
|
+
git reset --hard HEAD~1
|
|
221
|
+
|
|
222
|
+
# Undo a specific commit (creates a new commit)
|
|
223
|
+
git revert abc1234
|
|
224
|
+
|
|
225
|
+
# Recover deleted branch
|
|
226
|
+
git reflog # find the commit
|
|
227
|
+
git checkout -b recovered abc1234
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
## Branch Protection Rules
|
|
233
|
+
|
|
234
|
+
```yaml
|
|
235
|
+
# Recommended rules for main branch:
|
|
236
|
+
Required:
|
|
237
|
+
- Require pull request before merging
|
|
238
|
+
- Require at least 1 approval
|
|
239
|
+
- Dismiss stale reviews on new push
|
|
240
|
+
- Require status checks to pass (CI)
|
|
241
|
+
- Require branches to be up to date
|
|
242
|
+
- Require signed commits (optional, enterprise)
|
|
243
|
+
|
|
244
|
+
Recommended:
|
|
245
|
+
- Restrict who can push (no direct push to main)
|
|
246
|
+
- Require linear history (squash merge)
|
|
247
|
+
- Auto-delete head branches after merge
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## Git Hooks (Husky + lint-staged)
|
|
253
|
+
|
|
254
|
+
```json
|
|
255
|
+
// package.json
|
|
256
|
+
{
|
|
257
|
+
"scripts": {
|
|
258
|
+
"prepare": "husky"
|
|
259
|
+
},
|
|
260
|
+
"lint-staged": {
|
|
261
|
+
"*.{ts,tsx}": ["eslint --fix", "prettier --write"],
|
|
262
|
+
"*.{json,md,yml}": ["prettier --write"]
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
```bash
|
|
268
|
+
# .husky/pre-commit
|
|
269
|
+
npx lint-staged
|
|
270
|
+
|
|
271
|
+
# .husky/commit-msg
|
|
272
|
+
npx commitlint --edit $1
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
```javascript
|
|
276
|
+
// commitlint.config.js
|
|
277
|
+
export default {
|
|
278
|
+
extends: ["@commitlint/config-conventional"],
|
|
279
|
+
};
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
## 🤖 LLM-Specific Traps
|
|
285
|
+
|
|
286
|
+
1. **Rebasing Shared Branches:** Never rebase commits already pushed to a shared branch. It rewrites history.
|
|
287
|
+
2. **`git add .` Blindly:** Always review what you're staging. Use `git add -p` for selective staging.
|
|
288
|
+
3. **Force Push to Main:** `git push --force` on protected branches destroys history. Use `--force-with-lease` at minimum.
|
|
289
|
+
4. **Committing `.env` Files:** Add `.env` to `.gitignore` BEFORE the first commit. Once committed, secrets are in history forever.
|
|
290
|
+
5. **"WIP" Commit Messages:** Every commit message should follow conventional commits format.
|
|
291
|
+
6. **Giant PRs (>400 lines):** Large PRs get rubber-stamped, not reviewed. Split into logical chunks.
|
|
292
|
+
7. **Merging Without CI:** Never merge a PR that hasn't passed all required checks.
|
|
293
|
+
8. **Deleting Branches Before Merge:** Verify the PR is merged before deleting the branch.
|
|
294
|
+
9. **`git reset --hard` Without Thinking:** This is destructive and discards uncommitted work permanently.
|
|
295
|
+
10. **Secrets in Git History:** Committed secrets need immediate rotation AND history rewriting (BFG/git-filter-repo).
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
## 🏛️ Tribunal Integration
|
|
300
|
+
|
|
301
|
+
### ✅ Pre-Flight Self-Audit
|
|
302
|
+
|
|
303
|
+
```
|
|
304
|
+
✅ Am I using conventional commit messages?
|
|
305
|
+
✅ Is the PR < 400 lines and single-purpose?
|
|
306
|
+
✅ Have I self-reviewed the diff?
|
|
307
|
+
✅ Are all CI checks passing?
|
|
308
|
+
✅ Is .env in .gitignore?
|
|
309
|
+
✅ Am I NOT rebasing shared/pushed commits?
|
|
310
|
+
✅ Did I link the issue/ticket in the PR?
|
|
311
|
+
✅ Am I squash-merging to keep clean history?
|
|
312
|
+
✅ Are branch protection rules configured?
|
|
313
|
+
✅ Are git hooks catching lint/format issues pre-commit?
|
|
314
|
+
```
|