skills/semantic-memory/SKILL.md
Semantic search over past sessions (pi + Claude Code) and the public digital garden md index (andenken md.lance, OpenRouter Qwen3-Embedding-8B 4096d). Uses LanceDB + hybrid retrieval (vector + FTS with score normalization). Korean↔English cross-lingual via dictcli expand. Recall tracking for memory consolidation. Use when searching for past conversations, decisions, context, or garden knowledge concepts.
npx skillsauth add junghan0611/agent-config semantic-memoryInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Search past sessions and the public digital garden md index by meaning. Hybrid retrieval: vector similarity + full-text search, MMR diversity. Sessions keep recency decay; md garden search disables decay because garden knowledge is not chronological.
Binary is a shell wrapper. Invoke via {baseDir}/semantic-memory.
All output is JSON.
--source pi or --source claude~/repos/gh/notes/content) through andenken md.lance. This is the agent-facing knowledge axis; org embedding is disabled in production.recalls.jsonl for memory consolidation analysis{baseDir}/semantic-memory search-sessions "NixOS GPU cluster setup" --limit 10
{baseDir}/semantic-memory search-sessions "claude-config memory 정리"
{baseDir}/semantic-memory search-sessions "beads migration"
{baseDir}/semantic-memory search-sessions "andenken 작업" --source claude
{baseDir}/semantic-memory search-sessions "nixos setup" --source pi
--source pi or --source claude to filter by harness (default: all)Sessions are a time axis + project/cwd axis for continuing work. Use the metadata already stored in the session index instead of hoping semantic similarity guesses time/project intent.
# Caller converts "어제" (KST) to an ISO half-open range first.
# andenken does NOT parse natural-language time.
{baseDir}/semantic-memory search-sessions "andenken 작업" \
--project andenken \
--date-from 2026-05-11T15:00:00Z \
--date-to 2026-05-12T15:00:00Z \
--mode recent
# Latest work in a project (timestamp DESC over stored rows)
{baseDir}/semantic-memory search-sessions "ignored" \
--project nixos-config \
--mode recent
# Recent entwurf-related work (slice by time/project)
{baseDir}/semantic-memory search-sessions "분신 작업 Session ID entwurf" \
--project pi-shell-acp \
--date-from 2026-05-11T15:00:00Z \
--date-to 2026-05-12T15:00:00Z \
--mode recent
# Hybrid semantic retrieval inside a known time/project slice
{baseDir}/semantic-memory search-sessions "sessions track 결정" \
--project andenken \
--date-from 2026-05-10T15:00:00Z \
--mode hybrid
Stored-signal flags:
| Flag | Description |
|------|-------------|
| --date-from ISO | Inclusive lower bound on stored timestamp |
| --date-to ISO | Exclusive upper bound on stored timestamp |
| --project name[,name] | Filter by stored project basename (OR for CSV) |
| --role user[,assistant,compaction] | Filter by stored role |
| --session-file path | Exact session JSONL path |
| --session-file-contains substr | Substring filter on session path (generic path filter) |
| --mode semantic | Default-style semantic/hybrid retrieval when no filters are needed |
| --mode hybrid | Semantic + BM25 retrieval within stored-signal filters |
| --mode recent | Stored-signal scan + timestamp DESC. No embedding/BM25/dictcli; use when time/project is primary |
Boundary rules:
어제, 지난주) and expect andenken to parse it. Convert to ISO in the caller (recall/day-query/harness).cwd, explicit caller/child linkage metadata), label it as missing. Entwurf identity lives in the JSONL header/name, not in the session filename. For live/filesystem child tracing, use entwurf-peek.{
"query": "NixOS GPU cluster setup",
"expanded": ["universal", "universalism"],
"fallback": false,
"count": 5,
"results": [
{
"project": "hej-nixos-cluster",
"role": "user",
"source": "pi",
"score": 0.0123,
"file": "/home/.../.jsonl",
"line": 42,
"timestamp": "2026-03-15T10:30:00.000Z",
"text": "RTX 5080 클러스터 NixOS 설정..."
}
]
}
{baseDir}/semantic-memory search-md "체화인지 embodied cognition" --limit 10
{baseDir}/semantic-memory search-md "양자역학 관찰자"
{baseDir}/semantic-memory search-md "digital garden"
~/repos/gh/notes/content) through md.lanceANDENKEN_MD_*{
"query": "체화인지 embodied cognition",
"expanded": ["embodied", "cognition", "embodiment"],
"count": 8,
"results": [
{
"project": "notes",
"role": "doc",
"score": 0.4521,
"file": "/home/.../repos/gh/notes/content/notes/20240601T123456.md",
"line": 15,
"timestamp": "2026-05-12T00:00:00.000Z",
"text": "Title: 체화인지 embodied cognition\nTags: cognition, embodiment\n\n체화인지는 몸과 환경이..."
}
]
}
{baseDir}/semantic-memory status
{
"sessions": {
"chunks": 15420,
"indexed_files": 850,
"total_files": 860
},
"md": {
"chunks": 10119,
"indexed_files": 2192,
"indexed": true
},
"knowledge": {
"chunks": 10119,
"indexed_files": 2192,
"indexed": true,
"source": "md"
},
"org": {
"chunks": 44916,
"indexed": true,
"production": "disabled"
}
}
{baseDir}/semantic-memory reindex
{baseDir}/semantic-memory reindex --force
--force: drop and rebuild entire index{
"indexed_sessions": 10,
"new_chunks": 234,
"total_chunks": 15654
}
| Flag | Applies to | Description | Default |
|------|-----------|-------------|---------|
| --limit N | search-sessions, search-md, search-knowledge | Max results | 10 |
| --source S | search-sessions | Filter by harness: pi or claude | all |
| --date-from ISO | search-sessions | Inclusive timestamp lower bound | none |
| --date-to ISO | search-sessions | Exclusive timestamp upper bound | none |
| --project P[,P] | search-sessions | Stored project basename filter | none |
| --role R[,R] | search-sessions | Stored role filter: user, assistant, compaction | none |
| --session-file PATH | search-sessions | Exact session JSONL path | none |
| --session-file-contains S | search-sessions | Session path substring filter | none |
| --mode M | search-sessions | semantic, hybrid, or recent; recent is timestamp DESC stored-signal mode | hybrid |
| --force | reindex | Drop and rebuild entire index | false |
CLI (cli.ts)
├── embedding-provider.ts — Provider abstraction (ollama/vLLM/Gemini) + CachingProvider
├── store.ts — LanceDB vector store (search + FTS)
├── retriever.ts — Hybrid retrieval (weighted/RRF + optional decay + MMR + score normalization)
├── session-indexer.ts — Session JSONL parser
├── md-chunker.ts — OpenClaw-style Markdown chunker (CJK weighted)
└── org-chunker.ts — Org-mode chunker (disabled production track)
Index locations:
~/repos/gh/andenken/data/sessions.lance~/repos/gh/andenken/data/md.lance~/repos/gh/andenken/data/org.lance (disabled in production)| Variable | Required | Description |
|----------|----------|-------------|
| ANDENKEN_SESSION_PROVIDER | sessions | Usually openrouter |
| ANDENKEN_SESSION_MODEL / ANDENKEN_SESSION_DIMENSIONS | sessions | qwen/qwen3-embedding-8b / 4096 |
| ANDENKEN_MD_PROVIDER | md | Usually openrouter |
| ANDENKEN_MD_MODEL / ANDENKEN_MD_DIMENSIONS | md | qwen/qwen3-embedding-8b / 4096 |
| ANDENKEN_MD_API_KEY | md | OpenRouter API key (often $OPENROUTER_API_KEY) |
| ANDENKEN_ALLOW_PAID_FULL_REBUILD | full rebuild | Set to 1 only after reviewing ./run.sh estimate:md |
testing
Cut an OpenClaw-style CalVer snapshot tag. Tag loop = collect commits + closed NEXT.md items, move them to CHANGELOG.md, remove only those closed items from NEXT.md, then pre-flight/tag/push/stamp when explicitly requested. Not SemVer/deploy; doc/ops repos tag too. ROADMAP.md is optional/manual. Triggers: 태그 박자, 릴리즈 컷, changelog 정리, NEXT 비우자/갈무리, cut a release/tag, vYYYY.M.D[-suffix].
development
멀티하네스용 /recall 래퍼. native custom command surface가 없는 하네스(예: Antigravity, Codex)에서도 /recall에 해당하는 다축 맥락 복원을 skill로 호출한다. session-recap, NEXT.md·ROADMAP.md, git status/log, semantic-memory를 조합해 어제/오늘의 작업축을 되살린다.
tools
포지(forge) — 셀프호스팅 Forgejo 이슈/PR/라벨/코멘트 작업면. 힣 에이전트가 코드 면에서 일하는 공유 손. botment의 자식 패턴(가든 댓글면 → 코드 댓글면 endpoint swap). 'forge', 'forgejo', '포지', 'issue', 'pull request', '이슈', '풀리퀘', '코드 댓글', '라벨'.
tools
sync entwurf 자식을 들여다보는 손. 호출자가 'Mattering...'에 묶여있을 때 자식 분신이 무엇을 하는지 확인. entwurf_peers는 control socket 있는 세션만 보여주는데, 이 스킬은 자식 entwurf 세션(이름 태그 entwurf)까지 합쳐서 본다. 트리거: 'entwurf-peek', '분신 들여다보기', '진행 중 세션', 'sync entwurf 안에서', 'peek session', 'live session map', '분신 추적'.