Skip to content

Releases

Code Cleaner v1.4.0

Choose a tag to compare

@ZodiacDog ZodiacDog released this 05 Dec 00:08
a0a2389

SCRAWL users can now write, check, compile and run SCRAWL with Code Cleaner. The core still has no
third-party dependencies.

  • Built-in ROSETTA v1.4 compiler. code_cleaner/languages/scrawl_rosetta.py is a pure-Python port
    of the SCRAWL v1.4.0 compiler (src/rosetta.rs): the same 93 statement forms, the raw
    MNEMONIC(operands) form, macros, the named consensus.vote and lex.call forms, labels, and the
    SYNAPSE frame encoder with CRC-32C. It produces the same bytes and the same error messages as the
    Rust compiler; a differential test checks this against the real rosetta binary in CI.
  • The SCRAWL analyzer follows SCRAWL v1.4 instead of ROSETTA v1.1 and the v1.2 VM
    (docs/languages/scrawl/DECISIONS.md, decision 9). When v1.1 and the VM disagree on operand order,
    the VM wins, and legacy v1.1 forms are flagged (scrawl-vote-operand-order, scrawl-legacy-form).
    X_LOOP (loop R1: goto top), S_WATCH and the raw form compile; X_BRANCH else targets are
    honored. Every line the compiler rejects is reported with the compiler's own message.
    • New rules: scrawl-label-undefined, scrawl-label-duplicate, scrawl-label-name,
      scrawl-label-unused, scrawl-legacy-form, scrawl-compile-error, and the style rules
      scrawl-numeric-target and scrawl-raw-form. scrawl-unreachable now follows jumps, so it also
      finds code that every branch skips, not only code after halt.
    • Removed rules, which no longer apply: scrawl-comment-spacing (any # starts a comment),
      scrawl-macro-truncated (macros expand in full), scrawl-branch-else (the VM honors else),
      scrawl-call-args (call arguments compile), scrawl-agent-list-item and scrawl-register-range
      (now compile errors: scrawl-bad-operand, scrawl-register-bounds).
    • New metrics: scrawl_instructions, scrawl_frame_bytes, scrawl_labels, scrawl_compiles,
      scrawl_compiler.
  • Optional rosetta integration (code_cleaner/languages/scrawl_toolchain.py). If SCRAWL's
    rosetta tool 1.4.0 or later is on PATH, analyze also runs
    rosetta check on each SCRAWL file and reports any line it rejects (scrawl-compile-error). If it
    is not installed, the analysis is unchanged, nothing is scored, and the CLI prints one note.
    --no-scrawl-compiler / scrawl_compiler: off turns it off.
  • code-cleaner scrawl commands: check FILE... (exit 1 on a compile error), compile FILE [-o OUT] (SYNAPSE bytes as hex, or a binary file), run FILE (runs on the SCRAWL VM through
    rosetta run; exit 2 with install instructions if rosetta is missing) and toolchain.
    code-cleaner version shows the rosetta status.
  • Docs: a new user guide, Using SCRAWL with Code Cleaner
    (install, first program, analyze, compile, run, the Rosetta Stone, Darmok idioms); scrawl.md,
    the Rosetta Stone (new section: labels and the raw form), DECISIONS.md (decisions 8 and 9), the
    README and docs/rules.md updated.
  • Examples: a starter program, examples/scrawl/hello.scrawl; countdown.rosetta (labels and a
    loop) and the canonical-vote consensus_round.rosetta from SCRAWL v1.4.0.
  • CI: a new scrawl-rosetta job installs rosetta two ways (the SCRAWL v1.4.0 prebuilt release
    binary, checked against SHA256SUMS, and cargo install from the tag) and runs the differential
    test, the examples on the VM and the scrawl commands.
  • Version 1.4.0 in pyproject.toml, code_cleaner/__init__.py and CITATION.cff; the install and
    GitHub Action examples pin v1.4.0.

Get started: Using SCRAWL with Code Cleaner. To run SCRAWL programs, install rosetta from the SCRAWL v1.4.0 release (prebuilt binaries) or with cargo install --git https://github.com/ZodiacDog/SCRAWL-v1.1 --tag v1.4.0 --bin rosetta.

pip install "git+https://github.com/ZodiacDog/Code-Cleaner@v1.4.0"

Not published to PyPI.

SCRAWL created by M. L. McKnight / ML Innovations Research Lab. Contributor: Korg (AI assistant, Grok Bot).

Code Cleaner v1.3.0

Choose a tag to compare

@ZodiacDog ZodiacDog released this 04 Dec 22:41
84b3e29

Code Cleaner 1.3.0 adds SCRAWL as the 11th language. SCRAWL (Structured Compressed Runtime for Agent-to-Agent Workload Language) was created by M. L. McKnight / ML Innovations Research Lab to combat latency: agents send compact binary frames instead of JSON and run them on a register VM. Code Cleaner now checks SCRAWL source in its readable ROSETTA text form.

Install

pip install "git+https://github.com/ZodiacDog/Code-Cleaner@v1.3.0"                    # core, no dependencies
pip install "code-cleaner[all] @ git+https://github.com/ZodiacDog/Code-Cleaner@v1.3.0"  # + tree-sitter, esprima, javalang

GitHub Action: uses: ZodiacDog/Code-Cleaner@v1.3.0 · pre-commit: rev: v1.3.0. Not on PyPI.

What's new

  • SCRAWL language support (.rosetta and .scrawl files, --language scrawl): 38 scrawl-* rules across the five tiers. They check what the ROSETTA v1.1 compiler accepts and what the SCRAWL v1.2 VM actually runs: dropped or rejected lines, register banks and bounds, opcodes that trap (only 39 of 84 run), branch targets, wire-byte waste, identity verification before consensus.
  • The SCRAWL Rosetta Stone (docs/languages/scrawl/ROSETTA_STONE.md): all 84 opcodes as ROSETTA text, mnemonic and SYNAPSE bytes, with a "How to read this" guide, and the Darmok form (SCRAWL Idioms 1.0 phrases lined up with their LEX_CALL bytes and full instructions). Byte strings were produced by the SCRAWL v1.2 Rust encoder.
  • Readable canonical forms (decided by ML Innovations, December 4, 2026; docs/languages/scrawl/DECISIONS.md): consensus.vote(proposal=1, agent=0, vote=APPROVE) and lex.call("Heartbeat at Cafe"). Code Cleaner reads them; the ROSETTA compiler in the SCRAWL repository does not yet and needs updating to match. The older positional vote form is still read and flagged.
  • docs/languages/scrawl.md (the language, its purpose, measured wire sizes) and SCRAWL example programs in examples/scrawl/.
  • Code-Cleaner-SCRAWL: a design-stage project for a Code Cleaner whose source is written in SCRAWL: https://github.com/ZodiacDog/Code-Cleaner-SCRAWL. Plans only; nothing in it runs yet.

Non-SCRAWL analysis is unchanged.

Verified for this release

208 unit tests pass (13 skipped locally without optional dependencies), 11/11 language smoke tests, 247/247 stress tests and the self-analysis gate on Python 3.13 locally, and CI on Python 3.10-3.13 (bare and [all]) is green on the release commit.

Known limitations

SCRAWL support checks ROSETTA/.scrawl text only (not SYNAPSE binary frames or host-API instruction lists) and follows the ROSETTA v1.1 compiler and SCRAWL v1.2 VM; the ROSETTA compiler is not published, so its behavior was read from a local copy. Taint tracking stays inside one function (#1); no TypeScript yet (#4); no Java taint tracking (#6).

Code Cleaner v1.2.1

Choose a tag to compare

@ZodiacDog ZodiacDog released this 29 Nov 05:33

Code Cleaner 1.2.1 is the first tagged release on GitHub. The analyzer is unchanged from 1.2.0: same rules, rule ids and scores. This release is about installing, using and contributing.

Install

pip install "git+https://github.com/ZodiacDog/Code-Cleaner@v1.2.1"                    # core, no dependencies
pip install "code-cleaner[all] @ git+https://github.com/ZodiacDog/Code-Cleaner@v1.2.1"  # + tree-sitter, esprima, javalang

GitHub Action: uses: ZodiacDog/Code-Cleaner@v1.2.1 · pre-commit: rev: v1.2.1 (see docs/integrations.md).

Changes since 1.2.0

  • Python 3.10+ is required. Python 3.9 was dropped (end of life, no longer on GitHub's runners). CI runs Python 3.10-3.13, each with a bare and an [all] install.
  • Contact email corrected to ml.innovations.research.lab@gmail.com.
  • Real repository links everywhere (README, pyproject.toml project URLs, CONTRIBUTING, integration docs) instead of YOUR-GITHUB-USER placeholders.
  • README: before/after demo with real output (examples/before_after/) and a terminal recording, install from GitHub, roadmap and contributing sections.
  • docs/test-results.md added (it was linked but missing) with results from real runs.
  • SECURITY.md: report vulnerabilities by email. New "False positive or missed finding" issue form; Discussions are on.
  • Packaging: more keywords, a Repository URL, and a PyPI trusted-publishing workflow that stays inactive until it is set up. Code Cleaner is not on PyPI yet.

Verified for this release

184 unit tests pass (bare and [all]), 10/10 language smoke tests, 240/240 stress tests, and the self-analysis gate, on Python 3.13.5 locally and on Python 3.10-3.13 in CI.

Known limitations

Taint tracking stays inside one function (#1); no TypeScript yet (#4); no Java taint tracking (#6). Contributions welcome.

Created by Michael L. McKnight / ML Innovations Research Lab. Contributor: Korg (AI assistant, Grok Bot).

Full changelog: CHANGELOG.md