[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F61W4KYX8JBCASQ03JK3S4":3,"skill-same:01M7F61W4KYX8JBCASQ03JK3S4":47},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7F61W4KYX8JBCASQ03JK3S4","setup",null,"arpg\u002Ftacitus","arpg","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F5082551?v=4","01M7F61HNKCSYSSV2ZWRB7RHC2","Autonomous Robotics & Perception Group","01M7F61HP45CHTW3C8TPR6GH2D",5,"AGPL-3.0","https:\u002F\u002Fgithub.com\u002Farpg\u002Ftacitus\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsetup\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: setup\ndescription: Guided install of the EA system, the front door for a new user. Offers the browser setup page first, or asks here: the mode first, then the account questions one screen at a time, writes the config, runs the service-account and cron installers, ends with the doctor's checklist green, and asks the first three preference questions.\n---\n\nYou are installing the EA system for the person in front of you. Work\nfrom this repository as the invoking user; never as `ea-bot`. This skill\nis the whole install: every question and every command is here.\n`docs\u002FSETUP.md` is the reference; when a step needs background (a portal's\nscreens, a file's keys, why a rule is shaped as it is) this skill names\nthe docs\u002FSETUP.md appendix to read, by heading. Ask one question at a time\nwith the AskUserQuestion tool. Write each answer down before the next\nquestion. Never guess a value the user has not given you.\n\n## Read first: the invariants\n\nYou are a code-editing agent with write access to this repository. These\ninvariants come from `docs\u002FSECURITY.md` and are not negotiable. If a\nstep fails, debug the cause; never \"simplify around\" it by weakening a\nsecurity check.\n\n1. **ea-bot isolation is mandatory.** Do not remove, comment out, or add\n   an opt-out to the startup FATAL in `ea-chat-bot.py` or `run-agent.sh`.\n   If the bot refuses to start because the ea-bot user is missing, run\n   the service-account installer (section 5); do not patch the check.\n2. **Source code is read-only for ea-bot.** Do not `chmod g+w` `.py`\n   files to resolve a Write-tool \"Permission denied\". That error is\n   Layer 1 working as designed. Edit as the invoking user in the dev\n   repo, never as ea-bot and never by relaxing the deployed copy.\n3. **`~\u002F.ea-private\u002Fsecrets.env` is owner-private** (`chmod 600`, in a\n   `0700` directory in the user's home). The chat credential and API\n   secrets live there; ea-bot must not be able to read it. Do not loosen\n   the mode or move a secret to a group-readable file to fix a read\n   error; the read error is correct.\n4. **No `EA_ISOLATION_MODE` env var, ever.** An earlier iteration had\n   `auto`\u002F`user`\u002F`none` modes; any fail-open path invalidates Layer 1.\n   Do not reintroduce it under any name, and do not suggest it.\n5. **No platform-conditional isolation bypass.** `sudo -u ea-bot` works\n   the same on Linux and macOS. If a Darwin-specific path fails (dscl,\n   sudoers, Homebrew PATH), fix that path; never add an\n   `if Darwin: skip` branch around the isolation call.\n\nWhen in doubt, stop and ask the user. A ten-minute pause beats a silent\nregression of the security model.\n\n## Say why, every time\n\nBefore each question and each step the user types, say in one sentence\nwhy you ask and how the answer helps: the question's entry in `WHY` of\n`scripts\u002Finstall\u002Fsetup_questions.py`, or the `why` of the step in\n`setup_web.py` `next_steps`. Each section opens with a **Why:** for the\nsection: say it once, in your own words, when the section starts.\n\n## How the commands run\n\nYour Bash tool has no terminal: a command that reads an answer from the\nkeyboard fails there (Python's `input()` ends in EOFError). So:\n\n- **Questions.** AskUserQuestion is multiple choice. For a name, an\n  address, an id or a link, offer the likely values you know (the domain\n  of the work email, the detected timezone) and tell the user to pick\n  \"Other\" and type the value.\n- **Answers files.** `scripts\u002Finstall\u002Fuser_init.py` never asks you anything: write the\n  answers to `~\u002F.ea-private\u002Fanswers-\u003Cphase>.json` (mode 600;\n  `mkdir -m 700 -p ~\u002F.ea-private` first), then run\n  `python3 scripts\u002Finstall\u002Fuser_init.py --answers ~\u002F.ea-private\u002Fanswers-\u003Cphase>.json --phase \u003Cphase>`.\n  The keys are in docs\u002Finstall-testing.md; `tests\u002Finstall\u002Fanswers-reviewer.json`\n  is a complete example. Delete a file that holds a secret once its phase\n  has run.\n- **`scripts\u002Finstall\u002Fsetup.sh`** sees no terminal and runs non-interactive by itself: it\n  never signs in and never asks. It prints the sign-in command for the\n  user instead, and installs the cron lines only with `--install-cron`.\n- **Steps the user types.** Some steps need the user's own password,\n  browser or login. A line typed in this prompt with a `!` in front shows\n  its output here as it runs, but has no terminal and cannot read a key.\n  The Graph sign-in only prints a link and waits, so the user types it\n  here with a `!`. The `sudo` steps (two on Linux, three on macOS), the\n  Google sign-in (a pasted address) and the ea-bot Claude login (a\n  full-screen program) read the keyboard and fail with a `!`\n  (`sudo: A terminal is required to authenticate`): ask for a second\n  terminal in this directory, keep it for the install, and run them\n  there. Give the exact line, wait for the user to say it is done, run\n  the read-only check named with it, and go on only when it passes.\n- **The browser page, offered first.** Ask whether they would rather\n  answer on a setup page in a browser (recommended) or here. For the\n  page, run `python3 scripts\u002Finstall\u002Fsetup_web.py` with\n  `run_in_background` (`--bind \u003Ctailscale ip -4>` for a phone or laptop\n  on their tailnet) and give the user the printed address with its `#t=`\n  token, to them only. It asks sections 1, 2, 2b, 3's app values, 4's\n  calendars and Drive accounts, 6's platform and the push, writes the same files and signs\n  in to nothing (docs\u002Fsetup-web.md). After they press Done, run section\n  0 and go on.\n\n## 0. Resume\n\n**Why:** a second run must not ask again what a first run answered.\nBefore the first question, read what an earlier run left behind and\nskip every question it answered. Each section writes a value this list checks:\n\n- `~\u002F.ea\u002Fconfig\u002Fea-config.json` has `\"profile\"` and `\"acknowledged\"`,\n  and `list-digests.json` is beside it (`setup.sh` ran): section 1 is\n  done. With the second missing, its notice is still owed; with only the\n  third missing (the browser page records the two), only its `setup.sh` run.\n- `~\u002F.ea\u002Fconfig\u002Fuser-profile.json` has a real `name` and `email` (no\n  placeholder): section 2 is done; its `institution` block has\n  `domains` and `video.platform`: 2b is done.\n- `~\u002F.ea\u002Fauth\u002Fmsal_token_cache.json` exists, or\n  `python3 preprocessor\u002Fgraph_actions.py list-mail --folder inbox --top 1`\n  answers: section 3 is done.\n- `~\u002F.ea\u002Fconfig\u002Fscheduling-preferences.json` names an\n  `ea_managed_calendar.calendar_id`, and `user-profile.json` has a\n  `drive_accounts` list (empty when they keep no Docs in Google), or the\n  user said they never use Google: section 4 is done.\n- `id ea-bot` answers and `\u002Fhome\u002Fea-bot\u002Fea-system\u002FCLAUDE.local.md`\n  exists: section 5 is done.\n- `python3 scripts\u002Fea-doctor.py --profile \u003Cname>` prints no FAIL:\n  only sections 8 and 9 remain.\n- `python3 preprocessor\u002Fonboarding.py ask --count 3` prints nothing\n  new: section 9 is done.\n\nTell the user in one line which sections you found done, then start at\nthe first one that is not.\n\n## 1. Mode\n\n**Why:** the mode sets how the user works with the EA, so it decides\nwhich sections apply. Ask it first, before any other question, unless\n`\u002Fsetup` started with `--profile \u003Cname>` (`.\u002Finstall.sh --profile`): then\nsay which and go on. Offer these three word for word; recommend `assistant`:\n\n- `reviewer`: No chat. It reads your mail and calendar, leaves reply drafts in your mailbox, and writes you a report when you want one.\n- `assistant`: One chat on your phone. It drafts replies, finds meeting times and asks before anything goes out.\n- `collaborator`: The assistant, plus a separate chat room for each big project.\n\n`reviewer` has no chat, buttons, holds or events: the user works in the Claude\nCode shell, sends drafts from Outlook and reads reports in\n`~\u002F.ea\u002Fstate\u002Freports\u002F\u003Cagent>-latest.md` (a phone push when set up). A chat\nmode adds the chat (the web chat or Slack): the EA channel, the DM with the\nSend and Create buttons, scheduling and digests in the same app, the resident\nand plugins; `collaborator` adds project and session rooms. For `reviewer` ask\ntwo more: leave reply drafts in the mailbox (default yes; no means it only\nreads and reports), and when the report comes: `weekdays`, `daily` or `none`\n(only when asked). A report comes any time: `.\u002Frun-agent.sh morning-briefing --now`.\n\nThen show the notice: print the \"Your responsibility\" paragraph of\n`README.md` word for word and ask whether they have read it and accept\nthat what the EA sends and files under their name is theirs. On\nanything but a yes, stop; `\u002Fsetup` resumes when they are ready. Never\nshorten the paragraph or answer for them. On a yes, run\n`.\u002Fscripts\u002Finstall\u002Fsetup.sh --profile \u003Cname> --acknowledged` (`reviewer`:\nadd `--reports \u003Canswer>`). It installs the Python packages, copies every\nconfig template into `~\u002F.ea\u002Fconfig\u002F` (a file already there is kept),\nrecords the mode and the acknowledgment date in `ea-config.json`, and\nsaves the cron lines without installing them. Run it now, while `~\u002F.ea`\nis still the user's own directory, and never write `ea-config.json` by\nhand before it: the template would be skipped. A reviewer with no drafts:\nthen `answers-profile.json` (`profile`, `acknowledged`, `\"drafting\": false`,\n`reports`) and the `profile` phase. From `reviewer` to a chat mode later:\n`.\u002Fscripts\u002Finstall\u002Fsetup.sh --profile \u003Cname>` and section 6; between the\nchat modes, `python3 preprocessor\u002Fea_config.py set-profile \u003Cname>` is the\nwhole switch. `python3 preprocessor\u002Fea_config.py features --profile \u003Cname>`\nprints what the mode turns on. The table is docs\u002FSETUP.md \"Choose a mode\".\n\n## 2. Identity (all modes)\n\n**Why:** the EA signs, sorts and drafts under this name, in this zone.\nAsk, one at a time: full name, work email, and role and department (one\nsentence, the way they would introduce themselves). Each is an \"Other\"\nanswer. Then the home timezone: offer the machine's zone (`timedatectl\nshow -p Timezone --value`, or `readlink \u002Fetc\u002Flocaltime` on macOS) and\n\"Other\". Working hours are asked once, in section 4, where they are\nused. One `identity` phase writes sections 2 and 2b together, after 2b.\nThe keys of every config file are in docs\u002FSETUP.md \"Config files\".\n\n## 2b. Institution (all modes)\n\n**Why:** these facts say which mail is internal and where a first email\nnever goes on its own. CLAUDE.md names no institution; the `institution` block of\n`user-profile.json` carries it (`preprocessor\u002Finstitution.py` documents\nevery key). Ask these one at a time:\n\n1. The institution's name.\n2. The mail domains that count as internal. Offer the domain of their\n   work email as the first one, and ask whether the institution uses\n   others.\n3. The safety-rail domain: the EA never sends a first email to an\n   address outside it on its own. It is the work email's domain unless\n   the user says otherwise: ask only to confirm it.\n4. The video-meeting platform they use (Zoom, Google Meet, or another).\n5. Their personal meeting link on that platform.\n\nWrite sections 2 and 2b to `answers-identity.json` (`full-name`,\n`work-email`, `role-description`, `department`, `university`,\n`institution-name`, `institution-domains`,\n`institution-safety-rail-domain`, `video-platform`, `video-link`) and\nrun the `identity` phase. It writes the block as `name`, `domains`,\n`safety_rail_domain`, `video.platform` and `video.link`, and the same\nlink as the top-level `zoom_link`, which the Create button reads when it\nadds the meeting link to an event. Then write `timezone` to\n`answers-scheduling.json` and run the `scheduling` phase. Check:\n`python3 tests\u002Fvalidate_config.py` names no placeholder in\n`user-profile.json`. Leave `related_domains`, `boilerplate_tokens`,\n`boilerplate_phrases` and `letterhead` as the template has them unless\nthe user names values. For an install at the worked example's\ninstitution, `config\u002Fexamples\u002Fcu-boulder\u002Fuser-profile.json` holds a\ncomplete block to start from.\n\nThe overlay render and install at the end of section 5 carry these\nfacts into every Claude session. They need the service account, so they\nwait until then.\n\n## 3. Outlook (all modes)\n\n**Why:** without this sign-in the EA reads no mail and no calendar.\nAsk whether they already have an app registration for the EA in their\norganization's Microsoft 365 tenant. Most people do not, and most cannot\ncreate one themselves. Choose by the answer:\n\n- Yes: ask for the application (client) id, the tenant id and the client\n  secret (\"Other\" answers), and whether the tenant allows public client\n  flows (then `device_code` needs no secret). Write `answers-auth.json`:\n  `graph-auth-method` (`confidential` or `device_code`),\n  `graph-client-id`, `graph-tenant-id`, `graph-client-secret`\n  (confidential only), `\"graph-sign-in-now\": false` and\n  `\"google-calendar-now\": false`. Run the `auth` phase (the `GRAPH_*`\n  keys go to `~\u002F.ea\u002F.env`, the secret to `~\u002F.ea-private\u002Fsecrets.env`),\n  then delete the file. Then the Graph sign-in, a step the user types:\n  `! python3 preprocessor\u002Fgraph_client.py --align --write` for\n  `confidential` (it prints a link, waits for the browser's redirect on\n  `localhost:8400` and aligns the scopes to what the app grants), or\n  `! python3 preprocessor\u002Fgraph_client.py` for `device_code` (a link and\n  a code for any browser). Both flows and the registration's values are\n  docs\u002FSETUP.md \"Microsoft Graph app registration\".\n- No: two paths (AskUserQuestion). **Ask IT**, the lasting one: fill in\n  `docs\u002Fit-request.md` with them, have them send it, stop and tell them to\n  re-run `\u002Fsetup` when IT answers (section 0 resumes here). **IT will not\n  register one**: say what docs\u002FSETUP.md \"Option C: no registration\n  (outlook-web-auth)\" does, from its first paragraph, and ask whether\n  their organization allows it; unless it is a clear yes, ask IT. On a\n  yes, run its four steps; they type the install and `login` with `!`.\n\nCheck before moving on:\n`python3 preprocessor\u002Fgraph_actions.py calendar-view --days 1`.\n\n## 4. Google Calendar and Drive (all modes, recommended)\n\n**Why:** a Google calendar counts as busy time only after its account\nsigns in, and a Google Docs link in mail opens only with a Drive\nsign-in. Ask whether they use Google Calendar, Gmail or Google Docs. Skip this section only if they say they\nnever use Google. Otherwise walk them through docs\u002FSETUP.md\n\"Google OAuth app\": a Google Cloud project, the Calendar API, the Google\nDrive API (and the Gmail API when the EA drafts there), the consent screen **published** (\"In\nproduction\": in \"Testing\" status Google ends the refresh tokens after 7\ndays), a Desktop OAuth client, its JSON saved as\n`~\u002F.ea\u002Fauth\u002Fgoogle_client_secret.json` (mode 600). Ask for each Google\naccount to read (\"Other\"), add them as `google-calendars` beside\n`timezone` in `answers-scheduling.json`, and run the `scheduling` phase\nagain. Then the Google sign-in for all of them, a step the user types in\nthe second terminal (it asks them to paste the address the browser lands\non): `python3 preprocessor\u002Fgoogle_calendar_client.py --setup`.\nCheck: `python3 preprocessor\u002Fgoogle_calendar_client.py --test`.\n\nThen the EA-Managed calendar (docs\u002FSETUP.md \"The EA-Managed calendar\"): ask\nthem to create a secondary Google calendar named `EA-Managed`, paste its\nid into `ea_managed_calendar` of `scheduling-preferences.json`, and run\n`python3 preprocessor\u002Fowner_trust.py seed --calendar` as the user: the\nmediator allows button-free writes only to the id in the owner-private\n`~\u002F.ea-private\u002Fcalendars.json`, never to one read from ea-bot's config.\nAsk for their working hours (the one time this install asks) and have\nthem add one recurring `wh Working Hours` event there; without it the\nsolver has no rule store and no place to hold time. It is required on\n`assistant` and `collaborator` and optional on `reviewer`.\n\nThen Google Drive (docs\u002FSETUP.md \"Google Drive\"): ask which Google\naccounts hold the documents their mail links to (\"Other\"; empty is fine),\nwrite them as `drive-accounts` in `answers-drive.json` with\n`\"google-drive-now\": false`, and run the `drive` phase. In a chat mode\nthe sign-in waits for the chat (section 8): the user says `connect\nGoogle Drive \u003Caccount>` there and follows the link, with no terminal.\nElsewhere it is a step they type in the second terminal:\n`python3 preprocessor\u002Fdrive_client.py setup --email \u003Caccount>`. Check:\n`python3 preprocessor\u002Fdrive_client.py test`. Say that the scope is read\nonly. An \"access blocked\" answer means the Workspace administrator must\nallow the app: say so in one line and go on.\n\n## 5. Service account and permissions (all modes)\n\n**Why:** a message that tricks the EA must not reach the user's files,\ntokens or Send button. `.\u002Fscripts\u002Finstall\u002Fsetup.sh --profile \u003Cname>` ran in section 1; run it again only if the\nmode changed. Then the service account, a step the user types in the\nsecond terminal: `sudo .\u002Fscripts\u002Finstall\u002Fsetup-ea-user.sh` (Linux) or\n`sudo .\u002Fscripts\u002Finstall\u002Fsetup-ea-user-macos.sh`.\nIt creates `ea-bot`, moves `~\u002F.ea` into ea-bot's home, installs ea-bot's\nown Claude Code and the sudoers rule, and on Linux turns mail mediation\non. Check: `id ea-bot && test -L ~\u002F.ea && sudo -n -u ea-bot true`.\nAfter this script `~\u002F.ea\u002Fconfig` belongs to `ea-bot`, and a later\n`.\u002Fscripts\u002Finstall\u002Fsetup.sh` run writes it as `ea-bot` through that sudoers rule. What\neach script does, and the sudoers rule, are docs\u002FSETUP.md \"The service\naccount\". Do not weaken a permission to get past an error.\n\nThen ea-bot's Claude login, a step the user types in the second\nterminal (a full-screen program):\n`sudo -u ea-bot env HOME=\u002Fhome\u002Fea-bot claude`, then `\u002Flogin`, then\nCtrl+C. Check:\n`sudo -n -u ea-bot test -e \u002Fhome\u002Fea-bot\u002F.claude\u002F.credentials.json`.\nOn macOS ea-bot has no keychain: the step is\n`cd \u002F && sudo -u ea-bot env HOME=\u002FUsers\u002Fea-bot \u002FUsers\u002Fea-bot\u002F.local\u002Fbin\u002Fclaude setup-token`\nand the token goes in ea-bot's settings (docs\u002Fmacos-claude-binary.md);\nthe doctor's `ea-bot: Claude login` line is the check.\nA token login (`scripts\u002Finstall\u002Fea-bot-token.sh` on Linux) loads no\nclaude.ai connector; the EA's own Google clients need none (section 7).\nOn a Linux desktop session, `newgrp ea` (or a new login) gives their\nshell the `ea` group.\n\nThen the install overlay (docs\u002FSETUP.md \"The install overlay\"): `render`, as\n`ea-bot`, turns the config into `~\u002F.ea\u002Fconfig\u002FCLAUDE.install.md`;\n`install`, as the invoking user who owns the deployed tree, copies it\nthere as `CLAUDE.local.md`, which every Claude session loads. On Linux:\n\n```bash\nsudo -u ea-bot \u002Fusr\u002Fbin\u002Fpython3 \u002Fhome\u002Fea-bot\u002Fea-system\u002Fpreprocessor\u002Finstall_overlay.py render\npython3 preprocessor\u002Finstall_overlay.py install --tree \u002Fhome\u002Fea-bot\u002Fea-system\n```\n\nYou run both: the sudoers rule lets the invoking user run any command\nas `ea-bot` without a password. On macOS, use `\u002FUsers\u002Fea-bot` and the\nHomebrew Python (`\u002Fopt\u002Fhomebrew\u002Fbin\u002Fpython3`; Apple's is 3.9); the other\ndifferences are docs\u002FSETUP.md \"macOS notes\". The doctor's two `install\noverlay` lines confirm both steps. Run both again after any later change\nto `user-profile.json`.\n\n## 6. Chat platform (assistant and collaborator)\n\n**Why:** the chat shows the drafts and buttons; the platform decides who\nstores them. Ask once which chat platform they want, and recommend the web chat:\nthe bot serves it itself, as an app on their phone over their tailnet,\nwith no chat server, and every message, file and card stays on this\nmachine. Slack is acceptable when they accept that everything the EA\nshows them, drafts and quoted mail included, is stored by Slack. The\ncomparison is the \"Choosing a chat platform\" table in docs\u002FINSTALL.md.\nThe answer goes in `answers-chat.json` as `\"chat-platform\"` (`web` or\n`slack`), and the `chat` phase records it in the chat block.\n\nFor the web chat, docs\u002FSETUP.md \"Web chat\": Tailscale on this machine\nand their phone. Offer this machine's tailnet name (`Self.DNSName` in\n`tailscale status --json`, without the last dot) and their login\n(`tailscale whois \u003Cthis machine's tailnet IP>`), each with \"Other\", as\n`web-chat-host` and `web-chat-login` in the same file, then run the\nphase. It writes the `web` block: port 8470, base path `\u002Fchat`,\n`public_url` `https:\u002F\u002F\u003Cname>:8444\u002Fchat`, `tailscale_login`. Then a step the user\ntypes in the second terminal:\n`sudo tailscale serve --bg --https=8444 --set-path \u002Fchat http:\u002F\u002F127.0.0.1:8470\u002Fchat`.\nCheck: `tailscale serve status` lists `\u002Fchat`. The hardening step in\nsection 8 has them type each web value back as it copies the block to\n`~\u002F.ea-private\u002Fchat.json`; the doctor's `web chat:` rows then pass.\n\nFor Slack, run the phase first, then docs\u002FSETUP.md \"Slack\" end to end:\nthe app and its scopes, its icon (`assets\u002Ftacitus-avatar.png`, uploaded\nby hand), Socket Mode, the event subscriptions, the app-level token, the\nprivate channel.\nAsk for the bot token, the app token, the channel id, the channel name\nand the user's member id, and write `EA_SLACK_CHANNEL_ID`,\n`EA_SLACK_CHANNEL_NAME` and `EA_SLACK_OWNER_ID` to `~\u002F.ea\u002F.env` (0640)\nand `SLACK_BOT_TOKEN` and `SLACK_APP_TOKEN` to `~\u002F.ea-private\u002Fsecrets.env`\n(0600); the `auth` phase does the same from `slack-bot-token`,\n`slack-app-token`, `slack-channel-id`, `slack-channel-name-env` and\n`slack-owner-id` in its answers file.\nThe scopes the doctor checks are the ones the bot calls.\n\nThe bot service comes in section 8, from the same root step that\nhardens the install (docs\u002FSETUP.md \"Services\"); `scripts\u002Finstall\u002Fsetup.sh` writes no unit.\n\n## 7. Claude Code connectors (optional)\n\n**Why:** a fallback only: the EA's own clients read Gmail, Calendar and\nDrive. The claude.ai connectors (and Slack on a Slack install) come with\nea-bot's Claude account, and only under a browser login; a setup-token\nlogin loads none, and then this section does not apply. Otherwise ask\nthe user to enable them in claude.ai Settings > Connectors\n(claude.ai\u002Fcustomize\u002Fconnectors) as the account ea-bot logged in with in\nsection 5, and to finish each one's sign-in there. Check, as ea-bot:\n`sudo -n -u ea-bot env HOME=\u002Fhome\u002Fea-bot \u002Fhome\u002Fea-bot\u002F.local\u002Fbin\u002Fclaude mcp list`\nlists `claude.ai Gmail` and `claude.ai Google Calendar` as connected\n(docs\u002FSETUP.md \"Claude Code connectors\").\n\n## 7b. Remote writer (optional, any mode that drafts)\n\n**Why:** some users want a model of their own to write the bodies. Ask once, after the connectors: do they run their own model, or have an\nOpenAI-compatible endpoint, that should write the email bodies instead\nof Claude? Most say no; then skip this screen and say nothing more. If\nyes, ask for the https endpoint, the model name and the API key, then:\nthe `REMOTE_LLM_API_KEY=` line into `~\u002F.ea-private\u002Fsecrets.env`,\n`python3 preprocessor\u002Fremote_llm.py init --endpoint \u003Chttps URL> --model \u003Cname> --drafting remote`,\nthen `python3 preprocessor\u002Fremote_llm.py ping`. The endpoint must be\nhttps. Do not offer the mail, digest, briefing or scheduling switches in\nthe same file; they are an owner's later decision (docs\u002FSETUP.md \"Remote\nwriter\", `docs\u002Fllm-lanes.md`).\n\n## 8. Acceptance\n\n**Why:** the services move to a tree the EA cannot change, and the doctor\nproves each part works. On Linux the hardening step, a `sudo` step the user types in the second\nterminal: `sudo bash deploy\u002Fharden-permissions.sh` (docs\u002FSETUP.md \"Hardening\"). It\nseeds the owner-owned code tree at `\u002Fopt\u002Fea-system` and the owner-private\nfiles, and moves the services off the ea-bot tree so a prompt-injected\nEA cannot reach the owner account. It says which bot unit it found: in\na chat mode it writes and starts the bot's system unit (docs\u002FSETUP.md\n\"Services\"); on `reviewer`, which has no chat platform, it says the\nbot-unit steps are skipped, which is expected. When a service does not stay up,\nit ends with a WARNING and that service's last log lines; a bot line\n`the chat setting \u003CNAME> is not set` sends you back to section 6. Check:\n`test -f \u002Fopt\u002Fea-system\u002F.deployed-commit`, and in a chat mode\n`systemctl is-active ea-chat-bot`. Mail mediation is already on:\n`scripts\u002Finstall\u002Fsetup-ea-user.sh` ran `deploy\u002Fenable-mail-mediation.sh`.\n\nOn macOS, in every mode, two `sudo` steps the user types in the\nsecond terminal instead: `sudo bash deploy\u002Fmacos\u002Finstall-services.sh` (the owner-owned\n`\u002Fopt\u002Fea-system`, the owner-private files and the LaunchDaemons: the\nmediator always, the bot only with a chat platform), then\n`sudo bash deploy\u002Fenable-mail-mediation.sh`, which turns mediation on\n(docs\u002FSETUP.md \"launchd\"). Check: the doctor's `service:` line for the\nmediator passes, and\n`sudo -n -u ea-bot test -r \u002FUsers\u002Fea-bot\u002F.ea\u002Fauth\u002Fmsal_token_cache.json`\nfails (ea-bot can no longer read the Outlook token).\n\nThen install the cron lines, pointed at `\u002Fopt\u002Fea-system`:\n`.\u002Fscripts\u002Finstall\u002Fsetup.sh --profile \u003Cname> --install-cron`. Check: `crontab -l`\nshows the `run-agent.sh morning-briefing` line under `\u002Fopt\u002Fea-system`.\n\nThen run `python3 scripts\u002Fea-doctor.py --profile \u003Cname>` and fix every\nFAIL it prints, using the fix text next to each; each fix names the\ndocs\u002FSETUP.md appendix for its check, and docs\u002FSETUP.md \"Troubleshooting and the\ndoctor's checks\" maps every check name to one. Warnings about features\nthe mode does not use are expected.\n\nFinish by running one briefing by hand,\n`.\u002Frun-agent.sh morning-briefing --now` (`--now` skips the 4 AM gate),\nand showing the user where the report landed: the EA channel in a chat\nmode, on `reviewer` `~\u002F.ea\u002Fstate\u002Freports\u002Fmorning-briefing-latest.md`\nand the phone push when one is configured.\n\nFor `reviewer`, offer the phone push once (docs\u002FSETUP.md\n\"Phone push\"): they install the ntfy app and pick a long random topic;\n`answers-push.json` (`\"push-configure\": true`, `push-topic`) and the\n`push` phase write `~\u002F.ea-private\u002Fpush.json`;\n`python3 preprocessor\u002Fpush_notify.py test` proves it. The briefing above\nthen sends a push too.\n\nSay three lines: the mode installed, where the EA talks to them, and\nthe one command that re-runs the checklist. Then go on to section 9.\n\n## 9. First week\n\n**Why:** the EA learns preferences from the user's words, not guesses.\nRun `python3 preprocessor\u002Fonboarding.py ask --count 3`: it prints the\nfirst three preference questions, each with an `id`. Ask them one at a\ntime with AskUserQuestion, as free text (\"Other\"), in the user's own\nwords. After each answer, record it before the next question:\n\n```bash\npython3 preprocessor\u002Fonboarding.py answer --id \u003Cid> --text \"\u003Ctheir words>\"\n```\n\nDo not paraphrase the answer; the text is the rule in their words. A\nscheduling answer (`protected-days`) is a standing rule for drafts and\nthe briefing; the scheduler skips a block only when it is an `nm` event\non the EA-Managed calendar (section 4), so say that once. If the script\nis missing or prints no question, say so in one line and end the\ninstall here.\n\nWhen the three are recorded, tell the user: the morning briefing asks\none more question each day for a week, at the end of the briefing; they\nanswer in the thread (or in the shell on `reviewer`), and\nsaying \"stop the questions\" ends the series at any time. That is the\nlast thing the install says.\n","You are installing the EA system for the person in front of you. Work\nfrom this repository as the invoking user; never as `ea-bot`. This skill\nis the whole install: every question and every command is here.\n`docs\u002FSETUP.md` is the reference; when a step needs background (a portal's\nscreens, a file's keys, why a rule is shaped as it is) this skill names\nthe docs\u002FSETUP.md appendix to read, by heading. Ask one question at a time\nwith the AskUserQuestion tool. Write each answer down before the next\nquestion. Never guess a value the user has not given you.\n\n## Read first: the invariants\n\nYou are a code-editing agent with write access to this repository. These\ninvariants come from `docs\u002FSECURITY.md` and are not negotiable. If a\nstep fails, debug the cause; never \"simplify around\" it by weakening a\nsecurity check.\n\n1. **ea-bot isolation is mandatory.** Do not remove, comment out, or add\n   an opt-out to the startup FATAL in `ea-chat-bot.py` or `run-agent.sh`.\n   If the bot refuses to start because the ea-bot user is missing, run\n   the service-account installer (section 5); do not patch the check.\n2. **Source code is read-only for ea-bot.** Do not `chmod g+w` `.py`\n   files to resolve a Write-tool \"Permission denied\". That error is\n   Layer 1 working as designed. Edit as the invoking user in the dev\n   repo, never as ea-bot and never by relaxing the deployed copy.\n3. **`~\u002F.ea-private\u002Fsecrets.env` is owner-private** (`chmod 600`, in a\n   `0700` directory in the user's home). The chat credential and API\n   secrets live there; ea-bot must not be able to read it. Do not loosen\n   the mode or move a secret to a group-readable file to fix a read\n   error; the read error is correct.\n4. **No `EA_ISOLATION_MODE` env var, ever.** An earlier iteration had\n   `auto`\u002F`user`\u002F`none` modes; any fail-open path invalidates Layer 1.\n   Do not reintroduce it under any name, and do not suggest it.\n5. **No platform-conditional isolation bypass.** `sudo -u ea-bot` works\n   the same on Linux and macOS. If a Darwin-specific path fails (dscl,\n   sudoers, Homebrew PATH), fix that path; never add an\n   `if Darwin: skip` branch around the isolation call.\n\nWhen in doubt, stop and ask the user. A ten-minute pause beats a silent\nregression of the security model.\n\n## Say why, every time\n\nBefore each question and each step the user types, say in one sentence\nwhy you ask and how the answer helps: the question's entry in `WHY` of\n`scripts\u002Finstall\u002Fsetup_questions.py`, or the `why` of the step in\n`setup_web.py` `next_steps`. Each section opens with a **Why:** for the\nsection: say it once, in your own words, when the section starts.\n\n## How the commands run\n\nYour Bash tool has no terminal: a command that reads an answer from the\nkeyboard fails there (Python's `input()` ends in EOFError). So:\n\n- **Questions.** AskUserQuestion is multiple choice. For a name, an\n  address, an id or a link, offer the likely values you know (the domain\n  of the work email, the detected timezone) and tell the user to pick\n  \"Other\" and type the value.\n- **Answers files.** `scripts\u002Finstall\u002Fuser_init.py` never asks you anything: write the\n  answers to `~\u002F.ea-private\u002Fanswers-\u003Cphase>.json` (mode 600;\n  `mkdir -m 700 -p ~\u002F.ea-private` first), then run\n  `python3 scripts\u002Finstall\u002Fuser_init.py --answers ~\u002F.ea-private\u002Fanswers-\u003Cphase>.json --phase \u003Cphase>`.\n  The keys are in docs\u002Finstall-testing.md; `tests\u002Finstall\u002Fanswers-reviewer.json`\n  is a complete example. Delete a file that holds a secret once its phase\n  has run.\n- **`scripts\u002Finstall\u002Fsetup.sh`** sees no terminal and runs non-interactive by itself: it\n  never signs in and never asks. It prints the sign-in command for the\n  user instead, and installs the cron lines only with `--install-cron`.\n- **Steps the user types.** Some steps need the user's own password,\n  browser or login. A line typed in this prompt with a `!` in front shows\n  its output here as it runs, but has no terminal and cannot read a key.\n  The Graph sign-in only prints a link and waits, so the user types it\n  here with a `!`. The `sudo` steps (two on Linux, three on macOS), the\n  Google sign-in (a pasted address) and the ea-bot Claude login (a\n  full-screen program) read the keyboard and fail with a `!`\n  (`sudo: A terminal is required to authenticate`): ask for a second\n  terminal in this directory, keep it for the install, and run them\n  there. Give the exact line, wait for the user to say it is done, run\n  the read-only check named with it, and go on only when it passes.\n- **The browser page, offered first.** Ask whether they would rather\n  answer on a setup page in a browser (recommended) or here. For the\n  page, run `python3 scripts\u002Finstall\u002Fsetup_web.py` with\n  `run_in_background` (`--bind \u003Ctailscale ip -4>` for a phone or laptop\n  on their tailnet) and give the user the printed address with its `#t=`\n  token, to them only. It asks sections 1, 2, 2b, 3's app values, 4's\n  calendars and Drive accounts, 6's platform and the push, writes the same files and signs\n  in to nothing (docs\u002Fsetup-web.md). After they press Done, run section\n  0 and go on.\n\n## 0. Resume\n\n**Why:** a second run must not ask again what a first run answered.\nBefore the first question, read what an earlier run left behind and\nskip every question it answered. Each section writes a value this list checks:\n\n- `~\u002F.ea\u002Fconfig\u002Fea-config.json` has `\"profile\"` and `\"acknowledged\"`,\n  and `list-digests.json` is beside it (`setup.sh` ran): section 1 is\n  done. With the second missing, its notice is still owed; with only the\n  third missing (the browser page records the two), only its `setup.sh` run.\n- `~\u002F.ea\u002Fconfig\u002Fuser-profile.json` has a real `name` and `email` (no\n  placeholder): section 2 is done; its `institution` block has\n  `domains` and `video.platform`: 2b is done.\n- `~\u002F.ea\u002Fauth\u002Fmsal_token_cache.json` exists, or\n  `python3 preprocessor\u002Fgraph_actions.py list-mail --folder inbox --top 1`\n  answers: section 3 is done.\n- `~\u002F.ea\u002Fconfig\u002Fscheduling-preferences.json` names an\n  `ea_managed_calendar.calendar_id`, and `user-profile.json` has a\n  `drive_accounts` list (empty when they keep no Docs in Google), or the\n  user said they never use Google: section 4 is done.\n- `id ea-bot` answers and `\u002Fhome\u002Fea-bot\u002Fea-system\u002FCLAUDE.local.md`\n  exists: section 5 is done.\n- `python3 scripts\u002Fea-doctor.py --profile \u003Cname>` prints no FAIL:\n  only sections 8 and 9 remain.\n- `python3 preprocessor\u002Fonboarding.py ask --count 3` prints nothing\n  new: section 9 is done.\n\nTell the user in one line which sections you found done, then start at\nthe first one that is not.\n\n## 1. Mode\n\n**Why:** the mode sets how the user works with the EA, so it decides\nwhich sections apply. Ask it first, before any other question, unless\n`\u002Fsetup` started with `--profile \u003Cname>` (`.\u002Finstall.sh --profile`): then\nsay which and go on. Offer these three word for word; recommend `assistant`:\n\n- `reviewer`: No chat. It reads your mail and calendar, leaves reply drafts in your mailbox, and writes you a report when you want one.\n- `assistant`: One chat on your phone. It drafts replies, finds meeting times and asks before anything goes out.\n- `collaborator`: The assistant, plus a separate chat room for each big project.\n\n`reviewer` has no chat, buttons, holds or events: the user works in the Claude\nCode shell, sends drafts from Outlook and reads reports in\n`~\u002F.ea\u002Fstate\u002Freports\u002F\u003Cagent>-latest.md` (a phone push when set up). A chat\nmode adds the chat (the web chat or Slack): the EA channel, the DM with the\nSend and Create buttons, scheduling and digests in the same app, the resident\nand plugins; `collaborator` adds project and session rooms. For `reviewer` ask\ntwo more: leave reply drafts in the mailbox (default yes; no means it only\nreads and reports), and when the report comes: `weekdays`, `daily` or `none`\n(only when asked). A report comes any time: `.\u002Frun-agent.sh morning-briefing --now`.\n\nThen show the notice: print the \"Your responsibility\" paragraph of\n`README.md` word for word and ask whether they have read it and accept\nthat what the EA sends and files under their name is theirs. On\nanything but a yes, stop; `\u002Fsetup` resumes when they are ready. Never\nshorten the paragraph or answer for them. On a yes, run\n`.\u002Fscripts\u002Finstall\u002Fsetup.sh --profile \u003Cname> --acknowledged` (`reviewer`:\nadd `--reports \u003Canswer>`). It installs the Python packages, copies every\nconfig template into `~\u002F.ea\u002Fconfig\u002F` (a file already there is kept),\nrecords the mode and the acknowledgment date in `ea-config.json`, and\nsaves the cron lines without installing them. Run it now, while `~\u002F.ea`\nis still the user's own directory, and never write `ea-config.json` by\nhand before it: the template would be skipped. A reviewer with no drafts:\nthen `answers-profile.json` (`profile`, `acknowledged`, `\"drafting\": false`,\n`reports`) and the `profile` phase. From `reviewer` to a chat mode later:\n`.\u002Fscripts\u002Finstall\u002Fsetup.sh --profile \u003Cname>` and section 6; between the\nchat modes, `python3 preprocessor\u002Fea_config.py set-profile \u003Cname>` is the\nwhole switch. `python3 preprocessor\u002Fea_config.py features --profile \u003Cname>`\nprints what the mode turns on. The table is docs\u002FSETUP.md \"Choose a mode\".\n\n## 2. Identity (all modes)\n\n**Why:** the EA signs, sorts and drafts under this name, in this zone.\nAsk, one at a time: full name, work email, and role and department (one\nsentence, the way they would introduce themselves). Each is an \"Other\"\nanswer. Then the home timezone: offer the machine's zone (`timedatectl\nshow -p Timezone --value`, or `readlink \u002Fetc\u002Flocaltime` on macOS) and\n\"Other\". Working hours are asked once, in section 4, where they are\nused. One `identity` phase writes sections 2 and 2b together, after 2b.\nThe keys of every config file are in docs\u002FSETUP.md \"Config files\".\n\n## 2b. Institution (all modes)\n\n**Why:** these facts say which mail is internal and where a first email\nnever goes on its own. CLAUDE.md names no institution; the `institution` block of\n`user-profile.json` carries it (`preprocessor\u002Finstitution.py` documents\nevery key). Ask these one at a time:\n\n1. The institution's name.\n2. The mail domains that count as internal. Offer the domain of their\n   work email as the first one, and ask whether the institution uses\n   others.\n3. The safety-rail domain: the EA never sends a first email to an\n   address outside it on its own. It is the work email's domain unless\n   the user says otherwise: ask only to confirm it.\n4. The video-meeting platform they use (Zoom, Google Meet, or another).\n5. Their personal meeting link on that platform.\n\nWrite sections 2 and 2b to `answers-identity.json` (`full-name`,\n`work-email`, `role-description`, `department`, `university`,\n`institution-name`, `institution-domains`,\n`institution-safety-rail-domain`, `video-platform`, `video-link`) and\nrun the `identity` phase. It writes the block as `name`, `domains`,\n`safety_rail_domain`, `video.platform` and `video.link`, and the same\nlink as the top-level `zoom_link`, which the Create button reads when it\nadds the meeting link to an event. Then write `timezone` to\n`answers-scheduling.json` and run the `scheduling` phase. Check:\n`python3 tests\u002Fvalidate_config.py` names no placeholder in\n`user-profile.json`. Leave `related_domains`, `boilerplate_tokens`,\n`boilerplate_phrases` and `letterhead` as the template has them unless\nthe user names values. For an install at the worked example's\ninstitution, `config\u002Fexamples\u002Fcu-boulder\u002Fuser-profile.json` holds a\ncomplete block to start from.\n\nThe overlay render and install at the end of section 5 carry these\nfacts into every Claude session. They need the service account, so they\nwait until then.\n\n## 3. Outlook (all modes)\n\n**Why:** without this sign-in the EA reads no mail and no calendar.\nAsk whether they already have an app registration for the EA in their\norganization's Microsoft 365 tenant. Most people do not, and most cannot\ncreate one themselves. Choose by the answer:\n\n- Yes: ask for the application (client) id, the tenant id and the client\n  secret (\"Other\" answers), and whether the tenant allows public client\n  flows (then `device_code` needs no secret). Write `answers-auth.json`:\n  `graph-auth-method` (`confidential` or `device_code`),\n  `graph-client-id`, `graph-tenant-id`, `graph-client-secret`\n  (confidential only), `\"graph-sign-in-now\": false` and\n  `\"google-calendar-now\": false`. Run the `auth` phase (the `GRAPH_*`\n  keys go to `~\u002F.ea\u002F.env`, the secret to `~\u002F.ea-private\u002Fsecrets.env`),\n  then delete the file. Then the Graph sign-in, a step the user types:\n  `! python3 preprocessor\u002Fgraph_client.py --align --write` for\n  `confidential` (it prints a link, waits for the browser's redirect on\n  `localhost:8400` and aligns the scopes to what the app grants), or\n  `! python3 preprocessor\u002Fgraph_client.py` for `device_code` (a link and\n  a code for any browser). Both flows and the registration's values are\n  docs\u002FSETUP.md \"Microsoft Graph app registration\".\n- No: two paths (AskUserQuestion). **Ask IT**, the lasting one: fill in\n  `docs\u002Fit-request.md` with them, have them send it, stop and tell them to\n  re-run `\u002Fsetup` when IT answers (section 0 resumes here). **IT will not\n  register one**: say what docs\u002FSETUP.md \"Option C: no registration\n  (outlook-web-auth)\" does, from its first paragraph, and ask whether\n  their organization allows it; unless it is a clear yes, ask IT. On a\n  yes, run its four steps; they type the install and `login` with `!`.\n\nCheck before moving on:\n`python3 preprocessor\u002Fgraph_actions.py calendar-view --days 1`.\n\n## 4. Google Calendar and Drive (all modes, recommended)\n\n**Why:** a Google calendar counts as busy time only after its account\nsigns in, and a Google Docs link in mail opens only with a Drive\nsign-in. Ask whether they use Google Calendar, Gmail or Google Docs. Skip this section only if they say they\nnever use Google. Otherwise walk them through docs\u002FSETUP.md\n\"Google OAuth app\": a Google Cloud project, the Calendar API, the Google\nDrive API (and the Gmail API when the EA drafts there), the consent screen **published** (\"In\nproduction\": in \"Testing\" status Google ends the refresh tokens after 7\ndays), a Desktop OAuth client, its JSON saved as\n`~\u002F.ea\u002Fauth\u002Fgoogle_client_secret.json` (mode 600). Ask for each Google\naccount to read (\"Other\"), add them as `google-calendars` beside\n`timezone` in `answers-scheduling.json`, and run the `scheduling` phase\nagain. Then the Google sign-in for all of them, a step the user types in\nthe second terminal (it asks them to paste the address the browser lands\non): `python3 preprocessor\u002Fgoogle_calendar_client.py --setup`.\nCheck: `python3 preprocessor\u002Fgoogle_calendar_client.py --test`.\n\nThen the EA-Managed calendar (docs\u002FSETUP.md \"The EA-Managed calendar\"): ask\nthem to create a secondary Google calendar named `EA-Managed`, paste its\nid into `ea_managed_calendar` of `scheduling-preferences.json`, and run\n`python3 preprocessor\u002Fowner_trust.py seed --calendar` as the user: the\nmediator allows button-free writes only to the id in the owner-private\n`~\u002F.ea-private\u002Fcalendars.json`, never to one read from ea-bot's config.\nAsk for their working hours (the one time this install asks) and have\nthem add one recurring `wh Working Hours` event there; without it the\nsolver has no rule store and no place to hold time. It is required on\n`assistant` and `collaborator` and optional on `reviewer`.\n\nThen Google Drive (docs\u002FSETUP.md \"Google Drive\"): ask which Google\naccounts hold the documents their mail links to (\"Other\"; empty is fine),\nwrite them as `drive-accounts` in `answers-drive.json` with\n`\"google-drive-now\": false`, and run the `drive` phase. In a chat mode\nthe sign-in waits for the chat (section 8): the user says `connect\nGoogle Drive \u003Caccount>` there and follows the link, with no terminal.\nElsewhere it is a step they type in the second terminal:\n`python3 preprocessor\u002Fdrive_client.py setup --email \u003Caccount>`. Check:\n`python3 preprocessor\u002Fdrive_client.py test`. Say that the scope is read\nonly. An \"access blocked\" answer means the Workspace administrator must\nallow the app: say so in one line and go on.\n\n## 5. Service account and permissions (all modes)\n\n**Why:** a message that tricks the EA must not reach the user's files,\ntokens or Send button. `.\u002Fscripts\u002Finstall\u002Fsetup.sh --profile \u003Cname>` ran in section 1; run it again only if the\nmode changed. Then the service account, a step the user types in the\nsecond terminal: `sudo .\u002Fscripts\u002Finstall\u002Fsetup-ea-user.sh` (Linux) or\n`sudo .\u002Fscripts\u002Finstall\u002Fsetup-ea-user-macos.sh`.\nIt creates `ea-bot`, moves `~\u002F.ea` into ea-bot's home, installs ea-bot's\nown Claude Code and the sudoers rule, and on Linux turns mail mediation\non. Check: `id ea-bot && test -L ~\u002F.ea && sudo -n -u ea-bot true`.\nAfter this script `~\u002F.ea\u002Fconfig` belongs to `ea-bot`, and a later\n`.\u002Fscripts\u002Finstall\u002Fsetup.sh` run writes it as `ea-bot` through that sudoers rule. What\neach script does, and the sudoers rule, are docs\u002FSETUP.md \"The service\naccount\". Do not weaken a permission to get past an error.\n\nThen ea-bot's Claude login, a step the user types in the second\nterminal (a full-screen program):\n`sudo -u ea-bot env HOME=\u002Fhome\u002Fea-bot claude`, then `\u002Flogin`, then\nCtrl+C. Check:\n`sudo -n -u ea-bot test -e \u002Fhome\u002Fea-bot\u002F.claude\u002F.credentials.json`.\nOn macOS ea-bot has no keychain: the step is\n`cd \u002F && sudo -u ea-bot env HOME=\u002FUsers\u002Fea-bot \u002FUsers\u002Fea-bot\u002F.local\u002Fbin\u002Fclaude setup-token`\nand the token goes in ea-bot's settings (docs\u002Fmacos-claude-binary.md);\nthe doctor's `ea-bot: Claude login` line is the check.\nA token login (`scripts\u002Finstall\u002Fea-bot-token.sh` on Linux) loads no\nclaude.ai connector; the EA's own Google clients need none (section 7).\nOn a Linux desktop session, `newgrp ea` (or a new login) gives their\nshell the `ea` group.\n\nThen the install overlay (docs\u002FSETUP.md \"The install overlay\"): `render`, as\n`ea-bot`, turns the config into `~\u002F.ea\u002Fconfig\u002FCLAUDE.install.md`;\n`install`, as the invoking user who owns the deployed tree, copies it\nthere as `CLAUDE.local.md`, which every Claude session loads. On Linux:\n\n```bash\nsudo -u ea-bot \u002Fusr\u002Fbin\u002Fpython3 \u002Fhome\u002Fea-bot\u002Fea-system\u002Fpreprocessor\u002Finstall_overlay.py render\npython3 preprocessor\u002Finstall_overlay.py install --tree \u002Fhome\u002Fea-bot\u002Fea-system\n```\n\nYou run both: the sudoers rule lets the invoking user run any command\nas `ea-bot` without a password. On macOS, use `\u002FUsers\u002Fea-bot` and the\nHomebrew Python (`\u002Fopt\u002Fhomebrew\u002Fbin\u002Fpython3`; Apple's is 3.9); the other\ndifferences are docs\u002FSETUP.md \"macOS notes\". The doctor's two `install\noverlay` lines confirm both steps. Run both again after any later change\nto `user-profile.json`.\n\n## 6. Chat platform (assistant and collaborator)\n\n**Why:** the chat shows the drafts and buttons; the platform decides who\nstores them. Ask once which chat platform they want, and recommend the web chat:\nthe bot serves it itself, as an app on their phone over their tailnet,\nwith no chat server, and every message, file and card stays on this\nmachine. Slack is acceptable when they accept that everything the EA\nshows them, drafts and quoted mail included, is stored by Slack. The\ncomparison is the \"Choosing a chat platform\" table in docs\u002FINSTALL.md.\nThe answer goes in `answers-chat.json` as `\"chat-platform\"` (`web` or\n`slack`), and the `chat` phase records it in the chat block.\n\nFor the web chat, docs\u002FSETUP.md \"Web chat\": Tailscale on this machine\nand their phone. Offer this machine's tailnet name (`Self.DNSName` in\n`tailscale status --json`, without the last dot) and their login\n(`tailscale whois \u003Cthis machine's tailnet IP>`), each with \"Other\", as\n`web-chat-host` and `web-chat-login` in the same file, then run the\nphase. It writes the `web` block: port 8470, base path `\u002Fchat`,\n`public_url` `https:\u002F\u002F\u003Cname>:8444\u002Fchat`, `tailscale_login`. Then a step the user\ntypes in the second terminal:\n`sudo tailscale serve --bg --https=8444 --set-path \u002Fchat http:\u002F\u002F127.0.0.1:8470\u002Fchat`.\nCheck: `tailscale serve status` lists `\u002Fchat`. The hardening step in\nsection 8 has them type each web value back as it copies the block to\n`~\u002F.ea-private\u002Fchat.json`; the doctor's `web chat:` rows then pass.\n\nFor Slack, run the phase first, then docs\u002FSETUP.md \"Slack\" end to end:\nthe app and its scopes, its icon (`assets\u002Ftacitus-avatar.png`, uploaded\nby hand), Socket Mode, the event subscriptions, the app-level token, the\nprivate channel.\nAsk for the bot token, the app token, the channel id, the channel name\nand the user's member id, and write `EA_SLACK_CHANNEL_ID`,\n`EA_SLACK_CHANNEL_NAME` and `EA_SLACK_OWNER_ID` to `~\u002F.ea\u002F.env` (0640)\nand `SLACK_BOT_TOKEN` and `SLACK_APP_TOKEN` to `~\u002F.ea-private\u002Fsecrets.env`\n(0600); the `auth` phase does the same from `slack-bot-token`,\n`slack-app-token`, `slack-channel-id`, `slack-channel-name-env` and\n`slack-owner-id` in its answers file.\nThe scopes the doctor checks are the ones the bot calls.\n\nThe bot service comes in section 8, from the same root step that\nhardens the install (docs\u002FSETUP.md \"Services\"); `scripts\u002Finstall\u002Fsetup.sh` writes no unit.\n\n## 7. Claude Code connectors (optional)\n\n**Why:** a fallback only: the EA's own clients read Gmail, Calendar and\nDrive. The claude.ai connectors (and Slack on a Slack install) come with\nea-bot's Claude account, and only under a browser login; a setup-token\nlogin loads none, and then this section does not apply. Otherwise ask\nthe user to enable them in claude.ai Settings > Connectors\n(claude.ai\u002Fcustomize\u002Fconnectors) as the account ea-bot logged in with in\nsection 5, and to finish each one's sign-in there. Check, as ea-bot:\n`sudo -n -u ea-bot env HOME=\u002Fhome\u002Fea-bot \u002Fhome\u002Fea-bot\u002F.local\u002Fbin\u002Fclaude mcp list`\nlists `claude.ai Gmail` and `claude.ai Google Calendar` as connected\n(docs\u002FSETUP.md \"Claude Code connectors\").\n\n## 7b. Remote writer (optional, any mode that drafts)\n\n**Why:** some users want a model of their own to write the bodies. Ask once, after the connectors: do they run their own model, or have an\nOpenAI-compatible endpoint, that should write the email bodies instead\nof Claude? Most say no; then skip this screen and say nothing more. If\nyes, ask for the https endpoint, the model name and the API key, then:\nthe `REMOTE_LLM_API_KEY=` line into `~\u002F.ea-private\u002Fsecrets.env`,\n`python3 preprocessor\u002Fremote_llm.py init --endpoint \u003Chttps URL> --model \u003Cname> --drafting remote`,\nthen `python3 preprocessor\u002Fremote_llm.py ping`. The endpoint must be\nhttps. Do not offer the mail, digest, briefing or scheduling switches in\nthe same file; they are an owner's later decision (docs\u002FSETUP.md \"Remote\nwriter\", `docs\u002Fllm-lanes.md`).\n\n## 8. Acceptance\n\n**Why:** the services move to a tree the EA cannot change, and the doctor\nproves each part works. On Linux the hardening step, a `sudo` step the user types in the second\nterminal: `sudo bash deploy\u002Fharden-permissions.sh` (docs\u002FSETUP.md \"Hardening\"). It\nseeds the owner-owned code tree at `\u002Fopt\u002Fea-system` and the owner-private\nfiles, and moves the services off the ea-bot tree so a prompt-injected\nEA cannot reach the owner account. It says which bot unit it found: in\na chat mode it writes and starts the bot's system unit (docs\u002FSETUP.md\n\"Services\"); on `reviewer`, which has no chat platform, it says the\nbot-unit steps are skipped, which is expected. When a service does not stay up,\nit ends with a WARNING and that service's last log lines; a bot line\n`the chat setting \u003CNAME> is not set` sends you back to section 6. Check:\n`test -f \u002Fopt\u002Fea-system\u002F.deployed-commit`, and in a chat mode\n`systemctl is-active ea-chat-bot`. Mail mediation is already on:\n`scripts\u002Finstall\u002Fsetup-ea-user.sh` ran `deploy\u002Fenable-mail-mediation.sh`.\n\nOn macOS, in every mode, two `sudo` steps the user types in the\nsecond terminal instead: `sudo bash deploy\u002Fmacos\u002Finstall-services.sh` (the owner-owned\n`\u002Fopt\u002Fea-system`, the owner-private files and the LaunchDaemons: the\nmediator always, the bot only with a chat platform), then\n`sudo bash deploy\u002Fenable-mail-mediation.sh`, which turns mediation on\n(docs\u002FSETUP.md \"launchd\"). Check: the doctor's `service:` line for the\nmediator passes, and\n`sudo -n -u ea-bot test -r \u002FUsers\u002Fea-bot\u002F.ea\u002Fauth\u002Fmsal_token_cache.json`\nfails (ea-bot can no longer read the Outlook token).\n\nThen install the cron lines, pointed at `\u002Fopt\u002Fea-system`:\n`.\u002Fscripts\u002Finstall\u002Fsetup.sh --profile \u003Cname> --install-cron`. Check: `crontab -l`\nshows the `run-agent.sh morning-briefing` line under `\u002Fopt\u002Fea-system`.\n\nThen run `python3 scripts\u002Fea-doctor.py --profile \u003Cname>` and fix every\nFAIL it prints, using the fix text next to each; each fix names the\ndocs\u002FSETUP.md appendix for its check, and docs\u002FSETUP.md \"Troubleshooting and the\ndoctor's checks\" maps every check name to one. Warnings about features\nthe mode does not use are expected.\n\nFinish by running one briefing by hand,\n`.\u002Frun-agent.sh morning-briefing --now` (`--now` skips the 4 AM gate),\nand showing the user where the report landed: the EA channel in a chat\nmode, on `reviewer` `~\u002F.ea\u002Fstate\u002Freports\u002Fmorning-briefing-latest.md`\nand the phone push when one is configured.\n\nFor `reviewer`, offer the phone push once (docs\u002FSETUP.md\n\"Phone push\"): they install the ntfy app and pick a long random topic;\n`answers-push.json` (`\"push-configure\": true`, `push-topic`) and the\n`push` phase write `~\u002F.ea-private\u002Fpush.json`;\n`python3 preprocessor\u002Fpush_notify.py test` proves it. The briefing above\nthen sends a push too.\n\nSay three lines: the mode installed, where the EA talks to them, and\nthe one command that re-runs the checklist. Then go on to section 9.\n\n## 9. First week\n\n**Why:** the EA learns preferences from the user's words, not guesses.\nRun `python3 preprocessor\u002Fonboarding.py ask --count 3`: it prints the\nfirst three preference questions, each with an `id`. Ask them one at a\ntime with AskUserQuestion, as free text (\"Other\"), in the user's own\nwords. After each answer, record it before the next question:\n\n```bash\npython3 preprocessor\u002Fonboarding.py answer --id \u003Cid> --text \"\u003Ctheir words>\"\n```\n\nDo not paraphrase the answer; the text is the rule in their words. A\nscheduling answer (`protected-days`) is a standing rule for drafts and\nthe briefing; the scheduler skips a block only when it is an `nm` event\non the EA-Managed calendar (section 4), so say that once. If the script\nis missing or prints no question, say so in one line and end the\ninstall here.\n\nWhen the three are recorded, tell the user: the morning briefing asks\none more question each day for a week, at the end of the briefing; they\nanswer in the thread (or in the shell on `reviewer`), and\nsaying \"stop the questions\" ends the series at any time. That is the\nlast thing the install says.\n",{},"main","05a2b0c17cd59ab581d6826159a13a037c20b54e",".claude\u002Fskills\u002Fsetup",2,"https:\u002F\u002Fgithub.com\u002Farpg\u002Ftacitus","https:\u002F\u002Farpg.github.io\u002Ftacitus\u002F","https:\u002F\u002Fgithub.com\u002Farpg","https:\u002F\u002Farpg.colorado.edu","University of Colorado - Boulder","2026-11-15 14:51:03",{"source":7,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add arpg\u002Ftacitus --skill setup",{"tool":39,"command":40},"bunx","bunx skills add arpg\u002Ftacitus --skill setup",{"tool":42,"command":43},"pnpm","pnpm dlx skills add arpg\u002Ftacitus --skill setup","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Farpg\u002Ftacitus\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsetup\u002FSKILL.md",true,[],[48],{"skillNo":49,"name":50,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":18},"01M7F61YBZDD6KSD7340N44B5B","example-notes","https:\u002F\u002Fgithub.com\u002Farpg\u002Ftacitus\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fplugins\u002Fexample-notes\u002Fskill.md",[],[]]