← knowledge.oriz.in

Feedback loop quality is the ceiling of AI code quality

rule rulesagenttestingfeedbackquality

Feedback loops are the ceiling

Iron law

AI max output quality = repo feedback-loop quality. No exceptions.

Broken/slow tests → AI codes blind → hallucinates fixes → ships bugs. Agent has no signal for correctness. Guesses instead of verifies.

Bootstrap sequence (any new/joined repo)

Before agent writes ONE line of feature code:

Step Command Pass criteria
1 pnpm test Runs. Passes. <60s.
2 pnpm typecheck Runs. Clean. <30s.
3 pnpm lint Runs. Clean. <15s.
4 Local dev server Hot-reload works.

ANY answer "no" → fix loops FIRST. No feature work until green + fast.

Corollary

Adding tests ≠ busywork. Raises AI's ceiling for that module. Investment compounds — every future agent turn on that module gets stronger signal.

Applies especially: mature codebases, forks (see [[forks-as-submodules]] — upstream loops may already be broken; fix in fork main, upstream PR the fix).

Anti-patterns

Enforcement

New session on unfamiliar repo → first 5 min = loop audit, not code. Report loop status before proposing changes.

Source

Matt Pocock workshop 2026-07-03.

Cross-refs