Cursor Loops
Loops that can be pasted into Cursor Agent or adapted into Cursor rules. These loops are SSR-friendly pages with Markdown exports you can paste directly into Cursor.
All Cursor loops
Ship PR Until Green
Implement a scoped change, open or update a pull request, inspect CI, and continue until all required PR checks pass.
Kickoff preview
Take this branch to a green pull request. Implement the requested change, run local verification, open or update the PR, run `gh pr checks`, inspect failures, fix root causes, and repeat until every required check passes or you hit the iteration cap. Goal: Open or update a pull request and stop only when all required PR checks are green. Check command: gh pr checks Exit condition: All required pull request checks are successful and the PR is ready for review or merge. Max iterations: 10 Guardrails: - Do not weaken, skip, delete, or rewrite the validation command to force success. - Do not claim completion until the stated exit condition is actually satisfied. - If blocked, report the blocker, evidence, and next safest action instead of gaming the metric. - Do not disable required checks, edit loops to skip jobs, or remove tests to make CI green. - Do not merge the PR unless the user explicitly asked for merge authority.
Independent Verifier Pass
Review an agent-produced change as a skeptical verifier before it is marked done.
Kickoff preview
Act as an independent verifier. Restate the requirements, inspect the diff, run relevant checks, and return a pass/fail/blocker verdict with evidence. Goal: Prove the implementation satisfies the request without relying on the implementer’s claim. Check command: git diff --stat && git diff --check Exit condition: The verifier can map each requirement to code and verification evidence. Max iterations: 3 Guardrails: - Do not weaken, skip, delete, or rewrite the validation command to force success. - Do not claim completion until the stated exit condition is actually satisfied. - If blocked, report the blocker, evidence, and next safest action instead of gaming the metric. - Do not rubber-stamp. Find at least one plausible failure mode and check it.
SEO Metadata Audit Loop
Audit title, description, canonical, Open Graph, headings, and indexability for SEO-critical pages.
Kickoff preview
Audit SEO metadata from server-rendered HTML for the target pages. Verify title, description, canonical, H1, Open Graph, and indexability, then fix and re-check. Goal: Ensure SEO-critical pages have unique, server-rendered metadata and indexable content. Check command: curl -sL $URL | head -80 Exit condition: Each target page has unique title, description, canonical, visible H1, and no accidental noindex. Max iterations: 5 Guardrails: - Do not weaken, skip, delete, or rewrite the validation command to force success. - Do not claim completion until the stated exit condition is actually satisfied. - If blocked, report the blocker, evidence, and next safest action instead of gaming the metric. - Do not rely only on client-rendered metadata for SEO-critical pages. Verify server HTML.
Launch Checklist Loop
Run a structured launch review covering build, SEO, policy pages, analytics, sitemap, and deployment verification.
Kickoff preview
Run a launch readiness checklist: build, deployed critical pages, SEO metadata, sitemap, robots, policy pages, analytics/ads, and final blockers. Goal: Avoid launching with broken routes, missing policy pages, bad metadata, or unverifiable deployment. Check command: pnpm build Exit condition: Build, deployment, SEO basics, policy pages, and critical user paths pass review. Max iterations: 4 Guardrails: - Do not weaken, skip, delete, or rewrite the validation command to force success. - Do not claim completion until the stated exit condition is actually satisfied. - If blocked, report the blocker, evidence, and next safest action instead of gaming the metric. - Do not mark launch-ready with missing policy pages or broken critical routes.
Programmatic SEO Page QA Loop
Review generated SEO pages for thin content, duplicate metadata, broken internal links, and missing structured data.
Kickoff preview
Audit a sample of generated SEO pages for uniqueness, helpfulness, metadata, internal links, and schema. Fix template/data issues before publishing at scale. Goal: Ensure template-generated pages provide distinct value and are safe to index. Check command: curl -sL $URL Exit condition: Sampled generated pages have unique metadata, useful body content, and valid internal links. Max iterations: 5 Guardrails: - Do not weaken, skip, delete, or rewrite the validation command to force success. - Do not claim completion until the stated exit condition is actually satisfied. - If blocked, report the blocker, evidence, and next safest action instead of gaming the metric. - Do not create large numbers of thin pages solely to manipulate search ranking.
Test Until Green
Run the project test suite, fix root causes, and keep iterating until the selected test command passes.
Kickoff preview
Run the project tests, inspect failures, fix the smallest root cause, and repeat until the test command passes. Do not weaken the tests or change the check command. Goal: Make the selected test command pass without weakening coverage. Check command: pnpm test Exit condition: The test command exits successfully with no failing tests. Max iterations: 8 Guardrails: - Do not weaken, skip, delete, or rewrite the validation command to force success. - Do not claim completion until the stated exit condition is actually satisfied. - If blocked, report the blocker, evidence, and next safest action instead of gaming the metric. - Do not delete, skip, or mark tests as todo unless explicitly requested.
GSC Indexing Debug Loop
Diagnose why a page is not indexed by checking robots, sitemap, canonical, status code, content quality, and internal links.
Kickoff preview
Debug indexing for the target URL: status, robots, canonical, noindex, sitemap, internal links, and content usefulness. Return exact fixes and uncertainty. Goal: Find technical or content reasons a page may not be indexed. Check command: curl -I $URL Exit condition: The page is technically indexable and remaining indexing uncertainty is clearly documented. Max iterations: 4 Guardrails: - Do not weaken, skip, delete, or rewrite the validation command to force success. - Do not claim completion until the stated exit condition is actually satisfied. - If blocked, report the blocker, evidence, and next safest action instead of gaming the metric. - Do not promise indexing. Only verify technical readiness and recommend fixes.
AdSense Readiness Audit
Check whether a free content/tool site has enough original value, policy pages, navigation, and ad-safe layout for AdSense review.
Kickoff preview
Audit the site for AdSense readiness: content depth, policy pages, navigation, mobile UX, and ad-safe layout. Return blockers and fixes. Goal: Make the site credible, useful, navigable, and ad-safe before AdSense review. Check command: curl -I $SITE_URL Exit condition: Core content, policy pages, navigation, and ad placement are ready for review. Max iterations: 4 Guardrails: - Do not weaken, skip, delete, or rewrite the validation command to force success. - Do not claim completion until the stated exit condition is actually satisfied. - If blocked, report the blocker, evidence, and next safest action instead of gaming the metric. - Do not place ads next to copy/download/source buttons where users may click accidentally.
Database Migration Review
Review schema and migration changes for destructive operations, D1 compatibility, indexes, and rollback risk.
Kickoff preview
Review database schema and migration changes for D1 compatibility, destructive operations, indexes, and rollback risk. Generate but do not apply production migrations without approval. Goal: Ensure database changes are safe for development and production migration paths. Check command: pnpm db:generate Exit condition: Migration SQL is reviewed and no unexpected destructive operations remain. Max iterations: 4 Guardrails: - Do not weaken, skip, delete, or rewrite the validation command to force success. - Do not claim completion until the stated exit condition is actually satisfied. - If blocked, report the blocker, evidence, and next safest action instead of gaming the metric. - Do not apply production migrations without human review. Do not run destructive SQL automatically.
Fix TypeScript Until Clean
Run TypeScript checking, fix typed root causes, and stop only when strict type validation passes.
Kickoff preview
Run the TypeScript check, group errors by root cause, fix them with strict types, and repeat until the command exits cleanly. Goal: Make TypeScript validation pass without lowering type safety. Check command: pnpm tsc --noEmit Exit condition: TypeScript check exits with code 0. Max iterations: 8 Guardrails: - Do not weaken, skip, delete, or rewrite the validation command to force success. - Do not claim completion until the stated exit condition is actually satisfied. - If blocked, report the blocker, evidence, and next safest action instead of gaming the metric. - Do not add `any`, `// @ts-ignore`, or disable strict compiler options unless explicitly approved.
AGENTS.md Improvement Loop
Audit and improve repository agent instructions so future AI sessions follow project conventions and verification rules.
Kickoff preview
Audit repository agent instructions against actual project files, then improve them with accurate commands, architecture rules, and verification expectations. Goal: Make repository instructions accurate, actionable, and verification-oriented. Check command: ls -la && rg -n "build|test|lint|deploy" README.md package.json AGENTS.md CLAUDE.md Exit condition: Agent instructions state stack, commands, architecture rules, and verification expectations accurately. Max iterations: 3 Guardrails: - Do not weaken, skip, delete, or rewrite the validation command to force success. - Do not claim completion until the stated exit condition is actually satisfied. - If blocked, report the blocker, evidence, and next safest action instead of gaming the metric. - Do not invent commands, tools, or architecture claims that are not present in the repository.
Build Until Passing
Run the production build, fix compile/runtime bundling failures, and stop only when the build succeeds.
Kickoff preview
Run the production build, fix root causes while preserving project architecture, and repeat until the build passes. Goal: Make the production build succeed for the target runtime. Check command: pnpm build Exit condition: The production build command exits successfully. Max iterations: 6 Guardrails: - Do not weaken, skip, delete, or rewrite the validation command to force success. - Do not claim completion until the stated exit condition is actually satisfied. - If blocked, report the blocker, evidence, and next safest action instead of gaming the metric. - Do not hide build failures with dynamic imports or environment checks unless that is the correct runtime boundary.
Internal Link Builder Loop
Find orphan or weak pages and add relevant internal links from hubs, related pages, and contextual sections.
Kickoff preview
Find weak or orphan pages, choose relevant source pages, add natural internal links, and verify the rendered pages expose those links. Goal: Improve crawlability and user navigation through relevant internal links. Check command: curl -sL $SITEMAP_URL Exit condition: Priority pages are linked from relevant hub/detail pages with natural anchors. Max iterations: 4 Guardrails: - Do not weaken, skip, delete, or rewrite the validation command to force success. - Do not claim completion until the stated exit condition is actually satisfied. - If blocked, report the blocker, evidence, and next safest action instead of gaming the metric. - Do not add irrelevant keyword-stuffed links. User usefulness comes first.
Post-Edit Test Guard
After code edits, detect the affected surface and run the closest relevant validation before declaring completion.
Kickoff preview
After every code edit, list changed files, choose the closest meaningful validation, run it, and report evidence before claiming completion. Goal: Run the closest meaningful verification after edits and report evidence. Check command: git diff --name-only HEAD Exit condition: Relevant validation has been run and either passes or failures are reported with evidence. Max iterations: 4 Guardrails: - Do not weaken, skip, delete, or rewrite the validation command to force success. - Do not claim completion until the stated exit condition is actually satisfied. - If blocked, report the blocker, evidence, and next safest action instead of gaming the metric. - Do not say “not run” without explaining why no meaningful check exists.
Sitemap Freshness Check
Verify that important public pages are present in sitemap.xml with canonical URLs and reasonable lastmod values.
Kickoff preview
Fetch sitemap.xml, compare it against expected public URLs, check exclusions, patch the generator, and re-fetch until coverage is correct. Goal: Ensure sitemap.xml includes canonical public pages and excludes private/admin/API routes. Check command: curl -sL $SITE_URL/sitemap.xml Exit condition: Sitemap contains important public URLs and excludes private/API/admin pages. Max iterations: 3 Guardrails: - Do not weaken, skip, delete, or rewrite the validation command to force success. - Do not claim completion until the stated exit condition is actually satisfied. - If blocked, report the blocker, evidence, and next safest action instead of gaming the metric. - Do not include private, admin, API, or duplicate query URLs in sitemap.
FAQ Schema Verification Loop
Ensure FAQ content is visible on the page and structured data matches the rendered questions and answers.
Kickoff preview
Verify visible FAQ content and JSON-LD structured data match exactly. Fix mismatches and avoid marking up hidden content. Goal: Keep FAQ structured data accurate and visible. Check command: curl -sL $URL | rg "application/ld\+json|FAQPage" Exit condition: FAQ JSON-LD matches visible questions and answers on the page. Max iterations: 3 Guardrails: - Do not weaken, skip, delete, or rewrite the validation command to force success. - Do not claim completion until the stated exit condition is actually satisfied. - If blocked, report the blocker, evidence, and next safest action instead of gaming the metric. - Do not mark up hidden, misleading, or unrelated FAQ content.
PR Self Review
Have the agent review its own pull request for requirement coverage, risky changes, and missing tests.
Kickoff preview
Review your own PR against the original task, changed files, tests, and risk categories. Fix must-fix issues and report evidence. Goal: Identify problems in the agent’s own PR before human review. Check command: git diff --stat main...HEAD && git diff --check main...HEAD Exit condition: No must-fix review issues remain, or unresolved issues are clearly documented. Max iterations: 3 Guardrails: - Do not weaken, skip, delete, or rewrite the validation command to force success. - Do not claim completion until the stated exit condition is actually satisfied. - If blocked, report the blocker, evidence, and next safest action instead of gaming the metric. - Do not hide unresolved issues; label them as risks or blockers.
D1 Query Index Audit
Review D1-backed list and detail queries for missing indexes, N+1 patterns, and oversized result sets.
Kickoff preview
Audit D1-backed public queries for indexes, pagination, N+1 patterns, and SSR safety. Propose or implement targeted fixes.
Goal: Keep public D1 queries indexed, bounded, and SSR-safe.
Check command: rg -n "select(|where(|limit(" src/modules src/routes
Exit condition: Hot list/detail queries have matching indexes and bounded result sizes.
Max iterations: 4
Guardrails:
- Do not weaken, skip, delete, or rewrite the validation command to force success.
- Do not claim completion until the stated exit condition is actually satisfied.
- If blocked, report the blocker, evidence, and next safest action instead of gaming the metric.
- Do not add broad unbounded queries to SEO pages. Keep public pages SSR-friendly.Docs Sync After Edits
After behavior or API changes, update README, docs, examples, and project instructions to match the code.
Kickoff preview
Review code changes for documentation impact, update relevant docs/examples/instructions, and report evidence or why no docs update is needed. Goal: Keep documentation aligned with code changes. Check command: git diff --name-only HEAD Exit condition: Docs are updated for relevant changes or the no-docs-needed decision is justified. Max iterations: 3 Guardrails: - Do not weaken, skip, delete, or rewrite the validation command to force success. - Do not claim completion until the stated exit condition is actually satisfied. - If blocked, report the blocker, evidence, and next safest action instead of gaming the metric. - Do not update docs with behavior that the code does not actually implement.
Landing Page CRO Review
Review a landing page for message clarity, CTA focus, trust signals, mobile UX, and SEO alignment.
Kickoff preview
Review the landing page for positioning, CTA focus, trust, mobile UX, and SEO alignment. Return prioritized fixes and avoid fake proof. Goal: Improve landing page clarity and conversion without harming SEO. Check command: curl -sL $URL | head -120 Exit condition: The page has clear positioning, primary CTA, trust signals, and SEO metadata. Max iterations: 3 Guardrails: - Do not weaken, skip, delete, or rewrite the validation command to force success. - Do not claim completion until the stated exit condition is actually satisfied. - If blocked, report the blocker, evidence, and next safest action instead of gaming the metric. - Do not add fake testimonials, fake metrics, or misleading claims.
Regression Risk Audit
Map a change to likely regressions, then run or propose focused checks for those risks.
Kickoff preview
Map the changed files to affected call chains, list likely regressions, verify the top risks, and report remaining uncertainty. Goal: Identify likely regressions and verify the highest-risk paths. Check command: git diff --name-only main...HEAD Exit condition: Top regression risks are either tested, ruled out, or documented as unresolved. Max iterations: 4 Guardrails: - Do not weaken, skip, delete, or rewrite the validation command to force success. - Do not claim completion until the stated exit condition is actually satisfied. - If blocked, report the blocker, evidence, and next safest action instead of gaming the metric. - Do not overstate confidence when a risk was not actually verified.
Thin Content Expansion Loop
Find pages with shallow content and expand them with practical examples, source context, FAQs, and related loops.
Kickoff preview
Improve a thin page by adding specific examples, operational guidance, source context, FAQs, and related links. Avoid filler and duplicate boilerplate. Goal: Turn a thin page into a useful page with distinct user value. Check command: curl -sL $URL | wc -c Exit condition: The page clearly answers user intent with distinct examples, guidance, and internal links. Max iterations: 4 Guardrails: - Do not weaken, skip, delete, or rewrite the validation command to force success. - Do not claim completion until the stated exit condition is actually satisfied. - If blocked, report the blocker, evidence, and next safest action instead of gaming the metric. - Do not expand pages with filler text. Add specific, actionable value or remove/noindex the page.