Goal Mode And AFK
Long-running phase execution through one active goal that goalify writes and activates
Goal mode is for bounded absence.
The operator gives the agent one durable objective, enough context to survive compaction, proof, and concrete stop conditions. The run can be unattended because its boundaries are explicit.
/goal is the outer execution mode. AFK names an unattended run; delivery-phase defines it in its ## AFK section: the human starts delivery and is away until it stops. $goalify writes the goal and activates it immediately, then keeps working under it. The phase that the goal names owns the lifecycle slice inside it, for example delivery, debugging, review, docs ingest, or debt resolution.
Goal Contract
$goalify reads the supplied handoffs, specs, issues, logs, and scoped repo guidance. It reduces the request to one objective and writes the smallest /goal contract that can run without re-asking. The contract holds only:
- objective: one outcome;
- context: exact paths, issues, URLs, logs, artifacts, and constraints;
- workflow: terse checkpoints with named skills, tools, or phases;
- proof: commands, scenarios, artifacts, logs, or other done evidence;
- stop: the done condition, early-stop blockers, and the final report expectation.
The contract is pointer-heavy and has no secrets and no vague "make it work". It has at most 4,000 characters after /goal. It is not a replacement spec or a transcript. Invoking $goalify is permission to create the active goal now.
If the run needs a human decision to continue, that is a blocker. The run reports it and does not invent the decision. A delivery goal is the exception: inside AFK delivery-phase, the run settles each such decision as an Autonomous Decision, posts each out-of-bounds one to the thread at once, and stops early only for missing access.
Goals That Run Delivery
$delivery-phase is explicit-only, so the goal workflow must name it. The goal must also ask for end-to-end delivery. Only that wording selects Full Delivery, which continues through every phase to closeout. Resume wording alone does not grant Full Delivery continuation; such a goal stops after one phase. AFK Implementation shows the complete run.
Manual HITL Flow and goal mode run the same skills. Manual flow keeps the operator between phase boundaries. Full Delivery crosses every boundary, including review, without an operator step. Other delivery entry modes persist review_due and stop.
Phase Wrapper Inventory
requirements-phase: closes bounded product decisions throughrequirements-grill -> create-architecture -> create-spec -> write-backlog.delivery-phase: the AFK router. It requires the Architecture/SPEC pair, a current backlog projection, and a retained plan (gaps go to Requirements Phase), then implements, reviews, optionally debugs, repairs, or captures debt, ingests docs, and closes out.review-phase: one Full Code Review Pass of the committed change: one fresh Reviewer and one committed Pass Report. It returns the route and stops. Delivery starts it itself; standalone use is an explicit operator invocation.debugging-phase: gathers runtime evidence, patches bounded failures, and reruns regression checks.bug-discovery-phase: runs AFK ClawPatch discovery, reporting, and triage without source mutation.bug-resolution-phase: classifies and resolves selected ClawPatch findings or bounded batches.docs-ingest-phase: updates routed wiki and project docs, navigation metadata, and root docs when proven changes affect knowledge.resolve-debt-phase: resolves one concrete debt artifact through validation, explicit$requirements-phaseand$delivery-phasehandoffs, and closeout.
ClawPatch discovery goals name scope, report path, --limit, --jobs, and whether provider and model are the automatic default or an explicit override. Default commands omit --provider and --model; add those flags only when the operator selected an override.
AFK Guardrails
AFK runs on automatic evidence: focused tests, typechecks, linting, static validation, verify-behavior Verification through the Project Verifier, logs, command output, and CI results. Local validation stays focused; CI owns broad regression.
A delivery goal stops when:
- closeout reports final evidence;
- required access is missing and no decision can grant it:
human_steering_requiredstays durable until the recorded access is present; - a required Context Pointer cannot resolve, so the action is
blocked; - a non-Full entry mode reaches its requested boundary, such as
review_due.
Ambiguous scope, an exhausted review budget, a blocking review finding, and a changed requirement do not stop a delivery goal. Each takes an out-of-bounds Autonomous Decision that the run records, posts to the thread, and continues past.
Unclear requirements go through Requirements Phase before they become a delivery goal. Implementation uses Sequential and Parallel Delivery: an Execution Frontier with disjoint Active Write Scopes.
ClawPatch goals keep discover and resolve separate by default. Use Massive Bug Hunt And Fix for the staged discover, inspect, choose, resolve path.
Done Signal
A goal-mode run closes when the named phase reaches its stop condition and the final report explains changed files, checks, blockers, and remaining risks.
For delivery, the final report opens with the Autonomous Decisions list, out-of-bounds first, and the PR body opens with the same list in delivery's Autonomous Decisions Block. Completion also needs a valid Pass Report, docs ingest or a no-op reason, and closeout: the final path-limited commit, CI results per check, write-backlog delivery-status readback, and Owned Stack teardown.