The canonical scaffold for a MyThingsLab My[X] tool. It is
a working, CI-green skeleton — the shared seams (pyproject, ci.yml,
.gitignore, LICENSE, .pre-commit-config.yaml, vendored HARNESS.md, the
harness drift-check test, dev-ledger/) are already wired up and verified, so a
new tool starts from a passing build instead of an empty directory.
The package is a working harness loop, not an empty dir: src/mytemplate/
ships the plumbing (read one labeled issue → deterministic pre-work → one
Engine call → apply inside an isolated Workspace → draft PR, Policy-gated
and ledgered) with the judgment left as three seam methods
(prework/request/apply) and the constants at the top of tool.py.
Out of the box apply changes nothing, so
mytemplate run --engine noop # or: python -m mytemplate runis a safe end-to-end dry run: zero tokens, no branch, no PR, one honest ledger entry.
This is not itself a My[X] tool: it ships no judgment of its own. It
exists only to be copied.
- Copy this repo to
../my-<x>(drop.git,.venv, the caches, anddev-ledger/*.jsonl— the new tool records its own provenance). - Run the rename in one command (it renames the package dir, rewrites every
mytemplate/my-templatereference, seeds the dev-ledger scaffold entry, and deletes itself):python scripts/init.py my-<x>
- Fill the four per-tool seams in
CLAUDE.md— purpose, the single Engine call, invariants, backlog label — and rewrite this README for the tool. The seam-check test fails CI while any seam is left unfilled after the rename. In code, override the seam methods intool.py(prework/request/apply) and itsTOOL/LEDGER_KIND/BACKLOG_LABEL/SYSTEMconstants. pip install -e ../my-things-core -e ".[dev]" && pre-commit install.- Record the scaffold in provenance:
python -m mythings._devledger add scaffold --detail "copied my-template". - Red → green → refactor locally; open a PR; let CI gate it.
Everything above the seams is fixed by the build harness — see
HARNESS.md and my-things-core/docs/CONVENTIONS.md. Do not edit
the vendored HARNESS.md; the drift-check test fails CI if it diverges from the
canonical copy in my-things-core.
python -m venv .venv && source .venv/bin/activate
pip install -e ../my-things-core -e ".[dev]"
pytestMIT — see LICENSE.