agentleFS
AncienttwoAncienttwo/repo-harness/AGENTS.md

repo-harness

AGENTS.md434 starsChanged 56 days agoMITView on GitHub

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

21 rules. About 2 are common, 14 are distinctive, and 5 are very specific to this project.

  • ≈2

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈14

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Keep root CLAUDE.md and AGENTS.md as standalone regular files.

    line 5
  2. Distinctive:

    Read the current request and repo-local agent context, work on a branch, make bounded commits, verify once, then report the PR outcome.

    line 6
  3. Distinctive:

    Write output text (docs, PR descriptions, commit messages, reports) in ASD-STE100 Simplified Technical English: short sentences, one idea …

    line 7
  4. Common:

    Keep four hard boundaries: main publication, deletion, credentials/permissions, and release/production operations.

    line 9
  5. Distinctive:

    Use gatekeeper/cross-model review for large changes, security/permissions, or unresolved model uncertainty.

    line 12
  6. Distinctive:

    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, …

    line 15
  7. Distinctive:

    Keep one source of truth for each datum.

    line 22
  8. Distinctive:

    Do not add steady-state compatibility code, dual authority, semantic fallbacks, aliases or shadow parsers.

    line 23
  9. Distinctive:

    Prefer platform/standard-library features, then installed dependencies, and the smallest direct implementation.

    line 25
  10. Distinctive:

    Never satisfy a requirement with a substitute that only looks compliant (mocks, hard-coded values, images posing as the real thing).

    line 26
  11. Very specific:

    Run bun run check:type plus tests covering the changed behavior once after the implementation is stable.

    line 30
  12. Very specific:

    Use bun run test:files <affected tests> --timeout 60000 --max-concurrency 1.

    line 31
  13. Distinctive:

    Run the full suite daily; a failure opens an automatic repair task and appears in the daily report.

    line 36
  14. Distinctive:

    Never modify or delete test assertions just to make tests pass.

    line 39
  15. Distinctive:

    Create a checkpoint only when context/session rollover or unresolved work needs it.

    line 42
  16. Distinctive:

    Read files named in the current request before recovery context.

    line 43
  17. Very specific:

    Keep temporary checkpoints under ignored .ai/harness/handoff/.

    line 45
  18. Common:

    Never include secrets, tokens or real environment files in handoff text.

    line 47
  19. Very specific:

    Use ~/.codex/skills as the runtime skill source.

    line 54
  20. Very specific:

    Treat auto-compact as a fallback.

    line 56
  21. Distinctive:

    Keep this file short; load development flow and external tooling only when needed.

    line 57

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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; read docs/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 downstream assets/templates / assets/partials*. Keep assets/workflow-contract.v1.json and .ai/harness/workflow-contract.json aligned.
  • _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/.

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:type plus 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.md is an optional local read model.
  • Preserve dirty work and other workers' edits; hand back an ownership conflict instead of discarding their changes.

Codex

  • Own backend implementation and testing; Claude owns frontend implementation and interaction, and the parent coordinates scope and integration.
  • User-level ~/.codex/hooks.json hooks invoke repo-harness-hook; its typed route registry selects one in-process handler. Repo-local hook adapters are retired. Operator helpers use the package path from repo-harness hook-lib path. This source repo keeps .ai/hooks/lib/workflow-state.sh for self-hosting.
  • Use ~/.codex/skills as the runtime skill source; ~/.agents/skills is staging/cache only. Keep think, hunt, check and health updates verified before runtime use.
  • The Codex automation profile requires runtime-provided health, check and mermaid; do not vendor their bodies.
  • Treat auto-compact as a fallback; prepare ignored .ai/harness/handoff/current.md and resume.md when long-task rollover is needed.
  • Keep this file short; load development flow and external tooling only when needed.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.