> 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/phase06-session01-collaboration-requirements-and-safety-baseline/spec.md).

# Session Specification

**Session ID**: `phase06-session01-collaboration-requirements-and-safety-baseline` **Phase**: 06 - Collaboration, Isolation, and Mobile **Status**: Not Started **Created**: 2026-05-30 **Package**: Cross-cutting **Package Stack**: Markdown PRD/docs, TypeScript source review across apps/warroom, apps/web, apps/server, apps/cli, apps/hooks, and packages/protocol

***

## 1. Session Overview

This session creates the source-backed Phase 06 collaboration, isolation, mobile, participant trust, redaction, and accessibility baseline before implementation begins. Phase 05 shipped optional Worker-backed War Room lifecycle, approval, presence, reconnect, catch-up, and redacted federation. Phase 06 needs a broader requirements baseline so later implementation sessions do not blur optional collaboration, local-only cockpit state, future hosted services, or unavailable execution.

The work is intentionally documentation-first and cross-cutting. It audits Phase 05 closeout evidence, current Worker and web room behavior, local orchestration controls, server diagnostics, CLI and hook diagnostics, package README files, stable docs, PRD sources, UX requirements, and current test coverage. It then records the collaboration boundary, participant authority requirements, isolation and sandbox constraints, mobile acceptance criteria, and requirement ownership for Sessions 02 through 07.

The session must preserve FactionOS' local-first posture. Optional Worker rooms remain external transfer, hosted identity and analytics remain deferred, the local server remains the loopback runtime and `/warroom` compatibility/status stub, and file, git, terminal, Docker, remote, and hosted execution remain unavailable until a later approved threat model adds authorization, audit, redaction, tests, rollback, and documentation.

***

## 2. Objectives

1. Create a source-backed Phase 06 requirements and safety baseline from PRD, UX PRD, Phase 05 closeout, security posture, current docs, package README files, tests, and source evidence.
2. Define collaboration, participant authority, redaction, isolation, sandbox, mobile, accessibility, and local-first boundaries before implementation sessions change contracts or UI.
3. Create a requirement-to-session routing matrix that assigns every Phase 06 requirement to Sessions 02 through 07 or an explicit Phase 07/08 deferral.
4. Update stable docs and package README guidance where current Phase 06 scope, hosted-service deferrals, unavailable execution, mobile validation, or trusted-erasure wording is vague or stale.

***

## 3. Prerequisites

### Required Sessions

* [x] `phase05-session07-war-room-validation-and-documentation-closeout` - provides optional Worker integration closeout, local browser evidence, docs handoff, and residual hosted identity, erasure, and hosted validation findings.
* [x] `phase05-session05-federation-event-redaction-and-cockpit-integration` - provides current allowlisted redacted federation behavior and blocked-field expectations.
* [x] `phase03-session07-orchestration-validation-and-documentation-closeout` - provides local orchestration boundaries, non-executing guarded actions, diagnostics posture, and redaction lessons.
* [x] `phase02-session07-product-surface-validation-and-documentation-closeout` - provides current cockpit shell, responsive, accessibility, and honest capability wording baselines.

### Required Tools/Knowledge

* Node 20+, npm workspaces, Biome, Vitest, Playwright, TypeScript, React 18, Vite, Cloudflare Worker and Durable Object concepts, and current local-server diagnostics behavior.
* Current source and docs: `.spec_system/PRD/PRD.md`, `.spec_system/PRD/PRD_UX.md`, `.spec_system/PRD/phase_06/PRD_phase_06.md`, `.spec_system/SECURITY-COMPLIANCE.md`, `.spec_system/CONSIDERATIONS.md`, `docs/ARCHITECTURE.md`, `docs/api/event-api-hook-contracts.md`, `docs/privacy-and-security.md`, `docs/deployment.md`, `docs/environments.md`, `docs/hosted-services.md`, `docs/release.md`, `docs/runbooks/war-room-operations.md`, package README files, and relevant tests.
* Current package boundaries: `packages/protocol` owns shared contracts, `apps/warroom` owns the optional Worker relay, `apps/web` owns cockpit collaboration UX, `apps/server` owns the loopback local runtime and diagnostics, and `apps/cli` plus `apps/hooks` own local lifecycle and hook diagnostics.

### Environment Requirements

* Local checkout of the FactionOS monorepo with Phase 06 session stubs available.
* No Cloudflare credentials, hosted account, hosted storage, analytics account, Docker runtime, remote runner, media provider key, or external transfer is required.
* Stable docs are treated as the current contract; archived PRDs, `docs/PROGRESS.md`, and `EXAMPLES/` remain traceability evidence only.

***

## 4. Scope

### In Scope (MVP)

* Maintainers can identify current collaboration source evidence - audit Phase 05 closeout artifacts, Worker contracts, web room state, server diagnostics, local orchestration controls, CLI/hook diagnostics, stable docs, package README files, and current tests.
* Implementers can distinguish optional Worker collaboration from local-only cockpit workflows, shared context, future hosted services, and excluded remote execution - define collaboration boundaries and deferrals.
* Later sessions can implement participant trust consistently - define role, leader, participant, duplicate-action, reconnect, stale-approval, and room-authority requirements.
* Collaboration payloads remain safe by design - define allowlisted, compact, redacted, sender-aware, bounded catch-up behavior and blocked payload categories.
* Isolation work has explicit boundaries - define future executor threat-model, consent, audit, unavailable-state, diagnostic, and redaction requirements while preserving current non-executing behavior.
* Mobile and accessibility work has testable acceptance criteria - define reachability, focus return, keyboard, pointer, screen-reader, reduced-motion, text-fit, and no-overlap expectations.
* Later sessions have stable ownership - create a routing matrix for room authority, collaboration events, cockpit UX, isolation diagnostics, mobile hardening, validation, and Phase 07/08 deferrals.
* Stable docs distinguish Phase 06 scope from hosted services, analytics, public replay hosting, remote execution, Docker execution, trusted erasure, and release hardening.

### Out of Scope (Deferred)

* Implementing room authority changes - *Reason: Session 02 owns protocol, Worker, web, and tests for authority contracts.*
* Implementing new collaboration event types - *Reason: Session 03 owns shared event contracts, Worker catch-up, web state separation, and blocked-field tests.*
* Reworking cockpit collaboration UI or mobile layout beyond documentation or narrowly required baseline wording - *Reason: Sessions 04 and 06 own UI implementation and browser evidence.*
* Adding isolation diagnostics or executor contracts in code - *Reason: Session 05 owns sandbox posture contracts, server/CLI diagnostics, and no-mutation tests.*
* Adding hosted accounts, hosted storage, analytics, public replay hosting, production-hosted validation, inbound commands, remote execution, Docker execution, media transfer, or trusted unified erasure - *Reason: Phase 07 and Phase 08 own these surfaces and require separate threat models and release gates.*

***

## 5. Technical Approach

### Architecture

This session uses documentation-as-contract. Source files, tests, stable docs, package README files, Phase 05 closeout evidence, security posture, and Phase 06 stubs are treated as input evidence. The created baseline artifacts become the handoff for Sessions 02 through 07.

Protocol ownership leads cross-package collaboration work. Shared room, participant, authority, role, collaboration event, safe-frame, blocked-field, isolation posture, unavailable execution, and diagnostic contracts should start in `packages/protocol` before `apps/warroom`, `apps/web`, `apps/server`, `apps/cli`, or `apps/hooks` consume them.

The Worker remains the optional room relay. The local Express server remains the loopback runtime and `/warroom` compatibility/status stub, not a Worker proxy or hosted collaboration backend. Isolation work defines capabilities, unavailable states, consent, audit, rollback, diagnostics, and redaction before any executor exists. The web cockpit owns the user-facing collaboration and mobile experience while remote context stays separate from local source-of-truth state.

### Design Patterns

* Protocol-led contracts: shared collaboration and isolation shapes should be defined once before app-specific implementation.
* Local-first optional federation: core cockpit workflows must degrade cleanly when Worker, hosted services, public tokens, provider credentials, and analytics are absent.
* Boundary-specific redaction: Worker payloads, catch-up, diagnostics, replay, export, archive, adapter, backup, log, and future hosted-transfer paths need explicit minimization.
* Deterministic ownership routing: every Phase 06 requirement should name the owning session or a later-phase deferral.
* Honest capability wording: docs and UI copy must distinguish shipped behavior, unavailable behavior, planned work, and deferred hosted surfaces.

### Technology Stack

* Markdown PRD, docs, README, routing matrix, safety baseline, and mobile/accessibility checklist artifacts.
* TypeScript contracts in `packages/protocol`.
* Cloudflare Worker, Durable Objects, WebSocket, Wrangler, and Worker tests in `apps/warroom`.
* React 18, Vite, TypeScript, Tailwind, Zustand, browser fetch/WebSocket/localStorage APIs, Testing Library, and Playwright in `apps/web`.
* Express, WebSocket, local orchestration managers, diagnostics, explicit unsupported-route envelopes, and Vitest in `apps/server`.
* Node CLI and dependency-light hook diagnostics in `apps/cli` and `apps/hooks`.
* Validation tools: `rg`, `npm run format:check`, `npm run lint`, workspace typecheck where needed, `git diff --check`, ASCII/LF scans, and link/path review.

***

## 6. Deliverables

### Files to Create

| File                                                                     | Purpose                                                                                                               | Est. Lines |
| ------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- | ---------- |
| `.spec_system/PRD/phase_06/collaboration_isolation_safety_baseline.md`   | Source-backed collaboration, participant authority, redaction, isolation, sandbox, local-first, and deferral baseline | \~190      |
| `.spec_system/PRD/phase_06/phase06_requirement_routing_matrix.md`        | Requirement-to-session routing matrix for Sessions 02-07 and Phase 07/08 deferrals                                    | \~150      |
| `.spec_system/PRD/phase_06/mobile_accessibility_acceptance_checklist.md` | Mobile, keyboard, pointer, screen-reader, focus, reduced-motion, text-fit, and no-overlap acceptance checklist        | \~120      |

### Files to Modify

| File                                        | Changes                                                                                                                                  | Est. Lines |
| ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------- |
| `.spec_system/PRD/PRD.md`                   | Link Phase 06 baseline artifacts and clarify collaboration, isolation, mobile, hosted, and erasure boundaries                            | \~35       |
| `.spec_system/PRD/PRD_UX.md`                | Add Phase 06 collaboration, remote context, mobile, focus, reduced-motion, and no-overlap acceptance requirements                        | \~35       |
| `.spec_system/PRD/phase_06/PRD_phase_06.md` | Link Session 01 outputs and align later-session ownership with the routing matrix                                                        | \~35       |
| `docs/ARCHITECTURE.md`                      | Clarify optional Worker relay, local-server separation, protocol-led collaboration contracts, and unavailable executor boundary          | \~30       |
| `docs/api/event-api-hook-contracts.md`      | Clarify `/warroom` stub, Worker route vocabulary, collaboration contract ownership, diagnostics, and unavailable execution envelopes     | \~30       |
| `docs/privacy-and-security.md`              | Record Phase 06 collaboration transfer boundaries, blocked payloads, hosted identity deferral, and trusted-erasure deferral              | \~35       |
| `docs/deployment.md`                        | Clarify optional Worker deployment, local-only fallback, custom-domain posture, and non-required hosted credentials                      | \~20       |
| `docs/environments.md`                      | Clarify local, Worker, hosted-service, analytics, and future execution environment boundaries                                            | \~20       |
| `docs/hosted-services.md`                   | Keep hosted auth, storage, analytics, public replay hosting, and hosted validation separate from Phase 06 local-first collaboration work | \~20       |
| `docs/release.md`                           | Preserve release-hardening, production-hosted validation, mobile certification, trusted-erasure, and decommission gates as later work    | \~20       |
| `docs/runbooks/war-room-operations.md`      | Align War Room operational language with optional Worker transfer, local-only fallback, and non-erasure leave/reset behavior             | \~20       |
| `apps/warroom/README_warroom.md`            | Clarify authority, role, catch-up, blocked-payload, and non-hosted identity requirements for later sessions                              | \~25       |
| `apps/web/README_web.md`                    | Clarify remote context, local-only fallback, collaboration UX, mobile, accessibility, and duplicate-action expectations                  | \~25       |
| `apps/server/README_server.md`              | Preserve local `/warroom` compatibility/status stub and non-proxy/non-executor boundary                                                  | \~15       |
| `apps/cli/README_cli.md`                    | Clarify diagnostics and recovery boundaries without trusted erasure or executor claims                                                   | \~15       |
| `apps/hooks/README_hooks.md`                | Clarify hook diagnostics and future executor signal boundaries without raw payload leakage                                               | \~15       |
| `packages/protocol/README_protocol.md`      | Clarify protocol ownership for authority, collaboration events, isolation posture, unavailable execution, and blocked-field contracts    | \~25       |

***

## 7. Success Criteria

### Functional Requirements

* [ ] Phase 06 requirements and safety baseline exists and cites current PRD, UX PRD, Phase 05 closeout, Worker, web, protocol, server, CLI, hook, docs, README, and test evidence.
* [ ] Collaboration boundaries distinguish optional Worker rooms, local-only cockpit workflows, safe shared context, future hosted services, and excluded remote execution.
* [ ] Participant authority, role, duplicate-action, stale-approval, reconnect, disconnect, leave, and room-trust requirements are explicit for later implementation.
* [ ] Redaction baseline blocks prompts, file contents, command bodies, terminal output, transcripts, secrets, broad paths, exports, replay buffers, scans, media drafts, diagnostics, logs, backups, and quarantined historical content from shared collaboration payloads.
* [ ] Isolation and sandbox requirements define future executor threat model, consent, audit, unavailable states, diagnostics, redaction, rollback, and no-mutation expectations.
* [ ] Mobile and accessibility checklist defines supported viewport, keyboard, pointer, screen-reader, focus return, reduced-motion, text-fit, and no-overlap acceptance criteria.
* [ ] Routing matrix assigns every Phase 06 requirement to Sessions 02 through 07 or an explicit Phase 07/08 deferral.
* [ ] Stable docs and package README files distinguish Phase 06 work from hosted accounts, hosted storage, analytics, public replay hosting, remote execution, Docker execution, production-hosted validation, mobile certification, and trusted erasure.

### Testing Requirements

* [ ] Documentation path and link references reviewed for changed files.
* [ ] Consistency scan completed for collaboration state names, authority vocabulary, blocked payload categories, optional Worker wording, local-server stub wording, unavailable executor wording, mobile acceptance terms, and baseline links.
* [ ] No app tests are required unless implementation changes code; if code changes are needed, focused package tests are run.
* [ ] ASCII/LF checks completed for all session outputs and touched docs.
* [ ] `git diff --check` completed.

### Non-Functional Requirements

* [ ] Core FactionOS operation remains local-first and does not require Cloudflare, hosted auth, hosted storage, analytics, public replay hosting, Docker, remote runners, media providers, or external transfer.
* [ ] Worker collaboration is documented as optional external transfer with compact allowlisted payloads only.
* [ ] Current execution surfaces remain non-executing and unavailable unless a later approved threat model changes that boundary.
* [ ] Hosted identity, trusted unified erasure, production-hosted validation, analytics, and release decommission remain explicitly tracked as future work.

### Quality Gates

* [ ] All files ASCII-encoded.
* [ ] Unix LF line endings.
* [ ] Code and docs follow project conventions.

***

## 8. Implementation Notes

### Key Considerations

* Session 01 is a requirements and documentation baseline, not a Worker, web, server, CLI, hook, or protocol implementation session.
* The baseline should route every requirement to the smallest later session that owns it.
* Worker federation remains optional external transfer; the local server remains a compatibility/status stub and must not become a Worker proxy.
* Remote context must remain visually and contractually separate from local hero, mission, queue, guarded-action, replay, export, notification, settings, adapter, and diagnostic source-of-truth state.
* Redaction must be described per boundary. Local exports, replay buffers, archives, diagnostics, logs, backups, and future hosted surfaces are not automatically share-safe because Worker frames are redacted.
* Stable docs are the current contract; archived PRDs, `docs/PROGRESS.md`, and `EXAMPLES/` are evidence only.

### Potential Challenges

* Scope bleed into authority contracts: record the model and required outcomes, but leave protocol, Worker, web, and tests for Session 02.
* Scope bleed into collaboration events: define safe categories and blocked payloads, but leave implementation for Session 03.
* Scope bleed into UI/mobile work: define acceptance criteria and stale wording fixes, but leave cockpit controls, layout fixes, and browser evidence for Sessions 04 and 06.
* Isolation ambiguity: docs must not imply file, git, terminal, Docker, remote, or hosted commands can execute today.
* Erasure ambiguity: leave/reset, diagnostics cleanup, browser storage reset, and narrow recovery are not trusted unified erasure.
* Existing uncommitted Phase 06 state files must be preserved while adding only the planned session artifacts and state transition required by `plansession`.

### Relevant Considerations

* \[P05] **Unified erasure still missing**: Do not claim trusted deletion for Worker storage, browser hints, archives, memory, settings, replay, exports, diagnostics, logs, backups, valid spool state, or future hosted surfaces.
* \[P03] **Real executors remain unimplemented by design**: File, git, terminal, remote, and container executors need a separate threat model, authorization, audit log, tests, and docs before shipping.
* \[P05-apps/warroom+apps/web] **War Room federation is optional and redacted**: Stronger signed identity, broad hosted collaboration, mobile certification, and trusted erasure remain future work unless specifically scoped.
* \[P05] **Redaction is boundary-specific**: Collaboration, Worker, diagnostics, replay, export, archive, adapter, backup, log, and future external-transfer payloads need explicit minimization.
* \[P02-apps/web] **Responsive and accessibility debt**: Future UI changes need mobile, focus return, dialog semantics, reduced motion, contrast, and full accessibility validation.
* \[P03-packages/protocol] **Protocol leads cross-package work**: Shared collaboration, isolation, REST, WebSocket, and domain types should be updated before app packages depend on them.
* \[P03] **Local-first boundary is architectural**: Collaboration and isolation must degrade cleanly when Cloudflare, hosted services, public tokens, provider credentials, and analytics are absent.
* \[P05-S07-HOSTED-IDENTITY] **Hosted identity remains open**: Phase 06 authority work must be stronger than hint-only metadata without implying hosted account proof.
* \[P05-S07-HOSTED-VALIDATION] **Hosted validation remains open**: Local and mocked Worker evidence must not be described as production-hosted validation.

***

## 9. Testing Strategy

### Unit Tests

* No application unit tests are expected because this session produces planning and documentation artifacts only.
* If implementation reveals a narrow code wording or route-metadata fix, run the focused package test for that package before completing the task.

### Integration Tests

* Run `npm run format:check` and `npm run lint` if code or formatted workspace paths are touched.
* Run focused package typecheck or tests only if TypeScript, React, Worker, server, CLI, or hook code changes are made.
* Run `git diff --check` for whitespace validation.

### Manual Testing

* Review changed docs and README files for consistent collaboration state names, participant authority vocabulary, local-first wording, unavailable executor wording, mobile acceptance terms, and blocked payload categories.
* Verify links to baseline artifacts and existing docs resolve from the repository root.
* Confirm docs do not imply hosted accounts, hosted storage, analytics, public replay hosting, inbound commands, file/git/terminal/Docker/remote/hosted execution, production-hosted validation, mobile certification, or trusted erasure are shipped by this session.

### Edge Cases

* Missing Worker URL, Worker down, Cloudflare unavailable, rate-limited request, socket upgrade failure, room not found, room full, stale approval, duplicate approval, rejected join, reconnect catch-up, disconnect, leave, and participant metadata spoofing.
* Prompt, file, command, terminal, transcript, secret, broad path, export, replay, scan, media draft, diagnostic, log, backup, and quarantined historical payloads must remain non-transferable by default.
* Local server `/warroom` compatibility, unsupported route families, guarded-action unavailable results, CLI recovery, hook diagnostics, and future executor signals must not imply current execution or hidden data transfer.
* Mobile browser widths, dense cockpit panels, long labels, icon-only controls, overlays, dialogs, focus return, reduced-motion states, text wrapping, and no-overlap behavior need explicit later validation.

***

## 10. Dependencies

### External Libraries

* None expected for this documentation-first session.

### Other Sessions

* **Depends on**: `phase05-session07-war-room-validation-and-documentation-closeout`, `phase05-session05-federation-event-redaction-and-cockpit-integration`, `phase03-session07-orchestration-validation-and-documentation-closeout`, `phase02-session07-product-surface-validation-and-documentation-closeout`
* **Depended by**: `phase06-session02-room-authority-and-participant-identity-contracts`, `phase06-session03-shared-collaboration-event-contracts`, `phase06-session04-collaborative-cockpit-ux-and-remote-context`, `phase06-session05-isolation-boundary-and-sandbox-diagnostics`, `phase06-session06-mobile-cockpit-and-accessibility-hardening`, `phase06-session07-collaboration-isolation-and-mobile-validation-closeout`

***

## 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/phase06-session01-collaboration-requirements-and-safety-baseline/spec.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.
