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
Refactor auth module, pass tests
Refactor the authentication module iteratively until all tests pass, stopping after ten attempts.
/goal "Refactor auth module until all tests pass" --max-iterations 10
refactoringlow risk
Migrate an API import by import
Sweep a codebase from a legacy API to its v2 replacement with tests and typecheck as the safety net, capped at 30 turns.
/goal every file importing from `./legacy-api` now imports from `./v2-api`, all tests pass, and `npm run typecheck` is clean — stop after 30 turns
refactoringmedium risk
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.
refactoringmedium risk