Move control-plane --json off the shared persistent flag

main

Commit

gtrrz-victor2mo ago

--json was registered persistently on the repo/org/project/grant group roots, so every subcommand inherited it — including side-effect verbs (delete, clone, mirror create/remove, grant remove) that never render a payload and silently accepted it as a no-op. Cobra can't hide a persistent flag from a subset of children, so the flag now lives locally on exactly the 20 commands that honor it via the runCore* helpers. Non-honoring commands reject --json with "unknown flag" and no longer advertise it in help.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com Entire-Checkpoint: 01KX0QXN74C8QB357FH8FW1MA2

Checkpoints

Validate and Relocate JSON Global Flag

Claude CodeOpus 4.8[1m]
View session
Checkpoint 1