@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.
- package/.claude/CLAUDE.md +253 -31
- package/.claude/agents/01-integration.md +106 -552
- package/.claude/agents/02-uxui-frontend.md +188 -850
- package/.claude/agents/03-test-debug.md +152 -521
- package/.claude/agents/04-frontend.md +169 -549
- package/.claude/agents/05-backend.md +132 -661
- package/.claude/agents/06-database.md +149 -698
- package/.claude/agents/_shared/README.md +57 -0
- package/.claude/agents/_shared/agent-boundaries.md +64 -0
- package/.claude/agents/_shared/documentation-policy.md +47 -0
- package/.claude/agents/_shared/package-manager.md +59 -0
- package/.claude/agents/_shared/pre-work-checklist.md +57 -0
- package/.claude/commands/cdev.md +36 -61
- package/.claude/commands/csetup.md +90 -14
- package/.claude/commands/cstatus.md +153 -60
- package/.claude/commands/cview.md +364 -364
- package/.claude/commands/designsetup.md +1 -1
- package/.claude/commands/pageplan.md +53 -177
- package/.claude/commands/pstatus.md +431 -0
- package/.claude/contexts/design/accessibility.md +611 -611
- package/.claude/contexts/design/box-thinking.md +1 -1
- package/.claude/contexts/design/index.md +1 -1
- package/.claude/contexts/design/layout.md +400 -400
- package/.claude/contexts/design/responsive.md +551 -551
- package/.claude/contexts/design/shadows.md +522 -522
- package/.claude/contexts/design/typography.md +465 -465
- package/.claude/contexts/domain/README.md +164 -164
- package/.claude/contexts/patterns/agent-coordination.md +388 -388
- package/.claude/contexts/patterns/agent-discovery.md +2 -2
- package/.claude/contexts/patterns/animation-patterns.md +1 -1
- package/.claude/contexts/patterns/change-workflow.md +541 -538
- package/.claude/contexts/patterns/code-standards.md +10 -8
- package/.claude/contexts/patterns/development-principles.md +513 -513
- package/.claude/contexts/patterns/error-handling.md +478 -478
- package/.claude/contexts/patterns/error-recovery.md +365 -365
- package/.claude/contexts/patterns/frontend-component-strategy.md +1 -1
- package/.claude/contexts/patterns/logging.md +424 -424
- package/.claude/contexts/patterns/performance-optimization.md +1 -1
- package/.claude/contexts/patterns/task-breakdown.md +452 -452
- package/.claude/contexts/patterns/task-classification.md +523 -523
- package/.claude/contexts/patterns/tdd-classification.md +516 -516
- package/.claude/contexts/patterns/testing.md +413 -413
- package/.claude/contexts/patterns/ui-component-consistency.md +3 -3
- package/.claude/contexts/patterns/validation-framework.md +779 -776
- package/.claude/lib/README.md +4 -4
- package/.claude/lib/agent-executor.md +31 -40
- package/.claude/lib/agent-router.md +450 -572
- package/.claude/lib/context-loading-protocol.md +19 -36
- package/.claude/lib/detailed-guides/agent-system.md +43 -121
- package/.claude/lib/detailed-guides/taskmaster-analysis.md +1 -1
- package/.claude/lib/document-loader.md +22 -25
- package/.claude/lib/flags-updater.md +461 -469
- package/.claude/lib/tdd-classifier.md +345 -345
- package/.claude/lib/validation-gates.md +484 -484
- package/.claude/settings.local.json +42 -42
- package/.claude/templates/STYLE_GUIDE.template.md +1 -1
- package/.claude/templates/context-template.md +45 -45
- package/.claude/templates/design-context-template.md +1 -1
- package/.claude/templates/flags-template.json +42 -42
- package/.claude/templates/phases-sections/accessibility-test.md +17 -17
- package/.claude/templates/phases-sections/api-design.md +37 -37
- package/.claude/templates/phases-sections/backend-tests.md +16 -16
- package/.claude/templates/phases-sections/backend.md +37 -37
- package/.claude/templates/phases-sections/business-logic-validation.md +16 -16
- package/.claude/templates/phases-sections/component-tests.md +17 -17
- package/.claude/templates/phases-sections/contract-backend.md +16 -16
- package/.claude/templates/phases-sections/contract-frontend.md +16 -16
- package/.claude/templates/phases-sections/database.md +35 -35
- package/.claude/templates/phases-sections/e2e-tests.md +16 -16
- package/.claude/templates/phases-sections/fix-implementation.md +17 -17
- package/.claude/templates/phases-sections/frontend-integration.md +18 -18
- package/.claude/templates/phases-sections/frontend-mockup.md +126 -123
- package/.claude/templates/phases-sections/manual-flow-test.md +15 -15
- package/.claude/templates/phases-sections/manual-ux-test.md +16 -16
- package/.claude/templates/phases-sections/refactor-implementation.md +17 -17
- package/.claude/templates/phases-sections/refactor.md +16 -16
- package/.claude/templates/phases-sections/regression-tests.md +15 -15
- package/.claude/templates/phases-sections/responsive-test.md +16 -16
- package/.claude/templates/phases-sections/script-implementation.md +43 -43
- package/.claude/templates/phases-sections/test-coverage.md +16 -16
- package/.claude/templates/phases-sections/user-approval.md +14 -14
- package/LICENSE +21 -21
- package/PROJECT_STATUS.template.yml +105 -0
- package/README.md +103 -1115
- package/lib/init.js +30 -2
- package/package.json +3 -2
- 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:**
|
|
5
|
-
> **Purpose:**
|
|
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
|
-
##
|
|
25
|
+
## 📦 Level 0: Package Manager Discovery
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
**Before running install/run commands, detect the package manager.**
|
|
28
28
|
|
|
29
29
|
### Why This Matters:
|
|
30
30
|
|
|
31
|
-
Using the
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
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
|
-
-
|
|
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
|
-
##
|
|
353
|
+
## 📋 Package Manager Guidelines
|
|
354
354
|
|
|
355
|
-
###
|
|
355
|
+
### Use Detected Package Manager
|
|
356
356
|
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
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
|
-
|
|
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:**
|
|
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
|
|
61
|
+
## 🔒 Main Claude Self-Check Protocol
|
|
62
62
|
|
|
63
|
-
|
|
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
|
-
**
|
|
67
|
+
**Quick Routing Table:**
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
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
|
-
-
|
|
113
|
-
-
|
|
114
|
-
-
|
|
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
|
-
|
|
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
|
-
##
|
|
88
|
+
## 📋 Agent Pre-Work Requirements
|
|
122
89
|
|
|
123
|
-
|
|
90
|
+
→ See: `.claude/agents/_shared/pre-work-checklist.md` for detailed checklist
|
|
124
91
|
|
|
125
|
-
|
|
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
|
-
|
|
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 (
|
|
146
|
-
- If NO → Read .claude/contexts/design/*.md (
|
|
147
|
-
7. Report: "✅ Style Guide Loaded"
|
|
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
|
-
|
|
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,
|
|
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
|
-
|
|
119
|
+
→ See: `.claude/agents/02-uxui-frontend.md` for complete checklist
|
|
162
120
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
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
|
-
|
|
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
|
|
|
@@ -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:**
|
|
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
|
|
123
|
+
## 🎨 Design System Reference
|
|
124
124
|
|
|
125
|
-
**
|
|
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
|
-
**
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
-
|
|
140
|
-
-
|
|
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
|
-
**
|
|
143
|
-
|
|
144
|
-
|
|
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
|
-
##
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
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
|
|