tribunal-kit 2.4.6 → 3.1.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/ARCHITECTURE.md +99 -99
- package/.agent/GEMINI.md +52 -52
- package/.agent/agents/accessibility-reviewer.md +139 -86
- package/.agent/agents/ai-code-reviewer.md +160 -90
- package/.agent/agents/backend-specialist.md +164 -127
- package/.agent/agents/code-archaeologist.md +115 -73
- package/.agent/agents/database-architect.md +130 -110
- package/.agent/agents/debugger.md +137 -97
- package/.agent/agents/dependency-reviewer.md +78 -30
- package/.agent/agents/devops-engineer.md +161 -118
- package/.agent/agents/documentation-writer.md +151 -87
- package/.agent/agents/explorer-agent.md +117 -99
- package/.agent/agents/frontend-reviewer.md +127 -47
- package/.agent/agents/frontend-specialist.md +169 -109
- package/.agent/agents/game-developer.md +28 -164
- package/.agent/agents/logic-reviewer.md +87 -49
- package/.agent/agents/mobile-developer.md +151 -103
- package/.agent/agents/mobile-reviewer.md +133 -50
- package/.agent/agents/orchestrator.md +121 -110
- package/.agent/agents/penetration-tester.md +103 -77
- package/.agent/agents/performance-optimizer.md +136 -92
- package/.agent/agents/performance-reviewer.md +139 -69
- package/.agent/agents/product-manager.md +104 -70
- package/.agent/agents/product-owner.md +6 -25
- package/.agent/agents/project-planner.md +95 -95
- package/.agent/agents/qa-automation-engineer.md +174 -87
- package/.agent/agents/security-auditor.md +133 -129
- package/.agent/agents/seo-specialist.md +160 -99
- package/.agent/agents/sql-reviewer.md +132 -44
- package/.agent/agents/supervisor-agent.md +137 -109
- package/.agent/agents/swarm-worker-contracts.md +17 -17
- package/.agent/agents/swarm-worker-registry.md +46 -46
- package/.agent/agents/test-coverage-reviewer.md +132 -53
- package/.agent/agents/test-engineer.md +0 -21
- package/.agent/agents/type-safety-reviewer.md +143 -33
- package/.agent/patterns/generator.md +9 -9
- package/.agent/patterns/inversion.md +12 -12
- package/.agent/patterns/pipeline.md +9 -9
- package/.agent/patterns/reviewer.md +13 -13
- package/.agent/patterns/tool-wrapper.md +9 -9
- package/.agent/rules/GEMINI.md +63 -63
- 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/scripts/compress_skills.py +167 -0
- package/.agent/scripts/consolidate_skills.py +173 -0
- package/.agent/scripts/deep_compress.py +202 -0
- package/.agent/scripts/minify_context.py +80 -0
- package/.agent/scripts/security_scan.py +1 -1
- package/.agent/scripts/strip_tribunal.py +41 -0
- package/.agent/skills/agent-organizer/SKILL.md +60 -100
- package/.agent/skills/agentic-patterns/SKILL.md +0 -70
- package/.agent/skills/ai-prompt-injection-defense/SKILL.md +108 -53
- package/.agent/skills/api-patterns/SKILL.md +197 -257
- package/.agent/skills/api-security-auditor/SKILL.md +125 -57
- package/.agent/skills/app-builder/SKILL.md +326 -50
- package/.agent/skills/app-builder/templates/SKILL.md +13 -15
- package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +16 -16
- package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +22 -22
- package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +18 -18
- package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +20 -20
- package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +17 -17
- package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +18 -18
- package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +21 -21
- package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +19 -19
- package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +26 -26
- package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +26 -26
- package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +19 -19
- package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +18 -18
- package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +20 -20
- package/.agent/skills/appflow-wireframe/SKILL.md +71 -98
- package/.agent/skills/architecture/SKILL.md +161 -200
- package/.agent/skills/authentication-best-practices/SKILL.md +121 -54
- package/.agent/skills/bash-linux/SKILL.md +71 -166
- package/.agent/skills/behavioral-modes/SKILL.md +8 -69
- package/.agent/skills/brainstorming/SKILL.md +345 -127
- package/.agent/skills/building-native-ui/SKILL.md +125 -57
- package/.agent/skills/clean-code/SKILL.md +266 -149
- package/.agent/skills/code-review-checklist/SKILL.md +0 -62
- package/.agent/skills/config-validator/SKILL.md +73 -131
- package/.agent/skills/csharp-developer/SKILL.md +434 -73
- package/.agent/skills/database-design/SKILL.md +190 -275
- package/.agent/skills/deployment-procedures/SKILL.md +81 -158
- package/.agent/skills/devops-engineer/SKILL.md +255 -94
- package/.agent/skills/devops-incident-responder/SKILL.md +50 -69
- package/.agent/skills/doc.md +5 -5
- package/.agent/skills/documentation-templates/SKILL.md +19 -63
- package/.agent/skills/edge-computing/SKILL.md +75 -165
- package/.agent/skills/extract-design-system/SKILL.md +84 -58
- package/.agent/skills/framer-motion-expert/SKILL.md +195 -0
- package/.agent/skills/frontend-design/SKILL.md +151 -499
- package/.agent/skills/game-design-expert/SKILL.md +71 -0
- package/.agent/skills/game-engineering-expert/SKILL.md +88 -0
- package/.agent/skills/geo-fundamentals/SKILL.md +52 -178
- package/.agent/skills/github-operations/SKILL.md +197 -272
- package/.agent/skills/gsap-expert/SKILL.md +194 -0
- package/.agent/skills/i18n-localization/SKILL.md +60 -172
- package/.agent/skills/intelligent-routing/SKILL.md +123 -103
- package/.agent/skills/lint-and-validate/SKILL.md +8 -52
- package/.agent/skills/llm-engineering/SKILL.md +281 -195
- package/.agent/skills/local-first/SKILL.md +76 -159
- package/.agent/skills/mcp-builder/SKILL.md +48 -188
- package/.agent/skills/mobile-design/SKILL.md +213 -219
- package/.agent/skills/motion-engineering/SKILL.md +184 -0
- package/.agent/skills/nextjs-react-expert/SKILL.md +184 -203
- package/.agent/skills/nodejs-best-practices/SKILL.md +403 -185
- package/.agent/skills/observability/SKILL.md +211 -203
- package/.agent/skills/parallel-agents/SKILL.md +53 -146
- package/.agent/skills/performance-profiling/SKILL.md +171 -151
- package/.agent/skills/plan-writing/SKILL.md +49 -153
- package/.agent/skills/platform-engineer/SKILL.md +57 -103
- package/.agent/skills/playwright-best-practices/SKILL.md +110 -63
- package/.agent/skills/powershell-windows/SKILL.md +61 -179
- package/.agent/skills/python-patterns/SKILL.md +7 -35
- package/.agent/skills/python-pro/SKILL.md +273 -114
- package/.agent/skills/react-specialist/SKILL.md +227 -108
- package/.agent/skills/readme-builder/SKILL.md +15 -85
- package/.agent/skills/realtime-patterns/SKILL.md +216 -243
- package/.agent/skills/red-team-tactics/SKILL.md +10 -51
- package/.agent/skills/rust-pro/SKILL.md +525 -142
- package/.agent/skills/seo-fundamentals/SKILL.md +92 -153
- package/.agent/skills/server-management/SKILL.md +110 -166
- package/.agent/skills/shadcn-ui-expert/SKILL.md +154 -55
- package/.agent/skills/skill-creator/SKILL.md +18 -58
- package/.agent/skills/sql-pro/SKILL.md +543 -68
- package/.agent/skills/supabase-postgres-best-practices/SKILL.md +28 -68
- package/.agent/skills/swiftui-expert/SKILL.md +124 -57
- package/.agent/skills/systematic-debugging/SKILL.md +49 -151
- package/.agent/skills/tailwind-patterns/SKILL.md +433 -149
- package/.agent/skills/tdd-workflow/SKILL.md +63 -169
- package/.agent/skills/test-result-analyzer/SKILL.md +33 -73
- package/.agent/skills/testing-patterns/SKILL.md +437 -130
- package/.agent/skills/trend-researcher/SKILL.md +30 -71
- package/.agent/skills/ui-ux-pro-max/SKILL.md +0 -41
- package/.agent/skills/ui-ux-researcher/SKILL.md +51 -91
- package/.agent/skills/vue-expert/SKILL.md +225 -119
- package/.agent/skills/vulnerability-scanner/SKILL.md +264 -226
- package/.agent/skills/web-accessibility-auditor/SKILL.md +141 -58
- package/.agent/skills/web-design-guidelines/SKILL.md +17 -61
- package/.agent/skills/webapp-testing/SKILL.md +71 -196
- package/.agent/skills/whimsy-injector/SKILL.md +58 -132
- package/.agent/skills/workflow-optimizer/SKILL.md +28 -68
- package/.agent/workflows/api-tester.md +96 -224
- package/.agent/workflows/audit.md +81 -122
- package/.agent/workflows/brainstorm.md +69 -105
- package/.agent/workflows/changelog.md +65 -97
- package/.agent/workflows/create.md +73 -88
- package/.agent/workflows/debug.md +80 -111
- package/.agent/workflows/deploy.md +119 -92
- package/.agent/workflows/enhance.md +80 -91
- package/.agent/workflows/fix.md +68 -97
- package/.agent/workflows/generate.md +165 -164
- package/.agent/workflows/migrate.md +106 -109
- package/.agent/workflows/orchestrate.md +103 -86
- package/.agent/workflows/performance-benchmarker.md +77 -268
- package/.agent/workflows/plan.md +120 -98
- package/.agent/workflows/preview.md +39 -96
- package/.agent/workflows/refactor.md +105 -97
- package/.agent/workflows/review-ai.md +63 -102
- package/.agent/workflows/review.md +71 -110
- package/.agent/workflows/session.md +53 -113
- package/.agent/workflows/status.md +42 -88
- package/.agent/workflows/strengthen-skills.md +90 -51
- package/.agent/workflows/swarm.md +114 -129
- package/.agent/workflows/test.md +125 -102
- package/.agent/workflows/tribunal-backend.md +60 -78
- package/.agent/workflows/tribunal-database.md +62 -100
- package/.agent/workflows/tribunal-frontend.md +62 -82
- package/.agent/workflows/tribunal-full.md +56 -100
- package/.agent/workflows/tribunal-mobile.md +65 -94
- package/.agent/workflows/tribunal-performance.md +62 -105
- package/.agent/workflows/ui-ux-pro-max.md +72 -121
- package/README.md +11 -15
- package/package.json +1 -1
- package/.agent/skills/api-patterns/api-style.md +0 -42
- package/.agent/skills/api-patterns/auth.md +0 -24
- package/.agent/skills/api-patterns/documentation.md +0 -26
- package/.agent/skills/api-patterns/graphql.md +0 -41
- package/.agent/skills/api-patterns/rate-limiting.md +0 -31
- package/.agent/skills/api-patterns/response.md +0 -37
- package/.agent/skills/api-patterns/rest.md +0 -40
- package/.agent/skills/api-patterns/security-testing.md +0 -122
- package/.agent/skills/api-patterns/trpc.md +0 -41
- package/.agent/skills/api-patterns/versioning.md +0 -22
- package/.agent/skills/app-builder/agent-coordination.md +0 -71
- package/.agent/skills/app-builder/feature-building.md +0 -53
- package/.agent/skills/app-builder/project-detection.md +0 -34
- package/.agent/skills/app-builder/scaffolding.md +0 -118
- package/.agent/skills/app-builder/tech-stack.md +0 -40
- package/.agent/skills/architecture/context-discovery.md +0 -43
- package/.agent/skills/architecture/examples.md +0 -94
- package/.agent/skills/architecture/pattern-selection.md +0 -68
- package/.agent/skills/architecture/patterns-reference.md +0 -50
- package/.agent/skills/architecture/trade-off-analysis.md +0 -77
- package/.agent/skills/brainstorming/dynamic-questioning.md +0 -360
- package/.agent/skills/database-design/database-selection.md +0 -43
- package/.agent/skills/database-design/indexing.md +0 -39
- package/.agent/skills/database-design/migrations.md +0 -48
- package/.agent/skills/database-design/optimization.md +0 -36
- package/.agent/skills/database-design/orm-selection.md +0 -30
- package/.agent/skills/database-design/schema-design.md +0 -56
- package/.agent/skills/dotnet-core-expert/SKILL.md +0 -103
- package/.agent/skills/framer-motion-animations/SKILL.md +0 -74
- package/.agent/skills/frontend-design/animation-guide.md +0 -331
- package/.agent/skills/frontend-design/color-system.md +0 -329
- package/.agent/skills/frontend-design/decision-trees.md +0 -418
- package/.agent/skills/frontend-design/motion-graphics.md +0 -306
- package/.agent/skills/frontend-design/typography-system.md +0 -363
- package/.agent/skills/frontend-design/ux-psychology.md +0 -1116
- package/.agent/skills/frontend-design/visual-effects.md +0 -383
- 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
- package/.agent/skills/intelligent-routing/router-manifest.md +0 -65
- package/.agent/skills/mobile-design/decision-trees.md +0 -516
- package/.agent/skills/mobile-design/mobile-backend.md +0 -491
- package/.agent/skills/mobile-design/mobile-color-system.md +0 -420
- package/.agent/skills/mobile-design/mobile-debugging.md +0 -122
- package/.agent/skills/mobile-design/mobile-design-thinking.md +0 -357
- package/.agent/skills/mobile-design/mobile-navigation.md +0 -458
- package/.agent/skills/mobile-design/mobile-performance.md +0 -767
- package/.agent/skills/mobile-design/mobile-testing.md +0 -356
- package/.agent/skills/mobile-design/mobile-typography.md +0 -433
- package/.agent/skills/mobile-design/platform-android.md +0 -666
- package/.agent/skills/mobile-design/platform-ios.md +0 -561
- package/.agent/skills/mobile-design/touch-psychology.md +0 -537
- package/.agent/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +0 -312
- package/.agent/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +0 -240
- package/.agent/skills/nextjs-react-expert/3-server-server-side-performance.md +0 -490
- package/.agent/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +0 -264
- package/.agent/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +0 -581
- package/.agent/skills/nextjs-react-expert/6-rendering-rendering-performance.md +0 -432
- package/.agent/skills/nextjs-react-expert/7-js-javascript-performance.md +0 -684
- package/.agent/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +0 -150
- package/.agent/skills/vulnerability-scanner/checklists.md +0 -121
|
@@ -1,354 +1,279 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: github-operations
|
|
3
|
-
description:
|
|
4
|
-
allowed-tools: Read, Write, Edit, Glob, Grep
|
|
5
|
-
version:
|
|
6
|
-
last-updated: 2026-
|
|
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
7
|
applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
# GitHub Operations
|
|
11
|
-
|
|
12
|
-
> Git is a communication tool as much as a version control tool. Commit messages are letters to your future self and your team.
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## Ground Rules
|
|
17
|
-
|
|
18
|
-
1. **Never force-push to `main` or `master`** — use feature branches
|
|
19
|
-
2. **Always check `git status` before staging** — know what you are committing
|
|
20
|
-
3. **One logical change per commit** — atomic commits are easier to revert
|
|
21
|
-
4. **Pull before push** — always sync with remote first to avoid conflicts
|
|
22
|
-
5. **Never commit secrets** — use `.gitignore` and environment variables
|
|
10
|
+
# GitHub Operations — Git & CI/CD Workflow Mastery
|
|
23
11
|
|
|
24
12
|
---
|
|
25
13
|
|
|
26
|
-
##
|
|
27
|
-
|
|
28
|
-
### Standard Feature Branch Workflow
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
# 1. Always start from an up-to-date main
|
|
32
|
-
git checkout main
|
|
33
|
-
git pull origin main
|
|
34
|
-
|
|
35
|
-
# 2. Create a descriptive feature branch
|
|
36
|
-
git checkout -b feat/your-feature-name
|
|
37
|
-
|
|
38
|
-
# 3. Make changes, then stage selectively
|
|
39
|
-
git add -p # Interactive: review each hunk before staging
|
|
40
|
-
git add path/to/specific/file # Or stage specific files
|
|
14
|
+
## Branching Strategy
|
|
41
15
|
|
|
42
|
-
|
|
43
|
-
git commit -m "feat(scope): short summary of change
|
|
16
|
+
### Trunk-Based Development (Recommended)
|
|
44
17
|
|
|
45
|
-
- Detail 1: what was added/changed and why
|
|
46
|
-
- Detail 2: any side effects or dependencies"
|
|
47
|
-
|
|
48
|
-
# 5. Push and create PR
|
|
49
|
-
git push -u origin feat/your-feature-name
|
|
50
18
|
```
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
19
|
+
main ────●────●────●────●────●────●────●──→
|
|
20
|
+
\ / \ / \ /
|
|
21
|
+
\/ \/ \/
|
|
22
|
+
feat/auth fix/typo feat/dashboard
|
|
23
|
+
|
|
24
|
+
Rules:
|
|
25
|
+
- main is always deployable
|
|
26
|
+
- Feature branches live < 2 days
|
|
27
|
+
- Merge via squash PR
|
|
28
|
+
- Deploy on every merge to main
|
|
29
|
+
- Use feature flags for incomplete features
|
|
54
30
|
```
|
|
55
|
-
<type>(<scope>): <short summary>
|
|
56
31
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
[optional footer: BREAKING CHANGE, closes #issue]
|
|
60
|
-
```
|
|
32
|
+
### Git Flow (For Released Software)
|
|
61
33
|
|
|
62
|
-
**Types:**
|
|
63
|
-
| Type | Use When |
|
|
64
|
-
|------|----------|
|
|
65
|
-
| `feat` | New feature |
|
|
66
|
-
| `fix` | Bug fix |
|
|
67
|
-
| `docs` | Documentation only |
|
|
68
|
-
| `refactor` | Code restructure, no behavior change |
|
|
69
|
-
| `perf` | Performance improvement |
|
|
70
|
-
| `test` | Adding or fixing tests |
|
|
71
|
-
| `chore` | Build, CI, dependency updates |
|
|
72
|
-
| `style` | Formatting, whitespace (no logic) |
|
|
73
|
-
|
|
74
|
-
**Example commit messages:**
|
|
75
34
|
```
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
35
|
+
main ────●──────────────●──────────●──→
|
|
36
|
+
\ / \ /
|
|
37
|
+
develop ──●───●──●──●──●───●──●──●──●──→
|
|
38
|
+
\ / \ / \ /
|
|
39
|
+
\/ \ / \/
|
|
40
|
+
feature release hotfix
|
|
41
|
+
|
|
42
|
+
Use when:
|
|
43
|
+
- Versioned releases (mobile apps, libraries, SDKs)
|
|
44
|
+
- Multiple environments (staging, production)
|
|
45
|
+
- Long-lived feature development
|
|
80
46
|
```
|
|
81
47
|
|
|
82
48
|
---
|
|
83
49
|
|
|
84
|
-
##
|
|
50
|
+
## Commit Messages
|
|
85
51
|
|
|
86
|
-
###
|
|
52
|
+
### Conventional Commits
|
|
87
53
|
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
54
|
+
```
|
|
55
|
+
type(scope): description
|
|
56
|
+
|
|
57
|
+
Body (optional): WHY this change was made, not WHAT
|
|
58
|
+
|
|
59
|
+
Closes #123
|
|
60
|
+
|
|
61
|
+
Types:
|
|
62
|
+
feat: New feature
|
|
63
|
+
fix: Bug fix
|
|
64
|
+
docs: Documentation only
|
|
65
|
+
style: Formatting, whitespace (not CSS)
|
|
66
|
+
refactor: Code change that neither fixes nor adds
|
|
67
|
+
perf: Performance improvement
|
|
68
|
+
test: Adding or updating tests
|
|
69
|
+
chore: Build process, dependencies
|
|
70
|
+
ci: CI/CD changes
|
|
71
|
+
|
|
72
|
+
Examples:
|
|
73
|
+
✅ feat(auth): add OAuth2 Google login
|
|
74
|
+
✅ fix(cart): prevent negative quantities
|
|
75
|
+
✅ docs(api): add pagination examples to README
|
|
76
|
+
✅ refactor(users): extract validation to separate module
|
|
77
|
+
✅ perf(search): add database index for full-text queries
|
|
78
|
+
✅ chore(deps): upgrade React to v19
|
|
79
|
+
|
|
80
|
+
❌ BAD:
|
|
81
|
+
❌ "fixed stuff"
|
|
82
|
+
❌ "wip"
|
|
83
|
+
❌ "updates"
|
|
84
|
+
❌ "asdf"
|
|
85
|
+
❌ "final fix (for real this time)"
|
|
93
86
|
```
|
|
94
87
|
|
|
95
|
-
###
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
# Stage everything (use only when you know all changes are correct)
|
|
99
|
-
git add -A
|
|
100
|
-
|
|
101
|
-
# Stage interactively — review each change hunk
|
|
102
|
-
git add -p
|
|
88
|
+
### Breaking Changes
|
|
103
89
|
|
|
104
|
-
|
|
105
|
-
|
|
90
|
+
```
|
|
91
|
+
feat(api)!: rename /users endpoint to /accounts
|
|
106
92
|
|
|
107
|
-
|
|
108
|
-
|
|
93
|
+
BREAKING CHANGE: The /api/v1/users endpoint has been renamed to
|
|
94
|
+
/api/v1/accounts. All clients must update their API calls.
|
|
109
95
|
|
|
110
|
-
|
|
111
|
-
|
|
96
|
+
Migration:
|
|
97
|
+
- Replace all /api/v1/users → /api/v1/accounts
|
|
98
|
+
- Update API documentation
|
|
112
99
|
```
|
|
113
100
|
|
|
114
|
-
|
|
101
|
+
---
|
|
115
102
|
|
|
116
|
-
|
|
117
|
-
# Undo last commit, keep changes staged
|
|
118
|
-
git reset --soft HEAD~1
|
|
103
|
+
## Pull Request Best Practices
|
|
119
104
|
|
|
120
|
-
|
|
121
|
-
|
|
105
|
+
```markdown
|
|
106
|
+
## PR Template
|
|
122
107
|
|
|
123
|
-
|
|
124
|
-
|
|
108
|
+
### What
|
|
109
|
+
Brief description of what this PR does.
|
|
125
110
|
|
|
126
|
-
|
|
127
|
-
|
|
111
|
+
### Why
|
|
112
|
+
Why is this change needed? Link to issue/ticket.
|
|
128
113
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
echo "file.txt" >> .gitignore
|
|
132
|
-
```
|
|
114
|
+
### How
|
|
115
|
+
Technical approach. What was the design decision?
|
|
133
116
|
|
|
134
|
-
###
|
|
117
|
+
### Testing
|
|
118
|
+
- [ ] Unit tests added/updated
|
|
119
|
+
- [ ] Manual testing completed
|
|
120
|
+
- [ ] E2E tests passing
|
|
135
121
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
122
|
+
### Screenshots (if UI change)
|
|
123
|
+
Before | After
|
|
124
|
+
--- | ---
|
|
125
|
+
 | 
|
|
139
126
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
127
|
+
### Checklist
|
|
128
|
+
- [ ] Self-reviewed the diff
|
|
129
|
+
- [ ] No console.log/debugger statements
|
|
130
|
+
- [ ] Types are correct (no `any`)
|
|
131
|
+
- [ ] Error cases handled
|
|
132
|
+
- [ ] Documentation updated (if needed)
|
|
133
|
+
```
|
|
146
134
|
|
|
147
|
-
|
|
148
|
-
|
|
135
|
+
```
|
|
136
|
+
PR Rules:
|
|
137
|
+
1. < 400 lines changed (split larger PRs)
|
|
138
|
+
2. One logical change per PR
|
|
139
|
+
3. Write a clear title (not "fix things")
|
|
140
|
+
4. Link the issue/ticket
|
|
141
|
+
5. Self-review before requesting reviews
|
|
142
|
+
6. Respond to reviews within 24h
|
|
143
|
+
7. Squash merge to main (clean history)
|
|
149
144
|
```
|
|
150
145
|
|
|
151
|
-
|
|
146
|
+
---
|
|
152
147
|
|
|
153
|
-
|
|
154
|
-
# Show all remotes
|
|
155
|
-
git remote -v
|
|
148
|
+
## Common Git Operations
|
|
156
149
|
|
|
157
|
-
|
|
158
|
-
git remote add origin https://github.com/user/repo.git
|
|
150
|
+
### Interactive Rebase
|
|
159
151
|
|
|
160
|
-
|
|
161
|
-
|
|
152
|
+
```bash
|
|
153
|
+
# Clean up messy commits before merge
|
|
154
|
+
git rebase -i HEAD~3
|
|
162
155
|
|
|
163
|
-
#
|
|
164
|
-
|
|
156
|
+
# In the editor:
|
|
157
|
+
pick abc1234 feat(auth): add login endpoint
|
|
158
|
+
squash def5678 fix typo in login
|
|
159
|
+
squash ghi9012 add missing test
|
|
165
160
|
|
|
166
|
-
#
|
|
167
|
-
git push -u origin branch-name
|
|
161
|
+
# Result: One clean commit instead of three
|
|
168
162
|
|
|
169
|
-
#
|
|
170
|
-
|
|
163
|
+
# ❌ HALLUCINATION TRAP: Never rebase commits that are already pushed/shared
|
|
164
|
+
# Rebasing rewrites history → force push needed → breaks others' branches
|
|
165
|
+
# Only rebase LOCAL, unpushed commits
|
|
171
166
|
```
|
|
172
167
|
|
|
173
|
-
###
|
|
168
|
+
### Merge Conflict Resolution
|
|
174
169
|
|
|
175
170
|
```bash
|
|
176
|
-
#
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
#
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
# Clone a repo
|
|
192
|
-
gh repo clone owner/repo-name
|
|
171
|
+
# Step 1: Update your branch
|
|
172
|
+
git fetch origin
|
|
173
|
+
git rebase origin/main
|
|
174
|
+
|
|
175
|
+
# Step 2: When conflicts appear
|
|
176
|
+
# Open conflicted files, look for:
|
|
177
|
+
<<<<<<< HEAD
|
|
178
|
+
your changes
|
|
179
|
+
=======
|
|
180
|
+
their changes
|
|
181
|
+
main
|
|
182
|
+
|
|
183
|
+
# Step 3: Resolve, stage, continue
|
|
184
|
+
git add resolved-file.ts
|
|
185
|
+
git rebase --continue
|
|
193
186
|
|
|
194
|
-
#
|
|
195
|
-
|
|
187
|
+
# If things go wrong:
|
|
188
|
+
git rebase --abort # undo everything, back to before rebase
|
|
196
189
|
```
|
|
197
190
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
## Advanced Patterns
|
|
201
|
-
|
|
202
|
-
### Stashing Work in Progress
|
|
191
|
+
### Stash
|
|
203
192
|
|
|
204
193
|
```bash
|
|
205
|
-
#
|
|
206
|
-
git stash push -m "WIP:
|
|
194
|
+
# Save work without committing
|
|
195
|
+
git stash push -m "WIP: auth feature"
|
|
207
196
|
|
|
208
|
-
# List
|
|
197
|
+
# List stashes
|
|
209
198
|
git stash list
|
|
210
199
|
|
|
211
|
-
# Apply
|
|
212
|
-
git stash apply
|
|
213
|
-
|
|
214
|
-
# Apply a specific stash
|
|
215
|
-
git stash apply stash@{2}
|
|
216
|
-
|
|
217
|
-
# Apply and drop at once
|
|
200
|
+
# Apply and remove
|
|
218
201
|
git stash pop
|
|
219
202
|
|
|
220
|
-
#
|
|
221
|
-
git stash
|
|
203
|
+
# Apply without removing
|
|
204
|
+
git stash apply stash@{0}
|
|
222
205
|
```
|
|
223
206
|
|
|
224
|
-
###
|
|
207
|
+
### Undo Mistakes
|
|
225
208
|
|
|
226
209
|
```bash
|
|
227
|
-
#
|
|
228
|
-
git
|
|
210
|
+
# Undo last commit (keep changes staged)
|
|
211
|
+
git reset --soft HEAD~1
|
|
229
212
|
|
|
230
|
-
#
|
|
231
|
-
git
|
|
213
|
+
# Undo last commit (keep changes unstaged)
|
|
214
|
+
git reset HEAD~1
|
|
232
215
|
|
|
233
|
-
#
|
|
234
|
-
git
|
|
216
|
+
# Undo last commit (discard changes) ⚠️ DESTRUCTIVE
|
|
217
|
+
git reset --hard HEAD~1
|
|
235
218
|
|
|
236
|
-
#
|
|
237
|
-
git
|
|
238
|
-
git push origin --delete v1.2.0
|
|
239
|
-
```
|
|
219
|
+
# Undo a specific commit (creates a new commit)
|
|
220
|
+
git revert abc1234
|
|
240
221
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
# Interactive rebase to squash last N commits
|
|
245
|
-
git rebase -i HEAD~3
|
|
246
|
-
|
|
247
|
-
# In the editor: change 'pick' to 'squash' (or 's') for commits to merge
|
|
248
|
-
# Keep the first as 'pick', squash the rest into it
|
|
222
|
+
# Recover deleted branch
|
|
223
|
+
git reflog # find the commit
|
|
224
|
+
git checkout -b recovered abc1234
|
|
249
225
|
```
|
|
250
226
|
|
|
251
227
|
---
|
|
252
228
|
|
|
253
|
-
##
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
-
|
|
260
|
-
-
|
|
261
|
-
-
|
|
262
|
-
-
|
|
263
|
-
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
-
|
|
267
|
-
-
|
|
229
|
+
## Branch Protection Rules
|
|
230
|
+
|
|
231
|
+
```yaml
|
|
232
|
+
# Recommended rules for main branch:
|
|
233
|
+
Required:
|
|
234
|
+
- Require pull request before merging
|
|
235
|
+
- Require at least 1 approval
|
|
236
|
+
- Dismiss stale reviews on new push
|
|
237
|
+
- Require status checks to pass (CI)
|
|
238
|
+
- Require branches to be up to date
|
|
239
|
+
- Require signed commits (optional, enterprise)
|
|
240
|
+
|
|
241
|
+
Recommended:
|
|
242
|
+
- Restrict who can push (no direct push to main)
|
|
243
|
+
- Require linear history (squash merge)
|
|
244
|
+
- Auto-delete head branches after merge
|
|
268
245
|
```
|
|
269
246
|
|
|
270
247
|
---
|
|
271
248
|
|
|
272
|
-
##
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
Thumbs.db
|
|
286
|
-
coverage/
|
|
287
|
-
.nyc_output/
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
### Python
|
|
291
|
-
|
|
292
|
-
```gitignore
|
|
293
|
-
__pycache__/
|
|
294
|
-
*.py[cod]
|
|
295
|
-
*.egg-info/
|
|
296
|
-
dist/
|
|
297
|
-
build/
|
|
298
|
-
.venv/
|
|
299
|
-
venv/
|
|
300
|
-
.env
|
|
301
|
-
*.log
|
|
302
|
-
.pytest_cache/
|
|
249
|
+
## Git Hooks (Husky + lint-staged)
|
|
250
|
+
|
|
251
|
+
```json
|
|
252
|
+
// package.json
|
|
253
|
+
{
|
|
254
|
+
"scripts": {
|
|
255
|
+
"prepare": "husky"
|
|
256
|
+
},
|
|
257
|
+
"lint-staged": {
|
|
258
|
+
"*.{ts,tsx}": ["eslint --fix", "prettier --write"],
|
|
259
|
+
"*.{json,md,yml}": ["prettier --write"]
|
|
260
|
+
}
|
|
261
|
+
}
|
|
303
262
|
```
|
|
304
263
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
When this skill produces git operations or reviews them, structure your output as:
|
|
264
|
+
```bash
|
|
265
|
+
# .husky/pre-commit
|
|
266
|
+
npx lint-staged
|
|
310
267
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
Skill: github-operations
|
|
314
|
-
Scope: [repo name / branch]
|
|
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]
|
|
268
|
+
# .husky/commit-msg
|
|
269
|
+
npx commitlint --edit $1
|
|
323
270
|
```
|
|
324
271
|
|
|
325
|
-
|
|
326
|
-
|
|
272
|
+
```javascript
|
|
273
|
+
// commitlint.config.js
|
|
274
|
+
export default {
|
|
275
|
+
extends: ["@commitlint/config-conventional"],
|
|
276
|
+
};
|
|
277
|
+
```
|
|
327
278
|
|
|
328
279
|
---
|
|
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
|
-
```
|