Generate handoff.md and handoff.json from workbench artifacts at session end so the next session is productive in the first minute. Both forms carry the same seven fields; the JSON wins on disagreement.
agent_state.json,verification_report.json,review_report.json,feedback_record.jsonlfrom earlier lessons- The seven fields: summary, changed_files, commands_run, failed_attempts, open_risks, next_action, verdict_pointer
- A
WorkbenchSnapshotloader bundling the four artifacts generate_handoff(snapshot) -> (markdown, payload)- A feedback filter that picks the last K records plus every non-zero exit
handoff.mdandhandoff.jsonwritten next to the script
python3 code/main.pyexits zero- Both files carry all seven fields and a non-empty
next_action - Re-running the script with the same inputs produces an identical packet
- Compaction strategies (Codex compact endpoint, Claude Code five-stage). Handoff closes a session; compaction extends one.
- PR templating. The markdown is reusable as a PR body but the lesson stops at the file.
docs/en.md- full lessoncode/main.py- reference implementationoutputs/skill-handoff-generator.md- extracted skill