You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(init): opt-in agent selection with interactive picker (#36)
## 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).
0 commit comments