GSU language profile labs
These disposable labs set up one project for each of several languages, and
check it with just verify. Python, TypeScript and Rust use a profile of
jnterfaces. A profile is the set of tools, configs and recipes for one
language. Go has no profile, so its lab joins the setup snippets of gsu.
A setup snippet is a short template file, for example a set of ignore rules or
the recipes of a Justfile. The labs are examples, and they are not
reference generators of projects. Use them to test the workflow in a new chat
or in a clean project. Then delete the lab folders.
The repository has a live local end-to-end harness for the labs:
just language-profile-labsThe command makes four disposable repositories, for Python, TypeScript, Go and Rust. Python, TypeScript and Rust have a profile of jnterfaces, and Go has none. So the labs start in two ways:
- A lab with a profile runs
install_stack.py --profile NAME --defaultsof jnterfaces, with each tool that the profile leaves off by default. The profile writes the manifest, the tool configs and theJustfile, as in a real project. The lab writes only the code and a test, then runsjust fmtandjust verify. - The packages of a lab are fresh clones from GitHub, in the folder
packagesof the workspace. So the result follows the main branch of each profile on GitHub, and the labs need the network. There are two exceptions:- agent_gest_git_skills is this checkout, with its uncommitted changes.
- jnterfaces is the clone that
scripts/find_jnterfaces.shfinds. It isJNTERFACES_DIR, the clone next to this repository, or the installed copy in~/.local/share/skill-packages.
- The Go lab starts Git and a local Gest. It joins the
.gitignore,.envrcandJustfilesnippets of this repository, then runsjust verify.
The command does not make GitHub remotes or pull requests. The labs are setup profiles for languages, and they are not tutorials for the flow of a pull request.
Each lab must show these results:
- Git starts in the folder.
- The
Justfilegives a stable command contract. just verifyruns the checks for lint, types, tests and diff.
Python, TypeScript and Rust
Each of these labs runs the steps of
Start a Python, TypeScript or Rust project.
In the commands, $jnterfaces is the clone that scripts/find_jnterfaces.sh
finds:
git init
uv run "$jnterfaces/scripts/install_stack.py" --profile python --defaults typecheck
just fmt
just verifyThen each of these labs checks the commit gate of the tasker role:
- It adds a line that the lint of the profile fails on, and stages it.
just checkmust fail atlint.- A commit by a person must stop at the gate, with the message “no pass of
just checkfor this tree”. - It takes the line out.
just checkmust pass, and the same commit must go through.
The profiles are jnprofile-python, jnprofile-typescript and jnprofile-rust. The lab writes no config of a tool, so a change to a profile shows up in the lab. Each lab differs in these ways:
- Python. The lab adds the tool
typecheck. The code ishello.py, and the test istests/test_hello.py. - TypeScript. The lab adds the tool
test. The code and the test are insrc/. The test imports./hello.js, the name that the build writes. - Rust. The lab is a library. It runs
cargo init --lib --vcs nonebefore the install, socargo initnames the package after the folder,hello-rust. It runsjust setupfirst, to makeCargo.lock. Each item has a doc comment, becausedocstring-checkfails on an item with none.
Go
Profile snippets:
templates/gitignore/base.gitignoretemplates/gitignore/go.gitignoretemplates/env/go.envrcgo.just, from thejustskill of jnterfaces
Local state:
.local/go-buildholdsGOCACHE..local/go-modholdsGOMODCACHE..envrccan expose.local/bin,GOCACHEandGOMODCACHE.go.modpins the version of the Go language.- Commit
go.sumwhen Go makes it.
The hello-world verification used these commands:
git -c init.defaultBranch=main init
gest init --local
direnv allow .
direnv exec . just verifyThe lab copies go.just from the just skill of jnterfaces as its Justfile.
Its recipes are fmt, lint, typecheck, build, test, docs, smoke
and diff-check. verify depends on all of them except docs. The template
holds the tool that each recipe runs.
Lesson: GOCACHE must be an absolute path. In a recipe of just,
$PWD/.local/go-build gives that path. No profile covers Go, so the recipes
of the template are the only recipes.
Add a profile for a new kind of project
When a new kind of project appears, gsu does these steps:
- It writes candidate snippets.
- It asks the user about each real choice of policy.
- It runs a disposable lab or a focused check of the setup.
- It moves the stable snippets into
templates/.
These profiles are good candidates for the next labs:
- Python machine learning with
uvorpixi. - Python notebooks.
- A browser UI in TypeScript, with spot checks in a browser.
- Separate profiles for a Rust library and a Rust binary.
- A Go service with generated OpenAPI or protobuf artifacts.