Files
g4borg 4f67b63918 ♻️ Rework project-uv probe for cross-platform determinism
Probe now emits KEY=VALUE so the agent reads facts instead of inferring
from prose. Stdlib-only (no tomllib) so it runs on whatever Python the
launcher reaches. Adds sh/ps1 launcher pair, SCRIPTS_UV/SCRIPTS_DIR/
SCRIPTS_STORE env-var contract, tainted-venv + recipe + default-package
detection, and broader mode classification (incl. agent-tool-only).
SKILL.md trimmed and gated by pyproject.toml glob.
2026-05-19 19:10:08 +02:00

2.8 KiB

  • support SCRIPTS_DIR (default: 'scripts/', these are usually project shipped scripts), SCRIPTS_STORE (default: '/tmp/', this is space to store temporary files and scripts) and SCRIPTS_UV (default: '', this is the executable to run uv) env vars in the skills boot sequence. Only react if that is successful.

  • otherwise agent has to figure it out by running check_uv.py

  • detect justfiles, makefiles, misefiles, check for uv or python recipes, specificly to run scripts.

  • detect if project itself is a python project, or uv is there to be used by the agent.

  • check_uv then should:

    • detect uv pins (uv.toml, pyproject.toml, pip requirements)
    • detect tainted .venv folders: custom files and folders inside .venv, using .venv as multi-python base dir, etc. should lead to a warning, as it shows that uv is not fully embraced in that project.
    • detect default packages for skills in main check_uv:
      • requests or httpx
      • python-dotenv
      • pydantic v2+
      • pytest
      • pyyaml
      • tomllib or tomli
      • mcp
    • reiterate env vars, and doing most detections it can do deterministically
  • running check_uv should confirm if the agent found the same conclusion. it is a chicken and egg problem, that can result in the fact, that the check_uv will tell the agent, that it detected a different running pattern, than the agent used.

  • the agent finally has to decide, which method it keeps. once this is settled, and this can settle fast if everything is preconfigured, the agent is ready to use python, and both conclusions agree.

  • the main task in this performative ritual is to ground on how to use scripts in the project.

  • this skills' existence is proof, that the user wants to use helper scripts in the project, and wants to utilize a uv installation locally in the project by the agent, and wants the agent to figure out, which one to use, and then not switch around later on, while the task is to actually focus on executing scripts and skills.

  • it should also therefore get the idea of where a local scratch pad (SCRIPTS_STORE), project scripts folder (SCRIPTS_DIR), etc. might exist, and can therefore substitute this also as knowledge if it has to work with other tools, that want files or scripts written, but do not define where a certain folder is. These directories build good fallbacks for such concerns, and python therefore a solid tool to support the developer in tasks.

  • for full python projects, it is very likely, that the configured uv is also capable of running actual project code, so namespaces should be respected.

  • for rust projects, the uv configuration is almost certainly the local python environment for the agent.

  • best would be if we would simply run a universal shell that every skill should support and print out env variables that are maybe relevant immediately.