> 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-session02-server-backbone/tasks.md).

# Task Checklist

**Session ID**: `phase19-session02-server-backbone` **Total Tasks**: 20 **Estimated Duration**: 3-4 hours **Created**: 2026-06-26

***

## Progress Summary

| Metric          | Value    |
| --------------- | -------- |
| Tasks Completed | 20 / 20  |
| Remaining Tasks | 0        |
| Status          | Complete |

***

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

***

## Setup (3 tasks)

* [x] T001 \[S1902] Verify Session 01 command-center exports and server route conventions before implementation (`packages/protocol/src/orchestrationCommandCenter.ts`)
* [x] T002 \[S1902] Verify current server manager, route, validation, and WebSocket hydration patterns (`apps/server/src/routes/orchestration.ts`)
* [x] T003 \[S1902] Create the command-center manager file and exported constructor skeleton (`apps/server/src/managers/orchestrationCommandCenter.ts`)

***

## Foundation (6 tasks)

* [x] T004 \[S1902] Implement bounded command-center manager collections, counts, deterministic ordering, and compact snapshot helpers (`apps/server/src/managers/orchestrationCommandCenter.ts`)
* [x] T005 \[S1902] Implement shared command-center mutation metadata handling with expected revision checks and duplicate-trigger prevention while in-flight (`apps/server/src/managers/orchestrationCommandCenter.ts`)
* [x] T006 \[S1902] Implement capability and unavailable envelope helpers for non-ready executor families with explicit repair guidance (`apps/server/src/managers/orchestrationCommandCenter.ts`)
* [x] T007 \[S1902] \[P] Create route validation adapters for command-center queries, bodies, IDs, idempotency keys, and protocol parser failures with schema-validated input and explicit error mapping (`apps/server/src/lib/commandCenterValidation.ts`)
* [x] T008 \[S1902] \[P] Create compact event builders for every `command_center_*_update` family without raw prompt, command, file, terminal, token, provider, or path payloads (`apps/server/src/managers/orchestrationCommandCenter.ts`)
* [x] T009 \[S1902] Wire manager construction into server startup and dependency passing (`apps/server/src/server.ts`)

***

## Implementation (7 tasks)

* [x] T010 \[S1902] Create command-center REST route module with snapshot routes for capabilities, plans, tasks, attention, executors, heroes, executions, permissions, file intents, workpads, evidence, verification, handoffs, diagnostics, channels, usage, and notification readiness (`apps/server/src/routes/commandCenter.ts`)
* [x] T011 \[S1902] Add scaffold mutation routes for draft plans, tasks, attention items, permission decisions, execution unavailable results, review gates, handoffs, channel commands, and notification readiness with idempotency protection, transaction boundaries, and compensation on failure (`apps/server/src/routes/commandCenter.ts`)
* [x] T012 \[S1902] Add shared route mutation wrapper that rejects duplicate in-flight triggers and emits compact command-center events on accepted mutations (`apps/server/src/routes/commandCenter.ts`)
* [x] T013 \[S1902] Mount command-center routes at root and `/api` through the existing local API route registration (`apps/server/src/server.ts`)
* [x] T014 \[S1902] Add command-center WebSocket hydration frames in deterministic order with explicit loading-empty-safe compact state (`apps/server/src/ws/handlers.ts`)
* [x] T015 \[S1902] Extend local orchestration diagnostics with command-center scaffold availability and bounded counts without raw state payloads (`apps/server/src/lib/orchestrationDiagnostics.ts`)
* [x] T016 \[S1902] Update server and API docs to distinguish scaffolded command-center capability from implemented execution (`apps/server/README_server.md`, `docs/api/README_api.md`, `docs/api/event-api-hook-contracts.md`)

***

## Testing (4 tasks)

* [x] T017 \[S1902] \[P] Write manager unit tests for idempotency, stale revisions, unavailable capabilities, cleanup, counts, ordering, and compact event entries (`apps/server/tests/commandCenterManager.test.ts`)
* [x] T018 \[S1902] \[P] Write route tests for snapshot routes, scaffold mutations, validation failures, duplicate in-flight handling, stale revisions, event emission, `/api` prefix parity, and capability-error responses (`apps/server/tests/commandCenterRoutes.test.ts`)
* [x] T019 \[S1902] \[P] Extend diagnostics and WebSocket tests for command-center availability, hydration order, mutation events, and no raw sensitive fields (`apps/server/tests/orchestrationDiagnostics.test.ts`, `apps/server/tests/websocket.test.ts`)
* [x] T020 \[S1902] Run focused server checks: `npm --workspace apps/server run typecheck`, focused Vitest targets for command-center/orchestration/guarded-action/WebSocket coverage, and `git diff --check -- apps/server docs/api` (`apps/server/package.json`)

***

## 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 implementation changes before validation

***

## 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-session02-server-backbone/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.
