Skip to content

feat(mail-create): local Maildir backend — closes the outbound-mail vendor gap (100%) - #685

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:mail-create-maildir-backend
Jul 3, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
potiuk:mail-create-maildir-backend

Conversation

@potiuk

@potiuk potiuk commented Jul 3, 2026

Copy link
Copy Markdown
Member

What

Adds tools/maildir/ — a local Maildir backend (Vendor: Maildir)
that is the second, non-Google implementation of contract:mail-create.
This flips the last red cell in the vendor-neutrality score:

  • contract:mail-create: ❌ → ✅ (Google + Maildir)
  • Overall score: 9/10 → 10/10 (100%)
  • Vendor-coupled skills: 4 → 0 — security-issue-import,
    -import-via-forwarder, -invalidate, -sync were coupled to Gmail
    for drafting; they are now portable.

The backend

tools/maildir/ is the offline, credential-free, stdlib-only local
counterpart of tools/gmail. Like Gmail it bundles both mail directions
behind one vendor:

  • contract:mail-create (fully implemented + tested) — composes a
    plain-text RFC 5322 message and files it into a local Maildir with the
    D (draft) flag, where any Maildir-aware client (Thunderbird, mutt,
    Evolution, aerc, …) shows it in Drafts for the human to review, edit,
    and send. It never sends: --mode send is the contract's
    declared-but-unimplemented seam and errors. URLs preserved verbatim (no
    tracking-redirect rewriting); single-part text/plain only.
  • contract:mail-source — the local mbox/Maildir archive reader,
    reusing the existing tools/mail-source/mbox contract (reader stays the
    documented stub). This tool is its concrete vendor home, so mail-source
    now lists three vendors (Google, Maildir, PonyMail).

Fully offline: a draft never leaves the machine, and no third party sees
the message or its links — the decisive contrast with any cloud backend.

Contents

Verification

Full pre-commit suite green — ruff, ruff-format, mypy (workspace),
pytest (workspace), skill-and-tool-validate, doctoc, markdownlint,
lychee. The vendor-neutrality scorer reports 10/10 (100%).

…(100%)

`contract:mail-create` (outbound mail composition) had a single backend
vendor — Google (`tools/gmail`) — so it was the last red cell in the
vendor-neutrality score. This adds a second, non-Google implementation
and flips the contract green: the overall score reaches 10/10 (100%) and
the four skills that were vendor-coupled to Gmail for drafting become
portable (0 vendor-coupled skills remain).

`tools/maildir/` is the local-files mail backend (Vendor: Maildir): an
offline, credential-free, stdlib-only tool that is the local counterpart
of `tools/gmail`. Like Gmail it bundles both mail directions behind one
vendor:

- contract:mail-create (fully implemented) — composes a plain-text
  RFC 5322 message and files it into a local Maildir with the `D` (draft)
  flag, where any Maildir-aware mail client shows it in Drafts for the
  human to review, edit, and send. Never sends: `--mode send` is the
  contract's declared-but-unimplemented seam and errors. URLs are
  preserved verbatim (no tracking-redirect rewriting), single-part
  text/plain only.
- contract:mail-source — the local mbox/Maildir archive reader, reusing
  the existing `tools/mail-source/mbox` contract (reader stays the
  documented stub); this tool is its concrete vendor home, so mail-source
  now lists three vendors (Google, Maildir, PonyMail).

Includes the package (stdlib only), tests, workspace-member registration,
docs (labels-and-capabilities tool map, vendor-neutrality prose + the
regenerated score block), and a cross-reference from the mbox stub.
@potiuk
potiuk merged commit 4173edd into apache:main Jul 3, 2026
32 checks passed
@potiuk potiuk added contract:mail-create Tool capability: outbound mail composition (editable draft; sending is a separate human step) contract:mail-source Tool capability: inbound-mail ingestion (mbox / IMAP / ...) labels Sep 25, 2026
@potiuk potiuk added family:ci .github workflows, prek, validators family:docs Docs, MISSION.md, READMEs family:tools tools/* labels Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contract:mail-create Tool capability: outbound mail composition (editable draft; sending is a separate human step) contract:mail-source Tool capability: inbound-mail ingestion (mbox / IMAP / ...) family:ci .github workflows, prek, validators family:docs Docs, MISSION.md, READMEs family:tools tools/*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant