Skip to content

Commit 5b93ada

Browse files
authored
Merge pull request #57 from mxstack/docs/improvement-plan
Documentation improvements: Phase 1
2 parents 712b20a + 784fade commit 5b93ada

File tree

7 files changed

+733
-116
lines changed

7 files changed

+733
-116
lines changed
Lines changed: 385 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,385 @@
1+
# Documentation Improvement Plan
2+
3+
## Goals
4+
5+
1. **Fix outdated and incorrect content** - Remove obsolete information
6+
2. **Fill documentation gaps** - Complete TODOs and missing sections
7+
3. **Improve discoverability** - Better structure and cross-references
8+
4. **Keep it concise** - No bloat, focus on value
9+
10+
## Current State Analysis
11+
12+
### Existing Documentation (~756 lines total)
13+
14+
- `index.md` - Table of contents (33 lines)
15+
- `getting-started.md` - Installation and basic usage (79 lines) ✓ Recently updated for UV
16+
- `topics.md` - Auto-generated topics/domains list (11 lines)
17+
- `preseeds.md` - Configuration preseeds and examples (145 lines) ✓ Recently updated for UV
18+
- `templates.md` - File generation (51 lines) - **Has TODOs**
19+
- `extending.md` - Writing custom domains (189 lines) - Good
20+
- `dependencies.md` - Auto-generated dependency graph (9 lines)
21+
- `make.md` - Make primer (120 lines) - Good
22+
- `contributing.md` - Source and contributors (17 lines) - **Minimal**
23+
- `usage-old.rst` - Outdated RST format (112 lines) - **Should be removed**
24+
25+
### Gaps Identified
26+
27+
1. No migration guide for breaking changes
28+
2. No troubleshooting/FAQ section
29+
3. Templates documentation incomplete (TODOs present)
30+
4. Contributing guide is minimal (no dev setup, no PR guidelines)
31+
5. Old RST file still present
32+
33+
## Tasks
34+
35+
### Priority 1: Critical Fixes ✅ COMPLETED
36+
37+
#### Task 1.1: Remove obsolete usage-old.rst ✅
38+
- **File**: `docs/source/usage-old.rst`
39+
- **Action**: Delete (marked as "mostly outdated")
40+
- **Status**: DONE - Removed in commit 5dfd8ca
41+
- **Lines removed**: -112
42+
43+
#### Task 1.2: Update index.md TOC ✅
44+
- **File**: `docs/source/index.md`
45+
- **Action**: Remove `usage-old.rst` from TOC if present
46+
- **Status**: DONE - No references found, already clean
47+
48+
### Priority 2: High-Value Additions ✅ COMPLETED
49+
50+
#### Task 2.1: Create migration guide ✅
51+
- **New file**: `docs/source/migration.md`
52+
- **Status**: DONE - Created in commit 74b8bd8
53+
- **Lines added**: 128 lines
54+
- **Content includes**:
55+
- v1.3.1: MXENV_UV_GLOBAL removal and UV auto-detection
56+
- v1.0a7: npm → nodejs domain rename
57+
- v1.0a6: Python 3.8 dropped, minimum Python 3.9
58+
- v1.0a4: Default venv folder, PYTHON_BIN → PRIMARY_PYTHON, MXENV_PATH removal
59+
- v1.0a1: Terminology changes, _SENTINEL → _TARGET
60+
- **Added to index.md TOC**: Yes, after preseeds
61+
62+
#### Task 2.2: Add FAQ/Troubleshooting ✅
63+
- **File**: `docs/source/getting-started.md` (append as new section)
64+
- **Status**: DONE - Added after UV refactoring PR merged
65+
- **Lines added**: +67 lines
66+
- **Content includes**:
67+
- UV not found → install instructions with link to official guide
68+
- Python version mismatch → UV_PYTHON setting
69+
- Tests not running → check run-tests.sh generation
70+
- Make command not found → platform-specific instructions
71+
- Settings not taking effect → environment variable overrides
72+
- Regenerating the Makefile → update command and upgrade info
73+
74+
### Priority 3: Fill Documentation Gaps ✅ COMPLETED
75+
76+
#### Task 3.1: Complete templates.md TODOs ✅
77+
- **File**: `docs/source/templates.md`
78+
- **Status**: DONE - Completed in commit eeb3d48
79+
- **Lines added**: +65 lines
80+
- **Completed**:
81+
- Section: "Templates defined via mx.ini with Jinja2"
82+
- mx.ini configuration format
83+
- Available built-in templates list
84+
- Practical examples
85+
- Section: "Templates based on Python code"
86+
- Basic template class structure
87+
- @template decorator usage
88+
- MxIniBoundTemplate for mx.ini integration
89+
- Link to source code examples
90+
91+
#### Task 3.2: Enhance contributing.md ✅
92+
- **File**: `docs/source/contributing.md`
93+
- **Status**: DONE - Enhanced in commit 220a684
94+
- **Lines added**: +87 lines (17 → 103 lines)
95+
- **Completed**:
96+
- "Development Setup" section
97+
- Prerequisites, quick start
98+
- Running tests, code quality, documentation builds
99+
- "Pull Request Guidelines" section
100+
- Before submitting checklist
101+
- Commit message standards (no AI mentions)
102+
- Submission workflow
103+
- All three subsections included
104+
105+
### Priority 4: Optional Enhancements
106+
107+
#### Task 4.1: Add workflow diagram
108+
- **File**: `docs/source/getting-started.md` or new `docs/source/workflow.md`
109+
- **Content**: Mermaid diagram showing mxmake init → edit settings → make install flow
110+
- **Status**: Optional, if requested
111+
- **Target**: +15-20 lines
112+
113+
#### Task 4.2: Expand examples in preseeds.md
114+
- **File**: `docs/source/preseeds.md`
115+
- **Content**: Add 1-2 more real-world examples (Django, Flask, etc.)
116+
- **Status**: Optional, if requested
117+
- **Target**: +30-40 lines per example
118+
119+
## Timeline and Dependencies
120+
121+
### Phase 1: After UV refactoring PR merges
122+
- Task 1.1: Remove usage-old.rst
123+
- Task 1.2: Update index TOC
124+
- Task 2.1: Create migration guide (document UV changes)
125+
126+
### Phase 2: Core improvements
127+
- Task 2.2: Add FAQ section
128+
- Task 3.1: Complete templates.md
129+
- Task 3.2: Enhance contributing.md
130+
131+
### Phase 3: Optional (if time permits)
132+
- Task 4.1: Workflow diagram
133+
- Task 4.2: More examples
134+
135+
## Expected Outcome
136+
137+
### Line Count Projection (Updated with Actuals)
138+
- **Original total**: 756 lines
139+
- **Removed**: -112 lines (usage-old.rst)
140+
- **Added**: +347 lines (migration + templates + contributing + FAQ)
141+
- **New total**: 991 lines
142+
- **Net change**: +235 lines (+31% increase)
143+
144+
**Note**: Added more content than originally planned due to comprehensive examples and FAQ.
145+
146+
### Success Criteria
147+
1. ✅ No outdated files (usage-old.rst removed)
148+
2. ✅ No TODOs in templates.md (both sections completed)
149+
3. ✅ Migration guide helps users upgrade (128 lines, 6 versions covered)
150+
4. ✅ Contributing guide helps new contributors (103 lines with workflow)
151+
5. ✅ FAQ/Troubleshooting added (67 lines, 6 common issues)
152+
6. ✅ Total documentation stays under 1,000 lines (991 lines)
153+
154+
## Additional Improvements to Consider
155+
156+
### Documentation Structure Enhancements
157+
158+
#### Add Glossary
159+
- **New file**: `docs/source/glossary.md`
160+
- **Content**: Define key terms (domain, topic, sentinel, preseed, mxdev, FQN, etc.)
161+
- **Value**: Helps newcomers understand terminology
162+
- **Effort**: Low (~40 lines)
163+
- **Priority**: Medium
164+
165+
#### Add "Why mxmake" / Comparison Section
166+
- **Location**: New section in `index.md` or `getting-started.md`
167+
- **Content**:
168+
- Benefits over plain pip/poetry/tox
169+
- When to use mxmake vs alternatives
170+
- Key differentiators (extensibility, mxdev integration, make-based)
171+
- **Value**: Helps users decide if mxmake is right for them
172+
- **Effort**: Medium (~30-50 lines)
173+
- **Priority**: Medium
174+
175+
#### Add Conceptual Overview
176+
- **New file**: `docs/source/concepts.md` or section in index
177+
- **Content**:
178+
- How mxmake works (init → settings → make)
179+
- Topic → Domain → Target → Sentinel flow
180+
- Dependency resolution
181+
- Template system overview
182+
- **Value**: Better understanding for advanced usage
183+
- **Effort**: Medium (~60-80 lines)
184+
- **Priority**: Medium-High
185+
186+
#### Quick Reference / Cheat Sheet
187+
- **New file**: `docs/source/quickref.md`
188+
- **Content**:
189+
- Common commands table
190+
- Important settings by use case
191+
- Common domain combinations
192+
- **Value**: Quick lookup for experienced users
193+
- **Effort**: Low (~40-50 lines)
194+
- **Priority**: Low-Medium
195+
196+
### Content Enhancements
197+
198+
#### More Use Case Examples
199+
- **Location**: Expand `preseeds.md` or new `docs/source/examples.md`
200+
- **Content**:
201+
- Django project setup
202+
- FastAPI/modern web framework
203+
- Data science/Jupyter notebook project
204+
- Library/package development
205+
- **Value**: Shows versatility, helps users get started faster
206+
- **Effort**: Medium (~40 lines per example)
207+
- **Priority**: Low-Medium (can be added incrementally)
208+
209+
#### CI/CD Integration Guide
210+
- **New file**: `docs/source/cicd.md`
211+
- **Content**:
212+
- Using mxmake in GitHub Actions
213+
- GitLab CI integration
214+
- Using pre-generated gh-actions templates
215+
- Docker multi-stage builds with mxmake
216+
- **Value**: Production deployment guidance
217+
- **Effort**: Medium (~80-100 lines)
218+
- **Priority**: Medium
219+
220+
#### Best Practices Guide
221+
- **New file**: `docs/source/best-practices.md`
222+
- **Content**:
223+
- Recommended settings for different project types
224+
- Common patterns (versioning, dependency pinning)
225+
- Anti-patterns to avoid
226+
- Performance tips for large projects
227+
- **Value**: Helps users avoid common mistakes
228+
- **Effort**: Medium (~60-80 lines)
229+
- **Priority**: Medium
230+
231+
#### Advanced Troubleshooting
232+
- **New file**: `docs/source/troubleshooting.md` or expand FAQ
233+
- **Content**:
234+
- Detailed debugging steps
235+
- Common error messages explained
236+
- Platform-specific issues (Windows, macOS, Linux)
237+
- Version compatibility problems
238+
- **Value**: Reduces support burden
239+
- **Effort**: Medium (~80-100 lines, grows over time)
240+
- **Priority**: Medium
241+
242+
### Documentation Quality Improvements
243+
244+
#### Add Cross-References
245+
- **Action**: Review all docs and add MyST cross-references
246+
- **Content**:
247+
- Link between related sections
248+
- Link from examples to domain documentation
249+
- Link settings mentions to topics.md
250+
- **Value**: Better navigation
251+
- **Effort**: Low (during other edits)
252+
- **Priority**: Ongoing
253+
254+
#### Add Visual Diagrams
255+
- **Location**: Various files
256+
- **Content**:
257+
- Workflow diagram (mxmake init → make install flow)
258+
- Architecture diagram (topics/domains/targets relationship)
259+
- Dependency graph enhancement
260+
- **Tool**: Mermaid diagrams (MyST supports them)
261+
- **Value**: Visual learners, complex concepts clearer
262+
- **Effort**: Medium (~5-10 lines per diagram)
263+
- **Priority**: Low-Medium
264+
265+
#### Integrate CHANGES.md
266+
- **Location**: `index.md` or new `docs/source/changelog.md`
267+
- **Content**: Link to or include recent changes from CHANGES.md
268+
- **Value**: Users see what's new
269+
- **Effort**: Low (if just linking), Medium (if integrating)
270+
- **Priority**: Low
271+
272+
## Open Questions
273+
274+
1. **Migration guide scope**: Include all versions or just recent (1.0+)?
275+
- Recommendation: Start from 1.0, or last 2-3 major versions
276+
277+
2. **FAQ location**: Separate file or in getting-started.md?
278+
- Recommendation: Append to getting-started.md (easier to discover)
279+
280+
3. **Templates examples**: Generic or specific real-world use cases?
281+
- Recommendation: Start generic, can add specific later
282+
283+
4. **Workflow diagram**: Worth the maintenance overhead?
284+
- Recommendation: YES - Mermaid diagrams are easy to maintain
285+
286+
5. **How comprehensive should use case examples be?**
287+
- Recommendation: Start with 2-3 good examples, add more based on user feedback
288+
289+
6. **Should we create a separate "Advanced Topics" section?**
290+
- Could include: CI/CD, Docker, best practices, troubleshooting
291+
- Recommendation: Create if we add 3+ advanced guides
292+
293+
7. **Glossary as separate file or inline in concepts doc?**
294+
- Recommendation: Separate file for easy reference
295+
296+
## Recommended Implementation Phases
297+
298+
### Phase 1: Essential Fixes (Must Do)
299+
**Target: After UV refactoring PR merges**
300+
- Remove usage-old.rst
301+
- Create migration guide
302+
- Add FAQ section
303+
- Complete templates.md TODOs
304+
- Enhance contributing.md
305+
306+
**Effort**: ~4-6 hours
307+
**Line count**: +158 lines total
308+
309+
### Phase 2: Structure & Navigation (Should Do)
310+
**Target: Within 1-2 weeks**
311+
- Add glossary
312+
- Add conceptual overview
313+
- Add workflow diagram (Mermaid)
314+
- Improve cross-references
315+
316+
**Effort**: ~3-4 hours
317+
**Line count**: +100-140 lines
318+
319+
### Phase 3: Advanced Content (Nice to Have)
320+
**Target: As needed / based on user feedback**
321+
- CI/CD integration guide
322+
- Best practices guide
323+
- Advanced troubleshooting
324+
- Quick reference sheet
325+
- "Why mxmake" section
326+
327+
**Effort**: ~6-8 hours
328+
**Line count**: +250-350 lines
329+
330+
### Phase 4: Examples Expansion (Optional)
331+
**Target**: Community contributions / as requested
332+
- More use case examples (Django, FastAPI, etc.)
333+
- Platform-specific guides
334+
- Integration examples
335+
336+
**Effort**: ~2 hours per example
337+
**Line count**: +40 lines per example
338+
339+
## Summary: Documentation Growth Tracker
340+
341+
| Phase | Status | Files Changed/Added | Lines Added | Total Lines |
342+
|-------|--------|---------------------|-------------|-------------|
343+
| Baseline || 9 files | - | 756 |
344+
| **Phase 1** | **✅ COMPLETED** | **+1 file, edited 4** | **+347** | **~991** |
345+
| Phase 2 | 🔜 Pending | +2 files, edit several | +120 | ~1,111 |
346+
| Phase 3 | 📋 Planned | +4 files | +300 | ~1,344 |
347+
| Phase 4 | 📋 Planned | Varies | +40 each | Variable |
348+
349+
### Phase 1 Completion Summary
350+
351+
**Completed: 2025-10-22, Updated: 2025-10-23**
352+
353+
**Commits**:
354+
1. `5dfd8ca` - Remove obsolete usage-old.rst documentation
355+
2. `74b8bd8` - Add migration guide documenting breaking changes
356+
3. `eeb3d48` - Complete templates.md documentation
357+
4. `220a684` - Enhance contributing.md with development workflow
358+
5. (pending) - Add FAQ/Troubleshooting section to getting-started.md
359+
360+
**Files Changed**:
361+
- ❌ Deleted: `docs/source/usage-old.rst` (-112 lines)
362+
- ✅ Created: `docs/source/migration.md` (+128 lines)
363+
- ✏️ Updated: `docs/source/templates.md` (+65 lines)
364+
- ✏️ Updated: `docs/source/contributing.md` (+87 lines)
365+
- ✏️ Updated: `docs/source/getting-started.md` (+67 lines)
366+
- ✏️ Updated: `docs/source/index.md` (+1 line for TOC)
367+
368+
**Total Impact**: +347 lines (after removing 112), net +235 lines
369+
370+
**Recommendation**:
371+
- Phase 1: ✅ Fully complete - ready for review (UV PR #56 merged, FAQ added)
372+
- Phase 2: Can start immediately (glossary, concepts, diagrams)
373+
- Phase 3-4: Based on user feedback and priorities
374+
375+
## Notes
376+
377+
- This plan assumes the UV refactoring PR (#56) is merged first
378+
- Documentation changes already made on refactoring branch:
379+
- getting-started.md: Added UV auto-detection section
380+
- preseeds.md: Updated examples, added UV_PYTHON warnings
381+
- These changes will be in main after merge
382+
- All new work will be done on this `docs/improvement-plan` branch
383+
- Each task can be done incrementally with focused commits
384+
- Keep total documentation under 1,500 lines for maintainability
385+
- Quality over quantity - concise, accurate, helpful

0 commit comments

Comments
 (0)