v0.1 · being rebuilt in the open

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-circleci
Second pushsrc/parser.rs changed
  1. testransrc/parser.rs changed
  2. clippyransrc/parser.rs changed
  3. fmtransrc/parser.rs changed
  4. docsskippedpassed at 4e1a9c0
  5. prettierskippedpassed at 4e1a9c0
Example run: 2 of 5 jobs skipped, because nothing they depend on changed.

From one config to skipped jobs

  1. 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 test
  2. 02

    Generate native config

    cigen generate writes plain GitHub Actions and CircleCI files that you commit. The same config always gives the same bytes.

    $ cigen generate
    ✓ .github/workflows/ci.yml
  3. 03

    Hash what each job depends on

    In CI, cigen hash covers the job's inputs, its own definition, and the lockfiles, toolchain pins and scripts it finds for itself.

    $ cigen hash --job test
    3f2a9e07c41b…
  4. 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@rustsrc/**/*.rs, Cargo.toml, Cargo.lock
declaredtests/**every tracked file under tests/
derivedrust-toolchain.tomltoolchain pin in the project root
derivedscripts/check.sha step runs it
derivedcommands.install_depsa command the job uses
derivedjob definitionimage, steps, env, provider block
derivedcigen 0.1.0the 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.

Pasted today
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 build
With modules
modules:
  - rust: { components: [clippy] }
  - node: { path: docs }
steps:
  - run: cargo clippy --all-targets -- -D warnings
  - run: pnpm --dir docs build

What 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 hash with 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, explain and expand for agents
  • Free hosted pass records on VisualCI, shared across branches
  • Skipping on CircleCI
The roadmap →

Point your agent at one URL

It explains how to install cigen and write a first config.

https://docspring.github.io/cigen/install.md