How the Factory Works: Repeated prompts become code
Share
Genius Loci Knowledge Hub · How the factory works
People waste money asking AI to redo the same logic repeatedly. The Genius Loci factory solves this by turning repeated prompts into stable code with tests. When a prompt works twice, it becomes a script in the factory's log under scripts/ or core/ with tests attached, reducing redundant work. [1]

How the factory handles it
In the Genius Loci factory, when a prompt is repeated, it gets transformed into code. Once the system recognizes a stable pattern, it logs it as a script or a core file, indicating that the pattern has been seen twice. This process is recorded in the factory's log, showing the transition from repeated prompts to code. [1]
The factory's log also includes tests attached to each script or core file, ensuring the reliability of the newly created code. As of now, the factory's records show 218 scripts have been created through this process, highlighting the efficiency of converting repeated prompts into functional code. [1] [2]
The proof, in numbers
The system's event logs show 218 scripts that were once prompts, now stabilized as code. This transition from prompt to script reduces the system's operational costs over time, as fewer prompts need to be processed. The logs also reveal 186 core modules, most of which are now stable scripts. These numbers are read directly from the factory's logs when the article is written. [1] [2]
The system applies its heuristics and templates directly without re-explaining rules already documented. This efficiency ensures that repeated logic is handled through scripts and skills, rather than being recounted in narrative history. This approach keeps memory/learnings.md focused on narrative history, while logic and repeated tasks are stored as durable code. [4]
Steal this: build it yourself
- Identify repeated tasks. Notice when your model performs the same task multiple times. This is a cue to start scripting. [1]
- Prototype with prompts. Treat each prompt as a prototype. Experiment and refine until it works reliably. [1]
- Stabilize the prompt. Once the prompt reliably produces the desired output, it’s ready to be formalized. [1]
- Write code. Convert the stable prompt into a script with clear instructions and parameters. [1]
- Create tests. Ensure your script works by creating test cases and verifying outputs. [1]
- Iterate and improve. Refine your scripts based on feedback and new requirements. [1]
Sources: [1] Genius Loci field note: Repeated prompts become code; [2] Live numbers read from the running factory; [4] From the factory's rulebook (CLAUDE.md: Session Operating Discipline).