Skip to content

Good first issue: add machine-readable output to doubt validate #1

Description

@alsoleg89

Problem

doubt validate is useful for humans, while editor and CI integrations need structured findings without parsing terminal copy.

Proposed interface

doubt validate decision.doubt.json --format json

The command should print one JSON object containing:

  • valid
  • receipt (null for invalid maps)
  • metrics
  • findings with path, rule, and message

Acceptance criteria

  • Valid and invalid maps both produce parseable JSON.
  • Exit code remains 0 for valid maps and non-zero for invalid maps.
  • Default human-readable output is unchanged.
  • Tests cover both outcomes and paths containing spaces.
  • README command documentation is updated.
  • No runtime dependency is added.

Relevant code: src/cli.js, src/map.js, and test/cli.test.js.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions