← Wed, Nov 25 digest

Show HN: An agent skill that optimizes code with falsifiable hypotheses

read article ↗ hn thread ↗

An open-source agent skill for Claude Code and Codex automates code optimization by enforcing falsifiable hypotheses, correctness assertions, and git patch generation.

summary is enough The core concept and benchmarks are clearly explained on the landing page, making a deep read unnecessary unless you plan to install the tool.

summary

Researchers from Heidelberg University released Agentic Algorithm Engineering (AAE), an agent skill for Claude Code and Codex that automates code optimization loops. Before every experiment, the agent must state a falsifiable hypothesis and predicted metrics, run correctness checks, and commit only valid changes as discrete git patches with PDF reports. Benchmarks show significant speedups on algorithms like VieCut and KaHIP while maintaining correctness. The system also includes a shared knowledge base to retain optimization techniques across sessions.

key points

  1. Enforces rigorous methodology by requiring a falsifiable hypothesis and predicted metric changes before running any code mutation.
  2. Generates clean, reviewable outputs including isolated git patches, a PDF session report, and updates to a shared optimization knowledge base.
  3. Demonstrated speedups up to 8.9x on complex algorithmic problems like exact minimum cuts and graph partitioning while preserving correctness.

who should read it

Software engineers and researchers looking to automate code optimization and performance tuning using LLM agents.

discussion positive

consensus

Commenters find the framework compelling and well-structured, praising the shift toward rigorous agentic workflows over blind code mutation.

pushback

A commenter notes that claiming falsifiable hypotheses for code correctness is technically flawed since proving correctness across all inputs is a non-falsifiable Pi-1 condition handled via stochastic testing.

best comment by octoberfranklin ↗

Most of these "falsifiable hypotheses" implicitly mean "for all inputs" -- or they would, if stated formally. This is a $\Pi_1$ condition, which is not in fact falsifiable by executing the code -- you'd need to execute it for infinitely many inputs!

Presumably you're stochastically approximating the real goal hypothesis. You should be more forthright about this; your AI-generated page really sweeps it under the rug.

It highlights a foundational computer science limitation regarding whether code optimization hypotheses can truly be falsified on infinite input spaces.

Generated by an LLM from the article and thread. Check the sources before relying on it.