|
30 | 30 |
|
31 | 31 | ### 🔄 **Next Steps:** |
32 | 32 |
|
33 | | -- **Phase 2**: Implement branch pattern system and flow-to-version translation logic |
34 | | -- **Phase 3**: Complete pipeline assembly with actual version command integration |
35 | | -- **Phase 4**: Comprehensive testing and documentation |
| 33 | +- **Phase 2**: Implement basic flow pipeline structure with version command integration (IN PROGRESS) |
| 34 | +- **Phase 3**: Add branch pattern system and flow-to-version translation logic |
| 35 | +- **Phase 4**: Complete pipeline assembly and comprehensive testing |
36 | 36 |
|
37 | 37 | ## Goals |
38 | 38 |
|
|
94 | 94 | - ✅ Add proper error propagation in dispatch |
95 | 95 | - **Validation**: ✅ `zerv flow --help` shows all arguments correctly |
96 | 96 |
|
97 | | -### Phase 2: Flow Logic as Translation Layer |
| 97 | +### Phase 2: Basic Flow Pipeline Implementation |
| 98 | + |
| 99 | +#### Step 4: Implement Basic run_flow_pipeline Structure 🔄 |
| 100 | + |
| 101 | +- **File**: `src/cli/flow/pipeline.rs` (update existing file) |
| 102 | +- **Tasks**: |
| 103 | + - 🔄 Implement basic `run_flow_pipeline()` function structure |
| 104 | + - 🔄 Call `zerv version --output-format zerv` using existing version pipeline |
| 105 | + - 🔄 Parse RON output to Zerv object using existing parsing logic |
| 106 | + - 🔄 Use `OutputFormatter::format_output()` for consistent output formatting |
| 107 | + - 🔄 Keep it simple - no argument translation yet, just basic version call |
| 108 | + - 🔄 Return formatted string result like version pipeline |
| 109 | + - **TODO**: Fix import paths and error types for compilation |
| 110 | +- **Validation**: Basic flow pipeline works and returns version output |
98 | 111 |
|
99 | | -#### Step 4: Create Branch Pattern System |
| 112 | +#### Step 5: Create Version Command Wrapper 🔄 |
| 113 | + |
| 114 | +- **File**: `src/cli/flow/wrapper.rs` (new file) |
| 115 | +- **Tasks**: |
| 116 | + - 🔄 Create wrapper to call existing `run_version_pipeline()` function |
| 117 | + - 🔄 Set up default `VersionArgs` with `--output-format zerv` for RON output |
| 118 | + - 🔄 Parse returned RON string into `Zerv` object using existing deserialization |
| 119 | + - **TODO**: Fix import path to `crate::version::zerv::core::Zerv` |
| 120 | + - **TODO**: Fix error type for deserialization errors |
| 121 | + - 🔄 Reuse all existing version logic - no duplication |
| 122 | +- **Validation**: Wrapper successfully calls version command and returns Zerv object |
| 123 | + |
| 124 | +### Phase 3: Flow Logic as Translation Layer |
| 125 | + |
| 126 | +#### Step 6: Create Branch Pattern System |
100 | 127 |
|
101 | 128 | - **File**: `src/cli/flow/branch_rules.rs` (new file) |
102 | 129 | - **Tasks**: |
|
108 | 135 | - Keep it simple - just pattern matching and rule lookup |
109 | 136 | - **Validation**: Pattern matching works correctly for branch detection |
110 | 137 |
|
111 | | -#### Step 5: Create Flow-to-Version Translation Logic |
| 138 | +#### Step 7: Create Flow-to-Version Translation Logic |
112 | 139 |
|
113 | 140 | - **File**: `src/cli/flow/translator.rs` (new file) |
114 | 141 | - **Tasks**: |
|
121 | 148 | - Keep logic minimal - just translation, no version calculation |
122 | 149 | - **Validation**: Translation produces correct `VersionArgs` for all scenarios |
123 | 150 |
|
124 | | -#### Step 6: Create Version Command Wrapper |
125 | | - |
126 | | -- **File**: `src/cli/flow/wrapper.rs` (new file) |
127 | | -- **Tasks**: |
128 | | - - Create wrapper to call existing `run_version_pipeline()` function |
129 | | - - Support multiple version command calls if needed (like piping) |
130 | | - - Handle conversion between flow output modes and version command options |
131 | | - - Parse Zerv objects returned from version command for further processing |
132 | | - - Ensure proper error handling from version command calls |
133 | | - - Reuse all existing version logic - no duplication |
134 | | -- **Validation**: Wrapper successfully calls version command and returns results |
135 | | - |
136 | | -### Phase 3: Pipeline Assembly |
| 151 | +### Phase 4: Pipeline Assembly |
137 | 152 |
|
138 | | -#### Step 7: Assemble Flow Pipeline |
| 153 | +#### Step 8: Assemble Flow Pipeline |
139 | 154 |
|
140 | 155 | - **File**: `src/cli/flow/pipeline.rs` (continued) |
141 | 156 | - **Tasks**: |
142 | | - - Create `run_flow_pipeline(args: FlowArgs) -> Result<String, ZervError>` function |
143 | | - - Simple pipeline: validate args → translate to version args → call version command → format output |
| 157 | + - Update `run_flow_pipeline(args: FlowArgs) -> Result<String, ZervError>` function |
| 158 | + - Complete pipeline: validate args → translate to version args → call version command → format output |
144 | 159 | - Use existing `run_version_pipeline()` for all heavy lifting |
145 | 160 | - Handle output mode translation (`--with-pre-release`, `--base-only`) |
146 | 161 | - Keep flow logic minimal - most work delegated to version command |
147 | 162 | - Add verbose output showing translation results for debugging |
148 | 163 | - **Validation**: Complete flow works end-to-end using version command |
149 | 164 |
|
150 | | -#### Step 8: Add Argument Validation ✅ |
| 165 | +#### Step 9: Add Argument Validation ✅ |
151 | 166 |
|
152 | 167 | - **File**: `src/cli/flow/args/validation.rs` |
153 | 168 | - **Tasks**: |
|
160 | 175 | - ✅ Use shared validation for input/output conflicts |
161 | 176 | - **Validation**: ✅ All validation scenarios work correctly |
162 | 177 |
|
163 | | -### Phase 4: Testing and Documentation |
| 178 | +### Phase 5: Testing and Documentation |
164 | 179 |
|
165 | | -#### Step 9: Add Comprehensive Test Suite |
| 180 | +#### Step 10: Add Comprehensive Test Suite |
166 | 181 |
|
167 | 182 | - **Files**: |
168 | 183 | - `src/cli/flow/` - Add `#[cfg(test)] mod tests` blocks to each module |
|
176 | 191 | - Test error scenarios and edge cases |
177 | 192 | - **Validation**: All tests pass and coverage is adequate |
178 | 193 |
|
179 | | -#### Step 10: Update Documentation and Help Text |
| 194 | +#### Step 11: Update Documentation and Help Text |
180 | 195 |
|
181 | 196 | - **Files**: |
182 | 197 | - `src/cli/flow/args.rs` - Update doc comments for help text |
|
0 commit comments