纯本地 Markdown + Git · 跨会话持久记忆 · 算法消融防重跑 Plain Local Markdown + Git · Persistent Agent Memory · ML Ablation Recall

AI 编程记忆库与算法调参实验记录最佳实践(Markdown + Git) Persistent AI Agent Memory & ML Experiment Log in Plain Markdown + Git

每次新开 Claude Code、Cursor 或 Antigravity 会话,Agent 都会患上“跨会话失忆症”——重复尝试早已证伪的架构方案,或重跑已经发散过的超参组合。BothPage 用系统强制的 30 秒金字塔原子笔记 与本机离线混合语义 recall,让工程取舍与实验结论真正沉淀为可复利记忆。 Every fresh session in Claude Code, Cursor, Codex, or Antigravity resets your agent's working memory — causing repeated architecture dead ends and wasted GPU hours on already-falsified hyperparameters. BothPage turns plain local Markdown + Git into structured, instant-recall engineering & ML memory.

1. 软件工程:架构取舍、踩坑根因与推翻链1. Engineering Trade-Offs & supersedes Chains

代码只能表达“现在怎么写”,却留不住“为什么放弃方案 A”。BothPage 将每次踩坑根因、接口边界与延迟压测沉淀在独立的 ~/Bothpage 库中,用 supersedes 显式串联新旧决策,并通过 doc_check 6 条规则巡检业务仓 docs/ 中失效的函数与路径引用。 Source code shows what runs today, never why Approach A failed last month. BothPage stores concise trade-offs in ~/Bothpage, links evolving decisions via supersedes chains so stale conclusions stop surfacing, and audits repo docs/ freshness with 6-rule doc_check.

2. 算法研究:超参消融记录与阴性结果防重跑2. ML Ablation Tracking Without Repeating Failed Runs

论文只写成功的 SOTA,但日常科研 80% 算力花在证伪超参与数据配比上。用 bp 一行记录学习率、Warmup、损失函数或特征泄漏排查结论,Cmd/Ctrl+V 直接把 Loss / PR 曲线贴进本地 <note>.assets/;下次让 Agent 规划下一轮实验时,自动召回全部阴性结果。 80% of ML research is falsifying bad ideas. Log learning rates, data-mix ratios, and negative results in seconds via bp, paste loss/PR plots straight into local <note>.assets/, and let session-start hybrid recall stop your agent from ever re-proposing a failed run.

3. 30 秒金字塔契约:既让人一眼读懂,也不撑爆模型上下文3. The 30-Second Pyramid Contract: Built for Human Eyes & Agent Context

为什么大多数 AI 笔记系统用不过两周就废弃?因为没有字数上限的 AI 总结动辄上千字。BothPage 在 MCP 写入端硬性执行金字塔门禁(原子笔记 ≤150 汉字 / 80 英文词、≤5 条要点;日志 ≤140 字),并支持一键 DeepSeek 润色将随手草稿提纯为如下标准卡片:

Most AI memory systems fail within two weeks because unconstrained agents write 1,500-word essays nobody reads. BothPage enforces a strict pyramid gate on every MCP write (≤80 English words / ≤150 Chinese chars, ≤5 bullets; ≤140-char journal lines) plus 1-click DeepSeek polish:

---
id: 20261204-bf16-warmup
project: vision-encoder-v2
type: experiment
supersedes: [20261129-lr-schedule]
---
Raising cosine warmup from 500 to 2000 steps eliminates bf16 grad-norm spikes at batch 4096.

- Peak lr 3e-4 diverged at step 620 with 500 warmup; stable through 50k steps at 2000 warmup
- Val loss improved 1.91 -> 1.84 on ImageNet-1k subset without extra grad clipping
- Negative result: QK-norm alone slowed throughput by 6% without fixing step-600 spike
- Loss curve: ![](20261204-bf16-warmup.assets/val-loss-comparison.png)

4. 人类主权保护锁(Human Sovereignty Lock)与零配置接入4. Human Sovereignty Lock & 30-Second Multi-Agent Setup

真正的人机共护需要清晰边界:BothPage 通过 git blame 自动识别你亲手写下的判断,任何智能体想要改动人工段落都必须触发一键人工审批,彻底杜绝静默覆盖。仅需 30 秒即可接入你的主力工具链(7 个活跃写入日免登录全功能试用,一次买断终身版 ¥59.9 / $29.9,阅读与检索永久免费):

True human-agent co-maintenance requires clear boundaries: BothPage uses git blame to guard human-authored lines, turning any agent edit to your text into a 1-click approval proposal. Set up in 30 seconds (7 active writing days free trial, one-time lifetime Pro $29.9 / ¥59.9; reading & searching stay free forever):

# Initialize ~/Bothpage and wire Claude Code, Cursor, Codex & Antigravity
npx -y bothpage@latest init

# Log a <=140-char engineering or ML experiment entry anytime from terminal
npx bothpage "bf16 warmup 500->2000 steps fixed grad spike; val_loss 1.91->1.84"

# Install VS Code / Cursor sidebar extension: bothpage.bothpage-vscode

常见问题(FAQ)Frequently Asked Questions

1. 离线混合检索需要把代码或实验数据上传到云端向量库吗?1. Does hybrid semantic recall upload my notes or ML logs to a cloud vector database?

不需要。SQLite FTS5 BM25 与多语言向量嵌入全部在你的本机离线完成,未发表的实验结论、超参配置与私有业务架构零上传。No. Both FTS5 BM25 indexing and multilingual vector embeddings run 100% offline on your machine — unpublished research results and proprietary architecture notes never leave your disk.

2. Agent 会在每次修小 Bug 后都自动乱建一堆笔记吗?2. Will my coding agent spam notes automatically after every tiny bug fix?

不会。BothPage 的技能规则明确约定:会话开始自动调用 recall 读取上下文,但只有在你明确要求记录结论、实验或计划时才调用写入工具,保持知识库极高信噪比。Never. BothPage's agent rules call recall automatically at session start, while writing tools (note_add, journal_append) run only when you ask to record a conclusion, plan, or experiment — keeping signal-to-noise high.