repo-harness: Instructions file for Codex

AGENTS.md

repo-harness AGENTS.md is an instructions file for Codex, OpenCode from Ancienttwo/repo-harness. It costs 2,986 tokens per session, scanned A, original, MIT.

Repository instructions for repo-harness, a workflow system that organizes tasks, plans, research, project context, and long-running workstreams. It defines the files and rules that Claude and Codex should follow in the repository.

In plain words
What is it for?
Use them to find current work, record plans and notes, manage sprint backlogs, select repository context, and follow required coding and checking rules.
Why use it?
They prevent agents from using outdated workflow files or treating planning, task tracking, and project context inconsistently.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions CLAUDE.md; mentions subagents; reads ~/.codex paths.

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

Reuse

Borrowing it

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/ancienttwo/repo-harness/agents-md"><img src="https://agentmods.dev/badge/instructions/ancienttwo/repo-harness/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,986 This file is loaded in full into every session.
When invoked 2,986 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.02986 $0.02986
Opus 5.5 $0.01194 $0.01194
Sonnet 5.5 $0.00597 $0.00597
Haiku 4.5 $0.00299 $0.00299

Measured today against content hash 56cd36bdaaea, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

repo-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 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 · 88 lines

How it starts

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

repo-harness

Workflow

  • For non-trivial work, follow the global Progressive Due Diligence rule (P1 map, P2 trace, P3 decision) before design decisions or code edits.
  • Keep root CLAUDE.md and AGENTS.md as standalone regular files; repeat shared rules in both and keep host-specific guidance separate.
  • Read the current request and repo-local agent context, work on a branch, make bounded commits, verify once, then report the PR outcome.
  • Read tasks/lessons.md at session start and apply its active lessons. Current repo state and evidence override a lesson.
  • Finish the main task first. Fix a small problem found on the way directly. For a large problem, open a GitHub issue before you work on it.
  • Ordinary tasks use the PR description: goal, scope, changes, verification, risk and rollback. No mandatory plan/contract/review/notes chain; notes are only for non-obvious decisions.
  • Keep four hard boundaries: main publication, deletion, credentials/permissions, and release/production operations.
  • Only when the current task explicitly authorizes main publication may a model squash-merge after automated checks pass and GitHub has no outstanding change requests or unresolved review threads; an explicit no-merge instruction always wins. Push/tag still require task authorization; credentials/permissions, other deletion and release/production retain their separate approval boundaries. Record authorized publication, the provider-confirmed merge SHA and parent SHA, git revert <squash-commit>, and the daily report. Do not create rollback tags.
  • Create task worktrees only at /tmp/<repo>-wt-<slug> (Windows: os.tmpdir()): use repo-harness run contract-worktree start --plan <plan-file> for plan tasks, or git worktree add with that path. Never create one beside the main checkout (../); the Claude Bash hook denies a target outside that root. Commit or push before a reboot or a tmp cleanup.
  • Closeout and sweep remove only merged, clean and unowned worktrees. To keep one, give it an unmerged commit, keep it dirty, or mark or lock it. Details: agentic-development-flow.
  • Automatically delete only merged, clean worktrees/branches; ask the user for every other deletion. Credentials/permissions (including confirmation bypass) and release/production operations require user approval.
  • Select independent review by the diff's Review by risk tier: none for low, one fresh-context review for medium, gatekeeper plus cross-model review for high; ordinary steps record diagnostics without approval loops.
  • When you delegate, investigate first, then split work by write ownership. Give each parallel writer its own worktree from a clean source. Implementation sub-agents edit only their scope. They may run scoped typecheck and affected tests in their own worktree. They commit early in their own worktree and return their check results. In a shared checkout they do not commit; the parent commits. Evidence roles run the named check that is their task and do not commit. The parent agent owns task management, conflict resolution, build and post-merge integration verification, including typecheck and affected tests. After integration, the parent removes each sub-agent worktree and branch whose commits are in the task branch and whose checkout is clean. It also removes the intermediate build output and temporary files that the work created. Other deletion still needs the user.
  • Model division and cross-model dispatch/review follow Herdr Dispatch.
  • GitHub operations (PRs, reviews, merges, labels, releases, comments) go only through the gh/git CLI or the GitHub API. Never use simulated browser clicks on github.com: the account can be banned.
  • Changing implementation and test assertions together does not raise the review tier. Check for tests bent to fit a bug within the tier's existing review; at Low, include this check in self-review. Do not add a separate test-review gate. Reuse recorded acceptance as defined in Review by risk.
  • .archcontext/model/ owns architecture boundaries; read docs/architecture/ on demand and update only real responsibility changes. Architecture diagnostics do not block work or author nested agent instructions.
  • When a branch changes a capability's responsibility, entrypoints, relations or flows, follow repo-harness-architecture (assets/skill-commands/repo-harness-architecture/references/worker.md). Handle architecture debt in the model and human prose. The archctx rolling writer publishes generated regions and the projection manifest; do not apply and commit them in a feature PR.
  • Preserve agents/fleet/, release checklists and downstream assets/templates. .ai/harness/workflow-contract.json is the opt-in marker. assets/workflow-contract.v1.json is the contract.
  • _ops/ is ignored private operations state: never commit or agent-edit it. _ref/ is an ignored reference cache; cite influential revisions. Follow deploy SQL policy, otherwise use ascending 4-digit files under deploy/sql/.

Read the full file on GitHub · 88 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 · +46 tokens per session 56cd36bdaaea
  2. yesterday Changed · +54 tokens per session 287950742c67
  3. 2d ago Changed d82fa00f196a
  4. 3d ago Changed · +2 lines · +90 tokens per session a5d24a4d7cdd
  5. 5d ago Changed · +3 lines · +36 tokens per session f57998c6509a
  6. 10d ago Changed · +8 lines · +352 tokens per session 5e9435ade7df
  7. 11d ago Changed · -324 tokens per session 0616c73765ba
  8. 12d ago Changed · +2 lines · +79 tokens per session d0f92b0e2f2c
  9. 13d ago Changed · +1 lines · +33 tokens per session ffd887b5a770
  10. 14d ago First seen · 72 lines · 2,620 tokens per session scan A f84328a49ab0

Subscribe to this mod's changes

repo-harness AGENTS.md is an instructions file published in the GitHub repository Ancienttwo/repo-harness (435 stars, last pushed today), licensed MIT. It adds 2,986 tokens to every session, about $0.0119 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