Skip to content

Add skill management for CodeMux engines#160

Open
FridayLiu wants to merge 7 commits into
mainfrom
feature/skills-scope-ui
Open

Add skill management for CodeMux engines#160
FridayLiu wants to merge 7 commits into
mainfrom
feature/skills-scope-ui

Conversation

@FridayLiu

@FridayLiu FridayLiu commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Closes #159

Summary

  • Add scope-aware skill summaries so disabling a project skill falls back to global/builtin definitions instead of suppressing all scopes.
  • Redesign the Skills settings page into Global / Project / Builtin card columns with modal details, scoped status badges, file paths, and scoped enable/delete actions.
  • Add scoped skill instance paths and tests for fallback/delete/projection behavior.

Testing

  • npm run typecheck
  • npm run build
  • npm run lint
  • bun run vitest run tests\unit\electron\services\skill-services.test.ts

Engine test coverage

  • Initial manual testing done with Copilot engine.
  • Other engines have not been tested yet.

xinyul-MS and others added 3 commits June 18, 2026 12:38
Resolve scoped CodeMux skills into effective roots, project them into engine discovery folders when needed, and wire Copilot, Codex, Claude, and OpenCode adapters to use the managed skill set.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add scope-aware skill summaries and disabled fallback behavior
- Redesign Skills settings into scope-based card columns with modal details
- Add path-aware scoped skill instances and coverage for fallback semantics

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 23, 2026 15:57
@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 76.86% (🎯 50%) 12144 / 15800
🔵 Statements 75.41% (🎯 50%) 12956 / 17180
🔵 Functions 73.57% (🎯 50%) 2069 / 2812
🔵 Branches 69.14% (🎯 50%) 7537 / 10901
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
electron/main/engines/engine-adapter.ts 94.44% 68.75% 73.33% 93.33% 310
electron/main/engines/claude/index.ts 66.86% 57.8% 61.68% 67.85% 198-209, 242, 257-263, 277-278, 278, 367-554, 562, 617-630, 680-698, 705-706, 912-916, 962-966, 1005, 1009-1010, 1018-1021, 1059, 1067-1069, 1075-1295, 1348-1351, 1458-1555, 1584-1586, 1663-1769, 1806-1822, 1847, 1863, 1874, 1896, 1905, 1913-1916, 1936-1938, 1964-1972, 2000-2001, 2003-2028, 2034-2058, 2078, 2094-2104, 2109, 2112, 2118, 2122, 2180, 2222, 2241, 2343, 2347-2358, 2410-2432, 2447, 2471-2475, 2487-2489, 2495, 2557, 2582-2587, 2636, 2661-2711, 3091, 3174, 3234, 3520, 3576-3577, 3637-3638, 3642-3643, 3680-3744
electron/main/engines/codex/index.ts 77.11% 60.77% 86.62% 82.34% 87-101, 237, 238, 253, 259-262, 281, 350, 389, 399, 446, 467, 476-489, 508-509, 533, 554, 557, 576, 597, 608, 611, 614, 624-625, 634, 671, 676, 686-689, 702-710, 722, 727, 749, 758-765, 781, 794-797, 814, 825, 851-902, 916-917, 922, 939, 974-975, 998, 1043, 1057, 1069, 1080, 1121-1129, 1132-1152, 1181-1182, 1190-1219, 1238, 1241, 1256, 1258, 1275, 1287, 1293, 1301, 1313-1314, 1317-1318, 1335, 1336, 1386, 1392, 1475, 1483, 1491, 1499, 1501, 1511, 1513, 1522, 1524, 1533, 1542, 1549, 1557, 1693, 1746-1747, 1768, 1788-1789, 1826, 1832, 1848-1849, 1875, 1885, 1899, 1935, 1939, 1969, 2029, 2034, 2102, 2109, 2117, 2125-2138, 2143, 2148, 2243, 2282, 2284, 2289, 2295, 2299, 2301, 2303, 2310, 2325, 2355, 2364, 2372-2399, 2404, 2411, 2416, 2418, 2421, 2440-2448
electron/main/engines/copilot/index.ts 75.74% 67.67% 71.61% 76.85% 126, 153-155, 161, 166-169, 183, 184, 306, 364-375, 389-390, 425, 436-438, 448-449, 455, 472-487, 495, 503, 536, 623, 630, 633, 647-650, 672-676, 682-691, 736-747, 751-760, 804-868, 876-881, 946-979, 1057-1063, 1071, 1081, 1169, 1313, 1319, 1349-1350, 1374-1375, 1393, 1394, 1403, 1407, 1410-1412, 1421-1443, 1468-1473, 1547-1549, 1567-1568, 1638, 1708, 1715, 1776, 1795-1816, 1830, 1881-1892, 1918-1949, 1961, 1964, 1965, 1967, 2085
electron/main/engines/opencode/index.ts 80.65% 66.1% 76.25% 82.39% 114, 128-136, 198-207, 212-214, 225-226, 297, 501, 576-584, 647, 650, 656, 771, 790, 893, 899-900, 908, 921-933, 952-963, 1102, 1123-1139, 1163, 1172, 1195-1225, 1340-1360, 1410, 1419, 1428, 1434
electron/main/gateway/engine-manager.ts 96.45% 85.5% 95.83% 97.83% 57, 58, 64, 209-213, 379-388, 467, 477, 577, 596, 684, 794, 797, 801, 805, 973, 982-986, 1384
electron/main/gateway/ws-server.ts 70.3% 70.58% 52.27% 70.73% 190, 195, 242, 270-275, 402-403, 508-514, 551-666, 679, 694-697, 708-711, 729-732, 736-739, 743-746, 750-753, 757-760, 764-767, 771-774, 778-781, 792-795, 798-801, 806, 812-815, 818-834
electron/main/services/app-paths.ts 94.28% 100% 90% 94.11% 34, 73
electron/main/services/logger.ts 93.93% 65.71% 77.77% 93.93% 15-18, 81-82
electron/main/services/skill-api-service.ts 63.41% 65.38% 66.66% 65% 33, 38, 57-76, 90-92, 100, 142-150
electron/main/services/skill-projection-service.ts 84.35% 64.28% 100% 87.78% 83, 129, 136-145, 183, 192, 207, 236, 239, 249-251, 256, 304, 321-322, 333-338, 341
electron/main/services/skill-registry-service.ts 79.58% 67.78% 86% 81.25% 95, 114-115, 122-125, 132, 144-146, 155-156, 180-182, 185, 224, 227, 257-259, 276, 286-288, 291, 306, 309, 323, 326, 349-367, 389, 449-451, 456, 459-460, 465, 491, 522
src/lib/gateway-api.ts 66.66% 66.66% 56.7% 68.27% 166-167, 171-172, 176, 180, 184, 188, 192, 196, 200, 204, 208, 212, 216, 220, 224, 228, 232, 236, 240, 244, 333, 364, 497, 505, 558-638
src/lib/gateway-client.ts 7.69% 0% 1.35% 8.08% 156-690
Generated in workflow #512 for commit 544dd5f by the Vitest Coverage Report Action

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a first-class, scope-aware “Skills” management surface in the renderer, backed by new gateway RPC endpoints and Electron services that compute effective skills across builtin/global/project scopes and project those skills into engine-specific discovery locations.

Changes:

  • Add a Skills settings page/UI (Global / Project / Builtin columns + details modal) and wire it into navigation and routing.
  • Add unified gateway protocol types + GatewayClient/GatewayAPI methods + GatewayServer handlers for skill list/enable/delete/refresh operations.
  • Add Electron skill registry/projection/API services and engine adapter hooks to refresh engine-visible skills, with accompanying unit tests.

Reviewed changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/unit/src/lib/gateway-api.test.ts Adds delegation tests for new GatewayAPI skill methods.
tests/unit/electron/services/skill-services.test.ts New unit tests for registry fallback/disable/delete and projection behaviors.
tests/unit/electron/gateway/ws-server.test.ts Tests GatewayServer delegation for skill RPCs + engine refresh behavior.
tests/unit/electron/engines/opencode/index.test.ts Tests OpenCode adapter skill refresh merging into command cache.
tests/unit/electron/engines/copilot/index.test.ts Tests Copilot adapter skill reload + command cache refresh behavior.
tests/unit/electron/engines/codex/index.test.ts Verifies Codex skill list calls include forceReload toggling.
tests/unit/electron/engines/claude/index.test.ts Tests Claude adapter plugin reload + command cache update on skill refresh.
src/types/unified.ts Adds skill scope/types + new gateway request types for skill operations.
src/pages/Skills.tsx New Skills page wrapper with auth guard + titlebar layout.
src/pages/Chat.tsx Adds “Harnesses” nav section and link to /skills.
src/locales/zh.ts Adds zh translations for Skills + Harness nav strings.
src/locales/ru.ts Adds ru translations for Skills + Harness nav strings.
src/locales/en.ts Adds LocaleDict keys + en strings for Skills + Harness nav.
src/lib/gateway-client.ts Adds GatewayClient RPC methods for skill list/enable/delete/refresh.
src/lib/gateway-api.ts Adds GatewayAPI convenience wrappers for skill operations.
src/components/SkillSettingsSection.tsx Implements the scope-aware Skills settings UI and actions.
src/App.tsx Registers /skills route and lazy-load entry.
electron/main/services/skill-registry-service.ts New service to scan roots, apply disable rules, and build effective skill set via symlinks.
electron/main/services/skill-projection-service.ts New service to project effective skills into engine discovery roots + maintain manifests and git exclude.
electron/main/services/skill-api-service.ts New API service providing list/enable/delete/refresh and emitting diagnostics from projection conflicts.
electron/main/services/logger.ts Adds a dedicated skill logger scope.
electron/main/services/app-paths.ts Adds persistent paths for global skills, effective roots, and projection manifests.
electron/main/gateway/ws-server.ts Adds skill RPC handlers and triggers engine refresh on mutations/refresh.
electron/main/gateway/engine-manager.ts Adds refreshSkillsForDirectory() fan-out across adapters.
electron/main/engines/opencode/index.ts Prepares projected skills and merges OpenCode skills into command cache; adds refresh hook.
electron/main/engines/engine-adapter.ts Adds default refreshSkillsForDirectory() hook.
electron/main/engines/copilot/index.ts Passes projected skill roots into session config; adds refresh hook and skill reload logic.
electron/main/engines/codex/index.ts Adds projection support and extraRoots syncing + force reload tracking.
electron/main/engines/claude/index.ts Adds projection preparation + plugin reload support + per-directory command cache handling.
electron/main/app-main.ts Wires SkillApiService into GatewayServer and SkillProjectionService into engine adapters.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/SkillSettingsSection.tsx Outdated
Comment thread src/components/SkillSettingsSection.tsx
Comment thread src/components/SkillSettingsSection.tsx
Comment thread electron/main/services/skill-registry-service.ts
Comment thread electron/main/services/skill-projection-service.ts
Comment thread electron/main/services/skill-projection-service.ts
@FridayLiu FridayLiu changed the title Improve skill scope management UI Add skill management for CodeMux engines Jun 26, 2026
xinyul-MS and others added 2 commits June 30, 2026 13:54
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 34 out of 34 changed files in this pull request and generated 2 comments.

Comment thread src/components/SkillSettingsSection.tsx Outdated
Comment thread electron/main/gateway/ws-server.ts
xinyul-MS and others added 2 commits July 1, 2026 17:13
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@FridayLiu FridayLiu requested a review from realDuang July 1, 2026 09:37
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.

Skill management for CodeMux engines

3 participants