@caddis/cli 0.0.0 → 0.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.
Files changed (153) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +150 -1
  3. package/bundles/antigravity-plugin/agents/code-reviewer.md +47 -0
  4. package/bundles/antigravity-plugin/agents/preflight.md +53 -0
  5. package/bundles/antigravity-plugin/guard_agy.py +338 -0
  6. package/bundles/antigravity-plugin/hooks.json +36 -0
  7. package/bundles/antigravity-plugin/mcp_config.json +8 -0
  8. package/bundles/antigravity-plugin/mcp_ping_server.py +55 -0
  9. package/bundles/antigravity-plugin/plugin.json +5 -0
  10. package/bundles/antigravity-plugin/session_end_agy.py +57 -0
  11. package/bundles/antigravity-plugin/skills/_registry.md +115 -0
  12. package/bundles/antigravity-plugin/skills/add-rules/SKILL.md +45 -0
  13. package/bundles/antigravity-plugin/skills/api-design/SKILL.md +249 -0
  14. package/bundles/antigravity-plugin/skills/backend-development/SKILL.md +305 -0
  15. package/bundles/antigravity-plugin/skills/best-practices/SKILL.md +500 -0
  16. package/bundles/antigravity-plugin/skills/best-practices/agents/best-practices-referencer.md +263 -0
  17. package/bundles/antigravity-plugin/skills/best-practices/agents/codebase-context-builder.md +326 -0
  18. package/bundles/antigravity-plugin/skills/best-practices/agents/task-intent-analyzer.md +245 -0
  19. package/bundles/antigravity-plugin/skills/best-practices/references/anti-patterns.md +571 -0
  20. package/bundles/antigravity-plugin/skills/best-practices/references/before-after-examples.md +1114 -0
  21. package/bundles/antigravity-plugin/skills/best-practices/references/best-practices-guide.md +513 -0
  22. package/bundles/antigravity-plugin/skills/best-practices/references/common-workflows.md +692 -0
  23. package/bundles/antigravity-plugin/skills/best-practices/references/prompt-patterns.md +547 -0
  24. package/bundles/antigravity-plugin/skills/brainstorming/SKILL.md +57 -0
  25. package/bundles/antigravity-plugin/skills/ci-cd-pipeline/SKILL.md +315 -0
  26. package/bundles/antigravity-plugin/skills/code-documentation/SKILL.md +271 -0
  27. package/bundles/antigravity-plugin/skills/code-review/SKILL.md +122 -0
  28. package/bundles/antigravity-plugin/skills/codebase-audit/SKILL.md +204 -0
  29. package/bundles/antigravity-plugin/skills/context-curator/SKILL.md +157 -0
  30. package/bundles/antigravity-plugin/skills/cross-review/SKILL.md +40 -0
  31. package/bundles/antigravity-plugin/skills/css-architecture/SKILL.md +305 -0
  32. package/bundles/antigravity-plugin/skills/css-architecture/references/RESPONSIVE-DESIGN.md +604 -0
  33. package/bundles/antigravity-plugin/skills/database-design/SKILL.md +177 -0
  34. package/bundles/antigravity-plugin/skills/db-diagram/SKILL.md +148 -0
  35. package/bundles/antigravity-plugin/skills/db-diagram/scripts/sql_to_graph.py +1212 -0
  36. package/bundles/antigravity-plugin/skills/digress/SKILL.md +61 -0
  37. package/bundles/antigravity-plugin/skills/draw-io/SKILL.md +162 -0
  38. package/bundles/antigravity-plugin/skills/draw-io/references/aws-icons.md +677 -0
  39. package/bundles/antigravity-plugin/skills/draw-io/references/layout-guidelines.md +142 -0
  40. package/bundles/antigravity-plugin/skills/draw-io/references/troubleshooting.md +118 -0
  41. package/bundles/antigravity-plugin/skills/draw-io/references/workflows.md +103 -0
  42. package/bundles/antigravity-plugin/skills/draw-io/scripts/convert-drawio-to-png.sh +25 -0
  43. package/bundles/antigravity-plugin/skills/draw-io/scripts/find_aws_icon.py +79 -0
  44. package/bundles/antigravity-plugin/skills/error-handling/SKILL.md +260 -0
  45. package/bundles/antigravity-plugin/skills/excalidraw-db/SKILL.md +38 -0
  46. package/bundles/antigravity-plugin/skills/fastapi-dev/SKILL.md +300 -0
  47. package/bundles/antigravity-plugin/skills/feature-plan/SKILL.md +198 -0
  48. package/bundles/antigravity-plugin/skills/frontend-design/SKILL.md +193 -0
  49. package/bundles/antigravity-plugin/skills/frontend-design/references/my-tech-stack.md +127 -0
  50. package/bundles/antigravity-plugin/skills/gh-cli/SKILL.md +195 -0
  51. package/bundles/antigravity-plugin/skills/git-commit/SKILL.md +285 -0
  52. package/bundles/antigravity-plugin/skills/golden-plan/SKILL.md +577 -0
  53. package/bundles/antigravity-plugin/skills/handoff/SKILL.md +100 -0
  54. package/bundles/antigravity-plugin/skills/implement/SKILL.md +114 -0
  55. package/bundles/antigravity-plugin/skills/javascript-typescript/SKILL.md +142 -0
  56. package/bundles/antigravity-plugin/skills/kb/SKILL.md +60 -0
  57. package/bundles/antigravity-plugin/skills/mermaid-db/SKILL.md +33 -0
  58. package/bundles/antigravity-plugin/skills/mermaid-diagrams/SKILL.md +236 -0
  59. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/ENHANCEMENTS.md +264 -0
  60. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/MERMAID-SUMMARY.md +137 -0
  61. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/advanced-features.md +556 -0
  62. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/architecture-diagrams.md +192 -0
  63. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/c4-diagrams.md +410 -0
  64. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/class-diagrams.md +361 -0
  65. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/erd-diagrams.md +510 -0
  66. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/flowcharts.md +450 -0
  67. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/sequence-diagrams.md +394 -0
  68. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/troubleshooting.md +335 -0
  69. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/workflows.md +418 -0
  70. package/bundles/antigravity-plugin/skills/migrate-dir/SKILL.md +68 -0
  71. package/bundles/antigravity-plugin/skills/mockup/SKILL.md +242 -0
  72. package/bundles/antigravity-plugin/skills/particle-art/SKILL.md +243 -0
  73. package/bundles/antigravity-plugin/skills/particle-art/references/canvas-utils.ts +171 -0
  74. package/bundles/antigravity-plugin/skills/particle-art/references/dot-field.template.tsx +203 -0
  75. package/bundles/antigravity-plugin/skills/particle-art/references/flow-field.template.tsx +263 -0
  76. package/bundles/antigravity-plugin/skills/particle-art/references/node-shape.template.tsx +261 -0
  77. package/bundles/antigravity-plugin/skills/particle-art/references/shape-sampler.ts +281 -0
  78. package/bundles/antigravity-plugin/skills/particle-art/references/stipple-morph.template.tsx +167 -0
  79. package/bundles/antigravity-plugin/skills/particle-art/references/stipple.template.tsx +175 -0
  80. package/bundles/antigravity-plugin/skills/particle-art/references/trail-ghost.template.tsx +266 -0
  81. package/bundles/antigravity-plugin/skills/particle-art/references/usage-examples.md +320 -0
  82. package/bundles/antigravity-plugin/skills/playwright/API_REFERENCE.md +653 -0
  83. package/bundles/antigravity-plugin/skills/playwright/SKILL.md +454 -0
  84. package/bundles/antigravity-plugin/skills/playwright/lib/helpers.js +441 -0
  85. package/bundles/antigravity-plugin/skills/playwright/package.json +26 -0
  86. package/bundles/antigravity-plugin/skills/playwright/run.js +228 -0
  87. package/bundles/antigravity-plugin/skills/prd/SKILL.md +107 -0
  88. package/bundles/antigravity-plugin/skills/preflight/SKILL.md +435 -0
  89. package/bundles/antigravity-plugin/skills/python/SKILL.md +388 -0
  90. package/bundles/antigravity-plugin/skills/react-best-practices/SKILL.md +269 -0
  91. package/bundles/antigravity-plugin/skills/react-dev/README.md +404 -0
  92. package/bundles/antigravity-plugin/skills/react-dev/SKILL.md +459 -0
  93. package/bundles/antigravity-plugin/skills/react-dev/examples/generic-components.md +579 -0
  94. package/bundles/antigravity-plugin/skills/react-dev/examples/server-components.md +579 -0
  95. package/bundles/antigravity-plugin/skills/react-dev/references/event-handlers.md +574 -0
  96. package/bundles/antigravity-plugin/skills/react-dev/references/hooks.md +456 -0
  97. package/bundles/antigravity-plugin/skills/react-dev/references/react-19-patterns.md +638 -0
  98. package/bundles/antigravity-plugin/skills/react-dev/references/react-router.md +1002 -0
  99. package/bundles/antigravity-plugin/skills/react-dev/references/tanstack-router.md +587 -0
  100. package/bundles/antigravity-plugin/skills/refactoring/SKILL.md +486 -0
  101. package/bundles/antigravity-plugin/skills/resume/SKILL.md +36 -0
  102. package/bundles/antigravity-plugin/skills/security-review/SKILL.md +196 -0
  103. package/bundles/antigravity-plugin/skills/setup-project-ai/SKILL.md +61 -0
  104. package/bundles/antigravity-plugin/skills/ship/SKILL.md +107 -0
  105. package/bundles/antigravity-plugin/skills/ship-merge/SKILL.md +103 -0
  106. package/bundles/antigravity-plugin/skills/ship-pr/SKILL.md +102 -0
  107. package/bundles/antigravity-plugin/skills/skill-creator/LICENSE.txt +202 -0
  108. package/bundles/antigravity-plugin/skills/skill-creator/SKILL.md +491 -0
  109. package/bundles/antigravity-plugin/skills/skill-creator/agents/analyzer.md +274 -0
  110. package/bundles/antigravity-plugin/skills/skill-creator/agents/comparator.md +202 -0
  111. package/bundles/antigravity-plugin/skills/skill-creator/agents/grader.md +223 -0
  112. package/bundles/antigravity-plugin/skills/skill-creator/assets/eval_review.html +146 -0
  113. package/bundles/antigravity-plugin/skills/skill-creator/eval-viewer/generate_review.py +471 -0
  114. package/bundles/antigravity-plugin/skills/skill-creator/eval-viewer/viewer.html +1325 -0
  115. package/bundles/antigravity-plugin/skills/skill-creator/references/schemas.md +430 -0
  116. package/bundles/antigravity-plugin/skills/skill-creator/scripts/__init__.py +0 -0
  117. package/bundles/antigravity-plugin/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  118. package/bundles/antigravity-plugin/skills/skill-creator/scripts/generate_report.py +326 -0
  119. package/bundles/antigravity-plugin/skills/skill-creator/scripts/improve_description.py +247 -0
  120. package/bundles/antigravity-plugin/skills/skill-creator/scripts/package_skill.py +136 -0
  121. package/bundles/antigravity-plugin/skills/skill-creator/scripts/quick_validate.py +103 -0
  122. package/bundles/antigravity-plugin/skills/skill-creator/scripts/run_eval.py +310 -0
  123. package/bundles/antigravity-plugin/skills/skill-creator/scripts/run_loop.py +328 -0
  124. package/bundles/antigravity-plugin/skills/skill-creator/scripts/utils.py +47 -0
  125. package/bundles/antigravity-plugin/skills/sql/SKILL.md +321 -0
  126. package/bundles/antigravity-plugin/skills/tdd/SKILL.md +37 -0
  127. package/bundles/antigravity-plugin/skills/tdd-workflow/SKILL.md +188 -0
  128. package/bundles/antigravity-plugin/skills/technical-writing/SKILL.md +286 -0
  129. package/bundles/antigravity-plugin/skills/test-strategy/SKILL.md +155 -0
  130. package/bundles/antigravity-plugin/skills/ui-brief/SKILL.md +84 -0
  131. package/bundles/antigravity-plugin/skills/ui-review/SKILL.md +176 -0
  132. package/bundles/antigravity-plugin/skills/ui-review/references/framework-fixes.md +471 -0
  133. package/bundles/antigravity-plugin/skills/ui-review/references/visual-checklist.md +236 -0
  134. package/bundles/antigravity-plugin/skills/usage-review/SKILL.md +77 -0
  135. package/bundles/antigravity-plugin/skills/use-model/SKILL.md +64 -0
  136. package/bundles/antigravity-plugin/skills/using-git-worktrees/SKILL.md +217 -0
  137. package/bundles/antigravity-plugin/skills/version/SKILL.md +18 -0
  138. package/bundles/antigravity-plugin/skills/warm-editorial-ui/DESIGN_TOKENS.md +487 -0
  139. package/bundles/antigravity-plugin/skills/warm-editorial-ui/IMPLEMENTATION_GUIDE.md +177 -0
  140. package/bundles/antigravity-plugin/skills/warm-editorial-ui/SKILL.md +732 -0
  141. package/bundles/antigravity-plugin/skills/webapp-testing/LICENSE.txt +202 -0
  142. package/bundles/antigravity-plugin/skills/webapp-testing/SKILL.md +97 -0
  143. package/bundles/antigravity-plugin/skills/webapp-testing/examples/console_logging.py +35 -0
  144. package/bundles/antigravity-plugin/skills/webapp-testing/examples/element_discovery.py +40 -0
  145. package/bundles/antigravity-plugin/skills/webapp-testing/examples/static_html_automation.py +33 -0
  146. package/bundles/antigravity-plugin/skills/webapp-testing/scripts/with_server.py +106 -0
  147. package/bundles/antigravity-plugin/skills/windows-deployment/SKILL.md +880 -0
  148. package/bundles/antigravity-plugin/skills/writing-plans/SKILL.md +384 -0
  149. package/bundles/antigravity-plugin/statusline-command-agy.sh +91 -0
  150. package/bundles/antigravity-plugin/warm_start_agy.py +149 -0
  151. package/bundles/manifest.json +6 -0
  152. package/dist/cli.js +5363 -0
  153. package/package.json +61 -4
@@ -0,0 +1,195 @@
1
+ ---
2
+ name: gh-cli
3
+ description: "GitHub CLI operations — issues, PRs, releases, and repo management"
4
+ ---
5
+
6
+ # GitHub CLI Operations
7
+
8
+ Practical reference for `gh` — the GitHub CLI. Covers repos, issues, PRs, releases, Actions, and automation.
9
+
10
+ ## Prerequisites
11
+
12
+ ```bash
13
+ # Install
14
+ brew install gh # macOS
15
+ winget install GitHub.cli # Windows
16
+ sudo apt install gh # Linux
17
+
18
+ # Authenticate and verify
19
+ gh auth login
20
+ gh auth status
21
+ ```
22
+
23
+ ## Phase 1: Repositories
24
+
25
+ ```bash
26
+ # Create and clone
27
+ gh repo create my-project --public --description "My project" --clone
28
+ gh repo clone owner/repo
29
+ gh repo fork owner/repo --clone
30
+
31
+ # View and edit
32
+ gh repo view owner/repo
33
+ gh repo edit --description "Updated desc"
34
+ gh browse # Open in browser
35
+
36
+ # Sync fork
37
+ gh repo sync
38
+ ```
39
+
40
+ ## Phase 2: Issues
41
+
42
+ ```bash
43
+ # Create
44
+ gh issue create --title "Bug: login broken" --labels bug --assignee @me
45
+
46
+ # List and search
47
+ gh issue list
48
+ gh issue list --labels bug --assignee @me
49
+ gh issue list --search "is:open label:bug sort:updated-desc"
50
+ gh issue list --json number,title --jq '.[].title'
51
+
52
+ # Manage
53
+ gh issue view 42
54
+ gh issue close 42 --comment "Fixed in PR #55"
55
+ gh issue edit 42 --add-label priority-high
56
+ gh issue develop 42 --branch fix/issue-42
57
+ ```
58
+
59
+ ## Phase 3: Pull Requests
60
+
61
+ ```bash
62
+ # Create
63
+ gh pr create --title "feat: add dark mode" --body "Closes #42" --reviewer user
64
+ gh pr create --draft --title "WIP: new feature"
65
+
66
+ # List and view
67
+ gh pr list
68
+ gh pr list --author @me
69
+ gh pr view 55
70
+ gh pr diff 55
71
+
72
+ # Review and merge
73
+ gh pr checkout 55
74
+ gh pr review 55 --approve --body "LGTM!"
75
+ gh pr review 55 --request-changes --body "Please fix error handling"
76
+ gh pr merge 55 --squash --delete-branch
77
+
78
+ # Manage
79
+ gh pr ready 55 # Mark draft as ready
80
+ gh pr checks 55 --watch # Watch CI
81
+ gh pr edit 55 --add-label reviewed
82
+ gh pr update-branch 55 # Rebase with base
83
+ ```
84
+
85
+ ## Phase 4: Releases
86
+
87
+ ```bash
88
+ # Create
89
+ gh release create v1.2.0 --generate-notes --title "v1.2.0"
90
+ gh release create v1.2.0 --notes-file CHANGELOG.md
91
+ gh release create v1.2.0 ./dist/*.tar.gz # With assets
92
+
93
+ # Manage
94
+ gh release list
95
+ gh release view v1.2.0
96
+ gh release download v1.2.0 --pattern "*.tar.gz" --dir ./downloads
97
+ gh release upload v1.2.0 ./dist/checksums.txt
98
+ gh release delete v1.2.0 --yes
99
+ ```
100
+
101
+ ## Phase 5: GitHub Actions
102
+
103
+ ```bash
104
+ # Monitor
105
+ gh run list
106
+ gh run list --workflow ci.yml
107
+ gh run view 123456 --log
108
+ gh run watch 123456
109
+ gh run download 123456 --dir ./artifacts
110
+
111
+ # Trigger
112
+ gh workflow run deploy.yml
113
+ gh workflow run deploy.yml --raw-field environment=staging
114
+
115
+ # Manage
116
+ gh run rerun 123456
117
+ gh run cancel 123456
118
+
119
+ # Secrets and variables
120
+ gh secret list
121
+ echo "value" | gh secret set API_KEY
122
+ gh secret set DB_PASS --env production
123
+ gh variable set DEPLOY_ENV --body "staging"
124
+ ```
125
+
126
+ ## Phase 6: Advanced
127
+
128
+ ### API Requests
129
+
130
+ ```bash
131
+ gh api /repos/owner/repo/contributors --jq '.[].login'
132
+ gh api --method POST /repos/owner/repo/issues \
133
+ --field title="API issue" --field body="Created via gh api"
134
+ ```
135
+
136
+ ### Bulk Operations
137
+
138
+ ```bash
139
+ # Close stale issues
140
+ gh issue list --search "label:stale" --json number --jq '.[].number' | \
141
+ xargs -I {} gh issue close {} --comment "Closing as stale"
142
+
143
+ # Label all open PRs
144
+ gh pr list --json number --jq '.[].number' | \
145
+ xargs -I {} gh pr edit {} --add-label needs-review
146
+ ```
147
+
148
+ ### Search
149
+
150
+ ```bash
151
+ gh search repos "topic:fastapi stars:>100" --json name,url
152
+ gh search code "def authenticate" --repo owner/repo
153
+ gh search issues "label:bug state:open" --limit 20
154
+ ```
155
+
156
+ ### Aliases
157
+
158
+ ```bash
159
+ gh alias set co 'pr checkout'
160
+ gh alias set myissues 'issue list --assignee @me'
161
+ gh alias set review 'pr list --search "review-requested:@me"'
162
+ ```
163
+
164
+ ## Common Workflows
165
+
166
+ ### Issue to PR (Full Cycle)
167
+
168
+ ```bash
169
+ gh issue develop 42 --branch fix/issue-42
170
+ git add . && git commit -m "fix: resolve login bug" && git push -u origin HEAD
171
+ gh pr create --title "fix: resolve login bug" --body "Closes #42"
172
+ gh pr checks --watch
173
+ gh pr merge --squash --delete-branch
174
+ ```
175
+
176
+ ### Release Workflow
177
+
178
+ ```bash
179
+ git tag v1.3.0 && git push origin v1.3.0
180
+ gh release create v1.3.0 --generate-notes --title "v1.3.0"
181
+ gh release upload v1.3.0 ./dist/*.tar.gz
182
+ ```
183
+
184
+ ## Quick Reference
185
+
186
+ | Task | Command |
187
+ |-------------------|------------------------------------------------|
188
+ | Create repo | `gh repo create name --public` |
189
+ | Create issue | `gh issue create --title "..." --labels bug` |
190
+ | Create PR | `gh pr create --title "..." --reviewer user` |
191
+ | Merge PR | `gh pr merge 55 --squash --delete-branch` |
192
+ | Create release | `gh release create v1.0.0 --generate-notes` |
193
+ | Watch CI | `gh run watch` |
194
+ | Set secret | `echo "val" \| gh secret set KEY` |
195
+ | API call | `gh api /repos/o/r --jq '.description'` |
@@ -0,0 +1,285 @@
1
+ ---
2
+ name: git-commit
3
+ description: Create well-structured conventional commit messages following Conventional Commits standard. Use when committing changes, preparing PRs, or generating changelogs.
4
+ ---
5
+
6
+ # Git Commit Skill
7
+
8
+ Create meaningful, conventional commit messages that follow team standards.
9
+
10
+ ## Trigger
11
+
12
+ Activate when:
13
+ - User asks to commit changes
14
+ - User needs help writing a commit message
15
+ - User asks "what should I commit this as?"
16
+
17
+ ---
18
+
19
+ ## Conventional Commit Format
20
+
21
+ ```
22
+ <type>(<scope>): <subject>
23
+
24
+ [optional body]
25
+
26
+ [optional footer]
27
+ ```
28
+
29
+ ### Types
30
+
31
+ | Type | Description | Example |
32
+ |------|-------------|---------|
33
+ | `feat` | New feature | `feat(complaints): add priority filtering` |
34
+ | `fix` | Bug fix | `fix(auth): resolve session timeout issue` |
35
+ | `docs` | Documentation | `docs: update API documentation` |
36
+ | `style` | Formatting (no code change) | `style: fix indentation in models` |
37
+ | `refactor` | Code restructuring | `refactor(db): extract query builder` |
38
+ | `perf` | Performance improvement | `perf: add caching to dashboard` |
39
+ | `test` | Adding/fixing tests | `test: add complaint service tests` |
40
+ | `chore` | Maintenance | `chore: update dependencies` |
41
+ | `ci` | CI/CD changes | `ci: add pytest to GitHub Actions` |
42
+ | `build` | Build system/dependencies | `build: update webpack to v5` |
43
+ | `revert` | Revert a previous commit | `revert: revert feat(api) endpoint` |
44
+
45
+ ### Scope
46
+
47
+ Optional area of change:
48
+ - `api` - Backend API changes
49
+ - `ui` - Frontend/Streamlit changes
50
+ - `db` - Database changes
51
+ - `auth` - Authentication
52
+ - `complaints` - Complaints feature
53
+ - `analytics` - Analytics feature
54
+
55
+ ---
56
+
57
+ ## Phase 1: Analyze Changes
58
+
59
+ ### Actions
60
+
61
+ 0. **Run a pre-commit quality gate (blocking)**
62
+ ```bash
63
+ # Python repos
64
+ ruff check .
65
+
66
+ # TypeScript/React repos
67
+ npm run lint
68
+
69
+ # If both stacks exist, run both.
70
+ ```
71
+
72
+ If lint fails, do not proceed to commit generation until fixed.
73
+
74
+ 1. **Review staged changes**
75
+ ```bash
76
+ # If files are staged, use staged diff
77
+ git diff --staged --stat
78
+ git diff --staged
79
+
80
+ # If nothing staged, check working tree
81
+ git diff
82
+ git status --porcelain
83
+ ```
84
+
85
+ 2. **Stage files if needed**
86
+ ```bash
87
+ # Stage specific files
88
+ git add path/to/file1 path/to/file2
89
+
90
+ # Stage by pattern
91
+ git add *.test.*
92
+ git add src/components/*
93
+ ```
94
+
95
+ **Never stage secrets** (`.env`, `credentials.json`, private keys).
96
+
97
+ 3. **Categorize the changes**
98
+ - What files were modified?
99
+ - What was the primary purpose?
100
+ - Are there multiple logical changes?
101
+
102
+ 3. **Identify the commit type**
103
+ - New functionality → `feat`
104
+ - Bug fix → `fix`
105
+ - Code improvement without behavior change → `refactor`
106
+ - Tests → `test`
107
+ - Documentation → `docs`
108
+
109
+ ---
110
+
111
+ ## Phase 2: Craft the Message
112
+
113
+ ### Subject Line Rules
114
+
115
+ 1. **Use imperative mood**: "add" not "added" or "adds"
116
+ 2. **No period** at the end
117
+ 3. **50 characters or less** (hard limit: 72)
118
+ 4. **Lowercase** after the colon
119
+
120
+ ```
121
+ # ✅ Good
122
+ feat(complaints): add priority filter to dashboard
123
+ fix(api): handle null customer_id in query
124
+ refactor(db): extract database adapter class
125
+
126
+ # ❌ Bad
127
+ feat(complaints): Added priority filter to dashboard. # Past tense, period
128
+ FEAT: ADD PRIORITY FILTER # Uppercase, no scope
129
+ fix: various bug fixes # Too vague
130
+ ```
131
+
132
+ ### Body (When Needed)
133
+
134
+ Include body when:
135
+ - Change needs explanation
136
+ - There's context that isn't obvious
137
+ - Breaking changes exist
138
+
139
+ ```
140
+ feat(api): add complaint analytics endpoint
141
+
142
+ Add new endpoint for retrieving complaint statistics
143
+ including resolution times, category distribution, and
144
+ trend analysis.
145
+
146
+ This endpoint powers the new analytics dashboard.
147
+ ```
148
+
149
+ ### Footer (When Needed)
150
+
151
+ ```
152
+ # Breaking change
153
+ feat(api)!: change complaint response format
154
+
155
+ BREAKING CHANGE: complaint.created_at now returns ISO format
156
+
157
+ # Issue reference
158
+ fix(ui): resolve dashboard loading error
159
+
160
+ Fixes #123
161
+ ```
162
+
163
+ ---
164
+
165
+ ## Phase 3: Generate Message
166
+
167
+ ### Template
168
+
169
+ Based on the changes, generate:
170
+
171
+ ```markdown
172
+ ## Suggested Commit Message
173
+
174
+ ```
175
+ <type>(<scope>): <subject>
176
+
177
+ <body if needed>
178
+ ```
179
+
180
+ ### Reasoning
181
+ - Type: [Why this type was chosen]
182
+ - Scope: [Area of the codebase affected]
183
+ - Subject: [What the change does]
184
+ ```
185
+
186
+ ---
187
+
188
+ ## Examples
189
+
190
+ ### Simple Feature
191
+
192
+ **Changes**: Added a new filter dropdown to the complaints dashboard
193
+
194
+ ```
195
+ feat(ui): add status filter to complaints dashboard
196
+ ```
197
+
198
+ ### Bug Fix with Context
199
+
200
+ **Changes**: Fixed issue where queries with special characters caused errors
201
+
202
+ ```
203
+ fix(db): escape special characters in search queries
204
+
205
+ The search function was failing when users entered characters
206
+ like quotes or semicolons. Added proper escaping using
207
+ parameterized queries.
208
+
209
+ Fixes #42
210
+ ```
211
+
212
+ ### Refactoring
213
+
214
+ **Changes**: Moved database logic from routes to repository classes
215
+
216
+ ```
217
+ refactor(api): extract database operations to repository layer
218
+
219
+ Move direct database calls from route handlers to dedicated
220
+ repository classes. This improves testability and follows
221
+ the separation of concerns principle.
222
+ ```
223
+
224
+ ### Multiple Files, Single Purpose
225
+
226
+ **Changes**: Updated multiple files to add logging
227
+
228
+ ```
229
+ feat: add structured logging throughout application
230
+
231
+ - Add loguru configuration in config.py
232
+ - Replace print statements with logger calls
233
+ - Add request logging middleware
234
+ ```
235
+
236
+ ### Breaking Change
237
+
238
+ **Changes**: Changed API response format
239
+
240
+ ```
241
+ feat(api)!: standardize API response envelope
242
+
243
+ BREAKING CHANGE: All API responses now wrapped in
244
+ { "data": ..., "meta": { "timestamp": ... } } format.
245
+
246
+ Clients need to update response parsing logic.
247
+ ```
248
+
249
+ ---
250
+
251
+ ## Quick Reference
252
+
253
+ When in doubt, ask yourself:
254
+
255
+ 1. **What type of change is this?** → Choose type
256
+ 2. **What area does it affect?** → Choose scope
257
+ 3. **What does it do?** (in imperative) → Write subject
258
+ 4. **Why was this done?** → Write body if needed
259
+ 5. **Does it break anything?** → Add BREAKING CHANGE if yes
260
+
261
+ ---
262
+
263
+ ## Git Safety Protocol
264
+
265
+ - NEVER update git config
266
+ - NEVER run destructive commands (`--force`, hard reset) without explicit user request
267
+ - NEVER skip hooks (`--no-verify`) unless user asks
268
+ - NEVER force push to main/master
269
+ - ALWAYS verify lint gate status before creating a commit message
270
+ - If a commit fails due to pre-commit hooks, fix the issue and create a NEW commit (don't amend the failed one)
271
+ - One logical change per commit
272
+ - Reference issues in footers: `Closes #123`, `Refs #456`
273
+
274
+ ---
275
+
276
+ ## Commit Message Checklist
277
+
278
+ - [ ] Type is appropriate for the change
279
+ - [ ] Scope identifies the affected area
280
+ - [ ] Subject uses imperative mood
281
+ - [ ] Subject is under 50 characters
282
+ - [ ] Body explains "why" if not obvious
283
+ - [ ] Breaking changes are marked with `!` and footer
284
+ - [ ] Related issues are referenced
285
+ - [ ] No secrets or credentials in staged files