PTENES
Agentic OS · case study

A WhatsApp receptionist that never makes things up

The complete OS for a dental clinic, built layer by layer with the skill os-agentes. Six folders, not a single line of code.

# the entire OS is a folder
criaagentes/
├── CLAUDE.md              # who it is
├── substrate/             # what it knows
│   ├── compendium.md      # ← the only source
│   ├── sources.md
│   └── subject-matter-expertise/
├── rules/                 # what it never does
│   ├── never.md
│   └── always.md
├── skills/                # how it responds
│   └── responder-duvida-whatsapp/
├── tools.md               # what it can access
├── agents/                # who decides
│   └── recepcionista-whatsapp/
├── memory.md              # every decision and why
└── OS-AUDIT.md            # where it breaks first
What it is

A real agent isn’t a prompt. It’s a house with six rooms.

This repository is the complete case study of a WhatsApp attendant for Clínica Sorriso Prime (a fictional clinic used for demonstration). It was built entirely with the skill os-agentes (/os-agentes), one layer at a time, with every decision recorded along with the reason. Most messages a clinic receives on WhatsApp are from new people asking about prices and hours. That’s what it handles.

📌 The rule that holds everything together

If it isn’t written in the compendium, it doesn’t exist. The assistant doesn’t fill in the answer on its own, even when the answer seems obvious. Quick test for any answer: where is that written?

🚪 A handoff gate to a human

Pain, symptoms, medication, discounts, complaints, emergencies, or anything outside the compendium become alerts in Telegram, with normal, high, or urgent priority. Stopping is not the agent failing; it’s the agent working.

🧾 Every decision, with the reason why

O memory.md keeps track of the choices and the reasons behind them. Why the alert is on Telegram instead of WhatsApp, why the schedule is read-only, why there’s only one skill. Three months from now, no one has to remember.

How it works

The six layers, in this order

The order isn’t decorative. Identity defines what the substrate needs to cover; the substrate informs the skills; the skills exist before the agent that orchestrates them. Skip a step and you’re building on sand.

Identity→ Substrate→ Rules and Hooks→ Skills→ Tools→ Agent
1

Identity · CLAUDE.md

26 lines. Who it is, who it serves, and four testable refusals. The most important one: never say there’s an opening.

2

Substrate · substrate/

The largest layer. The clinic’s official document remains the source; the compendium.md is the distillation the receptionist reads day to day.

3

Rules · rules/

A rule is a sign that says “do not enter.” A hook is a locked door. There’s one hook that matters here: the Telegram alert fires automatically.

4

Skills · skills/

Just one, by design. Classify the message into three categories: answer automatically, depends on the schedule, or needs a human.

5

Tools · tools.md

Google Calendar is read-only, and alerts go to a Telegram group. One window, not the keys to the house. No secrets live in the folder.

6

Agent · agents/

The skill is the tool; the agent is the cook. A narrow role, with a five-question review gate before any response goes out.

Prerequisites

What you need to reproduce this

No server, build, or dependencies. The OS is a folder of text files. Claude Code does the work by reading that folder.

Claude Code

It’s where the layers are built and where the agent runs.

# open in the OS folder
cd criaagentes && claude

The skill os-agentes

It’s what makes this project possible: it guides the build layer by layer, asks questions, and writes the files. Install it and call it with /os-agentes.

# repo: github.com/inematds/os-agentes
/os-agentes help

Your operation’s materials

Prices, hours, policies, the questions people ask most often. Written down or in your head, either works.

# becomes substrate/compendium.md
/os-agentes layer substrate
User guide · step by step

Building your own, from scratch

This OS was built using exactly the commands below, in this order. Each command ends by asking two or three simple questions and writing the layer’s files.

1

Start with the goal, in Portuguese

No jargon. Say what you want to happen. The OS Coach creates the memory.md and goes straight into the Identity layer.

/os-agentes start quero criar um agente para atender dúvidas das pessoas na minha clínica usando whatsapp
# → memory.md + CLAUDE.md
2

Move forward one layer at a time

Each next moves on to the next unfinished layer, asks only what’s missing, and writes the files. No dumping all six layers at once.

/os-agentes next   # → substrate/compendium.md + sources.md
/os-agentes next   # → rules/never.md + rules/always.md
/os-agentes next   # → skills/responder-duvida-whatsapp/SKILL.md
/os-agentes next   # → tools.md
/os-agentes next   # → agents/recepcionista-whatsapp/AGENT.md
3

Provide the materials you already have

If a pricing table, policy document, or front desk role already exists, point to the file. The substrate is the largest layer, and it saves the most time when the material already exists.

# just point to the file path in the conversation
# → becomes substrate/subject-matter-expertise/ (source)
# → distilled into substrate/compendium.md (what the agent reads)
4

Return to any layer whenever you want

The layers aren’t one-way steps. Whenever a response is wrong, the fix goes in the compendium or the skill, never in the head of whoever was on duty.

/os-agentes layer substrate   # identity | substrate | rules | skills | tools | agents
/os-agentes status           # where did I leave off?
5

Audit against the goal, not in the abstract

Scores the six layers, points out where it breaks first, and writes the result to OS-AUDIT.md. In this audit, two layers received lower scores, and one of them for a reason no one had noticed.

/os-agentes audit
# → OS-AUDIT.md: scorecard + the 3 most important moves
Examples

The three boxes, in conversation

Every message falls into one of three categories. And there’s a rule for resolving tough cases: if you’re unsure which category it belongs in, it’s always the third.

Box 1 · answers on its own
PatientHow much does a cleaning cost?
ReceptionistA basic cleaning starts at R$ 180. The price may vary based on the dentist’s evaluation.
It’s in the compendium, word for word. Nothing more.
Box 2 · depends on the schedule
PatientDo you have an opening tomorrow at 2 p.m.?
ReceptionistI’ll check the schedule so I don’t give you the wrong time. What’s your full name?
Seeing an open slot on the schedule doesn’t mean an appointment is booked. “Confirmed” is for the front desk to say.
Box 3 · needs a human
PatientI have a really bad toothache. What could it be?
ReceptionistI understand. Since this involves pain and a clinical assessment, I can’t tell you what it might be. I’ll forward your message to the clinic team now.
🚨 Telegram · High Priority · and the alert fires automatically; it doesn’t depend on them remembering.
The mistake this OS was designed to prevent.

It’s not the ugly answer. It’s the polished, friendly, plausible, made-up answer. It goes unnoticed precisely because it sounds right. A guessed price becomes a complaint, a guessed appointment time leaves a patient at the door with no availability, and an opinion about pain becomes a health risk. They’re all the same mistake in different disguises: presenting something as official when it isn’t known.

Roadmap

What’s ready, and what the audit caught

All six layers are documented. The 2026-07-15 audit downgraded two, and for honest reasons. The full scorecard is in OS-AUDIT.md.

Ready
The six layers, tied together by the same ideaIdentity, Rules, Skill, and Agent remain intact even if all the compendium’s content is replaced tomorrow. That’s why swapping out the data means typing, not rebuilding.
Pending
Replace the fictional data with real dataThe compendium is well organized, but every value in it is made up. An assistant whose number one rule is never to make things up, equipped with a whole book of made-up information, gives technically correct but factually false answers.
Pending
WhatsApp isn’t in the connections fileThe goal includes the word WhatsApp, and tools.md lists Google Calendar and Telegram, but not WhatsApp. We connected the two auxiliary wires and forgot the main pipe.
Pending
Ten fake conversations before connecting anythingSix layers written, zero messages run. Run ten real messages through the agent, including the tricky ones, and ask for each answer: where is that written?
Future
Make the OS improve itselfNo layer is “composed” yet: there’s no path that sends the error back to the compendium. If the same question comes up three times and it isn’t there, it should be added automatically.