memory-write
Skill1 starsChanged 9 days agoMITView on GitHub
永続メモリ(~/memory/)への書き込みが gate-memory-write.sh に止められたときの手順。書き場の振り分け・要否の判定・user への提案・書式を決める。既存メモリの更新・削除・圧縮にも使う。
3 other projects use a version of this.
Adopted by
Most recently taken up by
- bersimao/ai-memory-systemtheir own version, first seen Oct 23, 2026
- opensite-ai/opensite-skillstheir own version, first seen Oct 13, 2026
- ztnkv/personal-operating-systemtheir own version, first seen May 12, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- opensite-ai/opensite-skills★ 15same name
- bersimao/ai-memory-system★ 2same name
- ztnkv/personal-operating-system★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository18 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- consolidate-rulesSkill
- guarantee-auditSkill
- jp-writingSkill
- local-issueSkill
- md-writingSkill
- mermaid-diagramSkill
- module-devSkill
- mvp-docsSkill
- nix-tool-installSkill
- pr-workflowSkill
- readme-i18nSkill
- repo-aboutSkill
- repo-publishSkill
- repo-readmeSkill
- repo-standardizeSkill
- skill-devSkill
- sops-secretsSkill
The file
Files
memory-write
gate-memory-write.sh が ~/memory/ への書き込みを ask で止めた。ここに来た時点で、私は
「書く」と決めてドラフトを持っている。その判断を一度ほどく。
順に通す。1つでも落ちたら、書かずに済ませるか、別の場所へ持っていく。
1. 書き場は本当にここか
既にある置き場のほうが、ほぼ常に正しい。メモリは最後の置き場である。
| 書こうとしている中身 | 本当の書き場 |
| 「〜するとき」と条件を言える手順・規範 | 該当する skill。無ければ skill-dev で新規作成 |
| 共通の基準・ガイド | それを使う skill の SKILL.md か reference/ |
| ツール導入・環境ナレッジ | そのツールを配線する .nix の直上、または設定の置き場(home-manager/config/<app>/README.md)。nixpkgs 外の入れ方は nix-tool-install skill の reference/ |
| そのリポの構造・規約・運用 | そのリポの CLAUDE.md / context/ |
| コードの非自明な前提・制約・罠 | そのコードの直上のコメント |
| 実験・検証の記録 | そのリポの台帳(note/ 等) |
| 実値・接続情報 | secrets-agents/(sops 管理。Agent は書けないので user に渡す) |
| 人が読むための資料(記事化プラン・読書ノート等) | AI に読ませない人間用の置き場 |
判定は「この知識を必要とする人は、どのファイルを開いているか」で行う。そのファイルに書く。
実例(過去に memory から追い出したもの):
- 「worktree 中の main 直接編集は正当」→ その前提で動く関数の直上(
zsh/functions/aiagent.sh) - 「特定バージョンのツールが録画環境で起動しない」→ そのツールを使う skill
- 「ある端末で作業ツリーが dirty に見えるのは正常」→ そのリポの
CLAUDE.md - 「記事サイトの内部リンク形式」→ その記事を書く skill
既存の置き場に一言足せば済むなら、それが答え。二重に持つと必ず片方が腐る。
2. 二つの試験
上のどれでもなかった。次を両方満たすときだけ、メモリが正しい。
(a) そこにしか無い — コード・git 履歴・docs・skill のどれからも導けない。 なぜそう決めたか / 何を試して却下したか / 実測してどうだったか、が該当する。
(b) 次に行動を変える — 知っていると私の判断・提案が変わる。
判別法: 「これを読まずに作業したら、私は具体的に何を間違えるか」を1文で言う。言えないなら書かない。
- ○ 「age 鍵を restic リポの中に入れて、循環に気づかないまま復元不能にする」
- ○ 「HTTPS の clone URL を貼って、仕事用リポを私用アカウントで push する」
- ✗ 「バッテリーが76%だと知らずに……」→ 何も起きない。書かない
落ちる典型:
| 書こうとしたもの | なぜ落ちるか |
| 実装が完了した作業の記録 | git log が持つ |
| リポの現在の構造 | 読めば分かる |
| バージョン番号・リリース状況 | すぐ腐る |
| 「残タスク」「〜する予定」 | Issue が持つ |
| デバイスのスペック・ヘルス値 | 知っても判断が変わらない |
| 完了した移行・退役の経緯 | 現状だけ docs に書き、経緯は捨てる |
3. user に提案する
ここまで通ったものだけを出す。黙って書かない。 提案には次を含める。
memory に残すことを提案します。
宛先: ~/memory/<slug>.md(新規 / 既存の <name> を更新)
理由: <(b) の1文 — これを読まずに作業すると何を間違えるか>
他の置き場を採らなかった理由: <1 の表のどれに近く、なぜ違うか>
<本文のドラフト全文>user が「覚えておいて」と明示的に頼んだ場合も、宛先とドラフトは見せる。承認されるまで書かない。
4. 書式
~/memory/<slug>.md の1ファイル1事実。サブディレクトリも索引ファイルも作らない(ls ~/memory/ が索引)。
---
name: <kebab-case。ファイル名と一致させる>
description: <1行。何が書いてあるかではなく、何が言えるかを書く>
---
<結論から書く。相対日付(「先週」)は絶対日付に直す>
**Why:** <そう判断した理由。ここが本体>
**How to apply:** <次に私が何を変えるか>- 関連するメモリは
[[name]]で結ぶ。存在しない名前へは張らない(索引が無いので切れたリンクは誰も直さない) - 経緯を時系列で並べない。今そうである理由だけを書く
- 進捗・バージョン・完了報告を本文に混ぜない(1件が腐ると全体の信用が落ちる)
- 日本語の書きぶりは
jp-writingに従う
5. 更新・削除・圧縮
- 書く前に
ls ~/memory/を見る。同じ主題があれば新規作成せずそちらを書き換える - 前提が変わったメモリは追記せず書き換える。「以前はこうだった」を残さない
- 正本が他所(skill / docs / コード)にできたら、内容をそこへ移して削除する
- 削除も gate に止まる。user の承認を得てから消す
ls が索引として機能するのは十数件まで。それを超えたら分類を足すのではなく、2 の二つの試験を全件に掛け直して減らすことを提案する。
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.

