diff --git a/docs/conventions/hook-telemetry/README.md b/docs/conventions/hook-telemetry/README.md index 02b3575f9..01af5009d 100644 --- a/docs/conventions/hook-telemetry/README.md +++ b/docs/conventions/hook-telemetry/README.md @@ -154,6 +154,7 @@ producers without coordinating with them or each other. |----------|--------------|-------------| | `markdown-format` plugin | `markdown-format` | `data/markdown-format.schema.json` | | `typos-format` plugin | `typos-format` | `data/typos-format.schema.json` | +| `ruff-format` plugin | `ruff-format` | `data/ruff-format.schema.json` | | `bash-format` plugin | `bash-format` | `data/bash-format.schema.json` | | `desktop-notification` plugin | `desktop-notification` | `data/desktop-notification.schema.json` | | `guardrails` plugin | `secret-pattern-detection` | `data/secret-pattern-detection.schema.json` | diff --git a/docs/conventions/hook-telemetry/data/ruff-format.schema.json b/docs/conventions/hook-telemetry/data/ruff-format.schema.json new file mode 100644 index 000000000..eb462b601 --- /dev/null +++ b/docs/conventions/hook-telemetry/data/ruff-format.schema.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/melodic-software/claude-code-plugins/main/docs/conventions/hook-telemetry/data/ruff-format.schema.json", + "title": "ruff-format telemetry data", + "description": "Per-hook `data` payload for the ruff-format hook. Discovered from the envelope `hook` value \"ruff-format\". Evolves additive-only.", + "type": "object", + "required": ["tool", "file", "findings"], + "additionalProperties": true, + "properties": { + "tool": { + "type": "string", + "description": "Claude Code tool that triggered the hook (Write or Edit)." + }, + "file": { + "type": "string", + "description": "Path of the formatted Python file, relative to the consuming repo root." + }, + "findings": { + "type": "array", + "items": { "type": "string" }, + "description": "Residual Ruff diagnostics remaining after check --fix and format, one concise line per diagnostic. Empty array = clean." + } + } +} diff --git a/plugins/ruff-format/.claude-plugin/plugin.json b/plugins/ruff-format/.claude-plugin/plugin.json index 29a8fea90..d6cce7c54 100644 --- a/plugins/ruff-format/.claude-plugin/plugin.json +++ b/plugins/ruff-format/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json", "name": "ruff-format", - "version": "0.4.2", + "version": "0.4.3", "description": "Auto-format and lint Python on edit via Ruff, only when a Ruff config governs the repo — using the consuming repo's own Ruff config.", "author": { "name": "Melodic Software", diff --git a/plugins/ruff-format/CHANGELOG.md b/plugins/ruff-format/CHANGELOG.md index 404e24c8e..87b70b890 100644 --- a/plugins/ruff-format/CHANGELOG.md +++ b/plugins/ruff-format/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to the `ruff-format` plugin are documented here. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this plugin uses semantic versioning. +## [0.4.3] + +### Fixed + +- Published `data/ruff-format.schema.json` in the hook-telemetry convention and + registered `ruff-format` in its Implementers table, closing the gap where the + hook's `hook::emit_telemetry("ruff-format", ...)` envelope had no per-hook + `data` schema for a consuming sink to validate against — unlike the sibling + `markdown-format` and `typos-format` producers. No hook behavior change. + ## [0.4.2] ### Changed