@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.
Files changed (72) hide show
  1. package/.claude/CHANGELOG-v1.1.1.md +259 -259
  2. package/.claude/CLAUDE.md +79 -90
  3. package/.claude/agents/01-integration.md +11 -7
  4. package/.claude/agents/02-uxui-frontend.md +11 -6
  5. package/.claude/agents/03-test-debug.md +11 -7
  6. package/.claude/agents/04-frontend.md +11 -7
  7. package/.claude/agents/05-backend.md +11 -6
  8. package/.claude/agents/06-database.md +11 -7
  9. package/.claude/commands/cdev.md +110 -7
  10. package/.claude/commands/csetup.md +306 -39
  11. package/.claude/commands/cstatus.md +60 -60
  12. package/.claude/commands/cview.md +364 -364
  13. package/.claude/commands/designsetup.md +1401 -336
  14. package/.claude/commands/extract.md +520 -245
  15. package/.claude/commands/pageplan.md +171 -47
  16. package/.claude/contexts/design/accessibility.md +611 -611
  17. package/.claude/contexts/design/layout.md +400 -400
  18. package/.claude/contexts/design/responsive.md +551 -551
  19. package/.claude/contexts/design/shadows.md +522 -522
  20. package/.claude/contexts/design/typography.md +465 -465
  21. package/.claude/contexts/domain/README.md +164 -164
  22. package/.claude/contexts/patterns/agent-coordination.md +388 -388
  23. package/.claude/contexts/patterns/agent-discovery.md +3 -2
  24. package/.claude/contexts/patterns/change-workflow.md +538 -538
  25. package/.claude/contexts/patterns/code-standards.md +39 -0
  26. package/.claude/contexts/patterns/development-principles.md +513 -513
  27. package/.claude/contexts/patterns/error-handling.md +478 -478
  28. package/.claude/contexts/patterns/error-recovery.md +365 -365
  29. package/.claude/contexts/patterns/logging.md +424 -424
  30. package/.claude/contexts/patterns/task-breakdown.md +452 -452
  31. package/.claude/contexts/patterns/task-classification.md +523 -523
  32. package/.claude/contexts/patterns/tdd-classification.md +516 -516
  33. package/.claude/contexts/patterns/testing.md +413 -413
  34. package/.claude/contexts/patterns/validation-framework.md +776 -776
  35. package/.claude/lib/agent-executor.md +76 -1
  36. package/.claude/lib/agent-router.md +572 -572
  37. package/.claude/lib/flags-updater.md +469 -469
  38. package/.claude/lib/tdd-classifier.md +345 -345
  39. package/.claude/lib/validation-gates.md +484 -484
  40. package/.claude/settings.local.json +42 -42
  41. package/.claude/templates/context-template.md +45 -45
  42. package/.claude/templates/flags-template.json +42 -42
  43. package/.claude/templates/phase-templates.json +19 -29
  44. package/.claude/templates/phases-sections/accessibility-test.md +17 -17
  45. package/.claude/templates/phases-sections/api-design.md +37 -37
  46. package/.claude/templates/phases-sections/backend-tests.md +16 -16
  47. package/.claude/templates/phases-sections/backend.md +37 -37
  48. package/.claude/templates/phases-sections/business-logic-validation.md +16 -16
  49. package/.claude/templates/phases-sections/component-tests.md +17 -17
  50. package/.claude/templates/phases-sections/contract-backend.md +16 -16
  51. package/.claude/templates/phases-sections/contract-frontend.md +16 -16
  52. package/.claude/templates/phases-sections/database.md +35 -35
  53. package/.claude/templates/phases-sections/e2e-tests.md +16 -16
  54. package/.claude/templates/phases-sections/fix-implementation.md +17 -17
  55. package/.claude/templates/phases-sections/frontend-integration.md +18 -18
  56. package/.claude/templates/phases-sections/frontend-mockup.md +123 -123
  57. package/.claude/templates/phases-sections/manual-flow-test.md +15 -15
  58. package/.claude/templates/phases-sections/manual-ux-test.md +16 -16
  59. package/.claude/templates/phases-sections/refactor-implementation.md +17 -17
  60. package/.claude/templates/phases-sections/refactor.md +16 -16
  61. package/.claude/templates/phases-sections/regression-tests.md +15 -15
  62. package/.claude/templates/phases-sections/responsive-test.md +16 -16
  63. package/.claude/templates/phases-sections/script-implementation.md +43 -43
  64. package/.claude/templates/phases-sections/test-coverage.md +16 -16
  65. package/.claude/templates/phases-sections/user-approval.md +14 -14
  66. package/LICENSE +21 -21
  67. package/README.md +103 -351
  68. package/package.json +1 -1
  69. package/.claude/commands/agentsetup.md +0 -1464
  70. package/.claude/commands/psetup.md +0 -101
  71. package/.claude/templates/phases-sections/documentation.md +0 -17
  72. package/.claude/templates/phases-sections/report.md +0 -16
package/.claude/CLAUDE.md CHANGED
@@ -1,46 +1,8 @@
1
1
  # CLAUDE.md
2
2
 
3
3
  > **Navigation Hub for AI Agents**
4
- > **Template Version:** 1.7.1 - Universal Multi-Agent Template (Opus 4.5)
5
- > **Latest:** Incremental Testing - Milestone-based validation for high-risk tasks with round-based retry
6
-
7
- ---
8
-
9
- ## šŸ“ File Naming Conventions (OpenSpec + Template)
10
-
11
- > **IMPORTANT:** Avoid confusion between OpenSpec files and Template files
12
-
13
- ### OpenSpec Files (from [Fission-AI/OpenSpec](https://github.com/Fission-AI/OpenSpec))
14
-
15
- | File | Purpose | When to Read |
16
- |------|---------|--------------|
17
- | `proposal.md` | WHY - Goals, scope, rationale | Phase planning |
18
- | `tasks.md` | WHAT - Implementation checklist | Task tracking |
19
- | `design.md` | **Technical/Architecture decisions** (optional) | Backend/Database phases |
20
- | `specs/` | Delta specs (ADDED/MODIFIED/REMOVED) | Requirement validation |
21
-
22
- ### Template Files (from claude-multi-agent-template)
23
-
24
- | File | Purpose | When to Read |
25
- |------|---------|--------------|
26
- | `STYLE_GUIDE.md` | **Visual design** (colors, typography, spacing) | UI/Frontend phases |
27
- | `STYLE_TOKENS.json` | Lightweight design tokens (~500 tokens) | Quick UI reference |
28
- | `page-plan.md` | UI component layout + content strategy | uxui-frontend agent |
29
- | `phases.md` | Execution plan with agent assignments | All phases |
30
- | `flags.json` | Progress tracking | All phases |
31
-
32
- ### Key Distinction
33
-
34
- ```
35
- OpenSpec design.md = Technical Architecture (data flow, API structure, system design)
36
- Template STYLE_GUIDE = Visual Design (colors, fonts, spacing, component styles)
37
- ```
38
-
39
- **Agents should read BOTH when relevant:**
40
- - `uxui-frontend` → STYLE_GUIDE.md (visual) + design.md (if has UI architecture)
41
- - `backend` → design.md (API/data architecture)
42
- - `database` → design.md (data models, relationships)
43
- - `frontend` → STYLE_GUIDE.md (visual) + design.md (API contracts)
4
+ > **Template Version:** 2.0.0 - Universal Multi-Agent Template
5
+ > **Latest:** Design System v2.0 - Interactive setup, theme selection, selective pattern loading, page type detection
44
6
 
45
7
  ---
46
8
 
@@ -65,14 +27,15 @@ Universal, framework-agnostic template for AI-assisted development.
65
27
 
66
28
  ## šŸ“– Quick Navigation
67
29
 
68
- **Design/UI:**
69
- - `/designsetup` - Auto-generate style guide from reference/codebase/AI
70
- - `design-system/STYLE_TOKENS.json` - **NEW!** Lightweight design tokens (~500 tokens) ✨
71
- - `design-system/STYLE_GUIDE.md` - Full style guide (17 sections, ~5000 tokens)
72
- - `@/.claude/lib/document-loader.md` - **NEW!** Token-efficient loading patterns ✨
30
+ **Design/UI (v2.0.0):**
31
+ - `/extract https://site.com` - **NEW!** Extract design from reference sites (multi-URL, style detection)
32
+ - `/designsetup @prd.md` - **ENHANCED!** Interactive design setup (3-round loop, theme selection)
33
+ - `design-system/tokens.json` - **v2.0!** Design tokens with style/theme/animations (~800 tokens) ✨
34
+ - `design-system/patterns/*.md` - **NEW!** Selective code patterns (buttons, cards, forms, animations, decorations)
35
+ - `design-system/STYLE_GUIDE.md` - Human-readable guide (no code, ~150 lines)
36
+ - `.claude/extractions/*.json` - **NEW!** Extracted site data
37
+ - `@/.claude/lib/document-loader.md` - Token-efficient loading patterns
73
38
  - `@/.claude/contexts/design/index.md` (General design principles - fallback)
74
- - `@/.claude/contexts/design/box-thinking.md` (Layout analysis)
75
- - `@/.claude/contexts/patterns/ui-component-consistency.md` (Visual consistency)
76
39
 
77
40
  **Development:**
78
41
  - `@/.claude/contexts/patterns/task-classification.md` (Agent selection guide)
@@ -84,15 +47,18 @@ Universal, framework-agnostic template for AI-assisted development.
84
47
  - `@/.claude/contexts/patterns/frontend-component-strategy.md`
85
48
 
86
49
  **Project Setup:**
87
- - `/designsetup` - **NEW!** Auto-generate style guide (reference → codebase → AI)
50
+ - `/extract https://site.com` - Extract design from reference sites
51
+ - `/designsetup @prd.md` - Interactive design system setup
88
52
  - `/psetup` - One-time project setup (detect tech stack, generate best practices)
89
53
  - `/agentsetup` - Auto-detect tech stack and generate best practices
90
54
 
91
- **Page Planning (UI Tasks):**
92
- - `/pageplan @prd.md @brief.md` - **ENHANCED v1.4.0!** Generate page structure & conversion-optimized content
55
+ **Page Planning (UI Tasks) - v2.0.0:**
56
+ - `/pageplan @prd.md @brief.md` - **ENHANCED v2.0.0!** Generate page structure with auto page type detection
93
57
  - Output: `openspec/changes/{id}/page-plan.md` (component reuse, buyer avatar, conversion copy, asset checklist)
94
- - **NEW:** Buyer avatar analysis (Eugene Schwartz framework) for marketing pages
95
- - **NEW:** Conversion-optimized content (pain → promise → CTA)
58
+ - **NEW v2.0.0:** Auto-detects page type (landing/dashboard/auth) from proposal.md/tasks.md
59
+ - **NEW v2.0.0:** Reads tokens.json for style/theme/animations
60
+ - **NEW v2.0.0:** Loads patterns/*.md selectively based on page type
61
+ - Buyer avatar analysis (Eugene Schwartz framework) for marketing pages only
96
62
  - Used by: uxui-frontend agent (auto-reads in STEP 0.5)
97
63
 
98
64
  **OpenSpec Multi-Agent Workflow:**
@@ -110,13 +76,12 @@ Universal, framework-agnostic template for AI-assisted development.
110
76
  - Level 2: `.claude/contexts/domain/{project}/README.md` (Project Overview)
111
77
  - Level 3: `.claude/contexts/domain/{project}/best-practices/index.md` (Best Practices Registry)
112
78
 
113
- **Implementation Logic:**
79
+ **šŸ†• Implementation Logic (v1.1.0):**
114
80
  - `@/.claude/lib/README.md` - Implementation logic overview
115
- - `@/.claude/lib/agent-executor.md` - Agent retry & escalation logic (used by /cdev) + šŸ†• Incremental testing execution (v1.6.0)
81
+ - `@/.claude/lib/agent-executor.md` - Agent retry & escalation logic (used by /cdev)
116
82
  - `@/.claude/lib/tdd-classifier.md` - TDD classification logic (used by /csetup)
117
- - `@/.claude/lib/task-analyzer.md` - šŸ†• Task analysis with milestone generation (v1.6.0)
118
- - `@/.claude/lib/flags-updater.md` - Progress tracking protocol (Main Claude updates flags.json)
119
- - `@/.claude/lib/agent-router.md` - Mandatory agent routing rules (enforce delegation)
83
+ - `@/.claude/lib/flags-updater.md` - šŸ†• Progress tracking protocol (Main Claude updates flags.json)
84
+ - `@/.claude/lib/agent-router.md` - šŸ†• Mandatory agent routing rules (enforce delegation)
120
85
  - `@/.claude/contexts/patterns/agent-discovery.md` - Shared agent discovery flow
121
86
 
122
87
  ---
@@ -133,47 +98,85 @@ Universal, framework-agnostic template for AI-assisted development.
133
98
 
134
99
  ---
135
100
 
136
- ## šŸŽØ Design System / Style Guide Generation
101
+ ## šŸŽØ Design System v2.0.0 (Interactive Setup)
137
102
 
138
103
  **→ See:** `@/.claude/lib/detailed-guides/design-system.md` for complete guide
139
104
 
140
105
  **Quick Summary:**
141
- - `/designsetup` auto-detects project context with **3 smart paths**: Reference design → Brownfield (reverse engineering) → Greenfield (AI-generated)
142
- - Generates comprehensive `design-system/STYLE_GUIDE.md` (17 sections: colors, typography, spacing, components, etc.)
143
- - **uxui-frontend agent** auto-reads style guide (Priority #1) or falls back to general design principles
144
- - Ensures visual consistency, prevents duplicates, enforces accessibility
106
+ - `/extract https://site.com` → Extracts design from reference sites (multi-URL, style detection)
107
+ - `/designsetup @prd.md` → Interactive 3-round loop with theme selection
108
+ - Generates:
109
+ - `tokens.json` - Design tokens with style/theme/animations (~800 tokens) **FOR AGENTS**
110
+ - `patterns/*.md` - Code patterns (buttons, cards, forms, animations, decorations) **SELECTIVE LOADING**
111
+ - `STYLE_GUIDE.md` - Human-readable guide (no code, ~150 lines) **FOR HUMANS**
112
+
113
+ **New Features in v2.0.0:**
114
+ - šŸŽÆ **Style Detection:** Neo-Brutalism, Minimalist, Glassmorphism, Modern SaaS, etc.
115
+ - šŸŽ­ **Theme Selection:** AI recommends themes based on project context
116
+ - šŸŽ¬ **Animation Support:** GSAP, ScrollTrigger, Framer Motion detection
117
+ - šŸ“œ **Scroll Patterns:** stacking-cards, parallax, fade-in, slide-in
118
+ - šŸ–¼ļø **Decorative Direction:** USE/AVOID elements for theme consistency
119
+
120
+ **Flow:**
121
+ ```
122
+ /extract → .claude/extractions/*.json
123
+ ↓
124
+ /designsetup → tokens.json + patterns/*.md + STYLE_GUIDE.md
125
+ ↓
126
+ /pageplan → page-plan.md (reads tokens.json, auto-detects page type)
127
+ ↓
128
+ /csetup → phases.md (reads page-plan.md)
129
+ ↓
130
+ /cdev → uxui-frontend (reads tokens.json + patterns/*.md selectively)
131
+ ```
145
132
 
146
133
  ---
147
134
 
148
- ## ⚔ Context Optimization (v1.2.0)
135
+ ## ⚔ Context Optimization (v2.0.0)
149
136
 
150
137
  **→ See:** `@/.claude/lib/detailed-guides/context-optimization.md` for complete guide
151
138
 
152
139
  **Quick Summary:**
153
140
  - **Problem:** 20K tokens wasted (STYLE_GUIDE.md read 4x by different commands/agents)
154
- - **Solution:** 3-tier loading → STYLE_TOKENS.json (500 tokens) → design-context.md (1K) → STYLE_GUIDE.md (5K, selective)
155
- - **Result:** 70% token reduction (~4.7K total), 3-4x faster, maintained quality
141
+ - **Solution (v2.0.0):**
142
+ - `tokens.json` (~800 tokens) - **PRIMARY: All agents read this**
143
+ - `patterns/*.md` - **SELECTIVE: Load based on page type**
144
+ - `STYLE_GUIDE.md` (~150 lines) - **HUMAN-READABLE: No code**
145
+ - **Page Type Detection:**
146
+ - Landing/Marketing → Full patterns (buttons, cards, scroll-animations, decorations)
147
+ - Dashboard/Admin → Minimal patterns (buttons, cards, forms)
148
+ - Auth → Clean patterns (buttons, forms)
149
+ - **Result:** 84% token reduction (~800 tokens vs ~5000), 4x faster, theme consistency
156
150
 
157
151
  ---
158
152
 
159
- ## šŸ“‹ Page Planning System (v1.4.0 - Conversion-Optimized)
153
+ ## šŸ“‹ Page Planning System (v2.0.0 - Auto Page Type Detection)
160
154
 
161
155
  **→ See:** `@/.claude/lib/detailed-guides/page-planning.md` for complete guide
162
156
 
163
157
  **Quick Summary:**
164
- - **Problem:** Agents duplicate components (Navbar 3x), use random colors, lorem ipsum content, **generic copy that doesn't convert**
158
+ - **Problem:** Agents duplicate components (Navbar 3x), use random colors, lorem ipsum content, wrong decorations for page type
165
159
  - **Solution:** `/pageplan @prd.md @brief.md` → Generates `openspec/changes/{id}/page-plan.md` with:
160
+ - **Auto page type detection** šŸ†• (landing/dashboard/auth from proposal.md/tasks.md)
161
+ - **tokens.json integration** šŸ†• (style, theme, animations, decorative direction)
162
+ - **Selective pattern loading** šŸ†• (only load patterns relevant to page type)
166
163
  - Component reuse plan āœ… (prevent duplicates)
167
- - **Buyer avatar analysis** šŸ†• (Eugene Schwartz framework)
168
- - **Conversion-optimized content** šŸ†• (pain → promise → CTA)
164
+ - Buyer avatar analysis (Eugene Schwartz framework) **for marketing pages only**
165
+ - Conversion-optimized content (pain → promise → CTA) **for marketing pages only**
169
166
  - Asset checklist āœ… (performance-optimized)
170
- - **Benefits:**
171
- - Prevents duplicates, ensures design consistency
172
- - **Real content from PRD with conversion psychology** šŸ†•
173
- - **2-5x better conversion rates** (pain-based headlines vs generic)
174
- - 25% faster (search + copy strategy done once upfront)
175
- - **Use for:** Landing pages, marketing sites, product pages (auto-detects marketing vs dashboard)
176
- - **Skips for:** Dashboards, admin panels, backend/database work (no buyer avatar needed)
167
+
168
+ **Page Type Handling:**
169
+ | Page Type | Decorations | Scroll Anims | Buyer Avatar | Patterns Loaded |
170
+ |-----------|-------------|--------------|--------------|-----------------|
171
+ | Landing/Marketing | āœ… Full | āœ… Enabled | āœ… Enabled | buttons, cards, scroll-anims, decorations |
172
+ | Dashboard/Admin | āŒ Minimal | āŒ Disabled | āŒ Skipped | buttons, cards, forms |
173
+ | Auth (Login/Register) | āŒ None | āŒ Disabled | āŒ Skipped | buttons, forms |
174
+
175
+ **Benefits:**
176
+ - Auto-detects page type from context (no manual config)
177
+ - Theme + decorations from tokens.json applied consistently
178
+ - 84% token reduction (selective pattern loading)
179
+ - Conversion-optimized only where needed (marketing pages)
177
180
 
178
181
  ---
179
182
 
@@ -189,20 +192,6 @@ Universal, framework-agnostic template for AI-assisted development.
189
192
 
190
193
  ---
191
194
 
192
- ## šŸ”„ Incremental Testing (v1.6.0)
193
-
194
- **→ See:** `@/.claude/lib/detailed-guides/incremental-testing.md` for complete guide
195
-
196
- **Quick Summary:**
197
- - **Problem:** All-or-nothing testing → bugs found at scale (1000 records) → hard to debug, expensive rework
198
- - **Solution:** Milestone-based validation → Test 1 record → 10 → errors → scale → catch bugs early (75% faster debug)
199
- - **3 Patterns:** Backend API (4 milestones), Complex Form (3 milestones), Database Migration (3 milestones)
200
- - **Round-based Retry:** 2 attempts → Main Claude intervention (hints vs ask human) → new round (unlimited)
201
- - **Detection:** Auto-triggered for Risk=HIGH OR (Risk=MEDIUM + Complexity≄7) OR External API OR Data-intensive (~20-30% of tasks)
202
- - **Benefits:** 60-70% rework reduction, 40-50% net speedup, 90% success rate with progressive confidence
203
-
204
- ---
205
-
206
195
  ## šŸ¤– Agent System
207
196
 
208
197
  **→ See:** `@/.claude/lib/detailed-guides/agent-system.md` for complete guide
@@ -526,7 +526,7 @@ Frontend expects `email` but backend doesn't return it.
526
526
  - āœ… ALWAYS read `tech-stack.md` before ANY install/run commands
527
527
  - āœ… Use exact package manager from tech-stack.md (pnpm, npm, bun, uv, poetry, pip)
528
528
  - āŒ NEVER assume or hardcode package manager
529
- - āŒ If tech-stack.md missing → warn user to run `/agentsetup`
529
+ - āŒ If tech-stack.md missing → warn user to run `/csetup`
530
530
 
531
531
  ### Validation Standards
532
532
  - āœ… Read ACTUAL code files (don't guess or assume)
@@ -638,14 +638,18 @@ Found: 3 endpoints
638
638
 
639
639
  ---
640
640
 
641
- ## Documentation Policy
641
+ ## Documentation Policy (v1.8.0)
642
642
 
643
- **→ See:** `.claude/contexts/patterns/code-standards.md` for complete policy
643
+ **→ See:** `.claude/contexts/patterns/code-standards.md` → "Forbidden Files" section
644
+
645
+ **Simple Rule:** Only create **actual code/config files**. No reports, summaries, or temp files.
644
646
 
645
647
  **Quick Reference:**
646
- - āŒ NEVER create documentation files unless explicitly requested
647
- - āŒ NO INTEGRATION_REPORT.md, CONTRACT_ANALYSIS.md, API_CONTRACTS.md, etc.
648
- - āœ… Return comprehensive text reports in your final message instead
649
- - āœ… Exception: Only when user explicitly says "create documentation"
648
+ - āŒ NEVER create files for: reports, summaries, logs, guides, analysis results
649
+ - āŒ NEVER create ALL_CAPS filenames or files with PHASE_/STEP_ prefixes
650
+ - āœ… Return all results in your **final response text**
651
+ - āœ… Update `flags.json` with validation results
652
+
653
+ **Rule of thumb:** If it wouldn't be committed to git as part of the feature, don't create it.
650
654
 
651
655
  ---
@@ -922,14 +922,19 @@ Return to Orchestrator:
922
922
 
923
923
  ---
924
924
 
925
- ## Documentation Policy
925
+ ## Documentation Policy (v1.8.0)
926
926
 
927
- **→ See:** `.claude/contexts/patterns/code-standards.md` for complete policy
927
+ **→ See:** `.claude/contexts/patterns/code-standards.md` → "Forbidden Files" section
928
928
 
929
- **Quick Rule:**
930
- - āŒ **NEVER** create .md documentation files (README, DOCS, GUIDE, etc.)
931
- - āœ… **ALWAYS** report results as verbose text output in final message
932
- - Exception: ONLY when user explicitly requests documentation
929
+ **Simple Rule:** Only create **actual component/style files**. No reports, summaries, or temp files.
930
+
931
+ **Quick Reference:**
932
+ - āŒ NEVER create files for: reports, summaries, logs, guides, analysis results
933
+ - āŒ NEVER create ALL_CAPS filenames or files with PHASE_/STEP_ prefixes
934
+ - āœ… Return all results in your **final response text**
935
+ - āœ… Update `flags.json` with component list and files created
936
+
937
+ **Rule of thumb:** If it wouldn't be committed to git as part of the feature, don't create it.
933
938
 
934
939
  ## Rules
935
940
 
@@ -431,15 +431,19 @@ Recommendation:
431
431
 
432
432
  ---
433
433
 
434
- ## Documentation Policy
434
+ ## Documentation Policy (v1.8.0)
435
435
 
436
- **→ See:** `.claude/contexts/patterns/code-standards.md` for complete policy
436
+ **→ See:** `.claude/contexts/patterns/code-standards.md` → "Forbidden Files" section
437
+
438
+ **Simple Rule:** Only create **actual code/test files**. No reports, summaries, or temp files.
437
439
 
438
440
  **Quick Reference:**
439
- - āŒ NEVER create documentation files unless explicitly requested
440
- - āŒ NO TEST_REPORT.md, DEBUG_LOG.md, TEST_RESULTS.md, etc.
441
- - āœ… Return comprehensive text reports in your final message instead
442
- - āœ… Exception: Only when user explicitly says "create documentation"
441
+ - āŒ NEVER create files for: reports, summaries, logs, guides, analysis results
442
+ - āŒ NEVER create ALL_CAPS filenames or files with PHASE_/STEP_ prefixes
443
+ - āœ… Return all results in your **final response text**
444
+ - āœ… Update `flags.json` with test results (passed/failed/coverage)
445
+
446
+ **Rule of thumb:** If it wouldn't be committed to git as part of the feature, don't create it.
443
447
 
444
448
  ## Rules
445
449
 
@@ -451,7 +455,7 @@ Recommendation:
451
455
  - āœ… ALWAYS read `tech-stack.md` before ANY install/run commands
452
456
  - āœ… Use exact package manager from tech-stack.md (pnpm, npm, bun, uv, poetry, pip)
453
457
  - āŒ NEVER assume or hardcode package manager
454
- - āŒ If tech-stack.md missing → warn user to run `/agentsetup`
458
+ - āŒ If tech-stack.md missing → warn user to run `/csetup`
455
459
 
456
460
  ### Testing Standards
457
461
  - āœ… Run tests automatically (no manual testing)
@@ -561,15 +561,19 @@ test('failed login shows error message', async () => {
561
561
 
562
562
  ---
563
563
 
564
- ## Documentation Policy
564
+ ## Documentation Policy (v1.8.0)
565
565
 
566
- **→ See:** `.claude/contexts/patterns/code-standards.md` for complete policy
566
+ **→ See:** `.claude/contexts/patterns/code-standards.md` → "Forbidden Files" section
567
+
568
+ **Simple Rule:** Only create **actual code files**. No reports, summaries, or temp files.
567
569
 
568
570
  **Quick Reference:**
569
- - āŒ NEVER create documentation files unless explicitly requested
570
- - āŒ NO README.md, IMPLEMENTATION_GUIDE.md, API_DOCS.md, etc.
571
- - āœ… Return comprehensive text reports in your final message instead
572
- - āœ… Exception: Only when user explicitly says "create documentation"
571
+ - āŒ NEVER create files for: reports, summaries, logs, guides, analysis results
572
+ - āŒ NEVER create ALL_CAPS filenames or files with PHASE_/STEP_ prefixes
573
+ - āœ… Return all results in your **final response text**
574
+ - āœ… Update `flags.json` with integration results
575
+
576
+ **Rule of thumb:** If it wouldn't be committed to git as part of the feature, don't create it.
573
577
 
574
578
  ## Rules
575
579
 
@@ -581,7 +585,7 @@ test('failed login shows error message', async () => {
581
585
  - āœ… ALWAYS read `tech-stack.md` before ANY install/run commands
582
586
  - āœ… Use exact package manager from tech-stack.md (pnpm, npm, bun, uv, poetry, pip)
583
587
  - āŒ NEVER assume or hardcode package manager
584
- - āŒ If tech-stack.md missing → warn user to run `/agentsetup`
588
+ - āŒ If tech-stack.md missing → warn user to run `/csetup`
585
589
 
586
590
  ### TDD Compliance
587
591
  - āœ… Check `tdd_required` flag from Orchestrator
@@ -579,14 +579,19 @@ Response: { token: string, user: { id, email, name } }
579
579
 
580
580
  ---
581
581
 
582
- ## Documentation Policy
582
+ ## Documentation Policy (v1.8.0)
583
583
 
584
- **→ See:** `.claude/contexts/patterns/code-standards.md` for complete policy
584
+ **→ See:** `.claude/contexts/patterns/code-standards.md` → "Forbidden Files" section
585
585
 
586
- **Quick Rule:**
587
- - āŒ **NEVER** create .md documentation files (README, API_DOCS, etc.)
588
- - āœ… **ALWAYS** report results as verbose text output in final message
589
- - Exception: ONLY when user explicitly requests documentation
586
+ **Simple Rule:** Only create **actual code files**. No reports, summaries, or temp files.
587
+
588
+ **Quick Reference:**
589
+ - āŒ NEVER create files for: reports, summaries, logs, guides, analysis results
590
+ - āŒ NEVER create ALL_CAPS filenames or files with PHASE_/STEP_ prefixes
591
+ - āœ… Return all results in your **final response text**
592
+ - āœ… Update `flags.json` with endpoints created
593
+
594
+ **Rule of thumb:** If it wouldn't be committed to git as part of the feature, don't create it.
590
595
 
591
596
  ## Rules
592
597
 
@@ -620,15 +620,19 @@ users = await db.execute(
620
620
 
621
621
  ---
622
622
 
623
- ## Documentation Policy
623
+ ## Documentation Policy (v1.8.0)
624
624
 
625
- **→ See:** `.claude/contexts/patterns/code-standards.md` for complete policy
625
+ **→ See:** `.claude/contexts/patterns/code-standards.md` → "Forbidden Files" section
626
+
627
+ **Simple Rule:** Only create **actual schema/migration files**. No reports, summaries, or temp files.
626
628
 
627
629
  **Quick Reference:**
628
- - āŒ NEVER create documentation files unless explicitly requested
629
- - āŒ NO SCHEMA_DOCUMENTATION.md, DATABASE_GUIDE.md, MIGRATION_GUIDE.md, etc.
630
- - āœ… Return comprehensive text reports in your final message instead
631
- - āœ… Exception: Only when user explicitly says "create documentation"
630
+ - āŒ NEVER create files for: reports, summaries, logs, guides, analysis results
631
+ - āŒ NEVER create ALL_CAPS filenames or files with PHASE_/STEP_ prefixes
632
+ - āœ… Return all results in your **final response text**
633
+ - āœ… Update `flags.json` with schema changes and migrations
634
+
635
+ **Rule of thumb:** If it wouldn't be committed to git as part of the feature, don't create it.
632
636
 
633
637
  ## Rules
634
638
 
@@ -640,7 +644,7 @@ users = await db.execute(
640
644
  - āœ… ALWAYS read `tech-stack.md` before ANY install/run commands
641
645
  - āœ… Use exact package manager from tech-stack.md (pnpm, npm, bun, uv, poetry, pip)
642
646
  - āŒ NEVER assume or hardcode package manager
643
- - āŒ If tech-stack.md missing → warn user to run `/agentsetup`
647
+ - āŒ If tech-stack.md missing → warn user to run `/csetup`
644
648
 
645
649
  ### TDD Compliance
646
650
  - āœ… Check `tdd_required` flag from Orchestrator
@@ -94,7 +94,7 @@ See: `.claude/lib/agent-executor.md` for full implementation
94
94
  ```typescript
95
95
  // Step 4: Invoke Agent with Retry & Validation
96
96
 
97
- // 4.1: Build agent prompt (with design reference - Context Optimization v1.2.0)
97
+ // 4.1: Build agent prompt (with design reference + best practices - v1.8.0)
98
98
  function buildAgentPrompt(phase, changeContext) {
99
99
  let prompt = `
100
100
  # Phase ${phase.phase_number}: ${phase.name}
@@ -108,7 +108,56 @@ ${changeContext.tasks}
108
108
  ${phase.instructions}
109
109
  `
110
110
 
111
- // šŸ†• Add design reference for uxui-frontend agent (not full content!)
111
+ // šŸ†• v1.8.0: Add best-practices reference for ALL agents
112
+ const bpDir = '.claude/contexts/domain/project/best-practices/'
113
+ if (fileExists(bpDir)) {
114
+ const bpFiles = listFiles(bpDir).filter(f => f.endsWith('.md') && f !== 'index.md')
115
+
116
+ // Map agent type to relevant best-practices
117
+ const agentBpMapping = {
118
+ 'uxui-frontend': ['react', 'nextjs', 'vue', 'tailwind'],
119
+ 'frontend': ['react', 'nextjs', 'vue', 'typescript'],
120
+ 'backend': ['express', 'fastapi', 'django', 'prisma', 'drizzle'],
121
+ 'database': ['prisma', 'drizzle', 'postgres', 'mongodb'],
122
+ 'test-debug': ['vitest', 'jest', 'playwright'],
123
+ 'integration': ['typescript'] // minimal
124
+ }
125
+
126
+ const relevantTechs = agentBpMapping[phase.agent] || []
127
+ const relevantFiles = bpFiles.filter(f =>
128
+ relevantTechs.some(tech => f.toLowerCase().includes(tech))
129
+ )
130
+
131
+ if (relevantFiles.length > 0) {
132
+ prompt += `
133
+
134
+ ---
135
+
136
+ ## šŸ“š Best Practices (MANDATORY - STEP 0)
137
+
138
+ **YOU MUST READ these files before writing ANY code:**
139
+
140
+ ${relevantFiles.map(f => `
141
+ ### ${f.replace('.md', '')}
142
+ \`\`\`
143
+ Read: ${bpDir}${f}
144
+ \`\`\`
145
+ `).join('')}
146
+
147
+ **After reading, REPORT:**
148
+ \`\`\`
149
+ āœ… Best Practices Loaded
150
+ ${relevantFiles.map(f => `- ${f.replace('.md', '')} āœ“`).join('\n ')}
151
+ \`\`\`
152
+
153
+ **If you skip this, your work will be REJECTED!**
154
+
155
+ ---
156
+ `
157
+ }
158
+ }
159
+
160
+ // Add design reference for uxui-frontend agent (not full content!)
112
161
  if (phase.agent === 'uxui-frontend') {
113
162
  const tokensPath = 'design-system/STYLE_TOKENS.json'
114
163
  const styleGuidePath = 'design-system/STYLE_GUIDE.md'
@@ -392,11 +441,65 @@ output(` ā±ļø ${formatDuration(flags.meta.time_remaining_estimate)} remaini
392
441
 
393
442
  // 4. Check next phase
394
443
  if (flags.ready_to_archive) {
395
- output('\nāœ… All phases complete! Ready to archive.')
396
- output(`\nNext steps:`)
397
- output(`1. Review: /cview ${changeId}`)
398
- output(`2. Update tasks.md (mark all [x])`)
399
- output(`3. Archive: openspec archive ${changeId}`)
444
+ // šŸ†• v1.2.0: Verbose Summary Output (replaces documentation/report phases)
445
+ output(`\n`)
446
+ output(`╔════════════════════════════════════════════════════════════╗`)
447
+ output(`ā•‘ āœ… CHANGE COMPLETED SUCCESSFULLY ā•‘`)
448
+ output(`ā•šā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•`)
449
+ output(``)
450
+ output(`šŸ“¦ Change: ${changeId}`)
451
+ output(`šŸ“‹ Template: ${flags.template} (${flags.meta.total_phases} phases)`)
452
+ output(``)
453
+ output(`═══════════════════════════════════════════════════════════════`)
454
+ output(`šŸ“Š EXECUTION SUMMARY`)
455
+ output(`═══════════════════════════════════════════════════════════════`)
456
+ output(``)
457
+ output(`ā±ļø Time:`)
458
+ output(` • Estimated: ${formatDuration(flags.meta.total_estimated_minutes)}`)
459
+ output(` • Actual: ${formatDuration(flags.meta.total_actual_minutes)}`)
460
+ output(` • Variance: ${calculateVariance(flags.meta)}`)
461
+ output(``)
462
+ output(`šŸ“ˆ Phases Completed: ${flags.meta.completed_phases}/${flags.meta.total_phases}`)
463
+
464
+ // List all phases with status
465
+ Object.entries(flags.phases).forEach(([phaseId, phase]) => {
466
+ const status = phase.status === 'completed' ? 'āœ…' :
467
+ phase.status === 'skipped' ? 'ā­ļø' : 'āŒ'
468
+ const time = phase.actual_minutes ? `(${phase.actual_minutes}m)` : ''
469
+ output(` ${status} ${phase.phase_number}. ${phaseId} ${time}`)
470
+ })
471
+
472
+ output(``)
473
+ output(`═══════════════════════════════════════════════════════════════`)
474
+ output(`šŸ“ FILES CREATED/MODIFIED`)
475
+ output(`═══════════════════════════════════════════════════════════════`)
476
+
477
+ // Collect all files from phase outputs
478
+ const allFiles = collectFilesFromPhases(flags.phases)
479
+ if (allFiles.created.length > 0) {
480
+ output(``)
481
+ output(`✨ Created (${allFiles.created.length}):`)
482
+ allFiles.created.forEach(f => output(` • ${f}`))
483
+ }
484
+ if (allFiles.modified.length > 0) {
485
+ output(``)
486
+ output(`šŸ“ Modified (${allFiles.modified.length}):`)
487
+ allFiles.modified.forEach(f => output(` • ${f}`))
488
+ }
489
+
490
+ output(``)
491
+ output(`═══════════════════════════════════════════════════════════════`)
492
+ output(`šŸš€ NEXT STEPS`)
493
+ output(`═══════════════════════════════════════════════════════════════`)
494
+ output(``)
495
+ output(`1. Review changes: /cview ${changeId}`)
496
+ output(`2. Test manually: Verify the implementation works`)
497
+ output(`3. Mark complete: Update tasks.md (mark all [x])`)
498
+ output(`4. Archive: openspec archive ${changeId}`)
499
+ output(``)
500
+ output(`šŸ’” Note: flags.json contains full execution history`)
501
+ output(` Path: openspec/changes/${changeId}/.claude/flags.json`)
502
+ output(``)
400
503
  } else {
401
504
  const nextPhase = flags.phases[flags.current_phase]
402
505