Kelly Handbook: Software Factory Pattern

Date Compiled: 2026-04-27
Summary: Chapter 11 describes the Software Factory — a production-line architecture for building software with minimal human intervention. The factory takes product ideas through a staged pipeline: Intake → Research → Planning → Implementation → Testing → Release. Each stage has defined artifacts, gates, and specialized agents. The Kelly Router coordinates everything.

Key Concepts

  • Software Factory: A structured pipeline that processes ideas into shipped software with minimal human intervention
  • Six-Stage Pipeline: Intake → Research → Planning → Implementation → Testing → Release
  • Pipeline Stages: Defined as Phase → Subphase → Agent, with explicit gates between each
  • Quick Path vs Full Pipeline: Bug fixes skip research; new products go full pipeline
  • TEA Audit: Test, Evaluate, Assess — structured quality gate before release
  • Operator Decision: Human approves SHIP or NO-SHIP at the final gate

Notable Patterns

The Six-Stage Pipeline

Idea → Research → Planning → Implementation → Testing → Release
  │       │         │            │           │         │
Intake   CIS      PRD+         Sprint      TEA      Operator
         Loop    Arch+        Execution   Audit    Decision
                  UX Design

Stage 1: Intake

When a new idea arrives, the router:
1. Creates a timestamped project directory
2. Writes intake.md with project ID, timestamp, original idea, initial classification, and path recommendation

PROJECT_ID=$(date +%Y%m%d-%H%M%S)
mkdir -p /clawd/projects/$PROJECT_ID/{research-artifacts,planning-artifacts,implementation-artifacts,test-artifacts}

Stage 2: Research (CIS Loop)

The research-lead agent runs the Context → Information → Synthesis pipeline:
- Context: What do we know? What exists?
- Information: What do we need to know? Find it.
- Synthesis: What does it all mean?

Output: research-artifacts/research-summary.md with gate: READY or NOT-READY

Stage 3: Planning

The project-lead agent creates:
- product-brief.md — What are we building and why?
- prd.md — Full product requirements
- architecture.md — Technical design
- ux-design.md — User experience specs
- planning-summary.md — Gate decision (PASS/FAIL)

Stage 4: Implementation (Sprint Execution)

  • Break work into user-story sized chunks
  • Execute each story with validation before marking done
  • Document deviations from plan
  • Output: implementation-summary.md

Stage 5: Testing (TEA Audit)

  • Test: Implementation against requirements
  • Evaluate: Non-functional requirements (performance, security)
  • Assess: Overall quality

Output: tea-summary.md with gate: PASS, PASS-WITH-FOLLOWUPS, or REMEDIATE

Stage 6: Release

Operator decision: SHIP or NO-SHIP

Quick Path vs Full Pipeline

Task Type Path
New product Full pipeline
Feature Full pipeline
Bug fix Quick path (skip research)

Case Study: CSV Export Feature

From idea to production-ready in ~75 minutes:
- 10:15 AM: Operator sends feature request via WhatsApp
- 10:15–10:21 AM: Intake → Planning (6 minutes)
- 10:22–11:15 AM: Implementation (53 minutes)
- 11:30 AM: TEA Audit complete — PASS-WITH-FOLLOWUPS
- 11:31 AM: Release decision sent to operator

Other Sections in Chapter 11

  • 11.2: Research and Competitive Intelligence — CI Collector pattern, weekly cron job
  • 11.3: Document Processing Pipeline — contract summarizer, meeting notes, proposal generator
  • 11.4: Code Review Automation — pre-review checklist, automated review on git commit
  • 11.5: Project Tracking — daily status cron job, status board format
  • 11.6: Client Communication — automated status updates, meeting prep generator

kelly-handbook-multi-agent, kelly-tweets-factory, kelly-tweets-agents