ai-loops
AGENTS.md0 starsChanged 7 days agoMITView on GitHub
This repo is the loops Claude Code plugin: skills, role agents, specs and templates, plus the loops Go binary they drive. Read only what your task needs.
- Installs packages
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 32,671 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 repository35 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- skills/work/platforms/claude.mdCLAUDE.md
- llms.txtllms.txt
- clarifySkill
- consistencySkill
- debuggingSkill
- documentationSkill
- featureSkill
- hexagonalSkill
- initSkill
- jobs-and-state-machinesSkill
- lang-clojureSkill
- lang-cppSkill
- lang-csharpSkill
- lang-elixirSkill
- lang-erlangSkill
- lang-goSkill
- lang-javaSkill
- lang-kotlinSkill
- lang-phpSkill
- lang-pythonSkill
- lang-rubySkill
- lang-rustSkill
- lang-scalaSkill
- lang-swiftSkill
- lang-typescriptSkill
- memorySkill
- parallel-workSkill
- performanceSkill
- qualitySkill
- reportSkill
- review-integrationSkill
- statusSkill
- testingSkill
- workSkill
The file
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
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
- Very specific: line 24
Every
go testruns with-race: Never weaken a test to make it pass. - Very specific: line 25
The
events.jsonlschema is additive-only: Never rename a run.Kind, a run.Phase value or a JSON field: the status line, the mod pane, the … - Distinctive: line 45
Never edit the version by hand.
≈ “Common” is an estimate: at least 1 in 5 of the 41,581 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
ai-loops: agent instructions
This repo is the loops Claude Code plugin: skills, role agents, specs and templates, plus the loops Go binary they drive. Read only what your task needs.
Where things are
- The workflow spec, which everything implements:
specs/WORKFLOW.md. The engineering discipline each phase applies (adapted from ub-mode):specs/ENGINEERING.md. Roles:ROLES.md(matrix) andagents/*.md(definitions). - Language-neutral rules for target repos (and this one):
specs/ARCHITECTURE.md,specs/SOLID.md,specs/TESTING.md,specs/REPO_PRACTICES.md. Agent rules:specs/PARALLEL_WORK.md,specs/CONTEXT_DISCIPLINE.md. - Languages:
specs/languages/<id>/holds each pack (pack.json, validated byloops lang validate) and its rule book (RULES.md); Go also hasARCHITECTURE.md, and itsRULES.mdgoverns this repo's Go code. Each pack has askills/lang-<id>/skill and anagents/<id>-engineer.mdrole (15 languages;loops lang list). - Skills:
skills/<name>/SKILL.md. Theworkskill is the orchestrator; the rest are reference skills that roles load, including onelang-<id>per language. - Templates the agents fill in:
templates/. - Plugin wiring for Claude Code (and Copilot, which reads the same layout):
.claude-plugin/,hooks/hooks.json,bin/loops(a shim that buildscmd/loopson first use),mod/(the live pane),settings.json. platforms/claude/is the Claude plugin-directory package (specs/PLATFORMS.md§3.1): a full copy of the plugin whose shim downloads nothing. Submit that folder to the directory. Its README reuses the readme's "What it runs on your machine" section, so keep that heading and its- **Hooks**…- **Network**bullets.npm/: the zero-dependencyai-loopsnpm launcher (npx ai-loops [--target <platform>],npx ai-loops bin).lib.mjsis pure and tested bynode --test npm/test/lib.test.mjs; its version stays0.0.0in git and is set from the tag whenrelease-assets.ymlpublishes it (needs theNPM_TOKENsecret)..loops/config.jsonpins this repo's gate to the Go pack sonpm/package.jsondoes not add the TypeScript pack.- Other platforms:
specs/PLATFORMS.md.platforms/<name>/,.agents/plugins/marketplace.jsonand.cursor-plugin/marketplace.jsonare generated bygo run ./cmd/loops port buildfrom the canonical sources (embedded throughembed.go). Never edit them by hand. Regenerate whenever agents/, skills/, specs/, templates/, ROLES.md, hooks/hooks.json or plugin.json change; CI runsloops port check. - Go tooling, laid out hexagonally:
internal/domain/{run,archrule,plugin,pack,glob,coverage,workspace,…}: pure code, no I/O, no wall clock (pack= the language-pack schema);internal/application/{tracker,guard,gate,archcheck,langpack,ticket,port,…}: use cases with consumer-owned ports (port= per-platform emitters and the install plan;langpack= load and detect packs);internal/adapters/{inbound/{cli,hook},outbound/{runstore,goparse,gotool,vcs,fsys,htmlreport,portfs}};internal/compose/loopsandcmd/loops(wiring only).
Non-negotiables
- Stdlib only.
go.modhas no requirements. Adding one needs a reason recorded in the README. - Dependencies point inward. Adapters depend on application, application on domain. Application packages reach the OS only through ports.
go run ./cmd/loops archmust report 0 errors. - Every
go testruns with-race. Never weaken a test to make it pass. - The
events.jsonlschema is additive-only. Never rename arun.Kind, arun.Phasevalue or a JSON field: the status line, the mod pane, the report and older runs all read them. - Hooks fail open. Bad input, no active run, or an internal error means exit 0 with no output. Only
read-guard,model-guardandtest-guard(aliasrace-guard) deny (exit 2), (test-guardonly inflagmode), plustoolchain-env(aliasgo-env) for Go commands on platforms that can't rewrite them (specs/PLATFORMS.md§5.0); for other packs it only rewrites or fails open. Onlystop-gateandpost-edit(aliasgo-post-edit) block (JSONdecision). - Keep docs and code in step. Specs, skills and agents name only
loopscommands and flags that exist (internal/adapters/inbound/cli). When you change a command, updatespecs/WORKFLOW.md§5 and every caller in the same change. - Cite, don't duplicate. Say each rule once, in its spec, and cite it elsewhere (
WORKFLOW §4). Skill bodies stay under ~220 lines and agent bodies under ~90. - No game content. This was extracted from rimworld-go, and nothing game-specific belongs here.
docs/media/: the readme's media. Workflow graphic:python3 docs/media/make_svg.py docs/media. Terminal demo:python3 docs/media/make_demo.py docs/media. Videos:node docs/media/record.mjs docs/media/<name>.svg <tmp>/frames <secs> 30(15 for the workflow, 16 for the demo), then encode with ffmpeg into<name>.mp4and<name>.webm. Report screenshots and the social preview:node docs/media/shot.mjs <page> <out.png> [w h scale](the social card issocial.htmlat 1280×640). Keepllms.txtand.claude-plugin/plugin.json's description in step with the readme's first paragraph.
Gates before committing
gofmt -l . (must print nothing) · go vet ./... · go test -race -count=1 ./... · go run ./cmd/loops arch · go run ./cmd/loops port check · jq . hooks/hooks.json .claude-plugin/*.json settings.json
The module and repository are github.com/arxdsilva/ai-loops. CI fails if the previous owner name reappears anywhere.
Releases
A release is a v<version> tag, and the version lives only in .claude-plugin/plugin.json (the loops binary embeds it; there is no version constant). The generated package shims go install …/cmd/loops@v<version>.
Versions bump automatically: on every push to main, the CI release job runs loops release --push, which picks the level from the commits since the last tag (conventional commits: feat!: or a BREAKING CHANGE body is major, feat: minor, anything else patch; while the major version is 0, breaking changes bump minor), rewrites plugin.json, regenerates platforms/ and the marketplaces, then commits release vX.Y.Z, tags it and pushes both atomically. The release commit and tag make the next run skip, so it does not loop. Release runs are serialized, a run whose commit is no longer main's tip skips, and a version whose tag already exists is skipped (never delete a pushed tag: the Go proxy may have cached it). Write conventional commit subjects so the level is right.
- Preview:
go run ./cmd/loops release --dry-run(works on a dirty tree). - Manual override locally:
loops release minor(orpatch/major) on a clean tree; add--pushto publish. - Never edit the version by hand.
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.

