brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
computer-useOperate web pages in Emperor's built-in browser with the browser_* tools, and macOS app windows with the desktop_* tools — open or bind a target, read it, fill, click or type, and verify the result. Use when a task needs a real web page or app window (a form, a dashboard, a site or app without an API or CLI). Requires Settings › 电脑操作 to be switched on.
Independent GitHub snapshot · Automated classification · Original documentation governs
How to work in web pages through Emperor's built-in browser. The browser_* tools drive an Agent tab that the user can watch, pause, take over or close in the workspace Browser pane.
web_fetch or a file tool when one can do the job. Use the browser only for the part that must happen in a page.browser_* tools are in your tool list, computer use is switched off. Tell the user they can turn it on in 设置 › 电脑操作; do not try to drive a browser another way.ui_get_capabilities once when unsure. It lists the available drivers, their actions and current limitations. Cross-origin iframe observation and clicking work; typing into one is disabled.browser_open the page (one tab per task is usually enough).browser_observe to get a semantic snapshot. Elements carry refs such as r3.12.browser_fill, browser_click, browser_select, browser_press, browser_scroll.browser_wait for things that load later (text appears, URL changes, an element becomes enabled) instead of observing in a tight loop.Rules that keep this reliable:
STALE_ELEMENT error means observe again, STALE_TARGET means the tab or page you meant is gone.browser_observe with role or nameContains, use diff: true to see only what changed, and pass the returned cursor to read the rest — rather than scrolling blindly.browser_screenshot is for the user or for a vision-capable model; the semantic snapshot is the primary source of truth.desktop_list_windows, then desktop_bind one window, then desktop_observe it; act on refs from the latest observation as in a browser. A lost target means its window closed or its app quit: list windows and bind again.open -g -a "<App name>"), then list its windows.desktop_list_apps or desktop_list_windows, even while running: System Settings, Keychain Access, Passwords, system authorization prompts, Emperor itself, and apps on the user's protected list. When the app you need is one of them, tell the user it is protected and cannot be controlled (its absence from the list does not mean it is closed), and stop. Never try to reach it another way, and never quit, kill, relaunch or script the user's apps through the shell (kill, pkill, killall, osascript, repeated open).desktop_fill and menu commands (desktop_menu, then desktop_menu_select) never bring the app forward. Native apps also take desktop_type and desktop_press in the background. Chrome, Edge and Electron apps (VS Code, Slack, …) ignore keys while in the background: run their commands from the menu (for example View › Command Palette...), set text with desktop_fill, and pick results by clicking them.desktop_activate before the first such step: the user is asked once per task, and after that those actions bring the window forward themselves. Run foreground steps back to back: transient UI such as VS Code's command palette closes as soon as the app loses the front. If the user declines, stop and say what is left for them. Never use AXRaise to bring a window forward.desktop_observe: it reads the window in the background, even on another desktop (Space). Read text with desktop_observe and includeText: true, never by scrolling; never bring a window forward just to read it or take a screenshot. desktop_scroll by page, with the ref of a native app's document or list, runs in the background.desktop_activate restores it.desktop_type. Never read or change input method settings (no Control+Space, no input menu, no defaults).desktop_fill with append: true and only the new text (start it with a line break for a new line). It works in the background, does not depend on where the insertion point is, and keeps the document's formatting. Replace a field's whole content with desktop_fill without append only when that is the task: in a formatted document it drops the formatting. Use desktop_type for a terminal or a field you are filling fresh; it inserts at the insertion point, wherever that is.OUTCOME_UNKNOWN even when they work. On macOS, Home and End only scroll.desktop_observe: it works in the background. If the app then asks about unsaved changes, follow what the user asked for.desktop_menu_select Edit › Undo, then observe.OUTCOME_UNKNOWN with reason target-closed-after-dispatch usually means it worked: confirm with desktop_list_windows and never repeat the action.; chains, redirections or "proof" files. Send Enter with desktop_press, not as a line break inside desktop_type, so the user confirms the text and its execution separately.desktop_observe. A terminal's text area shows its newest output (older lines are cut from the top). If typing returns OUTCOME_UNKNOWN, observe first and retry once only if the text is absent. If you still cannot confirm, say so and let the user check.pbpaste, AppleScript or System Events, no shell history, and no Emperor session or memory files. They overwrite the user's clipboard or reach data the user did not offer.OUTCOME_UNKNOWN means the action may already have happened (the page did not answer in time, or the tab crashed right after the click). Never repeat it blindly — especially a submit, payment or send. Observe the page, or call ui_action_status, and continue from what actually happened.
PERMISSION_REQUIRED with reason accessibility-permission-missing or screen-recording-permission-missing means a macOS permission for Emperor Computer Helper is off. No Emperor card will appear: ask the user to turn it on in System Settings › Privacy & Security, and wait until they have.USER_TAKEOVER error means the user is working in the tab; wait for them to hand it back. PERMISSION_DENIED with reason emergency-stop means the user pressed the kill switch: stop and report.ui_delegate_grant with a subset of an existing grant that allows background use; the child cannot expand the delegated actions or origins.ui_credential_list and use browser_fill_credential with its handle on the exact registered origin, or desktop_fill_credential on a registered app. For other secrets, ask the user to take over and enter them.browser_close; they also close when computer use is switched off.