Who it is forA developer who wants to extend the town with a new place, such as a new district, and needs to know which folders hold the engine and the simulation.
The problemThe codebase is split into kernel, models, world and sim folders, and a change in the wrong place can break the fixed build order.
The outcomeA new place added in the correct folder with its own card, built and running in the local dev server.
What you need first
- Node.js 20 or later with npm
- A terminal and a web browser
- Git, if you plan to clone the repo and change its code
Steps
- Read the 'How the code is laid out' table and identify the folder for the new place, usually yard/world/ for static parts and yard/sim/ for moving ones.
- Use the Part, Path and corridor graph helpers in yard/kernel/ to draw and route the new place.
- Register the new place in yard/index.ts, which builds everything in a fixed order.
- Run
npm run devand click the new place to check that its card shows. - Run
npm run buildto confirm the change compiles into out/.
Prompt for your agent
In the repo Khalidabdi1/factory, add one new static building under yard/world/ and register it in yard/index.ts, then run `npm run build`. Verify that the build finishes without errors and that the new building appears when `npm run dev` runs.
Caveat. The README does not document an API for adding places, so the steps depend on reading the code and matching the existing patterns.
Get 5 new use cases every morning. Free, one short email, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Disclaimer
Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page