skills/close-session/SKILL.md
--- name: close-session description: End-of-session durability checklist that makes clearing context safe. Runs mechanical checks (uncommitted changes, unpushed commits, open PRs, chat-only decisions, new domain terms, ROADMAP staleness, memory entries) and either resolves each inline or queues it as a GitHub issue, ADR, wiki page, or memory note. The point is to walk away knowing nothing important lives only in this conversation. Triggers on "close session", "close the session", "wrap up the se
npx skillsauth add RonanCodes/ronan-skills skills/close-sessionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Run before clearing context, switching tasks, or stepping away. The goal: every important thing from this session lives in a durable place by the time you finish — code, GitHub issue, ADR, CONTEXT.md, wiki page, ROADMAP entry, log entry, or memory note. Nothing important left stranded in the chat transcript.
User says any of:
/clear or starting a structurally different taskDo NOT use for:
Run in order. Each check is a separate AskUserQuestion so the user can resolve, queue, or skip per item.
git status --porcelain
If any:
git diff --stat)./ro:commit) / stash / discard with confirmation / leave for next session (note in chat why).git log @{u}..HEAD --oneline 2>/dev/null
If any:
Memory feedback_commit_and_push.md says push regularly on ralph/autonomous work; outside those modes, "leave" is fine.
gh pr list --author @me --state open --json number,title,url,statusCheckRollup,mergeable
For each open PR:
/ro:gh-ship to drive it forward / leave for review / close.git branch --show-current
gh issue list --search "<branch-keywords>" --state all --limit 5
If the current branch's work isn't represented by an open GH issue (and the repo has a gh remote):
/ro:write-a-prd --target gh for a feature, or a quick gh issue create for a bug).ready-for-agent: offer to label it.The reflective check. Ask the user directly:
"Looking back at this session — was there anything decided in conversation that isn't yet in code, an ADR, a GH issue, a Jira ticket, a Confluence page, a CONTEXT.md entry, or a wiki page?"
If yes, for each decision:
docs/adr/000N-*.md inline)/ro:jira create/ro:confluence createPartner-visibility heuristic — auto-suggest Jira/Confluence routing when:
~/Dev/ai-projects/dataforce*When that fires, the Atlassian options (/ro:jira create, /ro:confluence create) jump to the top of the destination list. Internal-only decisions still default to GH issue.
If the user can't recall, prompt with categories: "anything about architecture? domain terms? scope changes? things you tried and rejected? anything Taskforce should see?" Memory feedback_call_out_assumptions.md — do not invent decisions; if the user says nothing material happened, accept that.
Skip unless the session touched the dataforce repo or any DAFO ticket was referenced in chat.
If it did:
/ro:jira move <KEY> "In Review" (PR merged, not yet live) or /ro:jira move <KEY> done (live in production — the strict rule from the partnership chat)./ro:confluence link.This check enforces the partnership convention: Jira reflects partner-facing state, and the move to Done only happens when shipped.
Skill scans for capitalised domain-sounding nouns in this session's git diffs and conversation that aren't already in CONTEXT.md:
grep -Eo '\b[A-Z][a-zA-Z]+\b' <session-touched-files> | sort -u
# diff against CONTEXT.md term list
If candidates surface:
CONTEXT.md under ## Language with a one-sentence definition. Use the format in grill-with-docs/CONTEXT-FORMAT.md.If the session touched a vault under vaults/<name>/:
vaults/<name>/ROADMAP.md. Did anything move (In progress → Recently completed)? Anything new in Next up?vaults/<name>/log.md. Is the tail entry for today's session?/ingest session --vault <name> to do this properly. That skill writes the session source-note, appends ROADMAP, appends log.md, and routes graduate-worthy knowledge to Hub vaults.--vault <name> flag forces a specific vault; otherwise auto-detect by working directory or by files touched this session.
The kind of thing that earns a memory entry (per the auto-memory rules):
Ask: "Anything from this session worth saving as a persistent memory (feedback rule, project state, reference pointer, user fact)?"
If yes: skill drafts the memory entry (see ~/CLAUDE.md § auto memory for types and structure), shows to user, writes to ~/.claude/projects/<project-slug>/memory/<file>.md and appends to that project's MEMORY.md index. Per feedback_call_out_assumptions.md: do not invent. Only save what the user actually said or what is clearly load-bearing.
After all 8 checks, print a single-line status:
✓ Clean to clear context.
• <N> commits pushed
• <N> issues created
• <N> ADRs written
• <N> wiki pages updated (vault: <name>)
• <N> memory entries saved
• <N> items deliberately left (with reasons)
If anything's still open ("there's an uncommitted change you said leave for next session"), repeat it back so the user starts the next session knowing it.
--quick — run only checks 1, 2, 3 (mechanical state). Skip reflective + vault + memory. Use when you're not really closing, just stepping away briefly.--reflective — run only checks 5, 6, 8. Skip mechanical. Use when state is already clean but you want to capture knowledge.--vault <name> — force the vault routing in check 7 to a specific vault. Otherwise auto-detect.--skip <n> — skip a numbered check (repeatable, e.g. --skip 4 --skip 6).The LLM Wiki system is built around durable state: GH issues, ADRs, CONTEXT.md, wiki pages, ROADMAP, log, memory. The Pocock pattern operationalises that for project repos. But durability only works if there's a discipline that moves the conversation's loose state into durable form before context clears. Without it, even a perfectly-shaped system leaks knowledge every session.
This skill is the discipline.
[[ingest-session]] — the vault-side counterpart; this skill delegates to it for check 7.[[agentic-e2e-flow]] — the start-of-session counterpart for feature work.[[pickup]] — the re-entry skill for vaults (project-side equivalent is on the roadmap).[[agent-native-repo-pocock]] — the pattern that makes durable state actually capture-able./ro:jira, /ro:confluence, /ro:jira-to-gh — Atlassian capture surfaces invoked from Check 5 and Check 5b for partner-visible work.development
--- name: worktree description: Coordinate multiple agents on one repo via a worktree-lock pool, so two agents never clobber each other's working tree. Acquire the first free slot (main, then beta/gamma… worktrees, created on demand), work there on your own branch, release when you've pushed. Use before modifying any repo that might be in use by another agent (factory, dataforce, etc.), or whenever you're told a repo is being worked on. Backed by `ro worktree`. category: development argument-hin
testing
--- name: ship description: Ship a feature branch the local-CI-first way — run the full local gate, push, open a PR, squash-merge, then deploy, without waiting on GitHub Actions. Use when a branch is ready for main and you want it merged and deployed now. Reads CI policy from `ro ci` (default skips remote CI because GitHub Actions billing keeps hitting limits). Sibling to /ro:gh-ship (waits on GitHub checks) and /ro:cf-ship (the deploy half). Triggers on "ship it", "ship this", "merge and deploy
testing
--- name: setup-logging description: Set up (or audit) the observability stack in a TanStack Start + Cloudflare Workers app so it is "diagnosable by default" — structured logging (logtape) with a request context carrying trace_id + userId + tenant/orgId, a trace_id propagated FE→BE→logs→Sentry→PostHog, Cloudflare Workers observability enabled, and Sentry + PostHog wired. Two modes: `setup` (wire it into an app) and `audit` (check an existing app + report gaps). Use when scaffolding a new app, wh
development
Manage credentials INSIDE the active ~/.claude/.env file — read which token/account to use for a given app (Simplicity vs Dataforce vs Ronan-personal), add or update a secret WITHOUT it passing through the chat (an interactive Terminal window prompts for it), and track secrets that were exposed in a transcript so they get rotated. Sibling to /ro:context (which switches WHICH env file is active). Use when the user wants to add an API key/token/secret, asks "which credential do I use for X", needs the env organized/labelled, or a secret was pasted into the chat and should be rotated.