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.
curl -O https://raw.githubusercontent.com/Ancienttwo/repo-harness/main/CLAUDE.mdgit clone --depth 1 https://github.com/Ancienttwo/repo-harnessWrote 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.
[](https://agentmods.dev/instructions/ancienttwo/repo-harness/claude-md)<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>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.
| Model | Per session | Once 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 |
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 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.
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.mdfor the ignored local current-status read model derived from workflow artifactstasks/todos.mdfor deferred medium/long-term goals, not active execution checklistsplans/prds/for upper-layer PRDs;plans/sprints/for ordered sprint backlogs operated throughrepo-harness run sprint-backlog; task contracts stay the execution slices.archcontext/model/nodes/*.yamlfor the capability nodes and longest-prefix context boundaries, selected by.ai/harness/policy.json#context.capability_sourcetasks/workstreams/for capability long-running workstreams that project durable progress into local contractstasks/lessons.mdfor correction-derived rulesdocs/researches/for deep repo knowledgetasks/notes/for task-local implementation decisions, deviations, tradeoffs, and open questionsplans/for timestamped plans, withplans/archive/for history.ai/harness/workflow-contract.jsonfor the installed workflow contract manifest.ai/harness/policy.jsonfor the machine-readable workflow contract.ai/context/context-map.jsonfor progressive context loadingdocs/architecture/index.mdfor umbrella architecture status, drift requests, snapshots, and diagram linksdocs/reference-configs/agentic-development-flow.mdfor 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.mdonly for non-obvious slice decisions, deviations, tradeoffs, and open questions;<plan-stem>is the active plan filename withoutplan-and.md(for example20260531-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.jsonand~/.codex/hooks.jsoninvokerepo-harness-hook, whose route registry selects exactly one in-process handler..ai/hooks/lib/workflow-state.shis 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, andtasks/todos.mdowns only deferred medium/long-term goals with tradeoff and revisit trigger. - Treat
.archcontext/model/nodes/*.yamlas the source of truth for capability prefixes undercapability_source: "archcontext";agent-context-blocks.txtand nested agent files are initialization inputs only, never runtime resolver authority. - Keep architecture drift handling split:
architecture-queue.shwrites architecture requests/events,workstream-sync.shmaintains durable capability workstreams, andcontext-contract-sync.shonly updates controlled localCLAUDE.md/AGENTS.mdarchitecture blocks. - Keep
assets/workflow-contract.v1.jsonand.ai/harness/workflow-contract.jsonin sync. - Keep
CLAUDE.mdandAGENTS.mdshort; put detailed guidance indocs/reference-configs/. - Treat Codex auto-compact as a fallback only; use
.ai/harness/handoff/current.mdand.ai/harness/handoff/resume.mdfor long-task rollover. - Treat
.ai/harness/checks/*.latest.{json,md}and.ai/harness/runs/as ignored runtime evidence cache; commit durable conclusions intasks/reviews/,tasks/contracts/,tasks/notes/, ordocs/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, ortasks/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 explicitobsidian-memorypersist call; the vault layer is optional and never a prerequisite for closing a workflow..rgignorehides archived workflow artifacts and runtime evidence from defaultrgsearches; use explicit paths orrg -uufor 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 intasks/notes/ordocs/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_sqlfor configured SQL roots and naming modes, otherwise keep SQL directly underdeploy/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>startsrepo-harness run contract-worktree start --plan <approved-plan>when policy enables it, and completed blocks finish through Waza/checkplusrepo-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 thecodex-goaldocument. Composed-path tests verify the count. - After Codex Plan mode, Waza
/think, orrepo-harness-planproduces a decision-complete work-package plan, capture it withrepo-harness run capture-plan --artifact-level work-package --slug <slug> --title <title>soplans/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 runrepo-harness run plan-to-todo --plan <active-plan>. - Promote work into a top-level
plans/plan-*.mdonly whenArtifact Level: work-packageis 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 tomainwithout absorbing unrelated dirty changes. - Route product discovery and complex/design planning to the parent agent: use
gejufor 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, andmermaidfrom~/.codex/skills. - Keep durable repo knowledge in
docs/researches/,tasks/lessons.md, and the canonical workflow artifacts. - Treat
.ai/harness/brain-manifest.jsonandrepo-harness run sync-brain-docsas 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/skillsis the Codex runtime source;~/.agents/skillsis skills CLI staging/cache only. The managed skills arethink,hunt,check, andhealth; stage upstream Waza, copy their complete skill directories and shared rules into Codex, and verify withdiff/cmpas described indocs/reference-configs/external-tooling.md. - Use
docs/reference-configs/external-tooling.mdandbash scripts/check-agent-tooling.sh --host both --check-updatesfor 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-runand a fixture apply use the same TS operation model. - Treat repo-local
.claude/settings.jsonand.codex/hooks.jsonhook adapters as retired legacy config; migration may back them up locally, but they are not product deliverables.
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.
- today Changed · +2 lines · +43 tokens per session cf1696133698
- yesterday Changed · +21 lines · +306 tokens per session 732956ff6393
- 2d ago Changed · +10 lines · +104 tokens per session 433960c1a70b
- 3d ago Changed · -4 lines · -90 tokens per session 5091c11ef33e
- 8d ago First seen · 112 lines · 2,801 tokens per session scan B dc86adc8a4b7
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.
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.
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).
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.
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.
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).
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.