Loop/loopTestinghigh riskadvancedsafety C · 55Forward Futurepre-dates current gate · under review

Ground a feature before you build it

Anchor one small feature in the current code, APIs, data contracts, and tests before implementing and verifying the user path.

prompt
→ Claude
Implement one bounded feature slice in [repository]. Read project instructions, the current implementation, relevant services, types, UI, tests, and architecture notes before editing. Report the evidence, risks, affected files, persistence impact, and validation plan; stop for approval if inspection materially changes scope or reveals destructive, production, or silent-persistence behavior. Make the smallest change, preserve unknown data and unrelated work, run relevant checks, and manually verify user-facing states. Stop after this slice and return evidence, limitations, and the next recommended slice.
claude-code · codex

Use this when

Use this when a larger feature can be divided into small engineering slices and guessing about APIs, persistence, or user-visible behavior would create avoidable risk.

How it runs

  1. Read the project instructions and inspect the current implementation, dependencies, contracts, tests, and relevant architecture notes.
  2. State the evidence, risks, files in scope, user-visible behavior, persistence impact, and validation plan for one small slice.
  3. Stop for approval if inspection invalidates the approach or reveals a material scope, production, destructive, or silent-persistence change.
  4. Implement only the supported slice while preserving unknown fields, round-trip behavior, and unrelated work.
  5. Run the relevant repository checks and manually verify loading, error, stale, save, and cleanup states where applicable.
  6. Stop after the slice and return the evidence, changed behavior, limitations, and next recommended slice.

Done when

One feature slice works and its assumptions are proven by current evidence. The implementation matches observed APIs and data contracts, repository checks pass or have documented pre-existing failures, and the relevant user path is manually verified when one exists.

Why it works

Inspecting real contracts before coding prevents plausible but invented APIs or data behavior from shaping the implementation. Limiting each pass to one feature slice keeps review, verification, and persistence effects understandable.

Implementation note

Do not silently save user data, invent endpoints or data shapes, hide unavailable checks, or continue into another feature slice without approval. Keep previews honest about whether they show draft state or source-of-truth backend output.

Source: Forward Future

More testing loops

Stabilize flaky tests for good

Measure the flakiness, fix one root cause at a time, and stop after a defined streak of stable full-suite runs.

prompt
→ Claude
Run [test suite] [N] times under the same conditions and list tests whose result changes. Fix the most frequent flake at its root cause—shared state, timing, ordering, or an external dependency—never with a blind sleep or retry. Run that test [N] times, then rerun the full suite. Repeat until [N] consecutive full-suite runs pass, progress stalls, or approval is required. Return each flake, root cause, fix, evidence, and justified quarantine.
testingmedium riskclaude-codecodex

Build a todo CLI app with tests

Loop/ralphnew

Ralph autonomously builds a todo CLI application with comprehensive test coverage over multiple iterations until complete.

prompt
→ Claude
/ralph-loop "Build a todo CLI app with tests" --max-iterations 30
testinglow riskclaude-code

Kill flaky tests

Loop/loop

Run your test suite repeatedly, collect every intermittent failure, and fix or quarantine flaky tests until you get five consecutive green runs.

prompt
→ Claude
/loop run my test suite 20 times, collect every intermittent failure, fix or quarantine the flaky ones, and don't stop until you get 5 consecutive fully-green runs
testinghigh riskclaude-codecursor