Discussion

Show HN: A deterministic code-rewrite engine that learns from one example

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.

2 points heavymemory 10 months ago 0 comments

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton