AAWEA.ORG
AAWEA.ORG
AAWEA.ORG
Debugging Manual trigger πŸ‘‘ Official πŸ›‘ Hardened

Reflexion Debug Loop

On each failed repro attempt, write a short reflection to disk, then retry with that memory β€” avoids repeating the same wrong fix.

πŸ‘ 1,357 views πŸ“₯ 1,200 installs πŸ‘€ by loops!
Download loop
Share Now
Manual start
↓
  1. 1
    Reproduce bug

    Run the minimal repro steps or failing test. Capture exact error output.

    > npm test -- --testNamePattern=<failing-test>
  2. 2
    Reflect on failure

    Append to .loops/reflexion.md: what you tried, what failed, and one hypothesis to avoid next pass.

  3. 3
    Apply targeted fix

    Read reflexion.md. Apply a different fix than prior attempts. Prefer root cause over symptoms.

↓
βœ“
Exit condition: tests_pass

Previously failing test passes

> npm test -- --testNamePattern=<failing-test>
πŸ“¦ Install Files
These files are included when you download the loop.
πŸ“„ .loops/reflexion.md
# Reflexion log

Each failed attempt gets one short entry: what was tried, what failed, what to try differently.

## Attempts
πŸ“Š Flow Diagram
flowchart TD Start(["Manual start"]) Start --> S0 S0("Reproduce bug") S1("Reflect on failure") S0 --> S1 S2("Apply targeted fix") S1 --> S2 Exit{"Previously failing test passes"} S2 --> Exit Exit -- "No" --> S0 Exit -- "Yes" --> Done(["Success"]) style Exit fill:#fffbeb,stroke:#f59e0b,stroke-width:2px,color:#92400e style Done fill:#ecfdf5,stroke:#10b981,stroke-width:2px,color:#065f46
Kickoff prompt
Start the "Reflexion Debug Loop" loop.

Goal: the failing test or repro passes
Max iterations: 8
Between iterations run: npm test -- --testNamePattern=<failing-test>
Exit when: the repro test exits 0

Step 1: Reproduce the bug. If it fails, append a reflection to .loops/reflexion.md before trying a new fix.

Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
Anti-gaming rules
Rules the agent must follow so it cannot cheat the exit condition.
  • Do not modify the check command or exit criteria to force success
  • Do not skip, disable, or bypass checks to pass the exit condition
  • If stuck after several iterations, stop and report blockers instead of gaming metrics