# HANDOFF AFTER COMPACT

> **What this is:** a recovery template for any AI-assisted project. Drop a copy in your project tree, fill it in *before* you walk into a long session, and update it as you go. If the session compacts (or you have to restart cold), this file is the bridge between what you knew and what the next session needs to know.
>
> **How to use:** copy this template into your project, rename it `HANDOFF-AFTER-COMPACT.md`, fill in each section, keep it current, and reference it as the first thing the next session reads.

---

**Project:** [project name]
**Date:** [YYYY-MM-DD]
**Last verified state:** [working / partially working / blocked]
**Resume prompt at the bottom of this file.**

---

## Current State

What's working right now? Be specific. The next session needs to know what to trust.

- ✅ [thing that is confirmed working]
- ✅ [thing that is confirmed working]
- ⚠️ [thing that is partially working — note the partial state]
- ❌ [thing that is broken — link to the most recent error]

**Last verified action:**

```
[the actual command or step you ran]
```

**Expected result:** [what should have happened]
**Actual result:** [what did happen]

---

## The Goal

**What we were trying to do:** [one sentence]

**Why it matters:** [one or two sentences — the next session needs context, not just instructions]

**Acceptance criteria:**
- [ ] [measurable outcome]
- [ ] [measurable outcome]
- [ ] [measurable outcome]

---

## Key Files & References

**Authoritative sources for this work, in priority order:**

- `[path to the authoritative spec, plan, or design doc]`
- `[path to the relevant config or code]`
- `[path to runbook, test plan, or operational doc]`

**Documentation being followed:**

- `[link or path]`
- `[link or path]`

**External references already consulted (and their conclusions):**

- `[link]` → [one-line conclusion or "not relevant — explain why"]

---

## What We Know Works

Verified components — do NOT re-test these. Re-testing is the second-most expensive thing a post-compaction session can do.

- [verified piece, with a link to the verification step or output]
- [verified piece]
- [verified credential / connection / endpoint]

---

## What's Open / Mysterious

Open questions, suspected issues, things to investigate. Don't act on these without checking with the human first.

- [ ] [question or suspected issue]
- [ ] [question or suspected issue]
- [ ] [thing that "should work" but hasn't been tested]

---

## Next Steps, in Order

1. [most important next action]
2. [next action]
3. [next action]
4. [next action]

**Do NOT skip ahead. The order matters.**

---

## TO RESUME

> Copy the block below and paste it as your first message to the next session.

```
Compaction may have happened, or this is a fresh session. Read this HANDOFF file end to end. Do NOT continue any pending work. Re-read [path to plan/spec], confirm what you understand, and ask me before acting on the open items. Verify any file or system state with your tools before assuming. Then walk me through the "What's Open" list and propose an order.
```

---

## Cardinal rules for the resuming session

1. **STOP.** Don't continue prior work without confirmation.
2. **Don't assume anything.** The summary you have is lossy.
3. **Read the documentation.** Don't paraphrase from memory.
4. **Verify with tools.** If the file system disagrees with the summary, the file system wins.
5. **Re-state the constraints.** The exceptions and "don'ts" are exactly what compaction softens into mush.
6. **Ask before acting.** The five minutes spent re-grounding are the cheapest insurance available.
