#!/usr/bin/env python3 """Lint a structured review for channel separation, tone, and actionability.""" from __future__ import annotations import argparse import re from typing import Any from _common import ( ValidationError, error_exit, issue, read_markdown, write_json_report, ) AUTHOR_HEADING = "# Comments to authors" EDITOR_HEADING = "# Confidential comments to editor" COMMENT_HEADING_RE = re.compile( r"^###\s+(?PMajor|Minor)\s+comment(?:\s+(?P[A-Za-z0-9._:-]+))?\s*$", re.IGNORECASE, ) FIELD_RE = re.compile( r"^-\s*(?P