@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
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:**
|
|
5
|
-
> **Latest:**
|
|
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
|
-
- `/
|
|
70
|
-
-
|
|
71
|
-
- `design-system/
|
|
72
|
-
-
|
|
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
|
-
- `/
|
|
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
|
|
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:**
|
|
95
|
-
- **NEW:**
|
|
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
|
-
|
|
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)
|
|
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/
|
|
118
|
-
- `@/.claude/lib/
|
|
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
|
|
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
|
-
- `/
|
|
142
|
-
-
|
|
143
|
-
-
|
|
144
|
-
-
|
|
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 (
|
|
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
|
|
155
|
-
-
|
|
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 (
|
|
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,
|
|
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
|
-
-
|
|
168
|
-
-
|
|
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
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
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 `/
|
|
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`
|
|
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
|
|
647
|
-
- ā
|
|
648
|
-
- ā
Return
|
|
649
|
-
- ā
|
|
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`
|
|
927
|
+
**ā See:** `.claude/contexts/patterns/code-standards.md` ā "Forbidden Files" section
|
|
928
928
|
|
|
929
|
-
**
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
-
|
|
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`
|
|
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
|
|
440
|
-
- ā
|
|
441
|
-
- ā
Return
|
|
442
|
-
- ā
|
|
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 `/
|
|
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`
|
|
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
|
|
570
|
-
- ā
|
|
571
|
-
- ā
Return
|
|
572
|
-
- ā
|
|
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 `/
|
|
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`
|
|
584
|
+
**ā See:** `.claude/contexts/patterns/code-standards.md` ā "Forbidden Files" section
|
|
585
585
|
|
|
586
|
-
**
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
-
|
|
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`
|
|
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
|
|
629
|
-
- ā
|
|
630
|
-
- ā
Return
|
|
631
|
-
- ā
|
|
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 `/
|
|
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
|
package/.claude/commands/cdev.md
CHANGED
|
@@ -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
|
|
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
|
|
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
|
-
|
|
396
|
-
output(`\
|
|
397
|
-
output(
|
|
398
|
-
output(
|
|
399
|
-
output(
|
|
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
|
|