spotregen
Tooling for Regenerative Software in the sense of Chad Fowler: code is
disposable, the knowledge around it is the asset. A module is safely replaceable
when it can be deleted and rebuilt from knowledge that lives outside its
implementation. spotregen reads that knowledge from a tracked regen/ tree and
checks it against the source tree.
- Standard library only: zero runtime dependencies, Python 3.13 or later.
- It never imports the modules it describes; it reads the source with
ast. - A deterministic static check (
spotregen check) formake guard, plus reports (deletion-test,context,compact,new-unit), three measures (measuresfor the pace, the intent coverage and the specification size of every unit,mutatefor the mutation score of one unit),scoreto judge a candidate module by the acceptance ruleaccept/1, and one non-deterministic driver (local) that regenerates a unit with a local model from a clean working tree and archives the run underregen/runs/.
The seven primitives
The tool presents Fowler's seven primitives. Each has a record artefact, a family of check IDs named after it, and a command that a reader can run. A test reads the IDs from the table of checks, so this table cannot go stale.
| primitive | record artefact | IDs | command |
|---|---|---|---|
| intent | [[intent]] of regen/units/<stem>.toml |
INTENT01–INTENT02 |
context (section Intent) |
| compilation | regen/architecture.toml; unit public and depends_on |
COMPILE01–COMPILE08 |
check |
| evaluation | evaluation files; unit evaluations, item evaluations |
EVAL01–EVAL05 |
mutate, score |
| provenance | regen/decisions/<id>.toml; regen/runs/*/run.toml |
PROV01–PROV10 |
context (section Provenance), check |
| pace | unit pace; [pace] of architecture.toml |
PACE01–PACE04 |
measures (column pace), context (the policy of the pace) |
| deletion | [[consumers]] of a unit |
DELETE01–DELETE03 |
deletion-test, score, local |
| compaction | known_cycles; decision status |
COMPACT01–COMPACT07 |
compact |
Install
uv add --dev spotregen
Use
spotregen check [--strict] # the static check: exit 1 on errors
spotregen deletion-test UNIT # blast radius and knowledge gaps
spotregen context UNIT [-o FILE] # regeneration bundle, no bodies
spotregen compact # compaction candidates
spotregen measures # pace, intent coverage and specification size
spotregen mutate UNIT [--out FILE] # mutation score: planted mutants
spotregen new-unit MODULE --pace P [--dry-run]
spotregen score UNIT FILE [--base REV] # judge a candidate module: evaluations, unit tests, dependents
spotregen local UNIT --model M --model-sha256 HEX --context-length N --protocol ID [...]
# regenerate with a local LM Studio model
--root DIR selects the repository (default: search upwards for
regen/architecture.toml); python -m spotregen works as well. A repository
carries:
regen/architecture.toml: the compilation target (allowed imports, accepted cycles, pace policy, conventions, scan directories).regen/units/<stem>.toml: one regenerable unit with intent, evaluations and consumers. The unit is<package>.<stem>and the module path follows from the name.regen/decisions/<id>.toml: provenance records.
The loaders are strict: a key outside the schema stops the tool with exit code 2. Records
written for 0.12 are migrated with
uv run python -m spotregen._migrate_0_13 --root . [--write]; the steps, the old and the
new check IDs and the removed commands are in the
migration guide.
The schema, the check IDs and the tutorials are in the documentation,
https://advm1.gm.fh-koeln.de/~bartz/spotregen/. A minimal repository for trying
it out is built by spotregen.make_sample_repo.
Develop
make sync && make test-fast # environment and fast tests
make verify # guard + lint + test + doc, the pre-release verification
See CONTRIBUTING.md and RELEASING.md. The design is recorded in ADR 0001 and ADR 0003; QUICKSTART.md walks through an example on the sample repository.
License
AGPL-3.0-or-later.
Metadata
Release files for spotregen 0.13.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| spotregen-0.13.0.tar.gz | 104.6 kB | Without provenance | Details for spotregen-0.13.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| spotregen-0.13.0-py3-none-any.whl | Python 3 | none | any | Details for spotregen-0.13.0-py3-none-any.whl |
Total release size: 218.9 kB
Release files / spotregen-0.13.0.tar.gz
| Download URL | spotregen-0.13.0.tar.gz |
|---|---|
| Size | 104.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
095e981dc0f6825712215d42fc8c1fd45af571d8290821222547ee45e82d1908
|
|
BLAKE2b-256 checksum How to use checksums |
5d4251036d3b06474801d9cd2b2dfaad953cb674aa2ddb66ffc091d247831c2b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Release files / spotregen-0.13.0-py3-none-any.whl
| Download URL | spotregen-0.13.0-py3-none-any.whl |
|---|---|
| Size | 114.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
19368e5c69134adb69bda5d4ce98b427af697811ac47446909ea9a600d9212c1
|
|
BLAKE2b-256 checksum How to use checksums |
ad6d87605e3816c97e56e000ed6b43a3deb61106bf081cf64e657a3b69ffb3f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Security for spotregen 0.13.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.