{
  "name": "AI Loop Library Catalog",
  "url": "https://ailooplibrary.com/catalog.json",
  "last_updated": "2026-07-01",
  "loop_count": 43,
  "positioning": "Safety-first catalog of bounded, verifiable AI agent loops.",
  "core_pages": [
    "https://ailooplibrary.com/",
    "https://ailooplibrary.com/what-are-ai-loops/",
    "https://ailooplibrary.com/ai-loop-examples/",
    "https://ailooplibrary.com/loop-engineering/",
    "https://ailooplibrary.com/loop-stack/",
    "https://ailooplibrary.com/ai-agent-loop-vs-workflow-vs-automation/",
    "https://ailooplibrary.com/agent-loops/",
    "https://ailooplibrary.com/ai-coding-loops/",
    "https://ailooplibrary.com/ralph-loop/",
    "https://ailooplibrary.com/claude-code-loop/",
    "https://ailooplibrary.com/loop-stop-conditions/",
    "https://ailooplibrary.com/coding-agent-loops/",
    "https://ailooplibrary.com/verification-loops/",
    "https://ailooplibrary.com/ai-loop-template/",
    "https://ailooplibrary.com/glossary/"
  ],
  "loops": [
    {
      "name": "Source Library Ingestion QA",
      "url": "https://ailooplibrary.com/loops/source-library-ingestion-qa/",
      "category": "Knowledge",
      "trigger": "After each source capture",
      "objective": "Turn raw captures into retrieval-ready knowledge instead of a pile of orphaned links.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Check canonical URL, title, author, platform, date, source type, and status.",
        "Patch missing takeaways and best-practice sections from the transcript or article only.",
        "Update the source index and refresh retrieval.",
        "Stop when the note can be found by a distinctive query and has no avoidable TBD fields."
      ],
      "verification": "Metadata complete, transcript/article state honest, useful takeaways present, and qmd retrieval verified or refreshed.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before public, destructive, financial, legal, account, or production-impacting actions.",
      "safe_output": "Draft, report, checklist, table, or approval-gated recommendation",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude",
        "ChatGPT",
        "Gemini",
        "any tool-using AI assistant"
      ]
    },
    {
      "name": "Claude Code Repo Readiness",
      "url": "https://ailooplibrary.com/loops/claude-code-repo-readiness/",
      "category": "Engineering",
      "trigger": "Before major agent work",
      "objective": "Make the repo legible to agents before asking them to do real work.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Inventory current README, AGENTS.md or CLAUDE.md, scripts, tests, and architecture docs.",
        "Add missing install, dev, test, lint, typecheck, build, and e2e commands.",
        "Document product goal, architecture, standards, protected areas, and review rules.",
        "Create docs/loops/ for state, progress, and done contracts."
      ],
      "verification": "Repo has agent instructions, documented commands, architecture notes, risk areas, and a docs/loops scaffold.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before public, destructive, financial, legal, account, or production-impacting actions.",
      "safe_output": "Pull request, patch, report, or evidence log",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude Code",
        "OpenAI Codex",
        "Cursor",
        "Gemini CLI",
        "any tool-using coding agent"
      ]
    },
    {
      "name": "Project Docs Freshness",
      "url": "https://ailooplibrary.com/loops/project-docs-freshness/",
      "category": "Engineering",
      "trigger": "Nightly or after meaningful code changes",
      "objective": "Keep documentation synced with what the product actually does.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Review code changes since the last pass.",
        "Find docs contradicted by changed behavior, config, commands, examples, or APIs.",
        "Patch the highest-risk stale docs first.",
        "Run docs build or link checks and produce a no-change report if clean."
      ],
      "verification": "Changed behavior, APIs, CLI commands, config, and workflows are reflected in docs. Docs checks pass.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before public, destructive, financial, legal, account, or production-impacting actions.",
      "safe_output": "Pull request, patch, report, or evidence log",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude Code",
        "OpenAI Codex",
        "Cursor",
        "Gemini CLI",
        "any tool-using coding agent"
      ]
    },
    {
      "name": "Test and Logging Coverage",
      "url": "https://ailooplibrary.com/loops/test-logging-coverage/",
      "category": "Engineering",
      "trigger": "Weekly or before release",
      "objective": "Raise the floor for every future loop by improving the evidence system.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "List critical flows and current test/log coverage.",
        "Choose the riskiest blind spot.",
        "Add the smallest useful test and structured log improvement.",
        "Verify logs do not expose secrets and tests prove the path."
      ],
      "verification": "Critical flows have useful tests and structured logs for representative success and failure paths.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before public, destructive, financial, legal, account, or production-impacting actions.",
      "safe_output": "Pull request, patch, report, or evidence log",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude Code",
        "OpenAI Codex",
        "Cursor",
        "Gemini CLI",
        "any tool-using coding agent"
      ]
    },
    {
      "name": "CI Optimization",
      "url": "https://ailooplibrary.com/loops/ci-optimization/",
      "category": "Engineering",
      "trigger": "Monthly or when CI is painful",
      "objective": "Attack one CI bottleneck at a time until the target is met or the bottleneck report is more valuable than another tweak.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Measure current job and step timing.",
        "Rank bottlenecks by cost and safety.",
        "Optimize one bottleneck with the smallest credible change.",
        "Rerun CI or a faithful local equivalent.",
        "Stop at the target or when no safe gain remains."
      ],
      "verification": "CI p50/p95 improves against the same workflow without weakening tests or hiding failures.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before public, destructive, financial, legal, account, or production-impacting actions.",
      "safe_output": "Pull request, patch, report, or evidence log",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude Code",
        "OpenAI Codex",
        "Cursor",
        "Gemini CLI",
        "any tool-using coding agent"
      ]
    },
    {
      "name": "Open Loop and Stale Memory Cleanup",
      "url": "https://ailooplibrary.com/loops/open-loop-stale-memory-cleanup/",
      "category": "Knowledge",
      "trigger": "Weekly",
      "objective": "Reconcile what the system thinks is open against what actually happened.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Read recent daily, project, decision, and open-loop notes.",
        "Find open loops contradicted by newer evidence.",
        "Close, update, or flag each stale item with source evidence.",
        "Stop when no contradicted current loop remains."
      ],
      "verification": "No current open loop is contradicted by recent daily or project notes.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before public, destructive, financial, legal, account, or production-impacting actions.",
      "safe_output": "Draft, report, checklist, table, or approval-gated recommendation",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude",
        "ChatGPT",
        "Gemini",
        "any tool-using AI assistant"
      ]
    },
    {
      "name": "Social Source to Insight",
      "url": "https://ailooplibrary.com/loops/social-source-to-insight/",
      "category": "Content",
      "trigger": "After saving a high-signal source",
      "objective": "Convert high-signal sources into grounded ideas without auto-posting like a caffeinated intern.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Capture source metadata and transcript or text.",
        "Extract the useful mechanism, lesson, and examples.",
        "Draft several post angles in the account voice.",
        "Gate publishing and preserve source links."
      ],
      "verification": "Source captured, takeaways extracted, draft angles written, and no public post is published without approval.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Draft, report, checklist, table, or approval-gated recommendation",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude",
        "ChatGPT",
        "Gemini",
        "any tool-using AI assistant"
      ]
    },
    {
      "name": "Fresh Clone Onboarding",
      "url": "https://ailooplibrary.com/loops/fresh-clone-onboarding/",
      "category": "Engineering",
      "trigger": "Before onboarding",
      "objective": "Prove the README works from zero, not tribal memory.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Define the exact scope, source of truth, and approval boundary.",
        "Inspect current state and rank the highest-risk gap.",
        "Make one small, reversible improvement.",
        "Run the stated verification and record evidence.",
        "Stop on success, budget, no progress, or approval required."
      ],
      "verification": "A clean machine reaches the documented ready state using only the README.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Pull request, patch, report, or evidence log",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude Code",
        "OpenAI Codex",
        "Cursor",
        "Gemini CLI",
        "any tool-using coding agent"
      ]
    },
    {
      "name": "Production Error Sweep",
      "url": "https://ailooplibrary.com/loops/production-error-sweep/",
      "category": "Operations",
      "trigger": "Daily or after incident",
      "objective": "Turn recurring production errors into verified patches.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Define the exact scope, source of truth, and approval boundary.",
        "Inspect current state and rank the highest-risk gap.",
        "Make one small, reversible improvement.",
        "Run the stated verification and record evidence.",
        "Stop on success, budget, no progress, or approval required."
      ],
      "verification": "Actionable errors are fixed with reproduction or tests, or explicitly classified as noise.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Draft, report, checklist, table, or approval-gated recommendation",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude",
        "ChatGPT",
        "Gemini",
        "any tool-using AI assistant"
      ]
    },
    {
      "name": "Dependency CVE Burndown",
      "url": "https://ailooplibrary.com/loops/dependency-cve-burndown/",
      "category": "Security",
      "trigger": "After security scan",
      "objective": "Rank vulnerabilities by real exposure, then fix the reachable ones first.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Define the exact scope, source of truth, and approval boundary.",
        "Inspect current state and rank the highest-risk gap.",
        "Make one small, reversible improvement.",
        "Run the stated verification and record evidence.",
        "Stop on success, budget, no progress, or approval required."
      ],
      "verification": "No exploitable high or critical CVE remains without an explicit risk decision.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Draft, report, checklist, table, or approval-gated recommendation",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude",
        "ChatGPT",
        "Gemini",
        "any tool-using AI assistant"
      ]
    },
    {
      "name": "Test Flake Stabilizer",
      "url": "https://ailooplibrary.com/loops/test-flake-stabilizer/",
      "category": "Engineering",
      "trigger": "When tests are inconsistent",
      "objective": "Find the real cause of flakes instead of wallpapering them with sleeps.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Define the exact scope, source of truth, and approval boundary.",
        "Inspect current state and rank the highest-risk gap.",
        "Make one small, reversible improvement.",
        "Run the stated verification and record evidence.",
        "Stop on success, budget, no progress, or approval required."
      ],
      "verification": "The repaired test and full suite pass for the required consecutive-run streak.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Pull request, patch, report, or evidence log",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude Code",
        "OpenAI Codex",
        "Cursor",
        "Gemini CLI",
        "any tool-using coding agent"
      ]
    },
    {
      "name": "Pre-Publish Source Check",
      "url": "https://ailooplibrary.com/loops/prepublish-source-check/",
      "category": "Content",
      "trigger": "Before publishing factual work",
      "objective": "Inventory the claims before the internet does it for you.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Define the exact scope, source of truth, and approval boundary.",
        "Inspect current state and rank the highest-risk gap.",
        "Make one small, reversible improvement.",
        "Run the stated verification and record evidence.",
        "Stop on success, budget, no progress, or approval required."
      ],
      "verification": "Every checkable claim is supported by a current source or visibly flagged for an editor.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Draft, report, checklist, table, or approval-gated recommendation",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude",
        "ChatGPT",
        "Gemini",
        "any tool-using AI assistant"
      ]
    },
    {
      "name": "Research to Artifact",
      "url": "https://ailooplibrary.com/loops/research-to-artifact/",
      "category": "Knowledge",
      "trigger": "Whenever research must support a decision",
      "objective": "Constrain research around the decision it needs to support.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Define the exact scope, source of truth, and approval boundary.",
        "Inspect current state and rank the highest-risk gap.",
        "Make one small, reversible improvement.",
        "Run the stated verification and record evidence.",
        "Stop on success, budget, no progress, or approval required."
      ],
      "verification": "The artifact meets acceptance criteria, traces important claims to sources, and states uncertainty plainly.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Draft, report, checklist, table, or approval-gated recommendation",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude",
        "ChatGPT",
        "Gemini",
        "any tool-using AI assistant"
      ]
    },
    {
      "name": "Browser Quality Streak",
      "url": "https://ailooplibrary.com/loops/browser-quality-streak/",
      "category": "Evaluation",
      "trigger": "Before release",
      "objective": "Run real scenarios until the streak proves the product is stable.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Define the exact scope, source of truth, and approval boundary.",
        "Inspect current state and rank the highest-risk gap.",
        "Make one small, reversible improvement.",
        "Run the stated verification and record evidence.",
        "Stop on success, budget, no progress, or approval required."
      ],
      "verification": "N realistic scenarios pass consecutively, and earlier failures have regression coverage.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Draft, report, checklist, table, or approval-gated recommendation",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude",
        "ChatGPT",
        "Gemini",
        "any tool-using AI assistant"
      ]
    },
    {
      "name": "Error Message Rewrite",
      "url": "https://ailooplibrary.com/loops/error-message-rewrite/",
      "category": "Design",
      "trigger": "When users hit confusing errors",
      "objective": "Replace error sludge with clear recovery paths.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Define the exact scope, source of truth, and approval boundary.",
        "Inspect current state and rank the highest-risk gap.",
        "Make one small, reversible improvement.",
        "Run the stated verification and record evidence.",
        "Stop on success, budget, no progress, or approval required."
      ],
      "verification": "Every in-scope user-visible error is accounted for, rewritten or blocked, and verified in a reachable state.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Draft, report, checklist, table, or approval-gated recommendation",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude",
        "ChatGPT",
        "Gemini",
        "any tool-using AI assistant"
      ]
    },
    {
      "name": "Accessibility Repair",
      "url": "https://ailooplibrary.com/loops/accessibility-repair/",
      "category": "Design",
      "trigger": "Before launch or when audits fail",
      "objective": "Fix access barriers without silencing checks or weakening the standard.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Define the exact scope, source of truth, and approval boundary.",
        "Inspect current state and rank the highest-risk gap.",
        "Make one small, reversible improvement.",
        "Run the stated verification and record evidence.",
        "Stop on success, budget, no progress, or approval required."
      ],
      "verification": "No confirmed accessibility blocker remains in the agreed pages, components, or tasks.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Draft, report, checklist, table, or approval-gated recommendation",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude",
        "ChatGPT",
        "Gemini",
        "any tool-using AI assistant"
      ]
    },
    {
      "name": "Cold Load Trim",
      "url": "https://ailooplibrary.com/loops/cold-load-trim/",
      "category": "Engineering",
      "trigger": "When first visit feels heavy",
      "objective": "Reduce first-load bytes without breaking the first impression.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Define the exact scope, source of truth, and approval boundary.",
        "Inspect current state and rank the highest-risk gap.",
        "Make one small, reversible improvement.",
        "Run the stated verification and record evidence.",
        "Stop on success, budget, no progress, or approval required."
      ],
      "verification": "Initial screen downloads fewer bytes while screenshots and behavior remain unchanged.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Pull request, patch, report, or evidence log",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude Code",
        "OpenAI Codex",
        "Cursor",
        "Gemini CLI",
        "any tool-using coding agent"
      ]
    },
    {
      "name": "Architecture Rubric Refactor",
      "url": "https://ailooplibrary.com/loops/architecture-rubric-refactor/",
      "category": "Engineering",
      "trigger": "When architecture work has a defined scope",
      "objective": "Refactor against a written rubric, not taste fumes.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Define the exact scope, source of truth, and approval boundary.",
        "Inspect current state and rank the highest-risk gap.",
        "Make one small, reversible improvement.",
        "Run the stated verification and record evidence.",
        "Stop on success, budget, no progress, or approval required."
      ],
      "verification": "Scoped module meets the written rubric, tests pass, and unresolved objections are explicit.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Pull request, patch, report, or evidence log",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude Code",
        "OpenAI Codex",
        "Cursor",
        "Gemini CLI",
        "any tool-using coding agent"
      ]
    },
    {
      "name": "Adversarial PR Review",
      "url": "https://ailooplibrary.com/loops/adversarial-pr-review/",
      "category": "Evaluation",
      "trigger": "For meaningful PRs",
      "objective": "Separate builder and critic so “looks good to me” means something.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Define the exact scope, source of truth, and approval boundary.",
        "Inspect current state and rank the highest-risk gap.",
        "Make one small, reversible improvement.",
        "Run the stated verification and record evidence.",
        "Stop on success, budget, no progress, or approval required."
      ],
      "verification": "An independent critic approves the unchanged version or only accepted findings remain.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Draft, report, checklist, table, or approval-gated recommendation",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude",
        "ChatGPT",
        "Gemini",
        "any tool-using AI assistant"
      ]
    },
    {
      "name": "Living Story",
      "url": "https://ailooplibrary.com/loops/living-story/",
      "category": "Operations",
      "trigger": "Weekly or per project window",
      "objective": "Maintain an evidence-backed story of what matters and what is unfinished.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Define the exact scope, source of truth, and approval boundary.",
        "Inspect current state and rank the highest-risk gap.",
        "Make one small, reversible improvement.",
        "Run the stated verification and record evidence.",
        "Stop on success, budget, no progress, or approval required."
      ],
      "verification": "Every prior thread is carried forward, closed with evidence, or flagged stale/needs-review.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Draft, report, checklist, table, or approval-gated recommendation",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude",
        "ChatGPT",
        "Gemini",
        "any tool-using AI assistant"
      ]
    },
    {
      "name": "Promise to Proof",
      "url": "https://ailooplibrary.com/loops/promise-to-proof/",
      "category": "Growth",
      "trigger": "Before launch or campaign refresh",
      "objective": "Make product claims survive contact with reality.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Define the exact scope, source of truth, and approval boundary.",
        "Inspect current state and rank the highest-risk gap.",
        "Make one small, reversible improvement.",
        "Run the stated verification and record evidence.",
        "Stop on success, budget, no progress, or approval required."
      ],
      "verification": "Every high-risk customer promise is supported, narrowed, or awaiting an explicit decision.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Draft, report, checklist, table, or approval-gated recommendation",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude",
        "ChatGPT",
        "Gemini",
        "any tool-using AI assistant"
      ]
    },
    {
      "name": "SEO/GEO Visibility",
      "url": "https://ailooplibrary.com/loops/seo-geo-visibility/",
      "category": "Growth",
      "trigger": "Monthly",
      "objective": "Map priority questions to answer-ready pages.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Define the exact scope, source of truth, and approval boundary.",
        "Inspect current state and rank the highest-risk gap.",
        "Make one small, reversible improvement.",
        "Run the stated verification and record evidence.",
        "Stop on success, budget, no progress, or approval required."
      ],
      "verification": "Priority pages are indexable, answer-ready, internally linked, and no high-impact benchmark gaps remain.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Draft, report, checklist, table, or approval-gated recommendation",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude",
        "ChatGPT",
        "Gemini",
        "any tool-using AI assistant"
      ]
    },
    {
      "name": "One Post a Week Experiment",
      "url": "https://ailooplibrary.com/loops/one-post-a-week/",
      "category": "Content",
      "trigger": "Weekly for six weeks",
      "objective": "Change one variable per week and let useful audience behavior decide.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Define the exact scope, source of truth, and approval boundary.",
        "Inspect current state and rank the highest-risk gap.",
        "Make one small, reversible improvement.",
        "Run the stated verification and record evidence.",
        "Stop on success, budget, no progress, or approval required."
      ],
      "verification": "Winner is supported by comparable replies, saves, and questions, not just likes.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Draft, report, checklist, table, or approval-gated recommendation",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude",
        "ChatGPT",
        "Gemini",
        "any tool-using AI assistant"
      ]
    },
    {
      "name": "Talk to Five Buyers",
      "url": "https://ailooplibrary.com/loops/talk-to-five-buyers/",
      "category": "Growth",
      "trigger": "Before major landing-page rewrite",
      "objective": "Let buyer language rewrite the page where the objection appears.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Define the exact scope, source of truth, and approval boundary.",
        "Inspect current state and rank the highest-risk gap.",
        "Make one small, reversible improvement.",
        "Run the stated verification and record evidence.",
        "Stop on success, budget, no progress, or approval required."
      ],
      "verification": "Proposed copy traces to repeated anonymized buyer objections across approved interviews.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Draft, report, checklist, table, or approval-gated recommendation",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude",
        "ChatGPT",
        "Gemini",
        "any tool-using AI assistant"
      ]
    },
    {
      "name": "Agent Handoff Continuity",
      "url": "https://ailooplibrary.com/loops/agent-handoff-continuity/",
      "category": "Operations",
      "trigger": "Before pausing or switching agents",
      "objective": "Prevent the next agent from starting with amnesia and bravado.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Define the exact scope, source of truth, and approval boundary.",
        "Inspect current state and rank the highest-risk gap.",
        "Make one small, reversible improvement.",
        "Run the stated verification and record evidence.",
        "Stop on success, budget, no progress, or approval required."
      ],
      "verification": "A new agent can state goal, current state, proof, blockers, and next action without reading the whole transcript.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Draft, report, checklist, table, or approval-gated recommendation",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude",
        "ChatGPT",
        "Gemini",
        "any tool-using AI assistant"
      ]
    },
    {
      "name": "Agent Toolchain Health Check",
      "url": "https://ailooplibrary.com/loops/toolchain-health-check/",
      "category": "Operations",
      "trigger": "Weekly or before a heavy agent run",
      "objective": "Check the harness before blaming the model.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Define the exact scope, source of truth, and approval boundary.",
        "Inspect current state and rank the highest-risk gap.",
        "Make one small, reversible improvement.",
        "Run the stated verification and record evidence.",
        "Stop on success, budget, no progress, or approval required."
      ],
      "verification": "Critical tools authenticate, return sane output, and have a known fallback or blocker owner.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Draft, report, checklist, table, or approval-gated recommendation",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude",
        "ChatGPT",
        "Gemini",
        "any tool-using AI assistant"
      ]
    },
    {
      "name": "API Contract Drift",
      "url": "https://ailooplibrary.com/loops/api-contract-drift/",
      "category": "Engineering",
      "trigger": "After API changes or SDK releases",
      "objective": "Find where the API contract forked and bring every consumer back to one truth.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Define the exact scope, source of truth, and approval boundary.",
        "Inspect current state and rank the highest-risk gap.",
        "Make one small, reversible improvement.",
        "Run the stated verification and record evidence.",
        "Stop on success, budget, no progress, or approval required."
      ],
      "verification": "Server behavior, client types, examples, and docs agree on request/response contracts.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Pull request, patch, report, or evidence log",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude Code",
        "OpenAI Codex",
        "Cursor",
        "Gemini CLI",
        "any tool-using coding agent"
      ]
    },
    {
      "name": "Calendar Promise Proof",
      "url": "https://ailooplibrary.com/loops/calendar-promise-proof/",
      "category": "Personal Ops",
      "trigger": "Daily or before week planning",
      "objective": "Mine the calendar for promises before they become social debt.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Define the exact scope, source of truth, and approval boundary.",
        "Inspect current state and rank the highest-risk gap.",
        "Make one small, reversible improvement.",
        "Run the stated verification and record evidence.",
        "Stop on success, budget, no progress, or approval required."
      ],
      "verification": "Every calendar-derived promise has an owner, due date, evidence, or explicit drop decision.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Draft, report, checklist, table, or approval-gated recommendation",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude",
        "ChatGPT",
        "Gemini",
        "any tool-using AI assistant"
      ]
    },
    {
      "name": "Support Refund Follow-Up",
      "url": "https://ailooplibrary.com/loops/support-refund-followup/",
      "category": "Personal Ops",
      "trigger": "Until terminal state",
      "objective": "Keep the case moving until the money lands or the wall is real.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Define the exact scope, source of truth, and approval boundary.",
        "Inspect current state and rank the highest-risk gap.",
        "Make one small, reversible improvement.",
        "Run the stated verification and record evidence.",
        "Stop on success, budget, no progress, or approval required."
      ],
      "verification": "Refund is received, or no approved next step remains and a blocker is named.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Draft, report, checklist, table, or approval-gated recommendation",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude",
        "ChatGPT",
        "Gemini",
        "any tool-using AI assistant"
      ]
    },
    {
      "name": "Loop Hiring Manager",
      "url": "https://ailooplibrary.com/loops/loop-hiring-manager/",
      "category": "Strategy",
      "trigger": "When a project accumulates recurring chores",
      "objective": "Hire loops like employees: for recurring work with clear outcomes.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Define the exact scope, source of truth, and approval boundary.",
        "Inspect current state and rank the highest-risk gap.",
        "Make one small, reversible improvement.",
        "Run the stated verification and record evidence.",
        "Stop on success, budget, no progress, or approval required."
      ],
      "verification": "At most three candidates fill proven recurring gaps, with one recommended safe manual trial.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Draft, report, checklist, table, or approval-gated recommendation",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude",
        "ChatGPT",
        "Gemini",
        "any tool-using AI assistant"
      ]
    },
    {
      "name": "Acceptance Scenario Lockstep",
      "url": "https://ailooplibrary.com/loops/acceptance-scenario-lockstep/",
      "category": "Engineering",
      "trigger": "Before and during ambiguous feature work",
      "objective": "Pin the target with executable scenarios before the agent starts changing code.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Translate the request into 3-7 user-visible scenarios, including at least one failure or edge case.",
        "Mark which scenarios are in scope, out of scope, or require approval before work starts.",
        "Turn the in-scope scenarios into tests, fixtures, or a checklist that can be rerun unchanged.",
        "Implement only the smallest change needed for those scenarios.",
        "Run the scenarios and stop if new behavior would broaden scope, affect billing/data/security, or require product judgment."
      ],
      "verification": "The same scenarios written before implementation pass after the change, and any scope expansion is explicitly approved.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Pull request, patch, report, or evidence log",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude Code",
        "OpenAI Codex",
        "Cursor",
        "Gemini CLI",
        "any tool-using coding agent"
      ]
    },
    {
      "name": "Inbox Decision Triage",
      "url": "https://ailooplibrary.com/loops/inbox-decision-triage/",
      "category": "Personal Ops",
      "trigger": "Daily or before deep work",
      "objective": "Turn inbox sludge into a small list of decisions, drafts, and explicit no-actions.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Search only the agreed inbox, channel, label, or time window.",
        "Classify each item as FYI, action, decision, relationship-sensitive, or safe archive.",
        "For each action item, capture owner, due date, source link, and next step.",
        "Draft replies or task notes in the user's voice, but keep them unsent unless approval is already explicit.",
        "Do not delete, unsubscribe, spend money, accept terms, or commit the user without approval; stop when only human-judgment items remain."
      ],
      "verification": "Every sampled message is archived, labeled, delegated, converted to a task, or left with a drafted reply; no external message is sent without approval.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Draft, report, checklist, table, or approval-gated recommendation",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude",
        "ChatGPT",
        "Gemini",
        "any tool-using AI assistant"
      ]
    },
    {
      "name": "Reference Oracle Implementation",
      "url": "https://ailooplibrary.com/loops/reference-oracle-implementation/",
      "category": "Engineering",
      "trigger": "Before implementing tricky behavior with an external source of truth",
      "objective": "Give the agent an oracle, not a pep talk.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Identify the most trustworthy reference output: browser engine, legacy implementation, official API, golden files, or production traces.",
        "Build a small command or fixture harness that compares the new implementation against that oracle.",
        "Start with the simplest passing cases, then add one behavior class at a time.",
        "After each change, run the parity harness and record failures with inputs, expected output, actual output, and tolerance rules.",
        "Stop when the scoped fixture set passes or the remaining differences require product or standards judgment."
      ],
      "verification": "Generated outputs match the reference oracle across the agreed fixture set, with tolerances documented for legitimate differences.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Pull request, patch, report, or evidence log",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude Code",
        "OpenAI Codex",
        "Cursor",
        "Gemini CLI",
        "any tool-using coding agent"
      ]
    },
    {
      "name": "Agent Instructions After-Action",
      "url": "https://ailooplibrary.com/loops/agent-instructions-after-action/",
      "category": "Engineering",
      "trigger": "After a successful or painful agent coding session",
      "objective": "Turn one agent run into better future agent runs.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Review the session diff, failed commands, final passing commands, and any repeated confusion.",
        "Extract only reusable lessons: commands, conventions, tolerances, gotchas, protected paths, or fixture setup.",
        "Patch AGENTS.md, CLAUDE.md, repo docs, or a docs/loops note with concise operational guidance.",
        "Remove one-off transcript noise, blame, and implementation trivia.",
        "Verify the instruction file is readable and references real commands or paths."
      ],
      "verification": "Repo instructions contain only reusable, source-grounded lessons and the next similar task can start without rediscovering the same trap.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before public, destructive, financial, legal, account, or production-impacting actions.",
      "safe_output": "Pull request, patch, report, or evidence log",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude Code",
        "OpenAI Codex",
        "Cursor",
        "Gemini CLI",
        "any tool-using coding agent"
      ]
    },
    {
      "name": "Spec to Task Shards",
      "url": "https://ailooplibrary.com/loops/spec-to-task-shards/",
      "category": "Engineering",
      "trigger": "Before multi-file feature work or migrations",
      "objective": "Make the agent split the work before it starts swinging a hammer.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Read the relevant code, docs, tickets, and constraints before proposing implementation.",
        "Write a short spec with goal, non-goals, affected files, risks, and acceptance checks.",
        "Break the spec into small task shards that can each be implemented and verified independently.",
        "Order shards by risk: scaffold, tests, smallest behavior, integrations, cleanup, docs.",
        "Stop and ask for approval if the spec exposes ambiguous product behavior, data migration risk, or security impact."
      ],
      "verification": "A written spec, non-goals, acceptance checks, and ordered task shards exist before implementation begins.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Pull request, patch, report, or evidence log",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude Code",
        "OpenAI Codex",
        "Cursor",
        "Gemini CLI",
        "any tool-using coding agent"
      ]
    },
    {
      "name": "Behavior Ladder TDD",
      "url": "https://ailooplibrary.com/loops/behavior-ladder-tdd/",
      "category": "Engineering",
      "trigger": "When implementing logic-heavy features",
      "objective": "Use tests as the prompt, one behavior at a time.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Convert business rules into an ordered checklist of behaviors, starting with the simplest valuable case.",
        "Write one failing test for the next behavior and confirm it fails for the expected reason.",
        "Implement only enough code to pass that test.",
        "Run the focused test and the nearest related test set before adding the next behavior.",
        "Refactor only after the ladder is green, and rerun the full relevant suite."
      ],
      "verification": "Each behavior test fails before implementation, passes after the smallest change, and remains green through final refactor.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before public, destructive, financial, legal, account, or production-impacting actions.",
      "safe_output": "Pull request, patch, report, or evidence log",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude Code",
        "OpenAI Codex",
        "Cursor",
        "Gemini CLI",
        "any tool-using coding agent"
      ]
    },
    {
      "name": "Trace-First Debugging",
      "url": "https://ailooplibrary.com/loops/trace-first-debugging/",
      "category": "Engineering",
      "trigger": "When an agent is tempted to patch a bug from a hunch",
      "objective": "Make the agent earn the fix before touching code.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Collect the symptom, expected behavior, recent changes, logs, stack traces, screenshots, and environment details.",
        "List plausible causes and the smallest diagnostic for each before modifying files.",
        "Reproduce the bug or create a failing regression test/check that captures it.",
        "Patch the smallest proven cause and remove temporary debug noise unless it should become structured logging.",
        "Verify the original reproduction fails before and passes after, then run nearby tests."
      ],
      "verification": "The bug is reproduced, the root cause is evidenced by traces or tests, and the fix includes a regression check.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before public, destructive, financial, legal, account, or production-impacting actions.",
      "safe_output": "Pull request, patch, report, or evidence log",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude Code",
        "OpenAI Codex",
        "Cursor",
        "Gemini CLI",
        "any tool-using coding agent"
      ]
    },
    {
      "name": "Visual Feedback Repair",
      "url": "https://ailooplibrary.com/loops/visual-feedback-repair/",
      "category": "Design",
      "trigger": "After AI-generated UI changes or visual bug reports",
      "objective": "Show the agent the page, not just the code.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Capture the failing screen, viewport, interaction state, expected design intent, and any console/network errors.",
        "Ask the agent to identify likely causes from screenshot, DOM, CSS, and component structure before editing.",
        "Patch the smallest layout, spacing, color, typography, or state-handling issue.",
        "Recheck the same viewport plus at least one adjacent viewport or interaction state.",
        "Stop when the issue is fixed with visual evidence or when the remaining judgment is taste/design approval."
      ],
      "verification": "Before/after screenshots, console state, and responsive checks show the visual issue is fixed without breaking adjacent states.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Draft, report, checklist, table, or approval-gated recommendation",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude",
        "ChatGPT",
        "Gemini",
        "any tool-using AI assistant"
      ]
    },
    {
      "name": "Memory Bank Continuity",
      "url": "https://ailooplibrary.com/loops/memory-bank-continuity/",
      "category": "Knowledge",
      "trigger": "At the start and end of multi-session agent work",
      "objective": "Give stateless agents a project spine.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "At session start, read the project brief, active context, tech constraints, system patterns, and progress files.",
        "During work, record durable decisions, current blockers, changed commands, and important path references.",
        "At session end, update active context and progress with what changed, what passed, what failed, and what comes next.",
        "Do not store secrets, raw transcripts, or giant code dumps in memory files.",
        "Verify a fresh-agent handoff can state goal, current state, commands, blockers, and next action."
      ],
      "verification": "Project brief, active context, decisions, tech constraints, and progress are current enough for a fresh agent to continue safely.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before public, destructive, financial, legal, account, or production-impacting actions.",
      "safe_output": "Draft, report, checklist, table, or approval-gated recommendation",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude",
        "ChatGPT",
        "Gemini",
        "any tool-using AI assistant"
      ]
    },
    {
      "name": "Sandboxed YOLO Probe",
      "url": "https://ailooplibrary.com/loops/sandboxed-yolo-probe/",
      "category": "Security",
      "trigger": "Before allowing autonomous shell-heavy agent runs",
      "objective": "Let the agent run wild somewhere boring.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Create a disposable container, codespace, VM, or worktree with only the files and secrets required for the task.",
        "Disable or restrict network access unless specific hosts are required.",
        "Run the agent's exploratory loop inside the sandbox with clear budget, scope, and forbidden actions.",
        "Export only the patch, metrics, logs, and reproduction steps needed for review.",
        "Apply to the real repo only after human or policy review of the diff and verification evidence."
      ],
      "verification": "The agent can run needed commands inside the sandbox, cannot reach forbidden files/secrets, and produces a replayable diff or report before host-side changes.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Draft, report, checklist, table, or approval-gated recommendation",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude",
        "ChatGPT",
        "Gemini",
        "any tool-using AI assistant"
      ]
    },
    {
      "name": "Parallel Agent Worktree Sweep",
      "url": "https://ailooplibrary.com/loops/parallel-agent-worktree-sweep/",
      "category": "Engineering",
      "trigger": "When several independent repo improvements can run at once",
      "objective": "Run more agents, but keep their blast radiuses separate.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Split the work into independent tasks with non-overlapping files or explicit conflict boundaries.",
        "Create separate branches or worktrees and give each agent its own goal, commands, budget, and done contract.",
        "Require each agent to return diff summary, verification output, known risks, and next-step recommendation.",
        "Review branches in priority order, checking for overlapping files, duplicated abstractions, and integration risks.",
        "Merge only the branches with passing evidence and clear product value; park or discard the rest."
      ],
      "verification": "Each agent branch has isolated scope, passing checks, a summary, and no conflicting files before integration review.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Pull request, patch, report, or evidence log",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude Code",
        "OpenAI Codex",
        "Cursor",
        "Gemini CLI",
        "any tool-using coding agent"
      ]
    },
    {
      "name": "Agent Merge Queue Review",
      "url": "https://ailooplibrary.com/loops/agent-merge-queue-review/",
      "category": "Evaluation",
      "trigger": "After multiple agent-generated PRs or branches accumulate",
      "objective": "Separate useful agent output from merge-shaped confetti.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "List all candidate PRs/branches with goal, touched files, test evidence, risk, and age.",
        "Group related branches and identify conflicts, duplicated work, and dependency ordering.",
        "Run targeted checks for the highest-value candidates first.",
        "Approve, request changes, merge, park, or close each candidate with a reason.",
        "Update repo instructions or loop docs with any recurring failure pattern seen across branches."
      ],
      "verification": "Only branches with passing checks, clear intent, non-conflicting scope, and human-readable evidence are merged or promoted.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Draft, report, checklist, table, or approval-gated recommendation",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude",
        "ChatGPT",
        "Gemini",
        "any tool-using AI assistant"
      ]
    },
    {
      "name": "Completion Promise Loop",
      "url": "https://ailooplibrary.com/loops/completion-promise-loop/",
      "category": "Engineering",
      "trigger": "For scoped implementation tasks where half-finished output is the main risk",
      "objective": "Make the agent promise completion against explicit evidence, not vibes and a cheerful summary.",
      "allowed_inputs": [
        "Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop"
      ],
      "allowed_actions": [
        "Write the acceptance criteria as a checklist before implementation starts.",
        "Have the agent restate the done contract, allowed files, verification commands, and stop conditions.",
        "Let the agent implement one slice, then immediately run the nearest proof: tests, browser check, lint, logs, screenshot, or fixture comparison.",
        "After each failure or uncovered criterion, repair and re-run the relevant proof instead of moving on to unrelated cleanup.",
        "Stop only when every criterion is proven, the budget is exhausted, or a blocker is returned with exact evidence and the next human decision."
      ],
      "verification": "Every acceptance criterion is checked with tests, browser evidence, logs, screenshots, or a clear blocker report before the agent stops.",
      "stop_condition": "Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.",
      "budget": "Set a time, turn, token, retry, file, or dollar cap before running the loop.",
      "approval_boundary": "Human approval required before publishing, sending, deleting, spending, changing accounts, touching production, or making reputational/legal/financial commitments.",
      "safe_output": "Pull request, patch, report, or evidence log",
      "tools": [
        "File editor",
        "terminal or task runner",
        "browser or HTTP checker",
        "source/retrieval tools",
        "issue/PR tracker when relevant"
      ],
      "works_with": [
        "Claude Code",
        "OpenAI Codex",
        "Cursor",
        "Gemini CLI",
        "any tool-using coding agent"
      ]
    }
  ]
}
