Meet MonkeysPaw: a web framework where all the pages are prompts and what you see is whatever the LLM thinks you meant. Welcome to the first installment of “Works on Your Machine” where I’m sharing things that have graduated beyond just working on my machine.
The idea for Monkeys Paw grew out of some conversations I had after my RubyConf 2024 talk, Going Postel, where I explored an idea inspired by Postel’s law - building systems that accept whatever an LLM gives you, rather than focusing on trying to get an LLM to give you exactly the right code. The talk was a direct extension of an opinion I’ve held for a while now: Hallucinations are a Feature not a Bug.
MonkeysPaw is a web framework that generates entire pages from prompt files. Instead of writing HTML, CSS, and Javascript, you write down descriptions (wishes) of what you want, and the framework:
Conjures full web pages based on your wishes
Handles routing based on file structure
Manages layouts and styling through natural language descriptions
Turns vague gestures at functionality into working Javascript
You structure your wishes in markdown docs however you like. For example, here’s an excerpt from the sample app’s index.md page on Github that has things broken down into Title, Page Content, Hero Section, Key Features, How it Works, etc like so:
...
### Hero Section
- Large, dramatic headline: "MonkeysPaw 🐒✋"
- Tagline: "Wish-Driven Development for Ruby"
- Dramatic subtitle: "Be careful what you wish for..."
- Brief 2-3 sentence explanation: "A prompt-driven web framework that grants your web development wishes through AI. Like the legendary monkey's paw, it will fulfill your requests exactly as stated—for better or worse."
- Call-to-action button: "Make Your First Wish" (links to Getting Started)
...
and an example of the page that’s generated:
MonkeysPaw isn’t just a silly experiment (though is absolutely is that). It represents a fundamental shift in how we can think about building things in an AI-first world and what we should think about building:
Content-first development: Start with what you want to express, not how to structure it
Natural language as source code: Your intention becomes the program
Lower barriers between thought and implementation: Sketch ideas in language, not syntax
While most web frameworks are either optimized for developer speed or control, MonkeysPaw is optimized for expression. It’s the web framework equivalent of “yes, and…” improv — whatever you suggest, it tries to make work.
MonkeysPaw is now available as a Ruby gem, and the installation and usage instructions are available on Github at sublayerapp/monkeyspaw. PRs welcome!
Like the classic horror story (and Simpson’s episode) teaches us, wishes do often come with unexpected consequences:
Pages may be eerily close to what you wanted but slightly… off
Performance is sacrificed at the altar of creativity, but the output is cached, so you wont regenerate pages unless you mean to
Complex interactions might require specific wording and take a few tries to get right, and may not even work every time even after you get it right once.
MonkeysPaw is the first in what I expect will be may more “Works on Your Machine” posts, where I’m releasing a things that are a bit more put together, whether it’s open source frameworks like this or actually launching AI products here. We’ll see.
As far as what’s next for MonkeysPaw, I’m going to start sharing it more publicly and have some fun ideas for places to go with it like caching individual components, image generation, preloading of pages, and getting it to dynamically generate erb partials by relying on rescuing from NameError.
If you get a chance to play with it, please share! I’d love to see what it comes up with.