Sometimes you need a fresh chat (for example, when the context window is exhausted or you’re switching clients). To preserve continuity without re‑explaining the project:
In your current chat, ask STAN for a “handoff” (e.g., “handoff for next thread”).
STAN returns a single self‑identifying code block that contains:
Current state from the latest run (Build/Test/Lint/Typecheck/Docs/Knip)
Outstanding tasks / near‑term focus
Assistant startup checklist (what STAN should do first next thread)
In the new chat:
Paste the handoff block as the first message.
Attach the latest .stan/output/archive.tar (and archive.diff.tar if present).
STAN will verify the signature, load the prompt from the archive, and execute the startup checklist.
Note: If you paste an existing handoff block into an ongoing chat, STAN treats it as input (it will not generate a new handoff unless you explicitly ask).
Rinse and repeat
Return to step 1 and continue until the feature is complete, CI is green, and the plan (.stan/system/stan.todo.md) is up‑to‑date.
Why this loop?
Reproducible context: all inputs to the discussion are deterministic (source snapshot + text outputs).
Auditable diffs: patches are plain unified diffs with adequate context; failures come with actionable FEEDBACK.
Minimal ceremony: one command to capture, one to apply.
Pro tips
Keep patches tight and anchored. Include ≥3 lines of context and use a/ and b/ path prefixes.
Use --check before overwriting files; let FEEDBACK drive corrections instead of manual fixes.
Update .stan/system/stan.todo.md as part of each change set; include a commit message (fenced) in chat.
Prefer smaller loops (fewer files at a time) when exploring or refactoring to keep reviews fast and reliable.