Each chain ends at something a user actually wants done.
gmail.api.ready (keep, rewrite)Confirms Gmail API access works — valid OAuth2 credentials, can list messages. The prerequisite for anything email.
gmail.draft.compose (new — replaces gmail.inbox.scan)Draft and save an email in Gmail drafts. Collect recipient, subject, body from the user. Handle CC/BCC if mentioned. Save as draft (not send) so the user can review. Confirm the draft exists in their drafts folder with a link or ID.
Why it's useful: "Draft me an email to X about Y" is one of the most common agent requests. The non-obvious part: save as draft, don't send. Let the human review.
gmail.search.query (new — replaces gmail.inbox.triage)Search Gmail using the advanced query syntax (from:, to:, subject:, has:attachment, after:, before:, label:, etc.). Translate natural language search intent into the correct Gmail query operators. Return matching messages with sender, subject, date, and snippet. If zero results, suggest query refinements.
Why it's useful: "Find that email from Sarah about the contract" requires knowing Gmail's query syntax. The seed encodes operator knowledge the model might get wrong (is it from: or sender:?).
local.files.ready (keep as-is)Verify filesystem access by creating and deleting a temp file. If permission denied, stop. Foundational sanity check.
document.file.selected (keep as-is)Get the user to specify a file, confirm it exists and is readable, report type/size/preview. The "point me at a file" handshake.
context.person.select (keep, tighten)Establish a specific person as working context — name + email, confirmed. The anchor for any person-oriented chain (email them, research them, schedule with them).
image.user.portraitObtain a high-quality photo of the user. Ask the user to provide their best headshot or portrait photo — file path, URL, or paste. Verify it loads, is at least 512×512, contains a clear face (not blurry, not group shot, not cropped awkwardly). If the image is low quality, explain specifically why and ask for a better one. Hold the validated image as the active portrait for subsequent operations.
Why it's useful: Getting a usable portrait from a user is harder than it sounds — quality gates, face detection, resolution requirements. This seed encodes the "is this actually good enough to work with?" judgment.
image.edit.modelVerify access to an image generation/editing model that supports inpainting or image-to-image edits (DALL-E, Stable Diffusion, Midjourney API, etc.). Test by running a minimal edit on a sample image — e.g., a simple style transfer or background change. Confirm the model accepts image input, returns edited image output, and the roundtrip works end-to-end. Report which model, what resolution it supports, and any constraints (rate limits, content policy).
Why it's useful: With portrait + edit model both confirmed, any downstream seed can chain them: "make my headshot look professional", "put me in a different background", "create an avatar". The two image roots unlock arbitrary image editing workflows.
gmail.api.ready → gmail.draft.composegmail.api.ready → gmail.search.querylocal.files.ready (root)document.file.selected (root)context.person.select (root)image.user.portrait (root)image.edit.model (root)