argot.check_hunk
Score a code hunk against your repository's learned style patterns to verify it fits the codebase's voice. Use for isolated snippets when no Git changeset is available.
Instructions
Score one supplied code hunk with Argot's fast fitted voice model. Use while drafting or for an isolated snippet when no Git changeset exists. Returns out_of_voice, score, threshold, rule, and concise evidence; it does not run semantic, architecture, integrity, or custom rules. For a real change, prefer check_changeset. Read-only; requires a fitted repository.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Repo-relative path of the file the hunk belongs to. Its extension selects the language and that language's model (e.g. `.py`→Python, `.ts`→TypeScript, `.rs`→Rust); an unsupported extension yields no score. | |
| file_source | No | Optional: the full current text of the file. Provide it so argot can resolve callees against the surrounding code (more accurate when the hunk references names defined elsewhere in the file); omit it and the hunk is scored in isolation. | |
| hunk_content | Yes | The changed code to score — the added/edited lines, not the whole file. A few lines is enough; argot scores the hunk, not the file. |