Skip to content

fix(installer,skills): make uv a real requirement and stop assuming a system Python - #2704

Merged
bmadcode merged 1 commit into
mainfrom
uv-run-requirement
Aug 9, 2026
Merged

fix(installer,skills): make uv a real requirement and stop assuming a system Python#2704
bmadcode merged 1 commit into
mainfrom
uv-run-requirement

Conversation

@bmadcode

@bmadcode bmadcode commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

The installer told users uv was optional while bmad-build had already made it mandatory.

The contradiction

bmad-build/SKILL.md:13 — "On failure (including uv being unavailable), report the command output and HALT."

Meanwhile:

File Said
tools/installer/core/uv-check.js:84 "uv is becoming the de facto standard… BMAD installs fine without it"
tools/installer/install-messages.yaml:15 "🐍 HEADS UP: uv is becoming the de facto standard"
tools/installer/core/installer.js:1249 printed as a Tip, inside a box titled "BMAD is ready to use!"

And the probe's result was discarded — ui.js:216 was await checkUvEnvironment(); with no branch on {status: 'missing'}. A user could install, see green, run the headline skill of the release, and hit a halt.

What changed

Messaging names the consequence. The missing-uv warning says bmad-build and bmad-build-auto HALT, and that there is no interpreter fallback. installer.js repeats it in the post-install summary when it applies — the pre-install probe fires before every prompt, so by then it is far up the scrollback.

Still warn-don't-block. Core-only, docs-only, and CI installs never render a skill, so a missing uv must not fail the run. No new prompt, no non-zero exit.

A python3 probe, used only when uv is absent — the only case where the interpreter on PATH matters, since uv otherwise provisions its own. It distinguishes three states: 3.11+ present (direct-interpreter skills still work), below 3.11, and no python3 at all.

The other half: 25 call sites

resolve_customization.py was still invoked as bare python3 in the five agents and six skills. That script requires 3.11+ for tomllib, so on macOS without Homebrew or Ubuntu 22.04 they fell through to their "if the script fails" path and hand-merged the TOML in-context — quietly, with no signal. All 25 now use uv run.

Four more spawned Python purely to open an HTML file:

python3 -c "import webbrowser, pathlib; webbrowser.open(pathlib.Path('PATH').resolve().as_uri())"

Replaced with the platform opener bmad-brainstorming already uses — open / xdg-open / start.

src/ now contains no bare Python invocation at all. That is the point: "Python 3.11+" can leave the user contract entirely, because uv provisions its own from each script's requires-python. Verified:

$ uv run --python 3.9 t.py      # requires-python = ">=3.11"
warning: The requested interpreter resolved to Python 3.9.6, which is
         incompatible with the script's Python requirement: `>=3.11`
$ uv run t.py
ran on 3.12.9 tomllib ok        # uv picked its own

docs/how-to/customize-bmad.md described a transition that this ends; its three passages are updated.

Tests

Suite 46 grows from 12 to 29 assertions — Python version parsing, the 3.11 boundary in both directions, a future 4.x, that uv-present skips the python3 probe, and all three missing-uv sub-branches. Full suite passes: 473 installer component assertions, lint, markdownlint, prettier.

Follow-ups not in this PR

  • README.md:13 still says Python 3.10+. After this it should say Node + uv, with no Python entry.
  • detectPython3 is now unreachable in a fresh install. It is a transitional net for installs upgrading from 6.10 that still have the old skill files on disk; delete it once those are gone.

Part of an ecosystem-wide pass — the same conversion is going into bmad-builder, creative-intelligence-suite, game-dev-studio, and test-architecture-enterprise.

… system Python

The installer told users uv was optional while bmad-build had already made
it mandatory. uv-check.js called it "becoming the de facto standard",
install-messages.yaml led with HEADS UP, and installer.js printed a Tip
inside a box titled "BMAD is ready to use!" — while bmad-build and
bmad-build-auto HALT on activation without `uv run`. The probe's result
was discarded (`await checkUvEnvironment();`), so nothing branched on it.

Messaging now names the consequence, and the post-install summary repeats
the warning when it applies — the pre-install probe fires before every
prompt, so by then it is far up the scrollback. Still warn-don't-block:
core-only, docs-only, and CI installs never render a skill, so a missing
uv must not fail the run.

Adds a python3 probe used only when uv is absent, since that is the only
case where the interpreter on PATH matters. It reports whether the
direct-interpreter skills still work (3.11+) or nothing Python-backed will
(below 3.11, or no python3 at all).

Separately, 25 call sites still ran resolve_customization.py under a bare
`python3`. That script requires 3.11+ for tomllib, so on macOS without
Homebrew or Ubuntu 22.04 they fell through to their "if the script fails"
path and hand-merged the TOML in-context — no error surfaced. All 25 now
use `uv run`, which provisions a matching interpreter from the script's
own requires-python.

Four more spawned Python purely to open an HTML file:

  python3 -c "import webbrowser, pathlib; webbrowser.open(...)"

Replaced with the platform opener bmad-brainstorming already uses — open /
xdg-open / start. src/ now contains no bare Python invocation at all, so
"Python 3.11+" leaves the user contract: uv provisions its own.

docs/how-to/customize-bmad.md described a transition that this ends.

Test suite 46 grows from 12 to 29 assertions: Python parsing, the 3.11
boundary in both directions, that uv-present skips the python3 probe, and
all three missing-uv sub-branches.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0961ea00-c2e9-44c1-895a-61734ea1b852

📥 Commits

Reviewing files that changed from the base of the PR and between 328d286 and a9ff6f3.

📒 Files selected for processing (31)
  • docs/how-to/customize-bmad.md
  • src/bmm-skills/agents/bmad-agent-analyst/SKILL.md
  • src/bmm-skills/agents/bmad-agent-architect/SKILL.md
  • src/bmm-skills/agents/bmad-agent-dev/SKILL.md
  • src/bmm-skills/agents/bmad-agent-pm/SKILL.md
  • src/bmm-skills/agents/bmad-agent-ux-designer/SKILL.md
  • src/bmm-skills/plan/bmad-create-epics-and-stories/SKILL.md
  • src/bmm-skills/plan/bmad-create-epics-and-stories/steps/step-04-final-validation.md
  • src/bmm-skills/plan/bmad-prd/references/validate.md
  • src/bmm-skills/plan/bmad-prfaq/SKILL.md
  • src/bmm-skills/plan/bmad-prfaq/references/verdict.md
  • src/bmm-skills/plan/bmad-ux/assets/color-themes.md
  • src/bmm-skills/plan/bmad-ux/references/creative-tools.md
  • src/bmm-skills/plan/bmad-ux/references/validate.md
  • src/bmm-skills/ship/bmad-checkpoint-preview/SKILL.md
  • src/bmm-skills/ship/bmad-checkpoint-preview/step-05-wrapup.md
  • src/bmm-skills/ship/bmad-code-review/SKILL.md
  • src/bmm-skills/ship/bmad-code-review/steps/step-04-present.md
  • src/bmm-skills/ship/bmad-correct-course/SKILL.md
  • src/bmm-skills/ship/bmad-qa-generate-e2e-tests/SKILL.md
  • src/bmm-skills/v6-shims/bmad-create-architecture/SKILL.md
  • src/bmm-skills/v6-shims/bmad-create-prd/SKILL.md
  • src/bmm-skills/v6-shims/bmad-create-story/SKILL.md
  • src/bmm-skills/v6-shims/bmad-dev-story/SKILL.md
  • src/bmm-skills/v6-shims/bmad-edit-prd/SKILL.md
  • src/bmm-skills/v6-shims/bmad-validate-prd/SKILL.md
  • test/test-installation-components.js
  • tools/installer/core/installer.js
  • tools/installer/core/uv-check.js
  • tools/installer/install-messages.yaml
  • tools/installer/ui.js

📝 Walkthrough

Walkthrough

The installer now detects uv and Python versions, reports fallback conditions, and updates setup messages. Agent and workflow instructions use uv run for customization resolvers. Validation and preview instructions use platform-specific commands to open HTML artifacts.

Changes

uv Execution and Installer Support

Layer / File(s) Summary
uv and Python environment detection
tools/installer/core/uv-check.js, test/test-installation-components.js
The installer validates uv and Python 3.11+, reports fallback states, and tests available, outdated, and absent runtimes.
Installer warnings and setup messages
tools/installer/core/installer.js, tools/installer/install-messages.yaml, tools/installer/ui.js
Installer messaging identifies uv as required for rendered skills and shows conditional warnings.
Resolver commands use uv run
docs/how-to/customize-bmad.md, src/bmm-skills/agents/*, src/bmm-skills/plan/*, src/bmm-skills/ship/*, src/bmm-skills/v6-shims/*
Customization resolver commands now use uv run while retaining existing scripts, arguments, and hooks.
Platform-specific report opening
src/bmm-skills/plan/bmad-prd/references/validate.md, src/bmm-skills/plan/bmad-ux/assets/color-themes.md, src/bmm-skills/plan/bmad-ux/references/*
HTML artifacts use native platform openers with quoted paths and retain failure and headless handling.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Installer
  participant uvCheckEnvironment
  participant uv
  participant Python3
  Installer->>uvCheckEnvironment: check runtime availability
  uvCheckEnvironment->>uv: probe uv version
  uv-->>uvCheckEnvironment: uv result
  alt uv is unavailable
    uvCheckEnvironment->>Python3: probe Python version
    Python3-->>uvCheckEnvironment: Python result
  end
  uvCheckEnvironment-->>Installer: status and fallback details
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main installer and skill changes: uv is required and direct system Python assumptions are removed.
Description check ✅ Passed The description is detailed and directly explains the installer, skill, documentation, opener, and test changes.
Docstring Coverage ✅ Passed Docstring coverage is 90.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch uv-run-requirement

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@bmadcode
bmadcode merged commit ade7a96 into main Aug 9, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant