GoodMemory: Instructions file for Codex

AGENTS.md

GoodMemory AGENTS.md is an instructions file for Codex, OpenCode from hjqcan/GoodMemory. It costs 3,019 tokens per session, scanned A, original, MIT.

Repository instructions for GoodMemory, a project intended to give coding agents durable memory. They explain where to find project guidance, how the code is organized, and how to build and test it.

In plain words
What is it for?
Use them when contributing to the GoodMemory codebase and you need its documentation routes, project structure, development commands, or testing conventions.
Why use it?
They help contributors navigate the repository while warning agents that the contributor guide is not the right starting point for simply adopting GoodMemory.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/hjqcan/goodmemory/agents-md"><img src="https://agentmods.dev/badge/instructions/hjqcan/goodmemory/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,019 This file is loaded in full into every session.
When invoked 3,019 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.03019 $0.03019
Opus 5.5 $0.01208 $0.01208
Sonnet 5.5 $0.00604 $0.00604
Haiku 4.5 $0.00302 $0.00302

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

Security

Grade A, and why

GoodMemory 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 · 159 lines

How it starts

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

Repository Guidelines

Are you an agent here to adopt GoodMemory (give yourself or your host durable memory), not to contribute to it? Stop reading this file — it is the contributor guide. Go to llms.txt for a machine-readable onboarding decision tree, or the README Quickstart. The capability descriptor at .well-known/goodmemory.json has install commands, the MCP endpoint, and HTTP endpoints as JSON.

The rest of this document is for agents and humans working on the GoodMemory codebase.

Project Structure & Module Organization

Treat this file as a routing layer, not the final authority. Start with docs/README.md for documentation routing and task-board/00-README.txt for execution order. Do not bulk-read docs/, task-board/, reports/, or docs/archive/ unless a task explicitly needs historical provenance.

README.md
docs/
├── README.md                                                 # documentation router and archive policy
├── GoodMemory-Current-Status-and-Evidence.md                 # current public surface and canonical evidence
├── GoodMemory-First-Principles-and-Reference-Architecture.md  # canonical design, core beliefs, operating principles
├── GoodMemory-ImplicitMemBench-Full-300-Research-Summary.md    # ImplicitMemBench Full-300 research summary (0.691 claim)
├── GoodMemory-OSS-Architecture-v1.md                          # historical v1 map of domains, packages, and boundaries
├── GoodMemory-PRD.md                                          # product scope and behavior contract
├── GoodMemory-TDD-and-Evaluation-Strategy.md                  # test pyramid, eval design, fixture strategy
├── GoodMemory-v1-Quality-Gate.md                              # historical v1 verification snapshot
├── GoodMemory-v1-Release-Checklist.md                         # historical release readiness baseline
├── GoodMemory-Unified-Self-Evolving-Roadmap.md                # historical roadmap after the v1 core
├── archive/quality-gates/README.md                            # archived phase closure summaries and gate index
├── archive/design-inputs/                                     # superseded drafts, not current truth
├── archive/reference-corpus/                                  # copied research/source material, targeted lookup only
├── GoodMemory-记忆数据分层设计.md                               # layering and storage reference
└── ...

task-board/
├── 00-README.txt                                              # canonical execution order, status markers, working rules
├── 01-phase-0-...txt -> 25-phase-24-...txt                    # phase-level execution plan
└── phase-*/00-README.txt                                      # per-phase breakdown and acceptance criteria

adr/
├── ADR-001-memory-taxonomy.txt
├── ADR-002-public-api.txt
├── ADR-003-runtime-context-controls.txt
├── ADR-004-maintenance-engine.txt
├── ADR-005-scenario-fitted-recall-boundary.txt        # dual-metric recall + scenario-rule admission
├── ADR-006-module-layering-and-shared-contracts.txt   # domain/ contract home, provider ↛ eval
├── ADR-007-python-client-and-docker-distribution.txt   # Python client + Docker distribution
├── ADR-008-language-pack-horizontal-extension.txt     # current LanguagePack and projection boundary
├── ADR-009-orchestration-and-proof-protocol-boundaries.txt # runtime, research proof, and release orchestration
└── ADR-010-note-memory-kind-file-mirror-and-interchange.txt # note kind, file mirror, interchange, context frame

src/
├── index.ts                                                   # package root exports
├── api/                                                       # thin facade, sole concrete assembly, recall orchestration, feedback/internal support
├── ai-sdk/                                                    # AI SDK-facing public exports and contracts
├── domain/                                                    # taxonomy, scope, provenance, core records
├── remember/                                                  # source CAS, extraction pipeline, write pipeline, thin engine
├── recall/                                                    # contracts, loading, retrieval, result assembly, thin engine
├── answer/                                                     # answer evidence-pack composition and operation guides
├── runtime/                                                   # session-scoped context services and spillover controls
├── maintenance/                                               # decay, dream, consolidation, and maintenance runners
├── verify/                                                    # verification policy for stale or inferred memory
├── storage/                                                   # in-memory, sqlite, postgres, and repository adapters
├── eval/                                                      # eval runners, judge integration, reporting
├── evidence/ evolution/ governance/                           # evidence records, proposal flow, and governance helpers
├── embedding/ provider/                                       # vector write plumbing and provider-backed model adapters
├── host/                                                      # host-facing integration surface and exported contracts
├── language/                                                  # locale-aware extraction and normalization
├── policy/ testing/                                           # policy hooks and shared test helpers
├── cli/                                                       # explicit memory, host, eval, and service command families
└── cli.ts                                                     # parse/version/error/help router and explicit dispatch

tests/
├── unit/ integration/ scenarios/ eval/                        # canonical red/green layers
├── cli/ examples/ release/ types/                             # CLI, example, packaging, and type-surface regressions
└── ...

fixtures/
├── personas/eval/ and scenarios/eval/                         # eval personas and replay cases
├── conversations/ personas/ rubrics/ scenarios/               # supporting fixture sources
└── ...

reports/quality-gates/
├── phase-*/                                                   # accepted phase gate artifacts
└── ...

reports/eval/
├── fallback/                                                  # deterministic validation artifacts
├── live/                                                      # live model eval artifacts with in-memory memory backend
└── live-memory/                                               # provider-backed live-memory eval artifacts

scripts/ and examples/ hold developer utilities, CLI/eval runners, and reference integrations. Current repository-only proof primitives live under `scripts/proof/`; active research protocols are selected by `scripts/research/protocols.json`; current release preparation lives under `scripts/release/`. Production `src/` must not import the proof kernel.

Read the full file on GitHub · 159 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 Changed · +1 lines · +61 tokens per session 3402b9f67eb8
  2. 1mo ago Changed · +4 lines · +187 tokens per session f14cf7fc9dce
  3. 1mo ago First seen · 154 lines · 2,771 tokens per session scan A 642007e4cf82

Subscribe to this mod's changes

GoodMemory AGENTS.md is an instructions file published in the GitHub repository hjqcan/GoodMemory (20 stars, last pushed 9d ago), licensed MIT. It adds 3,019 tokens to every session, about $0.0121 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-30.

Related

Other instructions, from other repositories