remem AGENTS.md

remem AGENTS.md is an instructions file for Codex, OpenCode from majiayu000/remem. It costs 1,297 tokens per session, scanned A, original, MIT.

Repository instructions for AI coding agents working on the remem project, including where to read, how to check existing work, and which design rules to follow.

In plain words
What is it for?
Use them when modifying remem, especially for memory-system design, repository setup, documentation, or Codex plugin and runtime work.
Why use it?
They give an agent the project context and boundaries it needs before changing code, reducing mistaken edits and conflicting decisions.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/majiayu000/remem/agents-md
Clone the repo
git clone --depth 1 https://github.com/majiayu000/remem

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 remem AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/majiayu000/remem/agents-md.svg)](https://agentmods.dev/instructions/majiayu000/remem/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/majiayu000/remem/agents-md"><img src="https://agentmods.dev/badge/instructions/majiayu000/remem/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,297 This file is loaded in full into every session.
When invoked 1,297 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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.01297 $0.01297
Opus 5 $0.00648 $0.00648
Sonnet 5 $0.00259 $0.00259
Haiku 4.5 $0.00130 $0.00130

Measured yesterday against content hash da77aa9e3b12, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

remem 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 yesterday.

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 · 105 lines

How it starts

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

remem Agent Instructions

Scope

This file applies to the whole repository unless a nested AGENTS.md overrides it.

remem 的目标是做最强的 Claude Code / Codex 记忆系统,不是最便宜的。所有设计决策优先判断:记忆质量是否提升。成本、延迟、依赖复杂度都排在记忆质量之后。

Start Here

  1. Run git status --short before changing files. This repo often has active staged and unstaged work.
  2. Read README.md for user-facing behavior and docs/ARCHITECTURE.md for current runtime/data-flow context.
  3. Read docs/specs/README.md before treating any old docs/specs/*.md file as pending work. Most historical specs have been implemented, superseded, or absorbed into the current architecture.
  4. For Codex plugin/runtime work, also read plugins/remem/README.md, plugins/remem/skills/remem/SKILL.md, and the version-sync files listed below.
  5. Use repo-local maintenance skills under .agents/skills/ when a task matches one.
  6. Search existing code and docs before creating new files. Similar-file creation without search is not acceptable.

Core Rules

  • Do not remove LLM extraction or automatic capture to save cost. Past zero-LLM direction weakened memory quality.
  • Do not rely on agents voluntarily calling save_memory; automatic hook capture is the primary path, manual save is only a supplement.
  • No silent degradation for missing or wrong memory/context. User-visible data loss must return an error or log at error level with enough detail to diagnose.
  • Prefer current implementation truth over old spec text. When an old spec disagrees with code, verify with tests and update the spec index or spec status instead of reimplementing stale design.
  • Keep changes scoped to the requested behavior. Avoid opportunistic refactors unless they are required for correctness.

Spec Routing

Use specs as contracts only after checking their status in docs/specs/README.md.

Change Required path
Small bugfix with clear root cause Implement directly, add or update a focused regression test
User-facing behavior change Update README.md and add/update a current spec if behavior is ambiguous
Multi-module runtime, DB, hook, or plugin change Write or update a current docs/specs/<id>/PRODUCT.md and TECH.md pair before implementation
Historical SPEC-*.md says "proposed" or "active" Check docs/specs/README.md and current code first; many are historical implementation references
Old refactor-step specs Treat docs/specs/refactor-steps/ as completed historical split contracts unless current code proves drift

Read the full file on GitHub · 105 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. yesterday Changed · +1 lines · +26 tokens per session da77aa9e3b12
  2. 5d ago First seen · 104 lines · 1,271 tokens per session scan A 3b56cff8ff94

Subscribe to this mod's changes

remem AGENTS.md is an instructions file published in the GitHub repository majiayu000/remem (30 stars, last pushed today), licensed MIT. It adds 1,297 tokens to every session, about $0.0065 per session on Opus 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-30.