PROMPT CANVAS CANVAS

Role & Context

You are a Principal Context Engineer and Technical Project Continuity Architect. This conversation is about to end, and your sole objective is to generate a rigorous, zero-inference Session Handoff Document that transfers our complete operational state into a brand-new chat session without losing any shared assumptions, decisions, or edge cases.

Input Data

  • Project / Workflow Domain:
  • Next Session Primary Goal:
  • Handoff Granularity & Depth:

Step-by-Step Instructions

  1. Audit our entire conversation history from the very first message to the latest turn, calibrating your extraction to the project_domain, next_session_goal, and handoff_depth specified in Input Data.
  2. Do NOT write a vague, high-level retrospective summary. Instead, construct a deterministic 6-Part Session Handoff Document containing the following exact sections:
    • 1. What We've Completed: A concrete, specific inventory of finished deliverables and resolved problems (e.g., "Implemented JWT refresh rotation in auth.ts" rather than "Made progress on authentication").
    • 2. Current Progress State: Where the work stands at this exact second—what is partially built, what is currently in-flight, and the exact working state of any code, draft, model, or analysis.
    • 3. Prioritized Next Steps: An ordered execution queue for the next session directly aligned with next_session_goal, ensuring the new chat can begin productive work on Turn 1 without spending five messages figuring out where to start.
    • 4. Confirmed Decisions & Constraints: Every architectural choice, stylistic rule, scope boundary, or negative constraint we explicitly agreed upon (including approaches we tested and rejected) that must NOT be re-debated.
    • 5. Unresolved Questions & Open Blockers: Every outstanding decision, unverified assumption, or technical blocker that still needs resolution, made explicit so it does not silently vanish between sessions.
    • 6. Must-Not-Lose Items: High-risk context that would be painful to rediscover—custom terminology, non-standard requirements, subtle edge cases, or specific formatting conventions established during this session.
  3. Conclude by enclosing a ready-to-copy Next-Session Bootstrap Prompt block at the bottom that instructs the next AI session how to ingest this handoff document and immediately begin executing the next_session_goal.

Constraints

  • Match the technical specificity and structural density mandated by handoff_depth in Input Data.
  • Replace all vague generalizations with concrete identifiers, decisions, parameters, and explicit state descriptions.
  • Do not omit mid-conversation constraints or early foundational agreements that are still in effect.
  • Format the entire output in clean, scannable Markdown so it can be copied and pasted directly as the opening prompt of a new chat session.
# Role & Context
You are a Principal Context Engineer and Technical Project Continuity Architect. This conversation is about to end, and your sole objective is to generate a rigorous, zero-inference **Session Handoff Document** that transfers our complete operational state into a brand-new chat session without losing any shared assumptions, decisions, or edge cases.

# Input Data
- **Project / Workflow Domain**: 
- **Next Session Primary Goal**: 
- **Handoff Granularity & Depth**: 

## Step-by-Step Instructions
1. Audit our entire conversation history from the very first message to the latest turn, calibrating your extraction to the `project_domain`, `next_session_goal`, and `handoff_depth` specified in Input Data.
2. Do NOT write a vague, high-level retrospective summary. Instead, construct a deterministic **6-Part Session Handoff Document** containing the following exact sections:
   - **1. What We've Completed**: A concrete, specific inventory of finished deliverables and resolved problems (e.g., "Implemented JWT refresh rotation in `auth.ts`" rather than "Made progress on authentication").
   - **2. Current Progress State**: Where the work stands at this exact second—what is partially built, what is currently in-flight, and the exact working state of any code, draft, model, or analysis.
   - **3. Prioritized Next Steps**: An ordered execution queue for the next session directly aligned with `next_session_goal`, ensuring the new chat can begin productive work on Turn 1 without spending five messages figuring out where to start.
   - **4. Confirmed Decisions & Constraints**: Every architectural choice, stylistic rule, scope boundary, or negative constraint we explicitly agreed upon (including approaches we tested and rejected) that must NOT be re-debated.
   - **5. Unresolved Questions & Open Blockers**: Every outstanding decision, unverified assumption, or technical blocker that still needs resolution, made explicit so it does not silently vanish between sessions.
   - **6. Must-Not-Lose Items**: High-risk context that would be painful to rediscover—custom terminology, non-standard requirements, subtle edge cases, or specific formatting conventions established during this session.
3. Conclude by enclosing a ready-to-copy **Next-Session Bootstrap Prompt** block at the bottom that instructs the next AI session how to ingest this handoff document and immediately begin executing the `next_session_goal`.

## Constraints
- Match the technical specificity and structural density mandated by `handoff_depth` in Input Data.
- Replace all vague generalizations with concrete identifiers, decisions, parameters, and explicit state descriptions.
- Do not omit mid-conversation constraints or early foundational agreements that are still in effect.
- Format the entire output in clean, scannable Markdown so it can be copied and pasted directly as the opening prompt of a new chat session.
🚀 Copy Compiled Prompt & Launch in:

Session Handoff Document & Context Continuity

Productivity & SOPs 2026-10-03T19:24:00Z
👁️ 0

Key Capabilities

  • Zero-Loss Cross-Session State Transfer: Captures concrete progress, active working state, and non-standard constraints right before a conversation closes so your next chat starts informed rather than cold.
  • "Lost in the Middle" Context Rot Mitigation: Bypasses the U-shaped attention degradation of overgrown chat threads by distilling 80+ turns of noisy history into a clean, high-signal bootstrap payload.
  • Decision Locking & Blocker Isolation: Explicitly separates settled architectural or stylistic decisions from unresolved questions, preventing the new session from re-debating closed choices or silently dropping open risks.

Underlying Mechanism

Empirical research on large language models ("Lost in the Middle: How Language Models Use Long Contexts", Liu et al., 2023) demonstrates that LLM recall follows a U-shaped curve: models reliably attend to the very beginning and very end of a conversation while diluting instructions buried in the middle. As a session grows long, earlier constraints weaken and small inconsistencies accumulate—a phenomenon known as context rot. Rather than asking for a generic compression summary (which strips away operational nuance), this prompt executes a 6-Part Context Injection Protocol from inside the outgoing session. Because the active model still holds the full conversational trajectory, it can serialize finished deliverables, in-flight states, locked decisions, open blockers, and fragile edge cases into a deterministic state snapshot ready to initialize a fresh context window.

Ideal Use Cases

  • Multi-Session Coding & Architecture Refactors: Preserving modified file paths, resolved bug root causes, rejected approaches, and active module states across daily engineering sprints.
  • Long-Form Writing & Editorial Projects: Maintaining voice constraints, structural outlines, completed sections, and core thesis arguments without spending 20 minutes re-reading drafts.
  • Deep Research & Hypothesis Synthesis: Carrying forward reviewed literature, active hypotheses, excluded data sources, and open investigative threads across multi-week research workflows.
  • Business Strategy & Product Roadmapping: Keeping foundational positioning and resource trade-offs visible across sequential planning sessions.

When NOT to Use (Anti-Patterns)

  • Short, single-turn, stateless lookup tasks that will be completed inside a single interaction.
  • Heavily hallucinated or derailed chat threads where false premises have not yet been corrected (always correct bad assumptions before serializing state).

Pro Tip

Maintain a running archive of your session handoffs in a local prompt manager (such as Prompt Vault). When you open your next chat tab, paste the generated handoff document at the very top of your first message and append: "Ingest this session handoff document, confirm alignment in 3 concise bullet points, and immediately begin executing Priority #1 under Next Steps."

Source Reference: Before You Close That ChatGPT Tab, Run This One Command First

🎯 Real Output Example

Generated using this exact prompt structure with the default variable values.

Session Handoff Document: Multi-Tenant Billing Webhook Pipeline

1. What We've Completed

  • Idempotency Store Schema: Finalized PostgreSQL webhook_events table schema (event_id PK, provider, payload_hash, status, processed_at) with composite indexing on (provider, status).
  • Signature Verification Middleware: Completed raw-body HMAC-SHA256 verification handler in src/api/webhooks/stripeVerify.ts with constant-time comparison.
  • Retry & Dead-Letter Policy: Designed exponential backoff schedule (5 attempts over 6 hours) routing terminal failures to the billing_dlq queue.

2. Current Progress State

  • Completed & Verified: Database migration 0042_webhook_idempotency.sql and stripeVerify.ts middleware.
  • Currently In-Flight (60% Complete): src/services/billing/subscriptionSync.ts — handles customer.subscription.updated and invoice.payment_failed, but does not yet handle mid-cycle seat proration (proration_behavior: 'always_invoice').
  • Not Yet Started: Integration test suite using mocked Stripe event payloads and DLQ replay CLI script.

3. Prioritized Next Steps

  1. Finish subscriptionSync.ts Proration Logic: Implement deterministic seat-delta calculation for mid-cycle upgrades/downgrades without double-charging on out-of-order webhook delivery.
  2. Write Out-of-Order Timestamp Guard: Reject or defer incoming customer.subscription.updated events where event.created < tenant.last_synced_event_ts.
  3. Generate Vitest Integration Suite: Test duplicate event delivery, out-of-order timestamps, and partial DB transaction rollback.

4. Confirmed Decisions & Constraints (Do NOT Re-Debate)

  • Runtime & ORM: Node.js 22 + TypeScript (strict mode) + Drizzle ORM. Rejected Prisma due to cold-start latency in serverless workers.
  • No Synchronous Downstream Calls: The webhook HTTP endpoint must ACK (202 Accepted) within 150ms after signature verification and idempotency insert; all heavy Stripe API lookups happen asynchronously in the worker.
  • Locking Strategy: Use PostgreSQL SELECT ... FOR UPDATE SKIP LOCKED instead of introducing Redis/BullMQ to avoid adding a new infrastructure dependency.

5. Unresolved Questions & Open Blockers

  • Grace Period Behavior on Failed Renewals: Need to confirm whether past_due tenants retain write access for 72 hours or immediately drop to read-only mode.
  • Multi-Currency Tax Edge Case: How to normalize tax_amounts when a tenant migrates billing address from EU (VAT inclusive) to US (sales tax exclusive) mid-cycle.

6. Must-Not-Lose Items

  • Raw Body Parsing Quirk: Astro/Node adapter strips raw request buffers if request.json() is called upstream; always read await request.arrayBuffer() inside stripeVerify.ts before any JSON parsing.
  • Custom Definition — effective_seat_limit: In our codebase, effective_seat_limit = base_plan_seats +override_bonus_seats (never overwrite override_bonus_seats during standard webhook syncs).

Ready-to-Paste Next-Session Bootstrap Prompt

Please read the Session Handoff Document above carefully. It contains the exact state, locked architectural decisions, and edge cases from our previous working session.

Do not re-debate the Confirmed Decisions. First, confirm your understanding of our current state in 3 concise bullet points, and then immediately begin executing Priority #1 under Prioritized Next Steps: implementing the mid-cycle seat proration and out-of-order timestamp guard in `src/services/billing/subscriptionSync.ts`.

🧬 Prompt Variables & Input Reference

Variable Tag What to Enter Default Example Value
{{project_domain}} The primary domain or workflow type of the current conversation Full-Stack Software Engineering & System Architecture
{{next_session_goal}} The immediate objective or milestone to tackle first when starting the next chat session Resume implementation from the current in-flight module without re-debating confirmed architecture choices
{{handoff_depth}} The level of technical specificity, state detail, and edge-case documentation to preserve Comprehensive State Injection (Exact file/module status, explicit constraints, and edge-case warnings)

📋 How to Use This Prompt

1

Customize on Prompt Canvas

Click any {{variable}} directly on the canvas to choose a ⚡ Quick Preset or type your own value in the popover editor.

2

Copy Compiled Prompt

Click Copy Prompt to grab the ready-to-run prompt with your custom inputs already injected—or save it to your ⭐ Prompt Vault.

3

1-Click Launch in AI

Hit the ChatGPT, Claude, DeepSeek, or Gemini launch buttons to copy and open your preferred model in one click.