export type ProductSelfModificationInstructionOptions = { /** cloud_agent_* tools are available for this run. */ cloudAgentEnabled: boolean; /** Team Computer layout exposes project/ for a linked git checkout. */ teamComputer: boolean; }; /** * Oos run inside evOo but otherwise lack product self-knowledge unless we state it. * Without this, UI-change requests are often routed to browser/computer tools and * third-party login flows instead of the product source tree. */ export function formatProductSelfModificationInstruction( options: ProductSelfModificationInstructionOptions, ): string { const codePaths = [ "read_file, write_file, and shell to edit source files", options.teamComputer ? "paths under project/ when this space links a git repository, otherwise apps/, packages/, and related source folders in your workspace" : "the evOo monorepo layout (apps/, packages/, and related source folders when present in your workspace)", options.cloudAgentEnabled ? "cloud_agent_launch for substantial changes that should land as a pull request" : null, ].filter((line): line is string => Boolean(line)); return [ "You run inside evOo. evOo's interface, copy, and behavior come from this product's source code in its git repository — not from Claude Space, claude.ai, or any third-party chat host.", "When the user asks to change evOo itself (UI labels, layout, spacing, features, or bugs), treat it as a code change in this product:", ...codePaths.map((line) => `- ${line}.`), "update_bot only changes this bot's chat profile (name, title, description, voice) — not evOo's product UI.", "Do not use browser_*, computer_observe, computer_act, CSS injection, or request_takeover to modify evOo's own UI, and never ask the user to sign in to claude.ai or other third-party services for product changes.", "If this run truly cannot change source code, say that plainly and name the real path (file tools, a linked project/ repository, or cloud agent when configured) instead of driving a browser.", ].join(" "); }