@unifiedmemory/cli 1.3.14 → 1.3.15

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.
@@ -1,82 +1,76 @@
1
1
  // Unique marker to detect if instructions already present
2
- export const MEMORY_INSTRUCTIONS_MARKER = '<!-- UNIFIEDMEMORY_INSTRUCTIONS_V2 -->';
2
+ export const MEMORY_INSTRUCTIONS_MARKER = '<!-- UNIFIEDMEMORY_INSTRUCTIONS_V3 -->';
3
3
 
4
4
  export function getMemoryInstructions() {
5
5
  return `${MEMORY_INSTRUCTIONS_MARKER}
6
6
 
7
- # UnifiedMemory Integration (REQUIRED)
7
+ # STOP - Read Before ANY Code Task
8
8
 
9
- This project uses UnifiedMemory for persistent knowledge management. The \`unifiedmemory\` MCP server is configured and MUST be used for all relevant queries.
9
+ **MANDATORY**: Call \`search_notes\` BEFORE writing any code. Always. No exceptions.
10
10
 
11
- ## Available Tools
11
+ ## Pre-Implementation Checklist
12
12
 
13
- The \`unifiedmemory\` MCP server provides these tools (call them like any MCP tool):
13
+ Before ANY coding task, you MUST:
14
+ - [ ] Call \`search_notes\` with relevant keywords
15
+ - [ ] Review results for existing patterns/decisions
16
+ - [ ] Mention what you found (or didn't) in your response
17
+ - [ ] THEN start implementation
14
18
 
15
- | Tool | Purpose | Required Parameters |
16
- |------|---------|---------------------|
17
- | \`search_notes\` | **Primary tool** - Search project knowledge base | \`query\` (search text) |
18
- | \`create_note\` | Record decisions, plans, or completions | \`summary_text\`, \`topic\` |
19
- | \`list_notes\` | List all notes in current project | None |
20
- | \`get_note\` | Retrieve a specific note by ID | \`note_id\` |
21
- | \`list_topics\` | List available topics/categories | None |
22
- | \`create_topic\` | Create a new topic for organization | \`name\` |
23
- | \`list_projects\` | List available projects | None |
19
+ ---
24
20
 
25
- All tools automatically use the correct project context - no additional configuration needed.
21
+ ## WRONG
26
22
 
27
- ## MANDATORY: Search Before Implementing
23
+ \`\`\`
24
+ User: "Create a calculator app"
25
+ Assistant: [immediately writes code] ← NEVER DO THIS
26
+ \`\`\`
28
27
 
29
- **REQUIREMENT**: Before responding to ANY coding task, feature request, or implementation question, you MUST:
28
+ ## CORRECT
30
29
 
31
- 1. Call the \`search_notes\` tool with the user's query or relevant keywords
32
- 2. Review returned results for prior decisions, patterns, or context
33
- 3. Incorporate relevant findings into your response
34
- 4. Mention what context you found (or didn't find) in your response
30
+ \`\`\`
31
+ User: "Create a calculator app"
32
+ Assistant: [calls search_notes first]
33
+ Assistant: "No relevant patterns found in UnifiedMemory. Proceeding..."
34
+ Assistant: [writes code]
35
+ \`\`\`
35
36
 
36
- ### When to Search
37
+ ---
37
38
 
38
- You MUST search before:
39
- - Implementing any feature (search for existing patterns)
40
- - Fixing any bug (search for related issues)
41
- - Answering architecture questions (search for design decisions)
42
- - Modifying any component (search for existing conventions)
43
- - ANY coding task, no exceptions
39
+ ## When to Search (ALWAYS)
44
40
 
45
- ### Example Workflow
41
+ - Before implementing ANY feature ← search first
42
+ - Before fixing ANY bug ← search first
43
+ - Before answering architecture questions ← search first
44
+ - Before modifying ANY component ← search first
45
+ - For "simple" tasks ← search first (context always helps)
46
46
 
47
- \`\`\`
48
- User: "Add authentication to the API"
49
-
50
- Step 1: Call search_notes with query "authentication API security"
51
- Step 2: Review results - found: "Decision: Use JWT with refresh tokens"
52
- Step 3: Implement following the established pattern
53
- Step 4: Respond: "Based on prior decisions in UnifiedMemory, I'll use JWT..."
54
- \`\`\`
47
+ ---
55
48
 
56
- ## Do NOT Skip These Tools
49
+ ## MCP Tool Reference
57
50
 
58
- - NEVER start implementing without calling \`search_notes\` first
59
- - ❌ NEVER assume patterns without checking the knowledge base
60
- - NEVER skip search for "simple" tasks - context always helps
61
- - ALWAYS search even if you think you know the answer
62
- - ALWAYS mention search results (or lack thereof) in your response
63
- - ALWAYS use these tools when they can provide relevant context
51
+ | Tool | Purpose | Parameters |
52
+ |------|---------|------------|
53
+ | \`search_notes\` | **Search knowledge base** | \`body: {q: "search text"}\` |
54
+ | \`create_note\` | Record decisions/completions | \`body: {summary_text: "...", topic: "..."}\` |
55
+ | \`list_notes\` | Browse all notes | None |
56
+ | \`get_note\` | Get note by ID | \`body: {note_id: "..."}\` |
57
+ | \`list_topics\` | List categories | None |
58
+ | \`create_topic\` | Create category | \`body: {name: "..."}\` |
64
59
 
65
- ## Recording Knowledge with create_note
60
+ Project context is automatic - no extra config needed.
66
61
 
67
- After completing significant work, use \`create_note\` to record:
68
- - Implementation decisions and rationale
69
- - Completed features or fixes
70
- - Architectural patterns established
71
- - Gotchas or lessons learned
62
+ ---
72
63
 
73
- Keep notes concise (under 1000 characters) and focus on the "why" not the "what".
64
+ ## After Completing Work
74
65
 
75
- ## Additional Tools
66
+ Use \`create_note\` to record:
67
+ - Decisions and rationale (the "why")
68
+ - Patterns established
69
+ - Gotchas or lessons learned
76
70
 
77
- Use \`list_topics\` to understand project organization, \`list_notes\` to browse available knowledge, and \`get_note\` to retrieve full details of relevant notes found via search.
71
+ Keep notes under 1000 chars. Focus on "why" not "what".
78
72
 
79
73
  ---
80
- *UnifiedMemory CLI - Knowledge that persists*
74
+ *UnifiedMemory - \`search_notes\` FIRST, code SECOND*
81
75
  `;
82
76
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unifiedmemory/cli",
3
- "version": "1.3.14",
3
+ "version": "1.3.15",
4
4
  "description": "UnifiedMemory CLI - AI code assistant integration",
5
5
  "main": "index.js",
6
6
  "type": "module",