AGENTS.md instructions for /Users/jdx/.codex/worktrees/7c80/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 pull up the discussion first so I’m reacting to the actual proposal and thread, not guessing from the number.
Assistant
The report is about minimum_release_age: the user intentionally installed a too-new Go with an override, then later mise up go warns about that same newer release being ineligible even though the active installed version is already newer. I’m going to glance at the local resolution code so the “thoughts” are grounded in how mise currently decides to emit that warning.
Assistant
I found the warning path in src/cli/upgrade.rs. It looks like the warning is emitted by comparing the unfiltered latest release to the release-age-filtered latest, independent of what version is already installed.
Assistant
There’s a small design wrinkle: the warning is useful when “latest” is being held back, but it turns noisy when the held-back version is already the one the user is running. The least surprising behavior is probably to warn only when release-age filtering is hiding something actionable.
Assistant
I think the report is valid. In discussion #10872, the warning is technically describing resolver state, but not user-action state: minimum_release_age hides go@1.26.5 from “latest eligible”, yet the user already has 1.26.5 installed and active, so mise up go saying it was “ignored” feels wrong.
The code path in src/cli/upgrade.rs compares filtered latest vs unfiltered latest and warns whenever unfiltered is newer. It does not check whether the hidden version is already installed/current. I’d change the warning semantics to: warn only when release-age filtering is hiding an actionable upgrade. So:
current 1.26.4, eligible 1.26.4, unfiltered 1.26.5: warn
current 1.26.5, eligible 1.26.4, unfiltered 1.26.5: no warning
current newer/equivalent to the hidden release: probably no warning too, but be careful not to introduce new generic semver assumptions
User
make a pr and reply to discussion
Assistant
I’ll turn this into a real change rather than just a comment: branch, patch, focused tests, PR, then a discussion reply with the PR link and the AI-generated note. First I’m checking the worktree so I don’t step on anything already in progress.
Assistant
The worktree is clean but currently detached, and gh is authenticated as jdx, so I can create a normal codex/... branch and push it. Next I’m reading the nearby tests and helper APIs so the fix lands in the existing upgrade flow instead of inventing a side path.
Assistant
The current warning is generated after outdated detection, so the actual upgrade decision already skips the installed-newer case. The patch can stay narrow: before warning about a hidden baseline release, compare it to the best installed version for that same request and skip the warning if the installed version is not older.
Assistant
One thing I’m watching here: the repo guide explicitly says not to add new generic version ordering. The existing upgrade code already uses is_outdated_version, so I’ll reuse that exact helper rather than adding another comparator.
Assistant
The local API has a latest_installed_version() path that already respects backend matching logic, which is exactly what I need. I’m going to add a tiny helper around that and unit-test its decision table.
Assistant
I’m going to put the branch in place now, then patch upgrade.rs and add a regression assertion. The behavioral intent is: if the installed/current version already satisfies the hidden release, the release-age warning has nothing useful to tell the user.
Assistant
Branch is created. I’m checking the fixture release metadata now so the e2e test can exercise the warning without depending on live Go releases.
Assistant
I found the existing release-age e2e already uses jq, so I’ll extend that same file with a dynamic “install the current unfiltered latest first” regression. That keeps the scenario close to the discussion while avoiding a hard-coded future-sensitive version.
Assistant
I caught a naming mismatch in the first patch while adding tests. I’m splitting the decision into a pure helper for the unit test and the filesystem-aware wrapper used by upgrade.
Assistant
The source-level shape is now clear. I’m patching the helper name and adding the decision-table test before running formatting.
Assistant
I’m adding the e2e directly after the existing positive warning check: first prove the warning still appears when the user is behind, then prove it stays quiet once the hidden release is already installed.
Assistant
The patch is in. I’m going to format and run the focused upgrade unit tests first; if those are clean, I’ll run the targeted e2e file that covers minimum_release_age.
Assistant
Formatting passed. The first unit command used the wrong target shape for this repo, so I’m rerunning it against the mise binary test target.
Assistant
The focused Rust test is compiling the binary test target now. It’s the usual first-build wall of dependencies, so I’m letting that finish before kicking off e2e.
Assistant
Still compiling, but it’s through most of the crate graph. After this finishes, subsequent checks should be much quicker.
Assistant
The focused Rust tests passed. I’m running the targeted e2e now through the repo task, which is the prescribed path for these shell tests.
Assistant
The e2e task is building with all features before it runs the script. No failures yet, just another compile stretch.
Assistant
Still waiting on the e2e build/run. I’m keeping it attached so we don’t leave a background test hanging.
Assistant
Good sign from the e2e: the new assertion already hit the exact shape we wanted, with jq@1.8.2 installed and no “newer jq release” warning. The script is continuing through the rest of the existing cases.
Assistant
The targeted e2e completed successfully. It also ran the adjacent test_install_before_* files because of the task matcher, and those passed too. I’m reviewing the final diff now before committing.
Assistant
The diff is narrow and the regression is doing the right thing. The repo guide asks for mise run lint-fix before committing, so I’m running that now and will only keep any fixes that belong to this change.
Assistant
lint-fix is doing the broad repo sweep now. The formatting and shell checks have passed; it’s inside cargo check --all-features, which is the long part.
Assistant
lint-fix passed cleanly. I’m checking whether it touched anything beyond the intended files, then I’ll stage and commit.
Assistant
Only the two intended files changed. The final diff-check is clean, so I’m staging and committing with a conventional fix(upgrade): ... message.
Assistant
Committed. I’m pushing the branch next, then I’ll open the PR with the discussion context and the test evidence.
Assistant
The branch is pushed. I’m creating the PR now; I’ll reference the discussion and include the exact checks I ran so review has the useful bits up front.
Assistant
PR is open: #10877. I’m posting a concise discussion reply now with the PR link and the required AI-generated note.
Assistant
I’ve got the discussion node ID; posting the reply through the GitHub GraphQL API now.
Assistant
The discussion reply is posted. I’m doing one last status check so the final handoff has accurate links and no hidden local leftovers.
The PR suppresses the minimum_release_age hidden-release warning when the current/installed version already satisfies that hidden release, while keeping the warning for real held-back upgrades. Commit: f3633efaa.
Checks passed: cargo fmt --check, cargo test --bin mise cli::upgrade::tests, mise run test:e2e e2e/cli/test_install_before, and mise run lint-fix. Worktree is clean.
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.
minimum_release_age_excludes is a decent workaround, but not really the right answer here since the user may still want the policy for future Go releases. My instinct: fix the warning, not the setting.