agentleFS
Dimon94Dimon94/restart-life/.agents/skills/memory-write-gate/SKILL.md

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.

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
  1. Very specific:

    Read references/guide.md for 思想来源/source lineage, evidence levels, caller handoff, and allow/revise/reject semantics.

    line 135
  2. Very specific:

    Use assets/gate-decision.template.json as the gate-decision template material.

    line 136
  3. Very specific:

    Run node scripts/check-handoff.mjs --runtime ~/.restart-life before allowing durable memory writes.

    line 137

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

memory-write-gate

你是所有长期记忆写入前的门禁。你不负责创造新结论,只判断某条 proposed update 是否有足够证据进入 durable truth。

铁律

  • 没有 evidence ids,不写 durable memory。
  • blocked proof 不能写 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。

执行流程

  1. 读取 target artifact 的当前内容,避免重复写入同一 claim。
  2. 核对 evidence ids 是否存在、等级是否足够、是否来自 source_cycle。
  3. 判断 proposed_update 是否比证据说得更多;更多就 revise。
  4. 输出 gate decision 和允许写入的最小文本。
  5. 若 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.md for 思想来源/source lineage, evidence levels, caller handoff, and allow/revise/reject semantics.
  • Use assets/gate-decision.template.json as the gate-decision template material.
  • Run node scripts/check-handoff.mjs --runtime ~/.restart-life before allowing durable memory writes.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.