Have you ever tried to embed a chess game on a website? If you have, you probably reached for one of the established libraries: Chessboard.js, chess.js, Lichess's board component. They work, but what if you wanted Atomic Chess? Or Racing Kings? Or a variant where pieces can clone themselves? Suddenly you're forking entire codebases and fighting against architectures designed for one game.
That frustration is what started everything. Sixteen days later, the result was two game engines, six playable games, 15 AI-callable tools, Consumer SDKs, a 190-page rulebook pipeline, developer documentation, and a main site tying it all together. The Moddable Chess Engine handles the turn-based logic. Moddable Hexmaps handles procedural map generation. The MCP server makes both engines callable by any AI agent. All MIT-licensed, all built using AI-augmented engineering workflows, all deployed to production in those 16 days.
The Chess Engine
The Moddable Chess Engine plays 70 chess variants on boards from 4x8 to 12x8, with multi-depth AI, Web Worker threading, 26 variant-specific opening books, and 5 difficulty levels. Pure JavaScript, no dependencies, embeddable with a single iframe tag. Every variant is a single plugin file. Adding variant #71 takes minutes.
The engine also ships a Consumer SDK: renderer extension hooks, a reusable game controller, replay API, unit templates, terrain predicates, and effect lifecycle hooks. These aren't chess-specific. They're the primitives for building any turn-based game on top of the move engine and AI. Native ESM throughout, no build step, same source files serve browser, Worker, and Node.js.
The proof is Dungeon Chess, an asymmetric skirmish game with 4 fantasy factions, dungeon terrain, water hazards, and XP-budgeted unit drafting. It runs entirely on the consumer APIs. Custom tilePainter renders dungeon walls. Custom pieceProvider renders fantasy units. The game controller handles multi-faction turns. Zero engine forks. The chess engine became a game framework.
The Hex Map Framework
Moddable Hexmaps solves a different problem: board game designers need maps, but designing them manually is tedious and sharing them is friction-heavy. The answer: seeded procedural generation. Same seed, same map, every time. Every map has a URL. Sharing a map is sharing that URL.
The framework generates hex grids via Canvas (flat-top or pointy-top, at any ring count) for six game configurations: volcanic landscapes, 55-terrain fantasy worlds, galaxy layouts with wormholes and nebulae, faction-clustered biomes, and Seafarers-style island boards. Maps export to PNG, PDF, annotated SVG, and JSON. Everything renders client-side, so there's no server cost regardless of scale.
Like the chess engine, hexmaps ships a Consumer SDK for iframe-free embedding with render hooks, event system, and full programmatic control. The same pure functions that render maps in the browser power 6 AI-callable MCP tools, letting agents generate and analyse hex maps without a UI.
Why 16 Days Was Enough
Every architectural decision compounds. The variant plugin interface means adding a new chess variant is a single file. The seeded RNG means sharing a map is sharing a URL. The renderer hook system means Dungeon Chess didn't fork the engine. The postMessage API means any embed is controllable at runtime without rebuilding the iframe. Native ESM means the same source files serve the browser, Cloudflare Workers, and Node.js without a bundler.
Each decision removes future work. The 16-day timeline is a consequence of getting these decisions right early, not of typing faster. The architecture that made both engines embeddable also made them AI-callable for free: a Cloudflare Worker at tools.moddable.games serves 15 tools over MCP, REST, OpenAPI, and llms.txt. Any MCP-compatible agent connects with one command:
claude mcp add --transport http moddable-tools https://tools.moddable.games/mcp
The tools are stateless, the Worker runs on Cloudflare's free tier, and the same pure functions that power the browser games power the AI tools. No translation layer. No separate API.
The Other 14 Days
Sixteen days to ship. Fourteen more to make it professional. The ratio is the point.
AI-augmented engineering compresses the build phase dramatically. Two game engines, six games, 15 MCP tools, Consumer SDKs, a 190-page rulebook pipeline, developer documentation, and the site tying it all together. That happened in 16 days because the architecture decisions were right and the tooling was configured to let the AI operate at full speed.
The next 14 days were a different kind of work entirely. Not building, but curating. Reading every paragraph with the awareness that an AI will confidently write "But" at the start of 22 sentences across a site and never flag it as a pattern. Noticing that version numbers in prose add noise without adding information. Catching that an evolutionary framing ("first we built X, then it became Y") is the wrong narrative when the reader just wants to know what the thing does. Recognising that OG images referenced titles from three rewrites ago, that favicon paths resolve differently on localhost versus production, and that a removed meta tag was silently breaking RSS feeds for every visitor.
Each individually trivial. Collectively the difference between a portfolio piece and a side project.
The more interesting work was systemic. Every correction becomes a rule, every rule gets encoded into the development environment, and that environment enforces consistency across every project I touch without me needing to remember. There are now 108 global rules governing how the AI operates across 10 active projects. When a new convention is introduced in one project, it propagates outward: issues are created in sibling repositories, cross-project memories are updated, and the next session in any project starts with an automated audit that checks compliance against the full rule set.
The workflow goes further than passive rules. Session triggers automate the relationship between me and the AI at the process level. Opening a session runs a compliance audit, checks open GitHub issues across all repositories, and auto-fixes anything with unambiguous instructions. Closing a session propagates patterns, updates shared memories, and creates issues for work that was discovered but not yet addressed. Between sessions, active loops monitor issue queues, verify deployments, and action items that don't require human judgement.
36 open issues across 4 repositories. Each one written with enough specificity that the AI can resolve it autonomously when the next session opens. The issues aren't a backlog. They're a queue for a system that processes them without being told to look.
This is what separates prompt engineering from engineering with AI. Prompt engineering is asking a model to write code. Engineering with AI is building the feedback loops, memory systems, and automation infrastructure that make the model's output compound across time and projects. The 16-day build phase is impressive. The system that makes every subsequent build faster, more consistent, and less dependent on me remembering what was decided last Tuesday is the actual product.
Try Them
Both engines are live, MIT-licensed, and waiting for someone to build something weird with them.
- moddable.games — the full ecosystem: engines, games, tools, developer docs
- chess.moddable.games — play any of the 70 variants right now
- hex.moddable.games — generate a map, grab the seed, share the URL
- tools.moddable.games — connect your AI agent to 15 game tools
- github.com/Moddable-Games — everything is open source