Skip to content

CLI 0.0.8 implementation plan

Goal: Finish the next CLI workflows and add useful image crop controls.

Architecture: Keep core unchanged. CLI owns configuration, process scheduling, dry-run and pager policy. Art owns crop anchors. Publish art independently before CLI; no publication is part of this preparation.

Accepted scope: package verification before tagging; bounded parallel file exports; full TOML/profile precedence and explicit boolean overrides; opt-in automatic paging and --no-pager; benchmarks, fresh demos and documentation; batch --dry-run; config show/validate; nine crop anchors with centre default.

Constraints: Rust 1.90; preserve default rendering and ordered terminal output; never page redirected stdout; no output writes during dry-run; independent versions (CLI 0.0.8, art 0.0.6, ext 0.0.6, core 0.0.4).

Tasks

  • [x] User-requested follow-up: add rich --demo, a paced tour composing existing renderers and CLI paths, with isolated examples, redirected transcripts, interruption cleanup, lean-build support, docs and regression coverage.

  • [x] Art: add ImageAnchor and builder to image_art.rs; crop cover at nine positions, contain unaffected. Test asymmetric source pixels and all anchors.

  • [x] Config: replace scalar parser with TOML schema in config.rs; merge defaults then selected profile regardless of document order, CLI last; reject unknown keys/types/profiles; inspect effective settings with config show/validate. Test quoted strings, invalid inactive profiles, false overrides and -- handling.
  • [x] Batch: separate planning and execution; dry-run emits inputs/destinations/errors without creating files. Execute file-export children with at most --jobs concurrent processes; spool output to temporary files for bounded memory and replay in input order; stop scheduling on failures unless continue-on-error. Test collisions, mixed failures, ordering and no writes.
  • [x] Pager: explicit --no-pager wins over config; --auto-pager pages only a TTY and only output taller than the viewport. Test policy without starting a pager; retain explicit --pager compatibility for terminal output.
  • [x] Packaging: CI checks unchanged workspace dependencies against registry package contents and verifies changed package artifacts against staged changed siblings. Test detection of the prior unversioned Clone API mismatch. Never treat staged success as registry publication readiness.
  • [x] Integration: wire image anchor flags, full config options and versions; add CLI integration tests. Run fmt, Clippy, workspace tests, MSRV and lean-feature checks.
  • [x] Evidence: benchmark serial/parallel file export with reproducible inputs and no promised speedup; record actual release-binary demos of crop anchors, batch dry-run and config. Update recipes, PORTING, changelog and release notes.
  • [x] Review: inspect combined diff and test evidence; create main-target PR and release handoff; monitor checks/review findings. No tags or upload.

Review focus

  1. Option-looking values and operands after -- must not be parsed as config switches.
  2. Parallel failures must preserve error classes and deterministic output order.
  3. Dry-run must not create parent directories or truncate existing exports.
  4. Invalid TOML in unused profiles must not silently pass validation.
  5. Unpublished sibling checks must not conceal mismatches with unchanged registry versions.

The implementation and initial review merged in PR #189; post-merge CI and docs deployment passed. A fresh review also identified hard-linked batch export aliases, covered by follow-up regression tests. Publication remains a separate gate.