Productivity Architecture Lab

The Prompt-and-Retry Loop Simulator

Scenario:
Codebase Mutation & Hypothesis Tree Cycle Step: 4 / 4
142
Lines Churned
24/100
Codebase Health
15%
Comprehension
+2
Foreign Packages
Active AI Code Diff p-retry wrapper
Terminal / Runtime Trace
Accidental Complexity Trap
Repeated error paste prompts added foreign packages (p-retry, lodash.debounce) and wrapped asynchronous race conditions in arbitrary delays without addressing token lock exhaustion.
ROOT CAUSE NOT IDENTIFIED

1. The Invariant Principle

Before prompting the model with an error string, state the specific system invariant in your own words. If you cannot explain the pre-condition, the AI tool will patch symptoms by creating ad-hoc wrappers.

2. Stop at 2 Retries

If an AI re-prompt does not resolve the bug on attempt two, freeze all generative edits immediately. Revert to HEAD and log real thread traces or reproduction unit tests before re-engaging.

3. Zero-Package Rule

Forbid generative fixes that introduce foreign npm dependencies (`p-retry`, `async-mutex`, `p-queue`) to solve internal architecture races unless explicitly verified as an architectural decision.

Enjoy this tool? Build your own with Super