--- name: mail-draft description: >- Drafts outgoing email and never sends: Markdown to mail-safe HTML themed from DESIGN.md, footers from identity/mail-footers/, occasions from workflow/mail-profiles/, recipients from mandants, preflight checks; Apple Mail, Outlook, IMAP or .eml. Trigger: "draft an email", "mail to", "email draft", "mail footer", "email signature", "mail profile". metadata: scope: core allowed-tools: - Bash(skills/mail-draft/mail-draft.sh:*) - Read - Write --- # mail-draft Builds a mail as a DRAFT in the person's mail client. The person reads it and presses Send. There is no send command, not behind a flag, not in any client module: a draft that is wrong costs a minute, a sent mail that is wrong cannot be taken back. "Send X to Y" is a request for the finished draft. Engine: `skills/mail-draft/mail-draft.sh` (Python, stdlib + PyYAML). Model and every field: [`docs/mail-draft.md`](../../docs/mail-draft.md). ## What decides what | Question | Answered by | Tier | |---|---|---| | Who signs, how to reach them | `identity/mail-footers/.yaml` (borrows from a persona) | user / org | | What occasion, which footer, greeting, attachments | `workflow/mail-profiles/.yaml` | user / org | | Who receives it, in which language, formal or not | `identity/mandants/.yaml` (`mail_profile`, `defaults.language`, `defaults.address_form`) | user | | Colours and type | `DESIGN.md` through the `design` theme | core / fork | | Machine defaults (client, drafts folder) | `bridge-config.yaml` `mail:` | user | | Which senders store drafts on the server, on which machines | `bridge-config.yaml` `mail.imap_accounts` | user | CORE ships only the engine, the two `_schema.yaml` and the two `_template.yaml`. Every real footer and profile is a USER file (or `org` when a team shares one through an overlay), and the schema refuses `scope: core` for a footer. ## Decision tree ``` Request about mail ├── write / draft / "send" a mail ──────────► § Draft a mail ├── answer / reply to a mail ───────────────► § Reply (--reply-as-new) ├── "how will X be addressed?" ─────────────► mail-draft.sh explain --to X ├── new footer / signature / profile ───────► § Set up ├── paste a signature into Outlook/Mail ────► mail-draft.sh signature