Skip to content

Lead primitive-connect with the agent's email address as its identity - #51

Merged
etbyrd merged 2 commits into
mainfrom
identity-first-skill
Oct 22, 2026
Merged

etbyrd merged 2 commits into
mainfrom
identity-first-skill

Conversation

@etbyrd

@etbyrd etbyrd commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

What

Rewrites skills/primitive-connect so an agent's email address is simply its identity.

  • SKILL.md (380 to 176 lines) opens with "You have an email address. It is who you are to people, services and other agents." followed by the everyday commands (whoami, send, reply, chat, wait --code/--link, emails get --context, emails search, agent check-mail) and task recipes: ask a person and use the answer, sign up for a service and verify, reply in a thread, hand the address to another tool.
  • In a session registered by the SessionStart hook, PRIMITIVE_AGENT_PROFILE and PRIMITIVE_AGENT_ADDRESS are already in the environment, so the main flow drops the PRIMITIVE_AGENT_PROFILE=<profile> prefixes. The explicit-profile path is documented in references/connect.md#sessions-without-the-hook.
  • Behavioural rules stay, shorter: When mail arrives, automatic signals and --no-signal, --fyi, --all, answering the latest message, pausing, work claims, muting, repeating messages, keep receiving while busy, who you report to, trust rules. New rules: sign up for or log in to external services only when the owner's task calls for it; never put credentials, tokens, setup URLs or verification codes in mail.
  • New references/connect.md: the one-command connect, result handling, the one-time naming offer, one address per session (already_connected choices), sessions without the hook, more than one address, member-only commands (PRIMITIVE_AGENT_PROFILE= primitive <command>), poll-mode checking, hook repair and disconnect.
  • New references/external-services.md: verification codes and links, link safety, credentials, giving the address to tools, older-CLI fallback.
  • Full trust rules move to references/collaboration.md#trust-rules-in-detail.
  • scripts/check-cli-capabilities.mjs reports primitive wait availability as an advisory line after a passing preflight; older CLIs still pass and are told to poll primitive agent check-mail and read with primitive emails get --id <id> --context (emails wait has no --json and, for a connected agent, only waits on replies to its own sends).
  • Tests updated for the new layout, plus new tests for the identity lead, no profile prefixes in SKILL.md, the sign-up recipe and fallback, and the advisory wait check.

Testing

  • npm test --prefix skills/primitive-connect: 83 pass, including the link and anchor checker across SKILL.md and references.
  • node scripts/check-plugin-manifests.mjs passes.
  • Ran the preflight against an installed CLI without wait: passes and prints the fallback line.

SKILL.md now opens with the agent's address and the handful of commands that
cover everyday use: whoami, send, reply, chat, wait (with --code and --link for
sign-up verification), emails get --context, emails search and check-mail,
plus task recipes. Hook-registered sessions act as the agent automatically, so
the main flow no longer prefixes commands with PRIMITIVE_AGENT_PROFILE.

Connection setup, result handling, one address per session, poll mode,
explicit profiles, member-only commands and disconnecting move to
references/connect.md. New references/external-services.md covers sign-ups,
verification codes and links, and handing the address to other tools. The full
trust rules move to references/collaboration.md; SKILL.md keeps a short form
with new rules for external services and secrets in mail.

The CLI preflight reports whether `primitive wait` is available as an
advisory line and never fails an older CLI for lacking it.
…ty behaviour

`primitive emails wait` has no --json flag, and for a connected agent it only
waits for a reply to one of its own sends, so it cannot catch a service's
verification email. The fallback for CLIs without `primitive wait` is now to
run `primitive agent check-mail` until the email is listed and read it with
`primitive emails get --id <id> --context`, in SKILL.md, the external services
reference and the preflight's advisory line. A test keeps the broken form out.

Also matches the CLI changes: `primitive wait` sees only mail that arrives
after it starts (--include-existing adds the newest 50), exits 5 on timeout and
6 when no code or link is found, and accepts 90s/5m/1h durations. The session
environment export is Claude Code only, so Codex sessions select their profile
explicitly; whoami --json reports address, profile and source; send and reply
refuse a foreign --from; `env -u PRIMITIVE_AGENT_PROFILE` also runs a command as
the member.
@etbyrd
etbyrd merged commit b5a1096 into main Oct 22, 2026
5 checks passed
@etbyrd
etbyrd deleted the identity-first-skill branch October 22, 2026 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant