origin-memorycore: Instructions file for Codex

AGENTS.md

origin-memorycore AGENTS.md is an instructions file for Codex, OpenCode from moonandecho/origin-memorycore. It costs 951 tokens per session, scanned A, original, MIT.

Project-specific instructions for origin-memorycore, an open-source governance layer for an AI agent's memory storage and retrieval.

In plain words
What is it for?
Use them when modifying MemoryCore, running its tests, checking external services, updating documentation, or preparing changes for review.
Why use it?
They define development, testing, privacy, dependency, documentation, and verification rules for changing the project safely.

Instructions file for CodexOpenCode

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

This is moonandecho/origin-memorycore's own configuration. It tells Codex and OpenCode how to work on origin-memorycore 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 origin-memorycore configures →

Reuse

Borrowing it

Nothing to install: this file belongs to moonandecho/origin-memorycore. 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/moonandecho/origin-memorycore/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/moonandecho/origin-memorycore

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 origin-memorycore AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/moonandecho/origin-memorycore/agents-md/github.svg)](https://agentmods.dev/instructions/moonandecho/origin-memorycore/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/moonandecho/origin-memorycore/agents-md"><img src="https://agentmods.dev/badge/instructions/moonandecho/origin-memorycore/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 origin-memorycore AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/moonandecho/origin-memorycore/agents-md"><img src="https://agentmods.dev/badge/instructions/moonandecho/origin-memorycore/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 951 This file is loaded in full into every session.
When invoked 951 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.00951 $0.00951
Opus 5.5 $0.00380 $0.00380
Sonnet 5.5 $0.00190 $0.00190
Haiku 4.5 $0.00095 $0.00095

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

Security

Grade A, and why

origin-memorycore 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 · 41 lines

What it actually says

AGENTS.md — origin-memorycore

项目定位

MemoryCore —— LLM Agent 记忆层治理方案(MIT 开源版)。

  • 治理层 = MemoryCore(本仓库), 存储层 = Mnemosyne(远端), 上层 = Hermes/cron。
  • 核心机制: 热层/冷层分层、写入路由、语义去重、容量溢流、回收队列兜底、双通道召回。

开发约定(必须遵守)

  1. git commit 随时提交 — 每完成一个逻辑阶段就 git add -A && git commit -m "<描述>"。多次小提交优于一次大提交, 可追溯。禁止攒一堆改动一次性提交。

  2. 测试必须真实落盘 — 禁止只跑内联 python3 -c 不写文件。测试文件要进 git、可复现、有断言 (git show <commit> --stat 必须能看到测试文件)。

  3. 测试隔离生产路径 — 模块级 Path(...) 默认值在 import 时绑定真实路径, 测试必须用 tempfile 覆盖后再写; 跑完检查生产文件无污染 (如 trash.json 不得出现 mock id)。

  4. 中英 README 同步 — 改 README.md 必须同步更新 README.zh-CN.md, 不得只改英文。

  5. 隐私红线 — 代码/文档/commit message 中不得出现真实本地路径、域名、IP、API key、token。发布前全仓 grep 清零。

  6. 外部依赖必须实测 — 涉及 ollama/embedding/远端服务的代码, 必须实测"依赖不可达"场景 (空缓存 + 断网/端点不可达), 不能只验 import 通过; "返回成功但数据坏了"比直接报错更危险, 要有零向量/空结果守卫。

  7. 兼容性声明必须实测 — "import 可过/无回归"要在实际解析出的依赖环境里跑通才算数, 不凭逻辑推断; 裸 >= 依赖约束可能拉到破坏性新版本, 需检查。

  8. 验证再告知 — 改完必须确认文件已更新/测试已跑/效果已生效, 才能说"完成"。

  9. 发布版独立契约 (2026-09-13 Port R1) — 保持独立 venv, 不共用宿主环境; 运行与测试不得依赖 ~/.hermes 生产配置/生产记忆 (测试用 MEMORY_DIR / MNEMOSYNE_DATA_DIR 指向 tempfile); LLM 文件来源默认关闭, 只能通过 MEMCORE_LLM_FILE_SOURCES=1 显式开启。

  10. 机制常量单一来源 — 所有阈值/窗口/乘数集中定义在 memorycore/core/config.py(README 的 "Capacity constants" / 容量常量章节同源), 任何模块不得另行硬编码同名字面量;改常量必须同步 README.md、 README.zh-CN.md 与 docs/ARCHITECTURE.md。

  11. 禁 push 审查节奏 — 发布移植轮在用户审查 diff 前不得 git push、不得 改远端或 git 历史; 若工作树保留未提交改动, 以审查报告明确说明。

常用命令

  • 测试: python -m pytest tests/ -q
  • 语法检查: python -m py_compile <file> 或直接 import 冒烟
  • 发布前隐私扫描: 全仓 grep 路径/域名/IP/key/token 模式, 结果为零才算干净

工作流

  • 修改仓库代码时, 每阶段 commit 后保留在服务器 (不 push), 经审查后再推 GitHub。
  • 本文件与核心规则 (Hermes pi-workflow-rules) 冲突时, 以本文件为准 (项目级高于全局)。
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 Changed · +11 lines · +261 tokens per session 89cd45bff0a1
  2. 2mo ago First seen · 30 lines · 690 tokens per session scan A 2df5fc709f51

Subscribe to this mod's changes

origin-memorycore AGENTS.md is an instructions file published in the GitHub repository moonandecho/origin-memorycore (1 stars, last pushed 1mo ago), licensed MIT. It adds 951 tokens to every session, about $0.0038 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

origin-memorycore AGENTS.md compared with instructions from other repositories

origin-memorycore AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
origin-memorycore AGENTS.mdmoonandecho/origin-memorycoreInstructions file11mo agoMITA951Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode