Skip to content

Add structured JSON output for automation - #9

Merged
HoungDev merged 1 commit into
mainfrom
agent/json-output
Aug 7, 2026
Merged

HoungDev merged 1 commit into
mainfrom
agent/json-output

Conversation

@HoungDev

@HoungDev HoungDev commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • add a stable JSON envelope to title, tags, rename, and undo
  • keep human-readable output as the default
  • send JSON success responses only to stdout and structured errors only to stderr
  • require explicit dry-run or yes mode for non-interactive rename and undo JSON calls
  • document schemas, statuses, exit codes, and automation examples
  • add process-level integration tests for success, errors, and non-mutating previews
  • include the JSON reference in source distributions

Why

Creator workflows often need to pass CLI results into scripts and CI pipelines. Human-oriented
text is useful interactively but difficult to parse reliably. A versioned envelope and stable
exit-code contract make the toolkit composable without weakening the safe confirmation behavior
added to file operations.

User impact

  • Add --json to any scriptable subcommand.
  • Rename and undo JSON calls never prompt or hang; they require --dry-run or --yes.
  • Runtime errors return exit code 1 with JSON on stderr.
  • Unsafe or incomplete JSON invocations return exit code 2.

Validation

  • ruff check .
  • ruff format --check .
  • pytest — 44 passed, 93.79% coverage
  • process-level JSON success, error, and preview tests
  • installed executable JSON parse smoke test
  • python -m build --no-isolation
  • python -m twine check
  • verified docs/json-output.md is included in the sdist
  • python -m pip_audit — no known vulnerabilities
  • python -m pip check

Closes #4

@HoungDev
HoungDev marked this pull request as ready for review August 7, 2026 03:12
@HoungDev
HoungDev merged commit 9d2074d into main Aug 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add structured JSON output for automation

1 participant