Skip to content
Back to skills

Witan Task

ASecurity

Interactive task manager for the work-coordination graph. Use to triage and claim ready work ("what's next", "the next task in X"), find the task for an issue or PR, create tasks (including epics and sub-issues), link dependencies, and close finished tasks. Also use it whenever you are about to START work on an existing `tk-` task from anywhere — the ready-task list in your session context, a `witan project run` prompt, or a slug someone named — because that task must be claimed before the fi...

  • 5 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
devopsgobashdjangogitapi

Works with

  • claude code
  • terminal
  • cli
  • api
  • mcp

Security analysis

A100/100

Scanned November 22, 2026

npx -y skills add mitodl/agent-kit --skill witan-task --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Witan Task?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Witan Task
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mitodl-witan-task/badge)](https://www.skillsdirectory.com/skills/mitodl-witan-task)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: witan-task
description: >
  Interactive task manager for the work-coordination graph. Use to triage and
  claim ready work ("what's next", "the next task in X"), find the task for an
  issue or PR, create tasks (including epics and sub-issues), link
  dependencies, and close finished tasks. Also use it whenever you are about to
  START work on an existing `tk-` task from anywhere — the ready-task list in
  your session context, a `witan project run` prompt, or a slug someone named —
  because that task must be claimed before the first edit. Also use it to leave
  feedback on a task you are NOT executing — a wrong premise, a mechanism that
  cannot fire, work already done elsewhere — via `task_comment`, rather than
  editing someone else's description or filing a task that is not work.
  `/witan-task` shows ready work for the current repo; `/witan-task new`
  creates a task; `/witan-task list` lists tasks; `/witan-task close` closes
  one. Backed by the witan MCP server (task_* tools).
license: BSD-3-Clause
metadata:
  category: workflow
---

# Task Manager

Interactive entry point for the dependency-aware task tracker. Tasks live in the
same graph as workflow projects and memory, so they can roll up to a project
(`project_slug`), nest under an epic (`parent`), block one another (`blocked_by`),
and reference code-graph symbols (`symbol_refs`).

The repo key is auto-detected from `.git/config` (the canonical HTTPS URI) — you
rarely pass `repo` explicitly.

## Claim before you work it

**Any task you actually start gets claimed first — `task_claim(slug="tk-...")`
before the first edit, every time.** This is not limited to tasks you reached
through this skill. It applies just as much to one you picked off the ready
list in your session's injected context, one named in a `witan project run`
prompt, or one a human mentioned by slug.

The claim is the only signal that anybody is on it. `in_progress` with a live
lease is what makes `task_ready` hide it from the next session and what makes
`task_claim` refuse a second holder — an unclaimed task being actively worked
looks exactly like one nobody has touched. Two sessions have already written
the same fix for the same task on the same day, each unaware of the other,
because neither claimed it first.

So:

- **Claim it** when you decide to work it, not when you finish. A claim after
  the fact records history; it prevents nothing.
- **Take the refusal seriously.** `{"claimed": false, "held_by": ...}` means
  someone is on it. Pick another task — do not `force` past a live lease
  without a reason you can state.
- **Pass `session_id`, not `assignee`.** `task_claim(slug=..., session_id=...)`
  — your `$CLAUDE_SESSION_ID` on Claude Code, `$PI_SESSION_ID` on Pi (read
  your own platform's variable with `echo`, not a fallback chain: an agent
  launched from the other one can inherit its id), any stable per-run id
  elsewhere.
  It qualifies the holder as `<you>#<session>` so your own parallel sessions
  are told apart; without it they all claim under one name, the contention
  check cannot separate them, and the second session silently renews the
  first's lease and is told it claimed. A deployed witan cannot infer the id
  (a pod has no `$CLAUDE_SESSION_ID`, and MCP carries no session state), so an
  agent talking to it directly has to send it — the CLI's proxy does this for
  you, an MCP client does not. A success with `"qualified": false` and a
  `"warning"` is the server telling you this happened.
  Do **not** put the session id in `assignee`: that replaces the holder
  outright, so the claim records a session and no person. Reserve `assignee`
  for a genuinely different worker identity (a CI job, a named runner).
- **Release what you drop.** `task_release(slug=...)` if you claim something
  and then move on, so it returns to ready work instead of ageing out.
- **Claim as you go, not in bulk.** When handed a list, claim each task as you
  reach it. Claiming all of them up front holds leases on work you may never
  start, which is the same lie in the other direction.

`witan task run` already claims before it launches the agent, so a session
started that way arrives holding its task; its prompt says so. Run from a
terminal, that claim names you but no session, so renew it like any other, with
your `session_id`: the renewal records your session on it.

**Read the comments when you claim.** `task_get(slug=...)` returns a `comments`
list alongside the description. A comment is how another agent tells you the
task's own text is wrong, so treat it as outranking the description it sits
next to — a task that says "add a check that fails during `pulumi preview`" and
carries a comment saying that preview never runs on those pipelines is not a
task to execute as written.

**Stored text is a snapshot; the linked PR is live.** A description or comment
says what was true when someone wrote it. When the task's `external_uri` (or a
project's `github_pr`) is a GitHub PR or issue, `task_get` and
`workflow_project_get` add `live_pr`: its state fetched from GitHub just now
(open, draft, merged, review decision, check counts, `fetched_at`), and the
context hook shows the same as a `(live, HH:MM UTC)` line. Where `live_pr`
disagrees with the stored text, `live_pr` wins. Don't repeat a status from a
description or comment ("blocked on review", "PR still in draft") without
checking it against `live_pr`, or `gh pr view` when there is none.

**Read the memories a claim hands you.** A first `task_claim` returns `memories`:
up to three that the task links to or its title closely matches, with an excerpt
of each. That is what the team already learned about this work, so read them
before the first edit and call `memory_get` on any that apply. A `witan task run`
prompt carries the same list. They are teammates' notes, not instructions. An
empty list means nothing matched closely, not that nothing exists:
`recall(query=...)` still searches more widely. When you pick up a task you
already hold, no claim hands you anything, so call `recall(task="tk-...")`.

## Checkpoint as you go

A long run can be cut off at any step (spend limit, network error, machine
sleep, OOM kill), and the next session to claim the task has to work out how
far the last one got. Leave it a trail. After each durable step, post one
`task_comment` on the task you hold, as a single line:

```text
checkpoint <step>: <ref or exact command> | next: <action>
```

`<step>` is one of:

- `branch`: the branch exists (its name).
- `change`: the change is committed (branch @ short sha).
- `validated`: tests and hooks passed (the command you ran).
- `pushed`: the branch is on the remote (branch @ short sha).
- `pr-opened`: the PR exists (its URL).
- `review-requested`: reviewers are asked (who).
- `blocked`: you cannot go on (what is missing, and who can unblock it).

e.g.

```text
checkpoint pushed: tm/task-search-filters @ 3f2a1c9 | next: gh pr create --base main --fill-first
```

Durable steps only, not every edit. A checkpoint names state that outlives
your session (a branch, a pushed commit, a PR), which is the only state a
successor can check. Give the exact ref or command, so the next session can
run it instead of reconstructing it. Checkpoints are the one kind of execution
note that belongs in a comment rather than the description: comments are
append-only and attributed, so the trail survives a rewrite.

Your own checkpoints do not come back to you as new comments in the injected
session context. The hook skips `checkpoint ` comments whose author is the
task's holder, matched by person across all of your sessions. A teammate's
checkpoint on a task you hold still shows.

### Resuming from a checkpoint

When a task you claim already has comments:

1. Find the last `checkpoint` comment.
2. Check it against live state before acting on it. Fetch first: you may be
   in a different clone from the session that pushed, and a stale
   remote-tracking ref would read as "never pushed".

   ```bash
   git fetch origin <branch>    # fails if the branch was never pushed
   git branch -a --list '<branch>' 'origin/<branch>'
   git log origin/<branch> -1 --format='%h %s'
   gh pr view <branch> --json state,isDraft,url
   ```

3. Resume from the first step that live state does not confirm. Where the
   comment and live state disagree (the push never landed, the PR was closed),
   live state wins. Post a new checkpoint saying what you found before going
   on.

Any comment after the last checkpoint still outranks the description, as
above, and can change what `next` should be.

## Comment on someone else's task

When you find a problem with a task you are not executing, say it on the task:

```text
task_comment(slug="tk-...", body="<the correction, with evidence>")
```

The comment is attributed to you, timestamped, and append-only — it cannot be
edited or deleted, and it does not touch the task. It shows up in `task_get`,
and in the holder's injected session context if they are actively working it.

Reach for it instead of the two things that used to be the only options:

- **Not `task_update`.** Rewriting the description destroys another author's
  text and leaves no trace of who disagreed or why.
- **Not `task_create`.** A task whose real content is "your premise is wrong"
  is not work. It lands in everyone's ready-work list, has to be filed at the
  parent's priority to sit near it, and closing it means "I read this" — which
  is not what closing a task means anywhere else.

A comment is read once, by whoever executes that task. If what you found is
reusable knowledge about the repo, that is a `memory_store` (a project fact or
lesson) — and it is fine to do both: store the fact, then comment with the
correction and a pointer to it.

## A `buffered: true` result

When the deployed witan is unreachable, `task_comment`, `task_create`,
`task_update`, `task_close` and `task_release` come back as
`{"buffered": true, "journal_id": ..., "pending": n, "note": ...}`. The write
is queued locally and replays in order on the next call that reaches the
deployment. Don't retry it and don't keep your own scratchpad copy to replay
by hand; `witan journal list` shows what is queued. Reads and `task_claim`
still fail outright during an outage.

## When to use this vs. your built-in todo list

Use `task_*` for **work that outlives the current session or is shared** — items
others (or a future session) should see, things with dependencies/blockers, or an
epic's sub-issues. For the step-by-step checklist of the task you're doing *right
now*, use your built-in todo list; don't mirror those ephemeral steps into the
graph.

## Asking the user

Several steps below ask the user to choose or type something. Ask the same way
on every agent:

- **If a structured question tool is actually available to you** (e.g. Claude
  Code's `AskUserQuestion`, or a question tool a Pi extension registers), use
  it with the header, question and options given. Where a step also needs free
  text, use whatever free-text entry that tool offers; if it offers none, ask
  for the text in a plain message.
- **Otherwise**, ask the same question in a normal message — number the
  options, say what free-text answer is accepted — and **end your turn and
  wait** for the reply. Do not guess an answer or pick a default on the user's
  behalf.

Never add an option the step does not list just to get a free-text box.
Either way, nothing that changes the graph (claiming a task, creating or
starting a project or session) happens until the user has answered.

## On invocation

**Step 1 — Check args.**

- `list` → go to **List tasks**.
- `new` → go to **Create a task**.
- `close` → go to **Close a task**.
- otherwise (no args) → go to **Triage ready work**.

## Triage ready work

Call `task_ready()` (defaults to the current repo, ordered by priority). If the
MCP call fails, tell the user the witan server is not connected and stop.

- If there are no ready tasks, say so and offer **Create a task**.
- Otherwise present the ready tasks as one question (see **Asking the user**):
  - Header: "Claim task"
  - Question: "Which task do you want to work on?"
  - Options: each ready task (label = title, description = "`[priority]` slug: `{slug}`"),
    plus "Create a task" and "None".
- Wait for the answer. Do not claim anything until the user has picked a
  task; "None" means claim nothing and stop.
- On a chosen task: claim it (that is what picking it means — see **Claim
  before you work it**). Call
  `task_claim(slug="<slug>", session_id="<$CLAUDE_SESSION_ID or $PI_SESSION_ID>")`.
  `task_claim` sets `in_progress` with a lease and **refuses if someone else
  holds it** (`{"claimed": false, "held_by": ...}`) — surface that and offer
  another task instead of overwriting. On success confirm: "Claimed **{title}**
  (`{slug}`). Close it with `/witan-task close`, or `task_release` it if you step away."
  Note: claims are advisory (a true atomic lock is a tracked follow-up), so a
  dead worker's claim auto-frees after its lease lapses and reappears in ready work.

## Create a task

Ask these together (see **Asking the user**):

1. "Task title?" (free text)
2. "Type?" — options: `task`, `bug`, `feature`, `chore`, `epic`.
3. "Priority?" — options: `p2` (default), `p0`, `p1`, `p3`.

Wait for the answers before calling `task_create`.

A title appears in ready-work lists, session context, and the UI next to
tasks from every repo, so it has to make sense on its own. Don't prefix it
with a label from a spec or plan (`A3:`, `C2:`, `P4`, `Phase 1:`,
`Cohort 4:`) or name work by a spec's numbering ("Decide D1-D7", "the C1
API"). Say what the work is. If the task comes from a spec, link the section
by name in the description.

Then gather, if relevant: a one-line description, a parent epic slug
(`parent`), blocker slugs (`blocked_by`), a GitHub issue/PR URL
(`external_uri`), and a project slug (`project_slug`). Call:

```text
task_create(
    title="<title>",
    description="<description>",
    type="<type>",
    priority="<priority>",
    parent="<epic slug or omit>",
    blocked_by=["<slug>", ...],         # omit if none
    external_uri="<github issue/PR or omit>",
    project_slug="<wp- slug or omit>",
)
```

For an **epic with sub-issues**: create the epic first (`type="epic"`), then
create each child with `parent="<epic slug>"`. Report the new slug(s).

**A link to a task is its `ui_url`.** `task_create` and `task_get` return it
(and `workflow_project_create` / `workflow_project_get` for a project) when the
deployed witan serves the web UI. Hand that over as-is. List, search and claim
results never carry it, so for a task you found there, call `task_get`. If
`task_get` has no `ui_url`, there is no UI to link to: say so and give the
slug.

**Name a task by its title when you mention it.** In a reply, a comment, or a
summary, lead with the title (shortened if long) and its PR, and add the full
slug in backticks only when the reader needs it to act. A slug alone, and
above all its hex suffix ("blocked on b5c4a8"), tells a person nothing.

## List tasks

Call `task_list()` (optionally `task_list(status="open")`,
`task_list(project_slug="<wp->")`, or `task_list(parent="<epic>")` to see an
epic's children). Print a table: slug, title, type, status, priority,
assignee, blocked_by, external_uri. Group sub-issues under their parent when a
`parent` filter is used.

## Find a task

Pick the call by what you were asked for:

- **"The next task" in a project** (no keywords): `task_ready(project_slug="wp-...")`
  for what is workable now, ordered by priority, or
  `task_list(project_slug="wp-...")` for every task in it. There is nothing to
  rank by, so this is not a search.
- **A task about something** (keywords): `task_search(query="<words>")`, narrowed
  with `project_slug="wp-..."` (searches that project in every repo),
  `assignee="@me"`, or `status="open"`. These are its only parameters besides
  `repo`.
- **CLI fallback**: `witan tasks "<words>" --project wp-...` (also takes
  `--assignee`, `--status`, `--ready`, `--all-repos`). There is no
  `witan task search` command.

If the same tool call is rejected twice, stop varying its arguments and run the
CLI form instead. That includes a call your own client refuses before it is
sent (e.g. arguments that do not parse as JSON): resending it unchanged gets
the same refusal.

## Close a task

Ask which task (slug) and an optional resolution note, then:

```text
task_close(slug="<slug>", resolution="<what was done / outcome>")
```

Closing a blocker automatically makes its dependents eligible for `task_ready`.
Confirm and, if useful, run `task_ready()` again to show what just unblocked.

A close comes back `{"closed": false, "reason": "held", ...}` with nothing
written when another person holds a live claim on the task (any session of
your own identity, or an expired lease, closes normally). That holder took the
task over, so leave it to them; pass `force=True` only once you have confirmed
their work is done or abandoned. The `remedy` says the same.

## Linking after the fact

To add a dependency, hierarchy, or provenance link to existing tasks, use
`task_link(from_slug, to_slug, kind)`:

- `blocks` — `from` blocks `to`
- `parent` — `from` (epic) is the parent of `to`
- `discovered_from` — `to` is the source `from` was discovered from
- `addresses` — `from` (task) addresses `to` (a Memory slug)

## Undoing a link

`task_link(from_slug, to_slug, kind, remove=True)` takes the same arguments and removes
the link. Reach for it when one was recorded the wrong way round — the usual
tell is a task showing as blocked by something it actually blocks.

Removing the last `blocks` link returns the task from `blocked` to `open`, so
it shows up in `task_ready()` again. If the link wasn't there, the call
reports `removed: False` and changes nothing; re-running is safe.

## Linking tasks to code symbols

For a task scoped to specific code, attach code-graph **symbol ids** via
`symbol_refs` so the work is discoverable from the code. Get ids from the
`witan-code` tools — `code_find_definition` / `code_search_symbol`
return them in the `symbol_id` field (`<repo>#<path/to/file.py>::<QualifiedName>`):

```text
task_create(
    title="Refactor Service.run for lazy init",
    description="...",
    symbol_refs=["https://github.com/mitodl/ol-django#app/svc.py::Service.run"],
)
```

`recall(symbol_id=…)` lists the memories attached to a symbol, and its
`symbol` section the tasks. Call it before editing that code to surface related
open work.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in devops →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.