@champpaba/claude-agent-kit 2.0.0 → 2.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 (87) hide show
  1. package/.claude/CLAUDE.md +253 -31
  2. package/.claude/agents/01-integration.md +106 -552
  3. package/.claude/agents/02-uxui-frontend.md +188 -850
  4. package/.claude/agents/03-test-debug.md +152 -521
  5. package/.claude/agents/04-frontend.md +169 -549
  6. package/.claude/agents/05-backend.md +132 -661
  7. package/.claude/agents/06-database.md +149 -698
  8. package/.claude/agents/_shared/README.md +57 -0
  9. package/.claude/agents/_shared/agent-boundaries.md +64 -0
  10. package/.claude/agents/_shared/documentation-policy.md +47 -0
  11. package/.claude/agents/_shared/package-manager.md +59 -0
  12. package/.claude/agents/_shared/pre-work-checklist.md +57 -0
  13. package/.claude/commands/cdev.md +36 -61
  14. package/.claude/commands/csetup.md +90 -14
  15. package/.claude/commands/cstatus.md +153 -60
  16. package/.claude/commands/cview.md +364 -364
  17. package/.claude/commands/designsetup.md +1 -1
  18. package/.claude/commands/pageplan.md +53 -177
  19. package/.claude/commands/pstatus.md +431 -0
  20. package/.claude/contexts/design/accessibility.md +611 -611
  21. package/.claude/contexts/design/box-thinking.md +1 -1
  22. package/.claude/contexts/design/index.md +1 -1
  23. package/.claude/contexts/design/layout.md +400 -400
  24. package/.claude/contexts/design/responsive.md +551 -551
  25. package/.claude/contexts/design/shadows.md +522 -522
  26. package/.claude/contexts/design/typography.md +465 -465
  27. package/.claude/contexts/domain/README.md +164 -164
  28. package/.claude/contexts/patterns/agent-coordination.md +388 -388
  29. package/.claude/contexts/patterns/agent-discovery.md +2 -2
  30. package/.claude/contexts/patterns/animation-patterns.md +1 -1
  31. package/.claude/contexts/patterns/change-workflow.md +541 -538
  32. package/.claude/contexts/patterns/code-standards.md +10 -8
  33. package/.claude/contexts/patterns/development-principles.md +513 -513
  34. package/.claude/contexts/patterns/error-handling.md +478 -478
  35. package/.claude/contexts/patterns/error-recovery.md +365 -365
  36. package/.claude/contexts/patterns/frontend-component-strategy.md +1 -1
  37. package/.claude/contexts/patterns/logging.md +424 -424
  38. package/.claude/contexts/patterns/performance-optimization.md +1 -1
  39. package/.claude/contexts/patterns/task-breakdown.md +452 -452
  40. package/.claude/contexts/patterns/task-classification.md +523 -523
  41. package/.claude/contexts/patterns/tdd-classification.md +516 -516
  42. package/.claude/contexts/patterns/testing.md +413 -413
  43. package/.claude/contexts/patterns/ui-component-consistency.md +3 -3
  44. package/.claude/contexts/patterns/validation-framework.md +779 -776
  45. package/.claude/lib/README.md +4 -4
  46. package/.claude/lib/agent-executor.md +31 -40
  47. package/.claude/lib/agent-router.md +450 -572
  48. package/.claude/lib/context-loading-protocol.md +19 -36
  49. package/.claude/lib/detailed-guides/agent-system.md +43 -121
  50. package/.claude/lib/detailed-guides/taskmaster-analysis.md +1 -1
  51. package/.claude/lib/document-loader.md +22 -25
  52. package/.claude/lib/flags-updater.md +461 -469
  53. package/.claude/lib/tdd-classifier.md +345 -345
  54. package/.claude/lib/validation-gates.md +484 -484
  55. package/.claude/settings.local.json +42 -42
  56. package/.claude/templates/STYLE_GUIDE.template.md +1 -1
  57. package/.claude/templates/context-template.md +45 -45
  58. package/.claude/templates/design-context-template.md +1 -1
  59. package/.claude/templates/flags-template.json +42 -42
  60. package/.claude/templates/phases-sections/accessibility-test.md +17 -17
  61. package/.claude/templates/phases-sections/api-design.md +37 -37
  62. package/.claude/templates/phases-sections/backend-tests.md +16 -16
  63. package/.claude/templates/phases-sections/backend.md +37 -37
  64. package/.claude/templates/phases-sections/business-logic-validation.md +16 -16
  65. package/.claude/templates/phases-sections/component-tests.md +17 -17
  66. package/.claude/templates/phases-sections/contract-backend.md +16 -16
  67. package/.claude/templates/phases-sections/contract-frontend.md +16 -16
  68. package/.claude/templates/phases-sections/database.md +35 -35
  69. package/.claude/templates/phases-sections/e2e-tests.md +16 -16
  70. package/.claude/templates/phases-sections/fix-implementation.md +17 -17
  71. package/.claude/templates/phases-sections/frontend-integration.md +18 -18
  72. package/.claude/templates/phases-sections/frontend-mockup.md +126 -123
  73. package/.claude/templates/phases-sections/manual-flow-test.md +15 -15
  74. package/.claude/templates/phases-sections/manual-ux-test.md +16 -16
  75. package/.claude/templates/phases-sections/refactor-implementation.md +17 -17
  76. package/.claude/templates/phases-sections/refactor.md +16 -16
  77. package/.claude/templates/phases-sections/regression-tests.md +15 -15
  78. package/.claude/templates/phases-sections/responsive-test.md +16 -16
  79. package/.claude/templates/phases-sections/script-implementation.md +43 -43
  80. package/.claude/templates/phases-sections/test-coverage.md +16 -16
  81. package/.claude/templates/phases-sections/user-approval.md +14 -14
  82. package/LICENSE +21 -21
  83. package/PROJECT_STATUS.template.yml +105 -0
  84. package/README.md +103 -1115
  85. package/lib/init.js +30 -2
  86. package/package.json +3 -2
  87. package/.claude/CHANGELOG-v1.1.1.md +0 -259
@@ -0,0 +1,431 @@
1
+ ---
2
+ name: Project Status
3
+ description: Update PROJECT_STATUS.yml for cross-session context
4
+ category: Multi-Agent
5
+ tags: [status, context, cross-session]
6
+ ---
7
+
8
+ ## Usage
9
+
10
+ ```bash
11
+ /pstatus
12
+ /pstatus quick # Quick update (outdated sections only)
13
+ /pstatus full # Full review (all sections)
14
+ /pstatus blockers # Update blockers section only
15
+ ```
16
+
17
+ ## What It Does
18
+
19
+ Interactive update of `PROJECT_STATUS.yml` - the cross-session context file that helps Claude understand project state in new sessions.
20
+
21
+ **WHY this exists:** New Claude sessions lose context about infrastructure, blockers, and priorities. This command helps maintain that context.
22
+
23
+ ---
24
+
25
+ ## Step 1: Check File Exists
26
+
27
+ ```typescript
28
+ const statusPath = 'PROJECT_STATUS.yml'
29
+
30
+ if (!fileExists(statusPath)) {
31
+ output(`
32
+ 📊 PROJECT_STATUS.yml not found
33
+
34
+ This file provides cross-session context for Claude.
35
+ It helps new sessions understand:
36
+ - Infrastructure state (DB, API, tunnels)
37
+ - Blockers (waiting for domain, API keys)
38
+ - Completed work & next priorities
39
+
40
+ Create it now? (yes/no)
41
+ `)
42
+
43
+ const answer = await askUser()
44
+ if (answer === 'yes') {
45
+ // Copy from template
46
+ copy('PROJECT_STATUS.template.yml', statusPath)
47
+ output('✅ Created PROJECT_STATUS.yml - please fill in your project details')
48
+ return
49
+ } else {
50
+ return output('Skipped. Run /pstatus again when ready.')
51
+ }
52
+ }
53
+ ```
54
+
55
+ ---
56
+
57
+ ## Step 2: Read Current Status
58
+
59
+ ```typescript
60
+ const status = parseYaml(Read(statusPath))
61
+ const lastUpdated = new Date(status.last_updated)
62
+ const daysSinceUpdate = Math.floor((Date.now() - lastUpdated) / (1000 * 60 * 60 * 24))
63
+
64
+ output(`
65
+ 📊 PROJECT_STATUS.yml
66
+
67
+ Last updated: ${status.last_updated} (${daysSinceUpdate} days ago)
68
+ Current focus: ${status.current_focus?.description || 'Not set'}
69
+ Active change: ${status.current_focus?.active_change || 'None'}
70
+ Blockers: ${status.blockers?.length || 0}
71
+ Completed changes: ${status.completed_changes?.length || 0}
72
+ `)
73
+ ```
74
+
75
+ ---
76
+
77
+ ## Step 3: Select Update Mode
78
+
79
+ ```typescript
80
+ // If mode provided via argument, use it
81
+ // Otherwise, ask user
82
+
83
+ const mode = args[0] || await askUserQuestion({
84
+ questions: [{
85
+ question: 'What would you like to update?',
86
+ header: 'Mode',
87
+ options: [
88
+ { label: 'Quick Update', description: 'Only sections that seem outdated' },
89
+ { label: 'Full Review', description: 'Walk through all sections' },
90
+ { label: 'Specific Section', description: 'Update one section only' }
91
+ ],
92
+ multiSelect: false
93
+ }]
94
+ })
95
+ ```
96
+
97
+ ---
98
+
99
+ ## Step 4: Section-by-Section Updates
100
+
101
+ ### 4.1 Update `last_updated`
102
+
103
+ ```typescript
104
+ // Always update timestamp
105
+ status.last_updated = new Date().toISOString().split('T')[0]
106
+ ```
107
+
108
+ ### 4.2 Update `current_focus`
109
+
110
+ ```typescript
111
+ output(`
112
+ 📍 Current Focus
113
+ Description: "${status.current_focus?.description || 'Not set'}"
114
+ Active change: ${status.current_focus?.active_change || 'None'}
115
+ `)
116
+
117
+ const updateFocus = await askUserQuestion({
118
+ questions: [{
119
+ question: 'Update current focus?',
120
+ header: 'Focus',
121
+ options: [
122
+ { label: 'Keep as is', description: 'No changes needed' },
123
+ { label: 'Update description', description: 'Change what you are working on' },
124
+ { label: 'Set active change', description: 'Link to OpenSpec change' },
125
+ { label: 'Clear active change', description: 'Not working on a change' }
126
+ ],
127
+ multiSelect: false
128
+ }]
129
+ })
130
+
131
+ // Handle user selection...
132
+ ```
133
+
134
+ ### 4.3 Update `completed_changes`
135
+
136
+ ```typescript
137
+ output(`
138
+ ✅ Completed Changes (${status.completed_changes?.length || 0})
139
+ ${status.completed_changes?.map(c => ` - ${c.id} (${c.date}): ${c.summary}`).join('\n') || ' (none)'}
140
+ `)
141
+
142
+ // Auto-detect archived changes not in list
143
+ const archivedChanges = listFiles('openspec/changes/archive/')
144
+ const missingChanges = archivedChanges.filter(dir => {
145
+ const id = path.basename(dir)
146
+ return !status.completed_changes?.some(c => c.id === id)
147
+ })
148
+
149
+ if (missingChanges.length > 0) {
150
+ output(`
151
+ 📦 Found ${missingChanges.length} archived change(s) not in completed_changes:
152
+ ${missingChanges.map(c => ` - ${path.basename(c)}`).join('\n')}
153
+
154
+ Add them? (yes/no)
155
+ `)
156
+
157
+ const addMissing = await askUser()
158
+ if (addMissing) {
159
+ for (const changePath of missingChanges) {
160
+ const id = path.basename(changePath)
161
+ // Try to read proposal.md for summary
162
+ const proposalPath = `${changePath}/proposal.md`
163
+ let summary = 'No summary available'
164
+ if (fileExists(proposalPath)) {
165
+ const proposal = Read(proposalPath)
166
+ // Extract first sentence or title
167
+ summary = extractSummary(proposal)
168
+ }
169
+
170
+ status.completed_changes = status.completed_changes || []
171
+ status.completed_changes.push({
172
+ id,
173
+ date: new Date().toISOString().split('T')[0],
174
+ summary
175
+ })
176
+ output(` ✅ Added: ${id}`)
177
+ }
178
+ }
179
+ }
180
+ ```
181
+
182
+ ### 4.4 Update `infrastructure`
183
+
184
+ ```typescript
185
+ output(`
186
+ 🏗️ Infrastructure Status
187
+ ${Object.entries(status.infrastructure || {}).map(([service, info]) =>
188
+ ` ${service}: ${info.status}${info.waiting_for ? ` (waiting: ${info.waiting_for})` : ''}${info.notes ? ` - ${info.notes}` : ''}`
189
+ ).join('\n') || ' (none configured)'}
190
+ `)
191
+
192
+ const updateInfra = await askUserQuestion({
193
+ questions: [{
194
+ question: 'Update infrastructure status?',
195
+ header: 'Infra',
196
+ options: [
197
+ { label: 'Keep as is', description: 'No changes needed' },
198
+ { label: 'Update status', description: 'Change service status' },
199
+ { label: 'Add service', description: 'Track new infrastructure' },
200
+ { label: 'Remove service', description: 'Stop tracking a service' }
201
+ ],
202
+ multiSelect: false
203
+ }]
204
+ })
205
+
206
+ // Handle user selection...
207
+ // For status update, walk through each service:
208
+ if (updateInfra === 'Update status') {
209
+ for (const [service, info] of Object.entries(status.infrastructure || {})) {
210
+ output(`\n${service}: Currently "${info.status}"`)
211
+ const newStatus = await askUserQuestion({
212
+ questions: [{
213
+ question: `Update ${service} status?`,
214
+ header: service,
215
+ options: [
216
+ { label: 'healthy', description: 'Working normally' },
217
+ { label: 'degraded', description: 'Working with issues' },
218
+ { label: 'down', description: 'Not working' },
219
+ { label: 'waiting', description: 'Pending external action' },
220
+ { label: 'Keep current', description: `Stay as "${info.status}"` }
221
+ ],
222
+ multiSelect: false
223
+ }]
224
+ })
225
+
226
+ if (newStatus !== 'Keep current') {
227
+ status.infrastructure[service].status = newStatus
228
+
229
+ // If changed to healthy, clear waiting_for
230
+ if (newStatus === 'healthy') {
231
+ status.infrastructure[service].waiting_for = null
232
+ }
233
+
234
+ // If changed to waiting, ask what for
235
+ if (newStatus === 'waiting') {
236
+ output('What is it waiting for?')
237
+ status.infrastructure[service].waiting_for = await askUser()
238
+ }
239
+ }
240
+ }
241
+ }
242
+ ```
243
+
244
+ ### 4.5 Update `blockers`
245
+
246
+ ```typescript
247
+ output(`
248
+ 🚧 Blockers (${status.blockers?.length || 0})
249
+ ${status.blockers?.map(b => ` - ${b.id}: ${b.description} (blocks: ${b.blocks?.join(', ') || 'nothing specified'})`).join('\n') || ' (none)'}
250
+ `)
251
+
252
+ const updateBlockers = await askUserQuestion({
253
+ questions: [{
254
+ question: 'Update blockers?',
255
+ header: 'Blockers',
256
+ options: [
257
+ { label: 'Keep as is', description: 'No changes needed' },
258
+ { label: 'Add blocker', description: 'New external dependency' },
259
+ { label: 'Remove blocker', description: 'Blocker resolved' },
260
+ { label: 'Update blocker', description: 'Change existing blocker' }
261
+ ],
262
+ multiSelect: false
263
+ }]
264
+ })
265
+
266
+ // Handle user selection...
267
+ ```
268
+
269
+ ### 4.6 Update `next_priorities`
270
+
271
+ ```typescript
272
+ output(`
273
+ 🎯 Next Priorities
274
+ ${status.next_priorities?.map((p, i) => ` ${i + 1}. ${p.id}: ${p.reason}`).join('\n') || ' (none set)'}
275
+ `)
276
+
277
+ const updatePriorities = await askUserQuestion({
278
+ questions: [{
279
+ question: 'Update priorities?',
280
+ header: 'Priorities',
281
+ options: [
282
+ { label: 'Keep as is', description: 'No changes needed' },
283
+ { label: 'Add priority', description: 'New item to work on' },
284
+ { label: 'Remove priority', description: 'Completed or deprioritized' },
285
+ { label: 'Reorder', description: 'Change priority order' }
286
+ ],
287
+ multiSelect: false
288
+ }]
289
+ })
290
+
291
+ // Handle user selection...
292
+ ```
293
+
294
+ ### 4.7 Update `notes`
295
+
296
+ ```typescript
297
+ output(`
298
+ 📝 Notes
299
+ ${status.notes || ' (empty)'}
300
+ `)
301
+
302
+ const updateNotes = await askUserQuestion({
303
+ questions: [{
304
+ question: 'Update notes?',
305
+ header: 'Notes',
306
+ options: [
307
+ { label: 'Keep as is', description: 'No changes needed' },
308
+ { label: 'Replace', description: 'Replace all notes' },
309
+ { label: 'Append', description: 'Add to existing notes' },
310
+ { label: 'Clear', description: 'Remove all notes' }
311
+ ],
312
+ multiSelect: false
313
+ }]
314
+ })
315
+
316
+ // Handle user selection...
317
+ ```
318
+
319
+ ---
320
+
321
+ ## Step 5: Write Changes
322
+
323
+ ```typescript
324
+ // Show diff
325
+ output(`
326
+ 📝 Changes to be written:
327
+
328
+ ${generateYamlDiff(originalStatus, status)}
329
+ `)
330
+
331
+ const confirm = await askUserQuestion({
332
+ questions: [{
333
+ question: 'Save changes?',
334
+ header: 'Confirm',
335
+ options: [
336
+ { label: 'Yes', description: 'Write changes to PROJECT_STATUS.yml' },
337
+ { label: 'No', description: 'Discard changes' }
338
+ ],
339
+ multiSelect: false
340
+ }]
341
+ })
342
+
343
+ if (confirm === 'Yes') {
344
+ Write(statusPath, toYaml(status))
345
+ output(`
346
+ ✅ PROJECT_STATUS.yml updated!
347
+
348
+ Last updated: ${status.last_updated}
349
+ Changes saved: ${countChanges(originalStatus, status)} section(s)
350
+ `)
351
+ } else {
352
+ output('Changes discarded.')
353
+ }
354
+ ```
355
+
356
+ ---
357
+
358
+ ## Quick Mode Behavior
359
+
360
+ When `/pstatus quick` is used:
361
+
362
+ 1. Check `last_updated` - if > 7 days, suggest full review
363
+ 2. Auto-detect archived changes not in `completed_changes`
364
+ 3. Show current blockers - ask if any resolved
365
+ 4. Skip unchanged sections
366
+ 5. Update timestamp and save
367
+
368
+ ---
369
+
370
+ ## Output Example
371
+
372
+ ```
373
+ 📊 PROJECT_STATUS.yml Review
374
+
375
+ Last updated: 2025-11-25 (6 days ago)
376
+ Current focus: "Building authentication system"
377
+ Active change: auth-system
378
+
379
+ 📦 Found 1 archived change not in completed_changes:
380
+ - infrastructure-cicd
381
+
382
+ Add it? (yes)
383
+ ✅ Added: infrastructure-cicd
384
+
385
+ 🚧 Blockers (1)
386
+ - domain-config: Need domain for Cloudflare (blocks: production-launch)
387
+
388
+ Any blockers resolved? (no)
389
+
390
+ 🎯 Priorities look current.
391
+
392
+ 📝 Changes to be written:
393
+ + completed_changes: infrastructure-cicd
394
+ ~ last_updated: 2025-11-25 → 2025-12-01
395
+
396
+ Save changes? (yes)
397
+
398
+ ✅ PROJECT_STATUS.yml updated!
399
+ ```
400
+
401
+ ---
402
+
403
+ ## Integration with Other Commands
404
+
405
+ | Command | Integration |
406
+ |---------|-------------|
407
+ | `/csetup` | Reads PROJECT_STATUS.yml for context, updates `current_focus.active_change` |
408
+ | `/cstatus` | Shows both change status AND project status summary |
409
+ | `/openspec:archive` | Prompts to add to `completed_changes` |
410
+
411
+ ---
412
+
413
+ ## Blocker Detection Patterns
414
+
415
+ Main Claude should recognize these phrases and suggest adding blockers:
416
+
417
+ | Pattern | Example |
418
+ |---------|---------|
419
+ | "waiting for..." | "waiting for domain configuration" |
420
+ | "need X from..." | "need API key from client" |
421
+ | "blocked by..." | "blocked by DevOps team" |
422
+ | "pending..." | "pending approval" |
423
+ | "can't proceed until..." | "can't proceed until payment gateway ready" |
424
+
425
+ When detected, prompt:
426
+ ```
427
+ This sounds like an external blocker. Add to PROJECT_STATUS.yml?
428
+ - id: {suggested-id}
429
+ - description: {extracted-description}
430
+ - blocks: [{related-work}]
431
+ ```