DOC24_ADDENDUM_Q_DASHBOARD_TOOL_REGISTRY.md
Current Specs/DOC24/DOC24_ADDENDUM_Q_DASHBOARD_TOOL_REGISTRY.md
ELNOR REPO READER TEXT MIRROR
Original path: Current Specs/DOC24/DOC24_ADDENDUM_Q_DASHBOARD_TOOL_REGISTRY.md
Source repo: /Users/OpenClaw1/Elnor/Elnor Specs
Git branch: main
Git commit: dbaa25962edc11ab30e8d4ca1715f9ae5bf77331
Generated: 2026-06-09T01:23:58.539Z
---
# DOC24 Addendum: Q Dashboard Tool Registry
**Version:** 0.1 (Living Document)
**Date:** April 11, 2026
**Status:** Draft — evolves with UI development
**Parent Spec:** DOC24 R2.5 (Unified Knowledge, Capability & Onboarding Architecture)
**Applies to:** §14.5 (Registry examples), §16.4 (Tool pack families), Appendix B (Tool pack candidates)
---
## Status Note
> **This is a living document.** The Q Dashboard UI is under active development. Tool definitions here reflect the current build state as of the date above. As UI features are added, modified, or removed, this registry must be updated accordingly.
>
> **Generation rule:** This registry should be re-derived from the Q Dashboard codebase (`q-dashboard/src/`) whenever a major UI milestone is completed. Per DOC24 §23, tool registrations should eventually be auto-generated from code annotations (decorators or companion registration files) in the React components.
>
> **Completeness:** This document captures tools for features that are built and functional in the current UI. Planned but unbuilt features are not included.
---
## 1. Tool Pack Definition
Per DOC24 §16.3 `ToolPackDefinition` schema:
```yaml
pack_id: q_dashboard_pack
pack_revision: "0.1"
label: Q Dashboard UI Controls
description: >
Tools for controlling the Q Dashboard application interface. Includes
workspace management, tab operations, document viewer controls, note
editing, browser navigation, panel management, and view configuration.
These tools enable agent-driven UI manipulation in response to natural
language requests.
included_action_ids: [see Section 3]
default_mount_scope: core # always available when Q Dashboard is the client
policy_constraints: []
schema_version: 1
```
**Rationale for `core` mount scope:** Unlike external tool packs that are mounted contextually, Q Dashboard controls are always relevant when the user is interacting through the Q Dashboard client. The agent should always be able to manipulate the application it's running inside.
---
## 2. Classification Rules
Per DOC24 §14.2, every Q Dashboard action is classified as one of:
| Classification | Definition | Q Dashboard Examples |
|---------------|------------|---------------------|
| **Stable semantic action** | Named, versioned action with defined schema. Agent can invoke directly. | `q.workspace.open`, `q.tab.create`, `q.note.save` |
| **Presentation-only control** | UI state change with no data side effects. Not typically agent-invoked but can be. | `q.view.toggle_sidebar`, `q.view.split_mode` |
| **Dynamic schema field** | Not applicable to UI controls. | — |
**Safety classification rules for Q Dashboard:**
| Safety Class | Rule | Examples |
|-------------|------|---------|
| `read` | Actions that only display or navigate, no data changes | `q.tab.switch`, `q.browser.search`, `q.view.toggle_sidebar` |
| `write` | Actions that create or modify data | `q.note.create`, `q.workspace.save`, `q.comment.add` |
| `destructive` | Actions that delete data or are irreversible | `q.tab.close`, `q.workspace.delete`, `q.note.delete` |
**Confirmation policy rules:**
| Policy | Rule | Examples |
|--------|------|---------|
| `none` | Navigation, view changes, opening things | `q.tab.switch`, `q.view.split_mode` |
| `ask_first` | Destructive actions | `q.tab.close`, `q.workspace.delete` |
| `always_confirm` | Bulk destructive actions | `q.tab.close_all` |
---
## 3. Tool Registry
### 3.1 Workspace Tools
| action_id | display_name | description | safety | confirm | params |
|-----------|-------------|-------------|--------|---------|--------|
| `q.workspace.open` | Open Workspace | Opens a saved workspace by name, restoring all tabs, active tab, split mode, and right panel state. Saves current state to the outgoing workspace before switching. | write | none | `{ name: string }` |
| `q.workspace.save` | Save Workspace | Saves the current tab arrangement, active tab, split mode, and right panel state to the active workspace. If no workspace is active, prompts for a name. | write | none | `{ name?: string }` |
| `q.workspace.create` | Create Workspace | Creates a new workspace from the current state with the given name. | write | none | `{ name: string, color?: string }` |
| `q.workspace.delete` | Delete Workspace | Deletes a saved workspace by name. | destructive | ask_first | `{ name: string }` |
| `q.workspace.list` | List Workspaces | Returns the list of all saved workspaces with their names, tab counts, and last saved timestamps. | read | none | `{}` |
### 3.2 Tab Tools
| action_id | display_name | description | safety | confirm | params |
|-----------|-------------|-------------|--------|---------|--------|
| `q.tab.create` | Create Tab | Creates a new tab of the specified type. Types: note, todo, chat, web, doc. For doc type, can include a file path or URL. | write | none | `{ type: 'note' \| 'todo' \| 'chat' \| 'web' \| 'doc', title?: string, url?: string }` |
| `q.tab.close` | Close Tab | Closes a tab by title or ID. If it's the active tab, switches to the adjacent tab. | destructive | ask_first | `{ title?: string, id?: string }` |
| `q.tab.close_all` | Close All Tabs | Closes all tabs except the active one. | destructive | always_confirm | `{}` |
| `q.tab.switch` | Switch Tab | Switches to a tab by title (partial match) or ID. | read | none | `{ title?: string, id?: string }` |
| `q.tab.list` | List Tabs | Returns all open tabs with their types, titles, and active status. | read | none | `{}` |
| `q.tab.rename` | Rename Tab | Renames a note tab. Only applicable to note and todo types. | write | none | `{ title: string, newTitle: string }` |
| `q.tab.move_to_group` | Move Tab to Group | Moves a tab into a tab group by group name. | write | none | `{ tabTitle: string, groupName: string }` |
| `q.tab.pin` | Pin Tab | Pins or unpins a tab. | write | none | `{ title: string, pinned: boolean }` |
### 3.3 Note Tools
| action_id | display_name | description | safety | confirm | params |
|-----------|-------------|-------------|--------|---------|--------|
| `q.note.create` | Create Note | Creates a new note tab with optional title and content. Content can be plain text or markdown. | write | none | `{ title?: string, content?: string }` |
| `q.note.save` | Save Note | Saves the current note. | write | none | `{}` |
| `q.note.duplicate` | Duplicate Note | Saves the current note as a copy with a new name. | write | none | `{ newTitle: string }` |
| `q.note.export` | Export Note | Exports the current note in the specified format. | write | none | `{ format: 'docx' \| 'pdf' \| 'markdown' \| 'html' \| 'text' }` |
| `q.note.print` | Print Note | Opens the print dialog for the current note. | read | none | `{}` |
| `q.note.insert_module` | Insert Module | Inserts a module block into the current note. | write | none | `{ type: 'todo' \| 'thread' \| 'feed' \| 'bar' \| 'calendar' }` |
| `q.note.get_content` | Get Note Content | Returns the text content of the current note. Used for sending note context to the agent. | read | none | `{}` |
| `q.note.set_content` | Set Note Content | Replaces the note content with the provided text/markdown. | write | ask_first | `{ content: string }` |
| `q.note.append_content` | Append to Note | Appends text/markdown to the end of the current note. | write | none | `{ content: string }` |
### 3.4 Document Viewer Tools
| action_id | display_name | description | safety | confirm | params |
|-----------|-------------|-------------|--------|---------|--------|
| `q.document.open` | Open Document | Opens a file picker to select a document, or opens a document by path/URL. | write | none | `{ path?: string, url?: string }` |
| `q.document.open_picker` | Open File Picker | Opens a Finder/file picker dialog for the user to select a file. | read | none | `{}` |
| `q.document.go_to_page` | Go to Page | Navigates to a specific page in the current PDF. | read | none | `{ page: number }` |
| `q.document.search` | Search in Document | Opens the find bar and searches for text in the current document. | read | none | `{ query: string }` |
| `q.document.highlight` | Highlight Text | Highlights text on a specific page. Uses text matching to find and highlight the specified string. | write | none | `{ text: string, page?: number, color?: 'yellow' \| 'green' \| 'blue' \| 'pink' }` |
| `q.document.add_note` | Add Note to Document | Adds a sticky note annotation to a page. | write | none | `{ page: number, content: string }` |
| `q.document.add_bookmark` | Add Bookmark | Adds a bookmark to the current or specified page. | write | none | `{ page?: number, label?: string }` |
| `q.document.get_text` | Get Document Text | Returns the extracted text content of the document or specific pages. | read | none | `{ pages?: number[] }` |
| `q.document.get_page_count` | Get Page Count | Returns the total number of pages in the current document. | read | none | `{}` |
| `q.document.save` | Save Document | Saves the current document with all annotations. | write | none | `{}` |
| `q.document.save_as` | Save Document As | Opens save dialog to save the document with a new name. | write | none | `{ filename?: string }` |
| `q.document.export` | Export Document | Exports the document in the specified format. | write | none | `{ format: 'pdf' \| 'docx' \| 'note' }` |
| `q.document.redact` | Redact Text | Redacts (blacks out) the specified text on a page. | destructive | ask_first | `{ text: string, page: number }` |
| `q.document.organize_pages` | Organize Pages | Opens the page organizer view for reordering/deleting pages. | read | none | `{}` |
| `q.document.combine` | Combine Files | Opens the combine files view for merging multiple PDFs. | read | none | `{}` |
| `q.document.rotate_page` | Rotate Page | Rotates the current page by 90 degrees. | write | none | `{ degrees?: 90 \| 180 \| 270 }` |
### 3.5 Comment & Ask Tools
| action_id | display_name | description | safety | confirm | params |
|-----------|-------------|-------------|--------|---------|--------|
| `q.comment.add` | Add Comment | Adds a comment to the current document or note. Can include an anchor quote from the content. | write | none | `{ body: string, anchor?: string }` |
| `q.comment.reply` | Reply to Comment | Replies to an existing comment by ID or by matching the comment body text. | write | none | `{ commentId?: string, commentBody?: string, reply: string }` |
| `q.comment.resolve` | Resolve Comment | Marks a comment as resolved. | write | none | `{ commentId?: string, commentBody?: string }` |
| `q.comment.reopen` | Reopen Comment | Reopens a resolved comment. | write | none | `{ commentId?: string, commentBody?: string }` |
| `q.comment.delete` | Delete Comment | Deletes a comment. | destructive | ask_first | `{ commentId?: string, commentBody?: string }` |
| `q.comment.list` | List Comments | Returns all comments on the current document/note with their status, author, and replies. | read | none | `{ status?: 'open' \| 'resolved' \| 'all' }` |
| `q.comment.send_all` | Send All Comments | Sends all open comments to the agent for analysis/response. | write | none | `{}` |
| `q.ask.open` | Open Ask Panel | Opens the Ask (agent conversation) side panel. | read | none | `{}` |
| `q.ask.send` | Send to Agent | Sends a message to the agent in the Ask panel with the current document context. | write | none | `{ message: string, includeDocument?: boolean, includeComments?: boolean, includeClips?: boolean }` |
### 3.6 Track Changes Tools
| action_id | display_name | description | safety | confirm | params |
|-----------|-------------|-------------|--------|---------|--------|
| `q.trackchanges.toggle` | Toggle Track Changes | Turns track changes on or off for the current note. | write | none | `{ enabled: boolean }` |
| `q.trackchanges.show_markup` | Show/Hide Markup | Toggles visibility of tracked change markup. | read | none | `{ visible: boolean }` |
| `q.trackchanges.accept` | Accept Change | Accepts the tracked change at the cursor position. | write | none | `{}` |
| `q.trackchanges.reject` | Reject Change | Rejects the tracked change at the cursor position. | write | none | `{}` |
| `q.trackchanges.accept_all` | Accept All Changes | Accepts all pending tracked changes. | write | ask_first | `{}` |
| `q.trackchanges.reject_all` | Reject All Changes | Rejects all pending tracked changes. | destructive | ask_first | `{}` |
### 3.7 View & Layout Tools
| action_id | display_name | description | safety | confirm | params |
|-----------|-------------|-------------|--------|---------|--------|
| `q.view.split_mode` | Toggle Split View | Enables or disables split view mode. | read | none | `{ enabled: boolean }` |
| `q.view.toggle_sidebar` | Toggle Browser Sidebar | Shows or hides the left browser/navigation sidebar. | read | none | `{ visible?: boolean }` |
| `q.view.set_browser_mode` | Set Browser Mode | Switches the left sidebar between nav, browser, notes, and bookmarks modes. | read | none | `{ mode: 'nav' \| 'browser' \| 'notes' \| 'bookmarks' }` |
| `q.view.toggle_horizontal_tabs` | Toggle Horizontal Tabs | Shows or hides the horizontal tab bar at the top. | read | none | `{ visible?: boolean }` |
| `q.view.set_zoom` | Set Zoom Level | Sets the zoom level for the current content area. | read | none | `{ level: number }` |
| `q.view.open_chat_column` | Toggle Chat Column | Opens or closes the right-side chat column. | read | none | `{ open?: boolean }` |
| `q.view.open_right_panel` | Open Right Panel | Opens the right panel to the specified tab. | read | none | `{ tab: 'comments' \| 'send' }` |
| `q.view.close_right_panel` | Close Right Panel | Closes the right panel. | read | none | `{}` |
### 3.8 File Browser & Search Tools
These tools control the left sidebar file browser pane — searching, filtering, and opening items from the project/document library.
| action_id | display_name | description | safety | confirm | params |
|-----------|-------------|-------------|--------|---------|--------|
| `q.browser.search` | Search Browser | Searches the browser pane for items matching the query. | read | none | `{ query: string }` |
| `q.browser.set_scope` | Set Browser Scope | Sets the browser scope (selection/all). | read | none | `{ scope: 'selection' \| 'all' }` |
| `q.browser.filter_type` | Filter by Type | Filters browser items by type (Note, Doc, Chat, Workspace, Task, etc.). | read | none | `{ types: string[] }` |
| `q.browser.open_item` | Open Browser Item | Opens a browser item by title, creating a new tab for it. | write | none | `{ title: string }` |
| `q.browser.navigate` | Navigate to Page | Navigates to a named page in the nav pane (Settings, Agents, Projects, etc.). | read | none | `{ page: string }` |
| `q.browser.open_file` | Open File from Disk | Opens a file picker or opens a specific file from the file system into the document viewer. | write | none | `{ path?: string }` |
### 3.8B Web Browser Tools
These tools control the built-in web browser tab — navigating URLs, managing bookmarks, reading web pages, and clipping content.
| action_id | display_name | description | safety | confirm | params |
|-----------|-------------|-------------|--------|---------|--------|
| `q.web.navigate` | Navigate to URL | Opens a URL in the current web tab, or creates a new web tab if none is active. | write | none | `{ url: string, newTab?: boolean }` |
| `q.web.back` | Go Back | Navigates back in the current web tab's history. | read | none | `{}` |
| `q.web.forward` | Go Forward | Navigates forward in the current web tab's history. | read | none | `{}` |
| `q.web.refresh` | Refresh Page | Reloads the current web page. | read | none | `{}` |
| `q.web.bookmark` | Bookmark Page | Adds or removes the current page from bookmarks. | write | none | `{ url?: string, title?: string, remove?: boolean }` |
| `q.web.reader_mode` | Toggle Reader Mode | Toggles reader mode for the current web page, stripping ads and formatting for clean reading. | read | none | `{ enabled?: boolean }` |
| `q.web.clip` | Clip Selection | Clips the current selection or page content to session memory. | write | none | `{ text?: string }` |
| `q.web.get_page_text` | Get Page Text | Returns the text content of the current web page. Used for sending web content to the agent. | read | none | `{}` |
| `q.web.get_url` | Get Current URL | Returns the URL of the currently active web tab. | read | none | `{}` |
| `q.web.search` | Web Search | Opens a new web tab and performs a search with the given query. | write | none | `{ query: string, engine?: 'google' \| 'bing' \| 'duckduckgo' }` |
| `q.web.open_incognito` | Open Incognito Tab | Opens a new incognito web tab, optionally navigating to a URL. | write | none | `{ url?: string }` |
| `q.web.screenshot` | Screenshot Page | Captures a screenshot of the current web page for reference or annotation. | read | none | `{}` |
### 3.9 Nav Pane Tools
The nav pane is the primary navigation sidebar with three collapsible sections: Pages, Tabs, and Workspaces. These tools control navigation and section visibility.
| action_id | display_name | description | safety | confirm | params |
|-----------|-------------|-------------|--------|---------|--------|
| `q.nav.open_page` | Open Nav Page | Opens a named page from the Pages section (Chats, Activity & Notifications, Tasks, Projects, Knowledge, Forums & Panels, Agents, Skills & Connectors, Overlays & Prompts, Context Buckets, Settings). | read | none | `{ page: string }` |
| `q.nav.open_chat` | Open Chat from Nav | Opens a specific chat conversation from the Chats expandable list. | read | none | `{ conversation: string }` |
| `q.nav.collapse_section` | Collapse Nav Section | Collapses or expands a nav pane section. | read | none | `{ section: 'pages' \| 'tabs' \| 'workspaces', collapsed: boolean }` |
| `q.nav.search_tabs` | Search Tabs | Opens the tab search filter in the nav pane Tabs section and filters by query. | read | none | `{ query: string }` |
| `q.nav.tab_groups_view` | Toggle Tab Groups View | Switches between flat tab list and grouped tab view in the nav pane. | read | none | `{ grouped: boolean }` |
### 3.10 Tab Group Tools
| action_id | display_name | description | safety | confirm | params |
|-----------|-------------|-------------|--------|---------|--------|
| `q.tabgroup.create` | Create Tab Group | Creates a new tab group with the specified name and color. | write | none | `{ name: string, color?: string }` |
| `q.tabgroup.rename` | Rename Tab Group | Renames an existing tab group. | write | none | `{ name: string, newName: string }` |
| `q.tabgroup.delete` | Delete Tab Group | Deletes a tab group. Tabs in the group become ungrouped. | destructive | ask_first | `{ name: string }` |
| `q.tabgroup.collapse` | Collapse Tab Group | Collapses or expands a tab group in the nav pane. | read | none | `{ name: string, collapsed: boolean }` |
| `q.tabgroup.set_color` | Set Tab Group Color | Changes the color of a tab group. | write | none | `{ name: string, color: string }` |
| `q.tabgroup.list` | List Tab Groups | Returns all tab groups with their names, colors, and member tab counts. | read | none | `{}` |
### 3.11 Clip Tools
| action_id | display_name | description | safety | confirm | params |
|-----------|-------------|-------------|--------|---------|--------|
| `q.clip.create` | Create Clip | Clips the current selection or specified text to session memory. | write | none | `{ text?: string }` |
| `q.clip.count` | Get Clip Count | Returns the current number of session clips. | read | none | `{}` |
### 3.12 Floating Palette Tools
The floating palette is the quick-access command popup (triggered by keyboard shortcut or nav rail button) with chat, note, and todo modes.
| action_id | display_name | description | safety | confirm | params |
|-----------|-------------|-------------|--------|---------|--------|
| `q.palette.open` | Open Palette | Opens the floating palette popup. | read | none | `{ mode?: 'chat' \| 'note' \| 'todo' }` |
| `q.palette.close` | Close Palette | Closes the floating palette. | read | none | `{}` |
| `q.palette.switch_mode` | Switch Palette Mode | Switches the palette between chat, note, and todo modes. | read | none | `{ mode: 'chat' \| 'note' \| 'todo' }` |
| `q.palette.send_message` | Send Palette Message | Sends a message in the palette's chat mode. | write | none | `{ message: string }` |
| `q.palette.add_todo` | Add Palette Todo | Adds a todo item in the palette's todo mode. | write | none | `{ text: string, list?: string }` |
| `q.palette.toggle_todo` | Toggle Palette Todo | Toggles a todo item's done state. | write | none | `{ text: string }` |
| `q.palette.create_todo_list` | Create Todo List | Creates a new todo list in the palette. | write | none | `{ name: string }` |
| `q.palette.set_shortcut` | Set Palette Shortcut | Sets a keyboard shortcut for the palette. | write | none | `{ keys: string }` |
### 3.13 Chat Tools
| action_id | display_name | description | safety | confirm | params |
|-----------|-------------|-------------|--------|---------|--------|
| `q.chat.open` | Open Chat | Opens the chat column or switches to a specific conversation. | read | none | `{ conversation?: string }` |
| `q.chat.create` | Create Conversation | Creates a new chat conversation. | write | none | `{ title?: string }` |
| `q.chat.send` | Send Chat Message | Sends a message in the current chat conversation. | write | none | `{ message: string }` |
| `q.chat.set_model` | Set Model | Changes the active model for the current conversation. | write | none | `{ model: string }` |
| `q.chat.set_think_level` | Set Think Level | Changes the think level for the current conversation. | write | none | `{ level: 'off' \| 'minimal' \| 'low' \| 'medium' \| 'high' \| 'max' }` |
| `q.chat.set_agent` | Set Agent | Switches the active agent for the current conversation. | write | none | `{ agent: string }` |
---
## 4. Agent Behavioral Rules
These rules define how the agent should automatically use Q Dashboard tools based on context — not just when explicitly asked, but as default behaviors when producing certain types of output.
### 4.1 URL Routing Rule
**Rule:** When the agent produces, references, or discovers a URL in any context — web search results, document citations, case law links, PACER references, or its own knowledge — it should make the URL actionable within Q Dashboard.
**Behaviors:**
| Context | Agent behavior |
|---------|---------------|
| User says "show me" / "pull up" / "find me" + a website or link | Call `q.web.navigate({ url, newTab: true })` — opens in Q's web browser |
| User says "search for X" | Call `q.web.search({ query })` — opens search results in Q's web browser |
| Agent references a URL in a chat response | Render the URL as a clickable link in chat. On click, call `q.web.navigate` to open in Q's browser — not an external browser |
| Agent finds a case on PACER, a filing on EDGAR, a document online | Call `q.web.navigate` to open it directly. Don't just paste the URL |
| User says "open this link" / "go there" referencing a URL in the conversation | Call `q.web.navigate` with the referenced URL |
**System prompt instruction (injected when Q Dashboard is the client):**
```
When you reference or discover a URL, always use the q.web.navigate tool to open it
in the Q Dashboard web browser. Do not output bare URLs for the user to copy-paste.
URLs in your responses should be rendered as clickable links that open in Q's
built-in browser when clicked.
```
### 4.2 Document Opening Rule
**Rule:** When the agent references a document that exists in the user's file system or entity graph, it should offer to open it — or open it automatically if the user's intent is clear.
| Context | Agent behavior |
|---------|---------------|
| User says "open the Johnson complaint" | Search entity graph / file system → `q.document.open({ path })` |
| User says "show me the expert report" | Same — find and open |
| Agent mentions a document in analysis ("see Exhibit A") | Render as clickable reference in chat. On click, open in doc viewer |
| User attaches a file in chat | The file should also be openable in the doc viewer via `q.document.open` |
### 4.3 Note Creation Rule
**Rule:** When the agent generates structured content that the user will want to keep (summaries, analysis, draft text, lists), it should offer to save it as a note — or do so automatically when instructed.
| Context | Agent behavior |
|---------|---------------|
| User says "take notes on this" / "write this up" | Generate content → `q.note.create({ title, content })` |
| User says "save that as a note" (referencing agent output) | `q.note.create` with the referenced response content |
| Agent produces a long analysis (>500 words) | Offer: "Want me to save this as a note?" with a clickable action |
| User says "add this to my trial prep note" | `q.note.append_content({ content })` to the specified note |
### 4.4 Workspace Context Rule
**Rule:** The agent should be aware of the current workspace context and use it to inform responses.
| Context | Agent behavior |
|---------|---------------|
| User asks "what am I working on?" | Call `q.tab.list` and `q.workspace.list` to describe current state |
| User says "save this" (ambiguous) | If in a note: `q.note.save`. If workspace has unsaved changes: `q.workspace.save` |
| User says "clean up" / "close everything" | Offer to close tabs, save workspace first |
| User opens a workspace | Agent should acknowledge the context switch ("Loaded Henderson Trial workspace with 5 tabs") |
### 4.5 Cross-Tool Chaining Rule
**Rule:** The agent should chain Q Dashboard tools naturally when a user request implies multiple steps.
| User request | Tool chain |
|-------------|------------|
| "Open the Johnson complaint and highlight the damages section" | `q.document.open` → `q.document.go_to_page` → `q.document.highlight` |
| "Create a new workspace with the Paramount docs" | `q.workspace.create` → multiple `q.tab.create` for each doc |
| "Search PACER for the latest filing and save it" | `q.web.navigate` (PACER) → browse → `q.web.clip` or download → `q.document.open` |
| "Compare the two expert reports side by side" | `q.view.split_mode({ enabled: true })` → `q.tab.create` for each doc |
| "Take the highlighted text and ask Elnor about it" | `q.document.get_text({ pages })` → `q.ask.send({ message, includeDocument: true })` |
### 4.6 Comment/Ask Context Assembly Rule
**Rule:** When comments or document context are sent to the agent via the Ask panel or "Send All to Agent," the system assembles a knowledge packet per DOC24 §19 with the following structure:
**Comment Send Flow:**
```
User clicks "Send All to Agent" or "Send" on individual comment
│
▼
┌─────────────────────────────────────────────────┐
│ 1. Collect comment data │
│ - comment.body (text) │
│ - comment.anchor (quoted text from document) │
│ - comment.replies[] (thread) │
│ - comment.author + timestamp │
│ - comment.status (open/resolved) │
└─────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────┐
│ 2. Collect document context (per DOC_INTEL_SPEC)│
│ - Tier selection based on conversation state │
│ - Full PDF / extracted text / summary │
│ - Page references from comment anchors │
└─────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────┐
│ 3. Assemble knowledge packet (per DOC24 §19) │
│ - Comments as structured cards │
│ - Document context at selected tier │
│ - User's instruction/question (if any) │
│ - Agent system prompt + model config │
│ - Micro-instructions: [suggest] for analysis, │
│ [apply] for action items, [cite] for refs │
└─────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────┐
│ 4. Route to LLM (per DOC24 §17) │
│ - Model selected from Ask panel config │
│ - Think level applied │
│ - Response streamed back to Ask panel chat │
└─────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────┐
│ 5. Response routing │
│ - Inline in Ask panel chat (default) │
│ - Optionally: create comment replies │
│ - Optionally: open in full chat │
│ - Optionally: save as note │
└─────────────────────────────────────────────────┘
```
**Comment XML format (per DOC24 §26):**
```xml
<comment author="You" time="10m ago" status="open">
<anchor>"discount rate of 18%"</anchor>
<body>Verify Sanli's discount rate — 18% seems unsupported.</body>
<reply author="Elnor" time="5m ago">
Found 3 comparables: avg 8-12%. Sanli's 18% is an outlier.
</reply>
</comment>
```
**Scope options (from Ask panel):**
| Scope setting | What's included in packet |
|--------------|--------------------------|
| Document only | Document content at selected tier. No comments. |
| All comments + references | All open comments with anchors + document context |
| Select comments | Only checked comments + their anchors + document context |
| + Session clips | Adds clipped text snippets from the session |
**Ask Panel chat messages:**
Each message in the Ask panel chat is a standard API message with the assembled context injected on the first turn (or refreshed when scope changes). Subsequent turns in the Ask panel conversation carry the conversation history without re-injecting the full context (unless prompt cache has expired — see DOC_INTELLIGENCE_SPEC §4).
### 4.7 Cross-Reference: Spec Ownership
For clarity on where each piece of the system is defined. DOC72 is the intelligence substrate; DOC24 is the routing/invocation layer; this addendum is the Q Dashboard-specific tool bindings.
| Component | Owning Spec | Section |
|-----------|------------|---------|
| **Entity graph (all knowledge, entities, relationships)** | DOC72 R5.6 | §4 Node Taxonomy, §28 Entity Graph as Durable Store |
| **Agent profiles, inter-agent awareness, delegation** | DOC72 R5.6 | §40 Agent Knowledge Profiles |
| **Document intake, extraction, classification** | DOC72 R5.6 | §20B Surface-Specific Contracts, §22 Folder Attention Tiers |
| **Comment/annotation extraction priority** | DOC72 R5.6 | §20B — user annotations are `deep` extraction priority |
| **Knowledge Manager UI (in Q Dashboard)** | DOC72 R5.6 | §41 Conversational Inspectability |
| **Knowledge-to-LLM delivery, packet assembly** | DOC24 R2.5 | §19 Runtime Packet Model, §§26-37 Delivery Architecture |
| **Invocation routing (which tool, which transport)** | DOC24 R2.5 | §17 Invocation Architecture |
| **Tool registry (stable actions, schemas, bindings)** | DOC24 R2.5 | §14 Semantic Capability Registry |
| **Q Dashboard tools (workspace, tab, doc, comment, etc.)** | DOC24 Addendum (this doc) | §3 Tool Registry |
| **Q Dashboard agent behavioral rules** | DOC24 Addendum (this doc) | §4 Agent Behavioral Rules |
| **Document context tiering (PDF optimization)** | DOC_INTELLIGENCE_SPEC | §3 Tiered Context System |
| **Comment UI (right panel, cards, threading)** | DOC20 | UI mockup — right panel |
**Key relationship:** DOC72 defines WHAT the agent knows and how it learns. DOC24 defines HOW the agent acts (routing, invocation, delivery). This addendum defines WHAT Q Dashboard-specific actions exist and WHEN the agent should use them. The Document Intelligence Spec defines HOW documents are optimized before being sent through DOC24's delivery pipeline to the LLM.
**DOC72 intake triggers from Q Dashboard tools:**
When Q Dashboard tools are invoked, several generate DOC72 extraction events:
| Tool invocation | DOC72 extraction event | Priority |
|----------------|----------------------|----------|
| `q.comment.add` | New comment entity created in graph | `deep` (user-annotated content) |
| `q.comment.send_all` | Comments packaged for agent + extraction of agent response | `deep` |
| `q.ask.send` | User question + document context → extraction of both Q and A | `deep` |
| `q.note.create` (with agent content) | Agent-generated content → entity creation | `standard` |
| `q.document.highlight` | User annotation on document → extraction signal | `deep` |
| `q.clip.create` | User-selected content → session memory | `standard` |
| `q.workspace.save` | Workspace state snapshot → entity update | `shallow` |
| `q.tab.create` / `q.tab.close` | Usage pattern → UsageEvent with agent_id | `passive` |
| `q.web.navigate` | URL visit → potential extraction if agent-initiated | `shallow` |
| `q.web.clip` | Web content clip → session memory + potential entity | `standard` |
These extraction priorities follow DOC72 §20B's depth classification: user-annotated content is always `deep`, agent-generated content is `standard`, state changes are `shallow`, and usage patterns are `passive` (observed but not actively extracted).
---
## 5. Common Phrases (for LLM routing)
Per DOC24 §14.3 `common_phrases` field, these natural language patterns map to Q Dashboard actions:
```yaml
q.workspace.open:
- "open my {name} workspace"
- "switch to the {name} workspace"
- "load {name}"
- "go to {name} workspace"
q.tab.create:
- "open a new note"
- "create a note called {title}"
- "open a new tab"
- "new chat"
- "open a web tab"
q.tab.close:
- "close this tab"
- "close the {title} tab"
- "close it"
q.tab.switch:
- "switch to {title}"
- "go to {title}"
- "open {title}"
q.note.create:
- "create a note with {content}"
- "make a new note called {title}"
- "start a note about {topic}"
q.document.open:
- "open a document"
- "open a PDF"
- "open file"
q.document.go_to_page:
- "go to page {N}"
- "jump to page {N}"
q.view.split_mode:
- "split the screen"
- "open split view"
- "close split view"
- "side by side"
q.view.set_browser_mode:
- "show the browser"
- "switch to nav"
- "show notes"
- "show bookmarks"
- "open the file browser"
q.workspace.save:
- "save this workspace"
- "save my workspace"
- "save the current layout"
q.comment.add:
- "add a comment saying {body}"
- "comment on this"
- "leave a note here"
q.ask.send:
- "ask Elnor about this"
- "send this to Elnor"
- "what does Elnor think about {topic}"
q.trackchanges.toggle:
- "turn on track changes"
- "enable tracking"
- "stop tracking changes"
q.chat.set_model:
- "switch to Opus"
- "use Sonnet"
- "change to GPT-4"
q.chat.set_think_level:
- "think harder"
- "set thinking to max"
- "turn off thinking"
- "think level high"
q.web.navigate:
- "go to {url}"
- "open {url}"
- "navigate to {url}"
- "pull up {website}"
- "open PACER"
- "go to Google"
q.web.search:
- "search for {query}"
- "Google {query}"
- "look up {query} online"
q.web.bookmark:
- "bookmark this page"
- "save this bookmark"
- "remove this bookmark"
q.web.clip:
- "clip this"
- "clip this page"
- "save this to clips"
q.web.reader_mode:
- "turn on reader mode"
- "make this readable"
- "clean up this page"
q.web.get_page_text:
- "read this page"
- "what does this page say"
- "summarize this page"
q.browser.open_file:
- "open a file"
- "open a document from my computer"
- "find and open a file"
q.nav.open_page:
- "open settings"
- "go to agents"
- "show me projects"
- "open the tasks page"
- "go to knowledge"
q.nav.open_chat:
- "open the Paramount chat"
- "go to the Brooge conversation"
q.nav.collapse_section:
- "collapse the pages section"
- "hide the tabs list"
- "expand workspaces"
q.tabgroup.create:
- "create a tab group called {name}"
- "group these tabs as {name}"
- "make a new group"
q.tabgroup.delete:
- "delete the {name} group"
- "remove the {name} tab group"
```
---
## 6. Client Exposure Rules
All Q Dashboard tools use:
```yaml
client_exposure:
elnor_native: true # Elnor can invoke these directly
mcp_external: false # Not exposed to external MCP clients
q_ui: true # Triggered from Q Dashboard UI
```
Exception: `q.document.get_text` and `q.note.get_content` may also be exposed to MCP external clients for integrations:
```yaml
client_exposure:
elnor_native: true
mcp_external: true # External tools can request document content
q_ui: true
```
---
## 7. Implementation Mapping
Each tool maps to existing React state mutations in the Q Dashboard codebase:
| action_id | Frontend implementation |
|-----------|----------------------|
| `q.workspace.open` | `setTabs(ws.tabs); setActiveTabId(ws.activeTabId); setSplitMode(ws.splitMode); ...` |
| `q.tab.create` | `setTabs(p => [...p, newTab]); setActiveTabId(newTab.id)` |
| `q.tab.close` | `setTabs(p => p.filter(t => t.id !== id))` |
| `q.tab.switch` | `setActiveTabId(id)` |
| `q.note.create` | `q.tab.create` with `type: 'note'` + `editor.commands.setContent(content)` |
| `q.view.split_mode` | `setSplitMode(enabled)` |
| `q.view.open_right_panel` | `setRightOpen(true); setRightTab(tab)` |
| `q.document.go_to_page` | `goToPage(page)` in PdfViewer |
| `q.trackchanges.toggle` | `setTrackingOn(enabled)` in NoteEditor |
| `q.chat.set_model` | `setSelectedModel(model)` in ChatPanel |
All of these are direct calls to existing state setters in `DataProvider` or local component state. No new APIs or backend services are required for the UI control layer.
---
## 8. Future Tools (Planned, Not Yet Built)
These tools correspond to features that are planned but not yet implemented in the UI. They are listed here for completeness and to inform future development:
| action_id | description | Blocked by |
|-----------|-------------|------------|
| `q.document.ocr` | Run OCR on a scanned PDF page | Tesseract.js integration |
| `q.document.fill_form` | Fill a PDF form field | AnnotationLayer integration |
| `q.note.insert_from_agent` | Agent writes directly into a note at cursor position | Agent write permission system |
| `q.agent.create` | Create a new agent with specified model and role | Agent management UI |
| `q.automation.create` | Create a recurring automation/task | Automation engine |
| `q.memory.save` | Save a piece of information to the entity graph | DOC72 entity graph API |
| `q.knowledge.search` | Search the knowledge base | DOC72 knowledge retrieval |
---
## 9. Revision History
| Version | Date | Changes |
|---------|------|---------|
| 0.1 | 2026-04-11 | Initial draft. Captures all tools for features built as of this date. |
---
## 10. Amendment Integration
This addendum should be integrated into DOC24 at the next revision (R2.6 or R3.0) as:
- **§14.5** — Add all `q.*` actions to the registry examples
- **§16.4 / Appendix B** — Add `q_dashboard_pack` to tool pack families
- **§14.7 (new)** — Q Dashboard Tool Classification Matrix
- **§20.5** — Add Q Dashboard pack to the active pack chips UI
Per DOC24 §22 (Cross-doc amendment matrix), this addendum also touches:
- **DOC72** — `tool_capability` graph nodes for each Q Dashboard action
- **DOC73** — Agent invocation routing for Q Dashboard tools
- **DOC20** — UI surfaces for tool status indicators