@champpaba/claude-agent-kit 3.0.2 → 3.0.3

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.
Files changed (46) hide show
  1. package/.claude/CHANGELOG.md +527 -0
  2. package/.claude/CLAUDE.md +98 -586
  3. package/.claude/agents/_shared/pre-work-checklist.md +53 -0
  4. package/.claude/commands/csetup.md +65 -0
  5. package/.claude/commands/cview.md +364 -364
  6. package/.claude/contexts/design/accessibility.md +611 -611
  7. package/.claude/contexts/design/layout.md +400 -400
  8. package/.claude/contexts/design/responsive.md +551 -551
  9. package/.claude/contexts/design/shadows.md +522 -522
  10. package/.claude/contexts/design/typography.md +465 -465
  11. package/.claude/contexts/domain/README.md +164 -164
  12. package/.claude/contexts/patterns/agent-coordination.md +388 -388
  13. package/.claude/contexts/patterns/development-principles.md +513 -513
  14. package/.claude/contexts/patterns/error-handling.md +478 -478
  15. package/.claude/contexts/patterns/logging.md +424 -424
  16. package/.claude/contexts/patterns/tdd-classification.md +516 -516
  17. package/.claude/contexts/patterns/testing.md +413 -413
  18. package/.claude/lib/tdd-classifier.md +345 -345
  19. package/.claude/lib/validation-gates.md +484 -484
  20. package/.claude/settings.local.json +42 -42
  21. package/.claude/templates/PROJECT_STATUS.template.yml +16 -41
  22. package/.claude/templates/context-template.md +45 -45
  23. package/.claude/templates/flags-template.json +42 -42
  24. package/.claude/templates/phases-sections/accessibility-test.md +17 -17
  25. package/.claude/templates/phases-sections/api-design.md +37 -37
  26. package/.claude/templates/phases-sections/backend-tests.md +16 -16
  27. package/.claude/templates/phases-sections/backend.md +37 -37
  28. package/.claude/templates/phases-sections/business-logic-validation.md +16 -16
  29. package/.claude/templates/phases-sections/component-tests.md +17 -17
  30. package/.claude/templates/phases-sections/contract-backend.md +16 -16
  31. package/.claude/templates/phases-sections/contract-frontend.md +16 -16
  32. package/.claude/templates/phases-sections/database.md +35 -35
  33. package/.claude/templates/phases-sections/e2e-tests.md +16 -16
  34. package/.claude/templates/phases-sections/fix-implementation.md +17 -17
  35. package/.claude/templates/phases-sections/frontend-integration.md +18 -18
  36. package/.claude/templates/phases-sections/manual-flow-test.md +15 -15
  37. package/.claude/templates/phases-sections/manual-ux-test.md +16 -16
  38. package/.claude/templates/phases-sections/refactor-implementation.md +17 -17
  39. package/.claude/templates/phases-sections/refactor.md +16 -16
  40. package/.claude/templates/phases-sections/regression-tests.md +15 -15
  41. package/.claude/templates/phases-sections/responsive-test.md +16 -16
  42. package/.claude/templates/phases-sections/script-implementation.md +43 -43
  43. package/.claude/templates/phases-sections/test-coverage.md +16 -16
  44. package/.claude/templates/phases-sections/user-approval.md +14 -14
  45. package/LICENSE +21 -21
  46. package/package.json +1 -1
@@ -131,6 +131,52 @@ Reporting to Main Claude...
131
131
 
132
132
  ---
133
133
 
134
+ ### Step 0.6: Memory Context Query (v2.2.0 - claude-mem Integration)
135
+
136
+ **Before implementation, query claude-mem for related past work:**
137
+
138
+ WHY: Avoid repeating mistakes, leverage past decisions, maintain consistency.
139
+
140
+ 1. **Identify current task keywords:**
141
+ - Component name (e.g., "authentication", "payment")
142
+ - Technology (e.g., "JWT", "Stripe")
143
+ - Pattern type (e.g., "form validation", "API endpoint")
144
+
145
+ 2. **Query past observations:**
146
+ Ask naturally - mem-search skill auto-invokes:
147
+ ```
148
+ "What decisions were made about {component}?"
149
+ "Did we solve similar problems with {technology}?"
150
+ "Any past bugs related to {pattern}?"
151
+ ```
152
+
153
+ 3. **Apply relevant learnings:**
154
+ - If past decision exists → Follow established pattern
155
+ - If past bug was fixed → Apply the fix
156
+ - If conflict with current spec → Note and report to Main Claude
157
+
158
+ 4. **Report in validation:**
159
+ ```markdown
160
+ Memory Context: (Step 0.6)
161
+ - [ ] Queried claude-mem for related past work
162
+ - Relevant observations found:
163
+ - [#ID] {summary} → Will apply: {how}
164
+ - No relevant observations: Proceeding fresh
165
+ ```
166
+
167
+ **Example:**
168
+ ```
169
+ Task: Implement refresh token endpoint
170
+
171
+ Query: "decisions about refresh tokens"
172
+ Result: #12345 - "Chose rotating refresh tokens with Redis storage"
173
+
174
+ → Apply: Use rotating tokens + Redis (not in-memory)
175
+ → Report: "Following decision #12345 - rotating tokens"
176
+ ```
177
+
178
+ ---
179
+
134
180
  ### Step 1-4: Standard Checks
135
181
 
136
182
  1. **Context Discovery** - Load project context via agent-discovery.md
@@ -159,6 +205,12 @@ Design Spec Implementation: (Step 5)
159
205
  - {requirement 1 from design.md}
160
206
  - {requirement 2 from design.md}
161
207
 
208
+ Memory Context: (Step 0.6 - claude-mem)
209
+ - [ ] Queried claude-mem for related past work
210
+ - Relevant observations:
211
+ - {#ID: summary → will apply how}
212
+ - OR: No relevant observations found
213
+
162
214
  Project Context:
163
215
  - Project: {name}
164
216
  - Stack: {tech-stack}
@@ -178,6 +230,7 @@ Ready to Implement:
178
230
  - [ ] Task understood
179
231
  - [ ] Dependencies identified
180
232
  - [ ] Required libraries identified
233
+ - [ ] Memory context applied (if available)
181
234
  - [ ] Approach planned (using specified libraries)
182
235
  ```
183
236
 
@@ -158,6 +158,71 @@ if (fileExists(projectStatusPath)) {
158
158
  }
159
159
  ```
160
160
 
161
+ ### Step 1.6: Memory Context Query (v2.2.0 - claude-mem Integration)
162
+
163
+ **WHY:** Query past work to leverage decisions, avoid repeating mistakes, and maintain consistency.
164
+
165
+ ```typescript
166
+ // Extract keywords from change-id and proposal title
167
+ const changeKeywords = changeId.split('-').join(' ')
168
+ const proposalPath = `openspec/changes/${changeId}/proposal.md`
169
+ const proposalContent = fileExists(proposalPath) ? Read(proposalPath) : ''
170
+ const proposalTitle = proposalContent.match(/^#\s+(.+)/m)?.[1] || changeId
171
+
172
+ output(`\n🧠 Querying claude-mem for related past work...`)
173
+
174
+ // Use mem-search skill to find related observations
175
+ // The skill auto-invokes when asking about past work
176
+ const queries = [
177
+ `decisions about ${changeKeywords}`,
178
+ `bugs related to ${changeKeywords}`,
179
+ `implementations of ${changeKeywords}`
180
+ ]
181
+
182
+ // Claude will auto-invoke mem-search for these queries
183
+ // Results are stored for inclusion in research-checklist.md
184
+
185
+ let pastLearnings = []
186
+
187
+ // Note: In practice, Main Claude asks these questions naturally
188
+ // and mem-search skill returns relevant observations
189
+
190
+ output(` Searched for: ${changeKeywords}`)
191
+ output(` (Results will be included in research-checklist.md if relevant)`)
192
+ output(``)
193
+
194
+ // Store for later use in research-checklist.md generation
195
+ // pastLearnings will be populated by mem-search results
196
+ ```
197
+
198
+ **Integration with research-checklist.md:**
199
+
200
+ When generating `research-checklist.md` (Step 2.6), include a "Past Learnings" section:
201
+
202
+ ```markdown
203
+ ## Past Learnings (from claude-mem)
204
+
205
+ > Related observations from previous sessions:
206
+
207
+ | ID | Type | Summary | Relevance |
208
+ |----|------|---------|-----------|
209
+ | #12345 | decision | Chose Drizzle over Prisma | HIGH |
210
+ | #12340 | bugfix | Fixed N+1 query in user list | MEDIUM |
211
+
212
+ ### Key Takeaways:
213
+ - Use Drizzle patterns established in #12345
214
+ - Watch for N+1 queries (see #12340 for solution)
215
+ ```
216
+
217
+ If no relevant observations found:
218
+ ```markdown
219
+ ## Past Learnings (from claude-mem)
220
+
221
+ No related past work found. Proceeding fresh.
222
+ ```
223
+
224
+ ---
225
+
161
226
  ### Step 2: Read OpenSpec Files
162
227
 
163
228
  Read in order: