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.
- autoloop-setupSkill
- autoloopSkill
- autoloop-statusSkill
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
- Distinctive: line 7
Do not use AutoLoop for a narrow explanation, read-only review, or a trivial edit unless the user asks for it.
- Very specific: line 9
When a user says 初期設定して, セットアップして, or otherwise asks to initialize a copied template, use the autoloop-setup skill.
- Distinctive: line 13
Do not implement product behavior before the active specification is validated and locked.
- Distinctive: line 14
Keep specification and implementation in separate pull requests when GitHub is configured.
- Distinctive: line 15
Treat the locked specification and acceptance criteria as the source of truth.
- Distinctive: line 16
Do not change a locked specification from an implementation pull request.
- Distinctive: line 17
Every behavioral task and test must reference at least one acceptance-criteria ID.
- Distinctive: line 18
Run repository validation and every configured gate before opening or updating an implementation pull request.
- Very specific: line 19
Use bounded loops. On repeated failure or exhausted limits, transition to AUTOMATION_BLOCKED and do not merge.
- Distinctive: line 26
After intake, replace subjective approval with evidence gates:
- Distinctive: line 51
Do not delete, skip, weaken, or make assertion-free tests to obtain a passing result.
- Distinctive: line 52
Do not lower coverage, lint, type, security, or build thresholds.
- Distinctive: line 53
Do not suppress failures or convert failures to warnings.
- Common: line 55
Do not put secrets in files, logs, prompts, issues, pull requests, commits, or artifacts.
- Distinctive: line 56
Do not reinterpret or weaken acceptance criteria to match incomplete code.
- Distinctive: line 86
Before reporting success, run:
≈ “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.
Files
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_BLOCKEDand 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, orAGENTS.mdfrom 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 -vOn systems where the Python command is python3, use python3 instead.
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
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.

