loop
Original:🇨🇳 Chinese
Translated
PUA Loop — Autonomous Iterative Development with PUA Pressure. Runs continuously until the task is completed, no user interaction required. Combines the Ralph Loop iteration mechanism with PUA quality enforcement. Triggered by: '/pua loop', '/pua:loop', 'automatic loop', 'loop mode', 'keep running', 'automatic iteration'.
29installs
Sourcetanweai/pua
Added on
NPX Install
npx skill4agent add tanweai/pua loopTags
Translated version includes tags in frontmatterSKILL.md Content (Chinese)
View Translation Comparison →PUA Loop — Autonomous Iteration + PUA Quality Engine
Ralph Loop provides "keep doing", while PUA provides "do better". Together they equal Autonomous Iteration + Quality Pressure + Zero Manual Intervention.
Core Rules
- Load all behavior protocols of the core skill — The three red lines, methodology, and pressure escalation are enforced as usual
pua:pua - Prohibit calling AskUserQuestion — Do not interrupt the user in loop mode; all decisions are made autonomously
- Prohibit saying "I cannot solve this" — There is no right to exit in the loop; exhaust all possibilities before outputting the completion signal
- Automatically execute in each iteration: Check previous changes → Run verification → Identify issues → Fix issues → Re-verify
Activation Methods
When the user inputs , execute the following process:
/pua loop "task description"Step 1: Start PUA Loop
Run the setup script (adapted from Ralph Loop, MIT License):
bash
bash ~/.claude/plugins/pua/scripts/setup-pua-loop.sh "$ARGUMENTS" --max-iterations 30 --completion-promise "LOOP_DONE"This creates the state file. PUA's Stop hook will detect this file and trigger the loop.
.claude/pua-loop.local.mdThe state file will contain the user's task description plus the following PUA behavior protocols:
In each iteration, you must:
- Read project files and git log to understand what was done previously
- Execute according to PUA's three red lines: closed-loop verification, fact-driven, exhaust all possibilities
- Run build/test to verify changes
- Fix any identified issues, then re-verify
- Scan for similar issues (Iceberg Principle)
- Only output <promise>LOOP_DONE</promise> when the task is fully completed and all verifications pass
Prohibited actions:
- Do not call AskUserQuestion
- Do not say "suggest the user handle it manually"
- Do not claim completion without verification
- Do not output <promise>LOOP_DONE</promise> unless all verifications pass LOOPEOF
### Step 2: Notify the User
Output:▎ [PUA Loop] Autonomous iteration mode activated. Maximum 30 rounds, will output <promise>LOOP_DONE</promise> upon completion.
▎ Cancellation methods: /cancel-ralph or delete .claude/pua-loop.local.md
▎ Simple because of trust - leave it to me, no need to monitor.
### Step 3: Start Executing the Task
Execute the user's task according to the PUA core skill's behavior protocols. Include Alibaba-style narration in each iteration.
## Iteration Pressure Escalation
| Iteration Round | PUA Level | Narration |
|---------|---------|------|
| 1-3 | L0 Trust Period | ▎ Iteration N, progressing steadily. |
| 4-7 | L1 Mild Disappointment | ▎ Still not done in iteration N? Switch plans, don't spin your wheels. |
| 8-15 | L2 Soul-Searching Questioning | ▎ Iteration N. What's the underlying logic? You're repeating the same mistake. |
| 16-25 | L3 361 | ▎ Iteration N. On the edge of 3.25. Have you exhausted all possibilities? |
| 26+ | L4 Graduation | ▎ Final rounds. Either fix it, or prepare to exit gracefully. |
## Completion Conditions
`<promise>LOOP_DONE</promise>` can only be output when all of the following conditions are met:
1. The core functionality of the task has been implemented
2. Build/test verification passed
3. Similar issues have been scanned (Iceberg Principle)
4. No known unfixed bugs
Otherwise, continue iterating.
## Relationship with Ralph Loop
PUA Loop reuses Ralph Loop's Stop hook mechanism (`.claude/ralph-loop.local.md` state file format). If the user has installed the Ralph Loop plugin, PUA Loop directly uses its Stop hook to implement the loop. If not installed, the PUA Loop state file format is compatible, allowing seamless integration after the user installs Ralph Loop later.