Notes/knowledge

Link Exploration — Hands-on Results

Updated Sat Aug 08 2026 00:00:00 GMT+0000 (Coordinated Universal Time)
Summary

Hasil test Link CLI demo: conflict detection, lineage chain, recall quality.

Link Exploration — Hands-on Results

Eksplorasi hands-on Link 2.2.1 CLI di /home/rey/workspace/link untuk validasi fitur sebelum adopt ke rex-memory.

Setup

cd /home/rey/workspace/link
python3 link.py try   # bikin demo workspace di link-demo/

Corpus demo: 16 pages, 4 memories (preference/decision), sqlite-fts recall.

Test 1: Basic recall (token match)

Query: "flutter state management"
Memory tersimpan: "Use Riverpod 3.x for Flutter state management. MVVM architecture is the official pattern."

Result: ✅ Hit — match: strong, recall dalam <100ms.

Test 2: Paraphrase recall (zero-overlap)

Query: "managing app state in mobile apps" (pure paraphrase, berbeda token)
Memory: sama (Riverpod 3.x)

Result: ✅ Hit — match: moderate. Lexical fallback masih bisa hit karena "state" shared.

Note: Ini bukan true zero-overlap (masih ada "state" token). Benchmark Link report lexical hit@1 zero-overlap = 0.048 (4.8%), semantic tier naik 2.5× jadi 0.120 (12%). Di corpus kecil, lexical masih cukup.

Test 3: Conflict detection

Memory existing: "Use Riverpod 3.x..."
Memory baru: "Use Provider instead of Riverpod..."

Result:REFUSED dengan error:

Possible conflicting memory found
Conflict candidates:
- Use Riverpod 3.x for Flutter state management
  Reasons: revises_existing_claim

Next: rerun with --supersedes use-riverpod-3-x...

Insight: Conflict detection deterministic (bukan LLM). Rules:

  • Negation-XOR (A says X, B says NOT X)
  • Option groups (A says use X, B says use Y)
  • Revision-shape (head-claim token overlap)

Ini production-ready — cegah contradiction tanpa user notice.

Test 4: Supersedes lineage

Rerun dengan --supersedes use-riverpod-3-x...:

Result: ✅ Lineage chain otomatis:

  • Memory baru: supersedes: "use-riverpod-3-x..."
  • Memory lama:
    • status: archived
    • archived_at: "2026-08-08T09:14:00Z"
    • archive_reason: "superseded by use-provider-instead..."
    • superseded_by: "use-provider-instead..."

Recall: Query "flutter state" hanya return memory terbaru (Provider). Archived tidak muncul di recall.

Benefit: Riwayat evolusi keputusan visible di file (bukan cuma git log). Aman untuk audit.

Test 5: Review workflow

Semua memory baru review_status: pending by default. Butuh explicit:

python3 link.py review-memory <slug> --approve

Insight: Link enforce review-gated write — nothing durable without approval. Rex-memory nggak punya ini (agent direct-write via write_file).

Key takeaways for rex-memory

Worth adopting (Phase 2)

  1. Conflict detection — detect contradiction pattern antar memory, report di stderr saat reindex. Cegah "prefer Riverpod" vs "avoid Riverpod" coexist silent.
  2. Backlink tracking_backlinks.json reverse index [[wikilink]]. Berguna untuk "knowledge X dirujuk dari mana?"

Over-engineering (skip)

  • Review workflow — rex-memory manual write, implicitly reviewed. Overhead tinggi untuk solo vault.
  • review_after / expires_at — manual update cukup, nggak butuh TTL.
  • MCP server — nggak ada agent kedua yang butuh akses memory.

Defer (Phase 3)

  • Semantic search — lexical cukup di <100 notes. ROI rendah untuk deps 30-90MB + build embedding index.

Benchmark context (from RESULTS.md)

Link punya measured benchmark (62 memories, 1,176 test cases):

  • Lexical hit@1: 0.589 (default install)
  • Quality tier (all-MiniLM-L6 ONNX) hit@1: 0.749 (+27%)
  • Zero-overlap lexical: 0.048 → quality 0.120 (2.5×)

Rex-memory belum punya ground truth. Kualitas recall = sebaik agent interpret index.md.

Next steps

Phase 2 implementation:

  1. Conflict detection script — scan memory pairs for negation/option-group/revision patterns, report stderr.
  2. Backlink tracking — bin/reindex.py scan [[link]] / [text](path.md), build _backlinks.json, render "Referenced by: ..." di index.

Estimasi 4-6 jam kerja. Defer sampai ada pain point (false-positive contradiction atau "mana aja yang nge-link ke X?").

Backlinks

No backlinks

Tags

linkmemoryexploration