harness AGENTS.md

harness AGENTS.md is an instructions file for Codex, OpenCode from awizemann/harness. It costs 1,826 tokens per session, scanned A, a copy of scarf AGENTS.md, MIT.

Instructions for Harness's in-repository Memophant memory system, which stores shared project knowledge in plain files and serves it to different coding agents through an MCP server.

In plain words
What is it for?
Use it when an agent needs project context, must record a lasting decision, or needs to update memory while preserving its folder structure and safety checks.
Why use it?
It establishes the repository memory as the source of truth and explains how agents should search, update, validate, and protect that knowledge.

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

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/awizemann/harness/agents-md.svg)](https://agentmods.dev/instructions/awizemann/harness/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/awizemann/harness/agents-md"><img src="https://agentmods.dev/badge/instructions/awizemann/harness/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,826 This file is loaded in full into every session.
When invoked 1,826 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin 95% copy Near-identical to another mod 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.01826 $0.01826
Opus 5 $0.00913 $0.00913
Sonnet 5 $0.00365 $0.00365
Haiku 4.5 $0.00183 $0.00183

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

Security

Grade A, and why

harness 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.

Origin

This is a copy

95% identical to scarf AGENTS.md — 20 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

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: "harness-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: "harness-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. yesterday Changed · +10 lines · +198 tokens per session 783377af0d9f
  2. 5d ago First seen · 96 lines · 1,628 tokens per session scan A 162d40255ff0

Subscribe to this mod's changes

harness AGENTS.md is an instructions file published in the GitHub repository awizemann/harness (344 stars, last pushed 2d ago), licensed MIT. It adds 1,826 tokens to every session, about $0.0091 per session on Opus 5. A static security scan graded it A with 0 findings. It is 95% identical to scarf AGENTS.md, differing in 20 lines, and is treated as a copy.

Related

Other instructions, from other repositories

scarf AGENTS.md

AGENTS.md instructions for awizemann/scarf: 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…

awizemann/scarf · 1,827 tokens

scarf copilot-instructions.md

Copilot instructions for awizemann/scarf: File memory notes under one of six folders (architecture/conventions/decisions/operations/project/roadmap), never the root. When a note is grounded in code, pass sourcepaths (the repo files it depends on) so Memory Health can drift-check it — an unanchored code note can't be…

awizemann/scarf · 571 tokens

scarf GEMINI.md

Gemini CLI instructions for awizemann/scarf: File memory notes under one of six folders (architecture/conventions/decisions/operations/project/roadmap), never the root. When a note is grounded in code, pass sourcepaths (the repo files it depends on) so Memory Health can drift-check it — an unanchored code note can't…

awizemann/scarf · 571 tokens

ContextKit CLAUDE.md

Instructions for FlineDev/ContextKit, a project described as: Claude Code context engineering & planning system for individual AI development workflows.

FlineDev/ContextKit · 5 tokens

cognirepo CLAUDE.md

Claude Code instructions for ashlesh-t/cognirepo, covering claude.md, key rules, session start sequence (run in this order), behavioral confirmation rule and personas (cognirepo-402, cognirepo-403).

ashlesh-t/cognirepo · 2,241 tokens

aeon CLAUDE.md

Claude Code instructions for aeonfun/aeon, covering aeon, how aeon works, strategy, voice and soul file hierarchy (read in this order).

aeonfun/aeon · 3,720 tokens