pce-memory: Instructions file for Codex

AGENTS.md

pce-memory AGENTS.md is an instructions file for Codex, OpenCode from CAPHTECH/pce-memory. It costs 3,566 tokens per session, scanned A, original, MIT.

Instructions for pce-memory, a memory service that stores project decisions, conventions, preferences, and tasks so they can be recalled across coding sessions. It describes how to recall, record, review, link, and correct that knowledge.

In plain words
What is it for?
Use it to activate relevant project memory, record observations, turn them into lasting knowledge, connect related claims, audit the knowledge graph, or roll back outdated memory.
Why use it?
It reduces repeated explanations and helps an agent use earlier project decisions and rules when starting work, making designs, naming things, or investigating errors.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is CAPHTECH/pce-memory's own configuration. It tells Codex and OpenCode how to work on pce-memory itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything pce-memory configures →

Reuse

Borrowing it

Nothing to install: this file belongs to CAPHTECH/pce-memory. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/CAPHTECH/pce-memory/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/CAPHTECH/pce-memory

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pce-memory AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/caphtech/pce-memory/agents-md/github.svg)](https://agentmods.dev/instructions/caphtech/pce-memory/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/caphtech/pce-memory/agents-md"><img src="https://agentmods.dev/badge/instructions/caphtech/pce-memory/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pce-memory AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/caphtech/pce-memory/agents-md"><img src="https://agentmods.dev/badge/instructions/caphtech/pce-memory/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,566 This file is loaded in full into every session.
When invoked 3,566 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.03566 $0.03566
Opus 5.5 $0.01426 $0.01426
Sonnet 5.5 $0.00713 $0.00713
Haiku 4.5 $0.00357 $0.00357

Measured 1mo ago against content hash a9767c5200bd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pce-memory AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 367 lines

How it starts

The opening of the file, as written. The whole thing — 367 lines — stays where its author put it; the contents beside it link to each section on GitHub.

pce-memory とは

プロジェクトの知識(設計決定、規約、好み、タスク)を永続化し、セッションを跨いで想起するためのMCPサーバーです。


利用フロー

1. activate     → タスク開始前に intent-aware な想起を行う(topology walk で関連 claim を自動展開)
2. observe      → 会話ログ・作業メモ・機密を raw micro memory として一時記録
3. distill      → raw 観測を durable 候補に蒸留
4. promote      → reviewable candidate を meso/macro memory に昇格
5. feedback     → 想起した知識の有用性をフィードバック
6. rollback     → 無効になった durable memory を append-only で修復(topology-based blast radius 付き)
7. link_claims  → claim 間のリンク作成(supports/extends/contradicts/supersedes/related)
8. graph_audit  → knowledge graph の健全性監査(orphan/cycle/scope hole/hub 検出)

upsert は already-distilled な durable knowledge の escape hatch としてのみ使ってください。通常の raw -> durable 変換経路では使いません。


いつ activate するか

以下の状況で pce_memory_activate を呼び出してください:

  • 新しいタスクを開始するとき - 関連する過去の決定を確認
  • 設計判断が必要なとき - 既存のアーキテクチャ決定を参照
  • 命名や規約を確認したいとき - プロジェクト固有のルールを想起
  • エラーに遭遇したとき - 過去の類似問題の解決策を検索
// 例: API設計前に関連知識を想起
{
  "intent": "design_decision",
  "q": "API 命名規約 RESTful",
  "scope": ["project", "principle"],
  "kind_filter": ["fact", "preference", "policy_hint"],
  "memory_type_filter": ["knowledge", "procedure", "norm"],
  "allow": ["answer:task"],
  "top_k": 10
}

いつ observe するか

以下の情報は pce_memory_observe で記録してください:

  • session スコープの作業文脈 - 「このファイルを編集中」「デバッグ中の仮説」
  • 生ログや一時メモ - チャット断片、ツール出力、HTTPレスポンス、ファイル読み取り結果
  • secret/PII を含む可能性がある内容 - fail-safe に一時保存し、durable claim 化しない
// 例: セッション作業メモを一時記録
{
  "source_type": "chat",
  "content": "Issue #65 の observe 互換経路を削除中"
}

補足:

  • observe は raw-only です。durable claim を inline で作成しません
  • single_claim_v0 のような旧 extraction mode は使いません
  • extract: { \"mode\": \"noop\" } は互換性のために残っていても raw-only のままです
  • durable 化したい場合は distill -> promote を使ってください

いつ upsert するか

以下の情報だけを pce_memory_upsert で記録してください:

  • すでに distill 済みとみなせる durable knowledge
  • project または principle に置くべき確定事項
  • provenance を付けて追跡可能にしたい事実・好み・手順・ポリシー
  • 技術・ファイル・概念の関係が明確な場合は、entities / relations も同じ upsert に含めてください

Read the full file on GitHub · 367 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 367 lines · 3,566 tokens per session scan A a9767c5200bd

Subscribe to this mod's changes

pce-memory AGENTS.md is an instructions file published in the GitHub repository CAPHTECH/pce-memory (3 stars, last pushed 6mo ago), licensed MIT. It adds 3,566 tokens to every session, about $0.0143 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,649 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,257 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 4,159 tokens