@champpaba/claude-agent-kit 3.0.3 → 3.2.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.md +180 -0
- package/.claude/CLAUDE.md +30 -27
- package/.claude/agents/_shared/pre-work-checklist.md +57 -9
- package/.claude/commands/cdev.md +36 -0
- package/.claude/commands/csetup.md +227 -1791
- package/.claude/contexts/patterns/tdd-classification.md +1 -1
- package/.claude/lib/README.md +3 -3
- package/.claude/lib/detailed-guides/taskmaster-analysis.md +1 -1
- package/.claude/lib/task-analyzer.md +144 -0
- package/.claude/lib/tdd-workflow.md +2 -1
- package/package.json +1 -1
- package/.claude/lib/tdd-classifier.md +0 -345
package/.claude/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,186 @@
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## v3.2.0: Consolidated Pre-Work Context
|
|
9
|
+
|
|
10
|
+
**Problem Solved:** `/csetup` generated two separate pseudocode outputs (`research-checklist.md` and `INTEGRATION_RISKS.md`) that were never actually created. Agents had to discover context from multiple scattered sources.
|
|
11
|
+
|
|
12
|
+
**Solution:** Consolidated all agent context into a single `pre-work-context.md` file with direct execution instructions. Merged Step 2.7 (Best Practices) into Step 2.6.
|
|
13
|
+
|
|
14
|
+
### Key Changes
|
|
15
|
+
|
|
16
|
+
| Component | Before | After |
|
|
17
|
+
|-----------|--------|-------|
|
|
18
|
+
| Step 2.6 | ~1000 lines of pseudocode | ~300 lines of direct instructions |
|
|
19
|
+
| Step 2.7 | Separate best practices step | Merged into Step 2.6 |
|
|
20
|
+
| Output files | research-checklist.md + INTEGRATION_RISKS.md + best-practices/*.md | Single `pre-work-context.md` |
|
|
21
|
+
| Agent discovery | Multiple files to read | One file with all context |
|
|
22
|
+
|
|
23
|
+
### Step 2.6 Structure (New - v3.2.0)
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
Step 2.6.1: Analyze Change Characteristics (type, complexity, risk)
|
|
27
|
+
Step 2.6.2: Detect Libraries (from package files + specs)
|
|
28
|
+
Step 2.6.3: Fetch Best Practices via Context7 (direct MCP calls)
|
|
29
|
+
Step 2.6.4: Determine Research Layers (adaptive depth)
|
|
30
|
+
Step 2.6.5: Detect Integration Warnings (cross-library)
|
|
31
|
+
Step 2.6.6: Generate Critical Checklist Items (security/compliance)
|
|
32
|
+
Step 2.6.7: Write pre-work-context.md (single consolidated file)
|
|
33
|
+
Step 2.6.8: Output Summary
|
|
34
|
+
Step 2.6.9: Skip Conditions
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### pre-work-context.md Structure
|
|
38
|
+
|
|
39
|
+
```markdown
|
|
40
|
+
# Pre-Work Context: {changeId}
|
|
41
|
+
|
|
42
|
+
## 1. Change Analysis (type, complexity, risk)
|
|
43
|
+
## 2. Library Best Practices (from Context7)
|
|
44
|
+
## 3. Research Findings (domain knowledge)
|
|
45
|
+
## 4. Integration Warnings (cross-library concerns)
|
|
46
|
+
## 5. Critical Checklist (security/compliance must-haves)
|
|
47
|
+
## 6. Quick Reference (package manager, commands)
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Agent Pre-Work Checklist Update
|
|
51
|
+
|
|
52
|
+
**Version:** 3.0.0 (Pre-Work Context Integration)
|
|
53
|
+
|
|
54
|
+
- Step 0: Read pre-work-context.md (NEW - primary source)
|
|
55
|
+
- Step 0.1: Library Requirements Check (fallback)
|
|
56
|
+
- Step 0.2: Library Feasibility Validation (was 0.5)
|
|
57
|
+
- Step 0.3: Memory Context Query (was 0.6)
|
|
58
|
+
|
|
59
|
+
### Files Changed
|
|
60
|
+
|
|
61
|
+
| File | Change |
|
|
62
|
+
|------|--------|
|
|
63
|
+
| `csetup.md` | Rewrote Step 2.6 with direct execution |
|
|
64
|
+
| `csetup.md` | Removed Step 2.7 (merged into 2.6) |
|
|
65
|
+
| `csetup.md` | Renumbered Step 2.8 → Step 2.7 |
|
|
66
|
+
| `pre-work-checklist.md` | Added Step 0 (read pre-work-context.md) |
|
|
67
|
+
| `pre-work-checklist.md` | Renumbered steps (0.5→0.2, 0.6→0.3) |
|
|
68
|
+
| `CLAUDE.md` | Updated to v3.2.0 |
|
|
69
|
+
|
|
70
|
+
### Why This Matters
|
|
71
|
+
|
|
72
|
+
**Before:**
|
|
73
|
+
- Agents had to read 5+ files to get context
|
|
74
|
+
- research-checklist.md was pseudocode that never executed
|
|
75
|
+
- INTEGRATION_RISKS.md was pseudocode that never executed
|
|
76
|
+
- Context was scattered and inconsistent
|
|
77
|
+
|
|
78
|
+
**After:**
|
|
79
|
+
- Agents read ONE file (`pre-work-context.md`) in STEP 0
|
|
80
|
+
- All context is consolidated and actually generated
|
|
81
|
+
- Main Claude follows direct instructions (not pseudocode)
|
|
82
|
+
- Integration warnings + checklist items in one place
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## v3.1.1: Direct Best Practices Execution
|
|
87
|
+
|
|
88
|
+
**Problem Solved:** Step 2.7 (Auto-Setup Best Practices) was written as pseudocode with helper functions (`extractLibrariesSemantically`, `parseContext7Response`, etc.) that Main Claude never actually executed. Best practices files were documented but never created.
|
|
89
|
+
|
|
90
|
+
**Solution:** Rewrote Step 2.7 as direct, executable instructions that Main Claude can follow. No more pseudocode - just clear steps with actual MCP tool names.
|
|
91
|
+
|
|
92
|
+
### Key Changes
|
|
93
|
+
|
|
94
|
+
| Component | Before | After |
|
|
95
|
+
|-----------|--------|-------|
|
|
96
|
+
| Step 2.7 | ~1000 lines of pseudocode | ~130 lines of direct instructions |
|
|
97
|
+
| Helper functions | 6 fake functions | Removed entirely |
|
|
98
|
+
| MCP tool calls | Written as code syntax | Written as clear instructions |
|
|
99
|
+
| Output format | Complex extraction logic | Simple template |
|
|
100
|
+
|
|
101
|
+
### Step 2.7 Structure (New)
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
Step 2.7.1: Detect Libraries (from package.json, requirements.txt, spec files)
|
|
105
|
+
Step 2.7.2: Resolve via Context7 (call MCP tools directly)
|
|
106
|
+
Step 2.7.3: Create Best Practices Files (using template)
|
|
107
|
+
Step 2.7.4: Create index.md (registry)
|
|
108
|
+
Step 2.7.5: Output Summary
|
|
109
|
+
Step 2.7.6: Skip Conditions
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Files Changed
|
|
113
|
+
|
|
114
|
+
| File | Change |
|
|
115
|
+
|------|--------|
|
|
116
|
+
| `csetup.md` | Rewrote Step 2.7, removed ~1000 lines of pseudocode |
|
|
117
|
+
| `csetup.md` | Removed helper functions (extractLibrariesSemantically, etc.) |
|
|
118
|
+
| `csetup.md` | Updated detectAdditionalTech as REMOVED |
|
|
119
|
+
| `CLAUDE.md` | Updated version to 3.1.1 |
|
|
120
|
+
|
|
121
|
+
### Why This Matters
|
|
122
|
+
|
|
123
|
+
Before: Main Claude would read Step 2.7 as documentation and skip it.
|
|
124
|
+
After: Main Claude follows clear instructions and actually calls Context7.
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## v3.1.0: TDD Classification + Development Principles Injection
|
|
129
|
+
|
|
130
|
+
**Problem Solved:** TDD classification was a simple one-liner (`risk=HIGH || complexity>=7`) that missed critical patterns like auth, payment, and external integrations. Development principles (SOLID, DRY, KISS) were documented but never injected to agents.
|
|
131
|
+
|
|
132
|
+
**Solution:** Comprehensive TDD classification based on `tdd-classification.md` patterns, integrated into `task-analyzer.md` Step 2.6. Development principles injected to ALL agents via `/cdev`.
|
|
133
|
+
|
|
134
|
+
### Key Changes
|
|
135
|
+
|
|
136
|
+
| Component | Before | After |
|
|
137
|
+
|-----------|--------|-------|
|
|
138
|
+
| TDD classification | 1-line in csetup.md | Full pattern matching in task-analyzer.md |
|
|
139
|
+
| development-principles.md | Listed but not used | Injected to ALL agents via /cdev |
|
|
140
|
+
| tdd-classifier.md | Duplicate file | Deleted (merged into tdd-classification.md) |
|
|
141
|
+
|
|
142
|
+
### TDD Classification (Step 2.6)
|
|
143
|
+
|
|
144
|
+
Now classifies based on:
|
|
145
|
+
|
|
146
|
+
| Pattern | Examples | TDD Required |
|
|
147
|
+
|---------|----------|--------------|
|
|
148
|
+
| Security operations | auth, jwt, encrypt, permission | ✅ Always |
|
|
149
|
+
| Financial operations | payment, stripe, calculate, tax | ✅ Always |
|
|
150
|
+
| External integrations | webhook, sendgrid, twilio | ✅ Always |
|
|
151
|
+
| Data transformations | serialize, parse, etl | ✅ Always |
|
|
152
|
+
| Complex UI | multi-step, wizard, keyboard-nav | ✅ Always |
|
|
153
|
+
| Simple CRUD reads | get, list, fetch | ❌ Test-alongside OK |
|
|
154
|
+
| Presentational UI | button, card, modal | ❌ No TDD |
|
|
155
|
+
| Database/Integration | schema, migration, validation | ❌ No TDD |
|
|
156
|
+
|
|
157
|
+
### Development Principles Injection
|
|
158
|
+
|
|
159
|
+
`/cdev` now injects to ALL agent prompts:
|
|
160
|
+
|
|
161
|
+
```markdown
|
|
162
|
+
## 🏛️ Development Principles (Level 1 - ALL Agents)
|
|
163
|
+
|
|
164
|
+
**REQUIRED READING:** @.claude/contexts/patterns/development-principles.md
|
|
165
|
+
|
|
166
|
+
| Principle | Summary |
|
|
167
|
+
|-----------|---------|
|
|
168
|
+
| **KISS** | Choose simple solutions over complex ones |
|
|
169
|
+
| **YAGNI** | Build only what you need now |
|
|
170
|
+
| **SRP** | One responsibility per module |
|
|
171
|
+
| **DRY** | Single source of truth for all knowledge |
|
|
172
|
+
| **Fail Fast** | Detect and raise errors immediately |
|
|
173
|
+
| **Observability** | Log everything that matters |
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Files Changed
|
|
177
|
+
|
|
178
|
+
| File | Change |
|
|
179
|
+
|------|--------|
|
|
180
|
+
| `task-analyzer.md` | Added Step 2.6 TDD Classification |
|
|
181
|
+
| `csetup.md` | Updated phase generation to use TDD from tasks |
|
|
182
|
+
| `cdev.md` | Added development-principles injection |
|
|
183
|
+
| `tdd-classifier.md` | **DELETED** (merged) |
|
|
184
|
+
| `CLAUDE.md` | Updated references and version |
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
8
188
|
## v3.0.0: Template-Free Architecture (Task Analyzer v2.0)
|
|
9
189
|
|
|
10
190
|
**Problem Solved:** Phase templates (`phase-templates.json`) were limiting and caused task loss. When `tasks.md` had 5 detailed phases but template had only 2, tasks disappeared. Templates overrode the single source of truth.
|
package/.claude/CLAUDE.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# CLAUDE.md
|
|
2
2
|
|
|
3
3
|
> **Navigation Hub for AI Agents**
|
|
4
|
-
> **Template Version:** 3.
|
|
5
|
-
> **Latest:**
|
|
4
|
+
> **Template Version:** 3.2.0 - Consolidated Pre-Work Context
|
|
5
|
+
> **Latest:** Step 2.6 generates `pre-work-context.md` - single file with all agent context
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
| `README.md` | **Visual design summary** (human-readable) | UI/Frontend phases |
|
|
27
27
|
| `data.yaml` | Design tokens + psychology (~300 lines) | Quick UI reference |
|
|
28
28
|
| `page-plan.md` | UI component layout + content strategy | uxui-frontend agent |
|
|
29
|
+
| `pre-work-context.md` | **v3.2.0!** All agent context (best practices, warnings, checklist) | All agents - STEP 0 ✨ |
|
|
29
30
|
| `phases.md` | Execution plan with agent assignments | All phases |
|
|
30
31
|
| `flags.json` | Progress tracking | All phases |
|
|
31
32
|
|
|
@@ -75,6 +76,8 @@ Universal, framework-agnostic template for AI-assisted development.
|
|
|
75
76
|
- `@/.claude/contexts/design/index.md` (General design principles - fallback)
|
|
76
77
|
|
|
77
78
|
**Development:**
|
|
79
|
+
- `@/.claude/contexts/patterns/development-principles.md` - **v3.1.0!** SOLID, DRY, KISS, Fail Fast (Level 1 - ALL agents) ✨
|
|
80
|
+
- `@/.claude/contexts/patterns/tdd-classification.md` - TDD workflow classification patterns
|
|
78
81
|
- `@/.claude/contexts/patterns/task-classification.md` (Agent selection guide)
|
|
79
82
|
- `@/.claude/contexts/patterns/agent-coordination.md` (When to run agents parallel/sequential)
|
|
80
83
|
- `@/.claude/contexts/patterns/error-recovery.md` (How agents handle errors & escalate)
|
|
@@ -86,7 +89,7 @@ Universal, framework-agnostic template for AI-assisted development.
|
|
|
86
89
|
**Project Setup:**
|
|
87
90
|
- `/extract https://site.com` - Extract design from reference sites
|
|
88
91
|
- `/designsetup @prd.md` - Interactive design system setup
|
|
89
|
-
- `/csetup` - **v3.
|
|
92
|
+
- `/csetup` - **v3.2.0:** Generates `pre-work-context.md` with best practices, research, warnings, checklists
|
|
90
93
|
|
|
91
94
|
**Page Planning (UI Tasks) - v2.0.0:**
|
|
92
95
|
- `/pageplan @prd.md @brief.md` - Generate page structure with auto page type detection
|
|
@@ -122,30 +125,28 @@ Universal, framework-agnostic template for AI-assisted development.
|
|
|
122
125
|
**Implementation Logic:**
|
|
123
126
|
- `@/.claude/lib/README.md` - Implementation logic overview
|
|
124
127
|
- `@/.claude/lib/agent-executor.md` - Agent retry & escalation logic (used by /cdev) + Incremental testing execution
|
|
125
|
-
- `@/.claude/lib/
|
|
126
|
-
- `@/.claude/lib/task-analyzer.md` - **v2.0!** Template-free AI-driven task analysis ✨
|
|
128
|
+
- `@/.claude/lib/task-analyzer.md` - **v3.1.0!** Template-free task analysis with TDD classification (Step 2.6) ✨
|
|
127
129
|
- `@/.claude/lib/flags-updater.md` - Progress tracking protocol (Main Claude updates flags.json)
|
|
128
130
|
- `@/.claude/lib/agent-router.md` - Mandatory agent routing rules (enforce delegation)
|
|
129
131
|
- `@/.claude/contexts/patterns/agent-discovery.md` - Shared agent discovery flow
|
|
130
132
|
|
|
131
133
|
---
|
|
132
134
|
|
|
133
|
-
## 📚 Best Practices System (
|
|
135
|
+
## 📚 Best Practices System (v3.2.0 - Consolidated Pre-Work Context)
|
|
134
136
|
|
|
135
137
|
**Quick Summary:**
|
|
136
|
-
- `/csetup`
|
|
137
|
-
- **
|
|
138
|
-
- **Context7 validates** each
|
|
139
|
-
- **
|
|
140
|
-
- **
|
|
141
|
-
- Files created in `.claude/contexts/domain/project/best-practices/`
|
|
142
|
-
- **Agents read** best practices + integration risks before coding
|
|
138
|
+
- `/csetup` generates **single `pre-work-context.md`** with ALL agent context
|
|
139
|
+
- **Consolidates:** Best practices, research findings, integration warnings, critical checklists
|
|
140
|
+
- **Context7 validates** each library and fetches best practices
|
|
141
|
+
- **Agents read ONE file** instead of multiple scattered files
|
|
142
|
+
- **File location:** `openspec/changes/{changeId}/pre-work-context.md`
|
|
143
143
|
|
|
144
144
|
**Key Changes:**
|
|
145
145
|
| Version | Change |
|
|
146
146
|
|---------|--------|
|
|
147
147
|
| v2.3.0 | NLP extraction + Context7 resolution (zero maintenance) |
|
|
148
148
|
| v2.5.0 | Smart Topic Query + Integration Risk Detection |
|
|
149
|
+
| v3.2.0 | **Consolidated `pre-work-context.md`** (single file for all agent context) |
|
|
149
150
|
|
|
150
151
|
**Detection Sources:**
|
|
151
152
|
| Source | Examples |
|
|
@@ -158,23 +159,22 @@ Universal, framework-agnostic template for AI-assisted development.
|
|
|
158
159
|
| PHP | composer.json |
|
|
159
160
|
| Ruby | Gemfile |
|
|
160
161
|
|
|
161
|
-
**Flow (
|
|
162
|
+
**Flow (v3.2.0):**
|
|
162
163
|
```
|
|
163
|
-
/csetup →
|
|
164
|
-
→
|
|
165
|
-
→ Context7
|
|
166
|
-
→
|
|
167
|
-
→
|
|
168
|
-
→ generate
|
|
169
|
-
|
|
164
|
+
/csetup → analyze change (type, complexity, risk)
|
|
165
|
+
→ detect libraries from spec + package files
|
|
166
|
+
→ Context7 resolve + fetch best practices
|
|
167
|
+
→ determine research layers
|
|
168
|
+
→ detect integration warnings
|
|
169
|
+
→ generate critical checklist items
|
|
170
|
+
→ write pre-work-context.md (single file)
|
|
171
|
+
/cdev → agents read pre-work-context.md in STEP 0
|
|
170
172
|
```
|
|
171
173
|
|
|
172
|
-
**Output
|
|
173
|
-
| File |
|
|
174
|
-
|
|
175
|
-
| `
|
|
176
|
-
| `INTEGRATION_RISKS.md` | Cross-library risks + checklist (if any detected) |
|
|
177
|
-
| `index.md` | Registry of all best practices files |
|
|
174
|
+
**Output File:**
|
|
175
|
+
| File | Sections |
|
|
176
|
+
|------|----------|
|
|
177
|
+
| `pre-work-context.md` | 1. Change Analysis, 2. Library Best Practices, 3. Research Findings, 4. Integration Warnings, 5. Critical Checklist, 6. Quick Reference |
|
|
178
178
|
|
|
179
179
|
---
|
|
180
180
|
|
|
@@ -310,6 +310,9 @@ User: "Build login system"
|
|
|
310
310
|
**Recent versions:**
|
|
311
311
|
| Version | Key Feature |
|
|
312
312
|
|---------|-------------|
|
|
313
|
+
| v3.2.0 | Consolidated Pre-Work Context (single `pre-work-context.md` for agents) |
|
|
314
|
+
| v3.1.1 | Direct Best Practices Execution (Step 2.7 rewritten, no pseudocode) |
|
|
315
|
+
| v3.1.0 | TDD Classification + Development Principles Injection |
|
|
313
316
|
| v3.0.0 | Template-Free Architecture (AI-driven Task Analyzer v2.0) |
|
|
314
317
|
| v2.8.0 | Critical Flow Injection (auto-inject security/compliance items) |
|
|
315
318
|
| v2.7.0 | UX Testing Agent (persona-based, approval gate) |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Pre-Work Checklist (Shared by All Agents)
|
|
2
2
|
|
|
3
|
-
> **Version:**
|
|
3
|
+
> **Version:** 3.0.0 (Pre-Work Context Integration)
|
|
4
4
|
> **Purpose:** Single source of truth for pre-work validation
|
|
5
5
|
|
|
6
6
|
---
|
|
@@ -9,7 +9,40 @@
|
|
|
9
9
|
|
|
10
10
|
Complete these steps before implementation to ensure alignment with project standards:
|
|
11
11
|
|
|
12
|
-
### Step 0:
|
|
12
|
+
### Step 0: Read Pre-Work Context (v3.2.0 - NEW)
|
|
13
|
+
|
|
14
|
+
**FIRST: Check if pre-work-context.md exists:**
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
openspec/changes/{changeId}/pre-work-context.md
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**If file exists, read it and extract:**
|
|
21
|
+
1. **Change Analysis** - Type, complexity, risk level
|
|
22
|
+
2. **Library Best Practices** - DO's and DON'Ts for each library
|
|
23
|
+
3. **Research Findings** - Domain-specific considerations
|
|
24
|
+
4. **Integration Warnings** - Cross-library concerns
|
|
25
|
+
5. **Critical Checklist** - Security/compliance items to verify
|
|
26
|
+
|
|
27
|
+
**Report:**
|
|
28
|
+
```markdown
|
|
29
|
+
Pre-Work Context: (Step 0)
|
|
30
|
+
- [x] Read pre-work-context.md
|
|
31
|
+
- Change Type: {type}
|
|
32
|
+
- Complexity: {n}/10
|
|
33
|
+
- Risk: {level}
|
|
34
|
+
- Libraries: {list}
|
|
35
|
+
- Critical Items: {count}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**If file doesn't exist:**
|
|
39
|
+
- User may not have run `/csetup` with v3.2.0+
|
|
40
|
+
- Fall back to Step 0.1 (Library Requirements Check)
|
|
41
|
+
- Suggest: "Run /csetup to generate pre-work-context.md"
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
### Step 0.1: Library Requirements Check
|
|
13
46
|
|
|
14
47
|
**Scan for required libraries before writing code:**
|
|
15
48
|
|
|
@@ -49,7 +82,7 @@ WHY not defaults? Design spec has project-specific security requirements.
|
|
|
49
82
|
|
|
50
83
|
---
|
|
51
84
|
|
|
52
|
-
### Step 0.
|
|
85
|
+
### Step 0.2: Library Feasibility Validation (v2.2.0)
|
|
53
86
|
|
|
54
87
|
**Before implementing, verify the chosen library supports ALL spec requirements:**
|
|
55
88
|
|
|
@@ -131,7 +164,7 @@ Reporting to Main Claude...
|
|
|
131
164
|
|
|
132
165
|
---
|
|
133
166
|
|
|
134
|
-
### Step 0.
|
|
167
|
+
### Step 0.3: Memory Context Query (v2.2.0 - claude-mem Integration)
|
|
135
168
|
|
|
136
169
|
**Before implementation, query claude-mem for related past work:**
|
|
137
170
|
|
|
@@ -193,7 +226,17 @@ Result: #12345 - "Chose rotating refresh tokens with Redis storage"
|
|
|
193
226
|
```markdown
|
|
194
227
|
Pre-Implementation Validation
|
|
195
228
|
|
|
196
|
-
|
|
229
|
+
Pre-Work Context: (Step 0 - v3.2.0)
|
|
230
|
+
- [ ] Read pre-work-context.md (if exists)
|
|
231
|
+
- Change Type: {type}
|
|
232
|
+
- Complexity: {n}/10
|
|
233
|
+
- Risk Level: {level}
|
|
234
|
+
- Libraries: {list from pre-work-context.md}
|
|
235
|
+
- Critical Checklist Items: {count}
|
|
236
|
+
- Integration Warnings: {count}
|
|
237
|
+
(OR: pre-work-context.md not found - using fallback steps)
|
|
238
|
+
|
|
239
|
+
Library Requirements: (Step 0.1 - fallback)
|
|
197
240
|
- [ ] Scanned tasks.md for "Install X" patterns
|
|
198
241
|
- [ ] Scanned design.md for design decisions
|
|
199
242
|
- Required libraries: {list from tasks.md/design.md}
|
|
@@ -205,7 +248,7 @@ Design Spec Implementation: (Step 5)
|
|
|
205
248
|
- {requirement 1 from design.md}
|
|
206
249
|
- {requirement 2 from design.md}
|
|
207
250
|
|
|
208
|
-
Memory Context: (Step 0.
|
|
251
|
+
Memory Context: (Step 0.3 - claude-mem)
|
|
209
252
|
- [ ] Queried claude-mem for related past work
|
|
210
253
|
- Relevant observations:
|
|
211
254
|
- {#ID: summary → will apply how}
|
|
@@ -214,7 +257,7 @@ Memory Context: (Step 0.6 - claude-mem)
|
|
|
214
257
|
Project Context:
|
|
215
258
|
- Project: {name}
|
|
216
259
|
- Stack: {tech-stack}
|
|
217
|
-
- Package Manager: {pm} (from tech-stack.md)
|
|
260
|
+
- Package Manager: {pm} (from tech-stack.md or pre-work-context.md)
|
|
218
261
|
|
|
219
262
|
Patterns Loaded:
|
|
220
263
|
- [ ] error-handling.md
|
|
@@ -223,13 +266,18 @@ Patterns Loaded:
|
|
|
223
266
|
- [ ] code-standards.md
|
|
224
267
|
- [ ] {agent-specific patterns}
|
|
225
268
|
|
|
226
|
-
Best Practices:
|
|
227
|
-
- [ ] {framework} best practices loaded
|
|
269
|
+
Best Practices: (from pre-work-context.md Section 2)
|
|
270
|
+
- [ ] {framework} best practices loaded
|
|
271
|
+
|
|
272
|
+
Critical Checklist: (from pre-work-context.md Section 5)
|
|
273
|
+
- [ ] {critical item 1}
|
|
274
|
+
- [ ] {critical item 2}
|
|
228
275
|
|
|
229
276
|
Ready to Implement:
|
|
230
277
|
- [ ] Task understood
|
|
231
278
|
- [ ] Dependencies identified
|
|
232
279
|
- [ ] Required libraries identified
|
|
280
|
+
- [ ] Critical checklist reviewed
|
|
233
281
|
- [ ] Memory context applied (if available)
|
|
234
282
|
- [ ] Approach planned (using specified libraries)
|
|
235
283
|
```
|
package/.claude/commands/cdev.md
CHANGED
|
@@ -163,6 +163,42 @@ Design Spec Implementation:
|
|
|
163
163
|
---
|
|
164
164
|
`
|
|
165
165
|
|
|
166
|
+
// v3.1.0: Add Level 1 Universal Patterns (development-principles.md) for ALL agents
|
|
167
|
+
// Source: context-loading-protocol.md - Level 1 patterns apply to ALL agents
|
|
168
|
+
const devPrinciplesPath = '.claude/contexts/patterns/development-principles.md'
|
|
169
|
+
if (fileExists(devPrinciplesPath)) {
|
|
170
|
+
prompt += `
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## 🏛️ Development Principles (Level 1 - ALL Agents)
|
|
175
|
+
|
|
176
|
+
**REQUIRED READING:** @${devPrinciplesPath}
|
|
177
|
+
|
|
178
|
+
These principles apply to ALL code written by ALL agents:
|
|
179
|
+
|
|
180
|
+
**Quick Reference:**
|
|
181
|
+
| Principle | Summary |
|
|
182
|
+
|-----------|---------|
|
|
183
|
+
| **KISS** | Choose simple solutions over complex ones |
|
|
184
|
+
| **YAGNI** | Build only what you need now |
|
|
185
|
+
| **SRP** | One responsibility per module |
|
|
186
|
+
| **DRY** | Single source of truth for all knowledge |
|
|
187
|
+
| **Fail Fast** | Detect and raise errors immediately |
|
|
188
|
+
| **Observability** | Log everything that matters |
|
|
189
|
+
|
|
190
|
+
**Report format:**
|
|
191
|
+
\`\`\`
|
|
192
|
+
✅ Development Principles Applied
|
|
193
|
+
- KISS ✓ (simple implementation)
|
|
194
|
+
- DRY ✓ (no duplication)
|
|
195
|
+
- Separation of Concerns ✓
|
|
196
|
+
\`\`\`
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
`
|
|
200
|
+
}
|
|
201
|
+
|
|
166
202
|
// Add best-practices reference for ALL agents
|
|
167
203
|
const bpDir = '.claude/contexts/domain/project/best-practices/'
|
|
168
204
|
if (fileExists(bpDir)) {
|