---
name: okstra-rollup
description: |
  Use when the user wants run results from MULTIPLE okstra tasks collected and summarized at once — a task-group digest or a whole-project roll-up, not a single task. Aggregates per-task run count, elapsed time, error count, and latest report path, plus group-level totals and status/category/phase tallies, then synthesizes a cross-task prose summary from the report files. Make sure to use this skill whenever the user mentions "okstra rollup", "rollup", "task-group summary", "group-level report", "collect multiple task results", "whole-project task status summary", "cross-task summary", "consolidated group report", "organize all tasks", "run results all at once", even if they don't say "rollup". For a SINGLE task's report/time/errors/recap use okstra-inspect instead; for a forward-looking work plan over non-done tasks use okstra-schedule-gen.
---

# OKSTRA Rollup

Cross-task roll-up: collect every catalog task's run results (optionally scoped to one task-group) and summarize them together. The `rollup` CLI does all deterministic aggregation — counts, time sums, error tallies, status/category/phase distributions. You resolve scope, call it, render the table, and synthesize the prose digest from the report files. **Never recompute totals or re-tally by hand** — the CLI is the SSOT for the numbers.

This skill is read-only. It never mutates task artifacts.

## Step 0: Preflight

<!-- BEGIN FRAGMENT: bash-invocation-rule -->
Run one Bash tool call, starting with the literal token `okstra` (never wrapped in `if`/`eval`/`export`/`$(...)`/`VAR=...`/`||`/`&&`/`npx` — a non-literal leading token defeats the `Bash(okstra:*)` permission match):
<!-- END FRAGMENT: bash-invocation-rule -->

```bash
okstra preflight --runtime claude-code
```

On `Okstra preflight: ready`, carry the fixed `Project root` line. On `Okstra preflight: failed`, show `Reason` and `Recovery`, then stop.

<!-- BEGIN FRAGMENT: preflight-outdated-cli -->
If the call fails with `unknown command: preflight`, the `okstra` binary on PATH predates this skill — tell the user to update it (`npm i -g okstra@latest`), then stop (`/okstra-setup` does not update the binary).
<!-- END FRAGMENT: preflight-outdated-cli -->

## Step 1: Resolve scope

- User named a task-group (e.g. "summarize the alpha group") → use it as `--task-group <group>`.
- User asked for the whole project ("all tasks", "the whole project") or named no scope → omit `--task-group` (whole catalog).
- If genuinely ambiguous, ask once: one task-group, or the whole project? Do not silently guess a specific group.

## Step 2: Fetch the roll-up

```bash
okstra rollup --task-group <group> --project-root <projectRoot> --text
```

Omit `--task-group` for the whole project. The command returns fixed, ordered label/value lines. Read only those labels; do not request machine output or open an artifact to recover omitted fields. Durations are raw milliseconds. If `Task count` is `0`, tell the user there are no okstra tasks in that scope and stop.

## Step 3: Render the roll-up table

Convert each returned `ms` label to `HH:MM:SS` (zero-pad; never show raw ms). CPU sum includes overlapping lead and worker time. Use the returned task order.

```markdown
## okstra Rollup — <task-group or "whole project"> (<taskCount> tasks)

| Task | Category | workStatus | Phase | Runs | CPU | Errors | Report |
|------|----------|------------|-------|------|-----|--------|--------|
| DEV-1 | bugfix | done | final-verification | 2 | 00:25:00 | 2 | ✓ |
| DEV-2 | feature | in-progress | implementation | 1 | 00:00:00 | 0 | — |

**Totals:** 3 runs · CPU 00:25:00 · 2 errors
**workStatus:** done 1 · in-progress 1   **category:** bugfix 1 · feature 1
```

Render `Report` as `✓` when the corresponding `Task N report path` is non-empty, else `—`. Use the numbered fixed labels and total labels verbatim; do not re-count tasks.

## Step 4: Synthesize the digest (the summary)

This is the skill's value-add over a bare table. When the user asked to "summarize"/"digest"/"organize" (the common case), produce a short cross-task narrative:

1. For each task with a non-empty `reportPath` whose file exists under `<projectRoot>/<reportPath>`, read it and write a 1–2 line summary of what it accomplished and its recommended next step.
2. Above the per-task lines, write a 2–4 sentence group-level synthesis: what was delivered across the group, where the open work sits (use `byWorkStatus`/`byCurrentPhase`), and any error hot-spots (tasks with high `errorCount`).
3. Cite each per-task claim with the report path as `<reportPath>` so the reader can open it.

For tasks with no report, state the current phase/workStatus instead of inventing a summary — do not read non-report artifacts to fill the gap.

Keep the digest to what the reports actually say; if a report is missing or empty, say so rather than guessing. For a deeper single-task drill-down (full report, per-worker time, error breakdown, run-to-run recap), point the user to `/okstra-inspect`.
