@@ -39,17 +39,62 @@ zerv flow [OPTIONS]
3939 --bumped-branch < BRANCH> Override branch name for pre-release resolution (same as zerv version)
4040 --bumped-branch-hash-length < LENGTH> Branch hash length for pre-release numbers [default: 5] [range: 4..16]
4141 --post-mode < TYPE> Post calculation mode [default: tag] [possible values: tag, commit]
42- --build-context Include build context (+branch.commit) in output [default: true]
43- --no-build-context Exclude build context from output
44- --dev-ts Include dev timestamp for dirty working directory [default: auto-detect]
45- --no-dev-ts Exclude dev timestamp from output
46- --with-pre-release Include pre-release/post-release but no build context
47- --base-only Base version only (major.minor.patch)
42+ --schema < SCHEMA> Schema variant for output components [default: standard] [possible values: standard, standard-no-context, standard-context, standard-base, standard-base-prerelease, standard-base-prerelease-post, standard-base-prerelease-post-dev]
4843-v, --verbose Show verbose output including version resolution details
4944-h, --help Print help
5045-V, --version Print version
5146```
5247
48+ ### Schema System
49+
50+ ** zerv flow uses the flexible schema system from zerv version but restricted to standard schema family only.**
51+
52+ #### Available Standard Schema Variants
53+
54+ - ** ` standard ` ** (default) - Smart context: includes context only for dirty/distance states, excludes for clean tagged
55+ - ** ` standard-no-context ` ** - Never includes build context (branch.commit info)
56+ - ** ` standard-context ` ** - Always includes build context
57+ - ** ` standard-base ` ** - Base version only (e.g., ` 1.2.3 ` )
58+ - ** ` standard-base-prerelease ` ** - Base + prerelease (e.g., ` 1.2.3-alpha.1 ` )
59+ - ** ` standard-base-prerelease-post ` ** - Base + prerelease + post (e.g., ` 1.2.3-alpha.1.post.2 ` )
60+ - ** ` standard-base-prerelease-post-dev ` ** - Base + prerelease + post + dev (e.g., ` 1.2.3-alpha.1.post.2.dev.123 ` )
61+
62+ #### Schema Behavior Examples
63+
64+ ** Smart Context (` standard ` - default):**
65+
66+ - Clean tagged commit: ` 1.0.1-rc.1.post.1 `
67+ - Dirty working directory: ` 1.0.1-rc.1.post.1.dev.1729924622+feature.auth.1.a1b2c3d `
68+ - Distance from tag: ` 1.0.1-rc.1.post.2+feature.auth.2.c2d3e4f `
69+
70+ ** No Context (` standard-no-context ` ):**
71+
72+ - Any state: ` 1.0.1-rc.1.post.1 ` (never includes +branch.commit)
73+
74+ ** Always Context (` standard-context ` ):**
75+
76+ - Any state: ` 1.0.1-rc.1.post.1+feature.auth.1.a1b2c3d ` (always includes context)
77+
78+ ** Base Components:**
79+
80+ - ` standard-base ` : ` 1.2.3 `
81+ - ` standard-base-prerelease ` : ` 1.2.3-alpha.1 `
82+ - ` standard-base-prerelease-post ` : ` 1.2.3-alpha.1.post.2 `
83+ - ` standard-base-prerelease-post-dev ` : ` 1.2.3-alpha.1.post.2.dev.123 `
84+
85+ #### Schema Validation
86+
87+ ** Only standard schema family supported in zerv flow:**
88+
89+ - ✅ ** Valid** : ` standard ` , ` standard-no-context ` , ` standard-context ` , ` standard-base ` , ` standard-base-prerelease ` , ` standard-base-prerelease-post ` , ` standard-base-prerelease-post-dev `
90+ - ❌ ** Invalid** : Any ` calver* ` schema variants will produce error
91+ - ❌ ** Invalid** : Any deprecated tier-based schemas will produce error
92+
93+ ** Error handling:**
94+
95+ - Non-standard schemas will result in: ` Error: zerv flow only supports standard schema variants, got: 'calver' `
96+ - Invalid schema names will result in: ` Error: Unknown schema variant: 'invalid-schema' `
97+
5398## Pre-release Resolution Logic
5499
55100### Default Behavior (no flags)
@@ -162,43 +207,54 @@ zerv flow --branch-rules
162207
163208### Manual Override
164209
165- ** Mutually exclusive with ` -- pre-release-from-branch ` :**
210+ ** Schema can be combined with manual pre-release overrides :**
166211
167212``` bash
168- # Force specific pre-release type and number
169- zerv flow --pre-release-label beta --pre-release-num 1
213+ # Force specific pre-release type and number with context
214+ zerv flow --pre-release-label beta --pre-release-num 1 --schema standard-context
215+
216+ # Force rc for release-like branches, no context
217+ zerv flow --pre-release-label rc --pre-release-num 2 --schema standard-base-prerelease-post
170218
171- # Force rc for release-like branches
172- zerv flow --pre-release-label rc --pre-release-num 2
219+ # Force alpha for feature branches with full context
220+ zerv flow --pre-release-label alpha --schema standard-base-prerelease-post-dev-context
173221
174- # Force alpha for feature branches (uses hash by default)
175- zerv flow --pre-release-label alpha
222+ # Manual overrides with different schema levels
223+ zerv flow --pre-release-label beta --schema standard-base-prerelease
224+ zerv flow --pre-release-label rc --schema standard-base
176225```
177226
178227### Branch Override
179228
180229** Test different branch scenarios without switching branches:**
181230
182231``` bash
183- zerv flow --bumped-branch develop --pre-release-from-branch
184- zerv flow --bumped-branch release/1 --pre-release-from-branch
232+ # Test develop branch with different schemas
233+ zerv flow --bumped-branch develop --schema standard
234+ zerv flow --bumped-branch develop --schema standard-no-context
235+
236+ # Test release branch with specific schema
237+ zerv flow --bumped-branch release/1 --schema standard-base-prerelease-post-context
238+
239+ # Test feature branch scenarios
240+ zerv flow --bumped-branch feature/auth --schema standard-base-prerelease-post-dev
185241```
186242
187243## Output Modes
188244
189- ### Full Output (default)
245+ ### Full Output (default - ` standard ` schema )
190246
191247```
1922481.0.1-alpha.12345.post.2.dev.1729924622+feature.auth.2.a1b2c3d
193249```
194250
195- ### Pre-release Output (` --with-pre-release ` )
251+ ### Pre-release Output (` --schema standard-base-prerelease-post ` )
196252
197253```
1982541.0.1-alpha.12345.post.2
199255```
200256
201- ### Base-Only Output (` --base-only ` )
257+ ### Base-Only Output (` --schema standard-base ` )
202258
203259```
2042601.0.1
@@ -235,36 +291,42 @@ zerv flow --bumped-branch release/1 --pre-release-from-branch
235291### Basic Usage
236292
237293``` bash
238- # Generate flow version with automatic pre-release
294+ # Generate flow version with smart context (default schema)
239295zerv flow
240296
241- # Enable branch pattern detection (GitFlow)
242- zerv flow --pre-release-from-branch
243-
244297# Force specific pre-release type
245298zerv flow --pre-release-label beta
246299
247300# Include pre-release/post-release but no build context
248- zerv flow --with-pre-release
301+ zerv flow --schema standard-base-prerelease-post
249302
250303# Base version only
251- zerv flow --base-only
304+ zerv flow --schema standard-base
305+
306+ # Never include build context
307+ zerv flow --schema standard-no-context
308+
309+ # Always include build context
310+ zerv flow --schema standard-context
252311```
253312
254313### Advanced Usage
255314
256315``` bash
257- # Complete control over pre-release
258- zerv flow --bumped-branch release/1 --pre-release-from-branch
316+ # Complete control over pre-release with schema
317+ zerv flow --bumped-branch release/1 --schema standard-base-prerelease-post-context
259318
260- # Custom template output
261- zerv flow --output-template " v{{version}}-{{pre_release}}"
319+ # Custom template output with specific schema
320+ zerv flow --schema standard-base -- output-template " v{{version}}-{{pre_release}}"
262321
263322# Different repository directory
264- zerv flow --directory ../other-repo
323+ zerv flow --directory ../other-repo --schema standard
265324
266325# Verbose output
267- zerv flow --verbose
326+ zerv flow --verbose --schema standard-base-prerelease-post-dev
327+
328+ # Error case - this will fail with calver schema
329+ zerv flow --schema calver # Error: zerv flow only supports standard schema variants
268330```
269331
270332## Future Configuration
@@ -291,11 +353,11 @@ zerv flow --config .zerv.ron
291353
292354## Key Design Principles
293355
294- 1 . ** Mirror zerv version** : Same output/input options structure
295- 2 . ** Intelligent defaults** : Smart branch-based pre-release detection
296- 3 . ** Flexible overrides** : Manual control when needed
297- 4 . ** Honest versioning** : Never hides Git state, always accurate
298- 5 . ** Clean alternatives ** : ` --with-pre-release ` and ` --base-only ` for simplified output
356+ 1 . ** Mirror zerv version** : Same output/input options structure with shared schema system
357+ 2 . ** Intelligent defaults** : Smart branch-based pre-release detection with smart context schema
358+ 3 . ** Flexible overrides** : Manual control when needed, including schema selection
359+ 4 . ** Honest versioning** : Never hides Git state, always accurate (unless explicitly requested via schema)
360+ 5 . ** Schema-based flexibility ** : Single ` --schema ` argument replaces multiple context/control flags
299361
300362---
301363
0 commit comments