Finite Object State Machines
Building Business Software for the AI Age
A hands-on guide to re-think business software from mere CRUD to a lifecycle-driven state machine using Rails 8, FOSM, and your favorite AI Coding Agent
Based on the FOSM paper: “Implementing Human+AI Collaboration Using Finite Object State Machine”
Part I — The Paradigm Shift
Part II — The Foundation
- Rails 8 — The One-Person Framework
- Base Rails App — The First Wall
- The FOSM Engine — Core Architecture
- Your First FOSM Object — The NDA
Part III — Building the Business Platform
- Partnerships — Multi-Entity Relationships
- CRM — The Customer Lifecycle
- Financial Lifecycle — Invoicing & Expenses
- People Operations — Hiring, Leave, Time Tracking
- Operations — Projects, Vendors, Inventory, Knowledge Base
- Strategic Objects — OKRs, Payroll, Feedback
- The Company Entity — External Data Meets FOSM
Part IV — The FOSM Primitives
- Primitive 1 — Access Control
- Primitive 2 — Inbox & Messaging
- Process Documentation — Code as the Living Document
Part V — AI Integration & Beyond
- The Bot Architecture
- Every Module Gets a Bot
- AI-Powered FOSM — The Full Circle
- Coda — Where FOSM Goes Next
Appendices
- Appendix A — FOSM Glossary
- Appendix B — The Complete Lifecycle Reference
- Appendix C — The FOSM Paper: Annotated Summary
- Appendix D — Setting Up the Development Environment
- Appendix E — AI Prompt Templates
This book is available as a single LLMs.txt file for use as LLM context.