agentleFS
HyunKNHyunKN/harness-kit/AGENTS.md

harness-kit

AGENTS.md0 starsChanged 7 months agoMITView on GitHub

This repository is a reusable documentation-first harness for Codex projects. If you are working in this repository, treat this file as the first operating document to read before changing anything else. This repository mainly defines the workflow in Markdown. If a team wants real automatic enforcement, they must add code, scripts, CI, or lint rules in the target repository. When starting work here, use this order: Then open only the specific template or README that matches the task. Do not…

The file

Show its rules and text

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

23 rules. About 0 are common, 20 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈20

    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
  1. Distinctive:

    If you are working in this repository, treat this file as the first operating document to read before changing anything else.

    line 5
  2. Distinctive:

    Not a build framework

    line 15
  3. Distinctive:

    Not a runtime package manager

    line 16
  4. Distinctive:

    Not an automatic enforcement engine by itself

    line 17
  5. Distinctive:

    If a team wants real automatic enforcement, they must add code, scripts, CI, or lint rules in the target repository.

    line 20
  6. Distinctive:

    When starting work here, use this order:

    line 24
  7. Distinctive:

    Keep this repository Markdown-first

    line 41
  8. Distinctive:

    Prefer reusable operating guidance over one-off chat-only advice

    line 42
  9. Distinctive:

    Write documents so another Codex user can apply them without project-specific context

    line 43
  10. Distinctive:

    When adding a new rule, say who follows it, when it runs, and how it is validated

    line 45
  11. Distinctive:

    Do not add code here unless the user explicitly changes the repository scope

    line 49
  12. Distinctive:

    Do not assume every repository has the same stack, folder layout, or CI setup

    line 50
  13. Distinctive:

    Do not promise automatic enforcement if the mechanism is only documented

    line 51
  14. Distinctive:

    Do not mix project-specific product rules into generic harness documents

    line 52
  15. Distinctive:

    Do not default to one serial agent when a task can be split safely and usefully.

    line 56
  16. Distinctive:

    When delegation is justified, prefer a small role-based agent team:

    line 60
  17. Distinctive:

    Prefer the lightest execution mode that preserves quality:

    line 86
  18. Distinctive:

    Do not let delegation widen authority.

    line 93
  19. Distinctive:

    Do not spawn role labels without a concrete question, artifact, or file ownership boundary.

    line 94
  20. Distinctive:

    If sub-agents are used, record enough evidence that another agent can understand what was delegated, what changed, and what was validated.

    line 96
  21. Very specific:

    Use learning for generalized technical understanding.

    line 120
  22. Very specific:

    Use troubleshooting for concrete incidents:

    line 122
  23. Very specific:

    Use guardrails when either of these is true:

    line 129

≈ “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 repository is a reusable documentation-first harness for Codex projects.

If you are working in this repository, treat this file as the first operating document to read before changing anything else.

What This Repository Is

  • A reusable workflow kit for Codex-based development
  • A documentation harness that can be copied into other repositories
  • A source of operating rules, issue-first workflow, learning-note rules, and repo hygiene loops

What This Repository Is Not

  • Not a build framework
  • Not a runtime package manager
  • Not an automatic enforcement engine by itself

This repository mainly defines the workflow in Markdown.
If a team wants real automatic enforcement, they must add code, scripts, CI, or lint rules in the target repository.

Read Order

When starting work here, use this order:

  1. AGENTS.md
  2. README.md
  3. README.ko.md when Korean context matters
  4. assets/templates/docs/README.md
  5. assets/templates/docs/operations/agent_session_boot_protocol.md
  6. assets/templates/docs/operations/guardrails.md
  7. assets/templates/docs/troubleshooting/README.md
  8. assets/templates/docs/playbooks/repo_hygiene_gc_loop.md

Then open only the specific template or README that matches the task.

Default Working Rules

Do

  • Keep this repository Markdown-first
  • Prefer reusable operating guidance over one-off chat-only advice
  • Write documents so another Codex user can apply them without project-specific context
  • Explain where work is automatic, semi-automatic, or manual
  • When adding a new rule, say who follows it, when it runs, and how it is validated

Don't

  • Do not add code here unless the user explicitly changes the repository scope
  • Do not assume every repository has the same stack, folder layout, or CI setup
  • Do not promise automatic enforcement if the mechanism is only documented
  • Do not mix project-specific product rules into generic harness documents

Agent Teaming

Do not default to one serial agent when a task can be split safely and usefully.

At the same time, do not split work just because a task is large. Stay local first until scope, affected paths, and validation are clear enough that delegation will reduce risk instead of creating guesswork.

When delegation is justified, prefer a small role-based agent team:

  1. main agent
    • owns the plan
    • decides whether delegation is justified
    • assigns role boundaries and write ownership
    • integrates results
    • resolves conflicts
    • performs final verification
  2. analysis / research agent
    • maps files
    • identifies risks
    • gathers evidence
  3. implementation agent
    • edits only its assigned write scope
    • reports exact changes
  4. review / verification agent
    • stays read-only and independent
    • checks regressions
    • checks missing tests
    • checks evidence and completion claims
  5. writer / ops agent when relevant
    • updates docs, notes, playbooks, or run procedures

Default behavior:

  • Prefer the lightest execution mode that preserves quality:
    • local first
    • then bounded delegation
    • then multi-agent team composition when parallel lanes materially improve speed, safety, or coverage
  • For non-trivial work, prefer specialist sub-agents once scope, validation, and ownership are clear enough to split safely.
  • Parallelize only when write scopes do not overlap and the lanes are behaviorally independent or connected by an agreed interface.
  • Different files do not automatically make parallelism safe; dependency chains and shared behavior still matter.
  • Do not let delegation widen authority. Protected files, human-approved-only files, and issue-level scope locks still apply.
  • Do not spawn role labels without a concrete question, artifact, or file ownership boundary.
  • The main agent must never offload final judgment, final integration, or final validation.
  • If sub-agents are used, record enough evidence that another agent can understand what was delegated, what changed, and what was validated.

Core Operating Model

This repository supports four layers:

  1. Session boot
    • What Codex should read first
    • What should be checked before implementation
  2. Guardrails
    • What should be checked before coding
    • Which implementation patterns exist to prevent repeated mistakes
  3. Troubleshooting
    • How to record mistakes, regressions, symptoms, and fixes
    • How to leave behind incident history that another agent can reuse
  4. Repo hygiene / garbage collection loop
    • How to review drift between docs and code
    • How to inspect rule violations, dead code, stale docs, and unused assets

Guardrail Boundary

Use learning for generalized technical understanding.

Use troubleshooting for concrete incidents:

  • user-reported breakage
  • regression symptoms
  • runtime errors
  • confusing or misleading UX states

Use guardrails when either of these is true:

  • the user explicitly says “do not do this again”
  • a mistake has already repeated or is expensive enough that repetition is unacceptable

Important Constraint

Markdown can define the loop, but Markdown cannot enforce the loop alone.

That means:

  • AGENTS.md can tell Codex what to read first
  • playbooks can define repeatable review steps
  • issue docs can capture findings

But fully automatic checks such as:

  • dead code detection
  • drift checks
  • lint enforcement
  • unused file scanning
  • failing build gates

need executable tooling in the target repository.

Goal of Changes Here

Any new document added to this repository should help another project answer:

  • What should Codex read first?
  • What should be documented before coding?
  • How are failures recorded?
  • How do we detect drift and cleanup needs?
  • Which parts are manual vs automatic?

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.