Goal System

Goals are persistent objectives that survive across sessions. They give the agent long-term direction, require evidence-backed checkpoints, and can trigger bounded continuation runs with budget tracking.

Agent pause gate

AI-initiated goal pause --agent --audit uses a two-tap audited gate. After the first audited pause attempt, the goal stays active but exposes derived pauseGate: { armed: true, reason: "pause_gate_pending" } on status/API surfaces. While armed, automatic goal continuation is suppressed (goal_pause_gate_pending SSE event). A productive checkpoint clears the gate; a second audited pause fully pauses the goal.

Goal Lifecycle

A goal moves through these states: plan-mode pending, active, paused, done, or cancelled. Goal state is durable -- restarting the server preserves it.

CLI Commands

# Set a new goal
jaw goal set "Migrate the auth module to JWT tokens"

# Start from a hint, then refine before checkpoints are accepted
jaw goal plan "Make the desktop release self-contained"
jaw goal refine "Ship self-contained Electron desktop artifacts with sidecar and CI evidence"

# Check goal status
jaw goal status

# Record evidence-backed progress
jaw goal update "Sidecar bundle implemented" --evidence "npm run sidecar:bundle passed"

# Pause or resume the current goal
jaw goal pause
jaw goal resume

# Mark goal as done
jaw goal done

# Cancel or reset goal state
jaw goal cancel
jaw goal reset

Slash Commands

CommandDescription
/goal set <objective>Set a new goal objective
/goal plan [hint] / /goalplan [hint]Create a plan-mode goal with the raw hint stored separately as planHint
/goal refine <objective>Finalize the specific durable objective before checkpoints are accepted
/goal statusShow current goal state
/goal update <summary>Add a checkpoint with implementation/documentation/verification evidence
/goal run startStart a bounded auto-continuation run with budget tracking
/goal run stopStop the current goal run
/goal pausePause the goal
/goal resumeResume a paused goal
/goal doneMark the goal as completed
/goal cancelCancel the goal
/goal clearClear goal state
/goal resetFull reset

Goal Run (Auto-Continuation)

The /goal run start command begins a bounded auto-continuation session. The agent works toward the goal objective, automatically continuing after each response until the goal is marked done or the run is stopped.

Budget enforcement is currently tracking-only. The system tracks run duration and continuation count but does not yet enforce hard budget limits.

Goal Mode Rules

These rules are delivered to the agent exclusively by the goal-continuation prompt (src/goal/heartbeat.ts) on every goal-active turn. The boss system prompt keeps only the goal CLI command list plus a pointer (single-owner design, 2026-06-10 slim).

API Endpoints

MethodPathDescription
GET/api/goalGet current goal state
GET/api/goal/historyGet goal history
POST/api/goalSet, update, complete, cancel, pause, or resume a goal
GET/api/goal-runGet current goal-run state
GET/api/goal-run/preflightPreflight check before starting a run
POST/api/goal-runStart, pause, resume, or stop a goal run

Runtime Events

Goal lifecycle changes emit runtime events. The Web UI receives them through GET /api/events SSE first, with WebSocket fallback on legacy servers:

Goal + PABCD Integration

Goals work alongside PABCD orchestration, but an active goal has priority over phase gates. In goal mode, PABCD transition commands still record state, but the agent does not stop at P/A/B/C/D boundaries unless it needs a real external decision or must pause after an independent blocked audit.

Try it:
  • 이 목표 설정해줘
  • 목표 완료 처리해줘
  • 목표 상태 보여줘