Commit 0937393
committed
feat: persist backdrop preferences so styling stops needing flags
Every backdrop decision required a flag on the command line, which made the
most taste-driven knob in the tool the least reachable one. Closes the Phase 1
half of #27.
`cloche config` stores preferences in ~/.config/cloche/config.json, and both
`capture` and `polish` read them with no flags: pin a palette and scene, or
keep the picker random over a chosen subset of backdrops. `config options`
lists every palette with its gradient/space kind so a menu can be rendered
from the JSON contract rather than from help text.
`polish::style_from_seed_in_pool` takes the allow-lists. Empty lists mean
unconstrained, and the scene draw happens after every other field, so existing
`--style-seed` values keep rendering identically; a test compares composed card
pixels to hold that. Scenes are pinned at the polish layer rather than filtered
inside `Scene::generate`, which blends kinds with its own rolls and would bias
the pool instead of confining it.
`capture` gains `--palette` and `--scene` to match `polish`, on the CLI and on
the MCP tool, so a flag can override a pinned preference. Config names are
validated into warnings rather than errors: a typo in a preferences file should
not cost a screenshot.1 parent 840d507 commit 0937393
11 files changed
Lines changed: 1221 additions & 69 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
12 | 25 | | |
13 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
14 | 32 | | |
15 | 33 | | |
16 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
151 | 201 | | |
152 | 202 | | |
153 | 203 | | |
| |||
161 | 211 | | |
162 | 212 | | |
163 | 213 | | |
| 214 | + | |
164 | 215 | | |
165 | 216 | | |
166 | 217 | | |
167 | 218 | | |
168 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
169 | 225 | | |
170 | 226 | | |
171 | 227 | | |
| |||
174 | 230 | | |
175 | 231 | | |
176 | 232 | | |
| 233 | + | |
177 | 234 | | |
178 | 235 | | |
179 | 236 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
507 | 507 | | |
508 | 508 | | |
509 | 509 | | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
0 commit comments