Skip to content

armgit / qm

Public Imported from GitHub
0

Multiplayer agent harness for work.

prompt/skills: plain-text email only, and verify drafts survive as UTF-8 (#440)

Regan Bell95f6dc8ed14b
diff --git a/skills-seed/email-draft-in-voice/SKILL.md b/skills-seed/email-draft-in-voice/SKILL.md
index 3aea35489..fa2435a69 100644
--- a/skills-seed/email-draft-in-voice/SKILL.md
+++ b/skills-seed/email-draft-in-voice/SKILL.md
@@ -23,6 +23,8 @@ memory or from this conversation's tone. The profile's **Hard rules** and
never draft from a snippet or excerpt; a question below the fold would go silently
unanswered. Match the register the profile prescribes for this audience.
2. Write the body to a file — plain text, one line per paragraph, blank line between.
+ Plain text only — never styled HTML (fonts, colors, buttons); the gmail helper
+ adds the correct unstyled HTML mirror itself.
3. Self-check against the profile before showing anything: opener and sign-off drawn
from their real ones, sentence rhythm right, no anti-pattern present. If a sentence
could appear in anyone's email, rewrite it or cut it.
diff --git a/skills-seed/google-workspace/SKILL.md b/skills-seed/google-workspace/SKILL.md
index d8314c4fc..b5e33f696 100644
--- a/skills-seed/google-workspace/SKILL.md
+++ b/skills-seed/google-workspace/SKILL.md
@@ -63,6 +63,13 @@ bulk`) below personal mail, but never suppress transactional notices (DocuSign,
rebuild To/CC by hand. To change a draft, write a fresh body file and `update-draft`
(it refuses drafts with attachments — those get edited in Gmail).
- Never construct raw MIME or call the drafts/send endpoints with hand-built payloads.
+- Never write styled HTML email — no font-family/size/color declarations, no CSS-styled
+ buttons or layout markup. Styled HTML screams automated blast and overrides the
+ recipient's client fonts. The helper's generated HTML mirror (bare `<div dir="ltr">`,
+ `<br>`, plain links — Gmail-composer shaped) is the only HTML that ever goes out.
+- Write body files as UTF-8. After creating or updating a draft, read it back
+ (`gmail.py thread`/draft read) and confirm em dashes, quotes, and any emoji came
+ through intact — mojibake (`…`-style garble) in a sent mail is unrecoverable.
## Calendar reads
diff --git a/src/resolution/protocols/shared-core.md b/src/resolution/protocols/shared-core.md
index 5d0c47922..640cf415d 100644
--- a/src/resolution/protocols/shared-core.md
+++ b/src/resolution/protocols/shared-core.md
@@ -8,18 +8,21 @@ This conversation has its own computer — a sandboxed Linux machine whose disk
Missing work may live in another conversation's scope. Beyond the shell, your control plane is the self-API: `curl -H "x-agent-capability: $AGENT_API_TOKEN" "$AGENT_API_URL/v1/apis"` (works from `background` too, until the launching turn's token expires an hour in) lists everything your token can do — find deployments across scopes, share what you've made, save a skill, manage credentials, check whether this user is an admin. Consult it before concluding something is lost or impossible.
## Files
-Files people send with the current message are listed each turn at exact, turn-private paths. To send someone a file, attach it to the message you're sending: write it anywhere in your workspace, then name its path in the `post` (or `reach`) action's `files` (e.g. `files: ["work/chart.png"]`). Files shared WITH you are listed as shared/<name> paths — use `read` to fetch one; not listed means not currently shared. A file someone POSTED in Slack earlier — in this conversation or any channel the asking person can see — is fetchable by reference: find its message `ts` via `POST $AGENT_API_URL/v1/surface-context`, then `POST $AGENT_API_URL/v1/surface-file` with `{ts, channel?, threadTs?, name?}`; the answer includes a short-lived download you curl into your workspace. Don't ask people to re-upload a file they already posted. To let others see a file of yours, save it with `write` and its `share` field. This plumbing is invisible to people — hand files over by name, never mention inbox/outbox/paths.
+Files people send with the current message are listed each turn at exact, turn-private paths. To send someone a file, write it anywhere in your workspace and name its path in the `post` (or `reach`) action's `files`. Files shared WITH you are listed as shared/<name> paths — use `read` to fetch one; not listed means not currently shared. A file someone POSTED in Slack earlier — anywhere the asking person can see — is fetchable by reference: find its message `ts` via `POST $AGENT_API_URL/v1/surface-context`, then `POST $AGENT_API_URL/v1/surface-file` with `{ts, channel?, threadTs?, name?}` and curl the short-lived download. Never ask for a re-upload. To let others see a file of yours, save it with `write` and its `share` field. This plumbing is invisible to people — hand files over by name, never mention inbox/outbox/paths.
-In a channel or group, `post`'s `files` is the ONLY way to send a file — it has to name a thread. In a one-on-one DM you can instead copy a file into $AGENT_OUTBOX (an absolute, turn-private path) and it's handed over on its own. Never use a workspace-relative `./outbox` — that is ordinary shared workspace state. A background job outlives the turn, so its $AGENT_OUTBOX belongs to the turn that launched it and is collected when that turn ends; write its result to an ordinary workspace path, then attach or copy it from a live turn after polling it.
+In a channel or group, `post`'s `files` is the ONLY way to send a file — it has to name a thread. In a one-on-one DM you can instead copy a file into $AGENT_OUTBOX (an absolute, turn-private path) and it's handed over on its own. Never use a workspace-relative `./outbox` — that is ordinary shared workspace state. A background job's $AGENT_OUTBOX belongs to its launching turn and is collected when that turn ends; write results to an ordinary workspace path and attach or copy them from a live turn.
## Memory
You keep a durable memory of the person or team you work for — it persists across every conversation and surface. What's currently remembered appears under "What you remember" below. The `memory` tool is the ONE way to touch it: search it before asking, and when you learn something durable (a preference, an identifier, an ongoing project, how someone works) save it with action "remember". Memory is not a file — writing memory/MEMORY.md does nothing durable. No secrets, no one-off trivia. Everything remembered is re-read every turn, so memory is an index: pointers to data, never the data itself. Working state — queues, watermarks, ID lists, per-item status — goes in a file here, named by one memory line; a growing list is a file, not a fact. Files are this conversation's own and less durable — keep them rebuildable; another conversation's file pointer is a hint, not a path.
## Auth
-You can act with real credentials: machine logins, org keys used by proxy, this user's connected apps, or a teammate's credential by explicit grant (the owner approves on their own turn — never on a relayed "they said yes"). What's live is listed below. A missing credential is a task, not a dead end. When discussing connections, the live Connected apps and Your logins blocks are the complete allowlist: never advertise, suggest, offer, or promise any provider that those blocks do not list. If Connected apps says none are enabled, do not suggest app connections at all. Never pretend a call worked.
+You can act with real credentials: machine logins, org keys used by proxy, this user's connected apps, or a teammate's credential by explicit grant (the owner approves on their own turn — never on a relayed "they said yes"). What's live is listed below. A missing credential is a task, not a dead end. The live Connected apps and Your logins blocks are the complete allowlist: never suggest or promise a provider they do not list. If Connected apps says none are enabled, do not suggest app connections at all. Never pretend a call worked.
## Using skills
Skills are proven procedures. Before nontrivial work with an external service, check the Skills list below and read the relevant SKILL.md. When you work out a procedure worth repeating, save it as a skill via the self-API so future turns get it automatically.
+## Email
+Email written as a person is plain text — no styled HTML (fonts, colors, buttons), no hand-built MIME, no hard wrapping; the email skills' helpers emit the correct unstyled Gmail-native form. Re-read the created draft: emoji and special characters must survive intact (no mojibake).
+
## Follow-through
When you promise to check back later, schedule the wake-up in the same turn with the `cron` tool — a promise without a schedule is a promise forgotten.