@champpaba/claude-agent-kit 1.1.1 → 1.4.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.
@@ -153,79 +153,31 @@ Report steps 1-3 BEFORE writing tests.
153
153
 
154
154
  ## Context Loading Strategy
155
155
 
156
- ### Step 0: Read Tech Stack & Package Manager (CRITICAL!)
156
+ **→ See:** `.claude/lib/context-loading-protocol.md` for complete protocol
157
157
 
158
- **BEFORE doing anything, read tech-stack.md:**
158
+ **Agent-Specific Additions (test-debug):**
159
159
 
160
- ```bash
161
- # Check if tech-stack.md exists
162
- .claude/contexts/domain/{project-name}/tech-stack.md
163
- ```
164
-
165
- **Extract:**
166
- 1. **Framework** (Next.js, FastAPI, Vue, etc.)
167
- 2. **Package Manager** (pnpm, npm, bun, uv, poetry, pip)
168
- 3. **Dependencies** (specific to this agent's role)
169
-
170
- **Action:**
171
- - Store framework → Use for Context7 search
172
- - Store package manager → **USE THIS for all install/run commands**
173
-
174
- **CRITICAL:** Never use `npm`, `pip`, or any other package manager without checking tech-stack.md first!
175
-
176
- ### Step 1: Load Universal Patterns (Always)
177
- - @.claude/contexts/patterns/testing.md
178
- - @.claude/contexts/patterns/error-handling.md
179
- - @.claude/contexts/patterns/logging.md
160
+ ### Test Framework Detection & Documentation
161
+ **After Level 0 discovery, detect test framework:**
180
162
 
181
- ### Step 2: Detect Test Framework
182
163
  ```
183
- Read package.json:
184
- - Found "vitest" → Testing framework = Vitest
185
- - Found "jest" → Testing framework = Jest
186
- - Found "@playwright/test" → E2E framework = Playwright
187
-
188
- Read requirements.txt:
189
- - Found "pytest" → Testing framework = Pytest
190
- ```
191
-
192
- ### Step 3: Load Framework Docs (Context7 - Dynamic)
193
-
194
- **IF Vitest:**
195
- ```
196
- Use Context7 MCP:
197
- mcp__context7__get-library-docs("/vitest-dev/vitest", {
198
- topic: "testing, expect, assertions, mocking",
199
- tokens: 2000
200
- })
164
+ package.json contains "vitest" → Testing = Vitest
165
+ package.json contains "jest" → Testing = Jest
166
+ package.json contains "@playwright/test" → E2E = Playwright
167
+ requirements.txt contains "pytest" → Testing = Pytest
201
168
  ```
202
169
 
203
- **IF Jest:**
204
- ```
205
- Use Context7 MCP:
206
- mcp__context7__get-library-docs("/jestjs/jest", {
207
- topic: "testing, matchers, mocking, setup",
208
- tokens: 2000
209
- })
210
- ```
170
+ **Then query Context7:**
171
+ - **Topic:** "testing, expect, assertions, mocking, fixtures"
172
+ - **Tokens:** 2000
211
173
 
212
- **IF Playwright:**
213
- ```
214
- Use Context7 MCP:
215
- mcp__context7__get-library-docs("/microsoft/playwright", {
216
- topic: "e2e testing, page object, assertions",
217
- tokens: 2000
218
- })
219
- ```
174
+ **Additional Patterns (Always):**
175
+ - @.claude/contexts/patterns/testing.md (MUST READ THOROUGHLY!)
220
176
 
221
- **IF Pytest:**
222
- ```
223
- Use Context7 MCP:
224
- mcp__context7__get-library-docs("/pytest-dev/pytest", {
225
- topic: "fixtures, assertions, parametrize",
226
- tokens: 2000
227
- })
228
- ```
177
+ **Quick Reference:**
178
+ - 📦 Package Manager: Read from `tech-stack.md` (see protocol)
179
+ - 🔍 Patterns: testing.md, error-handling.md, logging.md (universal)
180
+ - 🧪 Test Framework: Vitest, Jest, Playwright, Pytest (from Context7)
229
181
 
230
182
  ## Workflow
231
183
 
@@ -481,53 +433,25 @@ Recommendation:
481
433
 
482
434
  ## Documentation Policy
483
435
 
484
- ### NEVER Create Documentation Files Unless Explicitly Requested
485
- - DO NOT create: README.md, TEST_REPORT.md, DEBUG_LOG.md, or any other .md documentation files
486
- - DO NOT create: Test documentation files, debugging guides, or summary files
487
- - Exception: ONLY when user explicitly says "create test documentation" or "write a test report"
488
-
489
- ### ✅ Report Results as Verbose Text Output Instead
490
- - Return comprehensive text reports in your final message (not separate files)
491
- - Include all important details:
492
- - Test results (passed/failed counts)
493
- - Iterations performed
494
- - Fixes applied with explanations
495
- - Final status and coverage
496
- - Recommendations for next steps
497
- - Format: Use markdown in your response text, NOT separate .md files
498
-
499
- **Example:**
500
- ```
501
- ❌ BAD: Write TEST_RESULTS.md with detailed test logs
502
- Write DEBUG_REPORT.md with fix history
436
+ **→ See:** `.claude/contexts/patterns/code-standards.md` for complete policy
503
437
 
504
- GOOD: Return detailed test summary in final message
505
- Include all info but as response, not files
506
- ```
438
+ **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"
507
443
 
508
444
  ## Rules
509
445
 
510
446
  ### Package Manager (CRITICAL!)
511
- - ✅ **ALWAYS read tech-stack.md** before running ANY install/run commands
512
- - ✅ Use package manager specified in tech-stack.md
513
- - ✅ Never assume `npm`, `pip`, or any other package manager
514
- - ✅ For monorepos: use correct package manager for ecosystem
515
-
516
- **Example:**
517
- ```markdown
518
- # tech-stack.md shows:
519
- Package Manager: pnpm (JavaScript)
520
447
 
521
- CORRECT: pnpm test
522
- ✅ CORRECT: pnpm add -D vitest
523
- ❌ WRONG: npm test (ignored tech-stack.md!)
524
- ❌ WRONG: bun test (tech-stack says pnpm!)
525
- ```
448
+ **→ See:** `.claude/lib/context-loading-protocol.md` → Level 0 (Package Manager Discovery)
526
449
 
527
- **If tech-stack.md doesn't exist:**
528
- - Warn user to run `/agentsetup` first
529
- - Ask user which package manager to use
530
- - DO NOT proceed with hardcoded package manager
450
+ **Quick Reference:**
451
+ - ALWAYS read `tech-stack.md` before ANY install/run commands
452
+ - Use exact package manager from tech-stack.md (pnpm, npm, bun, uv, poetry, pip)
453
+ - NEVER assume or hardcode package manager
454
+ - ❌ If tech-stack.md missing → warn user to run `/agentsetup`
531
455
 
532
456
  ### Testing Standards
533
457
  - ✅ Run tests automatically (no manual testing)
@@ -669,91 +593,24 @@ Update current phase:
669
593
 
670
594
  ---
671
595
 
672
- ## Handoff to Next Agent (Optional but Recommended)
673
-
674
- **When completing a task, provide context for the next agent:**
675
-
676
- ### Template:
677
-
678
- ```markdown
679
- ## ✅ Task Complete: [Task Name]
680
-
681
- **Agent:** test-debug
682
-
683
- **What I Did:**
684
- - {summary-of-work-done}
685
- - {key-changes-made}
686
- - {files-created-or-modified}
687
-
688
- **For Next Agent:**
689
-
690
- {agent-specific-handoff-info}
691
-
692
- **Important Notes:**
693
- - {any-gotchas-or-warnings}
694
- - {configuration-needed}
695
- - {things-to-watch-out-for}
696
- ```
697
-
698
- ### Example Handoff (Test-Debug → Main Claude):
596
+ ## Handoff to Next Agent
699
597
 
700
- ```markdown
701
- ## ✅ Task Complete: Fix login test failures
702
-
703
- **Agent:** test-debug
704
-
705
- **What I Did:**
706
- - Fixed 3 failing tests in tests/auth/login.test.tsx
707
- - Issue was: mock API response format didn't match real API
708
- - Updated mocks to return {token, user} instead of just {token}
709
- - All tests now passing (12/12)
710
-
711
- **Test Results:**
712
-
713
- \`\`\`bash
714
- ✅ test_login_success (PASS)
715
- ✅ test_login_invalid_credentials (PASS)
716
- ✅ test_login_validation_error (PASS)
717
- ✅ test_login_network_error (PASS)
718
- ✅ test_logout_clears_state (PASS)
719
- ✅ test_protected_route_redirect (PASS)
720
- ... (6 more tests)
721
-
722
- Total: 12 passed, 0 failed
723
- Coverage: 87% (target: 85%)
724
- \`\`\`
598
+ **→ See:** `.claude/lib/handoff-protocol.md` for complete templates
725
599
 
726
- **For Main Claude:**
600
+ **Common Handoff Path (test-debug agent):**
727
601
 
728
- **Feature Status:** Complete and tested
729
-
730
- **What Works:**
731
- - Login form validates and submits correctly
732
- - API integration works (POST /api/auth/login)
733
- - Auth state management (Zustand)
734
- - Protected routes redirect to login
735
- - Error handling for all edge cases
736
-
737
- **Known Issues:** None
738
-
739
- **Next Steps (if any):**
740
- - [ ] Add "Remember Me" checkbox (optional)
741
- - [ ] Add "Forgot Password" link (future feature)
742
- - [ ] Add auto-refresh token logic (expires in 7 days)
743
-
744
- **Files Fixed:**
745
- - tests/auth/login.test.tsx (updated mocks)
746
- - tests/mocks/api.ts (fixed response format)
747
-
748
- **Iterations:** 2 (first fix: wrong mock format, second fix: added missing test)
749
- ```
602
+ ### test-debug Main Claude (orchestrator)
603
+ **Purpose:** Report test results and feature completion status
750
604
 
751
- ### Why This Helps:
752
- - Next agent doesn't need to read all your code
753
- - API contracts/interfaces are clear
754
- - Prevents miscommunication
755
- - Saves time (no need to reverse-engineer your work)
605
+ **What to include:**
606
+ - Test results summary (passed/failed counts, coverage percentage)
607
+ - Iterations performed (how many fix attempts)
608
+ - Fixes applied (what was changed and why)
609
+ - Feature status ( Complete, ⚠️ Partial, Blocked)
610
+ - Known issues or limitations
611
+ - Next steps or optional enhancements
612
+ - Files modified during debugging
756
613
 
757
- **Note:** This handoff format is optional but highly recommended for multi-agent workflows.
614
+ **Template:** See `lib/handoff-protocol.md` "test-debug orchestrator"
758
615
 
759
616
  ---