agentleFS
bazaarjapanbazaarjapan/codex-autoloop-template/AGENTS.md

codex-autoloop-template

AGENTS.md0 starsChanged 3 months agoMITView on GitHub

This repository uses specification-driven development and bounded autonomous loops. When a user asks to create a product, feature, or substantial behavioral change, use the autoloop skill. A direct $autoloop invocation authorizes the in-repository lifecycle described by that skill, including scoped GitHub Issues, branches, commits, pull requests, review requests, and auto-merge arming for the current repository when credentials and repository protections are already configured. Do not use AutoLoop for a narrow explanation, read-only review, or a trivial edit unless the user…

  • Reads credentials
  • 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 repository3 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

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

  • ≈1

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈13

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    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:

    Do not use AutoLoop for a narrow explanation, read-only review, or a trivial edit unless the user asks for it.

    line 7
  2. Very specific:

    When a user says 初期設定して, セットアップして, or otherwise asks to initialize a copied template, use the autoloop-setup skill.

    line 9
  3. Distinctive:

    Do not implement product behavior before the active specification is validated and locked.

    line 13
  4. Distinctive:

    Keep specification and implementation in separate pull requests when GitHub is configured.

    line 14
  5. Distinctive:

    Treat the locked specification and acceptance criteria as the source of truth.

    line 15
  6. Distinctive:

    Do not change a locked specification from an implementation pull request.

    line 16
  7. Distinctive:

    Every behavioral task and test must reference at least one acceptance-criteria ID.

    line 17
  8. Distinctive:

    Run repository validation and every configured gate before opening or updating an implementation pull request.

    line 18
  9. Very specific:

    Use bounded loops. On repeated failure or exhausted limits, transition to AUTOMATION_BLOCKED and do not merge.

    line 19
  10. Distinctive:

    After intake, replace subjective approval with evidence gates:

    line 26
  11. Distinctive:

    Do not delete, skip, weaken, or make assertion-free tests to obtain a passing result.

    line 51
  12. Distinctive:

    Do not lower coverage, lint, type, security, or build thresholds.

    line 52
  13. Distinctive:

    Do not suppress failures or convert failures to warnings.

    line 53
  14. Common:

    Do not put secrets in files, logs, prompts, issues, pull requests, commits, or artifacts.

    line 55
  15. Distinctive:

    Do not reinterpret or weaken acceptance criteria to match incomplete code.

    line 56
  16. Distinctive:

    Before reporting success, run:

    line 86

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

Codex AutoLoop Repository Instructions

Purpose

This repository uses specification-driven development and bounded autonomous loops. When a user asks to create a product, feature, or substantial behavioral change, use the autoloop skill. A direct $autoloop invocation authorizes the in-repository lifecycle described by that skill, including scoped GitHub Issues, branches, commits, pull requests, review requests, and auto-merge arming for the current repository when credentials and repository protections are already configured.

Do not use AutoLoop for a narrow explanation, read-only review, or a trivial edit unless the user asks for it.

When a user says 初期設定して, セットアップして, or otherwise asks to initialize a copied template, use the autoloop-setup skill. This repository uses ChatGPT subscription sign-in and native Codex GitHub reviews; never request OPENAI_API_KEY for AutoLoop setup.

Lifecycle invariants

  • Do not implement product behavior before the active specification is validated and locked.
  • Keep specification and implementation in separate pull requests when GitHub is configured.
  • Treat the locked specification and acceptance criteria as the source of truth.
  • Do not change a locked specification from an implementation pull request.
  • Every behavioral task and test must reference at least one acceptance-criteria ID.
  • Run repository validation and every configured gate before opening or updating an implementation pull request.
  • Use bounded loops. On repeated failure or exhausted limits, transition to AUTOMATION_BLOCKED and do not merge.
  • Never force-push.

No human approval gates

The AutoLoop lifecycle does not pause for human approval after intake. Missing product information may be obtained through a short interview. When the user declines to choose, record a conservative, reversible assumption in the specification.

After intake, replace subjective approval with evidence gates:

  • specification structure and consistency;
  • acceptance-criteria traceability;
  • deterministic CI;
  • specification-conformance review;
  • independent Codex review;
  • security checks;
  • protected control-plane integrity.

Failure policy

Fail closed. Do not merge when any required evidence is absent, stale, ambiguous, skipped unexpectedly, or produced for an older commit.

Transition to AUTOMATION_BLOCKED when any of these occurs:

  • a loop reaches its configured maximum;
  • the same failure repeats beyond its configured maximum;
  • credentials or required GitHub protection are unavailable;
  • a required test cannot run;
  • a change requires weakening a quality or security policy;
  • the implementation cannot satisfy the locked specification without changing scope.

Prohibited shortcuts

  • Do not delete, skip, weaken, or make assertion-free tests to obtain a passing result.
  • Do not lower coverage, lint, type, security, or build thresholds.
  • Do not suppress failures or convert failures to warnings.
  • Do not alter .github/workflows/**, .github/codex/**, .agents/skills/**, AutoLoop policy/schema/template files, controller/setup scripts, controller self-tests, or AGENTS.md from a managed feature pull request. The only permitted control change in a managed specification pull request is project identity and quality-gate commands in .autoloop/config.json; all autonomy, limit, GitHub, and protected-path settings must remain unchanged.
  • Do not put secrets in files, logs, prompts, issues, pull requests, commits, or artifacts.
  • Do not reinterpret or weaken acceptance criteria to match incomplete code.

Code Review Rules

Specification conformance

  • Flag behavior that contradicts the locked specification.
  • Flag missing handling for specified failure, boundary, and empty states.
  • Flag acceptance criteria without meaningful verification evidence.
  • Flag implementation scope not justified by the active specification.

Test integrity

  • Flag removed, skipped, weakened, tautological, or assertion-free tests.
  • Flag tests that validate implementation details while missing required behavior.
  • Flag reduced coverage or quality thresholds.

Security and data integrity

  • Flag secrets, unsafe authorization, injection risks, and sensitive-data exposure.
  • Flag destructive data changes without reversible migration and recovery handling.
  • Flag new third-party access or privilege expansion not required by the specification.

Automation integrity

  • Flag attempts to weaken CI, review gates, branch protections, loop limits, or protected paths.
  • Flag generated evidence that does not correspond to the latest commit.

Required local commands

Before reporting success, run:

python scripts/autoloop/autoloop.py validate
python scripts/autoloop/autoloop.py verify
python -m unittest discover -s tests -v

On systems where the Python command is python3, use python3 instead.

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.