skill-metrics
Keep a time series of what each shipped thing in the garden is doing — one row per interesting event (ITEM STATE CUR LAST DATE NOTE), one file per item holding its last STATE, and content-keyed archives of the current and previous version of its constituent. Use when benchmarking or checking a skill, plugin, tool or package and the result should be remembered: "log this result", "what state is polygram in", "which skills are RED", "when did skill-sign last change", "benchmark the skills", "record the garden run", "skill metrics", "show the metrics log", "what was the previous version". Ships the implementation (scripts/sk2mt, POSIX sh, plus the house library sh1lib.sh), a SPEC, and a suite with a second reader in Python — nothing to re-implement from notes or host config. Reads model POSIX grep over item names (exact names, -e/-E/-F, -i -v -x -c -l -q). Not a dashboard, not a token counter by itself, not a test runner — it remembers what a runner found.
- License 许可
- GPL-3.0
- 所属仓库
- inputloop/garden
- 最近更新
- 2026-10-14
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- skill-metrics
- metadata
- { "c4_minted": 1790035200000, "c4_status": "mint-unblessed", "c4_born_of": "Corwin's 2026-09-22 ask for routine per-skill benchmarking as a skill and an MCP wiring surface", "c4_ships_tool": "scripts/sk2mt + scripts/sh1lib.sh + SPEC.md + tests.sh + tests/test_spec.py" }
- description
- Keep a time series of what each shipped thing in the garden is doing — one row per interesting event (ITEM STATE CUR LAST DATE NOTE), one file per item holding its last STATE, and content-keyed archives of the current and previous version of its constituent. Use when benchmarking or checking a skill, plugin, tool or package and the result should be remembered: "log this result", "what state is polygram in", "which skills are RED", "when did skill-sign last change", "benchmark the skills", "record the garden run", "skill metrics", "show the metrics log", "what was the previous version". Ships the implementation (scripts/sk2mt, POSIX sh, plus the house library sh1lib.sh), a SPEC, and a suite with a second reader in Python — nothing to re-implement from notes or host config. Reads model POSIX grep over item names (exact names, -e/-E/-F, -i -v -x -c -l -q). Not a dashboard, not a token counter by itself, not a test runner — it remembers what a runner found.
02 资源文件 18
- 其他.arc/2026-09/signature-2026-09-23_pre-header-pass.asc659 B
- 其他.arc/2026-09/signature-2026-09-24_162128Z_pre-manifest.asc659 B
- 其他.arc/2026-09/signature-2026-09-27_203835Z_pre-manifest.asc659 B
- 参考文档.arc/2026-09/SKILL-2026-09-27_pre-hardening.md5.4 KB
- 参考文档.arc/2026-09/SKILL-2026-09-27_pre-selfcheck.md6.1 KB
- 其他.arc/2026-09/skill-manifest-2026-09-23_pre-header-pass485 B
- 其他.arc/2026-09/skill-manifest-2026-09-24_162128Z_pre-manifest730 B
- 其他.arc/2026-09/skill-manifest-2026-09-27_203835Z_pre-manifest485 B
- 其他.arc/2026-10/signature-2026-10-10_104828Z_pre-manifest.asc659 B
- 其他.arc/2026-10/skill-manifest-2026-10-10_104828Z_pre-manifest574 B
- 其他.signature.asc659 B
- 其他.skill-manifest574 B
- 脚本scripts/sh1lib.sh2.9 KB
- 脚本scripts/sk2mt13.2 KB
- 参考文档SPEC.md5.4 KB
- 脚本tests.sh6.5 KB
- 脚本tests/test_sh1lib.py9.3 KB
- 脚本tests/test_spec.py6.7 KB
03 SKILL.md 正文
skill-metrics
A small store that remembers what happened to each thing the garden ships. It keeps change, not noise: a row is written only when an item's STATE changes or its constituent's bytes change.
The store, in one look
metrics/log ITEM STATE CUR LAST DATE NOTE (one event per line)
metrics/skill-metrics/ITEM the last STATE, nothing else — `cat` it
metrics/archive/ITEM/H-NAME archived constituent, H = first 16 hex of its sha256
- ITEM — the name people use for it:
polygram,skill-sign,c4,card-games.el. - STATE — one word:
GREEN,RED,LOOK,OK,FAULT,1234B. - CUR / LAST — the archived current and previous constituent, or
NONE. The constituent is the full deliverable when there is one, else the most user-facing interface (a skill'sSKILL.md). - NOTE — the rest of the line: measures, counts, the reason.
The whole contract is SPEC.md. Read it before changing anything here.
Doing things
Run from the directory that holds metrics/, or pass -C DIR, or set SKILL_METRICS_ROOT.
sh scripts/sk2mt init # the only command that creates a store
sh scripts/sk2mt set skill-sign OK --file skills/skill-sign/SKILL.md --note "lint ok; 4296B"
sh scripts/sk2mt state skill-sign # -> OK
sh scripts/sk2mt state # every item, "ITEM STATE"
sh scripts/sk2mt state -e '^gf-' # a pattern (BRE; -E for ERE)
sh scripts/sk2mt last polygram c4 # a word list: exact names
sh scripts/sk2mt items --state RED # which items are RED right now
sh scripts/sk2mt say polygram # one plain-English sentence
sh scripts/sk2mt table # latest rows, aligned
sh scripts/sk2mt log skill-sign # full history
sh scripts/sk2mt check # is the store self-consistent?
Field views are state cur last date note row. Patterns match item names; to filter by
what an item is, add --state WORD. Exit codes are grep's: 0 found, 1 none, 2 error —
plus 3 for NOTVISIBLE (no store where you pointed).
Without the tool. cat metrics/skill-metrics/polygram and grep -l -x RED metrics/skill-metrics/*
work on their own. That is deliberate: the store must outlive its scripts.
Rules this carries
- A root you named is never created for you. Only
initcreates. A typo and a first run look the same from inside; refusing is the only honest answer. - Append-only. No command rewrites or removes a log line. Mistakes are corrected by a new row.
- Content, not location. Archive names carry their hash;
checkre-hashes every one it names. - Word lists are exact names. GNU
grep -wis refused on purpose: names carry-and., and GNU word-matching would findlayeredinsidegf-02-layered-assurance. - Report in words. When a human asked, answer with
say, not with rows.
Testing it
sh tests.sh # shell checks against SPEC.md, then the Python second reader
sh tests.sh --prove-red # the harness must go red on a planted wrong expectation
python3 tests/test_sh1lib.py --prove-red # sh1lib.sh directly: all three sl_hash branches, every helper
Where it plugs in
- The garden kit (
bin/gd1ckin AS4CE0001) runs every suite and benchmark and records each result throughsk2mt set.gd1ckis the runner; this skill is the memory. - MCP. A server that wants these answers should run
scripts/sk2mt(read views only) rather than re-implement the format — one implementation, many callers. Not wired yet; see the plugin README's usage section for the state of that.
How this skill can fail (falsifiers)
- A root created for you. fails if any command but
initcreates a store; check:sh scripts/sk2mt -C /tmp/none state; echo $?prints 3, and/tmp/nonestays empty. - History rewritten. fails if a log line changes or disappears; check: save
metrics/log, run your commands, thenhead -n $(wc -l < SAVED) metrics/log | cmp - SAVED. - An archive does not match its name. fails if a constituent's sha256 prefix differs from its
H-name; check:sh scripts/sk2mt check. - The readers disagree with SPEC.md. fails if the shell or Python reader departs from the spec; check:
sh tests.sh(46/46 on 2026-09-27) andsh tests.sh --prove-red.
<!-- footer: minted by bin/ft1mt from conventions/house.env and conventions/FOOTERS.org; edit those, not this --> Version 1.1.0: edition revised from 1.0.1 on 2026-10-10; spine: 2026-09-22.
Copyright 2026 Corwin Brust corwin@bru.st and Contributors; CC-BY-SA4: https://creativecommons.org/licenses/by-sa/4.0/ (scripts GPL-3.0-or-later); Mentat (for Corwin; claude-opus-5-5) <!-- /footer -->
04 同仓库更多 Skills
alpha
暂无简介
gamma
暂无简介
quiet
A fixture skill that declares no preferences, so skill.quiet.* has no reader.
demo
A fixture skill for tests/prefs-declared-spec.rb; it declares two preferences inline.
concise
Synthesized by polygram from memory tag 'concise'. explicitly flagged. Review and tighten this description before relying on it for triggering.
writing-forms
Which writing form a dated deliverable takes in the shop, and the five techniques every form shares. Use whenever someone is about to write a dated deliverable — "which form is this?", "write it up", "land a note / card / model / lens", "what shape does a … take", "is there a form for this", or when a new PREFIX-date-slug filename is about to be minted. Carries the rule that a deliverable picks ONE form and says so in its filename, points at the register c/wf (columns d/c/wf) as the source of truth, names the most-used forms, the five cross-cutting techniques (two piles · cite at the act · a falsifier on every concern · the pair rule · his words), how a new form is born, and the fence on notes other sessions wrote. Not rolls (report kinds and their guards), not reformat-prompt (the REFORMAT pair), not run-card (the RUNCARD), not skill-creator (skills). Owns the FORM, not the content.