pub fn encode_captured_record(record: &CapturedRecord) -> StringExpand description
What:
Encode captured.json in the incumbent’s field order,
with a newline.
Why:
The capture writes exactly these bytes.
In TS you’d write (pseudocode):
`${JSON.stringify({ schemaVersion: 2, state: 'captured', worktreeId, sequence, nextSequenceBeforeBase, worktreePaths })}\n`