Commit 22c4b05
refactor: schema-driven pred create (11K → 2.3K lines) (#1008)
* docs: add schema-driven create.rs refactor design spec
Design for replacing the 11K-line create.rs with a schema-driven
generic dispatch using existing registry factory functions. Targets
~73% line reduction by eliminating the 5,400-line match statement.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* docs: update design spec with Codex review findings
- Fix problem count (177 → 189)
- Expand type parser table from 16 to 52 types in 3 categories
- Add serde edge cases section (try_from, from, skip, custom BigUint)
- Add Appendix A with complete flag→field mismatch list
- Add generic resolution notes for W, W::Sum, Vec<Vec<W>>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Phase 1: align create CLI flags with schema names
* Phase 4: add CreateArgs flag map
* Phase 2: add schema field parser registry
* Phase 3: add schema-driven create builder
* Phase 6: wire schema-driven create with fallback
* Phase 5: generate create help from schema examples
* refactor: expand schema-driven create coverage
* refactor: remove legacy create match arms
* chore: clean schema-driven create refactor
* docs: update skills and CLAUDE.md for schema-driven create
- add-model Step 4.5: replace "add match arm" with schema-driven instructions
- review-structural check 13: replace grep for problem name with schema field→flag verification
- CLAUDE.md Extension Points: document schema-driven create convention
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* chore: dedup all_data_flags_empty, remove legacy flag_map aliases, enforce schema naming
- Remove 16 duplicate field checks in all_data_flags_empty()
- Remove backward-compat aliases ("sets", "query") from flag_map();
schema-derived names ("subsets", "query-attribute") are canonical
- Map schema field "sets" → "subsets" in help_flag_name for consistency
- Add CLAUDE.md rule: CLI flag names must match schema field names
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 2c81f94 commit 22c4b05
10 files changed
Lines changed: 7064 additions & 8938 deletions
File tree
- .claude
- skills
- add-model
- review-structural
- problemreductions-cli
- src
- commands
- create
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| 175 | + | |
| 176 | + | |
175 | 177 | | |
176 | 178 | | |
177 | | - | |
| 179 | + | |
178 | 180 | | |
179 | 181 | | |
180 | 182 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
179 | 179 | | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
| 180 | + | |
184 | 181 | | |
185 | | - | |
| 182 | + | |
186 | 183 | | |
187 | | - | |
| 184 | + | |
188 | 185 | | |
189 | | - | |
| 186 | + | |
190 | 187 | | |
191 | 188 | | |
192 | 189 | | |
| |||
315 | 312 | | |
316 | 313 | | |
317 | 314 | | |
318 | | - | |
319 | | - | |
| 315 | + | |
| 316 | + | |
320 | 317 | | |
321 | 318 | | |
322 | 319 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
0 commit comments