---
name: retro
description: Use when the person wants a look back at a thread, a run, a time window or a project ("retro", "retro this thread", "retro the last 4 hours", "what went wrong tonight", "after-action review", "what did we learn"), or when /back, /afk or a timed layer calls it - gathers the numbers with code, rebuilds the outcome from the record, explains the one moment that matters, gives each finding one fix, and checks the last retro's fixes. A quiet scope costs no model call.
---
# /retro: an after-action review
A short look back at one scope, so the next run goes better. Run it any time. `/back` and `/afk` call it with their scope. **Read the record, not memory.** Code gathers the numbers. You judge them.
**On Full automation, ask nothing here:** every step that asks has its own On Full branch. Take it, mark the pick "AI pick, not reviewed", add it to the next batched ℹ️ FYI, and go on.
## Scope
Pick one. Name it in the file, like `thread`, `run-v0-9`, `window-4h` or `project`. Several repos: run once per repo, one retro each.
| Scope | It is | Gatherer flags |
|---|---|---|
| thread | This conversation, or a Claude or Codex session log | `--transcript <log.jsonl> --owners-out <tmp>/owner.md` (the window is the log's first to last time) |
| run | Since the last `/afk` began, or a loop's run to its release issue | `--since <start time>` from the `/afk` section of `docs/state.md` or the release issue |
| window | The last hour, 4 hours, today, this week | `--since 1h`, `4h`, `today` or `week` |
| project | Every merge in a repo | `--since week --dir <repo>` |
## Steps
1. **Set the scope and the owner's acceptance condition.** Name the scope and its window. Write what the owner wanted by the end, in their words, from their messages, the issue or `docs/state.md`. None found? Below Full, ask one question: *"What would make this run a success?"*, with your recommended answer. On Full, don't ask: infer it from the record and mark it "AI pick, not reviewed". **Done when** the window and the condition are written at the top of the retro.
2. **Gather the numbers, then rebuild the outcome from the record.**
- Save the lists: `gh pr list --state all --limit 200 --json id,number,title,author,createdAt,closedAt,mergedAt,additions,deletions,headRefName | node .agents/skills/ask/scripts/edit-data.mjs > <tmp>/prs.json` and `gh issue list --state all --limit 200 --json id,number,title,author,createdAt,closedAt,state,labels | node .agents/skills/ask/scripts/edit-data.mjs > <tmp>/issues.json`.
- Run `node .agents/skills/retro/scripts/retro-gather.mjs --scope <name> --prs <tmp>/prs.json --issues <tmp>/issues.json` with the scope's flags. It reads git, the lists, `docs/insights/`, `docs/retros/` and the transcript, and calls no model.
- Add the machine: `node .agents/skills/ask/scripts/machine.mjs report` (free RAM next to the budget, `procs.mjs list`, and what `procs.mjs stop worktrees` would stop, which it only lists). Every process it lists as left running, and free RAM under the budget, is a finding.
- **It prints "nothing to retro":** say so in one line and skip the retro write-up.
- If `/back` called this skill and the machine report has findings, follow Routing for each machine finding. Add a "Retro" section to `docs/state.md` with the date and one line per finding with its issue link or "draft for the kit". Then go to step 7.
- If `/back` called this skill and the machine report has no findings, go straight to step 7.
- Otherwise stop here. A timed layer runs the gatherer itself first and starts a model only when it prints numbers.
- **The gatherer exits non-zero:** report its error in one line. It is never a quiet result. If `/back` called this skill, route and record the machine findings as above, then go to step 7. Otherwise stop here.
- Read what the numbers can't say: `docs/state.md`, the merged and parked issues, rejected reviews and `needs-human` items. For a thread, search the owner-messages file the gatherer saved; don't re-read the log.
- State the outcome against the step 1 condition: met, partly met or not met. Every fact carries a source pointer: a pull request number, a record file, a commit, a message number. Drop a fact with no pointer.
**Done when** every fact has a pointer and the outcome says met, partly or not.
<!-- ‹guest · 2026-12-01› -->
3. **Pick the one moment worth explaining.** The turn, job, review or merge that most changed how the run went. Say what happened, with its pointer. Then explain why, on a line that starts `Inference:`. An explanation is a guess until a record says it. Never write a guess as a fact. **Done when** there is one moment, with a pointer and an `Inference:` line.
4. **One action per finding.** At most 5 findings in the write-up, worst first. A `/back` run still routes and records every machine finding, each with its issue or draft and a state entry, whatever the cap. Each gets:
- one action;
- an owner (a person, the loop, or a skill);
- a check on a future run: a number or command that shows next time whether it worked ("size send-backs: 0 next run").
Search open issues first, and reuse one that fits: link it and add a comment. Never file a twin. Pick the fix that fails loudly: a mistake a tool could catch gets a check (a lint rule, a test, a step in `check`), not a new line in `AGENTS.md`. **Done when** every finding has an action, an owner, a check and a link (see Routing).
5. **Check the previous retro.** The gatherer lists the last retro's actions with the state of the issues they name. For each, run its check on today's numbers: worked, didn't work, or not due yet, with the evidence. One that didn't work gets a comment on its own issue, and a new finding only if the cause is new. **Done when** every previous action has a verdict, or the retro says "no previous retro".
6. **Write it down.** Copy `.agents/skills/retro/templates/retro.md` to `docs/retros/<date>-<scope>.md` and fill it in. Save the gatherer's numbers beside it: the same command with `--json`, to `docs/retros/<date>-<scope>.json`. The `--json` rerun exits non-zero? Report its error in one line and go on: if `/back` called this skill, still go to step 7 once. Add one line under "Retro" in `docs/state.md`: the date, the scope and each finding's link. A background sub-agent commits and opens the pull request (rule 17); don't wait for it. **Done when** both files exist, or the failed rerun is reported, and every finding in the retro has a link.
7. **Land the held records** (#748). Only when `/back` calls this skill, run `node .agents/skills/coordinate/scripts/insights.mjs land --now --repo <owner>/<repo>` from your checkout of main, so the retro's own records leave this checkout. It prints the records pull request's number: verify it with `node .agents/skills/coordinate/scripts/insights.mjs land --verify <number> --repo <owner>/<repo>`, then squash-merge it as `coordinate` step 10 says. The loop's later sweeps land the rest by batch. Exit 1 or a red gate: note the number under "Retro". Exit 2: note it under "Retro".
## Routing
A finding goes where it belongs (`belongs: project | kit | tool`, #323, #338). Write a `note` record for each: `node .agents/skills/coordinate/scripts/insights.mjs write note kind_of=<went-right|went-wrong|look-again> belongs=<project|kit|tool> text="<one line>" links=<record files the finding points to>`.
- **A problem in this app** (its code, tests, docs, checks or setup), `belongs: project`: open an issue here with the `issues` skill. Below Full, don't add `status:ready`: the person picks it. On Full, add `status:ready` and a priority, so the loop builds it.
- **A flaw in the kit itself** (a skill step that's wrong or missing, a script, a hook, a template), `belongs: kit`: draft an issue for `jsmigendevelopment/onRails`: title, what happened, where in the run, the fix you suggest. Leave out app code, secrets and private names. Below Full, put the draft under "Retro" in `docs/state.md` and show it to the person. **Never file it there without their yes.** On a yes: `gh issue create --repo jsmigendevelopment/onRails`. On Full, file it now with that command and link it under "Retro"; no `gh`, or it fails? Keep the draft there and list it in the FYI, never as waiting on the person.
- **A flaw in the tool** (Claude Code, Codex or another program the kit runs on), `belongs: tool`: no issue here. Name it in the retro with its pointer and the workaround, and tell the person in the FYI.
## Callers
- `/back` calls it with the run's scope after a night away or 5 or more issues since the last retro, and `/afk` at the hard stop. A timed layer (#829) calls it with `--since 1h` or `4h`.
- `/back` uses step 7. `/afk` lands its records after `/retro` returns.
- For a timed `/retro --since <window>` with findings, the caller lands the records after `/retro` returns. Use the landing, verification and squash-merge instructions in step 7.
- Any other caller that gets records from `/retro` lands them after it returns, with the same landing, verification and squash-merge. `/back` and `/afk` land once, as above.
---
The after-action review is based on Matt Pocock's [retro](https://github.com/mattpocock/skills/tree/main/skills/engineering/retro) (MIT).
این نسخه با نشانهگذاری اختصاصی حساب شما نمایش داده میشود. برای نصب سریع، به تب نصب و راهاندازی بروید.