# CLI-065 Tasks — `init --yes` non-interactive completion

Spec: `.agents/spec-docs/active/CLI-065-init-yes-noninteractive.md`

- [x] T1 (TC-01): `runInitCommand` with `yes: true` + existing AGENTS.md/settings → no prompt invoked, "Init cancelled.", files untouched
- [x] T2 (TC-02): `yes: true` + `.claude/` present, clean dir → migration skipped (default N), plain-template settings created
- [x] T3 (TC-03): `CI=true` (no `yes`) behaves identically (env injected as parameter, not stubEnv)
- [x] T4 (TC-04): non-TTY without `yes` and prompt required → error names the question + "Re-run with --yes", no API-key text, exit 1
- [x] T5 (TC-05): TTY + no `yes` → prompts fire exactly as before (interactive regression)
- [x] T6 (TC-06): SPEC.md init section documents per-prompt defaults and `--yes`/CI semantics
- [x] T7: build/typecheck/lint/test green; PR to develop; backlog CLI-065 evidence recording

## Test Plan

Authoritative TC table lives in the spec document (`.agents/spec-docs/active/CLI-065-init-yes-noninteractive.md` § Test Plan).
Summary: unit tests on `runInitCommand` with temp dirs, a mock terminal, injected confirm/TTY state, and a prompt spy — covering the prompt matrix (yes × CI × TTY × existing-files × .claude) plus the non-TTY error message contract (question named, `Re-run with --yes` guidance, no API-key text). Verification: `pnpm --filter @robota-sdk/agent-cli test` plus workspace typecheck/lint.
