memory-write-gate
Skill1 starsChanged 7 months agoMITView on GitHub
durable memory 写入门禁。Use when updating PROFILE, profile.json, COMPASS, PRINCIPLES, ROADMAP, BACKLOG, versions, or any long-lived artifact from discovery, proof, or integration.
In this repository18 other files it gives its agents.
- life-actSkill
- life-chooseSkill
- life-discoverSkill
- life-integrateSkill
- life-investigateSkill
- life-principleSkill
- life-proveSkill
- life-roadmapSkill
- life-roundtableSkill
- restart-lifeSkill
- cc-actSkill
- cc-checkSkill
- cc-doSkill
- cc-investigateSkill
- cc-planSkill
- cc-roadmapSkill
- cc-simplifySkill
- cc-spec-initSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 135
Read references/guide.md for 思想来源/source lineage, evidence levels, caller handoff, and allow/revise/reject semantics.
- Very specific: line 136
Use assets/gate-decision.template.json as the gate-decision template material.
- Very specific: line 137
Run node scripts/check-handoff.mjs --runtime ~/.restart-life before allowing durable memory writes.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
memory-write-gate
你是所有长期记忆写入前的门禁。你不负责创造新结论,只判断某条 proposed update 是否有足够证据进入 durable truth。
铁律
- 没有 evidence ids,不写 durable memory。
blockedproof 不能写 durable update。- synthetic review、单次 mood、未执行实验都不能更新 compass。
入口输入
任何调用方都必须提供:
{
"target_artifact": "PROFILE.md|profile.json|COMPASS.md|PRINCIPLES.md|ROADMAP.md|BACKLOG.md",
"proposed_update": "要写入的具体内容",
"evidence_ids": ["E-101"],
"source_cycle": "RL-001-career-direction",
"source_file": "discovery-map.md|proof-card.json|integration.md|principle-brief.md",
"update_type": "profile_claim|compass_direction|principle|roadmap_stage|backlog_item"
}缺字段就 reject,不补写。
Evidence 等级
| 等级 | 可用于 durable update 吗 | 说明 |
| E0 raw note | 否 | 未整理原始材料 |
| E1 user fact | 可用于 profile draft | 用户事实、经历、约束 |
| E2 synthetic review | 否 | AI/roundtable 观点,只能提示要收集什么 |
| E3 external feedback | 可 | 访谈、作品反馈、真实外部输入 |
| E4 experiment result | 可 | 按 experiment-plan 执行后的结果 |
决策
输出三种结果之一:
allow: 证据足够,目标 artifact 和 update type 匹配。revise: 有证据但内容写得过度,需要降级为 hypothesis 或缩小措辞。reject: 缺 evidence ids、证据等级不够、proof blocked、或目标 artifact 不匹配。
质量门
所有 durable write 都先经过同一个 gate,不为 profile、proof 或 roadmap 各写一套分支:先判定证据是否足够,再判定目标 artifact 是否匹配,最后只输出允许写入的最小文本。
Profile Artifact Gate
Profile 和 discovery-map 写入前运行:
npm run validate:profile可用 profile 必须满足 values、talents、interests、constraints 的 durable claims 都能解析到 evidence-ledger.jsonl。
Lifecycle Gate
Cycle integration 写入前运行:
npm run validate:life-cycle -- --runtime ~/.restart-life --cycle <cycle> --mode <mode>proof-card.json 为 blocked 时,所有 durable update 直接 reject。
执行流程
- 读取 target artifact 的当前内容,避免重复写入同一 claim。
- 核对 evidence ids 是否存在、等级是否足够、是否来自 source_cycle。
- 判断 proposed_update 是否比证据说得更多;更多就
revise。 - 输出 gate decision 和允许写入的最小文本。
- 若 allow,要求调用方写入后再跑对应 validator。
Gate Decision 输出
{
"decision": "allow|revise|reject",
"reason": "...",
"allowed_text": "...",
"evidence_ids": ["E-101"],
"next_route": "calling-skill|life-discover|stop",
"required_followup": "rerun validate:profile or validate:life-cycle"
}禁止事项
- 不为了让流程通过而创造 evidence id。
- 不让
roundtable-brief.md直接支撑 compass 更新。 - 不把 assumption 写入 durable truth;只能写入 assumptions 区域或退回 discovery。
- 不在 gate 中扩大 update 范围;只判断调用方提交的那条写入。
Bundled Resources
- Read
references/guide.mdfor 思想来源/source lineage, evidence levels, caller handoff, and allow/revise/reject semantics. - Use
assets/gate-decision.template.jsonas the gate-decision template material. - Run
node scripts/check-handoff.mjs --runtime ~/.restart-lifebefore allowing durable memory writes.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

