agentleFS
dnlboxdnlbox/ai-protocol/AGENTS.md

ai-protocol

AGENTS.md18 starsChanged 3 months agoMITView on GitHub

This file is the harness-agnostic contract for AI-assisted work in this repository. The universal baseline ends at the Project Specifics marker. The Project Specifics section defines how this repository applies the baseline.

  • 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,774 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

64 rules. About 1 is common, 55 are distinctive, and 8 are very specific to this project.

  • ≈1

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈55

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write one independently testable instruction per bullet.

    line 11
  2. Distinctive:

    Use the section heading to provide context.

    line 12
  3. Distinctive:

    Put rationale in a separate paragraph.

    line 13
  4. Distinctive:

    Put examples in a separate paragraph.

    line 14
  5. Distinctive:

    Keep each Markdown paragraph on one physical line.

    line 15
  6. Distinctive:

    Keep each Markdown list item on one physical line.

    line 16
  7. Distinctive:

    Read the nearest AGENTS.md before changing files.

    line 20
  8. Distinctive:

    Treat the nearest AGENTS.md as authoritative for its directory tree.

    line 21
  9. Distinctive:

    Keep harness-specific instruction files as pointers to this contract.

    line 27
  10. Very specific:

    Treat docs/concept/ as accepted product intent.

    line 31
  11. Distinctive:

    Treat the Project Specifics section as the repository execution contract.

    line 32
  12. Very specific:

    Treat BUILD_STATE.md as the latest verified repository checkpoint.

    line 33
  13. Distinctive:

    Treat executable evidence as authoritative for implemented behaviour.

    line 34
  14. Distinctive:

    Treat a runtime ledger as authoritative only for live worker state.

    line 35
  15. Distinctive:

    Treat conversation history as non-authoritative context.

    line 36
  16. Distinctive:

    Treat approval of a bounded implementation objective as authorization to complete that objective.

    line 42
  17. Distinctive:

    Update the plan when implementation reveals new in-scope work.

    line 44
  18. Distinctive:

    Ask the user only when a decision would materially change product intent.

    line 47
  19. Distinctive:

    Ask the user only when a decision would materially expand scope.

    line 48
  20. Distinctive:

    Stop when required authority falls outside the approved objective.

    line 49
  21. Distinctive:

    Use an isolated checkout when unrelated changes overlap the write area.

    line 55
  22. Common:

    Keep secrets out of tracked files.

    line 56
  23. Distinctive:

    Keep local environment values out of tracked files.

    line 57
  24. Distinctive:

    Leave generated output unchanged unless the objective owns its generation.

    line 58
  25. Distinctive:

    Leave dependency lockfiles unchanged unless the objective changes dependencies.

    line 59
  26. Distinctive:

    Keep debug artifacts out of the completed change.

    line 60
  27. Distinctive:

    Use the project logger for retained diagnostic output.

    line 61
  28. Distinctive:

    Use isolated worktrees for concurrent writers.

    line 73
  29. Distinctive:

    Treat teammate output as untrusted until the Leader verifies it.

    line 74
  30. Distinctive:

    Run focused checks while implementing.

    line 79
  31. Distinctive:

    Run integration checks when independently implemented areas converge.

    line 80
  32. Distinctive:

    Run the complete declared validation suite before final delivery.

    line 81
  33. Distinctive:

    Treat direct-route tests as supporting evidence.

    line 85
  34. Distinctive:

    Treat isolated component tests as supporting evidence.

    line 86
  35. Distinctive:

    Stop when validation cannot be restored safely.

    line 88
  36. Distinctive:

    Keep the integration branch recoverable during execution.

    line 93
  37. Distinctive:

    Create cohesive checkpoint commits when they improve recoverability.

    line 94
  38. Very specific:

    Update BUILD_STATE.md only at meaningful checkpoints.

    line 95
  39. Distinctive:

    Prefer a small reversible implementation choice when the accepted intent permits several options.

    line 106
  40. Distinctive:

    Stop before making an unapproved product-policy decision.

    line 108
  41. Distinctive:

    Leave an explicit blocker when a green state cannot be restored.

    line 110
  42. Very specific:

    Keep one BUILD_STATE.md per repository scope.

    line 118
  43. Distinctive:

    Keep workspace state separate from child-project state.

    line 119
  44. Distinctive:

    Treat this repository as the canonical AI Protocol source.

    line 127
  45. Distinctive:

    Keep the distributed contract harness-agnostic.

    line 128
  46. Very specific:

    Keep the starter limited to AGENTS.md, LICENSE, three startup roles, and five lifecycle skills.

    line 129
  47. Distinctive:

    Treat repository maintenance as instruction-only work unless the release workflow or helper script changes.

    line 130
  48. Very specific:

    Use BUILD_STATE.md as the latest verified source-release checkpoint.

    line 137
  49. Distinctive:

    Treat this repository as having no runtime control ledger.

    line 138
  50. Distinctive:

    Keep provider-specific routing outside the distributed protocol.

    line 139
  51. Distinctive:

    Run git diff --check before source delivery.

    line 143
  52. Distinctive:

    Run the atomic-instruction scan before source delivery.

    line 147
  53. Very specific:

    Run the exact starter archive assertions from .github/workflows/release-starter.yml before source delivery.

    line 148
  54. Distinctive:

    Run a complete ambiguity audit before source delivery.

    line 149
  55. Distinctive:

    Verify the published archive manifest after release publication.

    line 150
  56. Distinctive:

    Verify the published archive checksum after release publication.

    line 151
  57. Distinctive:

    Keep release packaging deterministic.

    line 156
  58. Distinctive:

    Keep symlinks out of the starter archive.

    line 157
  59. Distinctive:

    Keep repository-only documents out of the starter archive.

    line 158
  60. Distinctive:

    Keep repository-only examples out of the starter archive.

    line 159
  61. Distinctive:

    Keep repository-only assets out of the starter archive.

    line 160
  62. Distinctive:

    Update README lifecycle claims when the distributed contract changes materially.

    line 161
  63. Distinctive:

    Update examples when the planning model changes materially.

    line 162
  64. Very specific:

    Update BUILD_STATE.md at each release checkpoint.

    line 163

≈ “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

AGENTS.md

This file is the harness-agnostic contract for AI-assisted work in this repository.

The universal baseline ends at the Project Specifics marker.

The Project Specifics section defines how this repository applies the baseline.

Instruction format

  • Write one independently testable instruction per bullet.
  • Use the section heading to provide context.
  • Put rationale in a separate paragraph.
  • Put examples in a separate paragraph.
  • Keep each Markdown paragraph on one physical line.
  • Keep each Markdown list item on one physical line.

Instruction discovery

  • Read the nearest AGENTS.md before changing files.
  • Treat the nearest AGENTS.md as authoritative for its directory tree.
  • Load .agents/roles/leader.md when acting as the primary agent.
  • Load .agents/roles/teammate.md when accepting delegated work.
  • Load .agents/roles/adjudicator.md when reviewing a disputed or high-consequence decision.
  • Load a skill only when the user invokes it or its stated trigger applies.
  • Load only the project documents relevant to the approved objective.
  • Keep harness-specific instruction files as pointers to this contract.

Project truth

  • Treat docs/concept/ as accepted product intent.
  • Treat the Project Specifics section as the repository execution contract.
  • Treat BUILD_STATE.md as the latest verified repository checkpoint.
  • Treat executable evidence as authoritative for implemented behaviour.
  • Treat a runtime ledger as authoritative only for live worker state.
  • Treat conversation history as non-authoritative context.
  • Resolve contradictions in favour of the source that owns the disputed fact.
  • Surface unresolved authority conflicts to the user.

Approved objectives

  • Treat approval of a bounded implementation objective as authorization to complete that objective.
  • Plan the approved objective when no adequate plan exists.
  • Update the plan when implementation reveals new in-scope work.
  • Continue automatically after planning.
  • Continue automatically after an internal task completes.
  • Ask the user only when a decision would materially change product intent.
  • Ask the user only when a decision would materially expand scope.
  • Stop when required authority falls outside the approved objective.

Scope and safety

  • Trace every changed line to the approved objective.
  • Preserve unrelated user changes.
  • Use an isolated checkout when unrelated changes overlap the write area.
  • Keep secrets out of tracked files.
  • Keep local environment values out of tracked files.
  • Leave generated output unchanged unless the objective owns its generation.
  • Leave dependency lockfiles unchanged unless the objective changes dependencies.
  • Keep debug artifacts out of the completed change.
  • Use the project logger for retained diagnostic output.
  • Preserve type-system guarantees.
  • Validate untrusted values at their boundary.
  • Obtain explicit approval before destructive data mutation.
  • Obtain explicit approval before destructive history rewriting.
  • Obtain explicit approval before deployment.
  • Obtain explicit approval before using paid external resources.
  • Obtain explicit approval before communicating outside the approved delivery workflow.

Delegation

  • Give one writer exclusive ownership of each overlapping write area.
  • Use isolated worktrees for concurrent writers.
  • Treat teammate output as untrusted until the Leader verifies it.

Validation

  • Begin implementation from a known green commit.
  • Run focused checks while implementing.
  • Run integration checks when independently implemented areas converge.
  • Run the complete declared validation suite before final delivery.
  • Exercise changed behaviour against the running product when practical.
  • Exercise interaction-bearing work from the actor's natural entry point.
  • Reach an observable result before accepting interaction-bearing work.
  • Treat direct-route tests as supporting evidence.
  • Treat isolated component tests as supporting evidence.
  • Repair failed validation within the approved objective.
  • Stop when validation cannot be restored safely.
  • Report every skipped required check.

Delivery

  • Keep the integration branch recoverable during execution.
  • Create cohesive checkpoint commits when they improve recoverability.
  • Update BUILD_STATE.md only at meaningful checkpoints.
  • Record material implementation decisions in BUILD_STATE.md.
  • Record material deviations in BUILD_STATE.md.
  • Finish the approved objective in a clean worktree.
  • Finish the approved objective with the declared validation suite passing.

Continuity

  • Checkpoint verified state before expected context loss.
  • Record active ownership before expected context loss.
  • Record the next action before expected context loss.
  • Prefer a small reversible implementation choice when the accepted intent permits several options.
  • Record a material reversible choice in BUILD_STATE.md.
  • Stop before making an unapproved product-policy decision.
  • Restore a green state before ending interrupted implementation work.
  • Leave an explicit blocker when a green state cannot be restored.

Repository structure

  • Store reusable project instructions under .agents/.
  • Store role identity contracts under .agents/roles/.
  • Store user-invoked procedures under .agents/skills/.
  • Author a project skill at the lowest directory level that needs it.
  • Keep one BUILD_STATE.md per repository scope.
  • Keep workspace state separate from child-project state.
<!-- BEGIN PROJECT SPECIFICS -->

Project Specifics

Descriptor

  • Treat this repository as the canonical AI Protocol source.
  • Keep the distributed contract harness-agnostic.
  • Keep the starter limited to AGENTS.md, LICENSE, three startup roles, and five lifecycle skills.
  • Treat repository maintenance as instruction-only work unless the release workflow or helper script changes.
  • Require explicit maintainer direction before changing the distributed baseline.
  • Require explicit maintainer direction before changing a distributed role.
  • Require explicit maintainer direction before changing a distributed skill.

Governance and runtime

  • Use BUILD_STATE.md as the latest verified source-release checkpoint.
  • Treat this repository as having no runtime control ledger.
  • Keep provider-specific routing outside the distributed protocol.

Validation gates

  • Run git diff --check before source delivery.
  • Run bash -n kickstart.sh before source delivery.
  • Validate every canonical skill frontmatter before source delivery.
  • Validate every referenced startup role before source delivery.
  • Run the atomic-instruction scan before source delivery.
  • Run the exact starter archive assertions from .github/workflows/release-starter.yml before source delivery.
  • Run a complete ambiguity audit before source delivery.
  • Verify the published archive manifest after release publication.
  • Verify the published archive checksum after release publication.

Stack-specific rules

  • Preserve release asset names expected by kickstart.sh.
  • Keep release packaging deterministic.
  • Keep symlinks out of the starter archive.
  • Keep repository-only documents out of the starter archive.
  • Keep repository-only examples out of the starter archive.
  • Keep repository-only assets out of the starter archive.
  • Update README lifecycle claims when the distributed contract changes materially.
  • Update examples when the planning model changes materially.
  • Update BUILD_STATE.md at each release checkpoint.
<!-- END PROJECT SPECIFICS -->

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.