# CLI-049 Tasks — Startup command restoration

Spec: `.agents/spec-docs/active/CLI-049-startup-command-restoration.md`

- [x] T1 (TC-02): restore `src/startup/diagnose-command.ts` with `IDiagnoseContext`, ITerminalOutput injection, 6 checks + unit tests
- [x] T2 (TC-01): wire `robota init` positional dispatch in cli.ts after `buildCommandSetup()` with `onProviderSetup` inline provider setup
- [x] T3 (TC-02): wire `robota diagnose` positional dispatch in cli.ts before provider setup
- [x] T4 (TC-03): inject ITerminalOutput into `first-run.ts`, wire first-run welcome + markOnboarded in TUI path + unit tests
- [x] T5 (TC-04): inject ITerminalOutput into `terminal-check.ts`, wire warning in TUI path + unit tests (duplicate unconditional warning removed from `bin/robota.cjs` — warning now TUI-path only)
- [x] T6 (TC-05): SPEC.md sync — removed preflight/args-to-options/config-phase/provider-setup/session-setup/update-notice stale rows, documented cli.ts dispatch list, fixed --system-prompt note, fixed Class Contract Registry and Type Ownership rows
- [x] T7 (TC-06): build green, typecheck 0 errors, lint 0 errors (28 pre-existing warnings), 93/93 tests pass; also fixed broken build script (`@robota-sdk/agent-web` → `@robota-sdk/agent-web-ui` rename fallout in package.json build + copy-web-assets.mjs)
- [x] T8: 14 audit backlog files + README index committed in this PR; user-execution evidence recorded in backlog files CLI-049/050/051/052/056
