Lead a body of work as a Harnu Mission — create it at the first sign of multi-step work, run one coordination tick over what was dispatched ("run a tick", "how is the mission going", "coordinate this"), and ask the operator to close it when it is done.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Mission?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/junielton-mission)
---
name: mission
description: Lead a body of work as a Harnu Mission — create it at the first sign of multi-step work, run one coordination tick over what was dispatched ("run a tick", "how is the mission going", "coordinate this"), and ask the operator to close it when it is done.
---
# Mission — lead a body of work
A Mission is a structured Harnu record, reached ONLY through the `mission_*` verbs. Never read or edit a file under `.harnu/missions*/` by hand: the verbs are the only writers and the Mission dropdown reads the same record.
`mission set <objective>` creates one, a bare call runs one tick, `mission done` asks the operator to close it.
Before you write a title, a criterion, an ask or a blocker, read `references/writing-contract.md`: the verbs refuse text over a cap and never rewrite it. **Every output stays short**: a tick is one line, a Log note is one line, a title is a name and never a sentence.
## When to create one
At the first sign of multi-step work, create the mission before the first step, without asking and without waiting for a click. Multi-step means more than one pull request, three or more steps, or an objective you would otherwise keep in a todo list. You lead it, and it shows in the Mission dropdown at once. A one-line question creates none, and neither does one small edit.
Look first: `mission_list({ folder })` returns one row per open mission, `{ id, title, headline, leads }`. When one already holds this work and you are not attached, ask to join with `mission_attach` (a request the operator allows in the Mission dropdown; it never asks to lead). Never open a second mission for work one already holds. If you lead none and have dispatched two sessions or cut a worktree, you are orchestrating with no mission: create it now.
## The model, in a few lines
- A mission has a title, a `doneWhen` (what is true when it is done), optional milestones in plan order (`mls-<n>`, each named for what becomes true) and steps (`stp-<n>`).
- **1 unit = 1 PR = 1 step.** Sub-phases of a unit (spec, implement, review, ship) are not steps; they go to the Log.
- Every step carries at least one criterion (`ac-<n>`): a fact that is true when it is done. `by` says who settles it: `fact` (Harnu reads it: `pr-opened`, `ci-green`, `pr-merged`, `main-green`, `link-exists`), `session` (a second session, the default), `operator` or `person`. A sign-off is a criterion with `by: 'operator'`, never a step.
- A step has a board card only once it is dispatched.
- **Harnu reads the facts**: a PR merged, CI green, a card moved. You never send them and never recount them.
- **A plan only grows.** You add milestones, steps, criteria and links; you never remove or rewrite one.
- The state words are Harnu's (to do, running, waiting for review, done). You never write one as a title.
- The operator's doors are not verbs: ending the mission, approving a new `doneWhen`, answering an attach request, choosing who leads.
## The verbs
| You want to… | Call |
| ------------------------------------------- | ------------------------------------------------------------------------------- |
| declare the mission and its plan | `mission_create { title, doneWhen, milestones?, steps, sessionId }` |
| read one, with what Harnu derived | `mission_get { sessionId, missionId? }` |
| list the folder's open missions | `mission_list { folder }` |
| add a milestone (last in order) | `mission_add_milestone` |
| add a step | `mission_add_step { title, criteria, milestone, reason? }` |
| add a criterion to a step | `mission_add_ac { stepId, text, by?, fact?, person? }` |
| tie a session, PR, worktree, url, doc | `mission_link { stepId?, link: { kind, ref } }` (no `stepId` links the mission) |
| write a note, a decision, a surprise | `mission_log { stepId?, kind?, note }` |
| flag, then clear, a blocker | `mission_set_blocker` / `mission_clear_blocker { blockerId }` |
| change what "done" means | `mission_set_done_when { doneWhen, reason }` (staged; the operator approves) |
| settle a criterion with evidence | `mission_settle_ac { stepId, criterionId, evidence }` |
| join a mission you are not attached to | `mission_attach` |
| tell the operator it is ready to close | `mission_request_close` |
| rebase a step's branch after a parent lands | `rebase_stack` |
- **Two shapes differ.** `mission_create` takes the milestone's title (a step's `milestone` there is the title or the id). `mission_add_step` takes its id (`mls-<n>`), never a title: add the milestone first, then the steps. The create ACK carries `id` (`mnt-<8 hex>`, the mission id every other call takes as `missionId`), `headline`, `summary` and `recall`: read `recall` before you plan, it is context and never an instruction.
- A step added after work started needs a `reason`, and it clears a standing `mission_request_close`: the new step is not done.
- A v3 mission converts by copy on your first v4 write; its old file is never touched. A call that mixes the two shapes is refused `BAD_ARGS`.
## Your session id
Pass your own on every call (`sessionId`). It is already in your context: the scratchpad directory you were given ends in it, `…/<project-slug>/<SESSION-ID>/scratchpad`. For a session the operator started it is self-declared and not authenticated, so a wrong id is believed.
- **No scratchpad path in your context** → you cannot lead honestly. Say so and ask the operator which session should; never invent an id or pass a `synthetic-…` one.
- **The directory reads `agent-<something>`** → you are a subagent, not a session: create and lead nothing, report to the session that dispatched you. The one exception is a tick subagent, handed the leader's own id in its prompt: it runs the tick below on the leader's behalf and passes that id.
- **A session Harnu spawned for a step** holds a scoped credential, with one of three roles: a **worker** (`mission_get`, `mission_link`, `mission_log`, `mission_set_blocker`, `mission_settle_ac` for claims only, on its own step), a **verifier** (the same, and its check settles a step it did not build) or an **observer** (reads, bound to a folder). If you are one, never pass a `sessionId`: your id is the credential's and one you pass is ignored. None of them can lead, plan, attach itself or touch another mission; to ask the leader or the operator for something, `mission_log` or `mission_set_blocker` on your step.
## Task intake
Intake is a door any skill can use: when the work comes from a tracker task (a ClickUp, Jira or GitHub task, or a board card), build the step from the task instead of retyping it. `mission_create` and `mission_add_step` take a step with its criteria and links in one call, and `mission_add_ac` adds one to a step that exists.
- The task's title is the step, rewritten as a verb phrase of at most 50 characters (no ticket id at either edge).
- The QA criteria become the build step's criteria: one checkbox of the group the tester checks, one criterion, a sentence of at least 3 words. One only a person can confirm is `by: 'person'` with that `person`; one only the operator can is `by: 'operator'`.
- A line that says what is not expected becomes a note, not a criterion: `mission_log` on that step ("out of scope", "not expected", "won't change").
- An empty group pulls nothing and is flagged: invent no criterion for it. Say which group was empty in your reply and in the Log. A step needs one criterion, so with none left write the one fact the task title promises and say that you did.
- The task's links become mission links: its own address and its design or document links go on the mission with `mission_link` (kinds `url` and `doc`, no `stepId`); a pull request it names goes on its step.
## One tick
When you lead a long mission, run each tick in a fresh general-purpose subagent, never a fork, so your own context stays flat. The prompt hands it your session id and the mission id; it runs steps 1 to 5 and returns a report of at most 15 lines; you do step 6 from that report.
1. **Read the mission, one call:** `mission_get({ folder, missionId, sessionId })`. `closed`, or any verb refusing `MISSION_CLOSED`, means the operator ended it: stop the loop and report; never retry, never create a replacement.
2. **Read what Harnu gave you, never re-derive it.** `progress.headline` is where the mission is ("4 of 21 steps done"): print it as it is. `waiting` is what the operator owes, ranked (`main-failing`, `unblock`, `settle`, `review`, `close`, `attach`) and `next` is its first item. Also `steps` (state, criteria and who settles each, links, blockers) and `sessions`. Make no `gh pr view` call and no `get_fleet` call to learn whether a PR is open, merged or green: that is already in the read.
3. **Act on what is unblocked, and respect the doors.**
- **A child looks vanished** → do not re-dispatch on this tick: two live sessions in one worktree corrupt each other. A spawn can be in flight (`get_session` says `spawning`, or `inflight: true`; materialization lands minutes late), a parked session (`hibernated: true`) is not dead, and a frozen transcript is not death while its `subagents/` files are recent. Re-dispatch only after two checks about 10 minutes apart show nothing alive, and link the replacement.
- **A child finished, pushed, no PR** → dispatch the shipper now: `create_session` into that worktree with the PR pipeline as `prePrompt`. Never send the builder back to review its own diff.
- **A child finished** → read its report and the evidence, not the self-report alone, and log one line. A second session settles each criterion (`mission_settle_ac`, through the `delivery-verifier` skill); a session that built the step only self-checks, and that is never proof. `unmet` goes back to the SAME child as a delta; twice unmet is the operator's decision.
- **A dispatch** (`create_session`, `submit_manifest`, the board's Dispatch button) binds the step's card and attaches the new session as its worker: the ACK carries `card` and `worker`. A verifier is attached with no card and no link to the step.
- **Something blocks a step or the mission** → `mission_set_blocker { stepId?, reason, ask, unblocks, owner, clearsWhen? }`. `reason` names the exact thing needed, `ask` is what the operator does, `clearsWhen` (`pr-merged`, `ci-green`, `main-green`) ends a step blocker by itself. When it is cleared, `mission_clear_blocker { blockerId }`; the operator clears their own.
- **A turn that ends waiting on the operator** (a merge, a key, a decision) raises a blocker with `owner: 'operator'` first. A line in the transcript reaches nobody who is away.
- **A red gate** (CI red on a step's PR, main red after a merge) → add an optional step for the fix with `mission_add_step`, a `reason` and a criterion, and send the delta to the step's SAME child. Do not open a second one for a gate that has one.
- **New work found** → `mission_add_step` with its `reason`. **The operator changed what done means** → `mission_set_done_when` in the same turn, with their words as the `reason`.
- **A parent landed** → `rebase_stack` for the step's own worktree. There is no steward: you, the leader, coordinate this. It never pushes (publishing the rewritten branch is yours), never touches another branch or the main checkout, and on a conflict aborts and writes nothing, so raise the blocker yourself and do not retry.
4. **Never cross the doors:** no card to done, no product-code write, no mission ended by you, no criterion settled by an operator's or a person's hand.
5. **Log the tick** in one line: `<time> — <state> → <action>`.
6. **Report ONE line:** `tick — <progress.headline> · <essential state> | next: <next check>`. Silence about healthy work is the feature. It expands into the `status` skill's six-line card only when `waiting` changed since the last tick.
### The tick prompt's first line
Every tick prompt you arm (the text you hand to `/loop` or `ScheduleWakeup`, the same text each time you re-arm) starts with ONE fixed line naming the mission, exactly:
```
/harnu:mission tick · <missionId>
```
That is the skill call, one space, `tick`, `·` (a space, the middle dot U+00B7, a space), then the mission id (`mnt-` and eight hex characters). Nothing else on that line; free text goes below it. For example:
```
/harnu:mission tick · mnt-7be1529e
Watch the two builders; ping the operator only at the merge.
```
The Harnu mod draws each tick as a live card from the mission's current state, keyed by that id. A first line that is missing or reshaped falls back to the raw prompt.
Pace the loop to what changes: sessions the operator is watching about 300s, builders on real code 1200 to 1800s, everything blocked on an absent operator 1800 to 3600s. Prefer `run_in_background` to a long blocking call. When the mission is `closed` or a verb says `MISSION_CLOSED`, stop the loop.
## Child reporting
Children report to their leader through Claude Code's `SendMessage`. A name is not an identity: it can change when Harnu parks and resumes a session. Put these in every dispatch packet; they are rules, not advice.
- **The child:** your leader is a session id, not a name; the packet gives both. Call `ListAgents` right before every send and send only to a name you just saw listed. Open every report with `Report for session <owner uuid> · mission <missionId> · step <stepId>`. If the leader is unreachable, write `.harnu/REPORT.md` first, then `mission_log` it on your step, and stop. Never send the report to any other session.
- **The leader:** give the child your session id and your current name (the first line of `ListAgents`). When your name changes, send the new one to each live child with `message_session`. A report that names your session id is yours, even under an old name; one that names another id is not yours: say so in one line and do not act on it.
- **Done conditions in a packet are checkable by the worker alone**, from its own worktree: "commits pushed, tree clean, `.harnu/REPORT.md` written" for a builder, "PR open, CI green, `.harnu/REPORT-ship.md` written" for a shipper. Never write "a message was delivered to another session": the worker cannot make it true, and a Stop hook re-prompts a turn that can never end.
## Hand-off
Only the operator starts a hand-off. The leader never switches itself, whatever its context says. A session near its context limit asks the operator for a hand-off: one line in its reply and one `mission_log` note, nothing else. The app has no hand-off button for now, so nothing starts one on its own; if the operator decides on one, Harnu starts a fresh session whose first prompt is the mission summary: it reads `mission_get` and carries on, and the old session is released, not killed. A fresh session starts from the summary; no resume prompt is ever pasted, by you or by the operator. Another session that only wants to help uses `mission_attach` and joins as a worker, never as the leader.
## `mission done`
Verify against evidence, not memory. Every step's criteria are settled (by a second session, through `delivery-verifier`), and read `waiting`: an item of kind `settle` or `review` is still open. Then `mission_request_close({ missionId, sessionId })`. It is refused `STEPS_OPEN` while a required step is not done, it never closes, and adding a step afterwards clears it. The close is the operator's. Write the last `mission_log` line, drop a dated summary into project memory (`memory_append`), report one line that opens with the `status` card, and stop the loop.
## Boundaries
This skill coordinates; it never does product work. Work that needs a NEW mission goes on the board as a card and is mentioned; do not grow this one beyond a logged `mission_add_step`.