Skip to content

Refactor Frackture into a modular Python package with unified API and CLI - #3

Open
cto-new[bot] wants to merge 1 commit into
mainfrom
refactor/frackture-package-frackture-engine-cli
Open

Refactor Frackture into a modular Python package with unified API and CLI#3
cto-new[bot] wants to merge 1 commit into
mainfrom
refactor/frackture-package-frackture-engine-cli

Conversation

@cto-new

@cto-new cto-new Bot commented Dec 12, 2025

Copy link
Copy Markdown
Contributor

Summary

Refactor Frackture from a single script into a proper Python package with modular components, a typed engine, and a CLI. This enables better maintainability, testing, and future extension.

Details

  • Introduce package structure: frackture/preprocess.py, frackture/symbolic.py, frackture/entropy.py, frackture/engine.py, frackture/models.py, frackture/cli.py, frackture/init.py, frackture/main.py
  • Implement a typed FracktureEngine exposing unified APIs: compress, decompress, encrypt, decrypt, fingerprint
  • Add dataclasses for structured payloads (FrackturePayload, CompressionMetadata, EncryptionMetadata, etc.) to capture version, passes, key material, and ensure determinism
  • Implement optional key-based masking for encryption mode and improve error handling
  • Introduce a small CLI entry point for basic encode/decode/hash flows
  • Update exports in init.py and adjust imports/tests accordingly
  • Improve docstrings across modules and ensure deterministic payloads via metadata

Notable impacts

  • Changes are backwards-incompatible at import surface but preserve core logic and provide a maintainable API
  • CLI now works for basic encode/decode/hash flows
  • Payloads are structured for testing and future evolution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants