repo-harness: Instructions file for Claude Code

CLAUDE.md

repo-harness CLAUDE.md is an instructions file for Claude Code from Ancienttwo/repo-harness. It costs 2,937 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 Code

Written for Claude Code: the file is CLAUDE.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

This is Ancienttwo/repo-harness's own configuration. It tells Claude Code 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.

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

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,937 This file is loaded in full into every session.
When invoked 2,937 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.02937 $0.02937
Opus 5.5 $0.01175 $0.01175
Sonnet 5.5 $0.00587 $0.00587
Haiku 4.5 $0.00294 $0.00294

Measured today against content hash 015c4cc70fb9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-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.

- User-level `~/.claude/settings.json` hooks invoke `repo-harness-hook`; its typed route registry selects one in-process handler. Operator helpers run from the package through `repo-harness run <helper>`.
Origin

This is a copy

100% identical to repo-harness AGENTS.md — 11 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 · 87 lines

How it starts

The opening of the file, as written. The whole thing — 87 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 · 87 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 015c4cc70fb9
  2. yesterday Changed · +54 tokens per session a02200feb7b1
  3. 2d ago Changed 6e4b7d4f0238
  4. 3d ago Changed · +2 lines · +90 tokens per session a6a6b15a1559
  5. 5d ago Changed · +3 lines · +36 tokens per session 548af9408139
  6. 10d ago Changed · +8 lines · +352 tokens per session 8933c35ea09d
  7. 11d ago Changed · -324 tokens per session d7add8f3268c
  8. 12d ago Changed · +2 lines · +79 tokens per session 191368799809
  9. 13d ago Changed · +1 lines · +33 tokens per session acd1ea6ab3d1
  10. 14d ago First seen · 71 lines · 2,571 tokens per session scan B effa372d32d8

Subscribe to this mod's changes

repo-harness CLAUDE.md is an instructions file published in the GitHub repository Ancienttwo/repo-harness (435 stars, last pushed today), licensed MIT. It adds 2,937 tokens to every session, about $0.0117 per session on Opus 5.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 11 lines, and is treated as a copy.

Related

Other instructions, from other repositories