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.
npx agentmods add instructions/ancienttwo/repo-harness/agents-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/agents-md)<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="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 | $0.02815 | $0.02815 |
| Opus 5 | $0.01407 | $0.01407 |
| Sonnet 5 | $0.00563 | $0.00563 |
| Haiku 4.5 | $0.00281 | $0.00281 |
Grade B, and why
repo-harness AGENTS.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 Copies of this mod
1 near-identical copy found in the catalogue:
- repo-harness CLAUDE.md — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 118 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 tracked current-status snapshot 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, anddiagram-designfrom~/.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. Update by staging upstream Waza, copying the eight managedSKILL.mdfiles into Codex, and verifying withcmp. - 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 · +10 lines · +104 tokens per session 433960c1a70b
- yesterday Changed · -4 lines · -90 tokens per session 5091c11ef33e
- 5d ago First seen · 112 lines · 2,801 tokens per session scan B dc86adc8a4b7
repo-harness AGENTS.md is an instructions file published in the GitHub repository Ancienttwo/repo-harness (421 stars, last pushed today), licensed MIT. It adds 2,815 tokens to every session, about $0.0141 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
nextclaw AGENTS.md
AGENTS.md instructions for Peiiii/nextclaw, covering nextclaw ai 常驻内核, 产品愿景, 沟通与推进, 深思与目标模式 and 协作与 git 安全.
Commonly-used-high-value-skills AGENTS.md
AGENTS.md instructions for seaworld008/Commonly-used-high-value-skills, covering repository agent instructions, architecture overview, installation root by client, golden rules and automated operations (sop for ai agents).
slipway AGENTS.md
AGENTS.md instructions for signalridge/slipway, covering slipway agent principles, user owns the process, investigate before clarifying, report, do not certify and maintain the whole surface.
nobrainer-tech-skills copilot-instructions.md
Copilot instructions for nobrainer-tech/nobrainer-tech-skills: The fifteen canonical Agent Skills are under skills/. Read the relevant skills/ /SKILL.md before changing a skill; retired predecessors exist only in Git history.
codegraph AGENTS.md
Instructions for lzehrung/codegraph, covering agent directives, general and path, cache, and review safety.
agentic-rd-skill AGENTS.md
AGENTS.md instructions for TheStreamCode/agentic-rd-skill, covering repository instructions, purpose and sources of truth, repository invariants, implementation style and documentation synchronization.