[PR #6401] [MERGED] fix(setup): keep the CLI-only skill choice offered under a client ID #7336

Closed
opened 2026-11-01 21:47:10 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/6401
Author: @pablodiazjorge
Created: 10/22/2026
Status: ✅ Merged
Merged: 10/23/2026
Merged by: @baron

Base: main ← Head: fix/setup-cli-only-skill-selection


📝 Commits (2)

  • 0ca26c0 fix(setup): keep the CLI-only skill choice offered under a client ID
  • 9daf643 test(setup): cover the accept-all CLI-only skill selection

📊 Changes

2 files changed (+55 additions, -2 deletions)

View changed files

📝 src/application/Setup.planning.test.ts (+48 -0)
📝 src/application/Setup.ts (+7 -2)

📄 Description

Summary

Fixes #5856. In interactive setup, when the only detected client has its own skill destination (Claude Code), the separate "Install the guided REA skill for CLI use?" offer carries the action ID install_skill:claude_code. With no agent selected, setup only recognized the exact ID install_skill, so an accepted offer was dropped: the plan was empty, nothing was installed, and setup still reported ready. Setup now keeps any offered skill action the caller selected and, with no client selected, plans the shared CLI skill that the setup guide describes for this choice.

Thanks to @coygeek for the report and the focused reproduction.

Problem and expected behavior

Smallest trigger, from the issue: Claude Code is the only detected client, the agent selection is left empty, and the CLI skill prompt is accepted. The selection stage plans the skill with the detected clients, so the offered action is install_skill:claude_code (SetupPlan.ts). runSetup then checked selectedActionIds.has("install_skill") (Setup.ts), so skillSelected stayed false and the final plan omitted the accepted action.

Expected: keep the choice, show the shared destination (~/.agents/skills) for approval, install it after approval, and include the skill in final readiness.

Change and scope

  • src/application/Setup.ts: skillSelected now asks whether any install_skill action offered at the selection stage was selected (matched by kind and by its offered ID) instead of comparing with the literal install_skill. With no client selected, selectedSkillClientIds stays empty as before, so the final plan uses the shared root, the same path an offered install_skill already took.
  • The offered IDs, the interactive prompt, and the client-selected paths are unchanged.
  • Not included: changing which destination the selection stage offers.

Contract and boundary impact

  • Semantic owner and earliest changed stage: selection consumption in runSetup (src/application/Setup.ts).
  • Contribution scope fit and linked maintainer decision: ordinary fix within existing boundaries; not applicable.
  • CLI and MCP/tool-catalog contract: interactive rea setup now plans the accepted CLI-only skill; no catalog change.
  • Provider, bridge, target-format, or platform compatibility: none.
  • Evidence, artifact, provenance, or reconstruction contract: none.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): not applicable.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs and skills/; edit authored instructions in .agents/skills/reverse-engineer-anything/ and never commit build outputs): none; the skill goes where the setup guide already documents.

Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

(The file change is setup's existing, approved installation of the shared skill, now reached for this choice.)

Evidence and regression coverage

  • Tests added or updated: src/application/Setup.planning.test.ts, "keeps a CLI-only skill choice offered under a client-specific ID", with two selection forms: the offered skill ID alone, and a plain accept-all answer (which selects every offered action ID). Claude Code is the only detected client and no client is selected. Each case asserts the offered ID (install_skill:claude_code), a plan with only install_skill targeting the shared root, installed_skill, one installation, no client configuration, and that skill admission checked the shared root.
  • Base reproduction or other evidence: on the base revision both cases fail with expected [] to deeply equal [ { id: 'install_skill', … } ], the empty plan the issue reports.
  • User-visible CLI/MCP output (if applicable): not captured; the approval stage now lists the shared skill destination.
  • Remaining proof gaps: no real terminal session. The new test drives runSetup with the two selection forms; the interactive adapter (confirmInteractiveSetup) is unchanged and was not exercised by it.

For evidence-bearing changes:

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance, and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

Windows 11 x64 10.0.26300, Node 24.18.0, on main 7af1b2068:

  • npx vitest run src/application/Setup.planning.test.ts -t "CLI-only skill": both cases pass; both fail on the base as above.
  • npx vitest run src/application/Setup: 5 files, 82 tests passed.
  • npx vitest run tests/boundary/cli/cliSetup.test.ts: 12 passed, including "can install the skill for CLI use without an agent registration". The 2 TTY dry-run tests fail on this host because the test process descends from the MSIX-packaged Claude Desktop app, so setup refuses with its MSIX redirection notice; they do not reach the changed code.
  • npm run check:fast: typecheck and lint pass.
  • npx oxfmt --check on the changed files: pass.

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: Windows only; no real terminal session; not applicable to providers.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: setup still shows the plan and asks for approval before installing.

Author readiness

Human owner: @pablodiazjorge

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/6401 **Author:** [@pablodiazjorge](https://github.com/pablodiazjorge) **Created:** 10/22/2026 **Status:** ✅ Merged **Merged:** 10/23/2026 **Merged by:** [@baron](https://github.com/baron) **Base:** `main` ← **Head:** `fix/setup-cli-only-skill-selection` --- ### 📝 Commits (2) - [`0ca26c0`](https://github.com/morluto/rea/commit/0ca26c0fe7b5e68db68ef7712f3ffcca1b6bc583) fix(setup): keep the CLI-only skill choice offered under a client ID - [`9daf643`](https://github.com/morluto/rea/commit/9daf643c3dc8e61cd6fd600f332958f75d45f205) test(setup): cover the accept-all CLI-only skill selection ### 📊 Changes **2 files changed** (+55 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/application/Setup.planning.test.ts` (+48 -0) 📝 `src/application/Setup.ts` (+7 -2) </details> ### 📄 Description ## Summary Fixes #5856. In interactive setup, when the only detected client has its own skill destination (Claude Code), the separate "Install the guided REA skill for CLI use?" offer carries the action ID `install_skill:claude_code`. With no agent selected, setup only recognized the exact ID `install_skill`, so an accepted offer was dropped: the plan was empty, nothing was installed, and setup still reported `ready`. Setup now keeps any offered skill action the caller selected and, with no client selected, plans the shared CLI skill that the [setup guide](https://github.com/morluto/rea/blob/main/docs/installation.md) describes for this choice. Thanks to @coygeek for the report and the focused reproduction. ## Problem and expected behavior Smallest trigger, from the issue: Claude Code is the only detected client, the agent selection is left empty, and the CLI skill prompt is accepted. The selection stage plans the skill with the detected clients, so the offered action is `install_skill:claude_code` (`SetupPlan.ts`). `runSetup` then checked `selectedActionIds.has("install_skill")` (`Setup.ts`), so `skillSelected` stayed false and the final plan omitted the accepted action. Expected: keep the choice, show the shared destination (`~/.agents/skills`) for approval, install it after approval, and include the skill in final readiness. ## Change and scope - `src/application/Setup.ts`: `skillSelected` now asks whether any `install_skill` action offered at the selection stage was selected (matched by kind and by its offered ID) instead of comparing with the literal `install_skill`. With no client selected, `selectedSkillClientIds` stays empty as before, so the final plan uses the shared root, the same path an offered `install_skill` already took. - The offered IDs, the interactive prompt, and the client-selected paths are unchanged. - Not included: changing which destination the selection stage offers. ## Contract and boundary impact - Semantic owner and earliest changed stage: selection consumption in `runSetup` (`src/application/Setup.ts`). - Contribution scope fit and linked maintainer decision: ordinary fix within existing boundaries; not applicable. - CLI and MCP/tool-catalog contract: interactive `rea setup` now plans the accepted CLI-only skill; no catalog change. - Provider, bridge, target-format, or platform compatibility: none. - Evidence, artifact, provenance, or reconstruction contract: none. - Target selection, authority, upstream behavior, and cleanup details (if applicable): not applicable. - Generated metadata (`docs/public/product-catalog.json`), package, or installation impact (CI generates and validates ignored catalogs and `skills/`; edit authored instructions in `.agents/skills/reverse-engineer-anything/` and never commit build outputs): none; the skill goes where the setup guide already documents. Expected effects (check known effects; use documentation-only on its own). Unchecked items do not establish absence; leave uncertainties visible. - [ ] Read existing files or captured data. - [ ] Launch or attach to a process. - [ ] Inject instrumentation or run scripts/code. - [x] Change process memory, registers, files, or configuration. - [ ] Contact network services. - [ ] Recover protected code or work around protections. - [ ] Documentation or usability only; no target interaction. - [ ] Not sure yet; investigation or maintainer guidance needed. (The file change is setup's existing, approved installation of the shared skill, now reached for this choice.) ## Evidence and regression coverage - Tests added or updated: `src/application/Setup.planning.test.ts`, "keeps a CLI-only skill choice offered under a client-specific ID", with two selection forms: the offered skill ID alone, and a plain accept-all answer (which selects every offered action ID). Claude Code is the only detected client and no client is selected. Each case asserts the offered ID (`install_skill:claude_code`), a plan with only `install_skill` targeting the shared root, `installed_skill`, one installation, no client configuration, and that skill admission checked the shared root. - Base reproduction or other evidence: on the base revision both cases fail with `expected [] to deeply equal [ { id: 'install_skill', … } ]`, the empty plan the issue reports. - User-visible CLI/MCP output (if applicable): not captured; the approval stage now lists the shared skill destination. - Remaining proof gaps: no real terminal session. The new test drives `runSetup` with the two selection forms; the interactive adapter (`confirmInteractiveSetup`) is unchanged and was not exercised by it. For evidence-bearing changes: - [x] Observed, derived, and inferred claims remain distinguishable. - [x] Artifact identity, source provenance, and failed attempts remain preserved. - [x] Unsupported, incomplete, unavailable, or uncertain outcomes remain visible. ## Validation performed Windows 11 x64 10.0.26300, Node 24.18.0, on main `7af1b2068`: - `npx vitest run src/application/Setup.planning.test.ts -t "CLI-only skill"`: both cases pass; both fail on the base as above. - `npx vitest run src/application/Setup`: 5 files, 82 tests passed. - `npx vitest run tests/boundary/cli/cliSetup.test.ts`: 12 passed, including "can install the skill for CLI use without an agent registration". The 2 TTY dry-run tests fail on this host because the test process descends from the MSIX-packaged Claude Desktop app, so setup refuses with its MSIX redirection notice; they do not reach the changed code. - `npm run check:fast`: typecheck and lint pass. - `npx oxfmt --check` on the changed files: pass. ## Compatibility, safety, and release - Breaking changes or migration steps: none. - Real Hopper/Ghidra, browser, or OS coverage: Windows only; no real terminal session; not applicable to providers. - Package or release metadata impact: none. - Security, privacy, process, or containment review: setup still shows the plan and asks for approval before installing. ## Author readiness Human owner: @pablodiazjorge - [x] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. ## Before merge - [x] This PR addresses a concrete problem or an agreed enhancement. - [x] Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. - [x] The PR has one focused outcome and the title follows `type(scope): outcome`. - [x] Related issue is linked, or the reason for not linking one is stated above. - [x] Tests cover changed observable behavior and meaningful failure paths. - [x] Owning docs, contracts, and generated metadata are updated where needed. - [ ] User-visible CLI/MCP changes include representative output. - [x] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:47:10 +00:00
bsakaguchi changed title from [PR #6401] [MERGED] fix(setup): keep the CLI-only skill choice offered under a client ID to [PR #6401] fix(setup): keep the CLI-only skill choice offered under a client ID 2026-11-03 15:42:20 +00:00
bsakaguchi changed title from [PR #6401] fix(setup): keep the CLI-only skill choice offered under a client ID to [PR #6401] [MERGED] fix(setup): keep the CLI-only skill choice offered under a client ID 2026-11-03 16:43:47 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#7336
No description provided.