# Textbook Plan: CLI-First Agentic OS

## Working Title

Building A CLI-First Agentic Operating System

## Reader

- Developers learning agent-native architecture.
- Operators deploying 99Pages Agentic OS.
- Business teams evaluating lightweight automation.

## Part 1: Philosophy

1. Why agent apps should be CLI-first.
2. MCP as the app boundary.
3. UI as projection, not logic.
4. Data, schema, events, and reports as product assets.

## Part 2: Core Runtime

1. Core CLI and SubCLI.
2. TUI slash commands.
3. PowerShell UTF-8 for Chinese input on Windows.
4. Event streams and approvals.
5. Local bootstrap and three-platform compatibility.

## Part 3: Building Apps

1. SDK contract.
2. Manifest design.
3. Tool contracts.
4. Data contracts and SQLite.
5. Report generation.
6. Approval policies.

## Part 4: Mini App Builder

1. Schema-first app generation.
2. Database preparation.
3. Data import/write.
4. Update events.
5. Optional projection UI.

## Part 5: Deployment

1. Local Windows deployment.
2. macOS/Linux deployment.
3. Portable/USB lessons from V1.
4. app.99pages.uk HTML5/PWA projection.
5. Commercial operations.

## Teaching Assets

- CLI command sheets.
- Mermaid architecture diagrams.
- Example manifests.
- Example database schemas.
- Example reports.
- Hands-on labs.
