@claudetools/tools 0.7.5 → 0.7.6

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.
@@ -191,6 +191,23 @@ export function buildOrchestratorPrompt(params) {
191
191
 
192
192
  <!-- Layer 4: Domain Knowledge -->
193
193
  <domain_knowledge>
194
+ <memory_best_practices priority="CRITICAL">
195
+ When storing facts with memory_store_fact(), follow these rules:
196
+
197
+ ✅ STORE (learned contextual knowledge):
198
+ - Project discoveries: "portal-v2 HAD_ANTI_PATTERN TanStack Query unused despite being in dependencies"
199
+ - User preferences: "Owen PREFERS_WORKFLOW Comprehensive analysis → Review → Approve with 'go' → Parallel dispatch"
200
+ - Architectural decisions WHY: "auth-service REJECTED JWT because stateless tokens don't support session invalidation"
201
+ - Solutions that worked: "Hardcoded colors SOLVED_BY Creating src/lib/colors.ts with design tokens"
202
+
203
+ ❌ DON'T STORE (generic documentation):
204
+ - Tool behavior: "task_plan creates tasks with ready status" (already in API docs)
205
+ - Universal knowledge: "React uses JSX" (not learned, universal)
206
+ - Temporary state: "Current task is in_progress" (session-specific)
207
+
208
+ Rule of thumb: "Would I need to rediscover this in 3 months?" → YES = store, NO = don't store
209
+ </memory_best_practices>
210
+
194
211
  <available_workers>
195
212
  ${availableWorkers.length > 0
196
213
  ? availableWorkers.map(w => `- ${w}`).join('\n ')
@@ -139,6 +139,25 @@ function buildStandardsSection() {
139
139
  - Include file paths with line numbers in references
140
140
  </formatting>
141
141
 
142
+ <memory_usage priority="CRITICAL">
143
+ When storing facts with memory_store_fact(), follow these rules:
144
+
145
+ ✅ STORE (learned contextual knowledge):
146
+ - Project discoveries: Anti-patterns found, bugs fixed, patterns discovered
147
+ - User preferences: Workflows, communication styles learned through interaction
148
+ - Architectural decisions WHY: Reasoning behind choices, rejected alternatives
149
+ - Solutions that worked: Specific implementations with context
150
+
151
+ ❌ DON'T STORE (generic documentation):
152
+ - Tool behavior: How the tool system works (already in API docs)
153
+ - Universal knowledge: Programming concepts, language features
154
+ - Temporary state: Current task status, session-specific data
155
+
156
+ Rule of thumb: "Would I need to rediscover this in 3 months?"
157
+ → YES = store it (learned pattern, specific to this context)
158
+ → NO = don't store it (universal knowledge, temporary state)
159
+ </memory_usage>
160
+
142
161
  <documentation_files priority="MANDATORY">
143
162
  NEVER create .md files in random locations. Follow these rules:
144
163
 
package/dist/tools.js CHANGED
@@ -89,7 +89,27 @@ export function registerToolDefinitions(server) {
89
89
  },
90
90
  {
91
91
  name: 'memory_store_fact',
92
- description: 'Store a specific fact as a relationship between two entities. Use this when you learn something concrete about entities.',
92
+ description: `Store a specific fact as a relationship between two entities. Use this when you learn something concrete about entities.
93
+
94
+ CRITICAL - WHAT TO STORE:
95
+ ✅ LEARNED patterns discovered through work (not generic knowledge)
96
+ ✅ PROJECT-SPECIFIC decisions and their rationale (the WHY, not just the WHAT)
97
+ ✅ USER PREFERENCES learned through repeated interactions
98
+ ✅ SOLUTIONS that worked for specific problems
99
+ ✅ Ask yourself: "Would I need to rediscover this in 3 months?" → If YES, store it
100
+
101
+ CRITICAL - WHAT NOT TO STORE:
102
+ ❌ Generic tool documentation (that's already in API docs)
103
+ ❌ Universal programming knowledge (language features, best practices)
104
+ ❌ Temporary state or session-specific data
105
+ ❌ System behavior that's documented in the codebase
106
+ ❌ Ask yourself: "Is this specific to THIS context or universal?" → If universal, DON'T store it
107
+
108
+ EXAMPLES:
109
+ ✅ GOOD: "portal-v2 HAD_SECURITY_ISSUE Mux webhook signature verification returned true unconditionally - Fixed with HMAC-SHA256"
110
+ ✅ GOOD: "Owen PREFERS_WORKFLOW Comprehensive analysis before task creation → Review → Approve with 'go' → Parallel dispatch"
111
+ ❌ BAD: "task_plan CREATES_TASKS_WITH ready status not pending" (generic system behavior)
112
+ ❌ BAD: "React USES JSX for templating" (universal knowledge)`,
93
113
  inputSchema: {
94
114
  type: 'object',
95
115
  properties: {
@@ -107,7 +127,7 @@ export function registerToolDefinitions(server) {
107
127
  },
108
128
  context: {
109
129
  type: 'string',
110
- description: 'Description or context of the fact',
130
+ description: 'Description or context of the fact - focus on WHY and project-specific details',
111
131
  },
112
132
  project_id: {
113
133
  type: 'string',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claudetools/tools",
3
- "version": "0.7.5",
3
+ "version": "0.7.6",
4
4
  "description": "Persistent AI memory, task management, and codebase intelligence for Claude Code",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",