AGENTS.md instructions for /Users/jdx/.codex/worktrees/8220/mise
This file provides guidance to AI coding agents when working with code in this repository. It keeps the CLAUDE.md filename for compatibility with existing tooling, and AGENTS.md symlinks to it for other agents.
Registry Submissions: READ THIS FIRST
Most registry PRs from agents get rejected. Before adding anything to registry/, understand the rules:
mise does not host self-written, personal, niche, or low-popularity tools. The registry is curated for tools that are already widely used. "It works" or "it has tests" is not the bar.
Tools that aren't VERY popular will be rejected without explanation. Per contributing.md: "@jdx won't explain why a given tool wasn't accepted." There is no appeal, no checklist, no second chance — the PR is closed and that's it.
Wasted PRs are the default outcome for tools the agent or user has not vetted against this bar. Do not submit one speculatively.
Required pre-submission check
Before touching registry/, ALWAYS do the following:
Ask the user: "Is this tool already widely used outside your own projects?" — if it's the user's own tool, a fork, an internal/company tool, or something with a small audience, stop and tell them the PR will be rejected. Do not submit.
Actively check popularity for every registry PR — no exceptions. Look up real numbers; do not guess. Useful sources:
I’ll trace the release path from the repo side first: current branch/tag state, release workflows, and any local version markers. Then I’ll check GitHub’s view if the CLI is authenticated.
Assistant
The local checkout is detached at origin/main, and the latest local v* tag is v2026.6.14, so I’m checking whether the missing piece is “no tag was created” versus “tag exists but release workflow didn’t run.”
Assistant
GitHub releases confirm v2026.6.14 is still the latest published mise release from June 25. I’m seeing a newer vfox-v2026.7.0 tag on the remote, but not a corresponding v2026.7.0 mise tag yet, so the next clue is the workflow history.
Assistant
The release PR merge did happen at 2026-07-02T15:46:24Z, and the release-plz workflow after that merge succeeded. So this is subtler: the trigger ran, but it may have skipped/only released part of the workspace. I’m going into the release-plz output and config now.
Assistant
Update: the v2026.7.0 tag does exist remotely, pointing at the merge commit. That means the normal tag push should have kicked off .github/workflows/release.yml; I’m checking whether GitHub suppressed it because the tag was created by the token inside release-plz, or whether there’s a delayed/missing workflow record.
Assistant
The tag is now fetched locally, but gh release view v2026.7.0 returns “release not found.” So the failure is exactly between “tag exists” and “release workflow produced the GitHub Release.”
Assistant
The workflow history has no release.yml run for the v2026.7.0 tag. That points at the known GitHub behavior where tags created by a workflow token don’t cause a second workflow run, and I found this repo already has a guard for that path in xtasks/release-plz. I’m reading that guard to see why it didn’t catch this case.
Assistant
I found the race: xtasks/release-plz checks the previous v* tag before it creates the new tag, then exits right after git push --tags. Since the new tag push didn’t create a release.yml run, nothing comes back to trigger the just-created tag until the next scheduled/main run. I’m going to dispatch release.yml for v2026.7.0 now and then patch that script so it checks the new tag immediately after pushing.
Assistant
I’ve dispatched the release workflow for v2026.7.0; I’m waiting for GitHub to acknowledge the run so I can grab the exact run ID/URL.
Assistant
GitHub accepted the dispatch: 28603773080. I’m making the release script’s self-healing check run both before and after tag creation, so future releases don’t rely on the next scheduled/main invocation to notice the gap.
Assistant
Small implementation choice: I’m adding a run-existence check too. A tag-triggered release may take a while before the GitHub Release object appears, so the script should avoid dispatching a duplicate if release.yml is already queued or running for that tag.
Assistant
The patch is in place. I’m doing a syntax check on the shell script and a quick live check that the gh run list --branch v2026.7.0 query sees the workflow I just dispatched.
Assistant
The dispatch query sees the new workflow as in_progress, and bash -n passed. I’m checking whether shellcheck is available locally; if it is, I’ll run it on the touched script too.
Assistant
shellcheck isn’t installed in this environment, so I’m sticking with the syntax check plus a live validation of the exact gh run list predicate the script now uses.
Assistant
One more hardening tweak: after git push --tags, GitHub can take a moment to show a tag-triggered run. I’m adding a short wait before the fallback dispatch so this doesn’t create an unnecessary duplicate if the token behavior changes later.
Assistant
That guard is now slightly less jumpy. I’m rerunning the lightweight checks and then I’ll take another look at the release run.
Assistant
The release run is still in progress, with build jobs underway. I’m doing one last quick status check so the handoff has the freshest state.
Assistant
You were right: v2026.7.0 existed, but no release.yml run had been created for that tag, and no GitHub Release existed yet.
I manually dispatched the release workflow here: run 28603773080. It’s currently in_progress, with the tarball build jobs running.
I also patched xtasks/release-plz so after it pushes release tags it waits briefly, checks whether release.yml already exists for the tag, and dispatches it if missing. That should close the gap that bit this release.
Validated with bash -n xtasks/release-plz, git diff --check, and the live gh run list predicate. shellcheck wasn’t installed locally.
User
ok why did this happen?
Assistant
I’ll pin this down against the actual run order, because the important part is the timing: the recovery check existed, but it was looking one tag too early.
Assistant
I’m pulling the release-plz logs just for the tag/push lines, so the explanation isn’t hand-wavy.
Assistant
Because the release flow split in two, and the handoff between the two parts dropped.
The sequence was:
release-plz ran after PR #10638 merged.
At startup it checked the latest existing v* tag and saw v2026.6.14, which already had a GitHub Release, so it did nothing.
Later in the same run, it published mise v2026.7.0 to crates.io, created the signed v2026.7.0 tag, and pushed it at 2026-07-02T15:54:16Z.
That tag push should have triggered .github/workflows/release.yml, which builds artifacts and creates the GitHub Release.
No release.yml run appeared for v2026.7.0.
The likely cause is GitHub Actions recursion suppression / token behavior: the tag was pushed from inside a workflow, so GitHub did not start the tag-triggered workflow. The repo already had a recovery check for this, but it only checked before creating the new tag. So it could catch an older missed release, but not the tag it had just pushed.
So: crates.io + tags succeeded; the GitHub Release/artifact workflow never started.
User
ok so you need a pr
Assistant
Yep, that wants to live as a PR. I’ll put the local fix on a fresh codex/ branch off current origin/main, run the lightweight checks again, then push and open the PR.
Assistant
The worktree only has my release script change. I’m going to stash that tiny diff, switch onto a branch from the updated origin/main, then pop it back so the PR is based on the release commit rather than the older detached checkout.
Assistant
Confirmed: the detached checkout is behind origin/main, so I’m moving the fix onto 857b73f6a, the merged release commit.
Assistant
Stashed cleanly. Now I’m creating the PR branch from origin/main and reapplying the fix.
Assistant
The fix reapplied without conflict on the new branch. I’m running the quick checks now, then I’ll commit with a conventional message.
Assistant
One small refinement before committing: the release object is the real source of truth, so I’m tightening the duplicate guard to skip only active release runs. If a past run completed but still left no GitHub Release, the next release-plz pass should try to repair it.
Assistant
That’s cleaner. I’m rerunning the same checks with the final diff.
Assistant
Checks are green, and the live gh run list predicate returns true while the manually dispatched release is active. I’m staging and committing the PR change now.
Assistant
Committed. I’m checking the branch state, then I’ll push and open the PR with the failure mode and validation called out.
Assistant
The branch is one commit ahead of origin/main, and the manually dispatched release is still running. Pushing the branch next.
Assistant
Branch is pushed. I’m opening the PR now with the root cause and the validation steps in the body.
Assistant
GitHub is creating the PR; I’m waiting for the URL back.
Assistant
PR is open: #10723. I’m doing a final status check on the branch and the release run so I can hand you the exact state.
Assistant
Opened PR #10723: fix(release): trigger missing release workflow after tag push.
It’s based on current main, with one commit: 1f59f5159. I validated with bash -n xtasks/release-plz, git diff --check, and the live gh run list predicate for v2026.7.0. The manually dispatched release run is still in_progress: 28603773080.
Include the popularity data in the PR description.
code
## Popularity
- GitHub: 12.3k stars, 480 forks, last release 2026-04-12
- crates.io: 1.2M downloads
- Used by: <project A>, <project B>
This is non-negotiable — it lets the maintainer evaluate the submission without re-doing the research. PRs without it look speculative and are more likely to be rejected.
If the tool is borderline or numbers are low, warn the user clearly that the PR is likely to be rejected without reason, and ask if they still want to proceed. Do not soften this — users have repeatedly been surprised when their PR was closed, and the agent should have warned them up front.
Suggest the alternative: users can install any tool themselves via explicit backend syntax (mise use aqua:owner/repo, mise use github:owner/repo, mise use cargo:name, mise use npm:name, etc.) or by writing a tool plugin. The registry is only for shorthand convenience for popular tools — not for enabling installation.
Backend choice: aqua (preferred) or github
For registry entries the backend tiers are:
Tier 1 — preferred:aqua:, github:, and gitlab:. These are the routinely accepted backends.
Prefer aqua: when the tool is in the aqua registry. Better UX, SLSA verification, and per-version logic.
Use github: when the tool isn't in aqua but ships GitHub releases.
Use gitlab: for tools released through GitLab.
Tier 2 — high bar, but lower than tier 3:conda:. Potentially acceptable when the tool can't be supported via aqua/github. The bar is lower than tier 3 because the conda backend in mise does not require a separately-installed package manager — mise downloads and extracts packages directly from anaconda.org via rattler, so users don't need conda/mamba on PATH. Still requires a popular, well-maintained tool.
Tier 3 — extremely high bar, almost never accepted:npm:, pipx:, gem:, cargo:, go:, dotnet:. These all rely on a separately-installed runtime/toolchain being present on PATH (node, python, ruby, cargo, go, dotnet), which is fragile — the wrong version, a missing install, or PATH ordering quirks all break them. npm:/pipx:/gem: are particularly painful because tools installed via them silently bind to whichever node/python/ruby was on PATH at install time. Don't reach for these for a registry PR unless the user has explicitly confirmed @jdx wants it that way for this specific tool.
Not accepted at all:
New asdf: plugins — supply-chain security. Use aqua/github instead.
New vfox: plugins — same reason. Use aqua/github instead.
ubi: is deprecated and will not be accepted under any circumstances.
Users can still install via any backend themselves with explicit syntax (mise use vfox:..., mise use cargo:..., etc.) — they just don't get a registry shorthand for it.
Development Commands
Building and Testing
mise run build or mise run b - Build the project with cargo
target/debug/mise - Run the built binary directly
mise run test or mise run t - Run all tests (unit + e2e)
mise run test:unit - Run unit tests only
mise run test:e2e - Run end-to-end tests only
mise run snapshots - Update test snapshots with cargo insta
Debugging
Use MISE_DEBUG=1 or MISE_TRACE=1 environment variables to enable debug output (not RUST_LOG)
Code Quality and Testing
mise run lint - Run all linting tasks
mise run lint-fix - Run linting and automatically fix issues
mise run format - Format code (part of CI task)
mise run ci - Run format, build, and test
mise run test:e2e [test_filename]... - Run specific e2e tests (use this instead of executing test files directly)
mise --cd crates/vfox run test - Run tests for the vfox crate
mise --cd crates/vfox run lint - Run linting for the vfox crate
mise --cd crates/vfox run lint-fix - Run linting and fix issues for the vfox crate
mise task ls - List all available tasks
Documentation and Generation
mise run render - Generate all documentation and completions
mise run render:usage - Generate CLI usage documentation
mise run render:completions - Generate shell completions
mise run docs - Start documentation dev server
mise run docs:build - Build documentation
Development
mise run install-dev - Install development version locally
mise run clean - Clean cargo build artifacts
Code Architecture
High-Level Structure
Mise is a Rust CLI tool that manages development environments, tools, tasks, and environment variables. The codebase follows a modular architecture:
Core Components:
src/main.rs - Entry point and CLI initialization
src/cli/ - Command-line interface implementation with subcommands
src/config/ - Configuration file parsing and management
registry: - Any changes to registry/ (no scope needed, use for both new tools and fixes)
Scopes:
For command-specific changes, use the command name: install, activate, use, exec, etc.
For subsystem changes: config, backend, env, task, vfox, python, github, release, completions, http, schema, doctor, shim, core, deps, ci
Use task (not run) for task-related changes, even if the code lives in src/cli/run.rs or src/cmd.rs
Description Style:
Use lowercase after the colon
Use imperative mood ("add feature" not "added feature")
Keep it concise but descriptive
Examples:
fix(install): resolve version mismatch for previously installed tools
feat(activate): add fish shell support
feat(vfox): add semver Lua module for version sorting
feat(env): add environment caching with module cacheability support
docs(contributing): update hk usages
chore: release 2026.1.6
chore(ci): add FORGEJO_TOKEN for API authentication
registry: add miller
Pre-commit Process
Run hk install --mise once to set up pre-commit hooks (runs hk fix automatically on commit)
Run mise run lint-fix and git add any lint fixes before committing
Use mise run test:e2e [test_filename]... for running specific e2e tests
Never run e2e tests by executing them directly - always use the mise task
Deprecation Policy
When deprecating a feature or backend:
Immediately: Mark as deprecated in docs (add warning banner)
6 months later (warn_at): Display deprecation warning in CLI using deprecated_at! macro from src/output.rs
12 months after warn (remove_at): debug_assert! in deprecated_at! fires, signaling the code should be removed
Use mise version format for dates (e.g., deprecated_at!("2026.10.0", "2027.10.0", "id", "message")).
If the replacement has been available for a long time, the CLI warning can start immediately (set warn_at to the current version).
Important Implementation Notes
Backend System
When implementing new tool backends, follow the pattern in src/backend/mod.rs. Each backend must implement the Backend trait with methods for listing versions, installing tools, and managing tool metadata.
DO NOT ASSUME SEMVER
Do not assume tool versions follow semver or any other orderable scheme. mise manages hundreds of tools with wildly different versioning conventions:
Tool-specific meanings of latest (e.g. some exclude pre-releases, some don't)
Rules:
Do not call versions::Versioning::new(...) (or any other semver comparator) at a new call site to pick the "newest" version, "resolve latest", or sort a version list. That crate silently returns None / arbitrary ordering for non-semver strings, which means wrong versions get chosen for many tools.
To resolve a version request (latest, a prefix, a channel name), delegate to the backend via Backend::latest_version, Backend::latest_installed_version, Backend::list_versions_matching, or ToolRequest::resolve — the backend knows what "latest" means for its tool.
To list installed versions in a meaningful order, use Backend::list_installed_versions_matching or the toolset's resolved versions. Do not reorder them yourself.
Lockfile version strings must be treated as opaque — compare with ==, never with a version ordering. Never write a non-concrete string (latest, lts/*, a prefix) into the lockfile; resolve first.
A few existing call sites (e.g. runtime symlinks) do use Versioning ordering today, but that's legacy behavior and arguably also wrong — do not point at them to justify new semver assumptions.
If you think you need to pick "the newest installed version" at a new call site, stop and ask — that call almost always belongs on the backend, not inline.
Plugin Development
Core tools are implemented in src/plugins/core/
External plugins use ASDF or vfox compatibility layers
Plugin metadata is defined in mise.plugin.toml files
Configuration Parsing
The configuration system supports multiple file formats and environment-specific configs. Changes to settings require updating settings.toml and running mise run render:schema.
Testing Strategy
E2E tests are organized by feature area (cli/, config/, backend/, etc.)
Use snapshot testing for CLI output verification
Backend-specific tests verify tool installation and version management
Slow tests (marked with _slow suffix) test actual tool compilation/installation
Cross-Platform Considerations
Windows-specific implementations in files ending with _windows.rs
Platform-specific tool installation logic in core plugins
Shim system varies by platform (especially Windows)
we don't chmod mise e2e tests to be executable
GitHub Interactions
When posting comments on GitHub PRs or discussions, always include a note that the comment was AI-generated (e.g., "This comment was generated by an AI coding assistant.").
Documentation
URL Structure
When referencing mise documentation URLs, use the correct path structure based on the docs/ directory layout:
Dev tools & backends: mise.en.dev/dev-tools/backends/<backend>.html (e.g., mise.en.dev/dev-tools/backends/s3.html)
Configuration: mise.en.dev/configuration/...
Tasks: mise.en.dev/tasks/...
Environments: mise.en.dev/environments/...
CLI reference: mise.en.dev/cli/...
Do NOT use shortened paths like mise.en.dev/backends/... - always include the full path matching the docs/ directory structure.
The patch fixes that by checking again after git push --tags, waiting briefly for GitHub to enqueue a normal tag run, and then dispatching release.yml manually if no release/run exists.