feat(code-add): supercharge JSON output — --json/-j alias, exit_code, duration_ms
muse code add and muse code reset now: - Accept --json / -j as shorthand for --format json (consistent with all other muse commands) - Emit exit_code and duration_ms in every JSON output path, including error branches (no matching files, wrong domain) - Use _CodeAddJson and _CodeResetJson TypedDicts for type-safe construction - Document exit_code and duration_ms in both handler docstrings - Suppress _collect_paths stderr in JSON mode via quiet=True so error JSON is the only output on stdout
tests/test_code_add_supercharge.py: 55 new tests across 7 classes — TestJsonAlias (10), TestDurationMs (10), TestExitCode (11), TestTypedDicts (8), TestDocstrings (4), TestErrorJson (5), TestAnsiSanitizationJson (4), TestPerformance (3).
tests/test_cmd_code_add.py: fix test_VI5 to pop duration_ms before comparing dry-run outputs (same pattern as workspace/worktree).
0 comments
muse hub commit comment sha256:40e8ab54d836e0e15c84bfb9646bdba0ec708b42046c1e00c35020fbb89d8eb2 --body "your comment"
No comments yet. Be the first to start the discussion.