Make Work Survive Across Sessions¶
What you build¶
The pattern from Anthropic's long-running harness, in exercise/sessions.py:
initialize: run once; write a JSON feature list (allpasses: false), a progress log and a first checkpointstart_session: the routine every session runs first: next feature, recent progress, last checkpoint, a smoke check, and re-verification of anything the records claim is passingcomplete_feature: flippassesonly after a passing check; log either way; checkpoint on successguard_feature_list: reject rewrites that change anything exceptpasses
Checkpoints are folder snapshots so the project runs anywhere; in a real repository use git commits.
Steps¶
- Read
test_sessions.py, especially the crash test and the "records that lie" test. - Implement the four functions.
python -m pytest -quntil all six pass.
Done when¶
- A crash mid-feature is detected at the next session start and rolled back.
- A hand-edited feature list that claims an unbuilt feature works is caught.
Stretch goals¶
- Replace folder snapshots with
git commitandgit reset --hard <sha>. - Add a
handoff()that renders the handoff template from the records.