repo-harness: Instructions file for Claude Code

CLAUDE.md

repo-harness CLAUDE.md is an instructions file for Claude Code, Codex from Ancienttwo/repo-harness. It costs 3,164 tokens per session, scanned B, a copy of repo-harness AGENTS.md, 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 Claude CodeCodex

Written for Codex and Claude Code: reads ~/.codex or $CODEX_HOME, but also the file is CLAUDE.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions AGENTS.md.

This is Ancienttwo/repo-harness's own configuration. It tells Claude Code and Codex 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/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/Ancienttwo/repo-harness

Made for: Claude Code, Codex.

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 CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/ancienttwo/repo-harness/claude-md.svg)](https://agentmods.dev/instructions/ancienttwo/repo-harness/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/ancienttwo/repo-harness/claude-md"><img src="https://agentmods.dev/badge/instructions/ancienttwo/repo-harness/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,164 This file is loaded in full into every session.
When invoked 3,164 The same file — it is already loaded in full.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% 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.1 $0.03164 $0.03164
Opus 5 $0.01582 $0.01582
Sonnet 5 $0.00633 $0.00633
Haiku 4.5 $0.00316 $0.00316

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

Security

Grade B, and why

repo-harness CLAUDE.md scanned grade B with 1 finding 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- Treat hook execution as typed and user-level: `~/.claude/settings.json` and `~/.codex/hooks.json` invoke `repo-harness-hook`, whose route registry selects exactly one in-process handler. `.ai/hooks/lib/workflow-state.s
Origin

This is a copy

100% identical to repo-harness AGENTS.md — 0 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.

CLAUDE.md · 141 lines

How it starts

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

repo-harness AGENTS.md

This repository self-hosts the repo-harness contract; the former repo-harness-skill and project-initializer names have been fully removed and are no longer recognized by any tooling. Claude and Codex should follow the same repo-local workflow surface.

Canonical Workflow Files

  • tasks/current.md for the ignored local current-status read model derived from workflow artifacts
  • tasks/todos.md for deferred medium/long-term goals, not active execution checklists
  • plans/prds/ for upper-layer PRDs; plans/sprints/ for ordered sprint backlogs operated through repo-harness run sprint-backlog; task contracts stay the execution slices
  • .archcontext/model/nodes/*.yaml for the capability nodes and longest-prefix context boundaries, selected by .ai/harness/policy.json#context.capability_source
  • tasks/workstreams/ for capability long-running workstreams that project durable progress into local contracts
  • tasks/lessons.md for correction-derived rules
  • docs/researches/ for deep repo knowledge
  • tasks/notes/ for task-local implementation decisions, deviations, tradeoffs, and open questions
  • plans/ for timestamped plans, with plans/archive/ for history
  • .ai/harness/workflow-contract.json for the installed workflow contract manifest
  • .ai/harness/policy.json for the machine-readable workflow contract
  • .ai/context/context-map.json for progressive context loading
  • docs/architecture/index.md for umbrella architecture status, drift requests, snapshots, and diagram links
  • docs/reference-configs/agentic-development-flow.md for parent-agent/Waza routing and P1/P2/P3 rules

Operating Rules

  • Sync tasks/ whenever substantive repo changes are made.
  • Use tasks/notes/<plan-stem>.notes.md only for non-obvious slice decisions, deviations, tradeoffs, and open questions; <plan-stem> is the active plan filename without plan- and .md (for example 20260531-0045-governance-workflow). Do not use notes as durable memory or a task log, and archive/promote them deliberately when the slice closes.
  • Treat hook execution as typed and user-level: ~/.claude/settings.json and ~/.codex/hooks.json invoke repo-harness-hook, whose route registry selects exactly one in-process handler. .ai/hooks/lib/workflow-state.sh is an operator-helper library, never a host-event dispatcher.
  • Keep the umbrella hierarchy explicit: architecture owns stable truth, capability contracts own local agent context, tasks/workstreams/<domain>/<capability>/ owns durable progress, and tasks/todos.md owns only deferred medium/long-term goals with tradeoff and revisit trigger.
  • Treat .archcontext/model/nodes/*.yaml as the source of truth for capability prefixes under capability_source: "archcontext"; agent-context-blocks.txt and nested agent files are initialization inputs only, never runtime resolver authority.
  • Keep architecture drift handling split: architecture-queue.sh writes architecture requests/events, workstream-sync.sh maintains durable capability workstreams, and context-contract-sync.sh only updates controlled local CLAUDE.md/AGENTS.md architecture blocks.
  • Keep assets/workflow-contract.v1.json and .ai/harness/workflow-contract.json in sync.
  • Keep CLAUDE.md and AGENTS.md short; put detailed guidance in docs/reference-configs/.
  • Treat Codex auto-compact as a fallback only; use .ai/harness/handoff/current.md and .ai/harness/handoff/resume.md for long-task rollover.
  • Treat .ai/harness/checks/*.latest.{json,md} and .ai/harness/runs/ as ignored runtime evidence cache; commit durable conclusions in tasks/reviews/, tasks/contracts/, tasks/notes/, or docs/researches/ instead.
  • Treat architecture/spec/research docs as the human reading entrypoint. Before closing a workflow, promote durable conclusions into docs/architecture/, docs/researches/, docs/spec.md, or tasks/lessons.md; then archive fulfilled plan/contract/review/notes/todo artifacts so root workflow surfaces represent active work only. When a brain root is configured, a durable conclusion worth reusing across projects may additionally be projected into the vault through an explicit obsidian-memory persist call; the vault layer is optional and never a prerequisite for closing a workflow. .rgignore hides archived workflow artifacts and runtime evidence from default rg searches; use explicit paths or rg -uu for audits.
  • Treat _ref/ as an occasional ignored external reference checkout cache, not a commit surface or daily workflow. Agents may read or refresh it for comparison; when it influences a decision, cite the source repo plus commit/tag and path in tasks/notes/ or docs/researches/.
  • Treat deploy/ as the trackable deployment and operations surface for runbooks, submission materials, release checklists, helper scripts, ordered SQL files, and env examples; follow .ai/harness/policy.json#operations.deploy_sql for configured SQL roots and naming modes, otherwise keep SQL directly under deploy/sql/ with 4-digit ascending prefixes.
  • Treat _ops/ as ignored local operations state for secrets, real env files, provider state, artifacts, logs, and scratch files; do not commit or agent-edit _ops/*.
  • Treat contract-level task execution as worktree-first: repo-harness run plan-to-todo --plan <approved-plan> starts repo-harness run contract-worktree start --plan <approved-plan> when policy enables it, and completed blocks finish through Waza /check plus repo-harness run contract-worktree finish.
  • Treat the EXECUTION_BOUNDARY anti-extras clause as mandatory exactly once in each delegated runner's final rendered task packet: absent requirements are forbidden design space, not permission to improve, and unrequested extras fail closed. Each runner path names one injection owner and no other surface on that path may carry the clause — the Codex native-child path is owned by SubagentStart.context (contract- and writability-aware; generated personas and the delegation advisor carry none), the standalone contract worker path by its worker prompt, and the MCP path by the codex-goal document. Composed-path tests verify the count.
  • After Codex Plan mode, Waza /think, or repo-harness-plan produces a decision-complete work-package plan, capture it with repo-harness run capture-plan --artifact-level work-package --slug <slug> --title <title> so plans/ becomes the file-backed source of truth; if the user has already approved implementation, capture with --status Approved --execute --promotion-reason <merge_boundary|rollback_boundary|verification_boundary|risk_boundary|human_decision_boundary|worktree_boundary> or run repo-harness run plan-to-todo --plan <active-plan>.
  • Promote work into a top-level plans/plan-*.md only when Artifact Level: work-package is justified by a merge/PR unit, rollback surface, independent verification boundary, review/acceptance boundary, high-risk surface, or otherwise cannot remain a checklist item in the current active plan or sprint backlog. Inline sprint rows and checklist rows stay in the sprint backlog or active plan ## Task Breakdown; contract rows may expand into plan -> contract -> review -> notes only through the work-package gate.
  • If current repo state conflicts with the task, open an isolated codex/<task-slug> worktree, finish there, run Waza /check-style validation, then merge back to main without absorbing unrelated dirty changes.
  • Route product discovery and complex/design planning to the parent agent: use geju for pre-contract framing, complete P1/P2/P3 with the parent agent's own capabilities, and freeze the accepted direction into the plan and contract. Route daily small/medium planning, bug hunts, and checks to Waza /think, /hunt, and /check. Route a proactive multi-direction visual/UX choice mid-task to the design-options convention (repo-harness docs show design-options).
  • Codex automation profile is runtime-referenced, not vendored: required skills are health, check, and mermaid from ~/.codex/skills.
  • Keep durable repo knowledge in docs/researches/, tasks/lessons.md, and the canonical workflow artifacts.
  • Treat .ai/harness/brain-manifest.json and repo-harness run sync-brain-docs as explicit operator-invoked export surfaces only; hooks and workflow checks must not read, write, or gate on external brain-vault state.
  • Treat Waza as Codex-first: ~/.codex/skills is the Codex runtime source; ~/.agents/skills is skills CLI staging/cache only. The managed skills are think, hunt, check, and health; stage upstream Waza, copy their complete skill directories and shared rules into Codex, and verify with diff/cmp as described in docs/reference-configs/external-tooling.md.
  • Use docs/reference-configs/external-tooling.md and bash scripts/check-agent-tooling.sh --host both --check-updates for environment checks; this self-host repo vendors CodeGraph as a dev dependency while generated downstream repos keep the global MCP default unless local policy opts in.
  • When changing adoption planner or transaction code, verify repo-harness init --repo . --dry-run and a fixture apply use the same TS operation model.
  • Treat repo-local .claude/settings.json and .codex/hooks.json hook adapters as retired legacy config; migration may back them up locally, but they are not product deliverables.

Read the full file on GitHub · 141 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 · +2 lines · +43 tokens per session cf1696133698
  2. yesterday Changed · +21 lines · +306 tokens per session 732956ff6393
  3. 2d ago Changed · +10 lines · +104 tokens per session 433960c1a70b
  4. 3d ago Changed · -4 lines · -90 tokens per session 5091c11ef33e
  5. 8d ago First seen · 112 lines · 2,801 tokens per session scan B dc86adc8a4b7

Subscribe to this mod's changes

repo-harness CLAUDE.md is an instructions file published in the GitHub repository Ancienttwo/repo-harness (426 stars, last pushed today), licensed MIT. It adds 3,164 tokens to every session, about $0.0158 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). It is 100% identical to repo-harness AGENTS.md, differing in 0 lines, and is treated as a copy.

Related

Other instructions, from other repositories

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens