# pm_sprint
{{< badge content="Vanguard" color="blue" class="tier-badge" >}}

The `pm_sprint` tool manages sprints within projects. Sprints group tasks for a time-bounded delivery window and support parent/child hierarchies for programs or release trains.

## Actions

`create`, `get`, `list`, `query`, `set_parent`, `update`, `delete`, `link_task`, `unlink_task`, `help`

All timestamps are epoch milliseconds.

---

## create

Create a new sprint under a project.

### Parameters

| Field | Type | Required | Notes |
|-------|------|----------|-------|
| `projectKey` | string | Yes | Project this sprint belongs to |
| `name` | string | Yes | Sprint name |
| `startTs` | number | Yes | Start timestamp (epoch ms) |
| `endTs` | number | Yes | End timestamp (epoch ms) |
| `goal` | string | No | Sprint goal statement |
| `status` | string | No | `planned` (default), `active`, `review`, `closed` |
| `velocityTarget` | number | No | Target story points |
| `metadata` | object | No | `{ owners?, links?, notes? }` |

### Example

```text
pm_sprint {
  action: "create",
  projectKey: "my-api",
  name: "Sprint 12 — rate limiting",
  goal: "Ship per-IP rate limiting on auth endpoints",
  startTs: 1712620800000,
  endTs: 1713830400000,
  status: "planned",
  velocityTarget: 40
}
```

---

## get

Fetch a sprint by ID.

### Parameters

| Field | Type | Required |
|-------|------|----------|
| `sprintId` | string | Yes |

---

## list

List sprints for a project.

### Parameters

| Field | Type | Required |
|-------|------|----------|
| `projectKey` | string | Yes |
| `status` | string | No |
| `limit` | number | No |
| `offset` | number | No |

---

## query

Search sprints across one or more projects.

### Parameters

| Field | Type | Required | Notes |
|-------|------|----------|-------|
| `projectKey` | string | No | Single project scope |
| `projectKeys` | string[] | No | Multiple project scope |
| `query` | string | No | Search text (name/goal) |
| `status` | string | No | |
| `limit` | number | No | |
| `offset` | number | No | |

---

## set_parent

Set or clear the parent sprint for a child sprint. Pass `null` to `parentSprintId` to clear.

### Parameters

| Field | Type | Required |
|-------|------|----------|
| `sprintId` | string | Yes |
| `parentSprintId` | string \| null | No |

---

## update

Update sprint fields.

### Parameters

| Field | Type | Required |
|-------|------|----------|
| `sprintId` | string | Yes |
| `name` | string | No |
| `goal` | string | No |
| `status` | string | No |
| `startTs` | number | No |
| `endTs` | number | No |
| `velocityTarget` | number | No |
| `metadata` | object | No |

---

## delete

Delete a sprint. Linked tasks are unlinked automatically.

### Parameters

| Field | Type | Required |
|-------|------|----------|
| `sprintId` | string | Yes |

---

## link_task

Link a task to a sprint.

### Parameters

| Field | Type | Required | Notes |
|-------|------|----------|-------|
| `sprintId` | string | Yes | |
| `taskId` | string | Yes | |
| `actorHandle` | string | No | Who performed the link |
| `clientRequestId` | string | No | Idempotency key |

### Example

```text
pm_sprint {
  action: "link_task",
  sprintId: "01HXYZ...",
  taskId: "01HABC...",
  actorHandle: "@skadi"
}
```

---

## unlink_task

Unlink a task from a sprint.

### Parameters

| Field | Type | Required |
|-------|------|----------|
| `sprintId` | string | Yes |
| `taskId` | string | Yes |
| `actorHandle` | string | No |
| `clientRequestId` | string | No |

---

## help

```text
pm_sprint { action: "help" }
```

## Related

- [pm_task](../tasks/) — tasks are what sprints organize
- [pm_project](../projects/) — sprints belong to projects

