> For the complete documentation index, see [llms.txt](https://faction-os.gitbook.io/faction-os-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://faction-os.gitbook.io/faction-os-docs/.spec_system/archive/sessions/phase10-session01-cli-provider-selection-and-installer-split/tasks.md).

# Task Checklist

**Session ID**: `phase10-session01-cli-provider-selection-and-installer-split` **Total Tasks**: 20 **Estimated Duration**: 3-4 hours **Created**: 2026-05-31

***

## Legend

* `[x]` = Completed
* `[ ]` = Pending
* `[P]` = Parallelizable (can run with other \[P] tasks)
* `[SNNMM]` = Session reference (NN=phase number, MM=session number)
* `TNNN` = Task ID

***

## Progress Summary

| Category       | Total  | Done   | Remaining |
| -------------- | ------ | ------ | --------- |
| Setup          | 3      | 3      | 0         |
| Foundation     | 5      | 5      | 0         |
| Implementation | 8      | 8      | 0         |
| Testing        | 4      | 4      | 0         |
| **Total**      | **20** | **20** | **0**     |

***

## Setup (3 tasks)

Initial context, source verification, and parser test scaffolding.

### apps/cli

* [x] T001 \[S1001] Verify Phase 10 prerequisites, CLI command surface, and existing help/install touch points before changing provider routing (`apps/cli/README_cli.md`)
* [x] T003 \[S1001] \[P] Create provider parser test scaffold for defaults, `claude`, `codex`, `all`, aliases, and invalid provider inputs (`apps/cli/tests/cliProvider.test.js`)

### apps/hooks

* [x] T002 \[S1001] Review Claude installer regression behavior and current Codex map readiness boundaries before splitting CLI installer routing (`apps/hooks/tests/installScripts.test.js`)

***

## Foundation (5 tasks)

Shared provider helpers and provider-specific install boundaries.

### apps/cli

* [x] T004 \[S1001] \[P] Create provider selection helper with defaulting, `all` expansion, schema-validated flag input, and explicit error mapping (`apps/cli/src/lib/cliProvider.js`)
* [x] T005 \[S1001] \[P] Create compact provider posture helper for Claude and deferred Codex diagnostics without raw hook command bodies (`apps/cli/src/lib/providerPosture.js`)
* [x] T006 \[S1001] Extract Claude install behavior into a provider installer with backup-first writes, idempotency protection, transaction boundaries, and compensation on failure (`apps/cli/src/installers/claude.js`)
* [x] T007 \[S1001] \[P] Create deferred Codex installer and uninstaller boundary that validates selection without mutating Codex auth, provider, telemetry, model, profile, or hooks files (`apps/cli/src/installers/codex.js`)
* [x] T008 \[S1001] Wire init/install provider dispatch for Claude, Codex, and all providers with duplicate-trigger prevention while in-flight and deterministic partial-result handling (`apps/cli/src/commands/init.js`)

***

## Implementation (8 tasks)

Provider-aware command wiring, docs, and no-regression assertions.

### apps/cli

* [x] T009 \[S1001] Update top-level CLI help and command dispatch for `--cli claude|codex|all`, install alias examples, and compact invalid-provider errors (`apps/cli/src/index.js`)
* [x] T010 \[S1001] Update uninstall command to route Claude, Codex, and all providers with idempotency protection, backup restore preservation, and no broad `~/.factionos` deletion (`apps/cli/src/commands/uninstall.js`)
* [x] T011 \[S1001] Update status command to accept provider filters and print explicit Claude/Codex loading, absent, malformed, deferred, and error states without raw command bodies (`apps/cli/src/commands/status.js`)
* [x] T012 \[S1001] Update doctor command to accept provider filters and report provider-specific posture with explicit error mapping and no raw settings, env values, paths, or hook commands (`apps/cli/src/commands/doctor.js`)
* [x] T013 \[S1001] Add CLI runtime coverage for default Claude, explicit Claude, Codex deferred, all provider routing, install alias behavior, and invalid provider failures before mutation (`apps/cli/tests/cliRuntime.test.js`)
* [x] T016 \[S1001] Update CLI README command docs for provider selection, backward-compatible default Claude behavior, deferred Codex mutation, and no custom slash command claims (`apps/cli/README_cli.md`)

### apps/hooks

* [x] T014 \[S1001] Preserve hook installer regression assertions for Claude backup, merge, malformed settings, reinstall, and uninstall behavior after the CLI installer split (`apps/hooks/tests/installScripts.test.js`)
* [x] T015 \[S1001] Update hooks README to clarify Codex hook map readiness, Session 02 installer handoff, and no current user-level Codex hook writes (`apps/hooks/README_hooks.md`)

***

## Testing (4 tasks)

Focused validation and quality gates.

### apps/cli

* [x] T017 \[S1001] Run focused provider and CLI runtime tests, then resolve failures without broadening provider scope (`apps/cli/tests/cliProvider.test.js`)
* [x] T018 \[S1001] Run focused Biome check for touched CLI files and fix formatting or lint findings (`apps/cli/src/index.js`)

### apps/hooks

* [x] T019 \[S1001] Run focused hook installer regression tests and focused Biome check for touched hook docs/tests (`apps/hooks/tests/installScripts.test.js`)

### .spec\_system

* [x] T020 \[S1001] Validate ASCII/LF hygiene, run `git diff --check`, and initialize implementation notes for session handoff (`.spec_system/specs/phase10-session01-cli-provider-selection-and-installer-split/implementation-notes.md`)

***

## Completion Checklist

Before marking session complete:

* [x] All tasks marked `[x]`
* [x] All tests passing
* [x] All files ASCII-encoded
* [x] implementation-notes.md updated
* [x] Ready for the validate workflow step

***

## Next Steps

Run the implement workflow step to begin AI-led implementation.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://faction-os.gitbook.io/faction-os-docs/.spec_system/archive/sessions/phase10-session01-cli-provider-selection-and-installer-split/tasks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
