Skip to content

AI-powered virtual executive team — a single coherent executive persona backed by 8 specialist agents (FastAPI + Next.js).

feat(ui): describe Just me for any role, not only someone running a business (#234)

Rufus7d97b8d006f6
diff --git a/packages/core/openexecutive/architecture/architecture-facts.yaml b/packages/core/openexecutive/architecture/architecture-facts.yaml
index f741b44c..f2a79c33 100644
--- a/packages/core/openexecutive/architecture/architecture-facts.yaml
+++ b/packages/core/openexecutive/architecture/architecture-facts.yaml
@@ -3060,7 +3060,7 @@ today:
explicit ids to `POST /alerts/bulk-ack` (never a server-side age sweep),
and "Re-check relevance" (`POST /alerts/review`); Monitoring gets the
same footer at 3 days; the ack body may carry `mute_topic`.
- ui_route: / (Next.js app router root) — the briefing is the default landing surface. `/today` still renders the same content as a standalone route (no sidebar shell) for bookmarks and the sidebar Briefing button. The chat lives at the same root behind a `mode` toggle — entering chat from "New chat" or by selecting a session swaps the main content; clicking the sidebar brandmark or the "Briefing" sidebar button returns to the briefing. Every signed-in route renders ONE sidebar component (`components/shell/AppSidebar.tsx`). The AppShell renders it for inner routes, and `/` (exempt from the shell for its own top bar and debug panel) renders the same component with in-page callbacks. On `/` its entries switch the page's in-memory mode; elsewhere they are links (`/?new=1`, `/?session=<id>`) that the home page applies on mount and then strips from the URL. `/?new=1&draft=<text>` (Playbooks "Try in chat") also seeds the new chat's input, capped at 2000 chars, WITHOUT auto-sending — unlike briefing handoffs, the text comes from a URL the user didn't type. The sidebar's "Recent" list is deliberately short — the 7 newest WEB chats only (channel sessions are recognised by their `slack:` / `telegram:` / `discord:` / `email:` / `google_chat:` session-id prefix, `lib/sessionChannel.ts`, since `sessions` has no channel column) — with an "All chats" link to `/chats`, the full history page with channel filter tabs, title search, date groups, a channel tag per row, and delete. The session list is held app-wide by `SessionsProvider` (root layout) over the unchanged `GET /sessions`, so the chat home refreshes it after each turn and every route sees the same list. A standalone "Pulse" link (→ `/memories`, the page titled "Pulse") is pinned directly beneath Briefing in the sidebar and the mobile bottom bar — an always-visible top-level destination rather than a Knowledge-group entry (the Knowledge group now lists "RAG" → `/knowledge`; Skills moved to the Playbooks tab of Workflows, `/jobs?tab=playbooks`), rendered from the shared `PULSE_NAV_ITEM` in `navConfig.ts`. In solo mode (read app-wide from `components/workspace/WorkspaceContext.tsx`'s WorkspaceProvider, mounted in the root layout next to ExecutiveStatusProvider, which reads team while loading or on error so a team install never flashes solo UI) `buildPrimaryNav({mode})` swaps the Company group (Departments, People, Company profile) for "You" (Goals → `/goals`, People, Business profile), `buildMobilePrimary(mode)` swaps People for Goals, and the briefing drops the Departments card, the People card, the "Across the team" lane (all action proposals land in "Needs you"), the people-awaiting, people-overdue and departments-at-risk pills and the quiet-day "Set up a check-in" link (a "N goals at risk" pill links to `/goals` instead), and shows a "Your projects" card of active initiatives (Done = PATCH status completed, Drop = DELETE after a confirm) where the Departments card was. `/goals` lists every goal from GET /departments grouped by area (a department row; areas with goals first, the rest offered as "Other areas") and adds, edits and deletes goals through the slug-scoped goal routes, sharing `components/goals/GoalEditor.tsx` with the department page. Pulse hides "Department check-ins" and "Awaiting people" in solo. Settings has a Workspace card (mode with a confirm, "Your role" in solo — the principal's role kind, title, reports to, remit and measured on, saved with PUT /workspace —, time zone, and "Book meetings without asking", bound to GET/PUT `/decisions/classes/meeting_scheduling` and hidden when that returns 404). Team rendering is unchanged.
+ ui_route: / (Next.js app router root) — the briefing is the default landing surface. `/today` still renders the same content as a standalone route (no sidebar shell) for bookmarks and the sidebar Briefing button. The chat lives at the same root behind a `mode` toggle — entering chat from "New chat" or by selecting a session swaps the main content; clicking the sidebar brandmark or the "Briefing" sidebar button returns to the briefing. Every signed-in route renders ONE sidebar component (`components/shell/AppSidebar.tsx`). The AppShell renders it for inner routes, and `/` (exempt from the shell for its own top bar and debug panel) renders the same component with in-page callbacks. On `/` its entries switch the page's in-memory mode; elsewhere they are links (`/?new=1`, `/?session=<id>`) that the home page applies on mount and then strips from the URL. `/?new=1&draft=<text>` (Playbooks "Try in chat") also seeds the new chat's input, capped at 2000 chars, WITHOUT auto-sending — unlike briefing handoffs, the text comes from a URL the user didn't type. The sidebar's "Recent" list is deliberately short — the 7 newest WEB chats only (channel sessions are recognised by their `slack:` / `telegram:` / `discord:` / `email:` / `google_chat:` session-id prefix, `lib/sessionChannel.ts`, since `sessions` has no channel column) — with an "All chats" link to `/chats`, the full history page with channel filter tabs, title search, date groups, a channel tag per row, and delete. The session list is held app-wide by `SessionsProvider` (root layout) over the unchanged `GET /sessions`, so the chat home refreshes it after each turn and every route sees the same list. A standalone "Pulse" link (→ `/memories`, the page titled "Pulse") is pinned directly beneath Briefing in the sidebar and the mobile bottom bar — an always-visible top-level destination rather than a Knowledge-group entry (the Knowledge group now lists "RAG" → `/knowledge`; Skills moved to the Playbooks tab of Workflows, `/jobs?tab=playbooks`), rendered from the shared `PULSE_NAV_ITEM` in `navConfig.ts`. In solo mode (read app-wide from `components/workspace/WorkspaceContext.tsx`'s WorkspaceProvider, mounted in the root layout next to ExecutiveStatusProvider, which reads team while loading or on error so a team install never flashes solo UI) `buildPrimaryNav({mode, roleKind})` swaps the Company group (Departments, People, Company profile) for "You" (Goals → `/goals`, People, and the profile — "Business profile" when the principal's role kind is owner, "Your work" for any other kind, an unset role, or one GET /workspace hides from a non-principal; `profileWording(mode, roleKind)` in navConfig.ts is the one rule, and the `/company-profile` breadcrumb, intro and section headings, the form wizard and the draft review follow it, copy only with no field renamed), `buildMobilePrimary(mode)` swaps People for Goals, and the briefing drops the Departments card, the People card, the "Across the team" lane (all action proposals land in "Needs you"), the people-awaiting, people-overdue and departments-at-risk pills and the quiet-day "Set up a check-in" link (a "N goals at risk" pill links to `/goals` instead), and shows a "Your projects" card of active initiatives (Done = PATCH status completed, Drop = DELETE after a confirm) where the Departments card was. `/goals` lists every goal from GET /departments grouped by area (a department row; areas with goals first, the rest offered as "Other areas") and adds, edits and deletes goals through the slug-scoped goal routes, sharing `components/goals/GoalEditor.tsx` with the department page. Pulse hides "Department check-ins" and "Awaiting people" in solo. Settings has a Workspace card (mode with a confirm, "Your role" in solo — the principal's role kind, title, reports to, remit and measured on, saved with PUT /workspace —, time zone, and "Book meetings without asking", bound to GET/PUT `/decisions/classes/meeting_scheduling` and hidden when that returns 404). Team rendering is unchanged.
briefing_first_landing: |
The root page (`packages/ui/src/app/page.tsx`) defaults to `mode="briefing"`
and renders `<Briefing>` (`packages/ui/src/components/Briefing.tsx`) in the
diff --git a/packages/core/openexecutive/architecture/prebuilt/org.json b/packages/core/openexecutive/architecture/prebuilt/org.json
index d3bf4ed3..39bc4019 100644
--- a/packages/core/openexecutive/architecture/prebuilt/org.json
+++ b/packages/core/openexecutive/architecture/prebuilt/org.json
@@ -1,7 +1,7 @@
{
"section_id": "org",
"title": "Org Structure (Departments & People)",
- "markdown": "The org model has two persistent registries backed by SQLite (both share `episodic_memory.db`): **departments** and **people**. Eight default departments are seeded exactly once per database on first boot, tracked by a `default_departments_seeded` sentinel in `departments_meta`; after that the user owns the list and deleted departments stay deleted across restarts.\n\n### Company setup (onboarding)\nBoth registries are first populated by **conversational onboarding** at\n`/onboard`. The user describes their business in their own words (optionally\nattaching a deck or one-pager); the `onboarding_interviewer` agent — Council-\nvisible but outside `SPECIALIST_REGISTRY`, so the Executive cannot reach it via\n`consult_specialist` — asks up to 8 clarifying questions, then emits a draft\ncompany profile, a leadership roster, and a department list. The user reviews\nand edits that draft inline (the same section editors `/company-profile` uses)\nbefore anything is written.\n\nTwo properties matter here. First, **the interview never writes**: the whole\nexchange lives in an in-memory, TTL'd session, and the single write happens at\n`POST /onboard/interview/commit`, so a rejected save leaves the draft editable\nand retryable. Second, **the department step is additive** — drafted\ndepartments are matched onto existing ones by slug or title and updated in\nplace, unmatched ones are created, and nothing is ever deleted. That is\ndeliberately unlike the fixture loader's `_seed_departments`, which DELETEs\nevery row first: doing that here would drop the eight defaults along with their\n`specialist_key` wiring, which onboarding's `create_department` calls (no\n`specialist_key`) cannot restore. Matching goes through\n`departments.store.match_department` (slug as given or as the store would slug\nit, else case-insensitive title), the same rule the `create_goal` chat tool uses. `profile.org_structure` is derived from the reviewed\npeople and department tables at commit time, so it cannot drift from them.\n\nExactly one person is marked `is_principal` and receives `WILDCARD` authority;\nno contact details are imported, even if the user volunteers them, because\nchannels and handles are a deliberate action on the People page. The one\nexception is the owner's own sign-in email: the review screen has a separate\nfield for it, pre-filled with the current owner's email on a re-run and with the\nsigned-in user's on a first setup. The commit checks it before writing anything\n(malformed, already another person's, or different from the owner's existing\nemail is a 422 — setup only fills in a missing one) and then saves it on the\nprincipal's row. Without it the signed-in owner matched no Person,\nso their chat history stayed empty until they found the People page. With\nlocal login (`make dev` without Google sign-in) the field is optional: that\nsession carries no email, which the backend already reads as the principal.\nBecause the save demotes the old principal, only the current owner may draft\nsomeone else as \"This is me\" when setup is re-run (403 otherwise); a re-run\nthat keeps the owner, or a first setup, is open to anyone who can sign in. On such a re-run, someone who isn't the owner may fill in the owner's missing email only with the address they signed in with (403 otherwise): the roster is the sign-in allow-list, so any other address would let them sign in as the owner. That keeps the way in for an owner whose entry has no email, which is also where Setup status and the Executive send them, since the People page refuses anyone it can't recognise as the owner. Re-running setup stays open to everyone deliberately: the Company Profile and Departments pages already let anyone signed in change the same things. The original\n12-step form wizard remains available at `/onboard?mode=form` and backs the\n`openexecutive onboard` CLI. It adds people with their emails, so once there is an owner only they can save it.\n\nA first setup opens on one question — **Just me** or **Me and my team** — and\nthe choice is written to `PUT /workspace` (with the browser's time zone) before\nthe conversation starts, because the two modes ask different things. **Just\nme** then asks the principal's role (skippable, editable later in Settings):\nwhich describes them — owner / founder, an executive inside an organisation,\nindependent or fractional, or other — their title, who they report to, what\nthey are responsible for and what they are measured on, saved to the same\nworkspace settings. A re-run over an existing profile skips both; they are\nchanged in Settings. In solo the interviewer's first user turn carries a short\nhint, one static constant per role kind (`onboarding.interview.solo_hint`):\nalways draft only the principal, as principal, and no departments; an owner is\nasked about the offer, customers, pricing, cash and runway; an in-house\nexecutive about their organisation (the company profile is their employer),\ntheir function and remit, their manager, their team size as context rather\nthan a roster, and what they are measured on; an independent about their\npractice, clients and pricing; with no role given, the role-neutral hint asks\nwhich of these they are. Each also asks their top goals. The hint never\ncarries the principal's own text, and it rides in the user turn, so the cached\nsystem prompt is the same constant in both modes. The solo review screen shows only **You**\n(name and role) and the sign-in email, and commits that one principal with no\ndepartments — the existing departments stay, as the areas goals are grouped\nby. The form wizard (and the CLI) read the mode when a session starts and skip\nthe Team Size, Team Members and Fractional Executives steps in solo; each\nstatus response numbers the steps it actually asks and flags whether the\ncurrent one is `optional`.\n\n### Departments\nEach department carries a charter, `Goal` rows, `ChecklistItem`s, and named cadences. Cadence specs (`daily@HH:MM`, `weekly@DOW@HH:MM`, `quarterly@DD-HH:MM`, UTC) run a `department_check_in` workflow when due (never in solo mode, below), then chain the next occurrence; `PATCH /departments/{slug}` rejects a spec that does not parse with a 422. The check-in is skipped (and still chained) when the department has no specialist, no Goals, or nothing new since its Goals were last reviewed (a row private to the principal does not count as new: whether it runs is visible to the department). An idle initiative is chased with the department's head, or with the principal when there is none. A department may map to a specialist agent via `specialist_key`, or stay informational. No department is seeded for the `sales` specialist (existing installs keep their departments unchanged), so its consults skip the department-memory prefetch and the Honcho department sync, as `triage`'s do. An assigned head gets a generated department-head voice persona.\n\n**Goals from chat.** Besides the goal routes and the UI, the Executive keeps goals current from a chat turn: `update_department_goal` records reported progress, and `create_goal` starts tracking a new goal the principal states (\"20 paying clients by the end of Q4\"). Only the principal, on a surface that verified it is them (`people_tools.is_principal_on_verified_surface`, the roster tools' rule: the web chat, their own Slack or Discord, a private Telegram chat with a valid webhook secret), may call it: a goal renders in every turn's org block as one of the principal's own, so a goal from an inbound email, Google Chat, a teammate or an unattended run would be text carrying their authority. Anyone else gets a refusal (audited with the caller and surface) and nothing is written. `create_goal` names the area as free text — a slug or a title, resolved by `match_department` — so its schema is static and adding an area never changes the cached tool prefix. When nothing matches it creates the area (`create_department`), giving it a specialist only when the title is obviously one's domain (`specialist_key_for_area`: the default departments' slugs and titles, plus Sales) and no department holds that specialist yet; anything else is informational. It refuses a goal the area already tracks (pointing at `update_department_goal`), caps a turn at 5 new goals (a sweep is not a stated goal) and an area at 8 (common practice keeps 3–5 key results per objective, and every goal renders in the 4000-character org block, so one area cannot crowd the others out), returns only the exception type on a store failure, is audited with its rationale, and is never offered to an unattended run (`schedule_tools.UNATTENDED_WITHHELD_TOOLS`: reflection, research and the scheduler's proactive trigger). The solo persona teaches it; team mode learns it from the tool description, so the team persona stays byte-identical.\n\nA department can also list **watched entities** (`watched_entities`, edited one per line on its page): vendors it is evaluating, competitors in its lane, tickers it tracks. The research watch policy treats them as strong grounding — a proposal about one can be added to the watch list on its own — and routes the resulting watch, its alerts and any suggestion cards to the department and its head rather than the principal (see External monitoring).\n\n### Solo and team mode\nAn install is either a **team** (the default) or **solo** — one person using Open Executive just for themselves. The mode lives with the user's time zone in its own one-row table, `workspace_settings` (`openexecutive.memory.workspace_settings`, `GET`/`PUT /workspace`), not on the company profile, because onboarding's commit and the form wizard rebuild the profile from scratch and would wipe it. Changing it is the principal's call (open while no principal exists, so first-run setup can choose).\n\nThe same row holds the **principal's role** (`PrincipalRole`, every field nullable): `role_kind` (`owner`, `in_house`, `independent` or `other`), `role_title`, `reports_to` (free text, e.g. \"VP of Operations, Dana Ruiz\"), `remit` (what they are responsible for) and `measured_on` (what they are judged on). Solo is about who uses Open Executive, not the principal's level — a business owner, an executive inside a larger organisation, an independent or fractional executive — and this is the context the solo persona reads the role from. Only solo mode reads it; a mode switch keeps it. `GET /workspace` returns it only to the principal (nulls for anyone else). The columns are added to an existing table additively, and a read of an older table (no role columns yet) never migrates it and reads the role as unset.\n\nSolo also changes how the Executive speaks and what it can do. It works for one person — the principal — without assuming their role (an owner, an executive inside a larger organisation, or an independent); the people in their world are contacts it helps them work with, not a team it routes to. The cached org block becomes the principal's own line (\"Your Principal\") — followed by their role lines when a role is set (a fixed lead-in marking the role private to the principal — use it to tailor advice and drafts, share it with no one else — then `- Role: <title> — <kind in plain words>`, `- Reports to:`, `- Responsible for:`, `- Measured on:`, each only when set, sanitized and capped) — plus their goals grouped by **area** (a department row is an area; no authority levels, heads, cadences, channels or roster), and posting to a department room, broadcasting to the company and assigning a department head are not offered. Specialists never see that block, so each consult in a solo turn also carries a `<principal_role>` tag in its user turn (kind, title and remit). The role is pinned on the session for the turn with the mode (`pin_turn_principal_role`), so the org block, the tag and any workflow the turn starts agree even if the role is edited mid-turn, so a VP inside a large company is told to make the case to their CFO rather than to raise a round. A follow-up the Executive schedules to the principal goes straight to them — its department and scope are dropped, so the authority gate never files a card asking the principal to approve a message to themselves. Meeting bookings are gated on the `meeting_scheduling` class mode, not a department (see below).\n\nSolo turns the department rhythm off without touching the org: switching to solo cancels every pending `dept_cadence` row, `bootstrap_cadences` does nothing (the check sits inside it, so boot, the fixture reset and client-slot activation all honour it), and the scheduler cancels any stray check-in without running or chaining it, and a check-in already running across the switch schedules no successor. Department and people rows are kept, so switching back to team re-schedules the check-ins at once. The boot-time org-completeness warnings (departments with no head) are skipped in solo. A chat `Session` can carry an explicit `workspace_mode` override (read through `effective_workspace_mode`), so a caller that runs many conversations on one Executive — evals, for one — can pick the mode per session instead of flipping the install-wide setting; a `principal_role` override (read through `effective_principal_role`: the override, then the turn's pin, then the setting) does the same for the role.\n\nIn the UI, a `WorkspaceProvider` in the root layout reads the mode and role once (and again after Settings changes them) and reads **team** while loading or on error, so a team install never flashes the solo UI. Solo swaps the sidebar's Company group for **You** — Goals, People, Business profile — where `/goals` lists every goal grouped by area (a department row) and adds, edits and deletes them through the slug-scoped goal routes. `/departments` and `/people` stay reachable by URL.\n\nThe setting is per company: a blank client slot starts on the defaults, a saved slot keeps its own (restoring one runs the additive column migration), a fixture load resets it and applies the fixture's optional `workspace.yaml` (`mode`, `timezone` and the optional role keys; read and validated before anything is swapped; a bad value is skipped, never a failed load; the load and unload responses report the mode and zone only, never the role), and the factory reset returns it to team with no zone and no role. The user's own settings survive a demo: the backup a fixture load takes (or reuses) always gets the live settings written to its `workspace.yaml` while the live state is the user's, and an unload from an older backup without one leaves the settings as they are. A zone that cannot be loaded is never fatal — the API answers 422, and a stored one reads as unset.\n\n### Authority gate\nEach department declares an `AuthorityLevel`, which `departments.authority.gate_action` checks whenever a department-scoped scheduled action comes due. The check-in cadence is the exception: it sends nothing itself, and each action it proposes is run through the gate and shown with its verdict in the report — so a propose-only department's check-ins actually run instead of becoming a one-shot approval card. `auto_execute` (autonomous) fires directly. `propose_only` turns the action into an approval card for an approver (`propose_via_alert`) and sends nothing, deferring the card to the approver's next availability window when they are outside it. `escalate` also sends nothing until someone approves: it raises an urgent `[ESCALATION]` card (severity high) right away, never deferred — filed unrouted when nobody holds the scope and no principal is set, since the Briefing lists every unread card — what the Departments page promises (\"the specialist will not act — it forwards everything to a human\"). It used to raise the card *and* dispatch, so approving the card sent the action a second time. Calendar bookings follow the same rule in team mode. In solo mode there is no operations department to consult: the booking is decided by the `meeting_scheduling` class mode — `propose` puts it on the briefing for the principal, and `auto_execute` books right away only when the principal started the turn on a surface that verified it is them (the roster-write rule: the web chat, their own Slack or Discord, or a private Telegram chat with the webhook secret set). A booking asked for in an inbound email, by a contact, or by an unattended run is proposed to the principal instead, so text someone else wrote cannot put a meeting on their calendar. The principal sets it with `GET`/`PUT /decisions/classes/meeting_scheduling` (`{\"decision_class\": \"meeting_scheduling\", \"mode\": \"propose\" | \"auto_execute\"}`; the PUT is principal-only and audited). The approver is chosen by `AuthorityScope` — a scheduled action's `required_scope` (e.g. `vendor_onboarding`, `spend_lt_10k`) feeds `find_approvers(scope)`, which ranks non-principal scope-holders ahead of `WILDCARD` holders. A null/unknown scope falls back to `WILDCARD` (the principal).\n\n### People & channels\nThe people registry resolves each `Person` to a `(channel, channel_ref)` pair via `prefer_channel_for()`, honoring `preferred_channel` (falling back email → slack → discord → telegram) and availability windows. The principal briefs use their own order — the preferred channel, then Slack → Discord → Telegram, then email as the backup for every preference (first for an `email` one); see Scheduler. Departments can also set `slack_channel_id` / `discord_channel_id` / `telegram_chat_id` to broadcast to a team room instead of DMing the head.\n\nEach person's page also lists their **open loops** (see Attunement) — what they committed to or were asked for in conversation — with a *Mark done* action; archiving a person closes their open loops, since an archived person can no longer be chased. The list is the principal's or that person's only; `people.store.is_principal_or_self` is the one check behind it, the close action and reply feedback.\n\nThe Executive can change the roster from a chat turn (`upsert_person`, `archive_person`, `set_department_head`) only when the principal asks, from the web chat, their own Slack or Discord, or a private Telegram chat when `TELEGRAM_WEBHOOK_SECRET` is set to a value Telegram can send. A teammate, an email (even one from the principal's address), Google Chat, the CLI, the MCP server and unattended runs are refused, because a team member's People row is also the web sign-in allow-list, the outbound-email allow-list and approval routing. The People page follows the same rule: adding, editing and archiving people (`POST`/`PATCH /people`, `POST /people/{id}/archive`) are the principal's alone, or anyone's while no one is principal yet, so a first setup can add its owner (`chat._caller_is_principal_or_unclaimed`). Anyone else gets 403. That includes a teammate editing their own entry: its email and chat ids are how they sign in and how the Executive reaches them, and the rest decides their approvals and how they are chased. Their working style and open loops stay theirs. A signed-in owner whose email is on no People entry is refused too; they sign in with the email on their entry, or re-run the setup interview, which fills a missing one with the email they signed in with.\n\n### Team and contacts\nA `Person` is either on the **team** (`kind = \"team\"`, the default) or a **contact** (`kind = \"contact\"`): a client, contractor or advisor the Executive may need to email or invite but who must not get what a team row grants. Before contacts existed, emailing a client meant adding them as a Person, which also let them sign in and talk to the bot.\n\nContacts are **denied by default**. `people.store.list_people`, every `find_person_by_*` (and `find_person_by_channel_ref`), and the `people.registry` cache return team members only unless the caller passes `include_contacts=True`; `find_approvers` has no opt-in at all. So a contact is never in the web sign-in list (`GET /auth/allowed-emails`), the Slack / Telegram / Discord inbound gates, approvers, the alert review's roster slice, `/today`'s people list and insights, open-loop owners (an ask of a contact opens no loop, so the nudge engine never chases them), a workflow gate's approver or cadence recipient, the recap DM after a meeting, or a department head (`set_department_head` and `PATCH /departments/{slug}` refuse one). `get_person(id)` returns either kind and its security-relevant callers check `kind`.\n\nThe roster reads that **opt in** are few: the Executive's egress checks (Gmail, Calendar and Drive in the MCP gateway, calendar attendee resolution, and the chat DM tools), the People page's listing (`GET /people?include_contacts=true`), the chat `list_people` tool (both kinds, with `kind`), and the org prompt block. Even there, reaching a contact needs **the principal's own turn**: `people_tools.contacts_reachable_now()` is true only on a turn the principal started on a surface that verified them — the same rule as roster writes above — or inside `grant_contact_egress()`, which the decisions approve route uses when the approver resolves to the principal. An inbound email (even from the principal's address), a teammate's turn, and unattended runs (scheduler, workflows, alert review) can still reach the team but not contacts. A workflow resumed by `apply_resolution`'s kick runs with no chat session, like the resumer's poll loop, so it never inherits the approver's turn.\n\n**Contacts are private to the principal.** A solo user may be an executive whose contacts include their boss, reports, board and clients, so nobody else using the install sees one. The rule is `contacts_reachable_now()` again: off the principal's own verified turn a contact does not exist — `list_people` returns the team with the same count, a contact's id or address gets exactly the error an unknown one gets (never a contact-specific refusal), and the org prompt block has no Contacts section. The API applies the same rule by caller (`people.caller_is_principal`: the signed-in email is the principal's, or no `x-caller-email` — CLI, local login; unlike the owner rule above, nobody is while no one is principal yet): `?include_contacts=true` is ignored for anyone else, a contact's id is a 404 on `GET /people/{id}` and its open loops exactly like a missing one (editing and archiving are already a 403 before any lookup), only the principal may create a contact or turn someone into one (403, a first setup with no principal included), and `GET /people/me` tells the UI whether to offer contacts at all.\n\nWhatever the Executive raises about a contact stays with the principal too. A meeting with a contact is proposed to the principal (not the scope's approver), its decision is hidden from everyone else's `/decisions` (404 by id), and its card carries `alerts.models.PRIVATE_ALERT_TAG`. So does an alert raised on a turn about the principal's private mail (`Session.private_to_principal`, set by the email poller for mail from a contact and for mail the principal forwards): the pipeline routes it to the principal, stores it without a live push or broadcast, and dedups it only against other private alerts. Private alerts appear on the principal's own `/today` and chat digest only — never a teammate's, the activity rail, the narrative, the morning brief, the end-of-day digest, the reflection or the alert review — and a teammate's ack, reopen or bulk sweep cannot touch one (404). A private turn itself reaches the principal and nobody else (email, DMs, invites). It is not offered, and cannot run, the tools that post to other people, publish where the team reads (artifacts, goal updates, saved workflows, skill drafts) or start work outside the turn (`schedule_tools.PRIVATE_TURN_WITHHELD_TOOLS`), and of the MCP tools it may use only Google Workspace reads and the Gmail send the gateway narrows to the principal. Its audit rows are the principal's alone, as is any row on the principal's own turn that names one of their contacts (see Audit Log). DMs to a contact stay off the activity rail.\n\n`upsert_person` takes `kind`: explicit wins; an update that omits it keeps the row's kind (the store's full-row UPDATE preserves it, so nothing promotes a contact to the team by accident); a new person defaults to `team`, or to `contact` in solo mode. On the principal's own verified turn the org prompt block lists contacts in a short `## Contacts` section after the team block (or, in solo, after `## Your Principal` and their goals) — name, role/company and whether an email is on file, capped at 25 — in both modes. Every other turn gets the team block, byte-identical to an install with no contacts, so the 5-minute cached block has two stable variants.\n\nOn the **People page** the principal sees **Team** and **Contacts** tabs; anyone else sees the team only (no Contacts tab, no kind selector). Solo mode opens on Contacts, and its Team tab shows only the principal. The add form has a kind selector and hides authority scopes, reply SLA and the principal checkbox for a contact; a contact's page hides scopes, SLA, availability windows, open loops, outreach and working style. Adding a team member in solo offers to switch the workspace to team mode, or keep solo.",
+ "markdown": "The org model has two persistent registries backed by SQLite (both share `episodic_memory.db`): **departments** and **people**. Eight default departments are seeded exactly once per database on first boot, tracked by a `default_departments_seeded` sentinel in `departments_meta`; after that the user owns the list and deleted departments stay deleted across restarts.\n\n### Company setup (onboarding)\nBoth registries are first populated by **conversational onboarding** at\n`/onboard`. The user describes their business in their own words (optionally\nattaching a deck or one-pager); the `onboarding_interviewer` agent — Council-\nvisible but outside `SPECIALIST_REGISTRY`, so the Executive cannot reach it via\n`consult_specialist` — asks up to 8 clarifying questions, then emits a draft\ncompany profile, a leadership roster, and a department list. The user reviews\nand edits that draft inline (the same section editors `/company-profile` uses)\nbefore anything is written.\n\nTwo properties matter here. First, **the interview never writes**: the whole\nexchange lives in an in-memory, TTL'd session, and the single write happens at\n`POST /onboard/interview/commit`, so a rejected save leaves the draft editable\nand retryable. Second, **the department step is additive** — drafted\ndepartments are matched onto existing ones by slug or title and updated in\nplace, unmatched ones are created, and nothing is ever deleted. That is\ndeliberately unlike the fixture loader's `_seed_departments`, which DELETEs\nevery row first: doing that here would drop the eight defaults along with their\n`specialist_key` wiring, which onboarding's `create_department` calls (no\n`specialist_key`) cannot restore. Matching goes through\n`departments.store.match_department` (slug as given or as the store would slug\nit, else case-insensitive title), the same rule the `create_goal` chat tool uses. `profile.org_structure` is derived from the reviewed\npeople and department tables at commit time, so it cannot drift from them.\n\nExactly one person is marked `is_principal` and receives `WILDCARD` authority;\nno contact details are imported, even if the user volunteers them, because\nchannels and handles are a deliberate action on the People page. The one\nexception is the owner's own sign-in email: the review screen has a separate\nfield for it, pre-filled with the current owner's email on a re-run and with the\nsigned-in user's on a first setup. The commit checks it before writing anything\n(malformed, already another person's, or different from the owner's existing\nemail is a 422 — setup only fills in a missing one) and then saves it on the\nprincipal's row. Without it the signed-in owner matched no Person,\nso their chat history stayed empty until they found the People page. With\nlocal login (`make dev` without Google sign-in) the field is optional: that\nsession carries no email, which the backend already reads as the principal.\nBecause the save demotes the old principal, only the current owner may draft\nsomeone else as \"This is me\" when setup is re-run (403 otherwise); a re-run\nthat keeps the owner, or a first setup, is open to anyone who can sign in. On such a re-run, someone who isn't the owner may fill in the owner's missing email only with the address they signed in with (403 otherwise): the roster is the sign-in allow-list, so any other address would let them sign in as the owner. That keeps the way in for an owner whose entry has no email, which is also where Setup status and the Executive send them, since the People page refuses anyone it can't recognise as the owner. Re-running setup stays open to everyone deliberately: the Company Profile and Departments pages already let anyone signed in change the same things. The original\n12-step form wizard remains available at `/onboard?mode=form` and backs the\n`openexecutive onboard` CLI. It adds people with their emails, so once there is an owner only they can save it.\n\nA first setup opens on one question — **Just me** or **Me and my team** — and\nthe choice is written to `PUT /workspace` (with the browser's time zone) before\nthe conversation starts, because the two modes ask different things. **Just\nme** then asks the principal's role (skippable, editable later in Settings):\nwhich describes them — owner / founder, an executive inside an organisation,\nindependent or fractional, or other — their title, who they report to, what\nthey are responsible for and what they are measured on, saved to the same\nworkspace settings. A re-run over an existing profile skips both; they are\nchanged in Settings. In solo the interviewer's first user turn carries a short\nhint, one static constant per role kind (`onboarding.interview.solo_hint`):\nalways draft only the principal, as principal, and no departments; an owner is\nasked about the offer, customers, pricing, cash and runway; an in-house\nexecutive about their organisation (the company profile is their employer),\ntheir function and remit, their manager, their team size as context rather\nthan a roster, and what they are measured on; an independent about their\npractice, clients and pricing; with no role given, the role-neutral hint asks\nwhich of these they are. Each also asks their top goals. The hint never\ncarries the principal's own text, and it rides in the user turn, so the cached\nsystem prompt is the same constant in both modes. The solo review screen shows only **You**\n(name and role) and the sign-in email, and commits that one principal with no\ndepartments — the existing departments stay, as the areas goals are grouped\nby. The form wizard (and the CLI) read the mode when a session starts and skip\nthe Team Size, Team Members and Fractional Executives steps in solo; each\nstatus response numbers the steps it actually asks and flags whether the\ncurrent one is `optional`.\n\n### Departments\nEach department carries a charter, `Goal` rows, `ChecklistItem`s, and named cadences. Cadence specs (`daily@HH:MM`, `weekly@DOW@HH:MM`, `quarterly@DD-HH:MM`, UTC) run a `department_check_in` workflow when due (never in solo mode, below), then chain the next occurrence; `PATCH /departments/{slug}` rejects a spec that does not parse with a 422. The check-in is skipped (and still chained) when the department has no specialist, no Goals, or nothing new since its Goals were last reviewed (a row private to the principal does not count as new: whether it runs is visible to the department). An idle initiative is chased with the department's head, or with the principal when there is none. A department may map to a specialist agent via `specialist_key`, or stay informational. No department is seeded for the `sales` specialist (existing installs keep their departments unchanged), so its consults skip the department-memory prefetch and the Honcho department sync, as `triage`'s do. An assigned head gets a generated department-head voice persona.\n\n**Goals from chat.** Besides the goal routes and the UI, the Executive keeps goals current from a chat turn: `update_department_goal` records reported progress, and `create_goal` starts tracking a new goal the principal states (\"20 paying clients by the end of Q4\"). Only the principal, on a surface that verified it is them (`people_tools.is_principal_on_verified_surface`, the roster tools' rule: the web chat, their own Slack or Discord, a private Telegram chat with a valid webhook secret), may call it: a goal renders in every turn's org block as one of the principal's own, so a goal from an inbound email, Google Chat, a teammate or an unattended run would be text carrying their authority. Anyone else gets a refusal (audited with the caller and surface) and nothing is written. `create_goal` names the area as free text — a slug or a title, resolved by `match_department` — so its schema is static and adding an area never changes the cached tool prefix. When nothing matches it creates the area (`create_department`), giving it a specialist only when the title is obviously one's domain (`specialist_key_for_area`: the default departments' slugs and titles, plus Sales) and no department holds that specialist yet; anything else is informational. It refuses a goal the area already tracks (pointing at `update_department_goal`), caps a turn at 5 new goals (a sweep is not a stated goal) and an area at 8 (common practice keeps 3–5 key results per objective, and every goal renders in the 4000-character org block, so one area cannot crowd the others out), returns only the exception type on a store failure, is audited with its rationale, and is never offered to an unattended run (`schedule_tools.UNATTENDED_WITHHELD_TOOLS`: reflection, research and the scheduler's proactive trigger). The solo persona teaches it; team mode learns it from the tool description, so the team persona stays byte-identical.\n\nA department can also list **watched entities** (`watched_entities`, edited one per line on its page): vendors it is evaluating, competitors in its lane, tickers it tracks. The research watch policy treats them as strong grounding — a proposal about one can be added to the watch list on its own — and routes the resulting watch, its alerts and any suggestion cards to the department and its head rather than the principal (see External monitoring).\n\n### Solo and team mode\nAn install is either a **team** (the default) or **solo** — one person using Open Executive just for themselves. The mode lives with the user's time zone in its own one-row table, `workspace_settings` (`openexecutive.memory.workspace_settings`, `GET`/`PUT /workspace`), not on the company profile, because onboarding's commit and the form wizard rebuild the profile from scratch and would wipe it. Changing it is the principal's call (open while no principal exists, so first-run setup can choose).\n\nThe same row holds the **principal's role** (`PrincipalRole`, every field nullable): `role_kind` (`owner`, `in_house`, `independent` or `other`), `role_title`, `reports_to` (free text, e.g. \"VP of Operations, Dana Ruiz\"), `remit` (what they are responsible for) and `measured_on` (what they are judged on). Solo is about who uses Open Executive, not the principal's level — a business owner, an executive inside a larger organisation, an independent or fractional executive — and this is the context the solo persona reads the role from. Only solo mode reads it; a mode switch keeps it. `GET /workspace` returns it only to the principal (nulls for anyone else). The columns are added to an existing table additively, and a read of an older table (no role columns yet) never migrates it and reads the role as unset.\n\nSolo also changes how the Executive speaks and what it can do. It works for one person — the principal — without assuming their role (an owner, an executive inside a larger organisation, or an independent); the people in their world are contacts it helps them work with, not a team it routes to. The cached org block becomes the principal's own line (\"Your Principal\") — followed by their role lines when a role is set (a fixed lead-in marking the role private to the principal — use it to tailor advice and drafts, share it with no one else — then `- Role: <title> — <kind in plain words>`, `- Reports to:`, `- Responsible for:`, `- Measured on:`, each only when set, sanitized and capped) — plus their goals grouped by **area** (a department row is an area; no authority levels, heads, cadences, channels or roster), and posting to a department room, broadcasting to the company and assigning a department head are not offered. Specialists never see that block, so each consult in a solo turn also carries a `<principal_role>` tag in its user turn (kind, title and remit). The role is pinned on the session for the turn with the mode (`pin_turn_principal_role`), so the org block, the tag and any workflow the turn starts agree even if the role is edited mid-turn, so a VP inside a large company is told to make the case to their CFO rather than to raise a round. A follow-up the Executive schedules to the principal goes straight to them — its department and scope are dropped, so the authority gate never files a card asking the principal to approve a message to themselves. Meeting bookings are gated on the `meeting_scheduling` class mode, not a department (see below).\n\nSolo turns the department rhythm off without touching the org: switching to solo cancels every pending `dept_cadence` row, `bootstrap_cadences` does nothing (the check sits inside it, so boot, the fixture reset and client-slot activation all honour it), and the scheduler cancels any stray check-in without running or chaining it, and a check-in already running across the switch schedules no successor. Department and people rows are kept, so switching back to team re-schedules the check-ins at once. The boot-time org-completeness warnings (departments with no head) are skipped in solo. A chat `Session` can carry an explicit `workspace_mode` override (read through `effective_workspace_mode`), so a caller that runs many conversations on one Executive — evals, for one — can pick the mode per session instead of flipping the install-wide setting; a `principal_role` override (read through `effective_principal_role`: the override, then the turn's pin, then the setting) does the same for the role.\n\nIn the UI, a `WorkspaceProvider` in the root layout reads the mode and role once (and again after Settings changes them) and reads **team** while loading or on error, so a team install never flashes the solo UI. Solo swaps the sidebar's Company group for **You** — Goals, People and the profile — where `/goals` lists every goal grouped by area (a department row) and adds, edits and deletes them through the slug-scoped goal routes. The profile entry follows the principal's role kind: **Business profile** for an owner, **Your work** for anyone else, including an unset role or one `GET /workspace` hides from a non-principal. One rule (`profileWording(mode, roleKind)` in `navConfig.ts`) also words the `/company-profile` breadcrumb, intro and section headings, the form wizard and the draft review; it is copy only, so no profile field is renamed, and team wording is unchanged. `/departments` and `/people` stay reachable by URL.\n\nThe setting is per company: a blank client slot starts on the defaults, a saved slot keeps its own (restoring one runs the additive column migration), a fixture load resets it and applies the fixture's optional `workspace.yaml` (`mode`, `timezone` and the optional role keys; read and validated before anything is swapped; a bad value is skipped, never a failed load; the load and unload responses report the mode and zone only, never the role), and the factory reset returns it to team with no zone and no role. The user's own settings survive a demo: the backup a fixture load takes (or reuses) always gets the live settings written to its `workspace.yaml` while the live state is the user's, and an unload from an older backup without one leaves the settings as they are. A zone that cannot be loaded is never fatal — the API answers 422, and a stored one reads as unset.\n\n### Authority gate\nEach department declares an `AuthorityLevel`, which `departments.authority.gate_action` checks whenever a department-scoped scheduled action comes due. The check-in cadence is the exception: it sends nothing itself, and each action it proposes is run through the gate and shown with its verdict in the report — so a propose-only department's check-ins actually run instead of becoming a one-shot approval card. `auto_execute` (autonomous) fires directly. `propose_only` turns the action into an approval card for an approver (`propose_via_alert`) and sends nothing, deferring the card to the approver's next availability window when they are outside it. `escalate` also sends nothing until someone approves: it raises an urgent `[ESCALATION]` card (severity high) right away, never deferred — filed unrouted when nobody holds the scope and no principal is set, since the Briefing lists every unread card — what the Departments page promises (\"the specialist will not act — it forwards everything to a human\"). It used to raise the card *and* dispatch, so approving the card sent the action a second time. Calendar bookings follow the same rule in team mode. In solo mode there is no operations department to consult: the booking is decided by the `meeting_scheduling` class mode — `propose` puts it on the briefing for the principal, and `auto_execute` books right away only when the principal started the turn on a surface that verified it is them (the roster-write rule: the web chat, their own Slack or Discord, or a private Telegram chat with the webhook secret set). A booking asked for in an inbound email, by a contact, or by an unattended run is proposed to the principal instead, so text someone else wrote cannot put a meeting on their calendar. The principal sets it with `GET`/`PUT /decisions/classes/meeting_scheduling` (`{\"decision_class\": \"meeting_scheduling\", \"mode\": \"propose\" | \"auto_execute\"}`; the PUT is principal-only and audited). The approver is chosen by `AuthorityScope` — a scheduled action's `required_scope` (e.g. `vendor_onboarding`, `spend_lt_10k`) feeds `find_approvers(scope)`, which ranks non-principal scope-holders ahead of `WILDCARD` holders. A null/unknown scope falls back to `WILDCARD` (the principal).\n\n### People & channels\nThe people registry resolves each `Person` to a `(channel, channel_ref)` pair via `prefer_channel_for()`, honoring `preferred_channel` (falling back email → slack → discord → telegram) and availability windows. The principal briefs use their own order — the preferred channel, then Slack → Discord → Telegram, then email as the backup for every preference (first for an `email` one); see Scheduler. Departments can also set `slack_channel_id` / `discord_channel_id` / `telegram_chat_id` to broadcast to a team room instead of DMing the head.\n\nEach person's page also lists their **open loops** (see Attunement) — what they committed to or were asked for in conversation — with a *Mark done* action; archiving a person closes their open loops, since an archived person can no longer be chased. The list is the principal's or that person's only; `people.store.is_principal_or_self` is the one check behind it, the close action and reply feedback.\n\nThe Executive can change the roster from a chat turn (`upsert_person`, `archive_person`, `set_department_head`) only when the principal asks, from the web chat, their own Slack or Discord, or a private Telegram chat when `TELEGRAM_WEBHOOK_SECRET` is set to a value Telegram can send. A teammate, an email (even one from the principal's address), Google Chat, the CLI, the MCP server and unattended runs are refused, because a team member's People row is also the web sign-in allow-list, the outbound-email allow-list and approval routing. The People page follows the same rule: adding, editing and archiving people (`POST`/`PATCH /people`, `POST /people/{id}/archive`) are the principal's alone, or anyone's while no one is principal yet, so a first setup can add its owner (`chat._caller_is_principal_or_unclaimed`). Anyone else gets 403. That includes a teammate editing their own entry: its email and chat ids are how they sign in and how the Executive reaches them, and the rest decides their approvals and how they are chased. Their working style and open loops stay theirs. A signed-in owner whose email is on no People entry is refused too; they sign in with the email on their entry, or re-run the setup interview, which fills a missing one with the email they signed in with.\n\n### Team and contacts\nA `Person` is either on the **team** (`kind = \"team\"`, the default) or a **contact** (`kind = \"contact\"`): a client, contractor or advisor the Executive may need to email or invite but who must not get what a team row grants. Before contacts existed, emailing a client meant adding them as a Person, which also let them sign in and talk to the bot.\n\nContacts are **denied by default**. `people.store.list_people`, every `find_person_by_*` (and `find_person_by_channel_ref`), and the `people.registry` cache return team members only unless the caller passes `include_contacts=True`; `find_approvers` has no opt-in at all. So a contact is never in the web sign-in list (`GET /auth/allowed-emails`), the Slack / Telegram / Discord inbound gates, approvers, the alert review's roster slice, `/today`'s people list and insights, open-loop owners (an ask of a contact opens no loop, so the nudge engine never chases them), a workflow gate's approver or cadence recipient, the recap DM after a meeting, or a department head (`set_department_head` and `PATCH /departments/{slug}` refuse one). `get_person(id)` returns either kind and its security-relevant callers check `kind`.\n\nThe roster reads that **opt in** are few: the Executive's egress checks (Gmail, Calendar and Drive in the MCP gateway, calendar attendee resolution, and the chat DM tools), the People page's listing (`GET /people?include_contacts=true`), the chat `list_people` tool (both kinds, with `kind`), and the org prompt block. Even there, reaching a contact needs **the principal's own turn**: `people_tools.contacts_reachable_now()` is true only on a turn the principal started on a surface that verified them — the same rule as roster writes above — or inside `grant_contact_egress()`, which the decisions approve route uses when the approver resolves to the principal. An inbound email (even from the principal's address), a teammate's turn, and unattended runs (scheduler, workflows, alert review) can still reach the team but not contacts. A workflow resumed by `apply_resolution`'s kick runs with no chat session, like the resumer's poll loop, so it never inherits the approver's turn.\n\n**Contacts are private to the principal.** A solo user may be an executive whose contacts include their boss, reports, board and clients, so nobody else using the install sees one. The rule is `contacts_reachable_now()` again: off the principal's own verified turn a contact does not exist — `list_people` returns the team with the same count, a contact's id or address gets exactly the error an unknown one gets (never a contact-specific refusal), and the org prompt block has no Contacts section. The API applies the same rule by caller (`people.caller_is_principal`: the signed-in email is the principal's, or no `x-caller-email` — CLI, local login; unlike the owner rule above, nobody is while no one is principal yet): `?include_contacts=true` is ignored for anyone else, a contact's id is a 404 on `GET /people/{id}` and its open loops exactly like a missing one (editing and archiving are already a 403 before any lookup), only the principal may create a contact or turn someone into one (403, a first setup with no principal included), and `GET /people/me` tells the UI whether to offer contacts at all.\n\nWhatever the Executive raises about a contact stays with the principal too. A meeting with a contact is proposed to the principal (not the scope's approver), its decision is hidden from everyone else's `/decisions` (404 by id), and its card carries `alerts.models.PRIVATE_ALERT_TAG`. So does an alert raised on a turn about the principal's private mail (`Session.private_to_principal`, set by the email poller for mail from a contact and for mail the principal forwards): the pipeline routes it to the principal, stores it without a live push or broadcast, and dedups it only against other private alerts. Private alerts appear on the principal's own `/today` and chat digest only — never a teammate's, the activity rail, the narrative, the morning brief, the end-of-day digest, the reflection or the alert review — and a teammate's ack, reopen or bulk sweep cannot touch one (404). A private turn itself reaches the principal and nobody else (email, DMs, invites). It is not offered, and cannot run, the tools that post to other people, publish where the team reads (artifacts, goal updates, saved workflows, skill drafts) or start work outside the turn (`schedule_tools.PRIVATE_TURN_WITHHELD_TOOLS`), and of the MCP tools it may use only Google Workspace reads and the Gmail send the gateway narrows to the principal. Its audit rows are the principal's alone, as is any row on the principal's own turn that names one of their contacts (see Audit Log). DMs to a contact stay off the activity rail.\n\n`upsert_person` takes `kind`: explicit wins; an update that omits it keeps the row's kind (the store's full-row UPDATE preserves it, so nothing promotes a contact to the team by accident); a new person defaults to `team`, or to `contact` in solo mode. On the principal's own verified turn the org prompt block lists contacts in a short `## Contacts` section after the team block (or, in solo, after `## Your Principal` and their goals) — name, role/company and whether an email is on file, capped at 25 — in both modes. Every other turn gets the team block, byte-identical to an install with no contacts, so the 5-minute cached block has two stable variants.\n\nOn the **People page** the principal sees **Team** and **Contacts** tabs; anyone else sees the team only (no Contacts tab, no kind selector). Solo mode opens on Contacts, and its Team tab shows only the principal. The add form has a kind selector and hides authority scopes, reply SLA and the principal checkbox for a contact; a contact's page hides scopes, SLA, availability windows, open loops, outreach and working style. Adding a team member in solo offers to switch the workspace to team mode, or keep solo.",
"mermaid": "flowchart TD\n People[\"People registry (Person, is_principal, kind)\"]\n Contacts[\"Contacts (kind = contact): egress only on the principal's turn\"]\n Dept[\"Departments (8 seeded once)\"]\n GC[\"Goals / checklists / cadences\"]\n Head[\"Head + voice persona\"]\n Gate[\"Authority gate (propose_only vs autonomous)\"]\n Scope[\"AuthorityScope to find_approvers\"]\n Chan[\"Channel resolution (Discord / Telegram / email)\"]\n Dept --> GC\n Dept --> Head\n Dept -->|proposes action| Gate\n Gate -->|required_scope| Scope\n Scope -->|ranks approvers| People\n People --> Chan\n People -. include_contacts .-> Contacts\n Dept -->|team room| Chan\n class People storage\n class Contacts storage\n class Dept storage\n class GC storage\n class Gate compute\n class Scope compute\n class Chan compute\n class Head compute",
"generated_at": "2026-09-25T19:32:29Z"
}
diff --git a/packages/core/openexecutive/guide/prebuilt/settings.json b/packages/core/openexecutive/guide/prebuilt/settings.json
index 88f1fcb2..f05c9180 100644
--- a/packages/core/openexecutive/guide/prebuilt/settings.json
+++ b/packages/core/openexecutive/guide/prebuilt/settings.json
@@ -1,7 +1,7 @@
{
"section_id": "settings",
"title": "Settings & Advanced",
- "markdown": "**What it is:** The hub for power-user and admin tools that were pulled out of the day-to-day nav to keep it focused.\n\n**What it does:**\n\n- Links to Setup status, the Agent Council, Audit Log, Token Usage, this User Guide, the Architecture reference, Company Simulator, and Client Companies.\n- Acts as a directory — each tile opens a dedicated screen.\n- Keeps advanced configuration one click away without cluttering the main workspace.\n- Shows whether the Executive is **running** or **paused**, with a switch to pause or resume it.\n- Holds the **Workspace** card: whether you use Open Executive just for yourself or with your team, your role when it's just you, your time zone, and whether the Executive books meetings without asking.\n\n**How to use:**\n\n1. Click **Settings** at the bottom of the sidebar.\n2. Click the tile for what you want to do:\n - **Setup status** — check that every part of your setup is working, and see what to do about anything that isn't.\n - **Agent Council** — change a specialist's model or prompt, or the Executive's voice.\n - **Audit log** — find out what the Executive did, and why.\n - **Token usage** — see what you're spending and where.\n - **User Guide** — this guide.\n - **Architecture** — the technical reference for how the system is built.\n - **Company Simulator** — try the Executive on a test company.\n - **Client Companies** — switch between clients if you do fractional work.\n\n**Checking your setup:**\n\n- Open **Settings → Setup status**. Each part of your setup gets a light: green is working, amber needs attention, red isn't working, grey isn't set up (and is optional).\n- It tests things for real: the AI key, and each chat app's token, with a quick call that sends nothing. It also checks the Executive's email address, the company setup, the daily schedule, when and where your daily brief goes, and whether anyone on your team list can reach each chat app.\n- Anything that isn't green says what to do in plain words, with a button when the fix is on another page. After you change a setting and restart the app, click **Check again**.\n\n**Workspace:**\n\n- **Using Open Executive** — **Just me** or **With your team**. You pick this when you first set up; change it here. Switching asks you to confirm and says what changes:\n - **Just me** pauses department check-ins and shows **Goals** (grouped by area) in the sidebar instead of Departments. Nothing is deleted — your departments stay, as the areas your goals are grouped by.\n - **With your team** brings back Departments and their daily check-ins, and the People and department cards on the Briefing.\n- **Your role** (just you) — which describes you best (**Owner / founder**, **Executive inside an organisation**, **Independent or fractional**, or **Other**), your title, who you report to, what you're responsible for and what you're measured on. Every field is optional; click **Save role** after editing. The Executive uses it to fit its advice to your job — a VP gets help making the case to their boss, an owner gets help with a call that's theirs alone to make. It stays saved if you switch to your team.\n- **Time zone** — when your morning brief, end-of-day digest and reflection arrive, and how the Executive reads \"tomorrow at 9\". It suggests the zone your browser is in; **Follow server default** uses the server's setting.\n- **Book meetings without asking** — when on, the Executive books meetings on your calendar on its own; when off, each booking waits for your approval on the Briefing. (Shown only when your install supports it.)\n- Only the principal can change the mode, role and time zone. A persona you customised in Council stays in place in either mode.\n\n**Setting up just for yourself:**\n\n- The first time you set up, Open Executive asks who it is for — **Just me** or **Me and my team** — before anything else, and saves your time zone from the browser. Re-running setup later skips this; change the mode here instead.\n- Choosing **Just me** then asks **What's your role?** — the same fields as **Your role** above. Fill in what you like, or click **Skip for now**.\n- Just for yourself, the setup conversation asks about your work rather than your team, following the role you gave: an owner about what you offer, your customers, pricing, cash and runway; an executive inside an organisation about that organisation (it becomes your company profile), what you're responsible for, who you report to and what you're measured on; an independent about your practice and clients. Everyone is asked about their goals. On **Here's what I understood** there is a single **You** card (your name and role) next to **Your sign-in email**, instead of the team and department lists.\n- The step-by-step form skips the team size, team members and fractional executives steps.\n- In the sidebar, **You** holds **Goals**, **People** and **Business profile**.\n\n**Pausing the Executive:**\n\n- Click **Executive running** at the bottom of the sidebar (or use the card at the top of Settings), add a reason if you like, and click **Pause Executive**.\n- While paused, the Executive starts nothing on its own: no briefs, nudges, monitoring, inbox processing or workflow timers. An amber banner appears on every page.\n- Chat and direct messages (Slack, Telegram, Discord, Google Chat) still get answers.\n- Nothing is lost. Work that falls due during the pause waits, and runs when you click **Resume**. The switch shows how many actions are waiting.\n- Anyone who can sign in can pause the Executive, but only the principal can resume it.\n\n*Tip: if you're looking for a feature that isn't in the sidebar, it's probably here. This guide is also pinned next to Settings at the bottom of the nav.*",
+ "markdown": "**What it is:** The hub for power-user and admin tools that were pulled out of the day-to-day nav to keep it focused.\n\n**What it does:**\n\n- Links to Setup status, the Agent Council, Audit Log, Token Usage, this User Guide, the Architecture reference, Company Simulator, and Client Companies.\n- Acts as a directory — each tile opens a dedicated screen.\n- Keeps advanced configuration one click away without cluttering the main workspace.\n- Shows whether the Executive is **running** or **paused**, with a switch to pause or resume it.\n- Holds the **Workspace** card: whether you use Open Executive just for yourself or with your team, your role when it's just you, your time zone, and whether the Executive books meetings without asking.\n\n**How to use:**\n\n1. Click **Settings** at the bottom of the sidebar.\n2. Click the tile for what you want to do:\n - **Setup status** — check that every part of your setup is working, and see what to do about anything that isn't.\n - **Agent Council** — change a specialist's model or prompt, or the Executive's voice.\n - **Audit log** — find out what the Executive did, and why.\n - **Token usage** — see what you're spending and where.\n - **User Guide** — this guide.\n - **Architecture** — the technical reference for how the system is built.\n - **Company Simulator** — try the Executive on a test company.\n - **Client Companies** — switch between clients if you do fractional work.\n\n**Checking your setup:**\n\n- Open **Settings → Setup status**. Each part of your setup gets a light: green is working, amber needs attention, red isn't working, grey isn't set up (and is optional).\n- It tests things for real: the AI key, and each chat app's token, with a quick call that sends nothing. It also checks the Executive's email address, the company setup, the daily schedule, when and where your daily brief goes, and whether anyone on your team list can reach each chat app.\n- Anything that isn't green says what to do in plain words, with a button when the fix is on another page. After you change a setting and restart the app, click **Check again**.\n\n**Workspace:**\n\n- **Using Open Executive** — **Just me** or **With your team**. You pick this when you first set up; change it here. Switching asks you to confirm and says what changes:\n - **Just me** pauses department check-ins and shows **Goals** (grouped by area) in the sidebar instead of Departments. Nothing is deleted — your departments stay, as the areas your goals are grouped by.\n - **With your team** brings back Departments and their daily check-ins, and the People and department cards on the Briefing.\n- **Your role** (just you) — which describes you best (**Owner / founder**, **Executive inside an organisation**, **Independent or fractional**, or **Other**), your title, who you report to, what you're responsible for and what you're measured on. Every field is optional; click **Save role** after editing. The Executive uses it to fit its advice to your job — a VP gets help making the case to their boss, an owner gets help with a call that's theirs alone to make. It stays saved if you switch to your team.\n- **Time zone** — when your morning brief, end-of-day digest and reflection arrive, and how the Executive reads \"tomorrow at 9\". It suggests the zone your browser is in; **Follow server default** uses the server's setting.\n- **Book meetings without asking** — when on, the Executive books meetings on your calendar on its own; when off, each booking waits for your approval on the Briefing. (Shown only when your install supports it.)\n- Only the principal can change the mode, role and time zone. A persona you customised in Council stays in place in either mode.\n\n**Setting up just for yourself:**\n\n- The first time you set up, Open Executive asks who it is for — **Just me** or **Me and my team** — before anything else, and saves your time zone from the browser. Re-running setup later skips this; change the mode here instead.\n- **Just me** is for anyone who uses Open Executive just for themselves, whatever their role: your own business, a team you lead inside an organisation, or clients you advise as an independent or fractional executive.\n- Choosing **Just me** then asks **What's your role?** — the same fields as **Your role** above. Fill in what you like, or click **Skip for now**.\n- Just for yourself, the setup conversation asks about your work rather than your team, following the role you gave: an owner about what you offer, your customers, pricing, cash and runway; an executive inside an organisation about that organisation (it becomes your company profile), what you're responsible for, who you report to and what you're measured on; an independent about your practice and clients. Everyone is asked about their goals. On **Here's what I understood** there is a single **You** card (your name and role) next to **Your sign-in email**, instead of the team and department lists.\n- The step-by-step form skips the team size, team members and fractional executives steps.\n- In the sidebar, **You** holds **Goals**, **People** and your profile: **Business profile** if you own the business, **Your work** for any other role (or none). The profile page follows the same choice: for any other role it is worded around the organisation you work in (**Where You Work** in place of Company Basics). Either way departments are listed there as **Areas**, and your title, who you report to and what you're responsible for stay under **Your role** above.\n\n**Pausing the Executive:**\n\n- Click **Executive running** at the bottom of the sidebar (or use the card at the top of Settings), add a reason if you like, and click **Pause Executive**.\n- While paused, the Executive starts nothing on its own: no briefs, nudges, monitoring, inbox processing or workflow timers. An amber banner appears on every page.\n- Chat and direct messages (Slack, Telegram, Discord, Google Chat) still get answers.\n- Nothing is lost. Work that falls due during the pause waits, and runs when you click **Resume**. The switch shows how many actions are waiting.\n- Anyone who can sign in can pause the Executive, but only the principal can resume it.\n\n*Tip: if you're looking for a feature that isn't in the sidebar, it's probably here. This guide is also pinned next to Settings at the bottom of the nav.*",
"mermaid": null,
"generated_at": "2026-09-25T16:17:22.156256+00:00"
}
diff --git a/packages/ui/scripts/navConfig.test.mjs b/packages/ui/scripts/navConfig.test.mjs
index 7e00c4bc..c99b1979 100644
--- a/packages/ui/scripts/navConfig.test.mjs
+++ b/packages/ui/scripts/navConfig.test.mjs
@@ -1,6 +1,11 @@
import assert from "node:assert/strict";
import test from "node:test";
-import { buildMobilePrimary, buildPrimaryNav } from "../src/components/shell/navConfig.ts";
+import {
+ PROFILE_NAV,
+ buildMobilePrimary,
+ buildPrimaryNav,
+ profileWording,
+} from "../src/components/shell/navConfig.ts";
const shape = (groups) =>
groups.map((g) => ({ key: g.key, label: g.label, items: g.items.map((i) => `${i.label} → ${i.href}`) }));
@@ -16,15 +21,26 @@ const TEAM = [
{ key: "knowledge", label: "Knowledge", items: ["Knowledge base → /knowledge"] },
];
+const ROLE_KINDS = ["owner", "in_house", "independent", "other", null, undefined];
+
test("team nav is unchanged, and team is the default", () => {
assert.deepEqual(shape(buildPrimaryNav()), TEAM);
assert.deepEqual(buildPrimaryNav({ mode: "team" }), buildPrimaryNav());
const notOnboarded = shape(buildPrimaryNav({ isOnboarded: false }));
assert.deepEqual(notOnboarded[1].items, ["Departments → /departments", "People → /people", "Set up company → /onboard"]);
+ const profile = buildPrimaryNav()[1].items[2];
+ assert.equal(profile.description, "Your company's identity and strategy — set up once, edited any time.");
+});
+
+test("team nav ignores the role", () => {
+ for (const roleKind of ROLE_KINDS) {
+ assert.deepEqual(buildPrimaryNav({ roleKind }), buildPrimaryNav());
+ assert.deepEqual(buildPrimaryNav({ roleKind, isOnboarded: false }), buildPrimaryNav({ isOnboarded: false }));
+ }
});
-test("solo swaps the Company group for You: Goals, People, Business profile", () => {
- const solo = shape(buildPrimaryNav({ mode: "solo" }));
+test("solo swaps the Company group for You: Goals, People and the profile", () => {
+ const solo = shape(buildPrimaryNav({ mode: "solo", roleKind: "owner" }));
assert.deepEqual(solo[1], {
key: "you",
label: "You",
@@ -33,8 +49,43 @@ test("solo swaps the Company group for You: Goals, People, Business profile", ()
// Everything around it is the team nav, unchanged.
assert.deepEqual([solo[0], solo[2]], [TEAM[0], TEAM[2]]);
assert.ok(!JSON.stringify(solo).includes("/departments"));
- const notOnboarded = shape(buildPrimaryNav({ mode: "solo", isOnboarded: false }));
- assert.equal(notOnboarded[1].items[2], "Set up your business → /onboard");
+});
+
+test("solo: an owner's profile is their business", () => {
+ const item = buildPrimaryNav({ mode: "solo", roleKind: "owner" })[1].items[2];
+ assert.equal(item.label, "Business profile");
+ assert.equal(item.description, "Your business — what you offer, who you serve, your priorities.");
+ const notOnboarded = buildPrimaryNav({ mode: "solo", roleKind: "owner", isOnboarded: false })[1].items[2];
+ assert.deepEqual([notOnboarded.label, notOnboarded.href], ["Set up your business", "/onboard"]);
+});
+
+test("solo: any other role, or none, is 'Your work'", () => {
+ // null covers an unset role and one GET /workspace hides from a non-principal.
+ for (const roleKind of ["in_house", "independent", "other", null, undefined]) {
+ const item = buildPrimaryNav({ mode: "solo", roleKind })[1].items[2];
+ assert.deepEqual([item.label, item.href], ["Your work", "/company-profile"], String(roleKind));
+ assert.equal(item.description, "Your work — the organisation you work in, who it serves, your priorities.");
+ assert.ok(!/business|company/i.test(item.label + item.description), String(roleKind));
+ const notOnboarded = buildPrimaryNav({ mode: "solo", roleKind, isOnboarded: false })[1].items[2];
+ assert.deepEqual([notOnboarded.label, notOnboarded.href], ["Set up your work", "/onboard"]);
+ }
+ // The default (no roleKind passed) is the same as an unset role.
+ assert.deepEqual(buildPrimaryNav({ mode: "solo" }), buildPrimaryNav({ mode: "solo", roleKind: null }));
+});
+
+test("profileWording: company for a team, business for a solo owner, work otherwise", () => {
+ for (const roleKind of ROLE_KINDS) {
+ assert.equal(profileWording("team", roleKind), "company");
+ }
+ assert.equal(profileWording(), "company");
+ assert.equal(profileWording("solo", "owner"), "business");
+ for (const roleKind of ["in_house", "independent", "other", null, undefined]) {
+ assert.equal(profileWording("solo", roleKind), "work");
+ }
+ // Every wording has a label, a setup label and a description.
+ for (const [wording, copy] of Object.entries(PROFILE_NAV)) {
+ for (const [key, text] of Object.entries(copy)) assert.ok(text.trim(), `${wording}.${key}`);
+ }
});
test("the review badge rides along in both modes", () => {
@@ -53,7 +104,9 @@ test("mobile bar: solo swaps People for Goals", () => {
test("every destination explains itself", () => {
for (const mode of ["team", "solo"]) {
- const items = [...buildPrimaryNav({ mode }).flatMap((g) => g.items), ...buildMobilePrimary(mode)];
- for (const item of items) assert.ok(item.description.trim(), `${item.href} needs a description`);
+ for (const roleKind of ROLE_KINDS) {
+ const items = [...buildPrimaryNav({ mode, roleKind }).flatMap((g) => g.items), ...buildMobilePrimary(mode)];
+ for (const item of items) assert.ok(item.description.trim(), `${item.href} needs a description`);
+ }
}
});
diff --git a/packages/ui/scripts/profileCopy.test.mjs b/packages/ui/scripts/profileCopy.test.mjs
new file mode 100644
index 00000000..30ac1833
--- /dev/null
+++ b/packages/ui/scripts/profileCopy.test.mjs
@@ -0,0 +1,36 @@
+import assert from "node:assert/strict";
+import test from "node:test";
+import { PROFILE_COPY } from "../src/components/company-profile/profileCopy.ts";
+
+test("team keeps the company wording it always had", () => {
+ assert.deepEqual(PROFILE_COPY.company, {
+ missing: "No company profile set up yet.",
+ missingBanner: "No company profile — responses will be generic.",
+ intro: null,
+ roleNote: null,
+ progress: "Setting up your company profile",
+ basicsTitle: "Company Basics",
+ missionPlaceholder: "Why does this company exist?",
+ dependenciesNote:
+ "Named here, a vendor or ticker counts as company data: the Executive will start watching its status page or filings on its own instead of asking you first.",
+ departmentsLabel: "Departments",
+ });
+});
+
+test("solo never says company or department", () => {
+ for (const wording of ["business", "work"]) {
+ const text = Object.values(PROFILE_COPY[wording]).join(" ");
+ assert.ok(!/company|department/i.test(text), `${wording}: ${text}`);
+ assert.equal(PROFILE_COPY[wording].departmentsLabel, "Areas");
+ assert.ok(PROFILE_COPY[wording].intro, `${wording} has an intro`);
+ assert.ok(PROFILE_COPY[wording].roleNote, `${wording} points at the role in Settings`);
+ }
+});
+
+test("an owner's profile is their business; anyone else's is their work", () => {
+ assert.match(Object.values(PROFILE_COPY.business).join(" "), /business/);
+ const work = Object.values(PROFILE_COPY.work).join(" ");
+ assert.ok(!/business/i.test(work), work);
+ assert.match(PROFILE_COPY.work.intro, /the organisation you work in/);
+ assert.match(PROFILE_COPY.work.roleNote, /what you're responsible for/);
+});
diff --git a/packages/ui/src/app/company-profile/page.tsx b/packages/ui/src/app/company-profile/page.tsx
index 323bf21a..637d6417 100644
--- a/packages/ui/src/app/company-profile/page.tsx
+++ b/packages/ui/src/app/company-profile/page.tsx
@@ -12,6 +12,9 @@ import {
LIST_FIELDS,
type PendingValues,
} from "@/components/company-profile/ProfileSections";
+import { PROFILE_COPY } from "@/components/company-profile/profileCopy";
+import { profileWording } from "@/components/shell/navConfig";
+import { useWorkspace } from "@/components/workspace/WorkspaceContext";
import {
getCompanyProfile,
updateCompanyProfile,
@@ -22,6 +25,11 @@ import {
// ── page ─────────────────────────────────────────────────────────────────────
export default function CompanyProfilePage() {
+ // Team: the company profile, as always. Solo: a business owner's business,
+ // anyone else's work — the same fields, worded for them.
+ const { mode, role } = useWorkspace();
+ const wording = profileWording(mode, role.role_kind);
+ const copy = PROFILE_COPY[wording];
const [profile, setProfile] = useState<CompanyProfile | null>(null);
const [loading, setLoading] = useState(true);
const [notFound, setNotFound] = useState(false);
@@ -129,7 +137,7 @@ export default function CompanyProfilePage() {
{notFound && (
<div className="bg-indigo-500/10 border border-indigo-500/20 rounded-xl px-5 py-4 flex items-center justify-between">
- <p className="text-sm text-fg">No company profile set up yet.</p>
+ <p className="text-sm text-fg">{copy.missing}</p>
<Link href="/onboard" className="text-xs text-indigo-400 hover:text-indigo-300 font-medium transition-colors">
Complete setup →
</Link>
@@ -138,7 +146,7 @@ export default function CompanyProfilePage() {
{profile && (
<>
- <div className="flex items-center justify-between mb-8">
+ <div className={`flex items-center justify-between ${copy.intro ? "mb-4" : "mb-8"}`}>
<div>
<h1 className="text-lg font-semibold text-fg">{profile.name}</h1>
<p className="text-sm text-fg-muted mt-0.5">{[profile.industry, profile.stage].filter(Boolean).join(" · ")}</p>
@@ -148,7 +156,29 @@ export default function CompanyProfilePage() {
</Link>
</div>
- <ProfileSections profile={profile} saving={saving} onSave={save} pending={pending} />
+ {copy.intro && (
+ <p className="text-sm text-fg-muted leading-relaxed mb-8">
+ {copy.intro}
+ {copy.roleNote && (
+ <>
+ {" "}
+ {copy.roleNote}{" "}
+ <Link href="/settings" className="whitespace-nowrap text-indigo-400 hover:text-indigo-300 transition-colors">
+ Settings → Workspace
+ </Link>
+ .
+ </>
+ )}
+ </p>
+ )}
+
+ <ProfileSections
+ profile={profile}
+ saving={saving}
+ onSave={save}
+ pending={pending}
+ wording={wording}
+ />
</>
)}
</div>
diff --git a/packages/ui/src/app/goals/page.tsx b/packages/ui/src/app/goals/page.tsx
index c8a850ec..da51ddcc 100644
--- a/packages/ui/src/app/goals/page.tsx
+++ b/packages/ui/src/app/goals/page.tsx
@@ -95,8 +95,8 @@ export default function GoalsPage() {
{grouped.all.length === 0 ? (
<p className="text-sm text-fg-muted">
- There are no areas to put goals in yet. Areas come with your business
- profile — finish setup first.
+ There are no areas to put goals in yet. Areas come with your profile —
+ finish setup first.
</p>
) : total === 0 && addingTo === null ? (
<div className="rounded-xl border border-line bg-surface-elevated p-6 text-center">
diff --git a/packages/ui/src/app/onboard/page.tsx b/packages/ui/src/app/onboard/page.tsx
index 11fba343..6563d929 100644
--- a/packages/ui/src/app/onboard/page.tsx
+++ b/packages/ui/src/app/onboard/page.tsx
@@ -153,16 +153,19 @@ function OnboardFlow() {
);
}
+// Solo is for anyone using Open Executive just for themselves, whatever
+// their role — not only someone running a business. The two bodies are kept
+// the same shape and about the same length, so they read as a pair.
const CHOICES: { mode: WorkspaceMode; title: string; body: string }[] = [
{
mode: "solo",
title: "Just me",
- body: "Only you use Open Executive. Goals are grouped by area; the people you work with are your contacts.",
+ body: "An executive that works for you, whatever your role: your own business, a team you lead, or clients you advise. It keeps track of your goals and promises, briefs you each morning and reviews your week with you. The people you work with stay your private contacts.",
},
{
mode: "team",
title: "Me and my team",
- body: "The Executive works with your team too. Departments and people, each department checking in daily.",
+ body: "An executive that works for you and your team. It organises your company into departments, each with its own goals and a lead, checks in with every department daily and briefs you each morning. Your teammates can sign in and message it too.",
},
];
@@ -215,7 +218,7 @@ function WorkspaceChoice({ onChosen }: { onChosen: (mode: WorkspaceMode) => void
<div className="max-w-2xl mx-auto px-6 py-16 w-full">
<h1 className="text-xl font-semibold text-fg">Who is Open Executive for?</h1>
<p className="text-sm text-fg-muted mt-1">
- This decides what setup asks about and what you see afterwards. You can change it
+ Your answer decides what setup asks and what you see afterwards. You can change it
later in Settings.
</p>
diff --git a/packages/ui/src/app/page.tsx b/packages/ui/src/app/page.tsx
index 885e0252..24a061aa 100644
--- a/packages/ui/src/app/page.tsx
+++ b/packages/ui/src/app/page.tsx
@@ -7,9 +7,12 @@ import Briefing from "@/components/Briefing";
import Chat from "@/components/Chat";
import DebugPanel from "@/components/DebugPanel";
import Icon from "@/components/Icon";
+import { PROFILE_COPY } from "@/components/company-profile/profileCopy";
import { useSessions } from "@/components/sessions/SessionsContext";
import { MobileBottomNav } from "@/components/shell/AppShell";
import AppSidebar from "@/components/shell/AppSidebar";
+import { profileWording } from "@/components/shell/navConfig";
+import { useWorkspace } from "@/components/workspace/WorkspaceContext";
import PausedBanner from "@/components/executive/PausedBanner";
import { ChatMessage, DebugEvent, getSessionMessages } from "@/lib/api";
import Link from "next/link";
@@ -27,6 +30,9 @@ const MAX_DRAFT_PARAM_CHARS = 2000;
export default function HomePage() {
const { data: session } = useSession();
const firstName = session?.user?.name?.trim().split(/\s+/)[0];
+ // What the profile is called here (a team's company; in solo, an owner's
+ // business or anyone else's work), for the no-profile banner.
+ const { mode: workspaceMode, role } = useWorkspace();
const [health, setHealth] = useState<HealthData | null>(null);
const [debugOpen, setDebugOpen] = useState(false);
@@ -199,6 +205,7 @@ export default function HomePage() {
const isOnboarded = health?.company_profile_loaded === true;
const companyName = health?.company_name;
+ const profileCopy = PROFILE_COPY[profileWording(workspaceMode, role.role_kind)];
return (
<div className="flex h-full relative">
@@ -270,9 +277,7 @@ export default function HomePage() {
{!isOnboarded && health && (
<div className="border-b border-line bg-indigo-500/5 px-4 sm:px-6 py-2.5 flex items-center justify-between gap-3">
- <p className="text-xs text-fg-muted">
- No company profile — responses will be generic.
- </p>
+ <p className="text-xs text-fg-muted">{profileCopy.missingBanner}</p>
<Link href="/onboard" className="text-xs text-indigo-400 hover:text-indigo-300 font-medium transition-colors whitespace-nowrap cursor-pointer">
Set up profile →
</Link>
diff --git a/packages/ui/src/components/Briefing.tsx b/packages/ui/src/components/Briefing.tsx
index 194eb43c..67302177 100644
--- a/packages/ui/src/components/Briefing.tsx
+++ b/packages/ui/src/components/Briefing.tsx
@@ -2199,8 +2199,8 @@ export default function Briefing({ onContinue, showHeader = false, firstName }:
What&apos;s going on
</h2>
<InfoTip align="left">
- The Executive&apos;s read on the company right now —
- synthesized from proposals, at-risk goals, and recent
+ The Executive&apos;s read on {solo ? "your work" : "the company"} right
+ now — synthesized from proposals, at-risk goals, and recent
activity. Regenerates as the picture changes.
</InfoTip>
</div>
diff --git a/packages/ui/src/components/OnboardWizard.tsx b/packages/ui/src/components/OnboardWizard.tsx
index cccc7ff1..c2824819 100644
--- a/packages/ui/src/components/OnboardWizard.tsx
+++ b/packages/ui/src/components/OnboardWizard.tsx
@@ -1,6 +1,9 @@
"use client";
import { useCallback, useEffect, useState } from "react";
+import { PROFILE_COPY } from "@/components/company-profile/profileCopy";
+import { profileWording } from "@/components/shell/navConfig";
+import { useWorkspace } from "@/components/workspace/WorkspaceContext";
import { startOnboarding, submitOnboardAnswer, type OnboardStatus } from "@/lib/api";
interface OnboardWizardProps {
@@ -8,6 +11,7 @@ interface OnboardWizardProps {
}
export default function OnboardWizard({ onComplete }: OnboardWizardProps) {
+ const { mode, role } = useWorkspace();
const [status, setStatus] = useState<OnboardStatus | null>(null);
const [answer, setAnswer] = useState("");
const [isLoading, setIsLoading] = useState(false);
@@ -107,7 +111,7 @@ export default function OnboardWizard({ onComplete }: OnboardWizardProps) {
{/* Progress */}
<div className="mb-10">
<div className="flex justify-between text-xs text-fg-muted mb-2.5 font-medium">
- <span>Setting up your company profile</span>
+ <span>{PROFILE_COPY[profileWording(mode, role.role_kind)].progress}</span>
<span>{status.progress_percent}% complete</span>
</div>
<div className="w-full bg-surface-overlay rounded-full h-1.5">
diff --git a/packages/ui/src/components/company-profile/ProfileSections.tsx b/packages/ui/src/components/company-profile/ProfileSections.tsx
index 92898d35..7cb4aae0 100644
--- a/packages/ui/src/components/company-profile/ProfileSections.tsx
+++ b/packages/ui/src/components/company-profile/ProfileSections.tsx
@@ -9,6 +9,8 @@
// differs, so there is only ever one implementation of these nine sections.
import { useEffect, useState, useRef } from "react";
+import { PROFILE_COPY, type ProfileCopy } from "@/components/company-profile/profileCopy";
+import type { ProfileWording } from "@/components/shell/navConfig";
import { type CompanyProfile } from "@/lib/api";
// ── helpers ──────────────────────────────────────────────────────────────────
@@ -259,7 +261,7 @@ function usePendingSection(
}
// ── section components ────────────────────────────────────────────────────────
-function CompanyBasicsSection({ profile, saving, onSave, pending }: SectionComponentProps) {
+function CompanyBasicsSection({ profile, saving, onSave, pending, copy }: SectionComponentProps) {
const [name, setName] = useState(profile.name);
const [industry, setIndustry] = useState(profile.industry);
const [stage, setStage] = useState(profile.stage);
@@ -285,7 +287,7 @@ function CompanyBasicsSection({ profile, saving, onSave, pending }: SectionCompo
return (
<Section
- title="Company Basics"
+ title={copy.basicsTitle}
editing={editing}
onEditingChange={setEditing}
saving={saving}
@@ -319,7 +321,7 @@ function CompanyBasicsSection({ profile, saving, onSave, pending }: SectionCompo
);
}
-function MissionSection({ profile, saving, onSave, pending }: SectionComponentProps) {
+function MissionSection({ profile, saving, onSave, pending, copy }: SectionComponentProps) {
const [mission, setMission] = useState(profile.mission);
const [vision, setVision] = useState(profile.vision);
useEffect(() => { setMission(profile.mission); setVision(profile.vision); }, [profile]);
@@ -344,7 +346,7 @@ function MissionSection({ profile, saving, onSave, pending }: SectionComponentPr
}
editContent={
<div className="space-y-3">
- <div><FieldLabel>Mission</FieldLabel><Textarea value={mission} onChange={setMission} rows={2} placeholder="Why does this company exist?" /></div>
+ <div><FieldLabel>Mission</FieldLabel><Textarea value={mission} onChange={setMission} rows={2} placeholder={copy.missionPlaceholder} /></div>
<div><FieldLabel>Vision</FieldLabel><Textarea value={vision} onChange={setVision} rows={2} placeholder="Where are you in 5 years?" /></div>
</div>
}
@@ -424,7 +426,7 @@ function CompetitiveSection({ profile, saving, onSave, pending }: SectionCompone
);
}
-function ExternalDependenciesSection({ profile, saving, onSave, pending }: SectionComponentProps) {
+function ExternalDependenciesSection({ profile, saving, onSave, pending, copy }: SectionComponentProps) {
const [vendors, setVendors] = useState(listToText(profile.vendors ?? []));
const [tickers, setTickers] = useState(listToText(profile.tickers ?? []));
useEffect(() => {
@@ -446,11 +448,7 @@ function ExternalDependenciesSection({ profile, saving, onSave, pending }: Secti
onSave={() => onSave({ vendors: textToList(vendors), tickers: textToList(tickers) })}
viewContent={
<div className="space-y-4">
- <p className="text-xs text-fg-subtle">
- Named here, a vendor or ticker counts as company data: the Executive
- will start watching its status page or filings on its own instead of
- asking you first.
- </p>
+ <p className="text-xs text-fg-subtle">{copy.dependenciesNote}</p>
<div><FieldLabel>Vendors &amp; dependencies</FieldLabel><Pills items={profile.vendors ?? []} /></div>
<div><FieldLabel>Tracked tickers</FieldLabel><Pills items={profile.tickers ?? []} /></div>
</div>
@@ -537,7 +535,7 @@ function CultureSection({ profile, saving, onSave, pending }: SectionComponentPr
);
}
-function OrgSection({ profile, saving, onSave, pending }: SectionComponentProps) {
+function OrgSection({ profile, saving, onSave, pending, copy }: SectionComponentProps) {
const [departments, setDepartments] = useState(listToText(profile.org_structure.departments));
const [leadership, setLeadership] = useState(listToText(profile.org_structure.leadership_team));
useEffect(() => {
@@ -559,13 +557,13 @@ function OrgSection({ profile, saving, onSave, pending }: SectionComponentProps)
onSave={() => onSave({ org_structure: { departments: textToList(departments), leadership_team: textToList(leadership) } })}
viewContent={
<div className="space-y-4">
- <div><FieldLabel>Departments</FieldLabel><Pills items={profile.org_structure.departments} /></div>
+ <div><FieldLabel>{copy.departmentsLabel}</FieldLabel><Pills items={profile.org_structure.departments} /></div>
<div><FieldLabel>Leadership Team</FieldLabel><Pills items={profile.org_structure.leadership_team} /></div>
</div>
}
editContent={
<div className="space-y-3">
- <div><FieldLabel>Departments (one per line)</FieldLabel><Textarea value={departments} onChange={setDepartments} rows={3} placeholder={"Engineering\nProduct\nGTM"} /></div>
+ <div><FieldLabel>{copy.departmentsLabel} (one per line)</FieldLabel><Textarea value={departments} onChange={setDepartments} rows={3} placeholder={"Engineering\nProduct\nGTM"} /></div>
<div><FieldLabel>Leadership Team (one per line)</FieldLabel><Textarea value={leadership} onChange={setLeadership} rows={3} placeholder={"Alice Chen, CEO\nBob Smith, CTO"} /></div>
</div>
}
@@ -622,6 +620,7 @@ interface SectionComponentProps {
// Ask OE suggested values (flat keys) — sections merge their own keys
// into draft state and flip into edit mode when one lands.
pending: PendingValues | null;
+ copy: ProfileCopy;
}
// ── composed section list ────────────────────────────────────────────────────
@@ -663,6 +662,9 @@ export interface ProfileSectionsProps {
* derived from its people and department tables at commit time — rendering
* it here too would give the user two places to edit the same thing. */
omit?: SectionId[];
+ /** What the profile is called: "company" (team, the default), or in solo
+ * "business" (an owner) or "work" (anyone else). Copy only. */
+ wording?: ProfileWording;
}
export function ProfileSections({
@@ -671,12 +673,21 @@ export function ProfileSections({
onSave,
pending = null,
omit = [],
+ wording = "company",
}: ProfileSectionsProps) {
const hidden = new Set(omit);
+ const copy = PROFILE_COPY[wording];
return (
<div className="flex flex-col gap-4">
{SECTION_ORDER.filter(({ id }) => !hidden.has(id)).map(({ id, Component }) => (
- <Component key={id} profile={profile} saving={saving} onSave={onSave} pending={pending} />
+ <Component
+ key={id}
+ profile={profile}
+ saving={saving}
+ onSave={onSave}
+ pending={pending}
+ copy={copy}
+ />
))}
</div>
);
diff --git a/packages/ui/src/components/company-profile/profileCopy.ts b/packages/ui/src/components/company-profile/profileCopy.ts
new file mode 100644
index 00000000..961f32b9
--- /dev/null
+++ b/packages/ui/src/components/company-profile/profileCopy.ts
@@ -0,0 +1,65 @@
+// The words the profile uses for itself, by what it is (`profileWording` in
+// components/shell/navConfig.ts): a team's company, a solo owner's business,
+// or, for anyone else using Open Executive just for themselves, their work.
+// Copy only: every field keeps its name and meaning in all three.
+
+import type { ProfileWording } from "@/components/shell/navConfig";
+
+export interface ProfileCopy {
+ /** The profile page when none exists yet. */
+ missing: string;
+ /** The chat home's banner when none exists yet. */
+ missingBanner: string;
+ /** A line under the page heading; null leaves the team page as it was. */
+ intro: string | null;
+ /** Points at Settings → Workspace, where the role lives; null in team. */
+ roleNote: string | null;
+ /** The step-by-step form's progress label. */
+ progress: string;
+ basicsTitle: string;
+ missionPlaceholder: string;
+ dependenciesNote: string;
+ /** `org_structure.departments`: in solo a department is an area. */
+ departmentsLabel: string;
+}
+
+const DEPENDENCIES_NOTE = (what: string) =>
+ `Named here, a vendor or ticker counts as ${what}: the Executive will start watching its status page or filings on its own instead of asking you first.`;
+
+export const PROFILE_COPY: Record<ProfileWording, ProfileCopy> = {
+ company: {
+ missing: "No company profile set up yet.",
+ missingBanner: "No company profile — responses will be generic.",
+ intro: null,
+ roleNote: null,
+ progress: "Setting up your company profile",
+ basicsTitle: "Company Basics",
+ missionPlaceholder: "Why does this company exist?",
+ dependenciesNote: DEPENDENCIES_NOTE("company data"),
+ departmentsLabel: "Departments",
+ },
+ business: {
+ missing: "No business profile set up yet.",
+ missingBanner: "No business profile — responses will be generic.",
+ intro:
+ "The Executive bases its advice on your business: what you offer, who you serve and what matters most right now.",
+ roleNote: "Your title and role are in",
+ progress: "Setting up your business profile",
+ basicsTitle: "Business Basics",
+ missionPlaceholder: "Why does this business exist?",
+ dependenciesNote: DEPENDENCIES_NOTE("business data"),
+ departmentsLabel: "Areas",
+ },
+ work: {
+ missing: "Your work isn't set up yet.",
+ missingBanner: "Your work isn't set up yet — responses will be generic.",
+ intro:
+ "The Executive bases its advice on your work: the organisation you work in, who it serves and what matters most right now.",
+ roleNote: "Your title, who you report to and what you're responsible for are in",
+ progress: "Setting up your work",
+ basicsTitle: "Where You Work",
+ missionPlaceholder: "Why does your organisation exist?",
+ dependenciesNote: DEPENDENCIES_NOTE("part of your work"),
+ departmentsLabel: "Areas",
+ },
+};
diff --git a/packages/ui/src/components/onboard/OnboardDraftReview.tsx b/packages/ui/src/components/onboard/OnboardDraftReview.tsx
index 4feb4b5c..ba19f201 100644
--- a/packages/ui/src/components/onboard/OnboardDraftReview.tsx
+++ b/packages/ui/src/components/onboard/OnboardDraftReview.tsx
@@ -5,6 +5,7 @@ import { useSession } from "next-auth/react";
import { ProfileSections } from "@/components/company-profile/ProfileSections";
import OnboardDepartmentsDraft from "@/components/onboard/OnboardDepartmentsDraft";
import OnboardPeopleDraft from "@/components/onboard/OnboardPeopleDraft";
+import { profileWording } from "@/components/shell/navConfig";
import { useWorkspace } from "@/components/workspace/WorkspaceContext";
import {
commitOnboardDraft,
@@ -39,6 +40,8 @@ export default function OnboardDraftReview({
// and no departments; the existing areas stay as they are.
const { mode, role: workspaceRole } = useWorkspace();
const solo = mode === "solo";
+ // The profile's headings follow the role, as on /company-profile.
+ const wording = profileWording(mode, workspaceRole.role_kind);
const [me, setMe] = useState<OnboardPersonDraft>(() => {
const drafted = turn.draft_people.find((p) => p.is_principal) ?? turn.draft_people[0];
// The title from the role step, when the draft has none.
@@ -165,6 +168,7 @@ export default function OnboardDraftReview({
saving={false}
onSave={mergeIntoDraft}
omit={["org"]}
+ wording={wording}
/>
{solo ? (
@@ -225,7 +229,7 @@ export default function OnboardDraftReview({
</label>
<p className="text-xs text-fg-muted mt-1 mb-3">
{solo ? (
- "Links you to this login, so your chats and owner rights work straight away."
+ "Links you to this login, so your chats and full access work straight away."
) : (
<>
Links the person marked &ldquo;This is me&rdquo; to this login, so your chats and
diff --git a/packages/ui/src/components/settings/WorkspaceCard.tsx b/packages/ui/src/components/settings/WorkspaceCard.tsx
index 790961db..173e14db 100644
--- a/packages/ui/src/components/settings/WorkspaceCard.tsx
+++ b/packages/ui/src/components/settings/WorkspaceCard.tsx
@@ -243,8 +243,8 @@ function RoleSection() {
<div>
<div className="text-xs font-medium text-fg">Your role</div>
<p className="text-xs text-fg-muted mt-0.5 mb-2 leading-relaxed">
- So the Executive&apos;s advice fits your job — whether it&apos;s your own business or you
- lead a function inside someone else&apos;s.
+ So the Executive&apos;s advice fits your job, whatever your role: your own business, a
+ team you lead, or clients you advise.
</p>
<RoleFields
value={form}
diff --git a/packages/ui/src/components/shell/AppShell.tsx b/packages/ui/src/components/shell/AppShell.tsx
index 56e17c8e..6c39110a 100644
--- a/packages/ui/src/components/shell/AppShell.tsx
+++ b/packages/ui/src/components/shell/AppShell.tsx
@@ -9,7 +9,12 @@ import AskOEPanel from "@/components/askoe/AskOEPanel";
import Icon from "@/components/Icon";
import PausedBanner from "@/components/executive/PausedBanner";
import AppSidebar from "@/components/shell/AppSidebar";
-import { buildMobilePrimary, isNavActive } from "@/components/shell/navConfig";
+import {
+ buildMobilePrimary,
+ isNavActive,
+ PROFILE_NAV,
+ profileWording,
+} from "@/components/shell/navConfig";
import { useWorkspace } from "@/components/workspace/WorkspaceContext";
// Routes that own their full layout and should not be wrapped by the
@@ -21,6 +26,8 @@ const EXEMPT_EXACT = new Set(["/"]);
// Human-readable labels for path segments shown in the breadcrumb.
// Dynamic segments (slugs / ids) are rendered raw and truncated by CSS.
+// `company-profile` is the team label; TopBar names it for the mode and
+// role, as the sidebar does.
const SEGMENT_LABELS: Record<string, string> = {
today: "Today",
review: "Review",
@@ -122,6 +129,8 @@ function TopBar({
segments: string[];
onOpenDrawer: () => void;
}) {
+ const { mode, role } = useWorkspace();
+ const profileLabel = PROFILE_NAV[profileWording(mode, role.role_kind)].label;
// Breadcrumb chain. Only the top-level section (segment[0]) is a real
// route in this app — intermediate segments like `runs` in
// `/jobs/runs/<id>` or `session` in `/audit/session/<id>` are not
@@ -131,7 +140,10 @@ function TopBar({
const crumbs = segments.map((segment, idx) => {
const linkable = idx === 0;
const href = linkable ? "/" + segment : null;
- return { href, label: labelFor(segment) };
+ return {
+ href,
+ label: idx === 0 && segment === "company-profile" ? profileLabel : labelFor(segment),
+ };
});
return (
diff --git a/packages/ui/src/components/shell/AppSidebar.tsx b/packages/ui/src/components/shell/AppSidebar.tsx
index 5a67b795..26958c35 100644
--- a/packages/ui/src/components/shell/AppSidebar.tsx
+++ b/packages/ui/src/components/shell/AppSidebar.tsx
@@ -69,7 +69,7 @@ export default function AppSidebar({
home,
}: AppSidebarProps) {
const { sessions } = useSessions();
- const { mode } = useWorkspace();
+ const { mode, role } = useWorkspace();
const [reviewBadge, setReviewBadge] = useState(0);
// Knowledge base badge: items waiting in its review queue. Refetched on
@@ -81,7 +81,7 @@ export default function AppSidebar({
.catch(() => {});
}, [pathname]);
- const groups = buildPrimaryNav({ isOnboarded, reviewBadge, mode });
+ const groups = buildPrimaryNav({ isOnboarded, reviewBadge, mode, roleKind: role.role_kind });
const recent = recentWebChats(sessions, RECENT_LIMIT);
const briefingActive = home ? home.mode === "briefing" : isNavActive("/", pathname);
diff --git a/packages/ui/src/components/shell/navConfig.ts b/packages/ui/src/components/shell/navConfig.ts
index 1ecdd6c2..138a03ec 100644
--- a/packages/ui/src/components/shell/navConfig.ts
+++ b/packages/ui/src/components/shell/navConfig.ts
@@ -1,7 +1,7 @@
// Type-only imports, so `npm test` can load this file under
// `node --experimental-strip-types` (see scripts/navConfig.test.mjs).
import type { IconName } from "@/components/Icon";
-import type { WorkspaceMode } from "@/lib/api";
+import type { RoleKind, WorkspaceMode } from "@/lib/api";
// Single source of truth for the app's navigation. The one sidebar
// (`components/shell/AppSidebar.tsx`, rendered by both the chat home and
@@ -41,9 +41,65 @@ interface BuildOpts {
/**
* "solo" (one person using Open Executive just for themselves) swaps the
* Company group — Departments, People, Company profile — for "You":
- * Goals, People and Business profile. Defaults to "team".
+ * Goals, People and the profile, named for `roleKind` (see
+ * `profileWording`). Defaults to "team".
*/
mode?: WorkspaceMode;
+ /**
+ * The principal's role kind from the workspace settings. Only solo reads
+ * it; null when unset or hidden (GET /workspace returns no role to anyone
+ * but the principal).
+ */
+ roleKind?: RoleKind | null;
+}
+
+// What the profile at /company-profile is called. A team's is its company.
+// In solo it follows the principal's role: an owner's is their business;
+// anyone else's is their work — the organisation they work in, who it
+// serves and their priorities. An unset role, or one the caller can't see,
+// reads as "work", so nobody is told they run a business they don't.
+// The profile page, its breadcrumb and onboarding use the same rule.
+export type ProfileWording = "company" | "business" | "work";
+
+export function profileWording(
+ mode: WorkspaceMode = "team",
+ roleKind: RoleKind | null = null,
+): ProfileWording {
+ if (mode !== "solo") return "company";
+ return roleKind === "owner" ? "business" : "work";
+}
+
+// The profile's nav entry: its label once set up, before setup (it then
+// points at /onboard), and the tooltip / Settings-card description.
+export const PROFILE_NAV: Record<
+ ProfileWording,
+ { label: string; setupLabel: string; description: string }
+> = {
+ company: {
+ label: "Company profile",
+ setupLabel: "Set up company",
+ description: "Your company's identity and strategy — set up once, edited any time.",
+ },
+ business: {
+ label: "Business profile",
+ setupLabel: "Set up your business",
+ description: "Your business — what you offer, who you serve, your priorities.",
+ },
+ work: {
+ label: "Your work",
+ setupLabel: "Set up your work",
+ description: "Your work — the organisation you work in, who it serves, your priorities.",
+ },
+};
+
+function profileItem(wording: ProfileWording, isOnboarded: boolean): NavItem {
+ const copy = PROFILE_NAV[wording];
+ return {
+ href: isOnboarded ? "/company-profile" : "/onboard",
+ label: isOnboarded ? copy.label : copy.setupLabel,
+ icon: "building",
+ description: copy.description,
+ };
}
const PEOPLE_DESCRIPTION =
@@ -73,19 +129,14 @@ function companyGroup(isOnboarded: boolean): NavGroup {
icon: "users",
description: PEOPLE_DESCRIPTION,
},
- {
- href: isOnboarded ? "/company-profile" : "/onboard",
- label: isOnboarded ? "Company profile" : "Set up company",
- icon: "building",
- description: "Your company's identity and strategy — set up once, edited any time.",
- },
+ profileItem("company", isOnboarded),
],
};
}
// Solo: the same destinations minus Departments (their goals live on /goals,
// grouped by area), with the copy speaking to one person.
-function youGroup(isOnboarded: boolean): NavGroup {
+function youGroup(isOnboarded: boolean, roleKind: RoleKind | null): NavGroup {
return {
key: "you",
label: "You",
@@ -97,12 +148,7 @@ function youGroup(isOnboarded: boolean): NavGroup {
icon: "users",
description: "The people the Executive knows about — clients, partners, anyone you work with.",
},
- {
- href: isOnboarded ? "/company-profile" : "/onboard",
- label: isOnboarded ? "Business profile" : "Set up your business",
- icon: "building",
- description: "Your business — what you offer, who you serve, your priorities.",
- },
+ profileItem(profileWording("solo", roleKind), isOnboarded),
],
};
}
@@ -113,6 +159,7 @@ export function buildPrimaryNav({
isOnboarded = true,
reviewBadge = 0,
mode = "team",
+ roleKind = null,
}: BuildOpts = {}): NavGroup[] {
return [
{
@@ -140,7 +187,7 @@ export function buildPrimaryNav({
},
],
},
- mode === "solo" ? youGroup(isOnboarded) : companyGroup(isOnboarded),
+ mode === "solo" ? youGroup(isOnboarded, roleKind) : companyGroup(isOnboarded),
{
key: "knowledge",
label: "Knowledge",