recallnest: Instructions file for Claude Code

CLAUDE.md

recallnest CLAUDE.md is an instructions file for Claude Code from AliceLJY/recallnest. It costs 17,568 tokens per session, scanned A, original, MIT.

Repository-specific rules for RecallNest, a TypeScript application that uses Bun, LanceDB, Jina embeddings, and the Model Context Protocol.

In plain words
What is it for?
Use them when adding or changing MCP tools, writing tests, following the project’s runtime and storage requirements, or pushing changes.
Why use it?
They prevent incompatible technology choices, incomplete code, missing tests, and accidental pushes to the upstream repository.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions subagents; mentions Codex.

This is AliceLJY/recallnest's own configuration. It tells Claude Code how to work on recallnest itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything recallnest configures →

Reuse

Borrowing it

Nothing to install: this file belongs to AliceLJY/recallnest. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/AliceLJY/recallnest/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/AliceLJY/recallnest

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for recallnest CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/aliceljy/recallnest/claude-md/github.svg)](https://agentmods.dev/instructions/aliceljy/recallnest/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/aliceljy/recallnest/claude-md"><img src="https://agentmods.dev/badge/instructions/aliceljy/recallnest/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for recallnest CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/aliceljy/recallnest/claude-md"><img src="https://agentmods.dev/badge/instructions/aliceljy/recallnest/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17,568 This file is loaded in full into every session.
When invoked 17,568 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.17568 $0.17568
Opus 5.5 $0.07027 $0.07027
Sonnet 5.5 $0.03514 $0.03514
Haiku 4.5 $0.01757 $0.01757

Measured today against content hash af05b663dd7c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

recallnest CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 71 lines

How it starts

The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.

RecallNest 项目规则

1. 技术栈约束(强制)

  • 运行时:Bun。禁止使用 npm、yarn、pnpm,所有命令走 bun
  • 语言:TypeScript strict。禁止 any 类型,复杂接口提取到独立类型文件
  • 向量存储:LanceDB。不引入其他向量数据库
  • 嵌入模型:Jina v5。不替换嵌入方案
  • MCP 协议:@modelcontextprotocol/sdk。MCP tools 统一走 registerTool()

2. 编码规范

  • 新增 MCP tool 必须同时写测试(src/__tests__/)
  • 禁止生成带 // TODO 或 // placeholder 的半成品代码——缺信息就停下来问
  • 修改已有 tool 的 schema 前,先确认调用方兼容性
  • 脚本放 scripts/,不在 src/ 之外创建业务 .ts 文件

3. Agent 行为准则

  • 写代码后必须自己跑测试:执行 bun test,读报错,自主修复,直到全绿才交付
  • 实现新功能前,先输出分步计划并等待确认,再进入执行阶段
  • 任务颗粒度过大时,主动拆分子任务逐步推进,不要一口气撸完然后崩溃
  • 禁止用未验证的 git status 结果写入 checkpoint

4. Git Push 规则(重要!)

  • 所有 push 只推 origin(AliceLJY/recallnest)
  • 绝对不要 push 到 upstream(CortexReach/memory-lancedb-pro)—— 那是上游公开仓库,推了等于暴露私有改造
  • 默认 git push 即可(默认推 origin)
  • 需要给上游提 PR 时,走 fork + PR 流程,不直接 push

5. Feature Flag

  • RECALLNEST_MULTI_VECTOR=true — 多向量 L0/L1/L2 检索
  • RECALLNEST_KG_MODE=true — KG 三元组提取 + 图遍历(2026-10-06 注:kg_triples 里有 6,331 条的来源记忆已在这一天删除——会话原文切片带走 4,948 条、同日删掉的 4 月无层级摘要带走 1,383 条——来源 id 悬空。读取端查不到来源会跳过,但图遍历先截名额再查(retriever.ts 的 PPR 与 expandViaKG),所以开这个开关之前先清掉来源不在 memories 表里的三元组)
  • RECALLNEST_EMOTION_SCORING=true — Emotion detection + salience-weighted Weibull decay + arousal boost + retrieval scoring
  • RECALLNEST_CONSTRUCTIVE_RETRIEVAL=true — Multi-source candidate expansion + source-map grounded reconstruction (resume default, search opt-in)
  • RECALLNEST_NARRATIVE_MODE=true — Autobiographical narrative metadata layer (life-period / general-event / specific-event)
  • RECALLNEST_PREDICTIVE_MEMORY=true — Heuristic-predicted prospective reminders (zero LLM, behavioral signals)
  • RECALLNEST_POPULARITY_RANKING(默认 bounded,=legacy 回旧行为)— 排序上把相关度与流行度拆开:访问计数加成、热度混合、频次加成三环不跑,链尾一步 ×(1+0.2·h)(h = min(1, log2(1+evolution.accessCount)/5))、只加不减、检索器内部不截平、retrieve() 出口截到 1;下游「给全文」档(adaptive 全文、resume 折叠 L2)改用 0.80。2026-09-25 起默认就是 bounded(Alice 看过正式 shadow 后拍板);显式设 RECALLNEST_POPULARITY_RANKING=legacy 回到切默认之前的行为,逐字节不变(设计、互审与 shadow:sync-bridge AI产出/2026-09-24-recallnest-新条目排序/第二步-plan.md 与同目录 README 第九节)
  • RECALLNEST_TRIGGER_LENGTH_EXEMPT — 经 trigger 到达的条目另走「trigger 那一路」:以 trigger 分为底(hybrid ×0.9)走完长度归一之前的环节、不做长度归一,与正文那一路取大。2026-09-25 起默认开,只有显式设 false 才关(同 RECALLNEST_TRIGGER_RECALL 的写法)

Read the full file on GitHub · 71 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · +241 tokens per session af05b663dd7c
  2. 4d ago Changed · +5 lines · +909 tokens per session 9050bd2f5e83
  3. 10d ago Changed · +686 tokens per session 2cf31a35633b
  4. 18d ago Changed · +486 tokens per session 6dafdc4dc021
  5. 21d ago Changed · +2 lines · +769 tokens per session 0d47a3a5f683
  6. 22d ago Changed · +4 lines · +4,862 tokens per session b8212670aa5a
  7. 1mo ago Changed · +2 lines · +4,840 tokens per session 009a610d9853
  8. 1mo ago Changed · +517 tokens per session 9db586647ba5
  9. 1mo ago Changed · +751 tokens per session b31efb2a0bbe
  10. 1mo ago First seen · 58 lines · 3,507 tokens per session scan A 8340d786e4e8

Subscribe to this mod's changes

recallnest CLAUDE.md is an instructions file published in the GitHub repository AliceLJY/recallnest (15 stars, last pushed yesterday), licensed MIT. It adds 17,568 tokens to every session, about $0.0703 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories