From 15a7d72024a848694d4e5eb8da7318227460dae9 Mon Sep 17 00:00:00 2001 From: vitya Date: Mon, 24 Aug 2026 16:43:21 +0300 Subject: [PATCH] =?UTF-8?q?feat(using-system-snapshot):=20v1.0.0=20?= =?UTF-8?q?=E2=80=94=20mappa=20meta.health/admin.status=20+=20machine=20sn?= =?UTF-8?q?apshot=20(#983)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Два слоя: mappa-сервис (meta_health + admin_status — живая нагрузка) + машина (meta_system_snapshot: поллер/докер/таски из кэша). --- skills/using-system-snapshot/SKILL.md | 85 +++++++++++++++------------ 1 file changed, 47 insertions(+), 38 deletions(-) diff --git a/skills/using-system-snapshot/SKILL.md b/skills/using-system-snapshot/SKILL.md index 68b5682..3b637ce 100644 --- a/skills/using-system-snapshot/SKILL.md +++ b/skills/using-system-snapshot/SKILL.md @@ -1,78 +1,87 @@ --- name: using-system-snapshot author: ours -version: 0.1.0 -description: "Use at the start of an ops-context session, and ALWAYS before asserting anything about the agent poller, local docker containers, or cross-project task load — call `mcp__projects-meta__meta_system_snapshot` instead of running `tasklist` / `docker ps` / `meta_status` by hand. Triggers on «что запущено», «что сейчас крутится», «состояние системы», «состояние машины», «поллер работает?», «поллер живой?», «что с докером», «сводка по задачам», «what's running», «system status», «system snapshot», «is the poller up», «is the runner alive», «what containers are up». Read-only — no per-session grant needed. Skip for deep single-container docker diagnosis (that's using-vds-ops for the VDS / docker logs locally) and for mutating or precise per-task work (that's using-projects-meta)." +version: 1.0.0 +description: "Use at the start of an ops-context session, and ALWAYS before asserting anything about the mappa meta-service, the agent poller, local docker containers, or cross-project task load — call `mcp__mappa__meta_health` + `mcp__mappa__admin_status` (сервис жив, нагрузка) and `mcp__projects-meta__meta_system_snapshot` (поллер/докер/таски) instead of running `tasklist` / `docker ps` / guessing by hand. Triggers on «что запущено», «что сейчас крутится», «состояние системы», «состояние машины», «поллер работает?», «поллер живой?», «что с докером», «сводка по задачам», «what's running», «system status», «system snapshot», «is the poller up», «is the runner alive», «what containers are up». Read-only — no per-session grant needed. Skip for deep single-container docker diagnosis (that's using-vds-ops for the VDS / docker logs locally) and for mutating or precise per-task work (that's using-projects-meta / mappa task.*)." --- # using-system-snapshot ## Overview -One call — `mcp__projects-meta__meta_system_snapshot` — returns a whole-machine ops snapshot: agent **poller** status, local **docker** containers, and a cross-project **task** summary (active / blocked counts) from the projects-meta cache. It replaces the old scatter of `tasklist`, `docker ps`, and a manual `meta_status` read with a single round-trip. +Two layers, one mental model: **mappa meta-service** (решение 14/15 — мета в сервисе) + **машина** (поллер/докер/таск-нагрузка — внешняя инфра). -**Core rule: never assert the state of the poller, local containers, or task load without calling this tool first.** Memory and "it was running earlier" are not evidence. +1. Сервис жив и как загружен: `mcp__mappa__meta_health` (no args → `{ok}`) + `mcp__mappa__admin_status` (счётчики сущностей по типам/проектам — живая нагрузка). +2. Машина: `mcp__projects-meta__meta_system_snapshot` — поллер agents-task-runner, локальные docker-контейнеры, сводка таск-нагрузки из кэша. + +Заменяет старый разброс `tasklist` / `docker ps` / ручного `meta_status` одной-двумя зондами. + +**Core rule: never assert состояние сервиса, поллера, контейнеров или таск-нагрузки без вызова тула в этом же turn.** Память и «он же работал ранее» — не evidence. ## When to use -- Session start in an **ops context** — orienting before doing infra / runner / task-board work. -- The user asks what's alive: «что запущено», «состояние системы», «поллер работает?», «что с докером», «what's running», «is the poller up». -- **Before any claim** about whether the poller is running, which projects it scans, whether a container is up/healthy, or how many tasks are active/blocked. -- A quick cross-project task-load glance ("where's the work concentrated right now"). +- Session start в **ops-контексте** — ориентация перед infra/раннер/борд-работой. +- User спрашивает что живо: «что запущено», «состояние системы», «поллер работает?», «что с докером», «what's running», «is the poller up». +- **Перед любым claim** о живости mappa-сервиса, поллера, контейнера или числа активных/блокированных тасок. +- Быстрый взгляд на таск-нагрузку (где сейчас сконцентрирована работа). ## When NOT to use -- Deep diagnosis of **one** container (logs, inspect, stats, restart-loops) — that's `using-vds-ops` for the Rusonyx VDS, or `docker logs` locally. The snapshot only gives name + status. -- **Mutating** task state, or reading the **full** board / a precise per-task body — that's `using-projects-meta` (and local `.tasks/` disk for the current project). -- Library docs, code search, single-file questions — unrelated. +- Глубокая диагностика **одного** контейнера (logs/inspect/stats/restart-loop) — это using-vds-ops для Rusonyx VDS или `docker logs` локально. +- **Мутации** тасок или чтение полного борда/тела задачи — using-projects-meta (и mappa task.* / локальный `.tasks/` для текущего проекта). +- Библиотечные доки, поиск по коду — не сюда. ## Prerequisites -Requires the tool `mcp__projects-meta__meta_system_snapshot` (shipped by the `projects-meta-mcp` server; the `meta-system-snapshot` capability lives in `OpeItcLoc03/common`). If the tool is missing from the session, the server isn't registered — trigger **`setup-projects-meta`** to install and register it, then retry. +- `mcp__mappa__*` — mappa MCP (сервис meta; установка — setup-проект mappa). +- `mcp__projects-meta__meta_system_snapshot` — projects-meta-mcp (поллер/докер/кэш-таски). Если тула нет — `setup-projects-meta`. -## The call +## The calls -`mcp__projects-meta__meta_system_snapshot` takes **no arguments**. Read-only — call it directly, no preview / confirm, no per-session grant. - -It returns three keys: +`mcp__mappa__meta_health` — no args, read-only. `{ok: true, service: "mappa"}` — сервис жив. +`mcp__mappa__admin_status` — no args, read-only. Счётчики по типам и проектам. +`mcp__projects-meta__meta_system_snapshot` — no args, read-only. Три ключа: | Key | Shape | Liveness | |---|---|---| -| `poller` | `{ running: bool, projects: "" }` | **live** at call time | -| `docker` | `[{ name, status }]` — local containers | **live** at call time | -| `tasks` | `{ "/": { active, blocked }, … }` | **from the projects-meta cache** — may be stale | +| `poller` | `{ running: bool, projects: "" }` | **live** на момент вызова | +| `docker` | `[{ name, status }]` — локальные контейнеры | **live** на момент вызова | +| `tasks` | `{ "/": { active, blocked }, … }` | **из кэша** projects-meta — может быть stale | -`docker` is the **local** machine's containers (includes `agents-task-runner-*`), NOT the VDS. `tasks` counts mirror the cache, so treat them as approximate; for accurate task state run the `using-projects-meta` Step 0 freshness gate or read local `.tasks/` on disk. +`docker` — **локальная** машина (включая `agents-task-runner-*`), НЕ VDS. `tasks` — кэш; для точного состояния — using-projects-meta Step 0 или mappa/локальный `.tasks/`. -## Output format — one line per section +## Output format — одна строка на секцию -Compress the JSON into **three lines**. Don't dump the raw object. +Сожми в 3–4 строки, не дампи raw-object. ``` -🟢 Poller running — OpeItcLoc03/skills (🔴 if running:false) -🟢 Docker — 8/8 up (else list only the bad ones) -📋 Tasks — 23 active / 41 blocked, 17 projects (name the busiest 2–3) +🟢 Mappa alive — 42 wiki / 18 tasks, 12 проектов +🟢 Poller running — OpeItcLoc03/skills (🔴 если running:false) +🟢 Docker — 8/8 up (иначе только проблемные) +📋 Tasks — 23 active / 41 blocked, 17 проектов (назвать 2–3 самых загруженных) ``` -Rules per line: +Правила на строку: -- **Poller** — 🟢/🔴 + running flag + the `projects` string. If stopped, say so plainly — that's the headline. -- **Docker** — if every status starts with `Up` (incl. `Up … (healthy)`), report `N/N up`. Otherwise list **only** the problem containers by name + status (`Restarting`, `Exited`, `(unhealthy)`, `Created`, `Paused`). Don't enumerate healthy ones. -- **Tasks** — totals (Σ active / Σ blocked across all projects) + the 2–3 projects with the most active work. Full per-project breakdown only if asked. +- **Mappa** — 🟢/🔴 + admin_status-сводка (счётчики по типам или проектам — кратко). Сервис упал = заголовок. +- **Poller** — 🟢/🔴 + running-flag + projects-строка. Остановлен — скажи прямо. +- **Docker** — если всё `Up` (вкл. `Up … (healthy)`) — `N/N up`. Иначе только проблемные (`Restarting`, `Exited`, `(unhealthy)`, `Created`, `Paused`) по имени + статусу. +- **Tasks** — суммы (Σ active / Σ blocked) + 2–3 проекта с наибольшей активностью. Полный расклад — только по запросу. ## What NOT to do -- **Do NOT** state "the poller is running" / "all containers are up" / "you have N active tasks" from memory or a prior snapshot. Call the tool in the current turn first. A snapshot from earlier in the session is already stale for liveness claims. -- **Do NOT** fall back to `tasklist` / `docker ps` / a manual `meta_status` to answer these questions — that's the scatter this skill exists to replace. (Drop to raw `docker logs` only for the deep single-container diagnosis this skill explicitly defers.) -- **Do NOT** paste the raw JSON. Three lines, one per section. -- **Do NOT** present `tasks` counts as exact — they come from the cache. Flag staleness if precision matters, and point at `using-projects-meta`. +- **НЕ** утверждай «поллер работает» / «все контейнеры up» / «N активных тасок» по памяти или прошлому снапшоту. Зови тулы в текущем turn — liveness требует свежих данных. +- **НЕ** падай на `tasklist` / `docker ps` / ручной `meta_status` — это scatter, который скил заменяет. (`docker logs` — только для глубокой диагностики одного контейнера.) +- **НЕ** вставляй raw-JSON. Строки, по одной на секцию. +- **НЕ** подавай `tasks`-счётчики как точные — они из кэша. При важности точности — флаг сталезности + using-projects-meta. ## Common mistakes | Mistake | Fix | |---|---| -| "Poller's still up" without calling the tool this turn | Call `meta_system_snapshot` first — liveness claims need current evidence. | -| Running `docker ps` / `tasklist` instead | Use the single snapshot call; that's the point. | -| Reading the snapshot's `docker` as the VDS fleet | It's the **local** machine. VDS containers → `using-vds-ops`. | -| Treating `tasks` counts as authoritative | They're cached. For exact state use `using-projects-meta` Step 0 or local `.tasks/`. | -| Dumping the raw JSON object | Collapse to three lines (poller / docker / tasks). | +| «Сервис жив» без вызова в этом turn | Зови `meta_health`/`admin_status` — liveness требует текущих данных. | +| «Poller up» без вызова | `meta_system_snapshot` в текущем turn. | +| `docker ps` / `tasklist` вместо зондов | Один-два вызова тула; в этом смысл. | +| Читать снапшот-`docker` как VDS-флот | Это **локальная** машина. VDS — using-vds-ops. | +| `tasks`-счётчики как авторитетные | Они кэшированы. Точность — using-projects-meta Step 0 / mappa / `.tasks/`. | +| Дампить raw-объект | Сожми в строки (mappa / poller / docker / tasks). |