Skip to content

feat(skills): write and read handoffs as Markdown files on the Drive mount - #561

Merged
twistedmelonman merged 1 commit into
mainfrom
claude/feat-handoff-markdown-808b25fa
Sep 22, 2026
Merged

twistedmelonman merged 1 commit into
mainfrom
claude/feat-handoff-markdown-808b25fa

Conversation

@twistedmelonman

Copy link
Copy Markdown
Owner

The handoff skills wrote and read native Google Docs through the Drive connector. On the synced mount a Doc is a 177-byte .gdoc stub with no content, so reading needed the connector, folder placement failed whenever the connector could not return a folder id, and the Doc conversion backslash-escaped identifiers so that a grep for one came back empty. Details and measurements are in #556.

Both skills now use the folder as a path on the synced mount. prepare-handoff writes Claude Handoff - <workstream> - <YYYY-MM-DD HHMM>.md and retires the older ones with rm. receive-handoff lists the folder and reads the file directly. Both find a workstream's files with a glob anchored on the timestamp, because a prefix match on CLI Tooling - also catches a workstream named CLI Tooling - Phase 2, and prepare would then delete that workstream's handoff. All four existing handoffs were already converted to .md on 2026-09-22, so the Doc read path is removed outright rather than kept for the transition.

Two places where this departs from the issue. The issue suggested falling back to the connector when no mount is found; the only connector write creates a Doc, which brings the escaping back, so the fallback stays as plain text for pasting. And receive-handoff picks the newest file by the timestamp in its name rather than by mtime, because the 2026-09-22 conversion gave three older handoffs that day's mtime.

I don't know yet whether a retired handoff is recoverable. A deleted file showed up in the mount's .Trash/ and was cleared from there minutes later once Drive synced the deletion; whether it then sits in the Drive web trash is unconfirmed, so the skill says so instead of promising 30 days. My earlier comment on #556 claimed that as verified, and I've corrected it there.

I walked the new receive steps against the live folder: it found four workstreams, selected the 2026-09-22 1133 handoff, and reported the one remaining .gdoc as a legacy stub.

…mount

prepare-handoff 1.4.0 -> 2.0.0, receive-handoff 1.3.0 -> 2.0.0.

Handoffs were native Google Docs written and read through the Drive
connector. A Doc has no readable form on the synced mount (the .gdoc is a
177-byte JSON stub), so both skills depended on the connector loading, folder
placement failed whenever the connector could not return a folder id, and the
plain-text-to-Doc conversion backslash-escaped identifiers on the way back.

Both skills now treat the handoff folder as a path. The mount is found by
globbing ~/Library/CloudStorage/GoogleDrive-*/My Drive, the export is written
with Write as `Claude Handoff - <workstream> - <YYYY-MM-DD HHMM>.md`, and
receive reads it with Read. The connector section, the folder-id search, the
escaping paragraphs, and the strip-backslashes table are gone.

Retiring a superseded handoff is now `rm` on the older .md files. Both
skills find a workstream's files with a glob anchored on the timestamp, not a
prefix match: a prefix match on `CLI Tooling - ` also matches a workstream
named `CLI Tooling - Phase 2`, which would make prepare delete that
workstream's handoff and receive read it as this one's newest. Reproduced in
a scratch folder before the fix.

What happens after `rm` is only partly verified. A deleted handoff showed up
under the mount's .Trash/ and was cleared from there minutes later, once
Drive synced the deletion; whether it then stays in the Drive web trash has
not been confirmed, so the skill does not promise it is recoverable. A legacy
.gdoc is reported and left in place, since deleting a stub has not been
verified to trash the Doc.

receive-handoff selects the newest handoff by the timestamp in the filename,
not mtime. Converting three older handoffs to .md on 2026-09-22 gave all of
them that day's mtime, so mtime no longer orders them.

With no synced mount, the fallback is the existing one: give the export as
plain text to paste. It does not fall back to creating a Doc through the
connector, which would bring the escaping back.

Closes #556
@twistedmelonman
twistedmelonman merged commit 240031c into main Sep 22, 2026
6 checks passed
@twistedmelonman
twistedmelonman deleted the claude/feat-handoff-markdown-808b25fa branch September 22, 2026 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant