@champpaba/claude-agent-kit 1.7.1 â 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/CHANGELOG-v1.1.1.md +259 -259
- package/.claude/CLAUDE.md +79 -90
- package/.claude/agents/01-integration.md +11 -7
- package/.claude/agents/02-uxui-frontend.md +11 -6
- package/.claude/agents/03-test-debug.md +11 -7
- package/.claude/agents/04-frontend.md +11 -7
- package/.claude/agents/05-backend.md +11 -6
- package/.claude/agents/06-database.md +11 -7
- package/.claude/commands/cdev.md +110 -7
- package/.claude/commands/csetup.md +306 -39
- package/.claude/commands/cstatus.md +60 -60
- package/.claude/commands/cview.md +364 -364
- package/.claude/commands/designsetup.md +1401 -336
- package/.claude/commands/extract.md +520 -245
- package/.claude/commands/pageplan.md +171 -47
- package/.claude/contexts/design/accessibility.md +611 -611
- package/.claude/contexts/design/layout.md +400 -400
- package/.claude/contexts/design/responsive.md +551 -551
- package/.claude/contexts/design/shadows.md +522 -522
- package/.claude/contexts/design/typography.md +465 -465
- package/.claude/contexts/domain/README.md +164 -164
- package/.claude/contexts/patterns/agent-coordination.md +388 -388
- package/.claude/contexts/patterns/agent-discovery.md +3 -2
- package/.claude/contexts/patterns/change-workflow.md +538 -538
- package/.claude/contexts/patterns/code-standards.md +39 -0
- package/.claude/contexts/patterns/development-principles.md +513 -513
- package/.claude/contexts/patterns/error-handling.md +478 -478
- package/.claude/contexts/patterns/error-recovery.md +365 -365
- package/.claude/contexts/patterns/logging.md +424 -424
- package/.claude/contexts/patterns/task-breakdown.md +452 -452
- package/.claude/contexts/patterns/task-classification.md +523 -523
- package/.claude/contexts/patterns/tdd-classification.md +516 -516
- package/.claude/contexts/patterns/testing.md +413 -413
- package/.claude/contexts/patterns/validation-framework.md +776 -776
- package/.claude/lib/agent-executor.md +76 -1
- package/.claude/lib/agent-router.md +572 -572
- package/.claude/lib/flags-updater.md +469 -469
- package/.claude/lib/tdd-classifier.md +345 -345
- package/.claude/lib/validation-gates.md +484 -484
- package/.claude/settings.local.json +42 -42
- package/.claude/templates/context-template.md +45 -45
- package/.claude/templates/flags-template.json +42 -42
- package/.claude/templates/phase-templates.json +19 -29
- package/.claude/templates/phases-sections/accessibility-test.md +17 -17
- package/.claude/templates/phases-sections/api-design.md +37 -37
- package/.claude/templates/phases-sections/backend-tests.md +16 -16
- package/.claude/templates/phases-sections/backend.md +37 -37
- package/.claude/templates/phases-sections/business-logic-validation.md +16 -16
- package/.claude/templates/phases-sections/component-tests.md +17 -17
- package/.claude/templates/phases-sections/contract-backend.md +16 -16
- package/.claude/templates/phases-sections/contract-frontend.md +16 -16
- package/.claude/templates/phases-sections/database.md +35 -35
- package/.claude/templates/phases-sections/e2e-tests.md +16 -16
- package/.claude/templates/phases-sections/fix-implementation.md +17 -17
- package/.claude/templates/phases-sections/frontend-integration.md +18 -18
- package/.claude/templates/phases-sections/frontend-mockup.md +123 -123
- package/.claude/templates/phases-sections/manual-flow-test.md +15 -15
- package/.claude/templates/phases-sections/manual-ux-test.md +16 -16
- package/.claude/templates/phases-sections/refactor-implementation.md +17 -17
- package/.claude/templates/phases-sections/refactor.md +16 -16
- package/.claude/templates/phases-sections/regression-tests.md +15 -15
- package/.claude/templates/phases-sections/responsive-test.md +16 -16
- package/.claude/templates/phases-sections/script-implementation.md +43 -43
- package/.claude/templates/phases-sections/test-coverage.md +16 -16
- package/.claude/templates/phases-sections/user-approval.md +14 -14
- package/LICENSE +21 -21
- package/README.md +103 -351
- package/package.json +1 -1
- package/.claude/commands/agentsetup.md +0 -1464
- package/.claude/commands/psetup.md +0 -101
- package/.claude/templates/phases-sections/documentation.md +0 -17
- package/.claude/templates/phases-sections/report.md +0 -16
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
# /pageplan - Page Structure & Content Planning
|
|
1
|
+
# /pageplan - Page Structure & Content Planning (v2.0.0)
|
|
2
2
|
|
|
3
3
|
**Purpose:** Generate a detailed page plan for UI implementation, including component reuse strategy, content draft, and asset checklist.
|
|
4
4
|
|
|
5
|
+
**NEW in v2.0.0:**
|
|
6
|
+
- đ¯ Auto-detects page type (landing/dashboard/auth) from proposal.md/tasks.md
|
|
7
|
+
- đ¨ Reads `design-system/tokens.json` (style, theme, animations, decorations)
|
|
8
|
+
- đĻ Loads `design-system/patterns/*.md` selectively based on page type
|
|
9
|
+
- đŦ Applies animations/decorations for marketing pages, minimal for dashboards
|
|
10
|
+
|
|
5
11
|
**Usage:**
|
|
6
12
|
```bash
|
|
7
13
|
# With context files
|
|
@@ -21,22 +27,36 @@
|
|
|
21
27
|
1. **Reads User-Specified Context:**
|
|
22
28
|
- Only reads files that user mentions with `@` prefix
|
|
23
29
|
- Always reads `openspec/changes/{change-id}/proposal.md` (if exists)
|
|
24
|
-
-
|
|
30
|
+
- Always reads `openspec/changes/{change-id}/tasks.md` (for page type detection)
|
|
31
|
+
- **Always reads `design-system/tokens.json`** (lightweight, ~800 tokens) â
|
|
25
32
|
- Validates `design-system/STYLE_GUIDE.md` exists (doesn't load full content)
|
|
26
33
|
|
|
27
|
-
2. **
|
|
34
|
+
2. **Auto-Detects Page Type:**
|
|
35
|
+
- **Landing/Marketing:** Full decorations, scroll animations, buyer avatar analysis
|
|
36
|
+
- **Dashboard/Admin:** Minimal decorations, data-focused, no buyer avatar
|
|
37
|
+
- **Auth (Login/Register):** Clean, form-focused, no decorations
|
|
38
|
+
|
|
39
|
+
3. **Loads Patterns Selectively:**
|
|
40
|
+
- `patterns/buttons.md` - Always
|
|
41
|
+
- `patterns/cards.md` - Always
|
|
42
|
+
- `patterns/forms.md` - Auth pages, settings
|
|
43
|
+
- `patterns/scroll-animations.md` - Landing pages only
|
|
44
|
+
- `patterns/decorations.md` - Landing pages only
|
|
45
|
+
|
|
46
|
+
4. **Searches Existing Components:**
|
|
28
47
|
- Glob: `**/{Navbar,Footer,Sidebar,Header}*.{tsx,jsx,vue}`
|
|
29
48
|
- Grep: Common UI patterns
|
|
30
49
|
- Builds reuse vs new component list
|
|
31
50
|
|
|
32
|
-
|
|
51
|
+
5. **Generates page-plan.md:**
|
|
52
|
+
- Page type + design approach
|
|
33
53
|
- Component plan (reuse vs new)
|
|
34
54
|
- Page structure (layout composition)
|
|
35
|
-
- Content draft (AI-generated
|
|
55
|
+
- Content draft (AI-generated, conversion-optimized for marketing)
|
|
36
56
|
- Asset checklist (user must prepare)
|
|
37
|
-
-
|
|
57
|
+
- Animation/decoration blueprint (from tokens.json)
|
|
38
58
|
|
|
39
|
-
|
|
59
|
+
6. **Outputs to:** `openspec/changes/{change-id}/page-plan.md`
|
|
40
60
|
|
|
41
61
|
---
|
|
42
62
|
|
|
@@ -57,7 +77,7 @@ if (!changeId) {
|
|
|
57
77
|
const outputPath = `openspec/changes/${changeId}/page-plan.md`
|
|
58
78
|
```
|
|
59
79
|
|
|
60
|
-
### STEP 2: Read Context Files
|
|
80
|
+
### STEP 2: Read Context Files & Detect Page Type
|
|
61
81
|
|
|
62
82
|
```typescript
|
|
63
83
|
// Only read files user specified with @
|
|
@@ -65,29 +85,22 @@ const userFiles = extractMentionedFiles(userMessage) // @prd.md, @brief.md
|
|
|
65
85
|
|
|
66
86
|
// Always read (if exists)
|
|
67
87
|
const proposalPath = `openspec/changes/${changeId}/proposal.md`
|
|
68
|
-
const
|
|
88
|
+
const tasksPath = `openspec/changes/${changeId}/tasks.md`
|
|
89
|
+
const tokensPath = `design-system/tokens.json` // đ v2.0 tokens with style/theme/animations
|
|
69
90
|
const styleGuidePath = `design-system/STYLE_GUIDE.md` // Validate only, don't load
|
|
70
91
|
|
|
71
|
-
const contextFiles = [
|
|
72
|
-
...userFiles,
|
|
73
|
-
proposalPath
|
|
74
|
-
].filter(fileExists)
|
|
75
|
-
|
|
76
92
|
// Read all context
|
|
77
|
-
let context = contextFiles.map(readFile).join('\n\n---\n\n')
|
|
78
|
-
|
|
79
|
-
// đ Extract individual content for buyer avatar analysis (STEP 3.5)
|
|
80
93
|
let proposalContent = ''
|
|
81
|
-
let briefContent = ''
|
|
82
94
|
let tasksContent = ''
|
|
95
|
+
let briefContent = ''
|
|
96
|
+
let tokens = null
|
|
83
97
|
|
|
84
98
|
// Read proposal separately if exists
|
|
85
99
|
if (fileExists(proposalPath)) {
|
|
86
100
|
proposalContent = Read(proposalPath)
|
|
87
101
|
}
|
|
88
102
|
|
|
89
|
-
// Read tasks.md if exists (for
|
|
90
|
-
const tasksPath = `openspec/changes/${changeId}/tasks.md`
|
|
103
|
+
// Read tasks.md if exists (for page type detection)
|
|
91
104
|
if (fileExists(tasksPath)) {
|
|
92
105
|
tasksContent = Read(tasksPath)
|
|
93
106
|
}
|
|
@@ -98,14 +111,88 @@ if (briefFile && fileExists(briefFile)) {
|
|
|
98
111
|
briefContent = Read(briefFile)
|
|
99
112
|
}
|
|
100
113
|
|
|
101
|
-
//
|
|
114
|
+
// ========== PAGE TYPE DETECTION ==========
|
|
115
|
+
output(`
|
|
116
|
+
đ Detecting page type from proposal.md/tasks.md...
|
|
117
|
+
`)
|
|
118
|
+
|
|
119
|
+
const combinedContext = `${proposalContent}\n${tasksContent}`.toLowerCase()
|
|
120
|
+
|
|
121
|
+
let pageType = 'generic'
|
|
122
|
+
let pageTypeConfig = {}
|
|
123
|
+
|
|
124
|
+
if (combinedContext.match(/(landing|marketing|homepage|product.page|sales|conversion)/i)) {
|
|
125
|
+
pageType = 'landing'
|
|
126
|
+
pageTypeConfig = {
|
|
127
|
+
name: 'Landing/Marketing Page',
|
|
128
|
+
decorations: true,
|
|
129
|
+
scrollAnimations: true,
|
|
130
|
+
buyerAvatar: true,
|
|
131
|
+
patterns: ['buttons.md', 'cards.md', 'scroll-animations.md', 'decorations.md']
|
|
132
|
+
}
|
|
133
|
+
} else if (combinedContext.match(/(dashboard|admin|analytics|reports|settings)/i)) {
|
|
134
|
+
pageType = 'dashboard'
|
|
135
|
+
pageTypeConfig = {
|
|
136
|
+
name: 'Dashboard/Admin Page',
|
|
137
|
+
decorations: false,
|
|
138
|
+
scrollAnimations: false,
|
|
139
|
+
buyerAvatar: false,
|
|
140
|
+
patterns: ['buttons.md', 'cards.md', 'forms.md']
|
|
141
|
+
}
|
|
142
|
+
} else if (combinedContext.match(/(login|register|signup|sign.up|auth|forgot.password)/i)) {
|
|
143
|
+
pageType = 'auth'
|
|
144
|
+
pageTypeConfig = {
|
|
145
|
+
name: 'Authentication Page',
|
|
146
|
+
decorations: false,
|
|
147
|
+
scrollAnimations: false,
|
|
148
|
+
buyerAvatar: false,
|
|
149
|
+
patterns: ['buttons.md', 'forms.md']
|
|
150
|
+
}
|
|
151
|
+
} else {
|
|
152
|
+
pageType = 'generic'
|
|
153
|
+
pageTypeConfig = {
|
|
154
|
+
name: 'Generic Page',
|
|
155
|
+
decorations: false,
|
|
156
|
+
scrollAnimations: false,
|
|
157
|
+
buyerAvatar: false,
|
|
158
|
+
patterns: ['buttons.md', 'cards.md']
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
output(`
|
|
163
|
+
â
Page Type Detected: ${pageTypeConfig.name}
|
|
164
|
+
- Decorations: ${pageTypeConfig.decorations ? 'â
Enabled' : 'â Disabled'}
|
|
165
|
+
- Scroll Animations: ${pageTypeConfig.scrollAnimations ? 'â
Enabled' : 'â Disabled'}
|
|
166
|
+
- Buyer Avatar Analysis: ${pageTypeConfig.buyerAvatar ? 'â
Enabled' : 'â Skipped'}
|
|
167
|
+
- Patterns to Load: ${pageTypeConfig.patterns.join(', ')}
|
|
168
|
+
`)
|
|
169
|
+
|
|
170
|
+
// ========== LOAD TOKENS.JSON (v2.0 structure) ==========
|
|
102
171
|
if (fileExists(tokensPath)) {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
172
|
+
tokens = JSON.parse(Read(tokensPath))
|
|
173
|
+
|
|
174
|
+
output(`
|
|
175
|
+
â
tokens.json Loaded:
|
|
176
|
+
- Style: ${tokens.style.name} (${tokens.style.confidence}% confidence)
|
|
177
|
+
- Theme: ${tokens.theme.name}
|
|
178
|
+
- Decorations: ${tokens.theme.decorative_elements.use.slice(0, 3).join(', ')}
|
|
179
|
+
- Animations: ${tokens.animations.enabled ? 'Enabled' : 'Disabled'}
|
|
180
|
+
- Primary Color: ${tokens.colors.primary.DEFAULT}
|
|
181
|
+
`)
|
|
182
|
+
} else {
|
|
183
|
+
warn(`â ī¸ No tokens.json found - run /designsetup first`)
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// ========== LOAD PATTERNS SELECTIVELY ==========
|
|
187
|
+
const loadedPatterns = {}
|
|
188
|
+
const patternsDir = 'design-system/patterns'
|
|
189
|
+
|
|
190
|
+
for (const patternFile of pageTypeConfig.patterns) {
|
|
191
|
+
const patternPath = `${patternsDir}/${patternFile}`
|
|
192
|
+
if (fileExists(patternPath)) {
|
|
193
|
+
loadedPatterns[patternFile] = Read(patternPath)
|
|
194
|
+
output(` â
Loaded: ${patternFile}`)
|
|
195
|
+
}
|
|
109
196
|
}
|
|
110
197
|
|
|
111
198
|
// Validate STYLE_GUIDE.md exists (don't load!)
|
|
@@ -114,7 +201,7 @@ if (!hasStyleGuide) {
|
|
|
114
201
|
warn(`â ī¸ No STYLE_GUIDE.md found - run /designsetup first`)
|
|
115
202
|
}
|
|
116
203
|
|
|
117
|
-
// Total context: ~1.5K tokens (
|
|
204
|
+
// Total context: ~1.5K tokens (tokens.json + selective patterns)
|
|
118
205
|
```
|
|
119
206
|
|
|
120
207
|
### STEP 3: Search Existing Components
|
|
@@ -141,19 +228,18 @@ for (const pattern of searchPatterns) {
|
|
|
141
228
|
}
|
|
142
229
|
```
|
|
143
230
|
|
|
144
|
-
### STEP 3.5: Buyer Avatar Analysis (
|
|
231
|
+
### STEP 3.5: Buyer Avatar Analysis (Conditional - Marketing Pages Only)
|
|
145
232
|
|
|
146
233
|
> **Purpose:** Extract buyer psychology to generate conversion-optimized copy (inspired by Eugene Schwartz framework)
|
|
234
|
+
> **Triggered by:** pageTypeConfig.buyerAvatar === true (landing pages only)
|
|
147
235
|
|
|
148
236
|
```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
237
|
let buyerAvatar = null
|
|
153
238
|
|
|
154
|
-
if
|
|
239
|
+
// Only analyze if page type config enables buyer avatar
|
|
240
|
+
if (pageTypeConfig.buyerAvatar && (proposalContent || briefContent)) {
|
|
155
241
|
output(`
|
|
156
|
-
đ¯
|
|
242
|
+
đ¯ Marketing page detected - analyzing buyer psychology...
|
|
157
243
|
`)
|
|
158
244
|
|
|
159
245
|
const avatarPrompt = `
|
|
@@ -209,7 +295,8 @@ If insufficient context, return { "has_context": false }
|
|
|
209
295
|
}
|
|
210
296
|
} else {
|
|
211
297
|
output(`
|
|
212
|
-
âšī¸
|
|
298
|
+
âšī¸ Page type: ${pageTypeConfig.name} - skipping buyer avatar analysis
|
|
299
|
+
(Buyer avatar only for landing/marketing pages)
|
|
213
300
|
`)
|
|
214
301
|
}
|
|
215
302
|
```
|
|
@@ -767,23 +854,60 @@ _([length] chars - based on [source])_
|
|
|
767
854
|
|
|
768
855
|
---
|
|
769
856
|
|
|
770
|
-
## 6. Design
|
|
857
|
+
## 6. Design System (from tokens.json)
|
|
858
|
+
|
|
859
|
+
> **Page Type:** ${pageTypeConfig.name}
|
|
860
|
+
> **Decorations:** ${pageTypeConfig.decorations ? 'Enabled' : 'Disabled'}
|
|
861
|
+
> **Scroll Animations:** ${pageTypeConfig.scrollAnimations ? 'Enabled' : 'Disabled'}
|
|
862
|
+
|
|
863
|
+
### Style Direction
|
|
864
|
+
- **Style:** ${tokens?.style?.name || '[Run /designsetup]'}
|
|
865
|
+
- **Feel:** ${tokens?.style?.feel || '[Run /designsetup]'}
|
|
866
|
+
- **Source:** ${tokens?.style?.source_site || '[Run /designsetup]'}
|
|
867
|
+
|
|
868
|
+
### Theme & Decorations
|
|
869
|
+
${pageTypeConfig.decorations && tokens ? `
|
|
870
|
+
- **Theme:** ${tokens.theme.name}
|
|
871
|
+
- **Feeling:** ${tokens.theme.feeling}
|
|
872
|
+
- **USE These Elements:**
|
|
873
|
+
${tokens.theme.decorative_elements.use.map(e => `- â
${e}`).join('\n ')}
|
|
874
|
+
- **AVOID These Elements:**
|
|
875
|
+
${tokens.theme.decorative_elements.avoid.map(e => `- â ${e}`).join('\n ') || ' (none)'}
|
|
876
|
+
- **Suggested Icons:** ${tokens.theme.icons_suggestion?.join(', ') || 'Lucide icons'}
|
|
877
|
+
` : `
|
|
878
|
+
âšī¸ Decorations disabled for ${pageTypeConfig.name}
|
|
879
|
+
`}
|
|
880
|
+
|
|
881
|
+
### Animations
|
|
882
|
+
${pageTypeConfig.scrollAnimations && tokens?.animations?.enabled ? `
|
|
883
|
+
- **Scroll Animations:** Enabled
|
|
884
|
+
- **Patterns:** ${tokens.animations.scroll_animations.patterns.join(', ') || 'None specified'}
|
|
885
|
+
- **Libraries:** ${tokens.animations.libraries.map(l => l.name).join(', ') || 'CSS/Tailwind'}
|
|
886
|
+
` : `
|
|
887
|
+
âšī¸ Scroll animations disabled for ${pageTypeConfig.name}
|
|
888
|
+
`}
|
|
889
|
+
|
|
890
|
+
### Component Animations (Always Apply)
|
|
891
|
+
- **Button Hover:** ${tokens?.animations?.component_animations?.button_hover || 'scale + shadow'}
|
|
892
|
+
- **Card Hover:** ${tokens?.animations?.component_animations?.card_hover || 'translateY + shadow'}
|
|
893
|
+
- **Input Focus:** ${tokens?.animations?.component_animations?.input_focus || 'ring'}
|
|
771
894
|
|
|
772
|
-
|
|
773
|
-
-
|
|
774
|
-
-
|
|
895
|
+
### Design Tokens
|
|
896
|
+
- **Primary Color:** ${tokens?.colors?.primary?.DEFAULT || '#0d7276'}
|
|
897
|
+
- **Font Family:** ${tokens?.typography?.font_family?.sans || 'Inter'}
|
|
898
|
+
- **Spacing Scale:** ${tokens?.spacing?.scale?.join(', ') || '4, 8, 16, 24, 32, 48'}px
|
|
899
|
+
- **Component Library:** ${tokens?.component_library?.name || 'shadcn/ui'}
|
|
775
900
|
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
- Font family: [from STYLE_TOKENS.json]
|
|
779
|
-
- Spacing scale: [from STYLE_TOKENS.json]
|
|
780
|
-
- Component library: [from STYLE_TOKENS.json]
|
|
781
|
-
- Shadows: [from STYLE_TOKENS.json]
|
|
901
|
+
### Pattern Files Loaded
|
|
902
|
+
${pageTypeConfig.patterns.map(p => `- â
design-system/patterns/${p}`).join('\n')}
|
|
782
903
|
|
|
783
|
-
|
|
784
|
-
- uxui-frontend MUST read
|
|
904
|
+
### Agent Instructions
|
|
905
|
+
- uxui-frontend MUST read \`design-system/tokens.json\` in STEP 0.5
|
|
906
|
+
- Load patterns from \`design-system/patterns/\` selectively (see above)
|
|
785
907
|
- Use theme tokens (text-foreground/70), NOT hardcoded colors
|
|
786
908
|
- Use spacing scale (p-4, p-6), NOT arbitrary values (p-5)
|
|
909
|
+
- ${pageTypeConfig.decorations ? 'â
Apply decorations from theme' : 'â Skip decorations for this page type'}
|
|
910
|
+
- ${pageTypeConfig.scrollAnimations ? 'â
Apply scroll animations' : 'â Skip scroll animations for this page type'}
|
|
787
911
|
|
|
788
912
|
## 7. Implementation Notes
|
|
789
913
|
|