Draft: chore(skills): add session-retro end-of-session retrospective skill
Why
The team writes most code with Claude Code, and every session leaves friction the operator fixes in the moment and then forgets: a command re-run three ways, a correction that should have been a convention, a manual task worth a script. /session-retro runs at the end of a session while that context is still live and turns the friction into concrete improvements, routed by where each fix lands.
Local fixes (your memory, ~/.claude/rules/, ~/.local/bin, local Claude config) apply on your go-ahead because they carry no team cost. Checked-in project AI workflows (.claude/skills/, .claude/agents/, .claude/settings.json, .gitlab/duo/, docs/dev/agentic-development.md) become MR proposals only when they clear an anti-churn bar, so the retro sharpens shared tooling without becoming a churn source.
What's notable
- Session-scoped, not MR-scoped. The evidence is the session you just ran, not a merged MR. Running it at end of session is the point: live context is what lets it name the friction. Each improvement cites a concrete session moment or gets dropped.
- Three dispositions. Local applies on approval. Checked-in AI-workflow fixes are proposals only (no apply, branch, push, or MR). Product code, specs, ADRs, and CI outside
.gitlab/duo/are observations only. - No posting script. For a proposal you take, you run the existing
/create-mror/ar-ship-mr. The skill writes no branch, commit, or helper script. - Reminders wired into the workflow skills. The operator-invoked workflow skills (
implement-step,review-branch,validate-step,planner,spec-author, themonolith-*set, and more) close a session-ending hand-back with a one-line/session-retrosuggestion.mr-watchis excluded (unattended watcher, fixed-format stop report). - Supersedes the earlier design. Replaces the MR-scoped
retro-mrplusfriction-log(and itspost.sh) this branch previously carried. A session retro reads the live session directly, so the JSONL log is unnecessary.
Test plan
- Run
/session-retroat the end of a real session. The report groups local fixes, checked-in proposals, and observations, and each cites a concrete session moment. - It applies a local fix on approval and only proposes (never applies, branches, or pushes) a checked-in fix.
- A product-code or spec finding lands as an observation, not a proposal.
- The "nothing to change" path emits the short report with no padding.
- A workflow skill (for example
/review-branch) closes a session-ending hand-back with the/session-retrosuggestion, and omits it mid-workflow. -
valeruns clean on the changed SKILL.md files (markdownlintexcludes.claude/skills/**).
Context for LLM agents
Design rationale and rejected alternatives:
- MR-scoped retro (rejected). An earlier version of this branch shipped
/retro-mr <iid>: fetch one merged MR's commits, diff, discussions, and pipeline, run a 12-category drift rubric, route findings. Dropped because the friction signal lives in the session, not the merged artifact. A cold rubric over a diff reconstructs intent the session already held. - friction-log + post.sh (rejected). The MR-scoped design needed events recorded during implementation (a
post.shappending JSONL under.git/info/) because the retro ran later against a merged MR and had lost the session. A session-scoped retro reflects on the live conversation, so the recording mechanism and its script are unnecessary. - Go binary / CI job (rejected earlier). The original 2026-04 design scoped an unattended Go agent with an API key. AR's ~6 substantive MRs per month does not amortize that surface area.
Non-goals:
- Not a code reviewer.
/review-branchand/deep-review-branchown pre-MR code review. This mines the session for workflow improvements, not the diff for bugs. - Does not touch GitLab. No push, MR, comment, or branch. The checked-in handoff is
/create-mror/ar-ship-mr, operator-run. - Does not propose product-code, spec, ADR, or CI edits. Those are observations.
- The workflow-skill reminders are suggestions the skill emits on hand-back, gated to session-ending hand-backs so they do not fire mid-workflow.
harden-mrcarries the same reminder as a local (untracked) edit, so it is not in this MR.