// TL;DR

When the user types "handoff" — generate a handoff file immediately. No "should I?", no confirmation. Read the last five handoff files first for continuity, and use the format handoff-YYYY-MM-DD-HHMM.md.

Why the rule exists

An AI session ends when the context window runs out, or when the user switches projects. The next session — an hour or a week later — starts blank. The handoff file is the only way to give "future me" or "my colleague" the context needed to take over without repeating questions.

If handoff is optional, it gets forgotten. So it's automatic: the word triggers the action.

The trigger

User types
handoff (alone or in a sentence)
Reaction
Generate the file immediately — no "do you want me to…", no confirmation.
Read first
find . -name "handoff-*.md" | sort | tail -5 — for continuity.
Filename
handoff-YYYY-MM-DD-HHMM.md — e.g. handoff-2026-05-10-1530.md
Location
In the project root, or wherever previous handoffs live.

The 5 sections

Every handoff has the same five sections. In order:

  1. Status. Where are we right now? One sentence. E.g. "Foreningsliv is live at sker.dk, MySQL migration is running, but auto-provisioning fails on first OIDC login."
  2. Recent changes. What did we touch this session? With file paths where relevant.
  3. Known issues. Bugs, errors, suspicious behaviour. Including: "I couldn't reproduce this, but the user has seen it."
  4. Next steps. What's the first thing to happen next session? Concrete enough that the next agent can start without asking.
  5. Important context. Decisions, traps, "we tried X, doesn't work because Y." The stuff that would cost the next session 30 minutes to figure out alone.

Example

# handoff-2026-05-10-1530.md

## Status
RestPartiDK auctions work for direct purchase, but the anti-sniping
extension does not fire on bids placed in the last 5 minutes.

## Recent changes
- Added AntiSnipingService.ExtendIfRecentBid() in
  src/RestPartiDK.Application/Auctions/
- Bug fix in BidController.PlaceBid where cache wasn't invalidated
- 12 new tests in RestPartiDK.Tests.Auctions (all green)

## Known issues
- Anti-sniping doesn't fire when a bid arrives < 60s before close.
  Suspect: Hangfire MemoryStorage drops jobs on restart.
- Test PlaceBid_DuringExtension_KeepsAuctionOpen is flaky
  (passes 9/10 times).

## Next steps
1. Reproduce the anti-sniping bug locally with MySQL storage instead of Memory.
2. If that doesn't fix it — instrument with Serilog inside ExtendIfRecentBid.
3. Stabilise the PlaceBid test (suspect a race on _clock.UtcNow).

## Important context
- Hangfire is on MemoryStorage due to a MySqlConnector version conflict
  with Pomelo. Switching requires a full package lift — not a 5-minute fix.
- Anti-sniping = extend the auction by 5 min if a bid arrives in the
  last 5 min of the window. Spec in docs/restparti-platform-analyse.md.

What you don't do


Related rules