本文へ移動
cccskills
無料GitHub で公開

reviewing-samplers

Use when reviewing a Rezolus sampler change before merge — a new sampler, a change to an existing sampler's probes/refresh/metrics, or core changes that affect samplers; or whenever a sampler's overhead, cadence, or data source is in question.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md6.1 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Reviewing Samplers

Overview

Measure, don't assert. A sampler's overhead is a number you produce on real hardware — not an adjective you reason to. docs/principles.md is the spec (15 principles + an operational checklist); this skill is the pass that runs it, with one non-negotiable addition: you do not pass a sampler on a predicted cost.

The trap this skill exists to catch: code review reliably flags an obvious cost offender (per-refresh /proc parsing — principle 15 fires loudly). It does not flag a sampler that is a legitimate principle-15 exception — sysfs/ioctl/SMI is genuinely the only source. There, no cost alarm fires, so an expensive read sails through as "bounded". That is exactly where you must measure. (drivehealth shipped its first cut reasoned "bounded — MET"; measured cost was ~83 ms/refresh — an ATA command per drive.)

When to use

  • Any new sampler, or a change to a sampler's probe / refresh path / metrics.
  • Core changes to the sample cycle, exposition, or metric groups.
  • A sampler's overhead, cadence, or data source is questioned.

Not for: viewer/recorder/parquet-only changes that don't touch a sampler's refresh path.

The review

  1. Run the operational checklist in docs/principles.md ("Reviewing or writing a sampler — operational checklist") literally — one yes/no or "justify in a comment" per item, citing the principle. It is the source of truth; do not restate it here.
  2. Measure the overhead (Principle 16) — the load-bearing step. Produce the per-refresh µs number on real hardware at fleet-representative scale (recipe below). An unmeasured "bounded" / "low" fails the review. Report the number.
  3. Cadence (Principle 17). Does refresh() read a non-mmap, cost-bearing source (sysfs device command, ioctl, SMI/library call, page-table walk)? If so, require: its own bounded re-read interval (configurable), reads dispatched off the async worker (spawn_blocking/background), and the principle-10 departure documented in the module. A synchronous device read on the sample cycle is a fail.
  4. Data-source justification (Principle 15). A per-refresh sysfs/procfs parse must be a genuine exception (no BPF/perf hook) and commented as such in the module.
  5. Robust to absence. No device / no permission → the sampler emits zero series and never errors the agent. Linux-only samplers compile a metric-only no-op elsewhere.
  6. Displayed ("you record it, you display it"). Every new metric has a viewer card: a section or card in crates/dashboard/src/dashboard/, with a generator test naming the metric in a query. A sampler PR without its dashboard change is incomplete, not a follow-up. Label-keyed metrics chart via sum by (<label>). (Principles checklist.)
  7. Series context (principles checklist). REQUIRED section in the report, one line per metric family, each with three parts:
    • Unit: what one series represents (CPU, device, superblock, mount path, task) and whether the slot or deduplication key matches it.
    • Interpretation: the labels recorded, and the context an operator would need to read the value off-host that is not recorded — source or identity, and configuration that changes behavior (options, driver, mode). Each omission is either stated in the PR as a scope decision or raised as a finding.
    • Changing state: anything that can change during a series' life is a gauge, not a label.
  8. Verdict. GO / NO-GO stated with the measured numbers and the specific failing checklist items — never adjectives. The number lands in the effort's journal close-out (see the engineering-journal skill).

Measurement recipe

Minimal config — only the sampler under review, debug logs, no realtime privilege:

[general]
listen = "127.0.0.1:4299"
[scheduler]
policy = "normal"     # avoids SCHED_RR / CAP_SYS_NICE for a local run
[log]
level = "debug"
[defaults]
enabled = false
[samplers.<name>]
enabled = true
target/debug/rezolus /tmp/cfg.toml &          # build first
for i in $(seq 5); do curl -s localhost:4299/metrics/json >/dev/null; sleep 0.2; done
grep "<name> sampling latency" <logfile>       # per-sampler µs, this is the number

Measure at the worst case the fleet will hit — max drive / CPU / process / interface count — not the dev box's trivial count; cost usually scales with it. If you can't reach that scale, say so and bound the extrapolation.

Red flags — STOP

  • About to approve with "looks bounded" / "should be cheap" and no measured µs number.
  • The refresh reads sysfs/ioctl/SMI//proc but you didn't check cadence (Principle 17).
  • The PR adds a metric and touches nothing under crates/dashboard/ — recorded, never displayed.
  • A report with no series-context section, or one that accepts the labels because they identify each series without asking what is needed to interpret it.
  • Treating a legitimate principle-15 exception as automatically cheap — that is the one case where nothing else will catch the cost.
  • Reporting a target ("< 100 µs") instead of a measurement.

Common rationalizations

ExcuseReality
"It's O(active keys), so it's bounded."Bounded is a measured µs number. Produce it.
"It's a legit sysfs exception; the cost concern doesn't apply."The exception is precisely where no alarm fires. Measure it there most of all.
"Target is < ~100 µs, that's fine."A target is a prediction. Report the measurement.
"Dev box shows ~0 µs."Measure at fleet-worst-case device/process count; cost scales with it.
"Reads are just small sysfs files."drivehealth's "small sysfs read" was ~83 ms/refresh. Measure.
"The labels identify each series, so they're sufficient."Identity is not interpretation. Name what an operator reading the recording off-host needs, and the state that changes under a series.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Write or update the CLI `--help` text and README section for a new or changed rezolus feature (a subcommand, flag, mode, or behavior change), then prove the help is usable by dispatching a fresh subagent that has never seen the code. Use this whenever you add or change how rezolus is invoked — new `rezolus <subcommand>`, new flags/args on an existing mode, renamed options, or changed defaults — and any time the user says the help/README is thin, stale, confusing, or "an agent couldn't figure this out." Treats help text as an interface under test, not prose.

日本語の概要は準備中です。原文の説明を表示しています。

iopsystems/rezolus2752026年10月13日 更新

Use when starting or picking up a non-trivial effort (feature, investigation, perf probe, refactor, migration) in a shared repo where teammates or future agents must coordinate or hand off; when a repo has no durable in-tree record of decisions and dead-ends; when you're about to drop a well-measured negative result; or when bootstrapping a journal from a repo's commit history.

日本語の概要は準備中です。原文の説明を表示しています。

iopsystems/rezolus2752026年10月13日 更新

pr

無料

Create a feature branch, commit changes, push, and open a PR against iopsystems/rezolus

日本語の概要は準備中です。原文の説明を表示しています。

iopsystems/rezolus2752026年10月13日 更新

Tag and push a prerelease from the current Cargo.toml version. Use when the user wants to cut an alpha/beta/rc prerelease. Aborts on stable versions (no `-` in version string) and if the tag already exists.

日本語の概要は準備中です。原文の説明を表示しています。

iopsystems/rezolus2752026年10月13日 更新

release

無料

Create a release PR with version bump and changelog update

日本語の概要は準備中です。原文の説明を表示しています。

iopsystems/rezolus2752026年10月13日 更新

Investigate a Rezolus performance recording (.parquet, .rez, .dendro) through the rezolus MCP server. Discovery before query, verdicts and marks written back, links to the viewer.

日本語の概要は準備中です。原文の説明を表示しています。

iopsystems/rezolus2752026年10月13日 更新

iopsystems のスキルをすべて見る

このスキルの問題を報告する