JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 947
  • Score
    100M100P100Q110077F
  • License MIT

Universal multi-agent template for Claude Code - AI-assisted development with specialized agents

Package Exports

  • @champpaba/claude-agent-kit
  • @champpaba/claude-agent-kit/bin/cli.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@champpaba/claude-agent-kit) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Claude Agent Kit

๐Ÿค– Multi-Agent Implementation Engine - The perfect companion for OpenSpec spec-driven development

npm version License: MIT Node.js Version


๐ŸŽฏ What is this?

Claude Agent Kit picks up where OpenSpec planning ends.

While OpenSpec handles alignment (Draft Proposal โ†’ Review & Align), Claude Agent Kit handles implementation (Implement Tasks โ†’ Archive & Update) with specialized AI agents.

The Complete Workflow

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    OpenSpec Planning                        โ”‚
โ”‚  (Spec-Driven Development for AI Coding Assistants)        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                            โ†“
              Generates: proposal.md + tasks.md
                            โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚              Claude Agent Kit Implementation                โ”‚
โ”‚         (Multi-Agent Execution with 6 Specialists)          โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                            โ†“
              Completes: All tasks with quality gates

๐Ÿ”„ How They Work Together

Stage Tool What Happens Output
1. Draft Proposal OpenSpec Human requests change, AI scaffolds structure proposal.md + tasks.md
2. Review & Align OpenSpec Team iterates until consensus Approved specs
2.5. Page Planning Claude Agent Kit (UI tasks only) Generate content & component plan page-plan.md
3. Setup Context Claude Agent Kit Classify tasks, generate workflow workflow.md
4. Implement Tasks Claude Agent Kit 6 specialized agents execute work Working code + tests
5. Archive & Update OpenSpec Merge changes back to specs Updated specs/

What OpenSpec Generates

proposal.md - Business case and scope

# Change Proposal: User Authentication System

## Motivation
Users need secure login functionality...

## Scope
- Email/password authentication
- JWT token generation
- Protected routes middleware

tasks.md - Implementation checklist

## Database Setup
- [ ] Create User model with email, password fields
- [ ] Add unique constraint on email

## Backend Implementation
- [ ] POST /api/auth/login endpoint
- [ ] Password hashing with bcrypt
- [ ] JWT token generation

## Frontend Implementation
- [ ] Login form component
- [ ] Form validation
- [ ] Token storage

What Claude Agent Kit Does

Input: Reads proposal.md + tasks.md from OpenSpec

Process:

  1. /pageplan (UI tasks only) - Generate content & component reuse plan
  2. /csetup {change-id} - Analyze tasks, classify by agent, generate workflow
  3. /cdev {change-id} - Execute with 6 specialized agents in phases:
    • Phase 1: UI with mock data (uxui-frontend)
    • Phase 2: Real API + database (backend + database, parallel)
    • Phase 2.5: Validate contracts (integration)
    • Phase 3: Connect UI to API (frontend)
    • Phase 4: Tests + bug fixes (test-debug)

Output: Working implementation ready for review


๐ŸŽจ NEW: Page Planning for UI Tasks

Problem: Before /pageplan, agents would:

  • โŒ Create duplicate components (3 different Navbar components!)
  • โŒ Use inconsistent colors (#0d7276 on landing, #4f46e5 on dashboard)
  • โŒ Generate lorem ipsum instead of real content
  • โŒ Waste time searching for components during implementation

Solution: /pageplan command analyzes BEFORE implementing

How It Works

# Step 1: OpenSpec generates tasks
User: "Build landing page for TOEIC app"
โ†’ Creates: openspec/changes/landing-page/proposal.md + tasks.md

# Step 2: Generate page plan (NEW!)
User: /pageplan @prd.md @project_brief.md

# What it does:
# 1. Reads user-specified files (PRD, brief)
# 2. Reads proposal.md (technical architecture)
# 3. Reads STYLE_GUIDE.md (visual design)
# 4. Searches existing components (Navbar, Footer, etc.)
# 5. AI drafts real content from PRD
# 6. Generates: openspec/changes/landing-page/page-plan.md

page-plan.md Output

# Page Plan: Landing Page

## 1. Component Plan
๐Ÿ”„ Reuse: Navbar, Footer (found in codebase)
โœ… New Shared: (none)
โœ… New Specific: HeroSection, FeatureGrid, TestimonialCarousel

## 2. Page Structure
<Layout>
  <Navbar /> {/* Reuse */}
  <HeroSection /> {/* New - see content below */}
  <FeatureGrid />
  <TestimonialCarousel />
  <Footer /> {/* Reuse */}
</Layout>

## 3. Assets to Prepare
- [ ] hero-image.jpg (1920x1080)
- [ ] logo.svg (200x60)
- [ ] feature-icons (3x 24x24 SVG)

## 4. Content Draft (AI-Generated - Please Review & Edit)
**Headline:** "Master TOEIC with AI-Powered Tests"
**Subheadline:** "Experience exam-quality questions with instant AI scoring"
**CTA:** "Start Free Test"

**Features:**
- Real TOEIC-style questions
- Instant AI scoring
- Progress tracking dashboard

Step 3: User Prepares

  • โœ… Review content draft (edit as needed)
  • โœ… Prepare assets (images, icons)
  • โœ… Approve page-plan.md

Step 4: Implementation

/csetup landing-page
/cdev landing-page

# uxui-frontend agent automatically:
# - STEP 0.5: Reads page-plan.md โœ…
# - STEP 3: SKIP component search (already done!) โšก 25% faster
# - Uses: Real content from page-plan
# - Reuses: Navbar, Footer (no duplicates)
# - Creates: HeroSection, FeatureGrid, TestimonialCarousel
# - Applies: Colors/spacing from STYLE_GUIDE.md

Benefits

Before (No page-plan) After (With page-plan)
โŒ Agent searches during implementation โœ… Search done once upfront (25% faster)
โŒ Duplicate components created โœ… Clear reuse plan
โŒ Lorem ipsum content โœ… Real content from PRD
โŒ Missing assets mid-work โœ… Asset checklist prepared
โŒ Inconsistent design โœ… Synced with STYLE_GUIDE
โŒ Agent guesses structure โœ… Clear component hierarchy

When to Use /pageplan

โœ… Use for:
- Landing pages
- Dashboards
- Multi-section UI pages
- Any task with multiple components

โŒ Skip for:
- Backend API endpoints
- Database schemas
- Single-component tasks
- Non-UI work

๐Ÿค– The 6 Specialized Agents

Agent Color Responsibility Phase
uxui-frontend ๐Ÿ”ต Blue Design UI components with mock data 1
backend ๐ŸŸฃ Purple Create API endpoints with validation 2
database ๐Ÿฉท Pink Design schemas, migrations, queries 2
integration ๐ŸŸ  Orange Validate API contracts before connecting 2.5
frontend ๐ŸŸข Green Connect UI to backend APIs 3
test-debug ๐Ÿ”ด Red Run tests and fix bugs (max 3-4 iterations) 1,3,4

Each agent:

  • โœ… Auto-discovers your project context (tech stack, best practices)
  • โœ… Follows framework-specific patterns from Context7 MCP
  • โœ… Maintains design consistency across the codebase
  • โœ… Reports progress with detailed logging
  • โœ… Smart auto-proceed: Eliminates double confirmations when user approves workflow

๐Ÿ“ฆ Installation

npm install -g @champpaba/claude-agent-kit

Alternative Package Managers

# Using pnpm
pnpm add -g @champpaba/claude-agent-kit

# Using yarn
yarn global add @champpaba/claude-agent-kit

๐Ÿš€ Quick Start (with OpenSpec)

Step 1: OpenSpec Planning

# In your OpenSpec-enabled project
cd my-app

# Draft a change proposal (OpenSpec handles this)
"I want to build a landing page for my TOEIC app"
# โ†’ Generates: openspec/changes/landing-page/proposal.md + tasks.md

Step 2: Initialize Claude Agent Kit

# Initialize the agent system
cak init

# Setup project context (detects tech stack)
# In Claude Code:
/psetup

Step 3: Generate Page Plan (UI tasks only)

# In Claude Code:
/pageplan @prd.md @project_brief.md

# โ†’ Generates: openspec/changes/landing-page/page-plan.md
# โ†’ Review content, prepare assets

Step 4: Setup Change Context

/csetup landing-page

What happens:

  • Reads openspec/changes/landing-page/proposal.md (business context)
  • Reads openspec/changes/landing-page/tasks.md (implementation checklist)
  • Reads openspec/changes/landing-page/page-plan.md (if exists - content plan)
  • Classifies tasks by agent (database, backend, frontend, etc.)
  • Generates workflow.md (execution plan)

Step 5: Execute Implementation

/cdev landing-page

What happens:

  1. Phase 1: uxui-frontend reads page-plan.md โ†’ creates UI with real content
  2. Phase 2: backend + database create APIs + models (parallel, if needed)
  3. Phase 2.5: integration validates API contracts
  4. Phase 3: frontend connects UI to APIs (if needed)
  5. Phase 4: test-debug runs tests, fixes bugs

Step 6: Monitor Progress

# View detailed progress
/cview landing-page

# Quick status check
/cstatus landing-page
# โ†’ Phase 1/4 - UI Implementation (100%)

๐ŸŽฏ Complete Workflow Examples

Workflow A: UI Feature (with /pageplan)

# 1. OpenSpec Planning
User: "Build landing page for TOEIC app"
โ†’ Creates: proposal.md + tasks.md

# 2. Page Planning (NEW!)
/pageplan @prd.md @project_brief.md
โ†’ Creates: page-plan.md
โ†’ User reviews content & prepares assets

# 3. Setup Context
/csetup landing-page
โ†’ Reads: proposal.md, tasks.md, page-plan.md
โ†’ Generates: workflow.md

# 4. Implementation
/cdev landing-page
โ†’ uxui-frontend reads page-plan.md (STEP 0.5)
โ†’ Skips redundant component search
โ†’ Uses real content + reuse plan
โ†’ 25% faster implementation

# 5. Monitor
/cview landing-page

Workflow B: Backend Feature (skip /pageplan)

# 1. OpenSpec Planning
User: "Add payment processing API"
โ†’ Creates: proposal.md + tasks.md

# 2. Setup Context (skip /pageplan - not UI work)
/csetup payment-api

# 3. Implementation
/cdev payment-api
โ†’ Phase 2: backend + database agents (parallel)
โ†’ Phase 2.5: integration validates contracts
โ†’ Phase 3: frontend connects (if UI exists)
โ†’ Phase 4: test-debug validates

# 4. Monitor
/cview payment-api

Workflow C: Full-Stack Feature (with /pageplan)

# 1. OpenSpec Planning
User: "Build user authentication system"
โ†’ Creates: proposal.md + tasks.md

# 2. Page Planning (for login UI only)
/pageplan @prd.md
โ†’ Creates: page-plan.md (login form content + components)

# 3. Setup Context
/csetup auth-system

# 4. Implementation
/cdev auth-system
โ†’ Phase 1: uxui-frontend (login form, reads page-plan.md)
โ†’ Phase 2: backend (POST /api/auth/login) + database (User model)
โ†’ Phase 2.5: integration (validate contract)
โ†’ Phase 3: frontend (connect form to API)
โ†’ Phase 4: test-debug (E2E tests)

# 5. Monitor
/cview auth-system

๐Ÿ“ Project Structure After Init

your-project/
โ”œโ”€โ”€ openspec/
โ”‚   โ”œโ”€โ”€ specs/                       # Source of truth (OpenSpec)
โ”‚   โ””โ”€โ”€ changes/
โ”‚       โ””โ”€โ”€ landing-page/
โ”‚           โ”œโ”€โ”€ proposal.md          โ† OpenSpec generates
โ”‚           โ”œโ”€โ”€ tasks.md             โ† OpenSpec generates
โ”‚           โ”œโ”€โ”€ page-plan.md         โ† /pageplan generates (UI tasks)
โ”‚           โ”œโ”€โ”€ workflow.md          โ† /csetup generates
โ”‚           โ””โ”€โ”€ flags.json           โ† /cdev tracks progress
โ”‚
โ”œโ”€โ”€ design-system/
โ”‚   โ””โ”€โ”€ STYLE_GUIDE.md               โ† /designsetup generates
โ”‚
โ””โ”€โ”€ .claude/
    โ”œโ”€โ”€ CLAUDE.md                    # Navigation guide
    โ”‚
    โ”œโ”€โ”€ agents/                      # 6 specialized agents
    โ”‚   โ”œโ”€โ”€ 01-integration.md
    โ”‚   โ”œโ”€โ”€ 02-uxui-frontend.md
    โ”‚   โ”œโ”€โ”€ 03-test-debug.md
    โ”‚   โ”œโ”€โ”€ 04-frontend.md
    โ”‚   โ”œโ”€โ”€ 05-backend.md
    โ”‚   โ””โ”€โ”€ 06-database.md
    โ”‚
    โ”œโ”€โ”€ commands/                    # Slash commands
    โ”‚   โ”œโ”€โ”€ designsetup.md           # Generate style guide
    โ”‚   โ”œโ”€โ”€ pageplan.md              # Generate page plan (NEW!)
    โ”‚   โ”œโ”€โ”€ psetup.md                # Project setup
    โ”‚   โ”œโ”€โ”€ csetup.md                # Change setup
    โ”‚   โ”œโ”€โ”€ cdev.md                  # Change development
    โ”‚   โ”œโ”€โ”€ cview.md                 # View progress
    โ”‚   โ””โ”€โ”€ cstatus.md               # Quick status
    โ”‚
    โ”œโ”€โ”€ contexts/
    โ”‚   โ”œโ”€โ”€ design/                  # Design foundation
    โ”‚   โ”œโ”€โ”€ patterns/                # Universal patterns
    โ”‚   โ””โ”€โ”€ domain/                  # Project context
    โ”‚
    โ””โ”€โ”€ lib/                         # Implementation logic
        โ”œโ”€โ”€ agent-executor.md
        โ”œโ”€โ”€ tdd-classifier.md
        โ”œโ”€โ”€ flags-updater.md
        โ””โ”€โ”€ agent-router.md

๐ŸŽฏ Why Use Claude Agent Kit?

Without Claude Agent Kit (Manual Implementation)

โŒ You manually interpret tasks.md
โŒ You context-switch between frontend/backend/database
โŒ You might forget edge cases or tests
โŒ Inconsistent code patterns across features
โŒ No systematic error handling
โŒ Duplicate components everywhere
โŒ Lorem ipsum content in UI

With Claude Agent Kit

โœ… Agents auto-classify and execute tasks
โœ… Each agent focuses on its specialty
โœ… Built-in validation gates (integration agent)
โœ… Consistent patterns via auto-discovery
โœ… Automatic retry with escalation
โœ… Component reuse plan (/pageplan)
โœ… Real content from PRD
โœ… 25% faster UI implementation

๐Ÿ“š Key Features

โœ… Seamless OpenSpec Integration

  • Reads proposal.md for business context
  • Parses tasks.md for implementation checklist
  • Generates page-plan.md for UI tasks (NEW!)
  • Tracks progress in flags.json
  • Updates completion status back to OpenSpec

โœ… Auto-Generated Best Practices

Uses Context7 MCP to fetch latest framework docs:

/psetup
# โ†’ Detects: Next.js 15, React 18, Prisma 6
# โ†’ Generates: .claude/contexts/domain/{project}/best-practices/
#    - nextjs-15.md
#    - react-18.md
#    - prisma-6.md

โœ… 3-Level Project Indexing

Agents auto-discover context:

1. Read: domain/index.md โ†’ Get current project
2. Read: domain/{project}/README.md โ†’ Get tech stack
3. Read: domain/{project}/best-practices/index.md โ†’ Load patterns

โœ… Design Foundation

Universal design principles:

  • Color theory (WCAG AAA contrast)
  • Typography scales
  • 8px spacing grid (8, 16, 24, 32, 40, 48px)
  • 4-level shadow system
  • Box thinking framework
  • Accessibility (WCAG 2.1 AA)

โœ… Quality Gates

  • TDD for critical paths (auth, payments, data transforms)
  • Test-alongside for simple code (CRUD, UI components)
  • Max 3-4 retry iterations before escalation
  • Integration validation before connecting UI to API
  • Smart auto-proceed (eliminate redundant confirmations, 25% faster)

๐Ÿ”ง CLI Commands

cak init

Initialize agent system in current project

cak init
cak init --force  # Overwrite existing .claude/

Creates:

  • .claude/ folder with 6 agents
  • Slash commands (/psetup, /csetup, /cdev, etc.)
  • Universal patterns & design foundation

cak update

Update to latest agent templates

cak update
cak update --backup  # Create .claude.backup/ first

What it does:

  • Updates all template files to latest version
  • Preserves your customizations in domain/
  • Creates backup before updating (with --backup flag)

cak --version

Show version number

cak --version
# โ†’ 1.0.0

cak --help

Display help information

cak --help

๐Ÿ”„ Workflow Commands (in Claude Code)

/designsetup - Generate style guide (one-time)

/designsetup

Auto-detects from:

  1. reference/ folder โ†’ Extract design from HTML/screenshots
  2. Existing codebase โ†’ Reverse engineer patterns
  3. AI generation โ†’ Modern best practices

Creates: design-system/STYLE_GUIDE.md


/pageplan - Generate page plan (UI tasks only) ๐Ÿ†•

/pageplan @prd.md @project_brief.md

What it does:

  • Reads user-specified files (PRD, brief)
  • Reads proposal.md + STYLE_GUIDE.md
  • Searches existing components
  • AI drafts real content from PRD
  • Generates asset checklist

Creates: page-plan.md

  • Component reuse plan (๐Ÿ”„ Reuse vs โœ… New)
  • Page structure (component hierarchy)
  • Assets to prepare (images, icons)
  • Content draft (headlines, descriptions)

/psetup - Setup project (one-time)

/psetup

What it does:

  • Detects tech stack (Next.js, React, Prisma, etc.)
  • Creates domain/{project}/README.md
  • Generates best practices via Context7 MCP

/csetup {change-id} - Setup change context

/csetup landing-page

What it does:

  • Reads proposal.md (business context)
  • Reads tasks.md (implementation checklist)
  • Reads page-plan.md (if exists - UI content plan)
  • Classifies tasks by agent
  • Generates workflow.md (execution plan)

/cdev {change-id} - Execute implementation

/cdev landing-page

# Or with explicit approval
"เธฅเธธเธขเน€เธฅเธข"  # Continue without confirmation prompts

What it does:

  • Runs agents in phases (1 โ†’ 2 โ†’ 2.5 โ†’ 3 โ†’ 4)
  • uxui-frontend auto-reads page-plan.md (STEP 0.5)
  • Auto-proceed: Detects user approval ("continue", "เธฅเธธเธขเน€เธฅเธข") and eliminates redundant confirmation prompts
  • Updates flags.json (progress tracking)
  • Reports completion status

Auto-Proceed Feature:

  • When you say "continue", "proceed", "yes", or "เธฅเธธเธขเน€เธฅเธข", Main Claude auto-responds to agent questions
  • 50-90% fewer confirmations (1x per workflow instead of 2x per phase)
  • 25% faster execution (no waiting for redundant approvals)

/cview {change-id} - View detailed progress

/cview landing-page

Shows:

  • Completed/pending tasks
  • Agent activity log
  • Current phase
  • Error messages (if any)

/cstatus {change-id} - Quick status

/cstatus landing-page
# โ†’ Phase 2/4 - Backend Implementation (75%)

๐ŸŽจ Design System Integration

Auto-Generate Style Guide

/designsetup

Detection priority:

  1. reference/ folder (HTML/screenshots) โ†’ Extract design style
  2. Existing codebase (>10 components) โ†’ Reverse engineer patterns
  3. AI generation โ†’ Modern best practices

Output: design-system/STYLE_GUIDE.md

17 Comprehensive Sections:

  1. Overview
  2. Design Philosophy
  3. Color Palette (HEX codes, usage, Tailwind classes)
  4. Typography (headings, body, weights)
  5. Spacing System (4px/8px grid)
  6. Component Styles (Button, Card, Input, Badge, etc.)
  7. Shadows & Elevation
  8. Animations & Transitions
  9. Border Styles
  10. Border Radius
  11. Opacity & Transparency
  12. Z-Index Layers
  13. Responsive Breakpoints
  14. CSS Variables / Tailwind Theme (Design Tokens)
  15. Layout Patterns
  16. Example Component Reference (React + Tailwind code)
  17. Additional Sections (Best Practices, Accessibility, Icon System)

Agents automatically use STYLE_GUIDE.md for:

  • Color palette (no hardcoded colors)
  • Spacing scale (consistent gaps/padding)
  • Typography (font hierarchy)
  • Component patterns (reuse before create)

๐Ÿงช Testing Philosophy

Agents follow TDD classification:

Code Type Approach Example
Critical paths TDD (Red-Green-Refactor) Auth logic, payments, calculations
Simple code Test-alongside CRUD, UI components, config

Test-debug agent:

  • Runs tests automatically after implementation
  • Fixes bugs (max 3-4 iterations)
  • Escalates if stuck (reports to user)

๐Ÿ”ง Supported Tech Stacks

Agents auto-detect your stack via Context7 MCP:

Frontend:

  • Next.js, React, Vue, Svelte, Angular

Backend:

  • FastAPI, Express, NestJS, Django, Flask, Next.js API Routes

Database:

  • Prisma, SQLAlchemy, TypeORM, Drizzle

Testing:

  • Vitest, Jest, Pytest, Playwright

๐Ÿ“– Usage Examples

Example 1: Simple UI Task (with /pageplan)

# In Claude Code
"Build a user profile page with edit functionality"

# If it's a UI task, optionally run:
/pageplan @prd.md

# Then execute:
/csetup profile-page
/cdev profile-page

Claude will:

  1. Read task-classification.md
  2. Select agents: uxui-frontend โ†’ backend โ†’ frontend โ†’ test-debug
  3. uxui-frontend reads page-plan.md (if exists)
  4. Execute in sequence
  5. Report completion

Example 2: Complex Multi-Agent Workflow (OpenSpec)

Using OpenSpec workflow:

# 1. OpenSpec generates proposal + tasks
"I want to add a dashboard with analytics"
# โ†’ proposal.md + tasks.md created

# 2. Generate page plan
/pageplan @prd.md @analytics_spec.md

# 3. Setup change context
/csetup analytics-dashboard

# 4. Start development
/cdev analytics-dashboard

# 5. View progress
/cview analytics-dashboard

This follows a structured 4-phase approach:

  1. Phase 1: UI with mock data (uxui-frontend reads page-plan.md)
  2. Phase 2: Real API + database (backend + database)
  3. Phase 2.5: Validate contracts (integration)
  4. Phase 3: Connect UI to API (frontend)
  5. Phase 4: Tests + bug fixes (test-debug)

๐Ÿ”„ Updating to Latest Version

Method 1: Update the npm package

npm update -g @champpaba/claude-agent-kit

Method 2: Update template in project

cd your-project
cak update --backup

This will:

  • Create backup at .claude.backup/
  • Update all template files
  • Preserve your customizations in domain/

๐ŸŽฏ Customization

Add Project-Specific Context

After running cak init, add your own context files:

mkdir -p .claude/contexts/domain/my-project

Example: E-commerce checkout flow

<!-- .claude/contexts/domain/my-project/checkout-flow.md -->
# Checkout Flow

## Steps
1. Cart review
2. Shipping address
3. Payment method
4. Order confirmation

## Business Rules
- Free shipping over $50
- Tax calculation by state
- Inventory check before payment

Agents will auto-discover and use these patterns.


๐Ÿ”— Ecosystem

Claude Agent Kit works with:

Tool Purpose Integration
OpenSpec Spec-driven planning Reads proposal.md + tasks.md
Context7 MCP Always-updated docs Auto-generates best practices
Claude Code AI coding assistant Execution environment

๐Ÿค Contributing

We welcome contributions!


๐Ÿ“„ License

MIT License - see LICENSE


๐Ÿ™ Credits

Built with:


๐Ÿ†• What's New in v1.4.1

Feature: Intelligent Auto-Proceed - Eliminate Double Confirmations ๐Ÿš€

Smart Approval Detection

Problem Solved:

  • Before: Agent asks "Proceed?" โ†’ Main Claude asks user again (redundant!)
  • User frustration: "I already said 'เธฅเธธเธขเน€เธฅเธข', why ask twice?"

Solution Implemented:

  • โœ… Main Claude detects user approval keywords ("continue", "proceed", "yes", "เธฅเธธเธขเน€เธฅเธข")
  • โœ… Passes approval context to agents in prompt
  • โœ… Auto-responds to agent questions without re-prompting user
  • โœ… Backward compatible: Manual approval mode still available

Results:

  • 50-90% fewer confirmations (1x per workflow vs 2x per phase)
  • 25% faster execution (no waiting for redundant approvals)
  • Better UX (approve once, system handles the rest)
  • Lean implementation (80 lines, 1 file, +0.1% context)

How It Works

# Before v1.4.1 (Double confirmation โŒ)
User: "เธฅเธธเธขเน€เธฅเธข"
Main: Calls uxui-frontend agent
Agent: "Pre-work done. Proceed?"
Main: "Agent is asking... Proceed? (yes/no)"  โ† Asks user again!
User: "Why ask twice?"

# After v1.4.1 (Smart auto-proceed โœ…)
User: "เธฅเธธเธขเน€เธฅเธข"
Main: Detects approval โ†’ auto_proceed = true
Agent: "Pre-work done. Proceed?"
Main: "YES, proceed immediately"  โ† Answers agent directly!
Agent: Continues work...

Auto-Proceed Trigger Words

These keywords enable auto-proceed mode:

  • โœ… /cdev command (implicit approval for all phases)
  • โœ… "continue", "proceed", "yes"
  • โœ… "เธฅเธธเธขเน€เธฅเธข" (Thai: "go ahead")

๐ŸŽ‰ What's New in v1.4.0

Major Update: Context Optimization & DRY Consolidation

Token Efficiency Improvements

Problem Solved:

  • Before v1.4.0: Same documentation duplicated across 6 agent files + CLAUDE.md
  • Package Manager warnings: 360 lines duplicated 6x
  • Context Loading Strategy: 1,200 lines duplicated 6x
  • TDD Workflow examples: 1,200 lines duplicated 3x
  • Handoff templates: 900 lines duplicated 6x
  • Documentation policies: 480 lines duplicated 6x
  • CLAUDE.md: 890 lines mixing navigation + detailed guides

Solution Implemented:

  • โœ… Created consolidated lib files (context-loading-protocol.md, handoff-protocol.md, tdd-workflow.md)
  • โœ… Extracted detailed guides from CLAUDE.md to lib/detailed-guides/
  • โœ… Applied consistent reference pattern: Brief summary + "โ†’ See: path" + agent-specific additions
  • โœ… Maintained 100% content quality (all information preserved)

Results:

  • All 6 agents: 6,796 โ†’ 4,749 lines (-2,047, -30.1% reduction)
  • CLAUDE.md: 890 โ†’ 163 lines (-727, -81.7% reduction)
  • Grand Total: 7,686 โ†’ 4,912 lines (-2,774, -36.1% reduction)
  • Token savings: ~36% reduction in total context size
  • Speed improvement: Faster agent loading and execution
  • Maintainability: Single source of truth for shared documentation

New Consolidated Documentation Structure

Created in v1.4.0:

.claude/lib/
โ”œโ”€โ”€ context-loading-protocol.md     # Universal context loading strategy
โ”œโ”€โ”€ handoff-protocol.md             # Agent handoff templates
โ”œโ”€โ”€ tdd-workflow.md                 # TDD workflow examples
โ””โ”€โ”€ detailed-guides/
    โ”œโ”€โ”€ best-practices-system.md    # How best practices work
    โ”œโ”€โ”€ context-optimization.md     # Token optimization strategy
    โ”œโ”€โ”€ page-planning.md            # /pageplan command guide
    โ”œโ”€โ”€ taskmaster-analysis.md      # 6-dimension task analysis
    โ”œโ”€โ”€ design-system.md            # Style guide generation
    โ””โ”€โ”€ agent-system.md             # Agent overview & workflow

Benefits for Users

For Developers:

  • โšก 36% faster context loading
  • ๐Ÿ“– Cleaner, easier-to-navigate documentation
  • ๐ŸŽฏ CLAUDE.md is now a pure navigation hub (163 lines)
  • ๐Ÿ” Detailed guides are modular and focused

For Claude Agents:

  • ๐Ÿš€ Faster startup (less context to load)
  • ๐Ÿ’พ More token budget for actual work
  • ๐Ÿ“š Single source of truth (no conflicting info)
  • ๐Ÿ”„ Easier maintenance (update once, apply everywhere)

Migration Notes

No breaking changes! All existing workflows continue to work:

  • โœ… /psetup, /csetup, /cdev commands unchanged
  • โœ… Agent behavior unchanged (same quality, faster execution)
  • โœ… All features from v1.1-1.3 preserved
  • โœ… Existing projects can update with cak update

New Reference Pattern: Agents now use lightweight references instead of duplicating full documentation:

## Context Loading Strategy

**โ†’ See:** `.claude/lib/context-loading-protocol.md` for complete protocol

**Agent-Specific Additions (frontend):**
### State Management Libraries
...

Upgrading to v1.4.1

# Update npm package
npm update -g @champpaba/claude-agent-kit

# Update template in your project (creates backup)
cd your-project
cak update --backup

What's New:

  • โœ… Auto-proceed feature (eliminate double confirmations)
  • โœ… 50-90% fewer approval prompts
  • โœ… 25% faster workflow execution
  • โœ… All v1.4.0 features (context optimization, DRY consolidation)

All your customizations in .claude/contexts/domain/ are preserved!


๐Ÿ“œ Changelog

v1.4.1 (2025-11-06)

Feature: Intelligent Auto-Proceed - Eliminate Double Confirmations

Added:

  • Auto-proceed approval context in agent prompts
  • Smart detection of user approval keywords ("continue", "proceed", "yes", "เธฅเธธเธขเน€เธฅเธข")
  • Agent question handling logic (auto-respond vs ask user)
  • Auto-proceed decision tree in agent-executor.md

Improved:

  • User experience: 50-90% fewer confirmation prompts
  • Execution speed: 25% faster (no waiting for redundant approvals)
  • Workflow clarity: User approves once, system handles agent interactions

Technical Details:

  • Modified: .claude/lib/agent-executor.md (+80 lines)
  • Implementation: Lean solution (1 file, 0.1% context increase)
  • Backward compatible: Manual approval mode still available

When It Activates:

  • User runs /cdev command (implicit approval)
  • User says "continue", "proceed", "yes", "เธฅเธธเธขเน€เธฅเธข" (explicit approval)

Before:

User approves โ†’ Agent asks โ†’ Main asks user again โŒ

After:

User approves โ†’ Agent asks โ†’ Main answers directly โœ…

v1.4.0 (2025-11-05)

Major: Context Optimization & DRY Consolidation

Added:

  • New consolidated lib files: context-loading-protocol.md, handoff-protocol.md, tdd-workflow.md
  • New detailed guides folder: lib/detailed-guides/ (6 focused guides)
  • Reference pattern across all agents (Brief summary โ†’ See: path โ†’ Additions)

Changed:

  • All 6 agents refactored: 30.1% size reduction (6,796 โ†’ 4,749 lines)
  • CLAUDE.md refactored: 81.7% size reduction (890 โ†’ 163 lines, pure navigation hub)
  • Documentation structure: Moved detailed content to modular lib files

Performance:

  • 36% total context reduction (7,686 โ†’ 4,912 lines)
  • Faster agent loading and execution
  • More token budget available for actual work

Improved:

  • Maintainability: Single source of truth for shared docs
  • Discoverability: Clear navigation in CLAUDE.md
  • Modularity: Detailed guides in separate files
  • Consistency: Same content quality, zero duplication

v1.3.0 (2025-10-30)

Feature: TaskMaster-style Intelligent Task Analysis

Added:

  • 6-dimension task analysis in /csetup:
    • Complexity scoring (1-10)
    • Dependency detection (auto-detects blocks/blocked-by)
    • Risk assessment (LOW/MEDIUM/HIGH with mitigation)
    • Research requirements (auto-generates queries)
    • Subtask breakdown (complex tasks โ†’ smaller steps)
    • Priority ranking (CRITICAL โ†’ LOW, scored 0-100)
  • Task analyzer implementation: .claude/lib/task-analyzer.md
  • Enhanced phases.md with metadata, time buffers, research phases

Improved:

  • Time estimates with automatic buffers (+41% average)
  • Research phases auto-added for new tech/libraries
  • Dependency order in workflow execution
  • Risk mitigation strategies per task

Inspired by: claude-task-master

v1.2.0 (2025-10-27)

Feature: Context Optimization - 70% Token Reduction

Added:

  • 3-tier loading strategy: STYLE_TOKENS.json (500) โ†’ design-context.md (1K) โ†’ STYLE_GUIDE.md (5K)
  • Document loader protocol: .claude/lib/document-loader.md
  • Lightweight design tokens: design-system/STYLE_TOKENS.json

Improved:

  • Token usage: ~20K โ†’ ~4.7K (70% reduction for design system)
  • Speed: 3-4x faster command execution
  • Consistency: Enforced design tokens, no random colors

v1.1.1 (2025-10-25)

Patch: Minor Fixes

Fixed:

  • Template path correction: template/.claude โ†’ .claude
  • Documentation typos and formatting

v1.1.0 (2025-10-24)

Feature: Enhanced Implementation Logic

Added:

  • Implementation logic overview: lib/README.md
  • Agent executor with retry & escalation: lib/agent-executor.md
  • TDD classifier logic: lib/tdd-classifier.md
  • Progress tracking protocol: lib/flags-updater.md
  • Mandatory agent routing: lib/agent-router.md
  • Shared agent discovery flow: contexts/patterns/agent-discovery.md

v1.0.0 (2025-10-20)

Initial Release: Multi-Agent Template

Core Features:

  • 6 specialized agents (integration, uxui-frontend, test-debug, frontend, backend, database)
  • OpenSpec integration (/csetup, /cdev, /cview, /cstatus)
  • Auto-generated best practices via Context7 MCP
  • 3-level project indexing (domain โ†’ project โ†’ best-practices)
  • Design foundation (color theory, spacing, typography)
  • /designsetup command (auto-generate style guide)
  • /pageplan command (UI content & component planning)
  • Universal patterns (logging, testing, error-handling, TDD)
  • CLI: cak init, cak update


๐Ÿ’ก Quick Tips

  1. Run /designsetup FIRST - Ensures visual consistency from day 1
  2. Use /pageplan for UI tasks - 25% faster implementation, better content
  3. Review page-plan.md before /cdev - Edit content, prepare assets
  4. Setup Context7 MCP - Agents get latest framework docs automatically
  5. Use OpenSpec for complex features - Better alignment before implementation
  6. Monitor with /cview - See exactly what agents are doing
  7. Always use --backup when updating - Protects your customizations

๐Ÿ“‹ Complete Flow Summary

1๏ธโƒฃ OpenSpec Planning
   โ†’ proposal.md + tasks.md

2๏ธโƒฃ Generate Style Guide (one-time)
   /designsetup
   โ†’ STYLE_GUIDE.md

3๏ธโƒฃ Setup Project (one-time)
   /psetup
   โ†’ domain/{project}/best-practices/

4๏ธโƒฃ Generate Page Plan (UI tasks only)
   /pageplan @prd.md
   โ†’ page-plan.md (content + component plan)

5๏ธโƒฃ Setup Change Context
   /csetup {change-id}
   โ†’ workflow.md

6๏ธโƒฃ Execute Implementation
   /cdev {change-id}
   โ†’ Working code + tests

7๏ธโƒฃ Monitor Progress
   /cview {change-id}
   โ†’ Detailed progress report

8๏ธโƒฃ OpenSpec Archive & Update
   โ†’ Merge to specs/

Ready to implement with confidence? ๐Ÿš€

# Install globally
npm install -g @champpaba/claude-agent-kit

# Initialize in your project
cd your-project
cak init

# Setup project context
/psetup

# Generate style guide (optional but recommended)
/designsetup

# Start building (after OpenSpec planning)
/pageplan @prd.md           # UI tasks only
/csetup your-feature
/cdev your-feature

Let specialized agents handle implementation while you focus on specs and architecture!