Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

twosystems (Python)

Offline tools for calibrating and checking twosystems, a cheap, honest watchman for AI coding agents created by Shashikant. The watchman itself (the twosystems command and its hooks for Claude Code, GitHub Copilot and Codex) is on npm; this package works on the files it writes.

Status: alpha (0.1.0a2). twosystems-calibrate validate works now. The calibration commands arrive in Sprint 3. See the roadmap.

pip install --pre twosystems
twosystems-calibrate validate events ~/.twosystems/events.jsonl

Commands

The command is twosystems-calibrate, so it does not clash with the twosystems command installed from npm.

  • twosystems-calibrate validate events|lock FILE: check a file against the shared schemas. Available now. Exit code 0 means valid, 1 invalid, 2 a usage or file problem. It prints at most 100 problems and reads at most 64 MiB of an events log.
  • twosystems-calibrate label: find candidate moments in your local sessions and label them quickly.
  • twosystems-calibrate fit: calibrate decisions and write decisions.lock with a bounded false-alarm rate.
  • twosystems-calibrate check: replay a labelled set and fail on drift or a model version change.
  • twosystems-calibrate report: an HTML report of decisions and savings.

Library

twosystems.contracts offers validate_event, validate_event_text, validate_events_jsonl, validate_lock, validate_lock_text, iter_events_jsonl (one line at a time, to stop early on a large log), parse_json and is_well_formed, plus the limits MAX_DEPTH, MAX_EVENT_BYTES, MAX_LOCK_BYTES, MAX_EVENT_VALUES and MAX_LOCK_VALUES. They apply the same rules as the TypeScript core and run the same shared edge cases, including the exact error messages; see schemas/README.md for the rules and the few differences when values come from code.

Part of twosystems, created by Shashikant. Apache License 2.0.

Metadata

Release files for twosystems 0.1.0a2

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

Source distribution (sdist)

Source distribution for twosystems 0.1.0a2
File Size Uploaded Provenance Actions
twosystems-0.1.0a2.tar.gz 16.4 kB With provenance Details for twosystems-0.1.0a2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for twosystems 0.1.0a2
File Interpreter ABI Platform Actions
twosystems-0.1.0a2-py3-none-any.whl Python 3 none any Details for twosystems-0.1.0a2-py3-none-any.whl

Total release size: 35.7 kB

Release files / twosystems-0.1.0a2.tar.gz

Download URL twosystems-0.1.0a2.tar.gz
Size 16.4 kB
Tags Source
SHA-256 checksum
How to use checksums
230ff2b386fd77a5872ad2c8ef3d30cc1626a143b2b6f6e81ba299770fb7a6b9
BLAKE2b-256 checksum
How to use checksums
5fb709be81ea2e83e6659191ce2a3c7196625779aaeb6c463deaa7ca81c25c97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / twosystems-0.1.0a2-py3-none-any.whl

Download URL twosystems-0.1.0a2-py3-none-any.whl
Size 19.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
88f936591c432f01fd34769152c257cf66331b4a5137c3cd4b51556c11039640
BLAKE2b-256 checksum
How to use checksums
16ac2d84486e6ac2ea20e54a78d6c48812982be37ea185c72094d2ed0dca6491
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Security for twosystems 0.1.0a2

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for twosystems-0.1.0a2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

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.

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