ctermdocs HomeBlogSign in

The support desk

A project that answers people (a product's users asking in a Teams channel, a client writing by mail, an app whose support form can post somewhere) gets a desk: everything that comes in is kept as cases, one per thread, each with where it stands. The session that coordinates the project's support reads and moves the cases with cterm desk, so what it knows lives on the desk and not in its conversation, and you see the whole picture on the project page's Desk tab.

What comes in

A desk reads from sources. Each one says what it can do: read on a clock, link to the original message, reply.

  • Teams: a channel or a chat, read as you through Microsoft Graph, or through the browser cterm signs in to when Graph is not signed in (Microsoft Teams). A channel's post and its replies are one case; a chat is one case. Through Graph each round asks what changed since the last one, and a reply in any thread, however old its post, comes in naming its post, so it lands on that post's case at the next round, a resolved one opening again. Through the browser a channel is read back over its last seven days and the threads of its open cases are followed however old they are, so a reply in an earlier day's thread arrives on its case within a few rounds. Each round's run says which way it read.
  • Mail: the project's own mail, by its filter (Mail). A conversation is one case.
  • A webhook: any app that can post a message to an address with a key. Its thread groups messages into a case.

cterm reads each source on its interval, with no model: nothing is asked of Claude to read, and nothing is billed. Each message is kept once, by its id at the source, however many times it is read again or a call is retried. A reply in a thread lands on that thread's case, and a new message on a resolved or closed case opens it again, unless it is the desk's own reply read back from the channel: that one is kept on the case and leaves it settled. Each round is a run on the project's record, beside routines and monitors.

Each source reports to the people who follow it, at todo, necesita (only what needs them) or nada. You follow every source at todo until you say otherwise; a source nobody follows above nada is not read until someone does. The mail source is yours alone: nobody else sees it or its cases. cterm desk sources shows who follows each, and cterm desk source follow <id> todo|necesita|nada [--who <account>] sets a level (Accounts says what each level gives). Removing a source stops its reading but not who is given its cases: they stay with the people who followed it, and a source of your own stays yours alone. Cases left by a source removed before this was kept are yours alone; cterm desk source own <id> off and source follow <id> <level> --who <account>, with the removed source's id, give them to others.

What people write is kept and shown as text. It is never typed into a session as something to do: when cterm tells the coordinating session that something came in, it says the case ids only, and the session reads the words with cterm desk show, marked as outside content.

The Desk tab

The tab has three zones: For you, Cases and Conversation. On a wide screen the conversation sits beside the other two and stays in view, its prompt box at the bottom, while the tab scrolls under it; the tab ends above the row of sessions sent to a tab, like the page's other tabs. On a phone the three are tabs at the top, one shown at a time. Open whole shows the same desk alone in a window of its own, at /desk/<project id>, for a second monitor or a phone's home screen; the master view's Desk panel says what waits there and opens it too. Despacho ↗ beside it opens the Despacho at /despacho/<project id>: the same desk as the team sees it, in a look of its own and in Spanish, with the Mesa of what waits for your decision, the coordinator's river, the Archivador with every matter and its record, and the trays by state. As the project's owner you see every matter and channel there. El Despacho, a page in Spanish for the people who dispatch from it, says how to use it.

The Desk tab: For you with two questions, one laid out as decision, if yes, context and draft and one in free text, and a Teams reply counting down; a case open below; the coordinator's conversation in You only beside them.
The Desk tab: For you with two questions, one laid out as decision, if yes, context and draft and one in free text, and a Teams reply counting down; a case open below; the coordinator's conversation in You only beside them. ui-desk-dark.png, drawn by desk-shot.mjs

On top, the sources and when each was last read, and the session that coordinates the desk.

For you

Only what waits for you, each with its buttons in place, big enough to tap on a phone:

  • The questions the coordinator asked you about a case (cterm desk ask), each a card. Its head names the case, where it came from and its subject on one line; a click there, or Open case, opens the case. Under it the decision, then what a yes will do, the context (folded behind Show all when long) and the message it would send, shown as a quoted message. The yes button says what it does (Yes, do it, or Sí, hazlo for a coordinator writing in Spanish; its tooltip repeats what a yes will do), and Answer sends your own words instead; either is typed into the session with the case's id. A coordinator that writes its question as If yes:, Context: and Draft: lines (or Si dices sí:, Contexto:, Borrador:) under the decision gets this layout; a question in free text is shown whole, as it was written, with a plain Yes. A question the coordinator takes back (a newer one replaces it, it sent the answer itself, or the people on the case settled it) leaves For you and the case; the case keeps a line saying it was taken back and why.
  • The cases waiting for you: a click opens the case. A case a question is about is not listed again: the question's head stands for it.
  • The messages about to leave (a Teams reply, a mail answer): one waiting for your yes has Approve, Changes and Bin; one in the delayed mode shows its countdown and Send now, Hold, Edit…, Cancel and Correct…, as in the project's Now strip (a message that leaves after a delay).

When nothing waits, it says so.

Cases

The board: a column per open state, new, in progress, waiting for you, waiting for them. Each card shows where the case came from, who wrote, its first line, its last message and Original, which opens the message in Teams, Outlook or the app it came from.

A card opens the case whole: every message and the files they carried, the threads opened on it (a click opens the session), its roadmap item and Linear task, the drafts written on it with their versions (the newest open, the older ones folded), what was sent and when, the messages about it still in the queue with their buttons, and every other change. Resolve, Close and Reopen move it by hand.

History folds the resolved and closed cases, the last thirty of them; the search box above the board finds the older ones.

Search and ask

The box above the board searches every case, open or closed: its title, who wrote it, its Linear task, every message, every note, the drafts written on it and what was sent. Type a few words and the cases that hold all of them come back, best match first, each with its matching lines and the words highlighted; a click opens the case whole. A word finds its longer forms (certif finds certificates) and accents do not matter (certificacio finds certificació).

The search box with "validator": the resolved case it found, its title and the reply that was sent, the word highlighted.
The search box with "validator": the resolved case it found, its title and the reply that was sent, the word highlighted. ui-desk-search-light.png, drawn by desk-shot.mjs

Ask takes the same box as a question, such as what did we tell them about the certificate dates? cterm looks for its words (any of them this time, the asking words like what or tell left out), gives the best cases it finds to a model as data, every message, note and send of each, and shows the answer with the cases it read: a click on one opens it, and the ones the answer rests on are underlined. The call runs on the master chat's login, model and effort, and is counted with the master chat's calls, in its hourly limit and its usage; the foot of the answer says the model, its list price and how long it took. When no case holds any of the question's words, cterm says so itself and no model is asked. Esc clears the box and the answer.

An answer under the box: what was told, the two cases it read with the one it rests on underlined, and the call's model, price and time.
An answer under the box: what was told, the two cases it read with the one it rests on underlined, and the call's model, price and time. ui-desk-search-dark.png, drawn by desk-shot.mjs

Conversation

The coordinator's own session, in one of three modes kept with your account:

  • You only, the default: your prompts and the answers to them. The rounds cterm typed (a desk's news, a routine, a schedule, a verdict's countdown) are left out with their answers, and so are the tool cards; a line says how many rounds it hides. A permission or question still waiting stays, since somebody has to answer it.
  • Activity: one line per round: when, who sent it (the desk, a routine, you…), what came in, what the coordinator did (its tool calls and the cterm desk commands it ran) and the start of its answer.
  • Raw: the session's pane as it is, every prompt and tool card. Its name opens the session with its terminal.

The box under it writes to the coordinator, as from its own pane.

The Desk tab in light: For you with an answer typed, the board and History open, and the conversation's Activity, a line per round.
The Desk tab in light: For you with an answer typed, the board and History open, and the conversation's Activity, a line per round. ui-desk-light.png, drawn by desk-shot.mjs

cterm knows who sent each prompt because every prompt it types carries a mark of how it was sent: typed in cterm's box, a thread you opened, the master chat, a comment, your verdict on a queue entry, or the machine's own (a schedule, a routine, another session, the desk, a workflow, a retry, a kickoff, cterm's own lines). The mark rides on the event and is kept beside the conversation, never written into it; a prompt typed in the terminal has none and counts as yours.

On a phone the zones are tabs:

The Desk tab on a phone: the zones' tabs, the sources and For you with its buttons.
The Desk tab on a phone: the zones' tabs, the sources and For you with its buttons. ui-desk-phone.png, drawn by desk-shot.mjs

The desk whole, in a window of its own:

The desk at /desk/41: the same three zones with nothing else of cterm around them.
The desk at /desk/41: the same three zones with nothing else of cterm around them. ui-desk-whole-dark.png, drawn by desk-shot.mjs

Case and question ids in the chat

The coordinator names cases and questions by their ids in its rounds, and so does any session of the project and the master chat: c-658 is a case of the desk, q-150 an entry of the project's queue (a question the coordinator asked, or a Teams or mail send, a merge or a workflow's approval waiting for a yes). In an answer, a prompt, the master chat or a comment, such an id is a link when it is one of the project's, bare or alone in a code span. Rest the mouse on it and a small card says what it is: a case's title, its tray, whom it waits for, who decides, leads and follows, its priority and due day, and its question with Claude's pick and how sure it is, or the decision once taken; a question says whom it is for, its case and the pick; any other entry says what kind it is and whether it was answered.

A click on a case, or on a question of the desk, opens the matter in the Despacho in a tab of its own, with its record, so the round stays where you were reading. The small icon after every link opens it in a dialog over the current view instead: the matter with its options, the last events of its record and the question still open on it as its queue line, where Answer… reaches the coordinator as an answer from For you does. A queue entry that is no question of the desk has no page, so its click opens that dialog too. Esc, the × or a click beside it close it.

An id of another project's desk, a number nobody has, one in a code block or a link, a word such as abc-12 and the comment c-12 My list writes for a comment stay plain text. On a phone there is no card: a tap opens the matter, and the icon's dialog takes the whole screen.

A round naming c-658, q-150 and q-151: the card of c-658 with its tray, who decides, its question and Claude's pick, 61% sure.A round naming c-658, q-150 and q-151: the card of c-658 with its tray, who decides, its question and Claude's pick, 61% sure.
A round naming c-658, q-150 and q-151: the card of c-658 with its tray, who decides, its question and Claude's pick, 61% sure. ui-desk-link-dark.png and ui-desk-link-light.png, drawn by desk-link-shot.mjs
The dialog of c-658: who decides, the question with its options and Claude's pick, its open question with Approve, Answer… and Bin…, and the last events of its record.The dialog of c-658: who decides, the question with its options and Claude's pick, its open question with Approve, Answer… and Bin…, and the last events of its record.
The dialog of c-658: who decides, the question with its options and Claude's pick, its open question with Approve, Answer… and Bin…, and the last events of its record. ui-desk-peek-light.png and ui-desk-peek-dark.png, drawn by desk-link-shot.mjs

The card and the dialog ask the daemon nothing heavy: the page asks once for the ids on screen (GET /api/projects/<id>/desk/refs?ids=c-658,q-150), which answers only those of the project that you are given, and asks again when the desk or the queue changes.

Rules and style

The desk learns how you want it to write. Every time you edit one of the coordinator's messages before it goes, cancel it or send a correction back (in the queue, from For you or from a case; in the yes mode, Changes… and a bin with a reason count as a correction and a cancellation), cterm keeps a pair: what the coordinator wrote, beside what went out or what you said, with the case it answered when the message went to a conversation the desk reads.

Once an hour at most, when pairs wait and you stopped correcting for five minutes, a cheap model (Haiku, on the project's Claude login) reads the new pairs with the lines the desk keeps already and proposes new ones: rules, what to always or never do, and style lines, how to write, each with a real example taken from the pairs. A pair goes to the model once: after a run it is marked learnt from, whatever came of it. Learn now runs it at once.

The Rules and style section, under the cases, lists them rules first. Each line says when it was learnt and from which pairs (a click on a pair's number opens it in the list of pairs below), or who wrote it by hand. You can Edit a line's words, Remove it, or add one yourself; a line you edit keeps its date and origin and says it was edited.

Rules and style: two rules, one learnt from two pairs and one written by hand, a style line with its example, the run line with Learn now, and the pairs with what was written beside what went out.
Rules and style: two rules, one learnt from two pairs and one written by hand, a style line with its example, the run line with Learn now, and the pairs with what was written beside what went out. ui-desk-style-dark.png, drawn by desk-shot.mjs

The coordinator writes by them. The rules and the style sheet are appended to its prompt every time it starts or resumes, so a compaction or a new coordinator session loses none of them, and each round's prompt (the desk's news) ends with the current sheet. Both are framed as data about how to write, never as a task, and kept to a size (about 6,000 characters in the prompt, 2,500 in a round; the newest lines are the ones left out, and it says so). They replace the notes and rules you would otherwise type into a round prompt by hand. The Setup panel lists the sheet among the parts appended to the coordinator's prompt, as desk.

The coordinator, run by cterm

A session that watches a channel for days grows without end: every round, every message and every rule you add by hand pile up in one conversation, and once it is compacted or replaced, what it knew about the cases is gone. The desk keeps that memory itself, so cterm can run the coordinator for you and replace it whenever it likes. Switch it on in the project's Settings, under Desk coordinator:

The Settings tab's Desk coordinator section: the switch on, the session's name, its model and effort, a round every five minutes, a fresh session each day at 06:00, and the standing instructions, with the line saying what cterm will do.
The Settings tab's Desk coordinator section: the switch on, the session's name, its model and effort, a round every five minutes, a fresh session each day at 06:00, and the standing instructions, with the line saying what cterm will do. ui-desk-coordinator-dark.png, drawn by desk-shot.mjs
  • Session name, model and effort: the session cterm starts on the project's folder, as you. Each fresh one gets the day after its name, so the list shows which is which.
  • A round every so many minutes (5 by default): cterm looks at the desk and, only when something is new, types the coordinator one prompt with it. Nothing new, nothing typed.
  • A fresh session each day at a time of this Mac's (06:00 by default), every so many rounds, or never.
  • Standing instructions: what the coordinator does with a case, in your words (a bug of ours: a task and a thread; a question: answer it; anything else: tell me). They are what you would otherwise paste into a round prompt.

What the coordinator gets:

  • Its brief, appended to its prompt every time it starts or resumes. Its first line, before any of cterm's own words (which are English), tells it to write everything, its replies and end-of-turn summaries, its lines on the Despacho, its questions, notes and drafts, in the language your standing instructions ask for, else the one you write to it in. Then what it is and how the rounds reach it, the desk's commands, how a Teams message mentions someone (@[Name Surname], so the person is notified without a standing instruction saying so), your standing instructions, every open case as it stands (its state, who wrote, its last message and the last note on it, its threads) and the rules and style the desk learnt. A fresh coordinator knows the desk from its first turn.
  • Each round, built by cterm from the store with no model: the messages that came in since the last round, grouped by case and marked as the senders' words, then what happened on the cases that the coordinator did not do itself (your answers to its questions, its threads' reports, a case you moved on the board, one handed over from another project), and the open cases in a line each. A message the desk sent and then read back from the channel is left out. A round waits until the coordinator has finished its turn, so one round carries everything that came meanwhile. Every round ends with a one-line reminder of the same language rule, so the last words the coordinator reads before it answers name your language.
  • The rotation: when a fresh session is due and the old one's turn is over, cterm starts the new one, hands it the old one's threads (they move under it in the sidebar, and their reports reach it) and the prompts waiting on it (a reminder it scheduled for Monday goes out from the new one, its row saying which coordinator set it), and ends the old one. Your answer to a question the old one asked, and a thread's report, go into the new one's next round, which comes at once. cterm keeps the last three coordinators in the list; older ones leave it, their conversations kept.
  • Threads that are done: cterm closes a coordinator's thread once it has finished its turn and its work is over: every pull request it opened is merged, or every case it was opened on is resolved or closed, or it has had no work for a day with no pull request open. Closing ends its Claude process; a line in its pane says why. A pull request still open, or a draft, keeps the thread running (it is told when the checks fail); a pinned thread or one kept for later is left alone. A closed thread is resumed by anything sent to it, by you or by the coordinator. It leaves the list a day after it ended, once every case it was opened on is done (until then the case's card links to it) and no question or draft of it waits for you; its conversation is kept.

The Desk tab's head says who coordinates, since when, how many rounds it was typed, when cterm last looked and when a fresh one comes. Remove the coordinator from the list and cterm starts another at its next look, briefed the same way: nothing of the cases, the rules or what was sent lived in its conversation. While cterm runs the coordinator, naming one by hand with cterm desk coordinator is refused; switch it off to go back to that.

Add a source

From a session of the project, or a terminal naming it with --project <owner>/<project>. A session of another project names it with --project too: the command acts on that project's desk when you work in it, and is refused, naming the project, when you do not; without --project a session always works on its own project's desk. cterm mail … --project follows the same rule.

cterm desk source add teams "<link copied from the channel>" --every 10
cterm desk source add mail --every 15          # the project's mail filter decides what is its own
cterm desk source add webhook --name "Support form" --per-hour 120
cterm desk source add teams self --every 5      # your own chat in Teams, a place to try the desk
cterm desk sources

self is your own chat in Teams (the one marked "(You)"). It is read like any chat, one case for the whole chat, and it is where to try what the desk sends before it ever writes in a real channel: switch on signed posts for it, pick a reply as a team member would, and the signed post or the approved one is typed there and read back on the same case. Teams gives that chat no address, so its case and messages carry no link. A thread of a channel is refused as a source: add the channel, and each thread becomes a case.

Teams and mail read your own accounts, so only an admin's project has them. A webhook's key is shown once; the app posts with it:

curl -X POST https://<your cterm address>/api/desk/in/<source id> \
  -H "Authorization: Bearer dk_…" -H "Content-Type: application/json" \
  -d '{"id": "ticket-915-1", "thread": "ticket-915", "author": "Clinic app", "title": "The calendar does not load", "text": "…", "link": "https://…"}'

A call without the key, or past the source's calls an hour, is refused and stores nothing. cterm desk source key <id> gives it a new key, and the old one stops working.

The coordinator's commands

A session of the project works the desk as its owner:

CommandWhat it does
cterm desk list [--state you]the cases, open first; --search "<words>" looks through all of them
cterm desk show c-12one case whole: its messages between marks, its threads, what happened on it
cterm desk add "<title>" --text "…"a case made by hand (something said on the phone)
cterm desk set c-12 them --note "sent the fix"a case moved: new, progress, you, them, resolved, closed; --item and --linear link it
cterm desk set c-12 --decides ana,luis --leads ana --priority high --due 2026-11-20the case as a matter: who decides it, who leads and who follows it (--follows), its priority, due day and --area, Claude's --next step; none clears one. An account that does not exist, or is not one of the project's people, is refused
cterm desk set c-12 you --question "<q>" --options "a|b|c" --pick 2 --confidence 61 --why "<reason>"the question the case waits on, with its options and Claude's pick, how sure it is and why
cterm desk note c-12 "<text>" --drafta note, a draft or what was sent, kept on the case
cterm desk say c-12 --kind done "<line>"a line for the Despacho's river: what the coordinator saw (info) or did (done) on the case this round. Refused on a case that is not on this desk
cterm desk say c-12 --kind info --no-decision "<line>"the same line, and it marks a matter opened by hand in Nuevo asunto as asking for no decision: it reads completed in cterm desk show and no later coordinator is told to complete it. Refused on a case not opened by hand
cterm desk ok c-12a 👍 on Teams, at once and with no yes, on the case's last message from someone else (--message <id> names another): the sender sees it was read and needs no reply. Kept on the case as a note; refused on a case whose message did not come from Teams
cterm desk thread c-12 "<prompt>"a thread opened on the case, listed on its card
cterm desk report c-12 "<text>"from that thread: the report lands on the case and is typed into the session that opened it
cterm desk ask c-12 "<question>"a question for you, in For you and Mine; your answer comes back with the case's id
cterm desk ask c-12 "<question>" --to ana,luis --options "a|b|c" --pick 2 --confidence 61 --why "<reason>" --post 1="<text>"a question for the people who decide the case, with its options, Claude's own pick, how sure it is and why, and the text an option would publish; the case then waits for them
cterm queue drop q-14 --why "<why>"a question that no longer stands taken back: gone from For you and from the case's questions waiting
cterm desk handover c-12 --to <owner>/<project>the case moved to another project's desk, naming where it came from; closed here, with the link kept
cterm desk coordinator "<session>"the session told, by case id, when a source brings something new; refused while cterm runs the coordinator (above)
cterm desk import <file>a scratch file of cases handled before, imported once as resolved cases

A case as a matter. A case can name the people who decide it, one or more; while it waits for a decision it waits for them, and a case that names nobody waits for the project's owner, as waiting for you always meant. A pick of one of its options by any of them settles it, moves it to in progress and records who picked and when; anyone else of the project only proposes. The people of a project are its owner, its members and the desk accounts given its Despacho; they can also consult each other on a case (a question with quick replies, answered under each person's own name), pass it on, put it off for themselves alone until a time, change its priority, move it and close it. Every change lands on the case's history with who made it, and cterm desk show prints who decides, leads and follows, the priority, the due day, the question with its options and Claude's pick.

What the coordinator says and asks. The people of the desk read the coordinator on the Despacho, not in its session, so its brief tells it to say what it saw or did in one line per case each round (cterm desk say) and to ask with options and its own pick (cterm desk ask --to … --options …). A Teams message it read that needs no reply (a thanks, an "ok", news that asks nothing) gets a 👍 from your account (cterm desk ok), set at once, so whoever wrote knows the desk saw it; never on a message that asks something or that it answers. Those lines and questions are the Despacho's river, each with the coordinator's round and its time. A question addressed to people waits for them: any one of them, or the project's owner, answers it once, by an option or in their own words, and a second answer is refused; anyone else of the project cannot answer it. The answer reaches the coordinator in its next round as cterm's own line naming the case, the option and who picked it. A question with no --to waits for the owner, as before.

Whose words reach the coordinator. A line a team member writes to the coordinator from the Despacho, the note of a move or a close they make there, and the words of their answer reach its next round inside the marks of outside content under their name, the way their posts in their Teams channels do: words it reads under its standing instructions, never an instruction to follow. Only the owner's own lines come after the marks, as the operator's word.

Let Claude decide. One who may answer a question can hand it to Claude, now or at a time unless someone answers or stops it first; under 60 % confidence the Despacho suggests the time. When it comes, Claude's own pick is applied on the case and the coordinator is told to act on it, with the rule that it commits no money, talks to no client and publishes nothing outside without a person's yes.

A reply someone else picks. Teams is written through your own browser, so whatever cterm posts there is you speaking. When an option carries the text it would publish and someone other than you picks it, they choose how it leaves:

  • Publish it signed: it goes into the matter's thread through your send, in the project's send mode (a yes, a countdown or direct), ending in their name after a dash, and the matter's history says who posted. Only in channels where you allowed it with cterm desk source signed <id> on|off, a switch that is yours alone and off until you turn it on.
  • Post it yourself: they get the text to paste into Teams. Nothing is recorded as sent; the matter says it waits to see the message, and once their message is read from the channel it lands on the case like any other.
  • Let the operator approve it: it waits for you as a sheet with the text, the channel and who asks. Approve sends it at once from your account, as written or as you changed it; refuse it with a reason, and nothing goes out.

Your own pick goes out as before, unsigned, through the coordinator. Anything else is refused: a session that tries to send an option's text that nobody picked, that Claude picked or that a team member picked is told why and nothing leaves, while its ordinary replies wait in the project's send mode as always.

Marks that teach it. A person can mark an entry of the river esto me importa, menos de esto or no debió hacerlo solo. Each mark becomes a rule of the desk with its author and the entry, listed with the other rules and carried in the coordinator's brief.

Replying from the desk and the filter that keeps out noise come next; until then the session replies with cterm teams send or cterm mail reply, which wait for your yes in the queue.

Screenshots on this page are drawn by docs/spike/desk-shot.mjs, docs/spike/desk-link-shot.mjs from fake data, and refreshed when a view changes.

Written in docs/site/pages/support.md and built by docs/site/build.mjs.