Lesson 055: Session Continuity via Documentation Artifacts

Lesson 055: Session Continuity via Documentation Artifacts

The Lesson

When working across multiple AI-assisted sessions, continuity must be encoded in files, not in conversation history. A startup document, a plan file with status tracking, and a project CLAUDE.md that reflects current state eliminate ramp-up overhead and prevent context loss from session clears and context compaction.

Context

A developer working across 64 sessions on 5+ projects needed seamless session handoffs. Each session started with full context loss — no memory of previous conversations. Early sessions wasted 10-15 minutes re-establishing context: "we were working on Phase 7, the tests pass, here's what's left." Later sessions solved this by maintaining durable artifacts that any session could read to immediately understand the project state.

What Happened

  1. Initially relied on conversation history and memory to track state. This failed when sessions were cleared, context was compacted, or the developer switched between projects. Re-explaining the current phase, what had been tried, and what was blocking cost significant time.

  2. Introduced three artifact types:

    • CLAUDE.md — project-level context: architecture, conventions, data model, current status. Read by every session automatically.
    • Startup/memory files — session-specific state: current branch, ahead/behind status, active plan file, phase in progress, unresolved decisions. Updated at session end.
    • Plan files — work tracking: phase rows with Open/Started/Completed status and PST timestamps. The plan IS the progress record.
  3. Added a discipline: after completing a phase or major task, always update the startup doc before ending the session. This was initially manual ("please update STARTUP.md") but became part of the workflow (the /phase skill updates the plan file automatically).

  4. Measured the impact: sessions with current artifacts ramped up in under 1 minute (read CLAUDE.md + startup → know exactly where to continue). Sessions without artifacts took 5-15 minutes of "let me read the git log and figure out what we were doing."

  5. Context compaction — where the AI summarizes earlier conversation to free space — was the biggest threat to continuity. Compact instructions in CLAUDE.md specify what must survive compaction verbatim: branch name, plan file path, current phase, open questions, user corrections, exact file paths. Without these, compaction would genericize critical details ("we did some work" instead of "Phase 7 row 7.3 is Started, commit pending").

Key Insights

Applicability

This pattern applies to any multi-session workflow with an AI coding assistant:

Does NOT apply when:

Related Lessons