arthai-marketplace

/goal

Speed-first goal-oriented loop — set an objective, agent picks next concrete action, captures evidence, stops at PR. Different from /autopilot (rigor-first multi-issue queue).

Synopsis

/goal <objective> | pause | resume | clear | status

When to use it

Quickstart

/goal Cut homepage LCP below 2s on mobile

What you’ll see: a knowledge-base read and quick scout, a short block of clarifying questions, then a plan (requirements + subtasks) for you to confirm. After that the loop self-paces — one concrete action per turn, each verified and logged as evidence — and stops when the goal is ready for PR.

Examples

/goal Cut homepage LCP below 2s on mobile   # set an objective and start the loop
/goal status                                # current goal, subtasks done, evidence, next action
/goal pause                                 # pause — state preserved
/goal resume                                # pick up where it left off
/goal clear                                 # discard the active goal (archived, not deleted)

Arguments & flags

Argument What it does
<objective> Sets a freeform goal and starts the loop (one active goal at a time)
[--prototype] Speed mode: happy-path build only, targeted tests for the change, discovered edge cases deferred to issues, agent work trusted with a spot-check
[--full] Production mode (auto-detected from words like “production”, “customer”, “end to end”): nothing deferred without explicit sign-off, unit + integration + E2E tests required and green before every merge, skipped/weakened tests banned, every delegated deliverable independently re-verified rather than trusted
--merge-on-green Pre-authorizes the per-PR gate: after each PR the loop watches CI and merges on green instead of stopping
pause / resume Pause or resume the active goal; state survives sessions
clear Archive the active goal
status Compact status block (also the default when run with no args and a goal is active)

What it does

  1. Scout — first checks for an already-active goal — user-confirmation checkpoint: if one exists (status clarifying/proposed/active/paused/awaiting_pr), it asks “replace / keep / cancel” and waits for you. Otherwise it reads the project knowledge base first (profile, conventions, domain rules, past goals, known footguns) — mandatory, and calibrates the whole goal — then a cheap explore-light scan fills only the gaps.
  2. Clarifyuser-confirmation checkpoint: presents what it already knows, 3–5 context-aware questions with concrete options and defaults, and its assumptions. Answer them, or say “go” to accept all defaults.
  3. Confirm planuser-confirmation checkpoint: shows the approach, requirements (each with an evidence type), and subtasks (each with a done_when clause). Nothing executes until you approve; a dry-run option executes without writes.
  4. Loop — each turn picks ONE concrete action (read, edit, test run, or a Sonnet agent spawn for non-trivial code), executes it, and appends evidence. A Stop hook auto-continues the loop so you don’t have to type “continue”. For large goals the loop becomes an orchestrator: it decomposes the plan into file-disjoint lanes, runs each in its own git worktree via parallel Sonnet subagents (dynamic workflows when available), routes subtasks to installed toolkit skills first, monitors agents with a takeover clock (stalled or over-time lanes get one stand-down order, then the orchestrator finishes them itself), and independently re-runs each agent’s claimed verification before accepting it.
  5. Verify — non-negotiable — verification is mandatory and blocking: every code change must be verified (lint, types, tests) in the same turn before the subtask can be marked done or the loop advances. If the changed code has no tests, they’re written first, then run. Every evidence entry carries a verified boolean, and goal completion (the Phase 6 PR) is blocked if any evidence entry is still verified: false.
  6. PR — hard stop — when all subtasks are done and requirements satisfied, it presents the summary with a suggested PR title and branch and stops for you. It never creates or merges the PR on its own unless you passed --merge-on-green; run /pr or tell it to.
  7. Escalation — the loop comes back to you instead of spinning, on any of: the same failure surviving 2 distinct fix theories, the same subtask stuck 4+ turns without a verified deliverable, CI red on main after a merge (fix-forward once, then escalate on the second failure), anything destructive/irreversible beyond the repo, a data-loss discovery, an architecture fork that changes the goal’s shape, or the spawn/cost budget being exceeded. Each arrives as “what broke / why / what was tried / 2–3 options with a recommendation”. You also get scoreboard updates on every merge and an ETA on request or whenever the critical path changes.
  8. Learnings — on completion, archives the goal state and appends lessons to the project knowledge base for future runs, plus a final report: requirement → evidence table, everything shipped, and explicitly-listed loose ends.

Agents spawned

Agent Model tier Role
explore-light haiku Scout — targeted codebase scan after the KB read
backend / frontend sonnet Multi-file code work in parallel worktree lanes (budget: max 6 spawns per goal without checking in — lifted when you explicitly authorize broad parallelism)
main loop (planner/verifier) strongest available model tier Vision → architecture → task plan, arbitration, root-cause on stuck lanes, final goal-completeness review

QA passes aren’t a spawned agent — they route to the installed /qa skill like other toolkit skills the plan needs.

Output & artifacts

Troubleshooting

Problem Fix
Existing goal active — replace? One goal at a time: replace (archives the old one), keep it, or cancel
Loop paused with blocked_reason: "stuck" The same subtask ran 4+ turns without progress — give guidance or /goal clear
Loop paused after 6 agent spawns Spawn budget hit — approve continuing, or split the objective; it’s probably too broad for /goal
It refuses to skip verification By design — the loop won’t ship unverified code. /goal clear if you truly want to abandon it