noCV
CLI-102 · Know what will change

Give scripts a stable JSON output contract

Practice briefStoryFoundational

CI currently scrapes a colored table and breaks when a package name wraps. Add --json to inspect so automation can consume a versioned response.

Focused work estimate
1h 15m + prerequisites
Priority in the scenario
Medium
Engineering practice
API contracts · CLI design · Compatibility

Estimated field mix

  • Developer tooling70%
  • API design30%

Field percentages are editorial estimates of the ticket's engineering focus. They total 100%; they are not measured time, proficiency scores, or ownership evidence.

Your next step

Review it, then add it to your workspace.

The board opens an editable draft; nothing is saved until you confirm it. Sign-in and workspace permissions apply, and Demo boards remain ephemeral.

Project context

A team maintains six related packages. Release notes, version changes, and tags are copied between a spreadsheet and a terminal; a failed upload recently left two packages ahead of their dependents. The exercise uses temporary repositories and a fake registry.

Setup prerequisites

  • Create a temporary Git repository with three related fixture packages.
  • Use a local registry double; no publishing credentials are required.

Preceding work

Complete these dependencies, or supply their agreed outputs before taking this ticket.

Acceptance criteria

  • JSON output includes schemaVersion, workspace packages, and warnings with stable field names.
  • Stdout contains exactly one JSON document with no ANSI escapes.
  • Diagnostics go to stderr and invalid arguments keep a documented nonzero exit code.

Implementation constraints

  • Keep human rendering separate from the result model.

Verification to include

  • Parse stdout from a successful --json run with JSON.parse.
  • Combine --json with an unknown flag and assert no partial success document is printed.

Deliverables

  • JSON response schema and CLI exit-code reference

Rollout and recovery

Add the opt-in format without changing existing human output; version incompatible schema changes.

Value of the work

For the engineer: Practice CLI contracts, graph reasoning, filesystem safety, and recovery from partial work.

For the team: Review how an engineer makes release changes inspectable and recoverable before they affect consumers.

Evidence boundaries

Outcome Evidence: Tests, patches, and runbooks are requested deliverables. They become Outcome Evidence only through a qualified Mission and immutable Evidence IDs.

Ownership Evidence: Independent adaptation must be observed under a declared verification policy and cite immutable Evidence IDs. Completing a planning ticket establishes no Ownership Evidence.