| name | session-finish |
| description | Close out a working session with a usage-statistics report, a self-improvement retro, and a pickup-clean handoff summary. Use when the user says the session is done ("wrap up", "finish the session", "close out"), before ending a long autonomous run, or whenever a summary of what changed and what the agent actually used is wanted. |
Session Finish
Scope
Owns the end-of-session ritual: report what the session actually used
(tools and skills, from recorded telemetry), run the self-improvement
retro, and leave the repo pickup-clean with a handoff summary.
It is not for shipping the work itself — commits, gates, and issue
closure belong to the loop and its skills (harness-loop, tool-br,
conventional-commits). Run this after the work has landed.
1) Usage statistics
The tool-usage PostToolUse hook counts every shell command's pipeline
heads and every Skill invocation into .basicly/usage/tool-usage.json
(git-ignored, survives between sessions). Report it with:
basicly usage report
- The report tables terminal tools and skills by count with
last used
dates, and names never-used catalog skills — the culling candidates.
- The counter file accumulates across sessions by design; do not reset or
delete it. When the command reports no usage data, say so (the hook may
not be active in this repo) and continue with the rest of the ritual.
2) Self-improvement retro
Follow the repo's retro rules (projected into the always-on instructions):
- Only when the session hit a real rejection or a user-corrected mistake:
find the root cause and propose the exact fragment/skill/hook change
that would have prevented it.
- Environment/timing/platform traps become a quirks-fragment bullet: one
incident, one bullet, trap plus avoidance.
- Present proposals for explicit approval — never self-apply a retro edit.
- Nothing concrete surfaced? Skip the retro and say so; inventing findings
is the anti-pattern.
3) Pickup-clean handoff
git status must be clean: no partial edits, stray debug output, or
unexplained files. Anything intentional left behind gets named in the
summary; anything unintentional gets removed before finishing.
- Confirm the tracker matches reality (
br ready; claimed issues either
closed or annotated with their true state).
- End with a summary of: what changed (with issue ids), what was verified
(gates run, their results), what remains open, and the usage-statistics
highlights from step 1.
Trigger examples
- Should trigger: "wrap up the session" / "finish for today".
- Should trigger: "what did this session actually use and change?"
- Should not trigger: "close this issue" (that is
tool-br).
- Should not trigger: mid-task status updates while work is still open.