@champpaba/claude-agent-kit 2.1.1 → 2.1.2

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.
@@ -18,6 +18,13 @@ color: blue
18
18
 
19
19
  Complete these steps before implementation:
20
20
 
21
+ 0. **Library Requirements Check**
22
+ - Review `tasks.md` for "Install X", "Configure X" patterns
23
+ - Review `design.md` for "D1: Use X Library" decisions
24
+ - Use the specified libraries (WHY: team chose them for specific reasons)
25
+ - Example: tasks.md says "Install shadcn/ui" → Use shadcn components, follow its docs
26
+
27
+
21
28
  1. **Context Discovery** - Load project context (STEP 0)
22
29
  2. **Design Loading** - Load style guide or design principles (STEP 0.5)
23
30
  3. **Component Search** - Check existing components (STEP 3)
@@ -18,6 +18,13 @@ color: green
18
18
 
19
19
  Complete these steps before implementation:
20
20
 
21
+ 0. **Library Requirements Check**
22
+ - Review `tasks.md` for "Install X", "Configure X" patterns
23
+ - Review `design.md` for "D1: Use X Library" decisions
24
+ - Use the specified libraries (WHY: team chose them for specific reasons)
25
+ - Example: tasks.md says "Install react-query" → Use react-query, follow its docs
26
+
27
+
21
28
  1. **Pattern Loading** - Load error-handling, state management patterns
22
29
  2. **UI Review** - Read existing UI components (from uxui-frontend)
23
30
  3. **API Review** - Read API endpoints (from backend/integration)
@@ -7,7 +7,7 @@ color: cyan
7
7
 
8
8
  # Backend Agent
9
9
 
10
- > **Version:** 2.0.0 (Claude 4.5 Optimized)
10
+ > **Version:** 2.1.2 (Instruction-based Library Detection)
11
11
  > **Role:** Create API endpoints with validation, business logic, and error handling.
12
12
 
13
13
  ---
@@ -18,6 +18,12 @@ color: cyan
18
18
 
19
19
  Complete these steps before implementation:
20
20
 
21
+ 0. **Library Requirements Check**
22
+ - Review `tasks.md` for "Install X", "Configure X" patterns
23
+ - Review `design.md` for "D1: Use X Library" decisions
24
+ - Use the specified libraries (WHY: team chose them for specific reasons)
25
+ - Example: tasks.md says "Install better-auth" → Use better-auth, follow its docs
26
+
21
27
  1. **Pattern Loading** - Load error-handling, logging, testing patterns
22
28
  2. **Endpoint Search** - Check for existing similar endpoints
23
29
  3. **TDD Plan** - If TDD required, plan test cases first
@@ -7,7 +7,7 @@ color: pink
7
7
 
8
8
  # Database Agent
9
9
 
10
- > **Version:** 2.0.0 (Claude 4.5 Optimized)
10
+ > **Version:** 2.1.2 (Instruction-based Library Detection)
11
11
  > **Role:** Design schemas, create migrations, write complex queries, optimize performance.
12
12
 
13
13
  ---
@@ -18,6 +18,12 @@ color: pink
18
18
 
19
19
  Complete these steps before implementation:
20
20
 
21
+ 0. **Library Requirements Check**
22
+ - Review `tasks.md` for "Install X", "Configure X" patterns
23
+ - Review `design.md` for "D1: Use X Library" decisions
24
+ - Use the specified libraries (WHY: team chose them for specific reasons)
25
+ - Example: design.md says "Use Drizzle ORM" → Use Drizzle, follow its docs
26
+
21
27
  1. **Pattern Loading** - Load ORM patterns from Context7
22
28
  2. **Schema Search** - Check existing models/schemas
23
29
  3. **Design Plan** - Plan tables, relationships, indexes
@@ -1,6 +1,6 @@
1
1
  # Pre-Work Checklist (Shared by All Agents)
2
2
 
3
- > **Version:** 2.0.0 (Claude 4.5 Optimized)
3
+ > **Version:** 2.1.2 (Instruction-based Library Detection)
4
4
  > **Purpose:** Single source of truth for pre-work validation
5
5
 
6
6
  ---
@@ -9,6 +9,40 @@
9
9
 
10
10
  Complete these steps before implementation to ensure alignment with project standards:
11
11
 
12
+ ### Step 0: Library Requirements Check
13
+
14
+ **Scan for required libraries before writing code:**
15
+
16
+ 1. **Read `tasks.md`** - Look for these patterns:
17
+ - `Install X and dependencies` → Use library X
18
+ - `Configure X with Y adapter` → Use X with adapter Y
19
+ - Backtick packages like `better-auth` → Required dependency
20
+
21
+ 2. **Read `design.md`** - Look for these patterns:
22
+ - `### D1: Use X Library` → Decision to use X
23
+ - `**Decision:** Use X` → Chosen library
24
+ - Alternatives table → Shows why X was chosen over others
25
+
26
+ 3. **List required libraries** in your validation report
27
+
28
+ 4. **Use the libraries specified in tasks.md/design.md**
29
+ - WHY: The team chose these libraries for specific reasons (compatibility, features, constraints)
30
+ - Custom implementations waste effort and may miss edge cases the library handles
31
+
32
+ **Example:**
33
+ ```
34
+ tasks.md says: "Install better-auth and dependencies"
35
+ → Use better-auth library
36
+ → Follow better-auth documentation patterns
37
+
38
+ WHY not custom? better-auth handles OAuth flows, session management,
39
+ and security edge cases that custom code would need to re-implement.
40
+ ```
41
+
42
+ ---
43
+
44
+ ### Step 1-4: Standard Checks
45
+
12
46
  1. **Context Discovery** - Load project context via agent-discovery.md
13
47
  2. **Pattern Loading** - Load relevant patterns for your agent type
14
48
  3. **Validation Report** - Provide pre-implementation validation report
@@ -23,6 +57,11 @@ Complete these steps before implementation to ensure alignment with project stan
23
57
  ```markdown
24
58
  Pre-Implementation Validation
25
59
 
60
+ Library Requirements: (Step 0)
61
+ - [ ] Scanned tasks.md for "Install X" patterns
62
+ - [ ] Scanned design.md for design decisions
63
+ - Required libraries: {list from tasks.md/design.md}
64
+
26
65
  Project Context:
27
66
  - Project: {name}
28
67
  - Stack: {tech-stack}
@@ -41,7 +80,8 @@ Best Practices:
41
80
  Ready to Implement:
42
81
  - [ ] Task understood
43
82
  - [ ] Dependencies identified
44
- - [ ] Approach planned
83
+ - [ ] Required libraries identified
84
+ - [ ] Approach planned (using specified libraries)
45
85
  ```
46
86
 
47
87
  ---
@@ -49,9 +89,10 @@ Ready to Implement:
49
89
  ## Why This Matters
50
90
 
51
91
  Pre-work validation prevents:
92
+ - **Wrong library choices** - Using custom code when a library was already chosen by the team
52
93
  - Misaligned implementations (wrong patterns, wrong style)
53
94
  - Duplicate components (not searching existing code first)
54
95
  - Wrong package manager usage (CI/CD breaks)
55
96
  - Missing best practices (outdated patterns)
56
97
 
57
- → 80% of implementation issues caught at validation stage
98
+ → 80% of implementation issues are caught at validation stage
@@ -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 + best practices - v1.8.0)
97
+ // 4.1: Build agent prompt (with design reference + best practices - v2.1.2)
98
98
  function buildAgentPrompt(phase, changeContext) {
99
99
  let prompt = `
100
100
  # Phase ${phase.phase_number}: ${phase.name}
@@ -106,6 +106,47 @@ ${changeContext.proposal}
106
106
  ${changeContext.tasks}
107
107
 
108
108
  ${phase.instructions}
109
+
110
+ ---
111
+
112
+ ## 📦 Library Requirements
113
+
114
+ **Scan for required libraries before implementation:**
115
+
116
+ 1. **Review tasks.md above** for these patterns:
117
+ - "Install X and dependencies" → Use library X
118
+ - "Configure X with Y adapter" → Use X with adapter Y
119
+ - Backtick packages like \`better-auth\` → Required dependency
120
+
121
+ 2. **Review design.md** (in change context) for:
122
+ - "### D1: Use X Library" → Decision to use X
123
+ - "**Decision:** Use X" → Chosen library
124
+ - Alternatives table shows why this library was chosen
125
+
126
+ 3. **Use the specified libraries**
127
+ - WHY: The team chose these for compatibility, features, or constraints
128
+ - Custom implementations duplicate effort and miss edge cases the library handles
129
+ - Follow library documentation patterns for consistency
130
+
131
+ **Example:**
132
+ \`\`\`
133
+ tasks.md: "Install better-auth and dependencies"
134
+ → Use better-auth library
135
+ → Follow better-auth docs for setup
136
+
137
+ WHY not custom? better-auth handles OAuth, sessions, security
138
+ edge cases that custom code would need to re-implement.
139
+ \`\`\`
140
+
141
+ **Report required libraries in your validation:**
142
+ \`\`\`
143
+ Required Libraries Found:
144
+ - better-auth (tasks.md line 6)
145
+ - @better-auth/drizzle (tasks.md line 6)
146
+ - ioredis (design.md D2)
147
+ \`\`\`
148
+
149
+ ---
109
150
  `
110
151
 
111
152
  // Add best-practices reference for ALL agents
package/README.md CHANGED
@@ -27,6 +27,12 @@ cak init
27
27
  | frontend | 3 | Connect UI to API |
28
28
  | test-debug | 4 | Tests & fixes |
29
29
 
30
+ ## Features
31
+
32
+ - **Instruction-based Library Detection** - Agents scan `tasks.md`/`design.md` for required libraries
33
+ - **Cross-session Context** - `PROJECT_STATUS.yml` maintains state across sessions
34
+ - **Design System v2.0** - Interactive setup with theme selection
35
+
30
36
  ## Commands
31
37
 
32
38
  **CLI:** `cak init` | `cak update`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@champpaba/claude-agent-kit",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "description": "Universal multi-agent template for Claude Code - AI-assisted development with specialized agents",
5
5
  "main": "bin/cli.js",
6
6
  "bin": {