> 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/prd/prd-backup-20260529-022057.md).

# FactionOS - Product Requirements Document

## Overview

FactionOS is a local-first observability and orchestration layer for AI coding command-line tools. It turns local agent sessions, prompts, tool calls, plans, approvals, file touches, summaries, and outcomes into a real-time browser cockpit with a live roster, mission history, battlefield visualization, analytics overlays, notifications, replay, exports, and optional collaboration surfaces.

This starter PRD was created by initspec. The current historical source material remains in `docs/PRD.md` and `docs/PRD_UX.md` until the spec workflow rebuild imports or replaces it.

## Goals

1. Preserve the local-first FactionOS runtime and optional-service boundaries.
2. Rebuild implementation planning around the Apex Spec workflow.
3. Keep product, security, media, and release requirements traceable to stable docs, tests, and session specs.

## Phases

| Phase | Name       | Sessions | Status      |
| ----- | ---------- | -------- | ----------- |
| 00    | Foundation | TBD      | Not Started |

## Phase 00: Foundation

### Objectives

1. Establish the `.spec_system/` planning structure for future sessions.
2. Import authoritative product and UX requirements into the workflow.

### Sessions (To Be Defined)

Use plansession to get recommendations for sessions to implement.

## Technical Stack

* Node.js 20+
* npm workspaces
* TypeScript and JavaScript ESM
* React 18, Vite, Tailwind, and Zustand
* Express and ws
* Cloudflare Worker and Durable Objects for optional War Room relay
* Vitest, Playwright, Biome, and GitHub Actions

## Success Criteria

* [ ] Requirements in `docs/PRD.md` are represented in `.spec_system/PRD/PRD.md`.
* [ ] UX requirements in `docs/PRD_UX.md` are represented in `.spec_system/PRD/PRD_UX.md` or session specs.
* [ ] Phase sessions are scoped to 2-4 hour implementation chunks with 12-25 tasks each.
* [ ] Security, privacy, media provenance, and release gates remain explicit in planning artifacts.


---

# 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/prd/prd-backup-20260529-022057.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.
