Prompt Engineering Context Code

Handoff Coding Projects — Mid-Refactor State Transfer

Day three of a multi-day code change, chat nearly full: hand off the merged work, the chosen approach, the dangerous cache risk, and the cron audit still pending.

Overview

Multi-day coding efforts carry the most intricate session state: which units are merged, which approach won (and which broke the report builder), which invariant is dangerous to miss. This setup loads a tenant-isolation marathon in Forensic fidelity — the RLS-over-rewrite decision with its reason, the analytics-replica exception as a constraint, the cross-tenant cache risk flagged as the dangerous one, the unverified-cron-paths assumption, and the audit task that must precede the cache work. The forensic rules make the next session quote this state, not reconstruct it.

How to use this resource

  1. Carry approach plus reason

    "RLS, because rewriting broke the report builder" — the why prevents relitigating the how.

  2. Flag the dangerous risk by name

    Cross-tenant cache leakage travels marked as the one to fear.

  3. Sequence the pending work

    The cron audit before the cache change — order survives the handoff.

Why This Works

  • Reasons traveling with decisions prevent the new session from re-deriving worse ones
  • Named dangers keep attention where the cost of forgetting is highest
  • Sequenced pending work preserves the plan, not just the list

Best for

  • Large refactors and migrations spanning sessions
  • Work with subtle invariants a fresh session would miss
  • Developers pairing with AI across days

Not for

  • Sending the source files themselves — that's the Long Prompt Splitter's codebase mode
  • Executing the refactor safely — that contract is the Refactor Prompt Builder's

Use cases

  • Continuing multi-day refactors across chats
  • Carrying the why behind technical choices
  • Keeping dangerous risks visible at the boundary

FAQ

How do the Forensic handoff rules stop a new AI chat from re-deriving decisions I already made?

The HANDOFF INSTRUCTIONS at Fidelity: Forensic tell the next session to accept everything as established context, preserve the KEY DECISIONS without silently reversing them, and quote this package rather than reconstruct from memory. So the RLS-over-query-rewriting choice travels with its reason (rewrite broke the report builder), and a fresh chat continues instead of relitigating the how.

Why does this handoff mark the cache keyspace as the dangerous risk and order the cron audit before it?

The RISKS section flags that the cache keyspace change could silently serve cross-tenant data if a key format is missed — labeled that's the dangerous one — so the highest-cost invariant stays visible. The PENDING TASKS TODO then sequences audit the cron entry points before touching the cache, preserving the plan's order across the handoff, not just the task list.

Will this handoff package carry my actual source files into the new chat, or only the session state?

It carries session state — CURRENT STATE, KEY DECISIONS, CONSTRAINTS, RISKS, and the RECOMMENDED NEXT STEP — not the code itself. notFor is explicit: sending the source files is the Long Prompt Splitter's codebase mode, and executing the refactor safely is the Refactor Prompt Builder's contract. The NOTE also reminds you items were extracted VERBATIM, so review and adjust before sending.

More resources from Context Handoff Builder

Resources that pair well

Related tools

Workflows that use this resource

Tip: Save time by exploring related resources and tools that integrate with this resource.