@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,448 @@
1
+ # Task Completion Protocol
2
+
3
+ **Purpose**: Defines how to handle task completion with automatic GitHub synchronization.
4
+
5
+ ## When a Task is Completed
6
+
7
+ Whenever you finish a task during implementation, follow this protocol:
8
+
9
+ ### Step 1: Verify Task Completion
10
+
11
+ Before marking complete, ensure:
12
+
13
+ - ✅ All code is written and tested
14
+ - ✅ Tests pass with 90%+ coverage
15
+ - ✅ Lint and typecheck pass
16
+ - ✅ Code follows project standards
17
+ - ✅ Task meets acceptance criteria
18
+
19
+ ### Step 2: Review Changed Files
20
+
21
+ **CRITICAL**: Before marking complete, review what files changed.
22
+
23
+ Run git status to see changes:
24
+
25
+ ```bash
26
+ git status --short
27
+ ```
28
+
29
+ Analyze the output:
30
+
31
+ - `M` = Modified file
32
+ - `A` = Added file
33
+ - `D` = Deleted file
34
+ - `??` = Untracked file
35
+
36
+ #### 🔥 CRITICAL: Atomic Commits Rule
37
+
38
+ **ONLY include files that were modified during THIS task.**
39
+
40
+ If `git status` shows OTHER modified files that are NOT related to this task:
41
+
42
+ - ❌ **DO NOT** include them in the commit
43
+ - ❌ **DO NOT** use `git add .` or `git add -A`
44
+ - ✅ **ONLY** use `git add <specific-file>` for task-related files
45
+ - ⚠️ **WARN** the user about unrelated changes
46
+
47
+ **Example:**
48
+
49
+ ```bash
50
+ # git status shows:
51
+ M packages/db/src/models/user.model.ts ← Task related
52
+ M packages/db/test/models/user.model.test.ts ← Task related
53
+ M packages/api/routes/booking.ts ← NOT related (different task)
54
+ M .env.local ← NOT related (local config)
55
+
56
+ # CORRECT approach:
57
+ git add packages/db/src/models/user.model.ts
58
+ git add packages/db/test/models/user.model.test.ts
59
+ # Do NOT add booking.ts or .env.local
60
+
61
+ # WRONG approach:
62
+ git add . # ❌ This would include unrelated files!
63
+ ```
64
+
65
+ **If unrelated files are present:**
66
+
67
+ ```text
68
+ ⚠️ Warning: I see modified files that are NOT part of this task:
69
+ - packages/api/routes/booking.ts
70
+ - .env.local
71
+
72
+ I will ONLY commit the files related to the current task:
73
+ - packages/db/src/models/user.model.ts
74
+ - packages/db/test/models/user.model.test.ts
75
+
76
+ The unrelated files will remain uncommitted. You can commit them separately
77
+ when their respective tasks are complete.
78
+
79
+ Do you want to proceed with committing only the task-related files? (yes/no)
80
+ ```
81
+
82
+ **User can override:** If user explicitly asks to include other files, then do so.
83
+
84
+ Organize files into logical commits based on:
85
+
86
+ - Changes that belong together (e.g., model + tests)
87
+ - Separate concerns (e.g., schema vs service vs API)
88
+ - Follow atomic commit principle (one logical change per commit)
89
+ - **ONLY include files modified during this specific task**
90
+
91
+ ### Step 3: Generate Commit Suggestions
92
+
93
+ Based on changed files, suggest commit(s) to user:
94
+
95
+ **Format:**
96
+
97
+ ```
98
+ 🎯 Task Completed: "{task_title}"
99
+
100
+ All tests pass and code is ready.
101
+
102
+ 📝 Changed Files:
103
+ M packages/db/src/models/user.model.ts
104
+ M packages/db/test/models/user.model.test.ts
105
+ A packages/schemas/src/entities/user.schema.ts
106
+ M packages/db/src/models/index.ts
107
+
108
+ 💾 Suggested Commits:
109
+
110
+ 1. feat(schemas): add user validation schemas
111
+
112
+ Files:
113
+ - packages/schemas/src/entities/user.schema.ts
114
+
115
+ git add packages/schemas/src/entities/user.schema.ts
116
+ git commit -m "feat(schemas): add user validation schemas
117
+
118
+ - Add User entity Zod schema
119
+ - Include email, name, and role validation
120
+ - Export from schemas index"
121
+
122
+ 2. feat(db): implement User model with CRUD operations
123
+
124
+ Files:
125
+ - packages/db/src/models/user.model.ts
126
+ - packages/db/src/models/index.ts
127
+ - packages/db/test/models/user.model.test.ts
128
+
129
+ git add packages/db/src/models/user.model.ts packages/db/src/models/index.ts packages/db/test/models/user.model.test.ts
130
+ git commit -m "feat(db): implement User model with CRUD operations
131
+
132
+ - Extend BaseModel for User entity
133
+ - Add findByEmail custom method
134
+ - Include comprehensive unit tests (95% coverage)
135
+ - Export from models index"
136
+
137
+ Would you like me to:
138
+ 1. Execute these commits and mark task as complete
139
+ 2. Modify the commits first
140
+ 3. Skip commits and just mark complete (NOT RECOMMENDED)
141
+ ```
142
+
143
+ **Important Notes:**
144
+
145
+ - Group related files together
146
+ - Use conventional commit format
147
+ - Include bullet points in commit body
148
+ - Reference the task/feature context
149
+ - Keep commits atomic and logical
150
+
151
+ ### Step 4: If User Confirms (Option 1)
152
+
153
+ Execute git commits then mark task complete:
154
+
155
+ ```bash
156
+ # For each suggested commit:
157
+ 1. git add {files}
158
+ 2. git commit -m "{message}"
159
+
160
+ # Then mark as completed
161
+ ```
162
+
163
+ #### 🔥 CRITICAL: State Update Process
164
+
165
+ When marking a task complete, you MUST update ALL state tracking files:
166
+
167
+ ```typescript
168
+ import { markTaskCompleted } from '@repo/planning-sync';
169
+
170
+ const sessionPath = '.claude/sessions/planning/{current-feature}/';
171
+ const session = await getPlanningSession(sessionPath);
172
+
173
+ if (session) {
174
+ const result = await markTaskCompleted(
175
+ sessionPath,
176
+ taskId,
177
+ {
178
+ token: process.env.GITHUB_TOKEN!,
179
+ owner: process.env.GITHUB_OWNER!,
180
+ repo: process.env.GITHUB_REPO!,
181
+ }
182
+ );
183
+
184
+ console.log(`✅ Task marked as completed!`);
185
+ console.log(`📝 Updated: TODOs.md`);
186
+ console.log(`📄 Updated: .checkpoint.json`);
187
+ console.log(`📄 Updated: .github-workflow/tracking.json`);
188
+ console.log(`🔗 GitHub: ${result.issueUrl}`);
189
+ console.log(`\n💡 Don't forget to push: git push`);
190
+ }
191
+ ```
192
+
193
+ **State Files Updated:**
194
+
195
+ 1. **`TODOs.md`** - Mark task with `[x]`, add completion metadata
196
+ 2. **`.checkpoint.json`** - Update progress tracking, task status
197
+ 3. **`.github-workflow/tracking.json`** - Sync with GitHub, update issue state
198
+ 4. **GitHub** - Update issue status via API
199
+
200
+ **Output to user:**
201
+
202
+ ```
203
+ ✅ Commits created:
204
+ • abc1234 feat(schemas): add user validation schemas
205
+ • def5678 feat(db): implement User model with CRUD operations
206
+
207
+ ✅ Task marked as completed!
208
+ 📝 TODOs.md updated (task marked as [x])
209
+ 📄 .checkpoint.json updated (progress: 12/45 tasks)
210
+ 📄 .github-workflow/tracking.json updated (synced with GitHub)
211
+ 🔗 GitHub: https://github.com/your-org/your-repo/issues/124 (status: Done)
212
+
213
+ 💡 Next steps:
214
+ 1. Review commits: git log -2
215
+ 2. Push changes: git push
216
+ 3. Continue to next task
217
+ ```
218
+
219
+ **⚠️ IMPORTANT**: All three files (TODOs.md, .checkpoint.json, .github-workflow/tracking.json) MUST be updated together to maintain consistency across the system.
220
+
221
+ ### Step 5: If User Chooses Option 2 (Modify Commits)
222
+
223
+ Ask user what they want to change:
224
+
225
+ ```
226
+ Sure! What would you like to modify?
227
+
228
+ 1. Change commit messages
229
+ 2. Group files differently
230
+ 3. Add/remove files from commits
231
+ 4. Something else
232
+
233
+ Please tell me what you'd like to change.
234
+ ```
235
+
236
+ Make the requested changes and present updated commit suggestions.
237
+
238
+ ### Step 6: If User Chooses Option 3 (Skip Commits)
239
+
240
+ **WARN THE USER** about the consequences:
241
+
242
+ ```
243
+ ⚠️ Warning: Skipping commits is NOT RECOMMENDED
244
+
245
+ If you mark the task as complete without committing:
246
+ - Code changes will be lost when switching devices
247
+ - TODOs.md will show task complete but code won't exist
248
+ - GitHub will show task done but implementation won't be pushed
249
+ - Team members (or future you) won't see the actual work
250
+
251
+ This defeats the purpose of cross-device sync.
252
+
253
+ Are you sure you want to skip commits? (yes/no)
254
+ ```
255
+
256
+ If user confirms:
257
+
258
+ - Mark task as completed in TODOs.md and GitHub
259
+ - Remind user to commit manually before pushing
260
+
261
+ If user reconsiders:
262
+
263
+ - Return to Step 3 (commit suggestions)
264
+
265
+ ### Step 7: If User Declines Everything (No)
266
+
267
+ Respect the user's decision and continue without marking complete:
268
+
269
+ ```
270
+ Understood. I won't mark the task as completed yet.
271
+ You can manually update it later or tell me when you're ready.
272
+
273
+ Your changes are still uncommitted. Remember to commit before switching tasks.
274
+ ```
275
+
276
+ ## When to Apply This Protocol
277
+
278
+ Apply this protocol in these situations:
279
+
280
+ ### During Implementation (Phase 2)
281
+
282
+ After completing any task in `TODOs.md`:
283
+
284
+ ```markdown
285
+ ## Phase 2: Implementation
286
+
287
+ ### After completing a task:
288
+
289
+ 1. Run tests and verify everything passes
290
+ 2. **Apply Task Completion Protocol** ⬅️ HERE
291
+ - This includes git commits
292
+ - This updates TODOs.md and GitHub
293
+ 3. Move to next task
294
+ ```
295
+
296
+ ### During Validation (Phase 3)
297
+
298
+ After QA approves a task:
299
+
300
+ ```markdown
301
+ ## Phase 3: Validation
302
+
303
+ ### After QA approval:
304
+
305
+ 1. Address any feedback
306
+ 2. Re-run validation
307
+ 3. **Apply Task Completion Protocol** ⬅️ HERE
308
+ 4. Document in changelog
309
+ ```
310
+
311
+ ### During Bug Fixes
312
+
313
+ After fixing a bug related to a task:
314
+
315
+ ```markdown
316
+ ## Bug Fix Workflow
317
+
318
+ 1. Identify root cause
319
+ 2. Implement fix
320
+ 3. Add regression test
321
+ 4. **Apply Task Completion Protocol** ⬅️ HERE
322
+ 5. Update documentation
323
+ ```
324
+
325
+ ## Special Cases
326
+
327
+ ### Multiple Tasks Completed at Once
328
+
329
+ If you complete multiple tasks in one session, ask about each one separately:
330
+
331
+ ```
332
+ 🎯 Multiple Tasks Completed:
333
+
334
+ I've finished working on 3 tasks:
335
+ 1. "Create User model"
336
+ 2. "Add user validation"
337
+ 3. "Write user tests"
338
+
339
+ Would you like me to mark all 3 as completed? (yes/no/select)
340
+
341
+ If 'select', I'll ask about each one individually.
342
+ ```
343
+
344
+ ### Task Partially Complete
345
+
346
+ If a task is not fully done, do NOT apply this protocol:
347
+
348
+ ```
349
+ ⚠️ Task "{title}" is partially complete.
350
+
351
+ Remaining work:
352
+ - [ ] Integration tests
353
+ - [ ] Documentation
354
+
355
+ I'll continue working on this. Will ask for completion when fully done.
356
+ ```
357
+
358
+ ### Task Blocked
359
+
360
+ If a task is blocked, inform the user but don't mark complete:
361
+
362
+ ```
363
+ 🚧 Task "{title}" is blocked.
364
+
365
+ Blocker: {description}
366
+
367
+ I've completed my part, but the task can't be marked as done until the blocker is resolved.
368
+
369
+ Should I:
370
+ 1. Mark my part as complete and note the blocker
371
+ 2. Keep it as in-progress until fully unblocked
372
+ 3. Move to another task and come back later
373
+
374
+ What would you prefer?
375
+ ```
376
+
377
+ ## Error Handling
378
+
379
+ ### GitHub API Failure
380
+
381
+ ```typescript
382
+ try {
383
+ await markTaskCompleted(sessionPath, taskId, config);
384
+ } catch (error) {
385
+ console.log(`❌ Failed to sync with GitHub: ${error.message}`);
386
+ console.log(`✅ Task marked as completed in TODOs.md (local only)`);
387
+ console.log(`💡 Run /sync-planning later to sync with GitHub`);
388
+ }
389
+ ```
390
+
391
+ ### Session Not Found
392
+
393
+ ```
394
+ ⚠️ Planning session not found.
395
+
396
+ The task has been completed locally in your working memory,
397
+ but I can't update TODOs.md without a valid planning session.
398
+
399
+ Would you like me to:
400
+ 1. Continue without updating files (temporary completion)
401
+ 2. Help you set up a planning session
402
+ 3. Skip marking this task
403
+
404
+ What would you prefer?
405
+ ```
406
+
407
+ ## Integration with TodoWrite Tool
408
+
409
+ When marking tasks complete, also update the TodoWrite tool:
410
+
411
+ ```typescript
412
+ // After confirming with user
413
+ await markTaskCompleted(...);
414
+
415
+ // Update TodoWrite to reflect completion
416
+ await TodoWrite({
417
+ todos: [
418
+ // ... other tasks
419
+ {
420
+ content: taskTitle,
421
+ status: 'completed',
422
+ activeForm: `Completed: ${taskTitle}`
423
+ }
424
+ ]
425
+ });
426
+ ```
427
+
428
+ ## Best Practices
429
+
430
+ 1. **Always Ask First**: Never mark complete without user confirmation
431
+ 2. **Be Specific**: Mention the exact task title in your confirmation
432
+ 3. **Show Impact**: Explain what will be updated (local, GitHub, or both)
433
+ 4. **Handle Errors Gracefully**: If sync fails, update locally and inform user
434
+ 5. **Keep It Simple**: Don't ask for completion if it's obvious the task isn't done
435
+ 6. **Batch Smartly**: Offer to batch multiple completions but allow selection
436
+ 7. **Update Immediately**: Don't wait to mark complete - do it right after confirmation
437
+
438
+ ## Example Conversation
439
+
440
+ ```
441
+ Assistant: I've completed implementing the User model with all validations
442
+ and tests. All tests pass with 95% coverage.
443
+
444
+ 🎯 Task Completed: "Implement User model extending BaseModel"
445
+
446
+ Would you like me to mark this as completed in TODOs.md and GitHub?
447
+
448
+ User: Yes
@@ -0,0 +1,28 @@
1
+ # .claude/hooks/on-notification.sh
2
+ #!/usr/bin/env bash
3
+ set -euo pipefail
4
+
5
+ # Read the payload from stdin
6
+ payload="$(cat)"
7
+
8
+ # Extract the message from the JSON payload
9
+ message=$(echo "$payload" | jq -r '.message')
10
+
11
+ # Notificación visual en Ubuntu (requiere libnotify-bin)
12
+ if command -v notify-send &> /dev/null; then
13
+ notify-send "Claude Code" "$message" --icon=dialog-information --urgency=normal
14
+ fi
15
+
16
+ MODEL=~/.local/share/piper/voices/en_US-hfc_male-medium.onnx
17
+ CONFIG=$MODEL.json
18
+ LENGTH_SCALE=0.8
19
+ VOLUME=0.3
20
+ if command -v espeak &> /dev/null; then
21
+ echo "$message" | piper -m "$MODEL" -c "$CONFIG" --output-raw --length-scale $LENGTH_SCALE --volume $VOLUME | aplay -f S16_LE -r 22050
22
+ fi
23
+
24
+
25
+
26
+ # Log the notification
27
+ mkdir -p .claude/.log
28
+ echo "[$(date '+%Y-%m-%d %H:%M:%S')] NOTIFICATION: $message" >> .claude/.log/notifications.log
@@ -0,0 +1,97 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://example.com/schemas/checkpoint.schema.json",
4
+ "title": "Workflow Checkpoint",
5
+ "description": "JSON Schema for workflow checkpoint tracking",
6
+ "type": "object",
7
+ "required": ["workflow", "planningCode", "currentPhase", "currentStep", "totalSteps", "currentTask", "status"],
8
+ "properties": {
9
+ "workflow": {
10
+ "type": "string",
11
+ "enum": ["feature", "refactor", "bugfix", "quick-fix"],
12
+ "description": "Type of workflow being executed"
13
+ },
14
+ "planningCode": {
15
+ "type": "string",
16
+ "pattern": "^P(F|R|B)?-\\d{3,4}$",
17
+ "description": "Planning code (e.g., P-004, PF-004, PR-002, PB-042)"
18
+ },
19
+ "currentPhase": {
20
+ "type": "integer",
21
+ "minimum": 1,
22
+ "maximum": 4,
23
+ "description": "Current workflow phase (1=Planning, 2=Implementation, 3=Validation, 4=Finalization)"
24
+ },
25
+ "currentStep": {
26
+ "type": "integer",
27
+ "minimum": 1,
28
+ "description": "Current step within the workflow"
29
+ },
30
+ "totalSteps": {
31
+ "type": "integer",
32
+ "minimum": 1,
33
+ "description": "Total steps in the workflow"
34
+ },
35
+ "currentTask": {
36
+ "type": "string",
37
+ "pattern": "^P(F|R|B)\\d{3,4}-\\d+(\\.\\d+)?$",
38
+ "description": "Current task code being worked on (e.g., PF004-1, PR002-3, PB042-2.1)"
39
+ },
40
+ "taskName": {
41
+ "type": "string",
42
+ "description": "Human-readable name of current task"
43
+ },
44
+ "previousTaskCompleted": {
45
+ "type": "string",
46
+ "pattern": "^P(F|R|B)\\d{3,4}-\\d+(\\.\\d+)?$",
47
+ "description": "Last completed task code (e.g., PF004-1, PR002-3, PB042-2.1)"
48
+ },
49
+ "status": {
50
+ "type": "string",
51
+ "enum": ["active", "completed", "paused", "blocked"],
52
+ "description": "Current status of the workflow"
53
+ },
54
+ "phaseStarted": {
55
+ "type": "string",
56
+ "format": "date-time",
57
+ "description": "When the current phase started"
58
+ },
59
+ "lastUpdated": {
60
+ "type": "string",
61
+ "format": "date-time",
62
+ "description": "Last update timestamp"
63
+ },
64
+ "tasksCompleted": {
65
+ "type": "integer",
66
+ "minimum": 0,
67
+ "description": "Number of tasks completed so far"
68
+ },
69
+ "hoursSpent": {
70
+ "type": "number",
71
+ "minimum": 0,
72
+ "description": "Total hours spent on this workflow"
73
+ },
74
+ "blockers": {
75
+ "type": "array",
76
+ "items": {
77
+ "type": "object",
78
+ "required": ["task", "reason"],
79
+ "properties": {
80
+ "task": {"type": "string"},
81
+ "reason": {"type": "string"},
82
+ "since": {"type": "string", "format": "date-time"}
83
+ }
84
+ }
85
+ },
86
+ "notes": {
87
+ "type": "array",
88
+ "items": {
89
+ "type": "object",
90
+ "properties": {
91
+ "timestamp": {"type": "string", "format": "date-time"},
92
+ "note": {"type": "string"}
93
+ }
94
+ }
95
+ }
96
+ }
97
+ }
@@ -0,0 +1,84 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://example.com/schemas/code-registry.schema.json",
4
+ "title": "Code Registry",
5
+ "description": "JSON Schema for the code registry (planning sessions and task codes)",
6
+ "type": "object",
7
+ "required": ["version", "generatedAt", "lastPlanningNumber", "registry"],
8
+ "properties": {
9
+ "version": {
10
+ "type": "string",
11
+ "pattern": "^\\d+\\.\\d+\\.\\d+$",
12
+ "description": "Semantic version of the registry format"
13
+ },
14
+ "generatedAt": {
15
+ "type": "string",
16
+ "format": "date-time",
17
+ "description": "ISO 8601 timestamp when the registry was generated"
18
+ },
19
+ "lastPlanningNumber": {
20
+ "type": "integer",
21
+ "minimum": 1,
22
+ "description": "Last used planning number (e.g., 4 for P-004)"
23
+ },
24
+ "registry": {
25
+ "type": "array",
26
+ "description": "List of all planning sessions",
27
+ "items": {
28
+ "type": "object",
29
+ "required": ["code", "type", "fullCode", "sessionPath", "status"],
30
+ "properties": {
31
+ "code": {
32
+ "type": "string",
33
+ "pattern": "^P(F|R|B)?-\\d{3,4}$",
34
+ "description": "Short planning code (e.g., P-001, PF-004, PR-002, PB-042)"
35
+ },
36
+ "type": {
37
+ "type": "string",
38
+ "enum": ["feature", "refactor", "bugfix"],
39
+ "description": "Type of planning session"
40
+ },
41
+ "fullCode": {
42
+ "type": "string",
43
+ "pattern": "^P(F|R|B)?-\\d{3,4}[a-z0-9-]*$",
44
+ "description": "Full planning code with description (e.g., P-004-workflow-optimization)"
45
+ },
46
+ "sessionPath": {
47
+ "type": "string",
48
+ "description": "Relative path to the planning session directory"
49
+ },
50
+ "status": {
51
+ "type": "string",
52
+ "enum": ["active", "completed", "archived", "cancelled"],
53
+ "description": "Current status of the planning session"
54
+ },
55
+ "createdAt": {
56
+ "type": "string",
57
+ "format": "date-time",
58
+ "description": "ISO 8601 timestamp when the session was created"
59
+ },
60
+ "completedAt": {
61
+ "type": "string",
62
+ "format": "date-time",
63
+ "description": "ISO 8601 timestamp when the session was completed"
64
+ },
65
+ "archivedAt": {
66
+ "type": "string",
67
+ "format": "date-time",
68
+ "description": "ISO 8601 timestamp when the session was archived"
69
+ },
70
+ "tasks": {
71
+ "type": "array",
72
+ "items": {
73
+ "type": "string",
74
+ "pattern": "^P(F|R|B)\\d{3,4}-\\d+(\\.\\d+)?$"
75
+ },
76
+ "description": "Array of task codes for this planning session"
77
+ }
78
+ },
79
+ "additionalProperties": false
80
+ }
81
+ }
82
+ },
83
+ "additionalProperties": false
84
+ }