Use when the user runs /work with a development request: a feature, a fix, a change, a vague idea, a Linear issue, or a Linear project to start or continue.
---
name: work
description: "Use when the user runs /work with a development request: a feature, a fix, a change, a vague idea, a Linear issue, or a Linear project to start or continue."
disable-model-invocation: true
---
# Work from request to shipped change
You own the work from the user's request to a result they can check and choose
to ship. The user owns the product decisions and the keys: shipping, merging,
and deploying.
Before the first edit of work not yet started, including `debug`'s, leave the
default branch for a work branch named as in
[ship](references/ship.md#branch-and-commits), move the issue the request came
from, if any, to In Progress, and record the starting commit and any local
changes that already existed: they stay out of this change, and
step 5 sorts defects against that commit. A Prototype issue, or an
experiment that is all the request asks for, needs no work branch: its
`prototype/` branch forks from the starting commit. An experiment a change
needs forks its `prototype/` branch from the work branch, and the build
continues on the work branch. Without Git in the project, ask before
initializing it.
## Principles
1. **Understand before building.** Restate the outcome and the check that will
show it works before changing code: most wasted work is the wrong thing
built confidently.
2. **Linear only when one conversation is not enough.** Work that one
conversation can deliver, from a typo to a feature across every layer, is
done there and ships as one pull request. Work that needs several
conversations is a Linear project, so each conversation starts fresh from
its record rather than from a long history.
3. **Decisions before code.** Settle the decisions the user owns before
building, then build without reopening them: a build that redesigns itself
builds the wrong thing and keeps the user at the keyboard.
4. **Scope stays put.** Work noticed along the way is captured, not absorbed;
work the user adds is a new agreement.
5. **Defects the change introduces are fixed.** A known defect listed as a
limitation ships unnoticed; only the user can accept one.
## 1. Understand and route
Read the domain context the request touches, following
[context](references/context.md). Then restate, in the user's terms, what will
change for whom and the check that will show it.
A Linear project, one of its issues, an issue In Progress or In Review, or a
work or `prototype/` branch from an earlier conversation for the same request
(look for one) is a continuation: see
[Stop and resume](#stop-and-resume). Any other Linear issue is a request, with the issue as its
text.
Some requests need a specialist skill: read its `SKILL.md` completely, use it
for the part named below, then come back with its result. Research, an
experiment, or an interview that is all the request asks for is this
conversation's result and changes no shipped code: skip steps 2 to 6, and move the issue it
came from, if any, to In Progress, then close it with that result as
[linear](references/linear.md#results) describes; the request authorizes both
writes. A change that needs an investigation across many sources first is a
Project, where it becomes an issue; one that needs an experiment first is
settled in step 3. When a skill this stack names is not installed next to this
one, say so and leave its step pending rather than improvise it.
| The request needs | Read | Use it to |
| --- | --- | --- |
| The cause of a bug, failure, or regression, when it is not established | [`../debug/SKILL.md`](../debug/SKILL.md) | Reach its "Ready to fix". Without an established cause, build nothing: report what is ruled out and the evidence still needed |
| An investigation across many outside sources | [`../research/SKILL.md`](../research/SKILL.md) | Answer the question; announce the delegation without estimating its time or tokens |
| A choice that only an observed experiment can settle | [`../prototype/SKILL.md`](../prototype/SKILL.md) | Build and show the experiment |
## 2. Size the work
Tell the user the size in one sentence with its reason, and continue; they can
override it.
| Size | When | Linear |
| --- | --- | --- |
| Direct | One conversation can deliver it, with any open decision settled in it | None, except the status moves of the issue the request came from, and its result comment when it asks a question |
| Project | It needs several conversations: one cannot hold it all, or it first needs an investigation across many sources or a decision the user cannot take now | One project, run as [project](references/project.md) describes |
A Project needs Linear: when it is unreachable, stop before any change and tell
the user what is blocked and how to restore access.
## 3. Settle decisions
A Project is shaped and agreed as
[project](references/project.md#shape-the-project) describes.
For Direct work, run first any experiment the change needs, with `prototype`:
its result, the user's judgment included, is a settled decision; when it
makes the work a Project, say so and shape the project. When decisions the
user owns are open, read [`../interview/SKILL.md`](../interview/SKILL.md) and
follow it. A need it reports for an investigation across many sources, or a
decision the user cannot take now, makes the work a Project; a need for an
experiment runs it as above, then a further round settles the questions that
waited on its result. The summary the user confirms once no question waits on
an experiment, restating the decisions of every round, is the agreement. Its
out-of-scope findings are captured as step 4 describes. When no decision is
open, the request is the agreement: name the choices you took and start
without waiting.
A proposal is agreed only by an explicit yes to its latest version. The
request, or its agreement, authorizes within its scope a work branch, local
commits, file edits, local runs, the dependency installs it names, and the
status moves of the issue it came from, with its result comment when it asks a
question. Pushing, opening a pull request,
merging, deploying, and any other external write each need their own yes,
unless a project's agreement covers them.
## 4. Build test-first
See each test fail for the missing behavior, not for a broken setup, before
making it pass. Without a boundary to
test, say why and use the closest real evidence: running the program, a
script, or a measurement. A text correction needs no test: show the corrected
text in place. A bug fix also follows step 3 of `debug`.
While building:
- A choice inside the agreed outcome is yours, even one the user would
otherwise own: take the one closest to that outcome, note it as yours, and
continue. When only an experiment can settle it: in Direct work, commit the
build in progress as [Stop and resume](#stop-and-resume) describes, run the
experiment, and continue with its result as step 3 describes; in a project,
it is an unknown that [When the way is
blocked](references/project.md#when-the-way-is-blocked) handles.
- Work beyond the agreement, even work the outcome needs, waits for the user's
yes. In a project,
[When the way is blocked](references/project.md#when-the-way-is-blocked)
applies, and other growth waits for a take-stock: finish what the agreement
covers, or stop as work in progress when the agreed outcome needs
the growth, and note the growth first in "Next take-stock". In Direct work,
when this conversation cannot also deliver it (it needs another
conversation, an investigation across many sources, or a decision the user
cannot take now), stop as work in progress and propose a Project that
continues from its branch.
- Capture anything else you notice: in a project, as
[linear](references/linear.md#captured-work) describes; in Direct work, as a
line of the report.
## 5. Verify and review
1. Exercise the result on a copy of any data the run writes, and with no real
external effect (an email sent, a payment, a paid call) without the user's
permission. Keep a server you start reachable from this machine only, unless
the user agrees otherwise, and stop it once they no longer need it.
2. For every change that alters behavior, configuration included, run the
independent review of [`../code-review/SKILL.md`](../code-review/SKILL.md).
Text that changes no behavior skips it; say so. When the policy requires an
independent reviewer and the review could not be independent, it stays
open.
3. Sort each confirmed defect, whoever found it, against the starting commit:
- **Introduced:** it fails with the change and not before, an agreed
requirement is unmet, or the change adds behavior the agreement does not
cover. Fix it test-first whatever its priority, or remove the addition,
and have the correction re-reviewed.
- **Already there:** it fails the same way on the starting commit, and no
agreed requirement covers it. Capture it; it stays out of this change.
After two correction attempts without new evidence, stop: the user decides
whether to accept the defect or keep the work from shipping.
## 6. Show and ship
Report as the policy asks, listing the choices you took and any defect the
user accepted among the decisions, and what you captured. Under **Open**, list
only what keeps the change from shipping as verified: a pending review, a
check not run, or a defect awaiting the user's decision.
Once every introduced defect is fixed or accepted, ask whether to ship, and
whether to push the branch of any experiment the change used.
Shipping pushes the branch and opens a pull request as
[ship](references/ship.md) describes; the issue, if any, moves to In Review.
**Done:** the user has the verified result and shipped it or chose not to.
**Pending:** shipping could not complete; the report names the remaining step.
## Stop and resume
When the conversation must stop before the work is done, at any step and
including while an experiment awaits the user's judgment, leave a
work-in-progress note: commit any experiment on its branch, then commit on the
work branch (or the experiment's branch when there is none), empty if nothing
changed there, as `chore(wip): <next step>`, with the request as given, the
starting commit and the local changes that already existed, the decisions
taken, any experiment's branch and commit, what is verified, the exact next
step, and any Linear update not yet made in the commit body. In a project, copy
the note to the issue, which alone holds it when the issue has no branch; other
work without a branch creates its work branch (a `prototype/` branch for an
experiment that is all the request asks for) to hold the note, and moves the
issue it came from, if any, to In Progress.
A project, or one of its issues, continues as
[project](references/project.md#run-an-issue) describes, which chooses the
issue to resume.
To resume work, read the last work-in-progress note, if any. Uncommitted
changes, other than those it lists as already there (without a note, ask the
user which predate the work), are unverified work: on a checked-out
`prototype/` branch, commit them there as its experiment's; elsewhere, verify
them rather than discard them. Then check out the work branch, if any,
otherwise the branch that holds the note, and rebuild the state from its
commits, Linear (the issue, its comments and relations), and the conversation.
Apply the Linear updates the note lists, then continue from the first
unfinished step, against the starting commit that the note or the claim comment
records (otherwise the branch's fork point), without reopening settled
decisions.