@a13xu/lucid 1.9.1 → 1.9.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.
package/README.md CHANGED
@@ -9,7 +9,11 @@ Stores a persistent knowledge graph (entities, relations, observations), indexes
9
9
  **Requirements:** Node.js 18+
10
10
 
11
11
  ```bash
12
- # Add to Claude Code (no install needed)
12
+ # Option 1 global install (recommended, faster startup)
13
+ npm install -g @a13xu/lucid
14
+ claude mcp add --transport stdio lucid -- lucid
15
+
16
+ # Option 2 — no install needed (uses npx on each start)
13
17
  claude mcp add --transport stdio lucid -- npx -y @a13xu/lucid
14
18
  ```
15
19
 
@@ -43,7 +47,7 @@ Default DB path: `~/.claude/memory.db`
43
47
  6. "What do we know?" → recall("query") → knowledge graph search
44
48
  ```
45
49
 
46
- ## Tools (15)
50
+ ## Tools (20)
47
51
 
48
52
  ### Memory
49
53
  | Tool | Description |
@@ -76,6 +80,19 @@ Default DB path: `~/.claude/memory.db`
76
80
  | `check_drift` | Analyze a code snippet inline without saving to disk. |
77
81
  | `get_checklist` | Return the full 5-pass validation protocol (Logic Trace, Contract Verification, Stupid Mistakes, Integration Sanity, Explain It). |
78
82
 
83
+ ### Reward system
84
+ | Tool | Description |
85
+ |---|---|
86
+ | `reward` | Signal that the last `get_context()` result was helpful (+1). Rewarded files rank higher in future similar queries. |
87
+ | `penalize` | Signal that the last `get_context()` result was unhelpful (-1). Penalized files rank lower in future queries. |
88
+ | `show_rewards` | Show top rewarded experiences and most rewarded files. Rewards decay exponentially (half-life ~14 days). |
89
+
90
+ ### Code Quality Guard
91
+ | Tool | Description |
92
+ |---|---|
93
+ | `coding_rules` | Get the 25 Golden Rules checklist — naming, single responsibility, file/function size, error handling, frontend component rules, architecture separation. |
94
+ | `check_code_quality` | Analyze a file or snippet against the 25 Golden Rules. Detects file/function bloat, vague naming, deep nesting, dead code, and for React/Vue files: prop explosion, inline styles, fetch-in-component, direct DOM access. Complements `validate_file`. |
95
+
79
96
  ## Token optimization in depth
80
97
 
81
98
  ### How `get_context` works
@@ -207,7 +224,7 @@ echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"capabilities":{},
207
224
  | npx @a13xu/lucid
208
225
  ```
209
226
 
210
- In Claude Code: run `/mcp` — you should see `lucid` with 15 tools.
227
+ In Claude Code: run `/mcp` — you should see `lucid` with 20 tools.
211
228
 
212
229
  ## Tech stack
213
230
 
package/build/index.js CHANGED
@@ -52,7 +52,7 @@ else {
52
52
  // ---------------------------------------------------------------------------
53
53
  // MCP Server
54
54
  // ---------------------------------------------------------------------------
55
- const server = new Server({ name: "lucid", version: "1.9.1" }, { capabilities: { tools: {} } });
55
+ const server = new Server({ name: "lucid", version: "1.9.2" }, { capabilities: { tools: {} } });
56
56
  // ---------------------------------------------------------------------------
57
57
  // Tool definitions
58
58
  // ---------------------------------------------------------------------------
@@ -29,7 +29,7 @@ export const InitProjectSchema = z.object({
29
29
  });
30
30
  const LUCID_MARKER = "Lucid: call sync_file";
31
31
  const LUCID_HOOK = {
32
- matcher: { tools: ["Write", "Edit", "NotebookEdit"] },
32
+ matcher: "Write|Edit|NotebookEdit",
33
33
  hooks: [
34
34
  {
35
35
  type: "command",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a13xu/lucid",
3
- "version": "1.9.1",
3
+ "version": "1.9.2",
4
4
  "description": "Token-efficient memory, code indexing, and validation for Claude Code agents — SQLite + FTS5, TF-IDF + Qdrant retrieval, AST skeleton pruning, diff-aware context, Logic Guardian drift detection",
5
5
  "type": "module",
6
6
  "bin": {