PTENES
MODULE 4-2

🏗️ Architecture of a robust solution (the 4 C layers)

In the previous module, you built Jarvis's "hello world." Now comes the house blueprint: a way to organize ALL the pieces you've already seen in Anatomy into four named layers in order — Context, Connections, Capabilities, and Cadence, the CLAWS framework. It’s what separates an agent that lasts from a hack that breaks during the first renovation.

6
Topics
~35
Minutes
Intermediate
Level
Architecture
Type
1

🧩 The 4 Cs: the skeleton of any Jarvis

In Track 3, you learned about six separate pieces: channels, identity, tools, skills, agents, and brains. Knowing the pieces, however, is not the same as having a architecture. Architecture is the blueprint that shows where each piece fits and in what order to assemble it. The framework CLAWS groups everything into four layers with the same initial: Context, Connections, Capabilities, Cadence — the “4 C’s.”

New here? "Architecture" here has nothing to do with buildings — it's how the parts of a system are organized and communicate. "CLAWS" is just a nickname (the claws) to help you remember the 4 C layers. And a "framework" is a reusable mental template: instead of inventing the structure from scratch every time, you fit your project into this template.

The order isn’t decoration: it is 1 → 2 → 3 → 4 and it has dependency logic. Without Context (who it is and what it knows about you), there’s no point in giving it Capabilities (it acts without direction). Without Connections (where it talks and what it can reach), there is no Cadence (it “wakes up” on its own but can’t act or notify you). Build from the ground up, like a house: foundation before roof.

CLAWS · assembled from the bottom (1) up (4) 1 · Contextidentity + memory 2 · Connectionschannels + tools 3 · Capabilitiesskills + agents 4 · Cadenceheartbeat / cron = robust Jarvis that knows, reaches, does, and acts on its own

Read from bottom to top: each layer only makes sense when the one below it already exists. Remove Context and the other three are left without direction; remove Connections e a Cadence has no way to act. Together, they make an agent that lasts.

🗺️ From a loose component to a named layer

  • 1.Context = Identity (3.2) + Brains/memory (3.6). “Who it is and what it knows about you.”
  • 2.Connections = Channels (3.1) + Tools/MCP (3.3). “Where it speaks and what it can reach.”
  • 3.Capabilities = Skills (3.4) + Agents/sub-agents (3.5). “What it can do.”
  • 4.Cadence = the autonomous part of Agents (3.5): heartbeat/cron. “When it acts on its own.”

Key concepts

CLAWS

The nickname for the 4 C layers; a template to make sure you don't forget any.

The 4 C’s

Context, Connections, Capabilities, Cadence—in that order.

Dependency

Each layer depends on the one below; that’s why the 1→4 order matters.

Architecture

The blueprint that shows where each piece fits, not just the list of pieces.

2

🪪 Context — who it is and what it knows about you

The first layer—and the most important—is the Context: the agent’s identity plus its memory. It’s what makes the difference between a generic chatbot that treats you like a stranger in every conversation and an assistant that knows your name, your style, and where you left off. Without Context, all the other layers work, but without direction: the agent acts, but doesn’t know for whom or why.

👤 Identity (who it is)

It comes from three text files, always injected at the start of the conversation:

  • SOUL.md — the soul: personality, tone, values. "Explain the reasoning, not just the answer."
  • AGENTS.md — the contract: what it ALWAYS does and what it NEVER does.
  • USER — who you are: name, context, preferences.

🧠 Memory (what it knows)

The conversation disappears when you close it; persistent memory remains:

  • Files .md readable = the truth that survives the hype.
  • Index SQLite FTS5/BM25 for quick word searches.
  • The 3 brains (3.6): Project, Self, and Knowledge.

New here? “System prompt” is the block of instructions the model reads before any of your messages — that’s where SOUL.md comes in. “SQLite FTS5/BM25” is just a little database file that indexes your notes so the agent can find “that thing we talked about last week” in milliseconds. And “3 brains” means memory separated into drawers: Project (what happened), Self (who it is; changes slowly), and Knowledge (facts that only accumulate).

💡 The sentence that sums up Context

“Without the brain rewire, the architecture is just a folder.” — In plain English: without giving it a real personality and memory, all you have is a bunch of files. Context is what turns code into someone that knows you.

Key concepts

SOUL.md

The soul: personality, values, and tone, always in the system prompt.

AGENTS.md

The ALWAYS/NEVER contract—explicit rules beat guesswork.

Persistent memory

.md (source of truth) + SQLite (search); it survives because it’s just text.

3 brains

Project, Self, and Knowledge — memory organized into drawers.

3

🔌 Connections — where it communicates and what it can access

The second layer is the Connections: the channels (where you talk to it) plus the tools (what it can do in the world). Without Connections, the agent has a soul and memory — but it’s locked in a room with no door or hands. This is where it gets eyes and fingers: reading your calendar, sending an email, searching the web.

📡 Channels — the way in and out

  • •Telegram and it’s the preferred option: just a @BotFather token, with no web server exposed.
  • •Whitelist: only YOUR ID is served; everyone else is silently ignored.
  • •WhatsApp, email, voice, and the terminal itself are also channels.

🔧 Tools — the hands (via MCP)

  • •MCP and the "USB for AI tools": each integration is a separate server.
  • •Connect Gmail, GitHub, and Notion without rewriting the agent.
  • •MCP only, auditable, > downloading third-party skills (remember the 341 malicious ones).

New here? “Token” is a credential Telegram gives you so your bot can communicate (you get it from the @BotFather bot). “Long polling” is Telegram’s way for your agent to asks "any new messages?" — that way it doesn’t need to open any ports on your computer, which is safer. "MCP" (Model Context Protocol) is an Anthropic standard that lets any tool fit into any agent, like a USB plug.

🔓 “Without this, it responds like a stranger”

A model by itself only knows how to talk. Ask "what do I have tomorrow?" and, without tools, it guesses. Connect the calendar via MCP, and the same question gets a real answer. Connections is the step that turns a chat in a assistant.

Key concepts

Channel

The door you use to talk to it: Telegram, WhatsApp, voice, web.

Long-polling

The bot checks for messages; no open ports, no exposed server.

MCP

The USB for tools: a standard that connects any tool to the agent.

Whitelist

Only your ID is served—the channel's first security safeguard.

4

⚙️ Capabilities — what it can do

The third layer is the Capabilities: the skills (packaged recipes) plus the agents/sub-agents (the loop that runs on its own). If Connections joined the pieces, Capabilities teaches movements: instead of explaining five steps every time, you say one sentence and the skill carries out the whole procedure.

🧩 Skill = recipe; tool = ingredient

A tool performs an atomic action (search the web, send an email). A skill and it’s a file SKILL.md that ORCHESTRATES multiple tools with judgment: "write a LinkedIn post" becomes research → chart → text → review → publish.

  • •Progressive loading: the skill costs ~100 tokens (header only) until it’s activated—saving context.
  • •Each run improves the recipe; the skills library is your collection of capabilities.

🤝 Subagents: delegate without clogging the session

The main agent can delegate a heavy task to a sub-agent, which uses up its OWN context and returns only the final answer. The result: the main session stays lightweight, and each specialist (research, writing, review) handles its own part. This makes large tasks possible without the agent “forgetting” the beginning along the way.

⚠️ The classic mistake here

Stacking capabilities without solid Context and Connections. An agent packed with skills but without memory or real tools is powerful in a vacuum: it does a lot, but gets little right. That's why Capabilities is layer 3, not layer 1—it depends the bottom two.

Key concepts

Skill

A recipe (SKILL.md) that orchestrates tools with judgment.

Progressive loading

The skill costs little until it’s used; it saves context.

Subagent

Uses up its own context and returns only the answer; the session stays lightweight.

Agentic loop

Think → call a tool → read the result → repeat until done.

5

⏰ Cadence — when it acts on its own

The fourth and final layer is the Cadence: the agent's own rhythm. Until now, it only acted when you called — it was reactive. Cadence makes it proactive: it "wakes up" on its own at the scheduled time and does things even when the laptop is closed. It's the leap from an assistant that responds to a partner that anticipates your needs.

⏱

Cron / routines

Tasks on a timer: “every day at 7 a.m., send me a summary of my calendar and emails.”

💓

Heartbeat

A periodic “heartbeat” where the agent checks whether there’s anything to do and acts on its own.

🛡

Safety lock

Iteration caps, approval gates, and an audit log: autonomy with a safety belt.

New here? "Cron" is a classic computer scheduler: it runs a task at set times. A "heartbeat" is a signal that repeats from time to time to get the agent to "move" on its own. And an "audit log" is a forensic journal: every action it takes is recorded, so you can later audit what happened and why.

⚠️ Cadence without limits is dangerous

Giving an agent schedule autonomy without an iteration limit or confirmation for dangerous actions is like letting a robot loose with your house keys. The golden rule: every Cadence comes with approval gates and an audit log that records everything. Autonomy is good; auditable autonomy is safe.

Key concepts

Cron / routines

Tasks on a timer, at fixed times.

Heartbeat

Periodic heartbeat that makes the agent check and act on its own.

Proactive vs. reactive

From “responds when I call” to “alerts me before I ask.”

Audit log

Forensic log of every action; autonomy with traceability.

6

🏛️ Bringing the 6 layers together in an architecture

Now the wrap-up. The six pieces of Anatomy (Track 3) fit perfectly into the four C layers—and when you stack them in the right order, the loose map becomes ONE coherent architecture. Each “C” recruits the pieces it needs, and the whole thing rises like a building: foundation, installation, furniture, routine.

6 parts of the anatomy 4 C layers Identity Brains / memory Channels Tools / MCP Skills + Agents 1 · Context 2 · Connections 3 · Capabilities 4 · Cadence Coherent Jarvis one architecture, not 6 pieces

Each piece purple from Anatomy goes into one of the four layers amber. Note that the autonomous part of Agents (dashed line cyan) powers Cadence. The result: not six loose pieces, but a system that knows, reaches, does, and acts—at the right pace.

🧱 Why this structure lasts

“Tools change every 6 months. The platform and foundation we're building survive.” — Tools change every six months; the platform and foundation you build survive.

New models arrive, MCPs appear and disappear, and channels come in and out of fashion. But the 4 C’s don’t change: every Jarvis will always need to know who it is, how to communicate, what to do, and when to act. That’s why you invest in the ARCHITECTURE, not the tool of the moment.

🎯 How to use the 4 Cs in practice

Before building (or reviewing) any Jarvis, run through a checklist for the four layers:

  • 1.Context: does it have SOUL/AGENTS/USER and persistent memory? Does it know who you are?
  • 2.Connections: has a secure channel (Telegram + whitelist) and tools via MCP?
  • 3.Capabilities: has useful skills and can delegate to sub-agents?
  • 4.Cadence: acts on its own on a schedule, with gates and an audit log?

Key concepts

6→4 mapping

The 6 anatomy pieces fit into the 4 C layers.

A foundation that lasts

Tools change; the 4 C architecture survives.

CLAWS checklist

Four questions to validate (or plan) any Jarvis.

Consistency

Not six separate pieces, but a system that works together.

Self-check (optional): in the 4 C order, why does Context come before Capabilities?

🎯 Module summary

✓
The 4 C’s (CLAWS) — Context, Connections, Capabilities, Cadence, built from the ground up.
✓
Context — identity (SOUL/AGENTS/USER) + memory; who it is and what it knows about you.
✓
Connections and Capabilities — channels+tools (how it communicates and reaches things) and skills+agents (what it does).
✓
Cadence + the synthesis — when it acts on its own; the 6 pieces become ONE architecture that lasts even when the tools change.

Next module:

4-3 — Operate, measure, and evolve (trust, cost, security)