agentleFS
eagerminds-aieagerminds-ai/claude-code-harness/AGENTS.md

claude-code-harness

AGENTS.md2 starsChanged 2 months agoMITView on GitHub

Before a client question or a needs-client label, search decisions, the message ledger, the mailbox and the docs archive. Start with bash scripts/brief.sh <topic> or the brief skill. Read the matching bodies, comments, full mail threads and attachments. Check sender and date. An acknowledgement is not approval; a prior answer can apply only to one platform or release. An unavailable source means search incomplete. Preserve existing decisions and authorization. See docs/agent-workflow.md and .claude/skills/client-feedback/SKILL.md. Green suites prove nothing about a boundary…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 31,700 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository5 other files it gives its agents.

The file

Show its rules and text

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

13 rules. About 1 is common, 9 are distinctive, and 3 are very specific to this project.

  • ≈1

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    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
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Keep only instructions that apply, and move file-specific details into scoped rules.

    line 2
  2. Distinctive:

    Read this file, STATE.md and RULES.md on startup, resume and handoff.

    line 6
  3. Very specific:

    Before a client question or a needs-client label, search decisions, the message ledger, the mailbox and the docs archive.

    line 11
  4. Distinctive:

    Read the matching bodies, comments, full mail threads and attachments.

    line 13
  5. Distinctive:

    Check git status --short, git diff --stat and git log -1 after delegated work.

    line 23
  6. Distinctive:

    Read exit status and output.

    line 28
  7. Very specific:

    When corrected: add what happened, root cause and prevention to archive/MISTAKES.md.

    line 30
  8. Distinctive:

    Use the existing package manager, helper APIs and architecture.

    line 37
  9. Common:

    Keep commands and credentials separate.

    line 39
  10. Distinctive:

    Never add AI attribution or Co-Authored-By trailers to commits.

    line 42
  11. Distinctive:

    Stop only the dev servers you started.

    line 44
  12. Very specific:

    Run <typecheck command>, <lint command> and <targeted test command> as the change requires, then observe behavior.

    line 58
  13. Distinctive:

    Do not change LOGIC.md or a decision to make code pass.

    line 75

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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
<!-- How to adapt: replace <angle-bracket> fields with the project's paths and commands. Keep only instructions that apply, and move file-specific details into scoped rules. -->

<Project> build constitution

<Describe the product, stack and client relationship in one sentence.> Read this file, STATE.md and RULES.md on startup, resume and handoff. Read the nearest package instructions and existing scripts before editing. Inspect Git status and protect unrelated work.

Rule zero: recover the answer before asking again

Before a client question or a needs-client label, search decisions, the message ledger, the mailbox and the docs archive. Start with bash scripts/brief.sh <topic> or the brief skill. Read the matching bodies, comments, full mail threads and attachments. Check sender and date. An acknowledgement is not approval; a prior answer can apply only to one platform or release. An unavailable source means search incomplete. Preserve existing decisions and authorization. See docs/agent-workflow.md and .claude/skills/client-feedback/SKILL.md.

Verification standard

Green suites prove nothing about a boundary they never exercised. Run the thing. A task is done when the relevant behavior was observed: a route called, a screen loaded or a row read back. Tests support that evidence. An agent's completion reply remains a claim. Check git status --short, git diff --stat and git log -1 after delegated work.

For a logic defect, reproduce it and show the fix at its real entry point. Run the most targeted existing check. For a screen, inspect the relevant desktop/mobile view or both native platforms when affected. Attach safe evidence. State skipped checks and missing environments plainly. Read exit status and output; never turn a failed command into the word clean.

When corrected: add what happened, root cause and prevention to archive/MISTAKES.md; bump the matching RULES.md count. At the second occurrence, consider a scoped rule or executable check. Name exactly what it catches and what remains judgment. See review.md for acceptance cases.

Rules of engagement

  1. One file, one owner. Independent writers use separate worktrees and explicit path fences.
  2. Use the existing package manager, helper APIs and architecture. Ask before new production dependencies.
  3. Preserve a meaningful failing assertion while making the implementation pass. Do not weaken tests to hide a defect.
  4. Keep commands and credentials separate. Never print, commit or paste credential values into records.
  5. Inspect access and environment before calling them unavailable. See the dev-reference skill.
  6. Stage explicit paths. Do not revert unrelated changes or rewrite shared history.
  7. Never add AI attribution or Co-Authored-By trailers to commits. Check the final message yourself.
  8. Observe the user's release and communication authorization. A merge is not delivery.
  9. Stop only the dev servers you started. Record the ports and cleanup.
  10. Cross-package or product-rule gaps become a contract request, not an invented endpoint or changed requirement.

Repository map to adapt

TreeOwnerPurpose
apps/<mobile><mobile owner>Screens and device flows
apps/<web><web owner>Pages and API routes; split their fences
packages/<contracts><contract owner>Shared executable contract
packages/<data><data owner>Schema and migrations
<infra-dir><operations owner>Infrastructure definitions
<docs-dir><record owner>Private source evidence

Run <typecheck command>, <lint command> and <targeted test command> as the change requires, then observe behavior. Those commands belong to your application; this reference has no app suite.

Spec stack

FileRole
specs/LOGIC.mdNumbered product rules
specs/decisions/Choices, sources and supersession links
specs/cards/Per-screen acceptance and evidence
specs/contract-changes.mdProposed contract changes
specs/CLIENT-LOG.mdIndividual message intake and resulting work
STATE.mdCurrent observations, rewritten with dates
RULES.mdRecurring failure shapes and mechanisms

Governance

Do not change LOGIC.md or a decision to make code pass. A changed requirement needs an owner decision with evidence and a new decision record. Builders request contract changes; the named owner applies them. Read specs/SESSIONS.md before splitting work and docs/agent-harness.md before relying on hooks. The lane scripts are an adaptation of a one-night experiment, not a requirement to delegate or authorization to run unattended jobs.

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.