From e2ff2c5499c46ae0f164cd08be3fc6a78eeeafb5 Mon Sep 17 00:00:00 2001 From: Kyle Sexton <153232337+kyle-sexton@users.noreply.github.com> Date: Tue, 21 Jul 2026 12:05:49 -0400 Subject: [PATCH 1/3] feat(toolchain): add pyright to python ecosystem check-cmd CI gates pyright but the local /toolchain:check batch was ruff-only, so agents could pass locally and still fail CI on type errors. Closes #834 Co-Authored-By: Claude Sonnet 5 Claude-Session: 0f69ae76-07e0-4aae-9c4a-11688fc0e8ea --- plugins/toolchain/.claude-plugin/plugin.json | 2 +- plugins/toolchain/CHANGELOG.md | 11 +++++++++++ plugins/toolchain/reference/ecosystems/python.yaml | 8 ++++---- plugins/toolchain/skills/check/context/python.md | 5 ++++- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/plugins/toolchain/.claude-plugin/plugin.json b/plugins/toolchain/.claude-plugin/plugin.json index c4ee3e7ab8..32a5a7db80 100644 --- a/plugins/toolchain/.claude-plugin/plugin.json +++ b/plugins/toolchain/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json", "name": "toolchain", - "version": "0.5.1", + "version": "0.6.0", "description": "Repo-agnostic polyglot verification toolchain: build + test + lint for changed files across .NET, Python, TypeScript, Bash, PowerShell, Markdown, YAML, and cross-cutting surfaces (`/toolchain:check`, `/toolchain:lint`), plus a re-runnable `/toolchain:setup` with check (report the configured ecosystems and their command surface) and apply (interview, infer, and write the tracked per-ecosystem command config those skills resolve first).", "author": { "name": "Melodic Software", diff --git a/plugins/toolchain/CHANGELOG.md b/plugins/toolchain/CHANGELOG.md index d2cea57a15..95a94c23b9 100644 --- a/plugins/toolchain/CHANGELOG.md +++ b/plugins/toolchain/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to the `toolchain` plugin are documented here. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this plugin uses semantic versioning. +## [0.6.0] + +### Added + +- **`pyright` added to the bundled Python ecosystem default's `check-cmd`.** Local `/toolchain:check` + now runs `uv run pyright` alongside the existing ruff lint/format check, closing the gap where CI + gated pyright but the local batch was ruff-only. Rung-4 fallback only — a consumer's own + `.claude/ecosystems/python.yaml` overrides `check-cmd` key-by-key and is unaffected. `fix-cmd` is + unchanged (pyright has no fix mode). `context/python.md` documents the default basic-mode gotcha + for untyped projects. + ## [0.5.1] ### Changed diff --git a/plugins/toolchain/reference/ecosystems/python.yaml b/plugins/toolchain/reference/ecosystems/python.yaml index ec98392558..168b6bfd42 100644 --- a/plugins/toolchain/reference/ecosystems/python.yaml +++ b/plugins/toolchain/reference/ecosystems/python.yaml @@ -5,7 +5,7 @@ globs: ["*.py", "pyproject.toml", "uv.lock"] project-discovery: ["pyproject.toml"] build-cmd: null # no separate build step; lint/test cover verification test-cmd: "uv run pytest -x -q" # plain pytest when the project doesn't use uv -check-cmd: "uv run ruff check . --no-fix && uv run ruff format . --check" -fix-cmd: "uv run ruff check . --fix && uv run ruff format ." -opt-in: "ruff config (ruff.toml, .ruff.toml, or pyproject.toml [tool.ruff])" -install-hint: "pip install ruff uv | brew install uv ruff | winget install astral-sh.uv" +check-cmd: "uv run ruff check . --no-fix && uv run ruff format . --check && uv run pyright" +fix-cmd: "uv run ruff check . --fix && uv run ruff format ." # pyright has no fix mode +opt-in: "ruff config (ruff.toml, .ruff.toml, or pyproject.toml [tool.ruff]); pyright runs in its default basic mode absent a pyrightconfig.json or pyproject.toml [tool.pyright]" +install-hint: "pip install ruff pyright uv | brew install uv ruff pyright | winget install astral-sh.uv" diff --git a/plugins/toolchain/skills/check/context/python.md b/plugins/toolchain/skills/check/context/python.md index e0c9129212..35630a93fa 100644 --- a/plugins/toolchain/skills/check/context/python.md +++ b/plugins/toolchain/skills/check/context/python.md @@ -26,7 +26,9 @@ cd "$PROJECT_DIR" && uv run ruff format . cd "$PROJECT_DIR" && uv run pytest tests/ -x -q ``` -## Type check (when configured) +## Type check + +Part of `check-cmd` (no fix mode — `fix-cmd` only runs the two ruff commands): ```bash cd "$PROJECT_DIR" && uv run pyright @@ -36,6 +38,7 @@ cd "$PROJECT_DIR" && uv run pyright - **Use `uv run` prefix in uv-managed projects** (a `uv.lock` is the signal) — it ensures the managed virtualenv is used. In pip/poetry projects, use that project's documented invocation instead - **E501 (line-too-long) is not auto-fixable** — the formatter handles code wrapping, but docstrings/comments/string literals exceeding the configured `line-length` must be shortened manually +- **pyright runs in its default basic mode absent a `pyrightconfig.json` or `pyproject.toml [tool.pyright]`** — an untyped project will surface reportMissingTypeStubs/reportUnknownX noise; add project config to narrow the mode (e.g. `typeCheckingMode`) rather than suppressing findings ad hoc - **Run from project directory** — each `pyproject.toml` defines an independent project root. Always `cd` to the directory containing `pyproject.toml` before running commands - **`encoding='utf-8'`** — always specify on Windows `open()` calls From bd3ff560b28086508e118432c459cabe58814dbc Mon Sep 17 00:00:00 2001 From: Kyle Sexton <153232337+kyle-sexton@users.noreply.github.com> Date: Tue, 21 Jul 2026 14:50:46 -0400 Subject: [PATCH 2/3] docs(toolchain): correct pyright default mode to standard Pyright's default typeCheckingMode is `standard`, not `basic`, and the reportMissingTypeStubs/reportUnknown* diagnostics default to `none` in both basic and standard modes (per microsoft/pyright configuration.md). Fix the false "basic mode" / reportUnknown-noise claim in the python ecosystem opt-in text, the python.md gotcha, and the CHANGELOG entry. Co-Authored-By: Claude Opus 4.8 --- plugins/toolchain/CHANGELOG.md | 2 +- plugins/toolchain/reference/ecosystems/python.yaml | 2 +- plugins/toolchain/skills/check/context/python.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/toolchain/CHANGELOG.md b/plugins/toolchain/CHANGELOG.md index 65c986f772..03817b1a5b 100644 --- a/plugins/toolchain/CHANGELOG.md +++ b/plugins/toolchain/CHANGELOG.md @@ -11,7 +11,7 @@ All notable changes to the `toolchain` plugin are documented here. Format follow now runs `uv run pyright` alongside the existing ruff lint/format check, closing the gap where CI gated pyright but the local batch was ruff-only. Rung-4 fallback only — a consumer's own `.claude/ecosystems/python.yaml` overrides `check-cmd` key-by-key and is unaffected. `fix-cmd` is - unchanged (pyright has no fix mode). `context/python.md` documents the default basic-mode gotcha + unchanged (pyright has no fix mode). `context/python.md` documents the default standard-mode gotcha for untyped projects. ## [0.5.2] diff --git a/plugins/toolchain/reference/ecosystems/python.yaml b/plugins/toolchain/reference/ecosystems/python.yaml index 168b6bfd42..f3a9ddad4f 100644 --- a/plugins/toolchain/reference/ecosystems/python.yaml +++ b/plugins/toolchain/reference/ecosystems/python.yaml @@ -7,5 +7,5 @@ build-cmd: null # no separate build step; lint/test cover verification test-cmd: "uv run pytest -x -q" # plain pytest when the project doesn't use uv check-cmd: "uv run ruff check . --no-fix && uv run ruff format . --check && uv run pyright" fix-cmd: "uv run ruff check . --fix && uv run ruff format ." # pyright has no fix mode -opt-in: "ruff config (ruff.toml, .ruff.toml, or pyproject.toml [tool.ruff]); pyright runs in its default basic mode absent a pyrightconfig.json or pyproject.toml [tool.pyright]" +opt-in: "ruff config (ruff.toml, .ruff.toml, or pyproject.toml [tool.ruff]); pyright runs in its default standard mode absent a pyrightconfig.json or pyproject.toml [tool.pyright]" install-hint: "pip install ruff pyright uv | brew install uv ruff pyright | winget install astral-sh.uv" diff --git a/plugins/toolchain/skills/check/context/python.md b/plugins/toolchain/skills/check/context/python.md index 35630a93fa..4109f604d1 100644 --- a/plugins/toolchain/skills/check/context/python.md +++ b/plugins/toolchain/skills/check/context/python.md @@ -38,7 +38,7 @@ cd "$PROJECT_DIR" && uv run pyright - **Use `uv run` prefix in uv-managed projects** (a `uv.lock` is the signal) — it ensures the managed virtualenv is used. In pip/poetry projects, use that project's documented invocation instead - **E501 (line-too-long) is not auto-fixable** — the formatter handles code wrapping, but docstrings/comments/string literals exceeding the configured `line-length` must be shortened manually -- **pyright runs in its default basic mode absent a `pyrightconfig.json` or `pyproject.toml [tool.pyright]`** — an untyped project will surface reportMissingTypeStubs/reportUnknownX noise; add project config to narrow the mode (e.g. `typeCheckingMode`) rather than suppressing findings ad hoc +- **pyright runs in its default standard mode absent a `pyrightconfig.json` or `pyproject.toml [tool.pyright]`** — on an untyped or partially-typed project this can surface genuine type errors; set `typeCheckingMode` (e.g. `basic` or `off`) or add project config to tune the strictness rather than suppressing findings ad hoc - **Run from project directory** — each `pyproject.toml` defines an independent project root. Always `cd` to the directory containing `pyproject.toml` before running commands - **`encoding='utf-8'`** — always specify on Windows `open()` calls From 2f0ef497216c1a62a48f58ac96187cdddeb45feb Mon Sep 17 00:00:00 2001 From: Kyle Sexton <153232337+kyle-sexton@users.noreply.github.com> Date: Tue, 21 Jul 2026 18:24:32 -0400 Subject: [PATCH 3/3] fix(toolchain): align version to 0.7.0 (main is at 0.6.0) main advanced to 0.6.0 (dotnet feature #890) after this branch had bumped to 0.8.0, leaving a skipped 0.7.0 with no CHANGELOG entry. The pyright addition is a single minor feature over 0.6.0, so 0.7.0 is the correct next version. Retitle the CHANGELOG head entry and the plugin.json version from 0.8.0 to 0.7.0. Co-Authored-By: Claude Opus 4.8 --- plugins/toolchain/.claude-plugin/plugin.json | 2 +- plugins/toolchain/CHANGELOG.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/toolchain/.claude-plugin/plugin.json b/plugins/toolchain/.claude-plugin/plugin.json index b4e771a1f8..9313543ec6 100644 --- a/plugins/toolchain/.claude-plugin/plugin.json +++ b/plugins/toolchain/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json", "name": "toolchain", - "version": "0.8.0", + "version": "0.7.0", "description": "Repo-agnostic polyglot verification toolchain: build + test + lint for changed files across .NET, Python, TypeScript, Bash, PowerShell, Markdown, YAML, and cross-cutting surfaces (`/toolchain:check`, `/toolchain:lint`), plus a re-runnable `/toolchain:setup` with check (report the configured ecosystems and their command surface) and apply (interview, infer, and write the tracked per-ecosystem command config those skills resolve first).", "author": { "name": "Melodic Software", diff --git a/plugins/toolchain/CHANGELOG.md b/plugins/toolchain/CHANGELOG.md index 9b757eb485..7a93733147 100644 --- a/plugins/toolchain/CHANGELOG.md +++ b/plugins/toolchain/CHANGELOG.md @@ -3,7 +3,7 @@ All notable changes to the `toolchain` plugin are documented here. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this plugin uses semantic versioning. -## [0.8.0] +## [0.7.0] ### Added