roster-tuner
Read a sealed agency case event stream, fold per-member metrics, rank members against operator-supplied norms, and emit a typed roster tuning decision naming the bounded member change as plain data.
You’re reading version sha-2b881321ee30. Go to the current version
Overview
Tune a standing agency roster by reading one case's sealed event stream and deciding which members underperform relative to the mandate.
An agency case runs a standing team toward a mandate. The roster is snapshotted as operator config at case open and the agency runtime exposes no verb that mutates it. Member performance drifts over a long case. This skill reads the sealed event stream through the hosted data-store keyed on the case, folds each member's turn count, refusal tally, and completion time the same way the agency reducer folds case state, ranks members against operator-supplied norms, and decides which members underperform relative to the mandate.
It records the judgment as durable case-keyed state through an ungated append, emits a typed roster tuning decision naming the bounded member change as plain data, and stops. The human agency operator is the only lane that acts on it, by re-opening the case with the revised roster. No catalog skill executes a roster mutation.
In the manual
Runner
tune
Declared by its execution profile. Read the profile
SKILL.md
Roster Tuner
Tune a standing agency roster by reading one case's sealed event stream and deciding which members underperform relative to the mandate.
An agency case runs a standing team toward a mandate. The roster is snapshotted as operator config at case open and the agency runtime exposes no verb that mutates it. Member performance drifts over a long case. This skill reads the sealed event stream through the hosted data-store keyed on the case, folds each member's turn count, refusal tally, and completion time the same way the agency reducer folds case state, ranks members against operator-supplied norms, and decides which members underperform relative to the mandate.
It records the judgment as durable case-keyed state through an ungated append, emits a typed roster tuning decision naming the bounded member change as plain data, and stops. The human agency operator is the only lane that acts on it, by re-opening the case with the revised roster. No catalog skill executes a roster mutation.
What this skill does
- Reads the sealed case event stream from the data-store keyed on the agency
case aggregate, using
read_projectionto reconstruct the case state. - Folds per-member metrics from the event stream: turn count, refusal tally, refusal rate, average completion time, and completion ratio against the operator-supplied norm.
- Grades each folded member against
performance_normsthresholds supplied by the operator. The grading step runs as an agent-task sub-step so the judgment can cite specific evidence from the folded metrics. - Decides whether any member is an underperformer: refusal rate above
refusal_thresholdand completion time abovecompletion_time_thresholdtogether name a member for removal. - Names a skill-matched replacement candidate from the remaining roster or from the operator's candidate pool.
- Appends the recorded judgment to the case event stream as an ungated CAS
write via
registry:runx/data-store@0.1.2, keyed onaggregate_idunderexpected_versionandidempotency_key. - Emits the decision as plain data:
decision{underperformer, member_to_remove, replacement_candidate, reason}. No AttenuationRequest, no mint, no execution. - Stops. The human operator reviews the decision and re-opens the case with the revised roster through a separate governed run.
When to use this skill
- A long-running agency case shows performance drift and the operator needs an evidence-based roster review before the next case phase.
- The operator wants a sealed, replayable judgment about member fitness, not a model opinion detached from the case event stream.
- A downstream driver or human needs a typed decision packet to act on, not a narrative report.
When not to use this skill
- To mutate the roster directly. This skill names the change; the operator executes it.
- To analyze catalog-wide platform run history. Use
run-history-analystfor that. This skill reads one case's per-member signals. - To grade events that do not match the declared
agency_event_schema_version. Mismatched schemas are refused. - To reduce the roster below
min_roster_size. The skill refuses. - To remove the only member holding a required skill. The skill refuses.
Procedure
- Receive the case inputs:
case_id,data_source_ref,resource,aggregate_id, the currentroster,performance_norms, andagency_event_schema_version. - Read the case projection from the data-store. This reconstructs the case state from the sealed event stream.
- Fold per-member metrics from the projection. Each member gets:
turn_count,refusal_count,refusal_rate,avg_completion_time, andcompletion_ratio(actual time divided by the norm). - Refuse to grade if any case events do not match the declared
agency_event_schema_version. Stop withschema_version_mismatch. - Grade each member against the norms. A member is a candidate for removal
when
refusal_rateexceedsrefusal_thresholdandavg_completion_timeexceedscompletion_time_threshold. - Check guard rails:
- Refuse to reduce below
min_roster_size. - Refuse to remove the only member holding a required skill.
- Never invent a member or a performance signal not foldable from the sealed events.
- Refuse to reduce below
- If an underperformer is identified, name the
member_to_remove, areplacement_candidatematched by skill, and thereasonciting folded metrics against norms. - Append the judgment event to the case stream via
data-store.append_eventwith the suppliedexpected_versionandidempotency_key. - Emit the decision and stop. The operator acts on it.
Edge cases and stop conditions
needs_agent: the grading agent-task sub-step blocks because caller answers are not supplied. No decision is appended.schema_version_mismatch: case events do not match the declaredagency_event_schema_version. The skill refuses to grade.min_roster_guard: removing the underperformer would reduce the roster belowmin_roster_size. The decision records the underperformance but refuses the removal.sole_skill_guard: the underperformer is the only member holding a required skill. The decision records the underperformance but refuses the removal.needs_more_evidence: the case event stream is empty or unreadable. The skill escalates to the operator rather than inventing metrics.version_conflict: theexpected_versiondoes not match the current stream version. The append fails with a CAS conflict.
Output schema
The tune runner emits runx.roster.tuning.v1:
{
"schema": "runx.roster.tuning.v1",
"case_id": "case-rt-1",
"decision": {
"underperformer": true,
"member_to_remove": "writer-alpha",
"replacement_candidate": "writer-delta",
"reason": "writer-alpha refusal rate 0.75 exceeds threshold 0.6 and completion time 360s is 3x the 120s norm"
},
"projection": {
"aggregate_id": "case-rt-1",
"version_before": 3,
"events_folded": 15
},
"appended_judgment": {
"aggregate_id": "case-rt-1",
"version_after": 4,
"idempotency_key": "case-rt-1:roster-tune:v1",
"event_ref": "agency_cases:case-rt-1:4"
},
"folded_metrics": [
{
"member": "writer-alpha",
"skill": "draft-content",
"turn_count": 12,
"refusal_count": 9,
"refusal_rate": 0.75,
"avg_completion_time": 360,
"completion_ratio": 3.0
}
],
"guard_rails": {
"min_roster_size": 2,
"remaining_after_removal": 2,
"sole_skill_block": false
}
}Inputs
case_id(required): the agency case identifier.data_source_ref(required): logical data source holding the sealed case event stream.store_id(optional): opt into the bundled data.local fixture store; omit for durable local SQLite.resource(required): declared event resource or stream family.aggregate_id(required): the case aggregate id for partition keying.expected_version(required): current stream version for CAS write.idempotency_key(required): stable retry key for the judgment append.roster(required): current roster as[{member, skill, turn_count}].performance_norms(required):{refusal_threshold, completion_time_threshold, min_roster_size}.agency_event_schema_version(required): declared schema version; events that do not match are refused.
Worked example
An agency case case-docs-1 has run for 30 turns with a roster of three
members: a writer, a reviewer, and a researcher. The operator suspects the
writer is underperforming and runs:
runx skill roster-tuner tune \
-i case_id=case-docs-1 \
-i data_source_ref=tenant://agency/docs-cases \
-i resource=agency_cases \
-i aggregate_id=case-docs-1 \
--input-json expected_version=30 \
-i idempotency_key=case-docs-1:roster-tune:v1 \
--input-json roster='[{"member":"writer-alpha","skill":"draft-content","turn_count":12},{"member":"reviewer-beta","skill":"review-skill","turn_count":8},{"member":"researcher-gamma","skill":"deep-research","turn_count":10}]' \
--input-json performance_norms='{"refusal_threshold":0.6,"completion_time_threshold":120,"min_roster_size":2}' \
-i agency_event_schema_version=1 \
--jsonThe skill reads the case projection, folds the writer's metrics (refusal rate
0.75, completion time 360s which is 3x the 120s norm), grades against the
norms, and emits a decision naming writer-alpha for removal with
writer-delta as a skill-matched replacement. The judgment is appended to the
case stream at version 31. The operator reviews and re-opens the case with the
revised roster.
Quality Bar
- Fold every metric from the sealed case events; never invent a signal the stream does not contain.
- Cite the folded refusal rate and completion time against the named thresholds in every underperformer verdict.
- Append the judgment as a CAS write with the caller's
expected_versionandidempotency_key; never skip the version check. - Respect all guard rails:
min_roster_size, sole-skill protection, schema version match. - Stop cleanly with
needs_agent,schema_version_mismatch,min_roster_guard,sole_skill_guard, orneeds_more_evidencerather than producing a weak judgment. - The roster change is plain data, not an AttenuationRequest or mint. The operator is the only lane that acts.
Published execution profile
The execution profile published with sha-2b881321ee30, shown as its exact bytes.
| Runner |
|
|---|---|
| Profile digest | sha256:d41a704608f93b8ca645b93e8e0bc6afca3813a5b1ad40d1d9e857a37c98c38a |
skill: roster-tuner
version: 0.1.0
catalog:
kind: skill
audience: operator
visibility: public
role: canonical
category: ops
runners:
tune:
default: true
inputs:
case_id:
type: string
required: true
description: The agency case identifier to tune.
data_source_ref:
type: string
required: true
description: Logical data source holding the sealed case event stream.
store_id:
type: string
required: false
description: Opt into the bundled data.local fixture store; omit for durable local SQLite.
resource:
type: string
required: true
description: Declared event resource or stream family for the case events.
aggregate_id:
type: string
required: true
description: The case aggregate id; same as case_id for partition keying.
expected_version:
type: number
required: true
description: Current stream version required before appending the judgment.
idempotency_key:
type: string
required: true
description: Stable retry key for the tuning judgment append.
roster:
type: json
required: true
description: Current roster as [{member, skill, turn_count}].
performance_norms:
type: json
required: true
description: "{refusal_threshold, completion_time_threshold, min_roster_size}."
agency_event_schema_version:
type: string
required: true
description: Declared schema version for case events; mismatched events are refused.
steps:
- id: fold
label: fold roster metrics
tool:
command: node
args:
- graph/fold/run.mjs
artifacts:
named_emits:
roster_metrics: roster_metrics
- id: grade
label: grade folded member
agent:
role: reviewer
task: grade-member
outputs:
grade_answer:
required: false
inputs:
performance_norms: $input.performance_norms
folded_metrics: $steps.fold.roster_metrics
artifacts:
named_emits:
grade_answer: grade_answer
- id: decide
label: decide roster tuning
tool:
command: node
args:
- graph/decide/run.mjs
inputs:
case_id: $input.case_id
resource: $input.resource
aggregate_id: $input.aggregate_id
expected_version: $input.expected_version
idempotency_key: $input.idempotency_key
roster: $input.roster
performance_norms: $input.performance_norms
folded_metrics: $steps.fold.roster_metrics
grade_answer: $steps.grade.grade_answer
artifacts:
named_emits:
roster_decision: roster_decision
harness:
cases:
- name: roster-tuner-sealed-underperformer
runner: tune
inputs:
case_id: case-rt-sealed-1
data_source_ref: local://runx-roster-tuner/harness-sealed
store_id: roster-tuner-sealed-v1
resource: agency_cases
aggregate_id: case-rt-sealed-1
expected_version: 0
idempotency_key: case-rt-sealed-1:roster-tune:v1
roster:
- member: writer-alpha
skill: draft-content
turn_count: 12
- member: reviewer-beta
skill: review-skill
turn_count: 8
- member: researcher-gamma
skill: deep-research
turn_count: 10
performance_norms:
refusal_threshold: 0.6
completion_time_threshold: 120
min_roster_size: 2
agency_event_schema_version: "1"
caller:
answers:
grade:
grade_answer:
graded_member: writer-alpha
refusal_count: 9
refusal_rate: 0.75
avg_completion_time: 360
completion_ratio: 3
verdict: underperformer
reason: writer-alpha refusal rate 0.75 exceeds threshold 0.6 and completion time 360s is 3x the 120s norm
expect:
status: sealed
operator_journeys:
- mode: standalone
confusors:
- ops-desk
- agency
request: Tune this agency case's roster from its member metrics.
expected_outcome: Return a typed roster tuning decision naming the bounded member change as data.
- mode: composed
request: Continue this roster-tuner work from evidence already gathered upstream.
expected_outcome: Return a typed roster tuning decision naming the bounded member change as data.
prior_evidence:
- The sealed case event stream already read.
must_not_repeat:
- Do not apply the roster change.
- name: roster-tuner-stop-needs-agent
runner: tune
inputs:
case_id: case-rt-stop-1
data_source_ref: local://runx-roster-tuner/harness-stop
store_id: roster-tuner-stop-v1
resource: agency_cases
aggregate_id: case-rt-stop-1
expected_version: 0
idempotency_key: case-rt-stop-1:roster-tune:v1
roster:
- member: writer-alpha
skill: draft-content
turn_count: 5
- member: reviewer-beta
skill: review-skill
turn_count: 3
performance_norms:
refusal_threshold: 0.6
completion_time_threshold: 120
min_roster_size: 2
agency_event_schema_version: "1"
expect:
status: needs_agent
Published package and test evidence.
The latest recorded test covers an earlier version, sha-f0ea3f898f46. It does not establish a result for this version.
Test result
| Harness result | An earlier version was tested |
|---|---|
| Tested version | sha-f0ea3f898f46Not this page’s version, sha-2b881321ee30 |
| Recorded result | 2 checks passed · 0 failed |
| Result source | Reported by the publisher (runx_registry_publish) |
| Suite | runx-harness |
| Test recorded | |
| Declared cases | 2 |
Package identity
| Published revision | sha-2b881321ee30 |
|---|---|
| Content digest | sha256:2b881321ee3024defb46be7a8930bc8b61f40a878d77aafa988f6b9fb0588955 |
| SKILL.md digest | sha256:58f115d59502b99914aeaa40dd26d345a28d4b635f44eb3134789006c1711295 |
| Execution profile digest | sha256:d41a704608f93b8ca645b93e8e0bc6afca3813a5b1ad40d1d9e857a37c98c38a |
| Publisher identity | Unverified publisher · zdfgu113 |
| Trust tier | CommunityPublished through the registry without publisher verification. This tier is not a code assessment. |
| Attestations |
|
| Source provenance | Not published with this version |
Version history
sha-f0ea3f898f46Content digest sha256:f0ea3f898f46487b82f8eeb84e0c0c6dc243ceb0a123d4afcfcab4c4b0d08d47sha-4f67ad947586Content digest sha256:4f67ad9475867a16e1cee0d06ec11257d77be6ac137cbc4766745e4a90f4a8b9sha-55fcd7b523baContent digest sha256:55fcd7b523ba0ae3bab0cacd1c1820258b5a35dc7a1736db0ab38232a30b7eb9sha-2b881321ee30ViewingContent digest sha256:2b881321ee3024defb46be7a8930bc8b61f40a878d77aafa988f6b9fb0588955