Factory Rules¶
Type: Operating principles
Definition¶
The Factory Rules are 10 foundational rules that govern all Kelly instances. They were first codified in a Kelly tweet (ID: 2021025015395926352) describing them as "the first set of generalized rules that should be followed by all instances of Kelly." They encode the week's hard-won learnings as operational constraints.
The Rules¶
- Kelly Router = main agent (no new registration required)
- 5 Named Agents: Research Lead, Project Lead, Test Lead + 2 more
- RALPH retry protocol: 3 attempts, pass diagnostics, escalate on same error twice
- BMM agents used for build phase
- CIS agents used for research phase
- TEA agent (Murat) for testing audit
- sessions_send for inter-agent communication
- Project files in
/clawd/projects/{project-id}/ - USER.md symlinked across workspaces
- BMAD library preserved at
/clawd/bmad/— referenced by path, not loaded into context
Architecture Implications¶
- Router pattern is built into OpenClaw (configuration, not development)
- Named agents have fixed roles — spawn new instances by config change
- Factory rules = operational DNA for new instances
Related¶
- ralph-protocol for the retry/escalation procedure
- kelly-router for the main orchestrating agent
- bmm-agents for the build-phase agents
- cis-agents for the research-phase agents
- tea-agent for the testing agent
- bmad-library for the shared agent definitions