@qazuor/claude-code-config 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 (171) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1248 -0
  3. package/dist/bin.cjs +11886 -0
  4. package/dist/bin.cjs.map +1 -0
  5. package/dist/bin.d.cts +1 -0
  6. package/dist/bin.d.ts +1 -0
  7. package/dist/bin.js +11869 -0
  8. package/dist/bin.js.map +1 -0
  9. package/dist/index.cjs +3887 -0
  10. package/dist/index.cjs.map +1 -0
  11. package/dist/index.d.cts +1325 -0
  12. package/dist/index.d.ts +1325 -0
  13. package/dist/index.js +3835 -0
  14. package/dist/index.js.map +1 -0
  15. package/package.json +86 -0
  16. package/templates/.log/notifications.log +1775 -0
  17. package/templates/agents/README.md +164 -0
  18. package/templates/agents/_registry.json +443 -0
  19. package/templates/agents/design/content-writer.md +353 -0
  20. package/templates/agents/design/ux-ui-designer.md +382 -0
  21. package/templates/agents/engineering/astro-engineer.md +293 -0
  22. package/templates/agents/engineering/db-drizzle-engineer.md +360 -0
  23. package/templates/agents/engineering/express-engineer.md +316 -0
  24. package/templates/agents/engineering/fastify-engineer.md +399 -0
  25. package/templates/agents/engineering/hono-engineer.md +263 -0
  26. package/templates/agents/engineering/mongoose-engineer.md +473 -0
  27. package/templates/agents/engineering/nestjs-engineer.md +429 -0
  28. package/templates/agents/engineering/nextjs-engineer.md +451 -0
  29. package/templates/agents/engineering/node-typescript-engineer.md +347 -0
  30. package/templates/agents/engineering/prisma-engineer.md +432 -0
  31. package/templates/agents/engineering/react-senior-dev.md +394 -0
  32. package/templates/agents/engineering/tanstack-start-engineer.md +447 -0
  33. package/templates/agents/engineering/tech-lead.md +269 -0
  34. package/templates/agents/product/product-functional.md +329 -0
  35. package/templates/agents/product/product-technical.md +578 -0
  36. package/templates/agents/quality/debugger.md +514 -0
  37. package/templates/agents/quality/qa-engineer.md +390 -0
  38. package/templates/agents/specialized/enrichment-agent.md +277 -0
  39. package/templates/agents/specialized/i18n-specialist.md +322 -0
  40. package/templates/agents/specialized/seo-ai-specialist.md +387 -0
  41. package/templates/agents/specialized/tech-writer.md +300 -0
  42. package/templates/code-style/.editorconfig +27 -0
  43. package/templates/code-style/.prettierignore +25 -0
  44. package/templates/code-style/.prettierrc +12 -0
  45. package/templates/code-style/biome.json +78 -0
  46. package/templates/code-style/commitlint.config.js +44 -0
  47. package/templates/commands/README.md +175 -0
  48. package/templates/commands/_registry.json +420 -0
  49. package/templates/commands/add-new-entity.md +211 -0
  50. package/templates/commands/audit/accessibility-audit.md +360 -0
  51. package/templates/commands/audit/performance-audit.md +290 -0
  52. package/templates/commands/audit/security-audit.md +231 -0
  53. package/templates/commands/code-check.md +127 -0
  54. package/templates/commands/five-why.md +225 -0
  55. package/templates/commands/formatting/format-markdown.md +197 -0
  56. package/templates/commands/git/commit.md +247 -0
  57. package/templates/commands/meta/create-agent.md +257 -0
  58. package/templates/commands/meta/create-command.md +312 -0
  59. package/templates/commands/meta/create-skill.md +321 -0
  60. package/templates/commands/meta/help.md +318 -0
  61. package/templates/commands/planning/check-completed-tasks.md +224 -0
  62. package/templates/commands/planning/cleanup-issues.md +248 -0
  63. package/templates/commands/planning/planning-cleanup.md +251 -0
  64. package/templates/commands/planning/sync-planning-github.md +133 -0
  65. package/templates/commands/planning/sync-todos-github.md +203 -0
  66. package/templates/commands/quality-check.md +211 -0
  67. package/templates/commands/run-tests.md +159 -0
  68. package/templates/commands/start-feature-plan.md +232 -0
  69. package/templates/commands/start-refactor-plan.md +244 -0
  70. package/templates/commands/sync-planning.md +176 -0
  71. package/templates/commands/update-docs.md +242 -0
  72. package/templates/docs/CHECKPOINT-SYSTEM.md +504 -0
  73. package/templates/docs/INDEX.md +677 -0
  74. package/templates/docs/RECOMMENDED-HOOKS.md +415 -0
  75. package/templates/docs/_registry.json +329 -0
  76. package/templates/docs/diagrams/README.md +220 -0
  77. package/templates/docs/diagrams/agent-hierarchy.mmd +55 -0
  78. package/templates/docs/diagrams/documentation-map.mmd +61 -0
  79. package/templates/docs/diagrams/tools-relationship.mmd +55 -0
  80. package/templates/docs/diagrams/workflow-decision-tree.mmd +38 -0
  81. package/templates/docs/doc-sync.md +533 -0
  82. package/templates/docs/examples/end-to-end-workflow.md +1505 -0
  83. package/templates/docs/glossary.md +495 -0
  84. package/templates/docs/guides/mockup-prompt-engineering.md +644 -0
  85. package/templates/docs/guides/mockup-setup.md +737 -0
  86. package/templates/docs/learnings/README.md +250 -0
  87. package/templates/docs/learnings/common-architectural-patterns.md +123 -0
  88. package/templates/docs/learnings/common-mistakes-to-avoid.md +149 -0
  89. package/templates/docs/learnings/markdown-formatting-standards.md +104 -0
  90. package/templates/docs/learnings/monorepo-command-execution.md +64 -0
  91. package/templates/docs/learnings/optimization-tips.md +146 -0
  92. package/templates/docs/learnings/planning-linear-sync-workflow.md +70 -0
  93. package/templates/docs/learnings/shell-compatibility-fish.md +46 -0
  94. package/templates/docs/learnings/test-organization-structure.md +68 -0
  95. package/templates/docs/mcp-installation.md +613 -0
  96. package/templates/docs/mcp-servers.md +989 -0
  97. package/templates/docs/notification-installation.md +570 -0
  98. package/templates/docs/quick-start.md +354 -0
  99. package/templates/docs/standards/architecture-patterns.md +1064 -0
  100. package/templates/docs/standards/atomic-commits.md +513 -0
  101. package/templates/docs/standards/code-standards.md +993 -0
  102. package/templates/docs/standards/design-standards.md +656 -0
  103. package/templates/docs/standards/documentation-standards.md +1160 -0
  104. package/templates/docs/standards/testing-standards.md +969 -0
  105. package/templates/docs/system-maintenance.md +604 -0
  106. package/templates/docs/templates/PDR-template.md +561 -0
  107. package/templates/docs/templates/TODOs-template.md +534 -0
  108. package/templates/docs/templates/tech-analysis-template.md +800 -0
  109. package/templates/docs/workflows/README.md +519 -0
  110. package/templates/docs/workflows/atomic-task-protocol.md +955 -0
  111. package/templates/docs/workflows/decision-tree.md +482 -0
  112. package/templates/docs/workflows/edge-cases.md +856 -0
  113. package/templates/docs/workflows/phase-1-planning.md +957 -0
  114. package/templates/docs/workflows/phase-2-implementation.md +896 -0
  115. package/templates/docs/workflows/phase-3-validation.md +792 -0
  116. package/templates/docs/workflows/phase-4-finalization.md +927 -0
  117. package/templates/docs/workflows/quick-fix-protocol.md +505 -0
  118. package/templates/docs/workflows/task-atomization.md +537 -0
  119. package/templates/docs/workflows/task-completion-protocol.md +448 -0
  120. package/templates/hooks/on-notification.sh +28 -0
  121. package/templates/schemas/checkpoint.schema.json +97 -0
  122. package/templates/schemas/code-registry.schema.json +84 -0
  123. package/templates/schemas/pdr.schema.json +314 -0
  124. package/templates/schemas/problems.schema.json +55 -0
  125. package/templates/schemas/tech-analysis.schema.json +404 -0
  126. package/templates/schemas/telemetry.schema.json +298 -0
  127. package/templates/schemas/todos.schema.json +234 -0
  128. package/templates/schemas/workflows.schema.json +69 -0
  129. package/templates/scripts/add-changelogs.sh +105 -0
  130. package/templates/scripts/generate-code-registry.ts +270 -0
  131. package/templates/scripts/health-check.sh +343 -0
  132. package/templates/scripts/sync-registry.sh +40 -0
  133. package/templates/scripts/telemetry-report.ts +36 -0
  134. package/templates/scripts/validate-docs.sh +224 -0
  135. package/templates/scripts/validate-registry.sh +225 -0
  136. package/templates/scripts/validate-schemas.ts +283 -0
  137. package/templates/scripts/validate-structure.sh +165 -0
  138. package/templates/scripts/worktree-cleanup.sh +81 -0
  139. package/templates/scripts/worktree-create.sh +63 -0
  140. package/templates/sessions/planning/.gitkeep +0 -0
  141. package/templates/sessions/planning/archived/.gitkeep +0 -0
  142. package/templates/settings.json +202 -0
  143. package/templates/settings.local.json +138 -0
  144. package/templates/skills/README.md +197 -0
  145. package/templates/skills/_registry.json +473 -0
  146. package/templates/skills/audit/accessibility-audit.md +309 -0
  147. package/templates/skills/audit/performance-audit.md +257 -0
  148. package/templates/skills/audit/security-audit.md +217 -0
  149. package/templates/skills/auth/nextauth-patterns.md +308 -0
  150. package/templates/skills/brand-guidelines.md +240 -0
  151. package/templates/skills/documentation/markdown-formatter.md +302 -0
  152. package/templates/skills/git/git-commit-helper.md +321 -0
  153. package/templates/skills/i18n/i18n-patterns.md +251 -0
  154. package/templates/skills/patterns/error-handling-patterns.md +242 -0
  155. package/templates/skills/patterns/tdd-methodology.md +342 -0
  156. package/templates/skills/qa/qa-criteria-validator.md +383 -0
  157. package/templates/skills/qa/web-app-testing.md +398 -0
  158. package/templates/skills/react/react-hook-form-patterns.md +359 -0
  159. package/templates/skills/state/redux-toolkit-patterns.md +272 -0
  160. package/templates/skills/state/tanstack-query-patterns.md +299 -0
  161. package/templates/skills/state/zustand-patterns.md +301 -0
  162. package/templates/skills/tech/mermaid-diagram-specialist.md +195 -0
  163. package/templates/skills/tech/shadcn-specialist.md +252 -0
  164. package/templates/skills/tech/vercel-specialist.md +297 -0
  165. package/templates/skills/testing/api-app-testing.md +254 -0
  166. package/templates/skills/testing/performance-testing.md +275 -0
  167. package/templates/skills/testing/security-testing.md +348 -0
  168. package/templates/skills/utils/add-memory.md +295 -0
  169. package/templates/skills/utils/json-data-auditor.md +283 -0
  170. package/templates/skills/utils/pdf-creator-editor.md +342 -0
  171. package/templates/tools/format-markdown.sh +185 -0
@@ -0,0 +1,415 @@
1
+ # Git Hooks Documentation
2
+
3
+ ## Overview
4
+
5
+ This project uses [Husky](https://typicode.github.io/husky/) to manage Git hooks that automate quality checks and maintain code consistency.
6
+
7
+ ## Available Hooks
8
+
9
+ ### 1. Pre-Commit Hook ⚡
10
+
11
+ **Purpose**: Ensure code quality before committing
12
+
13
+ **Location**: `.husky/pre-commit`
14
+
15
+ **What it does**:
16
+
17
+ 1. **Markdown Formatting** (📝)
18
+ - Auto-formats staged `.md` files
19
+ - Uses `pnpm format:md:claude` for `.claude/` directory
20
+ - Uses `pnpm format:md` for other markdown files
21
+
22
+ 2. **Documentation Validation** (🔍)
23
+ - Validates `.claude/` documentation changes
24
+ - Checks for broken links in markdown files
25
+ - Warns about missing referenced files
26
+
27
+ 3. **Code Linting** (🔍)
28
+ - Runs Biome on staged files
29
+ - Auto-fixes formatting and style issues
30
+ - Re-stages fixed files automatically
31
+
32
+ 4. **TODO Sync** (📝)
33
+ - Syncs TODO comments with GitHub issues
34
+ - Updates issue tracking automatically
35
+ - Continues even if sync fails
36
+
37
+ **Speed**: ~5-15 seconds (depends on number of staged files)
38
+
39
+ **Can be skipped**: Yes, with `git commit --no-verify`
40
+
41
+ ---
42
+
43
+ ### 2. Commit-Msg Hook ✅
44
+
45
+ **Purpose**: Enforce conventional commit format
46
+
47
+ **Location**: `.husky/commit-msg`
48
+
49
+ **What it does**:
50
+
51
+ - Validates commit messages against conventional commits format
52
+ - Uses [commitlint](https://commitlint.js.org/)
53
+ - Ensures consistency in git history
54
+
55
+ **Format required**:
56
+
57
+ ```
58
+ type(scope): description
59
+
60
+ [optional body]
61
+
62
+ [optional footer]
63
+ ```
64
+
65
+ **Valid types**:
66
+
67
+ - `feat`: New feature
68
+ - `fix`: Bug fix
69
+ - `docs`: Documentation changes
70
+ - `style`: Code style changes (formatting, etc.)
71
+ - `refactor`: Code refactoring
72
+ - `perf`: Performance improvements
73
+ - `test`: Adding/updating tests
74
+ - `chore`: Maintenance tasks
75
+ - `ci`: CI/CD changes
76
+ - `build`: Build system changes
77
+ - `revert`: Revert previous commit
78
+
79
+ **Examples**:
80
+
81
+ ```bash
82
+ # ✅ Good
83
+ git commit -m "feat(api): add user authentication endpoint"
84
+ git commit -m "fix(db): resolve connection timeout issue"
85
+ git commit -m "docs(readme): update installation instructions"
86
+
87
+ # ❌ Bad
88
+ git commit -m "fixed stuff"
89
+ git commit -m "WIP"
90
+ git commit -m "updates"
91
+ ```
92
+
93
+ **Speed**: <1 second
94
+
95
+ **Can be skipped**: Yes, with `git commit --no-verify` (not recommended)
96
+
97
+ ---
98
+
99
+ ### 3. Post-Checkout Hook 🔍
100
+
101
+ **Purpose**: Verify system consistency after branch changes
102
+
103
+ **Location**: `.husky/post-checkout`
104
+
105
+ **What it does**:
106
+
107
+ 1. **Registry Validation**
108
+ - Checks if `.code-registry.json` exists
109
+ - Validates JSON format
110
+ - Reports registry metadata
111
+
112
+ 2. **Staleness Check**
113
+ - Warns if registry is older than 7 days
114
+ - Suggests running `pnpm planning:sync`
115
+
116
+ 3. **Active Sessions**
117
+ - Lists active planning sessions
118
+ - Shows checkpoint information
119
+
120
+ **Speed**: <2 seconds
121
+
122
+ **Runs**: Only on branch checkouts (not file checkouts)
123
+
124
+ **Can be skipped**: No (runs automatically, non-blocking)
125
+
126
+ ---
127
+
128
+ ## Hook Configuration
129
+
130
+ ### Global Configuration
131
+
132
+ Edit `.huskyrc` to enable/disable hooks:
133
+
134
+ ```bash
135
+ # Enable/disable individual hooks
136
+ HUSKY_PRE_COMMIT=1 # 1=enabled, 0=disabled
137
+ HUSKY_COMMIT_MSG=1
138
+ HUSKY_POST_CHECKOUT=1
139
+
140
+ # Disable all hooks
141
+ HUSKY=0
142
+ ```
143
+
144
+ ### Temporary Disable
145
+
146
+ **Skip hooks for a single commit**:
147
+
148
+ ```bash
149
+ git commit --no-verify -m "your message"
150
+ # or short form
151
+ git commit -n -m "your message"
152
+ ```
153
+
154
+ **Disable all hooks temporarily**:
155
+
156
+ ```bash
157
+ export HUSKY=0
158
+ git commit -m "your message"
159
+ unset HUSKY
160
+ ```
161
+
162
+ **Disable all hooks for entire session**:
163
+
164
+ ```bash
165
+ # Add to your shell profile (~/.bashrc, ~/.zshrc, etc.)
166
+ export HUSKY=0
167
+ ```
168
+
169
+ ---
170
+
171
+ ## Common Scenarios
172
+
173
+ ### Scenario 1: Quick Fix Commits
174
+
175
+ If you're making a quick fix and hooks are slowing you down:
176
+
177
+ ```bash
178
+ # Option 1: Skip verification
179
+ git commit --no-verify -m "fix: quick typo correction"
180
+
181
+ # Option 2: Temporarily disable in .huskyrc
182
+ # Edit .huskyrc and set HUSKY_PRE_COMMIT=0
183
+ git commit -m "fix: quick typo correction"
184
+ # Don't forget to re-enable!
185
+ ```
186
+
187
+ ### Scenario 2: Working on Documentation Only
188
+
189
+ Hooks still run markdown formatting, which is usually what you want:
190
+
191
+ ```bash
192
+ # This will auto-format markdown files
193
+ git add .claude/docs/new-guide.md
194
+ git commit -m "docs: add new workflow guide"
195
+ # ✅ Markdown formatted automatically
196
+ ```
197
+
198
+ ### Scenario 3: Large Refactoring
199
+
200
+ For large refactorings with many files, hooks may take longer:
201
+
202
+ ```bash
203
+ # Option 1: Keep hooks (recommended)
204
+ git commit -m "refactor: reorganize service layer"
205
+ # Takes ~15-30s but ensures quality
206
+
207
+ # Option 2: Skip if urgent (not recommended)
208
+ git commit --no-verify -m "refactor: reorganize service layer"
209
+ # Then run quality checks manually:
210
+ pnpm typecheck && pnpm lint && pnpm test
211
+ ```
212
+
213
+ ### Scenario 4: Registry Out of Sync
214
+
215
+ If post-checkout warns about stale registry:
216
+
217
+ ```bash
218
+ # Update registry for specific session
219
+ pnpm planning:sync .claude/sessions/planning/P-004-workflow-optimization/
220
+
221
+ # Or update all sessions
222
+ find .claude/sessions/planning -name "TODOs.md" -exec dirname {} \; | \
223
+ xargs -I {} pnpm planning:sync {}
224
+ ```
225
+
226
+ ---
227
+
228
+ ## Troubleshooting
229
+
230
+ ### Hook fails with "command not found"
231
+
232
+ **Symptom**: Hook script fails with `command not found`
233
+
234
+ **Cause**: Missing dependencies or incorrect PATH
235
+
236
+ **Solution**:
237
+
238
+ ```bash
239
+ # Reinstall dependencies
240
+ pnpm install
241
+
242
+ # Verify Husky installation
243
+ ls -la .husky
244
+
245
+ # Verify hook permissions
246
+ chmod +x .husky/*
247
+ ```
248
+
249
+ ### Markdown formatting keeps changing files
250
+
251
+ **Symptom**: Markdown files keep getting reformatted on every commit
252
+
253
+ **Cause**: Inconsistent formatting settings or editor conflicts
254
+
255
+ **Solution**:
256
+
257
+ 1. Run `pnpm format:md` once manually
258
+ 2. Commit the formatted files
259
+ 3. Configure editor to use same Prettier settings
260
+
261
+ ### TODO sync fails
262
+
263
+ **Symptom**: Pre-commit shows "TODO sync failed"
264
+
265
+ **Cause**: GitHub API not configured or network issues
266
+
267
+ **Solution**:
268
+
269
+ 1. Check `.env.local` has `GITHUB_TOKEN`
270
+ 2. Verify network connection
271
+ 3. Hook continues anyway (non-blocking)
272
+
273
+ ### Commitlint rejects valid message
274
+
275
+ **Symptom**: Commit-msg hook rejects your message
276
+
277
+ **Cause**: Message doesn't follow conventional commits format
278
+
279
+ **Solution**:
280
+
281
+ ```bash
282
+ # Check commitlint config
283
+ cat .commitlintrc.json
284
+
285
+ # Use conventional format
286
+ git commit -m "type(scope): description"
287
+
288
+ # Valid types: feat, fix, docs, style, refactor, perf, test, chore, ci, build, revert
289
+ ```
290
+
291
+ ---
292
+
293
+ ## Performance Tips
294
+
295
+ ### Optimize Hook Speed
296
+
297
+ 1. **Stage only necessary files**
298
+
299
+ ```bash
300
+ # Instead of staging everything
301
+ git add .
302
+
303
+ # Stage specific files
304
+ git add src/services/user.service.ts
305
+ ```
306
+
307
+ 2. **Use partial staging**
308
+
309
+ ```bash
310
+ # Stage specific hunks
311
+ git add -p
312
+ ```
313
+
314
+ 3. **Disable slow checks in .huskyrc**
315
+
316
+ ```bash
317
+ # For development, disable TODO sync if not needed
318
+ # (requires modifying pre-commit hook)
319
+ ```
320
+
321
+ ### When to Skip Hooks
322
+
323
+ ✅ **Reasonable to skip**:
324
+
325
+ - Testing commit message formats
326
+ - Reverting broken commits in urgent situations
327
+
328
+ ❌ **Not recommended to skip**:
329
+
330
+ - Regular commits to main
331
+ - Any production commits
332
+ - Release commits
333
+ - Shared branch commits
334
+
335
+ ---
336
+
337
+ ## Hook Maintenance
338
+
339
+ ### Adding New Hooks
340
+
341
+ 1. Create hook file in `.husky/`
342
+ 2. Make it executable: `chmod +x .husky/hook-name`
343
+ 3. Add to `.huskyrc` configuration
344
+ 4. Update this documentation
345
+ 5. Test thoroughly
346
+
347
+ ### Modifying Existing Hooks
348
+
349
+ 1. Edit hook file in `.husky/`
350
+ 2. Test with sample commits
351
+ 3. Update `.huskyrc` if new options added
352
+ 4. Update this documentation
353
+ 5. Communicate changes to team
354
+
355
+ ### Testing Hooks
356
+
357
+ ```bash
358
+ # Test pre-commit
359
+ git add some-file.ts
360
+ .husky/pre-commit
361
+
362
+ # Test commit-msg
363
+ echo "test message" | .husky/commit-msg .git/COMMIT_EDITMSG
364
+
365
+ # Test post-checkout
366
+ .husky/post-checkout HEAD HEAD 1
367
+ ```
368
+
369
+ ---
370
+
371
+ ## Best Practices
372
+
373
+ ### DO ✅
374
+
375
+ - Keep hooks fast (< 15 seconds)
376
+ - Make hooks optional/skippable
377
+ - Provide clear error messages
378
+ - Log what hooks are doing
379
+ - Auto-fix issues when possible
380
+ - Continue on non-critical failures
381
+
382
+ ### DON'T ❌
383
+
384
+ - Make hooks mandatory without skip option
385
+ - Run long-running operations (> 30s)
386
+ - Block commits on external service failures
387
+ - Modify files without re-staging them
388
+ - Fail silently without error messages
389
+ - Run hooks on CI/CD (use proper CI instead)
390
+
391
+ ---
392
+
393
+ ## Related Documentation
394
+
395
+ - **Conventional Commits**: <https://www.conventionalcommits.org/>
396
+ - **Husky Documentation**: <https://typicode.github.io/husky/>
397
+ - **Commitlint**: <https://commitlint.js.org/>
398
+ - **Project Workflows**: `.claude/docs/workflows/`
399
+
400
+ ---
401
+
402
+ ## Getting Help
403
+
404
+ If hooks are causing issues:
405
+
406
+ 1. **Check this documentation** for troubleshooting tips
407
+ 2. **Temporarily disable** hooks with `--no-verify` to unblock yourself
408
+ 3. **Report issues** to team lead or in project discussions
409
+ 4. **Update documentation** with solutions you find
410
+
411
+ ---
412
+
413
+ **Last updated**: 2025-10-31
414
+ **Version**: 1.0.0
415
+ **Maintained by**: DevOps team