repo-harness
CLAUDE.md434 starsChanged 56 days agoMITView on GitHub
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- assets/AGENTS.mdAGENTS.md
- evals/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- tests/AGENTS.mdAGENTS.md
- assets/CLAUDE.mdCLAUDE.md
- evals/CLAUDE.mdCLAUDE.md
- scripts/CLAUDE.mdCLAUDE.md
- tests/CLAUDE.mdCLAUDE.md
- repo-harnessSkill
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
21 rules. About 0 are common, 18 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈18
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 5
Keep root CLAUDE.md and AGENTS.md as standalone regular files.
- Distinctive: line 6
Read the current request and repo-local agent context, work on a branch, make bounded commits, verify once, then report the PR outcome.
- Distinctive: line 7
Write output text (docs, PR descriptions, commit messages, reports) in ASD-STE100 Simplified Technical English: short sentences, one idea …
- Distinctive: line 9
Keep four hard boundaries: main publication, deletion, credentials/permissions, and release/production operations.
- Distinctive: line 12
Use gatekeeper/cross-model review for large changes, security/permissions, or unresolved model uncertainty.
- Distinctive: line 15
When one PR changes both test assertions and implementation code, run one read-only review focused on tests bent to fit a bug (on-demand, …
- Distinctive: line 22
Keep one source of truth for each datum.
- Distinctive: line 23
Do not add steady-state compatibility code, dual authority, semantic fallbacks, aliases or shadow parsers.
- Distinctive: line 25
Prefer platform/standard-library features, then installed dependencies, and the smallest direct implementation.
- Distinctive: line 26
Never satisfy a requirement with a substitute that only looks compliant (mocks, hard-coded values, images posing as the real thing).
- Very specific: line 30
Run bun run check:type plus tests covering the changed behavior once after the implementation is stable.
- Very specific: line 31
Use bun run test:files <affected tests> --timeout 60000 --max-concurrency 1.
- Distinctive: line 36
Run the full suite daily; a failure opens an automatic repair task and appears in the daily report.
- Distinctive: line 39
Never modify or delete test assertions just to make tests pass.
- Distinctive: line 42
Create a checkpoint only when context/session rollover or unresolved work needs it.
- Distinctive: line 43
Read files named in the current request before recovery context.
- Very specific: line 45
Keep temporary checkpoints under ignored .ai/harness/handoff/.
- Distinctive: line 47
Never include secrets, tokens or real environment files in handoff text.
- Distinctive: line 53
Use Claude Code's available tools within granted permissions.
- Distinctive: line 55
Write comments, commits and PR text from the final diff.
- Distinctive: line 56
Keep this file short; load development flow and external tooling only when needed.
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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.
- Write output text (docs, PR descriptions, commit messages, reports) in ASD-STE100 Simplified Technical English: short sentences, one idea per sentence, active voice, approved-dictionary words; write Chinese output the same way, with short sentences and one idea per sentence.
- 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. Tag authorized publication and record
git revert <squash-commit>plus the daily report. - 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.
- Use gatekeeper/cross-model review for large changes, security/permissions, or unresolved model uncertainty; ordinary steps record diagnostics without approval loops.
- 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.
- When one PR changes both test assertions and implementation code, run one read-only review focused on tests bent to fit a bug (on-demand, not a restored gate; dispatch per the herdr guide).
.archcontext/model/owns architecture boundaries; readdocs/architecture/on demand and update only real responsibility changes. Architecture diagnostics do not block work or author nested agent instructions.- Preserve
agents/fleet/, release checklists and downstreamassets/templates/assets/partials*. Keepassets/workflow-contract.v1.jsonand.ai/harness/workflow-contract.jsonaligned. _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 underdeploy/sql/.
Code Optimization Principles
- Identify observable conditions, controllable inputs, the invariant and the actual pressure point before changing structure.
- Keep one source of truth for each datum; other representations are deterministic projections with drift checks.
- Do not add steady-state compatibility code, dual authority, semantic fallbacks, aliases or shadow parsers; one-shot migrations fail closed and remove the retired path.
- Share components only for observed reuse or a cross-module invariant. Use an existing workspace only for independently meaningful consumers; do not convert this single-package repo without that boundary.
- Prefer platform/standard-library features, then installed dependencies, and the smallest direct implementation; shrink obsolete code before adding layers.
- Never satisfy a requirement with a substitute that only looks compliant (mocks, hard-coded values, images posing as the real thing); say what cannot be done and flag the deviation in the PR.
- Self-review before committing: remove dead code, empty branches and debug leftovers, and split functions by responsibility instead of one large block.
Testing
- Run
bun run check:typeplus tests covering the changed behavior once after the implementation is stable. - Use
bun run test:files <affected tests> --timeout 60000 --max-concurrency 1; extend existing coverage before creating a new test file. - Select tests by observable risk and owning runtime boundary, including error/recovery paths when affected.
- Mechanical prose changes need link/scope validation, not new product tests; do not test incidental formatting.
- Reviewers consume the recorded command, result, revision and environment; they do not rerun passing checks to claim ownership.
- Changed inputs or a new uncovered failure justify affected delta checks; an old pass is only historical evidence for its old subject.
- Run the full suite daily; a failure opens an automatic repair task and appears in the daily report.
- Isolate mutable HOME, repositories and process state; use real synchronization signals and preserve complete failure output.
- Report failed, timed-out, incomplete or omitted coverage explicitly; do not manufacture receipts, waiver files or pre-fix logs.
- Never modify or delete test assertions just to make tests pass; justify every necessary test change item by item in the PR description.
Handoff
- Create a checkpoint only when context/session rollover or unresolved work needs it; ordinary completion stays in the PR description.
- Read files named in the current request before recovery context.
- Record the goal, branch/worktree/HEAD, decisions, touched files, verification results, blockers and one exact next command.
- Keep temporary checkpoints under ignored
.ai/harness/handoff/; historical snapshots are not current execution authority. - Include evidence paths and actual command outcomes; distinguish observed state from inference.
- Never include secrets, tokens or real environment files in handoff text.
- On resume, verify the live checkout and source artifacts before reusing a result;
tasks/current.mdis an optional local read model. - Preserve dirty work and other workers' edits; hand back an ownership conflict instead of discarding their changes.
Claude Code
- Own frontend implementation and interaction; Codex owns backend implementation and testing, and the parent coordinates scope and integration.
- Use Claude Code's available tools within granted permissions; changes to tool grants, hooks or confirmation bypass require approval of the exact change.
- User-level
~/.claude/settings.jsonhooks invokerepo-harness-hook; its typed route registry selects one in-process handler. Repo-local hook adapters are retired. Operator helpers use the package path fromrepo-harness hook-lib path. This source repo keeps.ai/hooks/lib/workflow-state.shfor self-hosting. - Write comments, commits and PR text from the final diff; comments explain non-obvious reasons, and PRs describe final behavior and material rationale.
- Keep this file short; load development flow and external tooling only when needed.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

