From yoke
Distills the active task's runtime evidence (verdicts under `.yoke/runtime/.judge-verdicts/`, durations under `.yoke/runtime/progress.md`) back into the durable per-sensor files at `.yoke/sensors/<id>.md`. Append-only on the body (`## Known issues`, `## Frequent errors`, and for inferential sensors `## Calibration`); each appended bullet carries a `(cycle N, fix-instruction X)` citation that doubles as the idempotence key. Frontmatter `token_cost` and `time_cost` are recalibrated only when observed-mean delta exceeds 5%. Reads `.yoke/config.yaml` for `sensor_consolidation: review | auto | skip` (default `review`); `skip` is a silent no-op. No arguments.
How this skill is triggered — by the user, by Claude, or both
Slash command
/yoke:consolidate-sensorsThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
The single skill that closes the durability gap on sensor learning.
The single skill that closes the durability gap on sensor learning.
Without it, every /yoke:implement produces dozens of fix
instructions, calibration drifts, and runtime durations that
evaporate at loop exit. This skill reads the runtime artifacts the
loop wrote, distills the evidence per sensor (LLM-driven, not
regex), and persists the distillation back into the per-sensor
files: append-only body bullets with mandatory citations, plus
frontmatter cost recalibration when the observed mean has drifted.
Source PRD: .yoke/prds/2026-04-30-sensor-harness-realignment.md
(Sprint 2, task t05).
lib/working-memory/paths.sh. The skill resolves every
path through the wm_* helpers — never hardcoded..yoke/runtime/.current to resolve the active task slug. If
the file is missing, abort with a one-line message instructing
the user to run /yoke:implement first; exit 0 (this skill is
non-blocking — see skills/implement/SKILL.md teardown
integration)..yoke/runtime/.judge-verdicts/ exists. If missing or
empty, the loop hasn't accumulated evidence; print a one-line
summary 0 sensors updated, 0 bullets added, 0 cost values recalibrated, 0 skipped due to no delta and exit 0..yoke/config.yaml for the sensor_consolidation: key.
Default is review. Behaviour matrix:
skip — silent no-op; print the zero-summary line and exit 0.auto — apply every distillation and recalibration without
prompting.review — render the cumulative diff (body appends + cost
deltas) and prompt the user with four options:
accept all / accept partial / skip / cancel.Walk .yoke/runtime/.judge-verdicts/cycle-*/ in numerical order.
For each cycle directory, parse every JSON verdict file and emit a
record:
{
"sensor": "<sensor-id>",
"criterion": "<criterion-id>",
"cycle": <N>,
"status": "pass" | "fail" | "skip",
"fix_instruction": "<text or null>",
"confidence": <float, inferential only>,
"evidence": "<text>"
}
Then read .yoke/runtime/progress.md and pull every
Cycle <N> block's files_touched, citing_criterion (or
citing_criteria), and any per-sensor duration entries. Group all
records by sensor.
For each sensor with at least one fail or skip verdict in the collected evidence, spawn a Task call with the sensor file's current content + the evidence list, instructing production of:
## Known issues — caveats observed about
the sensor itself (flakes, environmental gotchas).## Frequent errors — recurring patterns
the sensor caught in the code under analysis (bullet shape:
- <pattern>: <fix>).## Calibration's
Rubric or Verdict schema sub-sections — only when evidence shows
the rubric is producing low-confidence verdicts on calibrated
examples.Every candidate bullet MUST include a citation in the form
(cycle N, fix-instruction X) where X is a one-phrase summary of
the underlying fix-instruction. The citation doubles as the
idempotence key — re-running the skill against the same evidence
must produce byte-identical files because the citation grep below
short-circuits any duplicate.
This is the only agentic node in the skill. Everything before (evidence collection) and after (idempotency check, file writes, cost recalibration) is deterministic.
Before inserting any candidate bullet, grep the target sensor file
for the literal citation substring (cycle N, fix-instruction X).
If the citation already exists anywhere in the file body, drop the
candidate bullet — it has been distilled in a prior run. Repeated
invocations with unchanged evidence are byte-identical no-ops.
For each sensor with at least 3 observed run durations in the collected evidence:
time_cost (per-cycle observed seconds).token_cost (inferential only — read from
the verdict's metadata if present, else skip).|observed_mean - declared| / max(declared, 1) > 0.05, mark
the field for update. Otherwise leave the frontmatter untouched.Cost updates are applied via Edit on the frontmatter line. The
5% threshold avoids trivial oscillation — a sensor that drifted
from 30s to 31s does NOT trigger a rewrite; one that drifted from
30s to 60s does.
When sensor_consolidation: review, render the cumulative diff:
sensors to update: <N>
- <sensor-id>: +<M> bullets, [cost: token_cost <old>→<new>, time_cost <old>→<new>]
- ...
Then prompt the user with the canonical four-option menu:
.yoke/runtime/ for the next invocation.In auto mode the prompt is bypassed and every change is applied.
In skip mode the skill exits at pre-flight without entering the
distillation node.
For each sensor approved for update:
## /
### header or EOF.Edit on the
frontmatter line.Edit so an atomic-per-file outcome is
guaranteed: failure on one sensor file leaves the others written
and the run reports non-zero exit.<N> sensors updated, <M> bullets added, <K> cost values recalibrated, <S> skipped due to no delta
The summary line is the only stdout the skill emits in auto and
skip modes; in review mode the diff render and prompt are
emitted before the summary line.
auto / skip modes: single summary line on stdout; no other
output. Exit 0 on success.review mode: diff render + four-option prompt + summary line.
Exit 0 on accept (full or partial) and on cancel; exit 0 also on
skip (silent no-op); exit non-zero only on tool failure./yoke:implement's
teardown) does not roll back on a non-zero exit; it logs and
proceeds.## Known issues, ## Frequent errors, ## Calibration sub-
sections for inferential sensors). Other sections are
human-curated and out of scope.(cycle N, fix-instruction X) cannot be detected by the idempotency check
and will accumulate duplicates on re-runs.auto mode. The auto mode exists precisely
to bypass the human gate — prompting defeats the purpose./yoke:preserve under
Model C, not from this skill.agents/sr-eng.md — council persona that emits the cycle-level
durations into progress.md the skill consumes; this replaced the
retired v2.x agents/generator.md writer.agents/sr-qa.md — council persona whose acceptance-test verdicts,
together with hooks/verify-acceptance.sh output, populate
.yoke/runtime/.judge-verdicts/ the skill consumes; this replaced
the retired v2.x agents/validator.md emitter.templates/sensor.md — defines the body section shape this
skill appends to.skills/implement/SKILL.md — teardown integration point
(sensor-harness-realignment Sprint 2 task t06).npx claudepluginhub iurykrieger/claude-yokeGuides test-driven development for Django applications using pytest-django, factory_boy, and Django REST Framework. Covers red-green-refactor workflow, conftest fixtures, and coverage reporting.