Skip to content

feat(init): opt-in agent selection with interactive picker#36

Open
bntvllnt wants to merge 1 commit into
mainfrom
worktree-init-opt-in
Open

feat(init): opt-in agent selection with interactive picker#36
bntvllnt wants to merge 1 commit into
mainfrom
worktree-init-opt-in

Conversation

@bntvllnt
Copy link
Copy Markdown
Owner

Why

init (shipped to canary in #34) wrote files for all 6 agents by default and installed the global skill unless --no-skill. That installs things the user never asked for. This flips it to opt-in: nothing is written unless chosen.

Pre-release change — init only exists on canary, no stable release ships it, so there's no backward-compat cost.

Behavior

Invocation Result
init (TTY) Interactive checkbox picker — AGENTS.md + CLAUDE.md preselected, skill toggle in-list
init --yes / --json / no TTY Defaults to AGENTS.md + CLAUDE.md, no skill
init --agents claude,cursor Exactly those
init --all Every agent
init --skill Also installs the global skill (opt-in)

Removed --no-skill (skill is off by default now).

Implementation

  • Zero new dependency — interactive picker is a Node readline raw-mode checkbox (src/install/prompt.ts). The project is deliberately dep-minimal.
  • Selection logic is a pure resolveInitPlan(flags, isTty) + pure prompt helpers (buildPromptItems/toggleItem/collectSelection/renderMenu), all unit-tested. The raw-mode loop is a thin I/O shell over them.

Tests / gates

  • 16 new tests (resolver branches + prompt helpers). Full suite 326 passed.
  • lint / typecheck / build green.
  • Smoke-tested every non-interactive path (default, --all, --agents, --skill, invalid agent → exit 2).

Docs

README, docs/cli-reference.md, llms-full.txt, CHANGELOG.md updated; the [Unreleased] entry now describes the opt-in design (the never-shipped --no-skill/default-all behavior is gone).

init no longer installs files for every agent (or the global skill) by
default. Nothing is written unless the user chooses it.

- TTY, no flags: interactive checkbox picker (AGENTS.md + CLAUDE.md
  preselected; skill toggle in-list). Zero new dependency (readline raw mode).
- Non-interactive (--yes/--json/no TTY): defaults to AGENTS.md + CLAUDE.md.
- --agents <list> explicit, --all for every agent.
- Global skill is opt-in via --skill (removed --no-skill; no longer default-on).

Pure resolveInitPlan() + prompt helpers are unit-tested (16 new tests).
Pre-release change to the canary-only init command — no stable users affected.
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