Skip to main content

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 gate (spotregen check) for make guard, plus reports (status, deletion-test, context, compact, new-unit), three measures (measures for intent coverage and specification size, mutate for the mutation score of one unit, measures --mutation-score for all three of every unit) and two non-deterministic drivers (claude, local) that regenerate a unit with an LLM.

Install

uv add --dev spotregen

Use

spotregen check [--strict]            # the gate: exit 1 on errors
spotregen status                      # units by pace and coverage
spotregen deletion-test UNIT          # blast radius and knowledge gaps
spotregen context UNIT [-o FILE]      # regeneration bundle, no bodies
spotregen compact                     # compaction candidates
spotregen measures [--mutation-score]  # intent coverage and specification size;
                                      # --mutation-score adds the score (slow: runs every mutant)
spotregen mutate UNIT [--out FILE]    # mutation score: planted mutants
spotregen new-unit MODULE --pace P --risk R [--dry-run]
spotregen claude UNIT [...]           # regenerate with `claude -p` (needs claude)
spotregen local UNIT --model M [...]  # 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/<unit>.toml: one regenerable unit with intent, evaluations and consumers.
  • regen/decisions/<id>.toml: provenance records.

The schema, the finding codes 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 gate before a push

See CONTRIBUTING.md and RELEASING.md. The design is recorded in ADR 0001.

License

AGPL-3.0-or-later.

Metadata

Release files for spotregen 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spotregen 0.7.0
File Size Uploaded
spotregen-0.7.0.tar.gz 54.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for spotregen 0.7.0
File Interpreter ABI Platform
spotregen-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 122.5 kB

Release files / spotregen-0.7.0.tar.gz

Download URL spotregen-0.7.0.tar.gz
Size 54.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0aa8e80ae521348a3da0351706438dc1cc0953b227d88080b185a9aed495c5b9
BLAKE2b-256 checksum
How to use checksums
bdf1a5923e810dcf80b030d15fea8df1ccf2ee33c56d7010130ce1a164ab3961
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.7.0-py3-none-any.whl

Download URL spotregen-0.7.0-py3-none-any.whl
Size 67.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d21548dc9dcfe130053a08cee70ca2d9281f5a85a9c14158e0be4a21526b89d4
BLAKE2b-256 checksum
How to use checksums
bb1fa12986da6e5889e9b5f4c4c2c77f36f5ee785b84349c04d09323c6ca70aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

Release history Release notifications | RSS feed

0.11.0

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

This release

0.7.0 This release

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page