agentleFS
arxdsilvaarxdsilva/ai-loops/AGENTS.md

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

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
  1. Very specific:

    Every go test runs with -race: Never weaken a test to make it pass.

    line 24
  2. Very specific:

    The events.jsonl schema is additive-only: Never rename a run.Kind, a run.Phase value or a JSON field: the status line, the mod pane, the …

    line 25
  3. Distinctive:

    Never edit the version by hand.

    line 45

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

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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) and agents/*.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 by loops lang validate) and its rule book (RULES.md); Go also has ARCHITECTURE.md, and its RULES.md governs this repo's Go code. Each pack has a skills/lang-<id>/ skill and an agents/<id>-engineer.md role (15 languages; loops lang list).
  • Skills: skills/<name>/SKILL.md. The work skill is the orchestrator; the rest are reference skills that roles load, including one lang-<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 builds cmd/loops on 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-dependency ai-loops npm launcher (npx ai-loops [--target <platform>], npx ai-loops bin). lib.mjs is pure and tested by node --test npm/test/lib.test.mjs; its version stays 0.0.0 in git and is set from the tag when release-assets.yml publishes it (needs the NPM_TOKEN secret). .loops/config.json pins this repo's gate to the Go pack so npm/package.json does not add the TypeScript pack.
  • Other platforms: specs/PLATFORMS.md. platforms/<name>/, .agents/plugins/marketplace.json and .cursor-plugin/marketplace.json are generated by go run ./cmd/loops port build from the canonical sources (embedded through embed.go). Never edit them by hand. Regenerate whenever agents/, skills/, specs/, templates/, ROLES.md, hooks/hooks.json or plugin.json change; CI runs loops 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/loops and cmd/loops (wiring only).

Non-negotiables

  • Stdlib only. go.mod has 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 arch must report 0 errors.
  • Every go test runs with -race. Never weaken a test to make it pass.
  • The events.jsonl schema is additive-only. Never rename a run.Kind, a run.Phase value 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-guard and test-guard (alias race-guard) deny (exit 2), (test-guard only in flag mode), plus toolchain-env (alias go-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. Only stop-gate and post-edit (alias go-post-edit) block (JSON decision).
  • Keep docs and code in step. Specs, skills and agents name only loops commands and flags that exist (internal/adapters/inbound/cli). When you change a command, update specs/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>.mp4 and <name>.webm. Report screenshots and the social preview: node docs/media/shot.mjs <page> <out.png> [w h scale] (the social card is social.html at 1280×640). Keep llms.txt and .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 (or patch/major) on a clean tree; add --push to publish.
  • Never edit the version by hand.

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.