feat(init): opt-in agent selection with interactive picker#36
Merged
Conversation
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.
bntvllnt
added a commit
that referenced
this pull request
Jun 1, 2026
Release prep for **2.4.0**. ## Changes - `package.json`: `2.3.0` → `2.4.0` (minor — new `init` command). - `CHANGELOG.md`: `[Unreleased]` → `[2.4.0] - 2026-06-01`, fresh empty `[Unreleased]`, compare links updated. ## What ships in 2.4.0 - `init` command — agent adoption layer (#34) - Opt-in agent selection + interactive picker (#36) ## After merge Dispatch the **Publish** workflow (workflow_dispatch on main) → tags `v2.4.0`, `npm publish --tag latest` via OIDC, creates the GitHub Release.
bntvllnt
added a commit
that referenced
this pull request
Jun 1, 2026
## Why Dogfooding `init` surfaced a broken-looking `codebase-intelligence --help`: the command list printed **twice** with two contradictory `init` descriptions. Root cause — the program `.description()` embedded a hand-maintained command list that commander **also** auto-generates. The manual `init` line was stale, claiming the global skill installs by default (it is opt-in since #36). The CLI action layer (`src/cli.ts`) is excluded from coverage and had **zero** tests, so nothing caught this or guards the `init` lifecycle. ## What - **Fix:** drop the manual command list from `.description()`; commander is now the single source. Preserve MCP-mode + Try hints via `addHelpText("after")`. - **Tests (`tests/cli-init.e2e.test.ts`, new):** spawn the **real binary** across the full init lifecycle with a sandboxed `HOME` — help no-duplication regression, `--json`, default (non-TTY), `--all`, `--agents` subset, unknown-id → exit 2, empty selection, idempotent re-run, missing path → exit 1, `--skill` opt-in, skill-not-installed-by-default. - **`promptSelection`** non-TTY fallback tests (no mocking of own code). - **Docs:** README `init` line synced to opt-in skill wording. ## Verification - TDD: 3 help tests RED on old build → GREEN after fix. - Gates: lint, typecheck, build pass. Full suite **342 passed / 3 todo** (baseline 326 + 16 new, zero regressions). - `node dist/cli.js --help` now shows one command list. Behavior of `init` itself is unchanged — verified working across every mode (interactive PTY, `--json`, `--all`, `--agents`, idempotency).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 —
initonly exists on canary, no stable release ships it, so there's no backward-compat cost.Behavior
init(TTY)AGENTS.md+CLAUDE.mdpreselected, skill toggle in-listinit --yes/--json/ no TTYAGENTS.md+CLAUDE.md, no skillinit --agents claude,cursorinit --allinit --skillRemoved
--no-skill(skill is off by default now).Implementation
readlineraw-mode checkbox (src/install/prompt.ts). The project is deliberately dep-minimal.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
--all,--agents,--skill, invalid agent → exit 2).Docs
README,
docs/cli-reference.md,llms-full.txt,CHANGELOG.mdupdated; the[Unreleased]entry now describes the opt-in design (the never-shipped--no-skill/default-all behavior is gone).