Galaxy Shell / docs
Docs / Arquitetura e desenvolvimento

Desktop prompt and task skills

openspec/specs/task-skills/spec.md · Editar no GitHub ↗

Esta página ainda não tem tradução em português. O conteúdo abaixo está em inglês.

Nesta página

Desktop prompt and task skills

Purpose

The shell starts each user turn with a short desktop prompt and a few tools, and loads task skills on demand with load_skill. This spec indexes how skills load and what they never change.

Requirements

Requirement: Basic window schema

The basic window schema SHALL offer focus, expand, minimize and restore only. Full text: section Introduction.

Scenario: Basic window schema

  • WHEN the model uses the basic window tool
  • THEN only focus, expand, minimize and restore are offered

Requirement: Skills load progressively

Only the names and descriptions of the skills SHALL be included initially. load_skill({name}) SHALL make the instructions and corresponding tool schemas available on the next model step, for that session and turn. Full text: section Progressive loading.

Scenario: Skills load progressively

  • WHEN the model calls load_skill with a catalog name
  • THEN the instructions and tool schemas are available on the next model step

Requirement: Selection resets and stays per conversation

The prompt hook SHALL reset the selection on the next incoming prompt, other conversations are independent, and a runtime restart also clears the selection. Full text: section Progressive loading.

Scenario: Selection resets and stays per conversation

  • WHEN a new prompt arrives
  • THEN the skill selection resets

Requirement: Product-owned catalog

The catalog SHALL be product-owned, not discovery of arbitrary skills in the user's home, and OPENCODE_DISABLE_EXTERNAL_SKILLS stays enabled. Full text: section Progressive loading.

Scenario: Product-owned catalog

  • WHEN a skill file exists in the user's home
  • THEN it is not discovered into the catalog

Requirement: Behavioral instructions for the model

The skill instructions SHALL tell the model to resolve current window IDs from desktop state, to stop after success (minimize is not followed by focus or restore), to allow one state refresh on a stale ID, and to end the attempted action on refusals and user control. These are model instructions, not a deterministic guarantee. Full text: section Behavioral contract.

Scenario: Behavioral instructions for the model

  • WHEN a window ID turns out stale
  • THEN one state refresh is allowed

Requirement: Skill changes enter the source fingerprint

Changes to the skill files SHALL participate in scripts/prepare-project.py source fingerprinting, including skill-only updates. Full text: section Behavioral contract.

Scenario: Skill changes enter the source fingerprint

  • WHEN only a skill file changes
  • THEN the source fingerprint still changes

Requirement: Loader grants no authority

The loader and context filter MUST NOT grant or revoke execution authority: command, application, path and note approvals, post-browser private-read approvals, source review cards, consent and compositor refusals retain their enforcement. Generated HTML does not gain the loader or any other privileged tool, and auxiliary agents are not filtered. Full text: section Behavioral contract.

Scenario: Loader grants no authority

  • WHEN a skill is loaded
  • THEN existing approvals and refusals still apply

Status

Doc status: current contract. Checked 2026-11-10.

Introduction

The shell starts each user turn with a short desktop prompt and eight tools: desktop_state, list_applications, open_application, window_action, arrange_windows, list_directory, open_path and load_skill. The ui_ prefix is added by the MCP integration.

The basic window schema offers focus, expand, minimize and restore only. Its model-facing descriptions focus on observation, actual results and stopping. The core MCP schemas, implementations and permission checks remain unchanged.

Progressive loading

The trusted catalog in web-shell/core/task-skills.js points to versioned web-shell/skills/<name>/SKILL.md files. Only their names and descriptions are included initially. load_skill({name}) makes the instructions and corresponding tool schemas available on the next model step, for that session and turn.

Skill Use
windows Advanced placement, monitors, Grid/Canvas, styling and consented AT-SPI reading
maintenance System context, commands, source proposals, recovery and installation
browser Dedicated Playwright browser
appearance Profile colors/CSS, wallpaper palettes and compositor themes
components Interactive inline HTML responses
memory Explicit recall and notes
schedules Reading and proposing scheduled tasks

Several skills may be loaded for a combined request. The prompt hook resets the selection on the next incoming prompt; other conversations are independent. A runtime restart also clears the selection. The next request can load it again. Historical tool results stay in conversation history. This reduces new schemas and system instructions, not the full history or the memory plugin's recall.

setupTaskSkills runs inside the existing memory plugin, after its context hook, using OpenCode 2.1.4's session.hook("context") tools/system fields and tool.transform. These APIs were verified against the installed package's dist/promise/session.d.ts and dist/promise/tool.d.ts. The public plugin guide describes a different API version and is not the authority for these signatures. Context CLI was unavailable.

This catalog is product-owned, not discovery of arbitrary skills in the user's home. OPENCODE_DISABLE_EXTERNAL_SKILLS stays enabled. New instructions are installed with the checkout, without another download or global OpenCode change.

Behavioral contract

Resolve current window IDs from desktop state. Resolve unknown application names from the catalog and preserve the returned ID; a window appId is not a launch ID. Use a user-provided executable directly with separate arguments. Pick placement from the actual layout. Distinguish dispatch, approval and confirmed state. After success, stop: minimize must not be followed by focus/restore. A stale ID allows one state refresh. Refusals and user control end the attempted action. These are model instructions, not a deterministic guarantee of correctness.

Changes to the skill files participate in scripts/prepare-project.py source fingerprinting, including skill-only updates.

The loader and context filter do not grant or revoke execution authority. Command, application, path and note approvals, post-browser private-read approvals, source review cards, consent and compositor refusals retain their existing enforcement. Generated HTML does not gain the loader or any other privileged tool. Auxiliary agents are not filtered by this hook. Model selection, weights, inference settings and the live session are unchanged.

Verification

test/task-skills.test.js exercises session/turn isolation, combined skills, invalid names, schema preservation, auxiliary agents and cleanup. Existing desktop contract tests now check the windows skill where the detailed rules live. Runtime configuration tests retain the original permission assertions and add only the loader's allow rule.

For model evidence and limitations, see the prompt comparison.