CI that skips what already passed.
cigen compiles one strict config into GitHub Actions and CircleCI. It hashes everything each job depends on, and a job whose hash already passed doesn't run again.
cargo install --locked --git https://github.com/DocSpring/cigen cigen cigen-provider-github cigen-provider-circlecisrc/parser.rs changedtestransrc/parser.rs changedclippyransrc/parser.rs changedfmtransrc/parser.rs changeddocsskippedpassed at 4e1a9c0prettierskippedpassed at 4e1a9c0
From one config to skipped jobs
01
Write one config
A
cigen.yml, or the same document split into files under.cigen/. Each job lists the files its result depends on.provider: github input_groups: rust: ["src/**/*.rs", "Cargo.toml", "Cargo.lock"] workflows: ci: jobs: test: image: rust:latest inputs: ["@rust", "tests/**"] steps: - run: cargo test02
Generate native config
cigen generatewrites plain GitHub Actions and CircleCI files that you commit. The same config always gives the same bytes.$ cigen generate ✓ .github/workflows/ci.yml
03
Hash what each job depends on
In CI,
cigen hashcovers the job's inputs, its own definition, and the lockfiles, toolchain pins and scripts it finds for itself.$ cigen hash --job test 3f2a9e07c41b…04
Skip what already passed
A job whose hash has a pass on record skips its remaining steps. A failure records nothing, so the next push tries again.
cache hit test@3f2a9e… ↷ test skipped
Inputs you can't forget
A skip is only safe when nothing the job depends on has changed. A missed input turns a real failure into a green check, so cigen adds what it can find on its own, and each rule includes too much rather than too little.
Every derived input →What test's hash covers
| declared | @rust | src/**/*.rs, Cargo.toml, Cargo.lock |
| declared | tests/** | every tracked file under tests/ |
| derived | rust-toolchain.toml | toolchain pin in the project root |
| derived | scripts/check.sh | a step runs it |
| derived | commands.install_deps | a command the job uses |
| derived | job definition | image, steps, env, provider block |
| derived | cigen 0.1.0 | the version that hashes it |
Strict, so agents get it right first time
Coding agents write most CI config now. cigen gives them a schema with no guessing: an unknown key is an error that names the file and the key, and says what to write instead.
- Every docs page as plain Markdown, plus llms.txt
- install.md, written for an agent to follow
- Old and provider-only keys say where they moved
$ cigen validate
error: cigen.yml (at workflows.ci.jobs.test.requires):
unknown key `requires`
help: `requires` is now `needs`.Started · rust is built; node, Playwright and services are coming
Modules replace the setup you paste into every job
Toolchains, dependency caches, services and upload steps, pinned and tested once. Each module also adds the inputs it knows about, so a Rust module brings rust-toolchain.toml and Cargo.lock with it.
steps:
- uses: actions/checkout@<sha>
- name: Install Rust
run: rustup toolchain install
- uses: Swatinem/rust-cache@<sha>
- uses: pnpm/action-setup@<sha>
- uses: actions/setup-node@<sha>
with:
node-version-file: docs/.nvmrc
cache: pnpm
cache-dependency-path: docs/pnpm-lock.yaml
- run: pnpm --dir docs install --frozen-lockfile
- run: cargo clippy --all-targets -- -D warnings
- run: pnpm --dir docs buildmodules:
- rust: { components: [clippy] }
- node: { path: docs }
steps:
- run: cargo clippy --all-targets -- -D warnings
- run: pnpm --dir docs buildWhat works today, and what's next
Built
- One schema in two layouts, with strict keys
cigen validate, with errors as JSON for agents- GitHub Actions and CircleCI generation
cigen hashwith derived inputs- Skipping on GitHub Actions, with markers in its cache
- Generated workflows install a checksum-checked cigen release
- Byte-for-byte deterministic output
- Modules, starting with
rust
Coming
- The v0.2.0 release, the first those workflows can install
- A planner job, so skipped jobs never start a runner
- More modules: Node, Playwright, services and caches
cigen plan,explainandexpandfor agents- Free hosted pass records on VisualCI, shared across branches
- Skipping on CircleCI
Point your agent at one URL
It explains how to install cigen and write a first config.
https://docspring.github.io/cigen/install.md