Show HN: A deterministic code-rewrite engine that learns from one example
1 day ago
I built a tool that learns structural code transformations from a single before/after example.
It isn’t a transformer or LLM — it doesn’t generate code. It extracts the structural pattern between two snippets and compiles a deterministic rewrite rule. Same input → same output, every time.
Examples: • console.log(x) → logger.info(x) generalises to console.log(anything) • require(“x”) → import x from “x” • ReactDOM.render → createRoot • custom project conventions
The rules apply across an entire codebase or through an MCP plugin inside Claude Code, Cursor, or plain CLI.
It runs entirely on CPU and learns rules in real time.
Tool: https://hyperrecode.com I’d really appreciate feedback on the approach, design, or failure cases.
No comments yet
Contribute on Hacker News ↗