Operations as Code
Every revenue process should be
version-controlled, testable code.
Not spreadsheets. Not tribal knowledge. Not a two-week sprint to change a scoring weight. Code, with review, simulation, and rollback.
Loop Operations is the platform that makes this real. 10 loops covering the full revenue lifecycle, organized into four chains plus a cross-cutting loop. Six live in production today, processing real CRM data end-to-end.
Read the framework: Revenue Loops v0.1 → The System
Why the old model breaks
Predictable Revenue taught us GTM is a headcount game.
Add reps, get revenue. Linear math. That model worked when humans were the only processors. It stops working when the bottleneck shifts from capacity to context.
Manual processes
Spreadsheets for territory planning, manual lead assignment, email-based approval chains, disguised as “operations.”
Tribal knowledge
Routing logic in one person's head. Territory rules in a shared spreadsheet. Exception handling via chat DMs.
No feedback loops
Decisions get made but nobody tracks whether they were good. Route a lead into a black hole.
Linear scaling
More reps = more ops headcount. The team grows linearly with the org instead of building leverage.
Operations as Code
Ten loops. Four chains.
The full revenue lifecycle.
Each loop covers a stage of the revenue lifecycle, from capacity planning to customer expansion. Loops chain together: the output of one becomes the input of the next. Every process is version-controlled, testable code. Every decision is explainable.
Six loops live in production today (Design, Deploy, Qualify, Route, Engage, Pursue). Generate is partial — Signal Scanner runs; broader campaign / ABM scope is planned. Onboard, Expand, and Coach are designed but not yet built.
Planning: architecture of the revenue org
Design Live
ICP, segments, capacity, territories, comp. Target productivity (profile × segment × territory), ramp curves, roster, annual targets. Scenarios are complete, sharable plans. Python on Modal.
Deploy Live
Materializes Design's scenarios in surfaces of work: territory hierarchy, user assignments, account-to-territory matching with deterministic + AI-agent fallback for ambiguous geography.
Demand: every lead
Generate Partial
Demand creation. Live: Signal Scanner — rolling Claude Haiku + web_search scan of target accounts for buying signals (funding, hiring, leadership, tech, product). Planned: campaigns, ABM, content, paid media, events, partner programs.
Qualify Live
Enrich via third-party data, score with a 10-factor config-driven model (max 135), assign a grade A/B/C/D, write back to CRM.
Route Live
Territory-aware rules engine. First-match-wins. Falls back to Claude agent for ambiguous geography. Resolves to user, pool, or queue.
Acquisition: every opportunity
Engage Live
AI researches the prospect, composes a personalized email sequence, scores it against a 7-criteria quality rubric. Reps review and approve via natural-language commands.
Pursue Live
Select deal plays, create milestone tasks, monitor deal health, nudge stale opportunities, surface risk. The full opportunity lifecycle in one loop.
Retention: every account
Onboard
Implementation kickoff, training, adoption milestones, health monitoring during ramp. Ends when customer reaches first value. (Frontier — most modern revenue systems run this informally; consumption pricing makes it operationally critical.)
Expand
Renewal management, upsell/cross-sell plays, expansion pipeline. Same scoring rigor as new-lead Qualify, applied to expansion opportunities.
Cross-cutting: across all chains
Coach
Aggregate call intelligence, activity patterns, and deal outcomes into coaching signals per rep. Surfaces patterns a manager can't see from sampling. Doesn't replace the manager — gives them better situational awareness.
Governance is structural, not a loop — CODEOWNERS, branch protection, CI gates, and the audit log enforce who can change what. Workload rebalancing lives inside Design's continuous-monitoring mode.
Live in production
Working system, not a slide deck
The Demand and Acquisition chains are live, processing real CRM leads end-to-end. Here's what happens when a lead is created:
CRM trigger fires
API trigger sends lead data (email, company, title, industry, employee count) to the Qualify webhook
Qualify: Enrich + Score
Third-party enrichment fills gaps (industry, headcount, tech stack, funding, social profiles). Config-driven scoring engine evaluates 10 factors across fit and intent dimensions. Score and grade written back to CRM.
# Illustrative scoring output
company_size: 20 industry: 15 email: 15 seniority: 12
tech_stack: 7 company_type: 5 linkedin: 5 source: 25
geography: 15 has_email: 10
Score: 129/135 Grade: A Config: v3.1.0
Route: Assign to queue
Rules engine evaluates employee count, industry, and geography to match the right queue (Enterprise, MidMarket, SMB, General). Lead owner updated in CRM.
Engage: AI-powered prospecting
Claude API researches the prospect company: industry context, pain points, competitive landscape. Composes a personalized 3-4 email sequence. Quality-scored against a 7-criteria rubric. Stored for rep review and approval via AI skills.
Pursue: Deal plays + deal health
When an opportunity is created, the play engine selects a deal progression strategy based on amount and segment. Creates milestone CRM tasks with staggered due dates. Continuously monitors deal velocity, flags risk, and nudges reps on stale opportunities. The full opportunity lifecycle in one loop.
Everything logged, everything learnable
Every execution, scoring factor, routing decision, and enrichment result stored. Full audit trail. Outcomes feed back into the loops. The system improves with every signal.
Core principle
Code executes. Agents reason and generate. Humans govern.
Running every decision through an agent would be slow and expensive. Running everything through static rules can't produce research, prose, or semantic judgment. The split is deliberate: code where determinism is possible, agents for the cognitive work code can't do, humans above both.
Code executes
Scoring math, rule evaluation, territory matching by billing fields, CRM sync, nudge thresholds, workflow orchestration. Fast, cheap, auditable. Vast majority of the volume.
Unlock: AI coding tools let revenue engineers convert process gaps into deterministic code at a rate that wasn't feasible before.
Agents reason and generate
Prospect research and email composition, rolling signal scans of target accounts, fuzzy territory matching from enrichment data, classification of unstructured notes, call-transcript summarization. Reasoning, inference, and generation that code can't do.
Every decision carries a confidence score. Sub-threshold matches auto-escalate to humans.
Humans govern
Write specs for new loops, set thresholds and policy, review low-confidence escalations, handle the true exceptions, audit the reasoning trail.
Thresholds are config, not code — ops can tune them without a release.
Architecture
No custom webapp. Each role uses the tool they already know. The platform is an API layer that orchestrates everything.
Sales reps + managers
CRM
Scores, grades, enrichment data, tasks, and AI-composed email sequences, all on the record. Cases for overrides and approvals with built-in tracking.
Reps, managers, leadership
Conversational BI
Ask questions in natural language, grounded in CRM + loop data. Reps get pipeline health, lead reasoning, and sequence review on demand. Leadership gets forecast, rep performance, and loop health without opening a dashboard. Same engine, role-scoped answers — 32 tools across reporting, config, and CRM actions.
Orchestration
Workflow Engine + AI
Loop execution, enrichment, AI prospecting via Claude API, CRM sync, action workflows. Daily ETL keeps the analytics layer current. One resolver powers live lead routing, batch account assignment, and dry-run simulation — one codebase, many callers.
Configuration
YAML in Git
Scoring weights, routing rules, engagement plays, quality rubrics, thresholds, all version-controlled. Ops edits via MCP skills. Changes deploy automatically.
scoring_model:
max_score: 135
fit:
weight: 85
components:
- id: company_size
field: employee_count
weight: 20
rules:
- condition: ">= 1000"
points: 20
- condition: ">= 100"
points: 12
- id: seniority
field: title
weight: 15
rules:
- condition: "in:ceo,cfo,cto,vp,president"
points: 15
- condition: "in:director"
points: 10
- id: tech_stack
field: technologies # From enrichment
buying_signals:
- crm
- marketing automation
- enterprise softwareEvery decision is explainable
Every scored lead, routed assignment, agent match, and play selection writes a reasoning trail. Anyone can ask “why was this lead scored A?” or “why did this route to Enterprise?” and get a structured answer — rule matched, confidence, inputs, timestamp. Auditable by default.
rule_matched: geography_territory (priority 50)
action: assign_to_territory
territory: ams/west/norcal/sf-bay
owner: Andrew Straus (AE)
method: deterministic
confidence: 1.0
inputs:
billing_country: US
billing_state: CA
billing_city: San Francisco
reasoning: "City 'San Francisco' matches patch
'sf-bay' under ams/west/norcal.
Primary AE found via UserTerritory2."
logged_at: 2026-04-16T14:22:11ZThree roles, one platform
Revenue Engineering, Operations, and the Field
Each team interacts with the platform differently. Engineers build the engine. Ops tunes the behavior. The field works in their CRM. Nobody needs a new tool to learn.
Builds and extends the infrastructure
Workflow logic, CRM integrations, enrichment pipeline, scoring engine, database schemas. Deploys via Git and workflow API. Debugs in the workflow engine UI.
Owns: how loops work | Never touches: scoring weights, routing rules, play definitions
Tunes behavior via config and AI skills
Scoring weights, routing rules, play definitions, grade thresholds, buying signals, all in YAML. Edits via natural language AI skills: “increase VP seniority to 14 points.” Previews impact before deploying. Monitors health via live dashboards.
Owns: how loops behave | Never touches: workflow code, database schemas, integrations
CRM-native with AI-powered self-serve
Scores, grades, enrichment data, and tasks appear on every CRM record automatically. Override routing or escalate a deal via CRM cases, with built-in approvals and audit trail. AI skills give reps instant answers: “What's my pipeline health?” “Why was this lead scored A?”
Sees: scores, reasoning, tasks, overrides | Never sees: config, workflows, infrastructure
What changes
| Traditional RevOps | Loop Operations | |
|---|---|---|
| Processes | Spreadsheets, tribal knowledge | Version-controlled YAML |
| Decisions | Invisible, untracked | Every decision logged with reasoning |
| Changes | Email chains, meetings, hope | PR review → simulate → deploy |
| Reporting | Pull data, build slides | Conversational BI — ask in plain English, grounded in CRM + loop data |
| Scaling | More reps = more ops headcount | Platform handles volume, team handles complexity |
| AI | Chatbot on the side | Embedded in every loop. Agents handle edge cases |
This is what I build.
The framework, the live system, and the blueprint for the highest-leverage operations team in software.
Six loops live. CRM-native. AI-embedded. Config as code.