Problem
Some --json commands return plain text instead of JSON for certain states:
kild pr my-branch --json
# "No PR found for branch 'kild/my-branch'" ← plain text, not JSON
This breaks the Assistant Agent persona's ability to reliably parse CLI output. The --json flag is a contract: "this command will return valid JSON."
Expected Behavior
Every --json command should return valid JSON for all states:
kild pr my-branch --json
# {"pr": null, "branch": "kild/my-branch"}
kild pr my-branch --json # when PR exists
# {"pr": {"number": 123, "state": "open", ...}, "branch": "kild/my-branch"}
Scope
Audit all commands with --json flag:
Principle
From the branding docs: "Must have --json output for parsing" and "Meaningful exit codes." The --json output is the programmatic API surface for the Assistant Agent and Worker Agent personas. It must be reliable.
Problem
Some
--jsoncommands return plain text instead of JSON for certain states:kild pr my-branch --json # "No PR found for branch 'kild/my-branch'" ← plain text, not JSONThis breaks the Assistant Agent persona's ability to reliably parse CLI output. The
--jsonflag is a contract: "this command will return valid JSON."Expected Behavior
Every
--jsoncommand should return valid JSON for all states:Scope
Audit all commands with
--jsonflag:kild list --json— appears correctkild status --json— appears correctkild stats --json— appears correctkild stats --all --json— appears correctkild overlaps --json— appears correctkild pr --json— BROKEN (returns plain text for no-PR case)kild pr --json --refresh— needs verificationkild daemon status --json— appears correctkild health --json— needs verification (if it exists)Principle
From the branding docs: "Must have
--jsonoutput for parsing" and "Meaningful exit codes." The--jsonoutput is the programmatic API surface for the Assistant Agent and Worker Agent personas. It must be reliable.