@cachly-dev/mcp-server 0.10.62 → 0.10.65

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/BENCH.md CHANGED
@@ -22,7 +22,8 @@ isolates *ranking quality*, not retrieval:
22
22
 
23
23
  | Ranker | What it does | Analogy |
24
24
  |---|---|---|
25
- | `baseline` | raw BM25+ keyword score (`src/search.ts`) | a text-only / flat-file memory |
25
+ | `flatfile` | naive term-overlap, no IDF/quality, recency tiebreak | an LLM reading `/memories` files |
26
+ | `baseline` | raw BM25+ keyword score (`src/search.ts`) | a decent text search engine |
26
27
  | `cachly` | BM25+ then quality-aware rerank (`src/rerank.ts`) | structured, trust-aware recall |
27
28
 
28
29
  Quality reranking boosts a lesson by five orthogonal signals:
@@ -56,30 +57,51 @@ weak baseline look bad. We are improving an already-good one on the cases that m
56
57
 
57
58
  ## Current results
58
59
 
60
+ Three rankers, same corpus:
61
+
62
+ - **flat-file** — naive term-overlap, no IDF, no length normalization, **no quality
63
+ signal**, ties broken by recency. This is an honest (in fact *charitable*) stand-in
64
+ for "an LLM reading its own `/memories` files": it has no ranking engine.
65
+ - **baseline** — raw BM25+ keyword ranking.
66
+ - **cachly** — BM25+ followed by quality-aware reranking (`rerank.ts`).
67
+
59
68
  ```
60
69
  corpus: 17 lessons · queries: 13
61
70
 
62
- metric baseline cachly lift
63
- Precision@1 69.2% → 84.6% +22.2%
64
- Precision@3 33.3% → 33.3% +0.0%
65
- Recall@3 96.2% → 96.2% +0.0%
66
- MRR 82.1% → 91.0% +10.9%
67
- nDCG@5 85.5% → 92.4% +8.1%
71
+ metric flatfile baseline cachly vs flat
72
+ Precision@1 76.9% 69.2% 84.6% +10.0%
73
+ Precision@3 37.2% 33.3% 33.3% -10.3%
74
+ Recall@3 100.0% 96.2% 96.2% -3.8%
75
+ MRR 87.2% 82.1% 91.0% +4.4%
76
+ nDCG@5 89.9% 85.5% 92.4% +2.8%
77
+
78
+ vs BM25 baseline : MRR +10.9% · Precision@1 +22.2%
79
+ vs flat-file mem : MRR +4.4% · Precision@1 +10.0%
68
80
  ```
69
81
 
70
- **Headline: Precision@1 +22.2%, MRR +10.9%, nDCG@5 +8.1%.**
82
+ **Headline: Precision@1 +22.2% vs BM25, +10.0% vs a flat-file memory.**
83
+
84
+ Interpretation — read the metrics that matter for an *agent*: it acts on the **top**
85
+ result, so **Precision@1** and **MRR** are decisive. There, cachly wins against both
86
+ baselines: it puts the single proven fix first most often. On the hardest cases — a
87
+ symptom-dense failed attempt that beats the success on raw text, or two near-identical
88
+ success lessons where only one was reviewed — quality reranking surfaces the lesson
89
+ that actually solves the problem.
71
90
 
72
- Interpretation: when the agent asks a question, the *first* result is the proven
73
- fix 22% more often. On the hardest cases — a symptom-dense failed attempt beating
74
- the success on raw text, or two near-identical success lessons where only one was
75
- reviewed — reranking consistently surfaces the lesson that actually solves the problem.
91
+ **Why is flat-file's Precision@3 / Recall@3 higher?** Honesty matters: the flat-file
92
+ ranker scores the *entire* 17-lesson corpus, while cachly and BM25 rank the capped
93
+ BM25 candidate set. On a tiny corpus, "return more" mechanically inflates recall-at-k
94
+ without making the *top* answer better. We deliberately did **not** rig this away — and
95
+ we **steelman** the flat-file with a recency tiebreak it wouldn't normally have. Even
96
+ so, cachly wins the metrics an agent actually depends on.
76
97
 
77
98
  ## Honest limitations (read this)
78
99
 
79
100
  - **Small corpus.** 17 lessons, 13 queries. This proves the *mechanism* works for
80
101
  each quality signal and guards against regressions. It does **not** yet prove
81
- real-world magnitude. The next step is a larger, externally-sourced corpus and a
82
- head-to-head against an actual flat-file memory baseline on real agent traces.
102
+ real-world magnitude. The flat-file head-to-head is now built in (a naive,
103
+ quality-blind ranker), but the next step is a larger, externally-sourced corpus
104
+ and the same head-to-head on **real agent traces** with third-party labels.
83
105
  - **Ranking, not retrieval.** Both rankers see the same BM25 candidates, so this
84
106
  measures the quality layer only. CKG-traversal and semantic retrieval are
85
107
  evaluated separately via integration tests and are not in these numbers.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,55 @@
7
7
 
8
8
  ---
9
9
 
10
+ ## [0.10.65] – 2026-05-29
11
+
12
+ ### Flat-file head-to-head in the benchmark (the proof gets honest)
13
+
14
+ - **Cachly-Bench now compares three rankers**, not two: a `flatfile` ranker
15
+ (naive term-overlap, no IDF, no length norm, **no quality signal**, recency
16
+ tiebreak) joins the BM25 `baseline` and `cachly`. The flat-file ranker is an
17
+ honest — in fact *charitable* — stand-in for "an LLM reading its own memory files."
18
+ - **Result:** cachly wins the metrics an agent depends on — **Precision@1 +10.0 %,
19
+ MRR +4.4 % vs. flat-file** (and +22.2 % / +10.9 % vs. BM25). The report and BENCH.md
20
+ are honest about *why* flat-file's Precision@3 / Recall@3 look higher (it ranks the
21
+ whole corpus; we did not rig that away).
22
+ - **CI-defended:** a new regression test asserts cachly ≥ flat-file on Precision@1
23
+ and MRR, and that the flat-file simulation isn't trivially weak (MRR > 0.5).
24
+
25
+ ## [0.10.64] – 2026-05-29
26
+
27
+ ### The three decisive metrics, now measurable
28
+
29
+ - **`brain_metrics(instance_id)`** — new tool (101st). Reports the three metrics
30
+ that decide whether the Brain delivers value:
31
+ 1. **Time-to-first-recall** — `born_at` (first learn) → `first_recall_at` (first
32
+ proven recall), both `SET NX` so only the first event wins.
33
+ 2. **Recall-lift** — published Cachly-Bench headline (+22.2 % P@1), CI-defended.
34
+ 3. **Team-knowledge-reuse** — % of proven recalls that used a *teammate's* lesson.
35
+ - **Cross-author reuse tracking.** `smart_recall` gains an optional `author`. When
36
+ you recall a lesson written by someone else, cachly increments
37
+ `cross_author_recalls`, records the distinct reuse pair, and surfaces a
38
+ "👥 Team knowledge reuse" banner inline — the value only a shared brain delivers.
39
+
40
+ ## [0.10.63] – 2026-05-29
41
+
42
+ ### Graceful-degradation stability
43
+
44
+ - New utilities: `withTimeout`, `scanKeys` (capped + timed-out scan), `normalizeGitPath`.
45
+ - `skill_gaps` / `brain_coverage` / `team_expertise_map` / `brain_file_map` now scan
46
+ via `scanKeys` — a huge keyspace can no longer hang the agent turn (3 s cap + key cap).
47
+ - `brain_from_git` normalizes git rename paths (`src/{old => new}/f.ts`) so file nodes
48
+ don't fragment on renames. Removed a dead person-node scan in `skill_gaps`.
49
+ - +13 utils tests.
50
+
51
+ ## [0.10.62] – 2026-05-29
52
+
53
+ ### Hardened Phase 3 tools
54
+
55
+ - `brain_who_knows`: reject empty/undefined `topic` (was crashing in `ckgSlug`); clamp `limit` to [1,50].
56
+ - `brain_file_map`: filter empty path strings, handle non-array input gracefully.
57
+ - +5 stability tests.
58
+
10
59
  ## [0.10.61] – 2026-05-29
11
60
 
12
61
  ### Phase 3C: 100 MCP tools milestone — zero-setup knowledge graph
package/PROGRESS.md ADDED
@@ -0,0 +1,141 @@
1
+ # cachly-mcp — Progress Tracker
2
+
3
+ > Lebendiges Dokument. Hält fest **was implementiert ist** und **was offen steht**.
4
+ > Komplementär zu [STRATEGY.md](./STRATEGY.md) (das *Warum*) und
5
+ > [VISION_10X.md](./VISION_10X.md) (das *Wohin*).
6
+ >
7
+ > **Stand:** v0.10.65 · 101 MCP-Tools · 425 Tests grün · 0 Lint-Warnings
8
+
9
+ ---
10
+
11
+ ## 0. Schnellüberblick
12
+
13
+ | Dimension | Status |
14
+ |---|---|
15
+ | Version | `0.10.65` (npm `latest`) |
16
+ | MCP-Tools | **101** |
17
+ | Tests | **425** passing, 8 Suites |
18
+ | Lint | **0 errors, 0 warnings** |
19
+ | Build | sauber (`tsc`, Entry `dist/src/index.js`) |
20
+ | Bench | Precision@1 **+22.2 %**, MRR **+10.9 %**, nDCG@5 **+8.1 %** vs. BM25 |
21
+
22
+ ---
23
+
24
+ ## 1. Erledigt ✅
25
+
26
+ ### Phase 2 — Beweisbar bessere Recall-Qualität (der Moat-Beweis)
27
+
28
+ | Feature | Datei | Status |
29
+ |---|---|---|
30
+ | Quality-aware Reranking (5 Faktoren) | `src/rerank.ts` | ✅ live in `smart_recall` |
31
+ | Cachly-Bench (IR-Metriken, CI-Wächter) | `src/bench/`, `src/__tests__/rerank.test.ts` | ✅ |
32
+ | Hybrides Retrieval (BM25 + Semantik) | `src/handlers/brain.ts` | ✅ eine gerankte Liste |
33
+ | CKG-Traversierung als 3. Signal (Layer 3) | `src/handlers/brain.ts` | ✅ 🕸️-Badge |
34
+ | Contradiction-Resolution persistent | `cachly:contradictions:{topic}` | ✅ TTL'd, auditierbar |
35
+ | "Brain saved you here"-Banner | `src/handlers/brain.ts` | ✅ Zeitersparnis inline |
36
+ | Knowledge-Governance (`team_confirm`) | `src/handlers/team.ts` | ✅ 🛡️/✔️ Badges, 5. Rerank-Faktor |
37
+
38
+ **5-Faktor-Rerank-Signal:** outcome × confidence × proven-ness × severity × governance
39
+ (review-level × endorsements), geklammert auf [0.5, 2.5].
40
+
41
+ ### Phase 3 — Team-/Org-weiter Wissensgraph (der uneinholbare Moat)
42
+
43
+ | Feature | Tool / Datei | Version | Status |
44
+ |---|---|---|---|
45
+ | Ambient Team-Propagation (author → team) | `learn_from_attempts` | 0.10.57 | ✅ default, nicht opt-in |
46
+ | **Person-Nodes** im CKG | `ckgUpsertPersonNode`, `src/ckg.ts` | 0.10.59 | ✅ auto aus `author` |
47
+ | **File-Nodes** im CKG | `ckgUpsertFileNode`, `src/ckg.ts` | 0.10.59 | ✅ auto aus `file_paths` |
48
+ | `brain_who_knows(topic)` | `src/handlers/brain.ts` | 0.10.59 | ✅ Experten-Ranking 🥇🥈🥉 |
49
+ | Author-Badge in `smart_recall` | `src/handlers/brain.ts` | 0.10.59 | ✅ 👤 inline |
50
+ | `brain_file_map(file_paths)` | `src/handlers/brain.ts` | 0.10.60 | ✅ Experten + Lessons je Datei |
51
+ | `team_expertise_map()` | `src/handlers/brain.ts` | 0.10.60 | ✅ Skills-Matrix als Tabelle |
52
+ | **Visibility-Scopes** (`private`/`team`/`public`) | `learn_from_attempts` | 0.10.60 | ✅ private leakt nie in smart_recall |
53
+ | `brain_from_git` → Person+File-Nodes | `src/handlers/fedbrain.ts` | 0.10.61 | ✅ Zero-Setup Graph retroaktiv |
54
+ | `skill_gaps()` | `src/handlers/brain.ts` | 0.10.61 | ✅ 🔴/🟡/🔵 Blind-Spot-Report |
55
+ | `brain_coverage()` | `src/handlers/brain.ts` | 0.10.61 | ✅ 0–100 Health-Score |
56
+
57
+ ### Stabilität & Hygiene
58
+
59
+ | Thema | Status |
60
+ |---|---|
61
+ | Broken npm Entry-Point (0.10.50–52) | ✅ gefixt (`dist/src/index.js`) |
62
+ | Version-Regression (52 < 56) | ✅ auf 0.10.57+ vorgezogen |
63
+ | Lint: 70 Warnings → 0 | ✅ systematisch bereinigt |
64
+ | Tool-Count-Konsistenz (80/89/95/96/98/100) | ✅ überall synchron |
65
+ | Input-Guards für Phase-3-Tools | ✅ 0.10.62 (kein Crash bei leerem topic / non-array) |
66
+ | `smart_recall` apiFetch null-guard | ✅ graceful degradation offline |
67
+ | Scan-Timeout + Cap (`scanKeys`) überall | ✅ 0.10.63 — kein Hang bei großem Keyspace |
68
+ | Git-Rename-Pfad-Normalisierung | ✅ 0.10.63 (`normalizeGitPath`) |
69
+ | `withTimeout`-Utility (graceful degradation) | ✅ 0.10.63 |
70
+
71
+ ### Die drei Metriken — instrumentiert (0.10.64)
72
+
73
+ | Metrik | Mechanismus | Status |
74
+ |---|---|---|
75
+ | **Time-to-first-recall** | `born_at` (erster Learn) → `first_recall_at` (erster proven Recall) | ✅ gemessen |
76
+ | **Recall-Lift** | Cachly-Bench Headline, CI-verteidigt | ✅ +22.2 % P@1 |
77
+ | **Team-Knowledge-Reuse** | Cross-Author-Recalls + distinct reuse-pairs | ✅ getrackt + inline sichtbar |
78
+ | `brain_metrics()`-Tool | zeigt alle drei in einer Ansicht | ✅ 101. Tool |
79
+
80
+ ---
81
+
82
+ ## 2. Offen 🔲
83
+
84
+ ### Beweis (Phase-2-Rest) — der Glaubwürdigkeits-Beweis
85
+
86
+ - ✅ **Flat-File Head-to-Head im Bench** (0.10.65) — naiver, quality-blinder Ranker
87
+ als ehrlicher Stellvertreter für "LLM liest Memory-Files". Cachly gewinnt auf den
88
+ entscheidenden Metriken: **P@1 +10.0 %, MRR +4.4 % vs. flat-file** · CI-verteidigt.
89
+ - ✅ BENCH.md "Limitations" offen + ehrlich (warum flat-file bei P@3/Recall@3 vorn liegt).
90
+ - 🔲 **Extern gelabelter Korpus** statt selbstgebautem Bench-Set (Dritt-Labels)
91
+ - 🔲 Head-to-head auf **realen Agent-Traces** (nicht nur Fixture-Korpus)
92
+
93
+ ### Team-Graph (Phase-3-Rest)
94
+
95
+ - 🔲 **Rollen-Modell** (admin / reviewer / contributor / viewer)
96
+ - 🔲 **Sichtbarkeits-Scopes auf Team-Ebene** (heute nur lesson-level `private`)
97
+ - 🔲 Service-/System-Nodes im Graph (heute: Konzept, Person, File)
98
+ - 🔲 `brain_who_knows` über CKG-Kanten *zwischen* Personen (Kollaborations-Graph)
99
+ - 🔲 Recall, das *wer-was-wo* gewichtet (personalisiertes Ranking)
100
+
101
+ ### Onboarding / Null-Reibung (Phase-1-Eintrittskarte)
102
+
103
+ - 🔲 `npx @cachly-dev/init` Ein-Befehl-Setup <60 s, idempotent
104
+ - 🟡 Circuit-Breaker / Timeouts: Scan-Tools abgesichert (`scanKeys`/`withTimeout`,
105
+ 0.10.63); verbleibende Netzwerk-Calls (apiFetch) noch nicht überall timeout-gewrappt
106
+ - 🔲 Self-Healing-Auth (kein "0 Recalls weil RAM-only")
107
+ - ✅ Time-to-first-recall **messen** (0.10.64); auf <2 min *drücken* bleibt Onboarding-Arbeit 🔲
108
+
109
+ ### Enterprise / Reichweite (Phase-3/4)
110
+
111
+ - 🔲 Self-Hosted-Tier mit SOC-2/ISO, BYOK by default
112
+ - 🔲 Öffentliche/teilbare Brains (Domänen-Wissensbasen als Marktplatz)
113
+ - 🔲 First-class-Support-Matrix je MCP-Client dokumentiert
114
+
115
+ ### Bekannte kleine Schulden
116
+
117
+ - ✅ `brain_from_git`: Git-Rename-Pfade normalisiert (`normalizeGitPath`, 0.10.63).
118
+ - ✅ README Tool-Count-Drift behoben (jetzt 101, überall synchron).
119
+ - ✅ Scan-basierte Tools gegen großen Keyspace gehärtet (`scanKeys`, 0.10.63).
120
+ - 🔲 `team_expertise_map`: Tabellen-Rendering bei *sehr* vielen Domains noch
121
+ nicht mit großem Datensatz lasttestbar (MockRedis deckt Funktionalität ab).
122
+
123
+ ---
124
+
125
+ ## 3. Die drei Metriken, die alles entscheiden (aus STRATEGY.md §6)
126
+
127
+ | Metrik | Ziel | Heute |
128
+ |---|---|---|
129
+ | **Time-to-first-recall** | <2 min | ✅ gemessen via `brain_metrics` (born_at → first_recall_at) |
130
+ | **Recall-Lift** (vs. BM25) | messbar >0, dann skalieren | ✅ +22.2 % P@1 (intern), in `brain_metrics` |
131
+ | **Team-Knowledge-Reuse** | Lesson von A wird von B recallt | ✅ getrackt + inline + in `brain_metrics`; externes Dashboard 🔲 |
132
+
133
+ > Alle drei sind jetzt in **einem Tool** sichtbar: `brain_metrics(instance_id)`.
134
+ > Offen bleibt nur das *externe* Dashboard (server-side) und der *externe* Bench-Beweis (W1).
135
+
136
+ ---
137
+
138
+ ## 4. Changelog-Verweis
139
+
140
+ Vollständige Release-Notes pro Version: [CHANGELOG.md](./CHANGELOG.md).
141
+ Letzte Releases: 0.10.59 (Phase 3A) · 0.10.60 (Phase 3B) · 0.10.61 (Phase 3C, 100 Tools) · 0.10.62 (Härtung).