pub fn validate_spec(spec: &RootSpec) -> Result<()>
Validate every command in the tree (after merges or programmatic edits).