|
| 1 | +# Documentation Content Hierarchy |
| 2 | + |
| 3 | +## Purpose |
| 4 | + |
| 5 | +This document defines the clear content hierarchy for the docs-site to prevent duplication and ensure proper cross-referencing between pages. |
| 6 | + |
| 7 | +## Content Ownership Structure |
| 8 | + |
| 9 | +### 1. Installation & Setup (Canonical Sources) |
| 10 | + |
| 11 | +**Primary owner:** `/installation.md` |
| 12 | +- Complete installation instructions for all platforms |
| 13 | +- All language-specific setup (Rust, Go, C++, JavaScript) |
| 14 | +- Toolchain configuration details |
| 15 | +- Troubleshooting installation issues |
| 16 | + |
| 17 | +**Secondary references:** |
| 18 | +- `/getting-started.mdx` - Quick reference with link to full installation |
| 19 | +- `/first-component.md` - Minimal setup with reference to installation guide |
| 20 | +- Language-specific guides - Link to installation for setup details |
| 21 | + |
| 22 | +**Pattern:** Other pages should provide minimal setup and reference `/installation.md` for details. |
| 23 | + |
| 24 | +### 2. Tutorial Progression (Learning Path) |
| 25 | + |
| 26 | +**Ultra-fast (2 min):** `/zero-to-component.mdx` |
| 27 | +- Immediate success using existing examples |
| 28 | +- Minimal explanation, maximum speed |
| 29 | +- References detailed tutorials for understanding |
| 30 | + |
| 31 | +**Quick hands-on (10 min):** `/first-component.md` |
| 32 | +- Build from scratch step-by-step |
| 33 | +- Focused on practical implementation |
| 34 | +- References installation and detailed tutorials |
| 35 | + |
| 36 | +**Complete understanding (30 min):** `/tutorials/rust-guided-walkthrough.mdx` |
| 37 | +- Deep explanations of concepts and pipeline |
| 38 | +- Line-by-line code analysis with diagrams |
| 39 | +- Complete mental model building |
| 40 | + |
| 41 | +**Technical reference:** `/tutorials/code-explained.mdx` |
| 42 | +- Visual diagrams of component building process |
| 43 | +- Progressive complexity with Mermaid diagrams |
| 44 | +- Technical deep-dive into each file |
| 45 | + |
| 46 | +### 3. Code Examples (Canonical Patterns) |
| 47 | + |
| 48 | +**BUILD.bazel patterns:** |
| 49 | +- **Owner:** `/examples/basic/` - Canonical Rust component pattern |
| 50 | +- **Owner:** `/examples/calculator/` - Error handling pattern |
| 51 | +- **Owner:** Language-specific examples - Language-specific patterns |
| 52 | + |
| 53 | +**References:** |
| 54 | +- Tutorial pages link to examples instead of duplicating BUILD.bazel code |
| 55 | +- Rule reference shows usage patterns, examples show complete implementations |
| 56 | + |
| 57 | +**WIT interface examples:** |
| 58 | +- **Owner:** `/tutorials/code-explained.mdx` - Detailed WIT explanations |
| 59 | +- **References:** Other pages link to detailed explanations rather than re-explaining |
| 60 | + |
| 61 | +### 4. Advanced Topics (Specialized Ownership) |
| 62 | + |
| 63 | +**Component Composition:** |
| 64 | +- **Owner:** `/composition/wac/` - Complete WAC composition guide |
| 65 | +- **References:** Getting started mentions composition, links to dedicated guide |
| 66 | + |
| 67 | +**Performance Optimization:** |
| 68 | +- **Owner:** `/production/performance/` - Wizer and optimization techniques |
| 69 | +- **References:** Other pages mention performance, link to dedicated guide |
| 70 | + |
| 71 | +**Security & Signing:** |
| 72 | +- **Owner:** `/security/component-signing.mdx` - Complete security guide |
| 73 | +- **References:** Brief mentions in other pages, links for details |
| 74 | + |
| 75 | +### 5. Language-Specific Content |
| 76 | + |
| 77 | +**Rust:** `/languages/rust/` |
| 78 | +**Go:** `/languages/go/` |
| 79 | +**C++:** `/languages/cpp/` |
| 80 | +**JavaScript:** `/languages/javascript/` |
| 81 | + |
| 82 | +**Pattern:** Each language guide owns its specific patterns and advanced features. Getting started provides overview, language guides provide depth. |
| 83 | + |
| 84 | +### 6. Reference Documentation |
| 85 | + |
| 86 | +**Rule Reference:** `/reference/rules.mdx` |
| 87 | +- **Owner:** Complete API documentation for all rules |
| 88 | +- **Pattern:** Examples show usage, reference shows complete API |
| 89 | + |
| 90 | +**Troubleshooting:** `/troubleshooting/common-issues.mdx` |
| 91 | +- **Owner:** All error messages and solutions |
| 92 | +- **Pattern:** Other pages reference troubleshooting for specific issues |
| 93 | + |
| 94 | +## Content Cross-Reference Patterns |
| 95 | + |
| 96 | +### ✅ Good Patterns |
| 97 | + |
| 98 | +1. **Provide minimal context + link to canonical source** |
| 99 | + ```markdown |
| 100 | + For complete installation instructions, see the [Installation Guide](/installation/). |
| 101 | + |
| 102 | + Quick setup for Rust: |
| 103 | + [minimal code example] |
| 104 | + ``` |
| 105 | + |
| 106 | +2. **Use approach grids for different learning paths** |
| 107 | + ```html |
| 108 | + <div class="approach-grid"> |
| 109 | + <div class="approach-card"> |
| 110 | + <h3>🚀 Ultra-Fast (2 minutes)</h3> |
| 111 | + <p>Get working instantly</p> |
| 112 | + <a href="/zero-to-component/">Zero to Component →</a> |
| 113 | + </div> |
| 114 | + </div> |
| 115 | + ``` |
| 116 | + |
| 117 | +3. **Reference examples instead of duplicating BUILD.bazel** |
| 118 | + ```markdown |
| 119 | + For the complete BUILD.bazel pattern, see the [basic example](/examples/basic/). |
| 120 | + ``` |
| 121 | + |
| 122 | +### ❌ Anti-Patterns to Avoid |
| 123 | + |
| 124 | +1. **Duplicating installation instructions** |
| 125 | + - ❌ Copy full MODULE.bazel setup across multiple pages |
| 126 | + - ✅ Provide minimal setup + link to installation guide |
| 127 | + |
| 128 | +2. **Re-explaining WIT syntax** |
| 129 | + - ❌ Explain WIT syntax on every tutorial page |
| 130 | + - ✅ Link to detailed explanation in code-explained tutorial |
| 131 | + |
| 132 | +3. **Duplicating BUILD.bazel examples** |
| 133 | + - ❌ Show complete BUILD.bazel on multiple pages |
| 134 | + - ✅ Show pattern summary + link to complete example |
| 135 | + |
| 136 | +4. **Redundant troubleshooting** |
| 137 | + - ❌ Scatter error solutions across multiple pages |
| 138 | + - ✅ Centralize in troubleshooting guide + cross-reference |
| 139 | + |
| 140 | +## Content Update Protocol |
| 141 | + |
| 142 | +### When Adding New Content |
| 143 | + |
| 144 | +1. **Check existing hierarchy** - Does this content fit an existing owner? |
| 145 | +2. **Identify content type** - Tutorial, reference, example, or specialized guide? |
| 146 | +3. **Assign ownership** - Which page should be the canonical source? |
| 147 | +4. **Plan references** - How will other pages reference this content? |
| 148 | + |
| 149 | +### When Updating Existing Content |
| 150 | + |
| 151 | +1. **Identify the canonical owner** - Update the source of truth first |
| 152 | +2. **Update references** - Ensure cross-references remain accurate |
| 153 | +3. **Check for duplication** - Remove any content that duplicates the update |
| 154 | + |
| 155 | +### Review Checklist |
| 156 | + |
| 157 | +Before publishing content changes: |
| 158 | + |
| 159 | +- [ ] Is this content duplicated elsewhere? |
| 160 | +- [ ] Does this page properly reference canonical sources? |
| 161 | +- [ ] Are cross-references accurate and helpful? |
| 162 | +- [ ] Does this follow the established content hierarchy? |
| 163 | +- [ ] Would a new user understand the learning progression? |
| 164 | + |
| 165 | +## Maintenance |
| 166 | + |
| 167 | +This hierarchy should be reviewed quarterly to: |
| 168 | +- Identify new duplication that has crept in |
| 169 | +- Update reference patterns as content evolves |
| 170 | +- Ensure learning paths remain clear and progressive |
| 171 | +- Consolidate content that has become scattered |
| 172 | + |
| 173 | +## Success Metrics |
| 174 | + |
| 175 | +- **No content duplication** - Same information shouldn't exist in multiple places |
| 176 | +- **Clear learning paths** - Users can progress from beginner to advanced |
| 177 | +- **Fast answers** - Users can quickly find what they need |
| 178 | +- **Cross-references work** - Links lead to the right level of detail |
| 179 | + |
| 180 | +This hierarchy ensures our documentation grows systematically while remaining maintainable and user-friendly. |
0 commit comments