@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
@@ -1,8 +1,8 @@
1
1
  # Context Loading Protocol
2
2
 
3
3
  > **Unified context loading strategy for all agents**
4
- > **Version:** 1.4.0
5
- > **Purpose:** Eliminate duplication across 6 agents, enforce consistency
4
+ > **Version:** 2.0.0 (Claude 4.5 Optimized)
5
+ > **Purpose:** Consistent context loading across 6 agents (DRY principle)
6
6
 
7
7
  ---
8
8
 
@@ -22,17 +22,17 @@ This protocol defines how agents discover and load context before starting work.
22
22
 
23
23
  ---
24
24
 
25
- ## 🚨 Level 0: Package Manager Discovery (CRITICAL!)
25
+ ## 📦 Level 0: Package Manager Discovery
26
26
 
27
- **⚠️ STOP! Read this BEFORE running ANY install/run command**
27
+ **Before running install/run commands, detect the package manager.**
28
28
 
29
29
  ### Why This Matters:
30
30
 
31
- Using the wrong package manager can:
32
- - Create duplicate lock files (package-lock.json + pnpm-lock.yaml)
33
- - Install to wrong location (node_modules vs .venv)
34
- - Break CI/CD pipelines
35
- - Cause version conflicts
31
+ Using the correct package manager:
32
+ - Prevents duplicate lock files (package-lock.json + pnpm-lock.yaml conflicts)
33
+ - Installs to correct location (node_modules vs .venv)
34
+ - Maintains CI/CD compatibility
35
+ - Avoids version conflicts
36
36
 
37
37
  ### Protocol:
38
38
 
@@ -78,7 +78,7 @@ From tech-stack.md, extract:
78
78
 
79
79
  2. **Package Manager** (pnpm, npm, bun, uv, poetry, pip)
80
80
  - Use for: ALL install/run commands
81
- - **CRITICAL:** NEVER hardcode npm/pip
81
+ - Always use detected PM to prevent lock file conflicts
82
82
 
83
83
  3. **ORM/Database Tool** (Prisma, SQLAlchemy, TypeORM, Drizzle)
84
84
  - Use for: Database agents
@@ -350,35 +350,18 @@ Each agent loads additional contexts based on their role.
350
350
 
351
351
  ---
352
352
 
353
- ## 🚨 Package Manager Safety Rules
353
+ ## 📋 Package Manager Guidelines
354
354
 
355
- ### NEVER Do This:
355
+ ### Use Detected Package Manager
356
356
 
357
- ```bash
358
- # ❌ Hardcoded npm (wrong if project uses pnpm)
359
- npm install lodash
360
-
361
- # Hardcoded pip (wrong if project uses uv)
362
- pip install requests
363
-
364
- # ❌ Assuming package manager
365
- npm run dev
366
- ```
367
-
368
- ### ✅ ALWAYS Do This:
357
+ | If Detected | Install Command | Run Command |
358
+ |-------------|-----------------|-------------|
359
+ | pnpm | `pnpm install lodash` | `pnpm run dev` |
360
+ | npm | `npm install lodash` | `npm run dev` |
361
+ | uv | `uv pip install requests` | `uv run app.py` |
362
+ | poetry | `poetry add requests` | `poetry run python app.py` |
369
363
 
370
- ```bash
371
- # ✅ Read tech-stack.md first
372
- # ✅ Use detected package manager
373
-
374
- # If pnpm detected:
375
- pnpm install lodash
376
- pnpm run dev
377
-
378
- # If uv detected:
379
- uv pip install requests
380
- uv run app.py
381
- ```
364
+ WHY: Using the detected PM prevents lock file conflicts and maintains CI/CD compatibility.
382
365
 
383
366
  ### Error Handling:
384
367
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **Detailed guide to the multi-agent architecture**
4
4
  > **Source:** Extracted from CLAUDE.md (Navigation Hub)
5
- > **Version:** 1.7.0 (Opus 4.5)
5
+ > **Version:** 2.0.0 (Claude 4.5 Optimized)
6
6
 
7
7
  ---
8
8
 
@@ -58,77 +58,38 @@ Main Claude: *Executes uxui-frontend agent directly*
58
58
 
59
59
  ---
60
60
 
61
- ## 🔒 Main Claude Self-Check Protocol (MANDATORY)
61
+ ## 🔒 Main Claude Self-Check Protocol
62
62
 
63
- **⚠️ CRITICAL: Main Claude MUST complete this checklist BEFORE doing ANY work**
63
+ **Before starting work, Main Claude routes tasks appropriately.**
64
64
 
65
- See: `@/.claude/lib/agent-router.md` for complete routing protocol
65
+ See: `@/.claude/lib/agent-router.md` for complete routing protocol
66
66
 
67
- **Pre-Work Checklist (Run for EVERY user request):**
67
+ **Quick Routing Table:**
68
68
 
69
- ```markdown
70
- ## ✅ Pre-Work Self-Check
71
-
72
- [ ] 1. Read user request carefully
73
- - What are they asking for?
74
- - What is the end goal?
75
-
76
- [ ] 2. Detect work type
77
- - Is this implementation work? (writing code, creating files)
78
- - Is this planning/analysis? (reading, explaining, breaking down)
79
-
80
- [ ] 3. If IMPLEMENTATION work:
81
- - Read: @/.claude/contexts/patterns/task-classification.md
82
- - Which agent should handle this?
83
- • UI components → uxui-frontend
84
- • API endpoints → backend
85
- • Database schemas → database
86
- • API integration → frontend
87
- • Tests/bugs → test-debug
88
- • Contracts → integration
89
-
90
- [ ] 4. Can Main Claude do this?
91
- ✅ YES for: Planning, reading files, explaining, orchestrating workflows
92
- ❌ NO for: Writing components, creating endpoints, designing schemas
93
-
94
- [ ] 5. If MUST delegate:
95
- - Use Task tool with selected agent
96
- - Include all necessary context
97
- - Wait for agent response
98
- - Update flags.json after completion (if using /cdev)
99
-
100
- [ ] 6. Report decision to user
101
- ```
102
- 🔍 Task Analysis:
103
- - Work type: [type]
104
- - Requires: [agent] agent
105
- - Reason: [explanation]
106
-
107
- 🚀 Invoking [agent] agent...
108
- ```
109
- ```
69
+ | Task Type | Route To |
70
+ |-----------|----------|
71
+ | UI components | uxui-frontend |
72
+ | API endpoints | backend |
73
+ | Database schemas | database |
74
+ | API integration | frontend |
75
+ | Tests/bugs | test-debug |
76
+ | Contracts | integration |
77
+ | Planning, reading, explaining | Main Claude (direct) |
110
78
 
111
79
  **Main Claude's Role:**
112
- - Orchestrator (plan, coordinate, report)
113
- - Progress tracker (update flags.json)
114
- - Analyst (read files, explain code)
115
- - ❌ NOT implementer (no writing code directly)
80
+ - Orchestrator (plan, coordinate, report)
81
+ - Progress tracker (update flags.json)
82
+ - Analyst (read files, explain code)
116
83
 
117
- **If Main Claude skips this self-check for implementation work, it violates system protocol.**
84
+ WHY routing matters: Specialist agents have domain-specific validation (design tokens, TDD patterns, error handling) that ensures higher quality output.
118
85
 
119
86
  ---
120
87
 
121
- ## ⚠️ Agent Pre-Work Requirements
88
+ ## 📋 Agent Pre-Work Requirements
122
89
 
123
- **STEP 0 (ALL agents):** Every agent must discover project context first
90
+ See: `.claude/agents/_shared/pre-work-checklist.md` for detailed checklist
124
91
 
125
- **STEP 1-5 (uxui-frontend only):** Design fundamentals checklist
126
-
127
- ---
128
-
129
- ### STEP 0: Project Discovery (ALL Agents)
130
-
131
- **Every agent MUST complete this before ANY work:**
92
+ ### STEP 0: Project Discovery (All Agents)
132
93
 
133
94
  ```
134
95
  1. Read: domain/index.md → Get current project name
@@ -138,80 +99,41 @@ See: `@/.claude/lib/agent-router.md` for complete routing protocol
138
99
  5. Report: "✅ Project Context Loaded"
139
100
  ```
140
101
 
141
- **STEP 0.5 (uxui-frontend ONLY):**
102
+ ### STEP 0.5: Design Context (uxui-frontend only)
142
103
 
143
104
  ```
144
105
  6. Check: design-system/STYLE_GUIDE.md exists?
145
- - If YES → Read STYLE_GUIDE.md (Priority #1 - project-specific)
146
- - If NO → Read .claude/contexts/design/*.md (Fallback - general principles)
147
- 7. Report: "✅ Style Guide Loaded" or "⚠️ No style guide - using general principles"
106
+ - If YES → Read STYLE_GUIDE.md (project-specific)
107
+ - If NO → Read .claude/contexts/design/*.md (fallback)
108
+ 7. Report: "✅ Style Guide Loaded"
148
109
  ```
149
110
 
150
- **Why this matters:**
151
- - STYLE_GUIDE.md = project-specific design system (colors, spacing, components)
152
- - design/*.md = universal design principles (box thinking, color theory)
153
- - Priority: STYLE_GUIDE.md > design/*.md
111
+ WHY: STYLE_GUIDE.md has project-specific tokens. design/*.md has universal principles.
154
112
 
155
- **Fallback:** If discovery fails, warn user to run `/agentsetup` or `/designsetup`
113
+ **Fallback:** If discovery fails, suggest `/agentsetup` or `/designsetup`
156
114
 
157
115
  ---
158
116
 
159
117
  ### STEP 1-5: Design Fundamentals (uxui-frontend only)
160
118
 
161
- **When invoking uxui-frontend agent, Main Claude MUST include these requirements in the Task prompt:**
119
+ See: `.claude/agents/02-uxui-frontend.md` for complete checklist
162
120
 
163
- ```
164
- MANDATORY PRE-WORK CHECKLIST (after STEP 0):
165
-
166
- Before writing ANY code, you MUST:
167
-
168
- 1. **Read ALL design contexts:**
169
- - @/.claude/contexts/design/index.md
170
- - @/.claude/contexts/design/box-thinking.md
171
- - @/.claude/contexts/design/color-theory.md
172
- - @/.claude/contexts/design/spacing.md
173
- - @/.claude/contexts/patterns/ui-component-consistency.md
174
- - @/.claude/contexts/patterns/frontend-component-strategy.md
175
-
176
- 2. **Do Box Thinking Analysis:**
177
- - Identify all boxes (parent, children, siblings)
178
- - Document relationships (container, adjacent, nested)
179
- - Plan space flow using spacing scale (8, 16, 24, 32, 40, 48px)
180
- - Plan responsive behavior (stack/merge/compress)
181
-
182
- 3. **Search for Existing Components:**
183
- - Glob: "**/*{Keyword}*.{tsx,jsx,vue}"
184
- - Grep: "[similar-pattern]"
185
- - Decision: Reuse > Compose > Extend > Create New
186
- - If creating new: Extract design tokens from most similar component
187
-
188
- 4. **Extract Design Tokens from Reference Component:**
189
- ```typescript
190
- const DESIGN_TOKENS = {
191
- spacing: { padding: '[from reference]', gap: '[from reference]' },
192
- colors: { bg: '[theme token]', text: '[theme token]', border: '[theme token]' },
193
- shadows: '[from reference - e.g., shadow-sm]',
194
- borderRadius: '[from reference - e.g., rounded-md]'
195
- }
196
- ```
197
-
198
- 5. **Report Pre-Implementation Analysis:**
199
- You MUST provide a detailed report covering steps 1-4 BEFORE writing any code.
200
-
201
- CRITICAL RULES:
202
- - ❌ NO hardcoded colors (text-gray-500) → ✅ Use theme tokens (text-foreground/70)
203
- - ❌ NO arbitrary spacing (p-5) → ✅ Use spacing scale (p-4, p-6)
204
- - ❌ NO inconsistent icons (h-5 w-5, opacity-50) → ✅ Match reference (h-4 w-4, text-foreground/70)
205
- - ❌ NO creating duplicate components → ✅ Search and reuse first
206
-
207
- If you skip these steps, your work will be rejected.
208
- ```
121
+ **Summary:**
122
+ 1. Read design contexts (box-thinking, color-theory, spacing)
123
+ 2. Do Box Thinking Analysis (identify boxes, relationships, spacing)
124
+ 3. Search for existing components (Reuse > Compose > Extend > Create)
125
+ 4. Extract design tokens from reference component
126
+ 5. Report pre-implementation analysis
127
+
128
+ **Style Guidelines:**
129
+
130
+ | Instead of | Use | WHY |
131
+ |------------|-----|-----|
132
+ | text-gray-500 | text-foreground/70 | Theme-aware |
133
+ | p-5 | p-4 or p-6 | Spacing scale |
134
+ | h-5 w-5, opacity-50 | h-4 w-4, text-foreground/70 | Consistency |
209
135
 
210
- **Why this enforcement matters:**
211
- - Prevents visual inconsistency (mismatched colors, spacing, shadows)
212
- - Ensures component reuse (avoids duplicates)
213
- - Maintains design system integrity
214
- - Saves implementation time
136
+ WHY these steps matter: Prevents visual inconsistency, ensures component reuse, maintains design system integrity.
215
137
 
216
138
  ---
217
139
 
@@ -166,7 +166,7 @@ Priority Distribution:
166
166
  - 🟢 LOW: 1
167
167
 
168
168
  Risk Assessment:
169
- - 🚨 HIGH: 2 tasks → TDD required
169
+ - 🔴 HIGH: 2 tasks → TDD required
170
170
  - ⚠️ MEDIUM: 3 tasks
171
171
  - ✅ LOW: 3 tasks
172
172
 
@@ -1,7 +1,7 @@
1
1
  # Document Loader - Unified Loading Pattern
2
2
 
3
3
  > **Token-efficient, consistent document loading for all commands and agents**
4
- > **Version:** 1.0.0 (Context Optimization)
4
+ > **Version:** 2.0.0 (Claude 4.5 Optimized)
5
5
 
6
6
  ---
7
7
 
@@ -120,9 +120,9 @@ function buildDesignReference(projectName: string): string {
120
120
 
121
121
  // Don't load content! Just send paths + minimal summary
122
122
  return `
123
- ## 🎨 Design System (Required Reading)
123
+ ## 🎨 Design System Reference
124
124
 
125
- **MANDATORY for uxui-frontend agent (STEP 0.5):**
125
+ **For uxui-frontend agent (STEP 0.5):**
126
126
 
127
127
  1. Read: ${designContextPath} (~1K tokens)
128
128
  → Project design summary, file paths
@@ -133,15 +133,15 @@ function buildDesignReference(projectName: string): string {
133
133
  3. Optional: ${styleGuidePath} (selective sections ~2K tokens)
134
134
  → Full guide - load Component Styles, Layout Patterns if needed
135
135
 
136
- **Critical Rules:**
137
- - NO hardcoded colors (text-gray-500)
138
- - ✅ USE theme tokens (text-foreground/70)
139
- - NO arbitrary spacing (p-5)
140
- - USE spacing scale (p-4, p-6)
136
+ **Style Guidelines:**
137
+ | Instead of | Use | WHY |
138
+ |------------|-----|-----|
139
+ | text-gray-500 | text-foreground/70 | Theme-aware |
140
+ | p-5 | p-4 or p-6 | Spacing scale |
141
141
 
142
- **You MUST report:**
143
- "Design Context Loaded: design-context.md + STYLE_TOKENS.json"
144
- "Design Tokens Extracted: [list key tokens]"
142
+ **Report format:**
143
+ "Design Context Loaded: design-context.md + STYLE_TOKENS.json"
144
+ "Design Tokens Extracted: [list key tokens]"
145
145
  `
146
146
 
147
147
  // Total sent: ~200 tokens (reference only, not content!)
@@ -229,20 +229,17 @@ ${report.join('\n')}
229
229
 
230
230
  ---
231
231
 
232
- ## 🚨 Critical Rules
233
-
234
- ### DO:
235
- - ✅ Always load design-context.md first (if exists)
236
- - Load STYLE_TOKENS.json for UI work
237
- - Load STYLE_GUIDE.md selectively (specific sections only)
238
- - Validate files exist before loading
239
- - Report what was loaded (transparency)
240
-
241
- ### DON'T:
242
- - Load full STYLE_GUIDE.md unless absolutely needed
243
- - ❌ Skip design-context.md (it's the entry point!)
244
- - ❌ Load design files for non-UI work (backend, database)
245
- - ❌ Hardcode paths (use project name variable)
232
+ ## 📋 Best Practices
233
+
234
+ | Practice | WHY |
235
+ |----------|-----|
236
+ | Load design-context.md first | Entry point with file paths |
237
+ | Load STYLE_TOKENS.json for UI work | Lightweight token reference |
238
+ | Load STYLE_GUIDE.md selectively | Save tokens (5K → 2K) |
239
+ | Validate files exist before loading | Prevent errors |
240
+ | Report what was loaded | Transparency for debugging |
241
+ | Skip design files for backend/database | Not needed, saves tokens |
242
+ | Use project name variable for paths | Portability |
246
243
 
247
244
  ---
248
245