testdouble / testdouble/han

Consider adding dependency on uv, switching from bash to python (or any other scripting language with dependency management)

Open
#181 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
267
Forks
23
Avg merge
2d 6h
Merged PRs (30d)
12

Description

While working on review-skill-or-agent, I've hit some edge cases related to processing and verifying markdown. Specifically, frontmatter is an arbitrary YAML, meaning that parsing it with regexps is inherently lossy. To combat this, guidance already ships python snippets that evaluate frontmatter.

I propose re-evaluating portability guidelines for han. For example, we can require having uv, which can automatically manage python dependencies and run python scripts per PEP723. This will allow writing python scripts that depend on third-party libraries, e.g. PyYAML and python-mdformat. This change will allow offloading more complex work into scripts; it will also guarantee having identical runtime environment.

An example of how this will look. We make a python script and declare its runtime dependencies using special comment syntax:

#!/usr/bin/env -S uv run --script
# /// script
# requires-python = "=~3.14"
# dependencies = [
#     "yuio=~2.3",
#     ...
# ]
# ///

def main():
    ... # Normal python here.

We can then invoke this script as usual; uv will download required python executable and install all dependencies into a temporary virtual environment.

* one note on this example, it uses env's -S flag which is not available on older systems. There are ways to bypass it, if we want to target them.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the portability guidance and the review-skill-or-agent work described in the issue, then read the linked skill-description-length.md Python example. Determine whether Han should require uv and how the older-system env -S limitation affects that policy. Done means the portability direction and migration scope are agreed, with the runtime and dependency-management approach documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, shell
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.