Codemod Rust Workspace
Developmentcodemod-rust-workspaceCodemod Rust Workspace is an Agent Skill for development published in the codemod/codemod repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Use when working on Codemod's Rust workspace, including workflow engine crates, models, state, runners, scheduler, CLI-adjacent Rust crates, schema generation, Cargo features, Rust tests, clippy, rustfmt, or CI parity.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/codemod/codemod/blob/HEAD/.agents/skills/codemod-rust-workspace/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/codemod-rust-workspace, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Codemod Rust Workspace
Start Here
- Read the nearest
AGENTS.mdfor the crate you are changing. - Identify the crate role before editing:
butterflow-models: workflow schema/data contracts.butterflow-core: execution engine, step execution, reports, git/file operations.butterflow-state: state adapters.butterflow-runners: Docker/Podman/direct runner abstractions.butterflow-scheduler: task scheduling and WASM package logic.codemod: CLI command surface and TUI.codemod-sandbox: JSSG runtime and sandbox.testing-utils: shared test helpers.
- Prefer workspace dependencies in root
Cargo.toml.
Implementation Rules
- Keep model contracts in
crates/models; avoid duplicate public structs in higher-level crates. - Preserve async cancellation and error propagation.
- Avoid logging-only failures for user-visible workflow behavior.
- Do not write directly to stdout/stderr from non-CLI crates. Return structured data, errors, events,
reports, or log records and let
crates/clichoose text, TUI, JSONL, or task-log routing. - Keep feature gates meaningful, especially
docker,podman,wasm,native, andreal-fs. - For schema-affecting model changes, run
cargo xtask schemaand review generated diffs.
Validation
- Focused crate:
cargo test -p <crate> - Workspace:
cargo test - Format:
cargo fmt --check - Lint:
cargo clippy --tests --no-deps -- -D warnings - CI parity for terminal dependencies:
bash ./scripts/check-single-crossterm.sh