Skip to content

feat(cli): Remove Taskless from unchecked tool locations#22

Merged
thecodedrift merged 3 commits into
mainfrom
feat/uninstall-unchecked-locations
May 19, 2026
Merged

feat(cli): Remove Taskless from unchecked tool locations#22
thecodedrift merged 3 commits into
mainfrom
feat/uninstall-unchecked-locations

Conversation

@thecodedrift
Copy link
Copy Markdown
Member

Make the taskless init wizard's tool-selection step manifest-aware so unchecking a location removes Taskless's stubs from it. This makes it easy to centralize on one location (e.g. .agents/) and drop the shims from other tools.

Previously the multiselect pre-checked detected tools only. A location Taskless had installed into — notably .agents/, which has no detection signal of its own — would render unchecked, so it could not be meaningfully unchecked. The install engine already performs manifest-diffed, target-scoped removal behind a confirm prompt; that path was simply unreachable from the UI because the manifest never reached the multiselect's pre-checked state.

What changes:

  • The tool-selection multiselect pre-checks the union of manifest-recorded and detected directories, so an installed location shows checked and can be unchecked.
  • Each entry carries an origin hint: installed (in the manifest, takes precedence), detected, or not detected.
  • The removal confirmation is itemized per target (e.g. "Remove Taskless from .claude/ (2 stubs)?") instead of a generic single-line prompt.

The removal engine itself (applyInstallPlan, computeInstallDiff) is unchanged — this only surfaces existing capability. The non-interactive init --no-interactive / update paths and the canonical .taskless/ store are untouched. Full uninstall (removing the canonical store) is explicitly out of scope.

Review notes:

  • locationChoices is kept pure — promptLocations does the manifest I/O and passes the target list in, so the detection-and-manifest-to-choices mapping stays unit-testable.
  • One known edge case left as a follow-up: on a legacy v0.6→v0.7 upgrade the canonical .taskless target has skill removals, so the itemized prompt would read "Remove Taskless from .taskless/ (N stubs)" — slightly off wording for canonical full files. Harmless and out of scope here.

The OpenSpec change artifacts (openspec/changes/uninstall-unchecked-locations/) are included for the proposal, design, and cli-init spec delta.

Make the `taskless init` wizard's tool-selection step manifest-aware so
unchecking a location removes Taskless's stubs from it. Previously the
multiselect pre-checked detected tools only, so a location Taskless had
installed into — notably `.agents/`, which has no detection signal of
its own — could not be unchecked, leaving the removal path the install
engine already supports unreachable from the UI.

- Pre-check the union of manifest-recorded and detected directories, so
  an installed location shows checked and can be unchecked.
- Hint each entry by origin: `installed`, `detected`, or `not detected`.
- Itemize the removal confirmation per target (e.g. "Remove Taskless
  from .claude/ (2 stubs)?") instead of a generic prompt.

The removal engine itself is unchanged — this only surfaces it. The
non-interactive paths and the canonical `.taskless/` store are untouched.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 19, 2026 04:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 updates the interactive taskless init wizard to make install-location selection “manifest-aware”, so locations that Taskless previously installed into are pre-checked and can be unchecked to trigger the existing manifest-diff removal behavior. It also improves the summary-step removal confirmation by itemizing removals per target directory with stub counts.

Changes:

  • Make locationChoices pre-check the union of detected tool directories and manifest-recorded install targets (excluding the canonical .taskless store), and add installed/detected/not detected origin hints.
  • Update promptLocations to read install state and pass manifest targets into locationChoices.
  • Itemize the summary removal confirmation message per target (with tests + end-to-end coverage for “uncheck removes stubs” and “decline keeps stubs”).

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/cli/src/wizard/steps/locations.ts Reads install state and pre-checks union of detected + manifest targets; adds origin hints.
packages/cli/src/wizard/steps/summary.ts Builds an itemized “remove stubs” confirmation message from diff entries.
packages/cli/test/wizard-steps.test.ts Adds unit tests for manifest-aware pre-checking and itemized removal confirm message.
packages/cli/test/wizard-integration.test.ts Adds end-to-end coverage for uninstall-on-uncheck and decline-keeps-stubs flows.
openspec/changes/uninstall-unchecked-locations/** Proposal/design/spec/task artifacts documenting the behavior change.
.changeset/uninstall-unchecked-locations.md Patch changeset describing the CLI behavior update.

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

Comment thread packages/cli/src/wizard/steps/summary.ts Outdated
thecodedrift and others added 2 commits May 18, 2026 22:56
Move the completed change under openspec/changes/archive/ and sync the
two modified cli-init requirements into the main spec. Satisfies the PR
OpenSpec archive gate.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
buildRemovalConfirmMessage used the same "Remove Taskless from …"
wording for every diff entry. A diff carrying canonical-store removals
(e.g. a legacy v0.6→v0.7 upgrade) would render "Remove Taskless from
.taskless/ …", which is misleading — that is not an uninstall of a tool
location. Skip canonical entries in the itemized list and fall back to a
generic prompt when only canonical removals are present.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@thecodedrift thecodedrift marked this pull request as ready for review May 19, 2026 06:26
@thecodedrift thecodedrift merged commit e8def7e into main May 19, 2026
2 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.

2 participants