I0837 — Timing report as JSON
Under --json, print the timing report as one JSON object on stderr with phases and counters, so bench can carry a phase breakdown per sample.
READY wave 1 · p0 · implementation profile · runs alone
Part of M004 — Performance is executable evidence, and the hot path does no canonical work twice.
Ready. Every dependency is done, so majordomus plan start I0837 will be accepted.
Objective
Under --json, print the timing report as one JSON object on stderr with phases and counters, so bench can carry a phase breakdown per sample.
Why
A breakdown that only humans can read cannot be compared by a check.
Current state
The report is text.
Desired state
Same data, one line of JSON when --json is set, documented in docs/SCHEMAS.md.
Scope
- lib/common.sh
- docs/SCHEMAS.md
- lib/bench.sh
Dependencies
Acceptance criteria
- The JSON parses with jq and carries every phase and counter of the text form
Validation
- MJ_TIMING=1 bin/majordomus --json doctor
Evidence required
- phase_timing
Evidence
None recorded. Every token above needs a command or an artifact behind it before this issue can be completed; narrative is refused.
Risk
stdout stays the command's; the report stays on stderr in both forms.
Timeline
- started
- —
- verified
- —
- completed
- —
Those three fields, the evidence above and the state of the dependencies are all the status is made of. There is no status field to disagree with them.
Canonical record: .ai/repo/project/issues/I0837.yaml. Read it back with majordomus plan show I0837.