@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
|
@@ -44,23 +44,54 @@ Read in order:
|
|
|
44
44
|
|
|
45
45
|
---
|
|
46
46
|
|
|
47
|
-
### Step 2.5: Validate Design System
|
|
47
|
+
### Step 2.5: Validate Design System & Page Plan (v2.0.0)
|
|
48
48
|
|
|
49
|
-
> **
|
|
49
|
+
> **Updated v2.0.0:** Validate design files + read page-plan.md if exists
|
|
50
50
|
|
|
51
51
|
```typescript
|
|
52
52
|
// Detect if change involves UI/frontend work
|
|
53
53
|
const tasksContent = Read('openspec/changes/{change-id}/tasks.md')
|
|
54
54
|
const hasFrontend = tasksContent.toLowerCase().match(/(ui|component|page|frontend|design|responsive)/i)
|
|
55
55
|
|
|
56
|
+
let tokens = null
|
|
57
|
+
let pagePlan = null
|
|
58
|
+
let pageType = 'generic'
|
|
59
|
+
|
|
56
60
|
if (hasFrontend) {
|
|
57
61
|
output(`\n🎨 UI work detected - validating design system...`)
|
|
58
62
|
|
|
59
|
-
const tokensPath = 'design-system/
|
|
63
|
+
const tokensPath = 'design-system/tokens.json' // v2.0 tokens
|
|
60
64
|
const styleGuidePath = 'design-system/STYLE_GUIDE.md'
|
|
65
|
+
const pagePlanPath = `openspec/changes/${changeId}/page-plan.md`
|
|
61
66
|
|
|
62
67
|
const hasTokens = fileExists(tokensPath)
|
|
63
68
|
const hasStyleGuide = fileExists(styleGuidePath)
|
|
69
|
+
const hasPagePlan = fileExists(pagePlanPath)
|
|
70
|
+
|
|
71
|
+
// ========== LOAD tokens.json (v2.0 structure) ==========
|
|
72
|
+
if (hasTokens) {
|
|
73
|
+
tokens = JSON.parse(Read(tokensPath))
|
|
74
|
+
output(`✅ tokens.json Loaded:`)
|
|
75
|
+
output(` - Style: ${tokens.style.name}`)
|
|
76
|
+
output(` - Theme: ${tokens.theme.name}`)
|
|
77
|
+
output(` - Animations: ${tokens.animations.enabled ? 'Enabled' : 'Disabled'}`)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// ========== LOAD page-plan.md (if exists) ==========
|
|
81
|
+
if (hasPagePlan) {
|
|
82
|
+
pagePlan = Read(pagePlanPath)
|
|
83
|
+
output(`✅ page-plan.md Found`)
|
|
84
|
+
|
|
85
|
+
// Extract page type from page-plan.md
|
|
86
|
+
const pageTypeMatch = pagePlan.match(/Page Type:\*\*\s*(.*)/i)
|
|
87
|
+
if (pageTypeMatch) {
|
|
88
|
+
pageType = pageTypeMatch[1].trim().toLowerCase()
|
|
89
|
+
output(` - Page Type: ${pageType}`)
|
|
90
|
+
}
|
|
91
|
+
} else {
|
|
92
|
+
output(`ℹ️ page-plan.md not found (optional)`)
|
|
93
|
+
output(` → Run /pageplan first for better component planning`)
|
|
94
|
+
}
|
|
64
95
|
|
|
65
96
|
if (!hasTokens || !hasStyleGuide) {
|
|
66
97
|
warn(`
|
|
@@ -68,7 +99,8 @@ if (hasFrontend) {
|
|
|
68
99
|
|
|
69
100
|
Found:
|
|
70
101
|
${hasStyleGuide ? '✅' : '❌'} STYLE_GUIDE.md
|
|
71
|
-
${hasTokens ? '✅' : '❌'}
|
|
102
|
+
${hasTokens ? '✅' : '❌'} tokens.json
|
|
103
|
+
${hasPagePlan ? '✅' : '❌'} page-plan.md
|
|
72
104
|
|
|
73
105
|
This may result in:
|
|
74
106
|
- Inconsistent colors (random hex codes)
|
|
@@ -77,7 +109,8 @@ This may result in:
|
|
|
77
109
|
|
|
78
110
|
Recommendation:
|
|
79
111
|
1. Run: /designsetup
|
|
80
|
-
2.
|
|
112
|
+
2. Run: /pageplan @prd.md (optional but recommended)
|
|
113
|
+
3. Then: /csetup ${changeId}
|
|
81
114
|
|
|
82
115
|
Continue anyway? (yes/no)
|
|
83
116
|
`)
|
|
@@ -89,8 +122,215 @@ Continue anyway? (yes/no)
|
|
|
89
122
|
} else {
|
|
90
123
|
output(`✅ Design System Ready`)
|
|
91
124
|
output(` - STYLE_GUIDE.md ✓`)
|
|
92
|
-
output(` -
|
|
125
|
+
output(` - tokens.json ✓`)
|
|
126
|
+
if (hasPagePlan) output(` - page-plan.md ✓`)
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
### Step 2.7: Auto-Setup Best Practices (v1.8.0)
|
|
134
|
+
|
|
135
|
+
> **NEW:** Auto-detect tech stack and generate best-practices (replaces /psetup and /agentsetup)
|
|
136
|
+
|
|
137
|
+
```typescript
|
|
138
|
+
// 1. Detect tech stack from multiple sources
|
|
139
|
+
output(`\n🔍 Detecting Tech Stack...`)
|
|
140
|
+
|
|
141
|
+
// Source 1: package.json / requirements.txt (if exists)
|
|
142
|
+
let packageStack = []
|
|
143
|
+
if (fileExists('package.json')) {
|
|
144
|
+
const pkg = JSON.parse(Read('package.json'))
|
|
145
|
+
const deps = { ...pkg.dependencies, ...pkg.devDependencies }
|
|
146
|
+
packageStack = Object.keys(deps).filter(d =>
|
|
147
|
+
['next', 'react', 'vue', 'express', 'fastapi', 'prisma', 'drizzle', 'vitest', 'jest'].some(k => d.includes(k))
|
|
148
|
+
)
|
|
149
|
+
output(` 📦 From package.json: ${packageStack.join(', ') || 'none'}`)
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// Source 2: design.md (architecture section)
|
|
153
|
+
let designStack = []
|
|
154
|
+
const designPath = `openspec/changes/${changeId}/design.md`
|
|
155
|
+
if (fileExists(designPath)) {
|
|
156
|
+
const designContent = Read(designPath)
|
|
157
|
+
// Look for tech stack section
|
|
158
|
+
const techMatch = designContent.match(/tech.*stack|architecture|framework/gi)
|
|
159
|
+
if (techMatch) {
|
|
160
|
+
designStack = extractTechFromText(designContent)
|
|
161
|
+
output(` 📐 From design.md: ${designStack.join(', ') || 'none'}`)
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// Source 3: proposal.md + tasks.md (keywords)
|
|
166
|
+
const proposalContent = Read(`openspec/changes/${changeId}/proposal.md`)
|
|
167
|
+
const tasksContent = Read(`openspec/changes/${changeId}/tasks.md`)
|
|
168
|
+
const combined = (proposalContent + ' ' + tasksContent).toLowerCase()
|
|
169
|
+
|
|
170
|
+
const techDetection = {
|
|
171
|
+
react: /\b(react|jsx|tsx|use[A-Z]\w+|usestate|useeffect)\b/i,
|
|
172
|
+
nextjs: /\b(next\.?js|next js|app router|pages router)\b/i,
|
|
173
|
+
vue: /\b(vue|vuex|pinia|nuxt)\b/i,
|
|
174
|
+
express: /\b(express\.js|express js|expressjs)\b/i,
|
|
175
|
+
fastapi: /\b(fastapi|fast api)\b/i,
|
|
176
|
+
django: /\b(django)\b/i,
|
|
177
|
+
prisma: /\b(prisma)\b/i,
|
|
178
|
+
drizzle: /\b(drizzle)\b/i,
|
|
179
|
+
postgres: /\b(postgres|postgresql)\b/i,
|
|
180
|
+
mongodb: /\b(mongodb|mongoose)\b/i,
|
|
181
|
+
tailwind: /\b(tailwind)\b/i,
|
|
182
|
+
typescript: /\b(typescript)\b/i,
|
|
183
|
+
vitest: /\b(vitest)\b/i,
|
|
184
|
+
jest: /\b(jest)\b/i,
|
|
185
|
+
playwright: /\b(playwright)\b/i
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
const proposalStack = []
|
|
189
|
+
for (const [tech, pattern] of Object.entries(techDetection)) {
|
|
190
|
+
if (pattern.test(combined)) {
|
|
191
|
+
proposalStack.push(tech)
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
output(` 📝 From proposal/tasks: ${proposalStack.join(', ') || 'none'}`)
|
|
195
|
+
|
|
196
|
+
// Merge all sources (remove duplicates)
|
|
197
|
+
const detectedStack = [...new Set([...packageStack, ...designStack, ...proposalStack])]
|
|
198
|
+
|
|
199
|
+
// 2. If no stack detected, ask user
|
|
200
|
+
if (detectedStack.length === 0) {
|
|
201
|
+
output(`\n⚠️ Could not auto-detect tech stack`)
|
|
202
|
+
|
|
203
|
+
const answer = await askUserQuestion({
|
|
204
|
+
questions: [{
|
|
205
|
+
question: 'What tech stack will you use?',
|
|
206
|
+
header: 'Stack',
|
|
207
|
+
options: [
|
|
208
|
+
{ label: 'Next.js + React', description: 'Full-stack React framework' },
|
|
209
|
+
{ label: 'FastAPI + Python', description: 'Python async API' },
|
|
210
|
+
{ label: 'Express + Node', description: 'Node.js backend' },
|
|
211
|
+
{ label: 'Vue + Nuxt', description: 'Vue.js framework' }
|
|
212
|
+
],
|
|
213
|
+
multiSelect: true
|
|
214
|
+
}]
|
|
215
|
+
})
|
|
216
|
+
|
|
217
|
+
// Parse user selection into detectedStack
|
|
218
|
+
detectedStack.push(...parseUserStackSelection(answer))
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
output(`\n✅ Final Tech Stack: ${detectedStack.join(', ')}`)
|
|
222
|
+
|
|
223
|
+
// 3. Check if best-practices already exist
|
|
224
|
+
const bpDir = '.claude/contexts/domain/project/best-practices/'
|
|
225
|
+
const existingBp = fileExists(bpDir) ? listFiles(bpDir) : []
|
|
226
|
+
|
|
227
|
+
const missingBp = detectedStack.filter(tech => {
|
|
228
|
+
return !existingBp.some(f => f.toLowerCase().includes(tech.toLowerCase()))
|
|
229
|
+
})
|
|
230
|
+
|
|
231
|
+
// 4. Generate missing best-practices from Context7
|
|
232
|
+
if (missingBp.length > 0) {
|
|
233
|
+
output(`\n📚 Generating Best Practices from Context7...`)
|
|
234
|
+
|
|
235
|
+
// Create directory structure if needed
|
|
236
|
+
if (!fileExists('.claude/contexts/domain/')) {
|
|
237
|
+
mkdir('.claude/contexts/domain/project/best-practices/')
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// Context7 library ID mapping
|
|
241
|
+
const context7Ids = {
|
|
242
|
+
react: '/facebook/react',
|
|
243
|
+
nextjs: '/vercel/next.js',
|
|
244
|
+
vue: '/vuejs/vue',
|
|
245
|
+
express: '/expressjs/express',
|
|
246
|
+
fastapi: '/fastapi/fastapi',
|
|
247
|
+
prisma: '/prisma/prisma',
|
|
248
|
+
drizzle: '/drizzle-team/drizzle-orm',
|
|
249
|
+
vitest: '/vitest-dev/vitest',
|
|
250
|
+
jest: '/jestjs/jest',
|
|
251
|
+
playwright: '/microsoft/playwright',
|
|
252
|
+
tailwind: '/tailwindlabs/tailwindcss'
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
for (const tech of missingBp) {
|
|
256
|
+
const libraryId = context7Ids[tech.toLowerCase()]
|
|
257
|
+
|
|
258
|
+
if (libraryId) {
|
|
259
|
+
output(` 📖 Fetching ${tech} best practices...`)
|
|
260
|
+
|
|
261
|
+
// Query Context7 for best practices
|
|
262
|
+
const docs = await mcp__context7__get-library-docs({
|
|
263
|
+
context7CompatibleLibraryID: libraryId,
|
|
264
|
+
topic: 'best practices, common mistakes, anti-patterns, patterns',
|
|
265
|
+
mode: 'code'
|
|
266
|
+
})
|
|
267
|
+
|
|
268
|
+
// Generate best-practices file
|
|
269
|
+
const bpContent = generateBestPracticesFile(tech, docs)
|
|
270
|
+
Write(`.claude/contexts/domain/project/best-practices/${tech}.md`, bpContent)
|
|
271
|
+
|
|
272
|
+
output(` ✅ ${tech}.md generated`)
|
|
273
|
+
} else {
|
|
274
|
+
output(` ⚠️ ${tech} - no Context7 mapping, using universal patterns`)
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// Generate index.md
|
|
279
|
+
generateBestPracticesIndex(detectedStack, changeId)
|
|
280
|
+
output(` ✅ index.md generated`)
|
|
281
|
+
|
|
282
|
+
// Generate domain/index.md if not exists
|
|
283
|
+
if (!fileExists('.claude/contexts/domain/index.md')) {
|
|
284
|
+
generateDomainIndex('project', detectedStack)
|
|
285
|
+
output(` ✅ domain/index.md generated`)
|
|
93
286
|
}
|
|
287
|
+
|
|
288
|
+
output(`\n✅ Best Practices Setup Complete!`)
|
|
289
|
+
output(` Files: ${missingBp.length + 1} generated`)
|
|
290
|
+
output(` Location: .claude/contexts/domain/project/best-practices/`)
|
|
291
|
+
} else {
|
|
292
|
+
output(`\n✅ Best Practices: Already configured (${existingBp.length} files)`)
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// 5. Store detected stack in context.md (for agents to reference)
|
|
296
|
+
const stackForContext = {
|
|
297
|
+
detected: detectedStack,
|
|
298
|
+
bestPracticesPath: '.claude/contexts/domain/project/best-practices/',
|
|
299
|
+
files: [...existingBp, ...missingBp.map(t => `${t}.md`)]
|
|
300
|
+
}
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
**Helper: generateBestPracticesFile()**
|
|
304
|
+
```typescript
|
|
305
|
+
function generateBestPracticesFile(tech: string, context7Docs: string): string {
|
|
306
|
+
return `# ${tech} Best Practices
|
|
307
|
+
|
|
308
|
+
> **Source:** Context7 MCP
|
|
309
|
+
> **Generated:** ${new Date().toISOString().split('T')[0]}
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
## ✅ DO (Best Practices)
|
|
314
|
+
|
|
315
|
+
${extractDos(context7Docs)}
|
|
316
|
+
|
|
317
|
+
---
|
|
318
|
+
|
|
319
|
+
## ❌ DON'T (Anti-Patterns)
|
|
320
|
+
|
|
321
|
+
${extractDonts(context7Docs)}
|
|
322
|
+
|
|
323
|
+
---
|
|
324
|
+
|
|
325
|
+
## 🎯 Quick Checklist
|
|
326
|
+
|
|
327
|
+
Before committing ${tech} code:
|
|
328
|
+
${extractChecklist(context7Docs)}
|
|
329
|
+
|
|
330
|
+
---
|
|
331
|
+
|
|
332
|
+
**⚠️ Agents MUST read this file before writing ${tech} code!**
|
|
333
|
+
`
|
|
94
334
|
}
|
|
95
335
|
```
|
|
96
336
|
|
|
@@ -593,39 +833,66 @@ const projectTech = Read('.claude/contexts/domain/project/tech-stack.md')
|
|
|
593
833
|
// Detect additional tech from proposal/tasks
|
|
594
834
|
const additionalTech = detectAdditionalTech(proposalContent, tasksContent)
|
|
595
835
|
|
|
596
|
-
// 🆕 Load design info (if UI work)
|
|
836
|
+
// 🆕 Load design info (if UI work) - v2.0.0
|
|
597
837
|
let designInfo = ''
|
|
598
|
-
if (hasFrontend) {
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
838
|
+
if (hasFrontend && tokens) {
|
|
839
|
+
designInfo = `
|
|
840
|
+
## 🎨 Design System (v2.0.0)
|
|
841
|
+
|
|
842
|
+
**Design Files:**
|
|
843
|
+
- tokens.json: \`design-system/tokens.json\` (~800 tokens)
|
|
844
|
+
- patterns/: \`design-system/patterns/*.md\` (selective loading)
|
|
845
|
+
- STYLE_GUIDE.md: \`design-system/STYLE_GUIDE.md\` (human-readable, ~150 lines)
|
|
846
|
+
${pagePlan ? `- page-plan.md: \`openspec/changes/${changeId}/page-plan.md\` ✅` : ''}
|
|
847
|
+
|
|
848
|
+
**Style Direction:**
|
|
849
|
+
- Style: ${tokens.style.name}
|
|
850
|
+
- Theme: ${tokens.theme.name}
|
|
851
|
+
- Feel: ${tokens.style.feel}
|
|
852
|
+
|
|
853
|
+
**Design Tokens:**
|
|
854
|
+
- Primary Color: ${tokens.colors.primary.DEFAULT}
|
|
613
855
|
- Component Library: ${tokens.component_library.name}
|
|
614
|
-
- Spacing Scale: ${tokens.
|
|
615
|
-
-
|
|
616
|
-
|
|
617
|
-
**
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
856
|
+
- Spacing Scale: ${tokens.spacing.scale.join(', ')}px
|
|
857
|
+
- Animations: ${tokens.animations.enabled ? 'Enabled' : 'Disabled'}
|
|
858
|
+
|
|
859
|
+
**Theme & Decorations:**
|
|
860
|
+
${pageType.includes('landing') || pageType.includes('marketing') ? `
|
|
861
|
+
- Decorations: ✅ Enabled
|
|
862
|
+
- USE: ${tokens.theme.decorative_elements.use.slice(0, 3).join(', ')}
|
|
863
|
+
- AVOID: ${tokens.theme.decorative_elements.avoid.slice(0, 2).join(', ') || '(none)'}
|
|
864
|
+
- Scroll Animations: ✅ Enabled
|
|
865
|
+
` : `
|
|
866
|
+
- Decorations: ❌ Disabled (${pageType} page)
|
|
867
|
+
- Scroll Animations: ❌ Disabled
|
|
868
|
+
`}
|
|
869
|
+
|
|
870
|
+
**Pattern Files to Load:**
|
|
871
|
+
${pageType.includes('landing') || pageType.includes('marketing') ?
|
|
872
|
+
`- patterns/buttons.md ✅
|
|
873
|
+
- patterns/cards.md ✅
|
|
874
|
+
- patterns/scroll-animations.md ✅
|
|
875
|
+
- patterns/decorations.md ✅` :
|
|
876
|
+
pageType.includes('auth') ?
|
|
877
|
+
`- patterns/buttons.md ✅
|
|
878
|
+
- patterns/forms.md ✅` :
|
|
879
|
+
`- patterns/buttons.md ✅
|
|
880
|
+
- patterns/cards.md ✅
|
|
881
|
+
- patterns/forms.md ✅`}
|
|
882
|
+
|
|
883
|
+
**Agent Instructions (uxui-frontend STEP 0.5):**
|
|
884
|
+
1. Read: tokens.json (~800 tokens) ✅
|
|
885
|
+
2. Read: page-plan.md (if exists) ✅
|
|
886
|
+
3. Load patterns selectively based on page type
|
|
887
|
+
4. Report: Design tokens + page type extracted
|
|
621
888
|
|
|
622
889
|
**Critical Rules:**
|
|
623
890
|
- ❌ NO hardcoded colors (text-gray-500)
|
|
624
891
|
- ✅ USE theme tokens (text-foreground/70)
|
|
625
892
|
- ❌ NO arbitrary spacing (p-5)
|
|
626
893
|
- ✅ USE spacing scale (p-4, p-6)
|
|
894
|
+
- ${pageType.includes('landing') ? '✅ Apply decorations from theme' : '❌ Skip decorations for this page type'}
|
|
627
895
|
`
|
|
628
|
-
}
|
|
629
896
|
}
|
|
630
897
|
|
|
631
898
|
// Replace placeholders
|
|
@@ -711,8 +978,6 @@ function getAgentForPhase(phaseId: string): string {
|
|
|
711
978
|
'refactor': 'test-debug',
|
|
712
979
|
'regression-tests': 'test-debug',
|
|
713
980
|
'test-coverage': 'test-debug',
|
|
714
|
-
'documentation': 'integration',
|
|
715
|
-
'report': 'integration',
|
|
716
981
|
'script-implementation': 'backend',
|
|
717
982
|
'automated-tests': 'test-debug',
|
|
718
983
|
'manual-testing': 'user',
|
|
@@ -786,19 +1051,19 @@ Detected:
|
|
|
786
1051
|
Change type: feature
|
|
787
1052
|
|
|
788
1053
|
📋 Template selected: frontend-only
|
|
789
|
-
- Total phases:
|
|
790
|
-
- Estimated time:
|
|
1054
|
+
- Total phases: 9
|
|
1055
|
+
- Estimated time: 2h 50m
|
|
791
1056
|
- Reason: Frontend work detected, no backend/API needed
|
|
792
1057
|
|
|
793
1058
|
Generating workflow...
|
|
794
|
-
✓ Generated phases.md (
|
|
1059
|
+
✓ Generated phases.md (115 lines, 9 phases)
|
|
795
1060
|
✓ Generated flags.json (initialized all phases as pending)
|
|
796
1061
|
✓ Generated context.md (change context with core tech references)
|
|
797
1062
|
|
|
798
1063
|
✅ Change setup complete!
|
|
799
1064
|
|
|
800
1065
|
📦 Change: CHANGE-003
|
|
801
|
-
📋 Template: frontend-only (
|
|
1066
|
+
📋 Template: frontend-only (9 phases)
|
|
802
1067
|
🛠️ Detected: Frontend
|
|
803
1068
|
|
|
804
1069
|
📁 Files created:
|
|
@@ -816,10 +1081,12 @@ Generating workflow...
|
|
|
816
1081
|
Phase 7: Responsive Test (user, 15 min)
|
|
817
1082
|
Phase 8: Refactor (test-debug, 20 min)
|
|
818
1083
|
Phase 9: Test Coverage (test-debug, 5 min)
|
|
819
|
-
Phase 10: Documentation (integration, 15 min)
|
|
820
|
-
Phase 11: Final Report (integration, 10 min)
|
|
821
1084
|
|
|
822
|
-
⏱️ Total estimated time: ~
|
|
1085
|
+
⏱️ Total estimated time: ~2h 50m
|
|
1086
|
+
|
|
1087
|
+
💡 Note: Documentation/Report phases removed in v1.2.0
|
|
1088
|
+
→ Verbose summary output in terminal when change completes
|
|
1089
|
+
→ flags.json contains full execution history
|
|
823
1090
|
|
|
824
1091
|
🚀 Ready to start development!
|
|
825
1092
|
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Change Status
|
|
3
|
-
description: Quick progress status for a change
|
|
4
|
-
category: Multi-Agent
|
|
5
|
-
tags: [status, progress, quick]
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Usage
|
|
9
|
-
|
|
10
|
-
```bash
|
|
11
|
-
/cstatus {change-id}
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
## What It Does
|
|
15
|
-
|
|
16
|
-
Shows quick progress summary:
|
|
17
|
-
- Progress percentage with bar
|
|
18
|
-
- Current phase
|
|
19
|
-
- Time spent/remaining
|
|
20
|
-
- Quick stats
|
|
21
|
-
|
|
22
|
-
## Output Format
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
📊 CHANGE-{id}: {type} | {template}
|
|
26
|
-
|
|
27
|
-
Progress: [████████░░] 64% (7/11 phases)
|
|
28
|
-
|
|
29
|
-
Current Phase: #8 Refactor (test-debug)
|
|
30
|
-
├─ Started: 14:15 (15 minutes ago)
|
|
31
|
-
├─ Estimated: 20 minutes
|
|
32
|
-
└─ Status: in_progress
|
|
33
|
-
|
|
34
|
-
✅ Completed: 7 phases
|
|
35
|
-
🔄 In Progress: 1 phase
|
|
36
|
-
⏳ Remaining: 3 phases
|
|
37
|
-
|
|
38
|
-
⏱️ Time:
|
|
39
|
-
├─ Spent: 2h 55min (estimated: 3h 15min)
|
|
40
|
-
├─ Remaining: ~35 minutes
|
|
41
|
-
└─ Efficiency: 111% (ahead of estimate)
|
|
42
|
-
|
|
43
|
-
📈 Stats:
|
|
44
|
-
├─ Tests: 12 passed, 0 failed (75% coverage)
|
|
45
|
-
├─ Issues: 2 found, 2 fixed, 0 remaining
|
|
46
|
-
└─ Files: 4 created, 2 modified
|
|
47
|
-
|
|
48
|
-
🎯 Next Steps:
|
|
49
|
-
1. Complete refactoring (20 min)
|
|
50
|
-
2. Test coverage report (5 min)
|
|
51
|
-
3. Documentation (15 min)
|
|
52
|
-
|
|
53
|
-
Commands:
|
|
54
|
-
→ Detailed view: /cview {change-id}
|
|
55
|
-
→ Continue dev: /cdev {change-id}
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
## Implementation
|
|
59
|
-
|
|
60
|
-
Read `openspec/changes/{change-id}/.claude/flags.json` and format output using helper functions.
|
|
1
|
+
---
|
|
2
|
+
name: Change Status
|
|
3
|
+
description: Quick progress status for a change
|
|
4
|
+
category: Multi-Agent
|
|
5
|
+
tags: [status, progress, quick]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Usage
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
/cstatus {change-id}
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## What It Does
|
|
15
|
+
|
|
16
|
+
Shows quick progress summary:
|
|
17
|
+
- Progress percentage with bar
|
|
18
|
+
- Current phase
|
|
19
|
+
- Time spent/remaining
|
|
20
|
+
- Quick stats
|
|
21
|
+
|
|
22
|
+
## Output Format
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
📊 CHANGE-{id}: {type} | {template}
|
|
26
|
+
|
|
27
|
+
Progress: [████████░░] 64% (7/11 phases)
|
|
28
|
+
|
|
29
|
+
Current Phase: #8 Refactor (test-debug)
|
|
30
|
+
├─ Started: 14:15 (15 minutes ago)
|
|
31
|
+
├─ Estimated: 20 minutes
|
|
32
|
+
└─ Status: in_progress
|
|
33
|
+
|
|
34
|
+
✅ Completed: 7 phases
|
|
35
|
+
🔄 In Progress: 1 phase
|
|
36
|
+
⏳ Remaining: 3 phases
|
|
37
|
+
|
|
38
|
+
⏱️ Time:
|
|
39
|
+
├─ Spent: 2h 55min (estimated: 3h 15min)
|
|
40
|
+
├─ Remaining: ~35 minutes
|
|
41
|
+
└─ Efficiency: 111% (ahead of estimate)
|
|
42
|
+
|
|
43
|
+
📈 Stats:
|
|
44
|
+
├─ Tests: 12 passed, 0 failed (75% coverage)
|
|
45
|
+
├─ Issues: 2 found, 2 fixed, 0 remaining
|
|
46
|
+
└─ Files: 4 created, 2 modified
|
|
47
|
+
|
|
48
|
+
🎯 Next Steps:
|
|
49
|
+
1. Complete refactoring (20 min)
|
|
50
|
+
2. Test coverage report (5 min)
|
|
51
|
+
3. Documentation (15 min)
|
|
52
|
+
|
|
53
|
+
Commands:
|
|
54
|
+
→ Detailed view: /cview {change-id}
|
|
55
|
+
→ Continue dev: /cdev {change-id}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Implementation
|
|
59
|
+
|
|
60
|
+
Read `openspec/changes/{change-id}/.claude/flags.json` and format output using helper functions.
|