# Product Requirements Document: 99Pages Agentic OS V3

## Product Positioning

99Pages Agentic OS V3 is a CLI-First, MCP-native operating layer for agents.
It is designed to be lighter than UI-first systems because applications are
capabilities first and screens second.

## Target Users

- 99Pages operators.
- SubAdmin users.
- Developers building MCP capability apps.
- Business users consuming reports, approvals, and updates through app.99pages.uk.

## Core Requirements

- Core CLI owns login/session, event stream, approvals, and MCP registry.
- All apps are callable through CLI/MCP.
- TUI is the main local operator surface.
- PowerShell UTF-8 is the Windows CLI surface.
- macOS/Linux are supported through shell-compatible bootstrap.
- app.99pages.uk is remote HTML5/PWA projection.
- Mini App Builder produces schema/database/data/report first.
- Optional visual UI is added only when repeated workflows justify it.

## User Workflows

### Local Operator

1. Run `99p doctor`.
2. Run `99p bootstrap`.
3. Start `99p tui`.
4. Use slash commands to operate apps.
5. Approve risky actions.
6. Read reports and event updates.

### Agent Workflow

1. Core CLI creates a run.
2. Worker selects MCP capability.
3. Tool calls emit events.
4. Risky actions request approval.
5. Final report is emitted.

### Remote User

1. Sign in through app.99pages.uk.
2. Pair with local Core CLI/Magic Link/device seat.
3. View runs, approvals, reports, and device status.
4. Send remote commands to Core CLI.

## Acceptance Criteria

- `go test ./...` passes.
- `99p doctor` reports platform/config/MCP status.
- `99p apps manifest` exposes the app doctrine.
- `99p tui` supports Core, Apps, MCP, SubCLI, Keybox, Miniapp, FS, PTY, Browser.
- Risky MCP calls create approval events and can resume.
- app.99pages.uk can project V3 events without owning execution logic.

## Out Of Scope For Base V3

- A maintained HTML5 UI for every MCP.
- UI-owned business logic.
- Raw provider/model selection exposed to end users.
- Mandatory cloud execution.
