porting-to-bend2
Made by JeffUse when porting, auditing or certifying a whole program in Bend 2 (.bend): goldens captured from the original, spec twins, proved fast twins, honest perf. Not for single functions or new Bend code.
Works With
Quality and Utility come from canonical skill metadata. Community ratings appear separately as stars when subscriber reviews exist.
Subscribe to download
Public previews are available, but downloads, CLI sync, and premium content require an active subscription.
Sign In to Subscribe- Full skill content with deterministic versioning
- CLI sync + local search index
- Access to Jeffrey’s premium library
Save to your account
Saved skills live in your cloud list. Run jsm sync on each machine to pull them locally.
What's New with this Skill
1Updates, enhancements, and release notes for this skill.
New skill: porting-to-bend2, a Bend port that answers to the original's own output
Ports a whole program into Bend 2 and keeps two questions apart. Outputs captured from the original pin a literal spec twin byte for byte on four lanes; bend PROOF.bend proves each fast twin equal to that spec. Every claim names which of the two it rests on. Includes a worked Python port with 35 goldens and 15 laws, and 125 lessons from two real ports.
- Two equivalences, kept apart: captured goldens tie the original to a literal spec twin, byte for byte on four lanes, and bend PROOF.bend ties each fast twin to that spec. Every claim says which one it rests on.
- Goldens are written only by scripts/golden-capture.sh from runs of the original. Nobody types or edits one; a re-capture needs --repin with a stated reason, and the manifest diff is explained.
- The worked example ports a Python ledger tool. Its hostile review caught CRLF files that CPython reads and the port rejected, while the proof stayed green the whole time.
- During implementation the original is run as an oracle and never read. A gap in the spec becomes an open question, answered by running the original on a new case.
- A missing golden, an unrunnable case or an empty manifest is a FAIL. A lane difference counts as a bug unless it is a documented engine difference, and a subset of lanes reports PARTIAL.
- Proof verdicts are quoted verbatim with the Bend version, since the unsafe count means different things on 2.0.16 and on later releases.
- A speedup needs interleaved medians, cv at most 5% or a refusal, identical stdout, a pinned original as incumbent, and the estimator least favourable to the port.
- 125 lessons from two real ports, toon_bend and beads_bend. In one, a re-pin shipped a 4189× quadratic slowdown with every gate green, so re-certification now includes a timed scale check.
- Seven modes from "should we port this?" to parity audit and GPU port, three tiers whose convergence rule converge.sh computes, and five subagent roles, including a hostile reviewer that fixes nothing.
- Includes 54 references, 54 scripts, 37 operator cards, 46 Base API probes, 32 cookbook probes and an eval suite. Pairs with bend2-mega-skill for the Bend language itself.
A port has to answer two different questions: does the Bend program do what the original did, and is the optimized version still the same program? This skill keeps them apart. The original's captured stdout, stderr and exit code are the goldens, and a literal, sequential spec twin has to reproduce them byte for byte on the interpreter, native C at one and N threads, and JS. Optimized fast twins come later, each with a law in PROOF.bend proving it equal to the spec twin. Only the shipped binary, run on the goldens, ever compares the original with a fast twin.