feat(skills): write and read handoffs as Markdown files on the Drive mount - #561
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The handoff skills wrote and read native Google Docs through the Drive connector. On the synced mount a Doc is a 177-byte
.gdocstub 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>.mdand retires the older ones withrm. 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 onCLI Tooling -also catches a workstream namedCLI Tooling - Phase 2, and prepare would then delete that workstream's handoff. All four existing handoffs were already converted to.mdon 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
.gdocas a legacy stub.