Skip to content

US-4: Pretty JSON Mode #8

Description

@thm-design

US-4: Pretty JSON Mode

Parent Epic: #3 (JSON Formatter & Event Schema)

As a developer debugging Cortex manually,
I want to run cortex "test this" --json=pretty and get readable indented JSON,
so that I can inspect the structure without piping through jq.

Acceptance Criteria

  • --json=pretty outputs indented JSON blocks separated by blank lines
  • Each block is valid JSON that can be parsed independently
  • No Rich formatting or ANSI codes in output
  • Stderr may still receive non-JSON diagnostic messages
  • All event types supported in pretty mode

Technical Notes

  • --json=pretty sets json_mode="pretty" in argparse
  • JsonFormatter.format_event() switches on mode: ndjson vs pretty
  • Pretty mode uses json.dumps(indent=2) with blank-line separators between events
  • Stderr diagnostics are allowed (not suppressed)

Metadata

Metadata

Assignees

No one assigned

    Labels

    json-flagCortex --json flag featurestoryUser story with acceptance criteria

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions