# Specification: ALKS CLI Basic Auth Removal

> Date: 2026-07-19
> Version: 1.0
> Location: spec-driven/alks-cli-basic-auth-removal/spec.md
> Tracking: N/A
> Source: Draft from input spec ("ALKS-CLI Basic Auth Removal — Input Spec.md", 2026-07-08) + codebase analysis (master @ 1d2d587)

> **Provenance Key**: Content sources are marked inline:
> - **[User]** — Directly stated in the input spec
> - **[Rally]** — Imported from Rally data
> - **[Inferred]** — Synthesized by the agent from available context
> - **[Default]** — Standard default applied
> - **[Codebase]** — Derived from codebase analysis

## Project Context

**Parent Project**: See `CLAUDE.md` for project-wide principles and patterns. Note the repo convention: update `changelog.txt` before opening a PR. **[Codebase]**

**Scope**: This specification defines the removal of basic (password) authentication from the ALKS CLI, leaving token-based auth only. It is Phase 2 of a three-phase basic-auth removal program and is independent of Phase 1 (Desktop). **[User]**

## Overview

The ALKS CLI (`alks`, TypeScript, `alks.js` SDK, `commander`, `keytar` keystore) currently supports four auth types: `refresh-token` (OAuth2), `password` (basic auth, already flagged DEPRECATED with runtime banners), `credential-process`, and `always-ask` (prompt for password each run). This change **removes basic auth entirely** — the `password` and `always-ask` types and their whole supporting surface (username/password prompts, keystore storage, the `ALKS_PASSWORD` env var, the `-p/--password` CLI flags, the `developer login`/`logout` password commands) — leaving **token-based auth only**: `refresh-token` + `credential-process`. **[User]**

Because basic auth is already runtime-deprecated (both `getAuth` and `developer login` print a "retiring" banner), this is a **removal, not a redesign** — the work is overwhelmingly deletion of dead-ending code paths. **[User]**

This is **Phase 2** of a three-phase program (client removals: Desktop + CLI, in either order → ALKS Core endpoint removal), a prerequisite for decommissioning the Arbiter Java Wrapper (AJW). The CLI removal is independent of the Desktop removal — separate repo, artifact, and user population, with no code or runtime coupling — so it can ship in any order or in parallel. The only hard ordering constraint is that all basic-auth consumers are off basic auth **before Phase 3** (when Core removes the endpoint). No coordinated Core release is required: the CLI simply stops offering and sending basic credentials; Core still accepts bearer/token + STS. **[User]**

### Current State
Auth is grounded against `master @ 1d2d587`: **[Codebase]**

- **Auth model** (`src/model/auth.ts`): `Auth = TokenAuth | PasswordAuth`; `TokenAuth { token }`, `PasswordAuth { userid, password }`. **[User]**
- **Auth resolution** (`src/lib/getAuth.ts`): returns `{ token }` if a refresh token exists; otherwise falls back to basic — reads `getUserId()` (throws if absent), `getPassword() || promptForPassword()`, prints a one-time deprecation banner, returns `{ userid, password }` (lines 19-45). **[User]**
- **Client build** (`src/lib/getAlks.ts`): `Props = TokenProps | PasswordProps`; the token branch calls `create()` + `getAccessToken({ refreshToken })`; the basic `else` branch casts `userid/password` into `AlksProps` (lines 84-91). **[User]**
- **Auth-type picker** (`src/lib/promptForAuthType.ts`): four choices; `password` labeled "(DEPRECATED - retiring May 3rd)" and `always-ask` are the basic-auth entries. **[User]**
- **Handlers**: `alks-developer-configure.ts` has `password` (61-72) and `always-ask` (79-82) cases; `alks-developer-login.ts` is entirely basic auth; `alks-developer-logout.ts` "removes password". Token equivalents `login2fa`/`logout2fa` are the keep path. **[User]**
- **Password/userId surface** (all basic-auth): `state/password.ts`, `state/userId.ts`, `storePassword.ts`, `getPasswordFromKeystore.ts`, `getPasswordFromPrompt.ts`, `removePassword.ts` (keytar service key `alkspassword`), `promptForPassword.ts`, `promptForUserId.ts`, `getUserIdFromPrompt.ts`. **[User]**
- **The landmine** (verified via full importer inventory): the local LokiDB session/key cache derives its encryption key from the auth object — `getKeys.ts:16` and `addKey.ts:17`: `const enc = isTokenAuth(auth) ? auth.token : auth.password;`. This ternary is on the **token path** (it is the branch selector, not dead password code). It must become `const enc = auth.token;`, keeping the value `auth.token` so the cache encryption key does not change. **[User]**

**Current pain / driver**: Basic auth blocks the Phase 3 Core endpoint removal and the AJW decommission. Traffic is already near-zero — a 2026-07-16 audit measured ~5 CLI basic-auth requests / 24h vs ~7,070 for Desktop — making the CLI the low-risk removal that need not wait on Desktop. **[User]**

## Goals

### Primary Goal
Remove basic (password) authentication from the ALKS CLI so that token-based auth (`refresh-token` + `credential-process`) is the only supported path, unblocking Phase 3 (Core endpoint removal) and the AJW decommission. **[User]**

### Secondary Goals
1. Keep `refresh-token` and `credential-process` flows working unchanged, with no regression to token sessions, the local key cache, or IAM commands. **[User]**
2. Give muscle-memory users and scripts a clear, directed error (pointing to `login2fa`/`configure`) rather than a confusing "unknown command" or silent failure. **[User]**
3. Drive the CLI basic-auth authentication count toward zero as the new version is adopted, feeding the Phase 3 / Core-removal go/no-go decision. **[User]**

### Non-Goals (Explicitly Out of Scope)
- ALKS Desktop basic-auth removal (Phase 1). **[User]**
- ALKS Core basic-auth endpoint + LDAP removal (Phase 3). **[User]**
- Removing the `PasswordAuth` type from the `alks.js` SDK (housekeeping, separate). **[User]**
- Entra tile and ALKSWeb changes. **[User]**
- Any ALKS Core change — the CLI change is token/credential-process only; Core already accepts bearer + STS. **[User]**

## Users

### Primary Users
| User Type | Description | Goals | Pain Points |
|-----------|-------------|-------|-------------|
| Internal engineers (interactive CLI users) | Cox Automotive developers running `alks` locally to obtain AWS credentials | Authenticate quickly and keep using the CLI after the change | Muscle-memory `developer login` / password prompts disappear; need clear guidance to the token path **[Inferred]** |
| Automation / CI scripts | Non-interactive consumers using `ALKS_PASSWORD`, `-p/--password`, `alks developer login`, or a `credential_process` that emits a password | Continue obtaining credentials in pipelines | Any basic-auth path breaks at upgrade — must migrate to token/credential-process before adopting the new version **[User]** |

### Secondary Users
| User Type | Description | Goals | Pain Points |
|-----------|-------------|-------|-------------|
| Platform / Arbiter team | Owners of the Entra migration and AJW decommission | Confirm CLI basic-auth traffic reaches zero to green-light Phase 3 | Need observability into adoption decline (Splunk) **[Inferred]** |

## Functional Requirements

### FR-1: Reduce the auth model and client build to token-only

**Description**: Collapse the auth type union and the client-build props so no code path can represent or construct basic-auth credentials. Remove `PasswordAuth` from `model/auth.ts` (`Auth` becomes `TokenAuth`); remove `PasswordProps` and the basic `else` branch from `getAlks.ts` (`Props = TokenProps`); remove `password?` from `CredentialProcessResult` in `getCredentialsFromProcess.ts`; drop the `password` field from `state/credentials.ts` and `model/developer.ts`. **[User]**

**User Story**: As an internal engineer, I want the CLI to build its ALKS client from a token only, so that there is no basic-auth path that could silently break or expose my network password.

**Acceptance Criteria**:

| ID | Criterion | Given | When | Then |
|----|-----------|-------|------|------|
| AC-1.1 | Token-only client build | The auth model change is in place | `getAlks` is invoked | It accepts token props only; no code path builds an `alks.js` client from `userid`/`password` **[User]** |
| AC-1.2 | credential_process is token-only | A `credential_process` emits a `password` field | The CLI resolves credential-process output | The `password` is not honored; only `refresh_token` is consumed **[User]** |
| AC-1.3 | Clean typecheck | `PasswordAuth`/`PasswordProps`/`password` fields are removed | `tsc` build runs | Build and typecheck complete with no errors **[User]** |

**Priority**: Must Have

**Goal**: Primary

**Dependencies**: None

---

### FR-2: `getAuth` fails with directed guidance when no token is present

**Description**: Remove the entire basic-auth fallback in `getAuth.ts` (lines 19-45) and its deprecation banner, plus the now-unused `promptForPassword`/`getPassword`/`getUserId` imports. When no refresh token exists, throw an error directing the user to run `alks developer login2fa` or `alks developer configure`. **[User]**

**User Story**: As an internal engineer whose session has no token, I want a clear message telling me how to authenticate, so that I am not dropped into a removed password prompt or a cryptic failure.

**Acceptance Criteria**:

| ID | Criterion | Given | When | Then |
|----|-----------|-------|------|------|
| AC-2.1 | Directed error on missing token | No refresh token is configured | Any command triggers `getAuth` | It throws an error instructing the user to run `alks developer login2fa` / `alks developer configure` — with no password prompt and no fallback **[User]** |
| AC-2.2 | Token path unchanged | A valid refresh token exists | `getAuth` runs | It returns `{ token }` exactly as before **[User]** |

**Priority**: Must Have

**Goal**: Primary

**Dependencies**: FR-1

---

### FR-3: `developer configure` offers only token-based auth choices

**Description**: In `promptForAuthType.ts`, remove the `PASSWORD_AUTH_CHOICE` and `ALWAYS_ASK_AUTH_CHOICE` constants and their entries from the choices list, keeping `refresh-token` and `credential-process`. In `alks-developer-configure.ts`, remove the `password` (61-72) and `always-ask` (79-82) cases and their now-unused imports (`promptForPassword`, `promptForUserId`, `setUserId`, `setPassword`). Keep the `-A/--auth-type` flag (it still selects among the remaining types). **[User]**

**User Story**: As an internal engineer configuring the CLI, I want the auth-type picker to offer only token-based options, so that I cannot select a removed basic-auth flow.

**Acceptance Criteria**:

| ID | Criterion | Given | When | Then |
|----|-----------|-------|------|------|
| AC-3.1 | Reduced choice set | The CLI is built with the change | I run `alks developer configure` | Only `refresh-token` and `credential-process` are offered; no `password` or `always-ask` choices appear **[User]** |
| AC-3.2 | `-A/--auth-type` retained | The `-A/--auth-type` flag is supplied with a valid value | `configure` runs non-interactively | It still selects among the remaining valid types **[User]** |
| AC-3.3 | Removed auth-type rejected | `-A/--auth-type` is supplied with a removed value (e.g., `password` or `always-ask`) | `configure` runs non-interactively | It errors reporting the value is not a valid auth type, listing the remaining choices, and does not prompt for a password **[Inferred]** |
| AC-3.4 | No orphaned imports | The password/always-ask cases are removed | `tsc` build runs | `promptForPassword`, `promptForUserId`, `setUserId`, `setPassword` are no longer imported by the configure handler **[Inferred]** |

**Priority**: Must Have

**Goal**: Primary

**Dependencies**: FR-1

---

### FR-4: Retire the `developer login`/`logout` password commands with directed errors

**Description**: Replace the basic-auth `developer login` handler with a clear error ("Basic auth has been removed; run `alks developer login2fa`") rather than dropping the command outright, so existing users/scripts get a directed message instead of "unknown command". Delete the password-only `alks-developer-logout.ts` and its command. The token commands `login2fa`/`logout2fa` remain the keep path and are unaffected. Remove the corresponding handler imports and command wiring from `program.ts`. **[User]**

**User Story**: As an automation owner with a script calling `alks developer login`, I want the command to fail with an explicit migration message, so that I know exactly what to change.

**Acceptance Criteria**:

| ID | Criterion | Given | When | Then |
|----|-----------|-------|------|------|
| AC-4.1 | `developer login` errors with guidance | The new version is installed | I run `alks developer login` | It returns a directed error pointing to `alks developer login2fa` (and does not prompt for a password) **[User]** |
| AC-4.2 | `developer logout` removed | The new version is installed | I run `alks developer logout` | The password-only command is gone; `logout2fa` remains for tokens **[User]** |
| AC-4.3 | Token commands unaffected | A token user runs `login2fa`/`logout2fa` | Either command executes | It behaves exactly as before **[User]** |

**Priority**: Must Have

**Goal**: Secondary-2

**Dependencies**: FR-1

---

### FR-5: Delete the password/userId surface and remove all password inputs

**Description**: Delete the basic-auth helper files (all importers confirmed basic-auth-only): `state/password.ts`, `state/userId.ts`, `storePassword.ts`, `getPasswordFromKeystore.ts`, `removePassword.ts`, `promptForPassword.ts`, `promptForUserId.ts`, and `getUserIdFromPrompt.ts` (already orphaned dead code). **Do NOT delete `getPasswordFromPrompt.ts`** — despite its name it is a generic masked-input widget used by the token flow (`promptForToken.ts`). Remove password inputs from `program.ts`: the `-u/--username` flag on `configure` and the auth `-p/--password` flags (lines 126, 149, 172, 470); remove the `ALKS_PASSWORD` env var and keystore password storage (keytar service key `alkspassword`). In `alks-developer-info.ts`, remove the `getPassword` import + call and the "Password" table row, and drop the orphaned `userid`/"Network Login" row, keeping server/account/role/output and the 2FA-token row. **[User]**

**User Story**: As an internal engineer, I want no leftover password prompts, flags, env vars, or keystore entries in the CLI, so that basic auth is fully and cleanly removed.

**Acceptance Criteria**:

| ID | Criterion | Given | When | Then |
|----|-----------|-------|------|------|
| AC-5.1 | Password inputs gone | The new version is installed | I inspect the CLI surface | `ALKS_PASSWORD`, the auth `-p/--password` flags, `-u/--username`, and keystore password storage are all absent **[User]** |
| AC-5.2 | Helper files deleted | The change is complete | I search the codebase | `state/password.ts`, `state/userId.ts`, `storePassword.ts`, `getPasswordFromKeystore.ts`, `removePassword.ts`, `promptForPassword.ts`, `promptForUserId.ts`, and `getUserIdFromPrompt.ts` no longer exist **[User]** |
| AC-5.3 | Token widget preserved | The token flow prompts for a token | `promptForToken.ts` runs | `getPasswordFromPrompt.ts` still exists and provides the masked input unchanged **[User]** |
| AC-5.4 | `developer info` cleaned | A token user runs `alks developer info` | The info table renders | No "Password" or "Network Login"/userid rows appear; server/account/role/output and the 2FA-token row remain **[User]** |
| AC-5.5 | No dangling references | The change is complete | I grep the codebase | No references remain to `PASSWORD_AUTH_CHOICE`, `ALWAYS_ASK_AUTH_CHOICE`, `promptForPassword`, `setPassword`, `getPassword`, `ALKS_PASSWORD`, `isTokenAuth`, or the auth `-p/--password` **[User]** |

**Priority**: Must Have

**Goal**: Primary

**Dependencies**: FR-1, FR-2, FR-3

---

### FR-6: Preserve the token session cache-encryption key (landmine fix)

**Description**: Delete the `isTokenAuth.ts` type guard and inline `auth.token` at its two call sites (`getKeys.ts:4`, `addKey.ts:4`). Change the cache-encryption-key ternary at `getKeys.ts:16` and `addKey.ts:17` from `enc = isTokenAuth(auth) ? auth.token : auth.password` to `enc = auth.token`, dropping the `isTokenAuth` import. The value **must** remain `auth.token` so the LokiDB session/key cache encryption key does not change and existing token sessions continue to decrypt. **[User]**

**User Story**: As an internal engineer with an active token session, I want my local key cache to keep working after the upgrade, so that removing the password type does not silently invalidate my cached sessions.

**Acceptance Criteria**:

| ID | Criterion | Given | When | Then |
|----|-----------|-------|------|------|
| AC-6.1 | Stable encryption key | A token session exists | `getKeys`/`addKey` derive the cache encryption key | The key is `auth.token` (unchanged), and the local cache encrypts/decrypts successfully under that token session **[User]** |
| AC-6.2 | Type guard removed | `isTokenAuth.ts` is deleted | `tsc` build runs | Neither `getKeys.ts` nor `addKey.ts` imports `isTokenAuth`; both compile against the token-only `Auth` type **[User]** |

**Priority**: Must Have

**Goal**: Secondary-1

**Dependencies**: FR-1

---

### FR-7: Legacy `.netrc` migration and version/comms hygiene

**Description**: In `convertNetrcToIni.ts`, remove the password-migration branch (lines 30-36) while keeping the token migration (38-44). *(Low priority; legacy cleanup. A pre-existing bug at line 43 updates the wrong netrc key — see Open Questions.)* `ensureConfigured.ts` is functionally unaffected (no password import); optionally tidy the `developer.userid` "configured?" guard and its `ALKS_USERID` error text once userId state is gone. Ship the removal as a **major semver bump** with release notes, with comms aligned to the 2026-07-20 removal date. **[User]**

**User Story**: As an internal engineer upgrading the CLI, I want a clean major-version release with notes that explain the breaking basic-auth removal, so that I understand why my password flow stopped working.

**Acceptance Criteria**:

| ID | Criterion | Given | When | Then |
|----|-----------|-------|------|------|
| AC-7.1 | Netrc password branch removed | A legacy `.netrc` with an `alkscli` password is present | `convertNetrcToIni` runs | The password is not migrated; the `alksclitoken` token migration still works **[User]** |
| AC-7.2 | Release communicates the break | The removal is packaged | A release is cut | It is a major semver bump with release notes describing the basic-auth removal, aligned to the 2026-07-20 comms **[User]** |

**Priority**: Should Have

**Goal**: Secondary-3

**Dependencies**: FR-1, FR-5

---

## Non-Functional Requirements

### NFR-1: Security

**Category**: Security

**Description**: After removal, the CLI must not store, prompt for, transmit, or read a network password through any path (keystore, env var, flag, prompt, or credential_process). **[Inferred]**

**Metric**: Presence of password-handling code paths and stored secrets.

**Target**: Zero password-handling paths; keytar `alkspassword` entries no longer written; `ALKS_PASSWORD` no longer read.

**Verification**: Codebase grep sweep (AC-5.5) + manual confirmation that `developer configure`/`info` never surface a password.

---

### NFR-2: Backward Compatibility (Breaking Change)

**Category**: Compatibility

**Description**: This is an intentional breaking change. Anything using `ALKS_PASSWORD`, `-p/--password`, `alks developer login`, or a `credential_process` that emits a password breaks at upgrade. The break must be signaled, not silent. **[User]**

**Metric**: Semver classification and release-note coverage.

**Target**: Major version bump; release notes enumerate every removed input; directed errors on removed commands (FR-4).

**Verification**: Review release notes + confirm `developer login` returns a directed error rather than "unknown command".

---

### NFR-3: Reliability

**Category**: Reliability

**Description**: Token and credential-process users must see no regression — including local key-cache sessions and IAM commands. **[User]**

**Metric**: Regression test outcomes for token/credential-process flows and the cache-encryption landmine.

**Target**: `refresh-token` and `credential-process` work unchanged end-to-end; `getKeys`/`addKey` produce a stable key under a token session; test suite green.

**Verification**: Extend `getIamKey.test.ts`'s `{ token }` fixture and add a `getKeys`/`addKey` regression test (AC-6.1); full suite passes.

---

### NFR-4: Operability

**Category**: Operability

**Description**: Adoption of the token-only version must be observable so Phase 3 (Core endpoint removal) can be gated on CLI basic-auth traffic reaching zero. **[User]**

**Metric**: CLI-originated basic-auth authentications in Splunk (`cai_alks_prod`, `appName=alks`).

**Target**: < 1 CLI basic-auth request / 24h (from the ~5/24h baseline) by the Phase 3 go/no-go review; trending to 0 as the new version is adopted.

**Verification**: Post-deploy Splunk monitoring; confirm published `developer configure` shows the reduced choice set and `developer login` errors with guidance.

---

## Scope

### In Scope
- `alks-cli` only (Phase 2): remove `password` + `always-ask` auth types. **[User]**
- All password/userId helpers and state. **[User]**
- The `developer login`/`logout` password commands (login → directed error; logout → removed). **[User]**
- Password inputs: `-p/--password`, `-u/--username`, `ALKS_PASSWORD`, and `credential_process` password. **[User]**
- The `getKeys`/`addKey` cache-encryption landmine fix. **[User]**
- Update/remove affected tests. **[User]**

### Out of Scope
- ALKS Desktop (Phase 1). **[User]**
- ALKS Core basic-auth endpoint + LDAP (Phase 3). **[User]**
- `alks.js` `PasswordAuth` type (housekeeping). **[User]**
- Entra tile, ALKSWeb. **[User]**

### Constraints
- No ALKS Core change — token/credential-process only; Core already accepts bearer + STS. **[User]**
- No feature flag / phased runtime toggle in the CLI — removal ships in a version; adoption is gated by comms + the 2026-07-20 date. **[User]**
- Repo convention (`CLAUDE.md`): update `changelog.txt` before opening the PR. **[Codebase]**
- `getPasswordFromPrompt.ts` must be preserved (token-flow dependency). **[User]**
- The cache-encryption key must remain `auth.token` (no key rotation). **[User]**

### Assumptions
- All deleted password helpers have no token/credential-process importers (confirmed via full importer inventory). **[User]**
- CLI basic-auth traffic is already near-zero (~5 reqs/24h per the 2026-07-16 audit), so removal is low-risk. **[User]**
- Users pin versions via npm/Artifactory, so the removal only bites on upgrade. **[User]**

### Risks
| Risk | Impact | Probability | Mitigation |
|------|--------|-------------|------------|
| Automation using `ALKS_PASSWORD`/`-p`/`developer login`/password-emitting `credential_process` breaks at upgrade | Medium | Medium | Intended outcome; major semver bump + release notes + comms aligned to 2026-07-20; directed errors guide migration **[User]** |
| Adoption lag — users pin versions, so removal only bites on upgrade; basic auth persists until Phase 3 forces it | Medium | Medium | Splunk monitoring of decline; track whether a hard server-side cutoff (Phase 3/Core) is needed to force migration **[User]** |
| Landmine — cache-encryption ternary reaches the token path; a naive "delete password type" invalidates token sessions | High | Low (identified) | Fix to `enc = auth.token`; regression-guard with a `getKeys`/`addKey` test (FR-6, AC-6.1) **[User]** |
| Pre-existing `convertNetrcToIni` line-43 bug (updates the wrong netrc key) surfaces during cleanup | Low | Low | Note during FR-7; decide whether to fix now or defer (Open Question 3) **[User]** |

## Success Metrics

### Primary Metrics
| Metric | Current Baseline | Target | Measurement Method |
|--------|------------------|--------|-------------------|
| CLI-originated basic-auth authentications | ~5 reqs/24h (2026-07-16 audit) | Trend to 0 as new version adopted | Splunk `cai_alks_prod`, `appName=alks` **[User]** |
| Token / credential-process regressions post-release | 0 | 0 | Support tickets + post-deploy verification (getKeys, sessions, IAM commands) **[Inferred]** |

### Secondary Metrics
| Metric | Target | Measurement Method |
|--------|--------|-------------------|
| `developer configure` reduced choice set in published version | Only `refresh-token` + `credential-process` shown | Manual check of published version **[User]** |
| `developer login` directed error in published version | Errors with guidance to `login2fa` | Manual check of published version **[User]** |

## Dependencies

### External Systems
- ALKS Core (unchanged — accepts bearer/token + STS). **[User]**
- npm / Artifactory (distribution channel). **[Codebase]**
- Splunk (`cai_alks_prod`) for adoption monitoring. **[User]**

### Internal Dependencies
- Phase 3 (Core endpoint + LDAP removal) is gated on all basic-auth clients being off basic auth — this Phase 2 CLI removal is a prerequisite, but ships independently of Phase 1 (Desktop). **[User]**
- AJW decommission depends on the full three-phase removal. **[User]**

### Data Dependencies
- Legacy `.netrc` migration (`alkscli`/`alksclitoken`) — token migration retained, password migration removed. **[User]**

## Timeline Constraints

- **Public CLI removal date: Monday, 2026-07-20** (announced alongside the Desktop Client). **[User]**
- Independent of the Desktop removal — no code/runtime coupling; may ship in any order or in parallel. **[User]**
- Hard gate: all basic-auth consumers off basic auth **before** Phase 3 (Core endpoint removal). **[User]**

## Open Questions

> Questions that need stakeholder input before implementation

1. Confirm the release is cut as a **major semver bump** (input recommends this; needs owner sign-off). **[User]**
2. Is a **hard server-side cutoff** needed to force adoption, and how does its timing align with the 2026-07-20 date? (Server-side removal is Phase 3/Core — track separately.) **[User]**
3. Should the **pre-existing `convertNetrcToIni` line-43 bug** (updates the wrong netrc key) be fixed as part of this change or deferred? **[User]**

## Agent Decisions

> Decisions made by the agent during elicitation. Review these — they represent assumptions that may need validation.

| # | Decision | Context | Rationale | Affects |
|---|----------|---------|-----------|---------|
| 1 | Grouped the input spec's 16-step change list into 7 FRs | The input is a flat, file-by-file change list; specs need capability-level FRs | Grouped by capability (model, resolution, configure, commands, deletion surface, landmine, legacy/release) so each FR is independently testable and traceable | All FRs |
| 2 | Classified FR-7 (netrc + version/comms) as Should Have; all others Must Have | The input flags netrc cleanup as "low priority" and semver/comms as process, not code | Keeps the deletion-critical path at Must Have while not blocking release on legacy cleanup | FR-7 |
| 3 | Elevated NFRs (Security, Compatibility, Reliability, Operability) from material implied across the input's risks/test/post-deploy sections | The input did not label NFRs explicitly | The removal is a security + breaking-change + reliability event; making NFRs explicit aids planning and verification | NFR-1..4 |
