Chapter 11: Business Automation
This chapter covers the real production systems that justify OpenClaw as a business tool. The software factory pattern (the Kelly Router architecture from AGENTS.md) takes product ideas through six stages: Intake (project creation with mkdir and intake.md), Research (research-lead runs CIS pipeline—Context, Information, Synthesis—outputting research-summary.md with gate READY/NOT-READY), Planning (project-lead creates product-brief.md, prd.md, architecture.md, ux-design.md, planning-summary.md), Implementation (sprint execution with story-sized chunks, validated per-story before marking done), Testing (TEA audit—Test, Evaluate, Assess—outputting tea-summary.md with gate PASS/PASS-WITH-FOLLOWUPS/REMEDIATE), and Release (operator decision SHIP or NO-SHIP). For smaller tasks like bug fixes, a quick-path skips research and goes straight through planning → implementation → test. The full pipeline from idea to production-ready code with documentation and QA report in ~75 minutes is the reference benchmark.
Competitive intelligence is high-value automation: automated weekly CI monitoring with web_search + web_fetch to track competitor pricing, features, and differentiators, comparing against a JSON baseline and alerting on changes. Research reports are fully automated: search multiple queries, fetch top results, extract structured data, save with executive summary. Document processing pipelines handle contracts (extract terms, payment, renewal clauses, liability via pdftotext + vision), meeting notes (daily aggregation of action items and decisions to WhatsApp), and proposal generation (reading client briefs, service catalogs, past proposals to generate drafts). Automated code review catches security issues (hardcoded credentials, SQL injection), code quality (long functions, missing error handling), documentation gaps, and test coverage failures, with findings formatted by severity. Pre-push git hooks trigger automated review before human review. Project tracking via daily cron sweeps all project directories, reads implementation and planning summaries, writes a status board, and sends WhatsApp with active/blocked/completed items.
Client communication automation focuses on drafts only—never final send without human review. Status update emails are generated as reviewable drafts in a drafts directory. Meeting prep automation reads past meeting notes and active projects to generate structured prep documents with talking points, open action items, and what's changed since the last meeting. The Kelly Router case study shows a CSV export feature going from WhatsApp message to production-ready implementation in ~75 minutes with full TEA audit, documenting every step from 10:15 AM intake through 11:30 AM release recommendation.
Key Patterns
- **Six-stage software factory:** Intake → Research (CIS, gate READY) → Planning (PRD+Arch, gate PASS) → Implementation → Testing (TEA, gate PASS/PASS-WITH-FOLLOWUPS/REMEDIATE) → Release
- **Quick-path for features:** Well-defined features skip research; go straight to planning → implementation → test
- **Drafts-only for client comms:** Generate reviewable drafts; human reviews before any final send
- **Competitive intelligence baseline:** Store competitor data as JSON baseline; cron compares and alerts on changes
- **TEA audit:** Test against requirements, Evaluate non-functional (performance, security), Assess quality
Related Concepts
- [[kelly-handbook-ch7-multi-agent]] for the research-lead, project-lead, test-lead orchestration
- [[kelly-handbook-ch6-cron]] for the scheduled intelligence monitoring and project tracking cron jobs
- [[kelly-handbook-ch3-file-automation]] for the file pipelines that power document processing
- [[kelly-gas-town-gap-analysis]] for factory architecture comparison across different approaches