Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

feat(docs): in-app docs system — authoring pipeline, overview/search UI, public-docs CI check

Ruben Lütke443e37f8a74c
diff --git a/docs/authoring/PUBLIC-DOCS-STYLE.md b/docs/authoring/PUBLIC-DOCS-STYLE.md
new file mode 100644
index 0000000000..68c4298f4d
--- /dev/null
+++ b/docs/authoring/PUBLIC-DOCS-STYLE.md
@@ -0,0 +1,290 @@
+---
+title: "Public Docs Authoring Standard"
+slug: public-docs-authoring-standard
+summary: "Write clear, accurate, accessible, and privacy-safe product documentation."
+section: "Authoring"
+section_order: 90
+order: 1
+diataxis: reference
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: developer
+tags: [docs, writing, accessibility, privacy]
+---
+
+This is the binding writing standard for reader-facing pages in
+`docs/product/`. It is inspired by the progressive, task-focused structure of
+the [Claude Platform documentation](https://platform.claude.com/docs/en/home),
+but it uses Personal Jarvis terminology, behavior, and renderer capabilities.
+
+The reader should understand what a feature does, why it matters, how to use
+it, how it connects to the rest of Jarvis, and what to do when it does not
+work. Technical accuracy stays intact; unnecessary implementation detail does
+not.
+
+## Reader promise
+
+Write for a capable person who uses software but may not write code. A reader
+must never need repository history, an architecture document, or an acronym
+list to understand the page.
+
+- Lead with the outcome the reader can achieve.
+- Explain a term where it first appears, in the same sentence.
+- Show the shortest safe path before options and edge cases.
+- Describe what the reader sees in the app after each important action.
+- Keep provider, operating-system, and machine assumptions out of the main
+ path.
+- Preserve meaningful technical depth in short, clearly labeled sections.
+
+## Frontmatter contract
+
+Every page must start with the existing Jarvis frontmatter plus the four
+navigation fields proposed below. Until all index consumers support the new
+fields, they remain additive metadata and must not replace `diataxis`, `tags`,
+or `related`.
+
+```yaml
+---
+title: "Use voice with Jarvis"
+slug: use-voice
+summary: "Talk to Jarvis, choose a voice, and fix common microphone issues."
+section: "Use Jarvis"
+section_order: 3
+order: 2
+diataxis: howto
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [voice, microphone]
+related: [first-run, choose-a-brain-provider]
+---
+```
+
+| Field | Rule |
+|---|---|
+| `summary` | One plain-English sentence, 80-160 characters. State the reader outcome, not an internal mechanism. |
+| `section` | Stable, human-readable navigation group. Reuse an existing section before creating one. |
+| `section_order` | Positive integer that orders navigation groups. Pages in the same section use the same value. |
+| `order` | Positive integer that orders pages within a section. Do not use file names to imply order. |
+
+Keep titles under 50 characters when possible. Slugs are lowercase kebab-case
+and must not change after publication. Use `owner: maintainers`; never put a
+person's name in public frontmatter. Update `last_reviewed` after checking the
+page against the current product.
+
+## Required page anatomy
+
+The app renders the frontmatter title as the page heading, so do not add a
+second H1 in the body. Use this sequence unless the page type makes a section
+irrelevant:
+
+1. **Opening:** one or two short paragraphs that say what the feature does,
+ who it helps, and the result the reader can expect.
+2. **Before You Start:** only real prerequisites, permissions, or costs. Omit
+ the section when there are none.
+3. **Use the Feature:** numbered, outcome-oriented steps. Begin each step with
+ an action and end with the visible result.
+4. **How It Fits Together:** the required relationship section described
+ below.
+5. **Check That It Works:** one fast, observable verification path.
+6. **Troubleshooting:** the most likely symptoms and safe fixes.
+7. **Next Steps:** two to four relevant internal links with a reason to follow
+ each one.
+
+Reference and explanation pages may replace **Use the Feature** with a more
+accurate H2, such as **Choose an Option** or **How It Works**. They still need
+**How It Fits Together**, **Check That It Works**, **Troubleshooting**, and
+**Next Steps**.
+
+## How It Fits Together
+
+Every product page must contain an H2 named exactly `How It Fits Together`.
+Explain relationships from the reader's point of view, not as a module list.
+
+Cover the relevant parts of this flow:
+
+1. What starts the feature: a click, spoken request, scheduled action, or
+ incoming message.
+2. What Jarvis does next in plain language.
+3. Which adjacent feature supplies input or receives the result.
+4. Where permissions, safety confirmation, or a connected service applies.
+5. What happens when a preferred provider or local capability is unavailable.
+6. Which linked page explains the adjacent feature in more detail.
+
+Use a short numbered flow, a small table, or a labeled image. Do not present
+internal class names as the explanation. If a technical name is necessary,
+state the everyday meaning first and put the identifier in parentheses or
+inline code.
+
+## Plain-English rules
+
+- Write in English, second person, active voice, and present tense.
+- Prefer familiar verbs: **choose**, **open**, **connect**, **review**, and
+ **try again**.
+- Use one idea per paragraph. Keep paragraphs to one to three sentences and
+ normally below 60 words.
+- Keep H2 sections focused. Split a section that exceeds roughly 350 words.
+- Use H2 and H3 headings only. Avoid H4-H6 and headings that contain only one
+ sentence of content.
+- Define jargon on first use: "a provider - the service that answers your
+ request." Do not send readers to a glossary for the first explanation.
+- Expand acronyms on first use. Avoid acronyms that appear only once.
+- Use `Jarvis-Agents` and `Jarvis-Agent`; do not revive historical internal
+ names.
+- Address limitations directly. Do not use marketing claims such as
+ "seamless," "magic," or "always works."
+- Distinguish what Jarvis does automatically from what the reader must do.
+- Keep implementation history, phase names, test architecture, and design
+ debates out of product pages unless they change the reader's decision.
+
+## Steps, examples, and code
+
+Use numbered lists for actions in sequence and bullets for choices or facts.
+Do not hide a required action in prose.
+
+Most pages should contain zero to three code blocks. A code block must:
+
+- solve one immediate task;
+- be preceded by one sentence that explains why to run it;
+- be followed by the expected result or the next action;
+- include a language label such as `powershell`, `bash`, `json`, or `text`;
+- stay below 20 lines when possible and never exceed 25 lines;
+- exclude unrelated setup, generated output, stack traces, and repeated
+ alternatives.
+
+Prefer the app or `jarvis` CLI for user actions. Do not teach readers to edit
+`jarvis.toml`, export credentials, or call private REST routes when the product
+provides an in-app path. Put long schemas, complete command catalogs, and
+implementation samples in a linked reference page instead of a task page.
+
+## Callouts
+
+The renderer supports these GitHub-style callouts:
+
+```markdown
+> [!tip] Use this for a helpful shortcut.
+
+> [!info] Use this for context that changes a choice.
+
+> [!warning] Use this before an action that can cost money, expose data, or
+> require confirmation.
+
+> [!note] Use this for a small but relevant detail.
+```
+
+Use no more than two callouts in a normal page. Keep each to one idea and no
+more than one short paragraph. A required step or safety instruction must also
+appear in the main flow; readers must not have to infer importance from color.
+
+## Tables and visuals
+
+Use a table only when the reader is comparing options, states, or exact
+mappings. Keep it to five columns and about ten rows; split larger material
+into a reference page. Every column needs a descriptive header, and each cell
+should be a phrase rather than a paragraph.
+
+Prefer a short numbered flow over a decorative diagram. When an image
+materially improves understanding:
+
+- store it beside the page in a clearly named asset folder;
+- use the desktop asset route
+ `/api/docs/asset/<page-slug>/<relative-file>`;
+- write alt text that communicates the same purpose as the image;
+- crop out unrelated windows, notifications, account details, and values;
+- keep labels readable at the app's normal content width;
+- explain the important takeaway in nearby text.
+
+Do not use raw HTML, MDX components, Mermaid, embedded scripts, or
+color-dependent diagrams. The current ReactMarkdown renderer supports
+GitHub-Flavored Markdown, heading anchors, links, tables, fenced code, images,
+and the callouts listed above.
+
+## Verification and troubleshooting
+
+`Check That It Works` must tell the reader what success looks like in the
+product. Use one representative action and one observable result. Do not use
+an internal test suite as the public verification method.
+
+`Troubleshooting` should cover two to five likely problems. Use this pattern:
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| A clear, reader-visible symptom | A plain-language cause | The safest first fix, then a link for deeper help |
+
+Never promise that a restart, reinstall, or credential replacement will fix
+every case. Say when the reader should check permissions, service status, a
+different provider family, or the dedicated troubleshooting page. Error text
+must match the current product when quoted.
+
+`Next Steps` must link to two to four pages that continue the reader's journey.
+Do not write a bare link list. Add a short reason, for example: "Read
+[Computer Use](computer-use) to let Jarvis work with desktop apps."
+
+## Accessibility
+
+- Use descriptive link text; never "click here" or a raw URL as the label.
+- Give every meaningful image useful alt text. Use empty alt text only for a
+ truly decorative image.
+- Do not encode meaning only through color, position, or an icon.
+- Keep headings in order: H2, then H3. Do not skip levels.
+- Write complete instructions for keyboard and screen-reader users; do not
+ assume mouse input.
+- Describe buttons and fields by their visible labels, with the view name when
+ needed.
+- Avoid directional instructions such as "the box on the right" unless a
+ stable label is also included.
+- Keep table headers concise and make lists grammatically parallel.
+
+## Privacy and credential safety
+
+Public documentation is treated as publishable source. It must contain none of
+the following, even in screenshots, logs, sample output, comments, metadata,
+or frontmatter:
+
+- real or secret-shaped API keys, tokens, passwords, cookies, authorization
+ headers, private keys, or recovery codes;
+- personal names, email addresses, phone numbers, account names, internal
+ project identifiers, machine identifiers, Windows security identifiers, or
+ hostnames;
+- personal paths such as `C:\Users\<person>\...`, local vault contents,
+ conversation text, contact data, or private repository URLs.
+
+Do not invent key-shaped sample values. When a credential is required, say:
+"Open **Settings > API Keys**, choose your provider, and enter the credential
+in the app." Never instruct readers to paste a secret into chat, voice input,
+`jarvis.toml`, a command, or a screenshot.
+
+Use neutral paths such as `<project-folder>` only when a path is necessary.
+Use reserved example domains such as `example.com` and clearly fictional,
+non-secret identifiers. Before publishing, inspect rendered images and copied
+command output as carefully as the Markdown source.
+
+## Accuracy and review checklist
+
+An author must verify the current UI, implementation, and supported command
+before describing them. Do not infer behavior from an old plan or a function
+name.
+
+- [ ] The opening states a concrete reader outcome.
+- [ ] First-use jargon is explained without reducing technical accuracy.
+- [ ] Steps match current labels and produce the stated visible result.
+- [ ] `How It Fits Together` explains adjacent features and failure behavior.
+- [ ] `Check That It Works`, `Troubleshooting`, and `Next Steps` are present.
+- [ ] Internal links resolve by stable slug; external links are necessary and
+ authoritative.
+- [ ] Code blocks are short, runnable where applicable, and free of secrets.
+- [ ] The page does not assume one provider, one operating system, or one
+ maintainer machine.
+- [ ] Images, tables, callouts, and headings remain understandable without
+ color or mouse input.
+- [ ] Source and rendered output contain no secrets or personal information.
+- [ ] Frontmatter is complete, ordering values do not collide, and
+ `last_reviewed` is current.
+
+If any item cannot be verified, keep the page in `draft` status and state the
+known limitation plainly. Never fill a gap with a plausible but unconfirmed
+instruction.
diff --git a/docs/authoring/public-docs-manifest.yaml b/docs/authoring/public-docs-manifest.yaml
new file mode 100644
index 0000000000..5025dc1ae7
--- /dev/null
+++ b/docs/authoring/public-docs-manifest.yaml
@@ -0,0 +1,916 @@
+version: 1
+language: en
+content_root: docs/product
+page_count: 42
+navigation_principle: reader-journey
+authoring_contract:
+ audience: People using Personal Jarvis, including readers with no software background.
+ style: Lead with the outcome, explain one idea at a time, and prefer short examples and diagrams over large code blocks.
+ safety: Use placeholders for credentials, account identifiers, paths, phone numbers, and personal data. Never copy local secrets or PII into documentation.
+ connections: Every page must explain how its feature connects to the related features named in this manifest.
+generated_reference_policy:
+ policy: link-only
+ description: Generated references remain generated. Reader pages may introduce and link to them, but must not copy or hand-maintain their contents.
+ paths:
+ - docs/commands-reference.md
+ - docs/jarvis-cli-reference.md
+
+pages:
+ - section: Start here
+ section_order: 1
+ order: 1
+ slug: welcome-to-personal-jarvis
+ file: docs/product/start-here/welcome-to-personal-jarvis.md
+ title: Welcome to Personal Jarvis
+ diataxis: explanation
+ summary: Understand what Personal Jarvis can do, what stays under your control, and where to begin.
+ authoritative_sources:
+ - README.md
+ - docs/PHILOSOPHY.md
+ - jarvis/ui/web/frontend/src/components/layout/Sidebar.tsx
+ - jarvis/ui/web/frontend/src/components/layout/MainView.tsx
+ related:
+ - install-personal-jarvis
+ - desktop-app-tour
+ - start-your-first-chat
+ reader_level: beginner
+ maturity: stable
+
+ - section: Start here
+ section_order: 1
+ order: 2
+ slug: install-personal-jarvis
+ file: docs/product/start-here/install-personal-jarvis.md
+ title: Install Personal Jarvis
+ diataxis: howto
+ summary: Install the app on a supported computer, then confirm that Personal Jarvis starts correctly.
+ authoritative_sources:
+ - install/README.md
+ - install/install.ps1
+ - install/install.sh
+ - install/installer.py
+ - pyproject.toml
+ related:
+ - first-run-setup
+ - platform-support
+ - troubleshooting
+ reader_level: beginner
+ maturity: stable
+
+ - section: Start here
+ section_order: 1
+ order: 3
+ slug: first-run-setup
+ file: docs/product/start-here/first-run-setup.md
+ title: Complete First-Run Setup
+ diataxis: tutorial
+ summary: Walk through language, permissions, microphone, wake word, and provider setup without exposing credentials.
+ authoritative_sources:
+ - jarvis/ui/web/frontend/src/components/onboarding/OnboardingFlow.tsx
+ - jarvis/ui/web/frontend/src/components/onboarding/steps/ApiKeysStep.tsx
+ - jarvis/ui/web/frontend/src/components/onboarding/steps/MicTestStep.tsx
+ - jarvis/ui/web/frontend/src/components/onboarding/steps/PermissionsStep.tsx
+ - jarvis/ui/web/onboarding_routes.py
+ related:
+ - providers-and-api-keys
+ - audio-and-wake-word
+ - permissions
+ - start-your-first-chat
+ reader_level: beginner
+ maturity: stable
+
+ - section: Start here
+ section_order: 1
+ order: 4
+ slug: desktop-app-tour
+ file: docs/product/start-here/desktop-app-tour.md
+ title: Tour the Desktop App
+ diataxis: explanation
+ summary: Learn where conversations, agents, tools, history, settings, and help live in the desktop app.
+ authoritative_sources:
+ - jarvis/ui/web/frontend/src/App.tsx
+ - jarvis/ui/web/frontend/src/components/layout/Sidebar.tsx
+ - jarvis/ui/web/frontend/src/components/layout/MainView.tsx
+ - jarvis/ui/web/frontend/src/i18n/locales/en.json
+ related:
+ - start-your-first-chat
+ - chats
+ - find-help-in-the-app
+ reader_level: beginner
+ maturity: stable
+
+ - section: Start here
+ section_order: 1
+ order: 5
+ slug: start-your-first-chat
+ file: docs/product/start-here/start-your-first-chat.md
+ title: Start Your First Chat
+ diataxis: tutorial
+ summary: Send a first message, attach useful context, and understand how the conversation is saved.
+ authoritative_sources:
+ - jarvis/ui/web/frontend/src/views/ChatsView.tsx
+ - jarvis/ui/web/chats_routes.py
+ - jarvis/state/chat_store.py
+ - jarvis/ui/web/frontend/src/lib/chatsApi.ts
+ related:
+ - chats
+ - start-your-first-voice-conversation
+ - sessions-and-run-inspector
+ reader_level: beginner
+ maturity: stable
+
+ - section: Start here
+ section_order: 1
+ order: 6
+ slug: start-your-first-voice-conversation
+ file: docs/product/start-here/start-your-first-voice-conversation.md
+ title: Start Your First Voice Conversation
+ diataxis: tutorial
+ summary: Check the microphone, wake Jarvis, ask a question, and know when the app is listening or speaking.
+ authoritative_sources:
+ - jarvis/speech/pipeline.py
+ - jarvis/realtime/session.py
+ - jarvis/ui/web/voice_runtime.py
+ - jarvis/ui/web/frontend/src/components/VoiceIndicator.tsx
+ related:
+ - voice-conversations
+ - audio-and-wake-word
+ - languages-and-voices
+ - permissions
+ reader_level: beginner
+ maturity: stable
+
+ - section: Everyday use
+ section_order: 2
+ order: 1
+ slug: chats
+ file: docs/product/everyday-use/chats.md
+ title: Chats
+ diataxis: howto
+ summary: Organize conversations, continue earlier work, add files, and understand how chats relate to sessions and outputs.
+ authoritative_sources:
+ - jarvis/ui/web/frontend/src/views/ChatsView.tsx
+ - jarvis/ui/web/chats_routes.py
+ - jarvis/channels/chat_bridge.py
+ - jarvis/state/chat_store.py
+ related:
+ - sessions-and-run-inspector
+ - outputs-and-files
+ - instructions-and-persona
+ reader_level: beginner
+ maturity: stable
+
+ - section: Everyday use
+ section_order: 2
+ order: 2
+ slug: voice-conversations
+ file: docs/product/everyday-use/voice-conversations.md
+ title: Voice Conversations
+ diataxis: explanation
+ summary: Learn how wake detection, speech recognition, the assistant, and text-to-speech form one voice turn.
+ authoritative_sources:
+ - jarvis/speech/pipeline.py
+ - jarvis/realtime/session.py
+ - jarvis/browser_voice/session.py
+ - jarvis/core/turn_language.py
+ - docs/realtime-voice/DESIGN.md
+ related:
+ - audio-and-wake-word
+ - languages-and-voices
+ - sessions-and-run-inspector
+ - speech-dictionary
+ reader_level: beginner
+ maturity: stable
+
+ - section: Everyday use
+ section_order: 2
+ order: 3
+ slug: tasks-and-reminders
+ file: docs/product/everyday-use/tasks-and-reminders.md
+ title: Tasks and Reminders
+ diataxis: howto
+ summary: Create, review, approve, and complete tasks, including scheduled and recurring work.
+ authoritative_sources:
+ - jarvis/ui/web/frontend/src/views/TasksView.tsx
+ - jarvis/ui/web/tasks_routes.py
+ - jarvis/tasks/store.py
+ - jarvis/tasks/scheduler.py
+ - jarvis/tasks/approval_bridge.py
+ related:
+ - jarvis-agents
+ - workflows-and-commands
+ - safety-and-approvals
+ reader_level: beginner
+ maturity: stable
+
+ - section: Everyday use
+ section_order: 2
+ order: 4
+ slug: sessions-and-run-inspector
+ file: docs/product/everyday-use/sessions-and-run-inspector.md
+ title: Sessions and Run Inspector
+ diataxis: explanation
+ summary: See the difference between conversation history and a detailed run trace, then use both to understand an answer.
+ authoritative_sources:
+ - jarvis/ui/web/frontend/src/views/SessionsView.tsx
+ - jarvis/ui/web/frontend/src/views/RunInspectorView.tsx
+ - jarvis/ui/web/sessions_routes.py
+ - jarvis/ui/web/diagnostics_routes.py
+ - jarvis/sessions/recorder.py
+ related:
+ - chats
+ - voice-conversations
+ - troubleshooting
+ - privacy-and-local-data
+ reader_level: intermediate
+ maturity: stable
+
+ - section: Everyday use
+ section_order: 2
+ order: 5
+ slug: outputs-and-files
+ file: docs/product/everyday-use/outputs-and-files.md
+ title: Outputs and Files
+ diataxis: howto
+ summary: Find generated files, preview them safely, open them in another app, and recover unfinished work when available.
+ authoritative_sources:
+ - jarvis/ui/web/frontend/src/views/OutputsView.tsx
+ - jarvis/ui/web/outputs_routes.py
+ - jarvis/ui/web/downloads_routes.py
+ - jarvis/ui/web/frontend/src/lib/fileActions.ts
+ related:
+ - chats
+ - jarvis-agents
+ - privacy-and-local-data
+ reader_level: beginner
+ maturity: stable
+
+ - section: Everyday use
+ section_order: 2
+ order: 6
+ slug: speech-dictionary
+ file: docs/product/everyday-use/speech-dictionary.md
+ title: Speech Dictionary
+ diataxis: howto
+ summary: Teach speech recognition names and specialist words it often mishears, then test the improvement.
+ authoritative_sources:
+ - jarvis/ui/web/frontend/src/views/DictionaryView.tsx
+ - jarvis/ui/web/dictionary_routes.py
+ - jarvis/speech/stt_dictionary.py
+ related:
+ - voice-conversations
+ - audio-and-wake-word
+ - languages-and-voices
+ reader_level: beginner
+ maturity: stable
+
+ - section: Everyday use
+ section_order: 2
+ order: 7
+ slug: profile-and-contacts
+ file: docs/product/everyday-use/profile-and-contacts.md
+ title: Profile and Contacts
+ diataxis: howto
+ summary: Keep your own preferences and the people you mention organized, and understand how both support more relevant conversations.
+ authoritative_sources:
+ - jarvis/ui/web/frontend/src/views/ProfileView.tsx
+ - jarvis/ui/web/frontend/src/views/contacts/ContactsView.tsx
+ - jarvis/ui/web/profile_routes.py
+ - jarvis/ui/web/contacts_routes.py
+ - jarvis/contacts/store.py
+ related:
+ - instructions-and-persona
+ - wiki-and-memory
+ - privacy-and-local-data
+ reader_level: beginner
+ maturity: stable
+
+ - section: Personalize and connect
+ section_order: 3
+ order: 1
+ slug: providers-and-api-keys
+ file: docs/product/personalize-and-connect/providers-and-api-keys.md
+ title: Providers and API Keys
+ diataxis: howto
+ summary: Connect the services you choose, see which capabilities they provide, and learn where fallback is available.
+ authoritative_sources:
+ - jarvis/ui/web/frontend/src/views/ApiKeysView.tsx
+ - jarvis/ui/web/provider_routes.py
+ - jarvis/brain/provider_registry.py
+ - jarvis/brain/resolver.py
+ - jarvis/core/config.py
+ related:
+ - credentials-and-secrets
+ - languages-and-voices
+ - troubleshooting
+ - tasks-and-reminders
+ reader_level: beginner
+ maturity: stable
+
+ - section: Personalize and connect
+ section_order: 3
+ order: 2
+ slug: audio-and-wake-word
+ file: docs/product/personalize-and-connect/audio-and-wake-word.md
+ title: Audio Devices and Wake Word
+ diataxis: howto
+ summary: Choose a microphone and speaker, set a wake phrase, and tune reliable hands-free listening.
+ authoritative_sources:
+ - jarvis/ui/web/frontend/src/views/settings/AudioDevicesGroup.tsx
+ - jarvis/ui/web/frontend/src/views/SettingsView.tsx
+ - jarvis/speech/wake_phrase.py
+ - jarvis/plugins/wake/openwakeword_provider.py
+ - docs/local-wakeword/USER-GUIDE-WAKE-WORD.md
+ related:
+ - voice-conversations
+ - speech-dictionary
+ - permissions
+ - troubleshooting
+ reader_level: beginner
+ maturity: stable
+
+ - section: Personalize and connect
+ section_order: 3
+ order: 3
+ slug: languages-and-voices
+ file: docs/product/personalize-and-connect/languages-and-voices.md
+ title: Languages and Voices
+ diataxis: howto
+ summary: Choose reply language, speech language, and speaking voice while keeping every layer of a conversation consistent.
+ authoritative_sources:
+ - jarvis/ui/web/frontend/src/views/settings/LanguagesGroup.tsx
+ - jarvis/ui/web/frontend/src/views/settings/RealtimeVoiceGroup.tsx
+ - jarvis/core/turn_language.py
+ - jarvis/plugins/tts/grok_voice_tts.py
+ - jarvis/realtime/factory.py
+ related:
+ - voice-conversations
+ - providers-and-api-keys
+ - audio-and-wake-word
+ reader_level: beginner
+ maturity: stable
+
+ - section: Personalize and connect
+ section_order: 3
+ order: 4
+ slug: settings-and-appearance
+ file: docs/product/personalize-and-connect/settings-and-appearance.md
+ title: Settings and Appearance
+ diataxis: howto
+ summary: Adjust startup, sound, keyboard shortcuts, the Jarvis Bar, overlays, and other everyday behavior.
+ authoritative_sources:
+ - jarvis/ui/web/frontend/src/views/SettingsView.tsx
+ - jarvis/ui/web/frontend/src/views/settings/AppSettingsGroup.tsx
+ - jarvis/ui/web/frontend/src/views/settings/OverlayTaskbarGroup.tsx
+ - jarvis/ui/web/frontend/src/views/settings/KeyboardMap.tsx
+ - jarvis/ui/web/settings_routes.py
+ related:
+ - desktop-app-tour
+ - audio-and-wake-word
+ - permissions
+ reader_level: beginner
+ maturity: stable
+
+ - section: Personalize and connect
+ section_order: 3
+ order: 5
+ slug: instructions-and-persona
+ file: docs/product/personalize-and-connect/instructions-and-persona.md
+ title: Instructions and Persona
+ diataxis: howto
+ summary: Shape how Jarvis responds without changing providers, memories, or safety rules.
+ authoritative_sources:
+ - jarvis/ui/web/frontend/src/views/AgentInstructionsView.tsx
+ - jarvis/brain/agent_instructions.py
+ - jarvis/brain/persona_loader.py
+ - jarvis/brain/JARVIS_PERSONA.md
+ - jarvis/ui/web/frontend/src/views/settings/SystemPromptGroup.tsx
+ related:
+ - chats
+ - profile-and-contacts
+ - safety-and-approvals
+ reader_level: intermediate
+ maturity: stable
+
+ - section: Personalize and connect
+ section_order: 3
+ order: 6
+ slug: phone-calls
+ file: docs/product/personalize-and-connect/phone-calls.md
+ title: Phone Calls
+ diataxis: howto
+ summary: Connect the optional telephony feature, understand inbound and outbound calls, and keep call credentials private.
+ authoritative_sources:
+ - docs/telephony.md
+ - jarvis/ui/web/frontend/src/views/TelephonyView.tsx
+ - jarvis/ui/web/telephony_routes.py
+ - jarvis/telephony/session.py
+ - jarvis/telephony/security.py
+ related:
+ - providers-and-api-keys
+ - credentials-and-secrets
+ - safety-and-approvals
+ reader_level: advanced
+ maturity: stable
+
+ - section: Knowledge and sharing
+ section_order: 4
+ order: 1
+ slug: wiki-and-memory
+ file: docs/product/knowledge-and-sharing/wiki-and-memory.md
+ title: Wiki and Memory
+ diataxis: explanation
+ summary: Understand what Jarvis can remember, how the Wiki connects ideas, and how memory supports chats, contacts, and agents.
+ authoritative_sources:
+ - jarvis/ui/web/frontend/src/views/WikiView.tsx
+ - jarvis/ui/web/wiki_routes.py
+ - jarvis/memory/wiki/integration.py
+ - jarvis/memory/wiki/curator.py
+ - docs/adr/0013-knowledge-wiki-architecture.md
+ related:
+ - profile-and-contacts
+ - connect-obsidian
+ - jarvis-agents
+ - privacy-and-local-data
+ reader_level: intermediate
+ maturity: stable
+
+ - section: Knowledge and sharing
+ section_order: 4
+ order: 2
+ slug: connect-obsidian
+ file: docs/product/knowledge-and-sharing/connect-obsidian.md
+ title: Connect an Obsidian Vault
+ diataxis: howto
+ summary: Use an existing Obsidian vault as a readable knowledge source while keeping file ownership and backups clear.
+ authoritative_sources:
+ - docs/obsidian-setup.md
+ - jarvis/ui/web/frontend/src/components/wiki/ObsidianSetupDialog.tsx
+ - jarvis/ui/web/frontend/src/components/wiki/ObsidianStatus.tsx
+ - jarvis/memory/wiki/vault_root.py
+ - jarvis/memory/wiki/watcher.py
+ related:
+ - wiki-and-memory
+ - privacy-and-local-data
+ - troubleshooting
+ reader_level: advanced
+ maturity: stable
+
+ - section: Knowledge and sharing
+ section_order: 4
+ order: 3
+ slug: jarvis-board
+ file: docs/product/knowledge-and-sharing/jarvis-board.md
+ title: Jarvis Board
+ diataxis: explanation
+ summary: Explore personal activity, achievements, and optional sharing, including what data leaves the device.
+ authoritative_sources:
+ - jarvis/ui/web/frontend/src/views/BoardView.tsx
+ - jarvis/ui/web/board_routes.py
+ - jarvis/board/aggregator.py
+ - jarvis/board/sync.py
+ - docs/jarvis-board/ARCHITECTURE.md
+ related:
+ - profile-and-contacts
+ - socials-and-feedback
+ - privacy-and-local-data
+ reader_level: intermediate
+ maturity: experimental
+
+ - section: Knowledge and sharing
+ section_order: 4
+ order: 4
+ slug: socials-and-feedback
+ file: docs/product/knowledge-and-sharing/socials-and-feedback.md
+ title: Social Links and Feedback
+ diataxis: howto
+ summary: Find official community links and share useful feedback without accidentally including private information.
+ authoritative_sources:
+ - jarvis/ui/web/frontend/src/views/socials/SocialsView.tsx
+ - jarvis/ui/web/frontend/src/views/feedback/FeedbackView.tsx
+ - jarvis/ui/web/socials_routes.py
+ - jarvis/ui/web/feedback_routes.py
+ related:
+ - profile-and-contacts
+ - jarvis-board
+ - privacy-and-local-data
+ reader_level: beginner
+ maturity: stable
+
+ - section: Knowledge and sharing
+ section_order: 4
+ order: 5
+ slug: find-help-in-the-app
+ file: docs/product/knowledge-and-sharing/find-help-in-the-app.md
+ title: Find Help in the App
+ diataxis: howto
+ summary: Search the built-in documentation, use related-page links, and move between overview, guides, troubleshooting, and reference material.
+ authoritative_sources:
+ - jarvis/ui/web/frontend/src/views/DocsView.tsx
+ - jarvis/ui/web/frontend/src/components/docs/DocsOverview.tsx
+ - jarvis/ui/web/frontend/src/components/docs/DocsSearchModal.tsx
+ - jarvis/ui/web/docs_routes.py
+ - jarvis/docs/registry.py
+ related:
+ - desktop-app-tour
+ - troubleshooting
+ - app-command-reference
+ reader_level: beginner
+ maturity: stable
+
+ - section: Extend and automate
+ section_order: 5
+ order: 1
+ slug: jarvis-agents
+ file: docs/product/extend-and-automate/jarvis-agents.md
+ title: Jarvis-Agents
+ diataxis: explanation
+ summary: Learn when Jarvis delegates longer work, how missions and workers fit together, and how to follow progress and results.
+ authoritative_sources:
+ - jarvis/ui/web/frontend/src/views/JarvisAgentsView.tsx
+ - jarvis/ui/web/missions_routes.py
+ - jarvis/missions/manager.py
+ - jarvis/missions/state_machine.py
+ - docs/jarvis-agents-bridge.md
+ related:
+ - tasks-and-reminders
+ - outputs-and-files
+ - skills
+ - safety-and-approvals
+ reader_level: intermediate
+ maturity: stable
+
+ - section: Extend and automate
+ section_order: 5
+ order: 2
+ slug: skills
+ file: docs/product/extend-and-automate/skills.md
+ title: Skills
+ diataxis: explanation
+ summary: Understand how a skill gives Jarvis repeatable instructions, when it runs, and how drafts differ from enabled skills.
+ authoritative_sources:
+ - jarvis/ui/web/frontend/src/views/SkillsView.tsx
+ - jarvis/ui/web/skills_routes.py
+ - jarvis/skills/registry.py
+ - jarvis/skills/lifecycle.py
+ - jarvis/skills/runner.py
+ related:
+ - plugins
+ - mcp-connections
+ - jarvis-agents
+ - safety-and-approvals
+ reader_level: intermediate
+ maturity: stable
+
+ - section: Extend and automate
+ section_order: 5
+ order: 3
+ slug: plugins
+ file: docs/product/extend-and-automate/plugins.md
+ title: Plugins
+ diataxis: explanation
+ summary: Connect packaged capabilities, understand sign-in and health states, and see how plugins can expose tools and skills.
+ authoritative_sources:
+ - jarvis/ui/web/frontend/src/views/PluginsView.tsx
+ - jarvis/ui/web/marketplace_routes.py
+ - jarvis/marketplace/plugin_registry.py
+ - jarvis/marketplace/plugin_loader.py
+ - jarvis/marketplace/plugin_mcp.py
+ related:
+ - skills
+ - mcp-connections
+ - providers-and-api-keys
+ - credentials-and-secrets
+ reader_level: intermediate
+ maturity: stable
+
+ - section: Extend and automate
+ section_order: 5
+ order: 4
+ slug: mcp-connections
+ file: docs/product/extend-and-automate/mcp-connections.md
+ title: MCP Connections
+ diataxis: howto
+ summary: Add and inspect Model Context Protocol servers, then understand how their tools become available safely.
+ authoritative_sources:
+ - jarvis/ui/web/frontend/src/views/McpsView.tsx
+ - jarvis/ui/web/mcp_routes.py
+ - jarvis/mcp/registry.py
+ - jarvis/mcp/client.py
+ - mcp.json.example
+ related:
+ - plugins
+ - skills
+ - credentials-and-secrets
+ - safety-and-approvals
+ reader_level: advanced
+ maturity: stable
+
+ - section: Extend and automate
+ section_order: 5
+ order: 5
+ slug: cli-connections
+ file: docs/product/extend-and-automate/cli-connections.md
+ title: CLI Connections
+ diataxis: howto
+ summary: Let Jarvis discover command-line tools, check their readiness, and use only the capabilities available on the current computer.
+ authoritative_sources:
+ - jarvis/ui/web/frontend/src/views/ClisView.tsx
+ - jarvis/ui/web/cli_routes.py
+ - jarvis/clis/registry.py
+ - jarvis/clis/prober.py
+ - jarvis/clis/risk_integration.py
+ related:
+ - skills
+ - workflows-and-commands
+ - cli-reference
+ - safety-and-approvals
+ reader_level: advanced
+ maturity: stable
+
+ - section: Extend and automate
+ section_order: 5
+ order: 6
+ slug: computer-use
+ file: docs/product/extend-and-automate/computer-use.md
+ title: Computer Use
+ diataxis: howto
+ summary: Understand how Jarvis sees and operates desktop apps, when it asks for confirmation, and how to stop or recover a run.
+ authoritative_sources:
+ - docs/computer-use.md
+ - jarvis/plugins/tool/computer_use_tool.py
+ - jarvis/harness/native_computer_use.py
+ - jarvis/vision/engine.py
+ - jarvis/safety/vision_telemetry.py
+ related:
+ - permissions
+ - safety-and-approvals
+ - jarvis-agents
+ - platform-support
+ reader_level: advanced
+ maturity: stable
+
+ - section: Extend and automate
+ section_order: 5
+ order: 7
+ slug: workflows-and-commands
+ file: docs/product/extend-and-automate/workflows-and-commands.md
+ title: Workflows and App Commands
+ diataxis: explanation
+ summary: See how reusable workflows, natural-language actions, REST routes, and CLI commands connect to the same underlying capability.
+ authoritative_sources:
+ - jarvis/ui/web/frontend/src/views/WorkflowsView.tsx
+ - jarvis/ui/web/workflows_routes.py
+ - jarvis/workflows/runner.py
+ - jarvis/commands/registry.py
+ - docs/commands-reference.md
+ related:
+ - tasks-and-reminders
+ - skills
+ - cli-reference
+ - app-command-reference
+ reader_level: advanced
+ maturity: experimental
+ source_policy: Link to docs/commands-reference.md; do not copy its generated command catalog.
+
+ - section: Privacy, safety, and support
+ section_order: 6
+ order: 1
+ slug: privacy-and-local-data
+ file: docs/product/privacy-safety-and-support/privacy-and-local-data.md
+ title: Privacy and Local Data
+ diataxis: explanation
+ summary: Learn what Jarvis stores locally, what may be sent to a connected service, and how each optional feature changes that boundary.
+ authoritative_sources:
+ - docs/PHILOSOPHY.md
+ - jarvis/core/paths.py
+ - jarvis/core/redact.py
+ - jarvis/state/chat_store.py
+ - jarvis/memory/wiki/secret_guard.py
+ related:
+ - credentials-and-secrets
+ - permissions
+ - wiki-and-memory
+ - jarvis-board
+ reader_level: beginner
+ maturity: stable
+
+ - section: Privacy, safety, and support
+ section_order: 6
+ order: 2
+ slug: credentials-and-secrets
+ file: docs/product/privacy-safety-and-support/credentials-and-secrets.md
+ title: Credentials and Secrets
+ diataxis: explanation
+ summary: Understand how credentials are entered, stored, redacted, replaced, and kept out of conversations and documentation.
+ authoritative_sources:
+ - jarvis/core/config.py
+ - jarvis/core/control_key.py
+ - jarvis/core/redact.py
+ - jarvis/marketplace/token_store.py
+ - jarvis/memory/wiki/secret_guard.py
+ related:
+ - providers-and-api-keys
+ - privacy-and-local-data
+ - mcp-connections
+ - troubleshooting
+ reader_level: beginner
+ maturity: stable
+
+ - section: Privacy, safety, and support
+ section_order: 6
+ order: 3
+ slug: permissions
+ file: docs/product/privacy-safety-and-support/permissions.md
+ title: App Permissions
+ diataxis: howto
+ summary: Grant only the microphone, screen, accessibility, and input permissions needed for voice, global shortcuts, and Computer Use.
+ authoritative_sources:
+ - jarvis/ui/web/frontend/src/views/settings/PermissionsPanel.tsx
+ - jarvis/ui/web/permissions_routes.py
+ - jarvis/platform/permissions.py
+ - jarvis/platform/capabilities.py
+ related:
+ - first-run-setup
+ - audio-and-wake-word
+ - computer-use
+ - privacy-and-local-data
+ reader_level: beginner
+ maturity: stable
+
+ - section: Privacy, safety, and support
+ section_order: 6
+ order: 4
+ slug: safety-and-approvals
+ file: docs/product/privacy-safety-and-support/safety-and-approvals.md
+ title: Safety and Approvals
+ diataxis: explanation
+ summary: Learn why some actions run immediately, some require confirmation, and some are blocked before they can affect your computer or accounts.
+ authoritative_sources:
+ - docs/PHILOSOPHY.md
+ - jarvis/safety/risk_tier.py
+ - jarvis/safety/approval.py
+ - jarvis/safety/tool_executor.py
+ - jarvis/missions/tool_approvals.py
+ related:
+ - computer-use
+ - tasks-and-reminders
+ - skills
+ - privacy-and-local-data
+ reader_level: beginner
+ maturity: stable
+
+ - section: Privacy, safety, and support
+ section_order: 6
+ order: 5
+ slug: troubleshooting
+ file: docs/product/privacy-safety-and-support/troubleshooting.md
+ title: Troubleshooting
+ diataxis: troubleshooting
+ summary: Diagnose startup, connection, provider, voice, permission, and extension problems using safe checks before changing configuration.
+ authoritative_sources:
+ - docs/BUGS.md
+ - docs/README-desktop-black-screen.md
+ - docs/overlay-troubleshooting.md
+ - jarvis/diagnostics/doctor.py
+ - jarvis/ui/web/diagnostics_routes.py
+ related:
+ - install-personal-jarvis
+ - providers-and-api-keys
+ - audio-and-wake-word
+ - platform-support
+ reader_level: beginner
+ maturity: stable
+
+ - section: Reference
+ section_order: 7
+ order: 1
+ slug: cli-reference
+ file: docs/product/reference/cli-reference.md
+ title: CLI Reference
+ diataxis: reference
+ summary: Find the supported command-line surfaces, authentication options, common flags, and the generated command catalog.
+ authoritative_sources:
+ - docs/jarvis-cli.md
+ - docs/jarvis-cli-reference.md
+ - docs/reference/jarvis-cli.md
+ - jarvis/cli_ctl
+ - scripts/ci/gen_cli_reference.py
+ related:
+ - cli-connections
+ - control-api-reference
+ - app-command-reference
+ - configuration-reference
+ reader_level: advanced
+ maturity: stable
+ source_policy: Link to docs/jarvis-cli-reference.md; do not copy or hand-edit its generated command catalog.
+
+ - section: Reference
+ section_order: 7
+ order: 2
+ slug: control-api-reference
+ file: docs/product/reference/control-api-reference.md
+ title: Control API Reference
+ diataxis: reference
+ summary: Understand API authentication, discovery, error behavior, and how REST operations map to CLI and in-app actions.
+ authoritative_sources:
+ - docs/jarvis-control-api.md
+ - jarvis/ui/web/server.py
+ - jarvis/ui/web/control_routes.py
+ - jarvis/ui/web/surface_security.py
+ - jarvis/core/control_key.py
+ related:
+ - cli-reference
+ - app-command-reference
+ - credentials-and-secrets
+ - architecture
+ reader_level: advanced
+ maturity: stable
+
+ - section: Reference
+ section_order: 7
+ order: 3
+ slug: configuration-reference
+ file: docs/product/reference/configuration-reference.md
+ title: Configuration Reference
+ diataxis: reference
+ summary: Look up supported settings, defaults, environment overrides, and safe configuration-write behavior.
+ authoritative_sources:
+ - jarvis/core/config.py
+ - jarvis/core/config_writer.py
+ - pyproject.toml
+ - jarvis/ui/web/settings_routes.py
+ - jarvis/ui/web/provider_spec.py
+ related:
+ - settings-and-appearance
+ - providers-and-api-keys
+ - credentials-and-secrets
+ - platform-support
+ reader_level: advanced
+ maturity: stable
+
+ - section: Reference
+ section_order: 7
+ order: 4
+ slug: app-command-reference
+ file: docs/product/reference/app-command-reference.md
+ title: App Command Reference
+ diataxis: reference
+ summary: Learn how to browse the canonical app-command catalog shared by voice, chat, desktop, CLI, and REST surfaces.
+ authoritative_sources:
+ - docs/commands-reference.md
+ - jarvis/commands/registry.py
+ - jarvis/ui/web/commands_routes.py
+ - scripts/ci/gen_commands_reference.py
+ related:
+ - workflows-and-commands
+ - cli-reference
+ - control-api-reference
+ reader_level: advanced
+ maturity: stable
+ source_policy: Link to docs/commands-reference.md; never duplicate or hand-maintain the generated entries.
+
+ - section: Reference
+ section_order: 7
+ order: 5
+ slug: architecture
+ file: docs/product/reference/architecture.md
+ title: How Personal Jarvis Fits Together
+ diataxis: explanation
+ summary: Follow a request from the user interface through providers, tools, safety checks, events, agents, memory, and output.
+ authoritative_sources:
+ - docs/architecture-overview.md
+ - jarvis/core/protocols.py
+ - jarvis/core/bus.py
+ - jarvis/brain/factory.py
+ - pyproject.toml
+ related:
+ - providers-and-api-keys
+ - jarvis-agents
+ - safety-and-approvals
+ - control-api-reference
+ reader_level: advanced
+ maturity: stable
+
+ - section: Reference
+ section_order: 7
+ order: 6
+ slug: platform-support
+ file: docs/product/reference/platform-support.md
+ title: Platform Support and Requirements
+ diataxis: reference
+ summary: Check operating-system support, optional hardware and audio capabilities, headless behavior, and graceful feature fallbacks.
+ authoritative_sources:
+ - pyproject.toml
+ - install/README.md
+ - install/install.ps1
+ - install/install.sh
+ - jarvis/platform/capabilities.py
+ - docs/plans/cross-platform-mac-linux/README.md
+ related:
+ - install-personal-jarvis
+ - permissions
+ - configuration-reference
+ - troubleshooting
+ reader_level: advanced
+ maturity: stable
diff --git a/docs/product/everyday-use/chats.md b/docs/product/everyday-use/chats.md
new file mode 100644
index 0000000000..e97d5bd873
--- /dev/null
+++ b/docs/product/everyday-use/chats.md
@@ -0,0 +1,216 @@
+---
+title: "Chats"
+slug: chats
+summary: "Organize conversations, continue earlier work, add files, and understand how chats relate to sessions and outputs."
+section: "Everyday use"
+section_order: 2
+order: 1
+diataxis: howto
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [chat, conversations, history, context, files, voice]
+related: [sessions-and-run-inspector, outputs-and-files, instructions-and-persona]
+---
+
+Use **Chats** for quick questions, follow-up work, and conversations you want
+to revisit. The view combines saved text conversations with recorded voice
+sessions, while keeping generated files and detailed run information in their
+own areas.
+
+This page also explains the current limits of chat history. In the current
+version, what you see during a live conversation and what returns after you
+reopen it are not always the same.
+
+## Before You Start
+
+- Open **API Keys** and confirm that at least one Brain provider shows
+ **Works**. A provider is the service that prepares Jarvis's answer.
+- Wait until the message field is available. You can type while the desktop
+ voice feature is still getting ready.
+
+> [!warning] Never send a password, API key, access token, recovery code, or
+> other credential in a chat or dropped file. Enter credentials only in the
+> protected connection fields provided by the app.
+
+## Use a Chat
+
+1. **Open Chats.** Select **Chats** in the sidebar. You see **History**, the
+ conversation area, and the message field.
+
+2. **Start with a clean view.** Select **New chat**. The visible conversation
+ clears. Jarvis creates a new text entry when you send the first message.
+
+3. **Send your request.** Type in the message field, then press **Enter** or
+ choose **Send**. Press **Shift+Enter** to add a line without sending.
+
+4. **Watch the result.** Your message appears immediately. A thinking status
+ may show the current activity, followed by the assistant reply. A tool or a
+ longer job can add more progress before the final result.
+
+5. **Continue with a follow-up.** Refer to the current topic instead of
+ repeating it. Jarvis uses the recent live conversation as context while the
+ app remains open.
+
+### Dictate Instead of Typing
+
+Choose **Dictate**, speak, and then choose **Stop dictation**. The transcript
+is placed in the message field for review; it is not sent until you choose
+**Send** or press **Enter**.
+
+Dictation needs the desktop speech feature. When it is unavailable, continue
+by typing.
+
+## Organize Conversation History
+
+History refreshes automatically and places the newest activity first. Entries
+are grouped under **Today**, **Yesterday**, and **Earlier**. A **Text** or
+**Voice** badge shows which kind of record you are opening.
+
+| Action | What you see | What happens to context |
+|---|---|---|
+| Select **New chat** | An empty conversation area | A new text record starts on the first send, but the shared live Brain context is not explicitly cleared. |
+| Open a **Text** entry | Its saved messages return | Recent saved messages replace the Brain's current context for the next reply. |
+| Open a **Voice** entry | The recorded spoken turns appear | The voice transcript becomes context; typing creates a separate text record and leaves the voice record unchanged. |
+| Select **Speak in this conversation** | Jarvis starts listening when desktop voice is ready | Recent saved messages are supplied to the voice conversation. |
+| Select **Delete** on a text entry | The text entry disappears | That local text thread and its saved messages are removed. Voice entries cannot be deleted from Chats. |
+
+Drag the divider beside History to change its width. Double-click the divider
+to return to the default width. The chosen width is remembered by the app.
+
+Text history is stored locally on the machine and survives a normal restart.
+It is not a cross-device chat-sync service. Text threads more than one year old
+are removed during startup maintenance; voice sessions use their own retention
+rules.
+
+### Current Context Limits
+
+**New chat is currently an organization boundary, not a guaranteed context
+reset.** It clears the visible panel and starts a different saved thread, but
+it does not call the Brain's history reset. Details from the previous live
+conversation can therefore influence the next reply.
+
+Opening an existing entry is a stronger switch because Jarvis replaces its
+live context with the recent messages found in that record. However, the saved
+text record is currently incomplete, as explained below. Do not rely on
+**New chat** to isolate information that must stay separate.
+
+## Add Files and Other Context
+
+You can give Jarvis a file, image, Portable Document Format (PDF) document,
+selected text, or link for the next request.
+
+1. Drag the item into the Jarvis window. The Jarvis drop target appears.
+2. Release it and wait for **Added to conversation**.
+3. Send a message that explains what you want, such as asking for a summary or
+ a comparison.
+
+A drop is silent: it adds context but does not make Jarvis answer on its own.
+Text-based files are read as bounded text, PDF extraction is best effort, and
+images require a Brain provider that can understand images. For an unsupported
+binary file, Jarvis may receive only its name, type, and size. One drop can
+contain up to 25 MB in total.
+
+Dropped content is temporary live context. It is not copied into the saved
+chat transcript and does not become an **Outputs** file. Add it again after
+reopening a conversation or restarting the app if Jarvis still needs it.
+
+## Understand What Is Saved
+
+The current app uses separate stores for text chats and voice sessions. It
+also keeps a short live context inside the active Brain so follow-up questions
+can make sense before you leave.
+
+| Item | Visible during the live chat | Available after reopening |
+|---|---|---|
+| A typed or connected-channel user message | Yes | **No, not reliably in the current version** |
+| An assistant reply | Yes | Yes, in the text thread |
+| A system error shown as a chat message | Yes | Yes, in the text thread |
+| A pre-reply acknowledgement, thinking status, or reasoning trace | Sometimes | No, not as durable chat history |
+| A dropped file, image, link, or selected text | Used as temporary context | No |
+| A recorded voice turn | Yes | Yes, as a separate voice session while retained |
+| A file created by a Jarvis-Agent | Linked from the work result | In **Outputs**, not inside chat history |
+
+> [!note] The incoming-message path currently publishes user messages to the
+> live screen but does not write them to the text-chat store. Assistant and
+> system replies are written. After reopening a text chat, your prompts may be
+> missing, the title may remain **New Chat**, and restored context may contain
+> answers without the questions that produced them.
+
+Until this is fixed, keep important source instructions in your own notes and
+repeat essential context before continuing an older text conversation. This
+limitation also affects user text arriving through a connected chat channel.
+
+## Chats, Sessions, and Outputs
+
+These areas preserve different parts of the same piece of work:
+
+- **Chats** is the conversation view. Use it for live messages, saved text
+ replies, and quick access to voice transcripts.
+- **Sessions and Run Inspector** explains what happened during a recorded
+ voice session or a particular run, including details that do not belong in a
+ simple chat transcript.
+- **Outputs** contains files created by Jarvis or Jarvis-Agents. A chat reply
+ can point to an output, but the file remains separate so you can preview,
+ download, or open it safely.
+- **Instructions and Persona** contains standing guidance that can shape every
+ answer. It is different from temporary chat context and from saved history.
+
+Dragging a completed work card from **Outputs** into the Jarvis drop target
+brings a short description of that work into the live conversation. It does
+not move or duplicate the generated files.
+
+## How It Fits Together
+
+1. **You start a turn.** Typing, reviewed dictation, a resumed conversation,
+ or a connected channel supplies the user message. A dropped item can supply
+ extra context for the next real message.
+2. **The active Brain prepares the response.** It receives recent live context,
+ any resumed messages, temporary dropped content, and your standing
+ instructions. If the preferred provider is unavailable, Jarvis can use
+ another compatible provider you configured; otherwise it shows an honest
+ Brain error.
+3. **Tools and safety rules can join the turn.** Jarvis may use an available
+ tool or ask for confirmation before an action. Longer work can move to a
+ Jarvis-Agent while Chats remains the place for conversation.
+4. **The result goes to the matching area.** A direct answer appears in Chats,
+ a spoken exchange is recorded as a voice session, and created files appear
+ in Outputs.
+5. **Reopening restores only the saved record.** Jarvis supplies recent stored
+ messages to the Brain, but current text-chat persistence can omit the user
+ side of the exchange. Repeat missing context before relying on a follow-up.
+
+## Check That It Works
+
+1. Select **New chat** and send a harmless request that needs a short answer.
+2. Confirm that your message appears, a thinking status starts, and an
+ assistant reply follows.
+3. Select **New chat**, then open the newest **Text** entry in History.
+
+The live chat works when both sides of the exchange appear before you leave.
+Current persistence works as implemented when the assistant reply returns
+after reopening. Your original prompt may be absent because of the confirmed
+saving limitation.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| The message field says **Starting** or **Offline** | The local app connection is still warming or unavailable | Wait for startup to finish. If every area stays offline, restart the app normally and check again. |
+| Your message appears but no reply arrives | No compatible Brain provider is ready, or the provider or a tool timed out | Open **API Keys**, test the affected provider, and choose another ready provider family when available. Then retry with a short text-only request. |
+| A reopened text chat shows replies but not your prompts | The current incoming-message path did not persist the user messages | Repeat the essential request before continuing and keep important instructions outside chat history. |
+| A new chat still seems to remember the previous topic | **New chat** changed the visible and saved thread but did not clear shared live Brain history | State the new context explicitly. Do not use New chat as an isolation boundary in the current version. |
+| A dropped item produces no answer | Drops add context silently, or the item was empty, too large, or unsupported | Wait for **Added to conversation**, keep the total below 25 MB, then send a clear request about the item. |
+| **Speak in this conversation** is unavailable | Voice is still warming, disabled, or unsupported in this mode | Continue by typing. Check the desktop voice status before trying again. |
+
+## Next Steps
+
+- Read [Sessions and Run Inspector](sessions-and-run-inspector) to distinguish
+ a simple conversation record from a detailed voice or run trace.
+- Use [Outputs and Files](outputs-and-files) to find, preview, and reopen files
+ created during longer work.
+- Review [Instructions and Persona](instructions-and-persona) to set lasting
+ response guidance without treating chat history as a permanent instruction
+ store.
diff --git a/docs/product/everyday-use/outputs-and-files.md b/docs/product/everyday-use/outputs-and-files.md
new file mode 100644
index 0000000000..58880441a1
--- /dev/null
+++ b/docs/product/everyday-use/outputs-and-files.md
@@ -0,0 +1,185 @@
+---
+title: "Outputs and Files"
+slug: outputs-and-files
+summary: "Find generated files, preview them safely, open them in another app, and recover unfinished work when available."
+section: "Everyday use"
+section_order: 2
+order: 5
+diataxis: howto
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [outputs, files, jarvis-agents, missions, previews]
+related: [chats, jarvis-agents, privacy-and-local-data]
+---
+
+Use **Outputs** to find the files created during longer Jarvis-Agent work. Each
+card represents one mission and keeps its status, generated files, and recovery
+actions together while that mission folder remains on the host.
+
+Outputs is not another chat history or a permanent archive. A conversation
+explains what you asked for, while Outputs lets you review and open the
+resulting documents, images, web pages, code, or other files during the
+mission's retention period.
+
+## Before You Start
+
+- Complete a Jarvis-Agent mission that creates a file. A normal chat answer
+ does not appear in Outputs unless Jarvis turns the request into a mission.
+- On a desktop, make sure the app you want to use for the file is installed.
+ In a browser or on a remote server, only browser-compatible previews may be
+ available.
+
+> [!warning] Treat a generated file like any other file you did not write
+> yourself. Preview its contents when possible, and open it in an app with
+> access only to the data that app needs.
+
+## Find and Review an Output
+
+1. **Open Outputs.** Select **Outputs** in the sidebar. The view shows up to 20
+ of the newest Jarvis-Agent missions and selects the newest one automatically.
+
+2. **Choose a mission.** Select its card in the list. The detail area shows the
+ original request when available, the current status, elapsed time, results,
+ and the Plan area.
+
+3. **Check the status before using a file.** A running mission can still add or
+ replace results. Wait for **success** when you need the final approved
+ version.
+
+4. **Open Results.** Each genuine deliverable appears with its relative path
+ and size. Select a text-based file row to expand its preview. Large text
+ previews stop after 1 MiB and show a notice; open the file to read the rest.
+ Binary files do not expand as text.
+
+5. **Open or locate the file.** Select **Open** beside a result. On the desktop,
+ the first use asks which detected app should open it. Choose **Remember as
+ default** if you want later files to use the same app. Use **Change how this
+ opens** to choose again, or **Reveal in folder** to select the real file in
+ the system file manager.
+
+On a browser or remote installation, native file actions are hidden because
+they would act on the server instead of your computer. A supported text,
+Markdown, image, Portable Document Format (PDF), or web file opens through the
+browser instead. Other binary formats may need to be transferred from the host
+and opened locally.
+
+Approved mission files are also copied to a user-visible Jarvis output folder
+when the host permits it. On a normal Windows desktop this is usually the
+**Jarvis-Outputs** folder inside Downloads. Jarvis avoids overwriting a
+different file with the same name by adding a mission identifier to the copy.
+That copy is separate from the Outputs card. During normal startup cleanup,
+mission folders older than 14 days are removed, so their cards and previews
+disappear from Outputs. Keep the separate copy when you need a file for longer.
+
+### Understand the Status
+
+| Status | What it means | Available action |
+|---|---|---|
+| **running** | A Jarvis-Agent is still working | Hold **Abort mission** to stop it deliberately. |
+| **success** | The mission reached approval | Review and open the saved results. |
+| **cancelled** | You stopped the mission | Select **Continue** to start a linked continuation. |
+| **error** | The mission failed, timed out, or could not finish | Select **Restart** to start a new linked attempt. |
+| **unknown** | The folder remains, but its mission record is unavailable | Review any listed files; the status cannot be reconstructed from the folder alone. |
+
+**Continue** and **Restart** never change the original card. They dispatch a
+new mission with the stored request, so you can compare the old and new runs.
+If that request could perform a destructive action, Jarvis asks you to confirm
+the rerun. While the continuation is active, the old card shows **Continued -
+running**; select that indicator to jump to the new card.
+
+A successful card has no rerun button. To rerun the same work or produce a
+changed version, return to [Chats](chats) and submit the request again. This
+creates a new mission instead of a linked retry from the original card.
+
+## Preview Files Safely
+
+The Results list is an allowlist of deliverables, not a view of the whole
+worker folder. Jarvis excludes worker settings, logs, credentials-related
+state, review notes, browser scratch data, and diagnostic patches from this
+list and from direct file links.
+
+Text and Markdown opened in the browser are rendered on a standalone page that
+does not allow scripts. Plain text is escaped before display, and inline HTML
+receives the same no-script browser policy. Other formats use the browser or
+the app you choose, so their normal viewer protections still matter.
+
+> [!note] The **Plan** area currently does not receive stored mission steps. It
+> can show **Single-shot run - no structured plan for this session** even when
+> the work involved several steps. Use the card status and files as the current
+> source of truth for completion.
+
+## Discuss an Output in Chats
+
+Drag a mission card from Outputs onto the Jarvis drop target to add a short
+recap of that mission to the active conversation. Jarvis can then discuss the
+request, status, summary, or recorded error.
+
+This action does not attach the generated files, duplicate them, or rerun the
+mission. If Jarvis needs a file's contents, add that file separately and send a
+clear request about it.
+
+## How It Fits Together
+
+1. **Chats, voice, a command, or a workflow starts the request.** A concrete
+ file-building request can be delegated to a [Jarvis-Agent](jarvis-agents)
+ when it needs longer or isolated work.
+2. **The Jarvis-Agent runs a mission.** Outputs polls that mission's status and
+ shows only files archived as user deliverables. If the selected provider or
+ worker is unavailable, the mission can end in error; fix that dependency
+ before choosing **Restart**.
+3. **Outputs presents the retained result.** It previews readable content,
+ opens the archived file, and normally copies approved files into a simpler
+ local output folder. The card follows the 14-day mission-folder cleanup;
+ the separate copy does not. Outputs does not store the conversation that
+ requested the work.
+4. **Sessions and Run Inspector preserve different evidence.** [Sessions and
+ Run Inspector](sessions-and-run-inspector) helps you review a recorded voice
+ conversation or app run. Outputs remains the place for mission deliverables;
+ neither view replaces the other.
+5. **Board summarizes activity, not file contents.** [Jarvis Board](jarvis-board)
+ can turn local activity into counts, trends, and achievements, including
+ Jarvis-Agent use. It does not preview, copy, or publish the files shown in
+ Outputs.
+
+## Check That It Works
+
+1. In Chats, ask Jarvis to create a small text file containing a three-item
+ checklist. Do not include private information in the example.
+2. Open **Outputs** and select the newest mission. Wait for its status to become
+ **success**.
+3. Under **Results**, select the text file and confirm that the checklist
+ appears in the expanded preview.
+4. Select **Open**. On a desktop, choose an app; in a browser, confirm that the
+ readable file opens in a separate view.
+
+The feature works when the completed mission, its deliverable, the preview,
+and an appropriate open action are all available.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| **No Jarvis-Agent sessions yet** | No file-producing mission has reached the output store | Ask for a concrete file in Chats and follow the Jarvis-Agent progress. |
+| An older mission is missing | Outputs shows only the 20 newest cards, and startup cleanup removes mission folders older than 14 days | Check the user-visible Jarvis output folder for its separate delivered files. |
+| **This session has no saved files** | The mission produced no archived deliverable, or archiving failed | Read the mission status, fix any provider or worker error, then use **Restart** when available. |
+| **Single-shot run** appears for multi-step work | Structured plan persistence is not connected to Outputs yet | Use the status and Results list; do not treat the Plan message as a step count. |
+| A preview is shortened or says the file is binary | Inline preview is limited by size or file type | Select **Open** or **Reveal in folder** and use a suitable local app. |
+| **Open** does nothing or the chosen app is gone | The remembered opener is no longer available | Select **Change how this opens**, choose another detected app, or reveal the file in its folder. |
+| The status is **unknown** | The file folder survived but the matching mission database row did not | Use any visible results normally. Restart the work from Chats if you need a new verified run. |
+
+For persistent loading, connection, or provider problems, follow the main
+[Troubleshooting](troubleshooting) guide.
+
+## Next Steps
+
+- Read [Jarvis-Agents](jarvis-agents) to understand delegation, mission
+ progress, review, and recovery before a file reaches Outputs.
+- Use [Sessions and Run Inspector](sessions-and-run-inspector) when you need to
+ examine the conversation or run that led to a result.
+- Explore [Jarvis Board](jarvis-board) to see aggregate activity and
+ achievements without treating it as file storage.
+- Review [Privacy and Local Data](privacy-and-local-data) to learn where
+ conversations, mission records, and generated files live.
diff --git a/docs/product/everyday-use/profile-and-contacts.md b/docs/product/everyday-use/profile-and-contacts.md
new file mode 100644
index 0000000000..d43a4f43d6
--- /dev/null
+++ b/docs/product/everyday-use/profile-and-contacts.md
@@ -0,0 +1,176 @@
+---
+title: "Profile and Contacts"
+slug: profile-and-contacts
+summary: "Keep your own preferences and the people you mention organized, and understand how both support more relevant conversations."
+section: "Everyday use"
+section_order: 2
+order: 7
+diataxis: howto
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [profile, contacts, personalization, privacy]
+related: [instructions-and-persona, wiki-and-memory, privacy-and-local-data]
+---
+
+Use **Profile** for facts and preferences about you. Use **Contacts** for the
+people you may ask Jarvis to recognize, message, or call. Keeping those records
+separate prevents a friend's details from becoming part of your own profile.
+
+Both features can make conversations more relevant, but they affect different
+parts of Jarvis. You remain in control: you can review, edit, or remove the
+stored information in the app.
+
+## Choose the Right Place
+
+| Place | What belongs there | What it affects | What it does not change |
+|---|---|---|---|
+| **Profile** | Your name, preferred form of address, languages, communication style, work style, values, and feedback preferences | The personal context Jarvis uses when replying to you | Jarvis's Persona, standing Instructions, contact records, or what your profile photo means |
+| **Contacts** | Another person's name, aliases, relationship, email addresses, phone numbers, postal address, and a short note | Name matching and on-demand details for supported actions such as sending a message or starting a call | How Jarvis addresses you or the personality and tone defined for Jarvis |
+| **People around you** in Profile | People mentioned in conversations and observations learned about them | Broader conversational memory about people in your life | The user-managed Contacts address book; it is not a reliable source of contact details |
+| **Wiki/Memory** | Longer notes, projects, decisions, and connected knowledge | Searchable long-term context | Structured Profile fields; editing a wiki note does not necessarily update Profile |
+
+Your profile photo is only used to represent you in the Profile view. It is not
+an identity check and does not change Jarvis's answers.
+
+## Update Your Profile
+
+1. Open **Profile** from the app navigation. The page shows what Jarvis
+ currently knows about you, grouped into identity, communication, work style,
+ values, and relationship preferences.
+2. Find the field you want to change. Activate **Edit** on that row; keyboard
+ users can focus the row's edit control without relying on hover.
+3. Enter a value, choose **Yes** or **No**, or add and remove list items,
+ depending on the field.
+4. Save the change. The field updates in the Profile view and becomes available
+ to later conversations.
+5. To add or replace your picture, use **Upload photo** or **Change photo**.
+ Use **Remove photo** to return to your initials or the default profile icon.
+
+Jarvis can also record a durable fact you clearly state in chat or voice, such
+as how you want to be addressed. This requires the current assistant setup to
+support the profile-update action. Check Profile afterward instead of assuming
+that every sentence was saved. One-off requests and temporary states do not
+belong in Profile, and automatic updates reject selected sensitive categories.
+
+If **Waiting for your OK** contains suggestions, review the evidence and value
+before choosing **Confirm** or **Strike out**. Some memory setups do not use a
+review queue; an inactive or empty queue does not stop manual profile editing.
+
+> [!warning] The **source file** editor is an advanced view. Its structured
+> header drives the Profile cards, so an invalid edit can make those cards look
+> empty. Prefer the field-level **Edit** controls for normal changes.
+
+## Add and Manage Contacts
+
+1. Open **Contacts** and choose **Add contact**.
+2. Enter a name. Add aliases when you commonly use another spelling or
+ nickname; Jarvis can use them to find the same record.
+3. Optionally choose a relationship and add only the email addresses, phone
+ numbers, postal address, and short **README** note you actually need.
+4. Choose **Save**. The new contact appears in the list and its details open in
+ the main pane.
+5. Select **Edit** to change the record. Choose **Delete** and confirm to remove
+ it from the address book.
+
+**Search contacts…** matches names and aliases. It does not search email
+addresses, phone numbers, addresses, or note text.
+
+When the active assistant can use tools, you can explicitly ask in chat or
+voice to save or update a person's relationship, email address, phone number,
+or note. Jarvis matches an existing name or alias where possible and otherwise
+creates a contact. Use the in-app form for postal addresses; conversation-based
+postal-address updates are not currently reliable. Deleting a contact is an
+in-app action. Always open Contacts to verify an important change.
+
+The Contacts view and its local records do not depend on a brain provider. If
+conversation tools are unavailable, you can still add, edit, search, and delete
+contacts manually.
+
+## Privacy and Control
+
+Profile and Contacts are stored with your local Jarvis data. That does not mean
+the information can never be processed elsewhere:
+
+- Profile context and a compact contact index containing names, aliases, and
+ relationships may be included when Jarvis sends a conversation to the active
+ brain provider.
+- Email addresses, phone numbers, and postal addresses are not added to every
+ conversation. Jarvis retrieves them on demand when a supported action needs
+ them.
+- Completing an email, message, or phone action may send the required detail to
+ the connected service that performs that action.
+- The Profile source-file card currently shows its local file location. Treat
+ that location as personal information and crop it from shared screenshots.
+- Never store passwords, API keys, recovery codes, or other credentials in a
+ profile field, contact note, or contact detail.
+
+If Wiki/Memory is active, a saved contact can receive a person page containing
+the name, aliases, relationship, and README note. Email addresses, phone
+numbers, and street addresses are deliberately kept out of that wiki page.
+Because the README note can be mirrored, keep sensitive details in the dedicated
+contact fields rather than in the note.
+
+Deleting a contact removes the address-book record. A related Wiki/Memory page
+is archived rather than destroyed so separately learned notes are not lost.
+Review Wiki/Memory as well when your goal is to remove all information about a
+person. Existing chats, service history, and provider records are separate and
+are not erased by deleting a contact.
+
+## How It Fits Together
+
+1. **You provide the input.** You edit Profile or Contacts directly, or state a
+ durable fact in a chat or voice conversation.
+2. **Jarvis keeps the subjects separate.** Facts about you go to Profile. A
+ saved person's address-book details go to Contacts. Broader observations can
+ go to Wiki/Memory or the **People around you** list.
+3. **Chats receive useful context.** Profile supplies compact personal
+ preferences. Contacts supplies a compact index of names, aliases, and
+ relationships; full details are looked up only for an action that needs
+ them.
+4. **Instructions and Persona keep their own roles.** Persona defines the
+ assistant's baseline character. Instructions are standing rules you write.
+ Profile describes you. If the same preference appears in more than one
+ place, make the wording consistent instead of relying on an assumed winner.
+5. **Wiki/Memory adds depth.** It stores longer, connected knowledge and may
+ mirror a privacy-limited person page for a contact. It does not replace the
+ address book or automatically rewrite structured Profile fields.
+6. **Availability degrades safely.** Manual Contacts management still works
+ without a provider. If the active assistant cannot use a profile or contact
+ tool, edit the record in the app and try the conversation again.
+
+## Check That It Works
+
+1. In **Profile**, set **Address form** to a non-sensitive temporary label
+ with the row-level **Edit** control. Start a new chat and ask how Jarvis
+ should address you. Success means the saved value appears in Profile and the
+ reply recognizes it. Restore your preferred value afterward.
+2. In **Contacts**, add a temporary contact with only a name and alias. Search
+ for the alias, open the result, and confirm it shows the same record. Delete
+ the temporary contact when finished.
+
+These checks prove the two stores separately: a Profile change affects context
+about you, while an alias helps Jarvis find a saved person.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| **Profile system not ready** | The active brain and structured profile have not finished starting, or this session does not provide them | Wait for startup to finish, use **Reload**, and try again; Contacts can still be managed separately |
+| A fact stated in chat does not appear in Profile | The statement was temporary, blocked by the profile privacy rules, or the active assistant could not use the update action | Add the fact with the row-level **Edit** control and confirm it appears |
+| **Waiting for your OK** is inactive or empty | The current memory setup writes elsewhere or has no uncertain suggestions | Continue using Profile normally; do not wait for a review to edit a field |
+| Contact search shows no result | Search checks only names and aliases | Clear the search, confirm the saved spelling, and add the expected alias with **Edit** |
+| Jarvis cannot use a saved person's details | The name did not match, the field is empty, or the required contact/action tool is unavailable | Open the contact, verify its alias and required detail, then retry or perform the action manually |
+| A postal address stated in chat is not saved | The conversation-based address writer does not currently match the structured address record | Open **Contacts**, choose **Edit**, and enter the address in the labeled fields |
+| A deleted contact still appears in Wiki/Memory | The wiki person page was archived to preserve separately learned notes | Review the archived wiki page and follow the privacy guide before removing additional data |
+
+## Next Steps
+
+- Read [Instructions and Persona](instructions-and-persona) to separate explicit
+ standing rules from the facts and preferences held in Profile.
+- Read [Wiki and Memory](wiki-and-memory) to understand longer-term knowledge,
+ mirrored person pages, and what deleting a contact does not remove.
+- Read [Privacy and Local Data](privacy-and-local-data) before storing personal
+ details or connecting a service that may process them.
diff --git a/docs/product/everyday-use/sessions-and-run-inspector.md b/docs/product/everyday-use/sessions-and-run-inspector.md
new file mode 100644
index 0000000000..1eae1a3578
--- /dev/null
+++ b/docs/product/everyday-use/sessions-and-run-inspector.md
@@ -0,0 +1,167 @@
+---
+title: "Sessions and Run Inspector"
+slug: sessions-and-run-inspector
+summary: "See the difference between conversation history and a detailed run trace, then use both to understand an answer."
+section: "Everyday use"
+section_order: 2
+order: 4
+diataxis: explanation
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [sessions, run-inspector, voice, transcripts, diagnostics, tasks, jarvis-agents, outputs]
+related: [chats, voice-conversations, troubleshooting, privacy-and-local-data]
+---
+
+**Transcription** and **Run Inspector** are two views of the same recorded
+voice session. Transcription helps you read what was said. Run Inspector helps
+you understand what Jarvis did, which tools or Jarvis-Agents joined the turn,
+and where a delay or failure occurred.
+
+Both views are read-only. Opening them does not repeat a request, run a tool,
+or change the result.
+
+## Before You Start
+
+Finish at least one voice conversation. Jarvis records voice sessions by
+default, and a completed session gives both views their most reliable data.
+Text-only chats, scheduled task runs, and standalone Jarvis-Agent missions do
+not create Run Inspector entries on their own.
+
+> [!warning] A transcript or raw export can contain your words, tool previews,
+> provider names, and error details. Review it before sharing, and never use
+> voice or chat to provide a password, API key, token, or recovery code.
+
+## Choose the Right View
+
+| When you want to know | Open | What you get |
+|---|---|---|
+| What did I say, and what did Jarvis say? | **Transcription** | Voice sessions grouped into turns, including recognized requests, replies, and other spoken messages |
+| Which service answered? | **Transcription** | The provider used for the completed turn, plus available token and cost totals |
+| Did the request succeed? | **Run Inspector** | A **Success**, **Partial**, or **Failed** outcome for the run and each turn |
+| Why was it slow or unsuccessful? | **Run Inspector** | Recorded latency, decisions, tools, approvals, timeline events, and errors |
+| Which feature joined the turn? | **Run Inspector** | **Computer-Use**, **Jarvis-Agent**, **Skill**, and tool badges when those activities were recorded |
+
+A **session** is the voice conversation around one or more turns. A **run** is
+the inspection view built from that session. Run Inspector does not create a
+second copy of the conversation or perform a second analysis with an AI
+provider; it derives its panels from the events Jarvis already recorded.
+
+## Review a Voice Session
+
+1. **Open Transcription.** The left list shows recent voice sessions with a
+ preview, time, duration, turn count, and how the session ended. The newest
+ finished session is selected automatically when possible.
+2. **Choose a session.** Select any list item to open its turns. A session
+ marked **running** may still be incomplete, so finish the call before using
+ it as a final record.
+3. **Read the turns.** Each turn separates your recognized request from the
+ assistant reply and other speech that Jarvis actually played. Available
+ provider, model, token, cost, timing, and tool details appear beside the
+ turn rather than inside the conversation text.
+4. **Export only when needed.** Use the Text, Markdown, or JSON row to copy,
+ save, or open the session. The desktop app saves a requested file to your
+ Downloads folder; a browser session uses the browser's download or opens
+ the export in a new tab.
+
+Text is best for a plain record. Markdown keeps useful structure for notes.
+JSON is intended for detailed inspection and can expose more recorded fields,
+so check it carefully before sending it to anyone.
+
+> [!note] Voice sessions are retained for 30 days by default and are then
+> removed automatically. The current app has no delete action for one voice
+> session. An export is a separate copy that remains until you delete it from
+> its destination. Read [Privacy and Local Data](privacy-and-local-data) before
+> recording or exporting sensitive conversations.
+
+## Inspect What Happened
+
+1. **Open Run Inspector.** The newest recorded run is selected automatically.
+ The list shows a preview, turn count, duration, feature badges, and outcome.
+2. **Read outcome and speed separately.** **Success** means the turn produced
+ an answer without a recorded hard failure. **Partial** means Jarvis answered
+ but a tool, action, or other part had a problem. **Failed** means the run did
+ not produce a usable answer. A **slow** label or latency warning describes
+ performance, not whether the result was correct.
+3. **Check Triggered badges.** These show recorded tools and higher-level
+ features involved in that turn. A Jarvis-Agent badge means the voice turn
+ handed work to a Jarvis-Agent; it does not mean every later mission event is
+ stored in this run.
+4. **Expand Metrics & deep dive.** This summary can show total thinking and
+ speaking time, tokens, interruptions, worst latency, cost by provider, and
+ tool counts. A missing value means it was not recorded; it does not by
+ itself mean that the step failed.
+5. **Expand Forensics on a turn.** Review the available latency stages,
+ decision path, tool result, timeline, and error entries. These panels are
+ evidence for troubleshooting, not a promise that every internal event is
+ captured.
+6. **Use Export raw (JSON) carefully.** The export opens the underlying session
+ record, including turns and raw recorded events. It is not a polished report
+ and does not include files created during the work.
+
+## How It Fits Together
+
+1. **A voice request starts the record.** Wake activation, the voice control,
+ or push-to-talk opens a voice session. Speech recognition supplies the text
+ shown for your side of the turn.
+2. **Jarvis answers or acts.** The active Brain provider may answer directly,
+ use a tool, request approval, create a task, or hand longer work to a
+ Jarvis-Agent. If a preferred provider is unavailable and another compatible
+ provider completes the turn, the completed provider is the one shown in the
+ session details.
+3. **The recorder observes the turn.** It saves selected conversation,
+ timing, decision, action, and error events without controlling the voice
+ pipeline. If recording is unavailable, the request can still run, but these
+ views cannot reconstruct it later.
+4. **Transcription presents the conversation.** Use it as the readable voice
+ history. A voice entry may also appear in **Chats**, but text-chat history is
+ stored separately and does not become a Run Inspector run.
+5. **Run Inspector derives the trace.** It turns the same saved events into
+ outcomes, activity badges, metrics, and forensic panels. It may show that a
+ task was created or a Jarvis-Agent was started during the voice turn.
+6. **The connected feature owns later work.** A scheduled task continues in
+ **Tasks**. A delegated mission continues in **Jarvis-Agents**. Files they
+ create appear in **Outputs**. Those later records do not get folded into the
+ original voice run merely because the voice request started them. A spoken
+ Jarvis-Agent completion can still be attached to the just-finished voice
+ transcript when it arrives after hangup.
+
+## Check That It Works
+
+1. Start a short voice conversation, ask one harmless question, wait for the
+ reply, and end the call.
+2. Open **Transcription** and confirm that the newest finished session shows
+ your recognized request and the assistant reply.
+3. Open **Run Inspector** and select the item with the same preview and time.
+ Confirm that it shows at least one turn and an outcome.
+
+The two views work together when they describe the same session: Transcription
+shows the readable exchange, while Run Inspector adds only the details that
+were recorded for that run.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| **No sessions yet** after a voice test | The call is still open, no usable turn was recorded, or the recorder is unavailable | End the call, wait briefly, and open Transcription again. Then make one short new voice test. |
+| **Session recorder is disabled** or **Run recorder is disabled** | This installation started without the local session store | The current desktop view has no in-app recorder switch. Follow [Troubleshooting](troubleshooting) or contact the person who manages the installation, then create a new test session; unrecorded sessions cannot be restored. |
+| A running session looks empty or has incomplete totals | The latest turn has not finished and its aggregates are not final | Select the newest finished session or end the current call, then reopen the view. |
+| Run Inspector says **Partial**, but you received an answer | Jarvis answered while a tool, approval, or another recorded part failed | Expand **Forensics**, then review **Tools** and **Errors** for the affected turn. |
+| A transcript exists, but a forensic panel is empty | The older run or active voice path did not emit that kind of event | Use the transcript as the conversation record. Do not treat a missing metric as proof that the action never happened. |
+| A task, mission, or generated file is not in the run | Its later lifecycle belongs to another feature | Check **Tasks**, **Jarvis-Agents**, or **Outputs** using the request time and description. |
+| An older voice session disappeared | It passed the default 30-day retention window | Check any export you intentionally saved. The app cannot restore a session after automatic removal. |
+
+## Next Steps
+
+- Read [Chats](chats) to understand how text history and voice entries appear
+ together without becoming the same stored record.
+- Read [Voice Conversations](voice-conversations) to see how activation,
+ speech recognition, the Brain, tools, and speech output form a turn.
+- Open [Jarvis-Agents](jarvis-agents) to follow delegated work after the voice
+ turn that started it has ended.
+- Use [Outputs and Files](outputs-and-files) to find generated files, which stay
+ separate from transcript and raw-run exports.
+- Review [Privacy and Local Data](privacy-and-local-data) for retention,
+ deletion limits, exports, and records that belong to other features.
diff --git a/docs/product/everyday-use/speech-dictionary.md b/docs/product/everyday-use/speech-dictionary.md
new file mode 100644
index 0000000000..02d6dbddeb
--- /dev/null
+++ b/docs/product/everyday-use/speech-dictionary.md
@@ -0,0 +1,172 @@
+---
+title: "Speech Dictionary"
+slug: speech-dictionary
+summary: "Teach speech recognition names and specialist words it often mishears, then test the improvement."
+section: "Everyday use"
+section_order: 2
+order: 6
+diataxis: howto
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [speech-recognition, dictionary, voice, pipeline]
+related: [voice-conversations, audio-and-wake-word, languages-and-voices]
+---
+
+The Speech Dictionary helps Jarvis turn recurring recognition mistakes into the
+words you intended. It is useful for names, product terms, abbreviations, and
+specialist vocabulary that appear incorrectly in a Pipeline voice transcript.
+
+The Dictionary is a research-preview feature. It adjusts recognized text; it
+does not train the speech service, repair poor microphone audio, or change how
+a word is pronounced in Jarvis's reply.
+
+## Before You Start
+
+- Use **Pipeline** for the voice turn you want to correct. Dictionary entries do
+ not currently rewrite Realtime transcripts.
+- Test the word once and note the exact text shown in **Transcription**. A known,
+ repeatable mistake is easier to correct than a different guess each time.
+- Use a short, non-sensitive test phrase. Never add passwords, credentials,
+ recovery codes, or other secrets to the Dictionary.
+
+Dictionary entries are saved in your local Jarvis data. If you use a compatible
+cloud speech service, Jarvis may also send the correct terms to that service as
+recognition hints. The service still receives audio according to your selected
+speech setup.
+
+## Choose the Right Entry
+
+Start with the smallest rule that describes what you see.
+
+| What appears in Transcription | Entry to use | What Jarvis changes |
+|---|---|---|
+| The right word with the wrong capitalization | Add the correct word | Exact matches use your saved capitalization |
+| A close, single-word spelling mistake | Add the correct word | A conservative near match may be repaired |
+| The same wrong word or phrase appears repeatedly | Turn on **Fix a misrecognition** | That whole word or phrase is replaced with the correct form |
+| The result is missing, random, or changes every time | Improve the audio or language setup first | The Dictionary does not guess from unclear audio |
+
+A plain word entry only repairs close, unambiguous single-word mistakes. Jarvis
+leaves distant or ambiguous matches unchanged to avoid rewriting ordinary
+speech. An explicit correction is better when you already know the exact wrong
+word or phrase.
+
+## Add a Word
+
+1. Open **Dictionary** from the app navigation.
+2. Select **Add word**.
+3. Leave **Fix a misrecognition** off.
+4. Enter the spelling and capitalization you want Jarvis to use.
+5. Select **Add word** in the dialog. The new entry appears in the list.
+6. Start a new Pipeline voice turn. The change applies without restarting the
+ app.
+
+Saved correct terms can also help a compatible cloud speech service when
+Jarvis supplies them as hints as that service starts. Services that do not
+support hints still receive the same local text correction after recognition.
+
+## Correct a Repeated Mistake
+
+1. Open **Dictionary** and select **Add word**.
+2. Turn on **Fix a misrecognition**.
+3. In **Misrecognized as...**, enter the exact wrong word or phrase from the
+ transcript.
+4. In **Correct spelling**, enter the form you want to see.
+5. To cover several known variants, separate them with commas. Keep each
+ variant specific enough that it will not replace ordinary speech.
+6. Select **Add word**, then repeat the same non-sensitive phrase in a new
+ Pipeline turn.
+
+Corrections ignore capitalization and match complete words or phrases. They do
+not replace part of a longer word. If the speech service produces a new variant,
+edit the entry and add that variant rather than creating a duplicate correct
+word.
+
+## Edit, Find, or Remove an Entry
+
+- Use **Search dictionary...** to find either the correct form or one of its
+ misheard variants.
+- Select **Edit** on an entry to change the correct form or its variants.
+- Select **Delete** to remove a rule that is no longer useful or changes the
+ wrong text.
+
+The app accepts one entry for each correct form, regardless of capitalization.
+An entry can contain up to 20 misheard variants; a word or variant can contain
+up to 100 characters. The Dictionary holds up to 2,000 entries.
+
+## How It Fits Together
+
+1. **Audio and Wake Word starts listening.** Your microphone and activation
+ settings determine whether Jarvis receives clear audio. Dictionary rules do
+ not run during wake detection, so adding a wake phrase here cannot make it
+ easier to activate Jarvis.
+2. **Languages and Voices shapes recognition and the reply.** The selected
+ input language helps the speech service interpret your audio. Dictionary
+ entries then apply across languages; they are not stored in separate
+ language lists. The selected output language and voice affect what Jarvis
+ says back, not the correction itself.
+3. **Pipeline creates a transcript.** A compatible cloud service can receive
+ saved correct terms as hints when it starts. Jarvis then applies exact
+ corrections, saved capitalization, and conservative near-match repair to
+ the recognized text.
+4. **The corrected request continues through Jarvis.** The corrected text is
+ shown in the voice transcript and passed to the assistant or action that
+ handles your request.
+5. **Fallback stays provider-independent.** If Pipeline uses another available
+ speech service, the text-correction step still applies. Recognition hints
+ are used only where the active service supports them.
+
+Realtime follows a separate live-audio path and does not currently pass its
+transcript through the Dictionary. Read [Voice Conversations](voice-conversations)
+for the full Pipeline and Realtime comparison.
+
+## What the Dictionary Cannot Improve
+
+The Dictionary cannot:
+
+- repair silence, clipping, background noise, or the wrong microphone;
+- make a wake phrase easier to detect;
+- rewrite current Realtime transcripts;
+- choose the correct meaning when two words sound alike without a consistent
+ transcript pattern;
+- change Jarvis's reply language, speaking voice, or pronunciation;
+- correct text you already typed.
+
+Use [Audio and Wake Word](audio-and-wake-word) for capture or activation
+problems, and [Languages and Voices](languages-and-voices) when recognition is
+using the wrong language or the spoken reply sounds wrong.
+
+## Check That It Works
+
+1. In a Pipeline voice turn, say a short non-sensitive phrase containing a term
+ that is misheard consistently.
+2. Open **Transcription** and copy only the incorrect word or phrase into a new
+ **Fix a misrecognition** entry. Add the intended form on the other side.
+3. Wait a moment, then repeat the same phrase in a new Pipeline turn.
+4. Confirm that **Transcription** now shows the intended form and that the
+ request reaches Jarvis with that wording.
+
+Success means the repeated transcript changes. It does not require restarting
+Jarvis or reconnecting the voice service.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| The entry saves, but the next transcript is unchanged | The turn used Realtime, or the speech service produced a different variant | Choose Pipeline and add the exact new variant shown in Transcription |
+| **Add word** stays unavailable | The correct form is empty, or correction mode has no misheard value | Complete the required field, or turn correction mode off for a plain word |
+| The app says the word already exists | Correct forms are compared without capitalization | Search for the existing entry and edit it |
+| An unrelated phrase changes | A correction variant is too broad | Edit it to a more specific phrase, or delete the entry |
+| The wake phrase still fails | Wake detection happens before Dictionary correction | Test the microphone and wake phrase under **Audio and Wake Word** |
+| Recognition changes on every attempt | Audio quality or the input language is unstable | Check the selected microphone and language before adding more rules |
+
+## Next Steps
+
+- Read [Voice Conversations](voice-conversations) to understand where
+ Dictionary correction sits in Pipeline and why Realtime behaves differently.
+- Read [Audio and Wake Word](audio-and-wake-word) to fix microphone quality or
+ activation problems that text correction cannot solve.
+- Read [Languages and Voices](languages-and-voices) to choose the input language
+ and the voice used for Jarvis's reply.
diff --git a/docs/product/everyday-use/tasks-and-reminders.md b/docs/product/everyday-use/tasks-and-reminders.md
new file mode 100644
index 0000000000..177387fded
--- /dev/null
+++ b/docs/product/everyday-use/tasks-and-reminders.md
@@ -0,0 +1,205 @@
+---
+title: "Tasks and Reminders"
+slug: tasks-and-reminders
+summary: "Create, review, approve, and complete tasks, including scheduled and recurring work."
+section: "Everyday use"
+section_order: 2
+order: 3
+diataxis: howto
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [tasks, reminders, scheduling, recurring, automation, approvals]
+related: [jarvis-agents, workflows-and-commands, safety-and-approvals]
+---
+
+Use **Tasks** to ask Jarvis to do one piece of work later, repeat it on a
+schedule, or react when a Jarvis-Agent mission ends. The task stays in a local
+queue, so you can follow its status without keeping a chat open.
+
+A reminder is not a separate kind of record in the current app. It is the time
+or event that starts a task. The task describes what Jarvis should do when that
+moment arrives.
+
+## Choose the Right Kind of Automation
+
+| Concept | Use it for | What Jarvis keeps |
+|---|---|---|
+| **Task** | One saved action with one starting condition | A card, its current state, and a step-by-step timeline |
+| **Reminder or schedule** | Deciding when a task starts, once or repeatedly | The next due time or the event the task is waiting for |
+| **Mission** | Longer work handled by a Jarvis-Agent and reviewed before completion | Worker progress, review state, results, and output files |
+| **Workflow** | A reusable sequence with several ordered steps | The workflow definition plus a history for each run |
+
+A scheduled task runs one isolated assistant turn; it does not automatically
+become a mission or gain a mission's review loop. A workflow is broader: it can
+connect several prompts, tools, or announcements in a fixed order.
+
+## Before You Start
+
+- Keep the Jarvis app running when the task is due. A waiting task is stored
+ locally and restored after a normal restart. An overdue task can run when the
+ scheduler starts again, but work that was already running when the app closed
+ is marked **interrupted** instead of being repeated automatically.
+- For a task that needs an assistant response, open **API Keys** and confirm
+ that the selected Brain provider shows **Works**.
+- Connect any service you want the task to use under **Skills, Plugins & MCPs**.
+ Only plugins that currently show **connected** appear in the task form.
+
+> [!warning] Do not put passwords, API keys, access tokens, recovery codes, or
+> private account data in a task name or prompt. Enter credentials only through
+> the protected connection fields in the app.
+
+## Create a Scheduled Task
+
+1. **Open Tasks.** Select **Tasks** in the sidebar, then select **New**. The
+ **New scheduled task** window opens.
+
+2. **Name the task.** Enter a short name that will still make sense in the task
+ list later.
+
+3. **Choose Schedule.** Under **Trigger**, select **Schedule**. Choose **Once**
+ for one run or **Recurring** for repeated work.
+
+4. **Set the time.** A one-time task can run **At date/time** or **After delay**.
+ A recurring task can run **Hourly**, **Daily**, or at a **Custom** interval.
+ The card shows a countdown after you create it.
+
+ **Daily** starts at the next selected local time and then repeats every 24
+ hours. It is an interval, not a calendar rule, so daylight-saving changes can
+ move the displayed wall-clock time for later runs.
+
+5. **Describe the result.** In **What should it do?**, state one clear outcome.
+ Choose **Fast**, **Auto**, or **Deep** under **Model**. Fast and Auto favor a
+ shorter background turn; Deep asks the selected provider for its deeper
+ model when one is available.
+
+6. **Allow only the plugins it needs.** Turn on a connected plugin, then choose
+ its scope. Leave every unrelated plugin off.
+
+7. **Create the task.** Select **Create task**. The window closes and a card
+ appears with a **scheduled** badge and its next due time.
+
+After a one-time run succeeds, the badge changes to **done**. After a recurring
+run succeeds, the same card returns to **scheduled** with its next due time.
+
+## React to a Mission with When-Then
+
+Select **When-Then** under **Trigger** when the action should start after a
+Jarvis-Agent mission **succeeds**, **fails**, or **is cancelled**. You can then
+choose an **Agent task**, **Computer-Use**, or **Just notify me** action. The
+optional **Say when done** field provides a completion announcement.
+
+The form also supports the mission replacement fields it displays, such as
+`{result_uri}` and `{mission_id}`. Jarvis replaces a recognized field with the
+matching value from the finished mission. An unrecognized field stays visible
+instead of stopping the task.
+
+> [!info] **When-Then is currently a preview despite being visible in the
+> task form.** Agent-task actions are wired to the Brain. Computer-Use and
+> Just-notify actions currently lack their required production runner
+> connections and end as **failed**. A standing event rule also changes to
+> **done** after its first match and is not restored after an app restart.
+
+## Choose Plugin Permissions
+
+The scope you choose applies only to that task and that connected plugin. It
+does not grant a general permission to every task.
+
+| Scope | What it allows during an unattended run |
+|---|---|
+| **Read** | Makes the plugin available for low-risk reading. An action that needs confirmation is not pre-approved and can time out or fail while nobody is present. |
+| **Write** or **Full** | Pre-approves confirmation-level actions from that plugin for this task, so it may send, post, or change data without asking at run time. Blocked actions remain blocked. |
+| Plugin off | Keeps that plugin out of the task's available tools. |
+
+Choose the narrowest scope that can finish the job. The app warns you when a
+Write or Full grant can perform an external action unattended.
+
+## Review and Manage Tasks
+
+Use **All**, **Active**, **Done**, and **Problems** to filter the list. The view
+refreshes automatically, and **Refresh** requests an immediate update.
+
+Expand a card to see its saved setup and **Timeline**. The timeline records the
+action, result, and failure details. An assistant result remains there even
+when audio output is muted or unavailable.
+
+| State shown in Tasks | What it means | What you can do |
+|---|---|---|
+| **waiting** | The task exists but has not entered the scheduler yet | Refresh and wait for startup to finish |
+| **scheduled** | It is waiting for a time, interval, or event | Expand it or select **Cancel** |
+| **running** | Jarvis has started the current action | Watch the Timeline; do not rely on task cancellation to stop a desktop action already in progress |
+| **done** | A one-time run finished successfully | Review the Timeline, then select **Delete** if you no longer need the record |
+| **failed** | The current run could not finish | Read **Last error** and the Timeline before deleting or recreating it |
+| **cancelled** | The task was removed from future scheduling | Review or delete the record |
+| **interrupted** | The app closed while the task was running | Review the partial timeline, then create a new task if the action is still needed |
+
+**Cancel** is a soft scheduler cancellation. It reliably removes waiting work
+from the queue, but it does not forcibly stop a Computer-Use loop or another
+action that has already begun. Use the affected feature's own stop control when
+one is available. **Delete** becomes available only after the task is in a
+final state.
+
+## How It Fits Together
+
+1. **A trigger starts the task.** The local scheduler watches the selected time
+ or a mission-completion event. Waiting tasks survive a normal restart.
+2. **Jarvis loads one saved action.** A scheduled prompt runs as an isolated
+ Brain turn, without borrowing the current chat history. A When-Then rule can
+ instead receive details from the mission that triggered it.
+3. **The current Brain and plugins do the work.** Only the plugins enabled for
+ the task are offered to that turn. A disconnected or unavailable plugin is
+ skipped, so the task may produce a limited answer or fail its intended goal.
+4. **Safety rules still apply.** Read access does not pre-approve a risky
+ change. Write or Full grants answer the confirmation gate only for the
+ matching task and plugin; an action that Jarvis blocks is never approved by
+ the schedule.
+5. **The result returns to Tasks.** The badge and Timeline show the outcome. A
+ finished assistant result can also be announced when the speech system is
+ available; on a muted or headless system, use the Timeline as the reliable
+ result.
+
+Scheduling and local storage do not require a particular cloud provider or
+desktop operating system. The action itself might. A Brain task currently uses
+the selected Brain provider for that background turn and does not automatically
+switch to another provider family when it fails. Computer-Use also needs a
+compatible graphical desktop. When a required capability is unavailable,
+Jarvis records **failed** rather than claiming the task completed.
+
+Read [Jarvis-Agents](jarvis-agents) for the longer mission path and
+[Workflows and App Commands](workflows-and-commands) for reusable multi-step
+automation.
+
+## Check That It Works
+
+1. Create a **Once** task with **After delay** set to one minute.
+2. Use a neutral name such as **Schedule check** and ask for the exact short
+ result **Scheduled check complete**. Leave all plugins off.
+3. Select **Create task** and confirm that its card shows **scheduled** with a
+ countdown.
+4. Wait for the card to show **running**, then **done**. Expand it and confirm
+ that the Timeline contains the assistant result.
+
+The scheduler and Brain path work when the state changes are visible and the
+requested result appears in the Timeline. Spoken playback is an additional
+delivery path, not the success record.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| **Create task** is disabled or saving fails | A required name, prompt, action text, or date is empty or invalid | Complete every visible required field and choose a future date or a positive delay |
+| A plugin is missing from the form | It is not connected, needs you to sign in again, or is not callable | Open **Skills, Plugins & MCPs**, reconnect it, then reopen the task form |
+| A card stays **scheduled** after its due time | The app or task service was not running, or startup is still restoring the queue | Keep the app open, wait for startup to finish, and select **Refresh**; restart normally if the whole Tasks view remains unavailable |
+| The task shows **failed**, or it finishes without a spoken result | The selected Brain, plugin, audio path, or requested capability was unavailable | Expand the Timeline, test the affected connection in the app, choose another ready provider family if needed, then create a fresh one-time check |
+| A cancelled task's desktop action continues | Cancellation removed future scheduling but did not forcibly stop work already in progress | Use the affected feature's own stop control when available, then review the Timeline before deleting the task |
+
+## Next Steps
+
+- Read [Jarvis-Agents](jarvis-agents) when the work needs a background worker,
+ progress tracking, review, or output files.
+- Read [Workflows and App Commands](workflows-and-commands) when you need a
+ named automation with several ordered steps instead of one task action.
+- Review [Safety and Approvals](safety-and-approvals) before allowing a task to
+ send, publish, or change external data without a live confirmation.
diff --git a/docs/product/everyday-use/voice-conversations.md b/docs/product/everyday-use/voice-conversations.md
new file mode 100644
index 0000000000..3918eb850c
--- /dev/null
+++ b/docs/product/everyday-use/voice-conversations.md
@@ -0,0 +1,162 @@
+---
+title: "Voice Conversations"
+slug: voice-conversations
+summary: "Learn how wake detection, speech recognition, the assistant, and text-to-speech form one voice turn."
+section: "Everyday use"
+section_order: 2
+order: 2
+diataxis: explanation
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [voice, microphone, wake-word, speech-recognition, text-to-speech, pipeline, realtime, language]
+related: [audio-and-wake-word, languages-and-voices, sessions-and-run-inspector, speech-dictionary]
+---
+
+A voice conversation turns spoken audio into a useful reply or action, then
+speaks the result back to you. You can start it with a wake phrase, a voice
+control in the app, or a push-to-talk shortcut.
+
+Jarvis offers two voice engines. **Pipeline** handles listening, answering, and
+speaking as separate steps. **Realtime** keeps those parts in one live audio
+session. Both lead to the same assistant and safety rules, but they differ in
+timing, available features, and how they recover from a problem.
+
+## Before You Start
+
+- Wait until the desktop app shows **Ready** instead of **Voice starting...**.
+- Make sure the selected microphone and speaker or headset work.
+- Allow microphone access when your operating system asks.
+- Open **API Keys & Providers** to review the **Voice engine** choice. Realtime
+ can be selected only when a compatible live voice service is available.
+
+You do not need to connect every service shown in the app. Pipeline can use
+separate compatible services for speech recognition, the assistant, and voice
+output. Realtime needs one compatible live voice connection for the session.
+
+> [!warning] Never speak passwords, provider credentials, recovery codes, or
+> other secrets. Enter a required credential only in **API Keys & Providers**.
+
+## How a Voice Turn Works
+
+One **turn** begins when you start speaking and ends when Jarvis finishes the
+reply or action. A **session** is the call around those turns; depending on your
+voice setup, it can contain one turn or remain open for several.
+
+1. **You activate voice.** A saved wake phrase, the app's voice control, or a
+ shortcut opens a listening session. Push-to-talk starts recording while you
+ hold the shortcut and sends the turn when you release it.
+2. **Jarvis receives microphone audio.** The app shows **Listening**. Wake
+ detection only starts the session; it is separate from understanding the
+ request that follows.
+3. **Your request becomes usable input.** Pipeline waits for the end of your
+ phrase and turns the recording into text. Realtime sends audio through the
+ live session and receives a final transcript for the turn.
+4. **The assistant handles the request.** A question can be answered directly.
+ A request that needs an action can use Jarvis tools or hand work to the
+ regular assistant. Actions still follow the same permission and confirmation
+ rules as text chat.
+5. **Jarvis prepares speech output.** Pipeline converts the finished answer
+ from text into audio. Realtime normally returns spoken audio through the
+ open session. The reply language and selected voice shape what you hear.
+6. **The turn closes or listening continues.** The app moves through
+ **Thinking** and **Speaking**, then returns to **Listening** or **Ready**.
+ The Transcription view groups the recognized request and reply under the
+ voice session.
+
+### Pipeline and Realtime Compared
+
+| Question | Pipeline | Realtime |
+|---|---|---|
+| How does it work? | Speech recognition -> assistant and tools -> speech output | One live audio session listens and replies; actions may use the regular assistant and tools |
+| Conversation feel | Clear, separate stages after you finish speaking | More immediate back-and-forth and live interruption |
+| Service choices | Input, assistant, and output can use separate compatible choices | Requires a compatible live voice choice |
+| Speech Dictionary | Applies to the recognized request | Does not currently rewrite the live session's transcript |
+| Push-to-talk | Used for push-to-talk turns | Push-to-talk currently uses Pipeline even when Realtime is selected |
+| If startup fails | The affected stage can use another configured compatible choice or report that it is unavailable | Jarvis can use another compatible live choice, then fall back to Pipeline before the turn starts |
+| Current scope | Broadest feature coverage | Research preview; some tools and features are not yet available |
+
+Choose Pipeline when you want predictable staged processing, independent
+service choices, or Dictionary corrections. Choose Realtime when you want a
+more conversational audio flow and the features you need are supported. The
+best choice depends on the request, not on a particular provider brand.
+
+## How It Fits Together
+
+Voice is a path into the same Jarvis experience you use in Chats. The features
+around it each have one distinct job:
+
+| Related feature | What it contributes | What it does not change |
+|---|---|---|
+| Audio and Wake Word | Chooses the microphone, speaker, wake phrase, and activation behavior | A wake phrase starts listening; it does not answer the request |
+| Languages and Voices | Chooses the reply language and the voice you hear | It does not repair microphone input or grant permission |
+| Speech Dictionary | Corrects names and specialist words in Pipeline speech recognition | It does not retrain wake detection or change Realtime transcripts |
+| Sessions and Run Inspector | Groups voice turns and exposes more detail about work and failures | It does not change how a request is recognized |
+| Chats | Provides a text alternative and can supply earlier conversation context when you start voice from an existing chat | It does not require voice to be available |
+
+### Language Across a Turn
+
+Jarvis decides the output language once for each turn so status phrases, the
+answer, and the speaking voice agree. A language you explicitly select wins.
+In automatic mode, a short interjection keeps the current conversation
+language; a longer request can establish a different supported language. If
+the input is unclear and there is no established conversation language, Jarvis
+uses the app's default language.
+
+Changing the language or voice engine during an active call may reconnect the
+session. The new choice then applies consistently instead of changing only one
+part of a spoken reply.
+
+### What Happens When Voice Is Unavailable
+
+Fallbacks protect the request without pretending that every path is healthy:
+
+- If a Realtime session cannot open before Jarvis has accepted the turn,
+ Jarvis can continue that call through Pipeline.
+- If Realtime fails after a request or action has already been accepted, Jarvis
+ ends the call instead of replaying the same audio and risking a duplicate
+ action. Start a new call or choose Pipeline for the next turn.
+- If speech recognition, the assistant, or speech output is unavailable,
+ Jarvis can use another configured compatible option where one exists. When
+ none is usable, the app reports the unavailable part rather than claiming the
+ turn succeeded.
+- If no voice path remains, continue in **Chats** while you review audio,
+ permissions, or provider status.
+
+## Check That It Works
+
+1. Start a voice session with your wake phrase or the app's voice control.
+2. Ask one short question and watch for **Listening**, then **Thinking** or
+ **Speaking**.
+3. Confirm that you hear a relevant reply and the app returns to **Ready** or
+ **Listening**.
+4. Open **Transcription** and confirm that the session contains your recognized
+ request and the assistant reply.
+
+When testing Realtime, keep the call open long enough to review the runtime
+line under **API Keys & Providers > Voice engine**. It shows whether the active
+session is Realtime, Pipeline, or a Pipeline fallback.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| The wake phrase does nothing | Wake activation, its language, or the microphone is not ready | Run **Test wake word**, then use the app's voice control or push-to-talk while you review the wake setup |
+| **Listening** appears, but the request is wrong or empty | The wrong microphone is selected, the level is too low, or speech recognition could not understand the turn | Check **Audio devices**, try one short request, and add repeated Pipeline mistakes to **Dictionary** |
+| Realtime is selected, but the runtime line says Pipeline | No compatible live session could open for this call | Review the Realtime category in **API Keys & Providers**; keep using the working Pipeline fallback or choose Pipeline explicitly |
+| A Realtime call ends after an error | The live path failed after Jarvis had already accepted part of the turn | Start a fresh call; use Pipeline if the failure repeats so Jarvis does not replay a possible action |
+| **Speaking** appears, but there is no sound | The output device, volume, or speech-output service is unavailable | Check **Audio devices** and system volume, then test another configured compatible voice output |
+| The reply uses the wrong language | The reply language is pinned differently, or automatic detection had too little context | Review **Languages**, then try a complete sentence in the language you want |
+
+## Next Steps
+
+- Read [Audio and Wake Word](audio-and-wake-word) to choose devices, set up
+ activation, and test a wake phrase.
+- Read [Languages and Voices](languages-and-voices) to control the language and
+ speaking voice used across the whole turn.
+- Read [Speech Dictionary](speech-dictionary) to correct recurring Pipeline
+ recognition mistakes without changing the wake phrase.
+- Read [Sessions and Run Inspector](sessions-and-run-inspector) to understand
+ saved voice turns and investigate a request that did not finish as expected.
diff --git a/docs/product/extend-and-automate/cli-connections.md b/docs/product/extend-and-automate/cli-connections.md
new file mode 100644
index 0000000000..891941f8f4
--- /dev/null
+++ b/docs/product/extend-and-automate/cli-connections.md
@@ -0,0 +1,232 @@
+---
+title: "CLI Connections"
+slug: cli-connections
+summary: "Let Jarvis discover command-line tools, check their readiness, and use only the capabilities available on the current computer."
+section: "Extend and automate"
+section_order: 5
+order: 5
+diataxis: howto
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [cli, connections, terminal, tools, automation, safety]
+related: [skills, workflows-and-commands, cli-reference, safety-and-approvals]
+---
+
+A command-line interface (CLI) connection lets Jarvis use a trusted terminal
+program that is installed on the same computer. Jarvis finds the program,
+checks whether its account is ready, and exposes it as a tool for matching chat,
+voice, and test requests.
+
+This is different from the **Jarvis CLI**. A CLI connection gives Jarvis access
+to another program and its commands. The Jarvis CLI controls Personal Jarvis
+itself; its commands are listed in the [CLI Reference](cli-reference).
+
+## Before You Start
+
+- Use a program and account that you trust. The connected program runs with
+ your operating-system account and can reach whatever its own sign-in permits.
+- Install any package manager required by the selected installation method.
+ Jarvis shows the command, but it does not verify that the package manager is
+ present before opening the terminal.
+- Configure a Brain provider that supports tool use before testing a natural-
+ language instruction. You can still browse and recheck the catalog without
+ one.
+- Keep the third-party service's permission set as narrow as your work allows.
+
+> [!warning]
+> Enter a credential only in the protected connection dialog. Never put it in
+> chat, voice input, the CLI Test Hub instruction, a custom command, or a
+> screenshot. Full commands appear in local usage history.
+
+The current **Install in terminal** and **Browser Login** actions open Windows
+Terminal or PowerShell on the computer running Jarvis. On macOS, Linux, or a
+headless server, install and sign in with the program's official terminal
+instructions, then let Jarvis recheck it. Discovery and non-interactive use can
+work on those systems when the executable is on the process path.
+
+## Connect a Command-Line Tool
+
+The shortest path is:
+
+| Stage | What you do | Visible result |
+|---|---|---|
+| Discover | Open **CLIs** | The catalog shows what this computer has installed |
+| Install | Choose a supported method when needed | The program finishes in an external terminal |
+| Sign in | Complete browser login or use the protected key form | The program has access to the selected account |
+| Recheck | Use **Recheck status** | The row changes to **Connected** when both checks pass |
+| Use | Run a read-only request | Jarvis shows the chosen command and its result |
+
+### Find and Inspect a Tool
+
+1. Open **CLIs** from the sidebar, then choose the **CLIs** tab. Jarvis lists
+ the packaged catalog plus any custom entries saved on this computer.
+2. Use **All**, **Connected**, **Installed**, **Custom**, or a category filter
+ to narrow the list. The counts describe the current catalog, not programs
+ available on another computer.
+3. Select a row to open its detail panel. Review the executable path, version,
+ sign-in method, status check, default safety tier, and official
+ documentation link before connecting it.
+
+The status labels describe two separate checks:
+
+| Status | Meaning |
+|---|---|
+| **Checking** | Jarvis has not finished its local check |
+| **Not installed** | The expected executable was not found on the process path |
+| **Disconnected** | The executable was found, but its sign-in check did not pass |
+| **Connected** | The program is installed and considered ready for Jarvis to use |
+| **Error** | The check could not complete normally; open the row for the reported cause |
+
+The header's reload button fetches the latest cached list. To inspect the
+computer again after an install or sign-in change, select the tool and use
+**Recheck status**.
+
+### Install the Program
+
+1. Select a row marked **Not installed**, then choose **Install**. If no
+ install button appears, use the linked official documentation.
+2. Review the selected package manager and the exact command. The current
+ dialog preselects the first available method, so choose another one when
+ that better matches your computer.
+3. Choose **Install in terminal**. For a manual method, Jarvis opens the
+ publisher's installation page instead.
+4. Finish the installation in the external terminal, then return to **CLIs**
+ and choose **Recheck status**. A successful check shows a version when the
+ program reports one.
+
+Installing through this screen changes software on the host computer. It does
+not yet authorize an external account, and removing a custom catalog entry
+later does not uninstall the program.
+
+### Complete the Matching Sign-In
+
+The detail panel offers only the sign-in action declared for that program.
+
+| Sign-in type | What happens |
+|---|---|
+| **Browser Login** | Jarvis opens the program's login command in an external terminal. Complete the browser or device flow and leave Jarvis running while it checks in the background for up to about five minutes. |
+| **API key** | **Set API Key** opens password fields. **Save and validate** tests the values, then stores them through Jarvis's protected credential storage when the check succeeds. |
+| **Existing configuration** | The program reads its own configuration file. No Jarvis sign-in button appears, and installation alone may show **Connected**, so verify access with a read-only request. |
+| **No sign-in** | Finding the installed executable is enough for the row to become **Connected**. |
+
+OAuth-style browser login and existing configuration remain owned by the
+third-party program. Jarvis stores an API key entered through the protected
+form and passes it to that program as an environment value when it runs.
+**Disconnect** removes the local Jarvis credential or runs the program's logout
+command when one is defined; revoke access in the service's account settings as
+well when you need complete removal.
+
+### Test and Use the Connection
+
+1. Choose **Recheck status** and confirm that the row says **Connected**.
+ Jarvis adds a ready tool to the live assistant without an app restart.
+2. Open **CLI Test Hub**. Type one small, read-only instruction. You can let
+ Jarvis choose a connected tool or select a CLI hint to narrow the choice.
+3. Choose **Run**, or press Control+Enter on Windows and Linux or
+ Command+Enter on macOS. Review the selected tool, exact command, safety
+ tier, exit code, program output, error output, duration, and Jarvis summary.
+4. Ask for the same kind of result in chat or by voice. Naming the service and
+ the read-only outcome you want helps Jarvis choose the intended tool.
+5. Select **History** on the CLI row to review calls, success rate, duration,
+ caller, and short error previews. **Clear** deletes that tool's local usage
+ history after confirmation.
+
+An exit code of `0` means the program reported success. Other values mean the
+program rejected or could not complete the command; read its error output
+before retrying. Jarvis does not keep full command output in usage history,
+but it does retain the full command, output lengths, and a scrubbed error
+preview. Do not pass credentials as command arguments.
+
+CLI execution is non-interactive. A command that waits for a password,
+confirmation prompt, or other terminal input fails or times out. Complete
+interactive setup in a real terminal first, then use non-interactive commands
+through Jarvis.
+
+### Add a Trusted Custom CLI
+
+Use **Add Custom** only when the program is not in the packaged catalog and
+you understand its commands and authorization model.
+
+1. In step 1, enter a stable lowercase ID, display name, executable name,
+ description, category, and official homepage.
+2. In step 2, enter a harmless check such as the program's version command and
+ a version-matching pattern. The executable name must match the first word of
+ every command Jarvis will run.
+3. In step 3, choose the real sign-in type and provide only command names and
+ credential-slot names. Enter credential values later in the protected
+ connection dialog.
+4. In step 4, choose the default safety tier. Add block patterns for commands
+ Jarvis must never run. Add allow patterns only for narrow, well-understood
+ read-only commands because a matching allow pattern can make a call safe.
+5. Save the entry, select it in the **Custom** filter, and use **Recheck
+ status**. Remove it with the trash button if the definition is wrong.
+
+A block pattern takes priority over an allow pattern; an allow pattern takes
+priority over the default tier. A custom definition is local metadata, not a
+review or endorsement of the program. Removing it does not uninstall the
+binary, revoke the external account, or erase that program's own files.
+
+## How It Fits Together
+
+A normal request follows this path:
+
+1. Jarvis probes the current computer and exposes only CLIs considered usable.
+2. Your chat, voice, or Test Hub instruction is matched to a connected tool.
+3. Jarvis chooses a command, then evaluates its catalog rules and the global
+ safety policy.
+4. The approved command runs as a local, non-interactive subprocess. Its
+ credential stays in Jarvis or the third-party program rather than entering
+ the conversation.
+5. Jarvis summarizes the real result and records a local usage entry.
+
+| Related feature | Relationship to a CLI connection |
+|---|---|
+| [Skills](skills) | A skill can teach Jarvis a repeatable way to use a connected CLI; it does not install or authorize the program. |
+| [Workflows and Commands](workflows-and-commands) | A Jarvis command is one stable app operation. A CLI connection exposes an external program whose subcommand is chosen for the request. |
+| [Plugins](plugins) | A plugin is a packaged service connection that may not need a local executable. When both cover the same live-data domain, Jarvis generally prefers the connected local CLI. If that CLI command fails, Jarvis reports the failure instead of silently changing services. |
+| [MCP Connections](mcp-connections) | A Model Context Protocol server advertises a collection of tools over a standard connection. A CLI connection discovers one installed program and runs its commands locally. |
+| [Jarvis-Agents](jarvis-agents) | Connected CLI tools work in the live assistant, but the general CLI catalog is not currently granted automatically to background Jarvis-Agent missions. Use a specifically supported mission connection rather than assuming the worker has the CLI. |
+| [Credentials and Secrets](credentials-and-secrets) | Jarvis stores protected API-key values; browser-login and configuration files remain under the external program's own storage rules. |
+| [Safety and Approvals](safety-and-approvals) | Service permissions decide what the account can do. Jarvis separately decides whether a proposed command runs, is logged, asks for approval, or stays blocked. |
+
+Disconnecting one CLI removes that tool from new assistant requests without
+stopping other connected tools. If no connected CLI covers a request, a
+relevant plugin or MCP tool may still be available. Jarvis does not invent
+external data when every suitable connection is unavailable.
+
+## Check That It Works
+
+1. Select one row that says **Connected** and open **CLI Test Hub**.
+2. Choose that CLI as the hint and ask it to report its installed version
+ without changing anything.
+3. Confirm that the result names the selected tool, shows the exact version
+ command, and reports exit code `0` with a version in the program output.
+4. Return to the CLI row and open **History**. A new successful entry for that
+ command confirms discovery, tool exposure, execution, and usage logging.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| **Not installed** remains after installation | The cached status was reloaded, or the executable is not on the path visible to Jarvis | Finish the installer, restart Jarvis only if the installer changed the process path, then use **Recheck status** |
+| **Browser Login** does not open a terminal | The host is not Windows, is headless, or has no supported Windows terminal | Use the program's official install and login commands in a terminal on that host, then recheck it in Jarvis |
+| The browser login finishes but the row stays **Disconnected** | The program's account check did not pass, or its five-minute background wait ended | Confirm the login in the external terminal, keep the intended account active, and choose **Recheck status** |
+| A row says **Connected**, but the command fails | Existing-configuration tools can look ready before real access is proved, the account lacks permission, or the command expects input | Run one official read-only status command in a real terminal, fix the program's own sign-in or permissions, then retry a non-interactive request |
+| Test Hub reports no CLI tool, a Brain error, or a blocked command | No connected tool matched, the active Brain cannot call tools, or safety refused the command | Recheck the CLI, select it as the hint, verify the Brain provider, and review the command's risk rules before changing them |
+
+For repeated backend, credential, or process failures, continue with the main
+[Troubleshooting](troubleshooting) guide.
+
+## Next Steps
+
+- Read [Skills](skills) to give Jarvis a repeatable method for an already
+ connected command-line tool.
+- Read [Workflows and Commands](workflows-and-commands) when you need a stable
+ Personal Jarvis operation rather than an external program's command set.
+- Use the [CLI Reference](cli-reference) to manage connections from a terminal
+ or a headless host and to understand common Jarvis CLI flags.
+- Review [Safety and Approvals](safety-and-approvals) before allowing commands
+ that create, publish, update, or delete external resources.
diff --git a/docs/product/extend-and-automate/computer-use.md b/docs/product/extend-and-automate/computer-use.md
new file mode 100644
index 0000000000..088d252579
--- /dev/null
+++ b/docs/product/extend-and-automate/computer-use.md
@@ -0,0 +1,192 @@
+---
+title: "Computer Use"
+slug: computer-use
+summary: "Understand how Jarvis sees and operates desktop apps, when it asks for confirmation, and how to stop or recover a run."
+section: "Extend and automate"
+section_order: 5
+order: 6
+diataxis: howto
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [computer-use, desktop, vision, permissions, safety, providers]
+related: [permissions, safety-and-approvals, jarvis-agents, platform-support]
+---
+
+Computer Use lets Jarvis operate the desktop interface you can see. It can
+open or switch apps, click controls, type into fields, press keys, scroll, and
+drag when an app does not offer a direct connection.
+
+Jarvis works in a loop: it captures the target window, chooses an action,
+performs it, and checks the visible result. This makes a run more careful than
+a blind sequence of clicks, but it does not make the result infallible. Watch
+the screen and start with a small, reversible task.
+
+## Before You Start
+
+- Use a real desktop session. Computer Use is implemented for Windows, macOS,
+ and Linux desktops using X11, but its availability depends on the permissions
+ and controls exposed by that computer. The project does not yet have a dated
+ live macOS or Linux GUI sign-off, so test one harmless action on the actual
+ desktop before relying on it. Wayland and servers without a display refuse
+ mouse and keyboard input. Read [Platform Support](platform-support) for the
+ current verification record.
+- Open **API Keys & Providers > Tool Model**. Connect a provider, choose a
+ model that understands images, select **Set active**, and run the card's
+ test. The Tool Model is separate from the model that writes chat replies.
+- On macOS, open **Settings > Privacy permissions > macOS permissions** and
+ grant **Screen Recording**, **Accessibility**, and **Input Control**. Restart
+ the app when the permission view asks you to do so.
+- Check the provider's usage terms and billing. A multi-step desktop task can
+ make several model calls with screenshots.
+
+> [!note] Computer Use is off in a fresh installation, and the current desktop
+> app does not provide an on/off control. If Jarvis reports that desktop
+> control is off, the person managing the installation must enable it and
+> restart Jarvis. The [Configuration Reference](configuration-reference)
+> identifies the setting; credentials still belong only in protected fields in
+> the app.
+
+> [!warning] A captured window can contain private information. Computer Use
+> stores captured frames in the local flight recorder and sends the working
+> screenshot to a compatible Tool Model. If the selected provider is
+> unavailable, a configured compatible fallback may receive it instead. Close
+> unrelated private windows and never include a password, API key, token, or
+> recovery code in the request.
+
+## What Computer Use Can See and Do
+
+| Part | Current behavior | Boundary |
+|---|---|---|
+| **View** | Captures the current target window and reads available accessibility labels | Hidden windows and off-screen content are not visible until Jarvis brings them forward or scrolls |
+| **Pointer** | Clicks, double-clicks, scrolls, and drags | A display or foreground-window change makes Jarvis discard stale coordinates and look again |
+| **Keyboard** | Types text and sends keys or shortcuts to the focused control | Text can land in the wrong place if focus changes; Jarvis checks editable fields when the operating system exposes them |
+| **Apps** | Opens an installed app or switches to an existing window | It cannot operate an app that is absent, blocked, or running with incompatible system privileges |
+| **Verification** | Looks again after actions and stops after repeated misses, no progress, timeout, or the step limit | A visible change is evidence, not proof that an external transaction was correct |
+| **Sensitive screens** | Stops when it detects a password field, two-factor prompt, or human-verification challenge | Complete that step yourself, then give Jarvis a new request |
+
+## Run a Bounded Desktop Task
+
+1. **Prepare the target.** Close unrelated private windows and bring the app
+ you want to use to the foreground. Keep login, payment, deletion, sending,
+ and publishing steps for yourself.
+
+2. **State one observable goal.** Name the app, the action, and the result that
+ should be visible. For example: “Open the system calculator, enter 25 times
+ 4, and stop when 100 is visible.” Do not include information that should not
+ appear in a screenshot, transcript, or provider request.
+
+3. **Wait for the acknowledgement.** Jarvis confirms that it will handle the
+ task on screen, then continues in the background. Do not start a second
+ desktop goal until the first one finishes; different goals can currently
+ overlap.
+
+4. **Watch without changing the target.** Jarvis may open an app, capture a
+ fresh view, perform one or a few related actions, and capture again. Avoid
+ switching windows, moving the target between displays, or typing into the
+ same app while a step is in progress.
+
+5. **Handle any human-only screen.** When Jarvis recognizes a password,
+ two-factor, or human-verification prompt, it stops. Complete that step
+ manually, make the intended app active again, and send a smaller follow-up
+ request.
+
+6. **Check the completion message and the screen.** Jarvis reports success
+ only after a final visual check. Confirm the actual app state yourself,
+ especially when the result affects another person, an account, or money.
+
+### Understand Confirmations
+
+Every desktop action passes through Jarvis's safety layer, where a blocked
+policy stops it. The current Computer Use mouse and keyboard actions are
+classified as **safe** or **monitor**. Because the default approval policy asks
+only for **ask** actions, a normal Computer Use run does not show a confirmation
+before each click or typed value.
+
+If the surrounding request reaches a separate **ask** action, Jarvis waits for
+approval and does not run that action after a denial or approval timeout.
+Jarvis cannot reliably infer the real-world consequence of every on-screen
+button from its label. Treat Computer Use as supervised control, not as a safe
+way to approve purchases, delete data, send messages, or publish content.
+
+## Stop and Recover a Run
+
+- During a voice-started run, say **hang up** or use the close control on the
+ Jarvis Bar. This cancels every active Computer Use run without cancelling a
+ separate Jarvis-Agent mission.
+- A text-started run currently has no dedicated **Cancel Computer Use** button.
+ If the Jarvis Bar cannot end it and you need an immediate stop, exit Personal
+ Jarvis. Reopen it only after checking what already changed.
+- Moving the pointer into a screen corner is not a supported stop control in
+ the current engine.
+- Cancellation prevents later steps after the stop is observed; it cannot undo
+ a click, keystroke, or submission that already finished. Inspect the app,
+ undo the change manually when possible, then retry with a narrower goal.
+
+## How It Fits Together
+
+1. A chat, voice request, workflow, or [Skill](skills) describes the goal. A
+ simple app launch or shortcut can use a fast local action; a visual or
+ ambiguous target goes to Computer Use.
+2. Computer Use captures the target window and asks the active, image-capable
+ Tool Model for the next action. If that provider is unavailable, Jarvis can
+ try another configured provider family that can see images. Learn how those
+ choices are separated in [Providers and API Keys](providers-and-api-keys).
+3. [App Permissions](permissions) decide whether Jarvis can capture the screen
+ and send input. [Safety and Approvals](safety-and-approvals) evaluates each
+ proposed action before the operating system receives it.
+4. Jarvis performs the action, captures a fresh view, and verifies the visible
+ effect. A recorded voice turn can show a **Computer-Use** badge and action
+ evidence in [Sessions and Run Inspector](sessions-and-run-inspector).
+5. A [Jarvis-Agent](jarvis-agents) handles longer work in an isolated project
+ workspace; it does not replace Computer Use for the live desktop. Prefer an
+ [MCP connection](mcp-connections) or [CLI connection](cli-connections) when
+ a service offers a structured action that avoids visual clicking.
+6. A file saved through a desktop app remains an ordinary file in the place
+ that app chose. It does not become an [Outputs](outputs-and-files) card
+ unless a Jarvis-Agent mission created and archived it.
+
+## Check That It Works
+
+1. Use a non-private desktop with no login prompts open.
+2. Ask Jarvis to open the system calculator, enter 25 times 4, and stop when
+ 100 is visible.
+3. Watch for the calculator to open and show **100** without taking control of
+ the keyboard or pointer during the run.
+4. Confirm that Jarvis sends a completion message after the visible result.
+ If you started by voice and session recording is active, open **Run
+ Inspector** and look for the **Computer-Use** badge on that turn.
+
+Computer Use is working when the requested visible state is correct and the
+completion message arrives after that state appears, not before it.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| Jarvis says Computer Use is not active | The feature is still off, or its screen engine could not start | Have the installation manager enable Computer Use, restart Jarvis, and repeat the harmless calculator check |
+| Jarvis says no model can see the screen | The Tool Model is missing, text-only, out of credit, rate limited, or unavailable across all compatible fallbacks | Open **API Keys & Providers > Tool Model**, test a connected image-capable model, and activate a healthy option |
+| Jarvis cannot see or control the screen on macOS | Screen Recording, Accessibility, or Input Control is missing, belongs to an older app identity, or needs a restart | Open **Settings > Privacy permissions > macOS permissions**, grant each listed item, use **Restart now** when shown, then try again |
+| Linux reports Wayland or no display | The session blocks synthetic input, or Jarvis is running without a desktop | Sign in to an X11 desktop session; use structured connections instead on a headless server |
+| The pointer moves but the app does not react | Focus changed, the display layout changed, the target is an elevated Windows window, or the control did not expose a usable effect | Bring a normal non-administrator instance of the app forward, keep the display layout stable, and retry one clearly named control |
+| Jarvis stops at a login or verification page | It detected a password, two-factor, or human-verification step | Complete the sensitive step yourself, return to the intended app, and send a new request without the credential |
+| Jarvis reports no progress, too many steps, or an action failure | The goal is too broad, the interface changed, or repeated actions did not produce a verifiable result | Check the screen manually and retry one shorter goal that names the visible control and expected result |
+
+For a failure that affects other app areas as well, use the main
+[Troubleshooting](troubleshooting) guide instead of repeatedly retrying the
+same desktop action.
+
+## Next Steps
+
+- Review [App Permissions](permissions) to grant only the screen and input
+ access required on your platform.
+- Check [Platform Support](platform-support) for the verified operating-system
+ paths and the desktop checks that still depend on the current host.
+- Read [Safety and Approvals](safety-and-approvals) to understand monitored,
+ confirmed, and blocked actions before relying on automation.
+- Learn when to use [Jarvis-Agents](jarvis-agents) for longer work that should
+ run outside the live desktop.
+- Use [Troubleshooting](troubleshooting) when provider health, app startup, or
+ several features fail together.
diff --git a/docs/product/extend-and-automate/jarvis-agents.md b/docs/product/extend-and-automate/jarvis-agents.md
new file mode 100644
index 0000000000..cceab7ffbd
--- /dev/null
+++ b/docs/product/extend-and-automate/jarvis-agents.md
@@ -0,0 +1,195 @@
+---
+title: "Jarvis-Agents"
+slug: jarvis-agents
+summary: "Learn when Jarvis delegates longer work, how missions and workers fit together, and how to follow progress and results."
+section: "Extend and automate"
+section_order: 5
+order: 1
+diataxis: explanation
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [jarvis-agents, missions, workers, outputs, safety, automation]
+related: [tasks-and-reminders, outputs-and-files, skills, safety-and-approvals]
+---
+
+Jarvis-Agents handle substantial work in the background, such as building a
+file, changing a project, or producing a researched report. Jarvis can hand off
+that work without keeping your chat or voice conversation blocked for the full
+run.
+
+A **Jarvis-Agent** is the worker role that does the job. A **mission** is the
+saved job around it: your request, its progress, the review, the final status,
+and any output files. Ordinary questions and quick actions should stay in the
+main conversation; a mission is for work that genuinely needs more time or
+several steps.
+
+## Before You Start
+
+- Open **API Keys > Jarvis-Agents** and make sure one provider card shows
+ **Active**. A subscription login or a dedicated provider key can power the
+ worker. Enter credentials only in the protected fields on that page, never in
+ chat, voice, a mission request, or an output file.
+- If the app says a provider or model change becomes active after a restart,
+ restart before testing a new mission. Work already running keeps the worker
+ it started with.
+- The current mission runner needs Git and a source checkout because every
+ mission receives an isolated working copy. A setup without either one can
+ fail before a worker begins, including for some non-code requests.
+- Connect an external service before asking a Jarvis-Agent to use it. A
+ connected service does not automatically grant every action to every mission.
+
+## Start and Follow a Mission
+
+1. **Ask for a concrete deliverable in Chats or by voice.** State what should
+ be produced and how you will judge it. For example, ask for a short report
+ saved as a Markdown file, with the sources and comparison criteria named in
+ the request.
+
+2. **Listen or look for the handoff.** When Jarvis delegates the request, its
+ acknowledgement names a **Jarvis-Agent** and explains that the work is now
+ running in the background. You can continue using the main conversation.
+
+3. **Open Jarvis-Agents from the sidebar.** The operations board shows the
+ number of active, finished, and failed missions. A row identifies the task,
+ current status, elapsed time, recorded tool-call count, and result summary
+ when one is available.
+
+4. **Expand the mission row.** If details were recorded, you can inspect tool
+ names, short argument or result previews, context hints, and the mission's
+ current result. A mission can remain **ACTIVE** while its work is being
+ reviewed or corrected; active does not always mean the worker is still
+ writing.
+
+5. **Open Outputs for the retained result.** Jarvis-Agents is a live monitor:
+ completed and failed rows normally leave the board after about one minute.
+ **Outputs** keeps the mission card, status, summary, and approved deliverable
+ files until normal startup cleanup removes mission folders older than 14
+ days. Use the file preview there before opening a generated file elsewhere.
+ Approved files are normally copied to a separate user-visible output folder
+ for longer use.
+
+6. **Stop or retry from Outputs when needed.** Hold **Abort mission** on a
+ running card to cancel its mission and worker process. A cancelled card can
+ be continued, while a failed or timed-out card can be restarted. Either
+ action creates a linked new mission and keeps the old attempt until its
+ mission folder reaches the same cleanup boundary.
+
+> [!warning] **Clear** on the Jarvis-Agents board only clears the current board
+> display. It does not cancel work, delete output, or remove the saved mission.
+> An active item can appear again when the board refreshes.
+
+## What Happens During the Work
+
+| Stage | What Jarvis does | What you can observe |
+|---|---|---|
+| **Handoff** | Saves the request as a mission and releases the conversation | A Jarvis-Agent acknowledgement and an active board row |
+| **Plan** | Turns the request into one or more bounded work steps | The task remains active; detailed plans are not shown on the live board |
+| **Isolated work** | Gives each mission step an isolated Git working copy and only the capabilities selected for the mission | Runtime, worker activity, and some tool previews when recorded |
+| **Review** | Checks the draft against the request and can ask for a correction | The row stays active while another attempt runs |
+| **Finish** | Approves the result or records a failure, cancellation, or timeout | **DONE** or **FAILED**, followed by a persistent Outputs card |
+
+The review can make up to three passes. Reaching the limit does not turn an
+unfinished result into success: the mission fails and keeps any safe partial
+artifacts that were archived. A worker timeout with usable work can still be
+reviewed; a timeout with no usable result can trigger another attempt.
+
+The selected Jarvis-Agent provider is the first choice. If that provider is
+unavailable and another configured provider family is reachable, Jarvis can
+move the work to that family. If no compatible worker is reachable, the
+mission fails honestly instead of pretending to have completed.
+
+### Tools, Connections, and Permissions
+
+A Jarvis-Agent does not receive unrestricted access to the app or your
+computer. It gets a short-lived, mission-specific list of approved
+capabilities. Read-only Wiki tools, explicitly allowed app commands, and tools
+from selected connections can be offered through the main Jarvis process.
+Connection credentials stay with that supervisor path; they are not copied
+into the mission prompt or reported on the operations board.
+
+Every connected action still passes the normal safety policy. Safe actions can
+run, monitored actions are recorded, confirmation-level actions can pause for a
+decision, and blocked actions stay blocked. A Jarvis-Agent cannot start another
+Jarvis-Agent, run a skill recursively, reveal credentials, or change protected
+configuration through its worker tool set.
+
+> [!note] The current **Jarvis-Agents** board is a monitor, not the full mission
+> control screen. It cannot start or cancel missions, reopen older history, or
+> decide a paused supervisor tool approval. Until approval controls are exposed
+> there, avoid unattended mission requests that depend on a confirmation-level
+> external action; ask for a local draft or read-only result instead.
+
+## How It Fits Together
+
+1. **Chats or voice starts the handoff.** Jarvis answers simple work directly
+ and delegates only a substantial build or multi-step request. A voice
+ session can record that the handoff happened, but the later mission has its
+ own lifecycle.
+2. **A Skill can supply repeatable instructions.** A skill marked for mission
+ execution can turn those instructions into a Jarvis-Agent request. The skill
+ defines the method; the mission owns the isolated work and review. Read
+ [Skills](skills) to understand draft, enabled, inline, and mission skills.
+3. **Tools and connections supply selected capabilities.** A mission can use
+ only the connection and app-command grants made available to it. Safety
+ checks remain in the supervisor, outside the worker's isolated process.
+4. **The reviewer decides whether the work is ready.** Failed tool calls,
+ unfinished files, and rejected drafts cannot be hidden by a confident worker
+ summary. The mission either reaches approval or records a terminal problem.
+5. **Outputs receives the retained result.** The live board is temporary;
+ [Outputs and Files](outputs-and-files) is where you preview deliverables,
+ cancel a run, or start a linked retry while the mission folder remains.
+ Keep the separate delivered copy for anything you need beyond 14 days.
+6. **Tasks can wait for the outcome.** A When-Then task can react when a
+ mission succeeds, fails, or is cancelled. A normal scheduled task does not
+ automatically gain a Jarvis-Agent's isolated workspace or review loop. Read
+ [Tasks and Reminders](tasks-and-reminders) before relying on event-based
+ automation.
+7. **Sessions preserve the starting conversation, not the whole mission.** Run
+ Inspector may show that a voice turn started a Jarvis-Agent. Later worker
+ events and generated files remain under Jarvis-Agents and Outputs.
+
+## Check That It Works
+
+1. Confirm that one card under **API Keys > Jarvis-Agents** is **Active** and
+ that the Jarvis-Agents view shows no provider error banner.
+2. In Chats, ask a Jarvis-Agent to create a small Markdown file containing a
+ three-item, non-sensitive checklist and a one-sentence introduction.
+3. Confirm that Jarvis acknowledges the handoff, then open **Jarvis-Agents** and
+ find one **ACTIVE** row matching the request.
+4. Wait for **DONE**, then open **Outputs**. Confirm that the newest card shows
+ **success** and that the Markdown file can be previewed.
+
+The path works when the request produces one mission, the live row reaches a
+terminal state, and the approved file can be previewed in Outputs and found in
+the separate user-visible output folder. A spoken completion is helpful but is
+not a file record. The in-app mission card is normally removed after its folder
+passes the 14-day startup-cleanup boundary.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| Jarvis answers directly and no mission appears | The request looked like a quick question or single action | Ask for a concrete multi-step deliverable and explicitly request a background Jarvis-Agent |
+| **No Jarvis-Agent provider is reachable** | The active worker login or key is missing, expired, out of quota, or unavailable, and no fallback family is ready | Open **API Keys > Jarvis-Agents**, reconnect or add a different provider family, set it active, and restart if prompted |
+| The board is empty after a completed run | Finished rows are temporary, or the live connection refreshed after the row expired | Open **Outputs** for the retained mission and files; do not use the board as history |
+| A mission stays **ACTIVE** for a long time | It may be queued, reviewing a draft, correcting work, or waiting on a slow provider | Check the health banner and Outputs status; hold **Abort mission** in Outputs if you no longer want the run |
+| The mission fails before a worker starts | Git, the source checkout, the mission service, or the worker program is unavailable | Use the supported installer, confirm the app starts from a Git checkout, restart normally, and try one small file task |
+| Work pauses or fails around an external action | The tool needed approval, was not granted to the mission, or was blocked | Never paste a credential into the request; cancel and retry with a read-only or local-draft goal, or perform the external action yourself |
+| The result has a summary but no file | The request was informational, no deliverable was archived, or the worker failed before saving it | Ask for a named file and success criteria, then use **Restart** only after fixing the recorded failure |
+
+For repeated startup, provider, or connection failures, follow the main
+[Troubleshooting](troubleshooting) guide.
+
+## Next Steps
+
+- Read [Outputs and Files](outputs-and-files) to preview approved deliverables,
+ stop active work, and continue or restart a mission safely.
+- Read [Skills](skills) to turn repeatable instructions into inline work or a
+ reviewed background mission.
+- Read [Tasks and Reminders](tasks-and-reminders) to schedule an action or react
+ to a mission's final state.
+- Review [Safety and Approvals](safety-and-approvals) before letting a mission
+ use connected services or make changes outside its isolated files.
diff --git a/docs/product/extend-and-automate/mcp-connections.md b/docs/product/extend-and-automate/mcp-connections.md
new file mode 100644
index 0000000000..489607cf1b
--- /dev/null
+++ b/docs/product/extend-and-automate/mcp-connections.md
@@ -0,0 +1,183 @@
+---
+title: "MCP Connections"
+slug: mcp-connections
+summary: "Add and inspect Model Context Protocol servers, then understand how their tools become available safely."
+section: "Extend and automate"
+section_order: 5
+order: 4
+diataxis: howto
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [mcp, connections, tools, integrations, safety]
+related: [plugins, skills, credentials-and-secrets, safety-and-approvals]
+---
+
+Model Context Protocol (MCP) is a standard that lets an external tool server
+describe the actions it offers. Connect a trusted server and Jarvis can make
+those actions available for relevant chat, voice, and delegated work.
+
+An MCP connection is powerful: a local server runs software on your computer,
+while a remote server can receive the information sent with a tool request.
+Connect only servers you trust and give each one the smallest useful access.
+
+## Before You Start
+
+- Get the server configuration from its publisher's current documentation.
+ Jarvis does not ship a built-in MCP catalog or automatically verify a server
+ package for you.
+- Check whether the server uses **stdio**, which starts a local command, or
+ **streamable HTTP**, which connects to a remote URL. Install the required
+ launcher for a local server before connecting it.
+- Decide which folders, accounts, and write actions the server should reach.
+ A local server runs with your operating-system account and inherits the
+ environment available to Jarvis.
+- Prefer a [Plugin](plugins) when the same service appears in **Plugins**. A
+ plugin provides a guided sign-in flow and protected credential storage.
+
+> [!warning]
+> Never put a password, token, API key, or authorization value directly in
+> `mcp.json`, chat, voice input, or a screenshot. The MCP view has no general
+> credential form for arbitrary custom servers today.
+
+## Add a Connection
+
+### Add a Server Manually
+
+1. Open **MCPs**, then select **Open mcp.json**. Jarvis opens its built-in JSON
+ editor.
+2. Add the server under `mcpServers` using the exact command or URL supplied by
+ the publisher. Keep `enabled` set to `false` while you review it.
+
+ This minimal shape starts a local server; replace the sample package name
+ with the publisher's real package name, not a credential:
+
+ ```json
+ {
+ "mcpServers": {
+ "trusted-local-server": {
+ "command": "npx",
+ "args": ["-y", "publisher-package-name"],
+ "enabled": false
+ }
+ }
+ }
+ ```
+
+3. Select **Save**. The server appears in the MCP list as disconnected; saving
+ the file does not grant access or start it.
+4. Review the server name and configuration one more time, then turn on its
+ switch. Jarvis starts the local command or opens the remote connection,
+ completes the MCP handshake, and asks the server for its tool list.
+5. Look for **connected**. Jarvis saves the enabled state only after the
+ connection succeeds. If the check fails, the server stays disabled and the
+ status changes to **error**.
+
+For a remote server, use the publisher's streamable-HTTP configuration with a
+`url` and `transport` set to `http`. Add authorization headers only when they
+refer to a credential that is already stored safely. If the service needs a
+new token and is not available as a plugin, the current MCP screen cannot
+complete that credential setup safely; do not work around this by storing the
+token in the JSON file.
+
+### Import from Claude Desktop
+
+On Windows, **Import Claude Desktop config** reads the MCP servers from the
+standard Claude Desktop configuration on the same account.
+
+1. Review the Claude Desktop configuration first. Import copies each new
+ server, including its environment entries, so do not import a file that
+ contains raw credentials.
+2. Select **Import Claude Desktop config**. Existing Jarvis entries with the
+ same name are left unchanged.
+3. Review each imported entry in **Open mcp.json**. Imported servers start
+ disabled.
+4. Turn on one server at a time and confirm that it reaches **connected**.
+
+The import button currently looks only in the Windows Claude Desktop location.
+On macOS, Linux, or a computer without that file, add the server manually.
+
+## Understand Access and Tool Exposure
+
+| Boundary | What it controls | What you should know |
+|---|---|---|
+| Server configuration | Which program or URL Jarvis connects to | Enabling a local server allows its process to run with your user permissions |
+| Service authorization | Which external account data the server can read or change | This is separate from the keys that power Jarvis's Brain |
+| MCP tool list | The names, descriptions, and input fields advertised by the server | Jarvis adds tools only after a successful connection and keeps names separated by server |
+| Jarvis safety | Whether a proposed call is logged, confirmed, allowed, or blocked | Blacklists and other safety checks still apply, but confirmation is not guaranteed for every MCP tool |
+| Server-side permissions | What the service ultimately accepts | Jarvis cannot grant more access than the service account has, and it cannot narrow an overly broad server token by itself |
+
+Connected MCP tools currently share Jarvis's configured default tool risk tier,
+normally **monitor**. Jarvis records monitored calls and can require approval
+when its safety or plausibility rules say so, but it does not infer a separate
+risk tier from every server-provided tool description. Treat the server's own
+permissions as the primary access boundary, especially for delete, send, and
+publish actions.
+
+Turning a server off stops its current connection, removes its tools from new
+assistant requests, and keeps its configuration for later. A failed server does
+not stop other connections. A tool call that does not respond is timed out;
+repeated failures temporarily pause further calls to that server.
+
+## How It Fits Together
+
+A successful connection follows this flow:
+
+1. You add or import a server in a disabled state.
+2. Turning it on makes Jarvis connect and request the server's current tool
+ definitions.
+3. Jarvis adds those tools to the live assistant without requiring an app
+ restart.
+4. A chat, voice request, or [Skill](skills) can select a matching tool. The
+ request then passes through Jarvis's normal safety flow before the tool runs.
+5. For longer work, a relevant enabled server can also be made available to a
+ [Jarvis-Agent](jarvis-agents). Relevance selection reduces noise, but it is
+ not an access-control boundary; enable only servers you are willing to make
+ available to delegated work.
+6. The server returns a result to the conversation or mission. If it is down,
+ the affected step fails honestly while unrelated tools remain available.
+
+| Related feature | How it differs from MCP |
+|---|---|
+| [Plugins](plugins) | Packaged service connections can provide OAuth sign-in, tools, channels, and paired skills; use them when available |
+| [Skills](skills) | A skill gives Jarvis repeatable instructions but does not create service access or store a credential |
+| [CLI Connections](cli-connections) | A CLI connection discovers an installed command-line program; an MCP server advertises a protocol-based collection of tools |
+| [Providers and API Keys](providers-and-api-keys) | Brain provider keys authorize an external model service when one is used; they do not authorize an MCP service |
+| [Jarvis-Agents](jarvis-agents) | A Jarvis-Agent handles longer work and may receive relevant enabled connections for that mission |
+| [Safety and Approvals](safety-and-approvals) | Safety evaluates the requested action after the server has defined what tools exist |
+
+## Check That It Works
+
+1. Connect one trusted server and confirm that its row says **connected**.
+2. Ask Jarvis for one small, read-only action and name the server explicitly.
+3. Confirm that the answer contains the server's result rather than setup
+ instructions or a connection error. Review any approval request before
+ continuing.
+4. Turn the server off after the test if you do not want it available for
+ future conversations or Jarvis-Agent missions.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| **JSON-Syntax** when saving | The editor content is not valid JSON | Check commas, quotes, and braces, then confirm the root contains `mcpServers` |
+| The switch returns to off or shows **error** | Jarvis could not start the command, reach the URL, complete authorization, or list tools | Verify the publisher's command, launcher installation, URL, authorization, and service status |
+| Import reports no new servers | The Windows Claude Desktop file is missing, empty, unreadable, or every name already exists | Add the server manually, or rename and review the intended entry before importing again |
+| A credential is reported as incomplete | The server declares an authorization name that Jarvis cannot find | Use the packaged plugin instead when available; do not paste the missing value into `mcp.json` |
+| The server is connected but Jarvis chooses another tool | The request does not clearly match the server's advertised names and descriptions | Name the server and ask for one concrete action; add a skill only when you need repeatable guidance |
+| Calls fail immediately after several timeouts | The server has been paused briefly after repeated failures | Wait about a minute, check the server itself, then try one read-only action again |
+| A removed JSON entry still appears | The live registry may retain a previously loaded definition until restart | Disable the server first, save the removal, then restart Jarvis if the row remains |
+| A URL-only SSE entry never appears | That legacy transport shape is not loaded reliably by the current editor path | Use the publisher's streamable-HTTP endpoint, a local stdio server, or a packaged plugin |
+
+## Next Steps
+
+- Read [Plugins](plugins) before adding a custom server for a supported service;
+ the guided connection usually gives you safer sign-in and clearer health.
+- Read [Skills](skills) to teach Jarvis a repeatable sequence that uses an
+ already connected MCP tool.
+- Review [Credentials and Secrets](credentials-and-secrets) to understand safe
+ storage, removal, and the difference between a reference and a secret value.
+- Review [Safety and Approvals](safety-and-approvals) before allowing a server
+ to send, delete, publish, or change external data.
diff --git a/docs/product/extend-and-automate/plugins.md b/docs/product/extend-and-automate/plugins.md
new file mode 100644
index 0000000000..b23ac9e04f
--- /dev/null
+++ b/docs/product/extend-and-automate/plugins.md
@@ -0,0 +1,180 @@
+---
+title: "Plugins"
+slug: plugins
+summary: "Connect packaged capabilities, understand sign-in and health states, and see how plugins can expose tools and skills."
+section: "Extend and automate"
+section_order: 5
+order: 3
+diataxis: explanation
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [plugins, connections, marketplace, oauth, mcp, skills]
+related: [skills, mcp-connections, providers-and-api-keys, credentials-and-secrets]
+---
+
+Plugins connect Jarvis to services you already use, such as project,
+communication, and productivity tools. After you connect one, Jarvis can use
+the capabilities that service makes available for a relevant request.
+
+The catalog is packaged with Jarvis. Connecting a plugin authorizes a listed
+service; it does not download an arbitrary extension from the internet. This
+makes **Installed** a list of your connections, not a list of added programs.
+
+## Understand the Plugin States
+
+| What you see | What it means | What to expect |
+|---|---|---|
+| **Browse** | A service is available in the packaged catalog | You can search by name and filter by category |
+| **Installed** | You connected the service before, or its connection needs attention | The plugin remains visible so you can reconnect or remove it |
+| **Connected** | Jarvis has a saved access grant for the service | The connection is present, but every action tool may not be ready yet |
+| **Live** | The plugin has a callable action tool in the current session | Jarvis can offer that tool when your request is relevant |
+| **Reconnect needed** | The service rejected or revoked the saved grant | Run the sign-in flow again |
+| **Error** | Jarvis could not read or use the connection normally | Reconnect first, then check the service if the error returns |
+
+Communication plugins can act as message channels rather than action tools.
+They may work without a **Live** badge, so test them by sending a message from
+the account you allowed during setup.
+
+## Before You Start
+
+- Have an account for the service you want to connect. The service may charge
+ for its own plan or restrict connections through an administrator.
+- Decide what Jarvis should be allowed to read or change. Choose the smallest
+ useful permission set on the service's consent or token page.
+- Keep service credentials separate from Brain provider credentials. A Brain
+ provider answers your requests; a plugin gives Jarvis access to another
+ service.
+
+> [!warning]
+> Enter a service credential only in the plugin's protected connection dialog.
+> Never paste it into chat, speak it, or include it in a screenshot.
+
+## Connect a Plugin
+
+1. Open **Plugins**, choose **Browse**, then search for the service by name or
+ select a category. The card shows a short description and its connection
+ method.
+2. Select the **Connect plugin** button on the card. Jarvis opens the matching
+ connection flow.
+3. Complete the steps shown for that method:
+
+ | Method | What you do |
+ |---|---|
+ | **Access Token** | Open the service's token page, create an appropriately scoped token, and paste it into the protected field. Jarvis checks it before saving it. |
+ | **Browser Login** | Continue to your browser, review the requested access, and approve it. Some services require you to provide your own OAuth client in the pre-connect dialog. OAuth is the standard browser-based authorization flow. |
+ | **One-Click** | Authorize Jarvis on the service's browser page, then return to the app while it finishes connecting. |
+ | **Device Flow** | Copy the displayed code, open the service page, and enter the code before its timer expires. |
+ | **Allowlist** | This connection method is not available yet. The app reports that its required cloud proxy is not deployed. |
+
+4. If a browser does not open, use **Copy** in the dialog and open the link in
+ your browser yourself. Keep the dialog open while Jarvis waits for the
+ service.
+5. Return to **Plugins** and look for **Connected**. Action plugins also show
+ **Live** when their tools are ready in the current session.
+
+For a channel plugin, use the recommended owner lock when the dialog offers
+it. Enter your numeric service user ID so the bot accepts commands only from
+that account. Leaving it blank can allow the first person who messages the bot
+to claim access.
+
+### Review Access Before Approving
+
+The plugin card gives a description and connection type, but it does not
+currently list every requested scope or operation. The service's consent page
+or token settings are the authoritative permission review.
+
+Cancel the flow if the requested access is broader than you expect. When a
+service offers read-only or repository-, workspace-, or folder-specific
+access, prefer that narrower option unless your task genuinely needs writes.
+
+## Manage a Connection
+
+### Reconnect
+
+Use the amber **Reconnect plugin** button when a card says **Reconnect needed**
+or **Error**. Jarvis tries the same sign-in method again and replaces the old
+access grant only after the new one succeeds. Refreshable browser connections
+are renewed in the background when the service allows it; a revoked grant
+still requires you to reconnect.
+
+### Refresh and update
+
+The **Refresh catalog** button reloads the visible catalog and connection
+states. It does not install an update.
+
+Plugin definitions and built-in connection support arrive with Jarvis updates.
+There is currently no per-plugin **Install**, **Update**, or **Disable** action.
+To stop access, remove the connection; to receive a newer packaged connector,
+update Jarvis.
+
+### Remove
+
+Select the check-marked connection button, review **Remove _service_?**, then
+choose **Remove**. Jarvis deletes that plugin's local access grant and removes
+its tools from new requests. A shared OAuth client that you entered separately
+can remain available for other plugins in the same service family.
+
+Removing a plugin from Jarvis does not necessarily revoke the authorization
+record held by the service. For complete revocation, also open the service's
+account security or connected-app settings and revoke Jarvis or the token
+there.
+
+## How It Fits Together
+
+| Related feature | Relationship to a plugin |
+|---|---|
+| **Skills** | A paired skill teaches Jarvis when and how to use a plugin. It does not contain the credential or create the connection. |
+| **MCP connections** | Many plugins use Model Context Protocol (MCP) behind the scenes to expose service tools. Manually added MCP servers are managed separately, and some plugins use a native tool or a message channel instead. |
+| **API Keys** | Brain provider keys choose the service that reasons about your request. Plugin sign-in authorizes the external service on which Jarvis may act. |
+| **Permissions and safety** | The service's scopes set the outer access boundary. Jarvis then applies its own safety tier, audit, and approval rules to each tool call. Some actions are monitored, while consequential actions may ask or be blocked. |
+| **Jarvis-Agents** | For longer work, a Jarvis-Agent can receive only the connected tools relevant to that mission through a short-lived grant. The worker does not receive the stored credential itself. |
+
+A typical request follows this path:
+
+1. You name a service or ask for work that clearly matches it.
+2. The paired skill helps Jarvis recognize the right capability.
+3. Jarvis offers only relevant live tools and applies the safety rules for the
+ proposed action.
+4. The plugin sends the approved request to the service and returns the result
+ to the conversation or Jarvis-Agent mission.
+
+If one plugin is unavailable, Jarvis keeps other connected capabilities
+running. The step that needs the unavailable service can still fail or require
+you to reconnect; Jarvis does not silently substitute an unrelated service.
+
+## Check That It Works
+
+1. Connect an action plugin and confirm that its card shows **Connected** and
+ **Live**.
+2. Ask for a small read-only result and name the service, such as asking Jarvis
+ to list a few recent items from it.
+3. Confirm that Jarvis returns service data rather than a setup prompt. If an
+ approval appears, review the proposed action before allowing it.
+
+For a communication channel, send a simple test message from the allowed
+account instead. A reply confirms the channel even when its card has no
+**Live** badge.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| **Backend unreachable** or no catalog cards | The desktop interface cannot reach the local Jarvis service | Wait for Jarvis to finish starting, then choose **Refresh catalog**. Restart the app only if other views are also unavailable. |
+| No browser page opens | The desktop shell or browser blocked the automatic open | Use **Copy** in the connection dialog, paste the link into your browser, and leave the dialog open. |
+| An OAuth client is not configured | That service needs a client registered to your own account | Reopen the plugin, expand **Use your own OAuth client**, and enter the values created in the service's developer console. Do not put them in chat. |
+| **Connected** appears without **Live** on an action plugin | The grant was saved, but no callable tool loaded | Choose **Refresh catalog**. If it remains unchanged, reconnect and check the service's status and permissions. A channel plugin is the exception; test it with a message. |
+| **Reconnect needed** keeps returning | The service revoked the grant, the consent app is still temporary, or an administrator blocked it | Reauthorize with the intended account and review the provider's connected-app or administrator settings. |
+
+## Next Steps
+
+- Read [Skills](skills) to understand the instructions that help Jarvis choose
+ a connected capability at the right time.
+- Use [MCP Connections](mcp-connections) when you need to add and inspect a
+ server that is not packaged as a plugin card.
+- Compare [Providers and API Keys](providers-and-api-keys) to keep reasoning
+ providers separate from service connections.
+- Review [Credentials and Secrets](credentials-and-secrets) to learn where
+ Jarvis stores sensitive values and how to remove them safely.
diff --git a/docs/product/extend-and-automate/skills.md b/docs/product/extend-and-automate/skills.md
new file mode 100644
index 0000000000..cee23c238f
--- /dev/null
+++ b/docs/product/extend-and-automate/skills.md
@@ -0,0 +1,269 @@
+---
+title: "Skills"
+slug: skills
+summary: "Understand how a skill gives Jarvis repeatable instructions, when it runs, and how drafts differ from enabled skills."
+section: "Extend and automate"
+section_order: 5
+order: 2
+diataxis: explanation
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [skills, automation, triggers, safety, extensions]
+related: [plugins, mcp-connections, jarvis-agents, safety-and-approvals]
+---
+
+A skill is a saved playbook for Jarvis. It describes how you want a recurring
+kind of work handled, such as how to prepare a briefing, organize notes, or
+review a file. When a request matches, Jarvis loads the playbook and follows it
+with the capabilities already available in the app.
+
+Skills are useful when the method matters as much as the result. They do not
+create access to an app, add a missing action, or store a service credential.
+Connect those capabilities separately, then let the skill explain when and how
+to use them.
+
+## Choose the Right Building Block
+
+| Building block | What it gives Jarvis | Use it when |
+|---|---|---|
+| **Skill** | Repeatable instructions, optional triggers, and supporting files | You want Jarvis to follow your preferred method each time |
+| **Command** | One defined action with known inputs, such as creating or listing something | You need a predictable operation that can be called from the app, command line, or conversation |
+| **Plugin** | A packaged capability or integration | Jarvis does not yet have the action or service you need |
+| **MCP connection** | Tools supplied by an external service through Model Context Protocol (MCP) | A skill needs to read from or act in a connected service |
+| **Jarvis-Agent** | An isolated background worker for longer, reviewed work | The task needs several substantial steps or should continue outside the conversation |
+
+A skill can tell Jarvis to use a command, plugin, or connected tool. A skill
+marked for mission execution can hand its instructions to a Jarvis-Agent. The
+skill remains the method; the other building block supplies the action or does
+the work.
+
+## Before You Start
+
+- You can create and manage a skill without an artificial intelligence (AI)
+ provider. AI-assisted drafting and catalog ranking use the active provider
+ when one is reachable, then fall back to a basic editable draft or local
+ search when it is not.
+- Catalog installation needs an internet connection. A manually created skill
+ does not.
+- Connect any required service before testing the skill. Installing a skill
+ does not install its plugin or create its connection.
+- Keep credentials, private contact details, and other sensitive values out of
+ a skill's name, description, trigger, and instructions. Enter credentials
+ only in **API Keys** or the relevant connection screen.
+
+> [!warning] A catalog label, source label, or star count is useful context,
+> not a security guarantee. Read the source and the installed instructions
+> before allowing a third-party skill to use connected tools.
+
+## Find and Install a Skill
+
+1. **Open Skills from the sidebar.** The left side lists built-in and personal
+ skills. A switch shows whether a healthy skill is on; a draft shows an error
+ instead of a switch.
+
+2. **Open Skill Finder.** Describe the outcome you want. You can narrow the
+ catalog by trust label, popularity, category, language, and stated risk.
+ Search still works without an AI provider, although its ranking is then
+ based on the catalog text rather than an AI comparison.
+
+3. **Review a promising result.** Read its description, stated risk, and
+ categories, then open **Source**. Check what the instructions ask Jarvis to
+ do, which services they mention, and whether the source is one you trust.
+
+4. **Choose Install.** A directly downloadable skill appears in the Skills
+ list after installation. If the result says **Manual**, the app has not
+ installed it; use **Source** to inspect the project and proceed only if you
+ understand its separate installation steps.
+
+5. **Check the installed state before using it.** A structurally valid skill
+ normally appears as **Validated** with its switch on. A skill that explicitly
+ declares another state keeps that state, while a file that cannot be read
+ appears as **Draft** with a validation error. Switch an unfamiliar skill off
+ while you review its complete definition.
+
+6. **Select the skill and inspect its detail panel.** The main editor shows the
+ complete `SKILL.md`: its settings followed by the instructions Jarvis will
+ receive. A bundled skill can also include references, scripts, assets, or
+ agent notes in the **Bundle** panel. Open only the files needed to understand
+ what the skill will do.
+
+The catalog refuses a second skill with the same name. Review the installed
+copy before deleting it to make room for a replacement; deletion is permanent.
+
+## Create Your Own Skill
+
+1. **Open the new-skill form from the Skills header.** Describe the outcome in
+ **What should this skill do?** You can ask AI to write a first version or
+ fill in the form yourself.
+
+2. **Wait for an editable result.** If the active provider answers, the form is
+ filled with an AI draft. If no provider is reachable, Jarvis supplies a
+ simple starter version instead. In both cases, you remain responsible for
+ the text that will be saved.
+
+3. **Review every field.** Give the skill a clear name, a specific description,
+ and instructions that say what to do, what not to do, and what a useful
+ result looks like. Jarvis uses the description to decide when the skill may
+ help, so avoid broad claims such as “handles everything.”
+
+4. **Add a voice trigger only when you need an exact shortcut.** Use a short,
+ distinctive phrase and test it against ordinary conversation. The field is
+ treated as a text pattern, so punctuation and special symbols can change how
+ it matches. The current form does not offer schedule or hotkey setup.
+
+5. **Choose Create skill.** A skill you wrote entirely yourself can become
+ **Validated** and ready to use after this explicit submission. Content
+ supplied by AI or by the automatic starter must instead be saved as
+ **Draft**. A draft cannot run and has no on/off switch.
+
+6. **Review and activate an AI-created draft separately.** Open the saved
+ definition and check its name, description, triggers, instructions, and any
+ requested capabilities. The current desktop can display and edit a deliberate
+ draft but cannot promote it. After review, a trusted operator can activate it
+ with `python -m jarvis.skills.cli --promote <skill-slug>`. That command checks
+ the content before changing it to **Active**. Refresh Skills and confirm the
+ new state before testing it.
+
+The form refuses a skill with no real instructions. It also prevents a name
+collision with an installed or built-in skill. Do not copy AI-written text into
+the manual path merely to skip the draft boundary. If an AI-created skill
+appears enabled immediately, switch it off and report the behavior as a bug
+before running it.
+
+## Review States and Changes
+
+The switch uses two internal “on” states. They behave the same for everyday
+use, even though their labels differ.
+
+| State | Can it run? | What it means in the app |
+|---|---|---|
+| **Validated** | Yes | The definition could be read and is ready by default |
+| **Active** | Yes | You explicitly switched it on |
+| **Disabled** | No | You switched it off; that choice survives a restart |
+| **Draft** | No | The definition needs a correction or is deliberately waiting for approval; no switch is shown |
+
+Select a skill to review or edit its complete definition. **Save** replaces the
+whole file and reads it again. If the settings or trigger are invalid, the
+skill moves to **Draft** and the detail panel shows the validation error. Fix
+the named problem and save again. A deliberate AI-created draft stays unable to
+run until the separate promotion command completes. The desktop switch cannot
+perform that promotion yet.
+
+Built-in skills are protected from deletion, and editing one requires existing
+admin access. You can still switch a built-in skill off without changing its
+file. Personal skills can be deleted individually or in a confirmed batch.
+Dragging rows changes only their display order; it does not change which skill
+Jarvis prefers for a request.
+
+## When a Skill Runs
+
+An enabled skill can start in two common ways:
+
+- **Request matching:** Jarvis sees the names and descriptions of enabled
+ skills. When your chat or voice request fits one, Jarvis loads the full
+ instructions before answering. Your wording does not need to repeat an exact
+ trigger phrase.
+- **Direct trigger:** A matching chat or voice phrase marks one skill for the
+ next turn. This is useful for a dependable shortcut, but an overly broad
+ pattern can also match conversation you did not intend as a command.
+
+Only the short description is considered at first. The full instructions and
+bundled references are loaded when needed, which keeps unrelated skills out of
+the conversation. An **inline** skill guides the current turn. A **mission**
+skill hands the instructions to a Jarvis-Agent; if no worker action is
+available, Jarvis can fall back to following the instructions in the current
+turn.
+
+Scheduled triggers can exist in an installed skill, but they run only while
+Jarvis and its skill scheduler are running. The current creator does not expose
+schedule setup. Hotkey definitions can be displayed and validated, but the
+current desktop runtime does not connect them to a live global-hotkey handler,
+so do not rely on a skill hotkey as your only way to start important work.
+
+## Safety During a Run
+
+A skill supplies instructions; it does not bypass the normal action policy.
+Connected actions still pass through the same safe, monitored, confirmation,
+and blocked decisions used elsewhere in Jarvis. A blocked skill or action does
+not run. An unattended scheduled action that needs a decision may stop because
+no person is present to approve it.
+
+If a skill names a tool that is not installed or a service that is not
+connected, validation may show only a warning. During use, Jarvis should skip
+the unavailable step or report that it could not complete it; the skill does
+not silently gain the missing access. Read [Plugins](plugins) or [MCP
+Connections](mcp-connections) before enabling instructions that depend on an
+external capability.
+
+## How It Fits Together
+
+1. **A request or trigger starts the match.** Chat, voice, or an advanced
+ schedule can point Jarvis to an enabled skill.
+2. **The skill state is checked.** Validated and Active skills can continue;
+ Draft and Disabled skills are rejected before their instructions load.
+3. **Jarvis loads the playbook.** It renders the instructions with the current
+ request and reads a bundled resource only when that resource is needed.
+4. **Commands and connections supply actions.** The skill can guide Jarvis to
+ use an app command, a plugin tool, or an MCP-connected tool, but it cannot
+ create those capabilities by itself.
+5. **Safety checks every action.** Permissions and approval rules apply after
+ the skill is selected, just as they do for a normal conversation. Read
+ [Safety and Approvals](safety-and-approvals) before automating changes.
+6. **Inline work returns to the conversation.** Longer mission skills can
+ delegate the same instructions to [Jarvis-Agents](jarvis-agents), where the
+ worker, review, and durable outputs have their own lifecycle.
+
+## Check That It Works
+
+1. Create a personal skill manually, without AI drafting, named **Three Point
+ Check** with the description
+ “Turn a short topic into exactly three plain-English bullet points.”
+2. In its instructions, tell Jarvis to return exactly three short bullets and
+ finish with the words “Check complete.” Leave the voice trigger empty.
+3. Choose **Create skill** and confirm that the new row appears with its switch
+ on. Open it once and verify that the saved instructions match what you
+ reviewed.
+4. In Chats, ask Jarvis to use **Three Point Check** for a harmless topic.
+ Success is a three-bullet answer ending with the requested words.
+5. Switch the skill off. Its row should show **Off** after a refresh and remain
+ off after restarting the app.
+6. For the review boundary, ask AI to draft a second harmless skill and save it.
+ Confirm that it appears as **Draft**, has no switch, and is unavailable to
+ Chats until a separate promotion. If it appears enabled immediately, switch
+ it off and report the bug instead of testing it.
+
+The manual part proves creation, discovery, instruction loading, and the saved
+on/off preference without sensitive data or an external connection. The final
+step checks the separate safety boundary; drafting may use the active provider
+or the automatic starter.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| **Could not load skills** | The skill service or app is not ready | Wait briefly, use Refresh, then restart the app if the error remains |
+| A row says **Draft** and has no switch | Its settings, trigger, or file structure could not be accepted, or it was intentionally saved for review | Select it, read any validation error, and fix only the named issue. After reviewing an intentional draft, use the supported promotion command; the desktop switch cannot promote it yet. |
+| An AI-created skill appears enabled immediately | The required draft boundary was bypassed | Switch it off, do not run it, and report the behavior with the app version and creation steps. Never include the skill's private content in a public report. |
+| The switch is on but Jarvis ignores the skill | The description is too vague, the request does not match it, or the direct trigger is too strict | Make the description specific, try a clear request that names the skill, and test a simple distinctive trigger |
+| A catalog installation fails | The download is unavailable, the network failed, or that name is already installed | Open **Source**, check the connection, and review the existing skill before deciding whether to delete it |
+| AI drafting or ranking is unavailable | No compatible provider is reachable | Continue with the editable starter text or connect a provider in **API Keys**; manual creation and local catalog search still work |
+| The skill starts but cannot finish an action | A required plugin, MCP connection, permission, or approval is missing | Connect the capability in the app, review its permissions, and retry; never put a credential in the skill |
+| A scheduled skill does not run | Jarvis or the skill scheduler was not running, the schedule is invalid, or the action required interaction | Keep the app running, review the schedule, and use a supervised test before relying on it |
+| A built-in skill cannot be deleted or saved | Built-ins are protected; saving also needs configured admin access | Switch it off, or create a personal skill with the behavior you want |
+
+For repeated app, provider, or connection failures, follow the main
+[Troubleshooting](troubleshooting) guide.
+
+## Next Steps
+
+- Read [Plugins](plugins) when the skill needs a capability Jarvis does not yet
+ have.
+- Read [MCP Connections](mcp-connections) to connect external tools without
+ putting credentials in the skill.
+- Read [Jarvis-Agents](jarvis-agents) to run a longer skill as an isolated,
+ reviewed background mission.
+- Review [Safety and Approvals](safety-and-approvals) before enabling a skill
+ that changes files, accounts, or connected services.
diff --git a/docs/product/extend-and-automate/workflows-and-commands.md b/docs/product/extend-and-automate/workflows-and-commands.md
new file mode 100644
index 0000000000..0d5ea14964
--- /dev/null
+++ b/docs/product/extend-and-automate/workflows-and-commands.md
@@ -0,0 +1,202 @@
+---
+title: "Workflows and App Commands"
+slug: workflows-and-commands
+summary: "See how reusable workflows, natural-language actions, REST routes, and CLI commands connect to the same underlying capability."
+section: "Extend and automate"
+section_order: 5
+order: 7
+diataxis: explanation
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [workflows, app-commands, automation, voice, cli, safety]
+related: [tasks-and-reminders, skills, cli-reference, app-command-reference]
+---
+
+Use an **app command** when you want Jarvis to perform one known action now,
+such as showing your tasks, testing a provider, or changing the voice volume.
+The command points to the same validated app action used by the corresponding
+desktop control.
+
+Use a **workflow** when you want several fixed steps to run in order, either
+when you start them or on a schedule. A workflow keeps its definition and run
+history locally, so you can inspect which step completed or failed.
+
+> [!info] Workflows are experimental. The desktop view can run, enable,
+> inspect, and delete existing custom workflows, but it cannot yet create or
+> edit a workflow. Custom definitions require the CLI or control API.
+
+## Choose the Right Building Block
+
+| Building block | What it provides | Choose it when |
+|---|---|---|
+| **App command** | One curated action with known inputs and one app endpoint | You want a predictable action now from chat, voice, the desktop, or CLI |
+| **Workflow** | A named sequence that runs step by step and keeps run history | The order is fixed and you want to reuse or schedule it |
+| **Task** | One saved action that starts at a time, interval, or mission event | You need a reminder or one background turn, not a multi-step sequence |
+| **Skill** | Reusable instructions that guide how Jarvis handles a request | The method and quality rules matter more than a fixed sequence |
+| **Jarvis-Agent** | Isolated, reviewed work with progress and output files | The work is longer, exploratory, or needs several substantial decisions |
+| **Connection** | Access to tools from a plugin, MCP server, or command-line app | Jarvis needs a capability; the connection does not define the workflow |
+
+A workflow is not a longer app command. An app command maps one request to one
+validated app action. A workflow loads a saved definition and runs its steps
+sequentially, stopping at the first failure.
+
+## Use an App Command
+
+You normally do not need to know a command ID. Ask for a concrete action in
+**Chats** or by voice, and Jarvis can select the matching command, validate its
+inputs, call the app, and report the app's actual response.
+
+Current command families include these examples:
+
+| Area | Requests you can make |
+|---|---|
+| Providers | List or test providers, or switch a supported Brain, voice, speech, Realtime, Computer Use, or Jarvis-Agent provider |
+| Voice and settings | Show or change the wake phrase, choose the reply language or voice mode, set volume, list audio devices, or restart Jarvis |
+| Work and history | List tasks or missions, read a mission result or recent voice turn, and cancel a task or mission |
+| Knowledge and tools | Store a self-contained fact in the Wiki or list the tools currently available to Jarvis |
+
+The list is curated, not a catalog of every button in the app. Browse the
+reader-friendly [App Command Reference](app-command-reference), or inspect the
+[canonical generated command catalog](https://github.com/PersonalJarvis/PersonalJarvis/blob/main/docs/commands-reference.md)
+for the current source-generated list.
+
+The same capability is available through four surfaces:
+
+1. **Chat or voice:** ask naturally. Jarvis runs a matching command only when
+ the conversational tool path is available.
+2. **Desktop:** use the control in the command's named app section. The
+ desktop does not have a separate command-catalog screen.
+3. **CLI:** use `jarvis commands list` or `jarvis commands show <command-id>`
+ to browse the registry. These two commands are read-only; run an action
+ through its feature command or the `jarvis api` interface.
+4. **REST:** each command points to one local control route - the validated
+ app address used by the other surfaces. Most people do not need to call it
+ directly.
+
+A conversational action is complete only after Jarvis receives success from
+the app. A spoken intention or ordinary prose answer is not proof that a
+setting changed. Consequential commands, including restart and cancellation,
+normally require a separate confirmation. A destructive CLI action requires
+`--yes`; use `--dry-run` to preview a supported request without sending it.
+
+## Use a Workflow
+
+1. **Open Workflows.** Each card shows its name, Manual or scheduled trigger,
+ step count, active state, last result, and next run when one is planned.
+
+2. **Expand the card before running it.** Review its description, step labels,
+ and recent runs. Labels are only a summary; for a custom or imported
+ workflow, `jarvis workflows show <workflow-id>` is the read-only way to
+ inspect the complete saved definition.
+
+3. **Check its requirements.** A Brain prompt needs a reachable Brain
+ provider. A local command needs the named program and suitable files. An
+ external message needs its connection. Keep the workflow off when any
+ requirement is missing.
+
+4. **Select Run now.** A manual run starts immediately and the card refreshes
+ as it moves through **pending**, **running**, and then **completed** or
+ **failed**. The desktop asks for a URL only when the workflow name contains
+ “URL”; it does not provide a general input form for other custom workflows.
+
+5. **Open Recent runs.** Expand a run to see the saved output or error for each
+ step. A failure ends the sequence; later steps do not run.
+
+6. **Control future runs.** Turning on a scheduled workflow lets the local
+ scheduler start it while Jarvis is running. Turning it off removes its next
+ automatic run, but **Run now** still works as a manual test. The toggle does
+ not stop a run that already started, and there is currently no active-run
+ cancel control.
+
+Seed workflows supplied with Jarvis cannot be deleted from the desktop. A
+custom workflow has a confirmed **Delete** action. The command registry does
+not currently include a dedicated run-workflow command, so the dependable ways
+to start one are the Workflows view or `jarvis workflows run <workflow-id>`.
+
+> [!warning] Treat a workflow definition as trusted automation. Direct local
+> command and Telegram steps do not pause for a fresh approval before each
+> step. Inputs, outputs, and errors remain in local run history. Never place a
+> password, API key, token, or recovery code in a definition or input, and
+> review the data boundary before a workflow sends local content to a provider.
+
+Advanced definitions can name a connected-tool step or a Jarvis-Agent step,
+but those two step types are not currently wired into the desktop workflow
+runner and fail when reached. Use a [Skill](skills) for guided connected-tool
+work or a [Jarvis-Agent](jarvis-agents) for longer reviewed work instead. The
+shipped **URL Summary** is also an input-passing demonstration: it reasons from
+the URL text and does not download or read the page.
+
+## How It Fits Together
+
+1. **A request, button, or schedule starts the path.** Chat and voice can start
+ a curated app command. The desktop or CLI can start a workflow. A schedule
+ can start an enabled workflow while Jarvis is running.
+2. **Jarvis chooses one action or one definition.** The command registry maps
+ one command to one existing app route and its accepted inputs. A workflow
+ instead loads its saved steps and processes them in order.
+3. **Adjacent features supply context or capability.** A Skill supplies
+ repeatable instructions; a plugin, MCP connection, or CLI connection
+ supplies a tool; a Task supplies a time or event trigger; a Jarvis-Agent
+ supplies isolated work and review. None of them silently grants another
+ feature access.
+4. **Safety applies at the action boundary.** Conversational commands run
+ through Jarvis's safety policy before their app route is called, and the CLI
+ adds its own confirmation gate for destructive requests. Workflow steps
+ have the direct-step limitation described above, so review and activation
+ are the important boundary. Read [Safety and Approvals](safety-and-approvals)
+ before automating an external change.
+5. **Unavailable capabilities fail honestly.** A command returns an error when
+ the local app action or required capability is unavailable. A workflow
+ records the failing step and stops; it does not skip ahead and claim the
+ whole sequence completed.
+6. **The result returns to the starting surface.** A command reports the
+ server-confirmed outcome in the conversation, desktop, or CLI. A workflow
+ stores the overall state and step results under Recent runs.
+
+## Check That It Works
+
+Check a read-only app command first:
+
+1. In Chats or a voice conversation, ask **“What is my wake word?”**
+2. Confirm that Jarvis returns the phrase currently shown in the app's wake
+ settings. No setting should change and no confirmation should be needed.
+
+Then check the workflow path:
+
+1. Open **Workflows**, expand **URL Summary**, and select **Run now**.
+2. Enter `https://example.com`, which is a reserved example address.
+3. Expand the newest run. Success is a **completed** state with output on its
+ first step. The result should describe what can be inferred from the URL;
+ it is not evidence that Jarvis read the web page.
+
+This verifies the registry read path, manual workflow trigger, Brain step, and
+saved run timeline without changing an external account.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| Workflows is empty or shows a load error | The local workflow store is still starting or could not open | Wait for app startup, reopen Workflows, and restart normally if the view remains unavailable |
+| A run shows **failed** | The first unsuccessful step lacked its Brain, local program, input, file, or external connection | Expand the run, read the exact failed step, fix that requirement in the app, and run a supervised test |
+| A schedule never starts | The workflow is off, Jarvis was not running, or no next run could be calculated | Turn it on, confirm a next-run time appears, and keep Jarvis running for the test |
+| Jarvis describes an action but nothing changes | The conversational tool path was unavailable or no command actually returned success | Check the relevant desktop setting; retry there or use the documented CLI action instead of trusting the prose reply |
+| A consequential command does not run | It is waiting for approval, the confirmation expired, or safety blocked it | Review the proposed action, answer the confirmation clearly once, or leave it cancelled; never weaken a block to force it through |
+| A custom workflow needs input but no form appears | The desktop currently has only the URL-name input shortcut | Use a workflow with no input, or use the advanced CLI or API path with the definition's documented inputs |
+| A connected-tool or Jarvis-Agent step fails immediately | That step type is defined but is not connected to the desktop workflow runtime | Move the work to a Skill, normal conversation, or Jarvis-Agent mission and keep the workflow disabled |
+
+For repeated provider, connection, or startup failures, follow the main
+[Troubleshooting](troubleshooting) guide.
+
+## Next Steps
+
+- Read [Tasks and Reminders](tasks-and-reminders) when one saved action should
+ start at a time, interval, or mission event.
+- Read [Skills](skills) when you want repeatable instructions that can choose
+ from currently connected capabilities.
+- Use the [CLI Reference](cli-reference) to browse safe workflow and feature
+ commands without copying long command lists into this page.
+- Open the [App Command Reference](app-command-reference) for the generated,
+ current catalog and each command's accepted inputs.
diff --git a/docs/product/knowledge-and-sharing/connect-obsidian.md b/docs/product/knowledge-and-sharing/connect-obsidian.md
new file mode 100644
index 0000000000..defd03a167
--- /dev/null
+++ b/docs/product/knowledge-and-sharing/connect-obsidian.md
@@ -0,0 +1,207 @@
+---
+title: "Connect an Obsidian Vault"
+slug: connect-obsidian
+summary: "Use an existing Obsidian vault as a readable knowledge source while keeping file ownership and backups clear."
+section: "Knowledge and sharing"
+section_order: 4
+order: 2
+diataxis: howto
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [obsidian, wiki, markdown, vaults, backups]
+related: [wiki-and-memory, privacy-and-local-data, troubleshooting]
+---
+
+Connect Obsidian when you want to browse and edit Jarvis's long-term wiki in a
+dedicated Markdown editor. Obsidian is optional: Jarvis keeps using the same
+plain-text wiki files when Obsidian is closed or not installed.
+
+The connection is a shared-folder arrangement, not a cloud synchronization
+service. Jarvis and Obsidian read the same Markdown files on your device. The
+setup does not upload your notes, copy an entire existing vault into Jarvis, or
+turn Jarvis backups into a device-to-device backup plan.
+
+## Before You Start
+
+- Install Obsidian from the [official Obsidian download page](https://obsidian.md/download),
+ then open it at least once so it can create its local vault list.
+- If you want to use an existing vault, open or create that vault in Obsidian
+ before starting the Jarvis connection. Close Obsidian before registration so
+ both apps do not try to update its local vault list at the same time.
+- Decide who should back up the folder. Jarvis keeps limited recovery snapshots
+ around its own writes, but you still need your normal backup or version-history
+ plan for important notes and attachments.
+
+> [!warning] A vault can contain private notes. Review what is already in the
+> folder before connecting it, and do not store credentials or recovery codes in
+> wiki pages.
+
+## Choose a Vault Arrangement
+
+The setup dialog offers two choices. Neither choice sends the vault to an
+online service.
+
+| Choice | Where Jarvis works | What happens to other notes | Best when |
+|---|---|---|---|
+| **Create a separate Jarvis vault** | Jarvis uses its own wiki folder and adds that folder to Obsidian's local vault list | Your other Obsidian vaults stay separate | You want the clearest ownership boundary |
+| **Use my existing vault** | Jarvis creates or uses a `Jarvis` subfolder inside the vault you select | Notes outside that subfolder are not imported, searched, or changed by Jarvis | You want Jarvis pages visible beside an established vault |
+| Do not connect Obsidian | Jarvis keeps its wiki as local Markdown and shows it in **Wiki** | Obsidian is not involved | The device is headless, or you prefer the built-in view |
+
+Choosing an existing vault does not make its whole contents part of Jarvis
+Memory. Only the nested `Jarvis` folder becomes the active Jarvis wiki. The
+setup also does not move pages from a previously connected location into the
+new folder.
+
+## Connect the Vault
+
+1. **Open Wiki.** Select **Wiki** in the desktop app. On the first visit, the
+ setup dialog may open automatically. Otherwise, select the **Obsidian: not
+ installed**, **not registered**, or **status unclear** status pill.
+
+2. **Finish the Install step.** If needed, use the download link, install and
+ start Obsidian once, then return to Jarvis and use the installation step's
+ continue button. Detection is best effort, so an uncommon installation
+ location can still appear as not detected.
+
+3. **Choose where the wiki belongs.** Select **Create a separate Jarvis vault**
+ for an isolated folder, or **Use my existing vault** and select a vault from
+ the list. The existing-vault option remains unavailable until Obsidian has a
+ registered vault that Jarvis can read from its local vault list.
+
+4. **Select Register now.** For a separate vault, Jarvis safely adds its folder
+ to Obsidian's local vault list. For an existing vault, Jarvis creates the
+ nested `Jarvis` folder, saves it as the active wiki location, and rebuilds
+ the derived search index for that location.
+
+5. **Restart when asked.** The existing-vault choice shows **Restart now**
+ because the running file watcher and memory writer still point to the old
+ location until Jarvis restarts. Do not start editing the new folder before
+ that restart finishes.
+
+6. **Run the live test.** Choose **Open in Obsidian**. Obsidian should open the
+ connected folder through its local link handler. Return to Jarvis and
+ confirm that the live test worked only after you see the expected vault or
+ folder.
+
+## Understand File Ownership
+
+| Item | Primary owner | What Jarvis does |
+|---|---|---|
+| Markdown inside the active Jarvis wiki | You | Reads it, may add or update guarded wiki pages, and makes visible Markdown searchable |
+| Notes elsewhere in an existing vault | You and Obsidian | Leaves them outside Jarvis Memory, search, and automated writes |
+| Obsidian settings, themes, and plugins | Obsidian | Does not manage them; setup only reads the vault list and may add the separate Jarvis vault entry |
+| Jarvis search index | Jarvis | Rebuilds this derived data from the active wiki; it is not the source copy of your notes |
+| Wiki recovery snapshots | Jarvis | Creates rolling snapshots before Jarvis-originated page writes; they are not a complete backup service |
+| Your external backup or sync service | You | Jarvis does not configure, monitor, or guarantee it |
+
+Manual edits in Obsidian change the source Markdown directly. They do not go
+through Jarvis's guarded writer, so they do not create an immediate Jarvis
+snapshot. If a note matters, keep it in a backup system you control even when
+Jarvis snapshots are present.
+
+## What Synchronization Means Here
+
+1. **Both apps point to one folder.** There is no export and no second copy to
+ reconcile.
+2. **Obsidian saves a Markdown change.** Jarvis's file watcher notices visible
+ Markdown changes and updates its derived text-search index. Hidden Obsidian
+ configuration and non-Markdown files are not added to wiki text search.
+3. **Jarvis writes a wiki page.** Its guarded writer validates the change,
+ creates a recovery snapshot, and avoids overwriting a page that was edited
+ very recently. Obsidian sees the resulting file through its normal folder
+ monitoring.
+4. **Either app can be closed.** Files remain on disk. When the app opens again,
+ it reads the same active folder.
+
+This process does not synchronize devices, merge conflicting edits from a
+cloud service, preserve every historical version, or copy notes outside the
+active Jarvis wiki. If an external sync tool edits files simultaneously, its
+conflict handling belongs to that tool.
+
+## Backups and Safe Recovery
+
+Connecting a separate vault changes Obsidian's local vault list. Jarvis first
+keeps a timestamped copy, writes the updated list atomically, and verifies the
+result. If verification fails, it attempts to restore the original and reports
+that the operation was rolled back. The retained copy is for recovery; it is
+not a backup of the Markdown pages themselves.
+
+Jarvis-originated wiki updates use a different recovery layer: a limited,
+rotating snapshot of the curated wiki content is taken before the update.
+Archived content and attachments are not a complete part of that safety net.
+Keep a separate backup of the whole folder before moving it, changing external
+sync settings, or making a large manual edit.
+
+The current connected status pill does not provide a disconnect or move action.
+If you selected the wrong location, do not drag the active folder elsewhere or
+edit application configuration by hand. Make a full copy of the vault, leave
+the original in place, and follow [Troubleshooting](troubleshooting) before
+changing the connection.
+
+## Platform and Headless Limits
+
+Jarvis checks common Obsidian application and configuration locations on
+Windows, macOS, and Linux. Package formats or custom install locations can make
+the status appear unclear even when Obsidian is present. Opening through the
+**Open in Obsidian** button also requires a graphical desktop and a working
+`obsidian://` link handler.
+
+On a headless server, skip the Obsidian connection. The Jarvis wiki can still
+exist as local Markdown, and Jarvis can still use its own wiki features. The
+desktop-only live test and external editor launch are unavailable there.
+
+## How It Fits Together
+
+1. **Wiki and Memory supplies the content.** Jarvis records selected durable
+ knowledge as Markdown in the active wiki folder; Obsidian is an optional
+ second view of those files.
+2. **The vault choice defines the boundary.** A separate vault isolates Jarvis
+ pages. An existing vault keeps Jarvis inside one nested folder and leaves
+ neighboring notes alone.
+3. **The watcher connects file edits to search.** Changes to visible Markdown
+ update Jarvis's derived index. If that index becomes stale, **Rebuild index**
+ recreates it from the files without rewriting the pages.
+4. **Privacy follows the folder.** Local storage avoids an automatic upload,
+ but Obsidian plugins or an external sync service can have their own data
+ behavior. Review [Privacy and Local Data](privacy-and-local-data) before
+ enabling either.
+5. **Recovery protects writes, not every storage failure.** Jarvis validates
+ and snapshots its own changes, while full-folder backups and external sync
+ conflicts remain your responsibility.
+
+## Check That It Works
+
+1. In **Wiki**, confirm the status pill reads **Obsidian: connected** and the
+ health strip shows the expected active vault location.
+2. Choose **Open in Obsidian** during the setup live test and confirm the
+ connected vault or nested `Jarvis` folder appears.
+3. Edit one harmless Markdown sentence in that folder and save it. Return to
+ Jarvis, open the same page, and confirm the saved text appears. If search is
+ stale, use **Rebuild index** and search again.
+
+The connection works when both apps show the same saved file from the same
+folder. A successful open alone does not prove that an external cloud sync or
+backup service is working.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| **Obsidian: not installed** after installation | Jarvis did not find the app in a common location, or setup has not refreshed | Start Obsidian once, return to the setup dialog, and retry. A custom install may require using Jarvis without the external-editor launch. |
+| **Use my existing vault** is unavailable | Obsidian's local vault list is missing or has no readable registered vault | Open the desired vault in Obsidian, close Obsidian, then reopen the Jarvis setup dialog. |
+| Registration asks you to open Obsidian first | Obsidian has not created its local vault-list file | Open Obsidian once, close it, and select **Register now** again. |
+| Registration reports a rollback or unclear status | The local vault-list file could not be read, updated, or verified safely | Stop retrying, confirm Obsidian still opens normally, and keep the recovery copy. Follow the main troubleshooting guide before any manual restore. |
+| Obsidian opens, but Jarvis shows old search results | The files and the derived search index are out of step, or the watcher was unavailable | Confirm the health strip names the expected vault, select **Rebuild index**, and try the search again. |
+| An existing-vault connection shows no older notes | Jarvis intentionally reads only the nested `Jarvis` folder | Move or copy only the notes you deliberately want Jarvis to use, after backing them up and reviewing their privacy. |
+
+## Next Steps
+
+- Read [Wiki and Memory](wiki-and-memory) to understand what Jarvis remembers,
+ when it writes a page, and how recall uses the wiki.
+- Review [Privacy and Local Data](privacy-and-local-data) before enabling an
+ Obsidian plugin or external service that may send vault data off the device.
+- Use [Troubleshooting](troubleshooting) for stale indexes, unclear health
+ states, failed restarts, or recovery help beyond this connection flow.
diff --git a/docs/product/knowledge-and-sharing/find-help-in-the-app.md b/docs/product/knowledge-and-sharing/find-help-in-the-app.md
new file mode 100644
index 0000000000..9512d47dce
--- /dev/null
+++ b/docs/product/knowledge-and-sharing/find-help-in-the-app.md
@@ -0,0 +1,168 @@
+---
+title: "Find Help in the App"
+slug: find-help-in-the-app
+summary: "Search the built-in documentation, use related-page links, and move between overview, guides, troubleshooting, and reference material."
+section: "Knowledge and sharing"
+section_order: 4
+order: 5
+diataxis: howto
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [documentation, help, search, troubleshooting, support]
+related: [desktop-app-tour, troubleshooting, app-command-reference]
+---
+
+The **Docs** area gives you a searchable guide to Personal Jarvis without
+requiring a separate website. Use it to learn a feature, follow a setup path,
+understand how two parts work together, or find the safest first response to a
+problem.
+
+The local library is included with your installation and works without an
+internet connection once the app is running. Online documentation, community
+links, and feedback use your browser and therefore need a network connection.
+
+## Browse the Local Library
+
+1. Open **Docs** from the app sidebar. On the first visit, **Preparing your
+ documentation** can appear while Jarvis builds the local search index.
+2. Start with one of the featured guides, or use **Browse by Topic** to enter a
+ reader journey such as everyday use, configuration, safety, or reference.
+3. Expand or collapse a section in the documentation sidebar, then select a
+ guide by title.
+4. Select **Documentation** above the filter, or the **Documentation** item in a
+ page breadcrumb, to return to the overview.
+
+The sidebar remembers a short list of recently opened guides on this device.
+That list appears when the filter is empty and helps you return to a page
+without searching again.
+
+## Choose the Right Search
+
+The documentation has two search tools. They look similar but answer different
+questions.
+
+| Tool | Best for | What it checks |
+|---|---|---|
+| Sidebar **Filter title/tag...** | Finding a guide when you know the feature or topic | Guide titles, summaries, and topic tags |
+| **Search docs** | Finding a term, visible error, setting, or explanation inside a guide | Titles, headings, tags, and complete guide text |
+| **Browse by Topic** | Learning in a sensible order | Reader journeys and their ordered guides |
+| **On this page** | Jumping within the guide you already opened | Level-two and level-three section headings |
+
+To search all guide text:
+
+1. Select the magnifying-glass button beside **Documentation**. You can also
+ press **Ctrl+K** on Windows or Linux, or **Command+K** on macOS, while Docs is
+ open.
+2. Enter one to three distinctive words. A feature name such as `wake word` is
+ usually more useful than a complete sentence.
+3. Review the guide title, section, and highlighted excerpt in each result.
+4. Use the arrow keys to move through results and **Enter** to open one, or
+ select a result normally. Press **Escape** to close search.
+
+Search runs against the local library. It does not search your chats, Wiki,
+contacts, output files, the public website, or community posts.
+
+## Move Between Related Guides
+
+Each guide is designed as part of a path rather than as an isolated page.
+
+- Use **On this page** on a wide window to jump to a section. On a smaller
+ window, scroll through the same headings in the main guide.
+- Follow links in **How It Fits Together** when an adjacent feature supplies
+ input, receives a result, or controls a permission.
+- Use **Related Guides** near the end of a page for the closest follow-on
+ topics.
+- Use **Previous** and **Next** at the bottom to continue through the complete
+ reader journey.
+- Check **Last reviewed** to see when the guide was last compared with the
+ product.
+
+Internal guide links stay inside Docs. The **Open redesigned online docs**
+button on the overview opens the public documentation in your normal browser.
+The online library can be useful from another device, but it may describe a
+newer release than the version installed on your computer.
+
+## Move From Guidance to Support
+
+Start with the guide for the feature you are using. Its **Troubleshooting**
+table covers the most likely visible symptoms and safe first fixes. If several
+areas are affected, use the main [Troubleshooting](troubleshooting) guide to
+check startup, connections, providers, voice, permissions, and extensions in a
+useful order.
+
+Use the [App Command Reference](app-command-reference) when you know the action
+you want but need to find how that action is exposed across voice, chat, the
+desktop app, or command-line tools. It is a catalog, not a diagnosis guide.
+
+For a product bug, idea, or question, open **Feedback** in the main app
+sidebar. The current Feedback view does not submit a form or attach logs from
+Jarvis. It opens the project's **#report-a-bug** forum in Discord and offers a
+separate **Join Discord first** button. If Discord is not suitable, use the
+project's [public issue tracker](https://github.com/PersonalJarvis/PersonalJarvis/issues).
+
+Before posting anywhere public, describe what you expected, what happened,
+and the shortest steps that reproduce it. Remove credentials, recovery codes,
+private conversation text, contact details, personal file paths, and unrelated
+screens from anything you share.
+
+> [!warning] Never paste an API key, token, password, or recovery code into a
+> guide search, chat message, feedback post, screenshot, or public issue.
+
+## How It Fits Together
+
+1. **Docs starts with the installed reader library.** Jarvis reads the guides
+ shipped with your version and builds a local index for navigation and
+ full-text search.
+2. **A guide leads to the relevant feature.** Setup and how-to pages explain
+ the visible controls; relationship links show which settings, providers,
+ permissions, histories, or outputs affect the same task.
+3. **Troubleshooting narrows a failure.** A feature page handles common local
+ symptoms first. The main troubleshooting guide connects problems that span
+ several parts of the app.
+4. **Reference pages provide exact catalogs.** Use them after you understand
+ the goal and need a command, setting, or supported action without another
+ tutorial.
+5. **External help is a deliberate handoff.** Online docs, Discord, and the
+ public issue tracker open outside Jarvis. The Docs index does not send your
+ search terms or local data to those services.
+
+If the internet is unavailable, the installed guides and their search can
+still work. Online docs and feedback links cannot, but that does not stop chat,
+voice, or other local app areas.
+
+## Check That It Works
+
+1. Open **Docs** and wait until the overview shows the local guide count.
+2. Open full-text search and enter `permissions`.
+3. Confirm that results show a title, section, and highlighted excerpt, then
+ open one result.
+4. Select a heading from **On this page** on a wide window, or use a related
+ guide link near the bottom.
+
+Success means the selected guide opens inside Docs and the search result leads
+to the matching part of the local documentation. No provider credential is
+needed for this check.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| **Preparing your documentation** | Jarvis is scanning the installed guides and building search for the first time | Wait a moment. The rest of the app can remain usable while this finishes. |
+| **Documentation could not be loaded** | The local index did not become ready before the request ended, or its files are unavailable | Select **Try again**. You do not need to restart the app for the first retry. |
+| The sidebar filter finds nothing | It checks guide metadata, not every paragraph | Clear the filter, open full-text search, and try one or two feature-specific words. |
+| Full-text search shows no results | All entered words may not occur in one guide, or the local index is not ready | Shorten the query, remove generic words, and wait for the overview to finish loading before trying again. |
+| A guide says **Could not load doc** | The selected page is missing from the current local index or could not be read | Select **Try again**, return to the overview, and search for the topic in another guide. |
+| Online docs or Feedback does not open | The external browser handoff was blocked or the device is offline | Check the network, try the button once more, then open the public site or issue tracker directly in your browser. |
+| Local and online instructions differ | The website may cover a newer release than the installed library | Prefer the local guide for the version you are running, and check its **Last reviewed** date before changing settings. |
+
+## Next Steps
+
+- Read [Tour the Desktop App](desktop-app-tour) to see where Docs, Feedback,
+ settings, history, and outputs sit in the wider app.
+- Keep [Troubleshooting](troubleshooting) nearby for safe checks when a problem
+ affects startup, connections, providers, voice, permissions, or extensions.
+- Use the [App Command Reference](app-command-reference) when you need the
+ canonical action catalog after choosing the right feature guide.
diff --git a/docs/product/knowledge-and-sharing/jarvis-board.md b/docs/product/knowledge-and-sharing/jarvis-board.md
new file mode 100644
index 0000000000..c0b564814e
--- /dev/null
+++ b/docs/product/knowledge-and-sharing/jarvis-board.md
@@ -0,0 +1,167 @@
+---
+title: "Jarvis Board"
+slug: jarvis-board
+summary: "Explore personal activity, achievements, and optional sharing, including what data leaves the device."
+section: "Knowledge and sharing"
+section_order: 4
+order: 3
+diataxis: explanation
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [board, activity, achievements, sharing, privacy]
+related: [profile-and-contacts, socials-and-feedback, privacy-and-local-data]
+---
+
+Jarvis Board turns recorded activity into a personal overview. It helps you
+understand how often you use Jarvis, how much you and Jarvis speak, which kinds
+of tools are involved, and how your activity changes over time.
+
+The personal dashboard works locally. Sharing is a separate, deliberate
+action: nothing on the Board is published merely because you open or refresh
+the view.
+
+> [!info] Jarvis Board is experimental. The current Board view shows local
+> activity and creates shareable statistic images. Achievement history,
+> pairing, and a shared activity feed are not currently exposed in this view,
+> even though parts of those systems already exist behind it.
+
+## Read the Board
+
+Open **Board** from the app navigation. Jarvis builds the view from recorded
+session and activity data, then refreshes the visible totals in the background.
+Use **Refresh** when you want to request an immediate rebuild.
+
+| What you see | What it means | Important limit |
+|---|---|---|
+| **You said** and **Jarvis said** | Approximate word totals from recorded voice turns | Words are counted by spacing; typed chats are not guaranteed to appear in these totals. |
+| **Day streak** | Consecutive days with recorded activity, plus your longest run | A quiet current day does not immediately erase a streak that was active yesterday. |
+| **Active time** | Time covered by recorded conversations and bounded activity spans | It is an estimate, not working time saved or microphone-on time. |
+| **Words over time** | Daily voice-word totals for you and Jarvis | Empty days can mean no recorded voice turns, not that Jarvis was never opened. |
+| **What you use Jarvis for** | Supported tool calls grouped into broad purposes | It summarizes categories, not the content or outcome of every action. |
+| **Activity** | A 365-day calendar of recorded conversations, tools, tasks, and other supported events | A brighter day means more recorded activity; it is not a quality score. |
+
+These numbers are best used as orientation. They are derived summaries rather
+than an exact transcript, stopwatch, or productivity rating. A crash, disabled
+recording source, old data retention, or an unsupported action can leave a gap.
+
+### Understand achievements
+
+Jarvis also watches selected successful actions, tool use, completed tasks,
+Jarvis-Agent work, and long-term activity for achievements. A newly unlocked
+achievement can appear as a notification, and the unlock is saved locally only
+once.
+
+The current Board screen does not provide the existing achievement list or a
+place to reopen earlier unlocks. This is a real limitation of the experimental
+surface, not evidence that an unlock was lost. Achievement evidence can include
+local counts, tool names, or an identifier for the triggering run; that detail
+is not added to the normal share image.
+
+## Share a Snapshot
+
+The **Share** action creates a square Portable Network Graphics (PNG) image in
+the app. Its card contains the current voice-word totals, conversation count,
+active-time estimate, longest streak, a project link, and an optional social
+handle that you enter.
+
+1. Open **Board** and wait for the totals to load.
+2. Select **Share** and review the preview. Remove the optional handle if you do
+ not want it on the image.
+3. Choose **Copy Image** to place the PNG on your clipboard, or **Save as PNG**
+ to keep it as a file.
+4. Choose **Share on X** only when you intend to send the card to that service.
+ A supported device can open its share sheet. On desktop, Jarvis may copy the
+ image and open a prepared composer so that you can paste it yourself.
+5. Review the final post before publishing it. Jarvis does not control the copy
+ retained by a service after you submit it.
+
+Image generation happens in the app rather than on a Jarvis server. The
+optional handle is kept in local browser storage for later share cards. Saving
+the image creates a normal local output or download; copying it leaves the next
+destination up to you.
+
+## Local and Optional Shared Data
+
+The personal Board and the experimental federation are different features.
+Federation means connecting a separate, self-hosted sharing service so approved
+summary data can be exchanged with paired people. It is disabled by default,
+and the current Board view does not offer reader-ready setup, pairing, feed, or
+disconnect controls.
+
+| Data path | Stays local | Can leave the device |
+|---|---|---|
+| Personal Board | Daily totals, word counts, session counts, categories, records, achievement evidence | Nothing merely from viewing or refreshing the Board |
+| Share image | The generated PNG and optional handle until you choose a destination | The visible card when you copy it into another app or select a sharing service |
+| Experimental federation | Raw transcripts, contact details, Profile fields, run requests, and output files | Approved daily counts, dates, successful tool names, achievement identifiers and tiers, a configured display name, and an optional generated Board bio |
+
+The federation filter deliberately excludes raw conversation text and unknown
+fields. Even aggregate data can reveal habits, dates, or the kinds of tools you
+use, so connect a sharing service only after you understand and accept that
+smaller boundary.
+
+If a sharing backend is unavailable, the local dashboard continues to work and
+keeps its saved summaries. An experimental sync attempt can fail and try again
+later; it must not block conversations, Jarvis-Agents, or local Board refreshes.
+
+## How It Fits Together
+
+1. **Chats, voice, tools, tasks, and Jarvis-Agents create activity.** Jarvis
+ records supported events and voice-session details as part of their normal
+ history.
+2. **The Board aggregates locally.** It counts words, sessions, activity,
+ tool categories, task outcomes, and streaks into a smaller personal data
+ store. It does not copy raw transcript text into the Board totals.
+3. **Achievements react to selected successes.** They can use Jarvis-Agent and
+ tool events, then save an unlock and show a notification. [Jarvis-Agents](jarvis-agents)
+ remains the place to watch mission progress and recovery.
+4. **Outputs keeps files, while Board keeps summaries.** A mission file remains
+ in [Outputs and Files](outputs-and-files); Board never previews or publishes
+ that file. A PNG you save from **Share** becomes a separate local file.
+5. **Profile and Contacts stay separate.** [Profile and Contacts](profile-and-contacts)
+ can personalize conversations and supported actions, but the current Board
+ does not place contact records or Profile fields on its dashboard or share
+ card.
+6. **Social links and feedback stay separate.** [Social Links and Feedback](socials-and-feedback)
+ manages public links and app feedback. It does not automatically post Board
+ statistics, and Board does not attach feedback reports to a share card.
+7. **Offline behavior fails softly.** Local aggregation and saved summaries do
+ not require a federation service. If a local source is unavailable, Jarvis
+ serves the last usable totals or an empty state instead of stopping the rest
+ of the app.
+
+## Check That It Works
+
+1. Complete a short voice conversation that contains several ordinary words.
+2. Open **Board** and select **Refresh**.
+3. Confirm that the page loads without a connection warning and that at least
+ one relevant total or today's activity reflects the recorded conversation.
+4. Open **Share**, confirm the preview contains only the statistics you expect,
+ then close it without selecting a destination.
+
+Success means the local Board loads and can prepare a preview without
+publishing or requiring an external sharing service.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| **Could not load stats** | The local Board store or aggregator did not finish starting | Wait for app startup, select **Refresh**, and follow the main troubleshooting guide if the error remains. |
+| Totals stay at zero | There is no supported recorded activity yet, or the session source is unavailable | Complete and finish a voice conversation, refresh, and compare with Sessions before assuming data was deleted. |
+| Recent words are missing | The latest turn has not been recorded or aggregated, or it was a typed chat rather than a voice turn | Finish the voice session, wait briefly, and select **Refresh**. |
+| An achievement notification appeared but no list is visible | The unlock system is active, but its history component is not mounted in the current Board view | Treat the notification as the visible confirmation; the app does not currently offer a Board history screen. |
+| **Copy Image** saves a file instead | The browser cannot copy PNG images directly | Use the saved PNG and attach it manually in the destination you choose. |
+| **Share on X** does not open a composer | The app shell or browser blocked the new window | Save the PNG, open the service yourself, and review the post before attaching the image. |
+
+## Next Steps
+
+- Read [Privacy and Local Data](privacy-and-local-data) to understand the local
+ stores behind conversations, activity summaries, and generated files.
+- Use [Outputs and Files](outputs-and-files) to review actual Jarvis-Agent
+ deliverables instead of their aggregate Board activity.
+- Review [Profile and Contacts](profile-and-contacts) to manage personal context
+ that remains separate from Board statistics.
+- Open [Social Links and Feedback](socials-and-feedback) to manage public links
+ or send feedback without assuming that Board data is attached.
diff --git a/docs/product/knowledge-and-sharing/socials-and-feedback.md b/docs/product/knowledge-and-sharing/socials-and-feedback.md
new file mode 100644
index 0000000000..ac0d43c3d3
--- /dev/null
+++ b/docs/product/knowledge-and-sharing/socials-and-feedback.md
@@ -0,0 +1,124 @@
+---
+title: "Social Links and Feedback"
+slug: socials-and-feedback
+summary: "Find official community links and share useful feedback without accidentally including private information."
+section: "Knowledge and sharing"
+section_order: 4
+order: 4
+diataxis: howto
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [socials, feedback, community, privacy]
+related: [profile-and-contacts, jarvis-board, privacy-and-local-data]
+---
+
+**Socials** collects the project's public community and profile links in one
+place. **Feedback** takes you to the official Discord forum where you can report
+a bug, suggest an idea, or ask a question.
+
+Both features open a service outside Jarvis. You decide whether to follow a
+link and what to post; Jarvis does not automatically publish your profile,
+conversation, files, or Board activity.
+
+## Before You Start
+
+- Connect to the internet and make sure your default browser can open external
+ links.
+- To post feedback, use a Discord account and join the Personal Jarvis server.
+- Prepare a report that contains enough detail to reproduce the problem but no
+ credentials, contact records, private conversation text, or personal paths.
+
+> [!warning] Treat a community post and every attachment as shared with other
+> people. Crop screenshots carefully, and never include API keys, passwords,
+> recovery codes, private messages, or account details.
+
+## Browse Social Links
+
+1. Open **Socials** from the app navigation. The page shows enabled links,
+ grouped by service.
+2. Select a service with one link to open it directly in your browser.
+3. Select a service with several links to open its detail page, then choose the
+ exact destination. Select **Back** to return to the service grid.
+4. Check the destination before signing in or sharing information. A link
+ leaving Jarvis is governed by that service's own account and privacy rules.
+
+The list starts with official Personal Jarvis community and project links and
+is stored on your installation. It is separate from your Profile and Contacts;
+opening Socials does not expose either one.
+
+> [!note] The current Socials page is read-only. It has no **Add**, **Edit**,
+> **Hide**, or **Delete** controls, even though the supported command-line
+> interface can change the local list. If you administer an installation, use
+> `jarvis socials --help` and the [CLI Reference](cli-reference) rather than
+> editing a data file by hand.
+
+## Send Useful Feedback
+
+1. Open **Feedback** from the app navigation.
+2. If you have not joined the community, select **Join Discord first** and
+ complete Discord's onboarding.
+3. Return to **Feedback** and select **Open #report-a-bug**. Jarvis asks your
+ operating system or browser to open the forum outside the app.
+4. Choose the appropriate forum option and write a short, descriptive title.
+5. Explain what you tried, what you expected, what happened instead, and the
+ smallest repeatable set of steps. Add the app version and operating system
+ only when they help explain the problem.
+6. Review the post and any screenshot, then submit it in Discord.
+
+The current Feedback page does not contain a form, upload a screenshot, attach
+logs, or send system details automatically. Selecting a button only opens
+Discord; your report is not sent until you submit it there.
+
+## How It Fits Together
+
+1. **You start from the app.** The Socials and Feedback entries are neighboring
+ shortcuts in the main navigation.
+2. **Socials reads a local directory of public links.** Selecting a link hands
+ the destination to a browser. It does not read or publish data from
+ [Profile and Contacts](profile-and-contacts).
+3. **Feedback opens a community destination.** Jarvis does not turn the active
+ chat, voice session, or output file into a report. You choose what to copy
+ into Discord.
+4. **Jarvis Board remains separate.** A share card from
+ [Jarvis Board](jarvis-board) is not posted through Socials or attached to
+ Feedback. You must review and share it yourself.
+5. **Privacy follows the destination.** Local data stays local until you paste,
+ attach, or publish it. [Privacy and Local Data](privacy-and-local-data)
+ explains the boundary before information leaves your device.
+6. **External failures stay contained.** If a social platform, Discord, or your
+ browser is unavailable, these links can fail without stopping chats, voice,
+ tasks, or local files.
+
+## Check That It Works
+
+1. Open **Socials** and select a service that shows more than one link.
+2. Confirm that its detail page lists the separate destinations and that
+ **Back** returns to the grid.
+3. Open **Feedback** and confirm that both **Open #report-a-bug** and **Join
+ Discord first** are available.
+
+Success means the local social directory loads, grouped links can be explored,
+and Feedback presents the two Discord paths. You do not need to publish a post
+to complete this check.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| Socials keeps loading or shows an error | The local web service is still starting or did not answer | Wait for startup to finish, leave and reopen **Socials**, then use the main troubleshooting guide if the error remains. |
+| **No social links are available** appears, but there is no add button | The saved list is empty, disabled, or unreadable; the current page cannot repair it | An administrator can inspect `jarvis socials list` and use the supported CLI to add or enable a valid `http` or `https` link. |
+| A Socials tile does not open | The operating system or browser could not open the external destination | Check the default-browser setting and internet connection, then try again. The app keeps the destination visible in the link so you can also copy it into a browser. |
+| Discord opens a welcome page or denies the forum | The account has not joined the server or completed onboarding | Return to **Feedback**, select **Join Discord first**, finish onboarding, then use **Open #report-a-bug** again. |
+| You selected Feedback but nothing was submitted | The page only opens Discord; it does not send an in-app form | Finish and submit the post inside Discord. If Discord is unavailable, open the GitHub repository from **Socials** and use its Issues page. |
+
+## Next Steps
+
+- Review [Profile and Contacts](profile-and-contacts) to understand which
+ personal details stay separate from the public Socials directory.
+- Read [Jarvis Board](jarvis-board) before creating a statistics card or
+ choosing an external sharing destination.
+- Use [Privacy and Local Data](privacy-and-local-data) to decide what is safe to
+ include in a community post, screenshot, or issue report.
diff --git a/docs/product/knowledge-and-sharing/wiki-and-memory.md b/docs/product/knowledge-and-sharing/wiki-and-memory.md
new file mode 100644
index 0000000000..3d93959b44
--- /dev/null
+++ b/docs/product/knowledge-and-sharing/wiki-and-memory.md
@@ -0,0 +1,189 @@
+---
+title: "Wiki and Memory"
+slug: wiki-and-memory
+summary: "Understand what Jarvis can remember, how the Wiki connects ideas, and how memory supports chats, contacts, and agents."
+section: "Knowledge and sharing"
+section_order: 4
+order: 1
+diataxis: explanation
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [wiki, memory, context, profile, contacts, privacy]
+related: [profile-and-contacts, connect-obsidian, jarvis-agents, privacy-and-local-data]
+---
+
+Jarvis uses several kinds of memory for different jobs. The **Wiki** is the
+long-term layer: a collection of readable notes about durable information such
+as people, preferences, projects, decisions, and recurring ideas. Links between
+notes show how those subjects relate.
+
+The Wiki is not a recording of everything you say or do. Current conversation
+context, saved chats, your Profile, Contacts, activity episodes, and Wiki notes
+remain separate so each can keep the right level of detail and control.
+
+## Understand the Memory Layers
+
+| Memory area | What it is for | What it does not mean |
+|---|---|---|
+| **Current conversation context** | The recent messages Jarvis uses to follow the conversation you are having now | A message is not automatically a permanent Wiki fact |
+| **Chat and voice history** | Stored turns and sessions that let you review or search past conversations | A transcript is not the same as a cleaned-up knowledge note |
+| **Activity episodes** | Short summaries of periods of computer activity when awareness features are enabled | They are not a complete screen recording or a verified personal fact |
+| **Profile** | Explicit facts and preferences about you that directly shape how Jarvis responds | Editing the Profile does not guarantee that a matching Wiki page changes |
+| **Contacts** | The authoritative address book for names and contact details | Phone numbers, email addresses, and street addresses are deliberately kept out of Wiki person notes |
+| **Wiki** | Durable Markdown notes that can be linked, searched, reviewed, and corrected | It is not guaranteed to capture every useful detail from a conversation |
+
+Use the dedicated **Profile** or **Contacts** view when information must stay in
+a structured field. Use the Wiki for knowledge that benefits from explanation,
+history, and links to other subjects.
+
+## Explore the Wiki
+
+1. **Open Wiki from the sidebar.** The view opens on **Wiki · Memory Map** and
+ shows the number of pages and links currently available.
+
+2. **Read the health strips.** They show whether the vault is available,
+ whether a write succeeded or failed, whether facts are waiting for review,
+ and whether the search index needs rebuilding. A neutral status can simply
+ mean that no write has been attempted yet.
+
+3. **Browse by subject.** Expand **entities**, **concepts**, **projects**, or
+ **sessions** in the Vault list, then choose a page. Entities are people or
+ things, concepts are recurring ideas, projects describe ongoing work, and
+ session pages are summaries rather than full transcripts.
+
+4. **Use the Memory Map.** Select a node to open its page. A connection means
+ that one page contains a Wiki link to another; it does not prove that the
+ relationship is current or correct.
+
+5. **Follow links and backlinks.** A link inside a page opens the referenced
+ subject. **Backlinks** show pages that point to the page you are reading.
+ A broken link points to a page that does not currently exist.
+
+The in-app Wiki is a reader. To edit the underlying notes yourself, connect an
+optional Markdown editor through [Connect Obsidian](connect-obsidian). Jarvis
+works without Obsidian because the files remain ordinary Markdown on your
+computer.
+
+## Save Something Deliberately
+
+Background review can discover durable information from [Chats](chats) and
+voice conversations, but it may decide that a turn is temporary, already
+known, unsupported, or unsafe to store. If a detail must be saved, make the
+request explicit and name the Wiki, for example: `Save to my wiki that I prefer
+written summaries.`
+
+Jarvis acknowledges that the write has started, then reports whether it was
+saved or failed. Wait for that completion result before relying on the note.
+Open **Wiki** and inspect the relevant page when the detail matters.
+
+> [!warning] Never ask Jarvis to remember a password, credential, recovery
+> code, or access token. The write guard blocks common secret shapes, but the
+> safe place for credentials is the app's protected connection screen.
+
+## How a Conversation Becomes a Wiki Note
+
+The background memory path uses two checks so that an early guess cannot write
+straight into a page:
+
+| Step | What Jarvis does | Possible result |
+|---|---|---|
+| 1. Review the turn | Looks for a durable user-stated fact; assistant text may help resolve context but is not accepted as evidence | No candidate, or a short candidate tied to the user's turn |
+| 2. Compare knowledge | Reads the most relevant complete Wiki pages and checks the candidate against them | Add, update, no change, or invalidate outdated information |
+| 3. Guard the write | Checks the destination, secret patterns, links, and page format; protects recent manual edits | Apply the change, leave it waiting, or reject it |
+| 4. Refresh readers | Updates the local search index and Wiki status after a successful write | The revised page becomes available to Wiki recall |
+
+This is an automated curator review, not a human approval queue. A **no change**
+result usually means the Wiki already says the same thing. **Invalidate** keeps
+the older information as history and marks it as superseded instead of silently
+deleting it. A provider outage or malformed response is not treated as a fact
+decision; the item can remain waiting or the write can fail visibly.
+
+Automatic review favors information that should still help weeks later, such
+as identity, preferences, relationships, owned items, projects, plans, and
+decisions. Greetings, pure questions, immediate commands, and passing status
+updates should not become long-term notes. This filtering can still miss or
+misclassify information, so verify important pages and correct them in the
+Markdown vault when needed.
+
+## How It Fits Together
+
+1. **A chat or voice turn supplies possible knowledge.** Jarvis can keep the
+ current exchange in conversation context and review the user-stated part in
+ the background. The reply does not wait for this review.
+
+2. **A connected provider performs the language review.** The Wiki setting
+ normally follows the active Brain and chooses a lower-cost model. If that
+ provider is unavailable, Jarvis can try another connected provider family.
+ If none works, the conversation can still finish while the Wiki reports that
+ nothing was written.
+
+3. **The curator updates local notes.** Approved changes pass through guarded
+ writes, backups, validation, and a local search index. Relevant snippets can
+ then help the main Jarvis answer a later question; a slow or missing Wiki
+ lookup is skipped rather than holding up the reply.
+
+4. **Profile and Contacts remain authoritative for structured data.** The
+ Profile directly supplies response preferences. Contacts keep full contact
+ details. Jarvis can create a companion person note with a contact's name,
+ aliases, relationship, and your note, while excluding phone, email, and
+ street address. The current in-app Wiki tree does not list those companion
+ contact pages, so review the authoritative record in **Contacts**.
+
+5. **Jarvis-Agents receive only scoped access.** A mission can be granted
+ short-lived, read-only Wiki tools so a Jarvis-Agent can list, search, or read
+ relevant pages. It does not automatically receive the whole vault, cannot
+ receive credentials through the grant, and cannot edit Wiki pages through
+ that read-only surface. If the grant or Wiki is unavailable, the agent must
+ continue without that context or report that it is missing.
+
+6. **Obsidian is an optional second view of the same files.** Manual Markdown
+ edits stay on your computer and can appear in the app after the Wiki refreshes.
+ Obsidian does not own the data and is not required for Jarvis to run.
+
+The storage is local, but processing is not necessarily local. When you use a
+remote Wiki provider, relevant user excerpts and related Wiki page content may
+be sent to that provider for extraction and review. A Jarvis-Agent using a
+remote model may also process the Wiki content it explicitly reads. Review
+[Privacy and Local Data](privacy-and-local-data) before storing sensitive
+personal information.
+
+## Check That It Works
+
+1. In a chat or voice conversation, say: `Save to my wiki that I prefer written
+ summaries.`
+2. Wait for Jarvis to report a successful save. A message that it is still
+ writing is not the final result.
+3. Open **Wiki** and confirm that the health strip reports a successful last
+ write rather than a pending or failed one.
+4. Open the relevant profile or preference page and confirm that the statement
+ appears once and in the right context.
+
+The memory path works when Jarvis confirms the completed write, the Wiki health
+stays clear, and the page contains the expected statement. Delete or correct
+the test sentence in the Markdown vault if it does not describe a real
+preference.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| The Wiki is empty after ordinary conversations | No durable candidate has passed both review stages, or the Wiki has not completed its first write | Make one explicit, non-sensitive Wiki save request and wait for the completion result |
+| **Facts are waiting to be written** | Review work is queued, the app closed before consolidation, or a provider is temporarily unavailable | Keep the app running, check the Wiki provider status, and wait before repeating the same note |
+| **Chain failure** or **Last write failed** | Every eligible Wiki provider failed, timed out, or returned unusable output | Open **API Keys > Advanced > Wiki (long-term memory)**, connect or choose a working provider, then retry a harmless test note |
+| **Search index** shows fewer indexed pages than vault pages | The Markdown files and the derived local index are out of sync | Select **Rebuild index**, then reopen the affected page |
+| A contact's companion note is not in the Wiki tree | The current tree lists four Wiki page groups but not contact companion pages | Use **Contacts** for the saved record, or inspect the vault through Obsidian until the tree supports those pages |
+| A linked page cannot be opened | The target page is missing, invalid, or the page list has not refreshed | Reopen Wiki, rebuild the index if it is stale, and correct the link in the Markdown vault if the target truly does not exist |
+
+## Next Steps
+
+- Read [Profile and Contacts](profile-and-contacts) to choose the authoritative
+ place for personal preferences and contact details.
+- Follow [Connect Obsidian](connect-obsidian) to view and edit the same Markdown
+ vault with a dedicated knowledge editor.
+- Read [Jarvis-Agents](jarvis-agents) to understand when a mission can receive
+ scoped, read-only Wiki access.
+- Review [Privacy and Local Data](privacy-and-local-data) before saving personal
+ information or using a remote provider for memory processing.
diff --git a/docs/product/personalize-and-connect/audio-and-wake-word.md b/docs/product/personalize-and-connect/audio-and-wake-word.md
new file mode 100644
index 0000000000..91ce4e071d
--- /dev/null
+++ b/docs/product/personalize-and-connect/audio-and-wake-word.md
@@ -0,0 +1,203 @@
+---
+title: "Audio Devices and Wake Word"
+slug: audio-and-wake-word
+summary: "Choose a microphone and speaker, set a wake phrase, and tune reliable hands-free listening."
+section: "Personalize and connect"
+section_order: 3
+order: 2
+diataxis: howto
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [audio, microphone, speaker, wake-word, voice, pipeline, realtime]
+related: [voice-conversations, speech-dictionary, permissions, troubleshooting]
+---
+
+Choose which microphone Jarvis hears and where spoken replies play, then set a
+wake phrase for hands-free activation. The recommended setup uses automatic
+device selection and lets Jarvis choose the best available local wake engine.
+
+The recommended Auto wake paths run locally. They only decide when to start
+listening; the request you speak afterward follows your selected voice mode and
+speech services. An advanced user-supplied ONNX model can use the selected
+speech-recognition service to verify a possible match, so review that service's
+privacy terms if you choose this path.
+
+## Before You Start
+
+- Connect the microphone and speaker or headset you want to use.
+- Wait for the desktop app to show **Ready** instead of **Voice starting...**.
+- Allow microphone access when your operating system asks. On macOS, review
+ **Settings > Privacy permissions** in Jarvis as well.
+- Choose a wake phrase that you are comfortable saying near your computer. Do
+ not use a password, recovery code, or other secret.
+
+Voice is optional. A computer without usable audio hardware can continue to use
+Chats, tasks, and the other text-based features.
+
+## Know What Each Setting Controls
+
+The voice path has several distinct parts. Changing one does not automatically
+repair another.
+
+| Part | Its job | Where to change it |
+|---|---|---|
+| **Microphone** | Captures the wake phrase and the request that follows | **Settings > Audio devices > Microphone** |
+| **Wake phrase** | The words you say to start a desktop voice session | **Settings > Wake Word > Wake phrase** |
+| **Wake engine** | Listens for that phrase; the recommended Auto paths use local detection | **Settings > Wake Word > Detection engine** |
+| **Speech recognition** | Turns the request after the wake into usable text in Pipeline | **Languages** and **API Keys & Providers** |
+| **Voice output** | Plays Jarvis's spoken reply | **Settings > Audio devices > Voice output** |
+| **Reply voice** | Controls the language and sound of the reply | **Languages** and the voice provider settings |
+
+The [Speech Dictionary](speech-dictionary) can correct recurring words in a
+Pipeline transcript after the wake. It does not make the wake phrase easier to
+detect, and it does not currently rewrite Realtime transcripts.
+
+## Choose Your Audio Devices
+
+1. Open **Settings** and find **Audio devices**.
+2. Leave **Voice output** on **Automatic (recommended)** for the simplest
+ setup. Jarvis follows a suitable available output and adapts when devices
+ come and go.
+3. Leave **Microphone** on **Automatic (recommended)**, or choose a specific
+ microphone when the automatic choice is not the one you want.
+4. Plug in or reconnect a device, then select **Rescan devices** if it does not
+ appear in the list.
+5. Watch for the saved confirmation. With a running desktop voice pipeline,
+ the output changes for the next reply and the wake listener reopens on the
+ new microphone within a moment.
+
+If a selected device is unplugged, its name can remain visible so the app does
+not hide your saved choice. Jarvis uses automatic selection while that device
+is absent and can use the saved device again when it returns.
+
+If the app says the change applies on the next start, no live desktop voice
+pipeline was available. The choice is still saved; reopen voice or restart the
+app when convenient.
+
+## Set Up a Wake Phrase
+
+1. In **Settings**, find **Wake Word** and turn on **Activate wake word**.
+2. Enter the complete phrase in **Wake phrase**. A short phrase with a prefix,
+ such as “Hey Nova,” is less likely to activate when the core word appears in
+ ordinary conversation. First-run setup adds the “Hey” prefix for you; the
+ Settings field accepts the complete phrase.
+3. Under **Which language do you speak?**, choose the language in which you
+ actually pronounce the phrase. Choose based on your speech, not the origin
+ of the name or word.
+4. Leave **Detection engine** on **Auto (recommended)**. Auto looks for a local
+ option that can serve your exact phrase and current language.
+5. Select **Save wake word**. A running desktop voice pipeline applies the new
+ phrase immediately. Follow a restart notice only when the app shows one.
+6. Select **Test wake word** and speak normally during the check. The result
+ reports the resolved engine, spoken language, microphone signal, and any
+ clear readiness problem.
+
+There is no wake-sensitivity slider. Jarvis uses calibrated settings for each
+engine. Improve reliability by choosing the correct microphone and spoken
+language, using a prefixed phrase, and acting on the self-test result.
+
+> [!note] The spoken-language choice is shared with Pipeline speech
+> recognition. The reply language and the voice you hear are separate choices;
+> see [Languages and Voices](languages-and-voices).
+
+## Understand the Wake Engines
+
+Most people should keep **Auto**. The other choices are useful when you are
+diagnosing a warning or already have an advanced local model.
+
+| Choice | What it does | When to use it |
+|---|---|---|
+| **Auto** | Chooses a matching custom model, local keyword spotting, or local speech matching; otherwise leaves wake activation unavailable | Recommended for normal use |
+| **Keyword spotting** | Uses an offline, CPU-friendly model for the selected spoken language | When the matching local wake model is installed |
+| **STT match** | Transcribes short local audio windows and matches the phrase | A fallback for arbitrary phrases; unusual names can be less reliable |
+| **Custom ONNX model** | Loads a user-supplied model trained for the phrase and verifies candidates with speech recognition | Advanced setups with a compatible model file |
+
+The current selector can also show **openWakeWord (built-in phrases)**. Personal
+Jarvis does not ship a named built-in wake phrase model. Leave **Auto** selected
+unless you supplied a compatible custom model; otherwise Jarvis resolves
+through the generic local fallback chain.
+
+When the app says a phrase is using a degraded fallback, choose **Download wake
+model** to fetch the local model for the selected spoken language. If it offers
+**Enable any wake word**, that installs the optional local speech pack in the
+app. Both downloads require a connection once; detection remains local after
+the required files are present.
+
+If no local engine can serve your phrase, Jarvis does not pretend to listen and
+does not substitute a hidden wake phrase. Wake activation stays unavailable,
+and you can use the configured Call or push-to-talk shortcut instead.
+
+## How It Fits Together
+
+1. **The microphone supplies local audio.** The native desktop listener uses
+ the microphone selected under **Audio devices**, subject to operating-system
+ permission.
+2. **The wake engine checks only for your phrase.** Auto uses the selected
+ spoken language and a local capability that is actually available on this
+ computer. An advanced custom ONNX setup can add a speech-recognition check.
+3. **A confirmed wake opens a voice session.** The Jarvis Bar becomes active,
+ and the app starts the voice mode selected in **API Keys & Providers**.
+4. **Pipeline or Realtime handles the request.** Pipeline recognizes speech,
+ sends the text to the assistant, and produces spoken output as separate
+ stages. Desktop Realtime keeps the microphone and reply in one live audio
+ session. If Realtime cannot open before accepting the turn, Jarvis can use
+ Pipeline instead.
+5. **The reply uses the output side.** The reply language and voice determine
+ what Jarvis says; **Voice output** determines where you hear it.
+
+The native **Audio devices** pickers do not select hardware for a Realtime
+session started in a remote browser. In that case, the browser's site
+permission and the device choices of that computer control its microphone and
+speaker.
+
+Jarvis does not require one operating system or graphics processor for wake
+detection. Auto uses a suitable installed local path. If an optional accelerated
+path is not verified on the machine, Jarvis stays on a supported local fallback
+instead. On a headless system with no audio devices, the app remains available
+for text use and stores settings for a later voice-capable start.
+
+## Check That It Works
+
+1. Set both audio pickers to **Automatic (recommended)** or your intended
+ devices.
+2. Save a prefixed phrase with **Detection engine** set to **Auto** and the
+ correct spoken language.
+3. Select **Test wake word**. Resolve any warning until the result says the
+ phrase is ready and the microphone signal is present.
+4. Return to the app's ready state and say the phrase once at a normal volume.
+5. Confirm that the Jarvis Bar changes to **Listening**. Ask a short question
+ and confirm that the reply plays through the selected output.
+
+The self-test checks configuration and microphone readiness. The end-to-end
+wake confirms how the phrase behaves in your actual room.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| **No audio devices found on this machine** | The host has no usable local input or output, or enumeration is not ready | Connect or enable a device, select **Rescan devices**, and check operating-system audio settings |
+| The saved device is listed but unplugged | Jarvis preserved the choice and is temporarily using automatic selection | Reconnect it or choose **Automatic (recommended)** |
+| **Test wake word** reports no microphone or a quiet signal | Permission, input choice, or input level is blocking useful audio | Review [Permissions](permissions), choose the correct microphone, and test again while speaking normally |
+| The test reports the wrong language or an unsupported word | The local language model does not match how you speak the phrase | Choose the language you speak, save again, or use a different prefixed phrase |
+| Saving shows a degraded-engine warning | The preferred local wake model is missing or the phrase is on the weaker speech-match path | Select **Download wake model** or **Enable any wake word**, then save and test again |
+| The phrase activates during ordinary conversation | The phrase is too short or lacks a prefix | Use a distinct two- or three-word phrase with a prefix; there is no sensitivity control to tune |
+| The wake test passes, but a browser Realtime control hears the wrong device | The browser owns that session's audio capture | Allow microphone access for the site and choose the device in the browser or operating system |
+| A save says a restart is required | The native voice pipeline was not running, so live apply was unavailable | Reopen voice or restart the app, then repeat the end-to-end check |
+
+For persistent failures, record the exact visible status and continue with
+[Troubleshooting](troubleshooting). Do not copy credentials, private
+conversation text, or personal device details into a public report.
+
+## Next Steps
+
+- Read [Voice Conversations](voice-conversations) to understand how activation,
+ Pipeline, Realtime, speech recognition, and spoken output form one turn.
+- Read [Speech Dictionary](speech-dictionary) to correct recurring recognition
+ mistakes after a successful wake without changing the wake engine.
+- Read [Permissions](permissions) when the operating system or browser blocks
+ microphone access.
+- Read [Troubleshooting](troubleshooting) for a wider voice and app recovery
+ checklist when the focused checks on this page do not resolve the issue.
diff --git a/docs/product/personalize-and-connect/instructions-and-persona.md b/docs/product/personalize-and-connect/instructions-and-persona.md
new file mode 100644
index 0000000000..8dee8b9f6f
--- /dev/null
+++ b/docs/product/personalize-and-connect/instructions-and-persona.md
@@ -0,0 +1,174 @@
+---
+title: "Instructions and Persona"
+slug: instructions-and-persona
+summary: Shape how Jarvis responds without changing providers, memories, or safety rules.
+section: "Personalize and connect"
+section_order: 3
+order: 5
+diataxis: howto
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [instructions, persona, personalization, profile, safety]
+related: [chats, profile-and-contacts, safety-and-approvals]
+---
+
+You can shape how Jarvis communicates without changing the service or model
+that answers you. For most people, **standing instructions** are the right
+place to set tone, formatting, language preferences, and sensible defaults.
+
+The **System Prompt** is an advanced editor for the persona, which is the
+general character and speaking style Jarvis starts with. It is broader than
+standing instructions, but it still cannot add tools, grant permissions, or
+remove safety checks.
+
+## Choose the Right Layer
+
+| Layer | Use it for | Where to change it | What it does not change |
+|---|---|---|---|
+| **Standing instructions** | Your preferred tone, answer shape, defaults, and working habits | The sidebar page named after your assistant, ending in `.md` | Providers, stored knowledge, permissions, or safety rules |
+| **Packaged persona** | The built-in voice, warmth, and response style | Used automatically until you save a custom System Prompt | Facts about you or access to tools |
+| **Custom System Prompt** | Replacing the packaged persona with your own broader behavior guide | **Settings > System Prompt** | Runtime capabilities, approvals, or enforced language settings |
+| **Profile and Contacts** | Your identity and preferences, plus the people you choose to save | **Profile** and **Contacts** | General assistant behavior or project knowledge |
+| **Wiki and Memory** | Facts, notes, projects, and context Jarvis can recall | **Wiki** and memory features | Tone rules or provider selection |
+| **Provider and model** | The service and model that produce an answer | **API Keys & Providers** | Your saved instructions, profile, or memory |
+
+> [!warning] Anything you save in an instruction or persona editor can become
+> part of the context given to the model that answers a turn. Do not put API
+> keys, passwords, private records, or other secrets in either editor.
+
+## Before You Start
+
+Write down one or two outcomes you want. Start with a small instruction set so
+you can tell which change caused the result. If you mainly want Jarvis to know
+your name, form of address, or communication preferences, update your
+[Profile and Contacts](profile-and-contacts) instead.
+
+Prefer standing instructions unless you have a clear reason to replace the
+whole persona. They are easier to change and preserve the tested default
+persona underneath.
+
+## Add Standing Instructions
+
+1. Open the sidebar and choose the page whose label ends in `.md`. The label
+ uses your assistant's current name and the page shows an **Active** or
+ **Empty** badge.
+2. Select **Start from template** if you want headings for communication style,
+ language, preferred actions, things to avoid, and standing facts. This only
+ fills the editor; it does not save anything yet.
+3. Replace the prompts with short, direct preferences. For example, ask for
+ plain language, short paragraphs, or a recommendation when several safe
+ options are available.
+4. Select **Save instructions**. A confirmation appears, and the change applies
+ to the assistant's next message without a restart.
+5. Open [Chats](chats) and send a request that makes the preference easy to
+ observe.
+
+Use **Revert changes** to discard edits that you have not saved. To clear all
+standing instructions, empty the editor and select **Save instructions**. The
+page returns to its empty state.
+
+## Change the Persona
+
+A system prompt is the high-level guidance a model receives before your
+message. Changing it can affect tone, length, spoken output, and general
+behavior across many conversations, so treat this as an advanced setting.
+
+1. Open **Settings** and find **System Prompt**. The editor shows the effective
+ persona and a **Default** or **Custom** badge.
+2. Review the whole text before changing it. Saving an edit creates a custom
+ persona that replaces the packaged persona layer; it is not a small patch on
+ top of the default.
+3. Keep the persona focused on behavior that a model can follow, such as tone,
+ response structure, and how spoken answers should sound.
+4. Select **Save prompt**. The badge changes to **Custom**, and the new persona
+ applies on the next message without a restart.
+5. Select **Reset to default** if you want to remove the custom persona and
+ restore the packaged version.
+
+The editor does not allow an empty custom prompt. Use **Reset to default**
+instead of deleting all text.
+
+## Write Instructions That Work Well
+
+| Prefer | Avoid |
+|---|---|
+| One clear rule per bullet | Long, conflicting paragraphs |
+| Observable requests such as “Use short paragraphs” | Vague requests such as “Be better” |
+| A priority when two preferences may conflict | Demands to bypass approvals or permissions |
+| Stable preferences you want on future turns | One-time requests that belong in the current chat |
+
+Keep current tasks in the conversation. Keep durable facts about yourself in
+the Profile, and keep notes or project knowledge in Wiki and Memory. This makes
+each source easier to review, correct, or remove later.
+
+## How It Fits Together
+
+One answer is assembled from several independent layers:
+
+1. You send a message in **Chats** or start a voice turn.
+2. Jarvis combines the active persona, your standing instructions, relevant
+ profile facts, available memory, and the capabilities present for that turn.
+3. The selected provider and model produce an answer from that context. A
+ different model may interpret complex wording differently, but switching
+ providers does not delete the saved layers.
+4. If the answer requires an action, permissions and the safety tier decide
+ whether it can run, needs approval, or must be blocked. Text in either editor
+ cannot change that decision.
+5. The result returns to the chat or voice conversation. Relevant new facts can
+ be saved through Profile or Memory features; they do not automatically
+ become new behavior rules.
+
+Standing instructions can refine the default persona when the two differ on
+style. Dedicated runtime settings, such as an explicit reply-language choice,
+and non-overridable tool and safety rules still take priority. Read
+[Providers and API Keys](providers-and-api-keys) for the service and model
+layer, and [Wiki and Memory](wiki-and-memory) for stored knowledge.
+
+## Check That It Works
+
+Save one distinctive but harmless standing preference, such as asking for a
+one-sentence summary at the start of longer answers. Send a new multi-part
+question in **Chats**. The next answer should show that structure.
+
+Then remove the test instruction and save again. A later answer should no
+longer be expected to follow it. This checks both applying and clearing without
+changing your provider, profile, or memory.
+
+## Current Limitations
+
+- Instructions are guidance to a model, not a deterministic formatting engine.
+ Very long, ambiguous, or conflicting rules may be followed inconsistently.
+- Models can respond differently to the same instruction. Test important
+ behavior again after changing the active model.
+- Replacing the System Prompt removes the packaged persona layer until you
+ reset it. Structural capability, language, permission, and safety controls
+ remain separate.
+- An instruction applies from the next assistant message. It does not rewrite
+ earlier chat messages or stored memories.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| **Save instructions** is unavailable | The editor has not changed, or the page is still loading | Make one small edit, then try again |
+| Your preference is ignored | The rule is vague, conflicts with another rule, or the model handled it differently | Reduce it to one observable instruction and test a new message |
+| Old behavior remains after clearing | The behavior may come from the persona, Profile, Memory, or the current chat context | Start a new test message and review each separate layer |
+| The System Prompt cannot be saved | The editor is empty or the save request failed | Restore some text, or use **Reset to default** |
+| Jarvis still asks for approval | The requested action is controlled by safety and permissions | Review [Safety and Approvals](safety-and-approvals); do not add bypass instructions |
+
+If both editors show an error or fail to load, keep your text in a temporary
+local note, reopen the view, and follow [Troubleshooting](troubleshooting)
+before trying to save again.
+
+## Next Steps
+
+- Read [Chats](chats) to test a preference in a fresh conversation.
+- Review [Profile and Contacts](profile-and-contacts) to store facts about you
+ and the people you know in the right place.
+- Use [Wiki and Memory](wiki-and-memory) for project knowledge and facts you
+ want Jarvis to recall.
+- Read [Safety and Approvals](safety-and-approvals) to understand which action
+ rules cannot be changed by instructions or a persona.
diff --git a/docs/product/personalize-and-connect/languages-and-voices.md b/docs/product/personalize-and-connect/languages-and-voices.md
new file mode 100644
index 0000000000..5f709797eb
--- /dev/null
+++ b/docs/product/personalize-and-connect/languages-and-voices.md
@@ -0,0 +1,160 @@
+---
+title: "Languages and Voices"
+slug: languages-and-voices
+summary: Choose reply language, speech language, and speaking voice while keeping every layer of a conversation consistent.
+section: "Personalize and connect"
+section_order: 3
+order: 3
+diataxis: howto
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [languages, voice, speech, settings]
+related: [voice-conversations, providers-and-api-keys, audio-and-wake-word]
+---
+
+You can use Personal Jarvis in English, German, or Spanish without making every
+part of the app use the same language. Choose separately what the interface
+shows, how speech is recognized, and which language Jarvis uses for replies.
+
+The speaking voice is a separate choice. It comes from the active speech
+provider and can change when you switch between Pipeline and Realtime voice.
+
+> [!info] Changing the interface language never changes what Jarvis hears or
+> says. Use **Voice Recognition Language** and **Reply Language** for that.
+
+## Before You Start
+
+Typed conversations only need a working Brain provider. Spoken conversations
+also need microphone permission and a working voice setup.
+
+If a language or voice choice depends on an online provider, connect it under
+**API Keys**. Enter credentials only in that view, never in chat or voice input.
+
+## Understand the Four Choices
+
+| Choice | Where to choose it | What it controls | Options |
+|---|---|---|---|
+| Interface Language | **Settings > Languages** | Labels, buttons, and app messages | English, German, Spanish |
+| Voice Recognition Language | **Settings > Languages** | How spoken audio becomes text | Automatic, English, German, Spanish |
+| Reply Language | **Settings > Languages** | Answers, acknowledgements, status messages, and action readbacks | Automatic, English, German, Spanish |
+| Speaking Voice | **API Keys**, on the active TTS or Realtime provider | The sound of spoken replies | The choices supported by that provider and model |
+
+**Automatic** has a different purpose in each language setting:
+
+- For voice recognition, it detects the language of each spoken turn.
+- For replies, it follows the language you speak or type while keeping a
+ running conversation stable.
+
+## Choose Your Languages
+
+1. Open **Settings** and find **Languages**.
+2. Under **Interface Language**, choose English, German, or Spanish. The open
+ app changes immediately, including labels and buttons.
+3. Under **Voice Recognition Language**, keep **Automatic** if you regularly
+ switch languages. Choose one language if automatic recognition repeatedly
+ mishears speech that is always in that language.
+4. Under **Reply Language**, choose **Automatic** to follow your conversation,
+ or select one language to keep every reply in it.
+5. End any active voice call after changing the recognition language. For the
+ classic Pipeline, restart Jarvis so the speech recognizer is rebuilt with
+ the new choice.
+
+When **Reply Language** is Automatic, a full sentence can move the conversation
+to another language. A short interjection such as “yes” or “stop” keeps the
+current conversation language, which prevents accidental switching.
+
+If Jarvis cannot identify a language and no conversation language exists yet,
+it uses English as the fallback. An explicit reply-language choice always wins.
+
+## Choose a Speaking Voice
+
+Voice choices depend on the voice engine you use. Jarvis shows only the catalog
+known for the selected provider and model; there is no universal voice list.
+
+1. Open **API Keys**.
+2. For **Pipeline** voice, open the active text-to-speech provider card. Choose
+ a displayed model or voice when that provider offers a picker. A preview may
+ be available for supported choices.
+3. For **Realtime** voice, open the active Realtime provider card and use its
+ **Voice** list. **Provider default** lets that provider choose.
+4. Start a new voice conversation and listen to one complete reply.
+
+Pipeline and Realtime store their voice choices separately. Switching the
+voice engine can therefore change how Jarvis sounds without changing its reply
+language. A fallback to another provider may also use that provider's default
+voice.
+
+## Pipeline and Realtime
+
+| Voice engine | How speech moves through Jarvis | Which voice it uses |
+|---|---|---|
+| Pipeline | Speech recognition turns audio into text, the Brain prepares a reply, then text-to-speech creates audio | The active text-to-speech provider's voice |
+| Realtime | One live provider listens and speaks in the same session | The voice selected on that Realtime provider |
+
+Both paths use the same reply-language policy. Pipeline passes the resolved
+language to text-to-speech for pronunciation. Realtime receives the recognition
+preference when the session starts and is updated with the resolved language
+after a complete transcript. Changing a pinned reply language during an active
+Realtime call may reconnect the call so the new policy takes effect.
+
+If no credential-ready Realtime provider is available, the Realtime switch is
+disabled and Pipeline remains available. Learn how the two paths behave in
+[Voice Conversations](voice-conversations).
+
+## How It Fits Together
+
+1. You type a message, or your microphone supplies spoken audio.
+2. For speech, **Voice Recognition Language** guides transcription. The
+ [Speech Dictionary](speech-dictionary) can then correct specific names or
+ terms; it does not choose the conversation language.
+3. Jarvis makes one language decision for the turn. A pinned **Reply Language**
+ wins; otherwise, the current conversation and detected input decide.
+4. The Brain creates the answer, and the same decision is reused for the main
+ reply, short acknowledgements, errors, progress updates, and action
+ readbacks.
+5. Pipeline sends the text and language to the active text-to-speech provider.
+ Realtime speaks through its live provider. **Speaking Voice** controls the
+ sound, not the words or language policy.
+
+Your [Providers and API Keys](providers-and-api-keys) supply the recognition,
+Brain, text-to-speech, or Realtime capability. They do not replace the shared
+language decision. [Audio Devices and Wake Word](audio-and-wake-word) controls
+how a voice conversation starts; its wake-language choice should match the
+language in which you pronounce the wake phrase.
+
+## Check That It Works
+
+Set **Interface Language** to English and **Reply Language** to Spanish. Type a
+simple question in English. The app labels should remain English, while the
+answer text—and spoken output when voice is active—should be Spanish.
+
+Then return **Reply Language** to **Automatic** if you want Jarvis to follow
+the language of each substantive turn.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| The interface changed, but replies did not | Interface and reply language are separate | Change **Reply Language** under **Settings > Languages** |
+| Spoken words are transcribed in the wrong language | Automatic detection is uncertain, or the recognizer still uses the earlier setting | Choose a recognition language, end the call, and restart Jarvis for Pipeline |
+| One name or technical term is repeatedly wrong | The overall language is correct, but the vocabulary is unfamiliar | Add the term and its common mishearing in [Speech Dictionary](speech-dictionary) |
+| A short word does not switch the reply language | Automatic mode keeps brief interjections in the current conversation language | Use a full sentence, or pin the reply language temporarily |
+| The expected voice is missing or changes | Voice catalogs and fallbacks belong to providers and models | Check the active TTS or Realtime card under **API Keys** and choose from its displayed list |
+| Realtime cannot be enabled | No installed Realtime provider has a usable credential | Connect a supported provider under **API Keys**, or continue with Pipeline |
+
+For microphone, provider, or audio failures beyond these checks, follow
+[Troubleshooting](troubleshooting).
+
+## Next Steps
+
+- Read [Voice Conversations](voice-conversations) to start, continue, and end
+ spoken sessions in Pipeline or Realtime mode.
+- Open [Providers and API Keys](providers-and-api-keys) to connect the services
+ that supply speech recognition, speaking voices, and Realtime audio.
+- Use [Audio Devices and Wake Word](audio-and-wake-word) to match your
+ microphone, speaker, and spoken wake phrase to the language you use.
+- Add difficult names in [Speech Dictionary](speech-dictionary) when the
+ language is right but individual words are still misheard.
diff --git a/docs/product/personalize-and-connect/phone-calls.md b/docs/product/personalize-and-connect/phone-calls.md
new file mode 100644
index 0000000000..83b52bc0bf
--- /dev/null
+++ b/docs/product/personalize-and-connect/phone-calls.md
@@ -0,0 +1,201 @@
+---
+title: "Phone Calls"
+slug: phone-calls
+summary: Connect the optional telephony feature, understand inbound and outbound calls, and keep call credentials private.
+section: "Personalize and connect"
+section_order: 3
+order: 6
+diataxis: howto
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [telephony, phone-calls, voice, contacts, security]
+related: [providers-and-api-keys, credentials-and-secrets, safety-and-approvals]
+---
+
+Phone Calls lets people reach Jarvis through a real telephone number. You can
+also ask Jarvis to call a saved contact after you approve the action. A call
+uses the configured speech recognition, Brain, and voice output, so it sounds
+and behaves like the Pipeline voice path without needing audio hardware on the
+computer that hosts Jarvis.
+
+This is an optional, experimental integration. The current implementation
+targets Twilio and requires a separate account plus a public internet address.
+It does not yet have a recorded end-to-end test sign-off, so treat it as a
+preview, use only a permitted test number, and keep Chats or desktop voice
+available as your fallback.
+
+## Before You Start
+
+You need:
+
+- an installation that includes the optional telephony feature;
+- a Twilio account and a voice-capable number;
+- a public HTTPS address that Twilio can reach;
+- working speech recognition, Brain, and voice-output choices for the call;
+- permission to call the intended people and any account verification required
+ for your chosen number or destination.
+
+Open **API Keys & Providers > Advanced > Telephony** first. If the page says
+**Telephony extra not installed**, follow the installation hint shown there,
+restart Jarvis, and return to the same section.
+
+> [!warning] A telephone number is a public entry point. Jarvis validates the
+> Twilio connection, but it does not prove who the human caller is. Do not let
+> callers speak credentials, and review action permissions before accepting
+> inbound calls from people you do not know.
+
+## Plan for Costs and Public Access
+
+Phone Calls can create charges outside Personal Jarvis.
+
+| Cost or requirement | What to check |
+|---|---|
+| Telephone number | Monthly number rental, regional availability, and identity or address requirements |
+| Inbound and outbound minutes | Per-minute rates, destination rates, trial restrictions, and account credit |
+| Public HTTPS address | Hosting or tunnel limits, a valid certificate, and whether the address remains stable |
+| Speech and Brain services | Usage charges for the providers selected for recognition, reasoning, and voice output |
+
+Review current terms in the relevant provider dashboards before enabling real
+calls. Trial accounts may limit who can be called, and local rules can affect
+which numbers you may obtain or use.
+
+The public address is a real security boundary. Twilio sends a signed request
+to the displayed **Voice webhook**, then opens a protected media stream for one
+call. Jarvis checks the provider signature against the exact public URL and
+uses a new, one-call secret for the audio stream. Other app endpoints keep
+their normal authentication and host checks.
+
+These checks protect the network bridge; they do not authenticate the person
+who dialed the number. Also remember that the telephony provider carries the
+call audio and call metadata. A connected remote speech or Brain provider may
+process its part of the conversation too.
+
+## Set Up Phone Calls
+
+### 1. Prepare the telephony account
+
+Create the Twilio account, complete any required verification, and obtain a
+voice-capable number. Keep the account dashboard open, but do not copy its
+credential into chat, voice input, a task, or a screenshot.
+
+### 2. Make Jarvis reachable over HTTPS
+
+In the Telephony section, select **Setup script**. The setup view offers a
+portable development tunnel, a Windows development helper, and a reverse-proxy
+example for a stable server. Choose the path that matches where Jarvis runs.
+
+A tunnel is useful for a short test, but its address may change when it
+restarts. A stable server address avoids having to update the provider webhook
+after every restart. Paste the public HTTPS address into **Public base URL**.
+A local-only address cannot receive a telephone callback.
+
+### 3. Connect the account in the app
+
+Return to **API Keys & Providers > Advanced > Telephony** and fill in:
+
+- **Account SID**;
+- **Auth Token** in the protected password field;
+- **Phone number (E.164)** using the international format required by the app;
+- **Public base URL**;
+- **Language code** and an optional **Greeting**.
+
+Turn on **Enabled**, then select **Save**. Jarvis stores the Auth Token through
+its credential system and clears the field after saving. The app later reports
+only whether a token is stored; it does not return the token value.
+
+### 4. Point the number at Jarvis
+
+Copy the **Voice webhook** shown in the Telephony setup view. In the Twilio
+number settings, set the incoming voice webhook to that exact address using
+the method shown by the setup guide.
+
+The public base URL and the provider's webhook address must agree exactly. A
+different hostname, path, scheme, or stale tunnel address can make a genuine
+callback fail its signature check.
+
+### 5. Test both halves
+
+Select **Test connection**. A reachable result confirms that the saved account
+details can reach Twilio; it does not test the public callback or the audio
+pipeline.
+
+Next select **Self-test voice**. It runs a fixed sample through the Brain and
+voice-output path without placing a real call. Review the displayed transcript,
+response, and audio result. Fix this test before paying for telephone minutes.
+
+Finally, dial the connected number. A successful inbound call plays the saved
+greeting, accepts speech, and speaks a reply. You can start talking while
+Jarvis is speaking to interrupt playback. The call ends on a clear hang-up
+request, when the caller disconnects, or when the configured time limit is
+reached.
+
+## Inbound and Outbound Calls
+
+| Direction | What starts it | What Jarvis does | Safety point |
+|---|---|---|---|
+| Inbound | Someone dials the connected number | Validates Twilio, opens a one-call audio stream, speaks the greeting, then runs speech recognition -> Brain -> voice output | The bridge is authenticated, but the human caller is not |
+| Outbound | You ask Jarvis to call a saved contact | Resolves the contact's phone number, asks for approval, places the call, and speaks the requested or default opening | No call is placed until the confirmation succeeds |
+
+The desktop app does not currently provide a general-purpose dial pad. For an
+outbound call, first save a phone number under **Contacts**, then ask Jarvis to
+call that contact. If the contact is missing, has no phone number, telephony is
+disabled, or the integration is unavailable, Jarvis reports the problem and
+does not dial.
+
+## How It Fits Together
+
+| Related feature | Relationship to Phone Calls |
+|---|---|
+| [Providers and API Keys](providers-and-api-keys) | Telephony has its own account connection, while each call also needs usable speech recognition, Brain, and voice-output capabilities. The connection test and voice self-test check different parts. |
+| [Credentials and Secrets](credentials-and-secrets) | The Auth Token is saved through the protected credential path and is never returned to the Telephony page. Account identifiers, telephone numbers, and call details are still private data even when they are not passwords. |
+| [Profile and Contacts](profile-and-contacts) | Outbound requests resolve a saved contact by name or alias and use that contact's primary phone number. Telephony does not create missing contacts automatically. |
+| [Languages and Voices](languages-and-voices) | The phone path uses the configured Pipeline speech services, language code, greeting, and voice. Test the result because the telephony-specific default prompts currently distinguish English from German; another language code may receive German fallback phrasing. |
+| [Safety and Approvals](safety-and-approvals) | Placing a real outbound call is an approval-required action. Tools requested during a call remain subject to their own safety rules; an inbound telephone number does not grant extra permission. |
+| [Sessions and Run Inspector](sessions-and-run-inspector) | Each telephone call gets isolated conversational context, separate from desktop chats and voice sessions. **Recent calls** shows a temporary summary, not a durable transcript or a main Sessions archive. |
+
+If the telephony package is absent, the Telephony page still opens and explains
+what is unavailable. If the account is disabled, inbound callbacks are ended
+cleanly and outbound requests do not dial. If the speech stack cannot start,
+the call cannot continue; use Chats or desktop voice while you repair the
+reported provider or language setup.
+
+## Check That It Works
+
+The steps below are a test procedure for your installation, not evidence that
+the integration has already been verified on every host or account.
+
+1. Select **Test connection** and confirm that the account is reachable.
+2. Select **Self-test voice** and confirm that it shows a usable response and
+ audio result without an error.
+3. Place one permitted test call to the connected number, say a short request,
+ and listen for a relevant spoken reply.
+4. Return to **Recent calls** and confirm that the call appears with a status,
+ turn count, and duration.
+
+If it succeeds, the final call verifies the public call address and live audio
+connection on your installation. The two in-app tests alone cannot prove that
+an outside caller can reach Jarvis.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| **Telephony extra not installed** | This installation does not include the optional phone integration | Follow the installation hint in the Telephony section, restart Jarvis, and reopen the page |
+| **Setup needed** or **Not reachable** | A required account field is missing, the credential is invalid, the account is restricted, or the service cannot be reached | Recheck the saved fields, account status, credit, and network, then run **Test connection** again |
+| **Self-test voice** fails | The Brain or voice-output path is unavailable even if the telephone account works | Test the related choices under **API Keys & Providers**, then review language and voice settings |
+| An inbound call ends immediately | Telephony is disabled, the webhook is wrong, the public address changed, or signature validation failed | Enable telephony, copy the displayed webhook again, and make sure the public address is stable and reachable over HTTPS |
+| Jarvis cannot place an outbound call | The contact has no usable phone number, approval was declined, telephony is incomplete, or the account cannot dial that destination | Check **Contacts**, approve only the intended call, and review destination permissions and account credit |
+| The greeting or fallback phrase uses the wrong language | The phone language code and configured voice do not match, or the current telephony prompt fallback does not support that language | Choose English or German for the first controlled test, set a clear custom greeting, and run **Self-test voice** |
+| **Recent calls** becomes empty after a restart | The list is held only for the running app process | Treat it as a live status list, not call-history storage; use the provider's account records when you need a durable billing log |
+
+## Next Steps
+
+- Read [Providers and API Keys](providers-and-api-keys) to test the Brain,
+ speech recognition, and voice output that a phone call uses.
+- Read [Credentials and Secrets](credentials-and-secrets) before replacing or
+ removing the telephony Auth Token.
+- Read [Safety and Approvals](safety-and-approvals) to decide which actions an
+ inbound caller may request and how outbound confirmation works.
diff --git a/docs/product/personalize-and-connect/providers-and-api-keys.md b/docs/product/personalize-and-connect/providers-and-api-keys.md
new file mode 100644
index 0000000000..20c8cda000
--- /dev/null
+++ b/docs/product/personalize-and-connect/providers-and-api-keys.md
@@ -0,0 +1,189 @@
+---
+title: "Providers and API Keys"
+slug: providers-and-api-keys
+summary: Connect the services you choose, see which capabilities they provide, and learn where fallback is available.
+section: "Personalize and connect"
+section_order: 3
+order: 1
+diataxis: howto
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [providers, api-keys, models, capabilities, fallback, connections]
+related: [credentials-and-secrets, languages-and-voices, troubleshooting, tasks-and-reminders]
+---
+
+Use **API Keys & Providers** to connect the services that power Jarvis. You can
+choose one service for chat, another for speech, and another for longer
+Jarvis-Agent work. You are not locked into one company or one model.
+
+The safe setup has three separate checks: **connect a credential -> set the
+provider active -> test that it answers**. A saved credential alone does not
+prove that the account has access, credit, or a working model.
+
+## Understand the Three Choices
+
+| Choice | Plain-English meaning | Example decision |
+|---|---|---|
+| **Provider** | The service Jarvis connects to | Which service should answer chats? |
+| **Model** | A particular engine offered by that provider | Do you want a faster or more capable option? |
+| **Capability** | Something the chosen provider and model can actually do | Can it understand images, call tools, transcribe speech, or produce audio? |
+
+A provider can offer many models, and models from the same provider can have
+different capabilities. Jarvis checks the capability needed for a feature; a
+provider name alone is not proof that every model can do the job.
+
+## Choose What Each Provider Powers
+
+Open **API Keys & Providers** and select the category that matches what you
+want to change.
+
+| Category | What it powers | What to know |
+|---|---|---|
+| **Brain** | Chat answers and general reasoning | Choose a model on the provider card. |
+| **Tool Model** | Actions, tool routing, and Computer Use | Needs a model that can work with the required tools; Computer Use also needs image understanding. |
+| **Voice Input** | Speech-to-text in Pipeline voice | Turns what you say into text. |
+| **Voice Output** | Text-to-speech in Pipeline voice | Controls the spoken voice and speech service. |
+| **Realtime** | Listening and replying in one live audio stream | This mode is a research preview; some tools and features are not available. |
+| **Jarvis-Agents** | Longer background missions | Has its own provider and model choice, separate from the main Brain. |
+| **Advanced** | Optional connections such as telephony and the Wiki provider | Each integration can require its own account or credential. |
+
+**Pipeline** uses Voice Input, the Brain, and Voice Output as three separate
+steps. **Realtime** uses one full-duplex model for the live audio conversation.
+The voice-engine switch shows which mode is selected and which one is serving
+the current session. If you change it while idle, the choice applies to the
+next voice session.
+
+## Connect, Activate, and Test a Provider
+
+1. **Open API Keys & Providers.** Choose **Brain**, **Tool Model**, **Voice
+ Input**, **Voice Output**, **Realtime**, or **Jarvis-Agents**. The cards in
+ that category show which connections are open, ready, active, or not
+ working.
+
+2. **Choose a provider that has the capability you need.** Read the short note
+ on its card. Also check how the provider bills usage; an API account and a
+ consumer subscription can be separate products even when they use the same
+ sign-in.
+
+3. **Get the credential from the provider.** Use **Get your key here** to open
+ the provider's official dashboard. Some Jarvis-Agent providers instead show
+ a **Connect** button for an official subscription sign-in.
+
+4. **Enter the credential in the app.** Paste it only into the protected field
+ on that provider card and select **Save**. Jarvis masks the saved value and
+ returns only whether a credential exists; it does not show the value again.
+
+ > [!warning] Never paste an API key, token, password, or recovery code into
+ > chat, voice input, a task, a documentation page, a screenshot, or a
+ > configuration file. Use only the protected connection field in the app.
+
+5. **Make the provider active.** If this is the first ready provider in the
+ category, Jarvis can activate it after saving. Otherwise select **Set
+ active** on the card you want. One provider can be active for the Brain
+ while a different provider is active for the Tool Model, speech, or
+ Jarvis-Agents.
+
+6. **Choose a model or voice when the card offers one.** A Brain model can be
+ selected independently for each provider. Voice Input and Voice Output
+ show their selector only on the active, connected provider. Realtime lets
+ you choose both a model and a voice.
+
+7. **Select Test.** Wait for a result on the same card. **Works** means the
+ provider answered a real minimal request. Other results distinguish a
+ missing or invalid key, depleted credit, rate limiting, an unavailable
+ model, an unreachable service, or an integration error.
+
+8. **Repeat only for the features you use.** A chat-only setup needs a working
+ Brain. Pipeline voice also needs Voice Input and Voice Output. Realtime
+ needs a compatible Realtime connection. Heavy missions need a working
+ Jarvis-Agent connection.
+
+To rotate a credential, select **Replace**, enter the new value, save it, and
+run **Test** again. To remove one, use the delete control on its card. If the
+app cannot verify deletion from the operating system's credential store, it
+reports the failure instead of claiming the credential is gone.
+
+## How Provider Fallback Works
+
+Jarvis keeps provider choices separate by capability. A fallback for a chat
+answer does not silently turn a speech provider into a Brain or grant a model
+features it does not have.
+
+1. **A request needs a capability.** Chat needs a Brain; Pipeline voice needs
+ transcription, reasoning, and speech; Computer Use needs a suitable Tool
+ Model; a mission needs a Jarvis-Agent worker.
+2. **Jarvis starts with the active provider and selected model.** For Brain
+ work, it can try another suitable model in the same provider family when
+ one is available.
+3. **Supported paths can continue through compatible fallbacks.** They skip
+ connections already known to be missing, unavailable, rate limited, or out
+ of credit and can cross to another connected provider family that supports
+ the required capability.
+4. **The feature degrades honestly when nothing fits.** Jarvis shows or records
+ a failure instead of claiming success. A Realtime voice session can fall
+ back to Pipeline when Realtime cannot serve the call, provided the Pipeline
+ path is available.
+
+Fallback is feature-specific, not one promise shared by every background
+action. A scheduled Brain task currently uses its selected Brain provider for
+that run and records **failed** instead of crossing to another provider family.
+Read [Tasks and Reminders](tasks-and-reminders) before relying on unattended
+work.
+
+Fallback does not copy credentials between accounts. Some cards intentionally
+reuse a credential for related services, while other surfaces use a dedicated
+credential. The labels in the app are the source of truth for each connection.
+
+## How It Fits Together
+
+| Connected feature | Relationship to providers | Where to continue |
+|---|---|---|
+| **Credentials and Secrets** | Stores, replaces, and removes the private value behind a provider card. The provider list receives only a ready/not-ready signal. | Read [Credentials and Secrets](credentials-and-secrets) before rotating or removing access. |
+| **Languages and Voices** | Your reply-language choice decides which language Jarvis uses. The active Voice Output or Realtime provider supplies the actual voice and available voice models. | Read [Languages and Voices](languages-and-voices) to keep language and voice choices aligned. |
+| **Phone Calls** | Calls use their own telephony account, then use Jarvis's configured speech-to-text, Brain, and text-to-speech Pipeline for the conversation. | Read [Phone Calls](phone-calls) before adding telephony credentials or placing a call. |
+| **Jarvis-Agents** | Heavy missions have a separate worker selection. If that worker is unavailable, Jarvis can use another reachable worker family; the main Brain selection does not automatically become the worker selection. | Read [Jarvis-Agents](jarvis-agents) to choose a worker and follow mission results. |
+| **Tasks and Reminders** | A scheduled Brain task currently stays with its selected Brain provider for that run and records a failure when it cannot continue. | Read [Tasks and Reminders](tasks-and-reminders) before depending on unattended fallback behavior. |
+| **Troubleshooting** | Provider tests identify the failing layer before you restart or replace anything. | Use [Troubleshooting](troubleshooting) when several categories fail or the app itself is offline. |
+
+The full path is: **your request -> required capability -> active provider and
+model -> safety or tool checks -> answer, speech, action, or mission output**.
+When the selected feature supports fallback and cannot continue, Jarvis tries
+only compatible, connected alternatives and keeps the failure visible when
+none are available. Features without that fallback record the failure at their
+own surface.
+
+## Check That It Works
+
+1. Open **API Keys & Providers > Brain**.
+2. On the active provider card, select **Test** and confirm that it shows
+ **Works**.
+3. Open **Chats** and send `Reply with: provider check complete.`
+4. Confirm that a matching answer appears.
+
+This proves that the credential, selected model, provider connection, and main
+chat path work together. Test Voice Input, Voice Output, Realtime, and
+Jarvis-Agents on their own cards before relying on those separate features.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| **Setup needed**, **No key set**, or an open card | The active category has no usable credential | Save the credential on the intended card, then select **Set active** if another provider is already active. |
+| **Key invalid**, **Out of credits**, **Rate limited**, or **Model unavailable** | Jarvis reached the service, but the account, allowance, or selected model blocked the request | Check the provider's official account page, choose an available model, or activate a ready provider from another compatible family. |
+| **Unreachable** or **Integration error** | The service, network path, provider adapter, or app connection did not complete the test | Retry once, check the provider's service status and your network, then use [Troubleshooting](troubleshooting) if other providers fail too. |
+| The card is **ready** but another card is **active** | The credential exists, but that provider does not currently power this category | Select **Set active**, wait for the success message, then run **Test** on the newly active card. |
+| A speech change is not used immediately, or Realtime shows Pipeline at runtime | Voice Input may require the next voice or app start; a live Voice Output switch can also require the next start; Realtime fell back because it could not serve this session | End and start the voice session again. Re-test the selected voice categories and confirm that the runtime status names the expected engine. |
+
+## Next Steps
+
+- Read [Credentials and Secrets](credentials-and-secrets) to understand where
+ protected values are stored and how to rotate or remove them safely.
+- Use [Languages and Voices](languages-and-voices) to choose the reply language,
+ spoken voice, and voice behavior after the providers work.
+- Follow [Phone Calls](phone-calls) when you want the same Brain and Pipeline
+ voice path to answer through a telephone connection.
+- Open [Troubleshooting](troubleshooting) for app-wide connection, startup, and
+ provider recovery checks.
diff --git a/docs/product/personalize-and-connect/settings-and-appearance.md b/docs/product/personalize-and-connect/settings-and-appearance.md
new file mode 100644
index 0000000000..18fc62c71f
--- /dev/null
+++ b/docs/product/personalize-and-connect/settings-and-appearance.md
@@ -0,0 +1,184 @@
+---
+title: "Settings and Appearance"
+slug: settings-and-appearance
+summary: "Adjust startup, sound, keyboard shortcuts, the Jarvis Bar, overlays, and other everyday behavior."
+section: "Personalize and connect"
+section_order: 3
+order: 4
+diataxis: howto
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [settings, appearance, startup, keyboard-shortcuts, jarvis-bar, sound]
+related: [desktop-app-tour, audio-and-wake-word, permissions]
+---
+
+Use **Settings** to choose how Personal Jarvis starts, sounds, responds to
+keyboard shortcuts, and appears during voice activity. Each control saves its
+own change, so there is no page-wide Save button.
+
+Most changes take effect immediately when the matching desktop feature is
+running. If it is not available, Jarvis keeps the choice for the next start and
+shows a restart or next-start message where the control supports one.
+
+## Before You Start
+
+- Use the desktop app for login startup, on-screen overlays, and global voice
+ shortcuts. A remote browser or headless server cannot control those parts of
+ your local desktop.
+- Finish or pause important work before selecting **Restart now**. Jarvis
+ protects running Jarvis-Agent missions from a normal restart; forcing a
+ restart can stop them.
+- Enter provider credentials only under **API Keys**. No setting on this page
+ should ask for a credential in chat, voice input, or a keyboard shortcut.
+
+## Find the Right Setting
+
+Open **Settings** from the app sidebar, then scroll to the labeled group you
+need. This map separates everyday behavior from the voice and language choices
+that have their own guides.
+
+| Group | What you can change | When it applies |
+|---|---|---|
+| **Languages** | Interface, speech-recognition, and reply language | Interface and reply choices apply live; a running voice session may reconnect or need a new start |
+| **App settings** | Launch the app when you sign in | The operating-system startup entry is added or removed immediately |
+| **Privacy permissions** | Microphone, screen, accessibility, and input access on macOS | Permission changes may require **Restart now** |
+| **Wake Word** | Activation, phrase, spoken language, and detection engine | Usually live when desktop voice is ready; otherwise on the next voice start |
+| **Thinking pause**, **Volume**, and **Audio devices** | End-of-speech timing, spoken volume, microphone, and speaker | Live with the Pipeline running; otherwise on the next start |
+| **Voice Keybinds** | Call, Hangup, and Talk or push-to-talk shortcuts | Live with the voice Pipeline running; otherwise after a restart |
+| **System Prompt** | The assistant's general style and behavior | On the next message; no restart |
+| **Bar & Overlay** | Display style, idle visibility, music muting, and short sound effects | A mix of live changes and restart-required display swaps |
+
+Read [Languages and Voices](languages-and-voices) before changing several
+language controls at once. Read [Audio Devices and Wake Word](audio-and-wake-word)
+for the complete microphone and wake setup.
+
+## Start Jarvis When You Sign In
+
+1. Under **App settings**, turn on **Launch app at login**.
+2. Wait for the success message. Jarvis creates the appropriate login entry for
+ the current operating system without requiring an app restart.
+3. On Windows, select **Enable instant start** when it appears. Windows asks for
+ permission once so Jarvis can use a scheduled login task.
+4. If you decline that Windows prompt, Jarvis keeps a startup-shortcut fallback.
+ It still starts automatically, but Windows may delay it on a busy machine.
+
+macOS and Linux use their native desktop-login mechanisms. On a headless host,
+the switch is disabled because there is no graphical login session to start
+into. Use the host's service setup instead of expecting the desktop toggle to
+work there.
+
+## Choose the Bar or Overlay
+
+Under **Bar & Overlay > Appearance**, choose one of these display styles:
+
+| Style | What you see | Important limit |
+|---|---|---|
+| **Bar (default)** | A slim status bar for idle, listening, thinking, and speaking states | Available on a supported graphical desktop |
+| **Mascot orb** | The classic on-screen mascot during voice activity | Not available on macOS; a change from another real style normally needs a restart |
+| **None (hidden)** | No on-screen voice surface | Hiding the current surface can usually apply live |
+
+1. Select the preview card for the style you want.
+2. If the app confirms the switch, the change is already active.
+3. If **Restart now** appears, select it after active work finishes. Creating a
+ different real overlay safely requires a clean app start.
+4. If the restart is refused because missions are running, wait for them to
+ finish. Use a forced restart only when you accept that those runs will stop.
+
+On macOS, the Jarvis Bar runs in a separate desktop companion process, while
+the Mascot option falls back to no visible surface. On a machine without a
+display, all styles are saved for a later graphical start but cannot appear
+immediately.
+
+### Adjust Bar and Sound Behavior
+
+- **Show bar at all times** keeps the Bar visible while Jarvis is idle. Turn it
+ off to show the Bar only after voice activation. This applies live when the
+ Bar is running.
+- **Mute music while dictating** mutes other audio sessions while you speak and
+ restores them afterward. The current audio-session implementation is Windows
+ only; on other systems the choice is saved but does not mute other apps.
+- **Sound effects** controls short cues such as the wake chime, hang-up tone,
+ and ready cue. It does not mute Jarvis's spoken replies.
+
+## Set Voice Keyboard Shortcuts
+
+Voice Keybinds let you start a call, end it, or hold a key combination while
+speaking. The on-screen keyboard uses PC or Mac modifier labels to match your
+device.
+
+1. Find **Voice Keybinds**, then choose the row for **Call**, **Hangup**, or
+ **Talk / Push-to-talk**.
+2. Select **Record** and hold the complete combination. Release every key to
+ finish, or select keys on the on-screen keyboard and then select **Stop**.
+3. Check the markers: a filled key is physically pressed, an outlined key is in
+ the new combination, and an amber dot means another action already uses it.
+4. Select **Save**. If Jarvis shows a restart message, restart after important
+ work has finished; otherwise the running voice listener is already updated.
+
+Press **Escape** while recording to restore the previously saved combination.
+**Reset to default** places the default in the field; select **Save** to apply
+it. **Clear** immediately removes the current shortcut for that action.
+
+Jarvis blocks combinations that would be unsafe or ambiguous. A modifier by
+itself is incomplete, ordinary typing keys need a modifier or second key, and
+two actions cannot use overlapping combinations. The system or Command key,
+Alt+F4, and Ctrl+C are reserved. Function keys can be used alone; navigation
+keys are allowed but warn you that they also fire while editing text.
+
+## How It Fits Together
+
+1. You change a control in **Settings**. The desktop interface sends that
+ single choice to the local Jarvis app and shows the saved result.
+2. Jarvis stores the choice for future starts and asks the running feature to
+ adopt it. A voice shortcut updates the voice trigger, while Bar choices
+ update the surface that displays voice state.
+3. [Audio Devices and Wake Word](audio-and-wake-word) supplies the microphone,
+ speaker, and activation phrase. Voice keybinds provide an alternative way to
+ start the same voice path.
+4. [Languages and Voices](languages-and-voices) decides how speech is
+ recognized and how replies sound. Appearance settings only change what you
+ see and hear around that conversation; they do not change its language.
+5. [Permissions](permissions) decides whether the operating system allows the
+ microphone, overlay-related capture, or computer control. A saved preference
+ cannot override an operating-system denial.
+6. If a live capability is unavailable, Jarvis keeps the preference and uses it
+ on the next compatible start. Platform-specific features degrade without
+ stopping Chats or other text-based work.
+
+## Check That It Works
+
+On a graphical desktop with **Bar (default)** selected, wait until Jarvis is
+idle. Turn **Show bar at all times** off and confirm that the idle Bar hides;
+turn it on and confirm that the Bar returns. If the app reports that the change
+needs a restart, restart when no mission is running and repeat the check.
+
+For a shortcut check, save an unused **Talk / Push-to-talk** combination, hold
+it, and confirm that the Bar changes to a listening state. Release it and
+confirm that Jarvis sends the spoken turn.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| A display choice says a restart is required | The new Bar or Mascot surface cannot be created safely during the current run | Finish active missions, select **Restart now**, and check the chosen style after the app returns |
+| Restart is refused | One or more Jarvis-Agent missions are still running | Wait for them to finish; force only if stopping them is acceptable |
+| **Launch app at login** is unavailable | The current host has no supported graphical login session | Use the desktop app on a supported host; a headless system needs its own service setup |
+| Music keeps playing after you enable muting | The current muting feature is unavailable, or the platform is not Windows | Use the operating system or media app controls; the setting cannot provide cross-platform muting yet |
+| **Save** stays disabled for a shortcut | The combination is incomplete, reserved, or overlaps another action | Follow the inline message and the on-screen keyboard markers, then choose a distinct combination |
+| A macOS feature remains blocked | The operating system has not granted the required access, or it requires an app restart | Use **Settings > Privacy permissions > Request** or **Open Settings**, then select **Restart now** when shown |
+| A change works now but returns after restart | The live update succeeded, but the saved preference could not be written | Try the control again, then use [Troubleshooting](troubleshooting) if it still does not survive a restart |
+| **Autopilot Toasts** has no effect | The visible switch is not currently connected to a saved preference | Do not rely on this control until a future app update wires it to behavior |
+
+## Next Steps
+
+- Read [Tour the Desktop App](desktop-app-tour) to see how Settings relates to
+ Chats, Jarvis-Agents, history, and the rest of the sidebar.
+- Use [Audio Devices and Wake Word](audio-and-wake-word) to set up the
+ microphone, speaker, activation phrase, and wake self-test.
+- Read [Permissions](permissions) before enabling microphone or computer-control
+ features that depend on operating-system approval.
+- Open [Languages and Voices](languages-and-voices) to choose interface,
+ recognition, reply, and speaking-voice behavior separately.
diff --git a/docs/product/privacy-safety-and-support/credentials-and-secrets.md b/docs/product/privacy-safety-and-support/credentials-and-secrets.md
new file mode 100644
index 0000000000..800818281c
--- /dev/null
+++ b/docs/product/privacy-safety-and-support/credentials-and-secrets.md
@@ -0,0 +1,179 @@
+---
+title: "Credentials and Secrets"
+slug: credentials-and-secrets
+summary: Understand how credentials are entered, stored, redacted, replaced, and kept out of conversations and documentation.
+section: "Privacy, safety, and support"
+section_order: 6
+order: 2
+diataxis: explanation
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [credentials, secrets, api-keys, tokens, privacy, security]
+related: [providers-and-api-keys, privacy-and-local-data, mcp-connections, troubleshooting]
+---
+
+Credentials are private values that let Jarvis use an account or service on
+your behalf. They include API keys, access tokens, OAuth connections, bot
+tokens, client secrets, and the Jarvis Control API key.
+
+Enter each credential only in the protected field built for that connection.
+Jarvis normally shows a saved/not-saved state or a masked value afterward. A
+connected account still has its own permissions, billing, and revocation rules
+at the service that issued the credential.
+
+## Before You Start
+
+- Get the credential from the service's official account page or complete the
+ sign-in window opened by Jarvis.
+- Review the access scopes and any usage charges before you connect.
+- Use a trusted Jarvis session. Close screen sharing and keep credentials out
+ of screenshots, recordings, and support messages.
+
+## Use the Right Place
+
+| Connection | Safe place in Jarvis | Never put the value here |
+|---|---|---|
+| Brain, speech, Realtime, or Jarvis-Agent provider | **API Keys & Providers**, on the matching provider card | Chat, voice input, a task, or `jarvis.toml` |
+| Plugin or messaging channel | **Plugins > Connect**, including the browser sign-in or protected token field | Plugin descriptions, feedback, screenshots, or source files |
+| Command-line tool | **CLIs**, open the tool, then use **Connect** or **Set API Key** | A shell command, command history, or a custom command definition |
+| Phone service | **API Keys & Providers > Advanced > Telephony** | Greeting text, call scripts, logs, or phone-call transcripts |
+| Jarvis Control API | **API Keys & Providers > Advanced**, on the API card named for your assistant | Chat, docs, issue reports, or an untrusted client |
+| Manual MCP server | Use a protected plugin connection when one is available | A literal value in `mcp.json`, including its environment and header fields |
+
+> [!warning] A chat box and a password box may look similar, but they have
+> different jobs. Never ask Jarvis to remember, repeat, send, or configure a
+> credential through chat or voice.
+
+The current **MCPs** screen can edit `mcp.json`, but it does not provide a
+protected credential-entry form. If a manual Model Context Protocol (MCP)
+server requires a secret, do not paste the value into that editor. Prefer the
+corresponding **Plugins** connection when available; otherwise treat the server
+as an operator-managed connection until a protected in-app path is available.
+
+## Add, Replace, or Remove Access
+
+1. **Open the feature that owns the connection.** Use the table above instead
+ of putting every credential into the provider screen.
+2. **Enter the value in its protected field.** Password-style fields hide what
+ you type. Some connections open the service's own browser sign-in instead.
+3. **Save or connect.** Jarvis stores the resulting credential, then returns a
+ readiness state rather than the full value. A format hint can warn about the
+ wrong kind of key, but the connection test is the real check.
+4. **Verify the connection.** Use **Test** on a provider or Telephony card,
+ **Connected** in Plugins or CLIs, or a successful MCP connection status.
+5. **Replace a credential deliberately.** Create or rotate it at the issuing
+ service, select **Replace** in Jarvis, save the new value, test it, and then
+ revoke the old value at the service when that service supports overlap.
+6. **Remove access from both sides when needed.** Use the provider card's
+ delete control, **Disconnect** for a plugin or CLI, and revoke the
+ credential in the issuing service's account. Removing a local copy does not
+ revoke a credential that still exists at the service.
+
+Provider-card deletion is fail-closed: if Jarvis cannot verify that the
+operating system's credential store removed the value, the app reports a
+failure. Unlock the credential store and retry instead of assuming the value
+is gone.
+
+Two current exceptions matter:
+
+- **Telephony** can replace its authentication token, but its card has no
+ **Remove** control. Turning Telephony off stops the feature; it does not erase
+ the stored token. Revoke the token at the phone-service account if you need
+ immediate invalidation.
+- A credential supplied outside the app by an operator can still appear as
+ configured after you remove the app-stored copy. Clear it through the same
+ deployment mechanism, then restart Jarvis.
+
+## How Storage Works
+
+The normal path is short:
+
+1. **Protected field or browser sign-in** collects the credential.
+2. **Jarvis's credential service** chooses a portable storage option.
+3. **The operating system's credential store** is used when it is available:
+ Credential Manager on Windows, Keychain on macOS, or Secret Service on
+ Linux.
+4. **The feature retrieves the value only when needed.** A provider sends it to
+ its service, a CLI receives it for that process, and a plugin or MCP
+ connection uses it for its own authenticated request.
+5. **The UI receives status, not the secret.** Provider cards show whether a
+ credential is set. The Control API key is the deliberate exception: its
+ panel can reveal or copy the full value and can regenerate it, which
+ immediately invalidates the previous Control API key.
+
+If no usable operating-system store exists, or it is locked when you save,
+Jarvis falls back to a restricted file in its data directory. This keeps
+in-app setup working on a headless server, but the fallback is not encrypted by
+Jarvis. Protect the data directory, its backups, and the account that runs the
+app. When the operating-system store becomes usable again, saving a credential
+prompts Jarvis to retry it and reconcile an older fallback copy.
+
+Environment-provided credentials are a compatibility input, not an in-app
+storage destination. Jarvis cannot delete or rotate them for you, and they can
+take precedence over a file fallback. This is why a removed credential can
+appear again until the deployment source is cleared and the app restarts.
+
+## Redaction Is a Safety Net, Not a Vault
+
+Jarvis masks common credential shapes in short Run Inspector previews and
+blocks recognized secret patterns from new Wiki content. Plugin lists and
+provider lists return connection status without returning stored tokens.
+
+These checks are pattern-based. They cannot recognize every private value, and
+they do not turn chat, voice, tasks, logs, or documentation into safe
+credential-entry surfaces. If a credential appears in any of those places,
+assume it may have been exposed: revoke it at the issuing service, create a new
+one, and replace it through the correct protected field.
+
+## How It Fits Together
+
+| Feature | Relationship to credentials |
+|---|---|
+| [Providers and API Keys](providers-and-api-keys) | The card chooses a provider and model; its protected field stores the private value. Fallback can switch to another ready provider, but it never copies credentials between accounts. |
+| [Plugins](plugins) | **Connect** stores a pasted token or the result of OAuth sign-in. **Reconnect** repairs expired or revoked access; **Disconnect** removes the plugin connection. |
+| [MCP Connections](mcp-connections) | MCP servers can resolve protected placeholders at connection time. The current MCP editor is for server definitions, not literal secrets. |
+| [CLI Connections](cli-connections) | Jarvis can store an API key and provide it only to the launched tool. A CLI that owns its own browser login or config file also owns that credential's logout behavior. |
+| [Permissions](permissions) | A credential opens an account connection; permissions decide which tools and operating-system capabilities Jarvis may use. One does not replace the other. |
+| [Privacy and Local Data](privacy-and-local-data) | Storage location and service choice determine what stays local and what must travel to an external provider. |
+| [Safety and Approvals](safety-and-approvals) | Safety rules can require approval before an action. Possessing a credential does not bypass those checks or grant unlimited authority. |
+
+The practical flow is: **you connect privately -> Jarvis confirms readiness ->
+a feature requests an allowed capability -> permissions and safety checks apply
+-> the selected service receives only what that request needs**. If the
+credential is missing or rejected, Jarvis should keep the failure visible or
+use a compatible connection that you already configured.
+
+## Check That It Works
+
+1. Open **API Keys & Providers > Brain**.
+2. Confirm that the active provider card shows a saved, masked credential.
+3. Select **Test** on that card.
+4. Confirm that the result says **Works**.
+
+This verifies that Jarvis can retrieve the credential, reach the selected
+service, use the chosen model, and receive a response. A test can make a small
+billable provider request.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| **Save failed** or **Keyring write failed** | Neither the operating-system store nor the local fallback accepted the value | Check that Jarvis can write to its data directory, unlock the operating-system credential store, and save again in the same protected field. |
+| **Deletion could not be verified** | The credential store is locked, unavailable, or retained a copy | Unlock it and retry. Revoke the credential at the issuing service if access must stop immediately. |
+| A removed credential still shows as configured | An operator-provided environment value or another external login still exists | Clear the original deployment or login source, restart Jarvis, and check again. |
+| A saved provider says **Key invalid**, **Out of credits**, or **Rate limited** | Storage worked, but the provider rejected the account or request | Check the official provider account, replace or fund the credential, or activate a ready provider from another compatible family. |
+| A plugin says **Reconnect**, an MCP server says credentials are incomplete, or a CLI fails validation | Access expired, required authentication is missing, or the external tool rejected it | Reconnect through that feature's protected flow. Do not copy the value into chat, logs, or `mcp.json`. |
+
+## Next Steps
+
+- Read [Providers and API Keys](providers-and-api-keys) to connect, activate,
+ and test the services that power chat, speech, and Jarvis-Agents.
+- Review [Privacy and Local Data](privacy-and-local-data) to understand which
+ requests stay on your device and which reach a connected service.
+- Use [MCP Connections](mcp-connections) to add tool servers without placing
+ literal credentials in their server definitions.
+- Open [Troubleshooting](troubleshooting) when credential, account, network, or
+ app health checks fail together.
diff --git a/docs/product/privacy-safety-and-support/permissions.md b/docs/product/privacy-safety-and-support/permissions.md
new file mode 100644
index 0000000000..def87350a0
--- /dev/null
+++ b/docs/product/privacy-safety-and-support/permissions.md
@@ -0,0 +1,230 @@
+---
+title: "App Permissions"
+slug: permissions
+summary: "Grant only the microphone, screen, accessibility, and input permissions needed for voice, global shortcuts, and Computer Use."
+section: "Privacy, safety, and support"
+section_order: 6
+order: 3
+diataxis: howto
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [permissions, macos, privacy, computer-use, safety, approvals]
+related: [first-run-setup, audio-and-wake-word, computer-use, privacy-and-local-data]
+---
+
+A permission answers one narrow question: may this app, connection, or action
+cross a particular boundary? Personal Jarvis does not have one master switch
+that grants everything.
+
+The **App Permissions** controls currently manage five macOS privacy grants for
+the installed desktop app. External account access and approval for a
+particular tool call are separate decisions. Granting microphone access does
+not connect an email account, and connecting an account does not authorize
+every action Jarvis might take in it.
+
+## Before You Start
+
+- On macOS, start the installed **Personal Jarvis** app and keep it in the
+ foreground while requesting access. Do not grant access to Terminal, Python,
+ or a copied app bundle; macOS attaches a grant to the exact app identity.
+- Decide which features you actually plan to use. Text chat does not need
+ microphone or desktop-control access.
+- Close or finish active Jarvis-Agent missions before a permission change that
+ requires a restart. The permissions card refuses to restart while a mission
+ is running.
+- Enter service credentials only in their protected connection screens. App
+ permission prompts never ask for an API key, token, password, or recovery
+ code.
+
+During first-run setup, macOS users see all five current grants. **Continue**
+becomes available only when all five are ready. If you want to grant fewer,
+choose **Continue with text only**, finish setup, and return to **Settings**
+later for only the features you use.
+
+## Grant and Review macOS Access
+
+Open **Settings > Privacy permissions > macOS permissions**. Each row names the
+access and the features that depend on it.
+
+| Permission | What it lets Jarvis do | Needed for |
+|---|---|---|
+| **Microphone** | Capture local microphone audio | Wake word and local voice input |
+| **Screen Recording** | Capture visible content across connected displays | Computer Use and screen-based vision |
+| **Accessibility** | Read supported interface structure, focus windows, click, and type reliably | Computer Use, window control, and global shortcuts |
+| **Input Monitoring** | Listen for configured system-wide keyboard shortcuts | Global push-to-talk and other global shortcuts |
+| **Input Control** | Send mouse and keyboard events | Computer Use |
+
+Grant one item at a time:
+
+1. Select **Allow**. macOS may show its own prompt. Read the prompt, then allow
+ or deny it there.
+2. If the prompt cannot be shown, the item was denied before, or you want to
+ review the setting directly, select **Open Settings** and change the switch
+ for Personal Jarvis in macOS System Settings.
+3. Return to Personal Jarvis. The list checks again automatically when the app
+ becomes visible and while it is waiting for a change.
+4. If **Restart now** appears, finish or stop active missions, then restart.
+ Screen Recording, Accessibility, and Input Monitoring changes can require a
+ fresh app process before their features become ready.
+5. Test the feature itself. A green permission status proves that macOS allows
+ the app; it does not prove that the microphone, model, connection, or target
+ service is otherwise healthy.
+
+### Read the Status Correctly
+
+| Status | Meaning | Next action |
+|---|---|---|
+| **Allowed** | macOS reports the grant for the installed app | Test the feature; restart first if the card asks |
+| **Not requested** | macOS has not recorded a microphone choice | Select **Allow** and answer the native prompt |
+| **Not allowed** | The native check cannot confirm access | Use **Allow** when offered, or **Open Settings** |
+| **Denied** | Access was explicitly denied | Change it in System Settings; the app cannot silently ask again |
+| **Restricted** | A device policy or system rule prevents the grant | Ask the device administrator or review macOS policy |
+| **Unavailable** | Jarvis could not use the native permission interface | Reopen the installed app and check the installation |
+| **Not required** | The in-app macOS permission flow does not apply on this host | Check the host or browser separately if the feature still cannot access a device |
+
+To revoke a macOS grant, turn off Personal Jarvis in the matching System
+Settings privacy pane. The app has no **Revoke** or **Reset all permissions**
+button. Return to the app after the change and restart when prompted. Revoking
+access stops future use; it does not erase audio, screenshots, actions, or
+provider records created earlier.
+
+> [!warning]
+> If the card says to launch the installed app, quit the current process and
+> reopen Personal Jarvis from the installation created by the supported
+> installer. Moving or copying the app can create a different macOS identity.
+> Never solve this warning by granting broad access to an interpreter or
+> terminal application.
+
+## Know What This Screen Does Not Control
+
+The word “permission” appears in several parts of the product, but those
+decisions have different owners and lifetimes.
+
+| Boundary | Where you decide | Scope and lifetime | How to remove or change it |
+|---|---|---|---|
+| **macOS app grant** | First-run setup, Settings, and macOS System Settings | One installed app identity; normally persists across launches | Change the switch in System Settings |
+| **Browser site grant** | The browser's microphone, camera, download, or notification prompt | One site in one browser profile | Use that browser's site settings |
+| **Service authorization** | [Plugin](plugins), [MCP](mcp-connections), or [CLI](cli-connections) sign-in and the service's consent page | The connected account and granted scopes until expiry or revocation | Disconnect in Jarvis and revoke it at the service when complete removal matters |
+| **Jarvis safety decision** | [Safety policy](safety-and-approvals) and, when available, an approval prompt | One proposed tool call unless a narrow standing rule applies | Deny it, let it expire, or review the separate safety policy |
+| **Scheduled-task grant** | The plugin scope selected when creating a task | Selected plugin during that task's runs | Delete the task and recreate it with narrower scopes |
+| **Jarvis-Agent capability** | Capabilities selected for a [mission](jarvis-agents) | A restricted, short-lived mission grant | It ends when the mission scope closes or expires |
+| **Skill instructions** | The [Skills](skills) view | Guidance for choosing and using tools; no access by itself | Disable or remove the skill |
+
+### Notifications and Files
+
+The current App Permissions list does **not** display, request, or verify a
+Notification permission or a general Files permission. Manage notification
+delivery in the operating system or browser that shows it.
+
+File access is feature-specific. It can come from the operating-system account
+running Jarvis, a folder you selected, a browser file picker, a connected
+service, or a Jarvis-Agent's isolated mission workspace. There is no blanket
+**Allow all files** switch in the current permissions card. If the operating
+system blocks a folder, review that folder or app access in its own privacy
+settings; an **Allowed** status on this page does not cover it.
+
+On Windows and Linux, this panel currently reports that extra macOS grants are
+not required. That is not a device-health test. Windows privacy controls,
+Linux display-session restrictions, file ownership, and browser site settings
+can still block a feature. For example, a Wayland desktop can prevent synthetic
+input even though this page shows no missing macOS permission.
+
+### Tool Approvals Are Single-Action Decisions
+
+Jarvis evaluates a proposed tool call as **safe**, **monitor**, **ask**, or
+**block**. Safe calls can run directly. Monitored calls are recorded and can
+still be stopped by another safety check. Ask-level calls require a supported
+confirmation path. Blocked calls do not run. A denial or unanswered approval
+defaults to no action.
+
+In a live voice session, a yes-or-no follow-up authorizes only the pending call
+and is single-use. For a Jarvis-Agent mission, any visible approval is tied to
+the exact paused tool call and expires; future calls are reviewed separately.
+The worker receives neither a reusable approval nor the stored service
+credential. Connected tools run through the supervisor's normal safety path.
+Stored credentials have their own lifecycle; see [Credentials and
+Secrets](credentials-and-secrets).
+
+Standard text chat currently has no general foreground approval panel. An
+ask-level text action can therefore time out and be denied even though the
+connection and app permissions are ready. Retry only after choosing a path
+that can obtain a decision, or perform the consequential action yourself.
+
+> [!warning]
+> The current main desktop navigation does not expose the detailed mission
+> **Approvals** panel. A mission can report that approval is needed and then
+> time out without a reachable review control. Keep unattended missions
+> read-only, or perform the consequential external action yourself.
+
+Scheduled tasks are a deliberate exception to per-call confirmation. A
+**write** or **full** plugin scope chosen when the task is created can
+pre-authorize matching ask-level plugin calls during that task's own run. A
+**read** scope does not. Review unattended task scopes as standing authority,
+not as a harmless label.
+
+## How It Fits Together
+
+A request succeeds only when every relevant boundary allows it:
+
+1. **Local access:** the operating system lets the correct app identity use the
+ microphone, screen, keyboard, pointer, or files needed for the feature.
+2. **Connection access:** a plugin, MCP server, or CLI is connected and its
+ account or local process has enough service permission.
+3. **Capability selection:** Jarvis or a Skill chooses a tool that is actually
+ available. A Skill explains a method; it cannot create access.
+4. **Safety decision:** Jarvis evaluates the exact proposed action. An app or
+ service grant never bypasses an ask or block decision.
+5. **Execution scope:** a foreground conversation runs the action in that
+ session, while a Jarvis-Agent receives only its short-lived mission tools.
+6. **External enforcement:** the operating system or service can still refuse
+ the operation. An approval means “try this call,” not “guarantee success.”
+
+Computer Use demonstrates all six boundaries. On macOS it needs Screen
+Recording, Accessibility, and Input Control; it also needs a working visual
+model and the live desktop. Every proposed mouse or keyboard action still
+passes safety. Prefer a Plugin, MCP connection, or CLI when a structured tool
+can complete the work without exposing the screen.
+
+## Check That It Works
+
+Use the smallest feature that needs the permission you granted:
+
+1. On macOS, open **Settings > Privacy permissions** and confirm that the
+ intended row says **Allowed** and no restart message remains.
+2. For Microphone, open the wake-word microphone check and speak a harmless
+ phrase. Confirm that it reports a usable signal.
+3. For Computer Use, confirm all three required rows are allowed, then run the
+ harmless calculator check from [Computer Use](computer-use).
+4. Revoke the tested grant in macOS System Settings only if you no longer want
+ the feature. Confirm that the feature fails honestly rather than continuing
+ with hidden access.
+
+On Windows or Linux, test the feature directly and use that platform's privacy,
+display, and file settings when access fails; the App Permissions list does not
+validate them.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| No permission rows, only **Not required** | The host is not macOS, so this panel does not inspect platform or browser controls | Test the feature and review the host or browser settings that own the device |
+| App identity warning and no buttons | Jarvis was started from an interpreter, terminal, copied bundle, or unexpected location | Quit it and reopen the installed Personal Jarvis app |
+| **Allow** does not appear | The item is already granted, denied, restricted, unavailable, or the app is not eligible to prompt | Use **Open Settings** when shown; otherwise fix app identity or device policy |
+| Status stays **Not allowed** after changing macOS settings | The app is still waiting for the native state or the change belongs to another app identity | Bring Personal Jarvis forward, wait briefly, confirm the correct app entry, and restart if asked |
+| **Restart now** keeps refusing | One or more Jarvis-Agent missions are active | Finish or stop the missions, then restart; the permission card does not force-stop them |
+| Every macOS row is allowed but the feature fails | A device, model, connection, browser grant, file boundary, or service authorization is still missing | Test the dependent feature and follow its own troubleshooting page |
+| A tool or mission says approval is required | The action reached the safety gate, not the App Permissions gate | Review the exact action when a decision control is available; otherwise let it deny and perform the action yourself |
+
+## Next Steps
+
+- Use [First-Run Setup](first-run-setup) to understand the complete onboarding
+ path and the text-only option.
+- Read [Audio and Wake Word](audio-and-wake-word) to test microphone access,
+ device selection, and wake readiness together.
+- Read [Computer Use](computer-use) before granting screen and input control or
+ allowing Jarvis to operate a live desktop.
+- Review [Privacy and Local Data](privacy-and-local-data) to understand what a
+ granted feature can store locally or send to a connected service.
diff --git a/docs/product/privacy-safety-and-support/privacy-and-local-data.md b/docs/product/privacy-safety-and-support/privacy-and-local-data.md
new file mode 100644
index 0000000000..6db3b2395f
--- /dev/null
+++ b/docs/product/privacy-safety-and-support/privacy-and-local-data.md
@@ -0,0 +1,239 @@
+---
+title: "Privacy and Local Data"
+slug: privacy-and-local-data
+summary: "Learn what Jarvis stores locally, what may be sent to a connected service, and how each optional feature changes that boundary."
+section: "Privacy, safety, and support"
+section_order: 6
+order: 1
+diataxis: explanation
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [privacy, local-data, retention, deletion, providers, backups]
+related: [credentials-and-secrets, permissions, wiki-and-memory, jarvis-board]
+---
+
+Jarvis keeps much of its working history on the computer or server where the
+app runs. It contacts another service only when a feature needs that service,
+such as a remote Brain, speech provider, connected tool, phone service, or a
+sharing destination you choose.
+
+This page explains those boundaries and their current limits. It is a product
+map, not a promise about a provider's own storage, training, or deletion rules.
+
+> [!info] **Local** means the Jarvis host. If Jarvis runs on a remote server,
+> its local databases and files are on that server, not automatically on the
+> laptop or phone used to open the app.
+
+## Follow One Request
+
+A normal request can cross several boundaries:
+
+1. **You provide input.** Chat text, microphone audio, a dropped file, a
+ screenshot, or a scheduled task starts the work.
+2. **Jarvis adds context locally.** Depending on the feature, this can include
+ recent conversation history, standing instructions, a Profile summary,
+ contact names and relationships, or relevant Wiki excerpts.
+3. **The selected capability processes it.** A local provider works on the
+ Jarvis host. A remote provider or connected service receives the input and
+ context required for its part of the request.
+4. **Tools act within their own boundary.** A local command can stay on the
+ host, while a plugin or Model Context Protocol (MCP) connection can send its
+ arguments to another service. Safety approval controls whether an action may
+ run; it does not make a remote request local.
+5. **Jarvis stores the result that belongs to the feature.** A chat reply,
+ voice transcript, task timeline, mission record, Wiki update, output file,
+ or Board total can be saved in a different local store.
+
+## Know What Is Stored
+
+Jarvis currently uses several local storage areas rather than one single data
+file. The important areas are the installation data folder, the app's user-data
+folder, the Wiki vault, the Jarvis-Agent output area, and any exports you save.
+
+| Area | What it can contain | Current retention or removal boundary |
+|---|---|---|
+| Chats | Text-thread metadata and the messages that are successfully persisted | Text threads are pruned after 365 days at startup. **Delete** removes one text thread, not related audit records or provider copies. |
+| Voice sessions | Transcripts, replies, provider and model names, tool names, timings, token and cost totals, and selected event details | The default retention is 30 days. Sessions can be copied or saved, but the current app has no per-session delete action. |
+| Tasks and missions | Task instructions, schedules, steps, results, errors, mission prompts, review events, and status history | A finished task can be deleted. Mission database history has a separate life and is not removed with the task. |
+| Profile and Contacts | Profile fields and observations, an optional avatar, contact details, aliases, relationships, and notes | You can clear Profile fields, remove the avatar, and delete contacts. Clearing a field does not automatically remove earlier observations that mention it. |
+| Wiki and memory | Markdown pages, contact companion notes, candidate facts, a derived search index, archives, and local recovery snapshots | Wiki content persists until changed locally. Curator actions archive instead of hard-delete, and the current Wiki view has no permanent-delete control. |
+| Jarvis-Agents and Outputs | Mission work areas, logs, reviews, diffs, and approved deliverables | Mission output folders older than 14 days are removed during the normal startup cleanup. Files copied to Downloads or another destination are separate and remain there. |
+| Jarvis Board | Daily totals, tool categories, streaks, achievements, generated biography text, and reactions | These derived summaries are local and have no current clear-all control. Older summaries can remain after their source voice sessions are pruned. |
+| Local audit data | Daily event logs and captured screenshot blobs used for diagnostics and replay | The flight recorder is on by default. Screenshot blobs are removed after 10 days by default; the daily event logs do not currently have the same age-based cleanup. |
+
+The embedded app also keeps small interface preferences, such as panel sizes,
+sound choices, and an optional Board share handle, in browser-style local
+storage. Clearing that storage resets the preferences but does not remove the
+databases and files listed above.
+
+### Understand What Is Not Saved Together
+
+One request can leave records in more than one place. Deleting a chat does not
+delete a task it started, a Wiki fact learned from it, a Jarvis-Agent mission,
+an output file, a Board total, an exported transcript, or an audit-log event.
+
+Text chat history also has a current saving gap: user messages are not always
+written to the Chat store even though replies may be. This does not mean the
+input was never processed or recorded elsewhere. Do not use an empty reopened
+chat as proof that no local or remote copy exists.
+
+## Know What Can Leave the Jarvis Host
+
+| Feature | What another service may receive | When it happens |
+|---|---|---|
+| Chat and the Brain | Your request, recent context, standing instructions, relevant Profile or Wiki context, dropped text, images, and tool results | When the selected Brain is remote rather than local |
+| Voice | Microphone audio for remote speech recognition or Realtime voice, transcripts for the Brain, and reply text for remote speech output | While you use the corresponding remote voice capability |
+| Vision and Computer Use | Screenshots, visible window context, the requested action, and action results | When a remote vision or action model is needed; approvals still apply to consequential actions |
+| Plugins, MCP, and CLI connections | The arguments and context passed to the tool, plus any result it returns | When you or Jarvis runs that connection; a local CLI can itself contact services outside Jarvis |
+| Jarvis-Agents | The mission request, selected files or repository context, scoped tool calls, worker output, and review material | When a remote worker or model handles the mission |
+| Wiki processing | Candidate facts and relevant page excerpts | When a remote Wiki extractor or curator reviews a possible memory update |
+| Board and sharing | A share card when you send it; approved aggregate statistics when optional federation is enabled | Only for the chosen share destination or configured federation, except for the biography limitation below |
+| Feedback and community links | Whatever you post or attach, under the destination's rules | The current Feedback screen opens an external community site; Jarvis does not attach the active chat automatically |
+
+Phone calls and connected messaging channels necessarily pass audio or messages
+through their configured services. Once data reaches a provider, channel,
+community, or recipient, its retention and deletion rules apply separately.
+Removing the local Jarvis record does not send a deletion request to them.
+
+An installation can also expose an optional feedback relay through the Control
+API. When an operator has connected that relay and someone uses it, the report
+title and description, an optional screenshot, the app and runtime versions,
+the host operating-system description, and the submission time are sent to
+Discord. The current Feedback screen does not use this relay; it opens the
+community site so you can review and submit the post yourself.
+
+> [!warning] Never put a password, API key, recovery code, or other credential
+> into chat, voice, a Wiki page, a task, feedback, or an output file. Use the
+> protected fields in **API Keys & Providers**. Pattern-based guards reduce some
+> accidental exposure, but they do not recognize every secret or personal fact.
+
+### Current Board Biography Limitation
+
+Viewing or refreshing the Board does not publish its statistics. Optional
+Board federation is also off by default.
+
+A separate background biography feature is less obvious: after Jarvis has
+enough activity, it can ask the currently selected Brain provider to summarize
+Board facts. That request can include tool and task totals, activity timing,
+selected recent activity summaries, mission statistics or titles, and an older
+biography. The current Board screen does not show this biography or provide an
+on/off control. Disabling federation does not disable this Brain request.
+
+### Current Audit and Redaction Limitation
+
+The flight recorder stores the event stream for diagnostics, not only anonymous
+counts. Its daily files can contain message text, transcripts, action details,
+provider metadata, and other event fields. The current app has no in-app switch
+or clear button for this store, and only its screenshot blobs have the default
+10-day cleanup.
+
+Jarvis masks common credential shapes in selected session previews and refuses
+Wiki writes that match several credential patterns. The flight recorder does
+not pass every event through that same masking step. These guards reduce risk;
+they are not a complete personal-data or secret filter.
+
+## Remove or Back Up Data
+
+### Remove data with the right expectation
+
+| What you want to remove | Available action | What can remain |
+|---|---|---|
+| A text conversation | Use **Delete** in Chats | Voice sessions, tasks, Wiki changes, outputs, Board totals, exports, audit events, and provider-side records |
+| A Profile detail or avatar | Clear the field or remove the avatar in Profile | Earlier Profile observations, Wiki facts, backups, and context already sent to a provider |
+| A contact | Use **Delete** in Contacts | Its Wiki companion page is moved to the Wiki archive; it can retain the name, aliases, relationship, and note, but not phone, email, or street address from the contact record |
+| A task | Cancel it if active, then delete it after it reaches a final state | Mission history, generated outputs, audit events, and actions already completed |
+| A voice session, Board history, or audit log | No item-level removal control is available in the current app | The applicable automatic retention may remove some data later, but not every related or derived record |
+| A saved export or output copy | Delete the file with the operating system or destination app | The original Jarvis record and any copies, backups, recipients, or provider records |
+
+Jarvis does not currently provide one **Export all my data** or **Delete all my
+data** workflow. If complete removal matters, treat each local store, every
+export, every backup, and every connected service as a separate copy.
+
+### Back up the full set
+
+The Wiki curator keeps up to ten recent local recovery snapshots before its
+own changes. Those snapshots are for rollback, not a complete personal backup:
+Wiki archives and attachments are excluded.
+
+For a broader backup, close Jarvis first and include all of these locations in
+your operating-system backup:
+
+- the installation data folder, including conversations, sessions, tasks,
+ missions, Profile files, memory databases, and audit logs;
+- the app user-data folder, including Contacts, Board data, user skills, and
+ preferences;
+- the active Wiki vault, including its archive and attachments, plus the Wiki
+ recovery-snapshot folder if you want rollback history;
+- the Jarvis-Agent output area and any exported copies in Downloads or another
+ folder you chose.
+
+An Obsidian Sync account, cloud-drive folder, system backup, or server snapshot
+creates another copy governed by that system. Check its retention before using
+it for sensitive material.
+
+## How It Fits Together
+
+1. **Chats and Voice collect requests.** The active Brain may receive recent
+ context, Profile guidance, contact summaries, and Wiki excerpts. Speech and
+ vision services receive only the media needed for their capabilities, but a
+ remote service remains an external boundary.
+2. **Tasks preserve future work.** A scheduled action can later call the Brain,
+ a plugin, MCP server, or CLI. Deleting the task does not undo an action that
+ already ran.
+3. **Profile, Contacts, and Wiki supply durable context.** Profile describes
+ you, Contacts stores an address book, and Wiki keeps longer-lived knowledge.
+ A contact mirror deliberately leaves phone, email, and street address out of
+ the Wiki, but names, relationships, aliases, and notes can be copied there.
+4. **Jarvis-Agents create a separate mission trail.** Their prompts, worker
+ evidence, and files live outside Chats. Approved files appear in Outputs and
+ can be copied again to a user-visible folder.
+5. **Board derives summaries.** It reads supported activity and session records
+ into smaller totals. Sharing those totals is optional, but the background
+ biography can still use the selected Brain provider as described above.
+6. **Feedback is a deliberate external handoff.** The current screen opens a
+ community destination. Review text and screenshots yourself before posting;
+ Jarvis does not treat a safety approval as permission to publish private
+ context.
+
+If a provider or connection is unavailable, the corresponding remote step can
+fail or use another compatible provider you configured. Local records and
+unrelated features remain available, but switching providers changes who
+receives the next request; it does not move or erase older provider-side data.
+
+## Check That It Works
+
+1. Start a new text chat and send a harmless request that contains no personal
+ information.
+2. Confirm that the reply appears, then return to **History** and delete that
+ text conversation.
+3. Confirm that the conversation disappears from Chats.
+4. Open **Sessions**, **Outputs**, and **Board**. Confirm that deleting the text
+ thread did not claim to clear those separate areas.
+
+This check confirms the current store-specific delete behavior. It does not
+prove that audit logs or a remote provider deleted their records.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| A deleted item still appears in another view | The other view uses a separate source, archive, or derived summary | Identify the feature that owns that copy and use its removal option where available; do not repeat the delete blindly. |
+| An old voice session disappears | The session crossed its retention window | Check any transcript export you intentionally saved. The app does not restore a pruned session from Board totals. |
+| An output is missing but a downloaded file remains | Startup cleanup removed the mission folder, while the exported copy has its own life | Keep or delete the downloaded copy with the operating system. |
+| A Wiki search result survives a local edit | The derived search index has not caught up | Open Wiki and use **Rebuild index**. Also check the Wiki archive and recovery snapshots when removal matters. |
+| You expected a request to stay local | A remote Brain, speech service, plugin, MCP server, channel, or worker handled part of it | Review the selected provider and connected features before the next request. Choose a local capability where one is available. |
+| You need a complete data export or erasure | The app has no global workflow for it yet | Back up what you need, then handle each Jarvis store, export, backup, and provider account separately. |
+
+## Next Steps
+
+- Read [Credentials and Secrets](credentials-and-secrets) to understand where
+ connection credentials belong and how to replace or remove them safely.
+- Review [App Permissions](permissions) to grant only the microphone, screen,
+ notification, and file access required by the features you use.
+- Use [Wiki and Memory](wiki-and-memory) to understand durable facts, local
+ indexing, archives, and remote curator processing in more detail.
+- Read [Jarvis Board](jarvis-board) before sharing statistics or enabling an
+ experimental connection to another Board service.
diff --git a/docs/product/privacy-safety-and-support/safety-and-approvals.md b/docs/product/privacy-safety-and-support/safety-and-approvals.md
new file mode 100644
index 0000000000..7413737778
--- /dev/null
+++ b/docs/product/privacy-safety-and-support/safety-and-approvals.md
@@ -0,0 +1,247 @@
+---
+title: "Safety and Approvals"
+slug: safety-and-approvals
+summary: "Learn why some actions run immediately, some require confirmation, and some are blocked before they can affect your computer or accounts."
+section: "Privacy, safety, and support"
+section_order: 6
+order: 4
+diataxis: explanation
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [safety, approvals, risk-tiers, permissions, computer-use, automation]
+related: [computer-use, tasks-and-reminders, skills, privacy-and-local-data]
+---
+
+Jarvis uses a safety decision before a tool can act on your computer or a
+connected account. That decision may let the call run, pause it for a clear
+yes or no, or refuse it.
+
+This is a gate around **Jarvis tool calls**. It is not a universal sandbox,
+an undo system, or a replacement for operating-system permissions and service
+access. A button you select directly in the app, a command you run yourself,
+or a provider's own behavior can have a separate confirmation path.
+
+## Understand the Four Decisions
+
+Jarvis evaluates the proposed tool together with its arguments. Some tools can
+assign a different level to a read action than to a write action.
+
+| Decision | What happens | What to remember |
+|---|---|---|
+| **Safe** | The call runs without asking first and is recorded | Safe means low-friction, not private, reversible, or guaranteed to succeed |
+| **Monitor** | The call runs without asking first and is recorded for review | Monitor is an audit level, not a preview or pause |
+| **Ask** | The exact call pauses until an approval path answers; no answer normally becomes a denial after about 60 seconds | Review the destination and arguments before approving |
+| **Block** | The call is refused before the tool runs | Approval cannot override a block |
+
+The decision order is compact:
+
+**proposed tool and arguments -> deny rule -> allow rule -> tool level -> run,
+ask, or block**
+
+A matching deny rule always wins. A matching allow rule is standing authority:
+it changes the matching call to **safe**, even when the tool would normally
+ask. It also skips the voice plausibility check. Keep allow patterns narrow;
+a broad wildcard can silently remove confirmation from many different
+arguments. The current app has no dedicated screen for reviewing these
+advanced allow and deny rules.
+
+For voice requests, Jarvis also checks whether the transcript and wake timing
+look plausible. Uncertainty is logged for monitored calls. Ask-level calls
+still require confirmation. This check does not turn a monitored action into
+an approval prompt.
+
+## Review an Approval
+
+An approval is intentionally small. It authorizes one paused tool call with
+one trace identifier. It does not authorize the rest of a mission, future
+calls to the same service, or a rewritten set of arguments.
+
+Before you approve, check:
+
+- **Action:** Is this the tool you expected Jarvis to use?
+- **Target:** Is the account, person, file, application, or service correct?
+- **Arguments:** Do the visible details match what you requested?
+- **Effect:** Could this send, publish, delete, purchase, call, or expose data?
+
+Approval previews mask common credential shapes and can be shortened. That
+protects sensitive values, but it can also hide detail you would need for a
+confident decision. Deny the call when the preview is incomplete or unclear.
+
+### Voice and Realtime
+
+For an ask-level conversational action, Jarvis asks a short yes-or-no question
+instead of waiting silently for the desktop UI. A clear **yes** runs the
+stored action once. A clear **no** drops it. In the normal voice flow, an
+unrelated next request also abandons the action and repeated unclear replies
+eventually cancel it. In Realtime, give a clear no or close the session when
+you change your mind.
+
+The voice flow has no visible countdown and its pending entry has no separate
+wall-clock expiry. Answer promptly. If you return later or no longer remember
+the exact action, say no and start again.
+
+### Jarvis-Agent Missions
+
+A connected tool used by a Jarvis-Agent remains owned by the supervisor. The
+worker receives a short-lived list of allowed tools, not the saved credential
+or a reusable approval. An ask-level call can pause with the tool name, worker,
+risk level, reason, a redacted argument preview, and an expiry time. The
+detailed approval panel requires a second click before **Approve and run**;
+**Deny** is immediate.
+
+> [!warning]
+> The detailed Missions view and its **Approvals** tab exist in the current
+> frontend, but the main desktop navigation does not expose that view. A global
+> toast can report a pending mission call without giving you a reachable review
+> screen. Do not try to bypass the gate. Let the request expire or deny, and
+> perform the consequential action yourself.
+
+Standard text chat also has no general foreground approval panel today. An
+ask-level action started there can wait and then be denied. Use voice for a
+supported yes-or-no flow, or take the action yourself after reviewing it.
+
+## Know What Approval Does Not Cover
+
+Approving means **try this exact call now**. It does not:
+
+- grant microphone, screen, keyboard, file, or accessibility access;
+- connect an account or create a missing credential;
+- expand the scopes allowed by Google, GitHub, an MCP server, or another
+ service;
+- verify that a model interpreted your intent correctly beyond the displayed
+ call;
+- guarantee success, prevent a provider charge, or undo a completed effect;
+- approve a later step in a workflow, Skill, task, or mission;
+- make information sent to a remote service local or private.
+
+Operating-system prompts, browser consent, account scopes, in-app destructive
+buttons, and command-line `--yes` prompts are separate controls. Passing one
+does not silently pass the others.
+
+## Standing Authority and Automation
+
+Automation changes when you can be present to answer.
+
+### Tasks
+
+When you create an agent task, a plugin grant set to **Write** or **Full** is
+pre-authorization for that plugin during the task's own run. Matching ask-level
+calls can be approved automatically without waking you. A **Read** grant does
+not provide that standing approval. Treat Write and Full as durable authority,
+review the prompt and schedule together, and remove grants the task no longer
+needs.
+
+Cancelling a task prevents later scheduled work, but it is a soft cancel. It
+does not reliably interrupt a Computer Use loop that is already controlling
+the desktop.
+
+### Skills and Workflows
+
+A Skill is guidance, not a permission. AI-generated Skills remain drafts until
+you review and promote them. In conversational use, the tools a Skill asks
+Jarvis to call keep their normal safety decisions. Scheduled Skill steps use
+the Skill's declared policy and refuse ask-level work when no approver is
+present.
+
+Workflows and app commands can also include their own deliberate confirmation
+or hold-to-stop control. When a sequence makes separate tool calls, one
+approval is not meant to cover the rest. These controls complement the tool
+gate; they are not evidence that every later service call will ask again.
+
+### Connections, Plugins, and MCP
+
+Connecting a service gives Jarvis a route to that service. It does not prove
+that every method is read-only. Current MCP and marketplace-plugin tools
+normally inherit one shared **monitor** default instead of classifying every
+server method as read versus write. A write-capable method can therefore run
+without a prompt in the default setup.
+
+Connect only servers you trust, grant the narrowest account scopes available,
+and test on non-critical data first. A plugin's own service permission is an
+important backstop when its Jarvis tier is not specific enough.
+
+### Computer Use
+
+Computer Use is a monitored live-desktop tool, and its mouse and keyboard
+steps are mostly safe or monitored. It does **not** ask before every click or
+keystroke. Screen, accessibility, and input permissions plus foreground-window
+and protected-prompt guards provide additional boundaries, but you should
+still watch the run and avoid sensitive screens.
+
+To stop a running mission from **Outputs**, hold the stop control until its
+ring completes. For a live voice or Computer Use turn, use the app's hang-up
+control. If desktop control continues or the UI is unresponsive, close Jarvis.
+Stopping prevents later steps; it cannot reverse a click, message, command, or
+upload that already completed.
+
+## How It Fits Together
+
+A successful action normally passes several independent boundaries:
+
+1. **Capability:** a Skill, workflow, Brain, or Jarvis-Agent chooses an
+ available tool.
+2. **Permission:** the operating system allows the app to reach the required
+ microphone, screen, input, or file boundary. See [App
+ Permissions](permissions).
+3. **Connection:** Jarvis can retrieve the required credential and the service
+ account has enough scope. See [Credentials and
+ Secrets](credentials-and-secrets).
+4. **Safety:** deny and allow rules plus the tool's risk level decide whether
+ the exact call runs, waits, or stops.
+5. **Execution:** the computer or remote service accepts the request and may
+ apply its own prompts, limits, charges, and policies.
+6. **Review:** local action events and results can appear in Sessions, the Run
+ Inspector, a task timeline, or mission history. Recording helps explain an
+ action; it does not undo it.
+
+This is why a fully connected email account can still produce a denied send,
+and why an approved desktop action can still fail when the operating system
+blocks input.
+
+## Check That It Works
+
+Use harmless checks rather than creating a real side effect:
+
+1. Ask Jarvis to perform a simple web search. Open **Run Inspector** and check
+ that the tool and result were recorded as a low-risk call.
+2. Ask Computer Use to open a calculator. Expect it to run as monitored work,
+ not to request approval for every step. Watch the desktop and use hang-up or
+ the stop control if it leaves the requested task.
+3. During a normal voice request that naturally needs approval, read the
+ question and answer **no**. Confirm that no message, call, or other external
+ effect occurred. Do not create a real send or purchase merely to test this
+ page.
+4. If you maintain a scheduled task, reopen its plugin grants. Confirm that
+ every Write or Full grant is intentional and that read-only tasks use Read.
+
+The Run Inspector may show a risk level, who approved a call, its duration,
+and its outcome when those events were captured. Some automatic and spoken
+decisions do not currently produce a separate approval row, so a blank
+approval field is not proof that no standing rule applied.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| An action ran without asking | It was safe or monitor, a standing allow rule matched, or the connection inherited the monitor default | Review the Run Inspector, external account scopes, and any advanced allow rules |
+| Text chat waits and then reports a denial | The call was ask-level, but text chat has no general approval control | Retry through voice when appropriate, or perform the action yourself |
+| A mission toast says approval is needed, but no Approvals screen is visible | The detailed Missions view is not reachable from the current main navigation | Let it expire; do not broaden an allow rule just to make the mission continue |
+| A task sent or posted without asking | Its Write or Full plugin grant pre-authorized matching work | Cancel the task, then recreate it with Read or no plugin grant |
+| Computer Use starts immediately | Its outer tool and most desktop steps are monitored or safe | Watch the run; use hang-up or stop when it leaves the requested scope |
+| Approval expired before you decided | The paused call reached its decision timeout | Recheck the target and start a fresh request; never approve a stale description from memory |
+| Approval succeeded, but the action failed | A permission, credential, account scope, network, service limit, or target state blocked execution | Fix the failing boundary; approval is not a success guarantee |
+| Stop was accepted, but an effect remains | The effect completed before cancellation reached the next checkpoint | Repair or reverse it at the destination when possible, then review the run history |
+
+## Next Steps
+
+- Read [Computer Use](computer-use) before allowing live mouse and keyboard
+ control.
+- Review [Tasks and Reminders](tasks-and-reminders) before granting unattended
+ Write or Full access.
+- Use [Skills](skills) to understand drafts, activation, and how instructions
+ call normal tools.
+- Read [Privacy and Local Data](privacy-and-local-data) to understand what an
+ approved local or remote action may store or send.
diff --git a/docs/product/privacy-safety-and-support/troubleshooting.md b/docs/product/privacy-safety-and-support/troubleshooting.md
new file mode 100644
index 0000000000..3f78220b11
--- /dev/null
+++ b/docs/product/privacy-safety-and-support/troubleshooting.md
@@ -0,0 +1,261 @@
+---
+title: "Troubleshooting"
+slug: troubleshooting
+summary: "Diagnose startup, connection, provider, voice, permission, and extension problems using safe checks before changing configuration."
+section: "Privacy, safety, and support"
+section_order: 6
+order: 5
+diataxis: troubleshooting
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [troubleshooting, diagnostics, recovery, startup, providers, voice, connections, support]
+related: [install-personal-jarvis, providers-and-api-keys, audio-and-wake-word, platform-support]
+---
+
+Start with the smallest check that can identify the failing part. Personal
+Jarvis combines a local app, optional online providers, operating-system
+permissions, connected tools, and background work. One of those parts can be
+unavailable while the rest of the app is healthy.
+
+This guide uses visible app controls. Ordinary diagnosis should not require
+deleting data, editing configuration, exposing a local service, or reinstalling.
+
+## Start With the Safest Check
+
+1. **Decide whether one feature or the whole app is affected.** Open an
+ unrelated view. If Docs does not load, try Chats or Settings. If chat fails,
+ try the provider card's **Test** button.
+2. **Read the exact status before changing anything.** **Starting**, **Voice
+ starting**, **Offline**, **Key invalid**, **Reconnect needed**, and
+ **Permission required** point to different layers. Record the wording, not
+ just “it does not work.”
+3. **Use one built-in Retry, Refresh, Recheck, or Test action.** It repeats a
+ focused check without changing unrelated settings.
+4. **Change only the failing layer.** A working chat provider does not prove
+ that speech, Realtime, the Tool Model, or Jarvis-Agents can work. Test the
+ category that owns the symptom.
+5. **Restart only when the app asks, or when several views have lost the local
+ connection.** Finish active work first. The global **Restart** control
+ protects running Jarvis-Agent missions; forcing it can stop them.
+6. **Preserve a small, safe record if the problem remains.** Note the view,
+ visible status, approximate time, and the shortest steps that reproduce the
+ problem.
+
+> [!warning] Never put an API key, token, password, recovery code, private
+> configuration file, or unreviewed log into a support message. Screenshots,
+> transcripts, raw run exports, and logs can contain conversation text, file
+> names, account details, and personal paths. Share only a narrow, reviewed,
+> redacted excerpt.
+
+Use this map to choose the first focused check:
+
+| What is affected? | First place to look | First safe action |
+|---|---|---|
+| The app window or every view | Global status and startup screen | Wait for the current start once; then use one normal restart or quit and reopen |
+| Docs only | **Docs** loading or error panel | Select **Try again**; use the online Docs link if needed |
+| Chat answers | **API Keys & Providers > Brain** | Run **Test** on the active provider |
+| Wake, listening, or spoken replies | **Settings > Audio devices / Wake Word** and the relevant provider category | Rescan devices or run **Test wake word** |
+| An action is denied | **Settings > Privacy permissions** and the approval message | Grant only the requested access or approve the intended action |
+| A plugin, MCP server, or CLI | **Skills, Plugins & MCPs** or **CLIs** | Refresh, reconnect, reload, or recheck that one connection |
+| A task, mission, or generated file | **Tasks**, **Jarvis-Agents**, and **Outputs** | Read its status or timeline before retrying |
+
+## Troubleshooting
+
+### The App Does Not Open, Stays Blank, or Shows Offline
+
+- A name, spinner, or startup message means the desktop shell is alive and the
+ local app is still starting. Let that start finish once. **Voice starting**
+ applies only to voice readiness; text chat can already be available.
+- **Starting** in the app means its live local connection is warming up.
+ **Offline** across several views means that connection was lost. If it does
+ not recover, use the global **Restart** control and confirm once.
+- If one view displays a crash panel, select **Back to Chats**, then reopen the
+ view. A single view crash does not require an immediate app restart.
+- If the entire window remains blank or unresponsive and no recovery control
+ appears, use the normal application **Quit** action and reopen the registered
+ app. Do not start a cycle of repeated restarts.
+- If the app never opens after installation, or its normal launcher is missing,
+ continue with [Install Personal Jarvis](install-personal-jarvis) and
+ [Platform Support](platform-support). A headless host does not provide the
+ same desktop window, audio, or overlay surfaces.
+
+### Docs Keep Loading or Show an Error
+
+The desktop Docs library is local. On its first open after an install or update,
+Jarvis may need a moment to build the index. While that happens, the page shows
+an indexing message and visible placeholders instead of an empty screen.
+
+- If loading reaches the error panel, select **Try again**. Documentation
+ requests stop waiting after a bounded timeout, so the control should not
+ remain on an endless spinner.
+- If only Docs fails, do not replace a provider key or restart the entire app
+ first. Providers do not build the local documentation index.
+- Use **Open redesigned online docs** to open the hosted copy at
+ [personaljarvis.ai/docs](https://personaljarvis.ai/docs/) while the local
+ index recovers.
+- If the sidebar is visible but no title matches, clear its filter. Use the
+ magnifying-glass search for full-text results across page content.
+- If both local and hosted Docs fail, separate the checks: the local library
+ depends on the Jarvis app; the hosted copy depends on the browser and
+ internet connection.
+
+### Chat Does Not Answer or Uses the Wrong Provider
+
+Open **API Keys & Providers > Brain** and inspect the active card.
+
+- **Saved**, **active**, and **Works** are separate states. A stored credential
+ does not prove that the selected account has credit, model access, or a
+ working connection.
+- Run **Test**. **Key invalid**, **Out of credits**, **Rate limited**, **Model
+ unavailable**, **Unreachable**, and **Integration error** each name a more
+ specific recovery path. Correct that account or model, or activate another
+ ready provider family that supports the same capability.
+- If ordinary chat works but a tool action fails, test the **Tool Model** and
+ the connected tool. A Brain answer does not prove that Computer Use, a
+ plugin, or an MCP call is ready.
+- If the message field says **Starting** or **Offline**, address the local app
+ connection before replacing a provider credential.
+- Enter or replace credentials only in the protected provider field. Never
+ paste them into chat, voice, tasks, Docs, or a support report.
+
+### Voice Does Not Hear, Understand, Wake, or Speak
+
+Treat voice as a chain and check the first broken step.
+
+| Symptom | Likely layer | Safe check |
+|---|---|---|
+| **Voice starting** remains visible | Voice components are still warming or could not become ready | Wait once; Chats remain usable. If it never becomes ready, check microphone permission and the selected voice providers. |
+| The wake phrase does nothing | Microphone, permission, wake engine, phrase, or spoken language | Open **Settings > Wake Word**, keep **Auto**, and run **Test wake word**. |
+| The Bar listens but no useful text appears | Input device, speech recognition, or Realtime input | Rescan and select the intended microphone; test **Voice Input** or the selected Realtime connection. |
+| The transcript is correct but no reply is heard | Output device or Voice Output | Check **Settings > Audio devices > Voice output**, then test the active **Voice Output** provider. |
+| Realtime cannot start or ends early | Realtime provider, browser audio, or session connection | End the call, test the Realtime card, and start a new session. Confirm whether the runtime used Pipeline fallback. |
+| The phrase activates during normal conversation | The phrase is too short or common | Use a distinct two- or three-word phrase with a prefix; there is no sensitivity slider. |
+
+On macOS, use **Settings > Privacy permissions** for microphone access and
+restart only when the card asks. A Realtime session started in a browser uses
+that browser's microphone permission and device, not the native desktop audio
+picker. If a voice turn was recorded, **Transcription** and **Run Inspector**
+can show whether speech recognition, a provider, a tool, or spoken output was
+the last recorded stage.
+
+### A Permission or Approval Blocks the Action
+
+An operating-system permission and a Jarvis safety approval answer different
+questions. The operating system decides whether Jarvis may use the microphone,
+screen, accessibility tree, or input control. Jarvis then decides whether a
+particular action is safe, needs confirmation, or must be blocked.
+
+- Open **Settings > Privacy permissions** and act on the named row. Use
+ **Request** or **Open Settings**, then return to Jarvis and restart if shown.
+- If a confirmation asks about a specific action, review the target and effect
+ before approving. Do not weaken a safety rule merely to make an unclear
+ request proceed.
+- If restart is refused, active Jarvis-Agent missions are being protected.
+ Finish or stop them intentionally before trying again.
+- A status of **Allowed** proves the operating-system grant, not that every
+ later action will be approved or supported.
+
+### A Plugin, MCP Server, or CLI Is Disconnected
+
+- For a packaged plugin, use **Refresh catalog** and then **Reconnect** when
+ shown. Complete sign-in with the intended account and return to the app.
+- For an MCP server, review its status, reload it, and try one harmless
+ read-only action. Its process, URL, authorization, or tools can be
+ unavailable. Do not paste a missing secret directly
+ into `mcp.json`; prefer the packaged plugin when one exists.
+- For a CLI connection, select **Recheck status** after installation or login.
+ **Connected** can confirm account discovery without proving that a particular
+ command has permission, so test a supported read-only action first.
+- If every connection reports that the backend is unreachable, return to the
+ app-wide startup check. If only one connection fails, repair that service
+ rather than restarting unrelated features.
+
+### A Task, Jarvis-Agent, or File Appears Stuck or Missing
+
+- In **Tasks**, select **Refresh** and expand the card's Timeline. A scheduled
+ task needs Jarvis to be running when it becomes due; a failed task can point
+ to its Brain, plugin, permission, or action layer.
+- In **Jarvis-Agents**, read the health banner and current mission state before
+ restarting. Longer work can be queued, running, reviewing, or correcting.
+ Test **API Keys & Providers > Jarvis-Agents** if no worker is reachable.
+- Use **Outputs** as the durable place to find mission results. The live
+ Jarvis-Agents board is not a permanent history, and Outputs currently shows
+ the newest cards rather than every historical mission.
+- **This session has no saved files** means the run produced no archived file
+ or failed before archiving. Ask for a named deliverable and success criteria
+ before starting a new attempt.
+- **Restart** on an Outputs card starts a new linked mission attempt. It is not
+ the same as the global app **Restart** button.
+- **Open** and **Reveal in folder** diagnose file-opening problems without
+ rerunning the mission. If a preview is shortened or marked binary, use a
+ suitable local app.
+
+## When to Seek Help
+
+Ask for help when a focused test still fails after one retry, the problem
+returns after one normal restart, the app repeatedly crashes, or a record
+appears lost. Use **Feedback** to open the project's public Discord bug forum;
+an invite button is available if needed.
+
+Include only what helps another person reproduce the problem:
+
+- Personal Jarvis version, operating system, and whether you use the desktop
+ app, a browser, or a headless host;
+- the affected view and exact visible status or error wording;
+- the shortest numbered steps, expected result, and actual result;
+- the approximate time and whether the problem affects one feature or all
+ views; and
+- one redacted screenshot or a small reviewed excerpt when it adds evidence.
+
+Do not attach a complete log, raw configuration, `.env` file, credential-store
+export, full transcript, or raw Run Inspector JSON unless a trusted maintainer
+requests a specific narrow part and you have reviewed it. If a credential was
+ever exposed, revoke or rotate it with the service first; redacting the later
+message does not make the old value safe again.
+
+## How It Fits Together
+
+| Area | Role in troubleshooting | Important boundary |
+|---|---|---|
+| [Find Help in the App](find-help-in-the-app) | Uses the Docs overview, sidebar filter, full-text search, related guides, and online copy to find the right procedure | Reading Docs does not test or change the affected feature |
+| [Sessions and Run Inspector](sessions-and-run-inspector) | Provides read-only evidence for recorded voice turns: transcript, outcome, timing, providers, tools, and errors | It does not contain the full later lifecycle of standalone tasks, missions, or output files |
+| [Settings](settings-and-appearance) | Owns audio devices, wake checks, permissions, app startup, shortcuts, and restart-required choices | Change one relevant control at a time so the result remains attributable |
+| [Privacy and Local Data](privacy-and-local-data) | Explains what transcripts, missions, outputs, audit data, exports, and provider records may contain or retain | A local or exported copy remains separate from anything shared with support |
+| [API Keys & Providers](providers-and-api-keys) | Tests each Brain, speech, Realtime, Tool Model, and Jarvis-Agent connection at its own boundary | A working category does not prove another category works |
+| [CLI Reference](cli-reference) and [Control API Reference](control-api-reference) | Help advanced and headless users find supported discovery, status, and diagnostic operations | Prefer the app first; never expose the local API or put secrets in commands |
+| **Feedback** | Opens the public support channel after you have a safe, reproducible report | Treat anything posted there as shared with other people |
+
+The usual evidence path is: **visible symptom -> focused built-in check ->
+feature record or status -> one safe recovery -> redacted support report if it
+still fails**.
+
+## Check That It Works
+
+Verify only the path you repaired:
+
+1. Return to the affected view and confirm that its error, warning, or offline
+ state has cleared.
+2. Run its smallest harmless check: reload one Doc, run one provider **Test**,
+ use **Test wake word**, recheck one connection, or refresh one task.
+3. Complete one end-to-end action with no external side effect. For chat, send
+ `Reply with: recovery check complete.` For voice, ask one short question and
+ confirm both the transcript and spoken reply.
+4. If it was a voice problem, open **Transcription** and **Run Inspector** and
+ confirm that the new finished session contains the expected turn and a
+ usable outcome.
+5. Stop after the focused check passes. Do not rotate unrelated credentials or
+ change several working settings “just in case.”
+
+## Next Steps
+
+- Read [Install Personal Jarvis](install-personal-jarvis) when the app or its
+ normal launcher never reaches a usable start.
+- Use [Providers and API Keys](providers-and-api-keys) for connection, model,
+ account, quota, and fallback problems.
+- Follow [Audio Devices and Wake Word](audio-and-wake-word) for microphone,
+ speaker, wake phrase, and local wake-engine checks.
+- Read [Platform Support](platform-support) before diagnosing a desktop, audio,
+ permission, or headless limitation as an app failure.
diff --git a/docs/product/reference/app-command-reference.md b/docs/product/reference/app-command-reference.md
new file mode 100644
index 0000000000..fd0098b0dd
--- /dev/null
+++ b/docs/product/reference/app-command-reference.md
@@ -0,0 +1,168 @@
+---
+title: "App Command Reference"
+slug: app-command-reference
+summary: "Learn how to browse the canonical app-command catalog shared by voice, chat, desktop, CLI, and REST surfaces."
+section: "Reference"
+section_order: 7
+order: 4
+diataxis: reference
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [app-commands, voice, chat, cli, api, automation]
+related: [workflows-and-commands, cli-reference, control-api-reference]
+---
+
+The App Command Registry is Personal Jarvis's curated catalog of high-value
+actions. Each entry gives one action a stable ID, accepted inputs, safety
+metadata, a desktop location, conversational examples, and exactly one
+existing REST endpoint.
+
+The registry helps voice, chat, desktop, command-line interface (CLI), and REST
+clients refer to the same action. It is intentionally smaller than the full
+Control API and is not a list of every button in the app.
+
+## Before You Start
+
+- Start Personal Jarvis before browsing the live catalog through the CLI or
+ REST.
+- Use a Brain provider with tool support before trying a command in voice or
+ chat. The catalog remains browsable when conversational tool use is
+ unavailable.
+- Connect any provider, device, permission, or local feature required by the
+ underlying action. A catalog entry describes an action; it does not make its
+ dependencies ready.
+
+App Commands do not accept API keys or other credentials through conversation.
+Enter credentials only in the protected settings screen for the relevant
+provider or connection.
+
+## Browse the Catalog
+
+Use the [generated App Command catalog](https://github.com/PersonalJarvis/PersonalJarvis/blob/main/docs/commands-reference.md)
+for a readable summary of every command on the current public `main` branch.
+It includes each command's endpoint, arguments, confirmation marker, desktop
+section, and one English voice example.
+
+For the exact catalog shipped with your running installation, use the CLI:
+
+```powershell
+jarvis commands list
+jarvis commands show providers-list
+```
+
+`list` returns the complete live catalog. `show` returns one exact definition,
+including its full input schema and all localized aliases. Both are read-only;
+they do not execute the selected command.
+
+Advanced clients can read the same machine catalog from `GET /api/commands`
+or one exact entry from `GET /api/commands/{command_id}`. An unknown ID returns
+`404`. Use the [Control API Reference](control-api-reference) for target
+discovery and authentication.
+
+> [!note]
+> The public generated catalog can be newer or older than an installed release.
+> The live CLI or REST response is authoritative for the instance you are using.
+
+## Read a Command Entry
+
+| Field | What it tells you |
+|---|---|
+| `id` | Stable kebab-case name used for exact lookup and conversational tool identity |
+| `title`, `description` | Plain-English purpose and expected outcome |
+| `method`, `path` | The one backing REST operation |
+| `params` | Input schema, including required fields, types, choices, lengths, and numeric limits |
+| `path_params` | Inputs inserted into the endpoint path rather than its body or query |
+| `dangerous` | Whether the conversational action needs explicit confirmation |
+| `worker_allowed` | Whether a non-dangerous command may be granted to a Jarvis-Agent |
+| `ui_section` | Sidebar section that contains the equivalent desktop control |
+| `voice_aliases` | Localized example phrases associated with the command |
+
+The generated catalog is a compact summary. Use `jarvis commands show` or the
+live REST entry when exact defaults, limits, every alias, or Jarvis-Agent
+eligibility matters.
+
+Aliases make the intended natural-language meaning easier to discover, but
+they are not guaranteed trigger phrases. Voice and chat selection still
+depends on the active conversational tool path, the request's context, and a
+valid set of inputs. CLI and REST callers should use the exact command ID or
+endpoint rather than guessing from an alias.
+
+## Understand Availability and Safety
+
+A listed command is **defined**, not necessarily **ready**. The action can
+still fail when its provider is disconnected, an input is invalid, a requested
+item no longer exists, a device or permission is missing, the host does not
+support the feature, or the app server is unavailable.
+
+For voice and chat, Jarvis exposes each registry entry as its own small tool.
+It rejects missing, unknown, out-of-range, or unsupported inputs before calling
+the app. The request then goes through the command's normal REST route, which
+performs the same feature validation used by the matching desktop action.
+Jarvis reports the route's actual response rather than assuming success from
+the request wording.
+
+| Surface | How you find or run a command | Confirmation behavior |
+|---|---|---|
+| Voice or chat | Ask naturally; Jarvis selects an available per-command tool | A dangerous command is deferred for a separate yes-or-no turn; policy can still block it |
+| Desktop | Use the normal control in the entry's `ui_section` | The feature's own dialog and safety behavior apply; there is no separate catalog screen |
+| CLI | Browse with `commands list/show`; execute through a curated feature command or `jarvis api` | Dangerous operations require the executing command's `--yes`; browsing never does |
+| REST | Browse the registry routes, then call the listed endpoint | Metadata does not create an interactive prompt; the client must honor it and the server still enforces authentication and route validation |
+| Jarvis-Agent | Receive only an explicitly granted `worker_allowed` subset | Dangerous and configuration-changing commands are not granted through this catalog path |
+
+Confirmation authorizes only the proposed action. It does not add a missing
+credential, bypass input validation, grant an operating-system permission, or
+turn an unavailable feature into a working one.
+
+## How It Fits Together
+
+1. A natural-language request, desktop control, CLI command, or REST call names
+ an action.
+2. The registry supplies a stable identity, accepted inputs, safety marker, and
+ the one existing endpoint for that action.
+3. The starting surface adds its own interaction layer: conversational tool
+ selection, a desktop form, CLI flags, or an HTTP request.
+4. The request reaches the same feature route. That route validates current
+ state and performs the real action on the Jarvis host.
+5. The result returns to the starting surface. A failure stays a failure; the
+ catalog does not fabricate a successful outcome.
+
+An [App Command](workflows-and-commands) performs one curated action now. A
+Workflow stores several ordered steps for reuse or scheduling. The
+[Jarvis CLI](cli-reference) is a terminal client that can browse the registry
+and execute supported routes. The [Control API](control-api-reference) is the
+broader HTTP surface from which registry commands select their endpoints.
+
+## Check That It Works
+
+With Personal Jarvis running, inspect one read-only entry:
+
+```powershell
+jarvis --json commands show providers-list
+```
+
+The result has `"id": "providers-list"`, uses the `GET` method, marks
+`dangerous` as `false`, and includes localized `voice_aliases`. This verifies
+the unified CLI route and live registry without testing a provider or changing
+settings.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| `Unknown command id` or `404` | The ID is misspelled or not present in this installed version | Run `jarvis commands list`, then copy the exact `id` |
+| The public catalog and live catalog differ | GitHub `main` and the installed release contain different registry versions | Use the live entry for current behavior and update Jarvis only through the supported release path |
+| Jarvis answers in prose but no action runs | The Brain could not use the conversational tool path or did not select a command | Check the exact command with the CLI, then retry a concrete request or use the matching desktop control |
+| Jarvis asks for confirmation | The command or current safety policy treats the action as consequential | Review the exact action and inputs, then approve or deny the pending request once |
+| A listed command returns an error | Its inputs or feature dependency are not valid on the current host | Read the returned detail, fix the provider, permission, device, item, or host requirement, then retry a read-only check first |
+
+## Next Steps
+
+- Read [Workflows and App Commands](workflows-and-commands) to choose between
+ one immediate action and a reusable sequence.
+- Use the [CLI Reference](cli-reference) for command discovery, authentication,
+ common flags, and safe terminal execution.
+- Open the [Control API Reference](control-api-reference) when integrating the
+ registry or its backing endpoints over HTTP.
diff --git a/docs/product/reference/architecture.md b/docs/product/reference/architecture.md
new file mode 100644
index 0000000000..0ae3c8b6a1
--- /dev/null
+++ b/docs/product/reference/architecture.md
@@ -0,0 +1,196 @@
+---
+title: "How Personal Jarvis Fits Together"
+slug: architecture
+summary: Follow a request from the user interface through providers, tools, safety checks, events, agents, memory, and output.
+section: "Reference"
+section_order: 7
+order: 5
+diataxis: explanation
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [architecture, desktop, web, api, providers, jarvis-agents, data]
+related: [providers-and-api-keys, jarvis-agents, safety-and-approvals, control-api-reference]
+---
+
+Personal Jarvis is one local supervisor with several ways in. The desktop
+window, browser interface, command line, voice pipeline, and connected channels
+are not separate assistants: they reach the same core services and use the same
+configured capabilities where their host supports them.
+
+The core decides whether a request needs a local app operation, an answer from a
+Brain provider (the service and model that generate a response), a protected
+tool call, or a background mission. Understanding that choice makes failures
+easier to place: an open window proves that the local server is reachable, but
+it does not prove that speech, providers, tools, or Jarvis-Agents are ready.
+
+## The System in One View
+
+The shortest useful model is:
+
+**request surface -> local Jarvis core -> direct operation, provider, tool, or
+mission -> live events and saved results -> request surface**
+
+| Part | What it does | Important boundary |
+|---|---|---|
+| **Request surfaces** | Accept input from the desktop or browser UI, voice, the Jarvis CLI, connected channels, or another trusted client | A surface can expose only the capabilities available on its device and operating system |
+| **Local web server** | Serves the UI and its application programming interface (API); normal request-response calls use REST, while persistent WebSocket connections carry live updates | Desktop and headless server mode share this server, but headless mode has no native window, microphone pipeline, or desktop controls |
+| **Shared core** | Applies configuration, language, conversation context, capability checks, routing, and cancellation | It coordinates the product; it is not itself an AI model or external account |
+| **Providers and tools** | Supply reasoning, speech, vision, live audio, or a connection to another app or service | A provider sees the content sent to it, and a connected service receives the arguments needed for its action |
+| **Jarvis-Agents** | Run substantial work as saved missions in isolated working copies, followed by review | Missions have their own worker selection, lifecycle, and output; they are not long chat replies |
+| **Data and output** | Keep conversations, memory, mission events, settings, and generated files in purpose-specific stores | Live events and durable history are different; reconnecting surfaces reload saved state |
+
+The local API is the common control plane. The desktop window displays the web
+interface inside a native shell. A browser can display the same interface, and
+the CLI calls authenticated API operations instead of reproducing each feature
+inside the terminal. Voice enters through a speech pipeline and joins the same
+Brain and event flow after transcription.
+
+## Four Ways a Request Can Run
+
+Jarvis chooses an execution path based on the request and the capabilities that
+are ready. These paths can be combined, but they remain separate enough to fail
+and recover independently.
+
+| Path | Typical request | What happens |
+|---|---|---|
+| **Direct local operation** | Open a view, read settings, list documentation, inspect status, or perform a supported app command | The local API or a deterministic handler returns the result. A Brain provider is not required unless that operation explicitly asks one to interpret or generate content. |
+| **Brain answer** | Explain something, continue a conversation, summarize available context, or decide which tool fits | The shared Brain manager selects a suitable model, streams the response when supported, and records the turn. Text and Pipeline voice use the same Brain stack, while their saved text and voice records remain distinct sources shown together in Chats. |
+| **Protected tool call** | Search, control an app, use a connected service, or change something through a Jarvis tool | A tool-capable model can propose the call. Jarvis evaluates the exact tool and arguments, requests approval when required, then runs the call through the supervised executor. A button or direct API operation can have a separate route-specific confirmation path. |
+| **Background mission** | Build a deliverable, change a project, or complete substantial multi-step work | Jarvis saves a mission, plans bounded steps, gives each step an isolated workspace, runs a Jarvis-Agent, reviews the draft, and archives an approved result or an honest failure. |
+
+Pipeline voice wraps these paths with two additional stages: a speech-to-text
+provider turns audio into text before the shared core runs, and a text-to-speech
+provider turns the final, voice-safe response into audio afterward. Realtime
+voice uses a different live-audio provider path and does not automatically have
+every capability of the Pipeline path.
+
+## Shared Core and Replaceable Edges
+
+Jarvis depends on contracts rather than one provider implementation. Brain,
+speech, tool, channel, worker, and Realtime integrations are plugins that state
+what they can do. A capability is a usable feature such as calling tools,
+understanding an image, transcribing speech, or producing audio.
+
+For a normal Brain turn, Jarvis starts with the active provider and selected
+model. It can try another suitable model or another connected provider family
+when the first path is missing a credential, unavailable, rate limited, or out
+of credit. A tool turn also needs a model that can actually call tools; a vision
+turn needs image understanding. Fallback never grants a capability that the
+replacement does not have.
+
+The shared live event stream, called the EventBus internally, lets the UI,
+speech state, recorders, and other interested features observe the same turn.
+Events carry a trace identifier so related work can be followed across layers.
+A failing observer is isolated from the others, but this stream is in-process
+delivery, not durable history. Conversations and missions are saved separately,
+and a reconnected UI fetches their current state from those stores.
+
+Jarvis deliberately shows its interface before every heavy subsystem finishes
+warming. This makes the window responsive sooner, but it creates more than one
+readiness level:
+
+- **Server ready** means the UI and health route answer.
+- **Brain ready** means a usable provider stack has finished loading.
+- **Voice ready** means capture, transcription, and speech output are usable.
+- **Mission ready** means the mission store, worker runner, and review path are
+ available.
+
+A feature can therefore report **getting ready**, return a temporary `503`, or
+show a setup message while the rest of the app already works. Persistent
+unavailability is a subsystem problem, not evidence that every layer is down.
+
+## Data, Events, and Trust Boundaries
+
+Jarvis separates data by purpose so one live connection is not treated as the
+source of truth for everything.
+
+| Data or boundary | Where it belongs | What can leave the local device |
+|---|---|---|
+| **Text and voice history** | Local conversation stores, with separate records presented together in Chats | A provider receives the current request and the context Jarvis includes for that turn |
+| **Memory, profile, and Wiki** | Local database entries and workspace files | Only the relevant context selected for a provider or connected action is sent onward |
+| **Mission history** | A dedicated mission event store that survives UI reconnects and app restarts | The selected worker and reviewer providers receive the mission instructions and review context they need |
+| **Mission files** | Isolated working copies during execution, then archived and user-visible Outputs | A worker tool or connected service can receive file content only when the mission is allowed to use it |
+| **Credentials** | The protected credential layer chosen for the installation, separate from chat and mission prompts | The credential is used to authenticate its service; the UI normally receives status rather than the saved value |
+| **Live state** | In-process events and WebSocket updates | Authenticated remote surfaces can receive the live updates their session is allowed to view |
+
+> [!warning] Local orchestration does not make a remote provider or connected
+> service local. Review the provider's data policy and the account scopes before
+> sending private conversation, memory, files, screen content, or contact data.
+
+The local server also has its own security boundary. Desktop use normally stays
+on the same computer. A server configured to accept connections from another
+computer must have a Control API key, and protected requests use either an
+authenticated app session or the credential required by that route. Provider
+credentials and the Control API key have different purposes and cannot replace
+each other.
+
+## How It Fits Together
+
+Follow one request from start to finish:
+
+1. **A surface accepts the request.** The desktop or browser UI, voice pipeline,
+ CLI, channel, task, or integration supplies text, audio, or a direct command.
+2. **The local boundary checks the caller.** UI and API traffic passes host,
+ origin, session, and Control API checks that apply to that surface. Voice and
+ local events enter through their own trusted runtime paths.
+3. **Jarvis prepares one turn.** It resolves the output language, loads the
+ conversation context that belongs to the request, and checks which local and
+ connected capabilities are available.
+4. **The core chooses the execution path.** A deterministic operation can run
+ locally. A conversational turn goes to a Brain provider. An action becomes a
+ supervised tool call. Substantial work becomes a saved Jarvis-Agent mission.
+5. **Capability and fallback rules select an edge.** Jarvis prefers your active
+ selection, skips a connection already known to be unusable, and can try a
+ compatible provider family. If nothing fits, it reports the missing or
+ unavailable capability instead of inventing a result.
+6. **Permissions and safety apply where work has effects.** Operating-system
+ access, service scopes, tool risk, approval, and mission grants are separate
+ checks. Passing one does not silently pass the others. Read [Safety and
+ Approvals](safety-and-approvals) for the exact action boundary.
+7. **Results return through live events and direct responses.** The active
+ surface receives text, audio, progress, state changes, or an error. A mission
+ can continue after the originating conversation is free again.
+8. **Durable features save their own record.** Chats save messages, voice saves
+ session turns, memory keeps selected long-term context, and missions keep
+ events plus archived outputs. The live UI can then reconnect without turning
+ the event stream into a database.
+
+## Check That It Works
+
+Use one harmless chat turn to check the main shared path:
+
+1. Open **Chats**, create a conversation, and ask a short, non-sensitive
+ question.
+2. Confirm that your message appears, Jarvis enters a working state, and a real
+ answer returns through the Brain provider stack.
+3. Open another view, return to **Chats**, and reopen the conversation. Confirm
+ that both messages are still present.
+
+This checks the UI, local server, live event flow, Brain routing, provider
+selection, and text history together. A provider setup or unavailable message
+proves that the local path answered, but it does not prove the provider leg.
+Tools, voice, and Jarvis-Agents each need their own feature check.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| The window opens, but a view says **getting ready** or returns `503` | The server has painted the interface while that subsystem is still warming | Wait briefly and retry the view once. If it persists, check the feature's status rather than restarting every component blindly. |
+| Health is online, but chat, voice, or missions are unavailable | Health proves the web server, not every provider or runtime | Test the relevant category in **API Keys & Providers** and check the dedicated feature page. |
+| A chat message is saved, but no normal answer appears | The Brain failed to build or no connected provider could serve the turn | Open **API Keys & Providers > Brain**, test the active card, and try a ready provider from another compatible family. |
+| An action waits, is denied, or has no effect | A safety decision, operating-system permission, service scope, or route-specific confirmation blocked it | Review the exact request and permission. Do not bypass a block; use [Safety and Approvals](safety-and-approvals) to find the missing boundary. |
+| A mission is missing, stays active, or finishes without the expected file | The request was not delegated, the worker path is unavailable, review is still running, or no deliverable was archived | Open **Jarvis-Agents** for live state and **Outputs** for the durable record, then follow [Jarvis-Agents](jarvis-agents). |
+
+## Next Steps
+
+- Read [Providers and API Keys](providers-and-api-keys) to connect services,
+ understand capabilities, and see how compatible fallback works.
+- Read [Jarvis-Agents](jarvis-agents) to follow the isolated worker, review, and
+ output path for substantial background work.
+- Read [Safety and Approvals](safety-and-approvals) to understand why a tool
+ runs, waits for a decision, or is blocked.
+- Read the [Control API Reference](control-api-reference) to build a trusted
+ client against the same local control plane used by Jarvis surfaces.
diff --git a/docs/product/reference/cli-reference.md b/docs/product/reference/cli-reference.md
new file mode 100644
index 0000000000..2ad12f2b66
--- /dev/null
+++ b/docs/product/reference/cli-reference.md
@@ -0,0 +1,199 @@
+---
+title: "CLI Reference"
+slug: cli-reference
+summary: "Find the supported command-line surfaces, authentication options, common flags, and the generated command catalog."
+section: "Reference"
+section_order: 7
+order: 1
+diataxis: reference
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [cli, terminal, api, automation, reference]
+related: [cli-connections, control-api-reference, app-command-reference, configuration-reference]
+---
+
+The Jarvis command-line interface (CLI) lets you inspect and control a running
+Personal Jarvis instance from a terminal. It is a thin client: the command
+sends a request, while Jarvis performs the action and applies its normal
+validation and safety rules.
+
+Start with a curated command such as `jarvis system status`. Use the dynamic
+`jarvis api` layer when an operation has no shorter curated command.
+
+## Before You Start
+
+- Install Personal Jarvis so the `jarvis`, `jarvisctl`, and `jctl` commands are
+ available.
+- Start the desktop app or headless server for any command that reads or
+ changes Jarvis. Curated help, version, and schema-cache maintenance work
+ without a running server.
+- For a remote instance, use a trusted private connection and authenticate
+ with its control key. Do not expose the control address directly to the
+ public internet.
+
+Commands affect the computer that runs the Jarvis server, which may be
+different from the computer where you type the command.
+
+## Choose the Right Surface
+
+| Surface | Use it when | What it controls |
+|---|---|---|
+| **Jarvis CLI** | You want to inspect, automate, or manage Jarvis from a terminal | A running Personal Jarvis instance |
+| **CLI Connections** | You want Jarvis to use another terminal program | External programs installed on the Jarvis host |
+| **Control API** | You are building an HTTP integration | The REST operations behind the CLI and app |
+| **App Commands** | You need a stable Jarvis action shared by voice, chat, desktop, CLI, and REST | The canonical cross-surface command catalog |
+
+The similar names describe opposite directions: the Jarvis CLI lets **you
+control Jarvis**; a [CLI Connection](cli-connections) lets **Jarvis control an
+external CLI**.
+
+## Choose a Command Layer
+
+| Layer | Shape | Current behavior |
+|---|---|---|
+| Curated commands | `jarvis <group> <command>` | Short, human-oriented names for common operations |
+| Dynamic API commands | `jarvis api <tag> <operation>` | Generated from the server's OpenAPI description and covers mounted REST operations |
+| Launcher commands | bare `jarvis`, `jarvis serve`, and launcher flags | Starts or diagnoses the app rather than calling the control CLI |
+
+`jarvisctl` and `jctl` are control-only aliases. They are especially useful for
+top-level help because `jarvis --help` intentionally shows launcher help, while
+`jarvisctl --help` shows the complete curated control tree.
+
+The dynamic layer fetches its command names from the target server. It keeps a
+local schema cache for up to 24 hours and can use an older cached schema when
+the server is offline. Run `jarvis refresh` to clear that cache before the next
+`jarvis api` call.
+
+Use the [generated Jarvis CLI command catalog](https://github.com/PersonalJarvis/PersonalJarvis/blob/main/docs/jarvis-cli-reference.md)
+for the maintained list of curated groups, arguments, and options. It
+intentionally does not copy the server-specific dynamic API operations.
+
+## Authentication and Target Selection
+
+The CLI resolves the server address and control key separately. Higher rows
+take priority over lower rows.
+
+| Priority | Source | Best use |
+|---|---|---|
+| 1 | Global `--url` or `--key` | A one-call override |
+| 2 | `JARVISCTL_BASE_URL` or `JARVISCTL_CONTROL_KEY` | Managed automation with a secret store |
+| 3 | Profile saved by `jarvis auth login` | Repeated access to one target |
+| 4 | Live local-instance discovery and the local control key | Normal same-computer use |
+| 5 | `http://127.0.0.1:47821` and no key if none can be resolved | Local fallback |
+
+For remote access, run `jarvis auth login --url <server-url>` and enter the key
+in the hidden prompt. The CLI verifies it before saving it. `--key -` reads a
+key from standard input for managed automation. Avoid an inline `--key` value:
+shell history and process inspection can expose it.
+
+The saved profile is a per-user CLI configuration file, not the provider-key
+vault. POSIX systems restrict its file permissions; Windows relies on the user
+profile's access controls. Use `jarvis auth logout` on a shared or retired
+computer.
+
+## Common Flags
+
+Global flags must appear before the command group.
+
+| Flag | Meaning |
+|---|---|
+| `--json` | Force machine-readable JSON output |
+| `--url` | Override the target server for this call |
+| `--key` | Override control authentication for this call; avoid inline values |
+| `--dry-run` | Print an exposed mutation's request without sending it |
+| `--yes`, `-y` | Authorize an operation marked dangerous |
+| `--json-body -` | Read a dynamic request body from standard input |
+| `--request-timeout` | Override the read timeout for a dynamic API operation |
+| `--persist` / `--no-persist` | Choose whether a supported setting change survives restart |
+
+Interactive terminals receive readable tables where possible. Piped output
+defaults to JSON even without `--json`, but scripts should pass `--json`
+explicitly so their intent stays clear.
+
+Read-only requests and reversible changes can run immediately. Dangerous
+operations fail unless you add `--yes`; the CLI does not open an interactive
+confirmation prompt. Review `--dry-run` output first when the command supports
+it. That preview can include the request body, so do not share it when the body
+contains private information.
+
+## Discover Commands and Help
+
+- Run `jarvisctl --help` for the complete curated control tree.
+- Run `jarvis <group> --help` and `jarvis <group> <command> --help` for exact
+ arguments and options.
+- Run `jarvis api --help` to fetch or reuse the dynamic API tree, then continue
+ with a tag and operation.
+- Run `jarvisctl --install-completion` to install completion for the current
+ shell. Completion uses only the cached API schema and does not make a network
+ request.
+- Browse App Commands with `jarvis commands list` and inspect one definition
+ with `jarvis commands show <command-id>`. These commands describe the shared
+ app catalog; they do not execute every entry themselves.
+
+## Platform and Host Limits
+
+The control client runs on Windows, macOS, and Linux, but each operation still
+depends on capabilities of the Jarvis host. A command can exist even when its
+feature is unavailable there. For example, desktop privacy prompts require the
+matching desktop operating system, audio commands require host audio devices,
+and some app-opening actions do not work on a headless server.
+
+The curated command tree never needs the server merely to display help. The
+dynamic `api` tree needs either a reachable server or an existing schema cache.
+An offline cache can explain why help lists an operation that an older or
+different target does not accept.
+
+## How It Fits Together
+
+1. You choose a curated command or a dynamic `api` operation.
+2. The CLI resolves the target address and attaches a control key when one is
+ available.
+3. The request enters the same [Control API](control-api-reference) used by
+ other supported control clients.
+4. Jarvis validates the input, checks authentication, and applies server-side
+ safety and permission rules. `--yes` satisfies only the CLI confirmation
+ gate; it does not bypass those checks.
+5. Jarvis performs the action on its host and returns a result. The CLI renders
+ it as a table or JSON.
+6. If the server, authentication, or host capability is unavailable, the CLI
+ exits with an error instead of inventing a result.
+
+[App Commands](app-command-reference) are the smaller stable catalog shared
+across voice, chat, desktop, CLI, and REST. The Control API is broader, and the
+dynamic CLI mirrors that broader surface.
+
+## Check That It Works
+
+With Personal Jarvis running, use one read-only command:
+
+```powershell
+jarvis --json system status
+```
+
+The command succeeds and returns JSON with `"reachable": true`. This confirms
+that unified CLI routing, local target discovery, authentication, and the
+server request path are working. It does not test every feature on the host.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| `jarvis --help` shows app-launch options | Top-level `jarvis` help belongs to the launcher | Use `jarvisctl --help`, or ask for help below a control group |
+| Status reports that Jarvis is unreachable | The server is stopped, the target is wrong, or authentication failed | Start Jarvis, check `jarvis auth status`, then verify the saved target |
+| The `api` group is unavailable | No schema is cached and the server cannot be reached | Start or reconnect to the target, run `jarvis refresh`, then retry `jarvis api --help` |
+| A new API operation is missing | The dynamic schema cache can remain fresh for 24 hours | Run `jarvis refresh`, then invoke the `api` group while the intended server is reachable |
+| A dangerous action is refused | The CLI requires explicit authorization and never prompts | Run the supported `--dry-run`, review it, then repeat with `--yes` only if the action is correct |
+
+## Next Steps
+
+- Read [CLI Connections](cli-connections) when Jarvis should use an external
+ terminal program rather than receive a control command.
+- Use the [Control API Reference](control-api-reference) for HTTP
+ authentication, discovery, responses, and integration behavior.
+- Open the [App Command Reference](app-command-reference) to understand the
+ stable actions shared across Jarvis surfaces.
+- Review the [Configuration Reference](configuration-reference) before
+ changing settings from the CLI or API.
diff --git a/docs/product/reference/configuration-reference.md b/docs/product/reference/configuration-reference.md
new file mode 100644
index 0000000000..1a60e8dac2
--- /dev/null
+++ b/docs/product/reference/configuration-reference.md
@@ -0,0 +1,264 @@
+---
+title: "Configuration Reference"
+slug: configuration-reference
+summary: "Look up supported settings, defaults, environment overrides, and safe configuration-write behavior."
+section: "Reference"
+section_order: 7
+order: 3
+diataxis: reference
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [configuration, settings, defaults, environment, restart, reference]
+related: [settings-and-appearance, providers-and-api-keys, credentials-and-secrets, platform-support]
+---
+
+Personal Jarvis combines built-in defaults, a persistent configuration file,
+optional profiles, environment overrides, and live runtime changes. For normal
+use, change settings in the app: it validates the value, writes the correct
+configuration location, and tells the running feature whether the change was
+applied immediately.
+
+Use the file and environment layers for managed, headless, or advanced setups.
+They are powerful because they can override the app, so treat their precedence
+as part of the configuration rather than as a recovery shortcut.
+
+## Choose the Supported Surface
+
+| Surface | Best for | Important behavior |
+|---|---|---|
+| **Settings** | Everyday language, voice, audio, startup, shortcut, and appearance choices | Shows valid choices and attempts to apply them live |
+| **API Keys & Providers** | Brain, Tool Model, speech, Realtime, and Jarvis-Agent connections | Keeps provider selection separate from the private credential |
+| **Jarvis CLI or Control API** | Headless hosts, automation, and remote administration | Uses the same validated server routes as the app; supported setting operations can choose whether to persist |
+| `jarvis.toml` | Advanced values that have no current app control | Persistent base configuration; direct editing bypasses the app's safe writer and live-apply logic |
+| Profile YAML | Reusable operator profiles | Overlays the base file for one selected profile |
+| `JARVIS__...` environment variables | Deployment-time scalar overrides | Wins over the file and profile when Jarvis starts |
+
+Do not invent a setting because a similar name appears in source code. A
+setting is supported when it exists in the current configuration schema and is
+used by an installed feature. Unknown keys may be ignored, rejected, or kept
+only for compatibility; their presence does not prove they affect behavior.
+
+## Configuration Precedence
+
+For ordinary, non-secret settings, Jarvis resolves values from lowest to
+highest priority:
+
+| Priority | Source | Scope |
+|---|---|---|
+| 1 | Built-in schema default | Used when no higher source supplies the value |
+| 2 | `jarvis.toml` | Persistent base for the installation |
+| 3 | Selected profile in `profiles/` | Replaces matching file values; lists are replaced rather than combined |
+| 4 | `JARVIS__SECTION__KEY` environment value | Overrides the matching setting at process start |
+| 5 | Live app, CLI, or API change | Changes the current process when the feature supports live apply |
+
+`JARVIS_PROFILE` selects a profile before the environment setting overlay is
+applied. `JARVIS_CONFIG` selects a different configuration file and is useful
+when the installation directory is read-only. These two variables control
+loading; they are not nested settings.
+
+Nested environment names use two underscores between path segments. For
+example, `JARVIS__UI__LANGUAGE=en` targets the interface-language setting.
+Boolean forms such as `true`, `false`, `yes`, `no`, `1`, and `0`, plus integer
+and decimal values, are converted automatically. Use environment overrides for
+scalars only; lists and structured objects have no stable environment encoding
+and belong in a supported API request or configuration file.
+
+> [!note] A file edit can appear to have no effect when a profile or environment
+> value has higher priority. Some provider choices also have compatibility
+> state maintained by the supported app writer. Change those choices in **API
+> Keys & Providers** instead of editing their file entries by hand.
+
+## Defaults and Current Values
+
+Defaults are defined by the installed version's typed configuration schema.
+Omitting a field restores that schema default only when no profile or
+environment source supplies it. An empty value can have a different meaning:
+for some provider and model fields it means **Automatic** or **Follow the main
+Brain**, while for other fields an empty value is invalid.
+
+Use the current app or server for exact values rather than copying a model name
+or option from an older document:
+
+| What you need | Current source of truth |
+|---|---|
+| Effective value and selectable options | The matching Settings control or its `GET /api/settings/...` operation |
+| Provider, model, voice, authentication, and billing choices | The current provider cards under **API Keys & Providers** |
+| Mounted server operations | `jarvis api --help`; run `jarvis refresh` first after an upgrade |
+| Curated CLI commands and flags | The [generated Jarvis CLI command catalog](https://github.com/PersonalJarvis/PersonalJarvis/blob/main/docs/jarvis-cli-reference.md) |
+| Stable actions shared across app surfaces | [App Command Reference](app-command-reference) |
+
+Provider cards deliberately discover models separately from the provider list,
+because available models can change without changing the connection itself. A
+configured provider name also does not guarantee that the installed model has
+the capability a feature needs.
+
+## Settings Families
+
+The schema is broad, but its public settings fall into a small number of
+families:
+
+| Family | Includes | Related surface |
+|---|---|---|
+| **Language and profile** | Interface, speech recognition, reply language, and active profile | **Settings > Languages** |
+| **Providers and models** | Main Brain, Tool Model, Pipeline speech, Realtime voice, and Jarvis-Agent worker choices | **API Keys & Providers** |
+| **Voice and audio** | Voice mode, wake phrase and activation, microphone and speaker, volume, silence window, and keybinds | **Settings > Voice** and **Audio** |
+| **Desktop behavior** | Jarvis Bar, overlay, sound effects, audio ducking, preferred opener, and login startup | **Settings > App settings** and **Bar & Overlay** |
+| **Personalization and memory** | Persona sidecars, standing instructions, memory retention, Wiki location, and curator choices | **Settings**, **Wiki**, and memory features |
+| **Safety and permissions** | Risk defaults, allow and block lists, and approval behavior | Safety controls; operating-system permissions remain separate |
+| **Tools and integrations** | Computer Use, pointer context, MCP server, Marketplace callback, channels, telephony, team proxy, and board connections | The feature's own setup screen |
+| **Operations** | Logging, telemetry retention, latency, performance, review, ports, and host-specific paths | Advanced file or operator-managed deployment |
+
+Not every member of a family has a desktop control. The absence of a control
+means the value is advanced, not that it is safe to guess. Provider plugins and
+optional desktop or voice components must also be installed; configuration
+cannot create a missing capability.
+
+## Apply and Restart Behavior
+
+The response from a settings API is more reliable than a general restart rule.
+Where exposed, read these fields:
+
+| Result field | Meaning |
+|---|---|
+| `persisted` | The boot value was written successfully |
+| `applied_live` | The running component accepted the change |
+| `restart_required` | The saved value could not be applied to the current component |
+| `session_restarted` | An active voice session was reconnected so the new policy could take effect |
+
+Typical timing is:
+
+| Timing | Common examples |
+|---|---|
+| **Immediately** | Interface language, volume, silence window, sound effects, audio devices, and Bar visibility when their runtime is available |
+| **Next message** | System prompt and standing instructions |
+| **Next voice session** | Voice engine or Realtime selection; a current session may reconnect automatically |
+| **Next mission** | Jarvis-Agent worker or Computer Use choices resolved when new work starts |
+| **After restart** | Startup-only components, environment overrides, or a desktop/voice feature that was not running for live apply |
+
+A live success is not the same as a persistent success. If `applied_live` is
+true but `persisted` is false, the current run can use the value while the next
+start returns to the previous effective configuration. Conversely, a headless
+host can persist a desktop choice while reporting that it could not apply it.
+
+## Safe Persistent Writes
+
+Supported app and API writers update only the requested value. They parse the
+existing TOML, preserve comments and a UTF-8 byte-order mark when present,
+write a unique temporary file beside the target, flush it, and replace the old
+file atomically. Short-lived file locks are retried. A missing writable config
+file can be created at the location selected by `JARVIS_CONFIG`.
+
+For a direct edit:
+
+1. Prefer to stop Jarvis so the app, another CLI process, and your editor do
+ not race to replace the same file.
+2. Keep the file as UTF-8 TOML and change the smallest possible value.
+3. Keep a backup outside the active path.
+4. Restart Jarvis and verify the effective value, not just the text in the
+ file.
+
+Manual edits do not receive route validation, atomic replacement, live apply,
+or managed compatibility updates. If the app provides a control for a value,
+use that control.
+
+## Credentials Are Separate
+
+API keys, tokens, passwords, and private connection material are not ordinary
+configuration values and must never be placed in `jarvis.toml`, a profile,
+documentation, chat, or voice input. Save them only through the protected field
+or sign-in flow owned by the feature.
+
+Credential lookup has its own portable chain: an operating-system credential
+store when usable, an operator-provided environment value or `.env` compatibility
+source, then a restricted local-file fallback for hosts without a working
+credential store. That fallback keeps headless setup usable, but it is not
+encrypted by Jarvis. See [Credentials and Secrets](credentials-and-secrets) for
+replacement, deletion, and recovery behavior.
+
+The nested `JARVIS__...` variables described above are for non-secret settings.
+Provider credentials use their documented credential names and protected
+storage flow; do not derive or guess one from a configuration field.
+
+## Cross-Platform and Headless Behavior
+
+The same configuration model loads on Windows, macOS, Linux, and a headless
+server. Application of a value still depends on installed extras and host
+capabilities:
+
+- A graphical overlay or login-startup preference can be saved on a headless
+ host but cannot create a desktop session.
+- Audio and wake controls need the matching audio devices, permissions, and
+ optional local speech components.
+- Operating-system permissions can block a configured feature. A preference
+ cannot override a microphone, screen-capture, or accessibility denial.
+- Platform-specific optional packages are selected during installation. A
+ valid setting remains a graceful no-op when its native component is absent.
+- On a read-only deployment, point `JARVIS_CONFIG` at a writable persistent
+ location. If credential fallback is needed, protect the location selected by
+ `JARVIS_DATA_DIR` as private application data.
+
+Use [Platform Support](platform-support) for the current capability matrix. Use
+the `available`, `supported`, and apply-status fields returned by the relevant
+operation for the truth about the current host.
+
+## How It Fits Together
+
+1. The schema supplies a safe default for each omitted setting.
+2. Jarvis loads `jarvis.toml`, overlays the selected profile, then applies
+ nested environment overrides.
+3. Installed provider and plugin registries determine which configured choices
+ are actually available.
+4. The app, CLI, or Control API validates a requested change and asks the safe
+ writer to persist it when requested.
+5. The running feature applies the value immediately, on its next unit of work,
+ or after a restart, and reports which outcome occurred.
+6. Credentials resolve through the separate secret-storage path only when a
+ selected capability needs them.
+
+Read [CLI Reference](cli-reference) for command discovery and persistence
+flags, or [Control API Reference](control-api-reference) for authentication,
+OpenAPI discovery, and response behavior. Both surfaces reach the same server
+that backs the desktop controls.
+
+## Check That It Works
+
+On a graphical desktop, open **Settings > Languages**, note the current
+interface language, and choose another supported language. The labels should
+change immediately. Close and reopen Settings, then confirm the same value is
+still selected. After active Jarvis-Agent missions finish, restart Jarvis and
+confirm that the language remains selected; then restore your original choice.
+
+This checks the live update, persistent write, and next-start load path. If the
+live change works but the restarted app returns to the old value, inspect the
+save result and the higher-priority profile or environment sources.
+
+For a headless instance, use the authenticated Control API or dynamic CLI to
+read the matching settings operation before and after a harmless persistent
+change. Confirm `persisted: true`; do not use a desktop-only setting as the
+headless test.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| A change works now but returns after restart | The live update succeeded but persistence failed, or a profile/environment value won at boot | Check `persisted`, then remove or update the higher-priority source |
+| The file contains the new value, but Jarvis shows another value | A profile or `JARVIS__...` override masks it | Read the precedence table and inspect the process's deployment configuration |
+| Jarvis rejects the configuration on start | TOML syntax or a typed value is invalid | Restore the backup, start Jarvis, and repeat the change through a supported control |
+| `restart_required` is true | The component was unavailable or reads that value only during initialization | Finish active work, restart safely, and verify the effective value |
+| A desktop or audio setting persists but does nothing | The host lacks the required session, device, permission, or optional component | Check the operation's `available` or `supported` result and read [Platform Support](platform-support) |
+| A removed credential still appears configured | It comes from an operator environment, `.env`, or another external login | Remove it from the original source, restart, and follow [Credentials and Secrets](credentials-and-secrets) |
+| A current API setting is missing from CLI help | The dynamic OpenAPI cache describes an older server | Run `jarvis refresh`, reconnect to the intended server, then open `jarvis api --help` again |
+
+## Next Steps
+
+- Use [Settings and Appearance](settings-and-appearance) for step-by-step help
+ with everyday desktop controls.
+- Read [Providers and API Keys](providers-and-api-keys) before changing a
+ provider, model, voice, or connection.
+- Review [Credentials and Secrets](credentials-and-secrets) before adding,
+ rotating, or removing private access.
+- Open [Platform Support](platform-support) to check which settings can apply
+ on Windows, macOS, Linux, and headless hosts.
diff --git a/docs/product/reference/control-api-reference.md b/docs/product/reference/control-api-reference.md
new file mode 100644
index 0000000000..bdfec6e022
--- /dev/null
+++ b/docs/product/reference/control-api-reference.md
@@ -0,0 +1,277 @@
+---
+title: "Control API Reference"
+slug: control-api-reference
+summary: Understand API authentication, discovery, error behavior, and how REST operations map to CLI and in-app actions.
+section: "Reference"
+section_order: 7
+order: 2
+diataxis: reference
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: operator
+tags: [control-api, rest, authentication, openapi, cli, automation]
+related: [cli-reference, app-command-reference, credentials-and-secrets, architecture]
+---
+
+The Control API lets a trusted client inspect and operate a running Personal
+Jarvis instance over HTTP. Use it when a terminal, local agent, headless
+management tool, or custom integration needs a validated app operation instead
+of screen automation.
+
+Jarvis serves one web application with a broad REST surface under `/api/*`.
+The focused `/api/control/*` routes are the part designed for configuration,
+provider, language, credential-status, and control-key management. The same web
+server also carries feature routes used by the desktop app and the Jarvis CLI.
+
+## Before You Start
+
+- Start the Personal Jarvis instance you intend to control.
+- Use a trusted app session or that instance's Control API key. A provider key
+ cannot authenticate the Control API.
+- Keep the default loopback connection for same-computer use. For another
+ computer, use an encrypted private connection and an explicitly configured
+ host. Do not publish the Jarvis listener directly to the public internet.
+- Decide whether you need the full OpenAPI-described REST surface, the smaller
+ App Command catalog, or a curated CLI command before building a custom client.
+
+> [!warning] Treat the Control API key as an administrator credential. A client
+> that possesses it can reach the protected operations exposed by that Jarvis
+> instance. Never place it in chat, voice input, source code, URLs, logs,
+> screenshots, documentation, or shell history.
+
+## Understand the API Surface
+
+The following surfaces share one server but have different purposes:
+
+- **`/api/*`** is the broad product API. It includes settings, tasks, missions,
+ providers, tools, docs, and other mounted feature routes.
+- **`/api/control/*`** is a focused control facade. It adds key-only
+ authentication to most of its routes and exposes a machine-readable
+ configuration allowlist.
+- **`/api/commands`** describes a smaller, curated set of App Commands. Each
+ command points to one existing REST operation shared by app surfaces.
+- **WebSocket routes** carry live chat, progress, audio, and event streams.
+ OpenAPI does not describe them, and the dynamic CLI does not turn them into
+ commands.
+
+The product documentation browser uses `/api/docs`. The interactive API schema
+viewer is deliberately at `/api/_swagger`, while the OpenAPI document itself is
+at `/api/openapi.json`.
+
+## Discover Operations Safely
+
+Start with read-only discovery rather than copying paths from an old script.
+
+| Resource | Authentication | What it tells you |
+|---|---|---|
+| `GET /api/health` | No Control credential | Whether the server answers, plus its version; Host and supplied-Origin checks still apply |
+| `GET /api/control/auth/probe` | Control key | Whether that key is accepted; success returns a small `ok` result |
+| `GET /api/openapi.json` | Control key or app session | Mounted HTTP paths, methods, tags, parameters, bodies, and response schemas |
+| `GET /api/_swagger` | Authenticated browser session | A browsable view of the current OpenAPI document |
+| `GET /api/control/allowlist` | Control key | Configuration paths that the focused facade may change, with risk and restart metadata |
+| `GET /api/commands` | Control key or app session | The curated App Command catalog and each command's backing endpoint |
+
+The OpenAPI document currently does not declare its Bearer security scheme, even
+though the running server enforces authentication. The Swagger page is useful
+for discovery from an authenticated browser session, but it does not provide a
+ready-made **Authorize** control for key-only `/api/control/*` calls. The Jarvis
+CLI attaches the key independently and is the safer interactive client.
+
+## Authenticate
+
+Jarvis uses two credential lifecycles. A persistent Control API key is for
+programmatic clients. A short-lived app session is for the desktop or browser
+interface.
+
+| Caller | Credential flow | Important boundary |
+|---|---|---|
+| Desktop app | A one-use bootstrap token becomes an opaque, HTTP-only session cookie | The bootstrap token cannot be replayed as a general API credential |
+| Trusted browser | The locked screen accepts the Control key once and exchanges it for a session cookie | Exchange requires HTTPS or a direct loopback connection |
+| Jarvis CLI | Local discovery or a saved profile supplies the target and Control key | Use the hidden login prompt; avoid an inline key argument |
+| Custom non-browser client | A secret manager supplies the Control key as the HTTP Bearer credential | Never persist the value in code, request traces, or diagnostic output |
+
+The outer security boundary accepts a valid Control key or app session for most
+protected `/api/*` requests. Most `/api/control/*` routes then apply a narrower
+route guard and require the Control key specifically. Key reveal and rotation
+are the exception: an authenticated app session may use them so the in-app key
+card can work.
+
+Open **API Keys & Providers > Advanced**, then choose the API card named for
+your assistant. There you can view the masked key, copy it into a trusted secret
+manager, or regenerate it. Regeneration immediately invalidates the previous
+Control key, so every CLI profile and integration using the old value must be
+updated.
+
+## Follow the Request Lifecycle
+
+| Stage | What Jarvis checks or does | Typical failure |
+|---|---|---|
+| 1. Resolve target | The client chooses the running host and port; the local CLI can discover a non-default desktop port | Connection failure or stale target |
+| 2. Guard the surface | Jarvis validates the Host, any supplied Origin, and the Control key or app session | `400`, `401`, or `403` before route code runs |
+| 3. Apply route authentication | Key-only control routes reject an app session where a Control key is required | `401 Unauthorized` |
+| 4. Validate input | FastAPI checks path, query, and request-body fields against the operation schema | `422 Unprocessable Entity` |
+| 5. Run the operation | The route applies its own allowlist, safety, state, credential, and host-capability rules | Route-specific `400`, `403`, `404`, `409`, or `503` |
+| 6. Return the result | The route reports its actual state change, output, or error | Route-specific JSON, an empty `204`, or a file response |
+
+> [!warning] `--dry-run` and `--yes` are Jarvis CLI safeguards, not HTTP
+> protocol features. A direct REST mutation is sent immediately. It receives
+> only the checks implemented by the outer security layer and that particular
+> route; it does not automatically open the app's conversational approval flow.
+
+## Change Settings and Handle Confirmation
+
+Use the focused control facade for a configuration change:
+
+1. **Read the allowlist.** Find the exact dotted path, its description, risk
+ tier, accepted type, and restart requirement.
+2. **Read the current value.** `GET /api/control/config` refuses protected
+ sections and reports whether the requested path is in the allowlist.
+3. **Submit one change.** `PUT /api/control/config` runs allowlist and value
+ validation before anything is written.
+4. **Inspect the response.** A safe change returns `applied: true`. A change
+ requiring review returns `needs_confirmation: true`, `applied: false`, and a
+ single-use `pending_id`, together with the old and proposed values.
+5. **Confirm or reject deliberately.** Use the matching confirm or reject
+ operation only after comparing the values and restart flag.
+6. **Read the value again.** Verify the stored result instead of assuming that a
+ successful request changed the running capability immediately.
+
+Pending configuration changes live in memory for up to five minutes. They are
+consumed once, disappear on server restart, and return `410 Gone` when expired,
+unknown, or already used.
+
+Convenience routes for language, provider switching, secrets, and Control-key
+rotation have their own behavior. Do not assume that every mutation creates a
+pending confirmation. For human credential entry, prefer the protected
+**API Keys & Providers** view described in [Credentials and Secrets](credentials-and-secrets);
+the generic configuration API deliberately refuses protected secret paths.
+
+## Map REST to the App and CLI
+
+| Surface | How it maps to REST | Safety and discovery behavior |
+|---|---|---|
+| Desktop app | A labeled control calls its mounted feature route with an app session | Shows feature-specific validation and visible state |
+| Curated CLI | A maintained `jarvis <group> <command>` wraps a common route | Uses readable arguments and an explicit danger policy |
+| Dynamic CLI | `jarvis api <tag> <operation>` is generated from live or cached OpenAPI | Covers mounted GET, POST, PUT, PATCH, and DELETE operations |
+| App Command | One stable catalog entry maps to exactly one route | Shared by supported voice, chat, desktop, CLI, and REST paths |
+| Raw REST client | Calls the mounted route directly | Must implement credential handling, review, retries, and response parsing |
+
+The dynamic CLI groups operations by their first OpenAPI tag and derives names
+from operation IDs. It caches the schema for up to 24 hours and can fall back to
+an older cache while the server is offline. Run `jarvis refresh` before the next
+`jarvis api` call when a newly added route is missing.
+
+The App Command catalog is intentionally smaller than the full API. It contains
+curated actions with stable IDs, input schemas, danger metadata, and a named app
+section. Read [App Commands](app-command-reference) when an action must also be
+available through natural language. Use the [CLI Reference](cli-reference) for
+target resolution, output modes, `--dry-run`, `--yes`, and schema-cache rules.
+
+## Run on Desktop and Headless Hosts
+
+The normal desktop server binds to loopback, with `47821` as the default port.
+The port is configurable, so integrations should use CLI discovery or an
+operator-supplied base URL rather than assume that value.
+
+Headless mode serves the same REST application. It does not create missing
+desktop capabilities: audio-device, overlay, accessibility, file-opening, and
+other graphical operations can return an unavailable response even though they
+appear in OpenAPI. Every action happens on the Jarvis host, not necessarily on
+the computer running the client.
+
+During headless warm-up, the listener can accept a connection before the full
+application is ready. Requests wait for readiness; if startup does not complete
+within the bounded warm-up window, the holding server returns `503` with a short
+retry hint.
+
+A non-loopback bind is refused unless a Control key already exists. The global
+guard also checks trusted Host and Origin values, and a remote browser cannot
+exchange a key for a session over plain HTTP. These checks are defense in depth,
+not a reason to expose the listener publicly. Keep remote access behind an
+encrypted private tunnel or private network and restrict who can reach it.
+
+## Read Responses and Errors
+
+There is no single response envelope for the full API. Many successful routes
+return JSON, session creation can return an empty `204`, and download or preview
+routes can return files or HTML. Most framework and route errors use a JSON
+`detail` field, while a few older feature routes return `ok: false` with an
+`error` field. Check the HTTP status before interpreting the body.
+
+| Status | Common meaning | Safe first response |
+|---|---|---|
+| `200`, `201`, `204` | The operation completed or was accepted; `204` has no body | Parse only the documented response shape, then verify visible state |
+| `400` | Malformed request, untrusted Host, unknown config path, or missing explicit confirmation | Correct the request; do not retry unchanged |
+| `401` | Missing, malformed, rotated, or rejected credential | Re-authenticate; never repeat the same failed key in a loop |
+| `403` | Untrusted Origin, protected path, or denied operation | Fix the trust or permission boundary instead of forcing the call |
+| `404` | Unknown route, resource, provider, secret slot, or command ID | Refresh discovery and verify the identifier |
+| `409` | The request conflicts with current runtime state | Read current state, resolve the conflict, then decide whether to retry |
+| `410` | A pending config change expired, was consumed, or is unknown | Create a new pending change and review it again |
+| `422` | Query or body fields failed schema validation | Read the validation details and correct types, required fields, or allowed values |
+| `500` | Storage or an internal operation failed | Preserve non-secret diagnostics and check local app health before retrying |
+| `503` | Jarvis is warming up or the requested subsystem or host capability is unavailable | Wait briefly for startup, then inspect the feature's readiness |
+
+Retry read-only requests with bounded backoff when transport or warm-up fails.
+Do not automatically retry a mutation after a timeout: the server may have
+completed it after the client stopped waiting. Read the resource or audit state
+first, then decide whether another write is safe.
+
+## How It Fits Together
+
+1. A desktop control, CLI command, App Command, or custom client starts an
+ operation and identifies the running Jarvis target.
+2. [Credentials and Secrets](credentials-and-secrets) supplies either the
+ Control key to a trusted program or an app session to the browser. Provider
+ credentials are separate and cannot authenticate this step.
+3. The global web guard checks network identity, Origin when present, and the
+ credential before the selected route receives the request.
+4. The route validates the input and calls the same underlying feature used by
+ the app. The [CLI](cli-reference) adds terminal-oriented rendering and
+ danger checks; [App Commands](app-command-reference) add a smaller stable
+ cross-surface catalog.
+5. Permissions, safety policy, connected-service access, and host capabilities
+ apply where that route implements them. A valid Control key never creates a
+ missing provider, desktop permission, audio device, or approval.
+6. Jarvis returns the real route result. If a preferred provider or local
+ capability is unavailable, the feature either follows its configured
+ fallback path or reports that limitation; the API does not invent success.
+
+The [Architecture Reference](architecture) explains how the web layer reaches
+the lower feature layers without making HTTP transport itself the source of
+business logic.
+
+## Check That It Works
+
+With Jarvis running, use the CLI's read-only authentication check:
+
+```powershell
+jarvis --json auth status
+```
+
+Success returns the selected base URL with `"reachable": true`. This verifies
+target resolution, server reachability, and Control-key acceptance. It does not
+prove that every provider, permission, or desktop-only capability is ready.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| Authentication status reports `reachable: false` | The server is stopped, the target is wrong, or the key was rejected | Confirm the intended instance is running, then use the hidden `jarvis auth login` flow for that target |
+| `Invalid or missing Jarvis credential` | No accepted Control key or app session reached the outer guard | Re-authenticate without printing or logging the key |
+| `Untrusted Host header` or `Untrusted Origin header` | The request names an unconfigured host or comes from a foreign browser origin | Use the configured private address and trusted browser origin; do not weaken the guard |
+| The `jarvis api` group or a new operation is missing | No schema is cached, the server is unreachable, or the 24-hour cache is older than the target | Run `jarvis refresh`, then invoke `jarvis api` while the intended server is reachable |
+| Confirmation returns `410` | The pending change expired, was already used, or belonged to a previous process | Submit the original change again and review the new values and ID |
+| A listed operation returns `503` on a headless host | The route exists, but its subsystem is still warming or needs a desktop capability | Check feature readiness and use a supported headless alternative where available |
+
+## Next Steps
+
+- Read the [CLI Reference](cli-reference) to use curated and OpenAPI-generated
+ operations without building an HTTP client.
+- Open the [App Command Reference](app-command-reference) when one action must
+ remain consistent across voice, chat, desktop, CLI, and REST.
+- Review [Credentials and Secrets](credentials-and-secrets) before storing,
+ rotating, or removing the Control key or a provider credential.
+- Use the [Architecture Reference](architecture) to understand the boundaries
+ behind the web server and its feature routes.
diff --git a/docs/product/reference/platform-support.md b/docs/product/reference/platform-support.md
new file mode 100644
index 0000000000..b6998468c4
--- /dev/null
+++ b/docs/product/reference/platform-support.md
@@ -0,0 +1,259 @@
+---
+title: "Platform Support and Requirements"
+slug: platform-support
+summary: "Check operating-system support, optional hardware and audio capabilities, headless behavior, and graceful feature fallbacks."
+section: "Reference"
+section_order: 7
+order: 6
+diataxis: reference
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [platforms, windows, macos, linux, headless, requirements, compatibility]
+related: [install-personal-jarvis, permissions, configuration-reference, troubleshooting]
+---
+
+Personal Jarvis supports Windows, macOS, Linux desktops, and headless Linux.
+The shared app, browser interface, chats, settings, tasks, and Jarvis-Agent
+views are portable. Features that touch the physical computer are more
+specific: a microphone, global shortcut, floating Bar, screen capture, or
+mouse action can work only when the host exposes the matching capability.
+
+For that reason, **supported** does not mean that every feature behaves
+identically on every host. Jarvis checks the current operating system,
+display session, installed components, and permissions, then enables the best
+available implementation. An unavailable optional capability should leave the
+rest of the app usable and explain what is missing.
+
+## Baseline Requirements
+
+| Requirement | Current support | Why it matters |
+|---|---|---|
+| Operating system | Windows, macOS, or Linux | The installer and runtime select native behavior for these three families |
+| Python | 3.11 through 3.14 | The package requires Python 3.11 or newer and does not yet accept Python 3.15 |
+| Git | Any recent release | The installer fetches Jarvis, and Jarvis-Agent missions use isolated Git worktrees |
+| Internet connection | Required for installation; normally required for online providers and downloads | An already prepared local feature can keep working offline, but online models and services cannot |
+| Writable user storage | Required | Jarvis needs space for its environment, settings, models, logs, and user data |
+
+You also need at least one configured brain provider or supported subscription
+login for AI replies. This is an app connection, not an installation
+prerequisite. Add it inside **API Keys & Providers** after installation.
+
+The installer can offer to add missing Python or Git with the host's normal
+package manager. On macOS and Linux, it prefers a Python version with broad
+native speech-package coverage. The project itself accepts Python 3.14, but
+some optional local voice components do not yet publish packages for every
+Python, operating-system, and processor combination.
+
+## Install Profiles
+
+| Profile | Included surface | Intended host |
+|---|---|---|
+| **Full** | Desktop app, platform-specific desktop components, supported local voice components, telephony support, and chat-channel support | A Windows, macOS, or Linux computer with a graphical desktop |
+| **Headless** | The smaller base application, local server, browser interface, API, and WebSocket service | A Linux server, container, or computer without a display |
+
+The supported one-line installer chooses the full profile on a normal desktop.
+On Linux, it chooses the headless profile when neither an X11 nor Wayland
+display is present. Passing `--headless` selects that profile explicitly.
+
+The full profile uses platform markers. It installs the components that can
+run on the current operating system and skips incompatible native packages.
+This keeps one installer usable across platforms, but it also means that a
+successful full install does not promise every optional speech engine on every
+processor. The installer stops if the required profile or desktop registration
+fails instead of presenting a partial desktop install as ready.
+
+The headless profile deliberately omits desktop extras. It does not create an
+application-menu entry, local overlay, global desktop shortcut, or physical
+mouse and keyboard controller. It starts the browser-based server unless
+launching was disabled.
+
+## Feature Support Matrix
+
+| Feature | Windows desktop | macOS desktop | Linux desktop | Headless Linux |
+|---|---|---|---|---|
+| Web app, chat, settings, Docs, tasks, and outputs | Supported | Supported | Supported | Supported in a browser |
+| Registered desktop app | Supported | Supported app bundle | Supported application-menu entry | Not available |
+| Local microphone and speakers | Supported when devices are available | Permission-dependent | Requires working PortAudio and device access | Not part of the headless surface |
+| Browser voice | Supported by a compatible browser | Supported by a compatible browser | Supported by a compatible browser | Supported; remote microphone use requires HTTPS |
+| Wake word and local speech engines | Capability-dependent | Capability-dependent | Capability-dependent | No local microphone; use a browser or another configured channel |
+| Global voice shortcuts | Supported | Permission-dependent | X11 only when a compatible backend is present; unavailable on Wayland | Not available |
+| Jarvis Bar and mascot | Bar and mascot supported | Bar supported; mascot unavailable | Best effort on a compatible graphical session | No on-screen surface |
+| Computer Use | Supported on a real desktop | Permission-dependent | X11 only and capability-dependent | Not available |
+
+**Capability-dependent** means Jarvis has an implementation and checks the
+host before using it. A missing dependency, device, display, or permission can
+still make that feature unavailable on one otherwise supported computer.
+
+## Voice, Audio, and Wake Differences
+
+Local desktop voice needs a usable microphone, speaker, and audio backend.
+Windows and macOS normally provide the operating-system layer. Linux also
+needs the PortAudio system library, commonly provided by a package named
+`libportaudio2`, plus permission to access the selected device. Use
+**Settings > Audio devices > Rescan** after adding or reconnecting hardware.
+
+A graphics processor is optional. The normal profiles do not require PyTorch
+or a GPU, and supported local voice paths can run on the CPU. A compatible GPU
+can accelerate eligible offline speech work; it is not a requirement for
+chat, browser voice, or cloud speech.
+
+Some alternate offline speech packages have narrower native support. In
+particular, Windows on ARM and some Python 3.14 combinations cannot install
+every WebRTC or local Whisper component. Jarvis keeps simpler local detection,
+browser voice, or a configured online speech provider available where the
+matching path exists. It should report that an optional engine is unavailable
+rather than fail the whole application.
+
+Browser voice is separate from the host's local audio pipeline. A browser on
+the same computer can use a localhost address. When the browser connects to a
+remote headless server, microphone capture requires a secure HTTPS context;
+plain remote HTTP can still display the text interface, but browsers normally
+block microphone access there.
+
+## Desktop and Computer Use Differences
+
+Personal Jarvis takes one capability snapshot when it starts. The snapshot
+checks for a display, a global-hotkey backend, a terminal backend, a desktop
+accessibility tree, an overlay, a readable cursor, and an elevation mechanism.
+Individual probes fail closed to **unavailable** instead of stopping startup.
+
+Windows uses native UI Automation for named interface elements and native
+input for mouse and keyboard actions. macOS uses the Accessibility and screen
+capture interfaces and therefore needs the matching permissions for Computer
+Use. Linux can use AT-SPI for named interface elements when the distribution's
+accessibility packages and desktop bus are available.
+
+If a native interface tree is missing, Computer Use can fall back to
+screenshots and pixel positions. That fallback is less descriptive: Jarvis may
+see a button but not know its accessible name. It does not overcome the two
+hard boundaries below:
+
+- **Wayland:** global shortcuts, global cursor access, window control, and
+ synthetic mouse or keyboard input are restricted. Computer Use refuses the
+ action honestly; running one app through XWayland does not provide a complete
+ control backend.
+- **Headless:** without a real display there is nothing to capture or control.
+ Text chat, server APIs, browser views, missions, and file work can still run.
+
+On macOS, grant permissions to the installed **Personal Jarvis** app, not to a
+terminal or Python interpreter. The installed app bundle provides the stable
+identity to which macOS attaches the grant. The Jarvis Bar runs through a
+desktop companion; the mascot surface is intentionally unavailable there.
+
+Linux overlays are best effort because display servers and compositors differ.
+On X11 with a display and Tk support, Jarvis can attempt the on-screen surface.
+Otherwise it uses a tray-level or no-visible-surface fallback, while chat and
+voice continue independently.
+
+## Optional Components
+
+| Component | Required? | What it adds |
+|---|---|---|
+| Provider credential or subscription login | Required for AI replies, not for installation | Chat and the provider-backed features assigned to that connection |
+| Node.js 18 or newer | No | Optional Jarvis-Agent worker command-line tools and some Node-based integrations |
+| GPU | No | Faster eligible offline speech processing |
+| Linux PortAudio library | Only for local Linux audio | Physical microphone and speaker access through the desktop pipeline |
+| Linux AT-SPI packages and desktop bus | Only for native Linux UI labels | Named interface elements for more reliable Computer Use on X11 |
+| macOS privacy grants | Only for the feature named by each grant | Microphone, global shortcuts, screen capture, accessibility, and input control |
+| Graphical display | Only for desktop surfaces | Desktop window, overlays, screen capture, and physical Computer Use |
+
+## Graceful Fallbacks
+
+| Preferred capability is missing | Expected result |
+|---|---|
+| Desktop display | Run the headless server and use the browser interface |
+| Local audio device or backend | Keep text chat; use browser voice or another configured voice channel where available |
+| One native local speech engine | Use another compatible local, browser, or configured online speech path |
+| Global shortcut | Start voice from the app, or use the wake word when local microphone capture works |
+| Native accessibility tree | Use screenshot and pixel-based Computer Use when screen capture and input are otherwise supported |
+| Overlay or tray surface | Continue without an on-screen voice surface |
+| Preferred provider | Cross to another configured provider family when the feature supports it, or show an honest unavailable state |
+
+Fallback does not mean silent success. A missing capability should produce an
+unavailable status, log message, or refusal that names the boundary. It should
+not claim that a screen action, permission, or connection worked when it did
+not.
+
+## Verification Status
+
+Implementation, automated tests, and a live desktop observation prove
+different things. The repository's recorded sign-off includes a Windows
+desktop verification dated 2026-05-30 and a headless Linux base-install and
+import verification in a `python:3.11-slim` container dated 2026-06-20.
+
+The same record does not yet contain a dated live macOS desktop or Linux GUI
+sign-off for global shortcut capture, native accessibility trees, overlays, or
+interactive elevation. Those paths are implemented and capability-gated, but
+should be treated as host-dependent until tested on the specific desktop in
+front of you. This limitation does not apply to the already verified headless
+Linux base path.
+
+## How It Fits Together
+
+1. **The installer chooses a profile.** A desktop gets the full profile;
+ headless Linux gets the server base unless you override the choice.
+2. **Platform markers select installable native components.** Incompatible
+ optional packages are skipped without changing the shared app.
+3. **Startup probes the current host.** Jarvis records what this session can
+ actually provide, including the display, audio-adjacent desktop features,
+ input backends, and accessibility interfaces.
+4. **Permissions and configuration narrow the result.** An installed feature
+ still waits for the required operating-system grant, device selection, and
+ provider connection.
+5. **Each feature selects an implementation or fallback.** Chat can remain
+ healthy while an overlay, shortcut, local speech engine, or screen action is
+ unavailable.
+
+This is why platform support connects directly to installation, permissions,
+and configuration. The operating system defines what is possible, permissions
+define what is allowed, and your settings choose which available path Jarvis
+uses.
+
+## Check That It Works
+
+With Personal Jarvis running, check the shared service first:
+
+```text
+jarvis --json system status
+```
+
+A successful response confirms that the installed command can reach the local
+Jarvis service. It does not prove every optional desktop capability.
+
+On a desktop, open **Settings > Audio devices** and select **Rescan**. Seeing
+the intended input and output confirms the local audio path; an explicit
+unavailable state is the correct result on a headless host. Then test only the
+feature you plan to use: the wake-word test for wake, the permissions card on
+macOS, or a small reversible Computer Use action on a real X11, macOS, or
+Windows desktop.
+
+For headless Linux, open the local address printed by the installer and confirm
+that the browser interface loads. Use text first. If the browser is on another
+computer, configure secure remote access before testing its microphone.
+
+## Troubleshooting
+
+| What you see | Likely boundary | What to do |
+|---|---|---|
+| Installation rejects Python | Python is older than 3.11 or is 3.15 or newer | Use Python 3.11 through 3.14, or let the supported installer choose a compatible version |
+| Linux starts a server instead of a desktop window | No X11 or Wayland display was detected | Use the printed browser address, or start the installer from the intended graphical session |
+| Linux microphone or speakers are unavailable | PortAudio, device access, or the selected device is missing | Install the distribution's PortAudio library, reconnect the device, and use **Rescan** |
+| A macOS shortcut or screen action does nothing | The installed app lacks the matching privacy grant or needs a restart | Review **Settings > Privacy permissions**, grant only the needed access, and restart when asked |
+| Computer Use refuses on Linux | The session is Wayland or has no display | Use an X11 desktop for Computer Use; keep using text, browser, and server features on the current host |
+| Named Linux interface elements are missing | AT-SPI or its desktop bus is unavailable | Install the distribution's accessibility packages and use an X11 desktop session; screenshot fallback may still work |
+| One local voice engine is unavailable after a successful install | No compatible native package exists for this Python, processor, or operating system | Use an available local, browser, or configured online speech path; do not replace unrelated provider credentials |
+| The Bar, mascot, or tray is absent | The selected surface is unsupported, the session has no compatible display, or the compositor rejected it | Keep using the app; choose a supported appearance and restart only if the setting asks |
+
+## Next Steps
+
+- Follow [Install Personal Jarvis](install-personal-jarvis) for the supported
+ full and headless installation paths.
+- Review [App Permissions](permissions) before enabling microphone, shortcut,
+ screen, accessibility, or input access.
+- Use the [Configuration Reference](configuration-reference) to choose a
+ feature path on managed or headless installations.
+- Continue with [Troubleshooting](troubleshooting) when a capability that
+ should be available on your host still fails its focused check.
diff --git a/docs/product/start-here/desktop-app-tour.md b/docs/product/start-here/desktop-app-tour.md
new file mode 100644
index 0000000000..05420e9e63
--- /dev/null
+++ b/docs/product/start-here/desktop-app-tour.md
@@ -0,0 +1,125 @@
+---
+title: "Tour the Desktop App"
+slug: desktop-app-tour
+summary: "Learn where conversations, agents, tools, history, settings, and help live in the desktop app."
+section: "Start here"
+section_order: 1
+order: 4
+diataxis: explanation
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [desktop-app, navigation, chats, jarvis-agents, tools, settings, help]
+related: [start-your-first-chat, chats, find-help-in-the-app]
+---
+
+The desktop app keeps conversations, longer jobs, connected tools, saved
+results, and settings in one place. Use the sidebar as your map: choose what
+you want to do, and the main area changes to match that goal.
+
+You do not need to learn every area before you begin. Start in **Chats**, then
+open another area when you want to follow longer work, find an earlier result,
+or change how Jarvis behaves.
+
+## Know What Jarvis Is Doing
+
+The area beside your assistant's name shows the current voice state, such as
+**Ready**, **Listening**, **Thinking**, **Speaking**, **Voice starting…**, or
+**Offline**. Below it, you may see the words Jarvis currently hears. These
+signals stay visible while you move between areas.
+
+The **Brain** card at the bottom of the sidebar shows the provider currently
+used for answers. A provider is the artificial intelligence service that
+handles a request. Select the card to open **API Keys & Providers** and review
+the active choice.
+
+The top bar contains **Restart** on supported desktop installs. **Update
+available** appears there only when a managed installation has a newer
+release. Jarvis asks again before restarting and warns when active
+Jarvis-Agents would be interrupted.
+
+## Choose an Area by Goal
+
+**MCP** means Model Context Protocol, a way for an external service to offer
+tools to Jarvis. A **CLI**, or command-line interface, is a program Jarvis can
+run through text commands.
+
+| What you want to do | Open | What you find |
+|---|---|---|
+| Ask, dictate, or continue a conversation | **Chats** | The current conversation, **New chat**, and **History** |
+| Follow a longer delegated job | **Jarvis-Agents** | Active and completed Jarvis-Agent goals and their status |
+| Add abilities or connections | **Skills, Plugins & MCPs** or **CLIs & CLI Test Hub** | Built-in skills, optional connections, and command-line tools |
+| Plan work that runs now or later | **Tasks** | Scheduled, running, completed, and interrupted tasks |
+| Find earlier activity | **Chats**, **Transcription**, **Run Inspector**, or **Board** | Conversation history, spoken turns, run details, or activity summaries |
+| Give Jarvis useful context | **Wiki**, **Contacts**, **Profile**, or the `.md` page named after your assistant | Notes, people, preferences, and assistant instructions |
+| Connect services or change behavior | **API Keys**, **Settings**, or **Dictionary** | Providers, voice and app preferences, safety choices, and speech-recognition corrections |
+| Retrieve created files | **Outputs** | Reports and other files written by Jarvis or Jarvis-Agents |
+| Learn more or contact the project | **Docs**, **Socials**, or **Feedback** | Guides, community links, and a way to report a problem or suggest an idea |
+
+### Find the Right Kind of History
+
+Jarvis separates history by purpose so one long list does not mix unrelated
+information:
+
+- Open **Chats > History** to continue an earlier conversation.
+- Open **Transcription** to read recent voice sessions turn by turn.
+- Open **Run Inspector** to review one attempt to complete a request, including
+ its timeline, tools, timing, decisions, and errors.
+- Open **Outputs** when the result is a file rather than a chat reply.
+- Open **Board** for an overview of your activity over time.
+
+## How It Fits Together
+
+1. **You start in Chats.** Type a message, use **Speak**, or continue a saved
+ conversation from **History**.
+2. **The active Brain provider handles the request.** A short request can
+ return directly to the conversation.
+3. **Longer work can move to a Jarvis-Agent.** Follow its goal and status in
+ **Jarvis-Agents** while you continue using the rest of the app.
+4. **Available tools support the work.** Skills, plugins, MCP connections, and
+ CLIs can add actions or information. Jarvis asks for confirmation when an
+ action reaches a safety boundary.
+5. **The result returns to the useful place.** A reply stays in **Chats**, a
+ spoken exchange appears in **Transcription**, and a created file appears in
+ **Outputs**. **Run Inspector** provides more detail when you need to
+ understand a particular run.
+6. **Settings and connections shape the same flow.** **API Keys** chooses the
+ services that are available; **Settings** controls everyday behavior. If a
+ preferred service is unavailable, Jarvis can use another compatible choice
+ you configured. Otherwise, the affected area shows what needs attention.
+
+Open **Docs** whenever you need a guide for one part of this flow. It includes
+search, related-page links, and a contents list for the page you are reading.
+
+## Check That It Works
+
+1. Select **Docs** in the sidebar. Confirm that the documentation overview or
+ document list appears in the main area.
+2. Select **Chats**. Confirm that the main area changes to the chat view and
+ shows **New chat** and **History**.
+3. Check that the assistant name and voice state remain visible in the
+ sidebar.
+
+This confirms that the app navigation and shared status area are working. It
+does not require voice, an online provider, or a connected tool.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| **Voice starting…** beside the assistant name | Voice is still warming up | Wait for **Ready**. You can use text chat while voice starts. |
+| **Offline** beside the assistant name | The app has not connected to its local service | Wait briefly. If every area remains unavailable, use **Restart** and confirm once. |
+| A red dot beside **API Keys** | A configured provider is not working | Open **API Keys**, review the affected category, and test or choose another available provider. |
+| An amber dot beside **Skills, Plugins & MCPs** | A plugin connection needs attention | Open that area and use the reconnect notice in **Plugins** to identify and restore the connection. |
+| A documentation page is hard to find | Its title or section may be different from the feature label | Open **Docs** and press **Ctrl+K** on Windows or Linux, or **Command+K** on macOS, then search for the feature or visible error. |
+
+## Next Steps
+
+- Follow [Start Your First Chat](start-your-first-chat) to send a simple
+ request and see where the conversation is saved.
+- Read [Chats](chats) to organize conversations, add files, and continue
+ earlier work.
+- Use [Find Help in the App](find-help-in-the-app) to search the documentation
+ and move between guides, troubleshooting, and reference pages.
diff --git a/docs/product/start-here/first-run-setup.md b/docs/product/start-here/first-run-setup.md
new file mode 100644
index 0000000000..5dc48bac7d
--- /dev/null
+++ b/docs/product/start-here/first-run-setup.md
@@ -0,0 +1,191 @@
+---
+title: "Complete First-Run Setup"
+slug: first-run-setup
+summary: "Walk through language, permissions, microphone, wake word, and provider setup without exposing credentials."
+section: "Start here"
+section_order: 1
+order: 3
+diataxis: tutorial
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [setup, onboarding, language, permissions, microphone, wake-word, providers]
+related: [providers-and-api-keys, audio-and-wake-word, permissions, start-your-first-chat]
+---
+
+First-run setup prepares Jarvis for the way you want to use it. You choose
+the app and reply languages, review system permissions, choose how to start a
+voice request, check your microphone, and learn where to connect a provider.
+
+You can finish without enabling voice or connecting an online service. Text
+and local features that do not need the skipped capability remain available,
+and you can complete the other choices later in Settings.
+
+## Before You Start
+
+- Install and open the desktop app.
+- Have a microphone available only if you want to use voice.
+- If you plan to use an online provider, get its credential from the
+ provider's official account page. A provider is the service that answers a
+ request or handles part of a voice conversation.
+
+> [!warning] Enter a provider credential only in **API Keys & Providers**.
+> Never paste it into chat, speak it to Jarvis, include it in a screenshot, or
+> add it to a settings file.
+
+## Setup at a Glance
+
+| Stage | What you choose | What becomes ready |
+|---|---|---|
+| Language | Interface and reply languages | Menus and answers use your preference |
+| Permissions | Only the access your features need | Voice, shortcuts, and screen control can work |
+| Activation | Wake word or keyboard shortcut | A way to begin a voice request |
+| Provider | One or more services for the features you use | Chat and provider-backed voice features |
+| Finish | Optional start-at-login setting | The main Jarvis app |
+
+## Complete the Setup
+
+### 1. Choose your languages
+
+1. On **Welcome to Personal Jarvis**, select **Get started**.
+2. Under **Interface language**, choose the language used by menus, buttons,
+ and settings.
+3. Under **Reply language**, choose a specific language or **Auto**. Auto lets
+ Jarvis follow the language of your conversation.
+4. Select **Next**. The interface updates to the selected language.
+
+These are separate choices. Changing the interface does not force every
+answer into that language.
+
+### 2. Review system permissions
+
+Jarvis asks only for operating-system access that supports features you may
+use. On macOS, the setup lists permissions such as **Microphone**, **Screen
+Recording**, **Accessibility**, **Input Monitoring**, and **Input control**.
+Select **Allow** or **Open Settings** for the capabilities you want, then
+return to Jarvis and wait for their status to change to **Allowed**.
+
+If the app shows **Restart now**, use it before relying on newly granted
+access. On Windows and Linux, setup may instead report that no extra desktop
+privacy permissions are required.
+
+Select **Continue** when the page is ready. If you do not want to grant access
+now, select **Continue with text only**. Voice input, global shortcuts, or
+Computer Use may remain unavailable until you grant the related permission.
+
+### 3. Choose how to activate voice
+
+You have two first-class choices:
+
+- **Wake word** keeps the local activation listener ready for a phrase you
+ choose.
+- **Keyboard shortcut** uses push-to-talk instead. You can choose the exact
+ shortcut later under **Settings > Voice Keybinds**.
+
+If you choose **Keyboard shortcut**, review the note and select **Continue**.
+This avoids an always-ready wake listener and does not require a wake-word
+model.
+
+If you choose **Wake word**:
+
+1. Enter the part that follows the fixed word **Hey**.
+2. Confirm that you are responsible for the word you choose.
+3. Select **Test your microphone** and speak during the short listening
+ window. You can also select **Say your wake word once** for the same level
+ check with a more specific prompt.
+4. Look for **Sounds good**. If the result says the microphone is too quiet,
+ no device was found, or permission is required, fix that issue or continue
+ and return later.
+5. Select **Save wake word**.
+
+Some custom words need the optional local speech pack. If Jarvis cannot yet
+support the word, it offers to install that pack. You may also select
+**Continue anyway**; setup finishes, but the wake word will not be usable
+until a suitable local engine is available. Use the keyboard shortcut or text
+in the meantime.
+
+### 4. Finish onboarding
+
+The **Set up API keys after onboarding** page explains where provider setup
+lives; it does not ask you to enter a credential. Select **Continue
+onboarding**.
+
+On the final page, enable **Start Jarvis automatically at login** if the
+option is available and you want it. Select **Get started** to open the main
+app. You can do this even when permissions, microphone setup, wake word, or
+providers are still incomplete.
+
+### 5. Connect only the providers you need
+
+1. In the main sidebar, open **API Keys**. The page title is **API Keys &
+ Providers**.
+2. For text chat, open **Brain** and choose a provider. For voice, choose one
+ of the two modes shown at the top of the page:
+
+ | Voice mode | What it uses | When to choose it |
+ |---|---|---|
+ | Realtime | One compatible service listens and replies in a live audio stream | You want the shortest voice setup and accept that it is a research preview |
+ | Pipeline | Separate Voice Input, Brain, and Voice Output choices | You want to choose each stage independently |
+
+3. Open the provider card. Use **Get your key here** if you need the
+ provider's official account page.
+4. Enter the credential in that card's protected field and select **Save**.
+5. Select **Test**. **Works** means the provider answered successfully. If the
+ card is not marked **Active**, activate it for that category.
+
+You do not need to fill every credential field. Connect only the categories
+you intend to use. If you skip this step, features that require an online
+provider stay unavailable until you return.
+
+## How It Fits Together
+
+1. You type a message, say a wake word, or use push-to-talk to start a
+ request.
+2. Language settings decide how the interface appears and which language
+ Jarvis uses for the answer. Microphone and shortcut permissions allow the
+ selected input method to reach Jarvis.
+3. A connected provider handles the Brain response. In Pipeline voice mode,
+ the Voice Input provider first turns speech into text and the Voice Output
+ provider turns the answer back into speech. Realtime mode handles those
+ stages in one live audio connection.
+4. Computer Use and other actions may need additional system permission and
+ can still ask for a safety confirmation. Setup permission does not approve
+ every future action.
+5. If the preferred provider is unavailable, Jarvis can use another compatible
+ provider you have configured. If none is ready, the affected feature shows
+ that setup or attention is required; text and local paths remain available
+ when they do not depend on that provider.
+
+This is why permissions, activation, providers, chat, and voice are separate
+choices: each can fail or be changed without forcing you to redo the others.
+
+## Check That It Works
+
+Open **Chats**, start a new chat, and send a short greeting. Setup is working
+when your message appears and Jarvis returns an answer in the reply language
+you selected. If you enabled voice, say the saved wake phrase or use your
+push-to-talk shortcut and confirm that the listening state appears.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| **Continue** is unavailable on the permissions page | A required macOS permission or restart is still pending | Use **Allow** or **Open Settings**, return to Jarvis, and restart when prompted; or choose **Continue with text only** |
+| The microphone check says it is too quiet or finds no device | The wrong input is selected, its level is low, or no microphone is available | Check the operating-system input device and level, then try again; continue with text if needed |
+| The microphone check says permission is required | Jarvis cannot read the microphone | Grant **Microphone** access in Permissions, then run the check again |
+| The wake phrase is saved but does not activate Jarvis | The local speech pack is missing, the wake listener is off, or the microphone is unavailable | Use push-to-talk, then review **Settings > Wake Word** and install the offered local pack if needed |
+| A provider says **Configured** but requests fail | A saved credential is present, but the account, model, quota, or service may not be working | Select **Test**, follow its result, and try another compatible provider family if one is available |
+| Menus and answers use different languages | Interface and reply language are independent settings | Review both language choices and use **Auto** only when you want replies to follow the conversation |
+
+## Next Steps
+
+- Read [Providers and API Keys](providers-and-api-keys) to understand provider
+ categories, tests, fallback choices, and safe credential management.
+- Read [Audio and Wake Word](audio-and-wake-word) to tune your microphone,
+ activation phrase, local speech pack, and push-to-talk behavior.
+- Read [Permissions](permissions) before enabling voice, shortcuts, or
+ Computer Use on a new operating system.
+- Follow [Start Your First Chat](start-your-first-chat) for a simple first
+ conversation and the signs that your Brain provider is ready.
diff --git a/docs/product/start-here/install-personal-jarvis.md b/docs/product/start-here/install-personal-jarvis.md
new file mode 100644
index 0000000000..9ba97f9357
--- /dev/null
+++ b/docs/product/start-here/install-personal-jarvis.md
@@ -0,0 +1,123 @@
+---
+title: "Install Personal Jarvis"
+slug: install-personal-jarvis
+summary: "Install the app on a supported computer, then confirm that Personal Jarvis starts correctly."
+section: "Start here"
+section_order: 1
+order: 2
+diataxis: howto
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [installation, setup, windows, macos, linux]
+related: [first-run-setup, platform-support, troubleshooting]
+---
+
+Personal Jarvis installs on Windows, macOS, and Linux. The standard installation adds the desktop app, prepares supported voice features, and opens Jarvis when it is ready.
+
+You do not choose an artificial intelligence provider or enter a credential in the terminal. That happens later in the app, where Jarvis can store it safely and guide you through the remaining setup.
+
+## Before You Start
+
+You need:
+
+- an internet connection for the app, its dependencies, and voice downloads;
+- a regular user account that can approve software installation when asked;
+- Python 3.11 through 3.14 and Git, or permission for the installer to add them;
+- several minutes for the first installation. Voice downloads can add a few hundred megabytes.
+
+Node.js is optional. Jarvis works without it; Node.js is used only by optional Jarvis-Agent workers and some integrations.
+
+> [!warning] Enter provider credentials only in the app during first-run setup. Never paste a credential into a terminal command, chat, voice request, screenshot, or configuration file.
+
+## Choose an Install Profile
+
+| Profile | What it prepares | What opens afterward | Best for |
+|---|---|---|---|
+| Full desktop | Desktop app, supported local voice components, channels, and telephony support | The Personal Jarvis app | Most people on a computer with a desktop |
+| Headless | The smaller server base without desktop-specific extras | A local web server | A Linux server or computer without a display |
+
+The full profile is the normal choice and does not require a graphics processor. Platform checks skip native components that cannot run on your operating system or processor. Jarvis keeps supported browser, cloud, or simpler local paths available instead of treating one optional component as the whole app.
+
+## Install on Windows
+
+1. Open **PowerShell** from the Start menu. A regular, non-administrator window is enough.
+2. Run the official installer:
+
+ ```powershell
+ irm https://raw.githubusercontent.com/PersonalJarvis/PersonalJarvis/main/install/install.ps1 | iex
+ ```
+
+3. If Python or Git is missing, review the list and approve the offer to install it with WinGet. Windows may show one approval prompt.
+4. Keep PowerShell open while the six numbered phases finish. The installer shows a check mark after each completed part and stops with a visible error if a required part fails.
+5. Wait for the Personal Jarvis app to open. You can start it again later by searching for **Personal Jarvis** in Windows Search.
+
+## Install on macOS or Linux Desktop
+
+1. Open **Terminal** on macOS, or your preferred terminal on Linux.
+2. Run the official installer:
+
+ ```bash
+ curl -fsSL https://raw.githubusercontent.com/PersonalJarvis/PersonalJarvis/main/install/install.sh | bash
+ ```
+
+3. Choose **Yes** when the terminal asks whether to install Personal Jarvis.
+
+### Finish on macOS
+
+1. If Python or Git is missing, approve the offered Homebrew or system installation. The same installer run checks again and continues when the tools are ready.
+2. Wait for the app to open. You can start it again later by searching for **Personal Jarvis** in Spotlight.
+3. Use the first-run permission buttons for features you want, such as the microphone or screen access. macOS owns these prompts, and the installer cannot approve them for you. Jarvis remains available for text if you decline a voice or computer-control permission.
+
+### Finish on Linux
+
+1. If Python or Git is missing, approve the supported package-manager step. Your system may ask for administrator approval through `sudo`.
+2. Wait for all six phases to finish and for the app to open. On a supported desktop, **Personal Jarvis** is also added to the application menu.
+
+## Install on Headless Linux
+
+Use the headless profile for a Linux server without a graphical desktop:
+
+```bash
+curl -fsSL https://raw.githubusercontent.com/PersonalJarvis/PersonalJarvis/main/install/install.sh | bash -s -- --headless
+```
+
+The installer skips desktop extras and the optional Node.js check, then starts the server and prints its local address. On a local machine, open that address in a browser. For a remote server, read [Platform support](platform-support) before making the service reachable; do not expose a local admin address directly to the internet.
+
+## How It Fits Together
+
+1. **The install command starts the process.** Jarvis checks Python and Git, and asks before adding anything that is missing.
+2. **The installer fetches and prepares Jarvis.** It creates an isolated Python environment, installs the selected profile, checks the dependencies, and prepares supported voice models.
+3. **Your operating system receives the right launcher.** Windows uses Windows Search, macOS uses a stable app identity in Spotlight, and desktop Linux uses the application menu. Headless Linux starts a browser-based server instead.
+4. **First-run setup takes over.** The app asks for language, voice choices, permissions, and a provider - the service that answers your requests. Add any required credential in the app, never in the install command.
+5. **Chat and voice use the capabilities you enabled.** If a local speech component or preferred provider is unavailable, Jarvis can use another configured provider family or an available browser, cloud, or local path. It tells you when no working option is available.
+
+Read [First-run setup](first-run-setup) for the choices that appear after installation.
+
+## Check That It Works
+
+For a desktop install, look for **Personal Jarvis is ready** in the terminal and confirm that the app opens to the one-time setup guide. Close the app, then start **Personal Jarvis** once from Windows Search, Spotlight, or your Linux application menu.
+
+For a headless install, confirm that the terminal prints a local address and that opening it shows the same setup guide.
+
+## Update Later
+
+Run the same installation command again. A managed installation updates in place, keeps your setup and settings, repairs its launcher when needed, and does not repeat onboarding.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| **Python 3.11+ not found** or **git not found** | A required tool is missing or too old | Approve the installer offer, or install the named tool from its official source, reopen the terminal, and run the command again. |
+| The installer stops during **Dependencies** | A package download, disk write, or required profile component failed | Check the visible error, internet connection, free space, and package-manager status. Then run the same installer again. |
+| **Some required voice models are missing** | A model download did not finish | Check the connection and rerun the installer. Available browser or cloud speech paths may still work after setup. |
+| **Desktop app registration failed** | Jarvis could not create a reliable operating-system launcher | Do not treat the install as complete. Check operating-system permissions, rerun the installer, then use [Troubleshooting](troubleshooting) if it repeats. |
+| The summary appears but no window opens | The app could not launch, or a headless system was detected | Read the final terminal message, try the registered launcher, and confirm your system matches [Platform support](platform-support). |
+
+## Next Steps
+
+- Complete [First-run setup](first-run-setup) to choose your language, permissions, voice options, and provider inside the app.
+- Read [Platform support](platform-support) to understand operating-system differences and headless limitations.
+- Use [Troubleshooting](troubleshooting) when startup, permissions, audio, or a connected provider does not behave as expected.
diff --git a/docs/product/start-here/start-your-first-chat.md b/docs/product/start-here/start-your-first-chat.md
new file mode 100644
index 0000000000..fc097d6147
--- /dev/null
+++ b/docs/product/start-here/start-your-first-chat.md
@@ -0,0 +1,155 @@
+---
+title: "Start Your First Chat"
+slug: start-your-first-chat
+summary: "Send a first message, attach useful context, and understand how the conversation is saved."
+section: "Start here"
+section_order: 1
+order: 5
+diataxis: tutorial
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [chat, conversations, attachments, history, context]
+related: [chats, start-your-first-voice-conversation, sessions-and-run-inspector]
+---
+
+Use **Chats** when you want an answer now and a conversation you can build on.
+In this tutorial, you will send a request, add useful context, and see exactly
+what the current app saves when you leave the conversation.
+
+The basic flow is short: **you send a message -> Jarvis shows its progress ->
+the reply appears -> a text conversation appears in History**. The live chat
+shows both sides of the conversation. The current saved transcript is more
+limited: assistant and system replies are saved, but your incoming text may be
+missing when you reopen the conversation.
+
+## Before You Start
+
+- Finish first-run setup and open the main app.
+- In **API Keys**, make sure at least one Brain provider shows **Works**. A
+ provider is the service that answers your request.
+- Choose a harmless example topic, such as planning a meal or organizing a
+ study session.
+
+> [!warning] Never put a password, API key, access token, recovery code, or
+> other credential in a chat or attached file. Enter credentials only in the
+> protected fields in **API Keys** or the connection screen for that service.
+
+## Start the Conversation
+
+1. **Open Chats.** Select **Chats** in the sidebar. You see **History** on one
+ side and the message field at the bottom. If voice is still getting ready,
+ you can already use text chat.
+
+2. **Create a clean conversation.** Select **New chat**. The conversation area
+ clears. Jarvis creates the saved text conversation when you send its first
+ message, so an untouched empty chat does not clutter History.
+
+3. **Send one clear request.** Type a request such as `Create a simple
+ three-step plan for a quiet weekend.` Press **Enter** or choose the
+ paper-plane **Send** button. Use **Shift+Enter** when you want a new line
+ without sending.
+
+4. **Watch for the visible result.** Your message appears in the conversation.
+ While Jarvis works, the status area may show thinking or a short progress
+ step. The completed answer then appears below the assistant name.
+
+5. **Ask a follow-up.** Send `Make the second step suitable for rainy weather.`
+ Jarvis uses the current live conversation, so you do not need to repeat the
+ original plan while that conversation remains open. The first sent message
+ creates the text conversation; completed assistant or system replies are
+ added to its saved transcript.
+
+## Add Useful Context
+
+You can add a file, image, PDF, selected text, or link before your next
+message.
+
+1. Drag the item into the Jarvis window. A drop target appears with **Drop to
+ brief** followed by your assistant's name.
+2. Release the item and look for **Added to conversation**.
+3. Send a request that says what to do with it, such as `Summarize the attached
+ notes in five bullets.` Jarvis does not answer the drop by itself; it waits
+ for this real request.
+
+Text and readable PDF content can be included as context. A compatible Brain
+provider can also use an image with the next request. For another file type,
+Jarvis may initially receive only basic details such as its name and type. A
+single drop can contain up to 25 MB in total.
+
+> [!note] A dropped item is context, not a stored attachment library. It does
+> not appear as a file inside the saved transcript. Attach it again after
+> reopening or switching conversations when you still need its contents.
+
+## Reopen the Chat
+
+1. Select **New chat** to leave the current conversation.
+2. Find the newest **Text** entry under **History**. Entries are grouped as
+ **Today**, **Yesterday**, or **Earlier**.
+3. Select the text conversation. Its saved assistant or system replies return,
+ and you can send another message.
+
+**Current saving limitation:** the live chat shows the prompt you sent, but
+incoming user text may not currently be added to the saved text thread even
+though assistant and system replies are. After reopening, your prompt can be
+missing and the title can remain **New Chat**. Repeat any essential details
+before continuing, and keep important source instructions in your own notes
+until this is fixed.
+
+You can also select a voice entry to read its transcript. **Speak in this
+conversation** continues it by voice when the desktop voice feature is ready.
+If you type after opening a voice entry, Jarvis carries recent context into a
+new text conversation rather than changing the original voice record.
+
+## How It Fits Together
+
+1. **Chats receives your request.** Typing, dictation, and a resumed
+ conversation all use the active conversation context.
+2. **The Brain provider prepares the answer.** It can use recent messages and
+ any context you just dropped. If the preferred provider is unavailable,
+ Jarvis can try another compatible provider you configured; otherwise it
+ shows that the Brain is unavailable.
+3. **Tools and safety checks can join the turn.** A request may call a tool or
+ ask for confirmation before an action. A simple answer returns directly to
+ the chat.
+4. **Longer work can move to Jarvis-Agents.** You follow that work separately,
+ and generated files appear in **Outputs**. Dragging a completed Outputs card
+ into the Jarvis drop target brings its result back into the conversation for
+ discussion.
+5. **History and Sessions serve different needs.** History is the quick way to
+ reopen saved text replies and voice conversations. **Sessions** and **Run
+ Inspector** show a more detailed voice transcript or run trace when you need
+ to understand how a result was produced.
+
+## Check That It Works
+
+1. Start a new chat and send `Reply with the words: chat is ready.`
+2. Confirm that your message and a matching reply appear in the conversation.
+3. Select **New chat**, then open the newest **Text** entry from **History**.
+
+The live chat is working when both messages appear before you leave it. The
+saved reply is available when it returns after reopening; your test prompt may
+not return because of the limitation above.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| The message field says **Starting** or **Offline** | The app is still connecting, or its local connection is unavailable | Wait for startup to finish. If it stays offline, restart the app normally and check the visible status again. |
+| Your message appears but no answer arrives | The Brain provider may be disconnected, unavailable, or out of usage allowance | Open **API Keys**, select **Test**, and choose another compatible provider family if one is ready. |
+| The thinking status stops without a reply | The provider or a requested tool may have timed out | Send one short, text-only request. If that works, retry the original request without optional tools or context. |
+| Dropping a file seems to do nothing | The item was empty, too large, or not accepted, or you have not sent the follow-up request yet | Keep the total below 25 MB, wait for **Added to conversation**, then type what Jarvis should do with it. |
+| Your prompt is missing after reopening a text chat | The current version stored the assistant reply but not your user prompt | Repeat the important context and keep a separate copy of any instruction you need later. |
+
+## Next Steps
+
+- Read [Chats](chats) to organize, continue, and delete text conversations and
+ understand conversation context in more detail.
+- Follow [Start Your First Voice Conversation](start-your-first-voice-conversation)
+ to move from typing to microphone input safely.
+- Use [Sessions and Run Inspector](sessions-and-run-inspector) when you need a
+ voice transcript or a closer look at how a run behaved.
+- Read [Outputs and Files](outputs-and-files) to find, preview, and reopen files
+ created by longer Jarvis-Agent work.
diff --git a/docs/product/start-here/start-your-first-voice-conversation.md b/docs/product/start-here/start-your-first-voice-conversation.md
new file mode 100644
index 0000000000..9c1f7f0b11
--- /dev/null
+++ b/docs/product/start-here/start-your-first-voice-conversation.md
@@ -0,0 +1,139 @@
+---
+title: "Start Your First Voice Conversation"
+slug: start-your-first-voice-conversation
+summary: "Check the microphone, wake Jarvis, ask a question, and know when the app is listening or speaking."
+section: "Start here"
+section_order: 1
+order: 6
+diataxis: tutorial
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [voice, microphone, wake-word, push-to-talk, realtime, tutorial]
+related: [voice-conversations, audio-and-wake-word, languages-and-voices, permissions]
+---
+
+Your first voice conversation can be one short turn: start listening, speak,
+and hear the reply. The status below your assistant's name shows what Jarvis
+is doing throughout the turn.
+
+Voice is optional. If this computer cannot use a microphone or a compatible
+voice service, you can continue in **Chats** while you review the voice setup.
+
+## Before You Start
+
+- Open the desktop app and wait for **Voice starting…** to change to
+ **Ready**.
+- Make sure a microphone and a speaker or headset are available.
+- Complete first-run setup, including any microphone permission your operating
+ system requests.
+- Connect only the services needed by your chosen voice mode. You do not need
+ to connect every service shown in the app.
+
+> [!warning] Never speak passwords, provider credentials, recovery codes, or
+> other secrets. Enter a required credential only in **API Keys & Providers**.
+
+## Start Your First Conversation
+
+### 1. Check the microphone
+
+During first-run setup, select **Test your microphone**, speak normally, and
+wait for **Sounds good**.
+
+If setup is already complete, open **Settings > Audio devices**. Choose your
+microphone or keep **Automatic (recommended)**. If you use a wake phrase, also
+open **Settings > Wake Word** and select **Test wake word**. That check confirms
+that the phrase, language, wake engine, and microphone are ready together.
+
+### 2. Start listening
+
+Use the activation method you chose during setup:
+
+- **Wake phrase:** Say your saved phrase. Begin your request when the status
+ changes to **Listening** and the Jarvis Bar becomes active.
+- **Talk / Push-to-talk:** Hold your configured shortcut, speak, and release
+ the keys to send the request. The shortcut works without a wake phrase.
+
+You can review or change the **Call**, **Hangup**, and **Talk / Push-to-talk**
+shortcuts under **Settings > Voice Keybinds**.
+
+### 3. Ask one short question
+
+Speak at a normal volume and finish the request before waiting for the answer.
+For this first check, choose something that needs only a short spoken reply.
+
+### 4. Follow the turn
+
+The normal flow is:
+
+**Ready → Listening → Thinking → Speaking → Ready**
+
+| Status | What it means | What to do |
+|---|---|---|
+| **Listening** | The microphone is open for this voice turn | Speak your request |
+| **Thinking** | Jarvis is preparing the answer or completing an action | Wait for the result |
+| **Speaking** | The spoken reply is playing | Listen, or end the session if needed |
+| **Ready** | The voice session has ended | Start another turn when you want |
+
+A longer request may move between **Thinking** and **Speaking** more than once
+while Jarvis gives a brief update and continues the work.
+
+### 5. End the conversation
+
+The default voice setup ends the session after the reply. If your setup keeps
+the conversation open, use any one of these controls:
+
+- Say a clear closing command such as **hang up**.
+- Press your configured **Hangup** shortcut.
+- Hover over the active Jarvis Bar and select the **X**.
+
+The bar returns to its quiet state and the sidebar shows **Ready**.
+
+## How It Fits Together
+
+1. [Audio and Wake Word](audio-and-wake-word) supplies the microphone choice
+ and the activation method. [Permissions](permissions) controls whether the
+ operating system lets Jarvis hear the microphone.
+2. In Pipeline mode, voice input becomes text, the Brain prepares the answer,
+ and voice output speaks it. In Realtime mode, one live audio session listens
+ and replies, while longer actions can still use the same Brain.
+3. Both modes publish the same **Listening**, **Thinking**, and **Speaking**
+ states, so the app remains understandable even when the voice engine changes.
+4. [Languages and Voices](languages-and-voices) decides the reply language and
+ speaking voice. It does not replace microphone or provider setup.
+5. If Realtime cannot open before the turn begins, Jarvis tries the classic
+ Pipeline path. If no usable voice path remains, use **Chats** and review the
+ microphone, permission, and provider status instead of repeatedly speaking.
+
+Read [Voice Conversations](voice-conversations) for a fuller explanation of
+how listening, the Brain, actions, and spoken output form one turn.
+
+## Check That It Works
+
+Start a voice turn with your saved wake phrase or push-to-talk shortcut. Ask a
+short question. Voice is working when you see **Listening**, then **Thinking**
+or **Speaking**, hear a reply, and finally see **Ready** again.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| **Voice starting…** does not change | The voice stack is still warming or did not become available | Wait briefly, then review microphone permission and **Audio devices** |
+| The wake phrase does nothing | Wake activation, language, model, or microphone readiness does not match | Run **Test wake word** and use push-to-talk while you fix the reported item |
+| **Listening** appears, but no useful request is heard | The wrong microphone is selected, its level is low, or speech recognition is unavailable | Select the correct input, repeat the microphone check, then try one short request |
+| **Speaking** appears, but you hear nothing | The output device or system volume is wrong | Review **Settings > Audio devices** and the operating-system output volume |
+| Realtime reports that it is unavailable | The live voice connection could not open | Let Jarvis try Pipeline mode; if voice still fails, use **Chats** and review provider status |
+| The status changes to **Error** | The turn could not continue safely | End the session, correct the reported setup problem, and try again |
+
+## Next Steps
+
+- Read [Voice Conversations](voice-conversations) to understand the complete
+ voice turn and how Realtime and Pipeline mode relate.
+- Read [Audio and Wake Word](audio-and-wake-word) to choose devices, tune a wake
+ phrase, or rely on push-to-talk.
+- Read [Languages and Voices](languages-and-voices) to choose the reply language
+ and the voice you hear.
+- Read [Permissions](permissions) when the operating system blocks microphone
+ access or another desktop capability.
diff --git a/docs/product/start-here/welcome-to-personal-jarvis.md b/docs/product/start-here/welcome-to-personal-jarvis.md
new file mode 100644
index 0000000000..8549846ad7
--- /dev/null
+++ b/docs/product/start-here/welcome-to-personal-jarvis.md
@@ -0,0 +1,92 @@
+---
+title: "Welcome to Personal Jarvis"
+slug: welcome-to-personal-jarvis
+summary: "Understand what Personal Jarvis can do, what stays under your control, and where to begin."
+section: "Start here"
+section_order: 1
+order: 1
+diataxis: explanation
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+phase: "-"
+audience: end-user
+tags: [overview, getting-started, privacy, safety]
+related: [install-personal-jarvis, desktop-app-tour, start-your-first-chat]
+---
+
+Personal Jarvis is an open-source assistant, which means its source code is public. You can use it through text, voice, or the browser. It brings conversations, longer tasks, tools, saved results, and optional connections into one app.
+
+You decide which artificial intelligence provider - the service that answers your requests - to use, which optional features to connect, and which actions Jarvis may take. Some features need an online service, a permission, or a capability that is available only on certain computers.
+
+## Choose Where to Begin
+
+Start with the part that matches what you want to accomplish.
+
+Jarvis-Agents are separate workers that handle longer jobs.
+
+| Your goal | Where to begin | What you get |
+|---|---|---|
+| Ask a question or develop an idea | **Chats** | A conversation you can return to later |
+| Speak instead of type | Voice controls in the app or browser | A spoken request and, when configured, a spoken reply |
+| Delegate longer work | **Jarvis-Agents** | Progress you can follow and a reviewed result |
+| Find a file created by Jarvis | **Outputs** | A list of generated reports and other deliverables |
+| Add an artificial intelligence provider | **API Keys** | The provider and its current status |
+
+The sidebar is the main map of the desktop app and also gives you direct access to tasks, sessions, the Wiki knowledge area, contacts, settings, documentation, and support.
+
+## What Stays Under Your Control
+
+- **Provider choice:** Jarvis does not include access to an artificial intelligence service. You connect a supported provider account or subscription and can change it later.
+- **Permissions:** Microphone, screen, file, and accessibility access are required only by features that need them.
+- **Approvals:** Actions with meaningful risk can require your confirmation. A blocked action stays blocked.
+- **Connections:** Optional tools and services add capabilities. If you do not connect one, the rest of the app can still use the capabilities that are available.
+- **Information sharing:** A connected provider or service may receive the content needed to complete a request. Review its privacy terms before sending sensitive information.
+
+> [!warning] Never send a password, access token, or other credential through chat or voice. Add credentials only through the app's **API Keys** view or the connection screen for that service.
+
+## What Jarvis Does Not Do
+
+Jarvis does not guarantee that every answer or completed task is correct. Review important facts, generated files, and actions that affect your accounts or computer.
+
+It also does not bypass operating-system permissions, safety checks, or missing hardware. Voice, computer control, phone calls, and third-party connections work only when their requirements are available and configured. Text chat and the browser interface remain useful even when a feature is unavailable on your device.
+
+## How It Fits Together
+
+One request can move through several parts of Jarvis:
+
+1. **You start the request** in a chat, through voice, from a task, or from another app feature.
+2. **Your selected provider interprets it.** It creates the response or helps decide what work is needed.
+3. **Jarvis chooses a path.** A simple question can return directly to the conversation. Longer work can go to a Jarvis-Agent, while an action may use a connected tool or service.
+4. **Safety checks apply before action.** Jarvis runs permitted low-risk steps, asks you to review actions that need approval, and blocks disallowed actions.
+5. **The result returns to the relevant place.** You see a reply in the conversation, progress in Jarvis-Agents, or a file in Outputs.
+6. **Jarvis shows unavailable parts.** It can use a suitable alternative when one is configured; otherwise it explains which provider, permission, connection, or device capability is unavailable.
+
+The [desktop app tour](desktop-app-tour) explains where each of these areas lives. The [first chat guide](start-your-first-chat) walks through the shortest complete request.
+
+## Check That It Works
+
+After you install the app and finish its setup:
+
+1. Open **Chats** from the sidebar.
+2. Send: `What can you help me do?`
+3. Confirm that your message and Jarvis's reply appear in the same conversation.
+
+That visible reply confirms that the app, chat view, and selected provider can complete a basic request. It does not test optional voice, tool, or computer-control features.
+
+## Troubleshooting
+
+| What you see | What it usually means | What to do |
+|---|---|---|
+| **Offline** or **Starting** near the assistant name | The app or voice service is still connecting | Wait for startup to finish. Try text chat while voice continues to warm up. |
+| Your message sends but no answer appears | The selected provider may be unavailable or not connected | Open **API Keys**, review the provider status, and connect or choose another available provider. |
+| A feature is missing or unavailable | Its service, permission, software, or hardware is not ready on this device | Open the matching view or **Settings**, read the shown status, and complete only the listed requirement. |
+| Jarvis asks for confirmation | The action reached a safety boundary | Review the exact action and approve it only if you understand and want the effect. |
+
+If a problem continues, open **Docs** in the sidebar and search for the feature name or the visible error message.
+
+## Next Steps
+
+- [Install Personal Jarvis](install-personal-jarvis) to set up the app on a supported computer.
+- [Tour the Desktop App](desktop-app-tour) to learn what each sidebar area is for.
+- [Start Your First Chat](start-your-first-chat) to send a request and understand where the conversation is saved.
diff --git a/jarvis/core/paths.py b/jarvis/core/paths.py
index 1627a9e788..0dc593df34 100644
--- a/jarvis/core/paths.py
+++ b/jarvis/core/paths.py
@@ -9,10 +9,12 @@ This module replaces the scattered ``Path.home() / ".jarvis"`` literals and the
local ``_app_data_dir()`` in ``jarvis.ui.shell.single_instance``. All consumers
go through the getters defined here.
"""
+
from __future__ import annotations
import os
import sys
+import sysconfig
from pathlib import Path
@@ -94,16 +96,39 @@ def repo_root() -> Path:
def default_doc_roots() -> list[Path]:
"""Default discovery roots for the documentation registry.
- ``docs/`` is the canonical documentation tree. The ``.exists()`` filter is
- kept as a defensive guard so a missing root never breaks the registry, and
- so additional roots can be appended later (optionally overridable via a
- ``[docs]`` section in ``jarvis.toml``).
+ ``docs/product/`` is the curated reader library. The wider ``docs/`` tree
+ remains an engineering source archive and is never exposed in the reader.
"""
root = repo_root()
- candidates = [
- root / "docs",
- ]
- return [p for p in candidates if p.exists()]
+ # The desktop reader intentionally indexes only the curated product guide.
+ # Engineering plans, ADRs, audits, and forensic reports remain under
+ # ``docs/`` as source material, but they are not reader documentation.
+ product_docs = root / "docs" / "product"
+ if product_docs.exists():
+ return [product_docs]
+
+ # Wheels install the reader library as platform data. Check the active
+ # environment, a ``pip --target``-style root, and the user-install scheme.
+ # This keeps discovery portable without scanning a home directory.
+ data_prefixes = [Path(sysconfig.get_path("data")), root]
+ try:
+ user_scheme = sysconfig.get_preferred_scheme("user")
+ data_prefixes.append(Path(sysconfig.get_path("data", scheme=user_scheme)))
+ except (KeyError, TypeError, ValueError):
+ pass
+
+ seen_prefixes: set[Path] = set()
+ for prefix in data_prefixes:
+ if prefix in seen_prefixes:
+ continue
+ seen_prefixes.add(prefix)
+ installed_docs = prefix / "share" / "personal-jarvis" / "docs"
+ if installed_docs.exists():
+ return [installed_docs]
+
+ # Fail closed if the packaged reader library is missing. Falling back to
+ # the engineering archive could expose plans, audits, or local diagnostics.
+ return []
def board_db_path() -> Path:
diff --git a/jarvis/docs/registry.py b/jarvis/docs/registry.py
index 37ff183f22..32fa3d205f 100644
--- a/jarvis/docs/registry.py
+++ b/jarvis/docs/registry.py
@@ -11,6 +11,7 @@ optionality. Differences:
- Index lookup key is ``slug`` (instead of ``name``); the synthetic slugs
from ``loader._synth_frontmatter`` guarantee uniqueness per path.
"""
+
from __future__ import annotations
import asyncio
@@ -29,6 +30,7 @@ from .search import DocSearch, SearchResult
try:
from watchdog.events import FileSystemEventHandler # type: ignore
from watchdog.observers import Observer # type: ignore
+
_HAVE_WATCHDOG = True
except Exception: # pragma: no cover
FileSystemEventHandler = object # type: ignore
@@ -59,6 +61,7 @@ class DocRegistry:
self._docs: dict[str, Doc] = {}
self._async_lock = asyncio.Lock()
self._thread_lock = threading.Lock()
+ self._loaded = threading.Event()
self._observers: list[Any] = []
self._pending_reload: float | None = None
self._loop: asyncio.AbstractEventLoop | None = None
@@ -74,6 +77,11 @@ class DocRegistry:
def list(self) -> list[Doc]:
return list(self._docs.values())
+ @property
+ def is_loaded(self) -> bool:
+ """Whether the first complete disk scan and FTS build has landed."""
+ return self._loaded.is_set()
+
def filter(
self,
diataxis: DocDiataxis | None = None,
@@ -128,19 +136,40 @@ class DocRegistry:
def reload_sync(self) -> None:
"""Synchronous reload — used for bootstrap and tests."""
docs = discover_docs(self.roots)
+ self.search.replace_all(docs)
with self._thread_lock:
self._docs = {d.frontmatter.slug: d for d in docs}
- self.search.replace_all(docs)
+ self._loaded.set()
+ self._emit_reloaded()
+
+ async def ensure_loaded(self) -> None:
+ """Load once, prioritising an explicit request from the Docs view.
+
+ Startup normally defers this work until the wake model is ready. A user
+ can open Docs before then, so API routes call this method instead of
+ returning and caching an empty registry. Concurrent callers share the
+ same async lock and only the first one performs the disk scan.
+ """
+ if self._loaded.is_set():
+ return
+ async with self._async_lock:
+ if self._loaded.is_set():
+ return
+ docs = await asyncio.to_thread(discover_docs, self.roots)
+ await asyncio.to_thread(self.search.replace_all, docs)
+ with self._thread_lock:
+ self._docs = {d.frontmatter.slug: d for d in docs}
+ self._loaded.set()
self._emit_reloaded()
async def reload(self) -> None:
"""Async reload with lock — prevents concurrent re-indexings."""
async with self._async_lock:
- loop = asyncio.get_event_loop()
- docs = await loop.run_in_executor(None, discover_docs, self.roots)
+ docs = await asyncio.to_thread(discover_docs, self.roots)
+ await asyncio.to_thread(self.search.replace_all, docs)
with self._thread_lock:
self._docs = {d.frontmatter.slug: d for d in docs}
- await loop.run_in_executor(None, self.search.replace_all, docs)
+ self._loaded.set()
self._emit_reloaded()
def _emit_reloaded(self) -> None:
@@ -224,15 +253,23 @@ class DocRegistry:
pass
async def _debounced_reload(self) -> None:
- await asyncio.sleep(self._debounce_ms / 1000.0)
- with self._thread_lock:
- deadline = self._pending_reload
- self._pending_reload = None
- if deadline is None:
- return
- if time.monotonic() + 0.001 < deadline:
- # A newer reload was requested in the meantime — skip this one
- return
+ # Wait for the latest deadline, not merely one debounce interval from
+ # this coroutine's creation. On coarse Windows timers, two callbacks
+ # can otherwise both wake before a newer deadline and lose the reload.
+ while True:
+ with self._thread_lock:
+ deadline = self._pending_reload
+ if deadline is None:
+ return
+ remaining = deadline - time.monotonic()
+ if remaining > 0:
+ await asyncio.sleep(remaining)
+ continue
+ with self._thread_lock:
+ if self._pending_reload != deadline:
+ continue
+ self._pending_reload = None
+ break
try:
await self.reload()
except Exception as exc: # noqa: BLE001
diff --git a/jarvis/docs/schema.py b/jarvis/docs/schema.py
index c67ca32e26..8befbf40b5 100644
--- a/jarvis/docs/schema.py
+++ b/jarvis/docs/schema.py
@@ -9,6 +9,7 @@ filename, ``slug`` from the normalised path).
``Doc`` is a frozen dataclass — immutability is consistent with the ``Skill``
architecture (flight-recorder replay capable).
"""
+
from __future__ import annotations
from dataclasses import dataclass, field
@@ -25,6 +26,7 @@ from jarvis.core.events import Event
# Enums
# ----------------------------------------------------------------------
+
class DocDiataxis(str, Enum):
"""Diataxis quadrant + ADR + Troubleshooting + special case Unclassified.
@@ -32,6 +34,7 @@ class DocDiataxis(str, Enum):
The UI groups them in a separate section and marks them as migration
candidates.
"""
+
TUTORIAL = "tutorial"
HOWTO = "howto"
REFERENCE = "reference"
@@ -43,6 +46,7 @@ class DocDiataxis(str, Enum):
class DocStatus(str, Enum):
"""Lifecycle state of a doc."""
+
DRAFT = "draft"
ACTIVE = "active"
DEPRECATED = "deprecated"
@@ -55,6 +59,7 @@ DocAudience = Literal["developer", "operator", "end-user"]
# Frontmatter-Model
# ----------------------------------------------------------------------
+
class DocFrontmatter(BaseModel):
"""YAML frontmatter of a Jarvis doc.
@@ -62,6 +67,7 @@ class DocFrontmatter(BaseModel):
frontmatter-schema.md``. Intentionally tolerant — ``extra="ignore"``
absorbs fields not modelled here (e.g. ADR-specific ``adr_status``).
"""
+
model_config = ConfigDict(frozen=True, extra="ignore")
title: str
@@ -72,6 +78,10 @@ class DocFrontmatter(BaseModel):
last_reviewed: date | None = None
phase: str = "-"
audience: DocAudience = "developer"
+ summary: str = ""
+ section: str = "Other"
+ section_order: int = 999
+ order: int = 999
tags: list[str] = Field(default_factory=list)
related: list[str] = Field(default_factory=list)
deprecates: str | None = None
@@ -87,6 +97,11 @@ class DocFrontmatter(BaseModel):
raise ValueError("must not be empty")
return v
+ @field_validator("summary", "section")
+ @classmethod
+ def _strip_reader_metadata(cls, v: str) -> str:
+ return v.strip()
+
@field_validator("phase", mode="before")
@classmethod
def _phase_to_str(cls, v: object) -> str:
@@ -112,6 +127,7 @@ class DocFrontmatter(BaseModel):
# Doc-Container
# ----------------------------------------------------------------------
+
@dataclass(frozen=True, slots=True)
class Doc:
"""A loaded Markdown file.
@@ -121,6 +137,7 @@ class Doc:
``error`` marks parse problems — the file is still shown in the UI, with
a diagnostic banner.
"""
+
path: Path
frontmatter: DocFrontmatter
body: str
@@ -146,6 +163,7 @@ class Doc:
# Bus-Events
# ----------------------------------------------------------------------
+
@dataclass(frozen=True, slots=True)
class DocIndexReloaded(Event):
"""Emitted when the ``DocRegistry`` has finished re-indexing.
@@ -153,6 +171,7 @@ class DocIndexReloaded(Event):
Frontend subscribers invalidate their react-query cache. Follows the
same pattern as ``SkillRegistryReloaded`` in ``jarvis/skills/schema.py``.
"""
+
total: int = 0
by_diataxis: dict[str, int] = field(default_factory=dict)
errors: int = 0
diff --git a/jarvis/docs/search.py b/jarvis/docs/search.py
index 5d7acb0e02..70b1515f98 100644
--- a/jarvis/docs/search.py
+++ b/jarvis/docs/search.py
@@ -10,7 +10,9 @@ registry holds one instance; REST routes read through its methods.
from __future__ import annotations
import logging
+import os
import sqlite3
+import tempfile
import threading
from dataclasses import dataclass
from pathlib import Path
@@ -42,35 +44,50 @@ class DocSearch:
def __init__(self, db_path: Path) -> None:
self.db_path = Path(db_path)
self.db_path.parent.mkdir(parents=True, exist_ok=True)
+ self._lock = threading.Lock()
# ``check_same_thread=False`` because watchdog wants to upsert from a
# different thread. We serialise access via the lock.
- self._conn = sqlite3.connect(
- str(self.db_path), check_same_thread=False, isolation_level=None,
- )
- self._lock = threading.Lock()
+ self._conn = self._connect(self.db_path)
self._init_schema()
# ------------------------------------------------------------------
# Schema
# ------------------------------------------------------------------
+ @staticmethod
+ def _connect(path: Path) -> sqlite3.Connection:
+ return sqlite3.connect(
+ str(path), check_same_thread=False, isolation_level=None,
+ )
+
+ @staticmethod
+ def _configure_connection(
+ connection: sqlite3.Connection,
+ *,
+ use_wal: bool,
+ ) -> None:
+ if use_wal:
+ connection.execute("PRAGMA journal_mode=WAL")
+ else:
+ connection.execute("PRAGMA journal_mode=DELETE")
+ connection.execute(
+ """
+ CREATE VIRTUAL TABLE IF NOT EXISTS docs_index USING fts5(
+ slug UNINDEXED,
+ title,
+ diataxis UNINDEXED,
+ phase UNINDEXED,
+ tags,
+ headings,
+ body,
+ tokenize='unicode61 remove_diacritics 2'
+ )
+ """
+ )
+
def _init_schema(self) -> None:
with self._lock:
- self._conn.executescript(
- """
- PRAGMA journal_mode=WAL;
- CREATE VIRTUAL TABLE IF NOT EXISTS docs_index USING fts5(
- slug UNINDEXED,
- title,
- diataxis UNINDEXED,
- phase UNINDEXED,
- tags,
- headings,
- body,
- tokenize='unicode61 remove_diacritics 2'
- );
- """
- )
+ self._configure_connection(self._conn, use_wal=True)
# ------------------------------------------------------------------
# Upsert / Delete
@@ -103,35 +120,90 @@ class DocSearch:
self._conn.execute("DELETE FROM docs_index WHERE slug = ?", (slug,))
def replace_all(self, docs: list[Doc]) -> None:
- """Full re-indexing — called on bootstrap and after larger reloads.
- Atomic via a transaction."""
+ """Atomically replace the index with a newly built SQLite file.
+
+ Deleting FTS rows leaves their previous pages recoverable in SQLite's
+ free list and WAL. Building a fresh file prevents retired engineering
+ docs or local paths from surviving a scope reduction in raw bytes.
+ """
+ rows = [
+ (
+ doc.frontmatter.slug,
+ doc.frontmatter.title,
+ doc.frontmatter.diataxis.value,
+ doc.frontmatter.phase,
+ " ".join(doc.frontmatter.tags),
+ " ".join(text for _level, text, _slug in doc.headings),
+ doc.body,
+ )
+ for doc in docs
+ ]
with self._lock:
- self._conn.execute("BEGIN")
+ descriptor, raw_temp_path = tempfile.mkstemp(
+ prefix=f".{self.db_path.name}.",
+ suffix=".tmp",
+ dir=self.db_path.parent,
+ )
+ os.close(descriptor)
+ temp_path = Path(raw_temp_path)
+ temp_connection: sqlite3.Connection | None = None
+ current_connection_closed = False
try:
- self._conn.execute("DELETE FROM docs_index")
- self._conn.executemany(
+ temp_connection = self._connect(temp_path)
+ # DELETE mode keeps the completed replacement self-contained;
+ # no temporary WAL can be orphaned during the rename.
+ self._configure_connection(temp_connection, use_wal=False)
+ temp_connection.execute("BEGIN IMMEDIATE")
+ temp_connection.executemany(
"""
INSERT INTO docs_index
(slug, title, diataxis, phase, tags, headings, body)
VALUES (?, ?, ?, ?, ?, ?, ?)
""",
- [
- (
- d.frontmatter.slug,
- d.frontmatter.title,
- d.frontmatter.diataxis.value,
- d.frontmatter.phase,
- " ".join(d.frontmatter.tags),
- " ".join(t for _l, t, _s in d.headings),
- d.body,
- )
- for d in docs
- ],
+ rows,
)
- self._conn.execute("COMMIT")
+ temp_connection.execute("COMMIT")
+ temp_connection.close()
+ temp_connection = None
+
+ # Flush the complete replacement before exposing it at the
+ # stable path. ``os.replace`` is atomic within this directory.
+ # Windows requires a writable descriptor for ``fsync``.
+ with temp_path.open("rb+") as replacement_file:
+ os.fsync(replacement_file.fileno())
+
+ try:
+ self._conn.close()
+ finally:
+ current_connection_closed = True
+ self._remove_sidecars(self.db_path)
+ os.replace(temp_path, self.db_path)
+
+ self._conn = self._connect(self.db_path)
+ current_connection_closed = False
+ self._configure_connection(self._conn, use_wal=True)
except Exception:
- self._conn.execute("ROLLBACK")
+ if temp_connection is not None:
+ try:
+ temp_connection.execute("ROLLBACK")
+ except sqlite3.Error:
+ pass
+ if current_connection_closed:
+ # A failed swap must leave the previous database usable.
+ self._conn = self._connect(self.db_path)
+ current_connection_closed = False
+ self._configure_connection(self._conn, use_wal=True)
raise
+ finally:
+ if temp_connection is not None:
+ temp_connection.close()
+ temp_path.unlink(missing_ok=True)
+ self._remove_sidecars(temp_path)
+
+ @staticmethod
+ def _remove_sidecars(path: Path) -> None:
+ for suffix in ("-wal", "-shm", "-journal"):
+ Path(f"{path}{suffix}").unlink(missing_ok=True)
# ------------------------------------------------------------------
# Query
diff --git a/jarvis/ui/web/docs_routes.py b/jarvis/ui/web/docs_routes.py
index 96e5a14747..eb41743c42 100644
--- a/jarvis/ui/web/docs_routes.py
+++ b/jarvis/ui/web/docs_routes.py
@@ -5,21 +5,24 @@ Endpoints:
- ``GET /api/docs/grouped`` Grouped by Diataxis quadrant — directly
usable for the sidebar tree view.
- ``GET /api/docs/search`` FTS5 full-text search with BM25 rank + snippet.
-- ``GET /api/docs/asset/{path}`` Images/static files relative to the doc path.
+- ``GET /api/docs/asset/{slug}/{path}`` Images/static files relative to a guide.
- ``GET /api/docs/{slug}`` Full body + frontmatter.
- ``POST /api/docs/reload`` Forces re-indexing (dev helper).
The router expects a ``DocRegistry`` on ``app.state.doc_registry`` —
``WebServer._setup_doc_registry()`` sets it at startup.
"""
+
from __future__ import annotations
import logging
+from pathlib import Path
from typing import Any
from fastapi import APIRouter, HTTPException, Query, Request
from fastapi.responses import FileResponse
+from jarvis.core.paths import repo_root
from jarvis.docs.registry import DocRegistry
from jarvis.docs.schema import Doc, DocDiataxis, DocStatus
@@ -32,6 +35,7 @@ router = APIRouter(prefix="/api/docs", tags=["docs"])
# Dependencies
# ----------------------------------------------------------------------
+
def _require_registry(request: Request) -> DocRegistry:
reg = getattr(request.app.state, "doc_registry", None)
if reg is None:
@@ -39,10 +43,18 @@ def _require_registry(request: Request) -> DocRegistry:
return reg
+async def _ready_registry(request: Request) -> DocRegistry:
+ """Return a populated registry, loading it on demand when necessary."""
+ reg = _require_registry(request)
+ await reg.ensure_loaded()
+ return reg
+
+
# ----------------------------------------------------------------------
# Serialization
# ----------------------------------------------------------------------
+
def _frontmatter_dump(doc: Doc) -> dict[str, Any]:
"""Pydantic ``model_dump`` with ISO date strings (instead of datetime)."""
fm = doc.frontmatter
@@ -55,6 +67,10 @@ def _frontmatter_dump(doc: Doc) -> dict[str, Any]:
"last_reviewed": fm.last_reviewed.isoformat() if fm.last_reviewed else None,
"phase": fm.phase,
"audience": fm.audience,
+ "summary": fm.summary,
+ "section": fm.section,
+ "section_order": fm.section_order,
+ "order": fm.order,
"tags": list(fm.tags),
"related": list(fm.related),
"deprecates": fm.deprecates,
@@ -70,21 +86,58 @@ def _doc_to_summary(doc: Doc) -> dict[str, Any]:
"""
return {
**_frontmatter_dump(doc),
- "path": doc.path.as_posix(),
+ "path": _safe_display_path(doc.path),
"body_hash": doc.body_hash,
- "error": doc.error,
+ "error": _safe_doc_error(doc.error),
"heading_count": len(doc.headings),
}
+def _safe_display_path(path: Path) -> str:
+ """Return a useful path without exposing a local user directory."""
+ resolved = path.resolve()
+ try:
+ return resolved.relative_to(repo_root().resolve()).as_posix()
+ except ValueError:
+ return path.name
+
+
+def _safe_doc_error(error: str | None) -> str | None:
+ """Expose an actionable category without leaking a local path or content."""
+ if error is None:
+ return None
+ category = error.partition(":")[0].strip().lower()
+ if category in {
+ "read failed",
+ "frontmatter parse failed",
+ "frontmatter schema invalid",
+ "hard failure",
+ }:
+ return category
+ return "indexing failed"
+
+
+def _doc_to_nav_summary(doc: Doc) -> dict[str, Any]:
+ """Compact sidebar payload used by the desktop Docs view."""
+ fm = doc.frontmatter
+ return {
+ "title": fm.title,
+ "slug": fm.slug,
+ "diataxis": fm.diataxis.value,
+ "summary": fm.summary,
+ "section": fm.section,
+ "section_order": fm.section_order,
+ "order": fm.order,
+ "tags": list(fm.tags),
+ "related": list(fm.related),
+ }
+
+
def _doc_to_detail(doc: Doc) -> dict[str, Any]:
"""Full payload for ``GET /api/docs/{slug}``."""
out = _doc_to_summary(doc)
out["body"] = doc.body
- out["headings"] = [
- {"level": lv, "text": txt, "slug": sl}
- for lv, txt, sl in doc.headings
- ]
+ out["headings"] = [{"level": lv, "text": txt, "slug": sl} for lv, txt, sl in doc.headings]
return out
@@ -92,30 +145,37 @@ def _doc_to_detail(doc: Doc) -> dict[str, Any]:
# List + Filter
# ----------------------------------------------------------------------
+
@router.get("")
-def list_docs(
+async def list_docs(
request: Request,
diataxis: DocDiataxis | None = None,
status: DocStatus | None = None,
phase: str | None = None,
tags: list[str] = Query(default_factory=list), # noqa: B008
) -> list[dict[str, Any]]:
- reg = _require_registry(request)
+ reg = await _ready_registry(request)
docs = reg.filter(
- diataxis=diataxis, status=status, phase=phase, tags=tags or None,
+ diataxis=diataxis,
+ status=status,
+ phase=phase,
+ tags=tags or None,
)
docs.sort(key=lambda d: (d.frontmatter.diataxis.value, d.frontmatter.title.lower()))
return [_doc_to_summary(d) for d in docs]
@router.get("/grouped")
-def grouped_docs(request: Request) -> dict[str, list[dict[str, Any]]]:
+async def grouped_docs(
+ request: Request,
+ compact: bool = False,
+) -> dict[str, list[dict[str, Any]]]:
"""Grouped by Diataxis — sidebar tree template.
Order: tutorial -> howto -> explanation -> reference ->
troubleshooting -> adr -> unclassified.
"""
- reg = _require_registry(request)
+ reg = await _ready_registry(request)
raw = reg.grouped_by_diataxis()
order = [
DocDiataxis.TUTORIAL,
@@ -126,8 +186,9 @@ def grouped_docs(request: Request) -> dict[str, list[dict[str, Any]]]:
DocDiataxis.ADR,
DocDiataxis.UNCLASSIFIED,
]
+ serializer = _doc_to_nav_summary if compact else _doc_to_summary
return {
- key.value: [_doc_to_summary(d) for d in raw.get(key, [])]
+ key.value: [serializer(d) for d in raw.get(key, [])]
for key in order
if key in raw and raw[key]
}
@@ -137,8 +198,9 @@ def grouped_docs(request: Request) -> dict[str, list[dict[str, Any]]]:
# Search
# ----------------------------------------------------------------------
+
@router.get("/search")
-def search_docs(
+async def search_docs(
request: Request,
q: str,
diataxis: DocDiataxis | None = None,
@@ -146,33 +208,39 @@ def search_docs(
) -> list[dict[str, Any]]:
if limit < 1 or limit > 100:
raise HTTPException(status_code=400, detail="limit must be between 1 and 100")
- reg = _require_registry(request)
+ reg = await _ready_registry(request)
results = reg.search_query(q, diataxis=diataxis, limit=limit)
- return [
- {
- "slug": r.slug,
- "title": r.title,
- "diataxis": r.diataxis,
- "phase": r.phase,
- "snippet": r.snippet,
- "score": r.score,
- }
- for r in results
- ]
+ payload: list[dict[str, Any]] = []
+ for result in results:
+ doc = reg.get(result.slug)
+ payload.append(
+ {
+ "slug": result.slug,
+ "title": result.title,
+ "diataxis": result.diataxis,
+ "phase": result.phase,
+ "summary": doc.frontmatter.summary if doc else "",
+ "section": doc.frontmatter.section if doc else "Other",
+ "snippet": result.snippet,
+ "score": result.score,
+ }
+ )
+ return payload
# ----------------------------------------------------------------------
# Asset (images relative to the doc path)
# ----------------------------------------------------------------------
+
@router.get("/asset/{slug}/{asset_path:path}")
-def get_asset(request: Request, slug: str, asset_path: str) -> FileResponse:
+async def get_asset(request: Request, slug: str, asset_path: str) -> FileResponse:
"""Returns a sibling file (image, diagram) relative to the doc path.
Path-traversal protection: the resolved asset must live under the
``parent`` of the doc file. Otherwise 400.
"""
- reg = _require_registry(request)
+ reg = await _ready_registry(request)
doc = reg.get(slug)
if doc is None:
raise HTTPException(status_code=404, detail=f"Doc '{slug}' not found")
@@ -183,7 +251,8 @@ def get_asset(request: Request, slug: str, asset_path: str) -> FileResponse:
target.relative_to(base)
except ValueError as exc:
raise HTTPException(
- status_code=400, detail="path traversal not allowed",
+ status_code=400,
+ detail="path traversal not allowed",
) from exc
if not target.is_file():
raise HTTPException(status_code=404, detail="asset does not exist")
@@ -194,9 +263,10 @@ def get_asset(request: Request, slug: str, asset_path: str) -> FileResponse:
# Detail (must go last — otherwise ``/{slug}`` swallows the other routes)
# ----------------------------------------------------------------------
+
@router.get("/{slug}")
-def get_doc(request: Request, slug: str) -> dict[str, Any]:
- reg = _require_registry(request)
+async def get_doc(request: Request, slug: str) -> dict[str, Any]:
+ reg = await _ready_registry(request)
doc = reg.get(slug)
if doc is None:
raise HTTPException(status_code=404, detail=f"Doc '{slug}' not found")
@@ -207,8 +277,9 @@ def get_doc(request: Request, slug: str) -> dict[str, Any]:
# Edit-this-page — opens the .md in the Windows default editor
# ----------------------------------------------------------------------
+
@router.post("/{slug}/open")
-def open_doc_in_editor(request: Request, slug: str) -> dict[str, Any]:
+async def open_doc_in_editor(request: Request, slug: str) -> dict[str, Any]:
"""Opens the Markdown file in the OS default editor.
Cross-platform via ``jarvis.platform.open_path.open_file`` (Windows
@@ -222,7 +293,7 @@ def open_doc_in_editor(request: Request, slug: str) -> dict[str, Any]:
"""
from jarvis.platform import open_path
- reg = _require_registry(request)
+ reg = await _ready_registry(request)
doc = reg.get(slug)
if doc is None:
raise HTTPException(status_code=404, detail=f"Doc '{slug}' not found")
@@ -234,15 +305,16 @@ def open_doc_in_editor(request: Request, slug: str) -> dict[str, Any]:
opened = open_path.open_file(target)
if not opened:
raise HTTPException(status_code=500, detail="editor start failed")
- return {"path": str(target), "opened": True}
+ return {"path": _safe_display_path(target), "opened": True}
# ----------------------------------------------------------------------
# Reload (dev helper)
# ----------------------------------------------------------------------
+
@router.post("/reload")
-def reload_docs(request: Request) -> dict[str, Any]:
+async def reload_docs(request: Request) -> dict[str, Any]:
reg = _require_registry(request)
- reg.reload_sync()
+ await reg.reload()
return {"total": len(reg.list())}
diff --git a/jarvis/ui/web/frontend/src/components/docs/Callout.tsx b/jarvis/ui/web/frontend/src/components/docs/Callout.tsx
index a477ac222d..04aef23724 100644
--- a/jarvis/ui/web/frontend/src/components/docs/Callout.tsx
+++ b/jarvis/ui/web/frontend/src/components/docs/Callout.tsx
@@ -50,7 +50,7 @@ export function Callout({ type = "note", children }: Props) {
variant.className,
)}
>
- <Icon className="mt-0.5 h-4 w-4 shrink-0" />
+ <Icon className="mt-0.5 h-4 w-4 shrink-0" aria-hidden="true" />
<div className="flex-1 [&>p]:m-0 [&>p+p]:mt-2">{children}</div>
</aside>
);
diff --git a/jarvis/ui/web/frontend/src/components/docs/CodeBlock.tsx b/jarvis/ui/web/frontend/src/components/docs/CodeBlock.tsx
index c21bea5191..b7b419f80a 100644
--- a/jarvis/ui/web/frontend/src/components/docs/CodeBlock.tsx
+++ b/jarvis/ui/web/frontend/src/components/docs/CodeBlock.tsx
@@ -2,14 +2,14 @@ import { useEffect, useRef, useState } from "react";
import { Check, Copy } from "lucide-react";
import { cn } from "@/lib/utils";
+import { useT } from "@/i18n";
/**
* Shiki-based code block with copy button and language tag.
*
- * Shiki is ESM-only and large (~150 KB). We lazy-load the highlighter
- * per CodeBlock mount; Shiki caches the language internally, so the second
- * mount is fast. If render-performance becomes a problem, we could switch
- * to a shared singleton — Tier-1 is pragmatic.
+ * Shiki is ESM-only and large, so each language is lazy-loaded only when a
+ * guide actually contains that kind of code. Highlighters are cached per
+ * canonical language; opening ordinary prose docs never downloads Shiki.
*
* If the language isn't recognized, fall back to ``txt`` without highlighting.
*/
@@ -17,7 +17,7 @@ type ShikiHighlighterApi = {
codeToHtml: (code: string, opts: { lang: string; theme: string }) => string;
};
-let highlighterPromise: Promise<ShikiHighlighterApi> | null = null;
+const highlighterPromises = new Map<string, Promise<ShikiHighlighterApi>>();
const SUPPORTED_LANGS = [
"bash", "shell", "sh", "powershell", "ps1",
@@ -27,15 +27,32 @@ const SUPPORTED_LANGS = [
"sql", "diff", "markdown", "md",
];
-async function loadHighlighter(): Promise<ShikiHighlighterApi> {
- if (highlighterPromise) return highlighterPromise;
- highlighterPromise = import("shiki").then(async (shiki) => {
+const LANGUAGE_ALIASES: Record<string, string> = {
+ shell: "bash",
+ sh: "bash",
+ ps1: "powershell",
+ py: "python",
+ ts: "typescript",
+ js: "javascript",
+ yml: "yaml",
+ md: "markdown",
+};
+
+function canonicalLanguage(language: string): string {
+ return LANGUAGE_ALIASES[language] ?? language;
+}
+
+async function loadHighlighter(language: string): Promise<ShikiHighlighterApi> {
+ const cached = highlighterPromises.get(language);
+ if (cached) return cached;
+ const promise = import("shiki").then(async (shiki) => {
return await shiki.createHighlighter({
themes: ["github-dark-default"],
- langs: SUPPORTED_LANGS,
+ langs: [language],
});
});
- return highlighterPromise;
+ highlighterPromises.set(language, promise);
+ return promise;
}
interface CodeBlockProps {
@@ -44,6 +61,7 @@ interface CodeBlockProps {
}
export function CodeBlock({ language, code }: CodeBlockProps) {
+ const t = useT();
const [html, setHtml] = useState<string | null>(null);
const [copied, setCopied] = useState(false);
const mountedRef = useRef(true);
@@ -57,23 +75,30 @@ export function CodeBlock({ language, code }: CodeBlockProps) {
useEffect(() => {
let cancelled = false;
- const lang = SUPPORTED_LANGS.includes(language) ? language : "txt";
+ const lang = SUPPORTED_LANGS.includes(language)
+ ? canonicalLanguage(language)
+ : "txt";
if (lang === "txt") {
setHtml(null);
return;
}
- void loadHighlighter().then((highlighter) => {
- if (cancelled || !mountedRef.current) return;
- try {
- const out = highlighter.codeToHtml(code, {
- lang,
- theme: "github-dark-default",
- });
- setHtml(out);
- } catch {
- setHtml(null);
- }
- });
+ void loadHighlighter(lang)
+ .then((highlighter) => {
+ if (cancelled || !mountedRef.current) return;
+ try {
+ const out = highlighter.codeToHtml(code, {
+ lang,
+ theme: "github-dark-default",
+ });
+ setHtml(out);
+ } catch {
+ setHtml(null);
+ }
+ })
+ .catch(() => {
+ highlighterPromises.delete(lang);
+ if (!cancelled && mountedRef.current) setHtml(null);
+ });
return () => {
cancelled = true;
};
@@ -103,13 +128,19 @@ export function CodeBlock({ language, code }: CodeBlockProps) {
"hover:bg-muted hover:text-foreground hover:opacity-100",
"group-hover:opacity-100",
)}
- title="Copy code"
+ title={t("docs_content.copy_code")}
+ aria-label={
+ copied ? t("docs_content.code_copied") : t("docs_content.copy_code")
+ }
>
{copied ? (
- <Check className="h-3 w-3 text-emerald-400" />
+ <Check className="h-3 w-3 text-emerald-400" aria-hidden="true" />
) : (
- <Copy className="h-3 w-3" />
+ <Copy className="h-3 w-3" aria-hidden="true" />
)}
+ <span className="sr-only" aria-live="polite">
+ {copied ? t("docs_content.code_copied") : ""}
+ </span>
</button>
</div>
{/* Body — either Shiki HTML or plain text */}
diff --git a/jarvis/ui/web/frontend/src/components/docs/DocsContent.test.tsx b/jarvis/ui/web/frontend/src/components/docs/DocsContent.test.tsx
new file mode 100644
index 0000000000..99e5573a46
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/components/docs/DocsContent.test.tsx
@@ -0,0 +1,79 @@
+import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
+import { cleanup, fireEvent, render, screen, waitFor } from "@testing-library/react";
+import { afterEach, describe, expect, it, vi } from "vitest";
+
+import * as openExternal from "@/lib/openExternal";
+import { DocsContent } from "./DocsContent";
+
+afterEach(() => {
+ cleanup();
+ vi.unstubAllGlobals();
+ vi.restoreAllMocks();
+});
+
+describe("DocsContent", () => {
+ it("opens external guide links through the desktop-safe browser bridge", async () => {
+ vi.stubGlobal(
+ "fetch",
+ vi.fn(async (input: RequestInfo | URL) => {
+ const url = String(input);
+ if (url.includes("/api/docs/grouped")) {
+ return new Response(JSON.stringify({}), {
+ status: 200,
+ headers: { "Content-Type": "application/json" },
+ });
+ }
+ return new Response(
+ JSON.stringify({
+ title: "A useful guide",
+ slug: "useful-guide",
+ diataxis: "howto",
+ status: "active",
+ owner: "maintainers",
+ last_reviewed: "2026-07-15",
+ phase: "public",
+ audience: "end-user",
+ summary: "Learn how the feature works without unnecessary complexity.",
+ section: "Start Here",
+ section_order: 1,
+ order: 1,
+ tags: [],
+ related: [],
+ deprecates: null,
+ deprecated_by: null,
+ next_review_due: null,
+ version_min: null,
+ path: "useful-guide.md",
+ body_hash: "hash",
+ error: null,
+ heading_count: 1,
+ body: "## Next Steps\n\nRead the [online docs](https://personaljarvis.ai/docs/).",
+ headings: [{ level: 2, text: "Next Steps", slug: "next-steps" }],
+ }),
+ { status: 200, headers: { "Content-Type": "application/json" } },
+ );
+ }),
+ );
+ const openSpy = vi
+ .spyOn(openExternal, "openExternalUrl")
+ .mockResolvedValue(undefined);
+ const client = new QueryClient({
+ defaultOptions: { queries: { retry: false, gcTime: 0 } },
+ });
+
+ render(
+ <QueryClientProvider client={client}>
+ <DocsContent
+ slug="useful-guide"
+ onSelect={() => {}}
+ onShowOverview={() => {}}
+ />
+ </QueryClientProvider>,
+ );
+
+ const link = await waitFor(() => screen.getByRole("link", { name: "online docs" }));
+ fireEvent.click(link);
+
+ expect(openSpy).toHaveBeenCalledWith("https://personaljarvis.ai/docs/");
+ });
+});
diff --git a/jarvis/ui/web/frontend/src/components/docs/DocsContent.tsx b/jarvis/ui/web/frontend/src/components/docs/DocsContent.tsx
index 3065c32f74..6ce5420f45 100644
--- a/jarvis/ui/web/frontend/src/components/docs/DocsContent.tsx
+++ b/jarvis/ui/web/frontend/src/components/docs/DocsContent.tsx
@@ -1,13 +1,12 @@
import { useMemo } from "react";
import type { Components } from "react-markdown";
import {
- Loader2,
FileWarning,
- BookOpen,
ChevronLeft,
ChevronRight,
Clock,
- ExternalLink,
+ Link2,
+ RefreshCw,
} from "lucide-react";
import ReactMarkdown from "react-markdown";
import remarkGfm from "remark-gfm";
@@ -17,109 +16,129 @@ import rehypeAutolinkHeadings from "rehype-autolink-headings";
import {
useDocDetail,
useDocsGrouped,
- useDocsList,
- useOpenDocInEditor,
+ buildDocSections,
DIATAXIS_ORDER,
} from "@/hooks/useDocs";
-import type { DocSummary } from "@/hooks/useDocs";
-import { DocTypeBadge } from "./DocTypeBadge";
+import type { DocNavSummary } from "@/hooks/useDocs";
+import { DocsOverview } from "./DocsOverview";
import { CodeBlock } from "./CodeBlock";
import { Callout, parseCalloutTag, type CalloutType } from "./Callout";
-import { useT } from "@/i18n";
+import { useT, useUiLanguage } from "@/i18n";
+import { openExternalUrl } from "@/lib/openExternal";
interface Props {
slug: string | null;
- onSelect?: (slug: string) => void;
+ onSelect: (slug: string) => void;
+ onShowOverview: () => void;
}
-export function DocsContent({ slug, onSelect }: Props) {
- const t = useT();
+export function DocsContent({ slug, onSelect, onShowOverview }: Props) {
if (!slug) {
- return (
- <div className="flex h-full items-center justify-center text-center">
- <div className="max-w-sm text-muted-foreground">
- <BookOpen className="mx-auto mb-3 h-10 w-10 opacity-40" />
- <p className="text-sm">
- Pick a doc from the sidebar or press{" "}
- <kbd className="rounded border border-border bg-muted px-1 text-xs">
- Ctrl+K
- </kbd>{" "}
- {t("docs.for_fulltext")}
- </p>
- </div>
- </div>
- );
+ return <DocsOverview onSelect={onSelect} />;
}
- return <DocsContentInner slug={slug} onSelect={onSelect} />;
+ return (
+ <DocsContentInner
+ slug={slug}
+ onSelect={onSelect}
+ onShowOverview={onShowOverview}
+ />
+ );
}
function DocsContentInner({
slug,
onSelect,
+ onShowOverview,
}: {
slug: string;
- onSelect?: (slug: string) => void;
+ onSelect: (slug: string) => void;
+ onShowOverview: () => void;
}) {
const t = useT();
- const { data, isLoading, error } = useDocDetail(slug);
+ const uiLanguage = useUiLanguage();
+ const { data, isLoading, isFetching, error, refetch } = useDocDetail(slug);
const grouped = useDocsGrouped();
- const list = useDocsList();
const neighbors = computeNeighbors(grouped.data, slug);
- const openInEditor = useOpenDocInEditor();
// Slug index for cross-link resolution: a Set for O(1) lookup in the
// ``a`` renderer. If a Markdown link points to a known slug, the click
// navigates internally instead of externally.
const knownSlugs = useMemo<Set<string>>(() => {
- return new Set((list.data ?? []).map((d) => d.slug));
- }, [list.data]);
+ const slugs: string[] = [];
+ for (const kind of DIATAXIS_ORDER) {
+ for (const doc of grouped.data?.[kind] ?? []) slugs.push(doc.slug);
+ }
+ return new Set(slugs);
+ }, [grouped.data]);
+ const relatedDocs = useMemo(() => {
+ const bySlug = new Map(
+ buildDocSections(grouped.data)
+ .flatMap((section) => section.docs)
+ .map((doc) => [doc.slug, doc]),
+ );
+ return data?.related
+ .map((relatedSlug) => bySlug.get(relatedSlug))
+ .filter((doc): doc is DocNavSummary => doc !== undefined) ?? [];
+ }, [data?.related, grouped.data]);
+ const reviewedDate = useMemo(
+ () => formatReviewDate(data?.last_reviewed, uiLanguage),
+ [data?.last_reviewed, uiLanguage],
+ );
if (isLoading) {
- return (
- <div className="flex h-full items-center justify-center">
- <Loader2 className="h-5 w-5 animate-spin text-muted-foreground" />
- </div>
- );
+ return <DocPageSkeleton />;
}
if (error || !data) {
return (
- <div className="flex h-full items-center justify-center text-destructive">
- <FileWarning className="mr-2 h-5 w-5" />
- {t("docs.could_not_load")}
+ <div className="flex min-h-full items-center justify-center px-8 text-center">
+ <div className="max-w-sm rounded-xl border border-destructive/30 bg-destructive/5 p-6">
+ <FileWarning className="mx-auto h-6 w-6 text-destructive" aria-hidden="true" />
+ <p className="mt-3 text-sm font-medium text-foreground">
+ {t("docs.could_not_load")}
+ </p>
+ <button
+ type="button"
+ onClick={() => void refetch()}
+ className="mt-4 inline-flex items-center gap-2 rounded-md border border-border bg-card px-3 py-2 text-xs font-medium transition hover:bg-muted"
+ >
+ <RefreshCw
+ className={
+ isFetching
+ ? "h-3.5 w-3.5 animate-spin motion-reduce:animate-none"
+ : "h-3.5 w-3.5"
+ }
+ aria-hidden="true"
+ />
+ {t("docs_overview.retry")}
+ </button>
+ </div>
</div>
);
}
return (
- <article className="prose prose-neutral dark:prose-invert prose-sm mx-auto max-w-2xl px-8 py-8 prose-headings:scroll-mt-20 prose-code:before:hidden prose-code:after:hidden prose-a:text-primary prose-a:no-underline hover:prose-a:underline">
- {/* Header — frontmatter snippet */}
- <header className="not-prose mb-8 border-b border-border pb-4">
- <div className="mb-2 flex flex-wrap items-center gap-2">
- <DocTypeBadge diataxis={data.diataxis} />
- {data.phase !== "-" && (
- <span className="rounded-md border border-border bg-muted/40 px-1.5 py-0.5 text-[10px] uppercase tracking-wide text-muted-foreground">
- Phase {data.phase}
- </span>
- )}
- {data.tags.map((tag) => (
- <span
- key={tag}
- className="rounded-md bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground"
- >
- #{tag}
- </span>
- ))}
- </div>
- <h1 className="m-0 text-2xl font-semibold tracking-tight">
+ <article className="prose prose-neutral dark:prose-invert prose-base mx-auto max-w-3xl px-8 py-10 prose-headings:scroll-mt-20 prose-headings:text-pretty prose-p:text-pretty prose-code:before:hidden prose-code:after:hidden prose-a:text-primary prose-a:no-underline hover:prose-a:underline lg:px-10">
+ <header className="not-prose mb-9 border-b border-border pb-6">
+ <nav
+ aria-label="Breadcrumb"
+ className="mb-4 flex items-center gap-1.5 text-xs text-muted-foreground"
+ >
+ <button
+ type="button"
+ onClick={onShowOverview}
+ className="rounded-sm transition-colors hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
+ >
+ {t("docs_content.breadcrumb")}
+ </button>
+ <ChevronRight className="h-3 w-3" aria-hidden="true" />
+ <span className="text-foreground/80" aria-current="page">
+ {data.section}
+ </span>
+ </nav>
+ <h1 className="m-0 text-pretty text-3xl font-semibold tracking-tight">
{data.title}
</h1>
- <p className="mt-1 text-xs text-muted-foreground">
- <span>Slug: {data.slug}</span>
- {data.last_reviewed && (
- <> · last reviewed: {data.last_reviewed}</>
- )}
- {data.error && (
- <span className="ml-2 text-destructive">· {data.error}</span>
- )}
+ <p className="mt-3 max-w-2xl text-pretty text-base leading-7 text-muted-foreground">
+ {data.summary}
</p>
</header>
@@ -137,32 +156,20 @@ function DocsContentInner({
{data.body}
</ReactMarkdown>
- {/* Footer — last-updated + prev/next pager */}
+ {relatedDocs.length > 0 && (
+ <RelatedGuides docs={relatedDocs} onSelect={onSelect} />
+ )}
+
<footer className="not-prose mt-12 border-t border-border pt-6">
- <div className="mb-4 flex flex-wrap items-center gap-3 text-xs text-muted-foreground">
+ <div className="mb-4 flex flex-wrap items-center gap-2 text-xs text-muted-foreground">
<span className="flex items-center gap-1.5">
- <Clock className="h-3 w-3" />
+ <Clock className="h-3 w-3" aria-hidden="true" />
{data.last_reviewed ? (
- <>Last reviewed on {data.last_reviewed}</>
+ <>{t("docs_content.last_reviewed")} {reviewedDate}</>
) : (
- <>No <code>last_reviewed</code> set</>
+ <>{t("docs_content.review_unavailable")}</>
)}
</span>
- <span>·</span>
- <span>
- Owner:{" "}
- <span className="font-medium text-foreground/80">{data.owner}</span>
- </span>
- <button
- type="button"
- onClick={() => openInEditor.mutate(data.slug)}
- disabled={openInEditor.isPending}
- className="ml-auto inline-flex items-center gap-1 rounded-md border border-border bg-card/40 px-2 py-1 text-[11px] transition hover:bg-muted/40 disabled:opacity-50"
- title={t("common.open_in_editor")}
- >
- <ExternalLink className="h-3 w-3" />
- {openInEditor.isPending ? "opening…" : "Open in editor"}
- </button>
</div>
<div className="grid grid-cols-1 gap-3 sm:grid-cols-2">
@@ -187,17 +194,11 @@ function DocsContentInner({
// ----------------------------------------------------------------------
function computeNeighbors(
- grouped: Record<string, DocSummary[]> | undefined,
+ grouped: Partial<Record<string, DocNavSummary[]>> | undefined,
currentSlug: string,
-): { prev: DocSummary | null; next: DocSummary | null } {
+): { prev: DocNavSummary | null; next: DocNavSummary | null } {
if (!grouped) return { prev: null, next: null };
- // We flatten the sidebar order: Diataxis order, alphabetical within each
- // group (matching how the backend's ``grouped_by_diataxis`` sorts).
- const flat: DocSummary[] = [];
- for (const kind of DIATAXIS_ORDER) {
- const items = grouped[kind];
- if (items) flat.push(...items);
- }
+ const flat = buildDocSections(grouped).flatMap((section) => section.docs);
const idx = flat.findIndex((d) => d.slug === currentSlug);
if (idx === -1) return { prev: null, next: null };
return {
@@ -211,9 +212,9 @@ function NavCard({
direction,
onSelect,
}: {
- doc: DocSummary | null;
+ doc: DocNavSummary | null;
direction: "prev" | "next";
- onSelect?: (slug: string) => void;
+ onSelect: (slug: string) => void;
}) {
const t = useT();
if (!doc) return <div />;
@@ -222,20 +223,100 @@ function NavCard({
return (
<button
type="button"
- onClick={() => onSelect?.(doc.slug)}
+ onClick={() => onSelect(doc.slug)}
className={`flex flex-col gap-1 rounded-md border border-border bg-card/40 p-3 text-left transition hover:bg-muted/40 ${align}`}
>
<span className="flex items-center gap-1 text-[10px] uppercase tracking-wider text-muted-foreground">
- {direction === "prev" ? <Icon className="h-3 w-3" /> : null}
+ {direction === "prev" ? <Icon className="h-3 w-3" aria-hidden="true" /> : null}
{direction === "prev" ? t("docs_content.prev") : t("docs_content.next")}
- {direction === "next" ? <Icon className="h-3 w-3" /> : null}
+ {direction === "next" ? <Icon className="h-3 w-3" aria-hidden="true" /> : null}
</span>
<span className="text-sm font-medium">{doc.title}</span>
- <DocTypeBadge diataxis={doc.diataxis} />
+ <span className="text-xs leading-5 text-muted-foreground">{doc.summary}</span>
</button>
);
}
+function formatReviewDate(value: string | null | undefined, locale: string): string {
+ if (!value) return "";
+ const date = new Date(`${value}T00:00:00Z`);
+ if (Number.isNaN(date.getTime())) return value;
+ const localeName = locale === "de" ? "de-DE" : locale === "es" ? "es-ES" : "en-US";
+ return new Intl.DateTimeFormat(localeName, {
+ dateStyle: "medium",
+ timeZone: "UTC",
+ }).format(date);
+}
+
+function RelatedGuides({
+ docs,
+ onSelect,
+}: {
+ docs: DocNavSummary[];
+ onSelect: (slug: string) => void;
+}) {
+ const t = useT();
+ return (
+ <section
+ className="not-prose mt-12 border-t border-border pt-8"
+ aria-labelledby="related-guides-title"
+ >
+ <div className="mb-4 flex items-center gap-2">
+ <Link2 className="h-4 w-4 text-primary" aria-hidden="true" />
+ <h2 id="related-guides-title" className="text-lg font-semibold">
+ {t("docs_content.related_guides")}
+ </h2>
+ </div>
+ <div className="grid gap-3 sm:grid-cols-2">
+ {docs.map((doc) => (
+ <button
+ key={doc.slug}
+ type="button"
+ onClick={() => onSelect(doc.slug)}
+ className="rounded-lg border border-border bg-card/30 p-4 text-left transition-colors hover:border-primary/30 hover:bg-card/60"
+ >
+ <span className="text-sm font-semibold text-foreground">{doc.title}</span>
+ <span className="mt-1.5 block text-xs leading-5 text-muted-foreground">
+ {doc.summary}
+ </span>
+ </button>
+ ))}
+ </div>
+ </section>
+ );
+}
+
+function DocPageSkeleton() {
+ const t = useT();
+ return (
+ <div className="mx-auto min-h-full w-full max-w-3xl px-8 py-10" role="status">
+ <div className="flex items-center gap-2 text-xs text-muted-foreground">
+ <RefreshCw
+ className="h-3.5 w-3.5 animate-spin text-primary motion-reduce:animate-none"
+ aria-hidden="true"
+ />
+ {t("docs_overview.loading_page")}
+ </div>
+ <div className="mt-6 animate-pulse motion-reduce:animate-none">
+ <div className="h-3 w-24 rounded-full bg-muted" />
+ <div className="mt-4 h-8 w-3/5 rounded-md bg-muted" />
+ <div className="mt-4 h-px bg-border" />
+ <div className="mt-8 space-y-3">
+ <div className="h-3 w-full rounded-full bg-muted/80" />
+ <div className="h-3 w-11/12 rounded-full bg-muted/80" />
+ <div className="h-3 w-4/5 rounded-full bg-muted/80" />
+ </div>
+ <div className="mt-10 h-5 w-2/5 rounded-full bg-muted" />
+ <div className="mt-5 space-y-3">
+ <div className="h-3 w-full rounded-full bg-muted/80" />
+ <div className="h-3 w-5/6 rounded-full bg-muted/80" />
+ <div className="h-28 rounded-lg border border-border bg-card/40" />
+ </div>
+ </div>
+ </div>
+ );
+}
+
// ----------------------------------------------------------------------
// Markdown custom components
// ----------------------------------------------------------------------
@@ -288,6 +369,12 @@ function resolveLink(
function makeMarkdownComponents(ctx: MarkdownContext): Components {
return {
+ // Fenced blocks render their own complete container. Unwrapping the
+ // Markdown ``pre`` avoids invalid ``pre > div`` nesting around CodeBlock.
+ pre({ children }) {
+ return <>{children}</>;
+ },
+
// Code block (with language tag) becomes the Shiki component.
code({ className, children, ...rest }) {
const match = /language-(\w+)/.exec(className || "");
@@ -339,7 +426,15 @@ function makeMarkdownComponents(ctx: MarkdownContext): Components {
}
if (resolved.kind === "external") {
return (
- <a href={href} target="_blank" rel="noopener noreferrer" {...rest}>
+ <a
+ href={href}
+ onClick={(event) => {
+ event.preventDefault();
+ void openExternalUrl(href ?? "");
+ }}
+ rel="noopener noreferrer"
+ {...rest}
+ >
{children}
</a>
);
diff --git a/jarvis/ui/web/frontend/src/components/docs/DocsOverview.test.tsx b/jarvis/ui/web/frontend/src/components/docs/DocsOverview.test.tsx
new file mode 100644
index 0000000000..f5a9d36279
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/components/docs/DocsOverview.test.tsx
@@ -0,0 +1,75 @@
+import { afterEach, describe, expect, it, vi } from "vitest";
+import { cleanup, fireEvent, render, screen, waitFor } from "@testing-library/react";
+import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
+
+import { DocsOverview } from "./DocsOverview";
+import * as openExternal from "@/lib/openExternal";
+
+function renderOverview() {
+ const client = new QueryClient({
+ defaultOptions: { queries: { retry: false, gcTime: 0 } },
+ });
+ return render(
+ <QueryClientProvider client={client}>
+ <DocsOverview onSelect={() => {}} />
+ </QueryClientProvider>,
+ );
+}
+
+afterEach(() => {
+ cleanup();
+ vi.unstubAllGlobals();
+ vi.restoreAllMocks();
+});
+
+describe("DocsOverview", () => {
+ it("shows a full loading surface while the local index is pending", () => {
+ vi.stubGlobal("fetch", vi.fn(() => new Promise(() => {})));
+
+ renderOverview();
+
+ expect(screen.getByText("Preparing your documentation")).toBeTruthy();
+ expect(screen.getByRole("status")).toBeTruthy();
+ });
+
+ it("renders local quick links and opens the redesigned online docs", async () => {
+ vi.stubGlobal(
+ "fetch",
+ vi.fn(async () =>
+ new Response(
+ JSON.stringify({
+ unclassified: [
+ {
+ title: "Architecture overview",
+ slug: "architecture-overview",
+ diataxis: "unclassified",
+ summary: "See how the main parts work together.",
+ section: "Reference",
+ section_order: 7,
+ order: 1,
+ tags: [],
+ related: [],
+ },
+ ],
+ }),
+ { status: 200, headers: { "Content-Type": "application/json" } },
+ ),
+ ),
+ );
+ const openSpy = vi
+ .spyOn(openExternal, "openExternalUrl")
+ .mockResolvedValue(undefined);
+
+ renderOverview();
+
+ await waitFor(() => {
+ expect(screen.getByText("Architecture overview")).toBeTruthy();
+ expect(screen.getByText("Browse by Topic")).toBeTruthy();
+ });
+ fireEvent.click(
+ screen.getByRole("link", { name: /open redesigned online docs/i }),
+ );
+
+ expect(openSpy).toHaveBeenCalledWith("https://personaljarvis.ai/docs/");
+ });
+});
diff --git a/jarvis/ui/web/frontend/src/components/docs/DocsOverview.tsx b/jarvis/ui/web/frontend/src/components/docs/DocsOverview.tsx
new file mode 100644
index 0000000000..42400b2f59
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/components/docs/DocsOverview.tsx
@@ -0,0 +1,235 @@
+import { useMemo } from "react";
+import {
+ ArrowRight,
+ BookOpen,
+ ExternalLink,
+ FileWarning,
+ Loader2,
+ RefreshCw,
+} from "lucide-react";
+
+import {
+ buildDocSections,
+ useDocsGrouped,
+ type DocSection,
+ type DocNavSummary,
+} from "@/hooks/useDocs";
+import { useT } from "@/i18n";
+import { openExternalUrl } from "@/lib/openExternal";
+
+const ONLINE_DOCS_URL = "https://personaljarvis.ai/docs/";
+interface Props {
+ onSelect: (slug: string) => void;
+}
+
+export function DocsOverview({ onSelect }: Props) {
+ const t = useT();
+ const { data, isLoading, isFetching, error, refetch } = useDocsGrouped();
+
+ const sections = useMemo(() => buildDocSections(data), [data]);
+ const allDocs = useMemo(
+ () => sections.flatMap((section) => section.docs),
+ [sections],
+ );
+ const featured = allDocs.slice(0, 4);
+
+ return (
+ <section className="mx-auto min-h-full w-full max-w-5xl px-8 py-10 lg:px-12">
+ <div className="border-b border-border pb-8">
+ <div className="mb-4 flex items-center gap-2 text-[10px] font-semibold uppercase tracking-[0.24em] text-primary">
+ <BookOpen className="h-3.5 w-3.5" aria-hidden="true" />
+ {t("docs_overview.eyebrow")}
+ </div>
+ <h1 className="text-3xl font-semibold tracking-tight text-foreground lg:text-4xl">
+ {t("docs_overview.title")}
+ </h1>
+ <p className="mt-3 max-w-2xl text-sm leading-6 text-muted-foreground">
+ {t("docs_overview.description")}
+ </p>
+ <a
+ href={ONLINE_DOCS_URL}
+ onClick={(event) => {
+ event.preventDefault();
+ void openExternalUrl(ONLINE_DOCS_URL);
+ }}
+ rel="noopener noreferrer"
+ className="mt-5 inline-flex items-center gap-2 rounded-md border border-primary/30 bg-primary/10 px-3 py-2 text-xs font-medium text-primary transition hover:border-primary/60 hover:bg-primary/15"
+ >
+ {t("docs_overview.online_docs")}
+ <ExternalLink className="h-3.5 w-3.5" aria-hidden="true" />
+ </a>
+ </div>
+
+ {isLoading ? (
+ <OverviewSkeleton />
+ ) : error ? (
+ <div className="mt-8 rounded-xl border border-destructive/30 bg-destructive/5 p-6">
+ <div className="flex items-start gap-3">
+ <FileWarning className="mt-0.5 h-5 w-5 text-destructive" aria-hidden="true" />
+ <div>
+ <h2 className="text-sm font-semibold">
+ {t("docs_overview.load_failed_title")}
+ </h2>
+ <p className="mt-1 text-xs leading-5 text-muted-foreground">
+ {t("docs_overview.load_failed_description")}
+ </p>
+ <button
+ type="button"
+ onClick={() => void refetch()}
+ className="mt-4 inline-flex items-center gap-2 rounded-md border border-border bg-card px-3 py-2 text-xs font-medium transition hover:bg-muted"
+ >
+ <RefreshCw
+ className={
+ isFetching
+ ? "h-3.5 w-3.5 animate-spin motion-reduce:animate-none"
+ : "h-3.5 w-3.5"
+ }
+ aria-hidden="true"
+ />
+ {t("docs_overview.retry")}
+ </button>
+ </div>
+ </div>
+ </div>
+ ) : featured.length === 0 ? (
+ <div className="mt-8 rounded-xl border border-border bg-card/40 p-8 text-center">
+ <BookOpen className="mx-auto h-8 w-8 text-muted-foreground/50" aria-hidden="true" />
+ <h2 className="mt-3 text-sm font-semibold">
+ {t("docs_overview.empty_title")}
+ </h2>
+ <p className="mt-1 text-xs text-muted-foreground">
+ {t("docs_overview.empty_description")}
+ </p>
+ </div>
+ ) : (
+ <div className="mt-10">
+ <div className="mb-5 flex items-end justify-between gap-4">
+ <div>
+ <h2 className="text-lg font-semibold">
+ {t("docs_overview.local_library")}
+ </h2>
+ <p className="mt-1 text-xs text-muted-foreground">
+ {t("docs_overview.local_library_description")}
+ </p>
+ </div>
+ <span className="shrink-0 font-mono text-[10px] uppercase tracking-wider text-muted-foreground">
+ {allDocs.length} {t("docs_sidebar.documents")}
+ </span>
+ </div>
+
+ <div className="grid gap-3 sm:grid-cols-2">
+ {featured.map((doc) => (
+ <DocCard key={doc.slug} doc={doc} onSelect={onSelect} />
+ ))}
+ </div>
+
+ <div className="mt-12 border-t border-border pt-8">
+ <h2 className="text-lg font-semibold">
+ {t("docs_overview.browse_by_topic")}
+ </h2>
+ <p className="mt-1 text-xs text-muted-foreground">
+ {t("docs_overview.browse_description")}
+ </p>
+ <div className="mt-5 grid gap-3 md:grid-cols-2 xl:grid-cols-3">
+ {sections.map((section) => (
+ <SectionCard key={section.name} section={section} onSelect={onSelect} />
+ ))}
+ </div>
+ </div>
+ </div>
+ )}
+ </section>
+ );
+}
+
+function DocCard({
+ doc,
+ onSelect,
+}: {
+ doc: DocNavSummary;
+ onSelect: (slug: string) => void;
+}) {
+ return (
+ <button
+ type="button"
+ onClick={() => onSelect(doc.slug)}
+ className="group flex min-h-36 flex-col rounded-xl border border-border bg-card/30 p-5 text-left transition hover:border-primary/30 hover:bg-card/70 motion-safe:hover:-translate-y-0.5"
+ >
+ <span className="font-mono text-[10px] uppercase tracking-wider text-muted-foreground">
+ {doc.section}
+ </span>
+ <span className="mt-2 flex items-center gap-2 text-sm font-semibold text-foreground group-hover:text-primary">
+ {doc.title}
+ <ArrowRight className="h-3.5 w-3.5 transition motion-safe:group-hover:translate-x-0.5" aria-hidden="true" />
+ </span>
+ <span className="mt-3 text-xs leading-5 text-muted-foreground">
+ {doc.summary}
+ </span>
+ </button>
+ );
+}
+
+function SectionCard({
+ section,
+ onSelect,
+}: {
+ section: DocSection;
+ onSelect: (slug: string) => void;
+}) {
+ const t = useT();
+ const first = section.docs[0];
+ return (
+ <button
+ type="button"
+ onClick={() => onSelect(first.slug)}
+ className="group rounded-lg border border-border bg-card/20 p-4 text-left transition-colors hover:border-primary/30 hover:bg-card/60"
+ >
+ <span className="flex items-center justify-between gap-3 text-sm font-semibold">
+ {section.name}
+ <ArrowRight className="h-3.5 w-3.5 text-muted-foreground transition-transform motion-safe:group-hover:translate-x-0.5" aria-hidden="true" />
+ </span>
+ <span className="mt-2 block text-xs leading-5 text-muted-foreground">
+ {first.summary}
+ </span>
+ <span className="mt-3 block text-[10px] uppercase tracking-wider text-muted-foreground/70">
+ {section.docs.length}{" "}
+ {section.docs.length === 1
+ ? t("docs_overview.guide")
+ : t("docs_overview.guides")}
+ </span>
+ </button>
+ );
+}
+
+function OverviewSkeleton() {
+ const t = useT();
+ return (
+ <div className="mt-8" role="status" aria-live="polite">
+ <div className="flex items-start gap-3 rounded-xl border border-primary/20 bg-primary/5 p-4">
+ <Loader2
+ className="mt-0.5 h-4 w-4 animate-spin text-primary motion-reduce:animate-none"
+ aria-hidden="true"
+ />
+ <div>
+ <p className="text-sm font-medium">{t("docs_overview.indexing_title")}</p>
+ <p className="mt-1 text-xs leading-5 text-muted-foreground">
+ {t("docs_overview.indexing_description")}
+ </p>
+ </div>
+ </div>
+ <div className="mt-8 animate-pulse motion-reduce:animate-none">
+ <div className="h-4 w-36 rounded-full bg-muted" />
+ <div className="mt-2 h-3 w-72 max-w-full rounded-full bg-muted/70" />
+ <div className="mt-5 grid gap-3 sm:grid-cols-2">
+ {[0, 1, 2, 3].map((item) => (
+ <div key={item} className="h-28 rounded-xl border border-border bg-card/30 p-5">
+ <div className="h-2 w-20 rounded-full bg-muted" />
+ <div className="mt-4 h-3 w-3/5 rounded-full bg-muted" />
+ <div className="mt-5 h-2 w-2/5 rounded-full bg-muted/60" />
+ </div>
+ ))}
+ </div>
+ </div>
+ </div>
+ );
+}
diff --git a/jarvis/ui/web/frontend/src/components/docs/DocsSearchModal.test.tsx b/jarvis/ui/web/frontend/src/components/docs/DocsSearchModal.test.tsx
new file mode 100644
index 0000000000..65b3ce1f5f
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/components/docs/DocsSearchModal.test.tsx
@@ -0,0 +1,68 @@
+import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
+import { cleanup, fireEvent, render, screen, waitFor } from "@testing-library/react";
+import { afterEach, describe, expect, it, vi } from "vitest";
+
+import { DocsSearchModal, renderSearchSnippet } from "./DocsSearchModal";
+
+afterEach(() => {
+ cleanup();
+ vi.unstubAllGlobals();
+});
+
+describe("renderSearchSnippet", () => {
+ it("renders only search highlights and keeps all other markup inert", () => {
+ const { container } = render(
+ <div>
+ {renderSearchSnippet(
+ '<img src=x onerror="alert(1)"><mark>voice</mark><script>bad()</script>',
+ )}
+ </div>,
+ );
+
+ expect(container.querySelector("mark")?.textContent).toBe("voice");
+ expect(container.querySelector("img")).toBeNull();
+ expect(container.querySelector("script")).toBeNull();
+ expect(container.textContent).toContain("<img");
+ expect(container.textContent).toContain("<script>");
+ });
+
+ it("distinguishes a failed search from an empty result", async () => {
+ vi.stubGlobal(
+ "ResizeObserver",
+ class {
+ observe() {}
+ unobserve() {}
+ disconnect() {}
+ },
+ );
+ vi.stubGlobal(
+ "fetch",
+ vi.fn(async () =>
+ new Response(JSON.stringify({ detail: "Search unavailable" }), {
+ status: 503,
+ headers: { "Content-Type": "application/json" },
+ }),
+ ),
+ );
+ const client = new QueryClient({
+ defaultOptions: { queries: { retry: false, gcTime: 0 } },
+ });
+
+ render(
+ <QueryClientProvider client={client}>
+ <DocsSearchModal open onOpenChange={() => {}} onSelect={() => {}} />
+ </QueryClientProvider>,
+ );
+ fireEvent.change(screen.getByRole("combobox"), {
+ target: { value: "voice" },
+ });
+
+ await waitFor(() => {
+ expect(screen.getByRole("alert").textContent).toContain(
+ "Search could not be loaded.",
+ );
+ });
+ expect(screen.queryByText('No results for "voice"')).toBeNull();
+ expect(screen.getByRole("button", { name: "Try again" })).toBeTruthy();
+ });
+});
diff --git a/jarvis/ui/web/frontend/src/components/docs/DocsSearchModal.tsx b/jarvis/ui/web/frontend/src/components/docs/DocsSearchModal.tsx
index e490177f0b..0bd2f9c0f7 100644
--- a/jarvis/ui/web/frontend/src/components/docs/DocsSearchModal.tsx
+++ b/jarvis/ui/web/frontend/src/components/docs/DocsSearchModal.tsx
@@ -1,10 +1,9 @@
import { useEffect, useState } from "react";
import * as Dialog from "@radix-ui/react-dialog";
import { Command } from "cmdk";
-import { Search, FileText } from "lucide-react";
+import { FileText, FileWarning, RefreshCw, Search } from "lucide-react";
import { useDocSearch } from "@/hooks/useDocs";
-import { DocTypeBadge } from "./DocTypeBadge";
import { cn } from "@/lib/utils";
import { useT } from "@/i18n";
@@ -15,18 +14,23 @@ interface Props {
}
/**
- * Full-text search modal — cmdk + Radix dialog. Anthropic/Tailwind-style
- * pattern: Ctrl+K opens it, typing shows live results, Enter jumps to the doc.
+ * Full-text search modal. Ctrl+K opens it, typing shows live results, and
+ * Enter opens the selected guide.
*
- * The backend FTS5 returns ``snippet`` HTML with ``<mark>`` tags for
- * highlights; we render that with ``dangerouslySetInnerHTML`` because it's
- * only our own doc bodies (no user input, no XSS risk).
+ * FTS5 surrounds matches with ``<mark>`` tags. ``renderSearchSnippet`` turns
+ * only those markers into React elements and keeps every other character as
+ * text, so documentation content can never inject HTML into the dialog.
*/
export function DocsSearchModal({ open, onOpenChange, onSelect }: Props) {
const t = useT();
const [query, setQuery] = useState("");
const debouncedQuery = useDebounced(query, 150);
- const { data: results = [], isFetching } = useDocSearch(
+ const {
+ data: results = [],
+ isFetching,
+ error,
+ refetch,
+ } = useDocSearch(
debouncedQuery,
undefined,
open,
@@ -40,17 +44,23 @@ export function DocsSearchModal({ open, onOpenChange, onSelect }: Props) {
return (
<Dialog.Root open={open} onOpenChange={onOpenChange}>
<Dialog.Portal>
- <Dialog.Overlay className="fixed inset-0 z-40 bg-black/60 backdrop-blur-sm data-[state=open]:animate-in data-[state=open]:fade-in-0" />
- <Dialog.Content className="fixed left-1/2 top-[15%] z-50 w-[min(640px,calc(100vw-2rem))] -translate-x-1/2 overflow-hidden rounded-lg border border-border bg-card shadow-2xl data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95">
+ <Dialog.Overlay className="fixed inset-0 z-40 bg-black/60 backdrop-blur-sm data-[state=open]:animate-in data-[state=open]:fade-in-0 motion-reduce:animate-none" />
+ <Dialog.Content className="fixed left-1/2 top-[15%] z-50 w-[min(640px,calc(100vw-2rem))] -translate-x-1/2 overflow-hidden rounded-lg border border-border bg-card shadow-2xl data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 motion-reduce:animate-none">
<Dialog.Title className="sr-only">{t("docs.search_modal_title")}</Dialog.Title>
+ <Dialog.Description className="sr-only">
+ {t("docs.search_hint")}
+ </Dialog.Description>
<Command shouldFilter={false} loop>
{/* Header / Input */}
<div className="flex items-center gap-2 border-b border-border px-3 py-2">
- <Search className="h-4 w-4 shrink-0 text-muted-foreground" />
+ <Search className="h-4 w-4 shrink-0 text-muted-foreground" aria-hidden="true" />
<Command.Input
value={query}
onValueChange={setQuery}
placeholder={t("docs.search_modal_placeholder")}
+ aria-label={t("docs.search_modal_title")}
+ name="docs-search"
+ autoComplete="off"
autoFocus
className="flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"
/>
@@ -69,6 +79,25 @@ export function DocsSearchModal({ open, onOpenChange, onSelect }: Props) {
<div className="px-3 py-6 text-center text-xs text-muted-foreground">
{t("docs.search_loading")}
</div>
+ ) : error ? (
+ <div
+ className="flex flex-col items-center px-3 py-6 text-center text-xs text-muted-foreground"
+ role="alert"
+ >
+ <FileWarning
+ className="mb-2 h-4 w-4 text-destructive"
+ aria-hidden="true"
+ />
+ <span>{t("docs.search_failed")}</span>
+ <button
+ type="button"
+ onClick={() => void refetch()}
+ className="mt-3 inline-flex items-center gap-1.5 rounded-md border border-border bg-card px-3 py-1.5 font-medium text-foreground transition-colors hover:bg-muted"
+ >
+ <RefreshCw className="h-3 w-3" aria-hidden="true" />
+ {t("docs.search_retry")}
+ </button>
+ </div>
) : results.length === 0 ? (
<Command.Empty className="px-3 py-6 text-center text-xs text-muted-foreground">
{t("docs.no_results").replace("{0}", debouncedQuery)}
@@ -88,16 +117,17 @@ export function DocsSearchModal({ open, onOpenChange, onSelect }: Props) {
)}
>
<div className="flex items-center gap-2">
- <FileText className="h-3 w-3 shrink-0 text-muted-foreground" />
+ <FileText className="h-3 w-3 shrink-0 text-muted-foreground" aria-hidden="true" />
<span className="flex-1 truncate font-medium">
{r.title}
</span>
- <DocTypeBadge diataxis={r.diataxis} className="shrink-0" />
+ <span className="shrink-0 text-[10px] uppercase tracking-wider text-muted-foreground">
+ {r.section}
+ </span>
+ </div>
+ <div className="ml-5 line-clamp-2 text-xs text-muted-foreground [&>mark]:bg-yellow-500/30 [&>mark]:text-foreground">
+ {renderSearchSnippet(r.snippet)}
</div>
- <div
- className="ml-5 line-clamp-2 text-xs text-muted-foreground [&>mark]:bg-yellow-500/30 [&>mark]:text-foreground"
- dangerouslySetInnerHTML={{ __html: r.snippet }}
- />
</Command.Item>
))
)}
@@ -121,6 +151,22 @@ export function DocsSearchModal({ open, onOpenChange, onSelect }: Props) {
);
}
+export function renderSearchSnippet(value: string): React.ReactNode {
+ const parts = value.split(/(<mark>|<\/mark>)/gi);
+ let marked = false;
+ return parts.map((part, index) => {
+ if (part.toLowerCase() === "<mark>") {
+ marked = true;
+ return null;
+ }
+ if (part.toLowerCase() === "</mark>") {
+ marked = false;
+ return null;
+ }
+ return marked ? <mark key={index}>{part}</mark> : part;
+ });
+}
+
/** A very simple debounce hook — avoids pulling in an extra lib. */
function useDebounced<T>(value: T, delayMs: number): T {
const [debounced, setDebounced] = useState(value);
diff --git a/jarvis/ui/web/frontend/src/components/docs/DocsSidebar.tsx b/jarvis/ui/web/frontend/src/components/docs/DocsSidebar.tsx
index d201277fb6..4fcfa85418 100644
--- a/jarvis/ui/web/frontend/src/components/docs/DocsSidebar.tsx
+++ b/jarvis/ui/web/frontend/src/components/docs/DocsSidebar.tsx
@@ -1,102 +1,143 @@
import { useMemo, useState } from "react";
-import { ChevronDown, ChevronRight, Clock, FileText, Search } from "lucide-react";
+import {
+ ChevronDown,
+ ChevronRight,
+ Clock,
+ FileText,
+ Loader2,
+ RefreshCw,
+ Search,
+} from "lucide-react";
import { ScrollArea } from "@/components/ui/scroll-area";
import { cn } from "@/lib/utils";
import {
- DIATAXIS_LABELS,
- DIATAXIS_ORDER,
+ buildDocSections,
useDocsGrouped,
- type DocDiataxis,
- type DocSummary,
+ type DocNavSummary,
} from "@/hooks/useDocs";
import { useRecentDocs } from "@/hooks/useRecentDocs";
-import { DocTypeBadge } from "./DocTypeBadge";
import { useT } from "@/i18n";
interface Props {
selectedSlug: string | null;
onSelect: (slug: string) => void;
+ onShowOverview: () => void;
onOpenSearch: () => void;
}
-export function DocsSidebar({ selectedSlug, onSelect, onOpenSearch }: Props) {
+export function DocsSidebar({
+ selectedSlug,
+ onSelect,
+ onShowOverview,
+ onOpenSearch,
+}: Props) {
const t = useT();
- const { data, isLoading, error } = useDocsGrouped();
+ const { data, isLoading, isFetching, error, refetch } = useDocsGrouped();
const { recent } = useRecentDocs();
const [query, setQuery] = useState("");
- const [collapsed, setCollapsed] = useState<Set<DocDiataxis>>(new Set());
+ const [collapsed, setCollapsed] = useState<Set<string>>(new Set());
+
+ const sections = useMemo(() => buildDocSections(data), [data]);
- const filteredGroups = useMemo(() => {
- if (!data) return null;
+ const filteredSections = useMemo(() => {
const q = query.trim().toLowerCase();
- if (!q) return data;
- const out = {} as Record<DocDiataxis, DocSummary[]>;
- for (const key of DIATAXIS_ORDER) {
- const items = data[key];
- if (!items) continue;
- const filtered = items.filter(
- (d) =>
+ if (!q) return sections;
+ return sections
+ .map((section) => ({
+ ...section,
+ docs: section.docs.filter(
+ (d) =>
d.title.toLowerCase().includes(q) ||
+ d.summary.toLowerCase().includes(q) ||
d.slug.toLowerCase().includes(q) ||
d.tags.some((t) => t.toLowerCase().includes(q)),
- );
- if (filtered.length) out[key] = filtered;
- }
- return out;
- }, [data, query]);
+ ),
+ }))
+ .filter((section) => section.docs.length > 0);
+ }, [query, sections]);
const totalCount = useMemo(() => {
- if (!filteredGroups) return 0;
- return Object.values(filteredGroups).reduce(
- (acc, items) => acc + (items?.length ?? 0),
- 0,
- );
- }, [filteredGroups]);
+ return filteredSections.reduce((acc, section) => acc + section.docs.length, 0);
+ }, [filteredSections]);
return (
<aside className="flex h-full w-72 shrink-0 flex-col border-r border-border bg-card/40">
{/* Header */}
<div className="border-b border-border px-3 py-3">
<div className="mb-2 flex items-center justify-between">
- <h2 className="text-sm font-semibold tracking-tight">
+ <button
+ type="button"
+ onClick={onShowOverview}
+ className="rounded-sm text-sm font-semibold tracking-tight transition-colors hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
+ >
{t("docs_sidebar.title")}
- </h2>
+ </button>
<button
type="button"
onClick={onOpenSearch}
title={t("docs.fulltext_search")}
+ aria-label={t("docs.fulltext_search")}
className="rounded-md p-1 text-muted-foreground transition hover:bg-muted hover:text-foreground"
>
- <Search className="h-4 w-4" />
+ <Search className="h-4 w-4" aria-hidden="true" />
</button>
</div>
+ <label htmlFor="docs-sidebar-filter" className="sr-only">
+ {t("docs.search_placeholder")}
+ </label>
<input
+ id="docs-sidebar-filter"
+ name="docs-filter"
type="text"
placeholder={t("docs.search_placeholder")}
+ autoComplete="off"
value={query}
onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
setQuery(e.target.value)
}
className="flex h-8 w-full rounded-md border border-input bg-background px-2 text-xs ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
/>
- <p className="mt-1 text-[11px] text-muted-foreground">
- {isLoading
- ? t("common.loading")
- : error
- ? t("docs_sidebar.error")
- : `${totalCount} Doc${totalCount === 1 ? "" : "s"}`}
- </p>
+ {isLoading ? (
+ <div
+ className="mt-2 flex items-center gap-2 text-[11px] text-muted-foreground"
+ role="status"
+ >
+ <Loader2 className="h-3 w-3 animate-spin text-primary motion-reduce:animate-none" aria-hidden="true" />
+ <span>{t("docs_sidebar.indexing")}</span>
+ </div>
+ ) : error ? (
+ <button
+ type="button"
+ onClick={() => void refetch()}
+ className="mt-2 inline-flex items-center gap-1.5 text-[11px] text-destructive transition hover:text-destructive/80"
+ >
+ <RefreshCw
+ className={cn(
+ "h-3 w-3",
+ isFetching && "animate-spin motion-reduce:animate-none",
+ )}
+ aria-hidden="true"
+ />
+ {t("docs_sidebar.retry")}
+ </button>
+ ) : (
+ <p className="mt-1 text-[11px] text-muted-foreground">
+ {totalCount} {t("docs_sidebar.documents")}
+ </p>
+ )}
</div>
{/* Tree */}
<ScrollArea className="flex-1">
<div className="px-2 py-2">
+ {isLoading && <SidebarSkeleton />}
+
{/* Recent docs — only when not filtered + at least 1 entry */}
- {!query && recent.length > 0 && (
+ {!isLoading && !query && recent.length > 0 && (
<div className="mb-2">
<div className="flex w-full items-center gap-1 rounded-md px-2 py-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground">
- <Clock className="h-3 w-3" />
+ <Clock className="h-3 w-3" aria-hidden="true" />
<span>{t("docs.recent")}</span>
<span className="ml-auto text-[10px] font-normal text-muted-foreground/70">
{recent.length}
@@ -116,46 +157,43 @@ export function DocsSidebar({ selectedSlug, onSelect, onOpenSearch }: Props) {
)}
title={doc.title}
>
- <FileText className="mt-0.5 h-3 w-3 shrink-0 text-muted-foreground" />
+ <FileText className="mt-0.5 h-3 w-3 shrink-0 text-muted-foreground" aria-hidden="true" />
<span className="flex-1 break-words leading-snug line-clamp-2">
{doc.title}
</span>
- <DocTypeBadge diataxis={doc.diataxis} className="mt-0.5 shrink-0" />
</button>
))}
<div className="my-2 border-b border-border/40" />
</div>
)}
- {filteredGroups &&
- DIATAXIS_ORDER.map((kind) => {
- const items = filteredGroups[kind];
- if (!items?.length) return null;
- const isCollapsed = collapsed.has(kind);
+ {filteredSections.map((section) => {
+ const isCollapsed = collapsed.has(section.name);
return (
- <div key={kind} className="mb-2">
+ <div key={section.name} className="mb-2">
<button
type="button"
onClick={() => {
const next = new Set(collapsed);
- if (isCollapsed) next.delete(kind);
- else next.add(kind);
+ if (isCollapsed) next.delete(section.name);
+ else next.add(section.name);
setCollapsed(next);
}}
+ aria-expanded={!isCollapsed}
className="flex w-full items-center gap-1 rounded-md px-2 py-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground hover:bg-muted/50"
>
{isCollapsed ? (
- <ChevronRight className="h-3 w-3" />
+ <ChevronRight className="h-3 w-3" aria-hidden="true" />
) : (
- <ChevronDown className="h-3 w-3" />
+ <ChevronDown className="h-3 w-3" aria-hidden="true" />
)}
- <span>{DIATAXIS_LABELS[kind]}</span>
+ <span>{section.name}</span>
<span className="ml-auto text-[10px] font-normal text-muted-foreground/70">
- {items.length}
+ {section.docs.length}
</span>
</button>
{!isCollapsed &&
- items.map((doc) => (
+ section.docs.map((doc) => (
<SidebarItem
key={doc.slug}
doc={doc}
@@ -166,6 +204,12 @@ export function DocsSidebar({ selectedSlug, onSelect, onOpenSearch }: Props) {
</div>
);
})}
+
+ {!isLoading && !error && totalCount === 0 && (
+ <div className="px-3 py-8 text-center text-xs text-muted-foreground">
+ {t("docs_sidebar.no_results")}
+ </div>
+ )}
</div>
</ScrollArea>
</aside>
@@ -173,11 +217,35 @@ export function DocsSidebar({ selectedSlug, onSelect, onOpenSearch }: Props) {
}
interface ItemProps {
- doc: DocSummary;
+ doc: DocNavSummary;
active: boolean;
onClick: () => void;
}
+function SidebarSkeleton() {
+ return (
+ <div
+ className="animate-pulse space-y-5 px-2 py-2 motion-reduce:animate-none"
+ aria-hidden="true"
+ >
+ {[4, 3, 5].map((rows, group) => (
+ <div key={group} className="space-y-2">
+ <div className="h-2 w-24 rounded-full bg-muted" />
+ {Array.from({ length: rows }, (_, row) => (
+ <div key={row} className="flex items-center gap-2 py-1">
+ <div className="h-3 w-3 rounded-sm bg-muted/80" />
+ <div
+ className="h-2.5 rounded-full bg-muted/80"
+ style={{ width: `${58 + ((row + group) % 3) * 12}%` }}
+ />
+ </div>
+ ))}
+ </div>
+ ))}
+ </div>
+ );
+}
+
function SidebarItem({ doc, active, onClick }: ItemProps) {
// Doc titles should be fully readable (user mandate 2026-04-29) —
// ``break-words`` allows wrapping inside German compound words,
@@ -190,6 +258,7 @@ function SidebarItem({ doc, active, onClick }: ItemProps) {
type="button"
onClick={onClick}
data-active={active || undefined}
+ aria-current={active ? "page" : undefined}
className={cn(
"flex w-full items-start gap-2 rounded-md px-2 py-1.5 text-left text-xs transition",
"hover:bg-muted/60",
@@ -198,7 +267,7 @@ function SidebarItem({ doc, active, onClick }: ItemProps) {
)}
title={doc.title}
>
- <FileText className="mt-0.5 h-3 w-3 shrink-0 text-muted-foreground" />
+ <FileText className="mt-0.5 h-3 w-3 shrink-0 text-muted-foreground" aria-hidden="true" />
<span className="flex-1 break-words leading-snug line-clamp-2">
{doc.title}
</span>
diff --git a/jarvis/ui/web/frontend/src/components/docs/DocsToc.tsx b/jarvis/ui/web/frontend/src/components/docs/DocsToc.tsx
index ef9771dd06..b1bbd9d862 100644
--- a/jarvis/ui/web/frontend/src/components/docs/DocsToc.tsx
+++ b/jarvis/ui/web/frontend/src/components/docs/DocsToc.tsx
@@ -1,8 +1,9 @@
-import { useEffect, useState } from "react";
+import { useEffect, useMemo, useState } from "react";
import { ScrollArea } from "@/components/ui/scroll-area";
import { cn } from "@/lib/utils";
import type { DocHeading } from "@/hooks/useDocs";
+import { useT } from "@/i18n";
interface Props {
headings: DocHeading[];
@@ -20,10 +21,14 @@ interface Props {
* the active state.
*/
export function DocsToc({ headings, contentRef }: Props) {
+ const t = useT();
const [activeSlug, setActiveSlug] = useState<string | null>(null);
// TOC only for H2 + H3 — tutorial mid-point checks and ADR subsections.
- const tocHeadings = headings.filter((h) => h.level >= 2 && h.level <= 3);
+ const tocHeadings = useMemo(
+ () => headings.filter((heading) => heading.level >= 2 && heading.level <= 3),
+ [headings],
+ );
useEffect(() => {
if (!tocHeadings.length || !contentRef.current) return;
@@ -51,6 +56,7 @@ export function DocsToc({ headings, contentRef }: Props) {
}
},
{
+ root: container,
// A heading becomes active when it's in the top 20% of the viewport.
rootMargin: "0px 0px -80% 0px",
threshold: 0,
@@ -62,17 +68,18 @@ export function DocsToc({ headings, contentRef }: Props) {
}, [tocHeadings, contentRef]);
if (!tocHeadings.length) {
- return (
- <aside className="hidden h-full w-64 shrink-0 border-l border-border xl:block" />
- );
+ return null;
}
return (
- <aside className="hidden h-full w-64 shrink-0 border-l border-border xl:block">
+ <aside
+ className="hidden h-full w-64 shrink-0 border-l border-border xl:block"
+ aria-label={t("docs_content.on_this_page")}
+ >
<ScrollArea className="h-full">
<div className="px-4 py-6">
<h3 className="mb-3 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground">
- On this page
+ {t("docs_content.on_this_page")}
</h3>
<ul className="space-y-1 text-xs">
{tocHeadings.map((h) => (
@@ -80,6 +87,7 @@ export function DocsToc({ headings, contentRef }: Props) {
<a
href={`#${h.slug}`}
onClick={(e) => handleClick(e, h.slug)}
+ aria-current={activeSlug === h.slug ? "location" : undefined}
className={cn(
"block rounded py-0.5 transition",
"text-muted-foreground hover:text-foreground",
@@ -103,7 +111,13 @@ function handleClick(e: React.MouseEvent<HTMLAnchorElement>, slug: string) {
e.preventDefault();
const el = document.getElementById(slug);
if (el) {
- el.scrollIntoView({ behavior: "smooth", block: "start" });
+ const reduceMotion = window.matchMedia(
+ "(prefers-reduced-motion: reduce)",
+ ).matches;
+ el.scrollIntoView({
+ behavior: reduceMotion ? "auto" : "smooth",
+ block: "start",
+ });
// Update the URL hash without a full reload
window.history.replaceState(null, "", `#${slug}`);
}
diff --git a/jarvis/ui/web/frontend/src/hooks/useDocs.test.ts b/jarvis/ui/web/frontend/src/hooks/useDocs.test.ts
new file mode 100644
index 0000000000..74dc9ee0cb
--- /dev/null
+++ b/jarvis/ui/web/frontend/src/hooks/useDocs.test.ts
@@ -0,0 +1,50 @@
+import { describe, expect, it } from "vitest";
+
+import {
+ buildDocSections,
+ type DocDiataxis,
+ type DocNavSummary,
+} from "./useDocs";
+
+function doc(
+ slug: string,
+ section: string,
+ sectionOrder: number,
+ order: number,
+ diataxis: DocDiataxis = "howto",
+): DocNavSummary {
+ return {
+ title: slug,
+ slug,
+ summary: `Learn about ${slug}.`,
+ section,
+ section_order: sectionOrder,
+ order,
+ diataxis,
+ tags: [],
+ related: [],
+ };
+}
+
+describe("buildDocSections", () => {
+ it("uses reader journey metadata instead of Diataxis buckets", () => {
+ const sections = buildDocSections({
+ explanation: [doc("welcome", "Start Here", 1, 1, "explanation")],
+ howto: [
+ doc("voice", "Everyday Use", 2, 2),
+ doc("chat", "Everyday Use", 2, 1),
+ ],
+ });
+
+ expect(sections.map((section) => section.name)).toEqual([
+ "Start Here",
+ "Everyday Use",
+ ]);
+ expect(sections[1].docs.map((item) => item.slug)).toEqual(["chat", "voice"]);
+ });
+
+ it("falls back safely for legacy metadata", () => {
+ const legacy = doc("legacy", "", 999, 999);
+ expect(buildDocSections({ howto: [legacy] })[0].name).toBe("Other");
+ });
+});
diff --git a/jarvis/ui/web/frontend/src/hooks/useDocs.ts b/jarvis/ui/web/frontend/src/hooks/useDocs.ts
index b75ea55c08..85488e0363 100644
--- a/jarvis/ui/web/frontend/src/hooks/useDocs.ts
+++ b/jarvis/ui/web/frontend/src/hooks/useDocs.ts
@@ -26,6 +26,10 @@ export interface DocSummary {
last_reviewed: string | null;
phase: string;
audience: DocAudience;
+ summary: string;
+ section: string;
+ section_order: number;
+ order: number;
tags: string[];
related: string[];
deprecates: string | null;
@@ -38,6 +42,18 @@ export interface DocSummary {
heading_count: number;
}
+export interface DocNavSummary {
+ title: string;
+ slug: string;
+ diataxis: DocDiataxis;
+ summary: string;
+ section: string;
+ section_order: number;
+ order: number;
+ tags: string[];
+ related: string[];
+}
+
export interface DocHeading {
level: number;
text: string;
@@ -54,6 +70,8 @@ export interface DocSearchResult {
title: string;
diataxis: DocDiataxis;
phase: string;
+ summary: string;
+ section: string;
snippet: string;
score: number;
}
@@ -79,37 +97,93 @@ export const DIATAXIS_LABELS: Record<DocDiataxis, string> = {
unclassified: "Unclassified",
};
+export interface DocSection {
+ name: string;
+ order: number;
+ docs: DocNavSummary[];
+}
+
+/** Build the reader navigation from compact API metadata. */
+export function buildDocSections(
+ grouped: Partial<Record<DocDiataxis, DocNavSummary[]>> | undefined,
+): DocSection[] {
+ const bySection = new Map<string, DocSection>();
+ for (const kind of DIATAXIS_ORDER) {
+ for (const doc of grouped?.[kind] ?? []) {
+ const name = doc.section || "Other";
+ const existing = bySection.get(name);
+ if (existing) {
+ existing.order = Math.min(existing.order, doc.section_order);
+ existing.docs.push(doc);
+ } else {
+ bySection.set(name, {
+ name,
+ order: doc.section_order,
+ docs: [doc],
+ });
+ }
+ }
+ }
+ const sections = [...bySection.values()].map((section) => ({
+ ...section,
+ docs: [...section.docs].sort(
+ (a, b) => a.order - b.order || a.title.localeCompare(b.title),
+ ),
+ }));
+ return sections.sort(
+ (a, b) => a.order - b.order || a.name.localeCompare(b.name),
+ );
+}
+
// ----------------------------------------------------------------------
// Fetchers
// ----------------------------------------------------------------------
-async function fetchDocsGrouped(): Promise<Record<DocDiataxis, DocSummary[]>> {
- const res = await fetch("/api/docs/grouped");
- if (!res.ok) throw new Error(`HTTP ${res.status}`);
- return res.json();
+const DOC_REQUEST_TIMEOUT_MS = 8_000;
+
+async function fetchDocsJson<T>(url: string, init?: RequestInit): Promise<T> {
+ const controller = new AbortController();
+ const timeout = window.setTimeout(
+ () => controller.abort(),
+ DOC_REQUEST_TIMEOUT_MS,
+ );
+ try {
+ const res = await fetch(url, { ...init, signal: controller.signal });
+ const body = (await res.json().catch(() => null)) as unknown;
+ if (!res.ok) {
+ const detail =
+ body && typeof body === "object" && "detail" in body
+ ? String((body as { detail: unknown }).detail)
+ : `HTTP ${res.status}`;
+ throw new Error(detail);
+ }
+ return body as T;
+ } catch (error) {
+ if (error instanceof DOMException && error.name === "AbortError") {
+ throw new Error("Documentation request timed out");
+ }
+ throw error;
+ } finally {
+ window.clearTimeout(timeout);
+ }
+}
+
+async function fetchDocsGrouped(): Promise<Partial<Record<DocDiataxis, DocNavSummary[]>>> {
+ return fetchDocsJson("/api/docs/grouped?compact=true");
}
async function fetchDocsList(): Promise<DocSummary[]> {
- const res = await fetch("/api/docs");
- if (!res.ok) throw new Error(`HTTP ${res.status}`);
- return res.json();
+ return fetchDocsJson("/api/docs");
}
async function fetchDocDetail(slug: string): Promise<DocDetail> {
- const res = await fetch(`/api/docs/${encodeURIComponent(slug)}`);
- if (!res.ok) throw new Error(`HTTP ${res.status}`);
- return res.json();
+ return fetchDocsJson(`/api/docs/${encodeURIComponent(slug)}`);
}
async function openDocInEditor(slug: string): Promise<{ path: string }> {
- const res = await fetch(`/api/docs/${encodeURIComponent(slug)}/open`, {
+ return fetchDocsJson(`/api/docs/${encodeURIComponent(slug)}/open`, {
method: "POST",
});
- if (!res.ok) {
- const body = await res.json().catch(() => ({}));
- throw new Error(body.detail ?? `HTTP ${res.status}`);
- }
- return res.json();
}
async function fetchDocSearch(
@@ -119,9 +193,7 @@ async function fetchDocSearch(
): Promise<DocSearchResult[]> {
const params = new URLSearchParams({ q, limit: String(limit) });
if (diataxis) params.set("diataxis", diataxis);
- const res = await fetch(`/api/docs/search?${params}`);
- if (!res.ok) throw new Error(`HTTP ${res.status}`);
- return res.json();
+ return fetchDocsJson(`/api/docs/search?${params}`);
}
// ----------------------------------------------------------------------
@@ -132,7 +204,8 @@ export function useDocsGrouped() {
return useQuery({
queryKey: ["docs", "grouped"],
queryFn: fetchDocsGrouped,
- staleTime: 30_000,
+ staleTime: 5 * 60_000,
+ retry: false,
});
}
@@ -150,6 +223,7 @@ export function useDocDetail(slug: string | null) {
queryFn: () => fetchDocDetail(slug!),
enabled: slug !== null,
staleTime: 60_000,
+ retry: false,
});
}
@@ -169,5 +243,6 @@ export function useDocSearch(
queryFn: () => fetchDocSearch(q, diataxis),
enabled: enabled && q.trim().length > 0,
staleTime: 5_000,
+ retry: false,
});
}
diff --git a/jarvis/ui/web/frontend/src/views/DocsView.tsx b/jarvis/ui/web/frontend/src/views/DocsView.tsx
index 865892a975..72220d58c0 100644
--- a/jarvis/ui/web/frontend/src/views/DocsView.tsx
+++ b/jarvis/ui/web/frontend/src/views/DocsView.tsx
@@ -6,6 +6,7 @@ import { DocsToc } from "@/components/docs/DocsToc";
import { DocsSearchModal } from "@/components/docs/DocsSearchModal";
import { useDocDetail } from "@/hooks/useDocs";
import { useRecentDocs } from "@/hooks/useRecentDocs";
+import { useT } from "@/i18n";
/**
* Top-level view for the docs section. 3-column layout (Anthropic/Mintlify style):
@@ -24,7 +25,10 @@ import { useRecentDocs } from "@/hooks/useRecentDocs";
* search modal in ChatsView/MissionsView etc.
*/
export function DocsView() {
- const [selectedSlug, setSelectedSlug] = useState<string | null>(null);
+ const t = useT();
+ const [selectedSlug, setSelectedSlug] = useState<string | null>(() => {
+ return new URLSearchParams(window.location.search).get("doc");
+ });
const [searchOpen, setSearchOpen] = useState(false);
const contentRef = useRef<HTMLElement>(null);
const { push: pushRecent } = useRecentDocs();
@@ -44,8 +48,31 @@ export function DocsView() {
}
}, [detail.data, pushRecent]);
+ // A copied ``?doc=slug#heading`` link resolves before the async Markdown
+ // exists. Scroll once the requested guide has rendered.
+ useEffect(() => {
+ if (!detail.data || !window.location.hash) return;
+ const headingId = decodeURIComponent(window.location.hash.slice(1));
+ window.requestAnimationFrame(() => {
+ document.getElementById(headingId)?.scrollIntoView({ block: "start" });
+ });
+ }, [detail.data]);
+
const selectDoc = useCallback((slug: string) => {
setSelectedSlug(slug);
+ const url = new URL(window.location.href);
+ url.searchParams.set("doc", slug);
+ url.hash = "";
+ window.history.replaceState(null, "", url);
+ contentRef.current?.scrollTo({ top: 0 });
+ }, []);
+
+ const showOverview = useCallback(() => {
+ setSelectedSlug(null);
+ const url = new URL(window.location.href);
+ url.searchParams.delete("doc");
+ url.hash = "";
+ window.history.replaceState(null, "", url);
contentRef.current?.scrollTo({ top: 0 });
}, []);
@@ -62,17 +89,30 @@ export function DocsView() {
}, []);
return (
- <div className="flex h-full">
+ <div className="flex h-full min-h-0 bg-background">
+ <a
+ href="#docs-content"
+ className="sr-only z-50 rounded-md bg-background px-3 py-2 text-sm text-foreground focus:not-sr-only focus:absolute focus:left-3 focus:top-3 focus-visible:ring-2 focus-visible:ring-ring"
+ >
+ {t("docs_content.skip_to_content")}
+ </a>
<DocsSidebar
selectedSlug={selectedSlug}
onSelect={selectDoc}
+ onShowOverview={showOverview}
onOpenSearch={() => setSearchOpen(true)}
/>
<main
+ id="docs-content"
ref={contentRef as React.RefObject<HTMLElement>}
- className="flex-1 overflow-y-auto"
+ tabIndex={-1}
+ className="min-w-0 flex-1 overflow-y-auto"
>
- <DocsContent slug={selectedSlug} onSelect={selectDoc} />
+ <DocsContent
+ slug={selectedSlug}
+ onSelect={selectDoc}
+ onShowOverview={showOverview}
+ />
</main>
<DocsToc headings={headings} contentRef={contentRef} />
diff --git a/scripts/ci/check_public_docs.py b/scripts/ci/check_public_docs.py
new file mode 100644
index 0000000000..1b56029851
--- /dev/null
+++ b/scripts/ci/check_public_docs.py
@@ -0,0 +1,599 @@
+#!/usr/bin/env python3
+"""Validate the reader-facing ``docs/product`` documentation corpus.
+
+The public documentation is a product surface, not a loose collection of
+Markdown files. This check keeps its navigation metadata, cross-links,
+readability, and privacy contract consistent. Findings intentionally contain
+only a path and a stable category: content matched by the privacy checks is
+never echoed to a terminal or CI log.
+
+Usage:
+ python scripts/ci/check_public_docs.py [PATH ...]
+
+With no PATH, every Markdown file below ``docs/product`` is checked.
+"""
+
+from __future__ import annotations
+
+import argparse
+import datetime as dt
+import re
+import sys
+from collections import defaultdict
+from collections.abc import Iterable
+from dataclasses import dataclass
+from pathlib import Path
+from typing import Any
+
+import yaml
+
+REPO_ROOT = Path(__file__).resolve().parents[2]
+DEFAULT_CORPUS = REPO_ROOT / "docs" / "product"
+DEFAULT_MANIFEST = REPO_ROOT / "docs" / "authoring" / "public-docs-manifest.yaml"
+
+MANIFEST_PAGE_FIELDS = (
+ "file",
+ "title",
+ "slug",
+ "summary",
+ "diataxis",
+ "section",
+ "section_order",
+ "order",
+ "related",
+)
+
+REQUIRED_FIELDS = (
+ "title",
+ "slug",
+ "summary",
+ "diataxis",
+ "status",
+ "owner",
+ "last_reviewed",
+ "audience",
+ "section",
+ "section_order",
+ "order",
+ "tags",
+ "related",
+)
+ALLOWED_DIATAXIS = {
+ "tutorial",
+ "howto",
+ "reference",
+ "explanation",
+ "troubleshooting",
+ "adr",
+}
+ALLOWED_AUDIENCES = {"end-user", "operator"}
+REQUIRED_SECTIONS = {
+ "how it fits together",
+ "check that it works",
+ "troubleshooting",
+ "next steps",
+}
+MIN_SUMMARY_CHARS = 80
+MAX_SUMMARY_CHARS = 160
+MIN_BODY_WORDS = 120
+MAX_BODY_WORDS = 2_500
+MAX_CODE_BLOCK_LINES = 25
+
+SLUG_RE = re.compile(r"^[a-z0-9]+(?:-[a-z0-9]+)*(?:/[a-z0-9]+(?:-[a-z0-9]+)*)*$")
+HEADING_RE = re.compile(r"^(#{1,6})\s+(.+?)\s*$")
+FENCE_RE = re.compile(r"^\s*(`{3,}|~{3,})(?:[^`]*)$")
+MARKDOWN_LINK_RE = re.compile(r"(?<!!)\[[^\]]+\]\(([^)\s]+)")
+WORD_RE = re.compile(r"\b[\w'-]+\b", re.UNICODE)
+UNFINISHED_RE = re.compile(
+ r"(?ix)"
+ r"\b(?:TODO|FIXME|TBD|TBC|WIP)\b|"
+ r"\?\?\?|"
+ r"\blorem\s+ipsum\b|"
+ r"\bcoming\s+soon\b|"
+ r"\b(?:fill|write)\s+(?:this|me)\s+in\b|"
+ r"\bplaceholder\b|"
+ r"<\s*insert\b[^>]*>"
+)
+
+# Privacy patterns are intentionally broad for a public, end-user corpus.
+# Obvious documentation placeholders are filtered separately below.
+EMAIL_RE = re.compile(
+ r"(?i)\b[A-Z0-9.!#$%&'*+/=?^_`{|}~-]+@"
+ r"[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?"
+ r"(?:\.[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?)+\b"
+)
+WINDOWS_USER_PATH_RE = re.compile(r"(?i)\b[A-Z]:\\Users\\([^\\\s]+)(?:\\|\b)")
+WINDOWS_SAFE_USERS = {
+ "<user>",
+ "<username>",
+ "user",
+ "username",
+ "yourname",
+ "example",
+ "public",
+ "default",
+ "%username%",
+ "${username}",
+}
+SID_RE = re.compile(r"\bS-1-5-21-(?:\d{8,10}-){2}\d{8,10}-\d{3,10}\b")
+PRIVATE_KEY_RE = re.compile(
+ r"-----BEGIN (?:[A-Z0-9 ]+ )?PRIVATE KEY-----"
+ r"[\r\n]+[A-Za-z0-9+/=\r\n]{40,}?"
+ r"-----END (?:[A-Z0-9 ]+ )?PRIVATE KEY-----"
+)
+KNOWN_SECRET_RE = re.compile(
+ r"(?x)\b(?:"
+ r"sk-(?:ant-)?[A-Za-z0-9_-]{20,}|"
+ r"ghp_[A-Za-z0-9]{30,}|"
+ r"github_pat_[A-Za-z0-9_]{30,}|"
+ r"glpat-[A-Za-z0-9_-]{20,}|"
+ r"xox[baprs]-[A-Za-z0-9-]{20,}|"
+ r"AKIA[A-Z0-9]{16}|"
+ r"AIza[A-Za-z0-9_-]{30,}|"
+ r"sk_live_[A-Za-z0-9]{20,}"
+ r")\b"
+)
+ASSIGNMENT_RE = re.compile(
+ r"(?ix)(?<![A-Za-z0-9])(?:"
+ r"api[_-]?(?:key|token)|access[_-]?token|auth[_-]?token|client[_-]?secret|"
+ r"secret[_-]?key|password|passphrase|credential|token"
+ r")\b\s*(?:=|:)\s*[\"']?([^\s\"'`,;]+)"
+)
+SAFE_EMAIL_DOMAINS = {"example.com", "example.org", "example.net"}
+SAFE_VALUE_RE = re.compile(
+ r"(?ix)^(?:"
+ r"<[^>]+>|\$\{[^}]+\}|\{\{[^}]+\}\}|"
+ r"(?:your|example|sample|demo|test|fake|dummy)[-_a-z0-9]*|"
+ r"replace[-_ ]?me|change[-_ ]?me|x{3,}|\*{3,}"
+ r")$"
+)
+
+
+@dataclass(frozen=True)
+class Page:
+ """A parsed documentation page used for corpus-level validation."""
+
+ path: Path
+ display_path: str
+ metadata: dict[str, Any]
+ body: str
+
+
+Finding = tuple[str, str]
+
+
+def _display_path(path: Path) -> str:
+ try:
+ return path.resolve().relative_to(REPO_ROOT).as_posix()
+ except ValueError:
+ return path.as_posix()
+
+
+def _discover(paths: Iterable[Path]) -> tuple[list[Path], list[Finding]]:
+ files: set[Path] = set()
+ findings: list[Finding] = []
+ for path in paths:
+ path = path.resolve()
+ if not path.exists():
+ findings.append((_display_path(path), "corpus.path-missing"))
+ elif path.is_file():
+ if path.suffix.lower() == ".md":
+ files.add(path)
+ else:
+ findings.append((_display_path(path), "corpus.not-markdown"))
+ else:
+ files.update(candidate.resolve() for candidate in path.rglob("*.md"))
+ if not files and not findings:
+ root = next(iter(paths), DEFAULT_CORPUS)
+ findings.append((_display_path(root), "corpus.empty"))
+ return sorted(files), findings
+
+
+def _parse_frontmatter(path: Path) -> tuple[Page | None, list[Finding]]:
+ display = _display_path(path)
+ try:
+ text = path.read_text(encoding="utf-8")
+ except (UnicodeDecodeError, OSError):
+ return None, [(display, "file.unreadable-utf8")]
+
+ lines = text.removeprefix("\ufeff").splitlines()
+ if not lines or lines[0].strip() != "---":
+ return None, [(display, "frontmatter.missing")]
+ try:
+ end = next(i for i in range(1, len(lines)) if lines[i].strip() == "---")
+ except StopIteration:
+ return None, [(display, "frontmatter.unclosed")]
+
+ raw = "\n".join(lines[1:end])
+ try:
+ metadata = yaml.safe_load(raw)
+ except yaml.YAMLError:
+ return None, [(display, "frontmatter.invalid-yaml")]
+ if not isinstance(metadata, dict):
+ return None, [(display, "frontmatter.not-a-map")]
+ body = "\n".join(lines[end + 1 :]).strip() + "\n"
+ return Page(path, display, metadata, body), []
+
+
+def _is_nonempty_string(value: Any) -> bool:
+ return isinstance(value, str) and bool(value.strip())
+
+
+def _valid_review_date(value: Any) -> bool:
+ if isinstance(value, dt.datetime):
+ return False
+ if isinstance(value, dt.date):
+ return True
+ if not isinstance(value, str):
+ return False
+ try:
+ dt.date.fromisoformat(value)
+ except ValueError:
+ return False
+ return bool(re.fullmatch(r"\d{4}-\d{2}-\d{2}", value))
+
+
+def _metadata_findings(page: Page) -> list[Finding]:
+ meta = page.metadata
+ found: list[Finding] = []
+ for field in REQUIRED_FIELDS:
+ if field not in meta:
+ found.append((page.display_path, f"frontmatter.missing.{field}"))
+
+ for field in ("title", "summary", "slug", "section"):
+ if field in meta and not _is_nonempty_string(meta[field]):
+ found.append((page.display_path, f"frontmatter.invalid.{field}"))
+
+ summary = meta.get("summary")
+ if _is_nonempty_string(summary) and not (
+ MIN_SUMMARY_CHARS <= len(summary.strip()) <= MAX_SUMMARY_CHARS
+ ):
+ found.append((page.display_path, "frontmatter.invalid.summary-length"))
+
+ slug = meta.get("slug")
+ if _is_nonempty_string(slug) and not SLUG_RE.fullmatch(slug):
+ found.append((page.display_path, "frontmatter.invalid.slug"))
+ if meta.get("diataxis") not in ALLOWED_DIATAXIS:
+ found.append((page.display_path, "frontmatter.invalid.diataxis"))
+ if meta.get("status") != "active":
+ found.append((page.display_path, "frontmatter.invalid.status"))
+ if meta.get("owner") != "maintainers":
+ found.append((page.display_path, "frontmatter.invalid.owner"))
+ if meta.get("audience") not in ALLOWED_AUDIENCES:
+ found.append((page.display_path, "frontmatter.invalid.audience"))
+ if "last_reviewed" in meta and not _valid_review_date(meta["last_reviewed"]):
+ found.append((page.display_path, "frontmatter.invalid.last_reviewed"))
+
+ for field in ("section_order", "order"):
+ value = meta.get(field)
+ if not isinstance(value, int) or isinstance(value, bool) or value < 1:
+ found.append((page.display_path, f"frontmatter.invalid.{field}"))
+
+ for field in ("tags", "related"):
+ value = meta.get(field)
+ valid = isinstance(value, list) and all(_is_nonempty_string(item) for item in value)
+ if not valid or (field == "tags" and not value):
+ found.append((page.display_path, f"frontmatter.invalid.{field}"))
+ related = meta.get("related")
+ if isinstance(related, list) and not 2 <= len(related) <= 4:
+ found.append((page.display_path, "frontmatter.invalid.related-count"))
+ return found
+
+
+def _fenced_code_findings(page: Page) -> list[Finding]:
+ found: list[Finding] = []
+ opener: str | None = None
+ content_lines = 0
+ for line in page.body.splitlines():
+ match = FENCE_RE.match(line)
+ if opener is None:
+ if match:
+ opener = match.group(1)
+ content_lines = 0
+ continue
+ if re.match(rf"^\s*{re.escape(opener[0])}{{{len(opener)},}}\s*$", line):
+ if content_lines > MAX_CODE_BLOCK_LINES:
+ found.append((page.display_path, "content.code-block-too-long"))
+ opener = None
+ else:
+ content_lines += 1
+ if opener is not None:
+ found.append((page.display_path, "content.code-fence-unclosed"))
+ return found
+
+
+def _content_findings(page: Page) -> list[Finding]:
+ found: list[Finding] = []
+ word_count = len(WORD_RE.findall(page.body))
+ if word_count < MIN_BODY_WORDS:
+ found.append((page.display_path, "content.too-short"))
+ elif word_count > MAX_BODY_WORDS:
+ found.append((page.display_path, "content.too-long"))
+
+ headings = [
+ (len(match.group(1)), match.group(2).strip().rstrip("#").strip())
+ for line in page.body.splitlines()
+ if (match := HEADING_RE.match(line))
+ ]
+ h1s = [title for level, title in headings if level == 1]
+ # The application renders frontmatter.title as the page's sole H1. A
+ # Markdown H1 would duplicate that accessible heading, even if it appears
+ # only once in the source body.
+ if h1s:
+ found.append((page.display_path, "content.h1-duplicate"))
+ if any(level > 3 for level, _title in headings):
+ found.append((page.display_path, "content.heading-level-too-deep"))
+
+ level_two = {title.casefold() for level, title in headings if level == 2}
+ for required in sorted(REQUIRED_SECTIONS):
+ if required not in level_two:
+ category = required.replace(" ", "-")
+ found.append((page.display_path, f"content.section-missing.{category}"))
+
+ if UNFINISHED_RE.search(page.body):
+ found.append((page.display_path, "content.unfinished-placeholder"))
+ found.extend(_fenced_code_findings(page))
+ return found
+
+
+def _safe_email(match: re.Match[str]) -> bool:
+ domain = match.group(0).rsplit("@", 1)[1].casefold()
+ return domain in SAFE_EMAIL_DOMAINS
+
+
+def _looks_like_literal_secret(value: str) -> bool:
+ stripped = value.strip().rstrip(".)]")
+ if SAFE_VALUE_RE.fullmatch(stripped):
+ return False
+ if stripped.startswith(("os.getenv(", "get_secret(", "env[", "settings.")):
+ return False
+ if len(stripped) < 12:
+ return False
+ compact = re.sub(r"[-_]", "", stripped)
+ character_classes = sum(
+ bool(re.search(pattern, compact))
+ for pattern in (r"[a-z]", r"[A-Z]", r"\d", r"[^A-Za-z0-9]")
+ )
+ return character_classes >= 2 or len(compact) >= 20
+
+
+def _privacy_findings(page: Page) -> list[Finding]:
+ text = page.path.read_text(encoding="utf-8")
+ categories: set[str] = set()
+ if any(not _safe_email(match) for match in EMAIL_RE.finditer(text)):
+ categories.add("privacy.email")
+ for match in WINDOWS_USER_PATH_RE.finditer(text):
+ if match.group(1).casefold() not in WINDOWS_SAFE_USERS:
+ categories.add("privacy.windows-user-path")
+ break
+ if SID_RE.search(text):
+ categories.add("privacy.windows-sid")
+ if PRIVATE_KEY_RE.search(text):
+ categories.add("privacy.private-key")
+ if KNOWN_SECRET_RE.search(text):
+ categories.add("privacy.secret-pattern")
+ if any(_looks_like_literal_secret(match.group(1)) for match in ASSIGNMENT_RE.finditer(text)):
+ categories.add("privacy.suspicious-assignment")
+ return [(page.display_path, category) for category in sorted(categories)]
+
+
+def _corpus_findings(pages: list[Page]) -> list[Finding]:
+ found: list[Finding] = []
+ slugs: defaultdict[str, list[Page]] = defaultdict(list)
+ positions: defaultdict[tuple[str, int], list[Page]] = defaultdict(list)
+ section_orders: defaultdict[int, set[str]] = defaultdict(set)
+ order_by_section: defaultdict[str, set[int]] = defaultdict(set)
+
+ for page in pages:
+ meta = page.metadata
+ slug = meta.get("slug")
+ section = meta.get("section")
+ order = meta.get("order")
+ section_order = meta.get("section_order")
+ if _is_nonempty_string(slug) and SLUG_RE.fullmatch(slug):
+ slugs[slug].append(page)
+ if _is_nonempty_string(section) and isinstance(order, int) and not isinstance(order, bool):
+ positions[(section, order)].append(page)
+ if (
+ _is_nonempty_string(section)
+ and isinstance(section_order, int)
+ and not isinstance(section_order, bool)
+ ):
+ section_orders[section_order].add(section)
+ order_by_section[section].add(section_order)
+
+ for duplicates in slugs.values():
+ if len(duplicates) > 1:
+ found.extend((page.display_path, "corpus.duplicate-slug") for page in duplicates)
+ for duplicates in positions.values():
+ if len(duplicates) > 1:
+ found.extend(
+ (page.display_path, "corpus.duplicate-section-order") for page in duplicates
+ )
+ for numeric_order, sections in section_orders.items():
+ if len(sections) > 1:
+ for page in pages:
+ if page.metadata.get("section_order") == numeric_order:
+ found.append((page.display_path, "corpus.section-order-shared"))
+ for section, numeric_orders in order_by_section.items():
+ if len(numeric_orders) > 1:
+ for page in pages:
+ if page.metadata.get("section") == section:
+ found.append((page.display_path, "corpus.section-order-inconsistent"))
+
+ known_slugs = set(slugs)
+ for page in pages:
+ related = page.metadata.get("related")
+ if not isinstance(related, list):
+ continue
+ for slug in related:
+ if not isinstance(slug, str):
+ continue
+ if slug == page.metadata.get("slug"):
+ found.append((page.display_path, "corpus.related-self"))
+ elif slug not in known_slugs:
+ found.append((page.display_path, "corpus.related-missing"))
+
+ for raw_target in MARKDOWN_LINK_RE.findall(page.body):
+ target = raw_target.strip("<>")
+ if target.startswith(("https://", "http://", "mailto:", "#")):
+ continue
+ if target.startswith(("javascript:", "data:")):
+ found.append((page.display_path, "corpus.link-unsafe"))
+ continue
+ target_slug = target.split("#", 1)[0].split("?", 1)[0]
+ if target_slug.startswith("/api/docs/asset/"):
+ continue
+ if target_slug not in known_slugs:
+ found.append((page.display_path, "corpus.link-missing"))
+ return found
+
+
+def _manifest_findings(pages: list[Page], files: list[Path], manifest_path: Path) -> list[Finding]:
+ """Validate that the materialized public corpus matches its reviewed manifest."""
+ display = _display_path(manifest_path)
+ try:
+ manifest = yaml.safe_load(manifest_path.read_text(encoding="utf-8"))
+ except FileNotFoundError:
+ return [(display, "manifest.missing")]
+ except (OSError, UnicodeDecodeError, yaml.YAMLError):
+ return [(display, "manifest.unreadable")]
+
+ if not isinstance(manifest, dict):
+ return [(display, "manifest.not-a-map")]
+ entries = manifest.get("pages")
+ if not isinstance(entries, list) or not all(isinstance(entry, dict) for entry in entries):
+ return [(display, "manifest.invalid.pages")]
+
+ found: list[Finding] = []
+ declared_count = manifest.get("page_count")
+ if not isinstance(declared_count, int) or isinstance(declared_count, bool):
+ found.append((display, "manifest.invalid.page-count"))
+ elif declared_count != len(entries):
+ found.append((display, "manifest.page-count-mismatch"))
+
+ raw_content_root = manifest.get("content_root")
+ if not _is_nonempty_string(raw_content_root):
+ found.append((display, "manifest.invalid.content-root"))
+ corpus_root = DEFAULT_CORPUS.resolve()
+ else:
+ corpus_root = (REPO_ROOT / raw_content_root).resolve()
+
+ expected: dict[Path, dict[str, Any]] = {}
+ declared_slugs: set[str] = set()
+ for entry in entries:
+ if any(field not in entry for field in MANIFEST_PAGE_FIELDS):
+ found.append((display, "manifest.page-fields-missing"))
+ continue
+ raw_file = entry.get("file")
+ if not _is_nonempty_string(raw_file):
+ found.append((display, "manifest.invalid.file"))
+ continue
+ expected_path = (REPO_ROOT / raw_file).resolve()
+ if not expected_path.is_relative_to(corpus_root) or expected_path.suffix.lower() != ".md":
+ found.append((display, "manifest.file-outside-corpus"))
+ continue
+ if expected_path in expected:
+ found.append((display, "manifest.duplicate-file"))
+ expected[expected_path] = entry
+
+ for field in ("title", "summary", "section"):
+ if not _is_nonempty_string(entry.get(field)):
+ found.append((display, f"manifest.invalid.{field}"))
+ summary = entry.get("summary")
+ if _is_nonempty_string(summary) and not (
+ MIN_SUMMARY_CHARS <= len(summary.strip()) <= MAX_SUMMARY_CHARS
+ ):
+ found.append((display, "manifest.invalid.summary-length"))
+ if entry.get("diataxis") not in ALLOWED_DIATAXIS:
+ found.append((display, "manifest.invalid.diataxis"))
+ for field in ("section_order", "order"):
+ value = entry.get(field)
+ if not isinstance(value, int) or isinstance(value, bool) or value < 1:
+ found.append((display, f"manifest.invalid.{field}"))
+ related = entry.get("related")
+ if not (
+ isinstance(related, list)
+ and 2 <= len(related) <= 4
+ and all(_is_nonempty_string(item) and SLUG_RE.fullmatch(item) for item in related)
+ ):
+ found.append((display, "manifest.invalid.related"))
+
+ slug = entry.get("slug")
+ if not _is_nonempty_string(slug) or not SLUG_RE.fullmatch(slug):
+ found.append((display, "manifest.invalid.slug"))
+ elif slug in declared_slugs:
+ found.append((display, "manifest.duplicate-slug"))
+ else:
+ declared_slugs.add(slug)
+
+ sources = entry.get("authoritative_sources")
+ if (
+ not isinstance(sources, list)
+ or not sources
+ or not all(_is_nonempty_string(source) for source in sources)
+ ):
+ found.append((display, "manifest.invalid.authoritative-sources"))
+ elif any(not (REPO_ROOT / source).resolve().exists() for source in sources):
+ found.append((display, "manifest.authoritative-source-missing"))
+
+ discovered = {path.resolve() for path in files}
+ for path in sorted(expected.keys() - discovered):
+ found.append((_display_path(path), "manifest.file-missing"))
+ for path in sorted(discovered - expected.keys()):
+ found.append((_display_path(path), "manifest.file-unlisted"))
+
+ parsed = {page.path.resolve(): page for page in pages}
+ for path in sorted(expected.keys() & parsed.keys()):
+ entry = expected[path]
+ metadata = parsed[path].metadata
+ for field in MANIFEST_PAGE_FIELDS:
+ if field == "file":
+ continue
+ if metadata.get(field) != entry.get(field):
+ found.append((_display_path(path), f"manifest.metadata-mismatch.{field}"))
+
+ if isinstance(declared_count, int) and not isinstance(declared_count, bool):
+ if declared_count != len(discovered):
+ found.append((display, "manifest.corpus-count-mismatch"))
+ return found
+
+
+def check_paths(paths: Iterable[Path], *, manifest_path: Path | None = None) -> list[Finding]:
+ """Return sorted, de-duplicated ``(path, category)`` findings."""
+ materialized = tuple(paths)
+ files, found = _discover(materialized)
+ pages: list[Page] = []
+ for path in files:
+ page, parse_findings = _parse_frontmatter(path)
+ found.extend(parse_findings)
+ if page is None:
+ continue
+ pages.append(page)
+ found.extend(_metadata_findings(page))
+ found.extend(_content_findings(page))
+ found.extend(_privacy_findings(page))
+ found.extend(_corpus_findings(pages))
+ if manifest_path is not None:
+ found.extend(_manifest_findings(pages, files, manifest_path.resolve()))
+ return sorted(set(found))
+
+
+def main(argv: list[str] | None = None) -> int:
+ parser = argparse.ArgumentParser(description=__doc__)
+ parser.add_argument("paths", nargs="*", help="Markdown files or corpus directories")
+ args = parser.parse_args(argv)
+ targets = [Path(path) for path in args.paths] or [DEFAULT_CORPUS]
+ manifest_path = None if args.paths else DEFAULT_MANIFEST
+ try:
+ findings = check_paths(targets, manifest_path=manifest_path)
+ except Exception: # pragma: no cover - last-resort fail-closed CI guard
+ print(f"{_display_path(DEFAULT_CORPUS)}: runtime.error", file=sys.stderr)
+ return 1
+ for path, category in findings:
+ print(f"{path}: {category}", file=sys.stderr)
+ return 1 if findings else 0
+
+
+if __name__ == "__main__":
+ raise SystemExit(main())
diff --git a/tests/integration/test_docs_routes.py b/tests/integration/test_docs_routes.py
index f240b76a89..67739bb1ad 100644
--- a/tests/integration/test_docs_routes.py
+++ b/tests/integration/test_docs_routes.py
@@ -1,4 +1,5 @@
"""Integration tests for /api/docs routes via FastAPI TestClient."""
+
from __future__ import annotations
from pathlib import Path
@@ -10,7 +11,6 @@ from fastapi.testclient import TestClient
from jarvis.docs.registry import DocRegistry
from jarvis.ui.web.docs_routes import router as docs_router
-
CONCEPT_MD = """---
title: "Concept: Router-Discipline"
slug: router-discipline
@@ -22,11 +22,11 @@ tags: [brain, routing]
# Concept: Router-Discipline
-Hauptjarvis ist Pure Dispatcher.
+The main assistant is a pure dispatcher.
-## Wann triggern
+## When it triggers
-Direkt-Aktion via Sub-Jarvis-Spawn.
+Direct action through a Jarvis-Agent dispatch.
"""
HOWTO_MD = """---
@@ -40,7 +40,7 @@ tags: [brain, plugin]
# How-To
-Schritt 1.
+Step 1.
"""
@@ -49,14 +49,14 @@ def doc_root(tmp_path: Path) -> Path:
(tmp_path / "docs").mkdir()
(tmp_path / "docs" / "concept-routing.md").write_text(CONCEPT_MD, encoding="utf-8")
(tmp_path / "docs" / "howto-provider.md").write_text(HOWTO_MD, encoding="utf-8")
- # Asset im selben Doc-Ordner
+ # Asset in the same documentation directory.
(tmp_path / "docs" / "diagram.png").write_bytes(b"PNG-FAKE-CONTENT")
return tmp_path
@pytest.fixture
def app_with_registry(doc_root: Path) -> FastAPI:
- """Minimal-FastAPI mit unserem Router + DocRegistry-State."""
+ """Minimal FastAPI app with the docs router and registry state."""
app = FastAPI()
registry = DocRegistry(
roots=[doc_root / "docs"],
@@ -77,6 +77,7 @@ def client(app_with_registry: FastAPI) -> TestClient:
# /api/docs (List + Filter)
# ----------------------------------------------------------------------
+
def test_list_returns_all_docs(client: TestClient) -> None:
resp = client.get("/api/docs")
assert resp.status_code == 200
@@ -113,6 +114,7 @@ def test_list_filter_by_tags(client: TestClient) -> None:
# /api/docs/grouped
# ----------------------------------------------------------------------
+
def test_grouped_returns_diataxis_buckets(client: TestClient) -> None:
resp = client.get("/api/docs/grouped")
assert resp.status_code == 200
@@ -122,21 +124,61 @@ def test_grouped_returns_diataxis_buckets(client: TestClient) -> None:
assert len(data["howto"]) == 1
+def test_grouped_compact_returns_only_navigation_fields(client: TestClient) -> None:
+ resp = client.get("/api/docs/grouped?compact=true")
+ assert resp.status_code == 200
+ item = resp.json()["howto"][0]
+ assert set(item) == {
+ "title",
+ "slug",
+ "diataxis",
+ "summary",
+ "section",
+ "section_order",
+ "order",
+ "tags",
+ "related",
+ }
+ assert item["section"] == "Other"
+ assert item["order"] == 999
+
+
+def test_first_request_populates_deferred_registry(doc_root: Path) -> None:
+ app = FastAPI()
+ registry = DocRegistry(
+ roots=[doc_root / "docs"],
+ index_db=doc_root / "lazy-index.sqlite",
+ )
+ app.state.doc_registry = registry
+ app.include_router(docs_router)
+
+ assert registry.is_loaded is False
+ resp = TestClient(app).get("/api/docs/grouped?compact=true")
+
+ assert resp.status_code == 200
+ assert registry.is_loaded is True
+ assert sum(len(items) for items in resp.json().values()) == 2
+ registry.close()
+
+
# ----------------------------------------------------------------------
# /api/docs/search
# ----------------------------------------------------------------------
+
def test_search_finds_match(client: TestClient) -> None:
resp = client.get("/api/docs/search?q=Dispatcher")
assert resp.status_code == 200
data = resp.json()
assert len(data) == 1
assert data[0]["slug"] == "router-discipline"
+ assert data[0]["summary"] == ""
+ assert data[0]["section"] == "Other"
assert "<mark>" in data[0]["snippet"]
def test_search_with_filter(client: TestClient) -> None:
- resp = client.get("/api/docs/search?q=Schritt&diataxis=howto")
+ resp = client.get("/api/docs/search?q=Step&diataxis=howto")
data = resp.json()
slugs = [d["slug"] for d in data]
assert "provider-add" in slugs
@@ -157,13 +199,14 @@ def test_search_empty_query_returns_empty(client: TestClient) -> None:
# /api/docs/{slug}
# ----------------------------------------------------------------------
+
def test_get_doc_returns_full_body(client: TestClient) -> None:
resp = client.get("/api/docs/router-discipline")
assert resp.status_code == 200
data = resp.json()
assert data["slug"] == "router-discipline"
- assert "Hauptjarvis ist Pure Dispatcher" in data["body"]
- assert any(h["slug"] == "wann-triggern" for h in data["headings"])
+ assert "The main assistant is a pure dispatcher" in data["body"]
+ assert any(h["slug"] == "when-it-triggers" for h in data["headings"])
def test_get_doc_unknown_returns_404(client: TestClient) -> None:
@@ -175,6 +218,7 @@ def test_get_doc_unknown_returns_404(client: TestClient) -> None:
# /api/docs/asset/{slug}/{path}
# ----------------------------------------------------------------------
+
def test_get_asset_returns_file(client: TestClient) -> None:
resp = client.get("/api/docs/asset/router-discipline/diagram.png")
assert resp.status_code == 200
@@ -196,6 +240,7 @@ def test_get_asset_unknown_doc_404(client: TestClient) -> None:
# /api/docs/reload
# ----------------------------------------------------------------------
+
def test_reload_picks_up_new_file(client: TestClient, doc_root: Path) -> None:
new_md = """---
title: "ADR-0099"
@@ -211,25 +256,28 @@ phase: 6
resp = client.post("/api/docs/reload")
assert resp.status_code == 200
data = resp.json()
- assert data["total"] >= 3 # 2 originale + 1 neu
- # Verify durch List-Endpoint
+ assert data["total"] >= 3 # 2 original documents plus the new one.
+ # Verify through the list endpoint.
listed = client.get("/api/docs").json()
slugs = [d["slug"] for d in listed]
assert "adr-0099-test" in slugs
# ----------------------------------------------------------------------
-# Registry fehlt -> 503
+# Missing registry -> 503
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# /api/docs/{slug}/open — Editor-Launch
# ----------------------------------------------------------------------
-def test_open_doc_in_editor(client: TestClient, monkeypatch) -> None:
- """``os.startfile`` is Windows-only and non-blocking. We patch it
- away and only check that the endpoint resolves the path correctly.
- """
+
+def test_open_doc_in_editor(
+ client: TestClient,
+ monkeypatch,
+ doc_root: Path,
+) -> None:
+ """Patch the Windows-only launcher and verify path resolution."""
import os as os_module
calls: list[str] = []
@@ -242,7 +290,8 @@ def test_open_doc_in_editor(client: TestClient, monkeypatch) -> None:
assert resp.status_code == 200
data = resp.json()
assert data["opened"] is True
- assert "concept-routing.md" in data["path"]
+ assert data["path"] == "concept-routing.md"
+ assert str(doc_root) not in client.get("/api/docs").text
assert len(calls) == 1
@@ -252,9 +301,10 @@ def test_open_doc_in_editor_unknown_slug(client: TestClient) -> None:
# ----------------------------------------------------------------------
-# Registry fehlt -> 503
+# Missing registry -> 503
# ----------------------------------------------------------------------
+
def test_503_when_registry_missing() -> None:
app = FastAPI()
app.state.doc_registry = None
diff --git a/tests/unit/core/test_doc_paths.py b/tests/unit/core/test_doc_paths.py
new file mode 100644
index 0000000000..7e89dfc699
--- /dev/null
+++ b/tests/unit/core/test_doc_paths.py
@@ -0,0 +1,77 @@
+from pathlib import Path
+
+from jarvis.core import paths
+
+
+def test_product_docs_are_the_reader_registry_root(
+ monkeypatch,
+ tmp_path: Path,
+) -> None:
+ (tmp_path / "docs" / "product").mkdir(parents=True)
+ monkeypatch.setattr(paths, "repo_root", lambda: tmp_path)
+
+ assert paths.default_doc_roots() == [tmp_path / "docs" / "product"]
+
+
+def test_engineering_docs_are_never_exposed_as_reader_content(
+ monkeypatch,
+ tmp_path: Path,
+) -> None:
+ (tmp_path / "docs").mkdir()
+ monkeypatch.setattr(paths, "repo_root", lambda: tmp_path)
+ monkeypatch.setattr(
+ paths.sysconfig,
+ "get_path",
+ lambda _name, **_kwargs: str(tmp_path / "empty"),
+ )
+
+ assert paths.default_doc_roots() == []
+
+
+def test_installed_wheel_docs_are_used_without_a_source_tree(
+ monkeypatch,
+ tmp_path: Path,
+) -> None:
+ data_root = tmp_path / "environment"
+ installed = data_root / "share" / "personal-jarvis" / "docs"
+ installed.mkdir(parents=True)
+ monkeypatch.setattr(paths, "repo_root", lambda: tmp_path / "site-packages")
+ monkeypatch.setattr(paths.sysconfig, "get_path", lambda _name, **_kwargs: str(data_root))
+
+ assert paths.default_doc_roots() == [installed]
+
+
+def test_user_install_scheme_docs_are_discovered(
+ monkeypatch,
+ tmp_path: Path,
+) -> None:
+ environment = tmp_path / "environment"
+ user_data = tmp_path / "user-data"
+ installed = user_data / "share" / "personal-jarvis" / "docs"
+ installed.mkdir(parents=True)
+ monkeypatch.setattr(paths, "repo_root", lambda: tmp_path / "site-packages")
+ monkeypatch.setattr(paths.sysconfig, "get_preferred_scheme", lambda _key: "user")
+ monkeypatch.setattr(
+ paths.sysconfig,
+ "get_path",
+ lambda _name, **kwargs: str(user_data if kwargs.get("scheme") else environment),
+ )
+
+ assert paths.default_doc_roots() == [installed]
+
+
+def test_target_install_docs_are_discovered_next_to_package(
+ monkeypatch,
+ tmp_path: Path,
+) -> None:
+ target = tmp_path / "target"
+ installed = target / "share" / "personal-jarvis" / "docs"
+ installed.mkdir(parents=True)
+ monkeypatch.setattr(paths, "repo_root", lambda: target)
+ monkeypatch.setattr(
+ paths.sysconfig,
+ "get_path",
+ lambda _name, **_kwargs: str(tmp_path / "empty"),
+ )
+
+ assert paths.default_doc_roots() == [installed]
diff --git a/tests/unit/docs/test_registry.py b/tests/unit/docs/test_registry.py
index 2dfa9e601f..aee83d6bee 100644
--- a/tests/unit/docs/test_registry.py
+++ b/tests/unit/docs/test_registry.py
@@ -1,7 +1,9 @@
"""Unit tests for DocRegistry."""
+
from __future__ import annotations
import asyncio
+import time
from pathlib import Path
import pytest
@@ -9,7 +11,6 @@ import pytest
from jarvis.docs.registry import DocRegistry
from jarvis.docs.schema import DocDiataxis, DocStatus
-
CONCEPT_MD = """---
title: "Concept: Router"
slug: router-concept
@@ -21,11 +22,11 @@ tags: [brain, routing]
# Concept: Router
-Hauptjarvis dispatcht via Sub-Jarvis-Spawn.
+The main assistant dispatches through a Jarvis-Agent.
"""
HOWTO_MD = """---
-title: "How-To: Provider hinzufuegen" # i18n-allow: matched by the "hinzufuegen" search-query test below
+title: "How-To: Add a provider"
slug: provider-add
diataxis: howto
status: draft
@@ -35,12 +36,12 @@ tags: [brain, plugin]
# How-To
-Schritt 1.
+Step 1.
"""
LEGACY_MD = """# Phase 1c Test Results
-Ergebnisse.
+Results.
"""
@@ -68,13 +69,14 @@ def registry(doc_root: Path) -> DocRegistry:
# Lookup
# ----------------------------------------------------------------------
+
def test_registry_lists_all_docs(registry: DocRegistry) -> None:
docs = registry.list()
assert len(docs) == 3
slugs = {d.frontmatter.slug for d in docs}
assert "router-concept" in slugs
assert "provider-add" in slugs
- # Legacy bekommt Synth-Slug
+ # A legacy page receives a synthesized slug.
assert any("phase1c" in s for s in slugs)
@@ -92,6 +94,7 @@ def test_registry_get_unknown_slug(registry: DocRegistry) -> None:
# Filter
# ----------------------------------------------------------------------
+
def test_filter_by_diataxis(registry: DocRegistry) -> None:
howtos = registry.filter(diataxis=DocDiataxis.HOWTO)
assert len(howtos) == 1
@@ -128,6 +131,7 @@ def test_filter_combined(registry: DocRegistry) -> None:
# grouped_by_diataxis
# ----------------------------------------------------------------------
+
def test_grouped_by_diataxis(registry: DocRegistry) -> None:
groups = registry.grouped_by_diataxis()
assert DocDiataxis.EXPLANATION in groups
@@ -140,19 +144,20 @@ def test_grouped_by_diataxis(registry: DocRegistry) -> None:
# Search-Integration
# ----------------------------------------------------------------------
+
def test_search_via_registry(registry: DocRegistry) -> None:
- results = registry.search_query("Sub-Jarvis-Spawn")
+ results = registry.search_query("Jarvis-Agent")
assert len(results) == 1
assert results[0].slug == "router-concept"
def test_search_with_diataxis_filter(registry: DocRegistry) -> None:
- # Neither doc mentions the word "Schritt" or "Hauptjarvis" in both —
- # we pick a term that only the how-to has.
+ # Pick a term that appears only in the how-to title.
results = registry.search_query(
- "hinzufuegen", diataxis=DocDiataxis.HOWTO, # i18n-allow: matches the fixture title's German search term
+ "provider",
+ diataxis=DocDiataxis.HOWTO,
)
- # Title contains "hinzufuegen" # i18n-allow: matches the fixture title's German search term
+ # The title contains "provider".
assert any(r.slug == "provider-add" for r in results)
@@ -160,6 +165,7 @@ def test_search_with_diataxis_filter(registry: DocRegistry) -> None:
# Reload
# ----------------------------------------------------------------------
+
def test_reload_picks_up_new_file(registry: DocRegistry, doc_root: Path) -> None:
new_md = """---
title: "ADR-0099"
@@ -195,10 +201,72 @@ async def test_async_reload(doc_root: Path) -> None:
reg.close()
+async def test_ensure_loaded_deduplicates_concurrent_first_requests(
+ doc_root: Path,
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ import jarvis.docs.registry as registry_module
+
+ calls = 0
+ real_discover = registry_module.discover_docs
+
+ def counted_discover(roots: list[Path]):
+ nonlocal calls
+ calls += 1
+ return real_discover(roots)
+
+ monkeypatch.setattr(registry_module, "discover_docs", counted_discover)
+ reg = DocRegistry(
+ roots=[doc_root / "docs"],
+ index_db=doc_root / "index.sqlite",
+ )
+
+ assert reg.is_loaded is False
+ await asyncio.gather(reg.ensure_loaded(), reg.ensure_loaded())
+
+ assert reg.is_loaded is True
+ assert len(reg.list()) == 3
+ assert calls == 1
+ reg.close()
+
+
+async def test_debounce_keeps_newer_reload_deadline(
+ doc_root: Path,
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ """A second watcher event must not be cleared by the first timer."""
+ reg = DocRegistry(
+ roots=[doc_root / "docs"],
+ index_db=doc_root / "index.sqlite",
+ debounce_ms=20,
+ )
+ reloads = 0
+
+ async def counted_reload() -> None:
+ nonlocal reloads
+ reloads += 1
+
+ monkeypatch.setattr(reg, "reload", counted_reload)
+ reg._pending_reload = time.monotonic() + 0.020
+ first = asyncio.create_task(reg._debounced_reload())
+ await asyncio.sleep(0.005)
+ reg._pending_reload = time.monotonic() + 0.020
+ second = asyncio.create_task(reg._debounced_reload())
+
+ await asyncio.gather(first, second)
+
+ assert reloads == 1
+ assert reg._pending_reload is None
+ reg.close()
+
+
# ----------------------------------------------------------------------
# Bus-Event-Emission
# ----------------------------------------------------------------------
+
class _StubBus:
"""Minimal bus stub for reload-event tests."""
@@ -228,6 +296,7 @@ def test_emit_reloaded_without_loop_does_not_crash(
# Multi-Root-Dedup
# ----------------------------------------------------------------------
+
def test_multi_root_no_double_index(tmp_path: Path) -> None:
"""When two roots overlap, each file appears only once."""
(tmp_path / "a").mkdir()
diff --git a/tests/unit/docs/test_schema.py b/tests/unit/docs/test_schema.py
index ab6f4c2f47..14a46c4ff8 100644
--- a/tests/unit/docs/test_schema.py
+++ b/tests/unit/docs/test_schema.py
@@ -1,4 +1,5 @@
"""Unit tests for DocFrontmatter + doc schema."""
+
from __future__ import annotations
from datetime import date
@@ -9,11 +10,11 @@ from pydantic import ValidationError
from jarvis.docs.schema import Doc, DocDiataxis, DocFrontmatter, DocStatus
-
# ----------------------------------------------------------------------
# DocFrontmatter — Happy-Path
# ----------------------------------------------------------------------
+
def test_frontmatter_minimal_valid() -> None:
fm = DocFrontmatter(title="Hello World", slug="hello-world")
assert fm.title == "Hello World"
@@ -22,6 +23,10 @@ def test_frontmatter_minimal_valid() -> None:
assert fm.status == DocStatus.DRAFT
assert fm.owner == "maintainers"
assert fm.phase == "-"
+ assert fm.summary == ""
+ assert fm.section == "Other"
+ assert fm.section_order == 999
+ assert fm.order == 999
assert fm.tags == []
@@ -34,19 +39,37 @@ def test_frontmatter_full() -> None:
last_reviewed=date(2026, 4, 28),
phase="5",
audience="developer",
+ summary="How requests reach the right provider.",
+ section="Understand Jarvis",
+ section_order=8,
+ order=2,
tags=["brain", "routing"],
related=["adr-0011-router-discipline"],
)
assert fm.diataxis == DocDiataxis.EXPLANATION
assert fm.status == DocStatus.ACTIVE
assert fm.last_reviewed == date(2026, 4, 28)
+ assert fm.summary == "How requests reach the right provider."
+ assert fm.section == "Understand Jarvis"
assert fm.tags == ["brain", "routing"]
+def test_reader_metadata_is_trimmed() -> None:
+ fm = DocFrontmatter(
+ title="t",
+ slug="s",
+ summary=" A short outcome. ",
+ section=" Get Started ",
+ )
+ assert fm.summary == "A short outcome."
+ assert fm.section == "Get Started"
+
+
# ----------------------------------------------------------------------
# DocFrontmatter — Tolerance & Coercion
# ----------------------------------------------------------------------
+
def test_frontmatter_phase_int_coerced_to_str() -> None:
fm = DocFrontmatter(title="t", slug="s", phase=5)
assert fm.phase == "5"
@@ -74,12 +97,14 @@ def test_frontmatter_tags_none_becomes_empty_list() -> None:
def test_frontmatter_extra_fields_ignored() -> None:
"""``extra='ignore'`` must swallow unknown fields — no crash."""
- fm = DocFrontmatter.model_validate({
- "title": "t",
- "slug": "s",
- "unknown_future_field": "value",
- "another": [1, 2, 3],
- })
+ fm = DocFrontmatter.model_validate(
+ {
+ "title": "t",
+ "slug": "s",
+ "unknown_future_field": "value",
+ "another": [1, 2, 3],
+ }
+ )
assert fm.title == "t"
@@ -87,6 +112,7 @@ def test_frontmatter_extra_fields_ignored() -> None:
# DocFrontmatter — Validation-Failures
# ----------------------------------------------------------------------
+
def test_frontmatter_empty_title_rejected() -> None:
with pytest.raises(ValidationError):
DocFrontmatter(title=" ", slug="s")
@@ -99,26 +125,31 @@ def test_frontmatter_empty_slug_rejected() -> None:
def test_frontmatter_invalid_diataxis_rejected() -> None:
with pytest.raises(ValidationError):
- DocFrontmatter.model_validate({
- "title": "t",
- "slug": "s",
- "diataxis": "fancy-new-quadrant",
- })
+ DocFrontmatter.model_validate(
+ {
+ "title": "t",
+ "slug": "s",
+ "diataxis": "fancy-new-quadrant",
+ }
+ )
def test_frontmatter_invalid_status_rejected() -> None:
with pytest.raises(ValidationError):
- DocFrontmatter.model_validate({
- "title": "t",
- "slug": "s",
- "status": "halffinished",
- })
+ DocFrontmatter.model_validate(
+ {
+ "title": "t",
+ "slug": "s",
+ "status": "halffinished",
+ }
+ )
# ----------------------------------------------------------------------
# Doc DataClass
# ----------------------------------------------------------------------
+
def test_doc_property_shortcuts() -> None:
fm = DocFrontmatter(title="Hello", slug="hello", diataxis="howto")
doc = Doc(path=Path("/tmp/hello.md"), frontmatter=fm, body="# Hello\nbody.")
diff --git a/tests/unit/docs/test_search.py b/tests/unit/docs/test_search.py
index 34c67d4c7a..a681fc63ae 100644
--- a/tests/unit/docs/test_search.py
+++ b/tests/unit/docs/test_search.py
@@ -5,7 +5,8 @@ from pathlib import Path
import pytest
-from jarvis.docs.schema import Doc, DocDiataxis, DocFrontmatter, DocStatus
+import jarvis.docs.search as search_module
+from jarvis.docs.schema import Doc, DocFrontmatter
from jarvis.docs.search import DocSearch
@@ -24,7 +25,7 @@ def _doc(
phase=phase,
tags=tags or [],
)
- return Doc(path=Path(f"/tmp/{slug}.md"), frontmatter=fm, body=body)
+ return Doc(path=Path("docs") / f"{slug}.md", frontmatter=fm, body=body)
@pytest.fixture
@@ -42,7 +43,7 @@ def test_upsert_and_query_basic(search: DocSearch) -> None:
search.upsert(_doc(
slug="router-discipline",
title="Concept: Router-Discipline",
- body="Hauptjarvis is a Pure Dispatcher and delegates via spawn_worker.",
+ body="The supervisor is a pure dispatcher and delegates via spawn_worker.",
))
results = search.query("Dispatcher")
assert len(results) == 1
@@ -77,6 +78,57 @@ def test_replace_all_atomic(search: DocSearch) -> None:
assert len(search.query("Beta")) == 1
+def test_replace_all_removes_retired_content_from_raw_database_files(
+ tmp_path: Path,
+) -> None:
+ db_path = tmp_path / "privacy_index.sqlite"
+ retired_marker = b"RETIRED_PRIVATE_DOC_SENTINEL_7f6c05a9"
+ search = DocSearch(db_path)
+ try:
+ search.upsert(
+ _doc("retired", "Retired", retired_marker.decode("ascii")),
+ )
+ database_files = [
+ db_path,
+ Path(f"{db_path}-wal"),
+ Path(f"{db_path}-shm"),
+ ]
+ assert any(
+ retired_marker in path.read_bytes()
+ for path in database_files
+ if path.exists()
+ )
+
+ search.replace_all([_doc("public", "Public", "Public reader content")])
+
+ assert search.query("RETIRED_PRIVATE_DOC_SENTINEL_7f6c05a9") == []
+ assert len(search.query("Public")) == 1
+ assert all(
+ retired_marker not in path.read_bytes()
+ for path in database_files
+ if path.exists()
+ )
+ finally:
+ search.close()
+
+
+def test_replace_all_keeps_previous_index_when_atomic_swap_fails(
+ search: DocSearch,
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ search.upsert(_doc("stable", "Stable", "Previous searchable content"))
+
+ def fail_replace(*_args: object) -> None:
+ raise OSError("simulated atomic replace failure")
+
+ monkeypatch.setattr(search_module.os, "replace", fail_replace)
+ with pytest.raises(OSError, match="simulated atomic replace failure"):
+ search.replace_all([_doc("new", "New", "Replacement content")])
+
+ assert len(search.query("Previous")) == 1
+ assert search.query("Replacement") == []
+
+
# ----------------------------------------------------------------------
# Query — Filter + BM25
# ----------------------------------------------------------------------
@@ -108,7 +160,7 @@ def test_query_orders_by_rank(search: DocSearch) -> None:
def test_query_with_phrase(search: DocSearch) -> None:
search.upsert(_doc("a", "A", "the quick brown fox"))
search.upsert(_doc("b", "B", "the brown quick fox"))
- # Phrase-Match nur in A
+ # The phrase match occurs only in A.
results = search.query('"quick brown"')
slugs = [r.slug for r in results]
assert "a" in slugs
@@ -134,7 +186,7 @@ def test_query_handles_unbalanced_quote(search: DocSearch) -> None:
def test_query_handles_only_operators(search: DocSearch) -> None:
search.upsert(_doc("a", "A", "content"))
- # Nur Operatoren — sanitizer trimmt sie weg
+ # The sanitizer removes input made only from operators.
results = search.query("+++")
assert results == []
diff --git a/tests/unit/scripts/test_check_public_docs_contract.py b/tests/unit/scripts/test_check_public_docs_contract.py
new file mode 100644
index 0000000000..d3179d9aed
--- /dev/null
+++ b/tests/unit/scripts/test_check_public_docs_contract.py
@@ -0,0 +1,361 @@
+"""Contract tests for the fail-closed public product-docs validator."""
+
+from __future__ import annotations
+
+import subprocess
+import sys
+from pathlib import Path
+
+import yaml
+
+from scripts.ci.check_public_docs import check_paths
+
+SCRIPT = Path(__file__).resolve().parents[3] / "scripts" / "ci" / "check_public_docs.py"
+FRIENDLY_SUMMARY = (
+ "A friendly explanation of this part of Personal Jarvis, what it does, "
+ "and when you may want to use it."
+)
+
+
+def _body(title: str, *, extra: str = "", second_h1: bool = False) -> str:
+ prose = " ".join(
+ [
+ "Jarvis keeps the important controls close together so a reader can understand "
+ "what happens before choosing an action."
+ ]
+ * 14
+ )
+ duplicate = f"\n# {title} Again\n" if second_h1 else ""
+ return f"""## Overview
+
+{prose}
+{duplicate}
+## How It Fits Together
+
+This feature shares clear status with the rest of Jarvis and hands work to the next feature.
+
+## Check That It Works
+
+Complete one representative action and confirm that the expected result appears in the app.
+
+## Troubleshooting
+
+Check the visible status, required permission, and connected service before trying again.
+
+## Next Steps
+
+Open the related guide when you are ready to continue.
+
+{extra}
+"""
+
+
+def _write_page(
+ root: Path,
+ filename: str,
+ *,
+ title: str,
+ slug: str,
+ order: int,
+ related: list[str],
+ section: str = "Start",
+ section_order: int = 1,
+ diataxis: str = "explanation",
+ body: str | None = None,
+) -> Path:
+ path = root / filename
+ path.parent.mkdir(parents=True, exist_ok=True)
+ links = "\n".join(f" - {item}" for item in related) or "[]"
+ related_yaml = f"\n{links}" if related else " []"
+ path.write_text(
+ f"""---
+title: {title}
+slug: {slug}
+summary: {FRIENDLY_SUMMARY}
+diataxis: {diataxis}
+status: active
+owner: maintainers
+last_reviewed: 2026-07-15
+audience: end-user
+section: {section}
+section_order: {section_order}
+order: {order}
+tags:
+ - getting-started
+related:{related_yaml}
+---
+{body or _body(title)}
+""",
+ encoding="utf-8",
+ )
+ return path
+
+
+def _categories(root: Path) -> set[str]:
+ return {category for _path, category in check_paths([root])}
+
+
+def test_clean_corpus_accepts_cross_links_and_safe_secret_placeholders(tmp_path: Path) -> None:
+ root = tmp_path / "product"
+ _write_page(
+ root,
+ "welcome.md",
+ title="Welcome",
+ slug="welcome",
+ order=1,
+ related=["daily-use", "reference"],
+ diataxis="howto",
+ body=_body(
+ "Welcome",
+ extra="""```text
+API_KEY=<YOUR_API_KEY>
+TOKEN=${JARVIS_TOKEN}
+C:\\Users\\<username>\\Jarvis
+```""",
+ ),
+ )
+ _write_page(
+ root,
+ "daily-use.md",
+ title="Daily Use",
+ slug="daily-use",
+ order=2,
+ related=["welcome", "reference"],
+ )
+ _write_page(
+ root,
+ "reference.md",
+ title="Reference",
+ slug="reference",
+ order=3,
+ related=["welcome", "daily-use"],
+ )
+
+ assert check_paths([root]) == []
+
+
+def test_runtime_diataxis_values_are_exact(tmp_path: Path) -> None:
+ root = tmp_path / "product"
+ runtime_values = (
+ "tutorial",
+ "howto",
+ "reference",
+ "explanation",
+ "troubleshooting",
+ "adr",
+ )
+ for order, value in enumerate(runtime_values, start=1):
+ related = [
+ runtime_values[order % len(runtime_values)],
+ runtime_values[(order + 1) % len(runtime_values)],
+ ]
+ _write_page(
+ root,
+ f"{value}.md",
+ title=value.title(),
+ slug=value,
+ order=order,
+ related=related,
+ diataxis=value,
+ )
+
+ assert check_paths([root]) == []
+
+ invented = _write_page(
+ root,
+ "invented.md",
+ title="Invented",
+ slug="invented",
+ order=len(runtime_values) + 1,
+ related=["tutorial", "reference"],
+ diataxis="how-to",
+ )
+ findings = [
+ category for path, category in check_paths([root]) if Path(path).name == invented.name
+ ]
+ assert set(findings) == {"frontmatter.invalid.diataxis"}
+
+
+def test_metadata_and_corpus_graph_fail_closed(tmp_path: Path) -> None:
+ root = tmp_path / "product"
+ first = _write_page(
+ root,
+ "one.md",
+ title="One",
+ slug="same-slug",
+ order=1,
+ related=["missing-page", "same-slug"],
+ )
+ _write_page(
+ root,
+ "two.md",
+ title="Two",
+ slug="same-slug",
+ order=1,
+ related=["same-slug", "missing-page"],
+ )
+ first.write_text(
+ first.read_text(encoding="utf-8")
+ .replace("audience: end-user", "audience: developer")
+ .replace(FRIENDLY_SUMMARY, "Too short.")
+ .replace(
+ "Open the related guide when you are ready to continue.",
+ "Open the [missing body guide](missing-body) when you are ready.",
+ ),
+ encoding="utf-8",
+ )
+
+ categories = _categories(root)
+ assert "frontmatter.invalid.audience" in categories
+ assert "frontmatter.invalid.summary-length" in categories
+ assert "corpus.duplicate-slug" in categories
+ assert "corpus.duplicate-section-order" in categories
+ assert "corpus.related-missing" in categories
+ assert "corpus.related-self" in categories
+ assert "corpus.link-missing" in categories
+
+
+def test_content_rules_block_unfinished_short_pages_and_large_code_blocks(tmp_path: Path) -> None:
+ root = tmp_path / "product"
+ long_block = "```text\n" + "\n".join(f"line {i}" for i in range(26)) + "\n```"
+ _write_page(
+ root,
+ "unfinished.md",
+ title="Unfinished",
+ slug="unfinished",
+ order=1,
+ related=["missing-one", "missing-two"],
+ body=(
+ "# Duplicate rendered title\n\n#### Too deep\n\n"
+ f"TODO: fill this in.\n\n{long_block}\n"
+ ),
+ )
+
+ categories = _categories(root)
+ assert "content.too-short" in categories
+ assert "content.h1-duplicate" in categories
+ assert "content.section-missing.how-it-fits-together" in categories
+ assert "content.section-missing.check-that-it-works" in categories
+ assert "content.section-missing.troubleshooting" in categories
+ assert "content.section-missing.next-steps" in categories
+ assert "content.heading-level-too-deep" in categories
+ assert "content.unfinished-placeholder" in categories
+ assert "content.code-block-too-long" in categories
+
+
+def test_privacy_rules_find_fake_sensitive_shapes_without_exposing_values(tmp_path: Path) -> None:
+ root = tmp_path / "product"
+ key_header = "-----BEGIN " + "PRIVATE KEY-----"
+ key_footer = "-----END " + "PRIVATE KEY-----"
+ fake_key = f"{key_header}\n{'A' * 88}\n{key_footer}"
+ fake_token = "notAReal" + "Token1234567890"
+ fake_sid = "S-1-5-21-123456789-234567890-345678901-1001"
+ private_text = f"""Contact [email protected] for access.
+C:\\Users\\PrivatePerson\\Jarvis
+{fake_sid}
+API_TOKEN={fake_token}
+{fake_key}
+"""
+ _write_page(
+ root,
+ "private.md",
+ title="Private",
+ slug="private",
+ order=1,
+ related=["missing-one", "missing-two"],
+ body=_body("Private", extra=private_text),
+ )
+
+ categories = _categories(root)
+ assert "privacy.email" in categories
+ assert "privacy.windows-user-path" in categories
+ assert "privacy.windows-sid" in categories
+ assert "privacy.suspicious-assignment" in categories
+ assert "privacy.private-key" in categories
+
+ result = subprocess.run(
+ [sys.executable, str(SCRIPT), str(root)],
+ capture_output=True,
+ text=True,
+ check=False,
+ )
+ assert result.returncode == 1
+ assert fake_token not in result.stderr
+ assert fake_sid not in result.stderr
+ assert "PrivatePerson" not in result.stderr
+ assert all(": " in line for line in result.stderr.splitlines())
+
+
+def test_malformed_frontmatter_is_reported_without_a_traceback(tmp_path: Path) -> None:
+ root = tmp_path / "product"
+ root.mkdir()
+ (root / "broken.md").write_text("---\ntitle: [broken\n---\n# Broken\n", encoding="utf-8")
+
+ assert _categories(root) == {"frontmatter.invalid-yaml"}
+
+
+def test_manifest_requires_the_exact_reviewed_corpus(tmp_path: Path) -> None:
+ root = tmp_path / "product"
+ first = _write_page(
+ root,
+ "welcome.md",
+ title="Welcome",
+ slug="welcome",
+ order=1,
+ related=["missing-one", "missing-two"],
+ )
+ unlisted = _write_page(
+ root,
+ "unlisted.md",
+ title="Unlisted",
+ slug="unlisted",
+ order=2,
+ related=[],
+ )
+ source = tmp_path / "source.md"
+ source.write_text("source", encoding="utf-8")
+ manifest = tmp_path / "manifest.yaml"
+ manifest.write_text(
+ yaml.safe_dump(
+ {
+ "content_root": root.as_posix(),
+ "page_count": 2,
+ "pages": [
+ {
+ "file": first.as_posix(),
+ "title": "Wrong title",
+ "slug": "welcome",
+ "summary": FRIENDLY_SUMMARY,
+ "diataxis": "explanation",
+ "section": "Start",
+ "section_order": 1,
+ "order": 1,
+ "related": [],
+ "authoritative_sources": [source.as_posix()],
+ },
+ {
+ "file": (root / "missing.md").as_posix(),
+ "title": "Missing",
+ "slug": "missing",
+ "summary": "A missing page.",
+ "diataxis": "explanation",
+ "section": "Start",
+ "section_order": 1,
+ "order": 3,
+ "related": [],
+ "authoritative_sources": [source.as_posix()],
+ },
+ ],
+ },
+ sort_keys=False,
+ ),
+ encoding="utf-8",
+ )
+
+ findings = check_paths([root], manifest_path=manifest)
+ categories = {category for _path, category in findings}
+ assert "manifest.file-missing" in categories
+ assert "manifest.file-unlisted" in categories
+ assert "manifest.metadata-mismatch.title" in categories
+ assert unlisted.exists()
diff --git a/tests/unit/ui/web/test_docs_routes.py b/tests/unit/ui/web/test_docs_routes.py
index 81489834a6..b261b2311b 100644
--- a/tests/unit/ui/web/test_docs_routes.py
+++ b/tests/unit/ui/web/test_docs_routes.py
@@ -7,6 +7,7 @@ neither, so the else-branch called a non-existent binary and raised a
``jarvis.platform.open_path.open_file``, the cross-platform helper already
used by the Outputs view's native file actions.
"""
+
from __future__ import annotations
from pathlib import Path
@@ -16,7 +17,7 @@ from unittest.mock import patch
from fastapi import FastAPI
from fastapi.testclient import TestClient
-from jarvis.ui.web.docs_routes import router
+from jarvis.ui.web.docs_routes import _safe_doc_error, router
class _FakeRegistry:
@@ -26,6 +27,9 @@ class _FakeRegistry:
def get(self, slug: str):
return self._docs.get(slug)
+ async def ensure_loaded(self) -> None:
+ return None
+
def _app(doc_path: Path) -> FastAPI:
app = FastAPI()
@@ -39,12 +43,10 @@ def test_open_doc_calls_open_file(tmp_path: Path):
target = tmp_path / "my-doc.md"
target.write_text("# hi", encoding="utf-8")
client = TestClient(_app(target))
- with patch(
- "jarvis.platform.open_path.open_file", return_value=True
- ) as opn:
+ with patch("jarvis.platform.open_path.open_file", return_value=True) as opn:
r = client.post("/api/docs/my-doc/open")
assert r.status_code == 200
- assert r.json() == {"path": str(target.resolve()), "opened": True}
+ assert r.json() == {"path": "my-doc.md", "opened": True}
opn.assert_called_once_with(target.resolve())
@@ -70,3 +72,12 @@ def test_open_doc_404_when_file_deleted_on_disk(tmp_path: Path):
client = TestClient(_app(target))
r = client.post("/api/docs/my-doc/open")
assert r.status_code == 404
+
+
+def test_doc_error_category_does_not_expose_local_path() -> None:
+ error = r"read failed: [Errno 2] C:\Users\private-name\secret-doc.md"
+
+ safe = _safe_doc_error(error)
+
+ assert safe == "read failed"
+ assert "private-name" not in safe