> 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/phase19-session07-provider-diagnostics/tasks.md).

# Task Checklist

**Session ID**: `phase19-session07-provider-diagnostics` **Total Tasks**: 22 **Estimated Duration**: 3-4 hours **Created**: 2026-06-26

***

## Progress Summary

| Metric              | Value   |
| ------------------- | ------- |
| Tasks Completed     | 22 / 22 |
| Estimated Remaining | 0       |
| Blockers            | 0       |

***

Legend: `[x]` completed; `[ ]` pending; `[P]` parallelizable; `[SNNMM]` session ref; `TNNN` task ID.

***

## Setup (3 tasks)

* [x] T001 \[S1907] Verify completed prerequisite artifacts and current diagnostics, provider posture, executor registry, and web command-center surfaces (`.spec_system/specs/phase19-session06-executor-registry/validation.md`)
* [x] T002 \[S1907] \[P] Create provider diagnostics protocol test scaffold for snapshots, disabled reasons, redacted env labels, recovery requests, compact errors, and blocked payload rejection (`packages/protocol/tests/providerDiagnostics.test.ts`)
* [x] T003 \[S1907] \[P] Create server, CLI, and web diagnostics test scaffolds for provider readiness, route aliases, CLI formatting, recovery states, setup task actions, and product-facing UI (`apps/server/tests/providerDiagnostics.test.ts`, `apps/cli/tests/providerDiagnostics.test.js`, `apps/web/tests/DiagnosticsRecoveryPanel.test.tsx`)

***

## Foundation (5 tasks)

* [x] T004 \[S1907] Add shared provider/setup/runtime diagnostics contracts, status vocabularies, recovery action shapes, parser helpers, and blocked payload guards with schema-validated input and explicit error mapping (`packages/protocol/src/providerDiagnostics.ts`)
* [x] T005 \[S1907] Export provider diagnostics contracts and parser fixtures through the protocol package without changing unrelated command-center contracts (`packages/protocol/src/index.ts`)
* [x] T006 \[S1907] Create the server diagnostics manager with injectable filesystem, environment, process, service, queue, template, graph, guarded-action, command-center, and isolation probes with cleanup on scope exit for all acquired resources (`apps/server/src/managers/diagnosticsManager.ts`)
* [x] T007 \[S1907] Implement narrow recovery primitives for stale listener PID and malformed spool cleanup plus exact-command recovery descriptors with idempotency protection and explicit no-erasure boundaries (`apps/server/src/managers/diagnosticsManager.ts`)
* [x] T008 \[S1907] Add command-center helper methods for replacing diagnostics-manager records and refreshing provider diagnostic capabilities with deterministic ordering (`apps/server/src/managers/orchestrationCommandCenter.ts`)

***

## Implementation (9 tasks)

* [x] T009 \[S1907] Implement Claude Code, Codex, OpenCode, Cursor, Bedrock, and Vertex provider readiness probes for install status, hook status, model list availability, permission mode, plan mode, fork, handoff, isolation, IDE/open-file metadata, disabled reasons, and repair commands without external transfer (`apps/server/src/managers/diagnosticsManager.ts`)
* [x] T010 \[S1907] Implement setup readiness probes for setup docs, package manager, install/dev/test commands, env examples, scan roots, and running local services with env-name-only reporting and no raw values (`apps/server/src/managers/diagnosticsManager.ts`)
* [x] T011 \[S1907] Implement orchestration health aggregation for server connection, listener PID health, spool health, queue capacity, template availability, graph degradation, guarded-action expiry, provider readiness, and isolation posture (`apps/server/src/managers/diagnosticsManager.ts`)
* [x] T012 \[S1907] Add `GET /diagnostics/provider-readiness` and `POST /diagnostics/orchestration/recover` route handlers with root plus `/api` aliases, local auth inheritance, schema-validated input, compact errors, and duplicate-trigger prevention while in-flight (`apps/server/src/routes/diagnostics.ts`)
* [x] T013 \[S1907] Wire the diagnostics manager into server construction and update orchestration diagnostics with provider/setup counts and recovery availability without raw probe payloads (`apps/server/src/server.ts`, `apps/server/src/lib/orchestrationDiagnostics.ts`)
* [x] T014 \[S1907] Add CLI provider diagnostics fetch, compacting, and formatting helpers with loopback-only requests, bearer auth, timeout handling, malformed-response handling, and redacted error output (`apps/cli/src/lib/providerDiagnostics.js`, `apps/cli/src/lib/orchestrationDiagnostics.js`)
* [x] T015 \[S1907] Show provider/setup readiness, disabled reasons, safe recovery results, and exact operator commands in `status` and `doctor` while preserving current lifecycle and hosted-operation output (`apps/cli/src/commands/status.js`, `apps/cli/src/commands/doctor.js`)
* [x] T016 \[S1907] Add web API helpers for provider diagnostics fetches, recovery POSTs, and setup task creation with timeout, offline, malformed-response, duplicate-trigger, and redacted error handling (`apps/web/src/lib/orchestrationApi.ts`)
* [x] T017 \[S1907] Add provider matrix, setup readiness, runtime health, recovery action, diagnostics summary, and blocked-payload filtering helpers for broad UI records (`apps/web/src/lib/commandCenterUi.ts`)

***

## Integration (3 tasks)

* [x] T018 \[S1907] Create the provider capability matrix and diagnostics recovery panel with explicit loading, empty, error, offline, degraded, unavailable, command-only repair, and recovery-success states (`apps/web/src/components/orchestration/ProviderCapabilityMatrix.tsx`, `apps/web/src/components/orchestration/DiagnosticsRecoveryPanel.tsx`)
* [x] T019 \[S1907] Wire the Diagnostics tab, compact header summary, recovery callbacks, and setup task action into the orchestration command-center shell with platform-appropriate accessibility labels, focus management, and input support (`apps/web/src/components/orchestration/CommandCenterPanes.tsx`, `apps/web/src/components/orchestration/OrchestrationHeader.tsx`)
* [x] T020 \[S1907] Export provider diagnostics components and ensure panel re-entry resets stale selected, recovery, and setup-task state (`apps/web/src/components/orchestration/index.ts`, `apps/web/src/components/orchestration/OrchestrationDrawer.tsx`)

***

## Testing And Documentation (2 tasks)

* [x] T021 \[S1907] Update focused protocol, server, CLI, web API, store, UI helper, component, and Orchestration panel tests for valid readiness, disabled reasons, route aliases, auth, recovery guards, idempotency, redaction, malformed payloads, duplicate triggers, setup task creation, keyboard access, and focus behavior (`packages/protocol/tests/providerDiagnostics.test.ts`, `apps/server/tests/providerDiagnostics.test.ts`, `apps/server/tests/orchestrationDiagnostics.test.ts`, `apps/server/tests/routes.test.ts`, `apps/cli/tests/providerDiagnostics.test.js`, `apps/cli/tests/orchestrationDiagnostics.test.js`, `apps/cli/tests/cliRuntime.test.js`, `apps/web/tests/orchestrationApi.test.ts`, `apps/web/tests/commandCenterUi.test.ts`, `apps/web/tests/commandCenterStore.test.ts`, `apps/web/tests/DiagnosticsRecoveryPanel.test.tsx`, `apps/web/tests/OrchestrationPanel.test.tsx`)
* [x] T022 \[S1907] Update API and package docs, then run protocol/server/web typecheck, focused tests, lint, format check, diff check, and ASCII/LF validation (`docs/api/README_api.md`, `docs/api/event-api-hook-contracts.md`, `apps/server/README_server.md`, `apps/cli/README_cli.md`, `apps/web/README_web.md`, `npm --workspace packages/protocol run typecheck`, `npm --workspace apps/server run typecheck`, `npm --workspace apps/web run typecheck`, `npm run lint`, `npm run format:check`, `git diff --check`)

***

## Completion Checklist

* [x] All tasks marked `[x]`
* [x] All tests and checks passing
* [x] All files ASCII-encoded with LF line endings
* [x] implementation-notes.md updated
* [x] Ready for `creview` to review and repair uncommitted implementation changes

***

## Next Steps

Run the `creview` workflow step.


---

# 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/phase19-session07-provider-diagnostics/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.
