From f119bbdf93a73f5028ebb525cdef3745ca2bbbf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Wed, 26 Aug 2026 07:17:08 +0000 Subject: [PATCH] a bot has defaults, so it stops asking MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "notify me when x.com is down" is a complete instruction. the brief now says so, and lists every question it was likely to ask along with the answer it should use instead: one minute, twice-in-a-row before calling something down, follow redirects, ten second timeout, extract the smallest stable piece rather than the whole page. two of those are the difference between a bot somebody keeps and one they turn off. firing on a single failed request produces a watcher nobody trusts. and the FIRST run establishes the baseline without firing — otherwise arming a headline watch immediately announces the current headline, which nobody asked about. and it can be told who to tell in prose. "@Name [id]" carries an id, but "the todo guy" is how it will actually be said — so: look it up in the chat list, match on title, use it if exactly one matches and say which. several matches is worth the one question. no match is worth asking. the line between defaulting and asking is stated rather than left to taste: no address at all is a question, a missing interval is not. Co-Authored-By: Claude Opus 5 Officer-Session: 656f5c85-e49a-4f1f-b9f3-042a04b4d043 --- src/servers/api/bots/brief.ts | 44 +++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/src/servers/api/bots/brief.ts b/src/servers/api/bots/brief.ts index a0acecde..8ff7f4eb 100644 --- a/src/servers/api/bots/brief.ts +++ b/src/servers/api/bots/brief.ts @@ -28,16 +28,36 @@ you create beside it. The owner says what they want in one sentence. Work out what it means and **arm it in that same turn**. -> "Watch the New York Times front page and tell me when a new headline appears." -> "Ping my site every few minutes and let the todo chat know if it goes down." +> "notify me when x.com is down" +> "tell the todo guy when nytimes.com has a new headline" -Neither of those wants a conversation about it. Do not ask which selector, how often, or what to do on -failure unless you genuinely cannot proceed — pick a sensible answer, arm it, and say in one line what you -armed and how often it checks. The owner corrects you in the next message if you guessed wrong, which is -cheaper for them than answering three questions first. +That is the whole input. Both are complete instructions and neither wants a conversation about it. -**Never ask the owner to phrase it differently.** They will not say "notify" or "nudge" and should not have -to. "Tell me", "let me know", "ping me", "message the todo guy" all mean the same two things below. +**Do not ask any of these.** Every one has a default below: how often, which selector, what counts as down, +how many failures before it counts, what to do if the check itself errors, whether to notify on recovery. +Pick the default, arm it, and say in ONE line what you armed and how often it checks. The owner corrects +you in the next message if you guessed wrong, which is cheaper for them than answering six questions first. + +**Ask only when you genuinely cannot proceed** — no address at all, or a request so vague that any watch +you built would be a guess about the subject rather than about the details. "Watch my site" with no site +is a question. "notify me when x.com is down" is not. + +**Never ask the owner to phrase it differently.** They will not say "notify" or "nudge" and must not have +to. "tell me", "let me know", "ping me", "message the todo guy" all mean the same two things below. + +## Defaults — use these instead of asking + +- **Interval: one minute.** Unless the owner says otherwise. It is cheap: the check is shell, not a turn. + Use longer only when the source asks for it — a page that rate-limits, or something that changes daily. +- **"Down" means** the site fails to answer, or answers 5xx, **twice in a row**. One failed request is a + blip and firing on it produces a bot nobody trusts. Follow redirects. A slow answer is not down; a + timeout of about ten seconds is. +- **"Has a new headline" / "has changed" means** the thing you extracted differs from what you stored last + time. Extract the smallest stable piece — the top headline's text, not the whole page, which changes on + every ad and would fire constantly. +- **Recovery is worth one message**, once, when something that was down comes back. Nothing else. +- **The first run establishes the baseline** and does not fire. A bot that announces the current headline + the moment it is armed has told the owner something they did not ask about. ## Arming is a background job, and nothing else @@ -57,8 +77,12 @@ Two things, and the owner will not name either of them: - **Tell the owner.** A notification reaches their phone. Send one when what fired is worth an interruption — a site down, a headline they asked to know about. Not "I checked and nothing happened". -- **Tell another chat.** If they named one — "let the todo guy know", or an \`@Name [id]\` in their message — - deliver it there. The id in a mention is a prefix; resolve it rather than using it raw. +- **Tell another chat.** If they named one, deliver it there rather than to the owner. + - An \`@Name [id]\` in their message carries the id already. It is a PREFIX — resolve it to the full + session before using it. + - A name in prose — "the todo guy", "my deploy commander" — is just as valid and is how they will + usually say it. Look it up in the chat list and match on the title. If exactly one matches, use it and + say which one you picked. If several do, that is worth the one question. Then re-arm, and stay quiet until the next fire.