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

Autoloop TDD

Test-first loop: write a failing test, implement the minimum code to pass, refactor, and repeat.

πŸ‘ 1,590 views πŸ“₯ 1,556 installs πŸ‘€ by loops!
Download loop
Share Now
Manual start
↓
  1. 1
    Write failing test

    Write a focused test for the next behavior. Run it and confirm it fails for the right reason.

    > npm test -- --testPathPattern=<new-test>
  2. 2
    Implement minimum code

    Write the smallest implementation that makes the new test pass. No extra features.

  3. 3
    Verify green

    Run the new test and full suite to confirm everything passes.

    > npm test
  4. 4
    Refactor

    Clean up duplication and naming while keeping tests green. Run tests after each refactor.

    > npm test
↓
βœ“
Exit condition: tests_pass

Target behavior covered by tests and full suite passes

> npm test
πŸ“Š Flow Diagram
flowchart TD Start(["Manual start"]) Start --> S0 S0("Write failing test") S1("Implement minimum code") S0 --> S1 S2("Verify green") S1 --> S2 S3("Refactor") S2 --> S3 Exit{"Target behavior covered by tests and full suite passes"} S3 --> 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
Run "Autoloop TDD" in your agent
Prompt only
Deeplinks and "Open in Cursor" only paste the kickoff prompt. They do not install hook files β€” your agent cannot tell whether files are on disk until you add them yourself.
Two separate pieces
  • Kickoff prompt β€” tells the agent the goal, check command, exit condition, and how to self-pace.
Kickoff prompt
Start the "Autoloop TDD" loop.

Goal: implement the target behavior test-first with a green suite
Max iterations: 12
Between iterations run: npm test
Exit when: target behavior is covered and all tests pass

Step 1: Write a failing test for the next behavior, implement the minimum code to pass, refactor, and repeat.

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