@champpaba/claude-agent-kit 2.0.1 → 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/README.md CHANGED
@@ -4,1584 +4,194 @@
4
4
 
5
5
  [![npm version](https://badge.fury.io/js/@champpaba%2Fclaude-agent-kit.svg)](https://www.npmjs.com/package/@champpaba/claude-agent-kit)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
- [![Node.js Version](https://img.shields.io/node/v/@champpaba/claude-agent-kit)](https://nodejs.org)
8
7
 
9
8
  ---
10
9
 
11
- ## 🎯 What is this?
10
+ ## What is this?
12
11
 
13
- **Claude Agent Kit picks up where OpenSpec planning ends.**
14
-
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
12
+ **Claude Agent Kit** turns OpenSpec plans into working code using 6 specialized AI agents.
18
13
 
19
14
  ```
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
- ```
34
-
35
- ---
36
-
37
- ## 🔄 How They Work Together
38
-
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/` |
47
-
48
- ### What OpenSpec Generates
49
-
50
- **proposal.md** - Business case and scope
51
- ```markdown
52
- # Change Proposal: User Authentication System
53
-
54
- ## Motivation
55
- Users need secure login functionality...
56
-
57
- ## Scope
58
- - Email/password authentication
59
- - JWT token generation
60
- - Protected routes middleware
61
- ```
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
15
+ OpenSpec Planning → proposal.md + tasks.md
16
+
17
+ Claude Agent Kit 6 agents execute in phases → Working code + tests
78
18
  ```
79
19
 
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
-
96
20
  ---
97
21
 
98
- ## 🎨 NEW: Page Planning for UI Tasks
99
-
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
105
-
106
- **Solution:** `/pageplan` command analyzes BEFORE implementing
107
-
108
- ### How It Works
109
-
110
- ```bash
111
- # Step 1: OpenSpec generates tasks
112
- User: "Build landing page for TOEIC app"
113
- → Creates: openspec/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: openspec/changes/landing-page/page-plan.md
125
- ```
126
-
127
- ### page-plan.md Output
128
-
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
163
-
164
- - ✅ Review content draft (edit as needed)
165
- - ✅ Prepare assets (images, icons)
166
- - ✅ Approve `page-plan.md`
167
-
168
- ### Step 4: Implementation
169
-
170
- ```bash
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
181
- ```
182
-
183
- ### Benefits
184
-
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 |
193
-
194
- ### When to Use /pageplan
195
-
196
- ```
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
208
- ```
209
-
210
- ---
211
-
212
- ## 🤖 The 6 Specialized Agents
213
-
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 |
222
-
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
228
- - ✅ **Smart auto-proceed:** Eliminates double confirmations when user approves workflow
229
-
230
- ---
231
-
232
- ## 📦 Installation
22
+ ## Quick Start
233
23
 
234
24
  ```bash
25
+ # Install
235
26
  npm install -g @champpaba/claude-agent-kit
236
- ```
237
-
238
- ### Alternative Package Managers
239
27
 
240
- ```bash
241
- # Using pnpm
242
- pnpm add -g @champpaba/claude-agent-kit
28
+ # Initialize in your project
29
+ cd your-project
30
+ cak init
243
31
 
244
- # Using yarn
245
- yarn global add @champpaba/claude-agent-kit
32
+ # Use in Claude Code
33
+ /csetup my-feature # Setup change context
34
+ /cdev my-feature # Execute with agents
35
+ /cstatus my-feature # Check progress
246
36
  ```
247
37
 
248
38
  ---
249
39
 
250
- ## 🚀 Quick Start (with OpenSpec)
251
-
252
- ### Step 1: OpenSpec Planning
253
-
254
- ```bash
255
- # In your OpenSpec-enabled project
256
- cd my-app
257
-
258
- # Draft a change proposal (OpenSpec handles this)
259
- "I want to build a landing page for my TOEIC app"
260
- # → Generates: openspec/changes/landing-page/proposal.md + tasks.md
261
- ```
262
-
263
- ### Step 2: Initialize Claude Agent Kit
264
-
265
- ```bash
266
- # Initialize the agent system
267
- cak init
268
- ```
269
-
270
- ### Step 3: Generate Page Plan (UI tasks only)
40
+ ## The 6 Agents
271
41
 
272
- ```bash
273
- # In Claude Code:
274
- /pageplan @prd.md @project_brief.md
275
-
276
- # Generates: openspec/changes/landing-page/page-plan.md
277
- # Review content, prepare assets
278
- ```
279
-
280
- ### Step 4: Setup Change Context
42
+ | Agent | Phase | Responsibility |
43
+ |-------|-------|----------------|
44
+ | **uxui-frontend** | 1 | UI components with mock data |
45
+ | **backend** | 2 | API endpoints |
46
+ | **database** | 2 | Schemas, migrations |
47
+ | **integration** | 2.5 | Validate API contracts |
48
+ | **frontend** | 3 | Connect UI to APIs |
49
+ | **test-debug** | 4 | Tests and bug fixes |
281
50
 
282
- ```bash
283
- /csetup landing-page
284
- ```
51
+ ---
285
52
 
286
- **What happens:**
287
- - Reads `openspec/changes/landing-page/proposal.md` (business context)
288
- - Reads `openspec/changes/landing-page/tasks.md` (implementation checklist)
289
- - Reads `openspec/changes/landing-page/page-plan.md` (if exists - content plan)
290
- - Classifies tasks by agent (database, backend, frontend, etc.)
291
- - Generates `workflow.md` (execution plan)
53
+ ## Commands
292
54
 
293
- ### Step 5: Execute Implementation
55
+ ### CLI Commands
294
56
 
295
57
  ```bash
296
- /cdev landing-page
58
+ cak init # Initialize template
59
+ cak update --backup # Update to latest version
297
60
  ```
298
61
 
299
- **What happens:**
300
- 1. **Phase 1:** uxui-frontend reads `page-plan.md` → creates UI with real content
301
- 2. **Phase 2:** backend + database create APIs + models (parallel, if needed)
302
- 3. **Phase 2.5:** integration validates API contracts
303
- 4. **Phase 3:** frontend connects UI to APIs (if needed)
304
- 5. **Phase 4:** test-debug runs tests, fixes bugs
62
+ ### Slash Commands (in Claude Code)
305
63
 
306
- ### Step 6: Monitor Progress
307
-
308
- ```bash
309
- # View detailed progress
310
- /cview landing-page
311
-
312
- # Quick status check
313
- /cstatus landing-page
314
- # Phase 1/4 - UI Implementation (100%)
315
- ```
64
+ | Command | Description |
65
+ |---------|-------------|
66
+ | `/designsetup` | Generate style guide (one-time) |
67
+ | `/pageplan @prd.md` | Generate UI page plan |
68
+ | `/csetup {id}` | Setup change context |
69
+ | `/cdev {id}` | Execute with agents |
70
+ | `/cview {id}` | Detailed progress |
71
+ | `/cstatus {id}` | Quick status |
72
+ | `/pstatus` | Update project status |
316
73
 
317
74
  ---
318
75
 
319
- ## 🎯 Complete Workflow Examples
76
+ ## Cross-Session Context (v2.1.0)
320
77
 
321
- ### Workflow A: UI Feature (with /pageplan)
78
+ `PROJECT_STATUS.yml` helps Claude remember project state between sessions:
322
79
 
323
- ```bash
324
- # 1. OpenSpec Planning
325
- User: "Build landing page for TOEIC app"
326
- → Creates: proposal.md + tasks.md
80
+ ```yaml
81
+ # PROJECT_STATUS.yml
82
+ current_focus:
83
+ description: "Building auth system"
84
+ active_change: auth-system
327
85
 
328
- # 2. Page Planning (NEW!)
329
- /pageplan @prd.md @project_brief.md
330
- Creates: page-plan.md
331
- → User reviews content & prepares assets
86
+ infrastructure:
87
+ database: { status: healthy }
88
+ api: { status: healthy }
332
89
 
333
- # 3. Setup Context
334
- /csetup landing-page
335
- → Reads: proposal.md, tasks.md, page-plan.md
336
- → Generates: workflow.md
90
+ blockers:
91
+ - id: domain-config
92
+ description: "Need domain for Cloudflare"
93
+ blocks: [production-launch]
337
94
 
338
- # 4. Implementation
339
- /cdev landing-page
340
- uxui-frontend reads page-plan.md (STEP 0.5)
341
- → Skips redundant component search
342
- → Uses real content + reuse plan
343
- → 25% faster implementation
344
-
345
- # 5. Monitor
346
- /cview landing-page
95
+ next_priorities:
96
+ - id: payment-integration
97
+ reason: "Revenue blocker"
347
98
  ```
348
99
 
349
- ### Workflow B: Backend Feature (skip /pageplan)
350
-
351
- ```bash
352
- # 1. OpenSpec Planning
353
- User: "Add payment processing API"
354
- → Creates: proposal.md + tasks.md
355
-
356
- # 2. Setup Context (skip /pageplan - not UI work)
357
- /csetup payment-api
358
-
359
- # 3. Implementation
360
- /cdev payment-api
361
- → Phase 2: backend + database agents (parallel)
362
- → Phase 2.5: integration validates contracts
363
- → Phase 3: frontend connects (if UI exists)
364
- → Phase 4: test-debug validates
365
-
366
- # 4. Monitor
367
- /cview payment-api
368
- ```
369
-
370
- ### Workflow C: Full-Stack Feature (with /pageplan)
371
-
372
- ```bash
373
- # 1. OpenSpec Planning
374
- User: "Build user authentication system"
375
- → Creates: proposal.md + tasks.md
376
-
377
- # 2. Page Planning (for login UI only)
378
- /pageplan @prd.md
379
- → Creates: page-plan.md (login form content + components)
380
-
381
- # 3. Setup Context
382
- /csetup auth-system
383
-
384
- # 4. Implementation
385
- /cdev auth-system
386
- → Phase 1: uxui-frontend (login form, reads page-plan.md)
387
- → Phase 2: backend (POST /api/auth/login) + database (User model)
388
- → Phase 2.5: integration (validate contract)
389
- → Phase 3: frontend (connect form to API)
390
- → Phase 4: test-debug (E2E tests)
391
-
392
- # 5. Monitor
393
- /cview auth-system
394
- ```
100
+ Created by `cak init` (optional). Update with `/pstatus`.
395
101
 
396
102
  ---
397
103
 
398
- ## 📁 Project Structure After Init
104
+ ## Project Structure
399
105
 
400
106
  ```
401
107
  your-project/
108
+ ├── PROJECT_STATUS.yml # Cross-session context (optional)
402
109
  ├── openspec/
403
- ├── specs/ # Source of truth (OpenSpec)
404
- └── changes/
405
- └── landing-page/
406
- ├── proposal.md OpenSpec generates
407
- │ ├── tasks.md ← OpenSpec generates
408
- │ ├── page-plan.md ← /pageplan generates (UI tasks)
409
- │ ├── workflow.md ← /csetup generates
410
- │ └── flags.json ← /cdev tracks progress
411
-
110
+ └── changes/{id}/
111
+ ├── proposal.md # From OpenSpec
112
+ ├── tasks.md # From OpenSpec
113
+ └── page-plan.md # From /pageplan
412
114
  ├── design-system/
413
- │ └── STYLE_GUIDE.md /designsetup generates
414
-
115
+ │ └── STYLE_GUIDE.md # From /designsetup
415
116
  └── .claude/
416
- ├── CLAUDE.md # Navigation guide
417
-
418
- ├── agents/ # 6 specialized agents
419
- │ ├── 01-integration.md
420
- │ ├── 02-uxui-frontend.md
421
- │ ├── 03-test-debug.md
422
- │ ├── 04-frontend.md
423
- │ ├── 05-backend.md
424
- │ └── 06-database.md
425
-
426
- ├── commands/ # Slash commands
427
- │ ├── designsetup.md # Generate style guide
428
- │ ├── pageplan.md # Generate page plan
429
- │ ├── csetup.md # Change setup (v1.8.0: includes best-practices)
430
- │ ├── cdev.md # Change development
431
- │ ├── cview.md # View progress
432
- │ └── cstatus.md # Quick status
433
-
434
- ├── contexts/
435
- │ ├── design/ # Design foundation
436
- │ ├── patterns/ # Universal patterns
437
- │ └── domain/ # Project context
438
-
439
- └── lib/ # Implementation logic
440
- ├── agent-executor.md
441
- ├── tdd-classifier.md
442
- ├── flags-updater.md
443
- └── agent-router.md
444
- ```
445
-
446
- ---
447
-
448
- ## 🎯 Why Use Claude Agent Kit?
449
-
450
- ### Without Claude Agent Kit (Manual Implementation)
451
-
452
- ```
453
- ❌ You manually interpret tasks.md
454
- ❌ You context-switch between frontend/backend/database
455
- ❌ You might forget edge cases or tests
456
- ❌ Inconsistent code patterns across features
457
- ❌ No systematic error handling
458
- ❌ Duplicate components everywhere
459
- ❌ Lorem ipsum content in UI
460
- ```
461
-
462
- ### With Claude Agent Kit
463
-
464
- ```
465
- ✅ Agents auto-classify and execute tasks
466
- ✅ Each agent focuses on its specialty
467
- ✅ Built-in validation gates (integration agent)
468
- ✅ Consistent patterns via auto-discovery
469
- ✅ Automatic retry with escalation
470
- ✅ Component reuse plan (/pageplan)
471
- ✅ Real content from PRD
472
- ✅ 25% faster UI implementation
473
- ```
474
-
475
- ---
476
-
477
- ## 📚 Key Features
478
-
479
- ### ✅ Seamless OpenSpec Integration
480
-
481
- - Reads `proposal.md` for business context
482
- - Parses `tasks.md` for implementation checklist
483
- - Generates `page-plan.md` for UI tasks (NEW!)
484
- - Tracks progress in `flags.json`
485
- - Updates completion status back to OpenSpec
486
-
487
- ### ✅ Auto-Generated Best Practices (v1.8.0)
488
-
489
- Uses Context7 MCP to fetch latest framework docs **automatically during `/csetup`**:
490
-
491
- ```bash
492
- /csetup my-feature
493
- # → Auto-detects: Next.js 15, React 18, Prisma 6
494
- # → Auto-generates: .claude/contexts/domain/project/best-practices/
495
- # - nextjs.md
496
- # - react.md
497
- # - prisma.md
498
- # → Agents MUST read these before coding (validated)
499
- ```
500
-
501
- ### ✅ 3-Level Project Indexing
502
-
503
- Agents auto-discover context:
504
-
505
- ```
506
- 1. Read: domain/index.md → Get current project
507
- 2. Read: domain/{project}/README.md → Get tech stack
508
- 3. Read: domain/{project}/best-practices/index.md → Load patterns
509
- ```
510
-
511
- ### ✅ Design Foundation
512
-
513
- Universal design principles:
514
- - Color theory (WCAG AAA contrast)
515
- - Typography scales
516
- - 8px spacing grid (8, 16, 24, 32, 40, 48px)
517
- - 4-level shadow system
518
- - Box thinking framework
519
- - Accessibility (WCAG 2.1 AA)
520
-
521
- ### ✅ Quality Gates
522
-
523
- - **TDD for critical paths** (auth, payments, data transforms)
524
- - **Test-alongside for simple code** (CRUD, UI components)
525
- - **Max 3-4 retry iterations** before escalation
526
- - **Integration validation** before connecting UI to API
527
- - **Smart auto-proceed** (eliminate redundant confirmations, 25% faster)
528
-
529
- ---
530
-
531
- ## 🔧 CLI Commands
532
-
533
- ### `cak init`
534
- Initialize agent system in current project
535
-
536
- ```bash
537
- cak init
538
- cak init --force # Overwrite existing .claude/
539
- ```
540
-
541
- **Creates:**
542
- - `.claude/` folder with 6 agents
543
- - Slash commands (`/psetup`, `/csetup`, `/cdev`, etc.)
544
- - Universal patterns & design foundation
545
-
546
- ---
547
-
548
- ### `cak update`
549
- Update to latest agent templates
550
-
551
- ```bash
552
- cak update
553
- cak update --backup # Create .claude.backup/ first
554
- ```
555
-
556
- **What it does:**
557
- - Updates all template files to latest version
558
- - Preserves your customizations in `domain/`
559
- - Creates backup before updating (with `--backup` flag)
560
-
561
- ---
562
-
563
- ### `cak --version`
564
- Show version number
565
-
566
- ```bash
567
- cak --version
568
- # → 1.0.0
569
- ```
570
-
571
- ---
572
-
573
- ### `cak --help`
574
- Display help information
575
-
576
- ```bash
577
- cak --help
578
- ```
579
-
580
- ---
581
-
582
- ## 🔄 Workflow Commands (in Claude Code)
583
-
584
- ### `/designsetup` - Generate style guide (one-time)
585
-
586
- ```bash
587
- /designsetup
588
- ```
589
-
590
- **Auto-detects from:**
591
- 1. `reference/` folder → Extract design from HTML/screenshots
592
- 2. Existing codebase → Reverse engineer patterns
593
- 3. AI generation → Modern best practices
594
-
595
- **Creates:** `design-system/STYLE_GUIDE.md`
596
-
597
- ---
598
-
599
- ### `/pageplan` - Generate page plan (UI tasks only) 🆕
600
-
601
- ```bash
602
- /pageplan @prd.md @project_brief.md
603
- ```
604
-
605
- **What it does:**
606
- - Reads user-specified files (PRD, brief)
607
- - Reads `proposal.md` + `STYLE_GUIDE.md`
608
- - Searches existing components
609
- - AI drafts real content from PRD
610
- - Generates asset checklist
611
-
612
- **Creates:** `page-plan.md`
613
- - Component reuse plan (🔄 Reuse vs ✅ New)
614
- - Page structure (component hierarchy)
615
- - Assets to prepare (images, icons)
616
- - Content draft (headlines, descriptions)
617
-
618
- ---
619
-
620
- ### `/csetup {change-id}` - Setup change context (v1.8.0)
621
-
622
- ```bash
623
- /csetup landing-page
624
- ```
625
-
626
- **What it does (v1.8.0 - now includes best practices setup):**
627
- - Reads `proposal.md` (business context)
628
- - Reads `tasks.md` (implementation checklist)
629
- - Reads `design.md` (architecture, if exists)
630
- - Reads `page-plan.md` (if exists - UI content plan)
631
- - **Auto-detects tech stack** from package.json, design.md, proposal
632
- - **Auto-generates best practices** from Context7 MCP (replaces `/psetup`)
633
- - Classifies tasks by agent
634
- - Generates `workflow.md` (execution plan)
635
-
636
- ---
637
-
638
- ### `/cdev {change-id}` - Execute implementation
639
-
640
- ```bash
641
- /cdev landing-page
642
-
643
- # Or with explicit approval
644
- "ลุยเลย" # Continue without confirmation prompts
117
+ ├── agents/ # 6 specialized agents
118
+ ├── commands/ # Slash commands
119
+ └── contexts/ # Patterns & domain context
645
120
  ```
646
121
 
647
- **What it does:**
648
- - Runs agents in phases (1 → 2 → 2.5 → 3 → 4)
649
- - uxui-frontend auto-reads `page-plan.md` (STEP 0.5)
650
- - **Auto-proceed:** Detects user approval ("continue", "ลุยเลย") and eliminates redundant confirmation prompts
651
- - Updates `flags.json` (progress tracking)
652
- - Reports completion status
653
-
654
- **Auto-Proceed Feature:**
655
- - When you say "continue", "proceed", "yes", or "ลุยเลย", Main Claude auto-responds to agent questions
656
- - **50-90% fewer confirmations** (1x per workflow instead of 2x per phase)
657
- - **25% faster execution** (no waiting for redundant approvals)
658
-
659
122
  ---
660
123
 
661
- ### `/cview {change-id}` - View detailed progress
124
+ ## Key Features
662
125
 
663
- ```bash
664
- /cview landing-page
665
- ```
666
-
667
- **Shows:**
668
- - Completed/pending tasks
669
- - Agent activity log
670
- - Current phase
671
- - Error messages (if any)
126
+ - ✅ **6 Specialized Agents** - Each focused on its domain
127
+ - ✅ **Auto Best Practices** - Context7 MCP integration
128
+ - ✅ **Design System** - Consistent UI via tokens.json
129
+ - ✅ **Page Planning** - Component reuse, real content
130
+ - ✅ **Progress Tracking** - flags.json, /cstatus, /cview
131
+ - **Cross-Session Context** - PROJECT_STATUS.yml
672
132
 
673
133
  ---
674
134
 
675
- ### `/cstatus {change-id}` - Quick status
135
+ ## Workflow Example
676
136
 
677
137
  ```bash
678
- /cstatus landing-page
679
- # → Phase 2/4 - Backend Implementation (75%)
680
- ```
138
+ # 1. OpenSpec creates: proposal.md + tasks.md
681
139
 
682
- ---
683
-
684
- ## 🎨 Design System Integration
685
-
686
- ### Auto-Generate Style Guide
687
-
688
- ```bash
140
+ # 2. Setup (optional design + page plan)
689
141
  /designsetup
690
- ```
691
-
692
- **Detection priority:**
693
- 1. **reference/ folder** (HTML/screenshots) → Extract design style
694
- 2. **Existing codebase** (>10 components) → Reverse engineer patterns
695
- 3. **AI generation** → Modern best practices
696
-
697
- **Output:** `design-system/STYLE_GUIDE.md`
698
-
699
- **17 Comprehensive Sections:**
700
- 1. Overview
701
- 2. Design Philosophy
702
- 3. Color Palette (HEX codes, usage, Tailwind classes)
703
- 4. Typography (headings, body, weights)
704
- 5. Spacing System (4px/8px grid)
705
- 6. Component Styles (Button, Card, Input, Badge, etc.)
706
- 7. Shadows & Elevation
707
- 8. Animations & Transitions
708
- 9. Border Styles
709
- 10. Border Radius
710
- 11. Opacity & Transparency
711
- 12. Z-Index Layers
712
- 13. Responsive Breakpoints
713
- 14. CSS Variables / Tailwind Theme (Design Tokens)
714
- 15. Layout Patterns
715
- 16. Example Component Reference (React + Tailwind code)
716
- 17. Additional Sections (Best Practices, Accessibility, Icon System)
717
-
718
- **Agents automatically use `STYLE_GUIDE.md` for:**
719
- - Color palette (no hardcoded colors)
720
- - Spacing scale (consistent gaps/padding)
721
- - Typography (font hierarchy)
722
- - Component patterns (reuse before create)
723
-
724
- ---
725
-
726
- ## 🧪 Testing Philosophy
727
-
728
- **Agents follow TDD classification:**
729
-
730
- | Code Type | Approach | Example |
731
- |-----------|----------|---------|
732
- | **Critical paths** | TDD (Red-Green-Refactor) | Auth logic, payments, calculations |
733
- | **Simple code** | Test-alongside | CRUD, UI components, config |
734
-
735
- **Test-debug agent:**
736
- - Runs tests automatically after implementation
737
- - Fixes bugs (max 3-4 iterations)
738
- - Escalates if stuck (reports to user)
739
-
740
- ---
741
-
742
- ## 🔧 Supported Tech Stacks
743
-
744
- Agents auto-detect your stack via Context7 MCP:
745
-
746
- **Frontend:**
747
- - Next.js, React, Vue, Svelte, Angular
748
-
749
- **Backend:**
750
- - FastAPI, Express, NestJS, Django, Flask, Next.js API Routes
751
-
752
- **Database:**
753
- - Prisma, SQLAlchemy, TypeORM, Drizzle
754
-
755
- **Testing:**
756
- - Vitest, Jest, Pytest, Playwright
757
-
758
- ---
759
-
760
- ## 📖 Usage Examples
761
-
762
- ### Example 1: Simple UI Task (with /pageplan)
763
-
764
- ```bash
765
- # In Claude Code
766
- "Build a user profile page with edit functionality"
767
-
768
- # If it's a UI task, optionally run:
769
142
  /pageplan @prd.md
770
143
 
771
- # Then execute:
772
- /csetup profile-page
773
- /cdev profile-page
774
- ```
775
-
776
- Claude will:
777
- 1. Read `task-classification.md`
778
- 2. Select agents: `uxui-frontend` → `backend` → `frontend` → `test-debug`
779
- 3. uxui-frontend reads `page-plan.md` (if exists)
780
- 4. Execute in sequence
781
- 5. Report completion
782
-
783
- ---
784
-
785
- ### Example 2: Complex Multi-Agent Workflow (OpenSpec)
786
-
787
- Using OpenSpec workflow:
788
-
789
- ```bash
790
- # 1. OpenSpec generates proposal + tasks
791
- "I want to add a dashboard with analytics"
792
- # → proposal.md + tasks.md created
793
-
794
- # 2. Generate page plan
795
- /pageplan @prd.md @analytics_spec.md
796
-
797
- # 3. Setup change context
798
- /csetup analytics-dashboard
799
-
800
- # 4. Start development
801
- /cdev analytics-dashboard
802
-
803
- # 5. View progress
804
- /cview analytics-dashboard
805
- ```
806
-
807
- This follows a structured 4-phase approach:
808
- 1. **Phase 1:** UI with mock data (uxui-frontend reads page-plan.md)
809
- 2. **Phase 2:** Real API + database (backend + database)
810
- 3. **Phase 2.5:** Validate contracts (integration)
811
- 4. **Phase 3:** Connect UI to API (frontend)
812
- 5. **Phase 4:** Tests + bug fixes (test-debug)
813
-
814
- ---
815
-
816
- ## 🔄 Updating to Latest Version
817
-
818
- ### Method 1: Update the npm package
819
-
820
- ```bash
821
- npm update -g @champpaba/claude-agent-kit
822
- ```
823
-
824
- ### Method 2: Update template in project
825
-
826
- ```bash
827
- cd your-project
828
- cak update --backup
829
- ```
830
-
831
- This will:
832
- - Create backup at `.claude.backup/`
833
- - Update all template files
834
- - Preserve your customizations in `domain/`
835
-
836
- ---
837
-
838
- ## 🎯 Customization
839
-
840
- ### Add Project-Specific Context
841
-
842
- After running `cak init`, add your own context files:
843
-
844
- ```bash
845
- mkdir -p .claude/contexts/domain/my-project
846
- ```
847
-
848
- **Example:** E-commerce checkout flow
849
- ```markdown
850
- <!-- .claude/contexts/domain/my-project/checkout-flow.md -->
851
- # Checkout Flow
852
-
853
- ## Steps
854
- 1. Cart review
855
- 2. Shipping address
856
- 3. Payment method
857
- 4. Order confirmation
858
-
859
- ## Business Rules
860
- - Free shipping over $50
861
- - Tax calculation by state
862
- - Inventory check before payment
863
- ```
864
-
865
- Agents will auto-discover and use these patterns.
866
-
867
- ---
868
-
869
- ## 🔗 Ecosystem
870
-
871
- **Claude Agent Kit works with:**
872
-
873
- | Tool | Purpose | Integration |
874
- |------|---------|-------------|
875
- | **OpenSpec** | Spec-driven planning | Reads `proposal.md` + `tasks.md` |
876
- | **Context7 MCP** | Always-updated docs | Auto-generates best practices |
877
- | **Claude Code** | AI coding assistant | Execution environment |
878
-
879
- ---
880
-
881
- ## 🤝 Contributing
882
-
883
- We welcome contributions!
884
-
885
- - Report bugs: [GitHub Issues](https://github.com/ChampPABA/claude-multi-agent-template/issues)
886
- - Feature requests: [Discussions](https://github.com/ChampPABA/claude-multi-agent-template/discussions)
887
- - Pull requests: Follow [CONTRIBUTING.md](CONTRIBUTING.md)
888
-
889
- ---
890
-
891
- ## 📄 License
892
-
893
- MIT License - see [LICENSE](LICENSE)
894
-
895
- ---
896
-
897
- ## 🙏 Credits
898
-
899
- Built with:
900
- - [OpenSpec](https://github.com/Fission-AI/OpenSpec) - Spec-driven development framework
901
- - [Claude Code](https://claude.com/claude-code) - AI coding assistant
902
- - [Context7 MCP](https://context7.com) - Always up-to-date library docs
903
-
904
- ---
905
-
906
- ## 🆕 What's New in v2.0.0
907
-
908
- **Two Major Improvements:** Claude 4.5 Optimization + Design System v2.0 🚀🎨
909
-
910
- ### Part 1: Claude 4.5 Optimization
911
-
912
- 1. **Claude 4.5 Best Practices** - All files refactored for better AI comprehension
913
- 2. **Professional Tone** - Replaced aggressive language with respectful instructions
914
- 3. **Positive Instructions** - "Use X" instead of "Don't do Y" with WHY explanations
915
- 4. **Token Reduction** - Agent files ~65% smaller + 30 supporting files optimized
916
- 5. **Shared Components** - New `.claude/agents/_shared/` folder prevents duplication
917
-
918
- ### Tone Calibration
919
-
920
- | Before | After | WHY |
921
- |--------|-------|-----|
922
- | "MUST", "WILL BE REJECTED" | Professional tone | Claude 4.5 works better with respectful instructions |
923
- | "Don't do X", "Never Y" | "Use X instead" | Positive instructions are clearer |
924
- | "🚨 CRITICAL!", "🚫 Forbidden" | "📋 Guidelines", "⚠️ Note" | Less aggressive, same clarity |
925
- | Rules without context | Rules with WHY | Claude applies rules more intelligently |
926
-
927
- ### New Shared Components
928
-
929
- ```
930
- .claude/agents/_shared/
931
- ├── pre-work-checklist.md # Common validation steps
932
- ├── package-manager.md # Package manager protocol
933
- ├── documentation-policy.md # What files to create
934
- ├── agent-boundaries.md # When to use which agent
935
- └── README.md # Overview
936
- ```
937
-
938
- ### Token Savings (Agents)
939
-
940
- | Agent | Before | After | Reduction |
941
- |-------|--------|-------|-----------|
942
- | uxui-frontend | ~1037 | ~375 | 64% |
943
- | integration | ~600 | ~210 | 65% |
944
- | backend | ~700 | ~244 | 65% |
945
- | database | ~680 | ~273 | 60% |
946
- | frontend | ~650 | ~296 | 54% |
947
- | test-debug | ~580 | ~252 | 57% |
948
- | **Total** | **~4247** | **~1650** | **61%** |
949
-
950
- Plus ~500 tokens in shared files = **~2150 total** (was ~4247)
951
-
952
- ### Part 2: Design System v2.0
953
-
954
- **Complete overhaul of design system with interactive setup, theme selection, and smart page planning.**
955
-
956
- ### New Design System Features
957
-
958
- - 🎯 **`/extract`** - Multi-URL design extraction with style detection
959
- - 🎭 **`/designsetup`** - Interactive 3-round loop with theme recommendations
960
- - 📦 **`tokens.json`** - Enhanced design tokens with style/theme/animations (~800 tokens)
961
- - 📝 **`patterns/*.md`** - Selective code patterns (buttons, cards, forms, scroll-animations, decorations)
962
- - 🔍 **Auto Page Type Detection** - `/pageplan` auto-detects landing/dashboard/auth
963
-
964
- ### Page Type Handling
965
-
966
- | Page Type | Decorations | Scroll Anims | Buyer Avatar | Patterns Loaded |
967
- |-----------|-------------|--------------|--------------|-----------------|
968
- | Landing/Marketing | ✅ Full | ✅ Enabled | ✅ Enabled | buttons, cards, scroll-anims, decorations |
969
- | Dashboard/Admin | ❌ Minimal | ❌ Disabled | ❌ Skipped | buttons, cards, forms |
970
- | Auth (Login/Register) | ❌ None | ❌ Disabled | ❌ Skipped | buttons, forms |
971
-
972
- ### Design System Token Savings
973
-
974
- | Approach | Tokens | Improvement |
975
- |----------|--------|-------------|
976
- | Old: Full STYLE_GUIDE.md | ~5000 | - |
977
- | New: tokens.json + selective patterns | ~800-1200 | **84%** |
978
-
979
- ### Files Refactored (36 total)
980
-
981
- - **6 agent files** - Professional tone, positive instructions
982
- - **6 lib files** - WHY explanations, table formats
983
- - **4 command files** - Softer language, guidelines
984
- - **11 pattern files** - "⚠️ Common Mistakes" instead of "🚨 Critical"
985
- - **3 design files** - "should check" instead of "MUST check"
986
- - **3 template files** - Table with WHY
987
- - **3 other lib files** - Consistent formatting
988
-
989
- ### Best Practices Applied (Claude 4 Guidelines)
990
-
991
- 1. **Tone Calibration** - Professional, direct (not aggressive)
992
- 2. **Action Orientation** - Explicit "Write code" vs "Consider"
993
- 3. **Prevent Overengineering** - Clear boundaries
994
- 4. **Encourage Exploration** - Read before implementing
995
- 5. **Rich Output When Needed** - Specify requirements
996
- 6. **Context for Rules** - Explain WHY
997
- 7. **Positive Instructions** - "Use X" not "Don't Y"
998
-
999
- ---
1000
-
1001
- ## 📋 What's New in v1.7.1
1002
-
1003
- **Patch: OpenSpec File Naming Conventions - Clarify design.md vs STYLE_GUIDE.md** 📁
1004
-
1005
- ### The Issue
1006
-
1007
- Users were confused between two files with similar names:
1008
- - `design.md` (from OpenSpec) = Technical/Architecture decisions
1009
- - `STYLE_GUIDE.md` (from Template) = Visual design (colors, fonts, spacing)
1010
-
1011
- ### The Fix
1012
-
1013
- Added clear documentation in CLAUDE.md and agent-discovery.md:
1014
-
1015
- | Source | File | Purpose |
1016
- |--------|------|---------|
1017
- | **OpenSpec** | `design.md` | Technical Architecture (API structure, data flow) |
1018
- | **Template** | `STYLE_GUIDE.md` | Visual Design (colors, typography, spacing) |
1019
-
1020
- ### Updated Files
1021
-
1022
- - `CLAUDE.md` - New "📁 File Naming Conventions" section
1023
- - `agent-discovery.md` - Added notes explaining design.md vs STYLE_GUIDE.md
1024
-
1025
- ### No Breaking Changes
1026
-
1027
- All existing workflows continue to work. This is a documentation improvement only.
1028
-
1029
- ---
1030
-
1031
- ## 📋 What's New in v1.7.0
1032
-
1033
- **Feature: Opus 4.5 Model Upgrade - All Subagents Now Use Latest Claude Model** 🧠
1034
-
1035
- ### The Change
1036
-
1037
- All 6 specialized agents now use **Claude Opus 4.5** (the latest and most capable Claude model) instead of Haiku:
1038
-
1039
- | Agent | Model (Before) | Model (After) |
1040
- |-------|----------------|---------------|
1041
- | integration | haiku | **opus** |
1042
- | uxui-frontend | haiku | **opus** |
1043
- | test-debug | haiku | **opus** |
1044
- | frontend | haiku | **opus** |
1045
- | backend | haiku | **opus** |
1046
- | database | haiku | **opus** |
1047
-
1048
- ### Benefits
1049
-
1050
- - ✅ **Best-in-class reasoning** - Opus 4.5 handles complex multi-step tasks better
1051
- - ✅ **Improved code quality** - More accurate implementations with fewer errors
1052
- - ✅ **Better context understanding** - Agents maintain context over longer sessions
1053
- - ✅ **Enhanced problem-solving** - Complex debugging and architectural decisions improved
1054
-
1055
- ### Updated Files
1056
-
1057
- - All agent files (`.claude/agents/*.md`) - `model: opus`
1058
- - `/cdev` command - Model strategy updated
1059
- - `agent-executor.md` - Task invocation uses opus
1060
-
1061
- ### No Breaking Changes
1062
-
1063
- All existing workflows continue to work exactly as before, just with better performance!
1064
-
1065
- ---
1066
-
1067
- ## 🔄 What's New in v1.6.0
1068
-
1069
- **Feature: Incremental Testing - Milestone-based Validation for High-Risk Tasks** 🔄
1070
-
1071
- ### The Problem: All-or-Nothing Testing
1072
-
1073
- **Before v1.6.0:**
1074
- ```
1075
- Task: "Integrate Google Maps API"
1076
- → Agent implements complete solution (1000 locations)
1077
- → Tests with full dataset
1078
- → Bug found → Hard to debug (which part failed?)
1079
- → Fix → Retest full dataset → Slow iteration
1080
-
1081
- Problem:
1082
- ❌ Large scope = hard to debug
1083
- ❌ Late bug detection (at scale)
1084
- ❌ Rework expensive (threw away 1000-location implementation)
1085
- ❌ No confidence in progressive scaling
1086
- ```
1087
-
1088
- **After v1.6.0:**
1089
- ```
1090
- Task: "Integrate Google Maps API"
1091
- → Milestone 1: Test 1 location (hardcoded)
1092
- → Bug found → Easy to debug (small scope)
1093
- → Fix → Retest 1 location → Fast iteration
1094
- → Milestone 2: Test 10 locations (parameterized)
1095
- → Works! Confidence++
1096
- → Milestone 3: Error handling
1097
- → Refine edge cases
1098
- → Milestone 4: Scale to 1000
1099
- → Already confident (1 and 10 worked)
1100
-
1101
- Benefits:
1102
- ✅ Small scope = easy debugging
1103
- ✅ Early bug detection (at milestone 1)
1104
- ✅ Low rework (fix before scaling)
1105
- ✅ Progressive confidence
1106
- ```
1107
-
1108
- ### The Solution: Milestone-based Validation
1109
-
1110
- **Automatic Detection:** `/csetup` detects high-risk tasks automatically
1111
- - Risk = HIGH (payment, auth, security)
1112
- - Risk = MEDIUM + Complexity ≥ 7 (complex forms)
1113
- - External API dependency (Google Maps, Stripe, OpenAI)
1114
- - Data-intensive operation (ETL, migration, batch processing)
1115
-
1116
- **3 Milestone Patterns:**
1117
-
1118
- 1. **Backend API Integration** (4 milestones)
1119
- - M1: Core implementation (1 record, hardcoded)
1120
- - M2: Parameterized query (10 records, dynamic)
1121
- - M3: Error handling (invalid input, timeouts)
1122
- - M4: Scale + performance (100-1000 records)
1123
-
1124
- 2. **Complex Form** (3 milestones)
1125
- - M1: Architecture + skeleton (2-3 critical fields)
1126
- - M2: E2E flow validation (submit → API → DB)
1127
- - M3: Complete all fields (all 20 fields + validation)
1128
-
1129
- 3. **Database Migration / ETL** (3 milestones)
1130
- - M1: Dry-run (10 records)
1131
- - M2: Scale to 100 records
1132
- - M3: Full dataset (staging)
1133
-
1134
- ### Round-based Retry Logic
1135
-
1136
- **Per-Milestone Quota:**
1137
- - **2 attempts per round** (not total)
1138
- - **Unlimited rounds** (Main Claude decides when to stop)
1139
- - **Hints reset quota** (fresh start)
1140
-
1141
- **Example:**
1142
- ```
1143
- Milestone 1: Core implementation
1144
- → Round 1: Attempt 1 ❌ (API key missing)
1145
- → Round 1: Attempt 2 ❌ (Still missing)
1146
- → Main Claude: "Check API_KEY env variable" 💡
1147
- → Round 2: Attempt 1 ✅ (Fixed!)
144
+ # 3. Execute
145
+ /csetup my-feature
146
+ /cdev my-feature
1148
147
 
1149
- Total attempts: 3 (2 in Round 1, 1 in Round 2)
148
+ # 4. Monitor
149
+ /cstatus my-feature
1150
150
  ```
1151
151
 
1152
- ### Main Claude Intervention
1153
-
1154
- **Decision Matrix:**
1155
-
1156
- | Error Pattern | Complexity | Confidence | Action |
1157
- |---------------|------------|------------|--------|
1158
- | Same error 2x | SIMPLE | HIGH | Give Hints |
1159
- | Same error 2x | COMPLEX | LOW | Ask Human |
1160
- | Different errors | ANY | ANY | Ask Human |
1161
- | Intermittent | ANY | ANY | Ask Human |
1162
- | 2+ rounds no progress | ANY | ANY | Ask Human |
1163
-
1164
- **Pattern-based Hints:**
1165
- - 401 Unauthorized → Check API_KEY, verify key validity
1166
- - Timeout → Increase threshold, check network
1167
- - Schema mismatch → Compare actual vs expected, check API version
1168
-
1169
- ### Benefits & Trade-offs
1170
-
1171
- **Benefits:**
1172
- - ✅ **75% faster debug** - Catch bugs at M1 (1 record) vs M4 (1000 records)
1173
- - ✅ **60-70% rework reduction** - Fix before scaling
1174
- - ✅ **80% faster debugging** - Small scope (1 record) vs full dataset
1175
- - ✅ **90% success rate** - Progressive confidence at M4
1176
- - ✅ **40-50% net speedup** - +15-20% time upfront → -60-70% rework time
1177
-
1178
- **Trade-offs:**
1179
- - ⚠️ **Timeline:** +15-20% upfront (but saves 60-70% rework)
1180
- - ⚠️ **Complexity:** phases.md 2-3x longer (summary table at top)
1181
- - ⚠️ **Learning curve:** More coordination (automated by `/csetup`)
1182
-
1183
- **Net benefit:** +15-20% time → -60-70% rework = **40-50% faster overall**
1184
-
1185
- ### When to Use Incremental Testing
1186
-
1187
- **✅ Use for:**
1188
- - Payment integration, Auth systems (HIGH risk)
1189
- - Complex forms with 20+ fields (Complexity ≥ 7)
1190
- - External APIs (Google Maps, Stripe, OpenAI)
1191
- - Data migrations, ETL pipelines (data-intensive)
1192
-
1193
- **❌ Skip for:**
1194
- - Simple CRUD operations (LOW risk, Complexity < 5)
1195
- - UI components (standard testing sufficient)
1196
- - Configuration changes (no integration testing needed)
1197
-
1198
- **Detection Rate:** ~20-30% of tasks (only high-risk)
1199
-
1200
152
  ---
1201
153
 
1202
- ## 🎉 What's New in v1.4.0
1203
-
1204
- **Major Update: Context Optimization & DRY Consolidation**
1205
-
1206
- ### Token Efficiency Improvements
1207
-
1208
- **Problem Solved:**
1209
- - Before v1.4.0: Same documentation duplicated across 6 agent files + CLAUDE.md
1210
- - Package Manager warnings: 360 lines duplicated 6x
1211
- - Context Loading Strategy: 1,200 lines duplicated 6x
1212
- - TDD Workflow examples: 1,200 lines duplicated 3x
1213
- - Handoff templates: 900 lines duplicated 6x
1214
- - Documentation policies: 480 lines duplicated 6x
1215
- - CLAUDE.md: 890 lines mixing navigation + detailed guides
1216
-
1217
- **Solution Implemented:**
1218
- - ✅ Created consolidated lib files (context-loading-protocol.md, handoff-protocol.md, tdd-workflow.md)
1219
- - ✅ Extracted detailed guides from CLAUDE.md to lib/detailed-guides/
1220
- - ✅ Applied consistent reference pattern: Brief summary + "→ See: path" + agent-specific additions
1221
- - ✅ Maintained 100% content quality (all information preserved)
154
+ ## Changelog
1222
155
 
1223
- **Results:**
1224
- - **All 6 agents:** 6,796 → 4,749 lines (-2,047, -30.1% reduction)
1225
- - **CLAUDE.md:** 890 → 163 lines (-727, -81.7% reduction)
1226
- - **Grand Total:** 7,686 4,912 lines (-2,774, -36.1% reduction)
1227
- - **Token savings:** ~36% reduction in total context size
1228
- - **Speed improvement:** Faster agent loading and execution
1229
- - **Maintainability:** Single source of truth for shared documentation
1230
-
1231
- ### New Consolidated Documentation Structure
1232
-
1233
- **Created in v1.4.0:**
1234
- ```
1235
- .claude/lib/
1236
- ├── context-loading-protocol.md # Universal context loading strategy
1237
- ├── handoff-protocol.md # Agent handoff templates
1238
- ├── tdd-workflow.md # TDD workflow examples
1239
- └── detailed-guides/
1240
- ├── best-practices-system.md # How best practices work
1241
- ├── context-optimization.md # Token optimization strategy
1242
- ├── page-planning.md # /pageplan command guide
1243
- ├── taskmaster-analysis.md # 6-dimension task analysis
1244
- ├── design-system.md # Style guide generation
1245
- └── agent-system.md # Agent overview & workflow
1246
- ```
1247
-
1248
- ### Benefits for Users
1249
-
1250
- **For Developers:**
1251
- - ⚡ 36% faster context loading
1252
- - 📖 Cleaner, easier-to-navigate documentation
1253
- - 🎯 CLAUDE.md is now a pure navigation hub (163 lines)
1254
- - 🔍 Detailed guides are modular and focused
1255
-
1256
- **For Claude Agents:**
1257
- - 🚀 Faster startup (less context to load)
1258
- - 💾 More token budget for actual work
1259
- - 📚 Single source of truth (no conflicting info)
1260
- - 🔄 Easier maintenance (update once, apply everywhere)
1261
-
1262
- ### Migration Notes
1263
-
1264
- **No breaking changes!** All existing workflows continue to work:
1265
- - ✅ `/psetup`, `/csetup`, `/cdev` commands unchanged
1266
- - ✅ Agent behavior unchanged (same quality, faster execution)
1267
- - ✅ All features from v1.1-1.3 preserved
1268
- - ✅ Existing projects can update with `cak update`
1269
-
1270
- **New Reference Pattern:**
1271
- Agents now use lightweight references instead of duplicating full documentation:
1272
-
1273
- ```markdown
1274
- ## Context Loading Strategy
1275
-
1276
- **→ See:** `.claude/lib/context-loading-protocol.md` for complete protocol
1277
-
1278
- **Agent-Specific Additions (frontend):**
1279
- ### State Management Libraries
1280
- ...
1281
- ```
1282
-
1283
- ### Upgrading to v1.4.1
1284
-
1285
- ```bash
1286
- # Update npm package
1287
- npm update -g @champpaba/claude-agent-kit
1288
-
1289
- # Update template in your project (creates backup)
1290
- cd your-project
1291
- cak update --backup
1292
- ```
1293
-
1294
- **What's New:**
1295
- - ✅ Auto-proceed feature (eliminate double confirmations)
1296
- - ✅ 50-90% fewer approval prompts
1297
- - ✅ 25% faster workflow execution
1298
- - ✅ All v1.4.0 features (context optimization, DRY consolidation)
1299
-
1300
- All your customizations in `.claude/contexts/domain/` are preserved!
1301
-
1302
- ---
1303
-
1304
- ## 📜 Changelog
156
+ ### v2.1.0 (2025-12-01)
157
+ - Added `PROJECT_STATUS.yml` for cross-session context
158
+ - Added `/pstatus` command
159
+ - `/csetup` reads blockers from PROJECT_STATUS.yml
160
+ - `/cstatus` shows project + change status
1305
161
 
1306
162
  ### v2.0.0 (2025-11-30)
1307
- **Major: Claude 4.5 Optimization - Full Template Refactor**
1308
-
1309
- **Added:**
1310
- - Shared components folder `.claude/agents/_shared/`
1311
- - WHY explanations for all rules
1312
-
1313
- **Changed:**
1314
- - All 6 agent files refactored (~65% smaller)
1315
- - 30 supporting files updated for Claude 4.5 best practices
1316
- - "MUST", "CRITICAL" → Professional tone
1317
- - "Don't do X" → "Use Y instead" with WHY
1318
- - "🚨" → "⚠️" throughout
1319
-
1320
- **Benefits:**
1321
- - Better AI comprehension with professional tone
1322
- - 61% token reduction in agent files
1323
- - No duplication (shared components)
1324
-
1325
- ---
163
+ - Claude 4.5 optimization (61% token reduction)
164
+ - Design System v2.0 (tokens.json, selective patterns)
165
+ - All agents use Opus 4.5 model
1326
166
 
1327
167
  ### v1.8.0 (2025-11-26)
1328
- **Major: Token Optimization & Streamlined Workflow**
1329
-
1330
- **Removed:**
1331
- - `/psetup` command - Merged into `/csetup`
1332
- - `/agentsetup` command - Merged into `/csetup`
1333
- - `documentation` phase from all templates
1334
- - `report` phase from all templates
1335
- - Template files: `documentation.md`, `report.md`
1336
-
1337
- **Added:**
1338
- - Auto tech stack detection in `/csetup` (from package.json, design.md, proposal)
1339
- - Auto best-practices generation from Context7 MCP
1340
- - Verbose terminal summary when change completes
1341
- - Temp file auto-cleanup after each phase
1342
- - Best-practices injection in `/cdev` agent prompts
1343
- - Forbidden Files section in code-standards.md
1344
- - Documentation Policy (v1.8.0) in all agents
1345
-
1346
- **Changed:**
1347
- - All templates: Reduced phases (removed doc/report)
1348
- - `/cdev`: Now shows verbose summary instead of creating files
1349
- - All agents: Updated to reference forbidden files policy
1350
- - `agent-executor.md`: Added temp file cleanup logic
1351
- - `agent-discovery.md`: Updated fallback message
1352
-
1353
- **Benefits:**
1354
- - ~25 min saved per change (no doc/report phases)
1355
- - No more temp file clutter
1356
- - Simplified workflow (1 command instead of 2)
1357
- - Better best-practices enforcement (validated)
1358
-
1359
- ### v1.7.1 (2025-11-25)
1360
- **Patch: OpenSpec File Naming Conventions**
1361
-
1362
- **Added:**
1363
- - New "📁 File Naming Conventions" section in CLAUDE.md
1364
- - Clear distinction between OpenSpec files and Template files
1365
- - Notes in agent-discovery.md explaining design.md purpose
1366
-
1367
- **Documentation:**
1368
- - `design.md` (OpenSpec) = Technical Architecture (API, data flow)
1369
- - `STYLE_GUIDE.md` (Template) = Visual Design (colors, fonts, spacing)
1370
- - Updated agent reading guidance per role
1371
-
1372
- ### v1.7.0 (2025-11-25)
1373
- **Feature: Opus 4.5 Model Upgrade**
1374
-
1375
- **Changed:**
1376
- - All 6 agents upgraded from `model: haiku` to `model: opus`
1377
- - Updated `/cdev` model strategy description
1378
- - Updated `agent-executor.md` Task invocation
1379
-
1380
- **Benefits:**
1381
- - Best-in-class reasoning with Opus 4.5
1382
- - Improved code quality and fewer errors
1383
- - Better context understanding
1384
- - Enhanced problem-solving for complex tasks
1385
-
1386
- ### v1.4.1 (2025-11-06)
1387
- **Feature: Intelligent Auto-Proceed - Eliminate Double Confirmations**
1388
-
1389
- **Added:**
1390
- - Auto-proceed approval context in agent prompts
1391
- - Smart detection of user approval keywords ("continue", "proceed", "yes", "ลุยเลย")
1392
- - Agent question handling logic (auto-respond vs ask user)
1393
- - Auto-proceed decision tree in agent-executor.md
1394
-
1395
- **Improved:**
1396
- - User experience: 50-90% fewer confirmation prompts
1397
- - Execution speed: 25% faster (no waiting for redundant approvals)
1398
- - Workflow clarity: User approves once, system handles agent interactions
1399
-
1400
- **Technical Details:**
1401
- - Modified: `.claude/lib/agent-executor.md` (+80 lines)
1402
- - Implementation: Lean solution (1 file, 0.1% context increase)
1403
- - Backward compatible: Manual approval mode still available
1404
-
1405
- **When It Activates:**
1406
- - User runs `/cdev` command (implicit approval)
1407
- - User says "continue", "proceed", "yes", "ลุยเลย" (explicit approval)
1408
-
1409
- **Before:**
1410
- ```
1411
- User approves → Agent asks → Main asks user again ❌
1412
- ```
1413
-
1414
- **After:**
1415
- ```
1416
- User approves → Agent asks → Main answers directly ✅
1417
- ```
1418
-
1419
- ### v1.4.0 (2025-11-05)
1420
- **Major: Context Optimization & DRY Consolidation**
1421
-
1422
- **Added:**
1423
- - New consolidated lib files: `context-loading-protocol.md`, `handoff-protocol.md`, `tdd-workflow.md`
1424
- - New detailed guides folder: `lib/detailed-guides/` (6 focused guides)
1425
- - Reference pattern across all agents (Brief summary → See: path → Additions)
1426
-
1427
- **Changed:**
1428
- - All 6 agents refactored: 30.1% size reduction (6,796 → 4,749 lines)
1429
- - CLAUDE.md refactored: 81.7% size reduction (890 → 163 lines, pure navigation hub)
1430
- - Documentation structure: Moved detailed content to modular lib files
1431
-
1432
- **Performance:**
1433
- - 36% total context reduction (7,686 → 4,912 lines)
1434
- - Faster agent loading and execution
1435
- - More token budget available for actual work
1436
-
1437
- **Improved:**
1438
- - Maintainability: Single source of truth for shared docs
1439
- - Discoverability: Clear navigation in CLAUDE.md
1440
- - Modularity: Detailed guides in separate files
1441
- - Consistency: Same content quality, zero duplication
1442
-
1443
- ### v1.3.0 (2025-10-30)
1444
- **Feature: TaskMaster-style Intelligent Task Analysis**
1445
-
1446
- **Added:**
1447
- - 6-dimension task analysis in `/csetup`:
1448
- - Complexity scoring (1-10)
1449
- - Dependency detection (auto-detects blocks/blocked-by)
1450
- - Risk assessment (LOW/MEDIUM/HIGH with mitigation)
1451
- - Research requirements (auto-generates queries)
1452
- - Subtask breakdown (complex tasks → smaller steps)
1453
- - Priority ranking (CRITICAL → LOW, scored 0-100)
1454
- - Task analyzer implementation: `.claude/lib/task-analyzer.md`
1455
- - Enhanced phases.md with metadata, time buffers, research phases
168
+ - Merged `/psetup` into `/csetup`
169
+ - Auto tech stack detection
170
+ - Auto best-practices from Context7
1456
171
 
1457
- **Improved:**
1458
- - Time estimates with automatic buffers (+41% average)
1459
- - Research phases auto-added for new tech/libraries
1460
- - Dependency order in workflow execution
1461
- - Risk mitigation strategies per task
1462
-
1463
- **Inspired by:** [claude-task-master](https://github.com/eyaltoledano/claude-task-master)
1464
-
1465
- ### v1.2.0 (2025-10-27)
1466
- **Feature: Context Optimization - 70% Token Reduction**
1467
-
1468
- **Added:**
1469
- - 3-tier loading strategy: STYLE_TOKENS.json (500) → design-context.md (1K) → STYLE_GUIDE.md (5K)
1470
- - Document loader protocol: `.claude/lib/document-loader.md`
1471
- - Lightweight design tokens: `design-system/STYLE_TOKENS.json`
1472
-
1473
- **Improved:**
1474
- - Token usage: ~20K → ~4.7K (70% reduction for design system)
1475
- - Speed: 3-4x faster command execution
1476
- - Consistency: Enforced design tokens, no random colors
1477
-
1478
- ### v1.1.1 (2025-10-25)
1479
- **Patch: Minor Fixes**
1480
-
1481
- **Fixed:**
1482
- - Template path correction: `template/.claude` → `.claude`
1483
- - Documentation typos and formatting
1484
-
1485
- ### v1.1.0 (2025-10-24)
1486
- **Feature: Enhanced Implementation Logic**
1487
-
1488
- **Added:**
1489
- - Implementation logic overview: `lib/README.md`
1490
- - Agent executor with retry & escalation: `lib/agent-executor.md`
1491
- - TDD classifier logic: `lib/tdd-classifier.md`
1492
- - Progress tracking protocol: `lib/flags-updater.md`
1493
- - Mandatory agent routing: `lib/agent-router.md`
1494
- - Shared agent discovery flow: `contexts/patterns/agent-discovery.md`
1495
-
1496
- ### v1.0.0 (2025-10-20)
1497
- **Initial Release: Multi-Agent Template**
1498
-
1499
- **Core Features:**
1500
- - 6 specialized agents (integration, uxui-frontend, test-debug, frontend, backend, database)
1501
- - OpenSpec integration (`/csetup`, `/cdev`, `/cview`, `/cstatus`)
1502
- - Auto-generated best practices via Context7 MCP
1503
- - 3-level project indexing (domain → project → best-practices)
1504
- - Design foundation (color theory, spacing, typography)
1505
- - `/designsetup` command (auto-generate style guide)
1506
- - `/pageplan` command (UI content & component planning)
1507
- - Universal patterns (logging, testing, error-handling, TDD)
1508
- - CLI: `cak init`, `cak update`
172
+ [Full changelog in releases](https://github.com/ChampPABA/claude-multi-agent-template/releases)
1509
173
 
1510
174
  ---
1511
175
 
1512
- ## 🔗 Links
176
+ ## Links
1513
177
 
1514
- - **npm Package:** https://www.npmjs.com/package/@champpaba/claude-agent-kit
1515
- - **GitHub:** https://github.com/ChampPABA/claude-multi-agent-template
1516
- - **OpenSpec:** https://github.com/Fission-AI/OpenSpec
1517
- - **Issues:** https://github.com/ChampPABA/claude-multi-agent-template/issues
178
+ - [npm Package](https://www.npmjs.com/package/@champpaba/claude-agent-kit)
179
+ - [GitHub](https://github.com/ChampPABA/claude-multi-agent-template)
180
+ - [OpenSpec](https://github.com/Fission-AI/OpenSpec)
181
+ - [Issues](https://github.com/ChampPABA/claude-multi-agent-template/issues)
1518
182
 
1519
183
  ---
1520
184
 
1521
- ## 💡 Quick Tips
185
+ ## License
1522
186
 
1523
- 1. **Run `/designsetup` FIRST** - Ensures visual consistency from day 1
1524
- 2. **Use `/pageplan` for UI tasks** - 25% faster implementation, better content
1525
- 3. **Review `page-plan.md` before `/cdev`** - Edit content, prepare assets
1526
- 4. **Setup Context7 MCP** - Agents get latest framework docs automatically
1527
- 5. **Use OpenSpec for complex features** - Better alignment before implementation
1528
- 6. **Monitor with `/cview`** - See exactly what agents are doing
1529
- 7. **Always use `--backup` when updating** - Protects your customizations
1530
-
1531
- ---
1532
-
1533
- ## 📋 Complete Flow Summary (v1.8.0)
1534
-
1535
- ```
1536
- 1️⃣ OpenSpec Planning
1537
- → proposal.md + tasks.md + design.md (optional)
1538
-
1539
- 2️⃣ Generate Style Guide (one-time, optional)
1540
- /designsetup
1541
- → STYLE_GUIDE.md
1542
-
1543
- 3️⃣ Generate Page Plan (UI tasks only)
1544
- /pageplan @prd.md
1545
- → page-plan.md (content + component plan)
1546
-
1547
- 4️⃣ Setup Change Context (v1.8.0: now includes best-practices!)
1548
- /csetup {change-id}
1549
- → Auto-detects tech stack
1550
- → Auto-generates best-practices from Context7
1551
- → workflow.md
1552
-
1553
- 5️⃣ Execute Implementation
1554
- /cdev {change-id}
1555
- → Working code + tests
1556
- → Verbose summary in terminal (no temp files!)
1557
-
1558
- 6️⃣ Monitor Progress
1559
- /cview {change-id}
1560
- → Detailed progress report
1561
-
1562
- 7️⃣ OpenSpec Archive & Update
1563
- → Merge to specs/
1564
- ```
187
+ MIT License - see [LICENSE](LICENSE)
1565
188
 
1566
189
  ---
1567
190
 
1568
- **Ready to implement with confidence?** 🚀
191
+ **Ready to start?**
1569
192
 
1570
193
  ```bash
1571
- # Install globally
1572
194
  npm install -g @champpaba/claude-agent-kit
1573
-
1574
- # Initialize in your project
1575
195
  cd your-project
1576
196
  cak init
1577
-
1578
- # Generate style guide (optional but recommended)
1579
- /designsetup
1580
-
1581
- # Start building (after OpenSpec planning)
1582
- /pageplan @prd.md # UI tasks only
1583
- /csetup your-feature # v1.8.0: auto-generates best-practices!
1584
- /cdev your-feature
1585
197
  ```
1586
-
1587
- Let specialized agents handle implementation while you focus on specs and architecture!