AI OS Platform — Onboarding
Internal · confidential · please don't share
AI OS Platform
Onboarding · v1 · Internal

AI OS Platform — Onboarding for Nishil & Yashes

Welcome — what you’re building

Hey Nishil, hey Yashes — welcome aboard.

You’re joining a portfolio of projects that share one thesis: every company is about to be redesigned around AI, and the ones that build their own AI operating system will own the upside instead of renting it. Each “OS” you’ll see in this doc is one instantiation of that thesis — for a specific company, vertical, or product.

This doc is your map. It covers four things:

  1. The Big Idea — the methodology and language we use. You’ll hear these terms in every meeting and code comment. Internalize them.
  2. The platform model — what an OS actually is, mechanically: agents, brain, channels, workspaces, the closed-loop tuning surface.
  3. Masterkey + the OS portfolio — what each project is, who it’s for, where it stands.
  4. How we work — the rituals and conventions that keep parallel OS builds from colliding.

Read it once end-to-end. Bookmark it. Ping me on anything that’s unclear — gaps in this doc are bugs.


Part 1 — The Big Idea

The AI Org Chart

Every company has an org chart on paper. The real org chart is messier — who actually owns what decision, where the bottlenecks live, where work falls on the floor. The AI Org Chart is the parallel digital structure that mirrors the human one, with an explicit intelligence layer designed on top of each role.

You’re not building a SaaS product that bolts onto a company. You’re architecting that company’s intelligence layer deliberately, by design and not by default.

AAA — Automation → Augmentation → Autonomy

Three layers, always sequenced in this order:

The order matters. Hands first builds credibility (and removes existing risk). Suit second buys you talent leverage. Brain last scales without proportional hiring. Skip the order and you burn trust.

No-Go Zones

Places AI should not go, regardless of how capable the model gets:

Every OS we design must identify the company’s No-Go Zones first, before any automation planning. This is non-negotiable. If you ever feel a feature is creeping into a No-Go Zone, flag it.

DERISK → UNCLOG → SCALE

The 90-day deployment sequence we use with every customer:

When you’re designing a feature, ask: “Is this DERISK, UNCLOG, or SCALE?” Features land better when they match where the customer is in the sequence.

Own, Don’t Rent

The strategic core. Two companies, same revenue, same margins today.

The OS we build for each customer is the owned-intelligence asset. The market knows the difference — Company B gets a multiple premium on identical revenue.

The Empty Chair

The positions you never need to fill. If your customer is growing 30% YoY, the old playbook says hire 30% more people. With an AI Org Chart designed well, hire 10% — agents cover the gap. Each unfilled position is an Empty Chair: invisible value, real margin.

Intelligence Arbitrage

Why this whole thing exists commercially. There’s a gap between what AI can do today and what most organizations are actually doing. Agents can run prospecting, support, finance, and compliance at single-digit percent of human cost — but 95% of companies haven’t restructured because they don’t have a framework, a method, or someone to architect the transition.

Intelligence Arbitrage is exploiting that gap. The methodology (AI Org Chart + AAA + DERISK→UNCLOG→SCALE), the platform (Masterkey), and the OSs you’ll be building are all instruments for capturing the gap on behalf of customers.

This is also the bet behind the book that’s being co-authored with Tony Robbins — same thesis, same methodology, framed for the broader market.


Part 2 — What every OS actually is

The agent thesis

The OSs we build are not chat products. They are factories full of highly specialized agents that do tasks — unattended, in production, in a loop.

This is the opposite of the OpenClaw / “general AI assistant” pattern. A chat agent is broad and shallow: it can attempt anything, but it doesn’t own any single job. Our agents are narrow and deep: each one owns one workflow, runs on a schedule or an event, has scoped tools and a known evaluation surface. We aren’t trying to build one omniscient assistant — we’re trying to deploy unlimited specialists, each doing one job well.

The frame: highly capable but limited. A great agent is a deep expert at one specific workflow, not a generalist. Think “the agent that triages inbound leads every 15 minutes,” not “the agent that helps with everything.”

Why this matters: a specialist agent can be evaluated, tuned, version-controlled, and trusted. A generalist agent can’t — its surface is too big to measure, so you can’t tell when it’s degrading.

The anatomy of an agent

Every agent in every OS is composed of four configurable variables:

You improve an agent by tuning any one of these four variables and watching the eval score move. Wrong output? Maybe the brain is missing a fact. Maybe the skill is unclear. Maybe the wrong tool is available, or the wrong model. The variables are knobs; the journal tells you which knob to turn.

Channels — how agents reach humans

An agent is not a UI. It is a process. It reaches humans through whichever channel fits the situation:

Telegram · Slack · WhatsApp · email · SMS · in-app chat · voice · calendar invite · push notifications

The same agent can publish to multiple channels — the channel is a transport, not a behavior. The “Lead Triage” agent emails the rep on Mondays, DMs them on Slack when a hot lead comes in, and pushes a Telegram message when a deal is at risk over the weekend. One agent, three channels, one job.

The Brain — three layers concatenated on every run

Every agent run pulls context from three brains and concatenates them into the prompt:

At runtime: agent_brain + department_brain + company_brain → prompt (~50K char budget, prioritized).

This is how a Sales SDR agent “just knows” that Q2 is a launch quarter (company brain) and that this audience converts best on Wednesday emails (department brain) and that a human previously corrected it for being too pushy (agent brain) — every single time it runs, without anyone retelling it.

Bus agents — agents that orchestrate other agents

Not every agent does the work. Some agents route the work. We call these bus agents.

A bus agent listens to the event bus, watches what’s happening across the OS, and dispatches specialist agents when their preconditions hit. Patterns:

Bus agents are how the OS stays coherent as the number of specialists grows. Without them you have a swarm. With them you have an orchestra.

Auto-improvement — the closed loop

Every agent run writes a journal entry: input, output, model, tokens, cost, eval score, any human correction. The journal is the gradient signal for the entire OS.

This is the compounding moat. Each week of operation makes every customer’s OS smarter, in their own context, on their own data.

DejaDo — the onboarding engine

We can’t onboard a customer by interviewing them for six weeks. The onboarding engine is DejaDo: a tool that ingests the customer’s email history and infers their org from it.

DejaDo reads inbound and outbound email and identifies:

Output: a proposed OS — which agents to deploy, what to seed the brain with, which playbooks to install. Self-serve target: a working OS in under an hour. Facilitated target: 5-day Strategy Workshop with the customer.

Status: designed in detail, not yet built. Critical path for the self-serve scaling story.

Agent Lab — the opportunity observer

Once the OS is running, Agent Lab keeps watching what humans in the org are doing — what they type, what they click, what they decide — and looks for patterns that should be automated next.

Agent Lab proposes; humans approve or reject; the OS deploys. The platform literally suggests its own next agents as it learns the business.

Workspaces & workflows — replace or integrate

The OS is not a chatbot bolted onto an existing stack. It is a workspace where humans and agents do work together. Each customer gets a real product surface — pages, dashboards, forms, queues, inboxes, dashboards — not just “talk to the bot.”

Our philosophy on third-party tools is binary:

Default to replace. Integrate only when the customer’s reality forces it.

The extensibility thesis

The platform must support any new kind of workflow or app as a capability — and constantly absorb new agents to do work and new tooling to monitor those agents. That’s the whole game.

What this requires of the platform:

If we get this right, the platform doesn’t get more brittle as it grows — it gets more valuable. Every new vertical, every new customer, every new agent makes the next one cheaper to ship.


Part 3 — Masterkey and the OS portfolio

Masterkey is the factory

We hand-built four production OSs first — RRI-OS, CTOx OS, Omya OS, Momentis OS — to learn what works. Each proved patterns at real scale (real data, real users, real money). Masterkey is the factory we’re now extracting those patterns into, so we can stamp out new OSs in hours or days instead of months.

Think of it this way: the four early OSs are bespoke proofs. Masterkey is the manufacturing line. Future OSs will increasingly be configured outputs of Masterkey rather than hand-built from scratch.

Important — customer-owned code. Every custom OS we build today (RRI-OS, CTOx OS, Omya OS, Momentis OS, Intelligent Advisor) is a unique codebase owned by that customer. The customer gets the repo, the deploy, the data. We do not run shared infrastructure for them. “Own, Don’t Rent” applies to the OSs themselves: each customer owns their OS the same way they own their org chart. This is the durable trust mechanism — and the reason a future Salesforce-style acquirer can buy the platform without the customers feeling captured.

Masterkey has two SKUs (one shipping path is still aspirational)

Custom / Enterprise (what we ship today) Masterkey Cloud (not built yet)
Runtime Customer’s own infra (Vercel, AWS, on-prem) Hosted by Masterkey (multi-tenant, isolated)
Brain Self-hosted by the customer Hosted by Masterkey
Code ownership Customer-owned repo (unique per customer) Compiled code mirrored to the customer’s repo
Deploy time 2-6 weeks 1-3 days (once it exists)
Target Mid-market & enterprise SMB / self-serve
Spec updates Pull-based — masterkey update opens a PR Auto-upgrade (opt-out per spec)
Status today ✅ Live — every existing OS is one of these 🚧 Not built — designed, on the roadmap

The Cloud SKU is the eventual self-serve, multi-tenant product hosted by Masterkey itself. It doesn’t exist yet — every OS we have today is a custom-built, customer-owned codebase. Building the Cloud SKU is a future workstream; for now, everything is enterprise-pattern (per-customer repo).

Four core components

Also in the stack: a Spec Compiler (specs → code), License Server (JWT, 24h validation), and a signed Registry for spec distribution.

Build state — honest snapshot

Live in the Masterkey codebase today: assessment engine, strategy report generator, OS activation pipeline, Pack install/configure/activate flow, agent execution (cron + event-driven, journals, governance), the Sales Foundation Pack, the Live Sales Coach Pack (Deepgram WebSocket coaching), 26-page app shell, ~50 Prisma models.

Not built yet — but on the roadmap:

Heads up: terminology is shifting. The current code says “Packs”; the future spec language calls them “Specs + Industry Packs.” Don’t be surprised when both terms show up. Spec format is not yet locked — actively being designed.


The OS portfolio

OS Who it’s for Status URL
RRI-OS Tony Robbins / Robbins Research International (flagship) In build rri-os-mu.vercel.app
CTOx OS CTOx (marketing + sales + facilitator unified) Deployed os.ctox.com
Omya OS Omya Life HNW membership community Deployed os.omya.life
Momentis OS Carson family office Deployed momentis-os.vercel.app
Intelligent Advisor White-label OS for wealth management firms (Pacific Capital is customer zero) In build os.pacificcapital.com (target)

RRI-OS — flagship, Tony Robbins

CTOx OS — unified marketing + sales + facilitator

Omya OS — HNW membership community

Momentis OS — Carson family office

Intelligent Advisor — white-label OS for wealth management


Part 4 — How we work

Stack defaults

Unless a project says otherwise, expect:

Models — two different layers, don’t confuse them:

The SDLC — one feature at a time, many in parallel

              ┌──────────────────────────────────────────────┐
              │              THE FEATURE LIFECYCLE            │
              └──────────────────────────────────────────────┘

  ① write plan ──▶ ② spawn worktree ──▶ ③ build + test ──▶ ④ open PR
  tasks/plan.md     git worktree add      code, prisma,       gh pr create
                    new branch            playwright

       │
       ▼
  ⑤ review ──▶ ⑥ merge to main ──▶ ⑦ deploy ──▶ ⑧ capture lesson
   code +       squash commit       vercel /     tasks/lessons.md
   behavior     `lior@cto.com`      cloudflare   (only if anything
   diff                                          went sideways)


              ┌──────────────────────────────────────────────┐
              │         MANY FEATURES IN PARALLEL            │
              └──────────────────────────────────────────────┘

              main branch ──────────────────────────────────▶
                    │                                ▲
                    ├─ worktree-1 ─ feature A ─ PR ──┤
                    ├─ worktree-2 ─ feature B ─ PR ──┤
                    └─ worktree-3 ─ feature C ─ PR ──┘
                          (each worktree is an isolated checkout;
                           agents can run in each one in parallel
                           without stepping on each other)

This is the current workflow — happy to change it if either of you have a better one. The goal is parallel-safe, reviewable, and reversible. If a tool or convention here is getting in your way, flag it and we’ll redesign.

Workflow rituals (these are non-negotiable)

  1. Plan-first on anything non-trivial. 3+ steps or any architectural decision → write a plan before touching code. If the plan goes sideways mid-execution, stop and re-plan; don’t push through.
  2. One feature = one plan = one worktree = one PR. When multiple features are in flight, each lives in its own git worktree with its own plan file. Agents run in parallel without colliding. Branch off main, PR back to main.
  3. DB-driven, never hardcoded. If an entity is “live” — agents, products, dimensions, packs, anything the business sees — it sources from the DB. Hardcoded arrays/JSON for live entities are forbidden. Schema migrations replace them.
  4. Capture lessons. After any correction from review, write the pattern to tasks/lessons.md in the relevant project. We iterate on these until the same mistake stops happening. Read the project’s lessons.md at the start of each session.
  5. Verification before “done.” Never mark a task complete without proving it works. Run tests. Check logs. Diff behavior. If you can’t test a UI change, say so explicitly rather than claim success.
  6. Commit author. Every commit across every Lior project uses lior@cto.com / liorwn. If git config user.email doesn’t match, fix it before committing.

Vercel + cron rules (these have bitten us, please internalize)

Page performance — the six rules

Both CTOx and Omya have done full perf sweeps. The rules:

  1. Server-component auth shells — don’t wrap pages in Clerk’s client component (causes a double-auth waterfall).
  2. One batched findMany not N nested selects — avoid the libSQL N+1.
  3. Replace correlated _count subqueries with a single $queryRaw + GROUP BY for stats pages.
  4. Watch the groupBy + _count pitfall — Prisma generates correlated queries.
  5. ORDER BY DESC needs a direction-aware index, not just a column index.
  6. export const dynamic = "force-dynamic" only works in server components.

DB bulk operations — what we learned the hard way


Glossary


Closing

This is v1. There will be gaps — flag them. There will be terms used in code that don’t appear here yet — flag those too. Treat this doc as a living thing: whatever confused you in week 1 should be patched into it so the next person never hits the same wall.

Read in this order: 1. This doc (you’re doing it) 2. ~/Masterkey/CLAUDE.md + ~/Masterkey/ARCHITECTURE.md 3. The CLAUDE.md of whichever OS you’ll work on first 4. ~/rri-os/CLAUDE.md — the most mature OS codebase; useful as a reference architecture once you have context on your assigned project

We move fast. Default to shipping. Plan before code. Capture every lesson. Welcome aboard.