mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-19 02:17:09 +00:00
Add structured JSON output support for agent and CI/CD consumption: Phase 1 (mutating): sync, install, update, uninstall, collect Phase 2 (read-only): target list, status, diff Key design decisions: - Per-command JSON schema (no universal envelope) - Shared helper: writeJSON() with recursive nil slice→[] conversion - --json implies --force for mutating commands (skip prompts) - TUI/spinners suppressed; progress goes to stderr, JSON to stdout - 10 integration tests covering valid JSON, dry-run, nil slices Also includes post-review cleanup: - ensureEmptySlices now recurses into nested structs/slices - Unified mode resolution via getTargetMode() (removed 4 duplicates) - sync --json now creates backups (behavioral parity with non-JSON) - targetList no longer double-parses --json flag