metric-watch
Skill2 starsChanged 2 months agoMITView on GitHub
The §3.5 minimal metric-watch routine. Watches six signals — injection budget growth, memory growth rate, classifier fail-closed events, no-LLM-with-candidates defects, fan-out silence, and backup configuration — and writes findings to the journal for the next wake-up to surface. Triggers on /ren:metric-watch, or (recommended) a weekly scheduled routine.
In this repository19 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- backupSkill
- bootstrap-projectSkill
- code-mapSkill
- distillSkill
- doctorSkill
- ingest-projectSkill
- installSkill
- interviewSkill
- pinSkill
- recallSkill
- rememberSkill
- retrospectiveSkill
- routine-initSkill
- suggestionsSkill
- updateSkill
- wiki-healthSkill
- wiki-migrationSkill
- wrapSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 83
Write to wiki pages. Findings live in the journal only.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
metric-watch
Spec §3.5's minimal metric-watch: "one routine watches budget ceiling, memory growth rate, classifier fail-closed events, backup unconfigured and writes findings to the journal for the next wake-up." Six independent checks (the post-0.8.0 no_llm-with-candidates signal joined the original four; the 0.8.7 fan-out-silent signal made six), one journal line per run.
What it watches
| Check | Fires when | Finding kind |
| Injection budget | Latest injected_bytes wake-up payload > 1.5x the median of the last 10 | injection-budget-growth |
| Memory growth | Wiki *.md page count OR total bytes grown > 20% since the last metric-watch run | memory-growth |
| Classifier fail-closed | Any NEW classifier_event entries with event=="fail_closed" since the last run | classifier-fail-closed |
| No-LLM with candidates | Any NEW durable_outcome entries since the last run where the classifier ran no_llm while candidates (seen) were non-zero | no_llm-with-candidates |
| Fan-out silent | Every fanout_event in the last 7 days landed with ZERO candidates. Fires once per new batch of events | fan-out-silent |
| Backup unconfigured | No backup git remote on the wiki repo AND no tarball newer than 7 days in the backups dir | backup-unconfigured |
Each check is isolated — one crashing produces a check-error finding ({"kind": "check-error", "check": "<name>", "error": "<str>"}) instead of preventing the other five from running.
- fan-out silent — every
fanout_eventin the last 7 days landed with zero candidates. Items DO get related to other pages; a week of zeroes means the candidate scorer or the link walk is broken, not that the wiki has nothing in common with itself. Fires once per new batch of events, never on a run with nothing new.
When to use this skill
- Friend invokes
/ren:metric-watchfor an on-demand check - Recommended cadence: weekly, registered as an actual scheduled routine via whatever the friend's harness uses for cron-like scheduling (this skill is the CHECK; registering it as a live cadence is the friend's harness-level choice — see
skills/routine-initfor the routine-spec declaration a scheduled invocation of this skill would need, including its own allowlist:_metric-watchas a NOOP page needs no wiki-write allowlist entry at all, since it never proposes a memory write).
When NOT to use this skill
- Watching a SPECIFIC routine's own health (not the framework's aggregate signals) — that's the routine's own
state.md/run-log, surfaced by wake-up'sread_live_routines(Task 5.1), not this skill
Behavior
- Call
importlib.import_module("skills.metric-watch.lib").watch(session). watchruns all six checks (see table above), each wrapped so a crash becomes acheck-errorfinding rather than an exception.- Findings are appended to the JOURNAL via
lib.memory.journal.append— aroutine-writerProvenance(op="NOOP",page="_metric-watch") carryingextra={"findings": [...]}. Never a wiki page write — wake-up already surfaces live routine state; the journal is the notify channel this check needs, and_metric-watchisn't a real page (no allowlist entry is needed for it — it's not alib.memory.queue.proposecall at all,op="NOOP"never touches a page). - Cross-run state (the memory-growth snapshot, the classifier high-water mark) persists at
state_dir()/"metric-watch.json"— this is the one piece of state that must survive between runs; everything else is recomputed fresh each time fromcollect.read.
What this skill does NOT do
- Write to wiki pages. Findings live in the journal only.
- Auto-remediate anything. A
backup-unconfiguredfinding doesn't run/ren:backup; amemory-growthfinding doesn't prune anything. This is observation, not action. - Require a routine-spec allowlist entry for itself. Its own
op="NOOP"/page="_metric-watch"journal write never goes throughlib.memory.queue, socheck_proposal_against_allowlistnever gates it.
Failure-degradation modes
| Failure | Behavior | User-visible |
| A single check raises (e.g. git not installed, corrupt state file) | That check's finding is check-error; the other checks still run and report normally | (surfaced in the journal, not a crash) |
| No prior metric-watch run yet | Memory-growth and classifier checks are naturally quiet (nothing to compare against) — not an error | — |
| Wiki root inaccessible | watch() still completes; individual checks that need it degrade gracefully (0 pages, no crash) | — |
References
- Task 3.1/3.3 (
lib/instrument/collect.py,lib/instrument/miss_log.py) — the metrics surface this routine reads - Task 6.1 (
lib/governance/tiers.py) — the risk-tier model; metric-watch's own journal write isroutine+NOOP, outside the tier gate entirely (no page write) - Task 5.1 (
hooks/wake-up/wakeup/__init__.py'sread_live_routines) — where a friend sees this routine is live, not this skill's own output docs/data-flow.md— the local-only instrumentation surface this routine reads from and writes findings to
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

