Goal-Driven Autonomy
Set a goal with --goal so the run loop checks the target when the agent tries to stop. The current code has Goal Store, Goal Gate, and a 12 re-entry cap. Full independent LLM Judge integration is still pending.
Usage
bash
swust-code run --goal "fix all TypeScript errors" "start working"How It Works
- User sets a goal
- Agent begins working
- When agent tries to stop, Goal Gate triggers
- Goal Gate calls an evaluator
- If goal not met: injects synthetic message, agent continues
- If goal met or impossible: stops normally
Goal Judge
The intended evaluator returns { ok, impossible, reason }.
ok=trueclears the goal and stopsimpossible=trueclears the goal and stops- Otherwise the loop injects a
<system-reminder>and continues
In the current core runner, the evaluator is still a placeholder returning Judge not yet integrated. The --goal option exists, but the final judgment quality depends on the pending Judge wiring.
Re-entry Control
| Role | Max Re-entries |
|---|---|
| Main Agent | 12 |
Task Gate
taskGate() can force continuation when non-terminal tasks exist. The current runner still passes an empty task list, so wiring real todowrite state remains pending.