---
name: session-wrap
description: Run at the end of every VOTD development session. Ensures all work is committed, documented, and the project's knowledge base is up to date before the session closes. Trigger whenever the user says "wrap up", "end of session", "we're done", "push everything", or whenever a session is winding down. Also trigger proactively after any build bump or significant feature completion if the session appears to be ending.
---

# VOTD Session Wrap

Run this at the end of every session. The goal is to ensure nothing important is lost between sessions — code, decisions, domain knowledge, or infrastructure facts that only came up in conversation.

---

## Step 1 — Commit and push all pending work

```bash
cd ~/votd
git status
git log --oneline origin/main..HEAD
```

If there are uncommitted changes or unpushed commits:
1. Stage and commit any uncommitted work with a descriptive message
2. Push to `origin main`

Never end a session with uncommitted or unpushed work. If a build was bumped this session, confirm `app.json` buildNumber is committed.

---

## Step 2 — Update qa-punchlist.md

If a build was bumped this session and no punchlist section was added yet, prepend one now following Rule #6 in DESIGN_DECISIONS.md:

- One checklist item per testable change
- Brief session notes block
- Date of build
- Newest build at top

If no build bump occurred but meaningful changes were made, add items to the current open build section.

---

## Step 3 — Scan for undocumented decisions

Read through the conversation from this session and look for any of the following that aren't yet in the docs:

**Infrastructure / services:**
- New domains registered or configured
- New external accounts or services set up
- New API keys or environment variables added
- Hosting or deployment decisions made

**Architecture / design:**
- New rules or patterns agreed upon
- Components renamed or retired
- Navigation or screen structure changes
- Token or style decisions

**Project knowledge:**
- App name changes or branding decisions
- Terminology decisions (check against `docs/terminology.md`)
- Deferred items that should go in `docs/backlog.md`

For each undocumented decision found, write it to the correct file:

| Type | File |
|------|------|
| Domains, services, external accounts | `docs/infrastructure.md` |
| Design rules, component decisions | `DESIGN_DECISIONS.md` |
| UI copy, terminology | `docs/terminology.md` |
| Deferred features | `docs/backlog.md` |
| Build config, crash fixes | `docs/build-issues.md` |

---

## Step 4 — Verify infrastructure.md is current

Open `docs/infrastructure.md` and confirm:
- All domains are listed with their registrar and purpose
- Supabase project IDs and statuses are correct
- Any new services added this session are recorded
- The "Key Infrastructure Decisions" table has the latest decisions

If anything is missing or stale, update it now.

---

## Step 5 — Final commit

If any docs were updated in steps 2–4, commit them:

```bash
cd ~/votd
git add docs/
git commit -m "docs: session wrap — update punchlist and project docs"
git push origin main
```

---

## Step 6 — Confirm to user

Tell the user:
- What was committed and pushed
- What docs were updated and why
- Any decisions from this session that were documented for the first time
- What build number is current
- Whether anything was left open that should be picked up next session

Keep it brief — a few sentences is enough. The goal is a clean handoff, not a recap essay.

---

## What this skill is protecting against

Sessions frequently produce decisions that live only in the chat transcript — domain purchases, naming choices, architecture calls, infrastructure setup. When the context window fills up and the conversation is summarized, fine-grained details (exact domain names, registrar choices, Supabase project IDs) can be lost or misremembered. This skill ensures those facts land in the permanent project docs before they're gone.
