Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Goal-oriented autonomous loop with external completion oracle. Keeps iterating until verifiable stopping conditions are met, checked by a separate model.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | -8% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 49% | 0% |
| case-08 | ✗→✓ | ▲ Improved | -12% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 2% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 104% | 0% |
Goal-oriented autonomous loop with external completion oracle. Based on Addy Osmani's Loop Engineering principle: "Keep going until a verifiable stopping condition holds, with a separate small model checking completion."
/goal command/triage act <id> goalThe model that wrote the code is too nice grading its own homework. A second model (the oracle) with different instructions and READ-ONLY tools catches what the first talked itself into.
Maker (primary model, full tools)
│
▼ produces iteration output
│
Oracle (different model, read-only)
│
├─ ALL conditions pass → CONVERGE (goal done)
├─ Some fail + budget remains → nextHint → LOOP (maker iterates)
└─ Budget exhausted → ESCALATE (triage inbox)CREATE → ACTIVE → [iterate] → CONVERGED
│
├──── PAUSED (manual /goal pause)
└──── ESCALATED (budget exhausted or repeated failure)States:
active: Maker-oracle loop is runningpaused: Manually paused, resumes with /goal resumeconverged: All stopping conditions met, goal completeescalated: Cannot converge within budget, needs human triagefailed: Explicitly abandonedEach goal has one or more stopping conditions. ALL must pass for convergence.
| Type | Command Pattern | Example | |------|----------------|---------| | test_pass | Test runner exits 0 | npm test | | lint_clean | Linter exits 0 | npm run lint -- --quiet | | coverage_threshold | Coverage >= N% | npm test -- --coverage | | build_pass | Build succeeds | npm run build | | custom_command | Any command exits 0 | grep -r "TODO" src/ \| wc -l |
The oracle receives:
The oracle returns:
json{ "converged": false, "conditionResults": [ {"type": "test_pass", "passed": false, "output": "2 tests failing"}, {"type": "lint_clean", "passed": true, "output": ""} ], "reasons": ["2 tests still failing in auth module"], "nextHint": "Focus on src/auth/refresh.test.ts — the token expiry mock is stale", "confidence": 0.85 }
Three budget dimensions, any exhaustion triggers escalation:
| Dimension | Default | Rationale | |-----------|---------|-----------| | Iterations | 15 | Prevents infinite loops | | Wall time | 2h | Bounds real-world duration | | Cost (USD) | $10 | Prevents runaway API spend |
On escalation, the goal:
~/.claude/goals/{goalId}.jsonescalatedGoals survive session restarts:
SessionEnd hook serializes active goalsSessionStart hook detects active goals and notifies user/goal resume re-enters the loop with oracle's last nextHintState file: ~/.claude/goals/{goalId}.json (follows schemas/goal.schema.json)
/heartbeat: Auto-creates goals from scan failures/triage: Escalated goals land in triage; triage items can become goals/checkpoint: Each iteration implicitly checkpoints/verify: Oracle internally uses verification patternswave-execution: Multiple goals can run in parallel wavesrework-loop: Failed iterations trigger blame-attributed reworkUser: /goal "make all tests pass"
System infers:
objective: "make all tests pass"
stoppingConditions: [{type: "test_pass", command: "npm test"}]
budget: {maxIterations: 15, maxDuration: "2h", maxDollars: 10}
oracle: {model: "haiku"}
Iteration 1:
Maker: reads test output, fixes obvious import error in auth.ts
Oracle: runs `npm test` → 1 test still failing → {converged: false, nextHint: "..."}
Iteration 2:
Maker: fixes token refresh logic based on oracle hint
Oracle: runs `npm test` → all pass → {converged: true}
Result: CONVERGED in 2 iterations, $0.45 spentOther measured skills in the registry, with their headline benchmark lift.