gottheflag/spun ? reverse-engineered prompt
Reverse engineered prompt
Build me a TypeScript library for working with binary files in a more human friendly way. I want to define a file as a tree of typed pieces, like sections, tags, numbers, reserved values, and references, then resolve it later, inspect it as JSON, edit values in memory, and finally emit the bytes when I am ready.
It should support deferred values for things like file sizes or checksums, symbolic references that turn into byte offsets automatically, and a way to parse an existing binary into a named layout that I can inspect and change. Keep it dependency free and make the API feel clean and composable. Include a simple example or two and enough tests to show that building, inspecting, changing, and emitting all work the way they should. If you need to check current TypeScript or Node docs while wiring it up, go ahead and look them up online.
Are you gonna build this?
make sure you review the code using coderabbit