Skip to content

feat(skills): convert the remaining bundled skills to hybrid stubs - #9607

Merged
brennanb2025 merged 2 commits into
brennanb2025/orca-cli-hybrid-stubfrom
brennanb2025/orca-skills-hybrid-stub-rollout
Jul 20, 2026
Merged

brennanb2025 merged 2 commits into
brennanb2025/orca-cli-hybrid-stubfrom
brennanb2025/orca-skills-hybrid-stub-rollout

Conversation

@brennanb2025

Copy link
Copy Markdown
Contributor

What & why

Rolls the hybrid discovery-stub pattern — first shipped for orca-cli in #9238 — out to the remaining seven bundled skills: computer-use, linear-tickets, orca-emulator, orca-emulator-android, orca-linear, orca-per-workspace-env, and orchestration.

Each installable SKILL.md becomes a thin discovery stub — a safe CLI resolver, an orca skills get <topic> pointer, and a bounded read-only fallback for pre-guide binaries. The version-sensitive command reference now lives only in the Orca binary (the embedded guide table, served by orca skills get), so the distributed files can no longer drift from the binary that actually runs the commands — the root cause the thin-stub plan targets.

Stacked on #9238 (which introduces the generator mechanism). With this, all eight bundled skills are hybrid stubs.

What changed

  • skill-stubs/<topic>.md (7 new) — body-only hybrid stubs. Each keeps the safe CLI resolver (ORCA_CLI_COMMAND → orca-dev → orca-ide → orca, never bare orca on Linux/GNOME screen reader), a topic-tailored intro + triggers, the ORCA skills get <topic> pointer, a "don't guess subcommands" warning, and a bounded read-only fallback for old binaries. Linear stubs retain the untrusted-source boundary; linear-tickets notes it is the legacy alias for orca-linear.
  • config/scripts/generate-bundled-skill-guides.mjs — STUB_TOPICS now lists all eight canonical topics. The projection is still <guide frontmatter block> + <stub body>, so every routing/description surface stays byte-identical. The embedded full guides (bundled-skill-guides.ts) are untouched.
  • skills/<topic>/SKILL.md (7 regenerated) — thinned to stubs (e.g. orca-per-workspace-env 730 → 79 lines, orchestration 254 → 83).
  • resources/skills/current-manifest.json + snapshot-registry.json — regenerated: each converted skill's releaseRevision bumps +1 as an append-only snapshot (orca-cli stays at 33). release-mapping.json byte-identical (tolerated prefix). Existing fat installs now classify outdated and get the targeted npx skills update nudge — no in-app writes.
  • Tests — command-guidance assertions for computer-use, orca-linear, and orchestration repointed to their guide sources (their home now the projection is thin), plus per-topic stub-projection + safety coverage (resolver survives, no bare orca, old-binary fallback, frontmatter unchanged). The orca-cli test's cross-guide worktree-id check repointed to the orchestration/emulator guide sources.

Verification

  • ✅ verify:bundled-skill-guides + verify:skill-bundle-manifest gates pass.

  • ✅ Unit tests green: bundled-guides generator, manifest generator (incl. git-tree identity, post-commit), and all four skill-guidance suites — 64 passed / 1 skipped (the skip is a pre-existing .skip).

  • ✅ oxlint + oxfmt clean on all changed files.

  • ✅ Live CLI (built from this branch): orca skills get <topic> still serves the full version-matched guide from the embedded table for every topic, while the on-disk installed file is the thin stub:

    topic served by skills get installed SKILL.md
    computer-use 153 lines (full) 75 lines (stub)
    linear-tickets 197 lines (full) 80 lines (stub)
    orca-cli 331 lines (full) 78 lines (stub)
    orca-emulator 169 lines (full) 74 lines (stub)
    orca-emulator-android 153 lines (full) 74 lines (stub)
    orca-linear 194 lines (full) 78 lines (stub)
    orca-per-workspace-env 730 lines (full) 79 lines (stub)
    orchestration 254 lines (full) 83 lines (stub)

    None of the served guides contain the discovery stub marker (they are full guides); every installed file does. Example — orca skills get orchestration serves # Orca Inter-Agent Orchestration (full body) while the installed file is the # Orca Orchestration stub.

  • ✅ orca skills list shows all eight topics with unchanged descriptions (routing/discovery surface byte-identical).

Not in scope / gates still ahead

Per notes/skill-freshness-design.md, the gates flagged on #9238 still apply before promoting broadly:

  • §E.3 pointer-compliance spike — run real agents (Claude Code, Codex) against the released guide-serving binary and measure CLI-resolution / guide-before-use compliance, task success vs. fat, and token cost. feat(skills): ship orca-cli as a first-generation hybrid stub #9238 ran this for orca-cli (verdict: pass); the same spike shape extends naturally to these topics.
  • §E.5 RC window — validate through an RC window before further thinning.
  • allowed-tools frontmatter — intentionally not added (frontmatter kept byte-identical to guides).

Roll out the hybrid discovery-stub pattern (first shipped for orca-cli in
#9238) to the other seven bundled skills: computer-use, linear-tickets,
orca-emulator, orca-emulator-android, orca-linear, orca-per-workspace-env,
and orchestration. Each installable SKILL.md becomes a thin stub — a safe
CLI resolver, an `orca skills get <topic>` pointer, and a bounded read-only
fallback for pre-guide binaries — while the version-matched command
reference now lives only in the Orca binary (embedded guide table, served
by `orca skills get`). The distributed files can no longer drift from the
binary that runs the commands.

- generator: STUB_TOPICS now lists all eight canonical topics; each stub
  body lives in skill-stubs/<topic>.md and the projection reuses the
  guide's own frontmatter, so every routing/description surface is
  byte-identical. The embedded full guides (bundled-skill-guides.ts) are
  untouched.
- manifest regenerated: each converted skill's releaseRevision bumps +1 as
  an append-only snapshot (orca-cli stays at 33). Existing fat installs
  classify `outdated` and get the targeted `npx skills update` nudge with
  no in-app writes.
- tests: command-guidance assertions for computer-use, orca-linear, and
  orchestration repointed to their guide sources (their home now), plus
  per-topic stub-projection + safety coverage.

Per notes/skill-freshness-design.md this completes the fat->stub migration
across all bundled skills. The E.3 pointer-compliance spike and E.5 RC
window flagged on #9238 still apply; allowed-tools frontmatter is
intentionally not added yet (frontmatter kept byte-identical to guides).
@brennanb2025

Copy link
Copy Markdown
Contributor Author

Review follow-up pushed in commit d576af3.

Meaningful fixes:

  • Replaced the generic legacy fallback in all 7 new stubs with bounded, read-only commands specific to each skill domain.
  • Removed pre-guide orchestration instructions that could trigger version-sensitive mutations before the full guide was loaded.
  • Corrected stale legacy-alias wording and added cross-topic regression coverage.

Manual Electron validation:

  • Ran the dev Electron app with isolated user data.
  • Exercised all 7 project stubs with actual Codex and Claude Code terminals.
  • Both agents fetched and read every full guide and selected the expected domain-specific fallback behavior: PASS 7/7 for each agent.

Verification:

  • Focused skill and CLI suite: 75 passed, 1 skipped.
  • Final changed-test rerun: 26/26 passed.
  • Bundled-guide and manifest verification passed.
  • Typecheck, CLI build, formatting, lint, and git diff check passed.
  • Stub preload size is 27,412 bytes versus 119,016 bytes for the full guides, a 77.0 percent reduction. No runtime hot-path changes were introduced.

The broad pnpm test run was not usable on the local unsupported Node 26 runtime; the repo requires Node 24. Unrelated renderer tests failed because Node disabled localStorage without localstorage-file, and daemon, SSH, and WSL suites timed out. Focused coverage and supported CI are the authoritative checks here.

@brennanb2025
brennanb2025 merged commit f6fa71f into brennanb2025/orca-cli-hybrid-stub Jul 20, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant