AIniverse Get the App

Guardrails Learning Loop

Automation by loops! by elorm

When a check fails twice the same way, append a guardrail sign to .ralph/guardrails.md so the next iteration avoids repeating it.

Prompt

Step 1 — Read guardrails
Read .ralph/guardrails.md before any work. Treat each sign as a hard constraint.

Step 2 — Run checks
Run the project's backpressure commands.

Check: `npm test && npm run lint`

Step 3 — Record failure sign
If the same error occurred before, append a concise sign to guardrails.md: what failed and how to avoid it.

Step 4 — Fix with guardrails
Apply a fix that respects all guardrail signs. Do not repeat prior failed approaches.

Step 5 — Repeat until done
Repeat the steps above until: Checks pass and no repeated failure pattern remains

Check with: `npm test && npm run lint`

Stop after 12 iterations and report what is blocking.
Platforms
CHATGPTCLAUDE

Use this prompt in AIniverse

Tap to copy, run it on ChatGPT / Claude / Gemini, save to your stack, or remix.

Open in App

More Automation prompts

Security Audit Weekly

Weekly npm audit scan, triage vulnerabilities by severity, and propose or apply safe patches.

Knip Until Clean

Find and remove dead exports, unused files, and orphan dependencies — loop until knip reports clean.

Ship PR Until Green

Implement on a branch, run tests, push, open a PR, wait for CI, and loop until checks pass and the PR is ready to merge.

Ralph Story Executor

Fresh-context loop: pick one incomplete story from prd.json, implement it, run backpressure checks, commit, and updat...