Complete the task, ship it
Work autonomously through subtasks, verify lint and tests pass, then commit and push to main until done.
# Persistent Task Loop Task: $ARGUMENTS --- ## Loop Protocol You are in a persistent development loop. Work autonomously until the task is 100% complete. ### Each Iteration: 1. Assess - Track subtasks with the task tools (TaskCreate/TaskUpdate — TodoWrite no longer exists) - Check current state: git status , test results - Identify what remains 2. Execute - Do the next step - Follow the auto-loaded MeshForge rules (CLAUDE.md + .claude/rules/security.md ) - Walk .claude/rules/honest failure modes.md over every error path you write - Write tests for new functionality 3. Verify — capture real exit codes; never judge from truncated streams bash python3 scripts/lint.py --all 1>/tmp/lint.log 2>&1; echo LINT EXIT=$? python3 -m pytest tests/ -q 1>/tmp/pytest.log 2>&1; echo TEST EXIT=$? tail -5 /tmp/pytest.log 4. Continue - If not done, loop back to Assess - Mark completed tasks as you go --- ## Exit Conditions ALL must be true: - [ ] Task is 100% complete - [ ] scripts/lint.py --all exits 0 - [ ] All tests pass (exit code 0, not a "passed" line in a truncated stream) - [ ] Changes committed on main (solo workflow — PR/feature-branch flow retired 2026-04-19) - [ ] Pushed: git push origin main (then pull the fleet boxes) --- ## MeshForge Context Key paths: src/ (source) · tests/ · src/gateway/ · src/launcher tui/ · src/utils/ Security rules are auto-loaded from .claude/rules/security.md — don't restate, just follow them (lint + pre-commit hook enforce). --- ## Completion Signal When ALL exit conditions verified: <promise>DONE</promise> Do NOT output the promise until fully verified complete. --- "I'm in danger!" - Ralph Wiggum (but you're not, keep looping
claude-code
Source: Nursedude ↗graded B · 75/100 — how grades work →
More refactoring loops
Tidy code, one safe change at a time
Prove one small cleanup is safe, make the smallest useful change, and keep it only after existing checks pass.
Review [repository or code project] for dead code, meaning unreachable or unused code; stale files or comments; unused dependencies; duplication; broken links; inconsistent names; and confusing structure. Protect unrelated, active, uncommitted, generated, and uncertain work. Prove one low-risk cleanup, make the smallest coherent change, then rerun the build, tests, runtime checks, and diff review. Keep only verified improvements. Stop when none remain, progress stalls, verification is unavailable, or approval is required. Return changes, evidence, and deferred candidates.
Convert codebase to TypeScript
Refactor all files to TypeScript and run tests until the full suite passes.
/ralph-loop "Refactor codebase to use TypeScript. Output COMPLETE when all files converted and tests pass." --completion-promise "COMPLETE" --max-iterations 100
Repair React issues in small batches
Baseline the scan, fix a small batch of real errors or warnings, and verify each change improves it without regressions.
Run `pnpm exec react-doctor . --verbose --yes --offline --fail-on none` to record the baseline, then rerun with `--fail-on error`. Fix at most five genuine findings, run the same scan and relevant project checks, and keep only verified improvements. Clear errors before high-confidence warnings. Stop when clean, blocked, approval is required, a finding is false-positive, or another pass makes no measurable progress. Finish with baseline and final results, retained fixes, reverted attempts, checks, and remaining findings.