Skip to content

feat: switch Python tooling to uv and tighten planning#22

Merged
MrPointer merged 13 commits into
mainfrom
feature/switch-to-uv
May 9, 2026
Merged

feat: switch Python tooling to uv and tighten planning#22
MrPointer merged 13 commits into
mainfrom
feature/switch-to-uv

Conversation

@MrPointer
Copy link
Copy Markdown
Owner

@MrPointer MrPointer commented May 9, 2026

📝 Summary

This branch moves Python tooling away from pyenv shell integration and toward uv as an optional installer-managed tool.
Shell startup no longer initializes pyenv or inserts pyenv shims, while existing Python completions remain guarded and uv/uvx completions come through Homebrew when available.
It also strengthens the planning/execution agent workflow so multi-agent plans carry explicit model, worker, review, and TDD isolation mechanics.
The CI follow-up also hardens Homebrew package detection and the Fedora Expect harness after environment-sensitive failures surfaced in PR validation.

🔑 Key Decisions

uv Optional Tooling

Added uv as a normal optional installer tool with a Homebrew package mapping only. This keeps the migration inside the existing optional-tools and package-resolution flow, avoids a dedicated Python provisioning subsystem, and preserves the current behavior where unsupported tools are filtered out for package managers without a mapping.

Shell Runtime Cleanup

Removed pyenv-specific PATH setup, lazy initialization, and the local pyenv-shell workaround. Shell startup remains valid without uv, preserves guarded pip, poetry, and pipx completions, and keeps user-local paths ahead of Homebrew after brew shellenv so uv-managed Python shims can take precedence when present.

RFC-Backed Migration Context

Added an accepted RFC, reviewer records, and feature anchor documenting the settled uv migration scope, non-goals, and trade-offs. The documentation makes clear that this change does not install Python versions, migrate existing pyenv/pipx/Poetry state, or add non-Homebrew uv fallback behavior.

Planning And Execution Mechanics

Expanded the planning and executing skills to require explicit execution bindings, worker dispatch mechanics, cross-sub-plan data-flow checks, and structural TDD isolation gates. This prevents multi-sub-plan plans from silently falling back to coordinator execution or relying on natural-language model selection.

OpenCode Worker Coverage

Added project-local OpenCode worker agents for Go, Zsh, docs, and test authoring across model tiers, plus an OpenCode plan-executability reviewer. These bindings make the planning workflow executable in OpenCode instead of only documenting intended model tiers.

CI Hardening Follow-Up

macOS CI exposed that Homebrew package detection should use Homebrew's documented installed-formula probe rather than package listing output. Package existence checks now run brew --prefix --installed <package> and treat exit code 1 as not installed, allowing the installer to continue into package installation. Fedora CI exposed that Expect/Tcl can start under a non-UTF-8 locale, so the interactive GPG test script now uses ASCII-only log output.

🔄 Before & After

Area Before After
Python tool installation uv unavailable through optional tools uv offered through Homebrew-backed optional tools
Python shell runtime pyenv shims and lazy pyenv init uv-compatible shell with no pyenv startup hooks
Python completions pip, poetry, pipx cached; pyenv integration present pip, poetry, guarded pipx cached; uv/uvx via Homebrew fpath
User-local Python precedence Homebrew could prepend over user-local paths user-local paths re-prepended after brew shellenv
Migration documentation pyenv-oriented shell docs accepted uv RFC, anchor, and updated shell architecture docs
Feature planning model tiers described but weakly enforced explicit worker bindings, dispatch rules, and review mechanics
Plan execution TDD isolation and worker dispatch could be implied execution preflight audits workers, model tiers, and isolation gates
OpenCode support no project-local worker bindings Go, Zsh, docs, test-author, and executability-reviewer agents
Homebrew package checks installer treated a missing package as a package-manager failure installer uses brew --prefix --installed and treats exit code 1 as not installed
Fedora interactive CI Expect logs used emoji that can fail in non-UTF-8 locales Expect logs are ASCII-only while preserving prompt automation

@MrPointer MrPointer force-pushed the feature/switch-to-uv branch 2 times, most recently from 1e1b62c to 072fd76 Compare May 9, 2026 16:30
MrPointer added 10 commits May 9, 2026 19:44
Capture the accepted uv migration design before planning so the Python tooling cleanup has a reviewed architectural
baseline.
Provide reusable project-local workers for Go, Zsh, docs, and test authoring so feature plans can bind execution to explicit model tiers and required skills instead of relying on the current session.
The goal is to switch from pyenv to uv for Python management,
as uv becomes the industry standard nowadays, and can safely replace
most of pyenv's capabilities, as well as others'.
The recent feature tried to make itself the center of the solution,
but it should've been treated merely as an example.
When the split happened, the model was lazy with the rfc variant,
trying to defer to the direct variant directly, but in practice,
that caused the agent to get confused and produce sub-par results.

It also improves how opencode spawns subagents inline, using their
own recommended way instead of some hallucinated one.
For easier diagnosis of what happened, such as not spawning
worker agents, or spawning them with the wrong model, the skill now
performs a "preflight" step that fills the progress file with the
real-time data.
It also is better instructed now to pay attention to worker agents,
following the plan's intention rather than deciding on its own.

At last, just as with the planning skill, the bindings were slightly
corrected to perform better, especially for opencode regarding subagent
spawning.
They more strictly verify the master plan contains dispatch instructions,
which is necessary for plans with more than 2 sub-plans, as each sub-plan
is assigned a worker agent with a carefully selected model tier,
in an effort to reduce costs.
The Claude runtime adapters told the planner to launch reviewers with
subagent_type "general-purpose", on the rationale that this would let
them inherit Write/Edit from the agent definition. The opposite is
true: dispatching as general-purpose discards the reviewer's
specialized system prompt and replaces its declared tool list with
general-purpose's broader set. Each project-local reviewer agent is
already exposed as its own subagent_type and declares Write/Edit in
its frontmatter, so direct dispatch loads both the right persona and
the right tools.

Update all four planning runtime-claude adapters (features-direct,
features-from-rfc, epics-direct, epics-from-rfc) to require
named-subagent_type dispatch and explicitly forbid general-purpose.
Also rewrite the misleading Explore warning in features-direct so it
no longer implies Explore was a candidate launch type.

Remove a Claude-specific subagent_type string that had leaked into
the runtime-neutral epics-direct SKILL.md and replace it with the
same runtime-adapter delegation the other planning skills use.
Keep ~/.local/bin ahead of Homebrew after shellenv runs so uv's default Python symlinks remain stable. Document the PATH precedence rule in the shell startup flow.
Use normal git instead for committing only.
@MrPointer MrPointer force-pushed the feature/switch-to-uv branch from 072fd76 to 2160127 Compare May 9, 2026 16:45
@MrPointer MrPointer enabled auto-merge (squash) May 9, 2026 16:46
MrPointer added 3 commits May 9, 2026 19:56
Homebrew list failures should not block installer setup when the only
question is whether a single package exists.

Use package-specific lookup so CI and users avoid enumerating unrelated
Homebrew state before installing chezmoi.
Fedora containers can run Expect under a non-UTF-8 locale, where emoji
logging causes Tcl to fail before the installer starts.

Keep the automation output ASCII-only so locale differences do not break
the interactive GPG CI path.
Homebrew documents --prefix --installed as the installed-formula
probe. It returns a failing status when the formula is absent, and may
still emit diagnostic output.

Use that command and treat exit code 1 as not installed so macOS CI can
fall through to installing chezmoi instead of aborting during detection.
@MrPointer MrPointer merged commit 8cd3a28 into main May 9, 2026
8 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