Support answers a school's people when something does not work. This page is the department's document: what we want, what happens today, what we learned, and how we measure the move from one tired person to a system that answers itself. The machinery behind it is on Support loop.
This page is public. It holds no name of a student, parent or teacher, no phone, no login code and no chat id. School staff appear by role.
1. Vision
Everyone tries the easy door first, and every solved case makes the next one easier.
| Tier | Who | Answers | Clock |
|---|---|---|---|
| 0 | The chatbot and the help center | Anything a guide already covers | 1 minute |
| 1 | The school's tech contact | The school's own people, in their own group | 30 minutes |
| 2 | The head of support (Ali) | Anything that needs a look at production | 4 hours |
| 3 | Engineering (Abdout and the team) | A bug that needs code | 2 days |
- Every solved case becomes knowledge at once. The answer is scrubbed, saved as a draft entry, and the chatbot can use it without a deploy once the live store is switched on.
- One brain, three doors. The same agent core answers through the in-app tech desk, through WhatsApp and through MCP.
- Then autopilot. When the trial below passes its gate, the loop runs by itself and people keep only the sends and the hard cases.
2. How support runs today, measured
Al-Ibda (مدرسة الإبداع) is the first school run fully online: about fifty live classes on a school day, one platform, three WhatsApp groups.
Channels. The admin group is the only place we reply. The teachers' group and the parents' group are read-only. No direct messages, to anyone.
The loop. Read the groups (voice notes are transcribed) → diagnose on production, read-only → fix, only on Abdout's word and after a backup → draft the reply → send it in the admin group → write the guide so the bot knows next time.
The baseline (17 November to 29 November, from the ledger):
| Measure | Value |
|---|---|
| Asks | 193 |
| Asked by voice note | 93 (48%) |
| Where they were asked | teachers' group 101 · parents' group 82 · admin group 10 |
| Median time to our first reply | 49 minutes |
| 90th percentile | about 16 hours |
| Answered by us | 118 (61%) |
| Answered by the school itself | 67 (35%) |
| No answer in 24 hours | 8 (4%) |
| Median time for the school to answer itself | 2 minutes |
When they ask. The busy hours are 14:00 to 16:00 and 18:00 to 19:00, school time. Tuesday is the peak day. The school answers itself in two minutes; we take 49. That gap is the whole opportunity.
3. The case catalogue
What schools actually ask. One row per pattern. The guide column names the help-center guide that answers it.
| Symptom | Real cause | Fix | Guide |
|---|---|---|---|
| "I cannot sign in" a day after the account was made | The person changed the school PIN at the first sign-in and forgot it. All 26 failed sign-ins on one day were this | Check the sign-in history first, then re-issue only if it never worked; deliver the new code in the same move | login |
| Sign-in refused although the code is right | Digits typed on an Arabic keyboard | The platform accepts Arabic-Indic digits now (web, provider and app) | login |
| "This class is not yours" | A sibling's account is already signed in on a shared family phone | The refusal names the account and offers "sign in with another account" | login |
| Mic or camera will not turn on, nothing happens | The browser permission was denied and the denial was silent | A dialog with per-browser steps; the app asks, explains, then opens its settings page; the mic turns on by itself once allowed | live-classes |
| The mic turns red again by itself in a phone browser | A failed unmute was not traced, and students join muted by design | The mic now says why it will not start and records a trace | live-classes |
| Students see "could not issue a room token" | The class had not started yet and the app showed one generic error for every refusal | The app says the teacher has not started and retries every ten seconds (app update) | live-classes |
| The app update stalls | The app lacks the "install unknown apps" permission, usually because the first copy came from a browser | Ask for the permission once; later updates go through the app | install-app |
| The install is blocked on a Samsung phone | Auto Blocker | Settings, Security and privacy, switch Auto Blocker off | install-app |
| "Package is invalid" or an update loop | A cut or duplicated browser download (the file name ends with a number in brackets) | Delete the copies, download once from the school link | install-app |
| Viewers hear the teacher but see nothing | Screen share from the app: a heavy stream, or the "single app" choice on newer Android that sends the share to the background | Cap the stream at 720p, 15 frames; the app asks for the whole screen only | screen-share |
| A teacher cannot share the screen from a phone browser | iPhone has no such API and Android browsers refuse | Use the Android app; on iPhone, share from a laptop | screen-share |
| A student has no mic inside WhatsApp's browser | In-app web views block the mic | Open the link in the phone's own browser, or in the app | live-classes |
| Two teachers cannot teach at the same hour | They share one phone, which the database cannot know | Report it to the school; the school decides, we do not move classes | timetable |
| Two classes for one teacher at the same time | The school's own sheets disagree | Grade-by-grade review: post one grade's grid to the teachers' group, wait for the school's yes, then the next | timetable |
| Students never signed in | Accounts exist, families never opened them | Send the school the list; check sign-ins before any re-issue | login |
| A make-up class on a day with no slot | A normal class cannot move outside the week grid | The make-up flow allows any day and notifies the class | makeup-class |
| A class stays "live" into the next period | The teacher left and nothing closed it | The class closes at the bell once its host is gone; a "your next class" card shows | teach-live |
| Student home says "not connected" | An ended sign-in, not the network: the PIN was re-issued under a working session | The app returns to the sign-in screen with an honest message | login |
| A parent sees "access denied" | Signed in with a personal account instead of the school code | The page offers "sign in with another account" | parents |
| One teacher, several grades, same hour | Combined classes got one room per section | They share one room again | live-classes |
4. Rules learned the hard way
- One channel. We reply only in the school's admin group. Never in the parents' group, never a direct message.
- Never re-issue a PIN that works. Opening the credentials dialog mints a new one and kills the old one. Check the last 30 days of sign-ins first. A re-issue and its delivery are one move.
- Back up before every production write. One transaction, row counts checked, a restore branch taken first.
- The production window. Nothing that disturbs production during the school day. Deploys, restarts, data fixes and heavy reads wait for after 21:00 school time on Saturday to Wednesday, or any time on Thursday and Friday.
- The idle gate. Before any WhatsApp Desktop send, the Mac must be idle for two minutes, checked again right before the click. We once posted half a sentence a person was typing. If he is active, hand him the text.
- Never the real camera. A capture browser gets fake devices or denied permissions. One run with neither streamed a laptop camera into a demo class for four minutes.
- Public repos: scrub, and block instead of trim. A post that fails the scrub is not posted. It is not edited into passing either.
- The free lane sees scrubbed text only. Raw chats never leave the Mac.
- Docs reach the bot only after a deploy. That is why live knowledge exists: an answer should not wait for a window.
- Look before you say the time. Run the clock command; school time is the Mac's time.
5. The new pipeline
The ladder and its clock are the table in section 1. A case that misses its clock moves up a tier and is marked at risk.
Who runs which stage. A cheaper lane takes a stage only after it scores within 5 points of the reference on a bench built from real, scrubbed cases.
| Stage | Starts on | Sees |
|---|---|---|
| Ingest and triage | script | raw, on the Mac |
| Diagnose | Claude | raw |
| Draft the reply | Hermes (free) | scrubbed |
| Fix | Claude, build agent | repo and scrubbed issue |
| Review | Claude, judge | the diff |
| Send | a person | n/a |
| Knowledge entry | Hermes (free) | scrubbed |
Dry run and the live flag. The loop is a dry run: it writes would-be posts to local files and creates nothing. Only Abdout flips it.
Three doors. The in-app tech desk, a WhatsApp number, and an MCP. One agent core. Each tool takes the school and role from the signed-in user, never from what the model says.
Safe actions. A short, logged, undoable list; a re-issue on a working account is refused.
6. Roles
The head of support (Ali) owns the queue. In Kun he opens a case, reads the chat in his own WhatsApp, asks the agent to diagnose and draft, edits the draft, sends it himself, and records the outcome: closed by him, closed with the agent, or needs Abdout. He saves each answer as knowledge. He escalates to Abdout when a fix needs code, when production must be written, or when privacy is in doubt.
The school's tech contact is the first human the school's people meet. From the dashboard and the help center he can look up a member's status, see why someone cannot sign in, and answer from the guides before it reaches us.
7. The trial and the autopilot gate
Goal: measure how many real Al-Ibda cases the head of support closes without Abdout, how fast, and how well, using Kun.
The trial switch. jobs.$support.trial is false. Only Abdout turns it on. When on, it allows
exactly two things: creating and labelling scrubbed support issues (and commenting on them), and writing
the scorecard. It never sends on WhatsApp, never writes production, never promotes knowledge and never
runs a paid lane.
The commands (run from the Kun app or the terminal; each prints one JSON line):
| Command | What it does |
|---|---|
loop.mjs pull | Reads the support issues with gh into the local case list. Works on any machine |
loop.mjs close <case> <who> | Records the outcome (who: the head of support alone, with the agent, or escalated to Abdout); with the trial on, a scrubbed comment and a label (closed or escalated) |
loop.mjs mark <case> <mark> | Abdout's quality mark (up or down) |
loop.mjs kbdraft <case> --file <json> | A scrubbed knowledge draft in a private folder; never the database while live knowledge is dark |
loop.mjs scorecard | The weekly numbers and the gate |
"Diagnose with agent" starts the app's chat with the school-support skill and this prompt: read the case, diagnose read-only, draft the reply, never send, never write production.
The scorecard, per school week (Saturday to Friday): cases, closed by him alone, closed with the agent, escalated, still open, median and 90th-percentile time to first reply, median time to close, Abdout's quality marks, and privacy blocks (the scrub doing its job).
The gate. After two school weeks, Abdout approves autopilot and records it with a decision entry. All four must hold:
| Measure | Threshold |
|---|---|
| Closed by the head of support, alone or with the agent | at least 70% of decided cases (closed plus escalated; open cases count once decided) |
| Quality marks | at least 90% up |
| Privacy incidents | zero |
| Median time to first reply | under 15 minutes (baseline: 49) |
A missing number fails the gate: no quality marks yet, or no recorded first-reply times, is a reason to wait, not a pass.
On approval: flip the live flag and load the jobs; re-apply the parked ladder and tech desk in a production window, migrations first; switch live knowledge on; let lanes take stages as the bench allows.
8. Status and roadmap
| Piece | State on 29 November |
|---|---|
| Live knowledge in the platform | Shipped dark. The flag SUPPORT_LIVE_KB is unset, so the bot behaves exactly as before |
| The ladder and the tech desk | Parked as a patch (scripts/support/parked/hogwarts-ladder-techdesk.patch). They need two migrations, so they wait for a production window |
| The support loop | Dry run. The six launchd jobs are written but not loaded |
| Today's pipeline | The Al-Ibda runbook (the alabidae-support skill and its scripts) keeps running, untouched |
| The trial | Built, switched off. A read-only database role and the first trial issue wait for Abdout's word |
| Kun app | A Support place, with the readiness step "support tools" |
Owed: a WhatsApp support number, the MCP door, the safe actions, a runner for the voice queue, the paid bench run, the read-only database role, and the flip of the live flag after the gate.
The full Arabic page is الدعم.