Ce docstring author

From Moffran/calibrated_explanations · View interactive version

Ce docstring author is an AI agent skill from the GitHub repository Moffran/calibrated_explanations. Write or repair NumPy-style docstrings for public CE APIs following STD-002 and contributor documentation rules.

How to use this skill

Skill file

CE Docstring Author

You are writing or fixing Numpy-style docstrings for CE source code.

Numpy style is mandatory for all public symbols in src/calibrated_explanations/.

Load references/docstring_patterns.md for full templates and CE-specific patterns.


Section presence rules

| Section | When required |

|---|---|

| One-line summary | Always |

| Parameters | When there are >= 1 parameters |

| Returns | When the function returns a non-None value |

| Raises | When the function raises documented exceptions |

| Notes | Optional — use for non-obvious behaviour |

| References | Optional — when citing papers or ADRs |

| Examples | Strongly encouraged for public API; required for CE-First entry points |

Canonical order: Parameters -> Returns -> Raises -> Notes -> References -> Examples.


Type annotation format (in docstrings)

param : np.ndarray of shape (n_samples, n_features)
param : int or None, optional
param : {'regular', 'triangular', 'ensured'}, optional
param : list of str
param : Mapping[str, Any]
param : CalibratedExplanations
param : float, optional. Default 0.5.

Deprecation in docstrings

When a parameter is deprecated, add a .. deprecated:: directive in its entry:

param : int, optional
    .. deprecated:: 0.11.0
        Use ``new_param`` instead. Will be removed in v0.13.0.

Running docstring coverage

python scripts/quality/check_docstring_coverage.py src/

The coverage gate is tracked in docstring_coverage.txt. Public members with

missing docstrings appear as failures in CI.


Evaluation Checklist

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.