@champpaba/claude-agent-kit 2.2.1 → 2.4.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.
@@ -1,6 +1,9 @@
1
- # /pageplan - Page Structure & Content Planning
1
+ # /pageplan - Visual Page Planning
2
2
 
3
- **Purpose:** Generate a detailed page plan for UI implementation, including component reuse strategy, content draft, and asset checklist.
3
+ **Purpose:** Generate a visual page plan for UI implementation - component strategy, layout wireframes, animation blueprint, and asset checklist.
4
+
5
+ > **Note:** Content strategy and conversion copy are handled by `/csetup` (Adaptive Depth Research).
6
+ > This command focuses on **visual structure** only.
4
7
 
5
8
  **Usage:**
6
9
  ```bash
@@ -32,12 +35,14 @@
32
35
  3. **Generates page-plan.md:**
33
36
  - Component plan (reuse vs new)
34
37
  - Page structure (layout composition)
35
- - Content draft (AI-generated from PRD)
36
- - Asset checklist (user must prepare)
37
- - Rationale (why this structure)
38
+ - Layout wireframe (ASCII art for Desktop/Tablet/Mobile)
39
+ - Animation blueprint (hover, focus, transition patterns)
40
+ - Asset checklist (images, icons to prepare)
38
41
 
39
42
  4. **Outputs to:** `openspec/changes/{change-id}/page-plan.md`
40
43
 
44
+ > **Content & Conversion Strategy** → Handled by `/csetup` in `research-checklist.md`
45
+
41
46
  ---
42
47
 
43
48
  ## Implementation Instructions
@@ -141,84 +146,9 @@ for (const pattern of searchPatterns) {
141
146
  }
142
147
  ```
143
148
 
144
- ### STEP 3.5: Buyer Avatar Analysis (NEW - Conversion Optimization)
145
-
146
- > **Purpose:** Extract buyer psychology to generate conversion-optimized copy (inspired by Eugene Schwartz framework)
147
-
148
- ```typescript
149
- // Only analyze if this is a marketing/landing page
150
- const isMarketingPage = tasksContent.toLowerCase().match(/(landing|marketing|homepage|product page|sales)/i)
151
-
152
- let buyerAvatar = null
153
-
154
- if (isMarketingPage && (proposalContent || briefContent)) {
155
- output(`
156
- đŸŽ¯ Detecting marketing page - analyzing buyer psychology...
157
- `)
158
-
159
- const avatarPrompt = `
160
- You are a conversion copywriter analyzing a product to understand the target buyer.
161
-
162
- Context:
163
- ${proposalContent || ''}
164
- ${briefContent || ''}
165
-
166
- Task: Extract buyer psychology using Eugene Schwartz's market awareness framework.
167
-
168
- Return JSON:
169
- {
170
- "demographics": {
171
- "age_range": "string",
172
- "job_role": "string",
173
- "description": "string"
174
- },
175
- "psychographics": {
176
- "top_pain_points": ["string", "string", "string"],
177
- "secret_desires": "string (what they truly want beyond features)",
178
- "decision_triggers": "string (what makes them buy NOW)",
179
- "dominant_emotion": "fear" | "aspiration" | "frustration" | "urgency"
180
- },
181
- "market_awareness": "unaware" | "problem_aware" | "solution_aware" | "product_aware" | "most_aware",
182
- "messaging_tone": "B2B" | "B2C",
183
- "messaging_strategy": {
184
- "hero_hook": "string (pain-based headline angle)",
185
- "value_prop_focus": "string (primary benefit to emphasize)",
186
- "cta_angle": "string (decision trigger for CTA)"
187
- }
188
- }
149
+ ### STEP 4: Analyze & Generate Plan
189
150
 
190
- If insufficient context, return { "has_context": false }
191
- `
192
-
193
- buyerAvatar = await LLM({
194
- prompt: avatarPrompt,
195
- response_format: 'json',
196
- temperature: 0.3
197
- })
198
-
199
- if (buyerAvatar.has_context === false) {
200
- warn(`âš ī¸ Insufficient context for buyer avatar - will generate generic copy`)
201
- buyerAvatar = null
202
- } else {
203
- output(`
204
- ✅ Buyer Avatar Analyzed:
205
- - Pain Points: ${buyerAvatar.psychographics.top_pain_points.slice(0, 2).join(', ')}
206
- - Market Awareness: ${buyerAvatar.market_awareness}
207
- - Tone: ${buyerAvatar.messaging_tone}
208
- `)
209
- }
210
- } else {
211
- output(`
212
- â„šī¸ Non-marketing page detected - skipping buyer avatar analysis
213
- `)
214
- }
215
- ```
216
-
217
- ---
218
-
219
- ### STEP 4: Analyze & Generate Plan (ENHANCED with Conversion Copy)
220
-
221
- Based on context + found components + buyer avatar (if available), generate:
151
+ Based on context + found components, generate:
222
152
 
223
153
  ```markdown
224
154
  # Page Plan: [Page Name]
@@ -584,52 +514,7 @@ className="hover:scale-105 transform"
584
514
 
585
515
  ---
586
516
 
587
- ## 3. đŸŽ¯ Target Audience & Conversion Strategy (if marketing page)
588
-
589
- ${buyerAvatar ? `
590
- > **Auto-generated from buyer avatar analysis (Eugene Schwartz framework)**
591
-
592
- ### Buyer Profile
593
-
594
- **Demographics:**
595
- - Age Range: ${buyerAvatar.demographics.age_range}
596
- - Job Role: ${buyerAvatar.demographics.job_role}
597
- - Description: ${buyerAvatar.demographics.description}
598
-
599
- **Psychographics:**
600
- - **Top Pain Points:**
601
- ${buyerAvatar.psychographics.top_pain_points.map(p => `- ${p}`).join('\n ')}
602
- - **Secret Desires:** ${buyerAvatar.psychographics.secret_desires}
603
- - **Decision Triggers:** ${buyerAvatar.psychographics.decision_triggers}
604
- - **Dominant Emotion:** ${buyerAvatar.psychographics.dominant_emotion}
605
-
606
- **Market Awareness:** ${buyerAvatar.market_awareness}
607
- - Messaging should be: ${getAwarenessGuidance(buyerAvatar.market_awareness)}
608
-
609
- **Messaging Tone:** ${buyerAvatar.messaging_tone} ${buyerAvatar.messaging_tone === 'B2B' ? '(Logic + ROI + Authority)' : '(Emotion + Transformation + Identity)'}
610
-
611
- ---
612
-
613
- ### Conversion Framework
614
-
615
- **Hero Section Strategy:**
616
- - **Hook Angle:** ${buyerAvatar.messaging_strategy.hero_hook}
617
- - **Value Prop Focus:** ${buyerAvatar.messaging_strategy.value_prop_focus}
618
- - **CTA Angle:** ${buyerAvatar.messaging_strategy.cta_angle}
619
-
620
- **Content Guidelines:**
621
- - Lead with pain point (not features)
622
- - Feature → Benefit → Emotional payoff translation
623
- - Use ${buyerAvatar.psychographics.dominant_emotion}-based triggers
624
- - Social proof with specific results (not generic testimonials)
625
-
626
- ---
627
- ` : `
628
- > Skipped (non-marketing page)
629
-
630
- `}
631
-
632
- ## 4. đŸ“Ļ Assets to Prepare (Performance-Optimized)
517
+ ## 3. đŸ“Ļ Assets to Prepare (Performance-Optimized)
633
518
 
634
519
  > **Performance Note:** Follow image optimization best practices for faster load times and better SEO.
635
520
  > See: `.claude/contexts/patterns/performance-optimization.md`
@@ -682,92 +567,7 @@ ${buyerAvatar ? `
682
567
 
683
568
  ---
684
569
 
685
- ## 5. 📝 Content Draft (${buyerAvatar ? 'Conversion-Optimized' : 'AI-Generated'})
686
-
687
- ${buyerAvatar ? `
688
- > **Generated using buyer avatar insights for conversion optimization**
689
-
690
- ### Hero Section
691
-
692
- **Headline (Pain Hook):**
693
- "[${buyerAvatar.messaging_strategy.hero_hook}]"
694
-
695
- _Strategy: Lead with biggest pain point from avatar analysis_
696
- _Length: 8-12 words, emotional trigger: ${buyerAvatar.psychographics.dominant_emotion}_
697
-
698
- **Subheadline (Promise + Benefit):**
699
- "[Focus on ${buyerAvatar.messaging_strategy.value_prop_focus}]"
700
-
701
- _Strategy: Concrete benefit + emotional payoff_
702
- _Length: 15-25 words_
703
-
704
- **CTA (Decision Trigger):**
705
- "[${buyerAvatar.messaging_strategy.cta_angle}]"
706
-
707
- _Strategy: Action verb + outcome/time-based urgency_
708
- _Example: "See Results in 5 Minutes" or "Start Your Free Trial"_
709
-
710
- ---
711
-
712
- ### Value Proposition Section
713
-
714
- **How to Structure:**
715
- For each feature, translate to buyer language:
716
-
717
- **Feature 1: [Technical feature name]**
718
- - **What User Gets:** [Practical benefit]
719
- - **Emotional Payoff:** [How it makes them feel - addresses pain point: ${buyerAvatar.psychographics.top_pain_points[0]}]
720
- - **Copy:** "[Benefit-first description, NOT feature dump]"
721
-
722
- **Example:**
723
- ❌ Bad: "Advanced analytics dashboard with real-time data"
724
- ✅ Good: "See exactly where projects are stuck—before your boss asks" (addresses pain: missed deadlines)
725
-
726
- ---
727
-
728
- ### Social Proof & Trust Section
729
-
730
- **Strategy:** Use ${buyerAvatar.messaging_tone === 'B2B' ? 'logic-based proof (ROI, case studies, metrics)' : 'emotional proof (transformations, identity, belonging)'}
731
-
732
- **Testimonial Template:**
733
- - Before state (pain point): "${buyerAvatar.psychographics.top_pain_points[0]}"
734
- - After state (resolution): "[Specific result]"
735
- - Attribution: [Name, Company/Role]
736
-
737
- **Risk Reversal:**
738
- - Address objection: "${buyerAvatar.psychographics.decision_triggers}"
739
- - Offer: [Free trial / Money-back guarantee / No credit card required]
740
-
741
- ---
742
-
743
- ### Call-to-Action (Final)
744
-
745
- **CTA Copy:** "[Repeat hero CTA or variation]"
746
- **Supporting Text:** "[Reinforce ${buyerAvatar.messaging_strategy.value_prop_focus}]"
747
- **Urgency (optional):** ${buyerAvatar.psychographics.dominant_emotion === 'urgency' ? '[Add time-based urgency]' : '[Social proof count or limited offer]'}
748
-
749
- ` : `
750
- > **Standard AI-generated content (non-marketing page)**
751
-
752
- ### [Section Name]
753
-
754
- **[Element Type]:** "[Content]"
755
- _([length] chars - based on [source])_
756
-
757
- [Repeat for all content elements]
758
- `}
759
-
760
- ---
761
-
762
- **Instructions for User:**
763
- 1. Review content above
764
- 2. Edit tone, length, messaging as needed
765
- 3. Prepare assets per checklist
766
- 4. When ready, run: \`/csetup ${changeId}\`
767
-
768
- ---
769
-
770
- ## 6. Design Notes
570
+ ## 4. Design Notes
771
571
 
772
572
  **Design System Files:**
773
573
  - Tokens (lightweight): \`design-system/STYLE_TOKENS.json\`
@@ -785,7 +585,7 @@ _([length] chars - based on [source])_
785
585
  - Use theme tokens (text-foreground/70) for theme-awareness
786
586
  - Use spacing scale (p-4, p-6) for consistency
787
587
 
788
- ## 7. Implementation Notes
588
+ ## 5. Implementation Notes
789
589
 
790
590
  ### Component Imports (Reference)
791
591
  \`\`\`tsx
@@ -802,9 +602,9 @@ _([length] chars - based on [source])_
802
602
  ---
803
603
 
804
604
  ## Next Steps
805
- 1. ✅ Review & edit content draft
806
- 2. ✅ Prepare assets (images, icons)
807
- 3. ✅ Run \`/csetup ${changeId}\` when ready
605
+ 1. ✅ Review layout wireframe & component plan
606
+ 2. ✅ Prepare assets (images, icons) per checklist
607
+ 3. ✅ Run \`/csetup ${changeId}\` for research & content strategy
808
608
  4. ✅ Run \`/cdev ${changeId}\` to implement
809
609
  ```
810
610
 
@@ -872,25 +672,6 @@ Result:
872
672
 
873
673
  ---
874
674
 
875
- ## Helper Functions
876
-
877
- ### getAwarenessGuidance()
878
- ```typescript
879
- // Provide messaging guidance based on Eugene Schwartz's market awareness stages
880
- function getAwarenessGuidance(stage: string): string {
881
- const guidance = {
882
- 'unaware': 'Educate about the problem first (they don\'t know they have it)',
883
- 'problem_aware': 'Agitate the pain, present your solution as THE answer',
884
- 'solution_aware': 'Differentiate - why YOUR solution vs alternatives',
885
- 'product_aware': 'Overcome objections, provide social proof, reduce risk',
886
- 'most_aware': 'Make the offer irresistible, urgency-based CTAs'
887
- }
888
- return guidance[stage] || 'Focus on benefits and clear CTAs'
889
- }
890
- ```
891
-
892
- ---
893
-
894
675
  ## Error Handling
895
676
 
896
677
  1. **No change ID found:**
@@ -915,7 +696,8 @@ function getAwarenessGuidance(stage: string): string {
915
696
  - ✅ Read user-specified files only
916
697
  - ✅ Search existing components
917
698
  - ✅ Generate component reuse plan
918
- - ✅ Generate content draft from PRD
699
+ - ✅ Generate layout wireframe
700
+ - ✅ Generate animation blueprint
919
701
 
920
702
  **Nice to have:**
921
703
  - Asset checklist detail level
@@ -927,15 +709,19 @@ function getAwarenessGuidance(stage: string): string {
927
709
  ## Integration with Multi-Agent Flow
928
710
 
929
711
  ```
930
- tasks.md → /pageplan → page-plan.md → /csetup → /cdev
931
- ↓ ↓ ↓ ↓
932
- Search User review Phases uxui-frontend
933
- components & edit reads plan
934
- skips search
712
+ /designsetup → /pageplan → /csetup → /cdev
713
+ ↓ ↓ ↓ ↓
714
+ tokens.json page-plan.md research uxui-frontend
715
+ patterns/ (visual) -checklist reads both
716
+ STYLE_GUIDE (content)
935
717
  ```
936
718
 
719
+ **Separation of Concerns:**
720
+ - `/pageplan` = **Visual** (layout, components, animations, assets)
721
+ - `/csetup` = **Research** (best practices, content strategy, UX principles)
722
+
937
723
  **Agent behavior:**
938
- - `uxui-frontend`: Reads page-plan.md in STEP 0, skips component search (STEP 3)
724
+ - `uxui-frontend`: Reads page-plan.md (visual) + research-checklist.md (content)
939
725
  - `frontend`: May read page-plan.md for component locations
940
726
  - Other agents: Ignore page-plan.md (not relevant)
941
727
 
package/README.md CHANGED
@@ -29,38 +29,46 @@ cak init
29
29
 
30
30
  ## Features
31
31
 
32
- - **Zero-Maintenance Tech Detection (v2.3.0)** - Auto-detects ANY library in ANY language via Context7
33
- - **4-Layer Validation** - Feature BP → Spec Alignment → Library Capability → Stack BP
34
- - **Spec Drift Prevention** - Validates library supports spec before implementation
32
+ - **Adaptive Depth Research (v2.4.0)** - Dynamic research layers (0-10+) based on change complexity
33
+ - **Zero-Maintenance Tech Detection** - Auto-detects ANY library in ANY language via Context7
34
+ - **Visual Page Planning** - Layout wireframes, component plans, animation blueprints
35
35
  - **Cross-session Context** - `PROJECT_STATUS.yml` maintains state across sessions
36
36
  - **Design System v2.0** - Interactive setup with theme selection
37
37
 
38
- ## Tech Detection (v2.3.0)
38
+ ## Adaptive Depth Research (v2.4.0)
39
39
 
40
40
  ```
41
- /csetup automatically detects libraries from:
42
- ├── Spec files (proposal.md, design.md, tasks.md)
43
- ├── JS/TS (package.json, imports)
44
- ├── Python (requirements.txt, pyproject.toml)
45
- ├── Rust (Cargo.toml)
46
- ├── Go (go.mod)
47
- └── PHP/Ruby (composer.json, Gemfile)
48
-
49
- Context7 validates → generates best-practices/*.md
50
- Zero maintenance - works with any library!
51
- ```
41
+ /csetup analyzes change complexity and generates research layers:
52
42
 
53
- ## Validation Flow
43
+ Typo fix → 0 layers (no research needed)
44
+ Simple API → 2 layers (Best Practice, API Design)
45
+ Auth system → 4 layers (+Security, +Testing)
46
+ E-commerce → 7 layers (+Payment, +UX, +Integration)
47
+ Healthcare (HIPAA) → 10 layers (+Compliance, +Audit, etc.)
54
48
 
49
+ Knowledge Sources:
50
+ ├── Domain (UX, DB design, Security) → Claude's Knowledge
51
+ └── Stack (Prisma, React, Next.js) → Context7
55
52
  ```
56
- /csetup
57
- ├── Step 2.6: Feature Best Practice (Auth, Payment, etc.)
58
- ├── Step 2.7: Stack Best Practice (auto-detected libraries)
59
- └── Step 2.8: Library Capability (verify library supports spec)
60
53
 
61
- /cdev
62
- └── Agent Step 0.5: Double-check feasibility before implement
54
+ ## Flow (v2.4.0)
55
+
63
56
  ```
57
+ /designsetup → tokens.json, patterns/*.md
58
+ ↓
59
+ /pageplan → page-plan.md (VISUAL: layout, components, animations)
60
+ ↓
61
+ /csetup → research-checklist.md (RESEARCH: best practices, content)
62
+ → best-practices/*.md (Stack: Context7)
63
+ ↓
64
+ /cdev → Agents read both files
65
+ ```
66
+
67
+ **Separation of Concerns:**
68
+ | Command | Focus | Output |
69
+ |---------|-------|--------|
70
+ | `/pageplan` | Visual (layout, wireframe, animations) | `page-plan.md` |
71
+ | `/csetup` | Research (best practices, content, UX) | `research-checklist.md` |
64
72
 
65
73
  ## Commands
66
74
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@champpaba/claude-agent-kit",
3
- "version": "2.2.1",
3
+ "version": "2.4.0",
4
4
  "description": "Universal multi-agent template for Claude Code - AI-assisted development with specialized agents",
5
5
  "main": "bin/cli.js",
6
6
  "bin": {