DEMO repository for judging and if anyone is interested, with PRs and showcase of the functionality: https://github.com/TomasHutnan/aicek-demo
Devpost submission: aicek
Paste each section into the matching Devpost field. Every number below comes from a real run of the demo repo or from the knowledge base.
Tagline
Green CI lies. aicek tells which green is safe.
Inspiration
Challenge 4, "Green CI Lies": AI assistants write code that passes every test while quality quietly drops. The risk we picked is the most common one we see: AI adds a second way to do what the project already does. A business rule gets copied into a new handler instead of called, a helper gets duplicated. CI is green, but the next change to that rule has to find and edit three places, and nothing fails when one is missed.
What it does
aicek verify main..HEAD checks a diff against the project owner's own rules in aicek.yml and prints PASS or FAIL, one change-risk score, and every finding with the rule, file:line, why, cost and fix. CI reruns the same command and the exit code (0 PASS, 1 FAIL, 2 error) blocks the merge.
In our demo the owner's rule is canDispatch. Patch A adds API and batch handlers that call it. Patch B adds handlers with the condition inlined. Both pass all tests. aicek passes A (score 4) and blocks B (score 36) with two CHG-002 findings and the owner's table: the portal passes the next requirement, the API and batch handlers fail it. A third version of B, written by a "different author" with 4 times the code, gives the identical decision hash.
Beyond duplicates, aicek flags weakened tests (TST-001), changed lines no test runs, layer violations, and any PR that edits the gate itself (GATE-001, held until a human adds the aicek-approved label). aicek patch -B fixes patch B with deterministic edits and no LLM (score 36 to 4). aicek ui is an interactive terminal session with a range picker. aicek reconfig mines the repo for rule proposals that a human accepts. Skills teach Claude Code, Codex and OpenCode to run the gate and fix the cause.
How we built it
TypeScript 6 on Node 24. ts-morph gives the AST, symbols and node positions (every line in a finding comes from an AST node). A condition normaliser and truth tables decide whether two conditions are logically equivalent, so a copied rule is found by meaning, not by text. The probe injects the owner's next requirement into the policy in a throw-away copy and runs the requirement tests per entry point with vitest; that is the owner's table. dependency-cruiser and ast-grep run the owner's layer and pattern rules. The score is CRAP (complexity against coverage) multiplied by the copy factor and the edit sites the analysis proves, and every function's term is printed.
verify uses no LLM, network or clock, so the same code, config and tool versions give a byte-identical .aicek/report.json. aicek perturb proves it by rerunning on reformatted, rebased, reordered and renamed variants and comparing hashes. LLMs appear only in patch (an agent fixes what deterministic edits cannot) and in reconfig drafting, and the result is always rechecked by verify. It ships as a Docker image pinned by digest, as an npm package (ai-cek) on the GitHub release, and runs in GitHub Actions with SARIF annotations, a sticky PR comment from a GitHub App, and the approval label.
Challenges we ran into
- Determinism. Reports had to be byte-identical across reruns and machines: sorted keys, repo-relative paths, fingerprints without line numbers, pinned tools, tests in a single forked worker, a cache keyed by tree hash.
- Declaring limits instead of guessing. Dynamic dispatch, conditions with more than 12 atoms, guards inside try or switch: aicek reports these in
notCheckedand never silently passes them. - Toolchain traps. TypeScript 7 has no JS compiler API and dependency-cruiser rejects it, so we pin 6.0.2; ast-grep's napi cannot run rule files, so we call its CLI on the snapshot.
- Packaging. An unrelated npm package is called
aicek, sonpx aicekwould download the wrong code. We shipai-cekand documentnpm run aicek -- ....
Accomplishments that we're proud of
- Patch A passes with score 4, patch B fails with score 36, both with green tests; the restyled patch B (4 times the code) gives the same decision hash.
aicek perturb: three exact reruns share one report hash and all seven runs share one decision hash.- aicek gates its own repo and caught our own coding agents twice. PR #2: 9 x TST-001, tests weakened from
toEqualtotoMatchObject. PR #22: 2 x TST-001, logo tests deleted. Both had green tests. - Fixing without an LLM:
aicek patch -Bturns the failing branch into PASS 4. - A polished terminal UI with an animated robot logo and a range picker.
What we learned
A passing test suite says little about whether the change fits the project. The checks that matter are the owner's own decisions written as rules (one policy, these layers, these naming rules), checked by analysis that can be reproduced. Probing the next change (run it, count the places that break) is more convincing evidence than any similarity score. And a gate must also police its own fixer: agents under pressure to get green will loosen tests or edit the config.
What's next
- More deterministic rules: near-identical new functions (jscpd), mutation testing on changed lines (Stryker), duplicated dependencies.
- Languages beyond TypeScript.
Built with
TypeScript 6, Node.js 24, ts-morph, vitest, dependency-cruiser, ast-grep, Ink, React, zod, commander, execa, canonicalize (RFC 8785), SARIF 2.1.0, Docker, GitHub Actions, GitHub App, GitHub Container Registry, npm
Try it out
- Repo: https://github.com/TomasHutnan/telit-4-ae
- Demo repo with a pull request per branch: https://github.com/TomasHutnan/aicek-demo
- Release (npm tarball
ai-cek-0.2.2.tgz, Docker imageghcr.io/tomashutnan/aicek:0.2.2): https://github.com/TomasHutnan/telit-4-ae/releases/tag/v0.2.2 - Try it locally (Node 22 or later and git):
git clone https://github.com/TomasHutnan/aicek-demo && cd aicek-demo git fetch -q origin '+refs/heads/*:refs/heads/*' --update-head-ok npm ci npm run aicek -- verify main..patch-b
Built With
- ast
- ci/cd
- claude
- dependency-cruiser
- docker
- gemini
- ghcr
- github
- javascript
- node.js
- typescript
- vitest


