Files
orca/skill-stubs/_shared/cli-resolution.md
T
Jinwoo-H 1dabd8724d refactor(skills): single-author the shared discovery-stub blocks
The resolver ladder, the ORCA placeholder rule, the no-guessing paragraph,
and the older-binary fallback frame were authored eight times each and had
already drifted where they were re-copied. Move them into one fragment,
skill-stubs/_shared/cli-resolution.md, and have each per-topic stub mark
where they land with `<!-- shared: <id> -->`.

The projected skills/<name>/SKILL.md is byte-identical for all eight topics,
so no manifest revision moves.
2026-09-04 17:23:29 -04:00

2.3 KiB

`; every block below must be
 inserted exactly once by every stub. `reflow` re-wraps the block after {{topic}}
 substitution, because the substituted name changes where the lines break. -->

Resolve the CLI for this session

Choose the executable once and reuse it for every later command:

  • If the ORCA_CLI_COMMAND environment variable is set, use its value. Orca exports this for managed WSL sessions.
  • Otherwise, in a dev checkout whose session exposes ORCA_DEV_REPO_ROOT, use orca-dev.
  • Otherwise, on Linux outside an Orca-managed terminal, use orca-ide. Never run bare orca there — outside Orca's terminals it normally resolves to the GNOME Orca screen reader (/usr/bin/orca) and starts speech on the user's machine.
  • Otherwise, use orca.

Below, ORCA is a placeholder for the executable you resolved. Substitute it before running anything; do not create a shell variable or run ORCA literally. This works the same way in POSIX shells, PowerShell, and cmd.exe.

If the selected executable cannot run, report its exact error and stop. Do not fall through to another executable, which could silently target a different Orca build.

Don't guess subcommands or flags from memory or from a cached copy of this stub. They change between Orca releases, and this file deliberately no longer lists them. Confirm the app is up with ORCA status --json (start it with ORCA open --json if needed), and prefer --json for agent-driven calls.

If an older Orca does not recognize skills get

Use this fallback only when the selected binary explicitly reports that skills get is an unknown command. Another failure is not proof of an older binary; report it rather than guessing or changing executables. For a confirmed pre-guide binary, use only this bounded, read-only bootstrap to orient. Do not dead-end and do not invent commands:

Then tell the user that updating Orca restores the full, version-matched guide via ORCA skills get {{topic}}. Beyond these commands, ask the user rather than guessing a command surface this older binary may not support.