Repository navigation
Add version-matched skill guides to the CLI - #8624
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds eight authoritative skill-guide Markdown sources and generates normalized projections plus an embedded TypeScript registry. Introduces 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 7
🧹 Nitpick comments (2)
skill-guides/linear-tickets.md (1)
1-18: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winMake
linear-ticketsa real alias or add a sync check
linear-ticketsandorca-linearare maintained as separate bundled guides, so the legacy copy can drift. Add a test that keeps the two markdown files in sync (ignoring the frontmattername/title), or wirelinear-ticketsthroughGUIDE_ALIASESand drop the duplicate.src/cli/handlers/skills.ts (1)
4-10: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDuplicated
BundledSkillGuidetype instead of importing the generated one.This type is already exported from
../bundled-skill-guides.js(the generated table). Re-declaring it by hand here risks silent drift if the generator's shape changes.♻️ Proposed fix: import the type instead of redeclaring it
-type BundledSkillGuide = { - name: string - description: string - markdown: string - fullMarkdown: string - aliases: readonly string[] -} +import type { BundledSkillGuide } from '../bundled-skill-guides.js'A type-only import is erased at compile time and shouldn't reintroduce the module-load cost the lazy
await import(...)calls below are avoiding — worth confirming against this project's TS build settings (e.g.isolatedModules).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: f3736c91-ac27-412c-b86f-7a9766701af2
📒 Files selected for processing (27)
.gitattributes.github/workflows/pr.ymlconfig/electron-builder.config.cjsconfig/scripts/electron-builder-config.test.mjsconfig/scripts/generate-bundled-skill-guides.mjsconfig/scripts/generate-bundled-skill-guides.test.mjsnotes/skill-auto-update-design.mdnotes/skill-freshness-design.mdnotes/skill-guide-indirection-design.mdpackage.jsonskill-guides/computer-use.mdskill-guides/linear-tickets.mdskill-guides/orca-cli.mdskill-guides/orca-emulator-android.mdskill-guides/orca-emulator.mdskill-guides/orca-linear.mdskill-guides/orca-per-workspace-env.mdskill-guides/orchestration.mdsrc/cli/args.tssrc/cli/bundled-skill-guides.tssrc/cli/dispatch.tssrc/cli/handlers/skills.tssrc/cli/help.tssrc/cli/skills.test.tssrc/cli/specs/index.tssrc/cli/specs/skills.tssrc/main/cli/packaged-cli-assets.test.ts
Review follow-up: the emulator guides still instructed literal `orca emulator ...` in sh fences with no Linux disambiguation, so on unmanaged Linux they could launch the GNOME screen reader — the exact failure the executable-selection preamble prevents. Both emulator guides now carry the preamble and ORCA placeholder across fences, tables, and prose, and the cross-platform safety test covers all four converted guides. Also replaces computer-use's "unless a block names a shell" carve-out, which contradicted its own POSIX example, with the unconditional placeholder rule.
…tent The rebase onto main picked up the reviewed guide fixes (#8624), so the current manifest hashes and a new appended snapshot generation must match those bytes; the registry keeps all prior snapshots so existing installs classify as outdated rather than unrecognized.
* Add safe skill freshness detection * Accept observed copy-mode rail outcomes * chore(skills): regenerate snapshot artifacts for the merged guide content The rebase onto main picked up the reviewed guide fixes (#8624), so the current manifest hashes and a new appended snapshot generation must match those bytes; the registry keeps all prior snapshots so existing installs classify as outdated rather than unrecognized. * fix(skills): canonicalize snapshot file order and guard released history Historical snapshots kept git ls-tree byte-order while the working-tree walk and runtime observation use the sorted depth-first order, so any future multi-file skill would misclassify older installs as unrecognized and churn spurious registry revisions; all producers now share one canonical order (no digest changes for today's single-file packages). Also rejects executable files from shipped skills (Windows observation cannot see execute bits, which would misclassify pristine Windows installs) and adds an explicit append-only invariant for released snapshots so a generation-logic change cannot rewrite them silently. * fix(skills): throttle focus rescans and correct self-blocked placement copy Every window focus re-read and re-hashed all installed packages, and the nudge and panel each forced their own trailing rescan for one event; a 15s cooldown plus a shared invalidation latch keep one bounded scan per event while install-change events stay immediate. Bundle artifacts are now loaded once per run instead of re-parsed on every scan. A read-only or otherwise unsupported outdated placement now explains that it blocks itself instead of blaming a phantom sibling placement; the supported topology set moved to shared so eligibility and copy cannot drift. * feat(skills): move freshness surfacing to a lingering toast and update modal The Skills page has been unreachable since its toolbox menu entry was removed (#4535), so surfacing freshness there buried the feature behind its own nudge. The nudge now lingers until acted on (ignoring it records nothing; only the explicit close persists dismissal keys) and opens an update modal hosting the pre-filled editable terminal, an honest current/blocked summary, and the per-placement rows in a collapsed Details section. A compact 'Check for skill updates' row in CLI settings is the manual re-entry point. Skills page restored to main; design-doc surfacing section records the venue decision. * fix(skills): mount update dialog inside the link-routing provider and fold freshness into the setup rails The dialog hosts a live terminal pane that requires the link-routing preference context; mounted outside the provider it crashed the renderer the moment an eligible update existed (caught by live QA — unit tests mock the terminal). It now mounts inside the provider behind its own recoverable boundary. The separate 'Check for skill updates' settings button is gone: the setup rails' own pill now carries freshness (Update available / Up to date, falling back to Installed for blocked or unrecognized copies and for non-local runtimes the local-only scan cannot vouch for), and Re-check refreshes both installation detection and the freshness inventory. Wired for the CLI, Orchestration, Computer Use, and Per-Workspace Environments rails. * fix(skills): use the sleek scrollbar style in the update dialog * chore(skills): regenerate manifest for merged main (v1.4.142-rc.1) Main advanced to 1.4.142-rc.1 with a v1.4.141 release, so the embedded appVersion and release mapping were stale on the PR's merged tree. Only appVersion and the new release entry change; no snapshot digests move (released history preserved). * fix(skills): bound and batch freshness work * fix(skills): harden freshness integrity checks * fix(skills): accept observed copy topology outcomes * chore(skills): regenerate manifest for current main * fix(skills): preserve update terminal lifecycle * chore(skills): regenerate manifest for current main * fix(skills): fail closed on stale freshness scans * chore(skills): regenerate manifest for current main * fix(skills): preserve freshness safety under focus churn * feat(skills): group the update modal by skill with plain-language status The Update skills modal now lists only skills that will update or that can't (with why), grouped by skill with their install locations nested underneath — no more one row per placement. - Statuses collapse to "Update available" / "Can't update" at the skill level. - A location's problem is a chip (Duplicate, Unrecognized, Inaccessible, Read only, In a repo, External/Broken link, Plugin cache) with a hover tooltip that explains what it means for the user and what to do. - Up-to-date, unrecognized-only, and unreadable-only skills are hidden; a current/unrecognized/etc. location only appears when it explains a shown skill. - Copy is de-jargoned (drops "copy"/"placement"/"snapshot"/"official copy") and names the mechanism as the npx skills update command, not "Orca's update". - Rename the section to "Update details"; drop the unreachable newer-known state. Renderer-only: derivation is a pure module (groupSkillFreshness) with unit tests; no IPC or main-process change. Locales updated for all five languages. * chore(skills): regenerate manifest for current main (v1.4.143-rc.0) * feat(skills): don't let a duplicate block the update; clearer skipped copy - Eligibility: a clean standalone duplicate no longer poisons the whole name — the canonical copy still updates and the duplicate is flagged; a duplicate-only skill stays unoffered. - Update modal: "Can't update" -> "Skipped" with a reason-specific sentence (edited/read-only/in-a-repo/plugin/link); chips describe only the location state; footer "Check now" -> "Re-check". - Settings sidebar nav pills go amber "Update available" when a skill is updatable, matching the setup cards. - Localized new strings across en/es/ja/ko/zh. * chore(skills): regenerate manifest for merged main (v1.4.144-rc.1)
Internal skill design/research scratch docs committed in #8624. Two of the three are explicitly marked superseded/folded, none are referenced anywhere in the codebase. Planning artifacts, not shipped documentation.
* chore: remove stray agent-dashboard-mocks folder Design mockups (index.html + RESEARCH.md) accidentally committed alongside the agent dashboard popout feature in #9604. These are scratch design artifacts and don't belong in the shipped repo. * chore: remove stray notes/ design docs Internal skill design/research scratch docs committed in #8624. Two of the three are explicitly marked superseded/folded, none are referenced anywhere in the codebase. Planning artifacts, not shipped documentation.
* Add version-matched bundled skill guides * Clarify skill freshness rollout PRs * Add canonical skills show alias * fix(skills): address guide review feedback * fix(skills): make guide commands cross-platform * fix(skills): apply the ORCA convention to the emulator guides Review follow-up: the emulator guides still instructed literal `orca emulator ...` in sh fences with no Linux disambiguation, so on unmanaged Linux they could launch the GNOME screen reader — the exact failure the executable-selection preamble prevents. Both emulator guides now carry the preamble and ORCA placeholder across fences, tables, and prose, and the cross-platform safety test covers all four converted guides. Also replaces computer-use's "unless a block names a shell" carve-out, which contradicted its own POSIX example, with the unconditional placeholder rule.
* Add safe skill freshness detection * Accept observed copy-mode rail outcomes * chore(skills): regenerate snapshot artifacts for the merged guide content The rebase onto main picked up the reviewed guide fixes (stablyai#8624), so the current manifest hashes and a new appended snapshot generation must match those bytes; the registry keeps all prior snapshots so existing installs classify as outdated rather than unrecognized. * fix(skills): canonicalize snapshot file order and guard released history Historical snapshots kept git ls-tree byte-order while the working-tree walk and runtime observation use the sorted depth-first order, so any future multi-file skill would misclassify older installs as unrecognized and churn spurious registry revisions; all producers now share one canonical order (no digest changes for today's single-file packages). Also rejects executable files from shipped skills (Windows observation cannot see execute bits, which would misclassify pristine Windows installs) and adds an explicit append-only invariant for released snapshots so a generation-logic change cannot rewrite them silently. * fix(skills): throttle focus rescans and correct self-blocked placement copy Every window focus re-read and re-hashed all installed packages, and the nudge and panel each forced their own trailing rescan for one event; a 15s cooldown plus a shared invalidation latch keep one bounded scan per event while install-change events stay immediate. Bundle artifacts are now loaded once per run instead of re-parsed on every scan. A read-only or otherwise unsupported outdated placement now explains that it blocks itself instead of blaming a phantom sibling placement; the supported topology set moved to shared so eligibility and copy cannot drift. * feat(skills): move freshness surfacing to a lingering toast and update modal The Skills page has been unreachable since its toolbox menu entry was removed (stablyai#4535), so surfacing freshness there buried the feature behind its own nudge. The nudge now lingers until acted on (ignoring it records nothing; only the explicit close persists dismissal keys) and opens an update modal hosting the pre-filled editable terminal, an honest current/blocked summary, and the per-placement rows in a collapsed Details section. A compact 'Check for skill updates' row in CLI settings is the manual re-entry point. Skills page restored to main; design-doc surfacing section records the venue decision. * fix(skills): mount update dialog inside the link-routing provider and fold freshness into the setup rails The dialog hosts a live terminal pane that requires the link-routing preference context; mounted outside the provider it crashed the renderer the moment an eligible update existed (caught by live QA — unit tests mock the terminal). It now mounts inside the provider behind its own recoverable boundary. The separate 'Check for skill updates' settings button is gone: the setup rails' own pill now carries freshness (Update available / Up to date, falling back to Installed for blocked or unrecognized copies and for non-local runtimes the local-only scan cannot vouch for), and Re-check refreshes both installation detection and the freshness inventory. Wired for the CLI, Orchestration, Computer Use, and Per-Workspace Environments rails. * fix(skills): use the sleek scrollbar style in the update dialog * chore(skills): regenerate manifest for merged main (v1.4.142-rc.1) Main advanced to 1.4.142-rc.1 with a v1.4.141 release, so the embedded appVersion and release mapping were stale on the PR's merged tree. Only appVersion and the new release entry change; no snapshot digests move (released history preserved). * fix(skills): bound and batch freshness work * fix(skills): harden freshness integrity checks * fix(skills): accept observed copy topology outcomes * chore(skills): regenerate manifest for current main * fix(skills): preserve update terminal lifecycle * chore(skills): regenerate manifest for current main * fix(skills): fail closed on stale freshness scans * chore(skills): regenerate manifest for current main * fix(skills): preserve freshness safety under focus churn * feat(skills): group the update modal by skill with plain-language status The Update skills modal now lists only skills that will update or that can't (with why), grouped by skill with their install locations nested underneath — no more one row per placement. - Statuses collapse to "Update available" / "Can't update" at the skill level. - A location's problem is a chip (Duplicate, Unrecognized, Inaccessible, Read only, In a repo, External/Broken link, Plugin cache) with a hover tooltip that explains what it means for the user and what to do. - Up-to-date, unrecognized-only, and unreadable-only skills are hidden; a current/unrecognized/etc. location only appears when it explains a shown skill. - Copy is de-jargoned (drops "copy"/"placement"/"snapshot"/"official copy") and names the mechanism as the npx skills update command, not "Orca's update". - Rename the section to "Update details"; drop the unreachable newer-known state. Renderer-only: derivation is a pure module (groupSkillFreshness) with unit tests; no IPC or main-process change. Locales updated for all five languages. * chore(skills): regenerate manifest for current main (v1.4.143-rc.0) * feat(skills): don't let a duplicate block the update; clearer skipped copy - Eligibility: a clean standalone duplicate no longer poisons the whole name — the canonical copy still updates and the duplicate is flagged; a duplicate-only skill stays unoffered. - Update modal: "Can't update" -> "Skipped" with a reason-specific sentence (edited/read-only/in-a-repo/plugin/link); chips describe only the location state; footer "Check now" -> "Re-check". - Settings sidebar nav pills go amber "Update available" when a skill is updatable, matching the setup cards. - Localized new strings across en/es/ja/ko/zh. * chore(skills): regenerate manifest for merged main (v1.4.144-rc.1)
* chore: remove stray agent-dashboard-mocks folder Design mockups (index.html + RESEARCH.md) accidentally committed alongside the agent dashboard popout feature in stablyai#9604. These are scratch design artifacts and don't belong in the shipped repo. * chore: remove stray notes/ design docs Internal skill design/research scratch docs committed in stablyai#8624. Two of the three are explicitly marked superseded/folded, none are referenced anywhere in the codebase. Planning artifacts, not shipped documentation.
Summary
This PR establishes the first, compatibility-safe phase of the skill-freshness plan: Orca's version-sensitive agent guidance now lives in the Orca CLI that implements those commands.
It adds:
skill-guides/<topic>.mdsources for all eight bundled skills;orca skills list [--json];orca skills get <topic> [--full] [--json];The installed
skills/*/SKILL.mdfiles remain full guides in this PR — no stub migration yet — while a released binary gains the command that future stubs will depend on. Their content does change, though: the four CLI-driving guides (orca-cli,computer-use,orca-emulator,orca-emulator-android) now open with a cross-platform executable-selection rule (ORCA_CLI_COMMAND→orca-dev→orca-ideon unmanaged Linux →orca) and use anORCAdocumentation placeholder in command examples. Because the skills installer reads repositorymain, new installs and updates pick up that improved guidance as soon as this merges.Why this structure
Today, globally installed skills are frozen copies, so their command guidance can drift from the Orca binary they control. The durable fix is to make installed skills stable discovery stubs and have each stub request the guide from the exact binary it will use.
The source flow is:
For this first release, the projection stays full-sized. Later, individual projections can become stubs without moving the authoritative content or creating a runtime filesystem dependency.
Full rollout plan
The numbered rollout steps do not map one-to-one to PRs. The intended delivery shape is:
orca skills list/get, aliases, and generated-output/package gates. Merge and release it while distributed skills remain unchanged. The skills installer reads repositorymain, independently of the desktop release train, so a public guide-serving binary must exist before any stub merges.current,outdated,newer-known,unrecognized, andinaccessible), settings/nudge UI, name-scoped eligibility, the targeted pre-fillednpx skills update <eligible-names...> --globalaction, and historical-full-to-stub migration CI.orca,orca-ide, andorca-devas applicable), old-binary fallback, task success, and token cost.orca-clistub change. Convert onlyorca-clito the hybrid bootstrap-plus-pointer stub and keep any final thinning in this same PR. Cut an RC before the stable release and use that window to validate compliance and behavior. Stable ships the thin form only if the gates pass; otherwise it retains the hybrid. There is no separateorca-clithinning PR.orca-cliresults. Users who ignore the freshness nudge keep their existing full skills.So the plan is three implementation PRs through the first completed
orca-clistub rollout, plus later PRs for the remaining skills. Releasing binaries, cutting the RC, and running the compliance spike are gates within that sequence, not additional implementation PRs.Across those PRs, update eligibility remains name-scoped: a name is actionable only when at least one placement is an exact older official snapshot and every placement of that name is an exact current/older official snapshot in a supported global topology. A modified/unknown, newer, external, read-only, repo-scoped, plugin, or inaccessible placement poisons the offer for that name.
Orca only pre-fills the targeted update command. The user reviews and runs it; Orca never submits it automatically and re-checks observed bytes afterward. The resulting design has no ownership ledger, adoption flow, background updater, transactional writer, or automatic mutation of user-owned skill directories.
Relationship to #8496
#8496 implemented the earlier in-app write approach: ownership/adoption, background mutation, transactional publish/rollback, recovery, and installer attribution.
This plan supersedes that approach. #8496 should be closed separately as superseded rather than merged, rebased, or retrofitted. Its branch remains a useful archive of the reviewed write machinery if Orca ever needs in-app skill mutation for a different reason.
The authoritative decision record and phased plan are in
notes/skill-freshness-design.md; the two earlier notes are retained with superseded headers for their empirical detection and CLI research.Screenshots
No visual change.
Testing
pnpm lintpnpm typecheckpnpm test— the focused four-file suite passed: 41 tests covering CLI behavior, generation, CRLF normalization, and packaging. The full monorepo suite was not completed.pnpm build— the CLI compilation/verification smoke passed; full native/platform builds were not run. Local dev-symlink registration could not write/usr/local/bin/orca-devin this environment.AI Review Report
The implementation and design were reviewed for the source-of-truth split, generated-artifact drift, stable aliases, CLI startup cost, packaged-runtime behavior, and the later migration safety contract.
The review flagged a real cross-platform issue: treating checked-out source bytes as already normalized would make Windows CRLF output diverge from other platforms. The generator now normalizes CRLF and lone CR to LF before embedding/writing, relevant paths are pinned to LF in
.gitattributes, and regression tests generate from CRLF fixtures.Cross-platform review explicitly covered macOS, Linux, and Windows path/EOL behavior, plus WSL/SSH guide use. Paths use Node path APIs; these commands do not add shell execution, keyboard shortcuts, shortcut labels, or Electron UI platform branches. The Linux bare-
orcacollision with the GNOME screen reader is addressed inside the guide content itself: all four CLI-driving guides now carry the executable-selection preamble, and a regression test rejects bare line-leadingorcainvocations in each of them. The programmatic stub resolver remains a later concern; this PR does not change installed stubs or invoke a CLI name from them.Security Audit
This PR adds no network fetch, runtime guide-file read, filesystem write, subprocess execution, IPC surface, authentication flow, secret handling, or dependency. Topic input is matched exactly against a generated in-memory name/alias table; unknown topics fail nonzero and list canonical choices.
YAML parsing and file traversal occur only in the repository build generator over a fixed canonical topic list. CI verifies generated outputs, and packaged applications exclude the authoring sources. The large embedded table is dynamically imported only for
skills list/get, avoiding added startup cost for unrelated CLI commands.Notes
--fullcurrently returns the same Markdown because no guide has separate bundled references yet.