Closed
Labels
enhancementNew feature or requestNew feature or requestready-for-agentFully specified and ready for an AFK agentFully specified and ready for an AFK agent
Description
What to build
Provide a consistent, versioned machine-readable output contract for mdcode commands so an LLM agent can inspect blocks and results without parsing terminal prose.
Acceptance criteria
- List output can return a documented versioned JSON result containing stable block identifiers, language, metadata, content, and source locations.
- Extract, update, run, and dump expose equivalent structured success and failure results.
- Human-readable output remains available and JSON output is free of terminal color or progress text.
- The result schema and examples are documented and covered by integration tests.
Blocked by
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestready-for-agentFully specified and ready for an AFK agentFully specified and ready for an AFK agent
Activity
adrianbrowning commentedon Aug 8, 2026
Agent Brief
Category: enhancement
Summary: Provide a versioned JSON command contract for agent-facing mdcode operations.
Current behavior:
List can emit newline-delimited JSON metadata only. It omits block content, locations, and stable names. Other commands expose human-oriented console output, binary data, or process exits rather than a consistent structured outcome.
Desired behavior:
Every block-oriented CLI command supports one versioned JSON document per invocation. The envelope is consistent across commands: version, command, ok, result, and errors. Human-readable behavior remains available when JSON is not selected. JSON output is free of terminal formatting and progress prose.
Key interfaces:
Acceptance criteria:
Out of scope:
Verification status:
Confirmed: only list has partial JSON support; other commands use inconsistent presentation/output paths. This issue remains blocked by #16 until stable names are available.