{
 "schema": "aiblocks-page/1",
 "id": "the-monitoring-loop-always-watching-implementation-planner",
 "type": "skill",
 "name": "Agent anomaly monitor builder",
 "summary": "Plan checks that spot unusual changes in your numbers. Set baselines, quiet periods and alert rules so you get few, useful alerts. Draft only.",
 "headline": "Agent anomaly monitor builder",
 "subhead": "Give it the numbers you watch, their history and what counts as unusual. It plans a check for each one with a fair baseline, a confirmation count and a quiet period. You get a check table, an alert record, tuning rules and tests. Nothing is run.",
 "job": {
  "id": "build-software",
  "name": "Build and ship software"
 },
 "level": "intermediate",
 "thinking": "medium",
 "tested": true,
 "updated": "2026-11-03",
 "first_published": "2026-10-25",
 "inputs": [
  {
   "type": "question",
   "required": true,
   "label": "Question",
   "what": "the problem, decision or piece of work you want help with, and what a good outcome looks like"
  },
  {
   "type": "codebase",
   "required": false,
   "label": "Codebase",
   "what": "a project's code, in a folder or repo the AI can open"
  }
 ],
 "outputs": [
  {
   "type": "plan",
   "required": true,
   "label": "Plan",
   "what": "a dated plan: what to do, in what order, with a decision rule for each step"
  },
  {
   "type": "code_change",
   "required": false,
   "label": "Code change",
   "what": "a change to the code, with what it fixes and how it was checked"
  }
 ],
 "you_give": [
  "The numbers to watch, with where each comes from and how often it updates",
  "History for each, at least 7 data points and ideally 2 weeks or more",
  "What counts as unusual for each, such as a percent change or a fixed limit",
  "How often to check each, and how long to stay quiet after an alert",
  "Who is told, and at which level",
  "Your detector code and threshold file (optional)"
 ],
 "you_get": [
  "A check table: baseline window, detector, warning and critical levels, confirmation count and quiet period for each number",
  "Rules for missing or late data",
  "The fields of an alert record, with a next check",
  "Tuning rules for too many or too few alerts",
  "A list of gaps in the starter files, and test cases"
 ],
 "use_when": [
  "Your dashboards are full of alerts and your team has stopped reading them.",
  "You want an agent to watch spend, orders, sign-ups or error counts and tell you only when it matters.",
  "A real drop went unnoticed for days and you want a check that would have caught it.",
  "You have a starter detector and need to know what it misses before you rely on it."
 ],
 "skip_when": [
  "A number with no history, or a one-time event. Use a plain fixed-limit alert in your own dashboard tool.",
  "You want to catch tired ads from a pasted list of results twice a week. Use the Ad decline tracker and replacement briefs.",
  "You want to judge how right your agent's past calls were. Use the Agent prediction log builder.",
  "You want one daily brief that joins alerts from many agents. Use the Multi-agent findings brief builder.",
  "You want it to pause anything or change an account. It only plans alerts. A person decides what to do."
 ],
 "output_sample": {
  "input": [
   "The numbers you watch and where they come from",
   "History for each number",
   "What counts as unusual, how often to check and how long to stay quiet",
   "Your detector code and threshold file (optional)"
  ],
  "prerequisites": [
   "A place where history for each number can be read",
   "A person or channel to receive alerts"
  ],
  "output": [
   {
    "name": "Check table",
    "contains": "One row per number: baseline, detector, warning and critical levels, confirmation and quiet period."
   },
   {
    "name": "Missing data rules",
    "contains": "What counts as missing or late data, the alert it raises and who is told."
   },
   {
    "name": "Alert record",
    "contains": "The fields saved for each alert, including the reading, baseline, level, confidence and next check."
   },
   {
    "name": "Tuning plan",
    "contains": "How to loosen or tighten a level when alerts are too many or too few."
   },
   {
    "name": "Gaps in the starter",
    "contains": "What the starter detector and threshold file miss or get wrong, and the fix for each."
   },
   {
    "name": "Test cases",
    "contains": "Made-up history that checks a spike, a slow drift, a missing feed and a repeat alert."
   }
  ]
 },
 "output_shape": "BASIS\n<what was read; nothing was run>\nMISSING: <inputs and what each stops>\n\nCHECK TABLE\n<number> | <scope> | <how often> | <baseline window> | <detector> | <warn at> | <critical at> | <confirm after> | <quiet for> | <who is told>\n\nMISSING DATA RULES\n<number> | <what counts as missing> | <alert raised> | <who is told>\n\nALERT RECORD\n<field> | <meaning>\n\nTUNING PLAN\n<signal> | <change> | <how often to review>\n\nGAPS IN THE STARTER\n<#> | <what it does> | <why it matters> | <fix>\n\nTEST CASES\n<name> | <set-up> | <expected result>\n\nNEXT STEP\n<one smallest useful step>",
 "how_to_use": [
  "Open the skill in an AI. A chat AI works if you paste your numbers and history in. Claude Code or Codex works better if you want it to read your code.",
  "Paste the list of numbers, a sample of history for each and your levels. Remove client names first.",
  "Read GAPS IN THE STARTER first. One of them may mean a check never fires.",
  "Check the CHECK TABLE. For each number, ask: would this have caught the last real problem, without waking anyone for nothing?",
  "Check MISSING DATA RULES. A feed that stops should raise its own alert.",
  "Run the test cases on a copy of your history before any alert goes to a person."
 ],
 "checks": [],
 "next": [
  {
   "name": "LangSmith AI app monitor",
   "url": "https://useaiblocks.com/skills/langsmith-ai-app-monitor",
   "why": "Build it"
  },
  {
   "name": "AI agent monitoring planner",
   "url": "https://useaiblocks.com/skills/ai-agent-monitoring-planner",
   "why": "Build it"
  },
  {
   "name": "Logging and alerts code writer",
   "url": "https://useaiblocks.com/skills/logging-and-alerts-setter",
   "why": "Build it"
  }
 ],
 "source": null,
 "credits": [],
 "files": [
  "references/anomaly-detector-starter.ts",
  "references/method-notes.md",
  "references/threshold-engine-config.yaml"
 ],
 "links": {
  "page": "https://useaiblocks.com/skills/the-monitoring-loop-always-watching-implementation-planner",
  "markdown": "https://useaiblocks.com/skills/the-monitoring-loop-always-watching-implementation-planner.md",
  "json": "https://useaiblocks.com/skills/the-monitoring-loop-always-watching-implementation-planner.json",
  "instructions": "https://useaiblocks.com/skills/the-monitoring-loop-always-watching-implementation-planner/SKILL.md",
  "download": "https://useaiblocks.com/skills/the-monitoring-loop-always-watching-implementation-planner.zip",
  "api_item": "https://useaiblocks.com/api/v1/items/the-monitoring-loop-always-watching-implementation-planner",
  "api_document": "https://useaiblocks.com/api/v1/documents/skill/the-monitoring-loop-always-watching-implementation-planner",
  "mcp": "https://useaiblocks.com/mcp"
 }
}
