MIGRATION_GUIDE.md 4.98 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
---
orphan: true
---

# Documentation Migration Guide

This guide covers migrating Dynamo documentation to the new 9-category hierarchy.

---

## Directory Hierarchy

Documentation is organized into 9 top-level categories:

```
docs/
├── components/          # Router, Planner, KVBM, Frontend, Profiler
├── backends/            # vLLM, SGLang, TRT-LLM
├── features/            # Multimodal, LoRA, Speculative Decoding
├── deploy/              # Kubernetes, Helm, Operator
├── performance/         # Tuning, Benchmarks
├── infrastructure/      # Observability, Fault Tolerance, Development
├── integrations/        # LMCache, HiCache, NIXL
├── reference/           # CLI, Glossary, Support Matrix
└── design_docs/         # Tier 3 design documents
```

---

## Category Reference

| Category | Location | Content Type |
|----------|----------|--------------|
| **Components** | `docs/components/<name>/` | Standalone deployable services (Router, Planner, KVBM, Frontend, Profiler) |
| **Backends** | `docs/backends/<name>/` | LLM inference engine integrations (vLLM, SGLang, TRT-LLM) |
| **Features** | `docs/features/<name>/` | Cross-cutting capabilities (Multimodal, LoRA, Speculative Decoding) |
| **Deploy** | `docs/deploy/` | Kubernetes deployment, operator, Helm charts |
| **Performance** | `docs/performance/` | Performance tuning, benchmarking, profiling |
| **Infrastructure** | `docs/infrastructure/<topic>/` | Observability, fault tolerance, development guides |
| **Integrations** | `docs/integrations/<name>/` | External tool integrations (LMCache, HiCache, NIXL) |
| **Reference** | `docs/reference/` | CLI reference, glossary, support matrix |
| **Design** | `docs/design_docs/` | Architecture and algorithm documentation (Tier 3) |

---

## Three-Tier Pattern

Components and backends follow a three-tier documentation pattern:

| Tier | Location | Purpose | Audience |
|------|----------|---------|----------|
| **Tier 1** | `components/src/dynamo/<name>/README.md` | Redirect stub (5 lines) | Developers browsing code |
| **Tier 2** | `docs/<category>/<name>/` | User documentation | Users, operators |
| **Tier 3** | `docs/design_docs/<name>_design.md` | Design documentation | Contributors |

---

## Link Update Checklist

When moving documentation, update links in these locations:

### 1. Internal Markdown Links

Find files linking to the old path:

```bash
# Find all files with links to old path
rg -l "docs/old_path" docs/ fern/

# Find relative markdown links
rg "\]\(.*old_path" docs/
```

### 2. Sphinx Configuration

**Files to update:**

| File | Content |
|------|---------|
| `docs/index.rst` | Main toctree with section references |
| `docs/_sections/*.rst` | Section toctrees (8 files) |
| `docs/hidden_toctree.rst` | Orphaned pages not in main nav |
| `docs/conf.py` | Redirects mapping (lines 40-98) |

**Toctree syntax:**
```rst
.. toctree::
   :hidden:

   Page Title <../new/path/file>
```

**Add redirect in conf.py:**
```python
redirects = {
    "old/path/file": "../new/path/file.html",
}
```

### 3. Fern Configuration

**Files to update:**

| File | Content |
|------|---------|
| `fern/docs.yml` | Site config and version reference |
| `fern/versions/next.yml` | Full navigation structure |

**Navigation syntax:**
```yaml
- page: Page Title
  path: ../pages/new/path.md
```

**Move files in `fern/pages/` to match new structure.**

### 4. RST Cross-References

Find and update:
```rst
:doc:`../old/path/file`
```

### 5. Include Directives

Check `docs/_includes/` for includes:
```rst
.. include:: ../old/path/file.rst
```

---

## Style Editing Guidelines

After migrating content, review for FLOW, STYLE, and CONSISTENCY.

**Do NOT change content meaning - only improve presentation.**

### FLOW Rules

| Rule | Description |
|------|-------------|
| Lead with the point (BLUF) | First paragraph states what the doc covers |
| Logical section order | Overview → Setup → Usage → Troubleshooting |
| One idea per paragraph | Split paragraphs with multiple topics |
| No orphaned sentences | Avoid single sentences between sections |

### STYLE Rules

| Rule | Example |
|------|---------|
| Active voice for instructions | "Run the command" not "The command should be run" |
| Consistent tense | All steps in present tense |
| No redundant phrases | "To" not "In order to" |
| Short sentences | Target ≤25 words |

### CONSISTENCY Rules

| Rule | Standard |
|------|----------|
| Component names | vLLM, SGLang, TensorRT-LLM (or TRT-LLM) |
| Status indicators | ✅ Supported, 🚧 Experimental, ❌ Not Supported |
| Heading hierarchy | # → ## → ### (no skips) |
| Code block languages | Always specify (```python, ```bash, ```yaml) |

---

## Related Files

- [SOURCE_TARGET_MAPPING.md](SOURCE_TARGET_MAPPING.md) - Comprehensive file-level source → target mapping
- [README.md](README.md) - Template overview and selection guide
- [EXAMPLE_SKILL.md](EXAMPLE_SKILL.md) - Cursor skill for AI-assisted migration
- Individual templates: `component_readme.md`, `component_guide.md`, etc.