@champpaba/claude-agent-kit 1.0.0 → 1.1.1
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/{template/.claude → .claude}/CHANGELOG-v1.1.1.md +259 -259
- package/{template/.claude → .claude}/CLAUDE.md +555 -329
- package/{template/.claude → .claude}/agents/01-integration.md +797 -797
- package/{template/.claude → .claude}/agents/02-uxui-frontend.md +955 -899
- package/{template/.claude → .claude}/agents/03-test-debug.md +759 -759
- package/{template/.claude → .claude}/agents/04-frontend.md +1099 -1099
- package/{template/.claude → .claude}/agents/05-backend.md +1217 -1217
- package/{template/.claude → .claude}/agents/06-database.md +969 -969
- package/{template/.claude → .claude}/commands/agentsetup.md +1464 -1464
- package/{template/.claude → .claude}/commands/cdev.md +327 -327
- package/{template/.claude → .claude}/commands/csetup.md +447 -447
- package/{template/.claude → .claude}/commands/cstatus.md +60 -60
- package/{template/.claude → .claude}/commands/cview.md +364 -364
- package/.claude/commands/designsetup.md +838 -0
- package/.claude/commands/extract.md +1005 -0
- package/.claude/commands/pageplan.md +327 -0
- package/{template/.claude → .claude}/commands/psetup.md +101 -101
- package/{template/.claude → .claude}/contexts/design/accessibility.md +611 -611
- package/{template/.claude → .claude}/contexts/design/box-thinking.md +566 -553
- package/{template/.claude → .claude}/contexts/design/color-theory.md +519 -498
- package/{template/.claude → .claude}/contexts/design/index.md +290 -247
- package/{template/.claude → .claude}/contexts/design/layout.md +400 -400
- package/{template/.claude → .claude}/contexts/design/responsive.md +551 -551
- package/{template/.claude → .claude}/contexts/design/shadows.md +522 -522
- package/{template/.claude → .claude}/contexts/design/spacing.md +445 -428
- package/{template/.claude → .claude}/contexts/design/typography.md +465 -465
- package/{template/.claude → .claude}/contexts/domain/README.md +164 -164
- package/{template/.claude → .claude}/contexts/patterns/agent-coordination.md +388 -388
- package/{template/.claude → .claude}/contexts/patterns/agent-discovery.md +182 -182
- package/{template/.claude → .claude}/contexts/patterns/change-workflow.md +538 -538
- package/{template/.claude → .claude}/contexts/patterns/code-standards.md +515 -515
- package/{template/.claude → .claude}/contexts/patterns/development-principles.md +513 -513
- package/{template/.claude → .claude}/contexts/patterns/error-handling.md +478 -478
- package/{template/.claude → .claude}/contexts/patterns/error-recovery.md +365 -365
- package/{template/.claude → .claude}/contexts/patterns/logging.md +424 -424
- package/{template/.claude → .claude}/contexts/patterns/task-breakdown.md +452 -452
- package/{template/.claude → .claude}/contexts/patterns/task-classification.md +523 -523
- package/{template/.claude → .claude}/contexts/patterns/tdd-classification.md +516 -516
- package/{template/.claude → .claude}/contexts/patterns/testing.md +413 -413
- package/{template/.claude → .claude}/contexts/patterns/validation-framework.md +776 -776
- package/{template/.claude → .claude}/lib/README.md +39 -39
- package/{template/.claude → .claude}/lib/agent-executor.md +258 -258
- package/{template/.claude → .claude}/lib/agent-router.md +572 -572
- package/{template/.claude → .claude}/lib/flags-updater.md +469 -469
- package/{template/.claude → .claude}/lib/tdd-classifier.md +345 -345
- package/{template/.claude → .claude}/lib/validation-gates.md +484 -484
- package/{template/.claude → .claude}/settings.local.json +42 -42
- package/.claude/templates/STYLE_GUIDE.template.md +879 -0
- package/{template/.claude → .claude}/templates/context-template.md +45 -45
- package/{template/.claude → .claude}/templates/flags-template.json +42 -42
- package/.claude/templates/page-plan-example.md +562 -0
- package/{template/.claude → .claude}/templates/phase-templates.json +124 -124
- package/{template/.claude → .claude}/templates/phases-sections/accessibility-test.md +17 -17
- package/{template/.claude → .claude}/templates/phases-sections/api-design.md +37 -37
- package/{template/.claude → .claude}/templates/phases-sections/backend-tests.md +16 -16
- package/{template/.claude → .claude}/templates/phases-sections/backend.md +37 -37
- package/{template/.claude → .claude}/templates/phases-sections/business-logic-validation.md +16 -16
- package/{template/.claude → .claude}/templates/phases-sections/component-tests.md +17 -17
- package/{template/.claude → .claude}/templates/phases-sections/contract-backend.md +16 -16
- package/{template/.claude → .claude}/templates/phases-sections/contract-frontend.md +16 -16
- package/{template/.claude → .claude}/templates/phases-sections/database.md +35 -35
- package/{template/.claude → .claude}/templates/phases-sections/documentation.md +17 -17
- package/{template/.claude → .claude}/templates/phases-sections/e2e-tests.md +16 -16
- package/{template/.claude → .claude}/templates/phases-sections/fix-implementation.md +17 -17
- package/{template/.claude → .claude}/templates/phases-sections/frontend-integration.md +18 -18
- package/{template/.claude → .claude}/templates/phases-sections/frontend-mockup.md +123 -123
- package/{template/.claude → .claude}/templates/phases-sections/manual-flow-test.md +15 -15
- package/{template/.claude → .claude}/templates/phases-sections/manual-ux-test.md +16 -16
- package/{template/.claude → .claude}/templates/phases-sections/refactor-implementation.md +17 -17
- package/{template/.claude → .claude}/templates/phases-sections/refactor.md +16 -16
- package/{template/.claude → .claude}/templates/phases-sections/regression-tests.md +15 -15
- package/{template/.claude → .claude}/templates/phases-sections/report.md +16 -16
- package/{template/.claude → .claude}/templates/phases-sections/responsive-test.md +16 -16
- package/{template/.claude → .claude}/templates/phases-sections/script-implementation.md +43 -43
- package/{template/.claude → .claude}/templates/phases-sections/test-coverage.md +16 -16
- package/{template/.claude → .claude}/templates/phases-sections/user-approval.md +14 -14
- package/LICENSE +21 -21
- package/README.md +758 -331
- package/lib/init.js +1 -1
- package/lib/update.js +1 -1
- package/package.json +2 -2
- /package/{template/.claude → .claude}/contexts/patterns/frontend-component-strategy.md +0 -0
- /package/{template/.claude → .claude}/contexts/patterns/git-workflow.md +0 -0
- /package/{template/.claude → .claude}/contexts/patterns/ui-component-consistency.md +0 -0
package/README.md
CHANGED
|
@@ -1,468 +1,756 @@
|
|
|
1
|
-
# Claude
|
|
1
|
+
# Claude Agent Kit
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> 🤖 **Multi-Agent Implementation Engine** - The perfect companion for [OpenSpec](https://github.com/Fission-AI/OpenSpec) spec-driven development
|
|
4
4
|
|
|
5
|
+
[](https://www.npmjs.com/package/@champpaba/claude-agent-kit)
|
|
5
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
[](https://nodejs.org)
|
|
6
8
|
|
|
7
9
|
---
|
|
8
10
|
|
|
9
11
|
## 🎯 What is this?
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
**Claude Agent Kit picks up where OpenSpec planning ends.**
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
While OpenSpec handles **alignment** (Draft Proposal → Review & Align), Claude Agent Kit handles **implementation** (Implement Tasks → Archive & Update) with specialized AI agents.
|
|
16
|
+
|
|
17
|
+
### The Complete Workflow
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
21
|
+
│ OpenSpec Planning │
|
|
22
|
+
│ (Spec-Driven Development for AI Coding Assistants) │
|
|
23
|
+
└─────────────────────────────────────────────────────────────┘
|
|
24
|
+
↓
|
|
25
|
+
Generates: proposal.md + tasks.md
|
|
26
|
+
↓
|
|
27
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
28
|
+
│ Claude Agent Kit Implementation │
|
|
29
|
+
│ (Multi-Agent Execution with 6 Specialists) │
|
|
30
|
+
└─────────────────────────────────────────────────────────────┘
|
|
31
|
+
↓
|
|
32
|
+
Completes: All tasks with quality gates
|
|
33
|
+
```
|
|
18
34
|
|
|
19
35
|
---
|
|
20
36
|
|
|
21
|
-
##
|
|
37
|
+
## 🔄 How They Work Together
|
|
22
38
|
|
|
23
|
-
|
|
39
|
+
| Stage | Tool | What Happens | Output |
|
|
40
|
+
|-------|------|--------------|--------|
|
|
41
|
+
| **1. Draft Proposal** | OpenSpec | Human requests change, AI scaffolds structure | `proposal.md` + `tasks.md` |
|
|
42
|
+
| **2. Review & Align** | OpenSpec | Team iterates until consensus | Approved specs |
|
|
43
|
+
| **2.5. Page Planning** | **Claude Agent Kit** | *(UI tasks only)* Generate content & component plan | `page-plan.md` |
|
|
44
|
+
| **3. Setup Context** | **Claude Agent Kit** | Classify tasks, generate workflow | `workflow.md` |
|
|
45
|
+
| **4. Implement Tasks** | **Claude Agent Kit** | 6 specialized agents execute work | Working code + tests |
|
|
46
|
+
| **5. Archive & Update** | OpenSpec | Merge changes back to specs | Updated `specs/` |
|
|
24
47
|
|
|
25
|
-
|
|
48
|
+
### What OpenSpec Generates
|
|
26
49
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
cd my-project
|
|
50
|
+
**proposal.md** - Business case and scope
|
|
51
|
+
```markdown
|
|
52
|
+
# Change Proposal: User Authentication System
|
|
31
53
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
54
|
+
## Motivation
|
|
55
|
+
Users need secure login functionality...
|
|
56
|
+
|
|
57
|
+
## Scope
|
|
58
|
+
- Email/password authentication
|
|
59
|
+
- JWT token generation
|
|
60
|
+
- Protected routes middleware
|
|
37
61
|
```
|
|
38
62
|
|
|
63
|
+
**tasks.md** - Implementation checklist
|
|
64
|
+
```markdown
|
|
65
|
+
## Database Setup
|
|
66
|
+
- [ ] Create User model with email, password fields
|
|
67
|
+
- [ ] Add unique constraint on email
|
|
68
|
+
|
|
69
|
+
## Backend Implementation
|
|
70
|
+
- [ ] POST /api/auth/login endpoint
|
|
71
|
+
- [ ] Password hashing with bcrypt
|
|
72
|
+
- [ ] JWT token generation
|
|
73
|
+
|
|
74
|
+
## Frontend Implementation
|
|
75
|
+
- [ ] Login form component
|
|
76
|
+
- [ ] Form validation
|
|
77
|
+
- [ ] Token storage
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### What Claude Agent Kit Does
|
|
81
|
+
|
|
82
|
+
**Input:** Reads `proposal.md` + `tasks.md` from OpenSpec
|
|
83
|
+
|
|
84
|
+
**Process:**
|
|
85
|
+
1. `/pageplan` *(UI tasks only)* - Generate content & component reuse plan
|
|
86
|
+
2. `/csetup {change-id}` - Analyze tasks, classify by agent, generate workflow
|
|
87
|
+
3. `/cdev {change-id}` - Execute with 6 specialized agents in phases:
|
|
88
|
+
- **Phase 1:** UI with mock data (uxui-frontend)
|
|
89
|
+
- **Phase 2:** Real API + database (backend + database, parallel)
|
|
90
|
+
- **Phase 2.5:** Validate contracts (integration)
|
|
91
|
+
- **Phase 3:** Connect UI to API (frontend)
|
|
92
|
+
- **Phase 4:** Tests + bug fixes (test-debug)
|
|
93
|
+
|
|
94
|
+
**Output:** Working implementation ready for review
|
|
95
|
+
|
|
39
96
|
---
|
|
40
97
|
|
|
41
|
-
|
|
98
|
+
## 🎨 NEW: Page Planning for UI Tasks
|
|
42
99
|
|
|
43
|
-
|
|
100
|
+
**Problem:** Before `/pageplan`, agents would:
|
|
101
|
+
- ❌ Create duplicate components (3 different Navbar components!)
|
|
102
|
+
- ❌ Use inconsistent colors (`#0d7276` on landing, `#4f46e5` on dashboard)
|
|
103
|
+
- ❌ Generate lorem ipsum instead of real content
|
|
104
|
+
- ❌ Waste time searching for components during implementation
|
|
44
105
|
|
|
45
|
-
|
|
106
|
+
**Solution:** `/pageplan` command analyzes BEFORE implementing
|
|
46
107
|
|
|
47
|
-
|
|
48
|
-
2. เพิ่ม config นี้:
|
|
108
|
+
### How It Works
|
|
49
109
|
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
110
|
+
```bash
|
|
111
|
+
# Step 1: OpenSpec generates tasks
|
|
112
|
+
User: "Build landing page for TOEIC app"
|
|
113
|
+
→ Creates: .changes/landing-page/proposal.md + tasks.md
|
|
114
|
+
|
|
115
|
+
# Step 2: Generate page plan (NEW!)
|
|
116
|
+
User: /pageplan @prd.md @project_brief.md
|
|
117
|
+
|
|
118
|
+
# What it does:
|
|
119
|
+
# 1. Reads user-specified files (PRD, brief)
|
|
120
|
+
# 2. Reads proposal.md (technical architecture)
|
|
121
|
+
# 3. Reads STYLE_GUIDE.md (visual design)
|
|
122
|
+
# 4. Searches existing components (Navbar, Footer, etc.)
|
|
123
|
+
# 5. AI drafts real content from PRD
|
|
124
|
+
# 6. Generates: .changes/landing-page/page-plan.md
|
|
59
125
|
```
|
|
60
126
|
|
|
61
|
-
|
|
62
|
-
4. เช็คว่าใช้งานได้: พิมพ์ `/mcp` ดู list → ต้องมี `context7`
|
|
127
|
+
### page-plan.md Output
|
|
63
128
|
|
|
64
|
-
|
|
129
|
+
```markdown
|
|
130
|
+
# Page Plan: Landing Page
|
|
131
|
+
|
|
132
|
+
## 1. Component Plan
|
|
133
|
+
🔄 Reuse: Navbar, Footer (found in codebase)
|
|
134
|
+
✅ New Shared: (none)
|
|
135
|
+
✅ New Specific: HeroSection, FeatureGrid, TestimonialCarousel
|
|
136
|
+
|
|
137
|
+
## 2. Page Structure
|
|
138
|
+
<Layout>
|
|
139
|
+
<Navbar /> {/* Reuse */}
|
|
140
|
+
<HeroSection /> {/* New - see content below */}
|
|
141
|
+
<FeatureGrid />
|
|
142
|
+
<TestimonialCarousel />
|
|
143
|
+
<Footer /> {/* Reuse */}
|
|
144
|
+
</Layout>
|
|
145
|
+
|
|
146
|
+
## 3. Assets to Prepare
|
|
147
|
+
- [ ] hero-image.jpg (1920x1080)
|
|
148
|
+
- [ ] logo.svg (200x60)
|
|
149
|
+
- [ ] feature-icons (3x 24x24 SVG)
|
|
150
|
+
|
|
151
|
+
## 4. Content Draft (AI-Generated - Please Review & Edit)
|
|
152
|
+
**Headline:** "Master TOEIC with AI-Powered Tests"
|
|
153
|
+
**Subheadline:** "Experience exam-quality questions with instant AI scoring"
|
|
154
|
+
**CTA:** "Start Free Test"
|
|
155
|
+
|
|
156
|
+
**Features:**
|
|
157
|
+
- Real TOEIC-style questions
|
|
158
|
+
- Instant AI scoring
|
|
159
|
+
- Progress tracking dashboard
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Step 3: User Prepares
|
|
65
163
|
|
|
66
|
-
|
|
164
|
+
- ✅ Review content draft (edit as needed)
|
|
165
|
+
- ✅ Prepare assets (images, icons)
|
|
166
|
+
- ✅ Approve `page-plan.md`
|
|
67
167
|
|
|
68
|
-
|
|
168
|
+
### Step 4: Implementation
|
|
69
169
|
|
|
70
170
|
```bash
|
|
71
|
-
/
|
|
171
|
+
/csetup landing-page
|
|
172
|
+
/cdev landing-page
|
|
173
|
+
|
|
174
|
+
# uxui-frontend agent automatically:
|
|
175
|
+
# - STEP 0.5: Reads page-plan.md ✅
|
|
176
|
+
# - STEP 3: SKIP component search (already done!) ⚡ 25% faster
|
|
177
|
+
# - Uses: Real content from page-plan
|
|
178
|
+
# - Reuses: Navbar, Footer (no duplicates)
|
|
179
|
+
# - Creates: HeroSection, FeatureGrid, TestimonialCarousel
|
|
180
|
+
# - Applies: Colors/spacing from STYLE_GUIDE.md
|
|
72
181
|
```
|
|
73
182
|
|
|
74
|
-
|
|
183
|
+
### Benefits
|
|
75
184
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
185
|
+
| Before (No page-plan) | After (With page-plan) |
|
|
186
|
+
|----------------------|------------------------|
|
|
187
|
+
| ❌ Agent searches during implementation | ✅ Search done once upfront (25% faster) |
|
|
188
|
+
| ❌ Duplicate components created | ✅ Clear reuse plan |
|
|
189
|
+
| ❌ Lorem ipsum content | ✅ Real content from PRD |
|
|
190
|
+
| ❌ Missing assets mid-work | ✅ Asset checklist prepared |
|
|
191
|
+
| ❌ Inconsistent design | ✅ Synced with STYLE_GUIDE |
|
|
192
|
+
| ❌ Agent guesses structure | ✅ Clear component hierarchy |
|
|
81
193
|
|
|
82
|
-
|
|
83
|
-
- ถามว่าจะใช้ stack อะไร (Next.js? FastAPI? Django?)
|
|
84
|
-
- ถามต่อ: Database ORM? Testing framework?
|
|
85
|
-
- ดึง docs จาก Context7
|
|
194
|
+
### When to Use /pageplan
|
|
86
195
|
|
|
87
|
-
**2. สร้างไฟล์ Domain Context:**
|
|
88
196
|
```
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
197
|
+
✅ Use for:
|
|
198
|
+
- Landing pages
|
|
199
|
+
- Dashboards
|
|
200
|
+
- Multi-section UI pages
|
|
201
|
+
- Any task with multiple components
|
|
202
|
+
|
|
203
|
+
❌ Skip for:
|
|
204
|
+
- Backend API endpoints
|
|
205
|
+
- Database schemas
|
|
206
|
+
- Single-component tasks
|
|
207
|
+
- Non-UI work
|
|
94
208
|
```
|
|
95
209
|
|
|
96
|
-
|
|
97
|
-
```
|
|
98
|
-
✅ Agent Setup Complete!
|
|
210
|
+
---
|
|
99
211
|
|
|
100
|
-
|
|
212
|
+
## 🤖 The 6 Specialized Agents
|
|
101
213
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
-
|
|
105
|
-
|
|
106
|
-
|
|
214
|
+
| Agent | Color | Responsibility | Phase |
|
|
215
|
+
|-------|-------|---------------|-------|
|
|
216
|
+
| **uxui-frontend** | 🔵 Blue | Design UI components with mock data | 1 |
|
|
217
|
+
| **backend** | 🟣 Purple | Create API endpoints with validation | 2 |
|
|
218
|
+
| **database** | 🩷 Pink | Design schemas, migrations, queries | 2 |
|
|
219
|
+
| **integration** | 🟠 Orange | Validate API contracts before connecting | 2.5 |
|
|
220
|
+
| **frontend** | 🟢 Green | Connect UI to backend APIs | 3 |
|
|
221
|
+
| **test-debug** | 🔴 Red | Run tests and fix bugs (max 3-4 iterations) | 1,3,4 |
|
|
107
222
|
|
|
108
|
-
|
|
109
|
-
-
|
|
223
|
+
Each agent:
|
|
224
|
+
- ✅ Auto-discovers your project context (tech stack, best practices)
|
|
225
|
+
- ✅ Follows framework-specific patterns from Context7 MCP
|
|
226
|
+
- ✅ Maintains design consistency across the codebase
|
|
227
|
+
- ✅ Reports progress with detailed logging
|
|
110
228
|
|
|
111
|
-
|
|
112
|
-
- Next.js 15 App Router (5000 tokens)
|
|
113
|
-
- Prisma 6 Best Practices (5000 tokens)
|
|
114
|
-
- Zustand 5 TypeScript (3000 tokens)
|
|
229
|
+
---
|
|
115
230
|
|
|
116
|
-
|
|
231
|
+
## 📦 Installation
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
npm install -g @champpaba/claude-agent-kit
|
|
117
235
|
```
|
|
118
236
|
|
|
119
|
-
|
|
237
|
+
### Alternative Package Managers
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
# Using pnpm
|
|
241
|
+
pnpm add -g @champpaba/claude-agent-kit
|
|
242
|
+
|
|
243
|
+
# Using yarn
|
|
244
|
+
yarn global add @champpaba/claude-agent-kit
|
|
245
|
+
```
|
|
120
246
|
|
|
121
247
|
---
|
|
122
248
|
|
|
123
|
-
|
|
249
|
+
## 🚀 Quick Start (with OpenSpec)
|
|
124
250
|
|
|
125
|
-
|
|
251
|
+
### Step 1: OpenSpec Planning
|
|
126
252
|
|
|
127
253
|
```bash
|
|
128
|
-
|
|
129
|
-
|
|
254
|
+
# In your OpenSpec-enabled project
|
|
255
|
+
cd my-app
|
|
130
256
|
|
|
131
|
-
|
|
257
|
+
# Draft a change proposal (OpenSpec handles this)
|
|
258
|
+
"I want to build a landing page for my TOEIC app"
|
|
259
|
+
# → Generates: .changes/landing-page/proposal.md + tasks.md
|
|
260
|
+
```
|
|
132
261
|
|
|
133
|
-
|
|
134
|
-
# MyProject Design Tokens
|
|
262
|
+
### Step 2: Initialize Claude Agent Kit
|
|
135
263
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
- Accent: `rgb(76, 175, 80)` (Green - Success)
|
|
264
|
+
```bash
|
|
265
|
+
# Initialize the agent system
|
|
266
|
+
cak init
|
|
140
267
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
- Accent: Success messages, completed states
|
|
268
|
+
# Setup project context (detects tech stack)
|
|
269
|
+
# In Claude Code:
|
|
270
|
+
/psetup
|
|
145
271
|
```
|
|
146
272
|
|
|
147
|
-
|
|
273
|
+
### Step 3: Generate Page Plan (UI tasks only)
|
|
148
274
|
|
|
149
|
-
|
|
275
|
+
```bash
|
|
276
|
+
# In Claude Code:
|
|
277
|
+
/pageplan @prd.md @project_brief.md
|
|
150
278
|
|
|
151
|
-
|
|
279
|
+
# → Generates: .changes/landing-page/page-plan.md
|
|
280
|
+
# → Review content, prepare assets
|
|
281
|
+
```
|
|
152
282
|
|
|
153
|
-
###
|
|
283
|
+
### Step 4: Setup Change Context
|
|
154
284
|
|
|
155
285
|
```bash
|
|
156
|
-
|
|
157
|
-
/agents orchestrator
|
|
158
|
-
|
|
159
|
-
# สั่งงาน
|
|
160
|
-
"สร้าง login form ใช้ Next.js + Prisma"
|
|
286
|
+
/csetup landing-page
|
|
161
287
|
```
|
|
162
288
|
|
|
163
|
-
**
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
- **Frontend**: ต่อ API
|
|
170
|
-
- **Backend**: สร้าง POST /api/auth/login
|
|
171
|
-
- **Database**: สร้าง User model
|
|
289
|
+
**What happens:**
|
|
290
|
+
- Reads `.changes/landing-page/proposal.md` (business context)
|
|
291
|
+
- Reads `.changes/landing-page/tasks.md` (implementation checklist)
|
|
292
|
+
- Reads `.changes/landing-page/page-plan.md` (if exists - content plan)
|
|
293
|
+
- Classifies tasks by agent (database, backend, frontend, etc.)
|
|
294
|
+
- Generates `workflow.md` (execution plan)
|
|
172
295
|
|
|
173
|
-
|
|
296
|
+
### Step 5: Execute Implementation
|
|
297
|
+
|
|
298
|
+
```bash
|
|
299
|
+
/cdev landing-page
|
|
300
|
+
```
|
|
174
301
|
|
|
175
|
-
|
|
302
|
+
**What happens:**
|
|
303
|
+
1. **Phase 1:** uxui-frontend reads `page-plan.md` → creates UI with real content
|
|
304
|
+
2. **Phase 2:** backend + database create APIs + models (parallel, if needed)
|
|
305
|
+
3. **Phase 2.5:** integration validates API contracts
|
|
306
|
+
4. **Phase 3:** frontend connects UI to APIs (if needed)
|
|
307
|
+
5. **Phase 4:** test-debug runs tests, fixes bugs
|
|
176
308
|
|
|
177
|
-
|
|
309
|
+
### Step 6: Monitor Progress
|
|
178
310
|
|
|
179
|
-
```
|
|
180
|
-
#
|
|
311
|
+
```bash
|
|
312
|
+
# View detailed progress
|
|
313
|
+
/cview landing-page
|
|
181
314
|
|
|
182
|
-
|
|
183
|
-
-
|
|
184
|
-
-
|
|
185
|
-
|
|
186
|
-
- Testing: Vitest
|
|
315
|
+
# Quick status check
|
|
316
|
+
/cstatus landing-page
|
|
317
|
+
# → Phase 1/4 - UI Implementation (100%)
|
|
318
|
+
```
|
|
187
319
|
|
|
188
320
|
---
|
|
189
321
|
|
|
190
|
-
##
|
|
191
|
-
**Goal:** 1 user สามารถ login ได้
|
|
322
|
+
## 🎯 Complete Workflow Examples
|
|
192
323
|
|
|
193
|
-
###
|
|
194
|
-
- Email input (required, type=email)
|
|
195
|
-
- Password input (required, minLength=8)
|
|
196
|
-
- Submit button
|
|
197
|
-
- Mock data: `{ email: 'test@example.com', password: 'password123' }`
|
|
324
|
+
### Workflow A: UI Feature (with /pageplan)
|
|
198
325
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
326
|
+
```bash
|
|
327
|
+
# 1. OpenSpec Planning
|
|
328
|
+
User: "Build landing page for TOEIC app"
|
|
329
|
+
→ Creates: proposal.md + tasks.md
|
|
330
|
+
|
|
331
|
+
# 2. Page Planning (NEW!)
|
|
332
|
+
/pageplan @prd.md @project_brief.md
|
|
333
|
+
→ Creates: page-plan.md
|
|
334
|
+
→ User reviews content & prepares assets
|
|
335
|
+
|
|
336
|
+
# 3. Setup Context
|
|
337
|
+
/csetup landing-page
|
|
338
|
+
→ Reads: proposal.md, tasks.md, page-plan.md
|
|
339
|
+
→ Generates: workflow.md
|
|
340
|
+
|
|
341
|
+
# 4. Implementation
|
|
342
|
+
/cdev landing-page
|
|
343
|
+
→ uxui-frontend reads page-plan.md (STEP 0.5)
|
|
344
|
+
→ Skips redundant component search
|
|
345
|
+
→ Uses real content + reuse plan
|
|
346
|
+
→ 25% faster implementation
|
|
347
|
+
|
|
348
|
+
# 5. Monitor
|
|
349
|
+
/cview landing-page
|
|
350
|
+
```
|
|
202
351
|
|
|
203
|
-
###
|
|
204
|
-
**STOP** - User tests manually, approves before Phase 2
|
|
352
|
+
### Workflow B: Backend Feature (skip /pageplan)
|
|
205
353
|
|
|
206
|
-
|
|
354
|
+
```bash
|
|
355
|
+
# 1. OpenSpec Planning
|
|
356
|
+
User: "Add payment processing API"
|
|
357
|
+
→ Creates: proposal.md + tasks.md
|
|
358
|
+
|
|
359
|
+
# 2. Setup Context (skip /pageplan - not UI work)
|
|
360
|
+
/csetup payment-api
|
|
361
|
+
|
|
362
|
+
# 3. Implementation
|
|
363
|
+
/cdev payment-api
|
|
364
|
+
→ Phase 2: backend + database agents (parallel)
|
|
365
|
+
→ Phase 2.5: integration validates contracts
|
|
366
|
+
→ Phase 3: frontend connects (if UI exists)
|
|
367
|
+
→ Phase 4: test-debug validates
|
|
368
|
+
|
|
369
|
+
# 4. Monitor
|
|
370
|
+
/cview payment-api
|
|
371
|
+
```
|
|
207
372
|
|
|
208
|
-
|
|
209
|
-
**Goal:** Connect form to real backend
|
|
373
|
+
### Workflow C: Full-Stack Feature (with /pageplan)
|
|
210
374
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
375
|
+
```bash
|
|
376
|
+
# 1. OpenSpec Planning
|
|
377
|
+
User: "Build user authentication system"
|
|
378
|
+
→ Creates: proposal.md + tasks.md
|
|
379
|
+
|
|
380
|
+
# 2. Page Planning (for login UI only)
|
|
381
|
+
/pageplan @prd.md
|
|
382
|
+
→ Creates: page-plan.md (login form content + components)
|
|
383
|
+
|
|
384
|
+
# 3. Setup Context
|
|
385
|
+
/csetup auth-system
|
|
386
|
+
|
|
387
|
+
# 4. Implementation
|
|
388
|
+
/cdev auth-system
|
|
389
|
+
→ Phase 1: uxui-frontend (login form, reads page-plan.md)
|
|
390
|
+
→ Phase 2: backend (POST /api/auth/login) + database (User model)
|
|
391
|
+
→ Phase 2.5: integration (validate contract)
|
|
392
|
+
→ Phase 3: frontend (connect form to API)
|
|
393
|
+
→ Phase 4: test-debug (E2E tests)
|
|
394
|
+
|
|
395
|
+
# 5. Monitor
|
|
396
|
+
/cview auth-system
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
---
|
|
215
400
|
|
|
216
|
-
|
|
217
|
-
- Replace mock data with fetch('/api/auth/login')
|
|
218
|
-
- Handle loading state
|
|
219
|
-
- Handle error messages
|
|
401
|
+
## 📁 Project Structure After Init
|
|
220
402
|
|
|
221
|
-
|
|
222
|
-
-
|
|
223
|
-
|
|
224
|
-
|
|
403
|
+
```
|
|
404
|
+
your-project/
|
|
405
|
+
├── openspec/
|
|
406
|
+
│ ├── specs/ # Source of truth (OpenSpec)
|
|
407
|
+
│ └── changes/
|
|
408
|
+
│ └── landing-page/
|
|
409
|
+
│ ├── proposal.md ← OpenSpec generates
|
|
410
|
+
│ ├── tasks.md ← OpenSpec generates
|
|
411
|
+
│ ├── page-plan.md ← /pageplan generates (UI tasks)
|
|
412
|
+
│ ├── workflow.md ← /csetup generates
|
|
413
|
+
│ └── flags.json ← /cdev tracks progress
|
|
414
|
+
│
|
|
415
|
+
├── design-system/
|
|
416
|
+
│ └── STYLE_GUIDE.md ← /designsetup generates
|
|
417
|
+
│
|
|
418
|
+
└── .claude/
|
|
419
|
+
├── CLAUDE.md # Navigation guide
|
|
420
|
+
│
|
|
421
|
+
├── agents/ # 6 specialized agents
|
|
422
|
+
│ ├── 01-integration.md
|
|
423
|
+
│ ├── 02-uxui-frontend.md
|
|
424
|
+
│ ├── 03-test-debug.md
|
|
425
|
+
│ ├── 04-frontend.md
|
|
426
|
+
│ ├── 05-backend.md
|
|
427
|
+
│ └── 06-database.md
|
|
428
|
+
│
|
|
429
|
+
├── commands/ # Slash commands
|
|
430
|
+
│ ├── designsetup.md # Generate style guide
|
|
431
|
+
│ ├── pageplan.md # Generate page plan (NEW!)
|
|
432
|
+
│ ├── psetup.md # Project setup
|
|
433
|
+
│ ├── csetup.md # Change setup
|
|
434
|
+
│ ├── cdev.md # Change development
|
|
435
|
+
│ ├── cview.md # View progress
|
|
436
|
+
│ └── cstatus.md # Quick status
|
|
437
|
+
│
|
|
438
|
+
├── contexts/
|
|
439
|
+
│ ├── design/ # Design foundation
|
|
440
|
+
│ ├── patterns/ # Universal patterns
|
|
441
|
+
│ └── domain/ # Project context
|
|
442
|
+
│
|
|
443
|
+
└── lib/ # Implementation logic
|
|
444
|
+
├── agent-executor.md
|
|
445
|
+
├── tdd-classifier.md
|
|
446
|
+
├── flags-updater.md
|
|
447
|
+
└── agent-router.md
|
|
448
|
+
```
|
|
225
449
|
|
|
226
450
|
---
|
|
227
451
|
|
|
228
|
-
##
|
|
452
|
+
## 🎯 Why Use Claude Agent Kit?
|
|
229
453
|
|
|
230
|
-
###
|
|
231
|
-
```prisma
|
|
232
|
-
model User {
|
|
233
|
-
id String @id @default(uuid())
|
|
234
|
-
email String @unique
|
|
235
|
-
password String // bcrypt hash
|
|
236
|
-
name String?
|
|
237
|
-
createdAt DateTime @default(now())
|
|
238
|
-
}
|
|
239
|
-
```
|
|
454
|
+
### Without Claude Agent Kit (Manual Implementation)
|
|
240
455
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
456
|
+
```
|
|
457
|
+
❌ You manually interpret tasks.md
|
|
458
|
+
❌ You context-switch between frontend/backend/database
|
|
459
|
+
❌ You might forget edge cases or tests
|
|
460
|
+
❌ Inconsistent code patterns across features
|
|
461
|
+
❌ No systematic error handling
|
|
462
|
+
❌ Duplicate components everywhere
|
|
463
|
+
❌ Lorem ipsum content in UI
|
|
464
|
+
```
|
|
245
465
|
|
|
246
|
-
###
|
|
247
|
-
- Install jsonwebtoken
|
|
248
|
-
- Generate token with user.id payload
|
|
249
|
-
- Set expiry (7 days)
|
|
466
|
+
### With Claude Agent Kit
|
|
250
467
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
468
|
+
```
|
|
469
|
+
✅ Agents auto-classify and execute tasks
|
|
470
|
+
✅ Each agent focuses on its specialty
|
|
471
|
+
✅ Built-in validation gates (integration agent)
|
|
472
|
+
✅ Consistent patterns via auto-discovery
|
|
473
|
+
✅ Automatic retry with escalation
|
|
474
|
+
✅ Component reuse plan (/pageplan)
|
|
475
|
+
✅ Real content from PRD
|
|
476
|
+
✅ 25% faster UI implementation
|
|
477
|
+
```
|
|
254
478
|
|
|
255
479
|
---
|
|
256
480
|
|
|
257
|
-
##
|
|
481
|
+
## 📚 Key Features
|
|
258
482
|
|
|
259
|
-
###
|
|
260
|
-
- Add try-catch to all API routes
|
|
261
|
-
- Return proper HTTP status codes
|
|
262
|
-
- Log all errors with logger.error()
|
|
483
|
+
### ✅ Seamless OpenSpec Integration
|
|
263
484
|
|
|
264
|
-
|
|
265
|
-
-
|
|
266
|
-
-
|
|
485
|
+
- Reads `proposal.md` for business context
|
|
486
|
+
- Parses `tasks.md` for implementation checklist
|
|
487
|
+
- Generates `page-plan.md` for UI tasks (NEW!)
|
|
488
|
+
- Tracks progress in `flags.json`
|
|
489
|
+
- Updates completion status back to OpenSpec
|
|
267
490
|
|
|
268
|
-
###
|
|
269
|
-
- Add rate limiting (max 5 login attempts/minute)
|
|
270
|
-
- Add CORS configuration
|
|
271
|
-
- Add input sanitization
|
|
491
|
+
### ✅ Auto-Generated Best Practices
|
|
272
492
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
493
|
+
Uses Context7 MCP to fetch latest framework docs:
|
|
494
|
+
|
|
495
|
+
```bash
|
|
496
|
+
/psetup
|
|
497
|
+
# → Detects: Next.js 15, React 18, Prisma 6
|
|
498
|
+
# → Generates: .claude/contexts/domain/{project}/best-practices/
|
|
499
|
+
# - nextjs-15.md
|
|
500
|
+
# - react-18.md
|
|
501
|
+
# - prisma-6.md
|
|
276
502
|
```
|
|
277
503
|
|
|
278
|
-
|
|
504
|
+
### ✅ 3-Level Project Indexing
|
|
279
505
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
506
|
+
Agents auto-discover context:
|
|
507
|
+
|
|
508
|
+
```
|
|
509
|
+
1. Read: domain/index.md → Get current project
|
|
510
|
+
2. Read: domain/{project}/README.md → Get tech stack
|
|
511
|
+
3. Read: domain/{project}/best-practices/index.md → Load patterns
|
|
283
512
|
```
|
|
284
513
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
514
|
+
### ✅ Design Foundation
|
|
515
|
+
|
|
516
|
+
Universal design principles:
|
|
517
|
+
- Color theory (WCAG AAA contrast)
|
|
518
|
+
- Typography scales
|
|
519
|
+
- 8px spacing grid (8, 16, 24, 32, 40, 48px)
|
|
520
|
+
- 4-level shadow system
|
|
521
|
+
- Box thinking framework
|
|
522
|
+
- Accessibility (WCAG 2.1 AA)
|
|
523
|
+
|
|
524
|
+
### ✅ Quality Gates
|
|
525
|
+
|
|
526
|
+
- **TDD for critical paths** (auth, payments, data transforms)
|
|
527
|
+
- **Test-alongside for simple code** (CRUD, UI components)
|
|
528
|
+
- **Max 3-4 retry iterations** before escalation
|
|
529
|
+
- **Integration validation** before connecting UI to API
|
|
291
530
|
|
|
292
531
|
---
|
|
293
532
|
|
|
294
|
-
|
|
533
|
+
## 🔧 CLI Commands
|
|
295
534
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
/agents orchestrator
|
|
299
|
-
"สร้าง user profile page - ให้แก้ไขชื่อ/อีเมลได้"
|
|
300
|
-
```
|
|
535
|
+
### `cak init`
|
|
536
|
+
Initialize agent system in current project
|
|
301
537
|
|
|
302
|
-
**แก้ Bug:**
|
|
303
538
|
```bash
|
|
304
|
-
|
|
305
|
-
|
|
539
|
+
cak init
|
|
540
|
+
cak init --force # Overwrite existing .claude/
|
|
306
541
|
```
|
|
307
542
|
|
|
308
|
-
**
|
|
543
|
+
**Creates:**
|
|
544
|
+
- `.claude/` folder with 6 agents
|
|
545
|
+
- Slash commands (`/psetup`, `/csetup`, `/cdev`, etc.)
|
|
546
|
+
- Universal patterns & design foundation
|
|
547
|
+
|
|
548
|
+
---
|
|
549
|
+
|
|
550
|
+
### `cak update`
|
|
551
|
+
Update to latest agent templates
|
|
552
|
+
|
|
309
553
|
```bash
|
|
310
|
-
|
|
311
|
-
|
|
554
|
+
cak update
|
|
555
|
+
cak update --backup # Create .claude.backup/ first
|
|
312
556
|
```
|
|
313
557
|
|
|
558
|
+
**What it does:**
|
|
559
|
+
- Updates all template files to latest version
|
|
560
|
+
- Preserves your customizations in `domain/`
|
|
561
|
+
- Creates backup before updating (with `--backup` flag)
|
|
562
|
+
|
|
314
563
|
---
|
|
315
564
|
|
|
316
|
-
|
|
565
|
+
### `cak --version`
|
|
566
|
+
Show version number
|
|
317
567
|
|
|
318
|
-
**อ่าน navigation guide:**
|
|
319
568
|
```bash
|
|
320
|
-
|
|
569
|
+
cak --version
|
|
570
|
+
# → 1.0.0
|
|
321
571
|
```
|
|
322
572
|
|
|
323
|
-
|
|
573
|
+
---
|
|
574
|
+
|
|
575
|
+
### `cak --help`
|
|
576
|
+
Display help information
|
|
577
|
+
|
|
324
578
|
```bash
|
|
325
|
-
|
|
579
|
+
cak --help
|
|
326
580
|
```
|
|
327
581
|
|
|
328
|
-
|
|
582
|
+
---
|
|
583
|
+
|
|
584
|
+
## 🔄 Workflow Commands (in Claude Code)
|
|
585
|
+
|
|
586
|
+
### `/designsetup` - Generate style guide (one-time)
|
|
587
|
+
|
|
329
588
|
```bash
|
|
330
|
-
|
|
331
|
-
# - logging.md (structured JSON logging)
|
|
332
|
-
# - testing.md (TDD, Red-Green-Refactor)
|
|
333
|
-
# - error-handling.md (try-catch, retry, circuit breaker)
|
|
334
|
-
# - task-breakdown.md (4-phase methodology)
|
|
589
|
+
/designsetup
|
|
335
590
|
```
|
|
336
591
|
|
|
337
|
-
|
|
592
|
+
**Auto-detects from:**
|
|
593
|
+
1. `reference/` folder → Extract design from HTML/screenshots
|
|
594
|
+
2. Existing codebase → Reverse engineer patterns
|
|
595
|
+
3. AI generation → Modern best practices
|
|
596
|
+
|
|
597
|
+
**Creates:** `design-system/STYLE_GUIDE.md`
|
|
598
|
+
|
|
599
|
+
---
|
|
600
|
+
|
|
601
|
+
### `/pageplan` - Generate page plan (UI tasks only) 🆕
|
|
602
|
+
|
|
338
603
|
```bash
|
|
339
|
-
|
|
340
|
-
# - box-thinking.md (layout analysis framework)
|
|
341
|
-
# - accessibility.md (WCAG 2.1 AA compliance)
|
|
342
|
-
# - color-theory.md, typography.md, spacing.md, etc.
|
|
604
|
+
/pageplan @prd.md @project_brief.md
|
|
343
605
|
```
|
|
344
606
|
|
|
607
|
+
**What it does:**
|
|
608
|
+
- Reads user-specified files (PRD, brief)
|
|
609
|
+
- Reads `proposal.md` + `STYLE_GUIDE.md`
|
|
610
|
+
- Searches existing components
|
|
611
|
+
- AI drafts real content from PRD
|
|
612
|
+
- Generates asset checklist
|
|
613
|
+
|
|
614
|
+
**Creates:** `page-plan.md`
|
|
615
|
+
- Component reuse plan (🔄 Reuse vs ✅ New)
|
|
616
|
+
- Page structure (component hierarchy)
|
|
617
|
+
- Assets to prepare (images, icons)
|
|
618
|
+
- Content draft (headlines, descriptions)
|
|
619
|
+
|
|
345
620
|
---
|
|
346
621
|
|
|
347
|
-
|
|
622
|
+
### `/psetup` - Setup project (one-time)
|
|
348
623
|
|
|
349
|
-
|
|
350
|
-
|
|
624
|
+
```bash
|
|
625
|
+
/psetup
|
|
626
|
+
```
|
|
351
627
|
|
|
352
|
-
|
|
353
|
-
|
|
628
|
+
**What it does:**
|
|
629
|
+
- Detects tech stack (Next.js, React, Prisma, etc.)
|
|
630
|
+
- Creates `domain/{project}/README.md`
|
|
631
|
+
- Generates best practices via Context7 MCP
|
|
354
632
|
|
|
355
|
-
|
|
356
|
-
Runs tests, fixes bugs automatically (max 3-4 iterations, then escalates).
|
|
633
|
+
---
|
|
357
634
|
|
|
358
|
-
###
|
|
359
|
-
Connects components to real APIs, implements state management.
|
|
635
|
+
### `/csetup {change-id}` - Setup change context
|
|
360
636
|
|
|
361
|
-
|
|
362
|
-
|
|
637
|
+
```bash
|
|
638
|
+
/csetup landing-page
|
|
639
|
+
```
|
|
363
640
|
|
|
364
|
-
|
|
365
|
-
|
|
641
|
+
**What it does:**
|
|
642
|
+
- Reads `proposal.md` (business context)
|
|
643
|
+
- Reads `tasks.md` (implementation checklist)
|
|
644
|
+
- Reads `page-plan.md` (if exists - UI content plan)
|
|
645
|
+
- Classifies tasks by agent
|
|
646
|
+
- Generates `workflow.md` (execution plan)
|
|
366
647
|
|
|
367
648
|
---
|
|
368
649
|
|
|
369
|
-
|
|
650
|
+
### `/cdev {change-id}` - Execute implementation
|
|
370
651
|
|
|
652
|
+
```bash
|
|
653
|
+
/cdev landing-page
|
|
371
654
|
```
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
│ ├── 04-frontend.md
|
|
379
|
-
│ ├── 05-backend.md
|
|
380
|
-
│ └── 06-database.md
|
|
381
|
-
│
|
|
382
|
-
└── contexts/
|
|
383
|
-
├── patterns/ # Universal patterns (static)
|
|
384
|
-
│ ├── logging.md
|
|
385
|
-
│ ├── testing.md
|
|
386
|
-
│ ├── error-handling.md
|
|
387
|
-
│ ├── task-breakdown.md
|
|
388
|
-
│ ├── development-principles.md
|
|
389
|
-
│ ├── code-standards.md
|
|
390
|
-
│ # REMOVED - Use Context7 MCP instead
|
|
391
|
-
│ # REMOVED - Use Context7 MCP instead
|
|
392
|
-
│ # REMOVED - Optional (OpenSpec, BMAD, SpecKit)
|
|
393
|
-
│
|
|
394
|
-
├── design/ # Design foundation (static)
|
|
395
|
-
│ ├── index.md
|
|
396
|
-
│ ├── color-theory.md
|
|
397
|
-
│ ├── typography.md
|
|
398
|
-
│ ├── spacing.md
|
|
399
|
-
│ ├── shadows.md
|
|
400
|
-
│ ├── layout.md
|
|
401
|
-
│ ├── responsive.md
|
|
402
|
-
│ ├── box-thinking.md
|
|
403
|
-
│ └── accessibility.md
|
|
404
|
-
│
|
|
405
|
-
└── domain/ # Project-specific (you create)
|
|
406
|
-
└── README.md
|
|
407
|
-
```
|
|
655
|
+
|
|
656
|
+
**What it does:**
|
|
657
|
+
- Runs agents in phases (1 → 2 → 2.5 → 3 → 4)
|
|
658
|
+
- uxui-frontend auto-reads `page-plan.md` (STEP 0.5)
|
|
659
|
+
- Updates `flags.json` (progress tracking)
|
|
660
|
+
- Reports completion status
|
|
408
661
|
|
|
409
662
|
---
|
|
410
663
|
|
|
411
|
-
|
|
664
|
+
### `/cview {change-id}` - View detailed progress
|
|
412
665
|
|
|
413
|
-
|
|
666
|
+
```bash
|
|
667
|
+
/cview landing-page
|
|
668
|
+
```
|
|
414
669
|
|
|
415
|
-
|
|
416
|
-
-
|
|
417
|
-
-
|
|
418
|
-
-
|
|
419
|
-
-
|
|
420
|
-
- **Accessibility** - ARIA, keyboard nav, screen readers
|
|
670
|
+
**Shows:**
|
|
671
|
+
- Completed/pending tasks
|
|
672
|
+
- Agent activity log
|
|
673
|
+
- Current phase
|
|
674
|
+
- Error messages (if any)
|
|
421
675
|
|
|
422
|
-
|
|
676
|
+
---
|
|
677
|
+
|
|
678
|
+
### `/cstatus {change-id}` - Quick status
|
|
679
|
+
|
|
680
|
+
```bash
|
|
681
|
+
/cstatus landing-page
|
|
682
|
+
# → Phase 2/4 - Backend Implementation (75%)
|
|
683
|
+
```
|
|
423
684
|
|
|
424
685
|
---
|
|
425
686
|
|
|
426
|
-
##
|
|
687
|
+
## 🎨 Design System Integration
|
|
427
688
|
|
|
428
|
-
###
|
|
429
|
-
- Business logic (calculations, transformations)
|
|
430
|
-
- API endpoints (validation, error handling)
|
|
431
|
-
- External service integrations
|
|
432
|
-
- Data transformations
|
|
689
|
+
### Auto-Generate Style Guide
|
|
433
690
|
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
- Configuration files
|
|
691
|
+
```bash
|
|
692
|
+
/designsetup
|
|
693
|
+
```
|
|
438
694
|
|
|
439
|
-
**
|
|
695
|
+
**Detection priority:**
|
|
696
|
+
1. **reference/ folder** (HTML/screenshots) → Extract design style
|
|
697
|
+
2. **Existing codebase** (>10 components) → Reverse engineer patterns
|
|
698
|
+
3. **AI generation** → Modern best practices
|
|
699
|
+
|
|
700
|
+
**Output:** `design-system/STYLE_GUIDE.md`
|
|
701
|
+
|
|
702
|
+
**17 Comprehensive Sections:**
|
|
703
|
+
1. Overview
|
|
704
|
+
2. Design Philosophy
|
|
705
|
+
3. Color Palette (HEX codes, usage, Tailwind classes)
|
|
706
|
+
4. Typography (headings, body, weights)
|
|
707
|
+
5. Spacing System (4px/8px grid)
|
|
708
|
+
6. Component Styles (Button, Card, Input, Badge, etc.)
|
|
709
|
+
7. Shadows & Elevation
|
|
710
|
+
8. Animations & Transitions
|
|
711
|
+
9. Border Styles
|
|
712
|
+
10. Border Radius
|
|
713
|
+
11. Opacity & Transparency
|
|
714
|
+
12. Z-Index Layers
|
|
715
|
+
13. Responsive Breakpoints
|
|
716
|
+
14. CSS Variables / Tailwind Theme (Design Tokens)
|
|
717
|
+
15. Layout Patterns
|
|
718
|
+
16. Example Component Reference (React + Tailwind code)
|
|
719
|
+
17. Additional Sections (Best Practices, Accessibility, Icon System)
|
|
720
|
+
|
|
721
|
+
**Agents automatically use `STYLE_GUIDE.md` for:**
|
|
722
|
+
- Color palette (no hardcoded colors)
|
|
723
|
+
- Spacing scale (consistent gaps/padding)
|
|
724
|
+
- Typography (font hierarchy)
|
|
725
|
+
- Component patterns (reuse before create)
|
|
440
726
|
|
|
441
727
|
---
|
|
442
728
|
|
|
443
|
-
##
|
|
729
|
+
## 🧪 Testing Philosophy
|
|
444
730
|
|
|
445
|
-
**
|
|
731
|
+
**Agents follow TDD classification:**
|
|
446
732
|
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
```
|
|
733
|
+
| Code Type | Approach | Example |
|
|
734
|
+
|-----------|----------|---------|
|
|
735
|
+
| **Critical paths** | TDD (Red-Green-Refactor) | Auth logic, payments, calculations |
|
|
736
|
+
| **Simple code** | Test-alongside | CRUD, UI components, config |
|
|
452
737
|
|
|
453
|
-
|
|
738
|
+
**Test-debug agent:**
|
|
739
|
+
- Runs tests automatically after implementation
|
|
740
|
+
- Fixes bugs (max 3-4 iterations)
|
|
741
|
+
- Escalates if stuck (reports to user)
|
|
454
742
|
|
|
455
743
|
---
|
|
456
744
|
|
|
457
|
-
## 🔧 Tech
|
|
745
|
+
## 🔧 Supported Tech Stacks
|
|
458
746
|
|
|
459
|
-
|
|
747
|
+
Agents auto-detect your stack via Context7 MCP:
|
|
460
748
|
|
|
461
749
|
**Frontend:**
|
|
462
750
|
- Next.js, React, Vue, Svelte, Angular
|
|
463
751
|
|
|
464
752
|
**Backend:**
|
|
465
|
-
- FastAPI, Express, NestJS, Django, Flask
|
|
753
|
+
- FastAPI, Express, NestJS, Django, Flask, Next.js API Routes
|
|
466
754
|
|
|
467
755
|
**Database:**
|
|
468
756
|
- Prisma, SQLAlchemy, TypeORM, Drizzle
|
|
@@ -470,49 +758,99 @@ See: `.claude/contexts/patterns/logging.md`
|
|
|
470
758
|
**Testing:**
|
|
471
759
|
- Vitest, Jest, Pytest, Playwright
|
|
472
760
|
|
|
473
|
-
|
|
761
|
+
---
|
|
762
|
+
|
|
763
|
+
## 📖 Usage Examples
|
|
764
|
+
|
|
765
|
+
### Example 1: Simple UI Task (with /pageplan)
|
|
766
|
+
|
|
767
|
+
```bash
|
|
768
|
+
# In Claude Code
|
|
769
|
+
"Build a user profile page with edit functionality"
|
|
770
|
+
|
|
771
|
+
# If it's a UI task, optionally run:
|
|
772
|
+
/pageplan @prd.md
|
|
773
|
+
|
|
774
|
+
# Then execute:
|
|
775
|
+
/csetup profile-page
|
|
776
|
+
/cdev profile-page
|
|
777
|
+
```
|
|
778
|
+
|
|
779
|
+
Claude will:
|
|
780
|
+
1. Read `task-classification.md`
|
|
781
|
+
2. Select agents: `uxui-frontend` → `backend` → `frontend` → `test-debug`
|
|
782
|
+
3. uxui-frontend reads `page-plan.md` (if exists)
|
|
783
|
+
4. Execute in sequence
|
|
784
|
+
5. Report completion
|
|
474
785
|
|
|
475
786
|
---
|
|
476
787
|
|
|
477
|
-
|
|
788
|
+
### Example 2: Complex Multi-Agent Workflow (OpenSpec)
|
|
478
789
|
|
|
479
|
-
|
|
790
|
+
Using OpenSpec workflow:
|
|
480
791
|
|
|
481
792
|
```bash
|
|
482
|
-
#
|
|
483
|
-
|
|
793
|
+
# 1. OpenSpec generates proposal + tasks
|
|
794
|
+
"I want to add a dashboard with analytics"
|
|
795
|
+
# → proposal.md + tasks.md created
|
|
796
|
+
|
|
797
|
+
# 2. Generate page plan
|
|
798
|
+
/pageplan @prd.md @analytics_spec.md
|
|
799
|
+
|
|
800
|
+
# 3. Setup change context
|
|
801
|
+
/csetup analytics-dashboard
|
|
802
|
+
|
|
803
|
+
# 4. Start development
|
|
804
|
+
/cdev analytics-dashboard
|
|
484
805
|
|
|
485
|
-
#
|
|
486
|
-
|
|
487
|
-
Database = Prisma
|
|
488
|
-
→ Agents use Context7: Next.js App Router docs + Prisma docs
|
|
806
|
+
# 5. View progress
|
|
807
|
+
/cview analytics-dashboard
|
|
489
808
|
```
|
|
490
809
|
|
|
491
|
-
|
|
810
|
+
This follows a structured 4-phase approach:
|
|
811
|
+
1. **Phase 1:** UI with mock data (uxui-frontend reads page-plan.md)
|
|
812
|
+
2. **Phase 2:** Real API + database (backend + database)
|
|
813
|
+
3. **Phase 2.5:** Validate contracts (integration)
|
|
814
|
+
4. **Phase 3:** Connect UI to API (frontend)
|
|
815
|
+
5. **Phase 4:** Tests + bug fixes (test-debug)
|
|
816
|
+
|
|
817
|
+
---
|
|
818
|
+
|
|
819
|
+
## 🔄 Updating to Latest Version
|
|
820
|
+
|
|
821
|
+
### Method 1: Update the npm package
|
|
492
822
|
|
|
493
823
|
```bash
|
|
494
|
-
|
|
495
|
-
|
|
824
|
+
npm update -g @champpaba/claude-agent-kit
|
|
825
|
+
```
|
|
826
|
+
|
|
827
|
+
### Method 2: Update template in project
|
|
496
828
|
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
→ Agents use Context7: FastAPI docs + SQLAlchemy docs
|
|
829
|
+
```bash
|
|
830
|
+
cd your-project
|
|
831
|
+
cak update --backup
|
|
501
832
|
```
|
|
502
833
|
|
|
834
|
+
This will:
|
|
835
|
+
- Create backup at `.claude.backup/`
|
|
836
|
+
- Update all template files
|
|
837
|
+
- Preserve your customizations in `domain/`
|
|
838
|
+
|
|
503
839
|
---
|
|
504
840
|
|
|
505
841
|
## 🎯 Customization
|
|
506
842
|
|
|
507
|
-
### Add
|
|
843
|
+
### Add Project-Specific Context
|
|
844
|
+
|
|
845
|
+
After running `cak init`, add your own context files:
|
|
508
846
|
|
|
509
847
|
```bash
|
|
510
|
-
mkdir -p .claude/contexts/domain/
|
|
848
|
+
mkdir -p .claude/contexts/domain/my-project
|
|
511
849
|
```
|
|
512
850
|
|
|
513
|
-
Example
|
|
851
|
+
**Example:** E-commerce checkout flow
|
|
514
852
|
```markdown
|
|
515
|
-
<!-- .claude/contexts/domain/
|
|
853
|
+
<!-- .claude/contexts/domain/my-project/checkout-flow.md -->
|
|
516
854
|
# Checkout Flow
|
|
517
855
|
|
|
518
856
|
## Steps
|
|
@@ -522,24 +860,34 @@ Example (E-commerce):
|
|
|
522
860
|
4. Order confirmation
|
|
523
861
|
|
|
524
862
|
## Business Rules
|
|
525
|
-
- Free shipping
|
|
863
|
+
- Free shipping over $50
|
|
526
864
|
- Tax calculation by state
|
|
527
865
|
- Inventory check before payment
|
|
528
866
|
```
|
|
529
867
|
|
|
530
|
-
Agents will
|
|
868
|
+
Agents will auto-discover and use these patterns.
|
|
869
|
+
|
|
870
|
+
---
|
|
871
|
+
|
|
872
|
+
## 🔗 Ecosystem
|
|
873
|
+
|
|
874
|
+
**Claude Agent Kit works with:**
|
|
875
|
+
|
|
876
|
+
| Tool | Purpose | Integration |
|
|
877
|
+
|------|---------|-------------|
|
|
878
|
+
| **OpenSpec** | Spec-driven planning | Reads `proposal.md` + `tasks.md` |
|
|
879
|
+
| **Context7 MCP** | Always-updated docs | Auto-generates best practices |
|
|
880
|
+
| **Claude Code** | AI coding assistant | Execution environment |
|
|
531
881
|
|
|
532
882
|
---
|
|
533
883
|
|
|
534
884
|
## 🤝 Contributing
|
|
535
885
|
|
|
536
|
-
|
|
886
|
+
We welcome contributions!
|
|
537
887
|
|
|
538
|
-
|
|
539
|
-
-
|
|
540
|
-
-
|
|
541
|
-
- Example projects
|
|
542
|
-
- Documentation improvements
|
|
888
|
+
- Report bugs: [GitHub Issues](https://github.com/ChampPABA/claude-multi-agent-template/issues)
|
|
889
|
+
- Feature requests: [Discussions](https://github.com/ChampPABA/claude-multi-agent-template/discussions)
|
|
890
|
+
- Pull requests: Follow [CONTRIBUTING.md](CONTRIBUTING.md)
|
|
543
891
|
|
|
544
892
|
---
|
|
545
893
|
|
|
@@ -552,10 +900,89 @@ MIT License - see [LICENSE](LICENSE)
|
|
|
552
900
|
## 🙏 Credits
|
|
553
901
|
|
|
554
902
|
Built with:
|
|
555
|
-
- [
|
|
556
|
-
- [
|
|
557
|
-
- [
|
|
903
|
+
- [OpenSpec](https://github.com/Fission-AI/OpenSpec) - Spec-driven development framework
|
|
904
|
+
- [Claude Code](https://claude.com/claude-code) - AI coding assistant
|
|
905
|
+
- [Context7 MCP](https://context7.com) - Always up-to-date library docs
|
|
906
|
+
|
|
907
|
+
---
|
|
908
|
+
|
|
909
|
+
## 🔗 Links
|
|
910
|
+
|
|
911
|
+
- **npm Package:** https://www.npmjs.com/package/@champpaba/claude-agent-kit
|
|
912
|
+
- **GitHub:** https://github.com/ChampPABA/claude-multi-agent-template
|
|
913
|
+
- **OpenSpec:** https://github.com/Fission-AI/OpenSpec
|
|
914
|
+
- **Issues:** https://github.com/ChampPABA/claude-multi-agent-template/issues
|
|
915
|
+
|
|
916
|
+
---
|
|
917
|
+
|
|
918
|
+
## 💡 Quick Tips
|
|
919
|
+
|
|
920
|
+
1. **Run `/designsetup` FIRST** - Ensures visual consistency from day 1
|
|
921
|
+
2. **Use `/pageplan` for UI tasks** - 25% faster implementation, better content
|
|
922
|
+
3. **Review `page-plan.md` before `/cdev`** - Edit content, prepare assets
|
|
923
|
+
4. **Setup Context7 MCP** - Agents get latest framework docs automatically
|
|
924
|
+
5. **Use OpenSpec for complex features** - Better alignment before implementation
|
|
925
|
+
6. **Monitor with `/cview`** - See exactly what agents are doing
|
|
926
|
+
7. **Always use `--backup` when updating** - Protects your customizations
|
|
558
927
|
|
|
559
928
|
---
|
|
560
929
|
|
|
561
|
-
|
|
930
|
+
## 📋 Complete Flow Summary
|
|
931
|
+
|
|
932
|
+
```
|
|
933
|
+
1️⃣ OpenSpec Planning
|
|
934
|
+
→ proposal.md + tasks.md
|
|
935
|
+
|
|
936
|
+
2️⃣ Generate Style Guide (one-time)
|
|
937
|
+
/designsetup
|
|
938
|
+
→ STYLE_GUIDE.md
|
|
939
|
+
|
|
940
|
+
3️⃣ Setup Project (one-time)
|
|
941
|
+
/psetup
|
|
942
|
+
→ domain/{project}/best-practices/
|
|
943
|
+
|
|
944
|
+
4️⃣ Generate Page Plan (UI tasks only)
|
|
945
|
+
/pageplan @prd.md
|
|
946
|
+
→ page-plan.md (content + component plan)
|
|
947
|
+
|
|
948
|
+
5️⃣ Setup Change Context
|
|
949
|
+
/csetup {change-id}
|
|
950
|
+
→ workflow.md
|
|
951
|
+
|
|
952
|
+
6️⃣ Execute Implementation
|
|
953
|
+
/cdev {change-id}
|
|
954
|
+
→ Working code + tests
|
|
955
|
+
|
|
956
|
+
7️⃣ Monitor Progress
|
|
957
|
+
/cview {change-id}
|
|
958
|
+
→ Detailed progress report
|
|
959
|
+
|
|
960
|
+
8️⃣ OpenSpec Archive & Update
|
|
961
|
+
→ Merge to specs/
|
|
962
|
+
```
|
|
963
|
+
|
|
964
|
+
---
|
|
965
|
+
|
|
966
|
+
**Ready to implement with confidence?** 🚀
|
|
967
|
+
|
|
968
|
+
```bash
|
|
969
|
+
# Install globally
|
|
970
|
+
npm install -g @champpaba/claude-agent-kit
|
|
971
|
+
|
|
972
|
+
# Initialize in your project
|
|
973
|
+
cd your-project
|
|
974
|
+
cak init
|
|
975
|
+
|
|
976
|
+
# Setup project context
|
|
977
|
+
/psetup
|
|
978
|
+
|
|
979
|
+
# Generate style guide (optional but recommended)
|
|
980
|
+
/designsetup
|
|
981
|
+
|
|
982
|
+
# Start building (after OpenSpec planning)
|
|
983
|
+
/pageplan @prd.md # UI tasks only
|
|
984
|
+
/csetup your-feature
|
|
985
|
+
/cdev your-feature
|
|
986
|
+
```
|
|
987
|
+
|
|
988
|
+
Let specialized agents handle implementation while you focus on specs and architecture!
|