Awesome Reviewers

Reviewer · API

Preserve public API compatibility

Treat any exported function, method, or serialized output (e.g., `to_dict`/`to_json`/`to_yaml`) as a public contract: external callers and downstream consumers depend on its signature, parameter semantics, and output schema even if no in-repo caller currently relies on it. Before removing/renaming parameters, dropping keys from a serialized payload, or...

Instruction

Treat any exported function, method, or serialized output (e.g., to_dict/to_json/to_yaml) as a public contract: external callers and downstream consumers depend on its signature, parameter semantics, and output schema even if no in-repo caller currently relies on it. Before removing/renaming parameters, dropping keys from a serialized payload, or narrowing the guarantees of a flag like strict, consider the impact on callers outside the repo.

Concretely:

  • Do not remove or reorder positional parameters from public functions without a backward-compatible path. If a parameter is no longer needed, keep it as a deprecated keyword-only argument (ignored, optionally with a DeprecationWarning) rather than breaking the call signature outright.
  • Do not silently change the shape of serialized output (adding/removing keys, changing placeholder behavior). If keys must be dropped or placeholders removed, call this out explicitly as a breaking change and document it (changelog entry or release notes), not just in the PR description, since that text is invisible to API consumers reading the code later.
  • When a flag changes behavior partway through an object graph (e.g., strict=True only covering some nested types but not others with their own to_dict()), document the exact scope and limitations in the method’s docstring so callers can rely on it correctly, instead of leaving the caveat only in review discussion or PR notes.

Example of a safer, non-breaking signature change:

def get_synthesis_prompt(
    query: str,
    id_to_member: Dict[str, str],
    *,
    original_responses: Dict[str, str] = None,  # deprecated, ignored
    evaluations: Dict[str, str] = None,          # deprecated, ignored
) -> str:
    ...

This keeps existing callers working while signaling the parameters are no longer used.</description> </RawReviewerOutputSchema>