Skip to content

[Agentic DX] cihai-cli: low-to-high lift output-contract roadmap #341

@tony

Description

@tony

Context

Review focused on src/cihai_cli/cli.py, formatter/output behavior, and command parity.

Goal

Provide consistent machine-output and predictable command contracts for automation.

Low-lift ideas

  • Add --format table|yaml|json|ndjson (or equivalent --json/--ndjson) to data-returning commands.
  • Route primary command payloads to stdout directly (not logging) to avoid parsing noise.
  • Document exit code semantics for not-found/error/success.

Medium-lift ideas

  • Add shared output layer aligned with unihan-etl output utilities.
  • Add explicit bootstrap behavior flags (--bootstrap, --no-bootstrap) for deterministic automation.
  • Add contract tests for machine-output modes.

High-lift ideas

  • Support streaming NDJSON for multi-result reverse lookups.
  • Publish output schema/version for automation clients.

Done when

  • CLI output is stable for pipes and tools.
  • Command side effects are explicit.
  • Schema evolution is manageable for downstream consumers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions