agentleFS
slogsdonslogsdon/loop-and-gate-foundation/skills/loop/SKILL.md

loop

Skill0 starsChanged 4 months agoMITView on GitHub

Orchestrate a goal through subagent iterations. Use when the user gives a goal to run "the loop" on — decomposes the goal, dispatches one subagent per iteration with fresh context, verifies each result before memory is committed.

55 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use review-bugbot, origin and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • 0mlkrizzz655335vSkill

    review-bugbot

    缺陷导向代码审查。用 Bugbot 子代理找 bug。

    Also in 4 projects that use this

  • 0mlkrizzz655335vSkill

    origin

    origin CLI 管理。安装、登录、更新、修复 origin.cursor.com 的 CLI。"disabled-environments:

    Also in 3 projects that use this

  • PandelisZSkill

    update-cli-config

    View and modify Cursor CLI configuration settings in ~/.cursor/cli-config.json. Use when the user wants to change CLI settings, configure permissions, switch approval mode, enable vim mode, toggle display options, configure sandbox, or manage any CLI preferences.

    Also in 4 projects that use this

  • 32103210Skill

    migrate-to-skills

    Convert 'Applied intelligently' Cursor rules (.cursor/rules/*.mdc) and slash commands (.cursor/commands/*.md) to Agent Skills format (.cursor/skills/). Use when you want to migrate rules or commands to skills, convert .mdc rules to SKILL.md format, or consolidate commands into the skills directory.

    Also in 4 projects that use this

  • 32103210Skill

    update-cursor-settings

    Modify Cursor/VSCode user settings in settings.json. Use when you want to change editor settings, preferences, configuration, themes, font size, tab size, format on save, auto save, keybindings, or any settings.json values.

    Also in 4 projects that use this

  • MicrosoftSkill

    automate

    Propose an automation from a completed task or a new idea, then create it after approval. Use when the user asks to create an automation or wants scheduled local or cloud agent work.

    Also in 4 projects that use this

  • +3 more from 0mlkrizzz655335v
  • +1 more from 32103210

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 50 edited versions we read keep these.

  • 4

    Distinctive

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

    Use the session-start skill yourself (load MEMORY.md, latest daily + reflection) so you can decompose and judge with context.

    line 24
  2. Distinctive:

    Run iterations SEQUENTIALLY — subagents write shared memory files (daily note, MEMORY.md).

    line 48
  3. Very specific:

    Verify the iteration: check the task's pass/fail criteria yourself (read the output, run the check, inspect git -C <base> diff of the vault …

    line 52
  4. Very specific:

    When all tasks are done (or you're blocked), use the reflect skill yourself to close out the orchestration session: what the loop achieved, …

    line 67
  5. Distinctive:

    Never parallelize memory-writing subagents.

    line 73
  6. Distinctive:

    Never commit an unverified iteration.

    line 74
  7. Distinctive:

    If a subagent's reflection contradicts your verification (it says done, the check fails), record YOUR verdict in the daily note — external …

    line 76

“Common” is measured: kept by at least 6 in 10 of the 50 edited versions of this file we could read. “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
SKILL.md

Loop

One job: drive a goal to done through iterations, keeping the human in the gate. You (the main session) NEVER do the work yourself — you orchestrate, verify, and commit. Subagents do the work, one iteration each, each with a fresh context.

Why this shape

  • Each subagent starts clean — no confusion carryover between iterations (the fresh-context property that makes loops reliable).
  • Your context stays small: goal, iteration summaries, verdicts. You can run many iterations in one sitting without rotting your own window.
  • You verify every iteration BEFORE its memory writes are committed — self-improvement only compounds on verified work.

Steps

  1. Use the session-start skill yourself (load MEMORY.md, latest daily + reflection) so you can decompose and judge with context.
  2. Break the goal into iteration-sized tasks: each completable by one agent in one run, with a pass/fail check you can state up front. Show the user the task list. Adjust if they object.
  3. For each task, dispatch ONE fresh-context subagent — the Agent tool, general-purpose (Claude Code), or the subagent tool with agent: "worker" and context: "fresh" (pi) — with this brief:

    You are one iteration of an agent loop in <repo path>.
    1. Read vault/MEMORY.md, the latest note in vault/Daily/, and the latest
       note in vault/Reflections/. Apply the reflection's lesson.
    2. Do exactly this task: <task>. Done means: <pass/fail criteria>.
    3. Follow skills/capture/SKILL.md to save any durable facts to
       vault/Knowledge/ (update existing notes over creating duplicates).
    4. Follow skills/reflect/SKILL.md steps 1-3 to log the session and write
       a reflection — but do NOT git commit (the orchestrator commits).
    5. Return: what you did, what you captured, outcome
       (done/partial/blocked), and your one-sentence lesson.

    Run iterations SEQUENTIALLY — subagents write shared memory files (daily note, MEMORY.md). Parallel iterations corrupt them. Parallel is fine only for read-only research subagents that write nothing.

  4. Verify the iteration: check the task's pass/fail criteria yourself (read the output, run the check, inspect git -C <base> diff of the vault — <base> = cat ~/.config/loop-and-gate/vault, or the clone's vault/).
    • Pass → read git -C <base> status --porcelain first, then commit only the paths this iteration wrote (never add -A — the vault may auto-sync mid-iteration and sweep someone else's work into your commit): git -C <base> add <paths> && git -C <base> commit -m "chore: loop iteration — <task>". Any repo code/skill changes commit separately in this repo.
    • Fail → git -C <base> checkout -- <those same paths> to discard its writes, then re-dispatch once with your feedback appended to the brief. Two fails → stop and ask the user.
  5. Between iterations, give the user one line: task, verdict, lesson. This is the human gate — pause if they want to steer.
  6. When all tasks are done (or you're blocked), use the reflect skill yourself to close out the orchestration session: what the loop achieved, what the decomposition got wrong, one lesson.

Rules

  • Never parallelize memory-writing subagents.
  • Never commit an unverified iteration. Verification is what separates compounding from thrashing.
  • If a subagent's reflection contradicts your verification (it says done, the check fails), record YOUR verdict in the daily note — external verification outranks self-report.
  • Improvement passes (the improve skill) stay in the main session, interactive. Never delegate improve to a subagent.

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.

Reviews can't be read right now.

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.