@champpaba/claude-agent-kit 2.3.0 โ†’ 2.5.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/CLAUDE.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # CLAUDE.md
2
2
 
3
3
  > **Navigation Hub for AI Agents**
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
4
+ > **Template Version:** 2.5.0 - Smart Topic Query
5
+ > **Latest:** Cross-library integration detection + Integration risk summary + Proactive error prevention
6
6
 
7
7
  ---
8
8
 
@@ -131,18 +131,22 @@ Universal, framework-agnostic template for AI-assisted development.
131
131
 
132
132
  ---
133
133
 
134
- ## ๐Ÿ“š Best Practices System (v2.3.0 - Zero Maintenance)
134
+ ## ๐Ÿ“š Best Practices System (v2.5.0 - Smart Topic Query)
135
135
 
136
136
  **Quick Summary:**
137
137
  - `/csetup` **dynamically detects any library** from spec text + package files (no hardcoded mappings)
138
138
  - **Works with any language:** JavaScript, Python, Rust, Go, PHP, Ruby - automatically
139
139
  - **Context7 validates** each potential library name and resolves to official docs
140
+ - **v2.5.0:** Smart Topic Query includes other library names for cross-library integration docs
141
+ - **v2.5.0:** Auto-generates `INTEGRATION_RISKS.md` with detected concerns
140
142
  - Files created in `.claude/contexts/domain/project/best-practices/`
141
- - **Agents read** best practices before coding (validated by agent-executor)
143
+ - **Agents read** best practices + integration risks before coding
142
144
 
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)
145
+ **Key Changes:**
146
+ | Version | Change |
147
+ |---------|--------|
148
+ | v2.3.0 | NLP extraction + Context7 resolution (zero maintenance) |
149
+ | v2.5.0 | Smart Topic Query + Integration Risk Detection |
146
150
 
147
151
  **Detection Sources:**
148
152
  | Source | Examples |
@@ -155,15 +159,24 @@ Universal, framework-agnostic template for AI-assisted development.
155
159
  | PHP | composer.json |
156
160
  | Ruby | Gemfile |
157
161
 
158
- **Flow:**
162
+ **Flow (v2.5.0):**
159
163
  ```
160
164
  /csetup โ†’ extract potential library names from ALL text sources
161
165
  โ†’ Context7 resolve-library-id (validates if real library)
162
- โ†’ Context7 get-library-docs (fetch best practices)
166
+ โ†’ Context7 get-library-docs (Smart Topic Query with other lib names)
167
+ โ†’ detect integration risks from docs content
163
168
  โ†’ generate .md files for each verified library
169
+ โ†’ generate INTEGRATION_RISKS.md if risks detected
164
170
  /cdev โ†’ inject paths into prompt โ†’ agent reads โ†’ validation checks
165
171
  ```
166
172
 
173
+ **Output Files:**
174
+ | File | Content |
175
+ |------|---------|
176
+ | `{lib}.md` | Library best practices with integration info |
177
+ | `INTEGRATION_RISKS.md` | Cross-library risks + checklist (if any detected) |
178
+ | `index.md` | Registry of all best practices files |
179
+
167
180
  ---
168
181
 
169
182
  ## ๐ŸŽจ Design System v2.0.0 (Interactive Setup)
@@ -185,19 +198,31 @@ Universal, framework-agnostic template for AI-assisted development.
185
198
  - ๐Ÿ“œ **Scroll Patterns:** stacking-cards, parallax, fade-in, slide-in
186
199
  - ๐Ÿ–ผ๏ธ **Decorative Direction:** USE/AVOID elements for theme consistency
187
200
 
188
- **Flow:**
201
+ **Flow (v2.4.0):**
189
202
  ```
190
203
  /extract โ†’ .claude/extractions/*.json
191
204
  โ†“
192
205
  /designsetup โ†’ tokens.json + patterns/*.md + STYLE_GUIDE.md
193
206
  โ†“
194
- /pageplan โ†’ page-plan.md (reads tokens.json, auto-detects page type)
207
+ /pageplan โ†’ page-plan.md (VISUAL: layout, components, animations, assets)
195
208
  โ†“
196
- /csetup โ†’ phases.md (reads page-plan.md)
209
+ /csetup โ†’ research-checklist.md (RESEARCH: best practices, content, UX)
210
+ โ†’ best-practices/*.md (Stack: Context7)
211
+ โ†’ phases.md
197
212
  โ†“
198
- /cdev โ†’ uxui-frontend (reads tokens.json + patterns/*.md selectively)
213
+ /cdev โ†’ uxui-frontend reads:
214
+ - tokens.json (design tokens)
215
+ - patterns/*.md (code patterns)
216
+ - page-plan.md (visual structure)
217
+ - research-checklist.md (content & UX)
199
218
  ```
200
219
 
220
+ **Separation of Concerns:**
221
+ | Command | Focus | Output |
222
+ |---------|-------|--------|
223
+ | `/pageplan` | Visual (layout, wireframe, animations) | `page-plan.md` |
224
+ | `/csetup` | Research (best practices, content, UX) | `research-checklist.md` |
225
+
201
226
  ---
202
227
 
203
228
  ## โšก Context Optimization (v2.0.0)
@@ -218,33 +243,30 @@ Universal, framework-agnostic template for AI-assisted development.
218
243
 
219
244
  ---
220
245
 
221
- ## ๐Ÿ“‹ Page Planning System (v2.0.0 - Auto Page Type Detection)
246
+ ## ๐Ÿ“‹ Page Planning System (v2.4.0 - Visual Planning Only)
222
247
 
223
248
  **โ†’ See:** `@/.claude/lib/detailed-guides/page-planning.md` for complete guide
224
249
 
225
250
  **Quick Summary:**
226
- - **Problem:** Agents duplicate components (Navbar 3x), use random colors, lorem ipsum content, wrong decorations for page type
227
- - **Solution:** `/pageplan @prd.md @brief.md` โ†’ Generates `openspec/changes/{id}/page-plan.md` with:
228
- - **Auto page type detection** (landing/dashboard/auth from proposal.md/tasks.md)
229
- - **tokens.json integration** (style, theme, animations, decorative direction)
230
- - **Selective pattern loading** (only load patterns relevant to page type)
251
+ - **Problem:** Agents duplicate components (Navbar 3x), wrong layout structure
252
+ - **Solution:** `/pageplan` โ†’ Generates `openspec/changes/{id}/page-plan.md` with:
231
253
  - Component reuse plan โœ… (prevent duplicates)
232
- - Buyer avatar analysis (Eugene Schwartz framework) **for marketing pages only**
233
- - Conversion-optimized content (pain โ†’ promise โ†’ CTA) **for marketing pages only**
254
+ - Layout wireframe (ASCII art for Desktop/Tablet/Mobile)
255
+ - Animation blueprint (hover, focus, transition patterns)
234
256
  - Asset checklist โœ… (performance-optimized)
235
257
 
236
- **Page Type Handling:**
237
- | Page Type | Decorations | Scroll Anims | Buyer Avatar | Patterns Loaded |
238
- |-----------|-------------|--------------|--------------|-----------------|
239
- | Landing/Marketing | โœ… Full | โœ… Enabled | โœ… Enabled | buttons, cards, scroll-anims, decorations |
240
- | Dashboard/Admin | โŒ Minimal | โŒ Disabled | โŒ Skipped | buttons, cards, forms |
241
- | Auth (Login/Register) | โŒ None | โŒ Disabled | โŒ Skipped | buttons, forms |
258
+ > **Note:** Content strategy and conversion copy moved to `/csetup` (Adaptive Depth Research)
259
+
260
+ **What Goes Where:**
261
+ | Concern | Command | Output File |
262
+ |---------|---------|-------------|
263
+ | Components, Layout, Animations | `/pageplan` | `page-plan.md` |
264
+ | Content, Conversion, UX Research | `/csetup` | `research-checklist.md` |
242
265
 
243
266
  **Benefits:**
244
- - Auto-detects page type from context (no manual config)
245
- - Theme + decorations from tokens.json applied consistently
246
- - 84% token reduction (selective pattern loading)
247
- - Conversion-optimized only where needed (marketing pages)
267
+ - Clear separation of Visual vs Research
268
+ - No duplication between commands
269
+ - Agents know exactly which file has which information
248
270
 
249
271
  ---
250
272
 
@@ -296,6 +318,208 @@ User: "Build login system"
296
318
 
297
319
  ---
298
320
 
321
+ ## ๐Ÿ†• v2.5.0: Smart Topic Query + Integration Risk Detection
322
+
323
+ **Problem Solved:** Context7 queries used static topic "best practices" which missed adapter/integration documentation. Example: Drizzle + Auth.js requires specific column naming (snake_case) but this wasn't detected, causing runtime errors.
324
+
325
+ **Solution:** Smart Topic Query includes other library names in topic + automatic integration risk detection.
326
+
327
+ ### How Smart Topic Query Works
328
+
329
+ ```
330
+ Old (v2.4.0):
331
+ topic: "best practices, patterns, anti-patterns, common mistakes"
332
+ โ†’ Misses adapter-specific docs
333
+
334
+ New (v2.5.0):
335
+ topic: "best practices, patterns, adapter, integration, schema, {other-lib-names}"
336
+ โ†’ Gets cross-library integration docs automatically
337
+ ```
338
+
339
+ ### Key Features
340
+
341
+ | Feature | Description |
342
+ |---------|-------------|
343
+ | **Smart Topic** | Includes other detected library names in Context7 topic |
344
+ | **Bidirectional Query** | Query BOTH libraries (Auth.js โ†’ Drizzle, Drizzle โ†’ Auth.js) |
345
+ | **Risk Pattern Detection** | Scans docs for adapter, schema, column, sync, webhook patterns |
346
+ | **INTEGRATION_RISKS.md** | Auto-generated summary of detected integration concerns |
347
+ | **Zero Maintenance** | No hardcoded library pairs - works with any combination |
348
+
349
+ ### Integration Risk Patterns Detected
350
+
351
+ | Pattern | Keywords | Example |
352
+ |---------|----------|---------|
353
+ | Adapter | adapter, drizzleadapter, prismaadapter | ORM + Auth integrations |
354
+ | Schema | column, snake_case, camelcase, mapping | Column naming mismatches |
355
+ | Sync | sync, migrate, syncurl, embedded replica | Mobile/Edge data sync |
356
+ | Webhook | webhook, webhookendpoint | Payment/notification handlers |
357
+ | Lifecycle | beforeall, aftereach, setup, teardown | Test configuration |
358
+
359
+ ### Output Files
360
+
361
+ | File | Content |
362
+ |------|---------|
363
+ | `best-practices/{lib}.md` | Library-specific best practices (enhanced with integration docs) |
364
+ | `best-practices/INTEGRATION_RISKS.md` | Cross-library risk summary + checklist |
365
+
366
+ ### Example Flow
367
+
368
+ ```
369
+ Detected: [drizzle, auth.js, stripe]
370
+
371
+ Query drizzle with topic: "best practices, adapter, integration, auth.js, stripe"
372
+ โ†’ Gets: Drizzle adapter patterns, column naming
373
+
374
+ Query auth.js with topic: "best practices, adapter, integration, drizzle, stripe"
375
+ โ†’ Gets: DrizzleAdapter config, usersTable/accountsTable schema
376
+
377
+ Query stripe with topic: "best practices, adapter, integration, drizzle, auth.js"
378
+ โ†’ Gets: Webhook patterns, payment integration
379
+
380
+ Risk Detection:
381
+ โ†’ auth.js mentions "drizzleadapter", "userstable" โ†’ SCHEMA pattern
382
+ โ†’ stripe mentions "webhook", "webhooksecret" โ†’ WEBHOOK pattern
383
+
384
+ Output:
385
+ โ†’ drizzle.md (with auth.js integration info)
386
+ โ†’ auth-js.md (with Drizzle adapter config)
387
+ โ†’ stripe.md (with webhook patterns)
388
+ โ†’ INTEGRATION_RISKS.md (summary of all detected risks)
389
+ ```
390
+
391
+ ### Files Changed
392
+
393
+ | File | Change |
394
+ |------|--------|
395
+ | `csetup.md` Step 2.7 | Smart Topic Query implementation |
396
+ | `detectIntegrationRisks()` | New: Pattern detection from docs |
397
+ | `generateIntegrationRiskSummary()` | New: INTEGRATION_RISKS.md output |
398
+
399
+ ---
400
+
401
+ ## ๐Ÿ†• v2.4.0: Adaptive Depth Research
402
+
403
+ **Problem Solved:** Previous feature detection was hardcoded (only 4 types: auth, payment, fileUpload, apiDesign) and used fixed standards. Missing domain-level best practices like "how to design a good database" or "healthcare compliance requirements."
404
+
405
+ **Solution:** Dynamic research layers that adapt to each change's complexity (0 to 10+ layers).
406
+
407
+ ### Key Principles
408
+
409
+ | Principle | Description |
410
+ |-----------|-------------|
411
+ | L1 = Best Practice (ALWAYS) | "เธ„เธ™เธญเธทเนˆเธ™เธ—เธณเธเธฑเธ™เธขเธฑเธ‡เน„เธ‡?" (How do others do it?) for ALL non-trivial changes |
412
+ | Dynamic Depth | No fixed min/max - truly adaptive (0-10+ layers) |
413
+ | Separation of Concerns | Visual (/designsetup) is STATIC, Strategy (research) is DYNAMIC |
414
+ | Per-Change Output | Generates `research-checklist.md` for each change |
415
+ | Design Conflict Warnings | Warns if industry practice conflicts with user's design choices |
416
+
417
+ ### Layer Examples by Change Type
418
+
419
+ | Change Type | Layers | Example Layers |
420
+ |-------------|--------|----------------|
421
+ | Typo fix, debug log | 0 | None needed |
422
+ | Simple API endpoint | 2 | Best Practice, API Design |
423
+ | Auth system | 4 | Best Practice, Security, API Design, Testing |
424
+ | E-commerce checkout | 7 | Best Practice, Security, UX, Payment, Integration, Performance, Testing |
425
+ | Healthcare portal | 10 | Best Practice, Security, Compliance (HIPAA), UX, Data Architecture, API, Performance, Testing, Integration, Audit |
426
+
427
+ ### Knowledge Sources (Separated)
428
+
429
+ | Step | Knowledge Type | Source | Example |
430
+ |------|----------------|--------|---------|
431
+ | **2.6** | Domain (HOW to design) | Claude's Knowledge | Normalization, UX patterns, Security |
432
+ | **2.7** | Stack (HOW to use tool) | Context7 | Prisma, React, Next.js |
433
+
434
+ ### How It Works
435
+
436
+ ```
437
+ 1. Analyze change from proposal.md, tasks.md, design.md
438
+ โ†’ Detect: primaryType, complexity, riskLevel, domains, features
439
+
440
+ 2. Determine research layers dynamically:
441
+ - Trivial (complexity โ‰ค 1, no UI/API/DB) โ†’ 0 layers
442
+ - Non-trivial โ†’ L1 Best Practice + context-specific layers
443
+
444
+ 3. Execute research per layer using Claude's knowledge:
445
+ - Claude knows: UX (Nielsen Norman, Baymard), DB (Codd), Security (OWASP)
446
+ - No static files needed - Claude reasons from training
447
+ - No WebSearch needed - domain knowledge is stable
448
+
449
+ 4. Generate research-checklist.md with:
450
+ - Key questions per layer
451
+ - Best practices (from Claude's knowledge)
452
+ - Anti-patterns to avoid
453
+ - Trade-offs explained
454
+ - Recommendations specific to THIS change
455
+
456
+ 5. Agents read research-checklist.md before implementing
457
+ ```
458
+
459
+ **WHY Claude's Knowledge?**
460
+ - Domain principles rarely change (Normalization = 50 years, REST = 20 years)
461
+ - No maintenance needed (no static files to update)
462
+ - Context-aware (Claude applies principles to YOUR specific change)
463
+ - Stack knowledge goes to Context7 (Step 2.7) which has live docs
464
+
465
+ ### Available Research Layers
466
+
467
+ | Layer | Triggered By |
468
+ |-------|--------------|
469
+ | Best Practice / Industry Standard | Always (non-trivial changes) |
470
+ | Security Requirements | hasAuth, hasPayment, hasSensitiveData |
471
+ | {Industry} Compliance | healthcare, fintech, or other regulated industries |
472
+ | User Experience Patterns | isExternalFacing + hasUI |
473
+ | Conversion Psychology | marketing/sales pages |
474
+ | Content Strategy | marketing/content pages |
475
+ | Data Architecture | hasDatabase, data-intensive |
476
+ | API Design | hasAPI |
477
+ | Multi-tenancy Patterns | SaaS with tenant isolation |
478
+ | Real-time Architecture | WebSocket, collaboration features |
479
+ | Performance Optimization | external-facing OR complexity โ‰ฅ 6 |
480
+ | Integration Patterns | external APIs, webhooks |
481
+ | Testing Strategy | HIGH risk OR complexity โ‰ฅ 7 |
482
+
483
+ ### Files Changed
484
+
485
+ | File | Change |
486
+ |------|--------|
487
+ | `csetup.md` Step 2.6 | Complete rewrite - Adaptive Depth Research |
488
+ | `analyzeChangeCharacteristics()` | New: semantic analysis of change context |
489
+ | `determineResearchLayers()` | New: dynamic layer selection |
490
+ | `executeLayerResearch()` | New: Context7 + semantic research |
491
+ | `generateResearchChecklist()` | New: markdown output per change |
492
+ | `checkDesignConflicts()` | New: warns on design vs industry fit |
493
+
494
+ ### Output Example
495
+
496
+ ```markdown
497
+ # Research Checklist: healthcare-portal
498
+
499
+ > Generated by Adaptive Depth Research (v2.4.0)
500
+ > Complexity: 9/10 | Risk: HIGH
501
+
502
+ ## Summary
503
+
504
+ | Layer | Focus | Status |
505
+ |-------|-------|--------|
506
+ | L1: Best Practice | How do others implement healthcare? | โณ Pending |
507
+ | L2: Security Requirements | What security measures? | โณ Pending |
508
+ | L3: Healthcare Compliance | What HIPAA regulations? | โณ Pending |
509
+ ...
510
+
511
+ ## L1: Best Practice / Industry Standard
512
+
513
+ **Focus:** How do others implement healthcare portals?
514
+
515
+ ### Key Questions
516
+ - [ ] What is the industry standard for healthcare portals?
517
+ - [ ] What are common patterns and anti-patterns?
518
+ ...
519
+ ```
520
+
521
+ ---
522
+
299
523
  ## ๐Ÿ†• v2.3.0: Zero-Maintenance Tech Stack Detection
300
524
 
301
525
  **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.