@champpaba/claude-agent-kit 2.1.6 → 2.2.1
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/CLAUDE.md +73 -7
- package/.claude/agents/_shared/pre-work-checklist.md +83 -1
- package/.claude/commands/csetup.md +990 -134
- package/.claude/contexts/patterns/validation-framework.md +51 -1
- package/.claude/lib/agent-executor.md +149 -0
- package/.claude/lib/feature-best-practices.md +386 -0
- package/README.md +30 -1
- package/package.json +1 -1
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:** 2.
|
|
5
|
-
> **Latest:**
|
|
4
|
+
> **Template Version:** 2.3.0 - Zero-Maintenance Tech Detection
|
|
5
|
+
> **Latest:** Dynamic library detection via Context7 (any language, no hardcoded mappings) + Claude 4.5 optimized agents
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -131,18 +131,36 @@ Universal, framework-agnostic template for AI-assisted development.
|
|
|
131
131
|
|
|
132
132
|
---
|
|
133
133
|
|
|
134
|
-
## 📚 Best Practices System (
|
|
134
|
+
## 📚 Best Practices System (v2.3.0 - Zero Maintenance)
|
|
135
135
|
|
|
136
136
|
**Quick Summary:**
|
|
137
|
-
- `/csetup` **
|
|
138
|
-
- **
|
|
137
|
+
- `/csetup` **dynamically detects any library** from spec text + package files (no hardcoded mappings)
|
|
138
|
+
- **Works with any language:** JavaScript, Python, Rust, Go, PHP, Ruby - automatically
|
|
139
|
+
- **Context7 validates** each potential library name and resolves to official docs
|
|
139
140
|
- Files created in `.claude/contexts/domain/project/best-practices/`
|
|
140
141
|
- **Agents read** best practices before coding (validated by agent-executor)
|
|
141
|
-
|
|
142
|
+
|
|
143
|
+
**Key Change in v2.3.0:**
|
|
144
|
+
- ❌ Old: Hardcoded regex patterns + manual ID mappings (required maintenance)
|
|
145
|
+
- ✅ New: NLP extraction + Context7 resolution (zero maintenance, any library)
|
|
146
|
+
|
|
147
|
+
**Detection Sources:**
|
|
148
|
+
| Source | Examples |
|
|
149
|
+
|--------|----------|
|
|
150
|
+
| Spec files | proposal.md, design.md, tasks.md |
|
|
151
|
+
| JS/TS | package.json, import statements |
|
|
152
|
+
| Python | requirements.txt, pyproject.toml, imports |
|
|
153
|
+
| Rust | Cargo.toml, use statements |
|
|
154
|
+
| Go | go.mod, import statements |
|
|
155
|
+
| PHP | composer.json |
|
|
156
|
+
| Ruby | Gemfile |
|
|
142
157
|
|
|
143
158
|
**Flow:**
|
|
144
159
|
```
|
|
145
|
-
/csetup →
|
|
160
|
+
/csetup → extract potential library names from ALL text sources
|
|
161
|
+
→ Context7 resolve-library-id (validates if real library)
|
|
162
|
+
→ Context7 get-library-docs (fetch best practices)
|
|
163
|
+
→ generate .md files for each verified library
|
|
146
164
|
/cdev → inject paths into prompt → agent reads → validation checks
|
|
147
165
|
```
|
|
148
166
|
|
|
@@ -278,6 +296,54 @@ User: "Build login system"
|
|
|
278
296
|
|
|
279
297
|
---
|
|
280
298
|
|
|
299
|
+
## 🆕 v2.3.0: Zero-Maintenance Tech Stack Detection
|
|
300
|
+
|
|
301
|
+
**Problem Solved:** Previously, `/csetup` required hardcoded regex patterns and Context7 ID mappings for each library. Adding support for new libraries (like SQLAlchemy, Pydantic, Rust crates) required code changes.
|
|
302
|
+
|
|
303
|
+
**Solution:** Dynamic detection that works with any library in any language without maintenance.
|
|
304
|
+
|
|
305
|
+
### How It Works
|
|
306
|
+
|
|
307
|
+
```
|
|
308
|
+
1. Extract potential library names from ALL text sources:
|
|
309
|
+
- Spec files (proposal.md, design.md, tasks.md)
|
|
310
|
+
- Package files (package.json, requirements.txt, Cargo.toml, go.mod, etc.)
|
|
311
|
+
- Import statements in code snippets
|
|
312
|
+
- Prose mentions ("using FastAPI", "with Prisma")
|
|
313
|
+
|
|
314
|
+
2. Send each candidate to Context7 resolve-library-id:
|
|
315
|
+
- If Context7 recognizes it → confirmed library ✅
|
|
316
|
+
- If not recognized → not a library, skip ❌
|
|
317
|
+
|
|
318
|
+
3. For confirmed libraries, fetch best practices:
|
|
319
|
+
- Context7 get-library-docs with "best practices" topic
|
|
320
|
+
- Generate .md file with patterns, anti-patterns, checklist
|
|
321
|
+
|
|
322
|
+
4. Result: Best practices for ANY library, automatically!
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
### Benefits
|
|
326
|
+
|
|
327
|
+
| Aspect | Before (v1.8.0) | After (v2.3.0) |
|
|
328
|
+
|--------|-----------------|----------------|
|
|
329
|
+
| New library support | Manual code change | Automatic |
|
|
330
|
+
| Python stack | Partial (FastAPI, Django only) | Full (SQLAlchemy, Pydantic, Click, etc.) |
|
|
331
|
+
| Rust support | None | Automatic |
|
|
332
|
+
| Go support | None | Automatic |
|
|
333
|
+
| Maintenance | Required for each library | Zero |
|
|
334
|
+
|
|
335
|
+
### Files Changed
|
|
336
|
+
|
|
337
|
+
| File | Change |
|
|
338
|
+
|------|--------|
|
|
339
|
+
| `csetup.md` Step 2.7 | Complete rewrite with dynamic detection |
|
|
340
|
+
| `extractPotentialLibraryNames()` | New helper for NLP extraction |
|
|
341
|
+
| `parseContext7Response()` | New helper for Context7 response parsing |
|
|
342
|
+
| `generateBestPracticesFile()` | Updated signature, includes Context7 ID |
|
|
343
|
+
| `detectAdditionalTech()` | Deprecated, delegates to new system |
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
281
347
|
## 🆕 v2.0.0: Claude 4.5 Optimization + Design System v2.0
|
|
282
348
|
|
|
283
349
|
**Based on:** [Claude 4 Best Practices](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-4-best-practices)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Pre-Work Checklist (Shared by All Agents)
|
|
2
2
|
|
|
3
|
-
> **Version:** 2.
|
|
3
|
+
> **Version:** 2.2.0 (Library Feasibility Validation)
|
|
4
4
|
> **Purpose:** Single source of truth for pre-work validation
|
|
5
5
|
|
|
6
6
|
---
|
|
@@ -49,6 +49,88 @@ WHY not defaults? Design spec has project-specific security requirements.
|
|
|
49
49
|
|
|
50
50
|
---
|
|
51
51
|
|
|
52
|
+
### Step 0.5: Library Feasibility Validation (v2.2.0)
|
|
53
|
+
|
|
54
|
+
**Before implementing, verify the chosen library supports ALL spec requirements:**
|
|
55
|
+
|
|
56
|
+
WHY: Implementing without verifying library capabilities leads to spec drift. Better to discover gaps early than during implementation.
|
|
57
|
+
|
|
58
|
+
1. **List spec requirements from design.md:**
|
|
59
|
+
|
|
60
|
+
Extract specific technical requirements, for example:
|
|
61
|
+
- "JWT access token 15min expiry"
|
|
62
|
+
- "Redis refresh token 30d"
|
|
63
|
+
- "Refresh token rotation on each use"
|
|
64
|
+
- "Token revocation capability"
|
|
65
|
+
|
|
66
|
+
2. **For each requirement, verify library support:**
|
|
67
|
+
|
|
68
|
+
- Check library documentation
|
|
69
|
+
- Query Context7 if available: "How to implement {requirement} with {library}?"
|
|
70
|
+
- Search for feature in library's plugin/extension list
|
|
71
|
+
- Check if feature is: built-in, plugin-available, or unsupported
|
|
72
|
+
|
|
73
|
+
3. **Report feasibility in your validation:**
|
|
74
|
+
|
|
75
|
+
```markdown
|
|
76
|
+
Library Feasibility Check:
|
|
77
|
+
- [ ] {requirement 1} → {library} supports: YES/PARTIAL/NO
|
|
78
|
+
- [ ] {requirement 2} → {library} supports: YES/PARTIAL/NO
|
|
79
|
+
- [ ] {requirement 3} → {library} supports: YES/PARTIAL/NO
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
4. **If ANY requirement is NOT FULLY supported:**
|
|
83
|
+
|
|
84
|
+
**STOP - Do not proceed with implementation**
|
|
85
|
+
|
|
86
|
+
Report to Main Claude using the Spec Deviation Protocol:
|
|
87
|
+
|
|
88
|
+
```markdown
|
|
89
|
+
⚠️ Library Capability Gap Detected
|
|
90
|
+
|
|
91
|
+
**Library:** {name}
|
|
92
|
+
**Requirement (from design.md):** {exact requirement text}
|
|
93
|
+
**Support Status:** NO / PARTIAL
|
|
94
|
+
|
|
95
|
+
**What library supports:** {alternative approach library offers}
|
|
96
|
+
**What spec requires:** {original requirement}
|
|
97
|
+
|
|
98
|
+
**Gap Analysis:**
|
|
99
|
+
{explain what cannot be implemented as specified}
|
|
100
|
+
|
|
101
|
+
**Options:**
|
|
102
|
+
A) Change library → {suggest alternative library that supports this}
|
|
103
|
+
B) Change spec → Update design.md to use what library supports
|
|
104
|
+
C) Custom implementation → Build missing feature on top of library
|
|
105
|
+
|
|
106
|
+
**My Recommendation:** {A/B/C} because {reasoning}
|
|
107
|
+
|
|
108
|
+
Awaiting decision before proceeding.
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
5. **Wait for explicit decision before implementing**
|
|
112
|
+
|
|
113
|
+
- Do NOT implement alternative approach silently
|
|
114
|
+
- Do NOT assume user would prefer simpler option
|
|
115
|
+
- Do NOT continue with "close enough" solution
|
|
116
|
+
|
|
117
|
+
WHY: Silent spec drift creates technical debt and user confusion. Explicit decisions create documented trade-offs.
|
|
118
|
+
|
|
119
|
+
**Example Gap Detection:**
|
|
120
|
+
```markdown
|
|
121
|
+
Library Feasibility Check:
|
|
122
|
+
- [x] JWT access token 15min → better-auth jwt plugin: YES ✅
|
|
123
|
+
- [x] Refresh token → better-auth: PARTIAL ⚠️ (session-based, not separate token)
|
|
124
|
+
- [ ] Refresh token rotation → better-auth: NO ❌
|
|
125
|
+
- [ ] Redis session storage → better-auth: NO ❌
|
|
126
|
+
|
|
127
|
+
⚠️ STOP - Gaps found in requirements 3 and 4
|
|
128
|
+
|
|
129
|
+
Reporting to Main Claude...
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
52
134
|
### Step 1-4: Standard Checks
|
|
53
135
|
|
|
54
136
|
1. **Context Discovery** - Load project context via agent-discovery.md
|