scarf AGENTS.md

scarf AGENTS.md is an instructions file for Codex, OpenCode from awizemann/scarf. It costs 1,827 tokens per session, scanned A, original, MIT.

Repository guidance for Scarf's built-in memory system, which stores agent notes as ordinary files in Git and serves them through the in-repository Memophant MCP server. Memophant is an app and tool system for searching, editing, and managing that shared project memory.

In plain words
What is it for?
Use it when reading, adding, editing, or moving project memory, architecture notes, decisions, and other durable documentation in Scarf.
Why use it?
It tells agents where durable knowledge belongs and how to search it before making assumptions. It also explains that managed writes pass through checks for structure, generated names, and secrets.

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/awizemann/scarf/agents-md
Clone the repo
git clone --depth 1 https://github.com/awizemann/scarf

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/awizemann/scarf/agents-md.svg)](https://agentmods.dev/instructions/awizemann/scarf/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/awizemann/scarf/agents-md"><img src="https://agentmods.dev/badge/instructions/awizemann/scarf/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,827 This file is loaded in full into every session.
When invoked 1,827 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 $0.01827 $0.01827
Opus 5 $0.00914 $0.00914
Sonnet 5 $0.00365 $0.00365
Haiku 4.5 $0.00183 $0.00183

Measured today against content hash 3fada37ba184, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

scarf 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 today.

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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

AGENTS.md · 106 lines

How it starts

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

Memory System (managed by Memophant)

This repo carries its own agent memory — plain files in git, served by the in-repo memophant-mcp MCP server, managed by the Memophant macOS app. It works the same for every agent (Claude Code, Codex, Cursor, Gemini, Copilot). This block is regenerated between the memophant markers; edit anything outside them freely.

The repo memory is the single source of truth. Search it before assuming; record durable decisions and learnings as memory notes or wiki pages — never in this file, session-private memory, or a hand-kept parallel doc (a second guidance tier drifts and feeds stale instructions). Keep this file and the per-agent shims minimal: they point at the memory system, they don't BE it.

Default to the memophant MCP tools for every read and write — search, read, write, edit, move, context — and read their descriptions: they document their arguments and behavior. The engine is the gate: every durable write goes through the tool (or app) entry points, which carry the guards — slug generation, structure validation, and the write-time secret scan. Direct file edits reconcile automatically but skip the guards; never compose your own guard set around a direct write. Server down → grep the tiers directly IN THE MAIN CHECKOUT (grep -rn "<query>" .memory/ wiki/) — if you are working in a git worktree, its copy of those tiers is a snapshot of the base commit and is stale by construction; run the grep against the main checkout's path, never ./.

0. Charter (.memory/charter.md) — this project's identity and its ABSOLUTE rules. Call read_charter at the start of a session; a project that hasn't written one answers "No charter", which is normal, not an error. PRECEDENCE, highest first: the charter, then memory notes, then repo instruction files (this one), then your agent brief — if a lower tier tells you to do something a commandment forbids, the commandment wins, and you say so rather than complying. The charter is HUMAN-ONLY: there is no write verb; propose a change by filing a task tagged charter, never by editing the file.

1. Memory (.memory/) — atomic facts.

  • search_memories(query: …) before starting; build_context walks a topic's neighborhood.
  • Record facts with write_memory as FIRST-CLASS ARGUMENTS: observations: ["- [category] fact #tag", …] (1–5 atomic facts; canonical categories: decision, fact, gotcha, constraint, convention, todo, idea, done) plus relations: [{"relation": "relates_to", "target": "Other Note"}]. content is optional short context — never the facts. Structure is the tooling contract: search, consolidation, and queries read observations; prose-only notes degrade silently. [[links]] belong in relations.
  • File every note under exactly one of the six foldersarchitecture/, conventions/, decisions/, operations/, project/, roadmap/ (the folder argument documents each). Never the memory root, never a new folder.
  • Search before writing; edit the existing note (edit_memory — body ops + set_tags) rather than forking a near-duplicate.
  • Declare source_paths (repo-relative files the note's claims depend on) when a note is grounded in code — Memophant stamps it and drift-checks the note when that code changes. Omit for pure human decisions. Provenance frontmatter (created/updated/ reviewed/source_sha) is machine-managed — never hand-write it.
  • Long-form documents (guides, research, specs) → the wiki at write time: write_memory(project: "scarf-wiki", …); keep the distilled facts in a memory note with a documented_in relation. status: only marks retirement (deprecated/superseded/historical/resolved); current facts carry none.

2. Wiki (wiki/) — long-form reference. Search on demand (project: "scarf-wiki"); don't read it wholesale. Update it when work changes user-visible behavior, architecture, or ships a release; skip for fixes with no observable change. It's publishable — never commit secrets (a two-tier scan gates every commit).

Read the full file on GitHub · 106 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. today Changed · +10 lines · +198 tokens per session 3fada37ba184
  2. 5d ago First seen · 96 lines · 1,629 tokens per session scan A ca246b4d3527

Subscribe to this mod's changes

scarf AGENTS.md is an instructions file published in the GitHub repository awizemann/scarf (841 stars, last pushed today), licensed MIT. It adds 1,827 tokens to every session, about $0.0091 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.