A practical loop-engineering kit for vibe coders who use AI agents and still want clean, reviewed, shippable work.
Built by Mustafa
Instagram: @mustafaiscoding · X/Twitter: @mustafa30
Prompting an AI coding agent one task at a time works until the project gets real.
Then you need a loop.
A loop is a repeatable system that tells the agent what to watch, what context to keep, what it can change, how to verify the work, and where it must stop for you.
This repo is a builder-friendly version of that idea. Less theory. More shipping.
| Part | What it means | Good default |
|---|---|---|
| Goal | the outcome the loop is trying to produce | one sentence, user-visible |
| State | durable memory outside the chat | STATE.md, issues, PR notes |
| Run | where the agent does work | branch or worktree |
| Verify | proof the work is real | tests, lint, screenshots, curl, review |
| Gate | where risky work stops | human approval before merge/deploy/delete |
| Learn | what gets written back | short notes, not a diary |
| Level | Name | The agent can | The agent cannot |
|---|---|---|---|
| L1 | Report only | inspect, summarize, recommend | edit files, comment, commit |
| L2 | Assisted PRs | branch, edit safe files, run checks, open PRs | merge, deploy, touch secrets |
| L3 | Trusted chores | run allowlisted actions with logs and rollback | improvise outside policy |
Most projects should start at L1. L3 is not the flex. A calm repo is the flex.
Copy the loop files into your project:
git clone https://github.com/mustafa3252/vibe-loop-engineering.git
cd vibe-loop-engineering
cp templates/LOOP.md /path/to/your/project/LOOP.md
cp templates/STATE.md /path/to/your/project/STATE.mdOr install the skills with the open skills CLI:
npx skills add mustafa3252/vibe-loop-engineering --allList the included skills:
npx skills add mustafa3252/vibe-loop-engineering --listStart with a daily hygiene report. It is useful and low risk.
Use the loop-brief and state-keeper skills.
Loop: daily hygiene
Level: L1 report-only
Goal: summarize repo health and recommend the next smallest useful action.
Inputs: open issues, open PRs, failing checks, TODOs, recent commits.
Allowed actions: read only.
Never do: edit files, comment on GitHub, create branches, deploy, delete anything.
Done means: a short report with evidence and one recommended next action.
| Skill | Use it for |
|---|---|
loop-brief |
turning a vague automation idea into a safe loop brief |
state-keeper |
keeping STATE.md short, useful, and current |
loop-auditor |
checking whether a loop is safe enough to run |
launch-loop |
polishing docs, demos, screenshots, and launch copy before release |
| Pattern | Start level | What it does |
|---|---|---|
| Daily hygiene | L1 | reports repo health and next actions |
| PR babysitter | L1 | watches PRs and explains blockers |
| Bug replay | L2 | creates a reproduction before a fix |
| Launch polish | L2 | cleans README, examples, screenshots, and release copy |
| Dependency scout | L1 | reviews update risk without blind upgrades |
| Content loop | L1 | turns shipped work into posts and devlogs |
| File | Why it exists |
|---|---|
templates/LOOP.md |
tells agents what loops are allowed |
templates/STATE.md |
stores tiny project memory |
templates/loop-report.md |
keeps reports short and comparable |
examples/github-actions/daily-hygiene.yml |
example scheduled L1 loop |
examples/prompt.md |
copy-paste prompt for your first run |
- Start report-only.
- Put secrets, auth, billing, deploys, deletes, and migrations behind a hard human gate.
- Prefer branches and PRs over direct commits.
- Require evidence in every report.
- Kill loops that create noisy work.
- Keep state short enough that the next agent will actually read it.
# Daily hygiene report
Status: yellow
Evidence:
- CI failed on PR #42 because `npm test` timed out.
- 3 issues have no labels.
- README install command still references the old package name.
Recommended next action:
Open one docs-only PR that fixes the README install command.
Do not automate yet:
CI timeout needs a human look before retries are useful.This is not a giant automation framework. It is a tastefully small set of rules, templates, graphics, and skills for people building with AI agents right now.
The focus is not “more autonomy.” The focus is better loops:
- smaller scope,
- clearer state,
- better proof,
- cleaner handoffs,
- more human control where it matters.
Built with taste by Mustafa.
- Instagram: @mustafaiscoding
- X/Twitter: @mustafa30
If this helps you ship cleaner with AI, star the repo and tag me with what you built.
This repo is an original Mustafa-branded take on agent loop workflows. It was inspired by public discussion around loop engineering and by Cobus Greyling's open-source loop-engineering project, but the content, graphics, templates, and skills here are written for our Vibe Ship workflow.
MIT. Use it, remix it, and ship something useful.