mirror of
https://github.com/stablyai/orca.git
synced 2026-09-27 08:02:35 +00:00
fix(skills): prefer programmatic paths over computer-use
State the last-resort rule in discovery copy instead of enumerating files/folders/git/shell. computer-use prefers shell, filesystem, git, HTTP, CLIs, and Playwright/CDP; neighboring skills route to Computer Use only when a visible window needs GUI control those cannot do.
This commit is contained in:
@@ -12,18 +12,22 @@ const stubPath = join(projectDir, 'skills', 'computer-use', 'SKILL.md')
|
||||
const bundledGuide = BUNDLED_SKILL_GUIDES.find((guide) => guide.name === 'computer-use')?.markdown
|
||||
|
||||
describe('computer-use skill guidance', () => {
|
||||
it('keeps discovery scoped to GUI windows and out of filesystem and the embedded browser', () => {
|
||||
it('keeps discovery scoped to last-resort GUI and out of the embedded browser', () => {
|
||||
const frontmatter = /^---\n([\s\S]*?)\n---\n/u.exec(readFileSync(guidePath, 'utf8'))?.[1] ?? ''
|
||||
const description = frontmatter.replace(/\s+/gu, ' ')
|
||||
|
||||
expect(description).toContain('Drives the GUI of a visible local app window')
|
||||
expect(description).toContain('no equivalent CLI, filesystem, or API path')
|
||||
expect(description).toContain('Do not use for files, folders, git, or shell commands')
|
||||
expect(description).toContain('paths like Desktop or Documents')
|
||||
expect(description).toContain(
|
||||
'Prefer a programmatic path (shell, filesystem, git, HTTP, existing CLIs, Playwright/CDP) whenever it can complete the task.'
|
||||
)
|
||||
expect(description).toContain(
|
||||
'Use only when a visible window needs GUI control those cannot reach.'
|
||||
)
|
||||
expect(description).toContain('external browser windows')
|
||||
expect(description).toContain("Do not use for Orca's embedded browser (`orca-cli`)")
|
||||
expect(description).toContain('page-only automation (Playwright or CDP)')
|
||||
expect(description).not.toContain('OS/window-level')
|
||||
expect(description).not.toContain('Desktop or Documents')
|
||||
expect(description).not.toContain('read Slack')
|
||||
expect(description).not.toContain('get app state')
|
||||
})
|
||||
@@ -32,7 +36,12 @@ describe('computer-use skill guidance', () => {
|
||||
const skill = readFileSync(guidePath, 'utf8')
|
||||
|
||||
expect(skill).toContain('Use this skill to drive a visible app window through `orca computer`')
|
||||
expect(skill).toContain('"Desktop" as a folder path is not a GUI task')
|
||||
expect(skill).toContain(
|
||||
'Prefer a programmatic path (shell, filesystem, git, HTTP, existing CLIs, Playwright/CDP) whenever it can complete the task'
|
||||
)
|
||||
expect(skill).toContain(
|
||||
'use this skill only when a visible window needs GUI control those cannot reach'
|
||||
)
|
||||
expect(skill).toContain('external browser window that needs window-level control')
|
||||
expect(skill).not.toMatch(/\borca goto\b/iu)
|
||||
expect(skill).not.toMatch(/\borca snapshot\b/iu)
|
||||
|
||||
@@ -30,7 +30,7 @@ describe('orca CLI skill guidance', () => {
|
||||
const description = skill.replace(/\s+/gu, ' ')
|
||||
|
||||
expect(description).toContain(
|
||||
'Use Computer Use only for clicks, menus, dialogs, or screenshots in a visible external app window; never for files, folders, git, or shell. Use Playwright or CDP for external pages.'
|
||||
'Use Computer Use only when a visible window needs GUI control that a CLI, filesystem, or API cannot do. Use Playwright or CDP for external pages.'
|
||||
)
|
||||
expect(skill).toContain(
|
||||
'For external Chrome/Safari/webviews or Orca app chrome/settings, use the Computer Use skill/tool only when the task requires OS/window-level control'
|
||||
|
||||
@@ -55,7 +55,7 @@ describe('orchestration skill routing', () => {
|
||||
const description = readDescription()
|
||||
|
||||
expect(description).toContain(
|
||||
'Use Computer Use for external browser windows, webviews, or Orca app UI only for clicks, menus, dialogs, coordinates, or screenshots in a visible window; never for files, folders, git, or shell.'
|
||||
'Use Computer Use only when a visible window needs GUI control that a CLI, filesystem, or API cannot do.'
|
||||
)
|
||||
expect(description).toContain(
|
||||
"`orca-cli` for Orca's embedded pages and a page-automation tool such as Playwright or CDP for external pages."
|
||||
|
||||
@@ -5,17 +5,17 @@
|
||||
"name": "computer-use",
|
||||
"sourcePath": "skills/computer-use",
|
||||
"releaseRevision": 9,
|
||||
"packageDigest": "80df6a4ece22f14befc659c4cd400eaeb88de43c5474904bd4222c056f08c6f1",
|
||||
"gitTreeSha": "51148b7b868a4fccff2f4fe9e907472555363807",
|
||||
"packageDigest": "657de77f14b302996c6ea30babd865fc3476f10cc53ef8d7f9a578b463500a8c",
|
||||
"gitTreeSha": "ddabcdf568ac2d31cf5f45f8e4b6e868aa8e5812",
|
||||
"files": [
|
||||
{
|
||||
"path": "SKILL.md",
|
||||
"size": 2139,
|
||||
"size": 2112,
|
||||
"executable": false,
|
||||
"classification": "text",
|
||||
"exactSha256": "63589aab168263ceec5bc3decb8ff52b035b49aa442977cef71414ed7899b385",
|
||||
"textNormalizedSha256": "63589aab168263ceec5bc3decb8ff52b035b49aa442977cef71414ed7899b385",
|
||||
"identitySha256": "63589aab168263ceec5bc3decb8ff52b035b49aa442977cef71414ed7899b385"
|
||||
"exactSha256": "d104db948d54f41aabb6ec3a895a4a651f6470b60549d637f8ff54d714b10df3",
|
||||
"textNormalizedSha256": "d104db948d54f41aabb6ec3a895a4a651f6470b60549d637f8ff54d714b10df3",
|
||||
"identitySha256": "d104db948d54f41aabb6ec3a895a4a651f6470b60549d637f8ff54d714b10df3"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -41,17 +41,17 @@
|
||||
"name": "orca-cli",
|
||||
"sourcePath": "skills/orca-cli",
|
||||
"releaseRevision": 37,
|
||||
"packageDigest": "cd05e94d8cae38669b1aa0db3908614a6392af81e89aeab020fb71ce55f271c1",
|
||||
"gitTreeSha": "2e4666a5628b4cd6eee56a15cbcd79df390a944d",
|
||||
"packageDigest": "958e49034eb156150844408598f8fab9fc16c4ef46d9d3fa1934066f9307b89a",
|
||||
"gitTreeSha": "dad7179c25c5f0f625cf53279c43a197da53123f",
|
||||
"files": [
|
||||
{
|
||||
"path": "SKILL.md",
|
||||
"size": 2291,
|
||||
"size": 2255,
|
||||
"executable": false,
|
||||
"classification": "text",
|
||||
"exactSha256": "8a8798024056c42839de7531c70990d6f7e957e39beabe02ea53b829ee673b2b",
|
||||
"textNormalizedSha256": "8a8798024056c42839de7531c70990d6f7e957e39beabe02ea53b829ee673b2b",
|
||||
"identitySha256": "8a8798024056c42839de7531c70990d6f7e957e39beabe02ea53b829ee673b2b"
|
||||
"exactSha256": "7749a02aea5ba4baf851f9699024ca9d0be35d6cadf749cf686759fbf0e6e71a",
|
||||
"textNormalizedSha256": "7749a02aea5ba4baf851f9699024ca9d0be35d6cadf749cf686759fbf0e6e71a",
|
||||
"identitySha256": "7749a02aea5ba4baf851f9699024ca9d0be35d6cadf749cf686759fbf0e6e71a"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -131,17 +131,17 @@
|
||||
"name": "orchestration",
|
||||
"sourcePath": "skills/orchestration",
|
||||
"releaseRevision": 29,
|
||||
"packageDigest": "065754997c211953ffe27f00369d4b9f71889f942c2ebbaab34d5ccdfe2700c6",
|
||||
"gitTreeSha": "bc60755ae36dd78aef8d524f75e6b707b8696a2d",
|
||||
"packageDigest": "ac40e549fa0835111637a878451ebffff520f1778778053a3ee9b675fda1d5cc",
|
||||
"gitTreeSha": "94fad0d1c18de7aeffc46a8a612d5fa365e16e3a",
|
||||
"files": [
|
||||
{
|
||||
"path": "SKILL.md",
|
||||
"size": 3827,
|
||||
"size": 3734,
|
||||
"executable": false,
|
||||
"classification": "text",
|
||||
"exactSha256": "650df18ce419acf0c28ac592fd5a23aee2adc8a72f42be87bd98146478dc1a6b",
|
||||
"textNormalizedSha256": "650df18ce419acf0c28ac592fd5a23aee2adc8a72f42be87bd98146478dc1a6b",
|
||||
"identitySha256": "650df18ce419acf0c28ac592fd5a23aee2adc8a72f42be87bd98146478dc1a6b"
|
||||
"exactSha256": "82a22a8402f5b72caf4c8fc900631a66fefaf062b04a3689ec320fdfa8a7832b",
|
||||
"textNormalizedSha256": "82a22a8402f5b72caf4c8fc900631a66fefaf062b04a3689ec320fdfa8a7832b",
|
||||
"identitySha256": "82a22a8402f5b72caf4c8fc900631a66fefaf062b04a3689ec320fdfa8a7832b"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -580,17 +580,17 @@
|
||||
},
|
||||
{
|
||||
"releaseRevision": 37,
|
||||
"packageDigest": "cd05e94d8cae38669b1aa0db3908614a6392af81e89aeab020fb71ce55f271c1",
|
||||
"gitTreeSha": "2e4666a5628b4cd6eee56a15cbcd79df390a944d",
|
||||
"packageDigest": "958e49034eb156150844408598f8fab9fc16c4ef46d9d3fa1934066f9307b89a",
|
||||
"gitTreeSha": "dad7179c25c5f0f625cf53279c43a197da53123f",
|
||||
"files": [
|
||||
{
|
||||
"path": "SKILL.md",
|
||||
"size": 2291,
|
||||
"size": 2255,
|
||||
"executable": false,
|
||||
"classification": "text",
|
||||
"exactSha256": "8a8798024056c42839de7531c70990d6f7e957e39beabe02ea53b829ee673b2b",
|
||||
"textNormalizedSha256": "8a8798024056c42839de7531c70990d6f7e957e39beabe02ea53b829ee673b2b",
|
||||
"identitySha256": "8a8798024056c42839de7531c70990d6f7e957e39beabe02ea53b829ee673b2b"
|
||||
"exactSha256": "7749a02aea5ba4baf851f9699024ca9d0be35d6cadf749cf686759fbf0e6e71a",
|
||||
"textNormalizedSha256": "7749a02aea5ba4baf851f9699024ca9d0be35d6cadf749cf686759fbf0e6e71a",
|
||||
"identitySha256": "7749a02aea5ba4baf851f9699024ca9d0be35d6cadf749cf686759fbf0e6e71a"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1046,17 +1046,17 @@
|
||||
},
|
||||
{
|
||||
"releaseRevision": 29,
|
||||
"packageDigest": "065754997c211953ffe27f00369d4b9f71889f942c2ebbaab34d5ccdfe2700c6",
|
||||
"gitTreeSha": "bc60755ae36dd78aef8d524f75e6b707b8696a2d",
|
||||
"packageDigest": "ac40e549fa0835111637a878451ebffff520f1778778053a3ee9b675fda1d5cc",
|
||||
"gitTreeSha": "94fad0d1c18de7aeffc46a8a612d5fa365e16e3a",
|
||||
"files": [
|
||||
{
|
||||
"path": "SKILL.md",
|
||||
"size": 3827,
|
||||
"size": 3734,
|
||||
"executable": false,
|
||||
"classification": "text",
|
||||
"exactSha256": "650df18ce419acf0c28ac592fd5a23aee2adc8a72f42be87bd98146478dc1a6b",
|
||||
"textNormalizedSha256": "650df18ce419acf0c28ac592fd5a23aee2adc8a72f42be87bd98146478dc1a6b",
|
||||
"identitySha256": "650df18ce419acf0c28ac592fd5a23aee2adc8a72f42be87bd98146478dc1a6b"
|
||||
"exactSha256": "82a22a8402f5b72caf4c8fc900631a66fefaf062b04a3689ec320fdfa8a7832b",
|
||||
"textNormalizedSha256": "82a22a8402f5b72caf4c8fc900631a66fefaf062b04a3689ec320fdfa8a7832b",
|
||||
"identitySha256": "82a22a8402f5b72caf4c8fc900631a66fefaf062b04a3689ec320fdfa8a7832b"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1210,17 +1210,17 @@
|
||||
},
|
||||
{
|
||||
"releaseRevision": 9,
|
||||
"packageDigest": "80df6a4ece22f14befc659c4cd400eaeb88de43c5474904bd4222c056f08c6f1",
|
||||
"gitTreeSha": "51148b7b868a4fccff2f4fe9e907472555363807",
|
||||
"packageDigest": "657de77f14b302996c6ea30babd865fc3476f10cc53ef8d7f9a578b463500a8c",
|
||||
"gitTreeSha": "ddabcdf568ac2d31cf5f45f8e4b6e868aa8e5812",
|
||||
"files": [
|
||||
{
|
||||
"path": "SKILL.md",
|
||||
"size": 2139,
|
||||
"size": 2112,
|
||||
"executable": false,
|
||||
"classification": "text",
|
||||
"exactSha256": "63589aab168263ceec5bc3decb8ff52b035b49aa442977cef71414ed7899b385",
|
||||
"textNormalizedSha256": "63589aab168263ceec5bc3decb8ff52b035b49aa442977cef71414ed7899b385",
|
||||
"identitySha256": "63589aab168263ceec5bc3decb8ff52b035b49aa442977cef71414ed7899b385"
|
||||
"exactSha256": "d104db948d54f41aabb6ec3a895a4a651f6470b60549d637f8ff54d714b10df3",
|
||||
"textNormalizedSha256": "d104db948d54f41aabb6ec3a895a4a651f6470b60549d637f8ff54d714b10df3",
|
||||
"identitySha256": "d104db948d54f41aabb6ec3a895a4a651f6470b60549d637f8ff54d714b10df3"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -3,16 +3,16 @@ name: computer-use
|
||||
description: >-
|
||||
Drives the GUI of a visible local app window through `orca computer`: accessibility
|
||||
tree, clicks, typing, menus, dialogs, and screenshots in native apps and external
|
||||
browser windows (Chrome, Edge, Safari) or webviews. Use only when the task requires
|
||||
interacting with an on-screen window that has no equivalent CLI, filesystem, or API
|
||||
path. Do not use for files, folders, git, or shell commands, including paths like
|
||||
Desktop or Documents. Do not use for Orca's embedded browser (`orca-cli`) or
|
||||
page-only automation (Playwright or CDP).
|
||||
browser windows (Chrome, Edge, Safari) or webviews. Prefer a programmatic path
|
||||
(shell, filesystem, git, HTTP, existing CLIs, Playwright/CDP) whenever it can
|
||||
complete the task. Use only when a visible window needs GUI control those cannot
|
||||
reach. Do not use for Orca's embedded browser (`orca-cli`) or page-only automation
|
||||
(Playwright or CDP).
|
||||
---
|
||||
|
||||
# Computer Use
|
||||
|
||||
Use this skill to drive a visible app window through `orca computer`. Prefer shell, filesystem, and existing CLIs whenever they can complete the task; "Desktop" as a folder path is not a GUI task. For a website or web app, use it only when the page is in an external browser window that needs window-level control. Do not use it for page-only automation: use `orca-cli` for Orca's embedded pages and a page-automation tool such as Playwright or CDP for external pages.
|
||||
Use this skill to drive a visible app window through `orca computer`. Prefer a programmatic path (shell, filesystem, git, HTTP, existing CLIs, Playwright/CDP) whenever it can complete the task; use this skill only when a visible window needs GUI control those cannot reach. For a website or web app, use it only when the page is in an external browser window that needs window-level control. Do not use it for page-only automation: use `orca-cli` for Orca's embedded pages and a page-automation tool such as Playwright or CDP for external pages.
|
||||
|
||||
## Preconditions
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ description: >-
|
||||
worktree", "read/wait/send Orca terminal", "handoff" / "handover" / "give this to another
|
||||
agent", "Orca browser", "orca artifacts", or "share skills". Prefer it over raw git
|
||||
worktree, ad hoc PTYs, or Computer Use when Orca state is involved. Use Computer Use only
|
||||
for clicks, menus, dialogs, or screenshots in a visible external app window; never for
|
||||
files, folders, git, or shell. Use Playwright or CDP for external pages.
|
||||
when a visible window needs GUI control that a CLI, filesystem, or API cannot do. Use
|
||||
Playwright or CDP for external pages.
|
||||
---
|
||||
|
||||
# Orca CLI
|
||||
|
||||
@@ -8,9 +8,8 @@ description: >-
|
||||
agent", "another worktree" — unless asked to supervise, monitor, or coordinate
|
||||
a DAG, and for terminal control, lightweight terminal prompts, shell commands,
|
||||
Orca worktree management, and reading or waiting on terminals. Use Computer
|
||||
Use for external browser windows, webviews, or Orca app UI only for clicks, menus,
|
||||
dialogs, coordinates, or screenshots in a visible window; never for files, folders,
|
||||
git, or shell. Use `orca-cli` for Orca's embedded pages and a page-automation
|
||||
Use only when a visible window needs GUI control that a CLI, filesystem, or API
|
||||
cannot do. Use `orca-cli` for Orca's embedded pages and a page-automation
|
||||
tool such as Playwright or CDP for external pages.
|
||||
---
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@ name: computer-use
|
||||
description: >-
|
||||
Drives the GUI of a visible local app window through `orca computer`: accessibility
|
||||
tree, clicks, typing, menus, dialogs, and screenshots in native apps and external
|
||||
browser windows (Chrome, Edge, Safari) or webviews. Use only when the task requires
|
||||
interacting with an on-screen window that has no equivalent CLI, filesystem, or API
|
||||
path. Do not use for files, folders, git, or shell commands, including paths like
|
||||
Desktop or Documents. Do not use for Orca's embedded browser (`orca-cli`) or
|
||||
page-only automation (Playwright or CDP).
|
||||
browser windows (Chrome, Edge, Safari) or webviews. Prefer a programmatic path
|
||||
(shell, filesystem, git, HTTP, existing CLIs, Playwright/CDP) whenever it can
|
||||
complete the task. Use only when a visible window needs GUI control those cannot
|
||||
reach. Do not use for Orca's embedded browser (`orca-cli`) or page-only automation
|
||||
(Playwright or CDP).
|
||||
---
|
||||
|
||||
# Computer Use
|
||||
|
||||
@@ -7,8 +7,8 @@ description: >-
|
||||
worktree", "read/wait/send Orca terminal", "handoff" / "handover" / "give this to another
|
||||
agent", "Orca browser", "orca artifacts", or "share skills". Prefer it over raw git
|
||||
worktree, ad hoc PTYs, or Computer Use when Orca state is involved. Use Computer Use only
|
||||
for clicks, menus, dialogs, or screenshots in a visible external app window; never for
|
||||
files, folders, git, or shell. Use Playwright or CDP for external pages.
|
||||
when a visible window needs GUI control that a CLI, filesystem, or API cannot do. Use
|
||||
Playwright or CDP for external pages.
|
||||
---
|
||||
|
||||
# Orca CLI
|
||||
|
||||
@@ -8,9 +8,8 @@ description: >-
|
||||
agent", "another worktree" — unless asked to supervise, monitor, or coordinate
|
||||
a DAG, and for terminal control, lightweight terminal prompts, shell commands,
|
||||
Orca worktree management, and reading or waiting on terminals. Use Computer
|
||||
Use for external browser windows, webviews, or Orca app UI only for clicks, menus,
|
||||
dialogs, coordinates, or screenshots in a visible window; never for files, folders,
|
||||
git, or shell. Use `orca-cli` for Orca's embedded pages and a page-automation
|
||||
Use only when a visible window needs GUI control that a CLI, filesystem, or API
|
||||
cannot do. Use `orca-cli` for Orca's embedded pages and a page-automation
|
||||
tool such as Playwright or CDP for external pages.
|
||||
---
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user