Fix Until the Score Is 100
Hand the agent an outside scorer and a target. The number decides when the loop ends.
The prompt
"run npx react-doctor@latest and fix issues until you get a score of 100" (@ParthJadhav8)
Run it as a /goal so the agent keeps going across turns. @weswinder adds "do it properly without taking any shortcuts". Source: X/@weswinder, 2026-05-29 Aiden Bai's version changes the delivery: triage each issue, open one central draft PR, and stack verified fixes onto it. Source: X/@aidenybai, 2026-07-12
Why it works
An agent left to judge its own completion stops early. A deterministic doctor that prints a score gives it a stopping condition it cannot argue with, and each finding names a file and a rule, so every fix is small and checkable. The "no shortcuts" line matters because a score invites gaming: suppressing a rule raises the number without fixing anything. Stacking verified fixes on one draft PR keeps the result reviewable.
When to use it
- Any codebase with a doctor or linter that scores: React Doctor, Lighthouse, accessibility checkers, Kevin's own doctors.
- After a large agent-written change, before review.
Read the diff for suppressions and disabled rules before merging. A 100 reached by turning checks off is a 0.
Which skill runs it
react-doctor runs React Doctor and React Security Doctor and drives the score to 100. The general form is the Doctor Pattern; doctor-enforcement picks the right doctors for an edit.
Metric thresholds as the score
When no single doctor exists, a set of thresholds can be the scorer: cyclomatic and cognitive complexity under 22, Halstead difficulty under 80, files under 500 lines, 100% test coverage, CRAP under 25, zero surviving mutants, zero dead or redundant code, and no any or unknown types. interlinked-cli enforces rules like these through agent hooks. Source: X/@QuentinCody thread, 2026-08-30; Source: QuentinCody/interlinked-cli
A complexity limit alone does a lot: turning on Oxlint's cyclomatic-complexity rule made the agent re-read and refactor one function from 91 decision paths to 12, with better results more than 90% of the time in @bentlegen's use. Source: X/@bentlegen thread, 2026-08-26
Outside code
The same loop works on a home network: "/goal make my WiFi coverage the best it can possibly be", with access to the access points and a laptop to measure signal, and "don't stop until coverage is ideal". The agent found a misconfigured access point broadcasting a slow network and underpowered PoE injectors. The measurement is the score. Source: X/@rowantrollope thread, 2026-08-11
A Lighthouse score for anything
evlog map scores an app's observability the way Lighthouse scores performance: it scans every entry point, flags gaps such as a payment endpoint with no audit trail or PII that needs masking, writes JSON for agents to act on, and commits a versioned map so CI can gate on --min-score and catch regressions against a baseline. Any check that can print a score can drive this loop. Source: X/@hugorcd, 2026-07-29; Source: evlog.dev
A latency target as the score
Boris Cherny's version for performance work: tell the model to use a dynamic workflow to get p95 latency under 300 ms, not to stop until done, and to use a profiler. The target is the stopping condition and the profiler is the evidence. Source: X/@bcherny, 2026-07-23
The shortest version: "/goal fix my github actions". CI is the score. Source: X/@HamelHusain, 2026-07-18
Timeline
- 2026-11-03 | Page created from the React Doctor goal-loop prompts. Source: X bookmarks, 2026-05-27 to 2026-07-12