diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
new file mode 100644
index 000000000..4979edbd3
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -0,0 +1,60 @@
+name: Bug report
+description: Report a bug, crash, or regression in Aiden Agent
+title: "[Bug]: "
+labels: ["bug"]
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Thanks for reporting a bug! Please search open issues first to avoid duplicates, and never include API keys, tokens, or private files.
+ - type: dropdown
+ id: surface
+ attributes:
+ label: Surface
+ options:
+ - Desktop (macOS Apple silicon)
+ - Desktop (macOS Intel — source build)
+ - Desktop (Linux x64)
+ - Desktop (Linux arm64)
+ - Headless server (aiden serve)
+ - iOS / iPadOS (Aiden On The Go)
+ - Android (Aiden On The Go)
+ validations:
+ required: true
+ - type: input
+ id: version
+ attributes:
+ label: App / CLI version and OS version
+ description: Desktop version is in Settings → About; headless CLI version is `aiden --version`.
+ placeholder: "e.g. Desktop 0.68.0 (or CLI 0.1.0) on macOS 15.4 / Ubuntu 24.04"
+ validations:
+ required: true
+ - type: textarea
+ id: description
+ attributes:
+ label: What happened?
+ description: Clear summary of the bug and what you observed.
+ validations:
+ required: true
+ - type: textarea
+ id: steps
+ attributes:
+ label: Steps to reproduce
+ description: Minimal steps needed to trigger the issue.
+ placeholder: |
+ 1. Open...
+ 2. Run...
+ 3. See error...
+ validations:
+ required: true
+ - type: textarea
+ id: expected
+ attributes:
+ label: Expected behavior
+ validations:
+ required: true
+ - type: textarea
+ id: context
+ attributes:
+ label: Logs, diagnostics, or screenshots
+ description: Redacted error text, screenshots, or screen recordings if helpful.
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 000000000..0a7a6b0f8
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,8 @@
+blank_issues_enabled: false
+contact_links:
+ - name: Security Vulnerability
+ url: https://github.com/sambitcreate/aiden-agent/security/advisories/new
+ about: Report security vulnerabilities privately via GitHub Security Advisories (do not open a public issue).
+ - name: Documentation
+ url: https://github.com/sambitcreate/aiden-agent/blob/main/docs/README.md
+ about: Browse setup, feature, and troubleshooting guides before opening an issue.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml
new file mode 100644
index 000000000..edaafa07a
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.yml
@@ -0,0 +1,43 @@
+name: Feature request
+description: Propose a new capability, workflow improvement, or design change
+title: "[Feature]: "
+labels: ["enhancement"]
+body:
+ - type: markdown
+ attributes:
+ value: |
+ We align on feature design in an issue before reviewing implementation PRs. Please explain the user problem clearly first.
+ - type: dropdown
+ id: area
+ attributes:
+ label: Area
+ options:
+ - Desktop workspace & chat
+ - Bots, routines, & Bot computers
+ - Design mode & artifacts
+ - Aiden Live & voice
+ - Aiden On The Go (iOS / Android) & Remote Access
+ - Headless server (aiden serve)
+ - Providers, skills, hooks, or MCP Connectors
+ - Other
+ validations:
+ required: true
+ - type: textarea
+ id: problem
+ attributes:
+ label: Problem or use case
+ description: What are you trying to accomplish, and what gets in the way today?
+ validations:
+ required: true
+ - type: textarea
+ id: proposal
+ attributes:
+ label: Proposed solution
+ description: How should this work from the user's perspective?
+ validations:
+ required: true
+ - type: textarea
+ id: alternatives
+ attributes:
+ label: Alternatives or workarounds considered
+ description: Optional. Any workarounds you've tried or constraints to keep in mind.
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
new file mode 100644
index 000000000..c0e506c41
--- /dev/null
+++ b/.github/pull_request_template.md
@@ -0,0 +1,35 @@
+
+
+## Problem
+
+
+
+## Change
+
+
+
+## Scope
+
+
+
+Closes #
+
+## Verification
+
+
+
+## AI disclosure
+
+
+
+## Checklist
+
+- [ ] I tested these changes locally and reviewed the diff myself
+- [ ] Related docs / tests are updated where behavior, settings, or contracts changed
+- [ ] No unrelated refactors or changes are included
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 000000000..52271457e
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,38 @@
+# Contributing to Aiden Agent
+
+Thank you for your interest in contributing to Aiden Agent!
+
+We welcome **bug fixes** and **documentation improvements** via pull requests. For **new features, UI changes, or architectural changes**, please **open a Feature Request issue and align on the design first** before writing code—unsolicited feature PRs may be closed without review.
+
+## Before you open a PR
+
+1. **Check existing issues and PRs** to make sure the problem isn't already tracked or being fixed.
+2. **Bug fixes**: Open a bug report first for non-trivial bugs, or link the existing issue in your PR (`Fixes #123`).
+3. **New features**: Open a [Feature Request](https://github.com/sambitcreate/aiden-agent/issues/new?template=feature_request.yml) to discuss the problem, scope, and UX before implementing.
+4. **One problem per PR**: Keep PRs focused and small. Separate unrelated refactors or cleanup into their own PRs.
+
+## Local setup and verification
+
+Follow [Development and architecture](docs/development.md) to install dependencies and run Aiden locally (`npm install && npm run dev`).
+
+Before opening a PR, run the checks relevant to the areas you changed:
+
+```bash
+npm test
+npm run type-check
+npm run lint
+```
+
+For faster scoped runs, you can use `npm run test:ci:core-git`, `npm run test:ci:runtime-subagents`, or `npm run test:ci:renderer-other` (see [docs/development.md](docs/development.md)).
+
+- For UI work, follow [docs/design-guide.md](docs/design-guide.md), [GUI.md](GUI.md), and [docs/settings-design-system.md](docs/settings-design-system.md), and attach before/after screenshots (or a short recording for motion/interaction changes) in your PR.
+- If your change alters behavior, platform support, settings, commands, or contracts, update the affected docs in the same PR.
+- If your change touches shared server contracts or transcript/activity UI, verify the matching `ios/` and `android/` behavior as well.
+- See [AGENTS.md](AGENTS.md) for detailed repository conventions and testing rules, and [docs/ci.md](docs/ci.md) for how CI lanes select jobs.
+
+## Using AI to contribute
+
+If you use an AI model or coding agent to help write code or draft a PR:
+
+- **Name the model** used in the pull request description.
+- **Test and understand every change yourself** before submitting. Include real verification results—do not paste unverified AI-generated PR summaries.
diff --git a/README.md b/README.md
index 719e11b03..f73de59b9 100644
--- a/README.md
+++ b/README.md
@@ -1,200 +1,85 @@
-# Aiden Agent
-
-
+
+
+
+Aiden Agent
+
- A native-feeling desktop workspace for chatting with local or hosted AI models and safely working inside the folders you choose.
+ A native-feeling desktop workspace for chatting with local or hosted AI models, running autonomous Bots, and working safely inside the folders you choose.
-```sh
-curl -fsSL https://raw.githubusercontent.com/sambitcreate/aiden-agent/main/install.sh | sh
-```
-
-The installer selects the native package for macOS or a supported Linux family,
-verifies the published checksum, authenticates Linux build provenance with the
-GitHub CLI, and verifies Apple signing plus Gatekeeper acceptance on macOS.
-Homebrew remains available with `brew install --cask sambitcreate/tap/aiden-agent`.
-Intel Mac installation will become available when a signed x64 DMG is published;
-the installer currently fails rather than selecting the incompatible arm64 DMG.
+
+ Website ·
+ Releases ·
+ Docs ·
+ Server CLI ·
+ iOS ·
+ Android
+
-Each release publishes the arm64 Mac DMG plus Linux x64 and arm64 AppImage,
-`.deb`, and `.rpm` packages. See the
-[Linux install and compatibility guide](docs/linux.md).
+
+
+
-
+Aiden runs on the [Pi](https://github.com/earendil-works/pi) agent runtime and gives it a restrained desktop workspace for macOS and Linux—with folder-scoped permissions, built-in Git and review, Design mode, voice sessions, autonomous Bots, and paired iPhone, iPad, and Android apps.
-On first launch, enter your name and choose **I have an account**, **I have an API key** or **I run a local model**. You can also choose **Set up later** and return to **Settings → Providers → Connect AI**. Open **Advanced** in Providers to add a custom endpoint or update model catalogs.
+## Install
-## Why Aiden
+### Desktop app
-I don't come from a coding background. I'd been bouncing between the coding agents that exist, and each one had a piece of what I wanted without any of them being the whole thing. I loved **Codex** for its restrained, lovely desktop UX, **Opencode** for letting me bring whatever model and provider I wanted and also looking great in both the terminal and desktop, and **Cursor** for its nimbleness and UI, and I used **Claude Code** for the models lol. But the one terminal agent kept coming back to was **Pi**, by **Mario Zechner**, for the plugin system I could shape to my own workflow. What **Pi** lacked was a GUI, and I wanted the extensibility with a real interface on top of it. The first version was a native **SwiftUI** app, but within two weeks it was clear that building a coding agent inside **SwiftUI** was the wrong fight for someone who doesn't already write code, so the project pivoted to **Electron**. I was playing around with **Glaze**, **Raycast**'s AI app maker. I figured, let me just recreate Aiden in Glaze, ran out of credits inside an hour, used **Codex** to grab the code out of Glaze, and a week later this is what happened. **Aiden** runs on the **Pi** agent runtime and gives it a native-feeling desktop workspace.
-
-## Features
-
-- **Making a Bot** - setup makes your first Bot, Chief, by itself; pressing **Start using Aiden** accepts its Full access (narrow it any time in its Advanced tab) and opens its chat, where it asks what you'd like help with. **New bot** takes just a name (pick a look if you like); **Templates** offers four ready-made Bots whose routines stay paused until you turn them on. Click a Bot's name in its chat to open its settings in the side panel's **Advanced** tab: switches save at once, while name, description, model and tools wait for **Save**. Ask a Bot to change its own name, description, look, instructions, check-ins, notifications or model and it does so with Undo (a change from a routine or another Bot waits on a card for you); it never changes its own access, tools, computer, Bot messaging, approvals or spending.
-- **Bots messaging each other** - ask a Bot to get help from another Bot, with labelled messages and one final result. Desktop and CLI hosts keep exchanges private and bounded. On the desktop, **Bot messaging** is one switch in Settings → Approvals → Advanced plus each Bot's **Can message other Bots** in its Advanced tab; paired phones keep their global switch, and iPhone and Android show one per-Bot **Can message other Bots** switch on a revision 61 Mac. Rules and approvals still apply. See [Bot messaging](docs/bot-messaging.md).
-- **Folder access requests** - a desktop-hosted Custom Bot can ask to use a folder outside its saved access. Choose Allow once or Deny, with Always for this folder under More ways to allow; whole-Mac access is once-only. Folders allowed for Bots stay out of the phone's file browser. See [Bot access requests](docs/bot-access-requests.md).
-- **One rules page** - Settings → Approvals lists Always allow, Always ask and Blocked rules for every chat and Bot on this Mac, grows from a card's Always, and keeps older Bot allowances as rows for their own Bot. In Auto, a Bot's own model (or the approval model you pick) approves the routine steps the owner asked for and anything else still shows its card; in Ask, an action you keep allowing offers **Switch to Auto** on its card when Auto would let the model decide it. See [Bot rules](docs/bot-rules.md#the-rules-page).
-- **Approve a Bot plan once** - review the steps and bounded actions on desktop or a paired phone, then follow its checklist or Stop plan. Passwords, payments, hand-offs and Computer Use on your Mac keep their existing checks. See [Bot rules](docs/bot-rules.md#approve-a-plan-once).
-- **Remember a repeated Bot approval** - eligible cards on desktop and supported paired phones can offer Always allow for that Bot after three approvals in two weeks without a denial. Saved app actions and website steps appear as Always allow rows, and selected folders under Allowed on this Mac, on the one rules page in Settings → Approvals, where Remove takes them away. Rules and Computer Use keep their checks. See [Bot rules](docs/bot-rules.md#the-rules-page).
-
-- **Aiden Live (Beta)** - with an empty message box, the send button starts Live (a waveform button that turns back into Send as soon as you type, attach or dictate); ⌘⌥A (Ctrl+Alt+A on Linux) starts it from anywhere. **Show Live in the send button** in Settings → Aiden Live keeps a plain Send. While it runs, a floating ribbon pill above the composer shows listening, thinking, speaking, acting, approval, and error states, with captions, mute, and End. Pick Live's voice, speaking speed, and ribbon colours from the pill or Settings, and say goodbye to end. First use walks through model access and the microphone once; on a Mac, Screen & Accessibility (Computer Use) is an optional extra that lets Live act in other apps. Live works on Linux too, without Computer Use; screen share there uses the desktop's picker on Wayland or Aiden's own on X11. Computer actions and scheduled tasks retain Aiden's existing approval boundaries. Live can also read, send to and stop the open chat, find and open another, and start a new one; what it sends shows a "By voice" label, it speaks up only about chats it sent to, when one finishes, fails or waits for an approval, and its chat tools never answer an approval. **Let Live use the open chat** in Settings turns this off. While Live is on, say allow or deny (in 11 languages) to answer the open chat's approval; voice allows once, and sensitive approvals still need a tap. It can also move through Aiden's own window wherever Live runs, with no extra permission (open Settings pages, press buttons, fill in fields) behind a soft glow around the window: your click or key takes over until you speak again, it asks you to say or tap Confirm before deleting or signing out, and it never reads your messages (it sees only names such as chat titles in the sidebar), answers approvals, grants access, changes a Bot's setup, flips switches outside Appearance or touches keys. With **Let Live use the open chat** off, it can't type or send in the composer either. Turn it off with **Let Live move through Aiden** in Settings → Aiden Live.
-- **Command palette and shortcuts** - `⌘K` searches commands, chats, models, providers, Settings, appearance actions, Bots, places, workspace tools, and the open chat's actions. Back/forward, stop, attach, model, and approval keys, `F6` between areas, arrow keys in the sidebar, `⌘F` find in chat, `↑` to fix and resend your last message, and `⇧F10` row menus keep everyday work keyboard-only; `⌘/` lists every key, and the View, Go and Chat menus show them too; see [docs/keyboard.md](docs/keyboard.md). One typed command system also powers native menus, visible shortcut labels, transactional global hotkeys, and the searchable Keyboard Shortcuts editor.
-- **Floating Quick Chat** - summon a floating chat starter from any app on macOS (`⌘⇧Space`) or Linux (`Ctrl+Shift+Space`) while Aiden is open. Pressing Send morphs the starter bar into a floating mini-modal that streams replies, handles tool approvals and questions, and expands seamlessly into Aiden's main window even mid-stream. Floating chats start as **Temporary** by default (hidden from the sidebar, Memory, and Remote until saved to **Chats** or attached in-place to a workspace folder). Configure the hotkey in Settings → Keyboard shortcuts and default persistence or click-outside pinning in Settings → Appearance → Quick Chat.
-- **Commands and explicit skills** - type `/` at the start of the composer to search Aiden app commands, or `$` to search the active workspace's available skills. Local skill folders and enabled installed Claude Code plugins feed the same [skill catalog](docs/skills.md). Commands reuse canonical app workflows; an explicitly selected skill is revalidated for the active workspace, applies to one accepted message, and persists only safe display provenance.
-- **Workspace settings** - each folder workspace has its own settings pop-up (`⇧⌘,`, or **Workspace settings…** in its ⋯ menu): rename it, set its folder access and memory, and switch off skills and connectors its chats shouldn't use. Everything on in Settings starts on; a switch takes effect from the next message, applies to chats started from a phone and to their subagents, and leaves Bots with their own access. A skill switched off there is hidden from the model but still runs when you type `$` and its name. The CLI does not read these choices yet.
-- **Native Subagents** - a foreground chat can delegate up to four fresh `scout`, `planner`, `reviewer`, or `implementer` tasks. Children inherit the approved workspace and model, stop with the parent, and appear as one collapsible card in the transcript (one line per child, the shared role named once in its header) plus an inspectable **Subagents** view in Environment. Only one indicator shows at a time: while the card is on screen nothing else does, and once it scrolls out of view a pill above the composer takes over (`⌘⇧S` opens its tray of runs, with Stop, Show in chat and the Subagents panel, even while the pill is hidden). The implementer can edit files and run commands within the parent permission ceiling.
-
- | Role defaults when capabilities are omitted | Full workspace access | Ask workspace access | None |
- | --- | --- | --- | --- |
- | Scout, planner, reviewer: read/search | Read/search | Read/search | No workspace tools |
- | Implementer: read/search, write/edit, shell | Writes and shell run under this child run without another card | One write grant and one separate shell grant per child run, requested on first use | No write or shell tools |
-
- Near its existing turn, tool, or time limit, a child reserves one text-only reporting turn; any partial report remains incomplete and unverified. Cancellation still stops it. Web and MCP calls keep their existing per-call approval behavior. Implementer cannot delegate to another subagent. Rollout flags and the parent capability ceiling can narrow every row.
-- **Bots and Web Search** - macOS and Linux can create durable Bots with explicit capability grants, persistent conversations, image understanding, Telegram control, and [scheduled check-ins in the same chat](docs/bot-routines.md) with recovery for claimed fires, [retries for temporary failures confirmed to have requested no tools](docs/bot-routines.md#when-a-routine-fails), a pre-fire health check, one "Needs you" card when only you can fix something, and an automatic pause after three failures in a row; per-Bot quiet hours and a daily notification limit; follow-ups on dated promises; routines that learn from declined suggestions; and routines that run when a file changes in the Bot's folder or their own link is called; and Bots that learn: lessons from a routine's runs (kept only with your OK), how-to lessons from your corrections, skills they propose (a skill in a Bot's folder loads only after you approve it), memory tidying, and a What I've learned page with Undo (Linux needs an unlocked Secret Service keyring). A Bot can hand a step to you on a card, ask you to sign in inside its own browser profile (the model never sees your password), follow plain-language rules that only tighten what it may do ([docs/bot-rules.md](docs/bot-rules.md)), and be paused as a whole. In a Bot's chat on the desktop, everything waiting on you sits in one Needs-you slot above the composer ("Needs you · 1 of 3"), one status card shows below the transcript, the Bot's suggestions show one at a time, and tool steps stay hidden unless Settings → Appearance → **Show tool activity** is on. Routines follow the one approval mode in Settings → Approvals; only Never ask lets them take Ask first steps and connected-app changes without waiting for you (passwords, payments and Hand off to me rules still come to you). Every desktop can configure explicit Web Search routes from the expanded provider catalog. While Web Search is on, the agent can also read a public page in your chats, and an opt-in extract mode returns only the values it asks for, each with supporting page text ([docs/web-fetch-extract.md](docs/web-fetch-extract.md)).
-- **Connected-app watches** - watch upcoming Google Calendar events through Composio on Mac or Linux, or an iMCP Mail mailbox on Mac. Configure, test, edit, pause, run or remove watches from desktop, iPhone or Android. Explicit source discovery binds an eligible account and calendar or mailbox; accepted checks continue while Aiden runs and the host is awake. See [watch setup and recovery](docs/bot-routines.md#connected-app-watches).
-- **Open work** - Bots track explicit tasks they accept, with Open, Waiting, Done and Dismissed states, source/reply links and a live execution status. Manage them from the Bot's Advanced tab on desktop or its Profile on iPhone or Android: add, edit, dismiss, undo a recent change or stop its linked run while preserving other queued messages. See [Open work](docs/bot-open-work.md).
-- **Models for each routine** - choose a model, supported thinking level and optional explicit fallback for each Bot routine from desktop or a paired phone. A Bot's own thinking level is under Advanced → Model on the desktop. Accepted runs retain their own selection across queues and restarts. See [routine models](docs/bot-routine-models.md).
-- **Bot peers** - approve named Bot pairs in both directions, inspect their exchanges and stop linked work from desktop or a paired phone. Each recipient keeps its own access, rules and spending limits. See [Bot peers](docs/bot-peers.md).
-- **Bot computers (Apple silicon):** an opt-in macOS VM per Bot, which the Bot uses with its own `computer` and `computer_shell` tools, routines included. Watch it live in the Bot panel's Computer tab, and click, type or choose Take over to use it yourself, then Give back. With element control, which you allow once for the base computer in Settings → Computers & VMs → Bot computers, the Bot can also read an app's buttons and fields and click them by number. A Bot can ask you to sign in to a site on its own computer: Open hands you the computer with Safari at that site, and the Bot's computer tools wait until you answer. See [docs/bot-computers.md](docs/bot-computers.md).
-- **Headless server** - `aiden serve` runs Aiden on a macOS or Linux box with no display, such as a server you reach over SSH, for paired phones and Macs: chats, Bots, scheduled tasks and Telegram run there, and it prints a pairing code at startup. `aiden service install` keeps it running across reboots and asks whether phones reach it on the local network, over Tailscale, or both. It is a server with short admin commands, not an interactive terminal app; build it from a clone (see [the server guide](packages/cli/README.md)). It can also enable durable Bot sessions with `aiden bots enable-durable` and a restart; migration preserves legacy conversations and journals in a private recovery backup ([supported capabilities and recovery](docs/cli-durable-bots.md)).
-- **Workspaces and managed worktrees** - use folders, scratch workspaces, or isolated managed worktrees with three access levels, workspace-scoped tools, Ask-mode approvals, guarded creation/deletion, and crash-aware cleanup. Workspace and Bot chats share one approval card ("Run on your Mac?", "Change files on your Mac?", "Review before …"); tool calls waiting together share it only when they are the same call (same tool and arguments), the same call you denied isn't asked about again in that reply, and an answered card leaves a short status line such as "Allowed once". A new chat can start in its own worktree on its first message, from the desktop or from Aiden On The Go. If a workspace's folder is moved, renamed or deleted, Aiden names it above the composer and keeps your message until the folder is back. If a managed worktree's folder is deleted or moved while its branch is still there, the chat offers **Restore worktree** (checks the branch out again in the same place, with its commits; uncommitted changes are gone, so a folder that was only moved or is in the Trash is better put back, then **Check again**) or **New chat in main checkout** (carries your unsent message).
-- **Inbox sidebar (Beta)** - switch the sidebar from **By workspace** or **Recent only** to **Inbox**, in the sidebar's Organize menu or Settings → Appearance → Sidebar. Chats and Bots that wait on you (an approval, a question, a failed run), on this Mac or a paired one, sit in **Needs you** with how long they've waited; new replies sit in **Updates** with a one-click Mark read; the past week sits in **Earlier**; and running chats collect in a **Working** shelf at the bottom. A row's ••• or right-click menu can **Pin** it to a **Pinned** group, **Mark done** to hide it until something new arrives, or **Snooze** it until later today, tomorrow or next week (an approval, a question, a failed run or your own reply wakes it early); each action shows a short Undo, and a search still finds Done and snoozed chats, with **Mark not done** and **Unsnooze** in their menus. Rows hold still while your pointer or keyboard is in the list, and opening one lands on its pending card. The Dock icon (the launcher icon on Linux) shows how many rows wait in Needs you, counting paired computers only while they're online; turn it off with **Show Needs you count on the Dock icon** (**on the app icon** on Linux) in Settings → Appearance → Sidebar. Also available in Aiden On The Go for iPhone and Android; see the [Inbox sidebar plan](docs/plans/inbox-sidebar-plan.md).
-- **Chats without a workspace** - choose **No workspace** to just chat with your global settings. The chat is listed under **Chats** in the sidebar and still runs in its own hidden folder in Aiden's app data, so files, skills and Git work; deleting the chat moves that folder to the Trash. Any No workspace or Temporary chat can also be attached in-place to a real project workspace (**Attach to workspace…**), optionally copying scratch files into the folder while preserving conversation history. Paired iPhones and Android phones list No workspace chats the same way and can start one too; see [chats without a workspace](docs/no-workspace-chats.md). Copies and populated forks get a separate empty folder and independent access.
-- **Models and the Model Pad** - choose from Pi's native hosted-provider catalog, local Ollama or LM Studio models, and declarative compatible endpoints. Arrange a personal capability-and-pace map, optionally enrich hosted models with explicitly fetched Artificial Analysis scores through a benchmark-only OpenRouter key, and keep benchmark evidence visibly separate from runtime limits and availability. Each chat keeps its own model: picking one in a chat that already has messages changes only that chat, while a pick in a new chat sets the model new chats start with. The iOS and Android apps follow the same rule for the Mac they are paired with. Phones follow refreshed desktop choices unless that chat has an unsent user pick.
-- **Usage limits and spending limits** - when a provider's rate limit or plan window turns a reply away before it starts, chats, Bots and routines wait for the reset (up to a longest wait you choose, 6 hours by default), send one test request, then resume one at a time with the same model; a "Waiting for … usage limit · next try at 3:40 PM" row offers **Retry now**. Dollar limits per chat, per Bot per month and per routine run count only pay-as-you-go API keys, and a reached limit offers **Allow $X more**, also from Aiden On The Go. The owning desktop tracks limits; paired phones can respond to Bot spending notices. See [usage limits and spending limits](docs/usage-limits-and-spending.md).
-- **Terminal, Git, and review** - keep a terminal drawer beside the conversation, send selected output to the chat, inspect files and diffs in Environment, edit with dirty-file protection, compare branches, commit or push checked snapshots, and open the workspace in a discovered external editor.
-- **Design mode** - turn a workspace chat into a design canvas with the Design button, ⇧⌘L or `/design` (Aiden can also ask on a card). The chat becomes a column beside an infinite canvas with pages, formatted notes, groups, text, artboards, shapes, arrows and drawings, plus sandboxed live workspace pages, images and Aiden's visuals. Aiden places, sizes (phone, tablet or desktop), arranges, groups, restyles and reorders frames and manages canvas pages with canvas tools, draws a whole flow or diagram in one call, copies frames and makes a page's dark, width and tweak variants side by side, never changing a frame you locked (all of one reply's canvas changes undo as one step), and every HTML page it writes, edits or makes with a command under the workspace's `design/` folder lands on the canvas by itself and reloads as it saves, so you watch the design take shape while it works (opening design mode also puts the pages the chat already wrote on an empty canvas), and each page it writes is checked for script errors and missing files, with a light or dark picture when it asks for one; comment on any element of a page and send the comments back as scoped edits that Aiden can answer or resolve, edit a page's words in place (plain changes are written into its file), download frames as PNG, PDF or the original file, present them, expand the canvas with the button beside Present or ⇧⌘\ (the sidebar folds away so the chat on the left and the canvas fill the window; Minimize brings it back, and design mode remembers the choice), and use a side panel with Properties, Layers, a page's Code and Tweaks (a Dark switch and the page's own controls in folders: sliders with typed values, colours, switches, choices, a two-axis pad, words and buttons, with saved versions you can lay out side by side, Shuffle, Send to Aiden, Copy and Make default, which writes the values into the page's file; the same controls float over a page while you're inside it). The first time in a workspace with no `design/tokens.css`, Aiden offers to write one, plus a specimen page, from the colours and fonts your project already uses, and writes them only if you say yes. Desktop only, on by default; `AIDEN_DESIGN_MODE=0` turns it off. See the [Design mode spec](docs/superpowers/specs/2026-10-31-design-mode-design.md).
-- **Workspace artifacts** - ask Aiden for a page such as the open PRs or a release checklist and it keeps it in an **Artifacts** tab beside the chat, re-reading its data from commands or workspace files under the workspace's access setting, with buttons that ask Aiden, fill the composer, or run approved commands. A native visual from a chat can be kept as a page with **Keep in Artifacts**, and pages can be exported as a file and imported into another workspace. Desktop only; see [workspace artifacts](docs/workspace-artifacts.md).
-- **Coding follow-through** - the agent can leave a dev server or long test run going as a background job and hears when it ends, and a server a command leaves running is kept as a job too, with buttons for the local addresses it serves (the list and Stop are on iPhone and Android as well); `/follow` keeps a chat on its pull request until it merges, reporting failed checks with the end of their logs, merge conflicts, comments from people who can write to the repository and from review bots, and checks passing so the agent can wrap up (the agent also follows on its own when you ask it to see work through); and `/until npm test` keeps the agent fixing until a check passes, five checks at most. macOS and Linux desktop; see [coding follow-through](docs/coding-follow-through.md).
-- **Steady replies** - when a model request fails for a passing reason (a dropped connection, a server error, a timeout), Aiden sends it again up to five times with growing waits and shows "Trying again in 8s" in the working row; Stop cancels the wait. A reply cut off by the model's output limit, or by a connection that drops mid-answer, keeps what it wrote and continues on its own up to twice while the chat is within its spending limit. Reads the model asks for in one step (files, searches, web, read-only MCP tools) run side by side. A chat that was mid-answer when Aiden quit or crashed shows a Resume button on the next launch; it never resumes on its own. If Aiden was waiting on a question, the question comes back and the answers start a new turn; if it was waiting on an approval, the Resume card names the saved request and asks you to check whether the action ran before trying it again. Approvals expire at restart. Errors that cannot pass, such as a bad key, fail at once, and the failure card offers the next step that fits: Try again, Open Providers, Continue, or Compact and try again, plus Switch model. See [agent loop resilience](docs/plans/agent-loop-resilience-plan.md).
-- **Rich responses and local diagnostics** - render sandboxed HTML, chart, math, and raster artifacts with recovery/export controls, and inspect or export bounded local diagnostics without an automatic upload path.
-- **Desktop integration and appearance** - native menus (on Linux, behind a ☰ button in Aiden's own title bar, or the system title bar if you prefer; see [Linux](docs/linux.md)), encrypted system credential storage, **Parakeet**, the dictation pill, semantic themes, high contrast, reduced motion, and consistent light/dark rendering. Appearance → Chat controls work-detail density and collapse timing, the shared chat-link destination, and the desktop Queue/Steer default (Cmd/Ctrl+Enter uses the other action while busy). Apple **Foundation Models**, Accessibility auto-paste, and the signed **Rust** Computer Use broker remain macOS-only. On Apple silicon, Parakeet also runs on the GPU through **transcribe.cpp** (Metal) and shows dictated words in the pill and the composer as you speak; Intel Macs, Linux and the headless server keep sherpa-onnx.
-- **Shared browser and annotations** - browse beside the chat in Environment, preview workspace HTML/PDF files, use isolated profiles and responsive viewports, and share selected text, elements, drawings, and image crops with Aiden. Aiden's browser tools operate on those same tabs. See [browser behavior and controls](docs/environment-browser.md).
-- **Extensibility and background work** - use skills, **Connectors** (Aiden's catalog of hosted MCP services such as Linear, Notion, GitHub and Composio, the local Figma Desktop server, on a Mac the [iMCP](https://github.com/mattt/iMCP) app for Calendar, Contacts, Messages, Reminders and more, or any custom MCP server), **Exa** search, scheduled tasks, voice, and attachments through typed, allowlisted boundaries. A running chat checks connector tools against the current inventory before execution. Each remote tool request checks again after obtaining credentials, including when retrying after an authorization challenge. A connector sign-in whose token expires within 30 seconds is renewed before the request goes out, and connections that need a renewal at the same time share one, so a server that rotates refresh tokens does not sign Aiden out; a renewal that fails because the sign-in server is down keeps the sign-in. Workspace-disabled connectors are skipped during subagent discovery. Composio has one tool and one connection allowance, with enabled apps and operations managed in Composio; existing individual restrictions require an explicit switch to the service. See [Composio access](docs/composio.md).
-- **Apps using Aiden (macOS and Linux)** - let another MCP client on the same computer, such as Claude Code or Codex, list and read your ordinary Aiden chats, or, with Supervised access, start and follow turns that follow the workspace's approval mode (Ask, Auto or Never ask) like your own, with every approval and question left to you in Aiden. Off by default; turn it on and add each app with its own one-time token in **Settings → Connections → Apps using Aiden**. It listens on loopback only, and chats an app started say **Started by** it. See [Aiden MCP server](docs/aiden-mcp-server.md).
-- **Hooks (macOS and Linux)** - run your own shell commands before or after a tool, when you send a message, when a chat starts or when a reply finishes, in the Claude Code hook format. A hook can block a tool, ask you first, add context or ask the agent to keep going. It never widens what a chat may do: its `allow` can only stand in for an approval you could have remembered (a workspace file or command tool outside a Bot), and it skips no other card. Hooks from Settings → Hooks, a repo's `.aiden/hooks.json` or the agent's proposals run only once you approve them, and any change needs approval again. See [hooks](docs/hooks.md).
-- **Projects on paired computers** - clone a local repository into an approved folder on a connected desktop and explicitly select any environment files to transfer. The destination uses its own Git credentials. See [paired project setup](docs/aiden-on-the-go-remote-access.md#add-a-local-project-to-a-paired-computer).
-- **Aiden On The Go** - opt in to a pinned local-network connection or an explicit non-Funnel Tailscale Serve route, pair each iPhone, iPad, or Android device separately, and revoke devices from [Settings → Connections](docs/aiden-on-the-go-remote-access.md).
-- **Updates and release safety** - signed builds use the verified GitHub release feed. Once an update is downloaded, Aiden shows the version above Profile with **Later** and **Restart now**, then follows the normal save and shutdown guards before relaunching.
-
-## Upcoming
-
-The roadmap is maintained in [the plan index](docs/plans/README.md). These bullets name only the unfinished parts of partially shipped work or features with no runtime implementation yet; they are directions, not release promises:
-
-- **External reply images** - desktop Markdown images wait for **Load image** in each message. Aiden checks public addresses and bounded raster bytes after the click; generated and attached images keep their existing previews. See [chat image privacy](docs/transcript-images.md).
-- **Create Images** - early work behind the default-off `AIDEN_EXPERIMENTAL_CREATE_IMAGES` flag; see the [Create Images plan](docs/plans/design-studio-create-images-rebuild-plan.md). The flagged Design Studio was removed on 2026-10-31 and replaced by Design mode.
-- **Provider completion** - Pi built-in discovery, encrypted credentials, provider-owned authentication, native streaming, validated pi.dev catalog overlays with an offline cache, custom provider composition, canonical assistant provenance, and voice credential lookup already ship. Remaining work is scalable large-catalog UX and rollout cleanup. See the [Pi Provider Integration](docs/plans/pi-provider-integration-plan.md) plan.
-- **Truthful generation progress notes** - no progress-note runtime exists yet. The plan would show one temporary acknowledgement after an otherwise-silent start, using an explicitly selected on-device or verified hosted route without exposing hidden reasoning. See the [Generation Progress Notes plan](docs/plans/generation-progress-notes-plan.md).
-- **Long-session context** - model-aware compaction with Pi-native checkpoints, crash recovery, visible compaction activity, compaction when you return to a large chat whose prompt cache expired (automatic with pi-vcc, a "Compact first?" prompt with LLM compaction), and busy-composer Steer/Queue already ship. Remaining work includes durable-versus-working memory separation and provider-native compaction paths. See the [Compaction](docs/plans/compaction-plan.md) and [Pi Compaction and Durable Memory Upgrade](docs/plans/pi-compaction-memory-upgrade-plan.md) plans.
-- **Simulator devices** - on macOS, the Environment **Simulator** tab streams and controls iOS Simulators and Android Emulators on this Mac, a paired Mac, or an SSH host, with optional procedural 3D frames and consent-gated `device_*` agent tools. On by default since 0.55.0; `AIDEN_EXPERIMENTAL_DEVICES=0` is the kill switch. Remaining work is real-Mac acceptance for agent tools, paired Macs and 3D frames. See [Simulator devices](docs/devices.md).
-- **Storage** - Settings → Storage measures how much disk Aiden uses on this computer, by category, in a stacked bar with the largest worktrees and chats listed. It offers to remove unused worktrees, delete a chat, clear the browser cache (you stay signed in) and clear logs, and links to Voice and Bot computers for their downloads. Every action reviews what it will remove and how much it frees first, and a worktree with uncommitted or unpushed work, a chat or terminal using it or a scheduled task in it is never removed. The scan runs in the background, so the page never waits on it. See [Storage](docs/storage.md).
-- **Whole-app performance, durability, and battery gates** - atomic/recoverable chat storage and several bounded lifecycles already ship. The broader program still needs production-equivalent baselines, recovery and hard bounds across the remaining stores and payloads, zero-idle Git/renderer scheduling, cancellable heavy helpers, and enforceable packaged release budgets. See the [Performance, Stability, Battery, and Efficiency plan](docs/plans/performance-stability-efficiency-plan.md).
-
-## Privacy and trust
-
-On macOS and Linux, portable configuration uses an owned private directory (`0700`) and config and migration/recovery files use `0600`. The `~/.aiden` folder may itself be a symlink to a folder you own (as dotfile managers make), and that folder is then made private; other symlinks, foreign ownership and linked config files block access rather than replacing data. A dedicated `AIDEN_CONFIG_DIR` may override `~/.aiden`; do not point it at home or a shared directory. Windows chmod does not provide an equivalent ACL guarantee.
-
-Aiden stores chats, settings, workspace metadata, and downloaded speech models locally. Each picture in a chat is kept once as its own file beside the chats (two chats showing the same picture share it). After a chat is deleted or cleared, picture files that no chat uses any more and that have not been used for a day are removed. Provider credentials, MCP OAuth sessions and custom MCP environment/header values use the operating system's encrypted credential storage. Pending local connectors are sealed before launch approval; copying portable config copies only their markers. In Settings, **Review and approve** opens an explicit native review of the exact command, arguments and saved environment overrides, then rechecks the effective launch before granting consent. A secure-storage failure leaves the connector blocked. Linux refuses to store secrets if only Electron's reversible `basic_text` backend is available. The renderer is sandboxed, has no direct Node.js access, and communicates with Electron through an allowlisted bridge.
-
-Apart from the release update check and the usage data described below, network access happens only when the selected feature needs it: hosted models receive the conversation content sent to them, cloud transcription receives selected audio, Exa receives search queries, sites the agent reads receive a plain page request (never one to this computer or a private network), Cloudflare receives the page text and field names when extract mode is on, remote MCP servers receive tool requests, model downloads contact their upstream host, and a pull request that a chat follows is read from GitHub every few minutes until the follow ends. A fully local session can use a local model, on-device voice, no remote MCP servers, and web search disabled.
-
-Release builds of the desktop app send anonymous usage data to PostHog: app launches, daily use, setup, updates, which big features are used and sanitized crash reports, with a random install ID and never chats, files, paths, or keys. It is on by default; turn it off in Settings → About → Usage data or with `DO_NOT_TRACK=1`, and see every event and field Aiden can send under **What's sent**. Development builds never send, and neither does a headless server built from a clone; a distributed server build has its own switch, `aiden telemetry off`. See [Usage data and crash reports](docs/analytics.md).
-
-On macOS, Computer Use is an opt-in beta with a global switch, permission checks, and exact target binding. The model's first Computer Use call in a chat raises one access card, "Use your Mac with Computer Use?" (Deny, Allow in this chat, or Always allow from its menu); an allowed chat then acts without per-action cards, and Settings can turn off Always allow or reset chat permissions. It is omitted from Linux builds. See the [Computer Use security design](docs/computer-use-integration.md) for the complete boundary.
-
-## Architecture
-
-```text
-React renderer
- │ allowlisted context bridge
- ▼
-Electron preload
- │ typed IPC and notifications
- ▼
-Electron main process
- ├── Pi agent and model adapters
- ├── workspace-scoped tools, Git, review, and terminal
- ├── encrypted credentials and local JSON stores
- ├── MCP, attachments, search, and voice
- └── hardened native helpers, plus macOS-only Apple model and Computer Use helpers
+```sh
+curl -fsSL https://raw.githubusercontent.com/sambitcreate/aiden-agent/main/install.sh | sh
```
-Core technologies include Electron 43, React 19, TypeScript, Vite, Tailwind CSS, TanStack Router and Query, Radix UI, the Pi agent runtime, Swift, and Rust.
-
-## Development
-
-### Requirements
-
-- macOS or a glibc 2.34+ x64/arm64 Linux desktop
-- Node.js 22.22 or newer and npm (CI pins 22.23.4; use the newest release of your Node line)
-- Rust and Cargo (rustup, in `~/.cargo/bin` or on `PATH`, or set `CARGO`) only for macOS Computer Use helper tests and packaged macOS builds
-- A full Xcode 26 or newer only for macOS Apple Foundation Models builds
-- An Apple signing identity only for packaged macOS distribution builds
+The installer selects the native package for your machine, checks its published SHA-256 checksum, verifies Apple signing/Gatekeeper on macOS, and verifies build provenance with `gh` on Linux.
-### Run locally
+| Surface | Install | Notes |
+| --- | --- | --- |
+| **macOS** (Apple silicon) | `brew install --cask sambitcreate/tap/aiden-agent` | Download `Aiden-Agent-Beta-arm64.dmg` from [Releases](https://github.com/sambitcreate/aiden-agent/releases) (signed Intel x64 DMGs are not published yet) |
+| **Linux** (x64 & arm64) | `.deb`, `.rpm`, or `AppImage` | Download via `install.sh` or [Releases](https://github.com/sambitcreate/aiden-agent/releases); see the [Linux guide](docs/linux.md) |
+| **Headless server** | Build `aiden serve` from clone | Runs chats, Bots, and schedules over SSH; see [Server guide](packages/cli/README.md) |
+| **iOS / iPadOS & Android** | TestFlight / CI debug APK | Dev & test guides in [ios/README.md](ios/README.md) and [android/README.md](android/README.md); see [distribution notes](docs/development.md#companion-clients-and-headless-server) |
-```bash
-npm install
-npm run dev
-```
+### First run
-`npm run dev:sink` opens the development-only component sink, a page of every shared UI primitive in its states with a theme preset and Light/Dark toolbar. See [Component sink](docs/design-guide.md#component-sink).
+1. **Enter your name** and pick how you want to connect AI: **I have an account**, **I have an API key**, or **I run a local model** (Ollama or LM Studio). You can also choose **Set up later** and configure models in **Settings → Providers**.
+2. **Finish setup**—Aiden creates your first Bot (**Chief**) with **Full access** (accepted when you click **Start using Aiden**, and narrowable anytime in Chief's **Advanced** tab), lets you choose your anonymous usage-data setting, and offers a quick feature tour.
+3. **Open a chat or workspace**—start in **Chief**'s chat, open a project folder, or adjust approval modes (`Auto`, `Ask`, `Never ask`) and rules anytime in **Settings → Approvals**.
-The native Aiden On The Go iPhone and iPad client lives in [`ios/`](ios/README.md). It is not part of the Electron development command; open `ios/AidenOnTheGo.xcodeproj` or use the documented physical-device `xcodebuild` commands separately.
+## What you get
-### Mobile distribution
+- **Workspaces, Git, and follow-through** — Work inside folder workspaces (`Work in this folder` or `Chat only`), scratch workspaces, [No workspace](docs/no-workspace-chats.md) chats, or isolated Git worktrees under `Auto`, `Ask`, or `Never ask` approval modes. Inspect diffs, run a terminal beside the chat, delegate up to four native subagents per call (up to eight per reply), and use `/follow` or `/until` so Aiden watches PR checks, review-bot comments, and failing tests ([coding follow-through](docs/coding-follow-through.md)).
+- **Autonomous Bots & Bot computers** — Create durable Bots with [scheduled routines](docs/bot-routines.md), [plain-language rules](docs/bot-rules.md), [open-work tracking](docs/bot-open-work.md), [peer collaboration](docs/bot-peers.md), and connected-app watches (Google Calendar; iMCP Mail on macOS). On Apple silicon (macOS 26+), each Bot can optionally run its own isolated macOS VM ([Bot computers](docs/bot-computers.md)).
+- **Design mode & Artifacts** — Turn a workspace or No workspace chat into an infinite canvas beside the conversation (`⇧⌘L` on macOS, `Ctrl+Shift+L` on Linux, or `/design`), watch live HTML pages update as Aiden writes them, tweak controls and colors, comment on elements, or keep live [workspace artifacts](docs/workspace-artifacts.md) beside your chat.
+- **Aiden Live & on-device voice** — Start a voice session with **Aiden Live (Beta)** to talk through tasks, navigate Aiden, and answer approvals by voice, or use **Parakeet** dictation locally (with Metal GPU acceleration on Apple silicon).
+- **Floating Quick Chat** — Summon a floating chat starter from any app (`⌘⇧Space` on macOS, `Ctrl+Shift+Space` on Linux) that morphs into a streaming mini-modal with tool approvals, expands into the main window mid-stream, and starts as a Temporary chat you can save or attach in-place to a workspace.
+- **Aiden On The Go & headless server** — Pair iPhone, iPad, Android, or another Mac over your local Wi-Fi or Tailscale ([remote access guide](docs/aiden-on-the-go-remote-access.md)), or run [`aiden serve`](packages/cli/README.md) on a headless Linux/macOS box.
+- **Extensibility & local-first privacy** — Bring your own hosted or local models, use `/commands`, `$skills` ([skills](docs/skills.md)), [hooks](docs/hooks.md), MCP connectors (including [Composio](docs/composio.md)), an embedded browser ([browser guide](docs/environment-browser.md)), and **Apps using Aiden** ([local MCP server](docs/aiden-mcp-server.md)). Chats stay local on disk and secrets live in OS encrypted storage; see [Privacy and trust](docs/privacy.md) and [Usage data](docs/analytics.md).
-The iPhone and iPad app is distributed through **TestFlight only**. GitHub releases do not publish an IPA; [`ios/README.md`](ios/README.md) documents local development and device validation. Android validation remains separate from the desktop release. Pull requests run the Android verification gates without retaining an installable artifact; relevant merges to `main` publish the debug APK and its checksum.
+## Why Aiden
-The development launcher prepares a platform-appropriate **Aiden Agent Dev** runtime that can run beside the installed **Aiden Agent** app. Development uses separate app-data, Chromium session, log, crash, and `~/.aiden-dev` roots; it does not copy production data, register global shortcuts, or check the production update feed by default. Set `AIDEN_DEV_GLOBAL_SHORTCUTS=1` only when a development run intentionally needs the global bindings.
+I don't come from a coding background. Bouncing between coding agents, each one had a piece of what I wanted—**Codex** for its restrained desktop UX, **OpenCode** for letting me bring any model and provider, **Cursor** for its nimbleness, and **Claude Code** for the models—while **Pi** (by Mario Zechner) had the extensible runtime I kept coming back to, just without a GUI.
-Native builds discover the newest compatible full Xcode without changing the machine-wide `xcode-select` setting; `DEVELOPER_DIR` remains available as a per-command override.
+After a brief native SwiftUI attempt, the project moved to Electron so I could pair Pi's agent runtime with a native-feeling desktop workspace, explicit permissions, and mobile companion apps.
-### Verify changes
+## Documentation
-```bash
-npm test
-npm run test:native
-npm run type-check
-npm run lint
-npm run build
-```
+- [All docs index](docs/README.md)
+- [Linux install and compatibility guide](docs/linux.md)
+- [Privacy and trust](docs/privacy.md)
+- [Keyboard shortcuts & command palette](docs/keyboard.md)
+- [Plans and roadmap](docs/plans/README.md)
-### Package the app
+## Development & Contributing
```bash
-npm run package
-npm run package:verify
+npm install
+npm run dev
```
-On Linux, use `npm run package:linux` and `npm run package:linux:verify` for an
-unpacked development package, or `npm run dist:linux` for AppImage, Debian, and
-RPM artifacts. Linux packages are built on their target architecture.
-
-Distribution builds use `npm run dist`; macOS artifacts require Developer ID signing plus notarization. The release pipeline fails closed, verifies the platform artifacts, checks the deployed Homebrew and website consumers, and publishes updater metadata only with the matching verified artifacts. Read [macOS releases and automatic updates](docs/releasing.md) before enabling publication.
-
-See [continuous integration](docs/ci.md) for change selection, test lanes, Electron shards, and the `CI required` gate.
-
-The checked-in models.dev snapshot is refreshed only through `npm run models:refresh` or the guarded distribution path; Linux and macOS packaging invoke that explicit release step. Artificial Analysis credentials and data are never bundled. Direct Artificial Analysis suggestions require an explicit user fetch. OpenRouter benchmark insights use a separate encrypted Model Pad key only after an explicit Connect & fetch or Fetch latest action, then read normalized public scores from a device-local offline cache. That key never configures an inference provider or imports OpenRouter's model catalog.
-
-## Project status
-
-Aiden Agent is a beta desktop release for macOS and Linux. Each release publishes
-signed macOS DMG/ZIP builds and verified Linux AppImage/DEB/RPM builds for x64 and
-arm64, with checksums. A separate manual workflow builds non-release Linux
-installers for testing. macOS, writable Linux AppImages and `.deb`/`.rpm` installs
-update in-app; a `.deb` or `.rpm` update asks for your password before installing. See
-[the macOS release guide](docs/releasing.md) and [Linux guide](docs/linux.md).
-
-The canonical website download is the stable
-[`Aiden-Agent-Beta-arm64.dmg`](https://github.com/sambitcreate/aiden-agent/releases/latest/download/Aiden-Agent-Beta-arm64.dmg)
-alias from the latest public release. The historical
-`download.chatwithaiden.com/Aiden-Agent-Beta.dmg` URL is maintained by the
-[`aiden-website`](https://github.com/sambitcreate/aiden-website) repository as a non-cacheable
-redirect to that same alias; its R2 object is rollback fallback only. Release preflight checks both
-paths so a stale legacy download fails closed before signing begins.
-
-The project is MIT licensed (see [LICENSE](LICENSE)).
+- [Development and architecture guide](docs/development.md) — requirements, verification commands, packaging, and release pipelines.
+- [Contributing](CONTRIBUTING.md) — bug fixes are welcome; open a Feature Request issue to align before sending feature PRs.
+- [Security policy](SECURITY.md) — threat model and private vulnerability reporting via GitHub Security Advisories.
+- [License](LICENSE) — MIT.
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 000000000..5d3f0a944
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,42 @@
+# Security Policy
+
+## Reporting a vulnerability
+
+Report security vulnerabilities exclusively through GitHub Security Advisories:
+
+- [**Report a Vulnerability**](https://github.com/sambitcreate/aiden-agent/security/advisories/new)
+
+Please do **not** open public GitHub issues or pull requests with unpatched vulnerability details or exploit PoCs.
+
+### AI-assisted reports
+
+If you use an AI model or agent to assist with finding, verifying, or writing up a security report, **explicitly state which model you used**.
+
+Every report must describe a concrete security boundary crossing against `main` with reproducible steps or a minimal PoC. Unverified, automated AI-generated checklists or theoretical reports without a reproduction will be closed.
+
+## Trust boundaries and threat model
+
+Aiden Agent runs AI models, workspace tools, Bots, local/remote MCP connectors, an optional authenticated remote API for paired devices, and (on macOS) opt-in Computer Use and Bot VMs.
+
+See [Privacy and trust](docs/privacy.md) and [Aiden Remote Access Threat Model](docs/security/aiden-remote-threat-model.md) for detailed architecture and enforcement notes. Key boundaries include:
+
+| Surface | Boundary |
+| --- | --- |
+| **Desktop renderer** | Sandboxed with no direct Node.js access; communicates with Electron main only via an allowlisted preload bridge. Untrusted HTML renders, previews, and SVG previews must never execute scripts in the app origin or reach IPC/Node. |
+| **Workspace & Bot permissions** | On desktop, workspace access (`full`/`ask`/`none`), approval modes (`Ask`, `Auto`, `Never ask`), workspace-scoped roots, and Bot rules/grants are enforced in the Electron main process, not solely in the UI. On the headless server (`aiden serve`), workspaces enforce `full`/`ask`/`none` and Bots run in `Ask` mode (it does not read desktop `Auto`/`Never ask` or `approval-rules.json`). |
+| **Credentials & config** | Desktop stores provider keys, MCP OAuth tokens, and custom MCP env/header secrets in OS encrypted storage (macOS Keychain; Linux Secret Service/KWallet, refusing `basic_text`; Bot authority on Linux specifically requires an unlocked Secret Service provider), with `0700`/`0600` ownership checks on `~/.aiden`. The headless CLI encrypts `auth.json` and insight credentials with AES-256-GCM using a `0600` local wrapping key; Antigravity ACP tokens and Bot VM guest SSH keys (`0600`) live in private profile directories. |
+| **Aiden On The Go / Remote Access** | Off by default on desktop (on by default in `aiden serve` unless `--no-remote`). Uses per-device random credentials (salted scrypt/lookup digests stored), pinned P-256 TLS on LAN, and bearer auth on all authenticated API/SSE routes—even over Tailscale. Public/pairing bootstrap endpoints (`GET /health`, `POST /pairing/manual-bootstrap`, and host-window-gated `POST /pairing/requests`) take no bearer token; `POST /pairing/exchange` and `POST /hooks/bot-routines/:token` authenticate with single-use pairing or webhook tokens. |
+| **Apps using Aiden (MCP server)** | Off by default. Loopback-only (`127.0.0.1`), issues per-app tokens (shown once, revocable anytime), and cannot answer approvals or questions. |
+| **Hooks** | Commands in `.aiden/hooks.json`, Settings, or proposals execute only after explicit host approval and re-approval on any change; a hook's `allow` can stand in only for a rememberable workspace file/command approval (`write_file`, `edit_file`, `run_command`) and cannot bypass `Chat only`/`None`, deny/block rules, `explicitOnly` tools, `computer_use`/`form_fill`/`background_job`, Bots, or `aiden serve`. |
+| **Computer Use & Bot computers (macOS)** | Opt-in only; Computer Use is verified via the signed Rust broker (`cua-driver` pinned by hash/Team ID) and gated by explicit chat/global approval. Bot computers run in isolated per-Bot macOS VMs on Apple silicon (macOS 26+) via vendored `lume`. |
+
+## Out of scope / intended behavior
+
+The following are intentional design choices rather than security vulnerabilities (unless a separate bug allows bypassing the stated boundary):
+
+- **Full access workspace / Full access Bot**: When the user grants `Full access` (or `Never ask` mode), the agent or Bot is intentionally permitted to run shell commands and read/write files as the user's OS account. Prompt injection that stays within the granted mode is an inherent model risk unless it bypasses a mode ceiling, rule block, or approval gate.
+- **No OS sandbox on `run_command`**: Workspace `cwd` and path checks scope built-in file tools and help keep work inside the chosen folder, but an approved shell command runs as the local OS user rather than inside a container/VM (use a Bot computer VM or container if you need OS-level isolation).
+- **External providers & remote MCP servers**: Data sent to user-configured LLM providers, cloud transcription, search providers, or remote MCP servers is governed by those services.
+- **User-approved hooks or local MCP commands**: Running a shell hook or local MCP command after the user explicitly reviewed and approved its exact command line is expected behavior.
+- **Packaged Electron fuses & development profiles**: Packaged release builds enable Electron fuses disabling `runAsNode`, `NODE_OPTIONS`, and `--inspect*` debugging flags, while `npm run dev` isolates state under `~/.aiden-dev` by default.
+- **Already-compromised local OS user**: Local attackers already executing code as the same OS user.
diff --git a/docs/README.md b/docs/README.md
new file mode 100644
index 000000000..be32bc253
--- /dev/null
+++ b/docs/README.md
@@ -0,0 +1,65 @@
+# Aiden Agent docs
+
+## Getting started
+
+- [Linux install and compatibility guide](linux.md)
+- [Privacy and trust](privacy.md)
+- [Usage data and crash reports](analytics.md)
+- [Keyboard shortcuts and command palette](keyboard.md)
+- [Usage limits and spending limits](usage-limits-and-spending.md)
+- [Storage management](storage.md)
+
+## Workspaces, coding, and design
+
+- [Coding follow-through (background jobs, `/follow`, `/until`)](coding-follow-through.md)
+- [Workspace artifacts](workspace-artifacts.md)
+- [Design mode specification](superpowers/specs/2026-10-31-design-mode-design.md)
+- [Chats without a workspace](no-workspace-chats.md)
+- [Shared browser and annotations](environment-browser.md)
+- [Skills](skills.md)
+- [Hooks](hooks.md)
+- [Web page reading and extract mode](web-fetch-extract.md)
+- [External reply image privacy](transcript-images.md)
+- [Tool loading](tool-loading.md)
+- [Pi GUI artifacts](pi-gui-artifacts.md)
+
+## Bots and automation
+
+- [Bot routines, schedules, and learning](bot-routines.md)
+- [Bot rules and plan approvals](bot-rules.md)
+- [Bot messaging](bot-messaging.md)
+- [Bot messaging core architecture](bot-messaging-core.md)
+- [Bot peers](bot-peers.md)
+- [Bot folder access requests](bot-access-requests.md)
+- [Bot open work](bot-open-work.md)
+- [Models for each routine](bot-routine-models.md)
+- [Bot computers (Apple silicon)](bot-computers.md)
+
+## Connectors, remote access, and mobile
+
+- [Aiden On The Go remote access](aiden-on-the-go-remote-access.md)
+- [Headless server (`aiden serve`)](../packages/cli/README.md)
+- [CLI durable Bots](cli-durable-bots.md)
+- [Aiden MCP server (Apps using Aiden)](aiden-mcp-server.md)
+- [Composio access](composio.md)
+- [Google Antigravity ACP provider](antigravity.md)
+- [Simulator devices](devices.md)
+- [Computer Use integration (macOS)](computer-use-integration.md)
+- [iOS and iPadOS client](../ios/README.md)
+- [Android client](../android/README.md)
+
+## Contributing and operations
+
+- [Development and architecture](development.md)
+- [Contributing guide](../CONTRIBUTING.md)
+- [Security policy](../SECURITY.md)
+- [Continuous integration](ci.md)
+- [macOS releases and automatic updates](releasing.md)
+- [Distribution hardening](distribution-hardening.md)
+- [Public repository readiness](public-readiness.md)
+- [Design guide](design-guide.md)
+- [Settings design system](settings-design-system.md)
+- [SQLite storage](sqlite-storage.md)
+- [Remote API v1 contract](aiden-remote-api-v1.md)
+- [Remote access threat model](security/aiden-remote-threat-model.md)
+- [Plans and roadmap index](plans/README.md)
diff --git a/docs/ci.md b/docs/ci.md
index 488ee3f96..9b85618c0 100644
--- a/docs/ci.md
+++ b/docs/ci.md
@@ -11,8 +11,10 @@ PRs compare the merge base and PR head using complete, NUL-delimited Git output.
Rename detection is disabled so both the removed and added paths select work.
`scripts/ci-changes.mjs` maps each path to seven areas: `desktop`, `apple`, `ios`,
`android`, `cli`, `linux` and `catalog`. Only explicit prose documentation paths
-select nothing; contributor-instruction files such as `AGENTS.md` and the design
-guide are not treated as prose. Android-only and iOS-only PRs select their own
+(including root community docs such as `README.md`, `CONTRIBUTING.md`, `SECURITY.md`,
+and `CODE_OF_CONDUCT.md`, plus `.github/ISSUE_TEMPLATE/`—validated by the always-run
+policy job—and pull request templates) select nothing; contributor-instruction files
+such as `AGENTS.md` and the design guide are not treated as prose. Android-only and iOS-only PRs select their own
platform checks, renderer-only PRs select desktop checks, and CLI-only PRs select
the CLI jobs plus static checks. Desktop changes always imply `catalog`.
`renderer/shared/` selects `desktop`, `cli` and `linux`; the files native clients
diff --git a/docs/development.md b/docs/development.md
new file mode 100644
index 000000000..3c03f9330
--- /dev/null
+++ b/docs/development.md
@@ -0,0 +1,89 @@
+# Development and architecture
+
+This guide covers building, running, testing, and packaging Aiden Agent from a source checkout.
+
+## Architecture
+
+```text
+React renderer
+ │ allowlisted context bridge
+ ▼
+Electron preload
+ │ typed IPC and notifications
+ ▼
+Electron main process
+ ├── Pi agent and model adapters
+ ├── workspace-scoped tools, Git, review, and terminal
+ ├── encrypted credentials and local JSON stores
+ ├── MCP, attachments, search, and voice
+ └── hardened native helpers, plus macOS-only Apple model and Computer Use helpers
+```
+
+Core technologies include Electron 43, React 19, TypeScript, Vite, Tailwind CSS, TanStack Router and Query, Radix UI, the Pi agent runtime, Swift, and Rust.
+
+## Requirements
+
+- macOS or a glibc 2.34+ x64/arm64 Linux desktop
+- Node.js 22.22 or newer and npm (CI pins `22.23.4`; use the newest release of your Node line)
+- A C17 compiler (`clang`/`gcc` or Xcode Command Line Tools), plus `pkg-config`, `libsecret-1` headers (`libsecret-1-dev`), and `gio-unix-2.0` headers (`libglib2.0-dev`) on Linux (`rpm` and `libselinux1-dev` for Linux packaging checks)
+- Rust and Cargo (`rustup`, in `~/.cargo/bin` or on `PATH`, or set `CARGO`) for macOS Computer Use helper tests, packaged macOS builds, and Linux `native/linux-managed-payload` contract tests (`npm run test:linux-contracts`)
+- A full Xcode installation for macOS native helpers (`npm run build:native` / `npm run package`), with Xcode 26 or newer required for Apple Foundation Models builds
+- An Apple signing identity only for packaged macOS distribution builds
+
+## Run locally
+
+```bash
+npm install
+npm run dev
+```
+
+`npm run dev:sink` opens the development-only component sink, a page of every shared UI primitive in its states with a theme preset and Light/Dark toolbar. See [Component sink](design-guide.md#component-sink).
+
+The development launcher prepares a platform-appropriate **Aiden Agent Dev** runtime that can run beside the installed **Aiden Agent** app. Development uses separate app-data, Chromium session, log, crash, and `~/.aiden-dev` roots; it does not copy production data, register global shortcuts, or check the production update feed by default. Set `AIDEN_DEV_GLOBAL_SHORTCUTS=1` only when a development run intentionally needs the global bindings.
+
+Native builds discover the newest compatible full Xcode without changing the machine-wide `xcode-select` setting; `DEVELOPER_DIR` remains available as a per-command override.
+
+## Companion clients and headless server
+
+- **iOS and iPadOS (`ios/`)** — Aiden On The Go is distributed through TestFlight only (GitHub Releases do not publish an IPA). Open `ios/AidenOnTheGo.xcodeproj` or follow [`ios/README.md`](../ios/README.md).
+- **Android (`android/`)** — Validation runs separately from the desktop release; relevant merges to `main` upload `aiden-on-the-go-debug-apk` (`app-debug.apk` and its SHA-256 checksum) as a 14-day GitHub Actions workflow artifact. See [`android/README.md`](../android/README.md).
+- **Headless server (`packages/cli/`)** — `aiden serve` is a serve-only daemon for paired phones and Macs with no interactive terminal UI. Build it from a clone following [`packages/cli/README.md`](../packages/cli/README.md).
+
+## Verify changes
+
+```bash
+npm test # full CI suite (includes lanes needing Ruby, Cargo, Playwright Chromium)
+npm run test:native # macOS + Xcode 26+ only (Apple Foundation Models Swift tests)
+npm run type-check
+npm run lint
+npm run build
+```
+
+For faster local iteration, run a scoped lane (`npm run test:ci:core-git`, `npm run test:ci:runtime-subagents`, or `npm run test:ci:renderer-other`).
+
+For Playwright Electron E2E runs:
+- On macOS, run window-opening E2E suites off-screen in a Cua Space with `npm run test:e2e:space -- [playwright args]`.
+- On Linux, run under `xvfb-run --auto-servernum npm run test:e2e` (with the CI prerequisites).
+
+See [Continuous integration](ci.md) for change selection, test lanes, Electron shards, and the `CI required` gate.
+
+## Package the app
+
+```bash
+# macOS
+npm run package
+npm run package:verify
+
+# Linux (built on the target architecture)
+npm run package:linux
+npm run package:linux:verify
+```
+
+Distribution builds use `npm run dist` on macOS (requires Developer ID signing plus notarization) or `npm run dist:linux` on Linux (AppImage, `.deb`, `.rpm`). The release pipeline fails closed, verifies the platform artifacts, checks the deployed Homebrew and website consumers, and publishes updater metadata only with the matching verified artifacts. Read [macOS releases and automatic updates](releasing.md) before enabling publication.
+
+### Release metadata and download aliases
+
+- The checked-in `models.dev` snapshot is refreshed only through `npm run models:refresh` or the guarded distribution path (`npm run dist` / `release.yml`).
+- Artificial Analysis credentials and data are never bundled; direct suggestions and OpenRouter benchmark insights require an explicit user action in Settings.
+- Each public release publishes a signed Apple silicon macOS DMG/ZIP pair and verified Linux AppImage/DEB/RPM builds for x64 and arm64 with checksums.
+- The canonical website download is the `Aiden-Agent-Beta-arm64.dmg` alias from the latest public GitHub release; `download.chatwithaiden.com/Aiden-Agent-Beta.dmg` is maintained by [`aiden-website`](https://github.com/sambitcreate/aiden-website) as a non-cacheable redirect to that alias (its R2 object is rollback fallback only). Release preflight verifies both paths before signing begins.
diff --git a/docs/privacy.md b/docs/privacy.md
new file mode 100644
index 000000000..d0afed9bf
--- /dev/null
+++ b/docs/privacy.md
@@ -0,0 +1,34 @@
+# Privacy and trust
+
+Aiden Agent is built around explicit local ownership, OS-backed credential isolation, and narrow permission boundaries.
+
+## Local configuration and storage
+
+- **Portable configuration permissions** — On macOS and Linux, portable configuration uses an owned private directory (`0700`) and config and migration/recovery files use `0600`. `~/.aiden` may itself be a symlink to a folder you own (such as a dotfile-manager target), and that folder is made private; other symlinks, foreign ownership, and linked config files block access rather than replacing data. A dedicated `AIDEN_CONFIG_DIR` may override `~/.aiden` (do not point it at `$HOME` or a shared directory).
+- **Local data** — Aiden stores chats, settings, workspace metadata, and downloaded speech models locally. Each picture in a chat is stored once beside the chats (chats showing the same picture share it); after a chat is deleted or cleared, unreferenced pictures unused for a day are removed.
+- **Encrypted credentials** — On the desktop app, provider credentials, MCP OAuth sessions, and custom MCP environment/header values use the operating system's encrypted credential storage (on Linux, Aiden refuses to store secrets if only Electron's reversible `basic_text` backend is available, and Bot authority specifically requires an unlocked Secret Service provider). The headless CLI (`packages/cli`) encrypts `auth.json` and insight credentials with AES-256-GCM using an owner-private wrapping key (`0600`), and Antigravity ACP tokens / Bot VM guest SSH keys (`0600`) live in private profile directories.
+- **Sealed pending connectors** — Pending local connectors are sealed before launch approval; copying portable config copies only their markers. In Settings, **Review and approve** opens an explicit review of the exact command, arguments, and saved environment overrides, then rechecks the effective launch before granting consent.
+- **Renderer isolation** — The Electron renderer is sandboxed, has no direct Node.js access, and communicates with the main process only through an allowlisted context bridge.
+
+## Network boundaries
+
+Apart from release update checks and the anonymous usage data described below, network access happens only when a feature you enabled needs it:
+
+- **Hosted models** receive the conversation content sent to them.
+- **Cloud transcription** receives selected audio when used.
+- **Web Search & page fetch** send search queries to the configured search provider, plain page requests to public URLs the agent reads (never to this computer or private networks), and page text plus field names to Cloudflare when opt-in extract mode is on.
+- **Remote MCP servers** receive tool requests you allow.
+- **Model downloads** (such as speech models or explicitly installed runtimes) contact their pinned upstream host.
+- **Pull request follow-through** (`/follow`) reads PR state from GitHub every few minutes until the follow ends.
+
+A fully local session can run with a local model (Ollama or LM Studio), on-device voice (Parakeet), no remote MCP servers, and web search disabled.
+
+## Anonymous usage data and crash reports
+
+Release builds of the desktop app send anonymous usage data to PostHog (`https://us.i.posthog.com`): app launches, daily use, setup, updates, feature usage, and sanitized crash reports, keyed by a random install ID — never chats, files, user paths, or keys (crash stack traces retain only app-bundle-relative `app:///…` paths).
+
+It is on by default and can be turned off in **Settings → About → Usage data**, with `DO_NOT_TRACK=1`, or with `AIDEN_ANALYTICS=0` (on the headless server, setting `CI` also disables sending). You can inspect every event and field Aiden can send under **What's sent** in Settings and in [Usage data and crash reports](analytics.md). Development builds and headless servers built from a clone never send; distributed server builds have their own switch (`aiden telemetry off`).
+
+## macOS Computer Use
+
+On macOS, Computer Use is an opt-in beta with a global switch, permission checks, and exact target binding. The model's first Computer Use call in a chat raises an explicit access card (**Deny**, **Allow in this chat**, or **Always allow** from its menu), and Settings can revoke permissions at any time. Computer Use is omitted from Linux builds. See [Computer Use integration](computer-use-integration.md) for the complete boundary.
diff --git a/docs/public-readiness.md b/docs/public-readiness.md
index 77cfa853e..5d8c8987f 100644
--- a/docs/public-readiness.md
+++ b/docs/public-readiness.md
@@ -8,31 +8,33 @@ As audited on 2026-07-22, the source repository is private and has no GitHub top
Update (2026-10-16): the repository is now public and MIT licensed (root `LICENSE`). It still has no GitHub topics, `SECURITY.md`, or `CONTRIBUTING.md`.
+Update (2026-11-21): added root `SECURITY.md`, `CONTRIBUTING.md`, `.github/ISSUE_TEMPLATE/`, `.github/pull_request_template.md`, `docs/README.md`, `docs/development.md`, and `docs/privacy.md`, and streamlined `README.md`. GitHub repository topics and homepage URL remain external GitHub settings.
+
## Ready in the repository
- Public-facing README with a real product screenshot, concise feature overview, privacy boundary, setup, verification, and release links.
- Consistent Aiden Agent name and canonical repository URL in the primary metadata.
- Package metadata that identifies the project without enabling accidental npm publication.
-- Public documentation uses repository links instead of developer-specific absolute checkout paths. Remaining `/Users/...` strings are synthetic path-sanitization and environment fixtures in tests.
+- Public documentation mostly uses repository links rather than developer-specific checkout paths (a few historical plan/testing docs and `android/README.md` still contain `/Users/...` example paths). Remaining `/Users/...` strings in code/tests are synthetic path-sanitization and environment fixtures.
- No tracked credential files or obvious private keys found in the documentation and metadata audit.
-## Owner decisions before changing visibility
+## Owner decisions & remaining setup
- **Source license.** Done: MIT (`LICENSE`).
- **Public source model.** Done: signed beta assets publish in this repository's public GitHub Releases.
-- **Define contribution expectations.** Add `CONTRIBUTING.md`, `SECURITY.md`, and a code of conduct only if outside issues or contributions will be accepted. Avoid empty policy templates.
+- **Define contribution expectations.** Done for `CONTRIBUTING.md`, `SECURITY.md`, `.github/ISSUE_TEMPLATE/`, and `.github/pull_request_template.md`. A separate `CODE_OF_CONDUCT.md` remains optional.
- **Review repository history.** Run a full-history secret scan before changing visibility; checking only the current tree cannot rule out credentials in older commits.
- **Configure GitHub protections.** Require CI on `main`, restrict release-environment deployment to trusted branches, protect release tags, and keep signing/notarization secrets scoped to the protected `release` environment.
-- **Apply the repository profile.** Add the approved description and topics below in GitHub after the owner has confirmed the positioning.
+- **Apply the repository profile.** Add the approved description, homepage URL, and topics below in GitHub after the owner has confirmed the positioning.
## Recommended GitHub description
-> A native-feeling macOS AI workspace for local and hosted models, with permissioned project tools, MCP, voice, Git, and opt-in Computer Use.
+> A native-feeling macOS and Linux AI workspace for local and hosted models, with permissioned project tools, Bots, MCP, voice, Git, Design mode, and companion mobile apps.
## Recommended GitHub topics
Use a focused set rather than every underlying dependency:
-`ai-agent` · `macos` · `electron` · `typescript` · `react` · `local-ai` · `ollama` · `lm-studio` · `mcp` · `developer-tools`
+`ai-agent` · `macos` · `linux` · `electron` · `typescript` · `react` · `local-ai` · `ollama` · `lm-studio` · `mcp` · `developer-tools`
-GitHub topics and repository visibility are external settings and must be applied separately by a repository owner.
+GitHub topics, homepage URL, and repository visibility are external settings and must be applied separately by a repository owner.
diff --git a/scripts/check-ci-policy.test.mjs b/scripts/check-ci-policy.test.mjs
index 5a6c435b3..d17fd6c05 100644
--- a/scripts/check-ci-policy.test.mjs
+++ b/scripts/check-ci-policy.test.mjs
@@ -1,5 +1,5 @@
import assert from "node:assert/strict";
-import { readFile } from "node:fs/promises";
+import { readdir, readFile } from "node:fs/promises";
import test from "node:test";
import { URL } from "node:url";
import { parse } from "yaml";
@@ -502,3 +502,99 @@ test("Linux required contexts exist for scoped PRs and fail closed", async () =>
assert.equal(run.status, expected, `${detection}/${selected}/${result}/${e2e}: ${run.stdout}${run.stderr}`);
}
});
+
+const ISSUE_TEMPLATE_DIR = new URL("../.github/ISSUE_TEMPLATE/", import.meta.url);
+const VALID_ISSUE_FORM_TYPES = new Set(["markdown", "textarea", "input", "dropdown", "checkboxes", "upload"]);
+
+function isPlainObject(value) {
+ return value !== null && typeof value === "object" && !Array.isArray(value);
+}
+
+function isNonEmptyString(value) {
+ return typeof value === "string" && value.trim().length > 0;
+}
+
+test("GitHub issue forms and chooser config are valid YAML matching GitHub's required schema", async () => {
+ const entries = (await readdir(ISSUE_TEMPLATE_DIR)).filter((name) => /\.ya?ml$/u.test(name)).sort();
+ assert.ok(entries.length > 0, "expected at least one YAML file in .github/ISSUE_TEMPLATE/");
+
+ for (const name of entries) {
+ const raw = await readFile(new URL(name, ISSUE_TEMPLATE_DIR), "utf8");
+ const doc = parse(raw);
+ assert.ok(isPlainObject(doc), `${name}: root YAML value must be a mapping`);
+
+ if (name === "config.yml" || name === "config.yaml") {
+ if (doc.blank_issues_enabled !== undefined) {
+ assert.equal(typeof doc.blank_issues_enabled, "boolean", `${name}: blank_issues_enabled must be boolean`);
+ }
+ if (doc.contact_links !== undefined) {
+ assert.ok(Array.isArray(doc.contact_links), `${name}: contact_links must be an array`);
+ for (const [index, link] of doc.contact_links.entries()) {
+ assert.ok(isPlainObject(link), `${name}: contact_links[${index}] must be a mapping`);
+ assert.ok(isNonEmptyString(link.name), `${name}: contact_links[${index}].name is required`);
+ assert.ok(isNonEmptyString(link.about), `${name}: contact_links[${index}].about is required`);
+ assert.ok(isNonEmptyString(link.url) && /^https:\/\//u.test(link.url), `${name}: contact_links[${index}].url must be https://`);
+ }
+ }
+ continue;
+ }
+
+ assert.ok(isNonEmptyString(doc.name), `${name}: missing required string 'name'`);
+ assert.ok(isNonEmptyString(doc.description), `${name}: missing required string 'description'`);
+ if (doc.title !== undefined) {
+ assert.equal(typeof doc.title, "string", `${name}: 'title' must be a string`);
+ }
+ if (doc.labels !== undefined) {
+ const validLabels =
+ isNonEmptyString(doc.labels) ||
+ (Array.isArray(doc.labels) && doc.labels.every((label) => isNonEmptyString(label)));
+ assert.ok(validLabels, `${name}: 'labels' must be a non-empty string or array of non-empty strings`);
+ }
+ assert.ok(Array.isArray(doc.body) && doc.body.length > 0, `${name}: missing required non-empty 'body' array`);
+
+ const seenIds = new Set();
+ let inputCount = 0;
+ for (const [index, item] of doc.body.entries()) {
+ assert.ok(isPlainObject(item), `${name}: body[${index}] must be a mapping`);
+ assert.ok(VALID_ISSUE_FORM_TYPES.has(item.type), `${name}: body[${index}].type '${item.type}' is not a valid GitHub issue form type`);
+ assert.ok(isPlainObject(item.attributes), `${name}: body[${index}].attributes must be a mapping`);
+
+ if (item.id !== undefined) {
+ assert.ok(isNonEmptyString(item.id), `${name}: body[${index}].id must be a non-empty string`);
+ assert.equal(seenIds.has(item.id), false, `${name}: duplicate field id '${item.id}'`);
+ seenIds.add(item.id);
+ }
+
+ if (item.type === "markdown") {
+ assert.ok(isNonEmptyString(item.attributes.value), `${name}: body[${index}] markdown requires attributes.value`);
+ } else {
+ inputCount += 1;
+ assert.ok(isNonEmptyString(item.attributes.label), `${name}: body[${index}] (${item.type}) requires attributes.label`);
+ if (item.type === "dropdown") {
+ assert.ok(
+ Array.isArray(item.attributes.options) &&
+ item.attributes.options.length > 0 &&
+ item.attributes.options.every((option) => isNonEmptyString(option)),
+ `${name}: body[${index}] dropdown requires non-empty string options`,
+ );
+ }
+ if (item.type === "checkboxes") {
+ assert.ok(
+ Array.isArray(item.attributes.options) &&
+ item.attributes.options.length > 0 &&
+ item.attributes.options.every((option) => isPlainObject(option) && isNonEmptyString(option.label)),
+ `${name}: body[${index}] checkboxes require options with non-empty label`,
+ );
+ }
+ if (item.validations !== undefined) {
+ assert.ok(isPlainObject(item.validations), `${name}: body[${index}].validations must be a mapping`);
+ if (item.validations.required !== undefined) {
+ assert.equal(typeof item.validations.required, "boolean", `${name}: body[${index}].validations.required must be boolean`);
+ }
+ }
+ }
+ }
+ assert.ok(inputCount > 0, `${name}: issue form must contain at least one non-markdown input`);
+ }
+});
+
diff --git a/scripts/ci-changes.mjs b/scripts/ci-changes.mjs
index 662b16075..3a7d16d15 100644
--- a/scripts/ci-changes.mjs
+++ b/scripts/ci-changes.mjs
@@ -20,7 +20,9 @@ export const AREA_NAMES = Object.freeze(["desktop", "apple", "ios", "android", "
export const MODEL_CATALOG_PATHS = Object.freeze(["resources/model-capabilities.json"]);
const SAFE_ROOT_DOCUMENT =
- /^(?:README|CHANGELOG|AGENTS|CLAUDE|PRODUCT|LICENSE|THIRD_PARTY_NOTICES)\.(?:md|markdown)$/u;
+ /^(?:README|CHANGELOG|CONTRIBUTING|SECURITY|CODE_OF_CONDUCT|AGENTS|CLAUDE|PRODUCT|LICENSE|THIRD_PARTY_NOTICES)\.(?:md|markdown)$/u;
+const SAFE_GITHUB_TEMPLATE =
+ /^\.github\/(?:ISSUE_TEMPLATE\/[^/]+\.(?:ya?ml|md)|(?:pull_request_template|PULL_REQUEST_TEMPLATE)\.(?:md|markdown)|PULL_REQUEST_TEMPLATE\/[^/]+\.(?:md|markdown))$/u;
const SAFE_PAPERCUT_DOCUMENT = /^\.papercuts\/.+\.md$/u;
const SAFE_MEMORY_DOCUMENT = /^\.memory\/.+\.md$/u;
// Documents that tests or packaging read. Editing them must run their readers.
@@ -159,6 +161,7 @@ export function isSafeDocumentationPath(path) {
!PACKAGED_DOCUMENTS.has(path) &&
((path.startsWith("docs/") && /\.(?:md|markdown)$/u.test(path)) ||
SAFE_ROOT_DOCUMENT.test(path) ||
+ SAFE_GITHUB_TEMPLATE.test(path) ||
SAFE_PAPERCUT_DOCUMENT.test(path) ||
SAFE_MEMORY_DOCUMENT.test(path))
);
diff --git a/scripts/ci-changes.test.mjs b/scripts/ci-changes.test.mjs
index 135ab501f..5b1466bb7 100644
--- a/scripts/ci-changes.test.mjs
+++ b/scripts/ci-changes.test.mjs
@@ -172,9 +172,19 @@ test("host-only shared helpers still avoid unrelated native and Apple jobs", ()
test("documentation-only decisions are restricted to the explicit safe paths", () => {
assert.equal(isSafeDocumentationPath("docs/reference.txt"), false);
assert.equal(isSafeDocumentationPath("README.md"), true);
+ assert.equal(isSafeDocumentationPath("CONTRIBUTING.md"), true);
+ assert.equal(isSafeDocumentationPath("SECURITY.md"), true);
+ assert.equal(isSafeDocumentationPath("CODE_OF_CONDUCT.md"), true);
assert.equal(isSafeDocumentationPath("CLAUDE.md"), true);
assert.equal(isSafeDocumentationPath("PRODUCT.md"), true);
assert.equal(isSafeDocumentationPath("LICENSE.md"), true);
+ assert.equal(isSafeDocumentationPath(".github/ISSUE_TEMPLATE/config.yml"), true);
+ assert.equal(isSafeDocumentationPath(".github/ISSUE_TEMPLATE/bug_report.yml"), true);
+ assert.equal(isSafeDocumentationPath(".github/ISSUE_TEMPLATE/feature_request.yaml"), true);
+ assert.equal(isSafeDocumentationPath(".github/ISSUE_TEMPLATE/legacy.md"), true);
+ assert.equal(isSafeDocumentationPath(".github/pull_request_template.md"), true);
+ assert.equal(isSafeDocumentationPath(".github/PULL_REQUEST_TEMPLATE.md"), true);
+ assert.equal(isSafeDocumentationPath(".github/PULL_REQUEST_TEMPLATE/default.md"), true);
// Tests or packaging read these documents.
assert.equal(isSafeDocumentationPath("AGENTS.md"), false);
assert.equal(isSafeDocumentationPath("docs/design-guide.md"), false);
@@ -186,18 +196,32 @@ test("documentation-only decisions are restricted to the explicit safe paths", (
assert.equal(isSafeDocumentationPath(".memory/../main/notes.md"), false);
assert.equal(isSafeDocumentationPath("android/README.md"), false);
assert.equal(isSafeDocumentationPath(".github/README.md"), false);
+ assert.equal(isSafeDocumentationPath(".github/ISSUE_TEMPLATE/script.sh"), false);
+ assert.equal(isSafeDocumentationPath(".github/workflows/ci.yml"), false);
+ assert.equal(isSafeDocumentationPath(".github/CODEOWNERS"), false);
assert.equal(isSafeDocumentationPath("renderer/AGENTS.md"), false);
assert.equal(isSafeDocumentationPath("docs/../main/service.ts"), false);
assert.deepEqual(decideChangedAreas(["docs/guide.md", "android/app/build.gradle"]), select("android"));
assert.deepEqual(decideChangedAreas(["README.md", "unknown/new-file.bin"]), allTrue);
- assert.deepEqual(analyzeChangedPaths(["docs/guide.md", "README.md", ".memory/ci.md"]), {
- ...allFalse,
- areas: allFalse,
- changedCount: 3,
- safeDocsOnly: true,
- reason: "documentation-only",
- });
+ assert.deepEqual(
+ analyzeChangedPaths([
+ "docs/guide.md",
+ "README.md",
+ "CONTRIBUTING.md",
+ "SECURITY.md",
+ ".github/ISSUE_TEMPLATE/bug_report.yml",
+ ".github/pull_request_template.md",
+ ".memory/ci.md",
+ ]),
+ {
+ ...allFalse,
+ areas: allFalse,
+ changedCount: 7,
+ safeDocsOnly: true,
+ reason: "documentation-only",
+ },
+ );
assert.deepEqual(analyzeChangedPaths(["CLAUDE.md", "renderer/components/chat.tsx"]), {
...desktopOnly,
areas: desktopOnly,