Data Storage
CODEBLOCK0
Create on first use: INLINECODE0
Scope
This skill:
- - ✅ Runs iterative attempts toward defined success criteria
- ✅ Logs each iteration with learnings
- ✅ Exits on success, max iterations, or unrecoverable error
- ❌ NEVER makes Git commits automatically
- ❌ NEVER deploys to production
- ❌ NEVER modifies system configuration
- ❌ NEVER runs indefinitely (max 10 iterations hard limit)
Quick Reference
| Topic | File |
|---|
| Loop examples | INLINECODE1 |
| Memory between iterations |
memory.md |
Core Rules
1. Pattern
CODEBLOCK1
2. Required Setup
| Element | Required | Example |
|---|
| Task | Yes | "Fix failing tests" |
| Success criteria |
Yes | "All tests pass" |
| Max iterations | Default: 5 | Max: 10 |
| Verify command | Recommended |
npm test |
3. When to Propose
- - Task has clear success criteria but uncertain path
- Previous attempt failed but error is fixable
- User says "keep trying until..."
NOT for: One-shot tasks, undefined goals, exploratory work
4. Each Iteration
- 1. Fresh context — Only carry: task, criteria, count, learnings
- Execute — Attempt the task
- Verify — Check success criteria
- Record — Append to history: what worked, what failed
- Decide — Pass? Exit. Fail? Retry if under limit.
5. Stopping Conditions
- - ✅ Success criteria met
- ❌ Max iterations reached
- ⚠️ Unrecoverable error (missing dependency, permission denied)
6. On Failure
If max reached without success:
- - Summarize all attempts
- Identify common failure pattern
- Recommend manual intervention or different approach
7. Safety
- - Hard limit: 10 iterations maximum
- No destructive actions without explicit per-action approval
- Log everything to ~/loop/history/