> ## Documentation Index
> Fetch the complete documentation index at: https://docs.monolex.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# DOCS STRUCTURE PROPOSAL

# Monolex Documentation Structure Proposal

## Source Analysis: `/monolex/.claude/skills/monolex-architect/docs/`

### Main Chapters (18 files)

| Chapter | Title                                               | Category      |
| ------- | --------------------------------------------------- | ------------- |
| ch1     | PTY Daemon & Session Architecture                   | Architecture  |
| ch2     | AlacrittyRenderer - VTE Parsing & Grid Updates      | Terminal Core |
| ch3     | PTY Log - Terminal Activity Logger                  | Features      |
| ch4     | Atomic Term IME - macOS Input Source Detection      | Input         |
| ch5     | NIIA Watcher - File System Monitoring Daemon        | Daemons       |
| ch6     | Variable MD - Multi-Format Document Viewer          | Features      |
| ch7     | Database Architecture                               | Database      |
| ch8     | Complex Relations - Component-Database Integration  | Database      |
| ch9     | File-to-Database Mapping                            | Database      |
| ch10    | Work Wiki Diff System                               | Features      |
| ch11    | Module → DB Graph                                   | Database      |
| ch12    | Unified Module-DB Connection Map                    | Database      |
| ch13    | Terminal Scrollbar - Dual Mode Architecture         | UI            |
| ch14    | Alacritty Parser Backup - IME Inverse Cursor System | Input         |
| ch15    | Grid Mode v2 - 5-Tier Architecture                  | Architecture  |
| ch16    | Alacritty-xterm-Monolex Technology Integration      | Architecture  |
| ch17    | Dirty Tracking Implementation (Grid Mode v2.1)      | Performance   |
| ch18    | PTY Daemon Ring Buffer Architecture                 | Architecture  |

### Database Documentation (5 files)

| File                 | Purpose                   |
| -------------------- | ------------------------- |
| db-session.md        | Session state persistence |
| db-onit.md           | OnIt project tracking     |
| db-niia-watcher.md   | File watcher events       |
| db-work-wiki-diff.md | Work wiki diff storage    |
| db-atomic-term.md    | Atomic terminal data      |

### Deep Dive Series

#### multi-tab-rendering/ (34 chapters)

Comprehensive terminal rendering analysis comparing Alacritty, Ghostty, and Monolex:

* Architecture & Data Integrity (1-8)
* VTE Parser & ANSI Escape (9-12)
* Grid & Scrollback (13-16)
* Rendering Pipeline (17-19)
* Input & IME (20-23)
* Font & GPU (24-26)
* Window/Tab Management (27-28)
* Configuration & Performance (29-30)
* Tauri & Actor Patterns (31-34)

#### terminal-internals-deep-dive/ (30 chapters)

Technical deep dives on terminal internals:

* Backpressure & Architecture (1-7)
* Color, Cursor, Modes (8-12)
* Protocols & Selection (13-16)
* Rendering Pipelines (17-19)
* Input Integration (20-22)
* Font & GPU (23-25)
* System Integration (26-30)

#### ux-ai-native-terminal/

Research on AI-native terminal UX:

* 50-Step Analysis across 5 threads
* BSU/ESU comparison
* Selection mechanisms
* Parser-grid interfaces
* Terminal comparisons (Alacritty, Ghostty, WezTerm, xterm.js)

***

## Proposed Mintlify Navigation Structure

```json theme={null}
{
  "navigation": {
    "groups": [
      {
        "group": "Get Started",
        "pages": [
          "introduction",
          "quickstart",
          "installation"
        ]
      },
      {
        "group": "Architecture",
        "pages": [
          "architecture/overview",
          "architecture/tauri-stack",
          "architecture/session-actor",
          "architecture/5-tier-grid-mode"
        ]
      },
      {
        "group": "Terminal Core",
        "pages": [
          "terminal/pty-daemon",
          "terminal/alacritty-renderer",
          "terminal/vte-parsing",
          "terminal/grid-system",
          "terminal/cell-converter"
        ]
      },
      {
        "group": "Input & Output",
        "pages": [
          "io/ime-integration",
          "io/keyboard-handling",
          "io/scrollbar",
          "io/dirty-tracking"
        ]
      },
      {
        "group": "Daemons",
        "pages": [
          "daemons/pty-daemon",
          "daemons/niia-watcher",
          "daemons/niia-mcp"
        ]
      },
      {
        "group": "Database",
        "pages": [
          "database/overview",
          "database/session-db",
          "database/onit-db",
          "database/watcher-db"
        ]
      },
      {
        "group": "Features",
        "pages": [
          "features/variable-md-viewer",
          "features/pty-logging",
          "features/work-wiki-diff"
        ]
      },
      {
        "group": "Deep Dives",
        "pages": [
          {
            "group": "Multi-Tab Rendering",
            "pages": [
              "deep-dives/multi-tab/architecture",
              "deep-dives/multi-tab/vte-parser",
              "deep-dives/multi-tab/rendering-pipeline",
              "deep-dives/multi-tab/comparison"
            ]
          },
          {
            "group": "Terminal Internals",
            "pages": [
              "deep-dives/internals/backpressure",
              "deep-dives/internals/ansi-sequences",
              "deep-dives/internals/grid-cells",
              "deep-dives/internals/gpu-rendering"
            ]
          }
        ]
      },
      {
        "group": "Research",
        "pages": [
          "research/ai-native-terminal-ux",
          "research/ack-flow-control",
          "research/terminal-comparison"
        ]
      }
    ]
  }
}
```

***

## Implementation Priority

### Phase 1: Core Documentation

1. **introduction.mdx** - What is Monolex
2. **quickstart.mdx** - Get running in 5 minutes
3. **installation.mdx** - Download & setup
4. **architecture/overview\.mdx** - High-level architecture diagram

### Phase 2: Architecture Deep Dive

5. **architecture/tauri-stack.mdx** - Tauri + Rust + TypeScript
6. **architecture/session-actor.mdx** - Lock-free concurrency
7. **architecture/5-tier-grid-mode.mdx** - Grid Mode v2

### Phase 3: Terminal Essentials

8. **terminal/pty-daemon.mdx** - Daemon architecture
9. **terminal/alacritty-renderer.mdx** - VTE parsing
10. **terminal/grid-system.mdx** - Grid & buffer

### Phase 4: Complete Documentation

* Remaining sections based on user demand

***

## Key Stats

| Category            | Files | Priority       |
| ------------------- | ----- | -------------- |
| Main Chapters       | 18    | High           |
| Database Docs       | 5     | Medium         |
| Multi-Tab Rendering | 34    | Low (Advanced) |
| Terminal Internals  | 30    | Low (Advanced) |
| AI-Native Research  | 12+   | Medium         |

**Total Source Files**: 100+
**Recommended Initial Pages**: 10-15
**Full Documentation**: 50+ pages

***

## Notes

1. **Korean → English**: All source docs are in Korean. Translation needed for public docs.
2. **ASCII Diagrams**: Keep the excellent ASCII architecture diagrams.
3. **Code Examples**: Include Rust + TypeScript examples.
4. **Mintlify Components**: Use `<CodeGroup>`, `<Tabs>`, `<Card>` for better UX.
