@champpaba/claude-agent-kit 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/.claude/CLAUDE.md +253 -31
  2. package/.claude/agents/01-integration.md +106 -552
  3. package/.claude/agents/02-uxui-frontend.md +188 -850
  4. package/.claude/agents/03-test-debug.md +152 -521
  5. package/.claude/agents/04-frontend.md +169 -549
  6. package/.claude/agents/05-backend.md +132 -661
  7. package/.claude/agents/06-database.md +149 -698
  8. package/.claude/agents/_shared/README.md +57 -0
  9. package/.claude/agents/_shared/agent-boundaries.md +64 -0
  10. package/.claude/agents/_shared/documentation-policy.md +47 -0
  11. package/.claude/agents/_shared/package-manager.md +59 -0
  12. package/.claude/agents/_shared/pre-work-checklist.md +57 -0
  13. package/.claude/commands/cdev.md +36 -61
  14. package/.claude/commands/csetup.md +90 -14
  15. package/.claude/commands/cstatus.md +153 -60
  16. package/.claude/commands/cview.md +364 -364
  17. package/.claude/commands/designsetup.md +1 -1
  18. package/.claude/commands/pageplan.md +53 -177
  19. package/.claude/commands/pstatus.md +431 -0
  20. package/.claude/contexts/design/accessibility.md +611 -611
  21. package/.claude/contexts/design/box-thinking.md +1 -1
  22. package/.claude/contexts/design/index.md +1 -1
  23. package/.claude/contexts/design/layout.md +400 -400
  24. package/.claude/contexts/design/responsive.md +551 -551
  25. package/.claude/contexts/design/shadows.md +522 -522
  26. package/.claude/contexts/design/typography.md +465 -465
  27. package/.claude/contexts/domain/README.md +164 -164
  28. package/.claude/contexts/patterns/agent-coordination.md +388 -388
  29. package/.claude/contexts/patterns/agent-discovery.md +2 -2
  30. package/.claude/contexts/patterns/animation-patterns.md +1 -1
  31. package/.claude/contexts/patterns/change-workflow.md +541 -538
  32. package/.claude/contexts/patterns/code-standards.md +10 -8
  33. package/.claude/contexts/patterns/development-principles.md +513 -513
  34. package/.claude/contexts/patterns/error-handling.md +478 -478
  35. package/.claude/contexts/patterns/error-recovery.md +365 -365
  36. package/.claude/contexts/patterns/frontend-component-strategy.md +1 -1
  37. package/.claude/contexts/patterns/logging.md +424 -424
  38. package/.claude/contexts/patterns/performance-optimization.md +1 -1
  39. package/.claude/contexts/patterns/task-breakdown.md +452 -452
  40. package/.claude/contexts/patterns/task-classification.md +523 -523
  41. package/.claude/contexts/patterns/tdd-classification.md +516 -516
  42. package/.claude/contexts/patterns/testing.md +413 -413
  43. package/.claude/contexts/patterns/ui-component-consistency.md +3 -3
  44. package/.claude/contexts/patterns/validation-framework.md +779 -776
  45. package/.claude/lib/README.md +4 -4
  46. package/.claude/lib/agent-executor.md +31 -40
  47. package/.claude/lib/agent-router.md +450 -572
  48. package/.claude/lib/context-loading-protocol.md +19 -36
  49. package/.claude/lib/detailed-guides/agent-system.md +43 -121
  50. package/.claude/lib/detailed-guides/taskmaster-analysis.md +1 -1
  51. package/.claude/lib/document-loader.md +22 -25
  52. package/.claude/lib/flags-updater.md +461 -469
  53. package/.claude/lib/tdd-classifier.md +345 -345
  54. package/.claude/lib/validation-gates.md +484 -484
  55. package/.claude/settings.local.json +42 -42
  56. package/.claude/templates/STYLE_GUIDE.template.md +1 -1
  57. package/.claude/templates/context-template.md +45 -45
  58. package/.claude/templates/design-context-template.md +1 -1
  59. package/.claude/templates/flags-template.json +42 -42
  60. package/.claude/templates/phases-sections/accessibility-test.md +17 -17
  61. package/.claude/templates/phases-sections/api-design.md +37 -37
  62. package/.claude/templates/phases-sections/backend-tests.md +16 -16
  63. package/.claude/templates/phases-sections/backend.md +37 -37
  64. package/.claude/templates/phases-sections/business-logic-validation.md +16 -16
  65. package/.claude/templates/phases-sections/component-tests.md +17 -17
  66. package/.claude/templates/phases-sections/contract-backend.md +16 -16
  67. package/.claude/templates/phases-sections/contract-frontend.md +16 -16
  68. package/.claude/templates/phases-sections/database.md +35 -35
  69. package/.claude/templates/phases-sections/e2e-tests.md +16 -16
  70. package/.claude/templates/phases-sections/fix-implementation.md +17 -17
  71. package/.claude/templates/phases-sections/frontend-integration.md +18 -18
  72. package/.claude/templates/phases-sections/frontend-mockup.md +126 -123
  73. package/.claude/templates/phases-sections/manual-flow-test.md +15 -15
  74. package/.claude/templates/phases-sections/manual-ux-test.md +16 -16
  75. package/.claude/templates/phases-sections/refactor-implementation.md +17 -17
  76. package/.claude/templates/phases-sections/refactor.md +16 -16
  77. package/.claude/templates/phases-sections/regression-tests.md +15 -15
  78. package/.claude/templates/phases-sections/responsive-test.md +16 -16
  79. package/.claude/templates/phases-sections/script-implementation.md +43 -43
  80. package/.claude/templates/phases-sections/test-coverage.md +16 -16
  81. package/.claude/templates/phases-sections/user-approval.md +14 -14
  82. package/LICENSE +21 -21
  83. package/PROJECT_STATUS.template.yml +105 -0
  84. package/README.md +103 -1115
  85. package/lib/init.js +30 -2
  86. package/package.json +3 -2
  87. package/.claude/CHANGELOG-v1.1.1.md +0 -259
@@ -0,0 +1,57 @@
1
+ # Shared Agent Components
2
+
3
+ > **Version:** 2.0.0 (Claude 4.5 Optimized)
4
+ > **Purpose:** Single source of truth for content shared across all 6 agents
5
+
6
+ ---
7
+
8
+ ## Why This Exists
9
+
10
+ **Before v2.0.0:**
11
+ - Same content duplicated 6 times (once per agent)
12
+ - ~3,000 tokens wasted on duplication
13
+ - Updates required changing 6 files
14
+
15
+ **After v2.0.0:**
16
+ - Shared content in `_shared/` folder
17
+ - Agents reference with 1-line link
18
+ - ~2,500 tokens saved (83% reduction)
19
+ - Updates require changing 1 file
20
+
21
+ ---
22
+
23
+ ## Files in This Folder
24
+
25
+ | File | Purpose | Token Savings |
26
+ |------|---------|---------------|
27
+ | `pre-work-checklist.md` | Validation before implementation | ~200 tokens Ɨ 6 |
28
+ | `package-manager.md` | Package manager protocol | ~100 tokens Ɨ 6 |
29
+ | `documentation-policy.md` | What files agents can create | ~70 tokens Ɨ 6 |
30
+ | `agent-boundaries.md` | When to use which agent | ~80 tokens Ɨ 6 |
31
+
32
+ ---
33
+
34
+ ## How Agents Reference
35
+
36
+ Instead of duplicating content, agents use:
37
+
38
+ ```markdown
39
+ ## Pre-Work Checklist
40
+ → See `.claude/agents/_shared/pre-work-checklist.md`
41
+ ```
42
+
43
+ This approach:
44
+ - Saves tokens (1 line vs 30 lines)
45
+ - Ensures consistency (single source of truth)
46
+ - Simplifies maintenance (update once)
47
+
48
+ ---
49
+
50
+ ## Claude 4.5 Optimization Notes
51
+
52
+ These files follow Claude 4.5 best practices:
53
+
54
+ 1. **Professional tone** - No aggressive CAPS or threats
55
+ 2. **Positive instructions** - "Use X" instead of "Don't use Y"
56
+ 3. **WHY context** - Each rule explains its purpose
57
+ 4. **Concise format** - Tables and bullet points, not prose
@@ -0,0 +1,64 @@
1
+ # Agent Boundaries (Shared Reference)
2
+
3
+ > **Purpose:** Clear boundaries prevent agents from doing wrong work
4
+
5
+ ---
6
+
7
+ ## Why Boundaries Matter
8
+
9
+ Without clear boundaries:
10
+ - Agents overlap work (duplicate effort)
11
+ - Wrong agent does wrong task (quality drops)
12
+ - Integration issues (mismatched interfaces)
13
+
14
+ With clear boundaries:
15
+ - Each agent focuses on specialty
16
+ - Clean handoffs between phases
17
+ - Higher quality output
18
+
19
+ ---
20
+
21
+ ## Agent Routing Quick Reference
22
+
23
+ | Task Type | Use Agent | Phase |
24
+ |-----------|-----------|-------|
25
+ | UI components (mock data) | uxui-frontend | 1 |
26
+ | API endpoints | backend | 2 |
27
+ | Database schemas/migrations | database | 2 |
28
+ | Contract validation | integration | 2.5 |
29
+ | Connect UI to API | frontend | 3 |
30
+ | Tests, bugs, debugging | test-debug | 1,3,4 |
31
+
32
+ ---
33
+
34
+ ## Boundary Violations to Avoid
35
+
36
+ **uxui-frontend:**
37
+ - Uses mock data with setTimeout
38
+ - Connect to real APIs → use frontend agent instead
39
+
40
+ **frontend:**
41
+ - Connects existing UI to real APIs
42
+ - Create new UI from scratch → use uxui-frontend instead
43
+
44
+ **backend:**
45
+ - Creates API endpoints with validation
46
+ - Write database queries directly → use database agent instead
47
+
48
+ **database:**
49
+ - Creates schemas, migrations, typed queries
50
+ - Write API logic → use backend agent instead
51
+
52
+ ---
53
+
54
+ ## Why Agent Specialization Works
55
+
56
+ Each agent has deep context for its domain:
57
+ - uxui-frontend: Design patterns, accessibility, visual consistency
58
+ - backend: Security patterns, validation, error handling
59
+ - database: Query optimization, indexes, relationships
60
+ - integration: Contract validation, type safety
61
+ - frontend: State management, API integration, error UI
62
+ - test-debug: Test patterns, debugging, coverage
63
+
64
+ → Full routing rules: `.claude/lib/agent-router.md`
@@ -0,0 +1,47 @@
1
+ # Documentation Policy v1.8.0 (Shared by All Agents)
2
+
3
+ > **Purpose:** Single source of truth for what files agents create
4
+
5
+ ---
6
+
7
+ ## Core Principle
8
+
9
+ Agents create **code files only**. Results go to terminal output.
10
+
11
+ ---
12
+
13
+ ## Allowed Files
14
+
15
+ - Source code (`.ts`, `.tsx`, `.js`, `.jsx`, `.py`, `.go`, etc.)
16
+ - Config files (`package.json`, `tsconfig.json`, `.env.example`)
17
+ - Schema files (`schema.prisma`, `models.py`)
18
+ - Test files (`*.test.ts`, `*.spec.ts`, `test_*.py`)
19
+ - Style files (`.css`, `.scss`, `tailwind.config.js`)
20
+
21
+ ---
22
+
23
+ ## Forbidden Files (Auto-Deleted)
24
+
25
+ These files waste tokens and clutter the project:
26
+
27
+ | Pattern | Example | Why Forbidden |
28
+ |---------|---------|---------------|
29
+ | `*_REPORT.md` | `IMPLEMENTATION_REPORT.md` | Use terminal output |
30
+ | `*_SUMMARY.txt` | `PHASE_SUMMARY.txt` | Use terminal output |
31
+ | `PHASE_*.txt` | `PHASE_11_DELIVERY.txt` | Removed in v1.8.0 |
32
+ | ALL_CAPS filenames | `README_FINAL.md` | Usually temp files |
33
+
34
+ ---
35
+
36
+ ## Rule of Thumb
37
+
38
+ > If it wouldn't be committed to git, don't create it.
39
+
40
+ ---
41
+
42
+ ## Why This Matters
43
+
44
+ Token optimization:
45
+ - Report files waste 500-2000 tokens each
46
+ - v1.8.0 removed doc/report phases for 25 min savings
47
+ - Terminal output is sufficient for status updates
@@ -0,0 +1,59 @@
1
+ # Package Manager Protocol (Shared by All Agents)
2
+
3
+ > **Version:** 2.0.0 (Claude 4.5 Optimized)
4
+ > **Purpose:** Single source of truth for package manager usage
5
+
6
+ ---
7
+
8
+ ## Quick Rule
9
+
10
+ Read `tech-stack.md` before ALL install/run commands.
11
+
12
+ ```bash
13
+ # Location:
14
+ .claude/contexts/domain/{project}/tech-stack.md
15
+ ```
16
+
17
+ ---
18
+
19
+ ## Why This Matters
20
+
21
+ Using wrong package manager causes:
22
+ - Duplicate lock files (package-lock.json + pnpm-lock.yaml)
23
+ - CI/CD pipeline failures
24
+ - Version conflicts
25
+ - Incorrect dependency locations
26
+
27
+ ---
28
+
29
+ ## Protocol
30
+
31
+ **Step 1:** Read tech-stack.md
32
+
33
+ **Step 2:** Extract and use detected tool
34
+
35
+ | If Detected | Install Command | Run Command |
36
+ |-------------|-----------------|-------------|
37
+ | pnpm | `pnpm install {pkg}` | `pnpm run {script}` |
38
+ | npm | `npm install {pkg}` | `npm run {script}` |
39
+ | bun | `bun add {pkg}` | `bun run {script}` |
40
+ | uv | `uv pip install {pkg}` | `uv run {script}` |
41
+ | poetry | `poetry add {pkg}` | `poetry run {cmd}` |
42
+
43
+ **Step 3:** Report in validation
44
+
45
+ ```
46
+ Package Manager: pnpm (from tech-stack.md)
47
+ ```
48
+
49
+ ---
50
+
51
+ ## If tech-stack.md Missing
52
+
53
+ ```
54
+ Warning: tech-stack.md not found
55
+ Suggestion: Run /csetup to generate tech-stack.md
56
+ Fallback: Detect from package.json or pyproject.toml
57
+ ```
58
+
59
+ → Full details: `.claude/lib/context-loading-protocol.md#level-0`
@@ -0,0 +1,57 @@
1
+ # Pre-Work Checklist (Shared by All Agents)
2
+
3
+ > **Version:** 2.0.0 (Claude 4.5 Optimized)
4
+ > **Purpose:** Single source of truth for pre-work validation
5
+
6
+ ---
7
+
8
+ ## Pre-Work Steps
9
+
10
+ Complete these steps before implementation to ensure alignment with project standards:
11
+
12
+ 1. **Context Discovery** - Load project context via agent-discovery.md
13
+ 2. **Pattern Loading** - Load relevant patterns for your agent type
14
+ 3. **Validation Report** - Provide pre-implementation validation report
15
+ 4. **Wait for Approval** - Proceed only after orchestrator validation
16
+
17
+ → Details: `.claude/contexts/patterns/validation-framework.md` (agent-specific sections)
18
+
19
+ ---
20
+
21
+ ## Validation Report Template
22
+
23
+ ```markdown
24
+ Pre-Implementation Validation
25
+
26
+ Project Context:
27
+ - Project: {name}
28
+ - Stack: {tech-stack}
29
+ - Package Manager: {pm} (from tech-stack.md)
30
+
31
+ Patterns Loaded:
32
+ - [ ] error-handling.md
33
+ - [ ] logging.md
34
+ - [ ] testing.md
35
+ - [ ] code-standards.md
36
+ - [ ] {agent-specific patterns}
37
+
38
+ Best Practices:
39
+ - [ ] {framework} best practices loaded (from Context7)
40
+
41
+ Ready to Implement:
42
+ - [ ] Task understood
43
+ - [ ] Dependencies identified
44
+ - [ ] Approach planned
45
+ ```
46
+
47
+ ---
48
+
49
+ ## Why This Matters
50
+
51
+ Pre-work validation prevents:
52
+ - Misaligned implementations (wrong patterns, wrong style)
53
+ - Duplicate components (not searching existing code first)
54
+ - Wrong package manager usage (CI/CD breaks)
55
+ - Missing best practices (outdated patterns)
56
+
57
+ → 80% of implementation issues caught at validation stage
@@ -108,7 +108,7 @@ ${changeContext.tasks}
108
108
  ${phase.instructions}
109
109
  `
110
110
 
111
- // šŸ†• v1.8.0: Add best-practices reference for ALL agents
111
+ // Add best-practices reference for ALL agents
112
112
  const bpDir = '.claude/contexts/domain/project/best-practices/'
113
113
  if (fileExists(bpDir)) {
114
114
  const bpFiles = listFiles(bpDir).filter(f => f.endsWith('.md') && f !== 'index.md')
@@ -133,24 +133,19 @@ ${phase.instructions}
133
133
 
134
134
  ---
135
135
 
136
- ## šŸ“š Best Practices (MANDATORY - STEP 0)
136
+ ## šŸ“š Best Practices (STEP 0)
137
137
 
138
- **YOU MUST READ these files before writing ANY code:**
138
+ Read these files before implementation for quality output:
139
139
 
140
- ${relevantFiles.map(f => `
141
- ### ${f.replace('.md', '')}
142
- \`\`\`
143
- Read: ${bpDir}${f}
144
- \`\`\`
145
- `).join('')}
140
+ ${relevantFiles.map(f => `- Read: ${bpDir}${f}`).join('\n')}
146
141
 
147
- **After reading, REPORT:**
142
+ **Report format:**
148
143
  \`\`\`
149
144
  āœ… Best Practices Loaded
150
145
  ${relevantFiles.map(f => `- ${f.replace('.md', '')} āœ“`).join('\n ')}
151
146
  \`\`\`
152
147
 
153
- **If you skip this, your work will be REJECTED!**
148
+ WHY: Best practices ensure consistency with project patterns.
154
149
 
155
150
  ---
156
151
  `
@@ -169,45 +164,29 @@ Read: ${bpDir}${f}
169
164
 
170
165
  ---
171
166
 
172
- ## šŸŽØ Design System (MANDATORY Reading - STEP 0.5)
173
-
174
- **Required Files (YOU MUST READ in STEP 0.5):**
175
-
176
- ${hasTokens ? `
177
- 1. **STYLE_TOKENS.json** (~500 tokens) āœ… REQUIRED
178
- \`\`\`
179
- Read: design-system/STYLE_TOKENS.json
180
- \`\`\`
181
- Contains: Colors, spacing, typography, shadows, borders, animations
182
- ` : ''}
183
-
184
- ${hasStyleGuide ? `
185
- 2. **STYLE_GUIDE.md** (selective sections ~2K tokens) šŸ“– OPTIONAL
186
- \`\`\`
187
- Read: design-system/STYLE_GUIDE.md
188
- \`\`\`
189
- Load only sections you need:
190
- - Section 6: Component Styles
191
- - Section 15: Layout Patterns
192
- - Section 16: Example Component Reference
193
- ` : ''}
194
-
195
- **Critical Rules:**
196
- - āŒ **NO** hardcoded colors: \`text-gray-500\`, \`#64748b\`
197
- - āœ… **USE** theme tokens: \`text-foreground/70\`, \`bg-muted\`
198
- - āŒ **NO** arbitrary spacing: \`p-5\`, \`gap-7\`
199
- - āœ… **USE** spacing scale: \`p-4\`, \`p-6\`, \`gap-8\`
200
- - āŒ **NO** inconsistent shadows: mixing \`shadow-sm\` and \`shadow-lg\`
201
- - āœ… **USE** consistent patterns: all cards use \`shadow-md\`
202
-
203
- **YOU MUST REPORT:**
167
+ ## šŸŽØ Design System (STEP 0.5)
168
+
169
+ **Files to read:**
170
+
171
+ ${hasTokens ? `- design-system/STYLE_TOKENS.json (~500 tokens) - Colors, spacing, typography` : ''}
172
+ ${hasStyleGuide ? `- design-system/STYLE_GUIDE.md (selective sections) - Component Styles, Layout Patterns` : ''}
173
+
174
+ **Style Guidelines:**
175
+
176
+ | Instead of | Use | WHY |
177
+ |------------|-----|-----|
178
+ | text-gray-500, #64748b | text-foreground/70, bg-muted | Theme-aware |
179
+ | p-5, gap-7 | p-4, p-6, gap-8 | Spacing scale |
180
+ | mixing shadow-sm/lg | consistent shadow-md | Visual consistency |
181
+
182
+ **Report format:**
204
183
  \`\`\`
205
184
  āœ… Design System Loaded
206
185
  - STYLE_TOKENS.json āœ“
207
186
  - Design Tokens Extracted: [list key tokens]
208
187
  \`\`\`
209
188
 
210
- If you skip this, your work will be REJECTED!
189
+ WHY: Design tokens ensure visual consistency across components.
211
190
 
212
191
  ---
213
192
  `
@@ -404,16 +383,18 @@ if (phase.agent === 'uxui-frontend' && hasPagePlan) {
404
383
 
405
384
  ---
406
385
 
407
- ### Step 5: Post-Execution (šŸ†• MANDATORY FLAGS UPDATE)
386
+ ### Step 5: Post-Execution (Flags Update)
387
+
388
+ **Main Claude updates flags.json after each phase completion.**
408
389
 
409
- **āš ļø CRITICAL: Main Claude MUST update flags.json after EVERY phase completion**
390
+ → See: `.claude/lib/flags-updater.md` for complete protocol
410
391
 
411
- See: `.claude/lib/flags-updater.md` for complete protocol
392
+ WHY: Immediate updates ensure /cstatus shows accurate progress.
412
393
 
413
- **Execution Order (MUST follow this sequence):**
394
+ **Execution Order:**
414
395
 
415
396
  ```typescript
416
- // 1. MANDATORY: Update flags.json
397
+ // 1. Update flags.json
417
398
  output(`\nšŸ”„ Updating progress tracking...`)
418
399
 
419
400
  // See flags-updater.md for updateFlagsAfterPhase() implementation
@@ -516,19 +497,13 @@ if (flags.ready_to_archive) {
516
497
  }
517
498
  ```
518
499
 
519
- **Rules:**
520
- - āœ… Main Claude updates flags.json (NOT sub-agent)
521
- - āœ… Update happens IMMEDIATELY after sub-agent responds successfully
522
- - āœ… Update happens BEFORE asking user to continue
523
- - āœ… Progress is reported to user after EVERY update
524
- - āœ… No exceptions - even if agent "says" it updated flags
500
+ **Key points:**
501
+ - Main Claude updates flags.json (sub-agents don't have access)
502
+ - Update happens immediately after sub-agent responds
503
+ - Update happens before asking user to continue
525
504
 
526
- **Common Mistake:**
527
- ```typescript
528
- āŒ WRONG:
529
- Agent completes → Ask user to continue → (flags.json never updated)
530
-
531
- āœ… CORRECT:
505
+ **Correct flow:**
506
+ ```
532
507
  Agent completes → Update flags.json → Report progress → Ask user to continue
533
508
  ```
534
509
 
@@ -35,6 +35,81 @@ If not found:
35
35
  Please create the change with OpenSpec first
36
36
  ```
37
37
 
38
+ ### Step 1.5: Read PROJECT_STATUS.yml (v2.1.0)
39
+
40
+ **WHY:** Cross-session context helps understand blockers and infrastructure state before starting work.
41
+
42
+ ```typescript
43
+ const projectStatusPath = 'PROJECT_STATUS.yml'
44
+
45
+ if (fileExists(projectStatusPath)) {
46
+ const projectStatus = parseYaml(Read(projectStatusPath))
47
+
48
+ output(`\nšŸ“Š Project Context (from PROJECT_STATUS.yml)`)
49
+
50
+ // Show current focus
51
+ if (projectStatus.current_focus?.description) {
52
+ output(` Focus: ${projectStatus.current_focus.description}`)
53
+ }
54
+
55
+ // Check for blockers that might affect this change
56
+ if (projectStatus.blockers?.length > 0) {
57
+ const relevantBlockers = projectStatus.blockers.filter(b =>
58
+ b.blocks?.some(blocked =>
59
+ blocked.toLowerCase().includes(changeId.toLowerCase()) ||
60
+ changeId.toLowerCase().includes(blocked.toLowerCase())
61
+ )
62
+ )
63
+
64
+ if (relevantBlockers.length > 0) {
65
+ output(`\n āš ļø Potential blockers for this change:`)
66
+ relevantBlockers.forEach(b => {
67
+ output(` - ${b.id}: ${b.description}`)
68
+ })
69
+ output(`\n Consider resolving blockers before starting.`)
70
+ }
71
+ }
72
+
73
+ // Show infrastructure status summary
74
+ if (projectStatus.infrastructure) {
75
+ const downServices = Object.entries(projectStatus.infrastructure)
76
+ .filter(([_, info]) => info.status === 'down' || info.status === 'degraded')
77
+
78
+ if (downServices.length > 0) {
79
+ output(`\n āš ļø Infrastructure issues:`)
80
+ downServices.forEach(([service, info]) => {
81
+ output(` - ${service}: ${info.status}${info.notes ? ` (${info.notes})` : ''}`)
82
+ })
83
+ }
84
+ }
85
+
86
+ // Check stale status
87
+ const lastUpdated = new Date(projectStatus.last_updated)
88
+ const daysSinceUpdate = Math.floor((Date.now() - lastUpdated) / (1000 * 60 * 60 * 24))
89
+ const staleThreshold = projectStatus._config?.stale_warning_days || 7
90
+
91
+ if (daysSinceUpdate > staleThreshold) {
92
+ output(`\n ā„¹ļø PROJECT_STATUS.yml last updated ${daysSinceUpdate} days ago.`)
93
+ output(` Consider running /pstatus to refresh.`)
94
+ }
95
+
96
+ // Update active change
97
+ if (projectStatus.current_focus?.active_change !== changeId) {
98
+ output(`\n šŸ“ Update current_focus.active_change to "${changeId}"? (yes/no)`)
99
+ const updateFocus = await askUser()
100
+ if (updateFocus) {
101
+ projectStatus.current_focus = projectStatus.current_focus || {}
102
+ projectStatus.current_focus.active_change = changeId
103
+ projectStatus.last_updated = new Date().toISOString().split('T')[0]
104
+ Write(projectStatusPath, toYaml(projectStatus))
105
+ output(` āœ… Updated active_change to "${changeId}"`)
106
+ }
107
+ }
108
+
109
+ output(``) // Blank line
110
+ }
111
+ ```
112
+
38
113
  ### Step 2: Read OpenSpec Files
39
114
 
40
115
  Read in order:
@@ -310,13 +385,13 @@ function generateBestPracticesFile(tech: string, context7Docs: string): string {
310
385
 
311
386
  ---
312
387
 
313
- ## āœ… DO (Best Practices)
388
+ ## Best Practices
314
389
 
315
390
  ${extractDos(context7Docs)}
316
391
 
317
392
  ---
318
393
 
319
- ## āŒ DON'T (Anti-Patterns)
394
+ ## Anti-Patterns to Avoid
320
395
 
321
396
  ${extractDonts(context7Docs)}
322
397
 
@@ -329,7 +404,7 @@ ${extractChecklist(context7Docs)}
329
404
 
330
405
  ---
331
406
 
332
- **āš ļø Agents MUST read this file before writing ${tech} code!**
407
+ **Agents read this file in STEP 0 before implementation.**
333
408
  `
334
409
  }
335
410
  ```
@@ -487,7 +562,7 @@ const taskAnalysis = {
487
562
  🟢 LOW: 1 task (Documentation)
488
563
 
489
564
  āš ļø Risk Assessment:
490
- 🚨 HIGH risk: 2 tasks (Payment integration, Auth system)
565
+ šŸ”“ HIGH risk: 2 tasks (Payment integration, Auth system)
491
566
  → Mitigation: TDD required, security checklist
492
567
  āš ļø MEDIUM risk: 3 tasks
493
568
  āœ… LOW risk: 3 tasks
@@ -627,7 +702,7 @@ const allPhases = [...researchPhases, ...phaseSections]
627
702
  - 🟢 LOW: {taskAnalysis.summary.priority.low}
628
703
 
629
704
  **Risk Assessment:**
630
- - 🚨 HIGH risk: {taskAnalysis.summary.risk.high} tasks
705
+ - šŸ”“ HIGH risk: {taskAnalysis.summary.risk.high} tasks
631
706
  - āš ļø MEDIUM risk: {taskAnalysis.summary.risk.medium} tasks
632
707
  - āœ… LOW risk: {taskAnalysis.summary.risk.low} tasks
633
708
 
@@ -880,18 +955,19 @@ pageType.includes('auth') ?
880
955
  - patterns/cards.md āœ…
881
956
  - patterns/forms.md āœ…`}
882
957
 
883
- **Agent Instructions (uxui-frontend STEP 0.5):**
884
- 1. Read: tokens.json (~800 tokens) āœ…
885
- 2. Read: page-plan.md (if exists) āœ…
958
+ **Agent Loading (STEP 0.5 for uxui-frontend):**
959
+ 1. Read: tokens.json (~800 tokens)
960
+ 2. Read: page-plan.md (if exists)
886
961
  3. Load patterns selectively based on page type
887
962
  4. Report: Design tokens + page type extracted
888
963
 
889
- **Critical Rules:**
890
- - āŒ NO hardcoded colors (text-gray-500)
891
- - āœ… USE theme tokens (text-foreground/70)
892
- - āŒ NO arbitrary spacing (p-5)
893
- - āœ… USE spacing scale (p-4, p-6)
894
- - ${pageType.includes('landing') ? 'āœ… Apply decorations from theme' : 'āŒ Skip decorations for this page type'}
964
+ **Style Guidelines:**
965
+
966
+ | Instead of | Use | WHY |
967
+ |------------|-----|-----|
968
+ | text-gray-500 | text-foreground/70 | Theme-aware |
969
+ | p-5 | p-4 or p-6 | Spacing scale |
970
+ | ${pageType.includes('landing') ? 'āœ… Apply decorations from theme' : 'āŒ Skip decorations for this page type'} | | |
895
971
  `
896
972
  }
897
973