/goal
Run a long task against a one-page goal file. The file survives context compaction and new sessions, keeps the agent anchored, and makes "done" checkable. An add-on skill, installed with ContextKit or on its own.
What It's For
Use /goal for work that spans more than one session: a feature, a migration, a refactor with several parts. You agree on the outcomes once. The agent then plans, builds, and tests in its own loop, and each outcome gets an independent review before it's ticked.
A durable goal
One file in .contextkit/goals/, re-read every session and after compaction.
Checkable outcomes
You own the Outcomes. The agent owns the Checks and logs every change.
An independent check
A fresh-context reviewer sees only the goal file and the diff.
Usage
| Command | What it does |
|---|---|
| /goal "idea or task" | Start a new goal: draft the goal file, ask what's unclear, get your yes on the outcomes |
| /goal | Resume the active goal |
| /goal status | Summarise progress without building |
| /goal done | Verify every outcome and close the goal |
In Codex, use $goal. Only one goal is status: active at a time; others are paused or done. ContextKit's AGENTS.md tells every tool to read the active goal before starting work.
The Goal File
Goals live in .contextkit/goals/<slug>.md. The template is .contextkit/templates/goal.md:
--- status: active created: [DATE] --- # Goal: [TITLE] ## Goal [2–3 sentences: what we're building and why.] ## Outcomes <!-- Human-owned. 3–7 checkable, user-side results. Change only with the user's OK. --> - [ ] O1: [A user can …] - [ ] O2: [...] ## Checks <!-- Agent-owned. Detailed criteria per outcome, refined while building. --> - O1: [...] ## Constraints / Non-goals - [Must not break …] - [Out of scope: …] ## Open Decisions <!-- Waiting on the human. Always give options; mark the recommended one. --> ## Changes <!-- Dated log of every change to Outcomes or Checks, with the reason. --> ## Progress - **Done:** - **Next:** - **Blocked:**
| Section | Owner | Purpose |
|---|---|---|
| Goal | You | 2–3 sentences: what and why |
| Outcomes | You | 3–7 checkable results written from the user's side |
| Checks | Agent | Detailed criteria per outcome, refined while building |
| Constraints / Non-goals | Both | What must not break and what's out of scope |
| Open Decisions | You | Questions waiting on you, always as multiple choice |
| Changes | Agent | Dated log of every change to Outcomes or Checks, with the reason |
| Progress | Agent | Done / next / blocked, so a fresh session can pick up |
Kickoff
- The agent reads the project context (
AGENTS.md,CLAUDE.md,index.md) and enough code to understand the area. - It drafts the goal file: Goal, Outcomes, Constraints and Non-goals.
- If something blocks a good draft, it asks at most 4 multiple-choice questions per round, recommended option first. Claude Code uses
AskUserQuestion, Codex usesrequest_user_input, and other tools list lettered options so you can reply1b, 2a. - You approve the Outcomes. From then on they only change with your OK.
The Build Loop
The agent works outcome by outcome, in its own loop. No role handoffs.
Re-read goal file (every session, after compaction)
│
▼
Plan → edit → run tests → fix (repeat)
│
├── internal change to Checks → decide, log under Changes
├── user-visible change → ask first, with options
│ (scope, UX, dropping or weakening an outcome)
│
▼
Outcome looks done → Milestone review → commit → next outcome- Every change to Outcomes or Checks is logged:
YYYY-MM-DD — O2 check changed: X, because Y. - Progress stays current so a new session, or a compacted one, can continue.
Milestone Review
When an outcome looks done:
- Run the project's tests and quality checks.
- Spawn a review subagent in a fresh context, on the same model. It gets only the goal file path, the outcome ID, and the diff for that outcome, never the builder's own account of the work. It returns
passor a numbered list of problems. Without subagents, the agent reviews the goal file and diff as if someone else wrote it. - Problems get fixed and reviewed again, up to 3 rounds. After that, the agent asks you.
- On pass: tick the outcome, update Progress, and commit, e.g.
feat(reports): users can export CSV. Hooks are not skipped.
When every outcome is ticked, the goal is set to status: done and you get a short summary: outcomes, notable changes from the log, and anything skipped.
Install
ck install includes /goal. To use it in projects without ContextKit, install it globally to ~/.claude/skills/, or use the Claude Code plugin:
Why This Replaced Squad
Squad split work across fixed roles with handoff files. Strong models plan, build, and test best in their own loop. What they still need is a durable goal, checkable done criteria, and an independent check. /goal keeps exactly those three and drops the role handoffs.
Coming from 1.x
Old links to the squad, spec, and CI squad docs redirect here. /ck update can convert an unfinished squad handoff into a goal file. See Upgrading to 2.0.
Was this helpful?
Help us improve the documentation by sharing your feedback.