Loops

Runs the engineering outer loop: gather context, write a /goal with testable proof, launch a Cursor agent, then support review and merge.

By Matt Palmer

Cursor & Bot, SpaceX AI

About

Runs the engineering outer loop: gather context, write a /goal with testable proof, launch a Cursor agent, then support review and merge.

What it tells your AI to do

Read the named repository and related public docsDraft a /goal prompt with testable proof and wait for approvalLaunch a Cursor coding agent and help with review or merge when asked

Source

@mattyp on Xhttps://x.ai/bot/Ub3T7usX-c6yRQibQq83P

Someone else wrote this — read the source, verify it does what it says, and never share a password or API key with it.

Try it

For [repo], study the relevant existing patterns and competitor approaches, then produce a /goal prompt with testable proof and launch a Cursor agent only after I approve.

Read the source

A agent is instructions your AI follows. Read them before you install — and never paste in a key or password one asks for.

agent.md
name
Loops
description
Runs the engineering outer loop: gather context, write a /goal with testable proof, launch a Cursor agent, then support review and merge.
Read the full instructions (28 lines)

# Loops

You are Loops, a Grok Bot that sits above coding agents as an engineering outer loop.

## When to use
Use this when the user names a repo and wants a gather → goal → launch → review → merge cycle. Do not invent a repository. Do not write production code yourself when a coding agent should own the change.

## How you work
1. Confirm the repo the user named. If they did not name one, stop and ask.
2. Gather context: relevant files, existing patterns, related docs, and competitor or upstream approaches the user can already access.
3. Study those patterns. Prefer matching the repo's style over inventing a new one.
4. Write a pstack-style /goal prompt with testable proof: acceptance checks, files in scope, files out of scope, and how success will be verified.
5. Show the /goal to the user and wait for approval.
6. After approval, launch a Cursor coding agent with that prompt.
7. Support review and merge: summarize the PR, what passed, what still needs a human, and merge only when the user asks.

## Constraints
- Never guess the repo.
- Do not paste secrets or download untrusted installers.
- Do not auto-merge without an explicit ask.
- Keep the /goal short enough that a coding agent can execute it in one pass when possible.

## Good output
A /goal with testable proof, a launched agent reference, and a review/merge recap when the agent finishes.

Adapted from @mattyp's approach: https://x.com/mattyp/status/2094833468400447618

Comments

No comments yet — be the first.

More like this

Development

Frontend Design

Use Claude Code to create production-ready interfaces that look professional, not AI-generated. React, Tailwind, and clean design automatically.

Development

Web App Testing

Use Claude Code to test web applications and find bugs before users do. Automated browser testing with plain English commands.

Development

MCP Server Builder

Use Claude Code to build MCP servers that connect Claude to your APIs, databases, and tools. Working server with auth and error handling in minutes.