Hacker Newsが注目したCog、Claude Code向けplain-text memory architecture
Original: Show HN: A plain-text cognitive architecture for Claude Code View original →
なぜこのShow HNが目立ったのか
2026年3月25日のShow HN投稿は、Cog を Hacker News に持ち込んだ。Cog は Claude Code 向けの "cognitive architecture" を、ほぼすべて plain text の規約で組み立てようとする試みだ。リンク先の説明では、これを application ではなく規約の束として位置づけている。CLAUDE.md が振る舞いを定義し、markdown ファイルが memory を保持し、filesystem が Claude にとっての interface になる。Claude は grep、find、git diff などの Unix tools でそのまま状態を読める。persistent memory を扱う多くの実験が database や vector store、専用 runtime を足すのに対し、Cog はそれをあえて避ける。
構造はどうなっているか
プロジェクトは memory を3層に分ける。"Hot" memory は現在の優先事項だけを短く保ち、毎 session で読む。"Warm" memory は personal や work のような domain ごとのフォルダに入り、関連 skill が動いたときだけ開かれる。"Glacier" は古い情報を index の裏に退避し、prompt を膨らませずに再検索できるようにする。さらに各ファイルには L0/L1/L2 retrieval のヒントが付き、Claude は全文を開く前に要約と section を見て必要な範囲だけ読む設計になっている。
Cog を単なるフォルダ雛形以上のものにしているのは workflow 層だ。ドキュメントでは /setup、/reflect、/housekeeping、/evolve、/foresight などの command が用意されている。これらは observation を pattern に圧縮し、古い情報を archive に移し、index を作り直し、時間とともに memory architecture 自体を調整する役割を持つ。重要なのは、変わるのが model ではなく rules と memory files だという点だ。だから agent state が見えない内部領域に隠れず、git log で追跡できる。
なぜ重要か
すでに Claude Code を使っている team にとって Cog が面白いのは、persistent な agent behavior を review 可能な infrastructure として扱う点にある。別サービスを運用する必要がなく、隠れた memory layer を debugging しなくてよい。agent の挙動が想定とずれたら、関連する markdown、permissions、最近の diff を直接確認すればよいという思想だ。
- Plain-text first: memory files を標準的な tools で読める。
- Workflow over magic: reflection や housekeeping が暗黙の background behavior ではなく command として見える。
- 監査可能性: git log 自体が memory の一部になる。
もちろん tradeoff もある。file-based memory が機能するには、hot memory を短く保ち、事実の single source of truth を崩さず、何を persistent state に昇格させるかを人間側が律する必要がある。それでも Cog は developer-agent workflow が向かう一つの方向をよく示している。隠れた orchestration を減らし、inspectable text を増やす方向だ。
Community source: Hacker News discussion. Original project: marciopuga/cog と project docs.
Related Articles
Anthropicは、Claude Codeの週間使用制限を7月13日まで50%引き上げると発表した。開発者がAI支援コーディングをより多く活用できる一時的な措置。
Hacker Newsで拡散したAlex Kimの分析は、Claude Codeの流出source mapからfake tools、frustration regex、undercover modeといった内部設計を可視化した。論点は単なる流出ではなく、developer toolに埋め込まれたanti-distillationとtelemetryの境界にある。
Hacker Newsで話題になったContext Modeは、Claude Codeのツール出力による文脈消費を315 KBから5.4 KBへ削減したと公表した。