Oxidizer workflow

From rysweet/amplihack · View interactive version

Oxidizer workflow is an AI agent skill from the GitHub repository rysweet/amplihack. Automated Python-to-Rust migration via iterative convergence loops. Treats the Python codebase as the living specification and produces a fully-tested Rust equivalent with zero-tolerance parity validation. Use when migrating Python modules, libraries, or CLIs to Rust. Activates for: migration, oxidi

How to use this skill

Skill file

Oxidizer Workflow Skill

Purpose

Orchestrates the oxidizer-workflow recipe to migrate Python codebases to Rust.

The workflow is recursive and goal-seeking — it loops until 100% feature parity

is achieved, with quality audit and silent degradation checks on every iteration.

When to Use

Core Principles

  1. Tests first — Python test coverage must be complete before any porting begins
  2. Zero tolerance — 100% parity required; partial results are not accepted
  3. Quality gates — Every iteration runs clippy, fmt, and a full test suite
  4. No silent degradation — Every feature, edge case, and error path must be preserved
  5. Iterative convergence — Module-by-module, loop until converged

Required Inputs

| Input | Example | Description |

| --------------------- | ------------------------- | ------------------------------------- |

| python_package_path | crates/amplihack-recipe/src | Path to the package to migrate |

| rust_target_path | rust/recipe-runner | Where to create the Rust project |

| rust_repo_name | amplihack-recipe-runner | GitHub repo name for the Rust project |

| rust_repo_org | rysweet | GitHub org or user for the repo |

Execution

Via Recipe Runner

amplihack recipe run amplifier-bundle/recipes/oxidizer-workflow.yaml \
  -c python_package_path=src/mypackage \
  -c rust_target_path=rust/mypackage \
  -c rust_repo_name=my-rust-package \
  -c rust_repo_org=myorg

Workflow Phases

Phase 1: Analysis
  └─ AST analysis, dependency mapping, type inference, public API extraction

Phase 1B: Test Completeness Gate
  └─ Measure coverage → write missing tests → re-verify → BLOCK if < 100%

Phase 2: Scaffolding
  └─ cargo init, add dependencies, create module structure

Phase 3: Test Extraction
  └─ Port Python tests to Rust test modules → quality audit tests

Phase 4-6: Iterative Convergence Loop (× N until 100% parity)
  ├─ Select next module (priority order from Phase 1)
  ├─ Implement module in Rust
  ├─ Compare: feature matrix diff against Python
  ├─ Quality gate: cargo clippy + fmt + test
  ├─ Silent degradation audit: check for lossy conversions
  ├─ Fix any degradation found
  └─ Convergence check: if < 100% parity → loop again

Final: Summary report with parity matrix

Convergence Rules

iteration_number > max_iterations (default 30)

which modules are still incomplete

Recipe Location

The oxidizer recipe is at:

amplifier-bundle/recipes/oxidizer-workflow.yaml

The recipe is the executable workflow — this skill is the discovery and activation

layer. When investigating or customizing the workflow phases, agent prompts, or

convergence rules, start with the recipe file above.

Effective Rust Compliance

The oxidizer workflow enforces idiomatic Rust practices aligned with the

Effective Rust guide by David Drysdale. Key rules

baked into every iteration:

Types (Items 1–6)

Unsafe (Item 16)

Parallelism (Item 17)

Tooling (Items 29, 31, 32)

What Success Looks Like

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.