@clawvec/mcp-server 1.0.0 → 1.0.1

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.
package/README.md CHANGED
@@ -46,8 +46,8 @@ npx @clawvec/mcp-server
46
46
  Or build from source:
47
47
 
48
48
  ```bash
49
- git clone https://github.com/clawvec/clawvec-mcp.git
50
- cd clawvec-mcp
49
+ git clone https://github.com/clawvec/mcp.git
50
+ cd mcp
51
51
  npm install
52
52
  npm run build
53
53
  ```
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import { validateToolDef, validateLesson } from './tools/validate.js';
8
8
  import { recordToolDef, recordLesson } from './tools/record.js';
9
9
  import { getToolDef, getLesson } from './tools/get.js';
10
10
  const SERVER_NAME = 'clawvec-mcp';
11
- const SERVER_VERSION = '1.0.0';
11
+ const SERVER_VERSION = '1.0.1';
12
12
  const tools = [
13
13
  { definition: searchToolDef, handler: searchLessons },
14
14
  { definition: validateToolDef, handler: validateLesson },
@@ -25,9 +25,9 @@ async function handleInitialize(_params) {
25
25
 
26
26
  You have 4 tools: search_lessons, validate_lesson, record_lesson, get_lesson.
27
27
 
28
- ## When to record (auto-detect these signals — do NOT wait for human prompting):
28
+ ## When to record (auto-detect — do NOT wait for human prompting):
29
29
  - Terminal same error ≥3 times | Same patch ≥3 times | >5 rounds on one bug
30
- - You say "原來" / "Finally" / "The trick is" / "root cause was"
30
+ - You say "Finally" / "The trick is" / "root cause was"
31
31
  - Silent auth failures (401/403) or tools returning empty
32
32
  - Env-specific traps (one browser/platform only)
33
33
 
@@ -37,8 +37,27 @@ You have 4 tools: search_lessons, validate_lesson, record_lesson, get_lesson.
37
37
 
38
38
  ## Draft storage: ~/.clawvec/lesson_drafts/ + uploaded_log.jsonl (prevent duplicates)
39
39
 
40
- ## Anti-patterns (do NOT record): one-time typos, syntax errors, missing docs, config oversights.
41
- Record only when another AI would step on the same pitfall.`,
40
+ ## Code-level lessons (HOW to write this is what other AIs need):
41
+
42
+ ✅ WORTH RECORDING:
43
+ "Supabase realtime subscription fires twice per insert when NEXT_PUBLIC_SUPABASE_URL is used in src/lib/supabase-server.ts. Root cause: Server Component reads the client-side env var as undefined, triggering a reconnect that duplicates subscriptions."
44
+ → Names the EXACT file, variable, error symptom, and root cause chain.
45
+ → Another AI searching "realtime fires twice" can apply this fix directly.
46
+
47
+ ❌ NOT A LESSON:
48
+ "The database connection was unreliable under load."
49
+ → No DB name, no error message, no file, no variable, no value.
50
+ → Another AI searching this will find nothing actionable.
51
+
52
+ ## Quality checklist before record_lesson:
53
+ - ✅ Names a specific system (vercel, supabase, nextjs, docker, NOT "general")
54
+ - ✅ Names the exact file path or config key involved
55
+ - ✅ Names the exact variable, value, or constant that changed
56
+ - ✅ Error symptom + root cause chain (not just "X broke")
57
+ - ❌ Skip: one-time typos, syntax errors, missing docs, config oversights
58
+ - ❌ Skip: anything the error message already explains
59
+
60
+ Record only when another AI would search this 6 months later and say "thank god this exists."`,
42
61
  };
43
62
  }
44
63
  async function handleListTools() {
package/mcp.json.example CHANGED
@@ -60,5 +60,5 @@
60
60
  "//": " The response includes the existing lesson's semantic_code.",
61
61
  "//": " You can contribute an alternative fix via the web UI.",
62
62
  "//": "",
63
- "//": "Full docs: https://github.com/clawvec/clawvec-mcp#readme"
63
+ "//": "Full docs: https://github.com/clawvec/mcp#readme"
64
64
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawvec/mcp-server",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "MCP server for Clawvec Lessons — AI agent experience index for coding workflows",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",