|
1 | 1 | # Documentation Restructure Plan |
2 | 2 |
|
3 | | -**Status**: Planned |
| 3 | +**Status**: In Progress |
4 | 4 | **Priority**: High |
5 | 5 | **Context**: Ready for first publish, need docs restructuring for human vs LLM audiences |
6 | 6 |
|
|
21 | 21 |
|
22 | 22 | #### README.md Table of Contents |
23 | 23 |
|
24 | | -1. **Hero Section** - Above the fold content |
| 24 | +1. **Hero Section** ✅ - Above the fold content |
25 | 25 | - **Content**: Clear one-liner, key benefit statement |
26 | 26 | - **Purpose**: Immediate value proposition |
27 | 27 |
|
28 | | -2. **Quick Start** - Install and run in 60 seconds |
| 28 | +2. **Quick Start** ✅ - Install and run in 60 seconds |
29 | 29 | - **Content**: |
30 | 30 |
|
31 | 31 | ```bash |
32 | 32 | # Install |
33 | 33 | cargo install zerv |
34 | 34 |
|
35 | | - # Try automated version (current branch determines output) |
| 35 | + # Try automated versioning (current branch determines output) |
36 | 36 | zerv flow |
37 | | - # → 1.2.3-alpha.5 (on feature branch) |
38 | | - # → 1.3.0-beta.1 (on develop branch) |
39 | | - # → 1.2.3 (on main branch) |
| 37 | + # → 1.0.0 (on main branch with tag v1.0.0) |
| 38 | + # → 1.0.1-rc.1.post.3 (on release branch with pre-release tag) |
| 39 | + # → 1.0.1-beta.1.post.3+develop.3.gf297dd0 (on develop branch) |
| 40 | + # → 1.0.1-alpha.59394.post.1+feature.new.auth.1.g4e9af24 (on feature branch) |
| 41 | + # → 1.0.1-alpha.17015.post.1.dev.1764382150+feature.dirty.work.1.g54c499a (on dirty feature branch) |
40 | 42 | ``` |
41 | 43 |
|
42 | 44 | - **Purpose**: Get users running code immediately to see value |
43 | 45 |
|
44 | | -3. **Key Features** - 6 bullet points maximum |
| 46 | +3. **Key Features** ✅ - 5 concise bullet points (reduced from 6 to avoid redundancy) |
45 | 47 | - **Content**: |
46 | 48 | - **zerv version**: Flexible, configurable version generation with full control |
47 | 49 | - **zerv flow**: Opinionated, automated pre-release management based on Git branches |
48 | | - - Smart Schema System: Auto-detects clean releases, pre-releases, and build context |
49 | | - - Multiple Formats: SemVer, PEP440 (Python), CalVer, custom schemas |
50 | | - - CI/CD Ready: Override capabilities and pipeline-friendly output formats |
51 | | - - Zero Config: Works out of the box with sensible defaults |
| 50 | + - **Smart Schema System**: Auto-detects clean releases, pre-releases, and build context |
| 51 | + - **Multiple Formats**: SemVer, PEP440 (Python), CalVer, custom schemas |
| 52 | + - **CI/CD Integration**: Complements semantic release with branch-based pre-releases and full override control |
52 | 53 | - **Purpose**: Clear distinction between flexible (version) vs automated (flow) approaches |
53 | 54 |
|
54 | | -4. **Usage Examples** - Copy-paste examples by command |
| 55 | +4. **Usage Examples** 🚧 - Copy-paste examples by command |
55 | 56 | - **Content**: |
56 | | - - **zerv flow**: Automated branch-based versions with 5 main capability areas: |
| 57 | + - **zerv flow**: Automated branch-based versions with comprehensive documentation: |
| 58 | + - ✅ **Core Principles**: 4 fundamental design principles |
| 59 | + - ✅ **Version Format Explained**: Structure, components, and variations with examples |
| 60 | + - ✅ **Pre-release Resolution Strategy**: Branch patterns, post-release logic, distance modes |
57 | 61 | - **Workflow Examples** (3 real-world scenarios with diagrams): |
58 | | - - Trunk-Based Development: Parallel features, nested branches, sync scenarios |
59 | | - - GitFlow: develop/feature/hotfix/release branches with proper pre-release mapping |
60 | | - - Complex Release Management: Branch abandonment, cascading releases |
| 62 | + - ✅ Trunk-Based Development: Parallel features, nested branches, sync scenarios |
| 63 | + - ✅ GitFlow: develop/feature/hotfix/release branches with proper pre-release mapping |
| 64 | + - ✅ Complex Release Management: Branch abandonment, cascading releases |
61 | 65 | - **DIAGRAMS**: Copy mermaid diagrams from `.claude/plan/32-zerv-flow-implementation-plan.md` |
62 | | - - **Schema Variants**: 10+ standard schema presets only (no CalVer support) |
63 | | - - **Branch Rules**: Configurable pattern matching (default GitFlow) for pre-release automation |
| 66 | + - ✅ **Schema Variants**: 10+ standard schema presets only (no CalVer support) |
| 67 | + - ✅ **Branch Rules**: Configurable pattern matching (default GitFlow) for pre-release automation |
64 | 68 | - **Pre-release Control**: Labels (alpha/beta/rc), numbers, hash-based identification |
65 | 69 | - **Post Mode Options**: Tag distance vs commit distance calculation modes |
66 | 70 | - **zerv version**: Manual control with 4 main capability areas: |
|
76 | 80 | - Pipeline chaining examples (e.g., `zerv version --output-format zerv | zerv version --source stdin --schema calver`) |
77 | 81 | - **Purpose**: Practical examples organized by command for easy reference |
78 | 82 |
|
79 | | -5. **Installation** - Simple, cargo-focused |
| 83 | +5. **Installation** ⏳ - Simple, cargo-focused |
80 | 84 | - **Content**: Cargo install command, manual download link |
81 | 85 | - **Purpose**: Quick installation path |
82 | 86 |
|
83 | | -6. **Links** - Point to comprehensive docs |
| 87 | +6. **Links** ⏳ - Point to comprehensive docs |
84 | 88 | - **Content**: Link to docs/llms.md, CLI help command |
85 | 89 | - **Purpose**: Path to detailed information |
86 | 90 |
|
|
127 | 131 | - No information loss from existing documentation |
128 | 132 | - Both files serve their distinct audiences effectively |
129 | 133 |
|
| 134 | +## Implementation Notes |
| 135 | + |
| 136 | +### 📝 Documentation Maintenance Process Established |
| 137 | + |
| 138 | +**Corresponding Test Guidelines**: |
| 139 | +Every code example in documentation must have a corresponding test with reference comment: |
| 140 | + |
| 141 | +```html |
| 142 | +<!-- Corresponding test: tests/integration_tests/flow/docs/quick_start.rs:test_quick_start_documentation_examples --> |
| 143 | +``` |
| 144 | + |
| 145 | +**Working Process**: |
| 146 | + |
| 147 | +1. **Test First**: Write comprehensive test for documentation example |
| 148 | +2. **Document Second**: Add example to documentation with exact output |
| 149 | +3. **Add Reference**: Include corresponding test comment for maintainability |
| 150 | +4. **Validate**: Ensure examples exactly match test outputs |
| 151 | +5. **Coordinated Updates**: Update tests first, then documentation to match |
| 152 | + |
| 153 | +**Infrastructure in Place**: |
| 154 | + |
| 155 | +- ✅ **TestScenario**: Chainable test framework with CLI command execution |
| 156 | +- ✅ **Pattern Assertion System**: `{hex:7}`, `{timestamp:now}`, `{regex:pattern}` support |
| 157 | +- ✅ **Documentation Standards**: Comprehensive guidelines in `.claude/ref/documentation-maintenance.md` |
| 158 | +- ✅ **Maintenance Comments**: Professional "Corresponding test:" format |
| 159 | + |
| 160 | +**File Structure**: |
| 161 | + |
| 162 | +``` |
| 163 | +tests/integration_tests/flow/docs/ |
| 164 | +├── mod.rs |
| 165 | +├── test_utils.rs # TestScenario implementation |
| 166 | +├── quick_start.rs # Quick Start documentation tests |
| 167 | +└── tmp.rs # assert_commands functionality (temporary) |
| 168 | +``` |
| 169 | +
|
| 170 | +## Next Steps |
| 171 | +
|
| 172 | +### Remaining Implementation Tasks: |
| 173 | +
|
| 174 | +1. **Usage Examples** - Organize by command with practical examples and workflow diagrams |
| 175 | +2. **Installation Section** - Simple cargo-focused installation instructions |
| 176 | +3. **Links Section** - Point to comprehensive docs and CLI help |
| 177 | +4. **docs/llms.md** - Create symlink to README.md for comprehensive reference |
| 178 | +
|
| 179 | +### Diagram Integration: |
| 180 | +
|
| 181 | +- **Copy mermaid diagrams** from `.claude/plan/32-zerv-flow-implementation-plan.md` |
| 182 | +- **Include 3 workflow diagrams**: Trunk-Based, GitFlow, Complex Release Management |
| 183 | +- **Essential for**: Showing real Git scenarios and zerv flow capabilities |
| 184 | +
|
130 | 185 | ## Notes |
131 | 186 |
|
132 | 187 | - This is a consolidation effort - we're reducing doc surface area while improving coverage |
133 | 188 | - AUTO.md remains as auto-generated CLI reference |
| 189 | +- Test-driven documentation ensures examples always stay accurate |
134 | 190 | - Future: Consider more scalable documentation approach if needed |
0 commit comments