Skip to content

Repository files navigation

my-template

CI codecov Python License: MIT

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 run

is 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.

Starting a new tool from it

  1. Copy this repo to ../my-<x> (drop .git, .venv, the caches, and dev-ledger/*.jsonl — the new tool records its own provenance).
  2. Run the rename in one command (it renames the package dir, rewrites every mytemplate/my-template reference, seeds the dev-ledger scaffold entry, and deletes itself):
    python scripts/init.py my-<x>
  3. 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 in tool.py (prework/request/apply) and its TOOL/LEDGER_KIND/BACKLOG_LABEL/SYSTEM constants.
  4. pip install -e ../my-things-core -e ".[dev]" && pre-commit install.
  5. Record the scaffold in provenance: python -m mythings._devledger add scaffold --detail "copied my-template".
  6. 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.

Install (development)

python -m venv .venv && source .venv/bin/activate
pip install -e ../my-things-core -e ".[dev]"
pytest

License

MIT — see LICENSE.

About

Scaffold for a MyThingsLab My[X] tool — copy, then replace 'template'.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages