Flows category icon
Memory & Context
Advanced

Cross-Session Project State

Keep long-horizon work coherent across many sessions: externalized project state that any session can load, advance, and hand off.

4 steps12 verify checks90-120 minutesWorks with: emergent · chatgpt · claude · cursor
Start Guided Walkthrough

The Route

0/4 verified

Context Pack

Paste this first. It briefs the AI on requirements, constraints, and the Definition of Done before your first build prompt.

Context Pack
PROJECT CONTEXT:
My project spans dozens of agent sessions and each one starts half-blind: re-discovering the plan, redoing analysis, contradicting past decisions. Long-horizon research (external memory architectures, handoff patterns) treats project state as a first-class external artifact.

GOAL:
Build an externalized project-state system: a canonical state document maintained across sessions, with load, advance, and handoff protocols.

REQUIREMENTS:
- A canonical PROJECT_STATE document: goal, milestones, current position, decisions, blockers
- A session-start protocol loading state and orienting the agent
- A session-end protocol advancing state with what changed
- Handoff quality: a brand-new session (or agent) can continue without human re-explanation
- State-vs-reality validation to catch drift (state says X, code says Y)

CONSTRAINTS:
- The state document is the single source of truth - sessions serve it, not vice versa
- State updates record deltas with dates, never silent rewrites of history

DEFINITION OF DONE:
- Session N+1 continues exactly where session N stopped, verified across a 5-session task
- A cold-start handoff test passes: fresh context, state doc only, correct continuation
- Decisions made in early sessions are honored in late ones
- Drift between state and repository reality is detected and flagged at session start

COMMON FAILURES TO AVOID:
- Plans living in chat history, evaporating at session end
- State documents that describe the past but not the current position and next action
- Sessions editing state destructively so history and rationale vanish
- State drifting from code reality until it misleads instead of orients

Paste this into your AI builder first. It teaches the AI what you want before you give it the build prompt.

Related routes

More Memory & Context flows that share ground with this one.

Flows category icon
Memory & Context

Session Summaries That Survive Compaction

Write durable session summaries at the right moments so knowledge outlives compaction and process restarts.

01Define what deserves to survive
02Write at the moments that matter
03Load summaries into new sessions

+1 more steps to Done

Best forbuilders who have shipped a basic app before

4 steps60-90 minutesIntermediate
Flows category icon
Memory & Context

Add File-Based Persistent Memory

Give your agent durable memory with plain files - the radical-minimalism approach production practitioners keep converging on.

01Design the memory file structure
02Load memory at session start
03Build the guarded memory_update tool

+1 more steps to Done

Best foryour first pass at this - no prior setup assumed

4 steps45-75 minutesBeginner
Flows category icon
Memory & Context

Design a Memory Index Loaded Every Session

Build the pattern behind minimalist memory systems: a compact index file the agent always loads, pointing to detail files it loads on demand.

01Structure the index and details
02Wire loading: index always, details on demand
03Maintain the index as memory evolves

Best forbuilders who have shipped a basic app before

3 steps60-90 minutesIntermediate

Made with Emergent