Loop/loopTestingmedium riskintermediatesafety B · 80Forward Future

Trim what loads before first paint

Reduce the data downloaded before the first screen appears, with tests and screenshots guarding behavior and appearance.

Prompt
→ Claude Code
Reduce the data [web app] downloads before its first screen appears. First record passing tests, mobile and desktop screenshots, and compressed transferred bytes—the data actually downloaded. Use the build report only to suggest candidates. Defer, compress, or remove one item, then rebuild and rerun every check. Keep it only if tests pass, screenshots are pixel-identical, and bytes decrease; otherwise revert. Stop when no safe candidate remains, progress stalls, or approval is needed. Return measurements, changes, and untested states.
claude-code · codex

Use this when

Use this when a web app feels heavy on its first visit because it downloads too much code, styling, media, or other data before showing the initial screen.

How it runs

  1. Before changing code, record passing tests, representative mobile and desktop screenshots of the first screen, and a repeatable baseline for compressed transferred bytes—the amount actually downloaded.
  2. Use a build or bundle report to find large or early downloads, then choose one safe candidate to delay until needed, compress, inline, or remove.
  3. Rebuild and rerun the same tests, screenshots, and download measurement; keep the change only when every gate passes and bytes decrease, otherwise revert it completely.
  4. Repeat until no safe candidate remains, several attempts produce no improvement, the measurement is unreliable, or the next change needs approval.

Done when

✓ The first screen downloads less data without a tested behavior or pixel changing. The same production-like measurement reports fewer downloaded bytes, existing tests pass, every representative screenshot is pixel-identical, and uncertain dependency removal remains approval-gated.

Why it works

Recording behavior and screenshots before the first change prevents a broken screen from becoming the new normal. One download change per round also makes it clear which edit saved bytes and makes a failed attempt easy to undo.

Implementation note

Measure compressed transferred bytes—the amount sent over the network—not the larger source files developers read. Screenshots protect only the states they capture, so include logged-out, logged-in, empty, error, or other relevant first screens before trusting a risky change.

Source: Forward Future ↗graded B · 80/100 — how grades work (Safety Score v2) →

/goalTestingmedium risk

Fix the flaky checkout test

Run checkout tests repeatedly until 20 consecutive passes, logging failure modes and hypotheses after each iteration.

prompt
→ Claude Code
/goal Reproduce and fix the flaky checkout test so it passes 20 consecutive runs, verified by npm test -- checkout, while preserving checkout API behavior and existing correctness tests. Use the checkout test files, checkout service code, fixtures, and related logs. Between iterations, record the observed failure mode, hypothesis, change, and rerun result. If reproduction stays unavailable or valid paths are exhausted, stop with reproduction attempts, logs, most likely absent condition, blocker, and next input needed
/goalTestingmedium risk

Reach a coverage target

Add focused tests for the least-covered files and re-measure each turn until coverage hits 80 percent or the turn cap.

prompt
→ Claude Code
/goal test coverage is at least 80% with all tests passing — add focused tests for the least-covered files, re-run coverage each turn, stop at the threshold or after 12 turns
/loopTestinghigh risknew

The product contract conformance loop

A requirements-conformance workflow that turns a product contract into a ledger, checks current evidence, and repairs only confirmed mismatches with regression coverage.

prompt
→ Claude Code
Audit the project against the supplied product contract. Extract every concrete product promise, business rule, permission rule, background job expectation, user workflow, non-goal, and quality bar into a requirement ledger. For each requirement, find current evidence in code, config, tests, docs, jobs, migrations, routes, UI, prompts, queues, or production-safe runtime state. Mark it proved, weak, contradicted, unimplemented, not applicable with reason, or blocked. Fix only confirmed high-impact mismatches one bounded slice at a time, preserving unrelated work and adding regression coverage where practical. Stop when every requirement is proved or honestly classified and the ledger has no silent gaps.