@champpaba/claude-agent-kit 2.6.0 → 2.8.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 +152 -58
- package/.claude/agents/02-uxui-frontend.md +5 -6
- package/.claude/agents/07-ux-tester.md +407 -0
- package/.claude/commands/cdev.md +113 -8
- package/.claude/commands/csetup.md +377 -51
- package/.claude/commands/designsetup.md +171 -48
- package/.claude/commands/extract.md +382 -668
- package/.claude/commands/pageplan.md +25 -27
- package/.claude/contexts/design/box-thinking.md +4 -4
- package/.claude/contexts/design/color-theory.md +5 -5
- package/.claude/contexts/design/index.md +9 -9
- package/.claude/contexts/design/spacing.md +4 -4
- package/.claude/contexts/patterns/agent-discovery.md +1 -1
- package/.claude/contexts/patterns/animation-patterns.md +3 -3
- package/.claude/contexts/patterns/ui-component-consistency.md +3 -3
- package/.claude/lib/README.md +1 -1
- package/.claude/lib/agent-executor.md +223 -0
- package/.claude/lib/context-loading-protocol.md +5 -6
- package/.claude/lib/detailed-guides/agent-system.md +4 -4
- package/.claude/lib/detailed-guides/best-practices-system.md +5 -4
- package/.claude/lib/detailed-guides/context-optimization.md +21 -22
- package/.claude/lib/detailed-guides/design-system.md +6 -5
- package/.claude/lib/detailed-guides/page-planning.md +6 -6
- package/.claude/lib/document-loader.md +32 -47
- package/.claude/lib/task-analyzer.md +194 -1
- package/.claude/templates/PROJECT_STATUS.template.yml +1 -1
- package/.claude/templates/STYLE_GUIDE.template.md +7 -7
- package/.claude/templates/design-context-template.md +22 -29
- package/.claude/templates/page-plan-example.md +9 -9
- package/.claude/templates/phases-sections/ux-testing.md +164 -0
- package/README.md +28 -1
- package/package.json +8 -4
package/.claude/CLAUDE.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# CLAUDE.md
|
|
2
2
|
|
|
3
3
|
> **Navigation Hub for AI Agents**
|
|
4
|
-
> **Template Version:** 2.
|
|
5
|
-
> **Latest:**
|
|
4
|
+
> **Template Version:** 2.1.0 - Universal Multi-Agent Template
|
|
5
|
+
> **Latest:** Design System v2.1 - YAML-based extraction, single data.yaml output
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
|
|
24
24
|
| File | Purpose | When to Read |
|
|
25
25
|
|------|---------|--------------|
|
|
26
|
-
| `
|
|
27
|
-
| `
|
|
26
|
+
| `README.md` | **Visual design summary** (human-readable) | UI/Frontend phases |
|
|
27
|
+
| `data.yaml` | Design tokens + psychology (~300 lines) | Quick UI reference |
|
|
28
28
|
| `page-plan.md` | UI component layout + content strategy | uxui-frontend agent |
|
|
29
29
|
| `phases.md` | Execution plan with agent assignments | All phases |
|
|
30
30
|
| `flags.json` | Progress tracking | All phases |
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
|
|
34
34
|
```
|
|
35
35
|
OpenSpec design.md = Technical Architecture (data flow, API structure, system design)
|
|
36
|
-
Template
|
|
36
|
+
Template data.yaml = Visual Design (colors, fonts, spacing, component styles)
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
**Agents should read BOTH when relevant:**
|
|
40
|
-
- `uxui-frontend` →
|
|
40
|
+
- `uxui-frontend` → data.yaml (visual tokens) + design.md (if has UI architecture)
|
|
41
41
|
- `backend` → design.md (API/data architecture)
|
|
42
42
|
- `database` → design.md (data models, relationships)
|
|
43
|
-
- `frontend` →
|
|
43
|
+
- `frontend` → data.yaml (visual tokens) + design.md (API contracts)
|
|
44
44
|
|
|
45
45
|
---
|
|
46
46
|
|
|
@@ -49,7 +49,7 @@ Template STYLE_GUIDE = Visual Design (colors, fonts, spacing, component styles)
|
|
|
49
49
|
Universal, framework-agnostic template for AI-assisted development.
|
|
50
50
|
|
|
51
51
|
**What's Included:**
|
|
52
|
-
- ✅
|
|
52
|
+
- ✅ 7 Specialized Agents (integration + ux-tester + 5 domain specialists)
|
|
53
53
|
- ✅ Universal Patterns (logging, testing, error-handling, agent selection)
|
|
54
54
|
- ✅ Design Foundation (color theory, spacing, typography)
|
|
55
55
|
- ✅ **Auto-Generated Best Practices** (from Context7 MCP per project)
|
|
@@ -65,13 +65,12 @@ Universal, framework-agnostic template for AI-assisted development.
|
|
|
65
65
|
|
|
66
66
|
## 📖 Quick Navigation
|
|
67
67
|
|
|
68
|
-
**Design/UI (v2.
|
|
69
|
-
- `/extract https://site.com` - Extract design from reference sites (
|
|
68
|
+
**Design/UI (v2.1.0):**
|
|
69
|
+
- `/extract https://site.com` - Extract design from reference sites (one site at a time, incremental)
|
|
70
70
|
- `/designsetup @prd.md` - Interactive design setup (3-round loop, theme selection)
|
|
71
|
-
- `design-system/
|
|
72
|
-
- `design-system/
|
|
73
|
-
- `design-system/
|
|
74
|
-
- `.claude/extractions/*.json` - Extracted site data
|
|
71
|
+
- `design-system/extracted/*/data.yaml` - Extracted site data (full YAML with 17+ sections)
|
|
72
|
+
- `design-system/data.yaml` - **v2.1!** Complete design data for agents (~800 lines) ✨
|
|
73
|
+
- `design-system/README.md` - Human-readable summary (~100 lines)
|
|
75
74
|
- `@/.claude/lib/document-loader.md` - Token-efficient loading patterns
|
|
76
75
|
- `@/.claude/contexts/design/index.md` (General design principles - fallback)
|
|
77
76
|
|
|
@@ -93,7 +92,7 @@ Universal, framework-agnostic template for AI-assisted development.
|
|
|
93
92
|
- `/pageplan @prd.md @brief.md` - Generate page structure with auto page type detection
|
|
94
93
|
- Output: `openspec/changes/{id}/page-plan.md` (component reuse, buyer avatar, conversion copy, asset checklist)
|
|
95
94
|
- Auto-detects page type (landing/dashboard/auth) from proposal.md/tasks.md
|
|
96
|
-
- Reads
|
|
95
|
+
- Reads data.yaml for style/theme/animations
|
|
97
96
|
- Loads patterns/*.md selectively based on page type
|
|
98
97
|
- Buyer avatar analysis (Eugene Schwartz framework) for marketing pages only
|
|
99
98
|
- Used by: uxui-frontend agent (auto-reads in STEP 0.5)
|
|
@@ -179,67 +178,50 @@ Universal, framework-agnostic template for AI-assisted development.
|
|
|
179
178
|
|
|
180
179
|
---
|
|
181
180
|
|
|
182
|
-
## 🎨 Design System v2.
|
|
181
|
+
## 🎨 Design System v2.1.0 (YAML-based)
|
|
183
182
|
|
|
184
183
|
**→ See:** `@/.claude/lib/detailed-guides/design-system.md` for complete guide
|
|
185
184
|
|
|
186
185
|
**Quick Summary:**
|
|
187
|
-
- `/extract https://site.com` → Extracts design from reference
|
|
186
|
+
- `/extract https://site.com` → Extracts design from reference site (one at a time, incremental)
|
|
188
187
|
- `/designsetup @prd.md` → Interactive 3-round loop with theme selection
|
|
189
188
|
- Generates:
|
|
190
|
-
- `
|
|
191
|
-
- `
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
-
|
|
196
|
-
-
|
|
197
|
-
-
|
|
198
|
-
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
**Flow (v2.4.0):**
|
|
189
|
+
- `data.yaml` - Complete design data (~800 lines) **FOR AGENTS**
|
|
190
|
+
- `README.md` - Human-readable summary (~100 lines) **FOR HUMANS**
|
|
191
|
+
|
|
192
|
+
**Features:**
|
|
193
|
+
- Style Detection: Neo-Brutalism, Minimalist, Glassmorphism, Modern SaaS, etc.
|
|
194
|
+
- Theme Selection: AI recommends themes based on project context
|
|
195
|
+
- Animation Support: GSAP, ScrollTrigger, Framer Motion detection
|
|
196
|
+
- Scroll Patterns: stacking-cards, parallax, fade-in, slide-in
|
|
197
|
+
- Decorative Direction: USE/AVOID elements for theme consistency
|
|
198
|
+
|
|
199
|
+
**Flow:**
|
|
202
200
|
```
|
|
203
|
-
/extract → .
|
|
201
|
+
/extract https://site1.com → design-system/extracted/site1/data.yaml
|
|
202
|
+
/extract https://site2.com → design-system/extracted/site2/data.yaml (incremental)
|
|
204
203
|
↓
|
|
205
|
-
/designsetup →
|
|
204
|
+
/designsetup @prd.md → design-system/data.yaml + design-system/README.md
|
|
206
205
|
↓
|
|
207
|
-
/pageplan → page-plan.md (
|
|
206
|
+
/pageplan → page-plan.md (reads data.yaml, auto-detects page type)
|
|
208
207
|
↓
|
|
209
|
-
/csetup →
|
|
210
|
-
→ best-practices/*.md (Stack: Context7)
|
|
211
|
-
→ phases.md
|
|
208
|
+
/csetup → phases.md (reads page-plan.md)
|
|
212
209
|
↓
|
|
213
|
-
/cdev → uxui-frontend reads
|
|
214
|
-
- tokens.json (design tokens)
|
|
215
|
-
- patterns/*.md (code patterns)
|
|
216
|
-
- page-plan.md (visual structure)
|
|
217
|
-
- research-checklist.md (content & UX)
|
|
210
|
+
/cdev → uxui-frontend (reads data.yaml)
|
|
218
211
|
```
|
|
219
212
|
|
|
220
|
-
**Separation of Concerns:**
|
|
221
|
-
| Command | Focus | Output |
|
|
222
|
-
|---------|-------|--------|
|
|
223
|
-
| `/pageplan` | Visual (layout, wireframe, animations) | `page-plan.md` |
|
|
224
|
-
| `/csetup` | Research (best practices, content, UX) | `research-checklist.md` |
|
|
225
|
-
|
|
226
213
|
---
|
|
227
214
|
|
|
228
|
-
## ⚡ Context Optimization (v2.
|
|
215
|
+
## ⚡ Context Optimization (v2.1.0)
|
|
229
216
|
|
|
230
217
|
**→ See:** `@/.claude/lib/detailed-guides/context-optimization.md` for complete guide
|
|
231
218
|
|
|
232
219
|
**Quick Summary:**
|
|
233
|
-
- **Problem:**
|
|
234
|
-
- **Solution (v2.
|
|
235
|
-
- `
|
|
236
|
-
- `
|
|
237
|
-
|
|
238
|
-
- **Page Type Detection:**
|
|
239
|
-
- Landing/Marketing → Full patterns (buttons, cards, scroll-animations, decorations)
|
|
240
|
-
- Dashboard/Admin → Minimal patterns (buttons, cards, forms)
|
|
241
|
-
- Auth → Clean patterns (buttons, forms)
|
|
242
|
-
- **Result:** 84% token reduction (~800 tokens vs ~5000), 4x faster, theme consistency
|
|
220
|
+
- **Problem:** Multiple files read by different commands/agents
|
|
221
|
+
- **Solution (v2.1.0):**
|
|
222
|
+
- `data.yaml` (~800 lines) - **SINGLE SOURCE: All agents read this**
|
|
223
|
+
- `README.md` (~100 lines) - **HUMAN-READABLE: Summary only**
|
|
224
|
+
- **Result:** Single file for all design data, consistent across all agents
|
|
243
225
|
|
|
244
226
|
---
|
|
245
227
|
|
|
@@ -301,15 +283,17 @@ Universal, framework-agnostic template for AI-assisted development.
|
|
|
301
283
|
**→ See:** `@/.claude/lib/detailed-guides/agent-system.md` for complete guide
|
|
302
284
|
|
|
303
285
|
**Quick Summary:**
|
|
304
|
-
- **
|
|
286
|
+
- **7 specialist agents**: integration (validate contracts), uxui-frontend (UI with mock data), **ux-tester** (persona-based UX testing), test-debug (tests/bugs), frontend (connect UI to API), backend (API endpoints), database (schemas/migrations)
|
|
305
287
|
- **Main Claude's role**: Orchestrator (plan, coordinate, report), NOT implementer (no writing code directly)
|
|
306
288
|
- **Self-check protocol**: Checklist before ANY work (detect work type → select agent → delegate)
|
|
307
289
|
- **Agent pre-work**: STEP 0 (project discovery for ALL) + STEP 1-5 (design fundamentals for uxui-frontend only)
|
|
290
|
+
- **Approval Gate (v2.7.0)**: ux-tester phase requires user approval before proceeding to backend
|
|
308
291
|
|
|
309
292
|
**Example workflow:**
|
|
310
293
|
```
|
|
311
294
|
User: "Build login system"
|
|
312
295
|
→ Phase 1: uxui-frontend (UI)
|
|
296
|
+
→ Phase 1.5: ux-tester (approval gate) ← NEW!
|
|
313
297
|
→ Phase 2: backend + database (parallel)
|
|
314
298
|
→ Phase 2.5: integration (validate contracts)
|
|
315
299
|
→ Phase 3: frontend (connect UI to API)
|
|
@@ -318,6 +302,116 @@ User: "Build login system"
|
|
|
318
302
|
|
|
319
303
|
---
|
|
320
304
|
|
|
305
|
+
## 🆕 v2.8.0: Critical Flow Injection
|
|
306
|
+
|
|
307
|
+
**Problem Solved:** Research layers are flexible and context-dependent, but security/compliance items are non-negotiable. Previously, critical requirements like password hashing, PCI-DSS compliance, or HIPAA regulations could be missed if research didn't surface them.
|
|
308
|
+
|
|
309
|
+
**Solution:** Auto-inject critical required items into research layers based on change analysis.
|
|
310
|
+
|
|
311
|
+
### How It Works
|
|
312
|
+
|
|
313
|
+
```
|
|
314
|
+
/csetup analyzes change:
|
|
315
|
+
├── hasAuth: true → Inject auth security items (7 items)
|
|
316
|
+
├── hasPayment: true → Inject payment security items (5 items)
|
|
317
|
+
├── industryContext: healthcare → Inject HIPAA compliance items (5 items)
|
|
318
|
+
└── industryContext: fintech → Inject PCI-DSS compliance items (6 items)
|
|
319
|
+
|
|
320
|
+
Research layers (flexible) + Critical items (non-negotiable)
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
### Critical Flow Categories
|
|
324
|
+
|
|
325
|
+
| Flow | Layer | Items | Examples |
|
|
326
|
+
|------|-------|-------|----------|
|
|
327
|
+
| Auth | Security | 7 | Password hashing (bcrypt/argon2), JWT secure storage, session timeout |
|
|
328
|
+
| Payment | Security | 5 | PCI key security, no card storage, webhook signature verification |
|
|
329
|
+
| Healthcare | Compliance | 5 | PHI encryption, role-based access, audit trail, BAA, breach plan |
|
|
330
|
+
| Fintech | Compliance | 6 | Data encryption, key rotation, audit logging, access controls |
|
|
331
|
+
| Sensitive Data | Security + Data Architecture | 6 | Encryption at rest/transit, access logging, backup, retention |
|
|
332
|
+
|
|
333
|
+
### Item Structure
|
|
334
|
+
|
|
335
|
+
Each critical item has:
|
|
336
|
+
```javascript
|
|
337
|
+
{
|
|
338
|
+
id: 'auth-password-hash', // Unique identifier
|
|
339
|
+
check: '☐ Password hashing...', // Checklist item
|
|
340
|
+
why: 'Plain text passwords...', // Explanation
|
|
341
|
+
severity: 'critical' // Always 'critical'
|
|
342
|
+
}
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
### Files Changed
|
|
346
|
+
|
|
347
|
+
| File | Change |
|
|
348
|
+
|------|--------|
|
|
349
|
+
| `tests/helpers.js` | `CRITICAL_FLOWS` constant + `injectCriticalRequiredItems()` function |
|
|
350
|
+
| `csetup.md` Step 2.6 | Calls `injectCriticalRequiredItems()` for each layer |
|
|
351
|
+
|
|
352
|
+
---
|
|
353
|
+
|
|
354
|
+
## 🆕 v2.7.0: UX Testing Agent (Persona-Based)
|
|
355
|
+
|
|
356
|
+
**Problem Solved:** UI was approved by developers, not real users. No validation that the UI actually converts customers before spending time on backend development.
|
|
357
|
+
|
|
358
|
+
**Solution:** Auto-inject Phase 1.5 (ux-tester) after uxui-frontend with approval gate workflow.
|
|
359
|
+
|
|
360
|
+
### How It Works
|
|
361
|
+
|
|
362
|
+
```
|
|
363
|
+
Phase 1: uxui-frontend (build UI)
|
|
364
|
+
↓
|
|
365
|
+
Phase 1.5: ux-tester (approval gate)
|
|
366
|
+
→ Auto-generate personas from product context
|
|
367
|
+
→ Test each persona via Chrome DevTools
|
|
368
|
+
→ Calculate weighted conversion prediction
|
|
369
|
+
→ Generate UX test report
|
|
370
|
+
→ PAUSE for user approval
|
|
371
|
+
↓
|
|
372
|
+
[User approves] → Phase 2: backend + database
|
|
373
|
+
[User rejects] → Loop back to Phase 1 with feedback
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
### Key Features
|
|
377
|
+
|
|
378
|
+
| Feature | Description |
|
|
379
|
+
|---------|-------------|
|
|
380
|
+
| **Auto-Generated Personas** | 3-5 personas with % breakdown based on product context |
|
|
381
|
+
| **Weighted Conversion** | Calculate purchase likelihood weighted by customer % |
|
|
382
|
+
| **Chrome DevTools Testing** | Screenshots, snapshots, click tests, mobile responsive |
|
|
383
|
+
| **Approval Gate** | PAUSE and wait for user approve/reject |
|
|
384
|
+
| **Rejection Loop** | Feedback passed to uxui-frontend, re-run Phase 1 → 1.5 |
|
|
385
|
+
|
|
386
|
+
### Files Changed
|
|
387
|
+
|
|
388
|
+
| File | Change |
|
|
389
|
+
|------|--------|
|
|
390
|
+
| `.claude/agents/07-ux-tester.md` | New agent for persona-based UX testing |
|
|
391
|
+
| `.claude/templates/phases-sections/ux-testing.md` | Phase template with approval gate |
|
|
392
|
+
| `.claude/lib/task-analyzer.md` | Auto-inject Phase 1.5 after uxui-frontend |
|
|
393
|
+
| `.claude/lib/agent-executor.md` | Approval gate execution logic |
|
|
394
|
+
| `.claude/commands/cdev.md` | Step 4.6 approval gate handling |
|
|
395
|
+
|
|
396
|
+
### UX Test Report Example
|
|
397
|
+
|
|
398
|
+
```markdown
|
|
399
|
+
# UX Test Report
|
|
400
|
+
|
|
401
|
+
## Personas Tested
|
|
402
|
+
| Persona | % ลูกค้า | Would Buy | Weighted |
|
|
403
|
+
|---------|----------|-----------|----------|
|
|
404
|
+
| นักศึกษา 18-24 | 40% | Maybe (50%) | +20% |
|
|
405
|
+
| พนักงาน 25-35 | 35% | Yes (100%) | +35% |
|
|
406
|
+
| ผู้สูงวัย 50-65 | 15% | No (0%) | +0% |
|
|
407
|
+
| ผู้ปกครอง 35-50 | 10% | Maybe (50%) | +5% |
|
|
408
|
+
|
|
409
|
+
## Conversion Prediction: 60%
|
|
410
|
+
## Potential After Fixes: 92.5%
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
---
|
|
414
|
+
|
|
321
415
|
## 🆕 v2.5.0: Smart Topic Query + Integration Risk Detection
|
|
322
416
|
|
|
323
417
|
**Problem Solved:** Context7 queries used static topic "best practices" which missed adapter/integration documentation. Example: Drizzle + Auth.js requires specific column naming (snake_case) but this wasn't detected, causing runtime errors.
|
|
@@ -71,15 +71,15 @@ WHY: UI development shouldn't be blocked by backend availability. Mock data enab
|
|
|
71
71
|
**STEP 0.5: Load Design & Content (uxui-frontend specific)**
|
|
72
72
|
|
|
73
73
|
```bash
|
|
74
|
-
# Check for project-specific design
|
|
75
|
-
Read: design-system/
|
|
74
|
+
# Check for project-specific design tokens
|
|
75
|
+
Read: design-system/data.yaml
|
|
76
76
|
|
|
77
77
|
# Check for page plan (from /pageplan command)
|
|
78
78
|
Read: openspec/changes/{change-id}/page-plan.md
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
**Priority order:**
|
|
82
|
-
1. **
|
|
82
|
+
1. **data.yaml** (project-specific) → Use all tokens, colors, spacing, psychology
|
|
83
83
|
2. **page-plan.md** (if exists) → Use component plan, content draft, animation blueprint
|
|
84
84
|
3. **design/*.md** (fallback) → General design principles
|
|
85
85
|
|
|
@@ -141,8 +141,7 @@ Page Structure Compliance:
|
|
|
141
141
|
| patterns/ui-component-consistency.md | Always (component reuse) |
|
|
142
142
|
| patterns/animation-patterns.md | Always (animations) |
|
|
143
143
|
| patterns/performance-optimization.md | Always (images, lazy loading) |
|
|
144
|
-
|
|
|
145
|
-
| STYLE_TOKENS.json | If exists (lightweight tokens) |
|
|
144
|
+
| data.yaml | If exists (design tokens + psychology) |
|
|
146
145
|
| page-plan.md | If exists (content plan) |
|
|
147
146
|
|
|
148
147
|
**Context7 Framework Docs:**
|
|
@@ -200,7 +199,7 @@ const TOKENS = {
|
|
|
200
199
|
}
|
|
201
200
|
```
|
|
202
201
|
|
|
203
|
-
Use durations from
|
|
202
|
+
Use durations from data.yaml (150ms, 300ms, 500ms). Random values (200ms, 250ms, 400ms) break visual consistency.
|
|
204
203
|
|
|
205
204
|
### Step 5: Performance Optimization
|
|
206
205
|
|