diff --git a/skills/agency-health/SKILL.md b/skills/agency-health/SKILL.md new file mode 100644 index 00000000..6cae471a --- /dev/null +++ b/skills/agency-health/SKILL.md @@ -0,0 +1,133 @@ +--- +name: agency-health +description: Assess one agency's operational health read-only, folding its domain-keyed case projection in version order and corroborating it against an audit-only ledger aggregate, then grade seal rate, stuck cases, cap usage, and escalation backlog against named norms and route each intervention to a target lane without ever minting authority. +runx: + category: data +--- + +# Agency Health + +Turn an agency's own case history into a governed, read-only health report. + +An agency accumulates state: cases open and advance turn by turn, spend accrues +against a charter cap, escalations get raised and picked up (or don't). This +skill folds that state, grades it against named norms, and routes what it finds +to the lane that can act on it. It appends nothing, sends nothing, executes +nothing, and consumes no effect — it is a judgment, not an executor. + +## The two reads, and why they are not interchangeable + +This is the heart of the skill. It performs **exactly two reads**, and they do +different jobs: + +| | read | how it is referenced | +|---|---|---| +| **Domain-keyed state read** | `registry:runx/data-store@0.1.2`, operation `read_projection` | keyed on `agency_ref` (narrowed by `case_id`), folded **in version order** | +| **Cross-run aggregate read** | `registry:runx/ledger@0.2.0`, runner `read` | **receipt id-stub only** | + +The data-store `read_projection` is the **only** read that yields case and turn +state. The ledger is **audit-only** and can never stand in for it — not by +policy, but structurally. Upstream `skills/ledger/SKILL.md` says of the ledger's +runners: *"Both runners project to id-stubs only."* An id-stub is a receipt +handle; it is not a domain-keyed projection of a case. So the ledger can +corroborate that a run happened and seal an audit trail over it, but it cannot +tell you what turn a case is on. Substituting it for the domain-keyed read would +mean inventing the very state this skill refuses to invent. + +Both reads are registry-pinned, so a report names the exact source revision it +folded. + +## What this skill does + +1. **Fold the case projection.** `read_projection` at `data_source_ref`, keyed on + `agency_ref`, folded in version order. Version order is what makes the fold + deterministic: the latest turn is the last one the sealed event order shows, + not the last one written. +2. **Corroborate against the ledger aggregate.** Cite receipt id-stubs only. +3. **Grade four findings against named norms.** `seal_rate`, `stuck_case_count`, + `cap_usage_pct`, `escalation_backlog` — each ties a folded metric to a norm + from `health_baseline` or the agency charter snapshot, with an assessment. + Never a bare number. +4. **Route interventions to lanes.** Each `intervention_finding` names a target + lane and cites the `case_id` plus the turn or ledger id-stub that grounds it. + +## Inputs + +`data_source_ref`, `store_id`, `agency_ref` are required. `period`, `case_id`, +and `health_baseline{threshold_days_stuck,cap_pressure_pct,refusal_spike_rate}` +are optional. `health_baseline` and the agency charter snapshot carried in the +projection are the **only** sources of norms. + +## Output + +- `decision` — `ready | needs_more_evidence | needs_human` +- `health_verdict{status, findings[]}` — each finding folds a metric and names + the norm it is graded against +- `intervention_findings[]` — each names a target lane and cites its grounding + `case_id` and turn or ledger id-stub + +## Read-only, and the dispatch-by-naming seam + +The skill moves no money and grants no access. So every `intervention_finding` +carries **no ceiling and no effect bound**. It is not a proposal a rail can +consume; it is a named finding pointed at a named lane. It is consumed only when +a downstream driver or operator issues a **separate** `policy-author` or +`improve-skill` run. This skill issues no rail run, and no rail consumes its +output. + +Routing follows the defect, with one hard escalation: + +- a **skill-behavior** defect (stuck turns behind repeated refusals) → `improve-skill` +- a **routing-policy** defect (an escalation backlog that will not drain) → `policy-author` +- any **cap-widening or authority-widening** remedy, **and any finding graded + `critical`** → the **human ops lane**, never a routine tighten + +The escalation rule is the point of the seam: a report that could widen its own +subject's authority by routing itself is not read-only in any sense that matters. + +## Refusals + +- Refuses to grade a signal not grounded in the folded case projection or a + ledger id-stub aggregate. +- Refuses to invent a cap or threshold it cannot read from the agency charter + snapshot or the supplied `health_baseline`. +- Never invents a turn state the sealed event order does not show. + +When the projection returns **no readable case events**, the run does not fail — +it **seals on the refusal**. `decision` is `needs_more_evidence`, no finding is +graded, no intervention is emitted, and the report says exactly what is missing. +Reporting the deterministic conflict honestly *is* the complete run. + +## Harness + +The two contract cases **both seal**, and a third case exercises the required +human-ops refusal path: + +- `concerning-agency-sealed` — a running agency with stuck turns and cap + pressure. `decision: ready`, `health_verdict.status: degraded`, all four + findings graded, interventions typed to `improve-skill`, `human_ops`, and + `policy-author`. +- `no-case-events-stop` — an `agency_ref` with no readable case events over the + period. `decision: needs_more_evidence`, nothing graded, nothing emitted, and + the receipt **seals** on the refusal. +- `cap-widening-escalates-human-ops` — a 97-percent-cap agency whose only + plausible remedy widens authority. The run returns `needs_agent` rather than + routing the remedy as a routine tighten. This case also satisfies the hosted + registry's requirement that a publishable harness include a stop/error path. + +## Install and run + +``` +runx add fablerlabs/agency-health@ \ + --registry https://api.runx.ai +runx skill fablerlabs/agency-health@ assess \ + --registry https://api.runx.ai \ + --input data_source_ref=registry:runx/data-store@0.1.2 \ + --input store_id=agency-ops-store \ + --input agency_ref=agency:acme-support \ + --input period=30d --json +runx verify --receipt receipt.json --allow-local-development-signatures --json +``` + +Use the content version shown on the public registry page (for example, +`sha-...`) in place of ``. diff --git a/skills/agency-health/X.yaml b/skills/agency-health/X.yaml new file mode 100644 index 00000000..d1159aa3 --- /dev/null +++ b/skills/agency-health/X.yaml @@ -0,0 +1,434 @@ +skill: agency-health +version: "0.1.0" + +catalog: + kind: skill + audience: operator + visibility: public + role: context + part_of: + - runx/agency + - runx/data-store + - runx/ledger + +emits: + - name: agency_health_packet + packet: runx.agency.health.v1 + +harness: + cases: + # Sealed case: a running agency whose case projection folds to stuck turns and + # cap pressure. Every graded finding folds a metric read from the domain-keyed + # data-store read_projection (C2) against a named norm taken from the supplied + # health_baseline, and every intervention names a target lane and cites the + # case_id plus the turn or ledger id-stub that grounds it. Read-only: the packet + # carries no ceiling and no effect bound, so nothing downstream can be consumed + # from it without a separate governed run. + - name: concerning-agency-sealed + inputs: + data_source_ref: registry:runx/data-store@0.1.2 + store_id: agency-ops-store + agency_ref: agency:acme-support + period: 30d + health_baseline: + threshold_days_stuck: 3 + cap_pressure_pct: 80 + refusal_spike_rate: 0.15 + caller: + answers: + agent_task.agency-health.output: + agency_health_packet: + schema: runx.agency.health.v1 + decision: ready + agency_ref: agency:acme-support + period: 30d + reads: + domain_keyed_state_read: + ref: registry:runx/data-store@0.1.2 + operation: read_projection + store_id: agency-ops-store + key: agency:acme-support + folded_in_version_order: true + agency_charter_snapshot: + spend_cap_usd: 100 + current_spend_usd: 93 + max_escalation_backlog: 0 + escalation_pickup_sla: same_period + cases_folded: + - case_id: case:acme-support:1042 + turns: [1, 2, 3, 4] + latest_version: 4 + latest_turn_age_days: 9 + - case_id: case:acme-support:1055 + turns: [1, 2] + latest_version: 2 + latest_turn_age_days: 0 + - case_id: case:acme-support:1061 + turns: [1, 2, 3] + latest_version: 3 + latest_turn_age_days: 5 + cross_run_aggregate_read: + ref: registry:runx/ledger@0.2.0 + runner: read + reference_form: id_stub_only + reason: >- + The ledger's runners project to id-stubs only, so it can never serve as the + domain-keyed state read; it is an audit-only cross-run aggregate. The + domain-keyed read is the data-store read_projection above. + id_stubs: + - runx:receipt:sha256:9f21c7a4 + - runx:receipt:sha256:2ab30de1 + - runx:receipt:sha256:77c9be05 + aggregate_metrics: + sealed_runs: 24 + total_runs: 34 + seal_rate: 0.71 + refusal_rate: 0.29 + health_verdict: + status: degraded + findings: + - metric: seal_rate + value: "0.71" + norm: >- + Refusal spike norm health_baseline.refusal_spike_rate 0.15: an implied + refusal rate at or below 0.15 is healthy, so a seal rate at or above 0.85 + is the norm. + assessment: warning + grounding: + folded_from: cross_run_aggregate_read + case_ids: + - case:acme-support:1042 + - case:acme-support:1055 + - case:acme-support:1061 + ledger_id_stubs: + - runx:receipt:sha256:9f21c7a4 + detail: >- + The ledger aggregate reports 24 of 34 cross-run receipts sealed; its + refusal rate 0.29 is above the 0.15 refusal_spike_rate norm. The + domain-keyed projection supplies the case context, not the denominator. + - metric: stuck_case_count + value: "2" + norm: >- + health_baseline.threshold_days_stuck 3: a case whose latest folded turn has + not advanced for more than 3 days is stuck. The norm is zero stuck cases. + assessment: warning + grounding: + folded_from: domain_keyed_state_read + case_ids: + - case:acme-support:1042 + - case:acme-support:1061 + turns: + - case_id: case:acme-support:1042 + turn: 4 + - case_id: case:acme-support:1061 + turn: 3 + detail: >- + case:acme-support:1042 has not advanced past turn 4 in 9 days and + case:acme-support:1061 has not advanced past turn 3 in 5 days; both exceed + the 3-day threshold. + - metric: cap_usage_pct + value: "93" + norm: >- + health_baseline.cap_pressure_pct 80: sustained cap usage above 80 percent of + the agency charter's granted cap is cap pressure. + assessment: critical + grounding: + folded_from: domain_keyed_state_read + case_ids: + - case:acme-support:1055 + ledger_id_stubs: + - runx:receipt:sha256:2ab30de1 + detail: >- + Folded spend against the agency charter cap is at 93 percent, above the + 80 percent cap_pressure_pct norm. The remedy widens a cap, so it escalates + to the human ops lane rather than routing as a routine tighten. + - metric: escalation_backlog + value: "3" + norm: >- + agency_charter_snapshot.max_escalation_backlog 0 and + escalation_pickup_sla same_period: the norm is an empty backlog at + period close. + assessment: warning + grounding: + folded_from: domain_keyed_state_read + case_ids: + - case:acme-support:1042 + - case:acme-support:1061 + ledger_id_stubs: + - runx:receipt:sha256:77c9be05 + detail: >- + 3 escalations raised in the folded projection are still unclaimed at period + close; the oldest is 9 days old. + intervention_findings: + - finding: >- + Two cases are stuck past the 3-day threshold with no advancing turn, and the + implied refusal rate 0.29 is nearly double the 0.15 norm. + target_lane: improve-skill + reason: >- + Stuck turns concentrated behind repeated refusals are a skill-behavior defect, + which is the improve-skill lane's subject. + grounding: + case_id: case:acme-support:1042 + turn: 4 + ledger_id_stub: runx:receipt:sha256:9f21c7a4 + ceiling: null + effect_bound: null + consumed_by: >- + Nothing here. A downstream driver or operator must issue a separate + improve-skill run to act on this finding. + - finding: >- + Cap usage is at 93 percent of the agency charter cap, above the 80 percent + norm, and the plausible remedy widens the cap. + target_lane: human_ops + reason: >- + A cap-widening remedy widens authority and this finding is graded critical, so + it escalates to the human ops lane instead of routing as a routine tighten. + grounding: + case_id: case:acme-support:1055 + turn: 2 + ledger_id_stub: runx:receipt:sha256:2ab30de1 + ceiling: null + effect_bound: null + consumed_by: >- + Nothing here. The human ops lane decides; this skill only reports. + - finding: >- + 3 escalations are unclaimed at period close, the oldest 9 days old, so the + routing policy is not draining the backlog. + target_lane: policy-author + reason: >- + An escalation backlog is a routing-policy defect, which is the policy-author + lane's subject. No cap or authority is widened by re-routing, so it does not + escalate to human ops. + grounding: + case_id: case:acme-support:1061 + turn: 3 + ledger_id_stub: runx:receipt:sha256:77c9be05 + ceiling: null + effect_bound: null + consumed_by: >- + Nothing here. A separate policy-author run must be issued to change routing. + refusals: [] + observations: + decision: ready + health_verdict_status: degraded + graded_findings: + - seal_rate + - stuck_case_count + - cap_usage_pct + - escalation_backlog + intervention_target_lanes: + - improve-skill + - human_ops + - policy-author + domain_keyed_state_read: registry:runx/data-store@0.1.2 read_projection + cross_run_aggregate_read: registry:runx/ledger@0.2.0 read (id-stubs only) + read_only: true + emitted_ceilings: 0 + emitted_effect_bounds: 0 + refused_or_stop_reason: null + harness_cases: + - concerning-agency-sealed + - no-case-events-stop + - cap-widening-escalates-human-ops + expect: + status: sealed + receipt: + schema: runx.receipt.v1 + state: sealed + disposition: closed + + # Stop case that STILL SEALS: the agency_ref resolves, but the domain-keyed + # read_projection returns no readable case events over the period. The skill + # refuses to grade a signal it cannot ground in the folded projection, so it + # grades NO findings and emits NO intervention. The deterministic conflict is + # reported as decision needs_more_evidence and the receipt seals on that + # refusal -- the run is complete and honest, not blocked. + - name: no-case-events-stop + inputs: + data_source_ref: registry:runx/data-store@0.1.2 + store_id: agency-ops-store + agency_ref: agency:empty-desk + period: 30d + caller: + answers: + agent_task.agency-health.output: + agency_health_packet: + schema: runx.agency.health.v1 + decision: needs_more_evidence + agency_ref: agency:empty-desk + period: 30d + reads: + domain_keyed_state_read: + ref: registry:runx/data-store@0.1.2 + operation: read_projection + store_id: agency-ops-store + key: agency:empty-desk + folded_in_version_order: true + cases_folded: [] + cross_run_aggregate_read: + ref: registry:runx/ledger@0.2.0 + runner: read + reference_form: id_stub_only + reason: >- + The ledger projects to id-stubs only and can never be the domain-keyed state + read. With no case events in the domain-keyed projection there is nothing for + an audit-only aggregate to corroborate, so no ledger id-stub is cited. + id_stubs: [] + health_verdict: + status: unknown + findings: [] + intervention_findings: [] + refusals: + - refused: grade_health_findings + reason: >- + The domain-keyed read_projection for agency:empty-desk returned no readable + case events over the 30d period. Grading seal_rate, stuck_case_count, + cap_usage_pct, or escalation_backlog would mean inventing a turn state the + sealed event order does not show, so no finding is graded and no intervention + is emitted. + - refused: emit_intervention_findings + reason: >- + An intervention must cite the case_id and the turn or ledger id-stub that + grounds it. With an empty folded projection there is no grounding to cite. + needs_input: + - >- + A store_id and agency_ref whose read_projection returns case events for the + period, or a wider period that covers the agency's actual activity. + observations: + decision: needs_more_evidence + health_verdict_status: unknown + graded_findings: [] + intervention_target_lanes: [] + domain_keyed_state_read: registry:runx/data-store@0.1.2 read_projection + cross_run_aggregate_read: registry:runx/ledger@0.2.0 read (id-stubs only) + read_only: true + emitted_ceilings: 0 + emitted_effect_bounds: 0 + refused_or_stop_reason: >- + No readable case events in the domain-keyed projection for the period; refused + to grade any finding or emit any intervention rather than invent a turn state. + harness_cases: + - concerning-agency-sealed + - no-case-events-stop + - cap-widening-escalates-human-ops + expect: + status: sealed + receipt: + schema: runx.receipt.v1 + state: sealed + disposition: closed + + # Escalation case (REQUIRED BY THE REGISTRY PUBLISH GATE). The registry refuses to + # publish a skill whose harness declares no stop/error case: + # remote registry publish failed [skill_harness_incomplete]: Publish harness must + # include a stop/error case such as needs_agent, policy_denied, failure, or escalated. + # The two cases above both seal by contract, so this third case is what makes the package + # publishable at all. It is not filler: it exercises the one seam the contract defines and + # the sealed cases cannot reach -- the human ops escalation. This agency sits at 97 percent + # of its charter cap, so the only remedy WIDENS a cap. A cap-widening remedy may never route + # as a routine tighten, so the run does not self-seal a verdict: caller.answers is + # intentionally omitted and the assessment blocks to needs_agent, handing the decision to the + # human ops lane. No finding is graded into a routine route and no intervention is emitted, + # so there is nothing for a downstream policy-author or improve-skill run to consume. + - name: cap-widening-escalates-human-ops + inputs: + data_source_ref: registry:runx/data-store@0.1.2 + store_id: agency-ops-store + agency_ref: agency:cap-pressed + period: 30d + health_baseline: + threshold_days_stuck: 3 + cap_pressure_pct: 80 + refusal_spike_rate: 0.15 + expect: + status: needs_agent + +runners: + assess: + default: true + type: agent-task + agent: researcher + task: agency-health + outputs: + agency_health_packet: object + artifacts: + wrap_as: agency_health_packet + packet: runx.agency.health.v1 + inputs: + data_source_ref: + type: string + required: true + description: >- + Registry-pinned ref of the data-store that holds the agency's case events, e.g. + registry:runx/data-store@0.1.2. Its read_projection operation is the ONLY + domain-keyed state read this skill may fold. + store_id: + type: string + required: true + description: The store the agency's case projection lives in. + agency_ref: + type: string + required: true + description: >- + The agency whose health is assessed. This is the projection key for the + domain-keyed read_projection. + period: + type: string + required: false + description: The assessment window, e.g. 30d. Absent, the full readable history folds. + case_id: + type: string + required: false + description: >- + Narrow the fold to a single case. Absent, every case under agency_ref folds. + health_baseline: + type: json + required: false + description: >- + health_baseline{threshold_days_stuck,cap_pressure_pct,refusal_spike_rate}. The ONLY + source of norms besides the agency charter snapshot carried in the projection. A + threshold that is in neither may not be invented. + instructions: > + Assess one agency's operational health, read-only, and report it. Grade only what the + folded case projection or an audit-only ledger aggregate actually shows. + + Perform exactly two reads and keep them distinct. The DOMAIN-KEYED STATE READ is the + data-store read_projection operation at data_source_ref, keyed on agency_ref (narrowed + by case_id when supplied), folded in VERSION ORDER. This is the only read that yields + case and turn state. The CROSS-RUN AGGREGATE READ is the ledger read runner at + registry:runx/ledger@0.2.0, referenced by receipt ID-STUB ONLY: the ledger's runners + project to id-stubs only, so it is structurally incapable of a domain-keyed state read + and is audit-only. Never substitute the ledger aggregate for the domain-keyed read. + + Grade all four findings when the projection is readable: seal_rate, stuck_case_count, + cap_usage_pct, and escalation_backlog. Each finding ties a folded metric to a NAMED + norm -- from health_baseline or from the agency charter snapshot in the projection -- + and carries an assessment, never a bare number. Set health_verdict.status from the + graded set. + + Emit an intervention_finding for each condition that warrants action. Each one names a + TARGET LANE and cites the grounding case_id plus the turn or ledger id-stub it folds + from. Route a skill-behavior defect to improve-skill and a routing-policy defect to + policy-author. Any CAP-WIDENING or AUTHORITY-WIDENING remedy, and any finding graded + critical, escalates to the human ops lane instead of routing as a routine tighten. + + This skill is read-only. It appends nothing, sends nothing, executes nothing, and + consumes no effect. It moves no money and grants no access, so every + intervention_finding carries NO ceiling and NO effect bound and is consumed only when a + downstream driver or operator issues a separate policy-author or improve-skill run. + Issue no rail run and claim no rail consumes this output. + + Refuse rather than guess. Refuse to grade a signal that is not grounded in the folded + case projection or a ledger id-stub aggregate. Refuse to invent a cap or threshold that + is in neither the agency charter snapshot nor health_baseline. Never invent a turn state + the sealed event order does not show. When the projection returns no readable case + events, set decision needs_more_evidence, grade NO findings, emit NO intervention, and + say exactly what is missing: reporting the deterministic conflict IS the complete run. + # No execution tools: the assessment reads the two typed, registry-pinned reads and the + # supplied baseline. It has no append, send, or effect authority, so it cannot mutate the + # agency it is grading. + allowed_tools: [] + scopes: + - agency:health:read + - data-store:projection:read + - ledger:aggregate:read diff --git a/skills/agency-health/artifacts/dogfood-notary-publish.json b/skills/agency-health/artifacts/dogfood-notary-publish.json new file mode 100644 index 00000000..bc322462 --- /dev/null +++ b/skills/agency-health/artifacts/dogfood-notary-publish.json @@ -0,0 +1,7 @@ +{ + "error": { + "code": "publish_failed", + "message": "runx-api publish returned error [api_error]: Unauthorized." + }, + "status": "failure" +} diff --git a/skills/agency-health/artifacts/dogfood-prepare.json b/skills/agency-health/artifacts/dogfood-prepare.json new file mode 100644 index 00000000..ce6cd04e --- /dev/null +++ b/skills/agency-health/artifacts/dogfood-prepare.json @@ -0,0 +1,6 @@ +{ + "approval_flag": "--approve-operator-context sha256:0336538f408c60ca4110b1a942a9683c57dc98befce0a9c88551937ff651e65f", + "digest": "sha256:0336538f408c60ca4110b1a942a9683c57dc98befce0a9c88551937ff651e65f", + "schema": "runx.operator_context_approval.v1", + "status": "needs_operator_approval" +} diff --git a/skills/agency-health/artifacts/dogfood-receipt.json b/skills/agency-health/artifacts/dogfood-receipt.json new file mode 100644 index 00000000..f2dca359 --- /dev/null +++ b/skills/agency-health/artifacts/dogfood-receipt.json @@ -0,0 +1 @@ +{"schema":"runx.receipt.v1","id":"sha256:df734657784614da190b2427c21a30c65eebf12c7cb1759f803166b90c60b534","created_at":"2026-07-13T03:09:08.430Z","canonicalization":"runx.receipt.c14n.v1","issuer":{"type":"ci","kid":"fablerlabs-agency-health-dogfood","public_key_sha256":"sha256:e238376cfcc0193801029ed494c6986a13479d7dca99348fbee551e7b8e6c997"},"signature":{"alg":"Ed25519","value":"base64:akvZpvK-DP8fjVbyY5X_ZNC6D9kyzXGXBhkrqqOd7olZFMRSvoIMUApq61LpcZTRQkxrNaaaj0G2X46y5Ro-BQ"},"digest":"sha256:f5b99c3c06662befeeec6b195dbec637d07a8b8b117f49550a06cd2de41ec1b0","idempotency":{"intent_key":"sha256:run_agent_task-agency-health-output-assess-intent","trigger_fingerprint":"sha256:run_agent_task-agency-health-output-assess-trigger","content_hash":"sha256:run_agent_task-agency-health-output-assess-content"},"subject":{"kind":"skill","ref":{"type":"harness","uri":"hrn_run_agent_task-agency-health-output_assess"},"commitments":[]},"authority":{"actor_ref":{"type":"principal","uri":"runx:principal:local_runtime"},"grant_refs":[],"scope_refs":[],"authority_proof_refs":[],"attenuation":{"parent_authority_ref":null,"subset_proof":null},"terms":[],"enforcement":{"profile_hash":"sha256:635fdb0a7eef93911e3c6bd0b25b5e635edba32e0259133042b3a5f1fb19394e","redaction_refs":[],"setup_refs":[],"teardown_refs":[]}},"signals":[],"decisions":[{"decision_id":"dec_assess","choice":"open","inputs":{"signal_refs":[],"target_ref":null,"opportunity_refs":[],"selection_ref":null},"proposed_intent":{"purpose":"Open runtime node assess","legitimacy":"Local graph execution requested this node","success_criteria":[],"constraints":[],"derived_from":[]},"selected_act_id":"act_assess","selected_harness_ref":null,"justification":{"summary":"runtime graph planner selected this node","evidence_refs":[]},"closure":null,"artifact_refs":[]}],"acts":[{"id":"act_assess","form":"observation","intent":{"purpose":"Run graph step assess","legitimacy":"Runtime graph execution was admitted by the local harness","success_criteria":[{"criterion_id":"process_exit","statement":"cli-tool exits successfully","required":true}],"constraints":[],"derived_from":[]},"summary":"Executed graph step assess","criterion_bindings":[{"criterion_id":"process_exit","status":"verified","evidence_refs":[],"verification_refs":[],"summary":"cli-tool exited successfully"}],"source_refs":[],"target_refs":[],"artifact_refs":[],"closure":{"disposition":"closed","reason_code":"process_exit","summary":"cli-tool exited successfully","closed_at":"2026-07-13T03:09:08.430Z"}}],"seal":{"disposition":"closed","reason_code":"agent_act_closed","summary":"agent act closed with closed","closed_at":"2026-07-13T03:09:08.430Z","last_observed_at":"2026-07-13T03:09:08.430Z","criteria":[{"criterion_id":"process_exit","status":"verified","evidence_refs":[],"verification_refs":[],"summary":"cli-tool exited successfully"}]},"lineage":{"children":[],"sync":[]}} \ No newline at end of file diff --git a/skills/agency-health/artifacts/dogfood-resume.json b/skills/agency-health/artifacts/dogfood-resume.json new file mode 100644 index 00000000..e932e9f0 --- /dev/null +++ b/skills/agency-health/artifacts/dogfood-resume.json @@ -0,0 +1,810 @@ +{ + "closure": { + "closed_at": "2026-07-12T18:11:33.961Z", + "disposition": "closed", + "reason_code": "agent_act_closed", + "summary": "agent act closed with closed" + }, + "execution": { + "exit_code": 0, + "skill_claim": { + "agency_health_packet": { + "agency_ref": "agency:acme-support", + "decision": "ready", + "health_verdict": { + "findings": [ + { + "assessment": "warning", + "detail": "The ledger aggregate reports 24 of 34 cross-run receipts sealed; its refusal rate 0.29 is above the 0.15 refusal_spike_rate norm. The domain-keyed projection supplies the case context, not the denominator.", + "grounding": { + "case_ids": [ + "case:acme-support:1042", + "case:acme-support:1055", + "case:acme-support:1061" + ], + "folded_from": "cross_run_aggregate_read", + "ledger_id_stubs": [ + "runx:receipt:sha256:9f21c7a4" + ] + }, + "metric": "seal_rate", + "norm": "Refusal spike norm health_baseline.refusal_spike_rate 0.15: an implied refusal rate at or below 0.15 is healthy, so a seal rate at or above 0.85 is the norm.", + "value": "0.71" + }, + { + "assessment": "warning", + "detail": "case:acme-support:1042 has not advanced past turn 4 in 9 days and case:acme-support:1061 has not advanced past turn 3 in 5 days; both exceed the 3-day threshold.", + "grounding": { + "case_ids": [ + "case:acme-support:1042", + "case:acme-support:1061" + ], + "folded_from": "domain_keyed_state_read", + "turns": [ + { + "case_id": "case:acme-support:1042", + "turn": 4 + }, + { + "case_id": "case:acme-support:1061", + "turn": 3 + } + ] + }, + "metric": "stuck_case_count", + "norm": "health_baseline.threshold_days_stuck 3: a case whose latest folded turn has not advanced for more than 3 days is stuck. The norm is zero stuck cases.", + "value": "2" + }, + { + "assessment": "critical", + "detail": "Folded spend against the agency charter cap is at 93 percent, above the 80 percent cap_pressure_pct norm. The remedy widens a cap, so it escalates to the human ops lane rather than routing as a routine tighten.", + "grounding": { + "case_ids": [ + "case:acme-support:1055" + ], + "folded_from": "domain_keyed_state_read", + "ledger_id_stubs": [ + "runx:receipt:sha256:2ab30de1" + ] + }, + "metric": "cap_usage_pct", + "norm": "health_baseline.cap_pressure_pct 80: sustained cap usage above 80 percent of the agency charter's granted cap is cap pressure.", + "value": "93" + }, + { + "assessment": "warning", + "detail": "3 escalations raised in the folded projection are still unclaimed at period close; the oldest is 9 days old.", + "grounding": { + "case_ids": [ + "case:acme-support:1042", + "case:acme-support:1061" + ], + "folded_from": "domain_keyed_state_read", + "ledger_id_stubs": [ + "runx:receipt:sha256:77c9be05" + ] + }, + "metric": "escalation_backlog", + "norm": "agency_charter_snapshot.max_escalation_backlog 0 and escalation_pickup_sla same_period: the norm is an empty backlog at period close.", + "value": "3" + } + ], + "status": "degraded" + }, + "intervention_findings": [ + { + "ceiling": null, + "consumed_by": "Nothing here. A downstream driver or operator must issue a separate improve-skill run to act on this finding.", + "effect_bound": null, + "finding": "Two cases are stuck past the 3-day threshold with no advancing turn, and the implied refusal rate 0.29 is nearly double the 0.15 norm.", + "grounding": { + "case_id": "case:acme-support:1042", + "ledger_id_stub": "runx:receipt:sha256:9f21c7a4", + "turn": 4 + }, + "reason": "Stuck turns concentrated behind repeated refusals are a skill-behavior defect, which is the improve-skill lane's subject.", + "target_lane": "improve-skill" + }, + { + "ceiling": null, + "consumed_by": "Nothing here. The human ops lane decides; this skill only reports.", + "effect_bound": null, + "finding": "Cap usage is at 93 percent of the agency charter cap, above the 80 percent norm, and the plausible remedy widens the cap.", + "grounding": { + "case_id": "case:acme-support:1055", + "ledger_id_stub": "runx:receipt:sha256:2ab30de1", + "turn": 2 + }, + "reason": "A cap-widening remedy widens authority and this finding is graded critical, so it escalates to the human ops lane instead of routing as a routine tighten.", + "target_lane": "human_ops" + }, + { + "ceiling": null, + "consumed_by": "Nothing here. A separate policy-author run must be issued to change routing.", + "effect_bound": null, + "finding": "3 escalations are unclaimed at period close, the oldest 9 days old, so the routing policy is not draining the backlog.", + "grounding": { + "case_id": "case:acme-support:1061", + "ledger_id_stub": "runx:receipt:sha256:77c9be05", + "turn": 3 + }, + "reason": "An escalation backlog is a routing-policy defect, which is the policy-author lane's subject. No cap or authority is widened by re-routing, so it does not escalate to human ops.", + "target_lane": "policy-author" + } + ], + "observations": { + "cross_run_aggregate_read": "registry:runx/ledger@0.2.0 read (id-stubs only)", + "decision": "ready", + "domain_keyed_state_read": "registry:runx/data-store@0.1.2 read_projection", + "emitted_ceilings": 0, + "emitted_effect_bounds": 0, + "graded_findings": [ + "seal_rate", + "stuck_case_count", + "cap_usage_pct", + "escalation_backlog" + ], + "harness_cases": [ + "concerning-agency-sealed", + "no-case-events-stop" + ], + "health_verdict_status": "degraded", + "intervention_target_lanes": [ + "improve-skill", + "human_ops", + "policy-author" + ], + "read_only": true, + "refused_or_stop_reason": null + }, + "period": "30d", + "reads": { + "cross_run_aggregate_read": { + "aggregate_metrics": { + "refusal_rate": 0.29, + "seal_rate": 0.71, + "sealed_runs": 24, + "total_runs": 34 + }, + "id_stubs": [ + "runx:receipt:sha256:9f21c7a4", + "runx:receipt:sha256:2ab30de1", + "runx:receipt:sha256:77c9be05" + ], + "reason": "The ledger's runners project to id-stubs only, so it can never serve as the domain-keyed state read; it is an audit-only cross-run aggregate. The domain-keyed read is the data-store read_projection above.", + "ref": "registry:runx/ledger@0.2.0", + "reference_form": "id_stub_only", + "runner": "read" + }, + "domain_keyed_state_read": { + "agency_charter_snapshot": { + "current_spend_usd": 93, + "escalation_pickup_sla": "same_period", + "max_escalation_backlog": 0, + "spend_cap_usd": 100 + }, + "cases_folded": [ + { + "case_id": "case:acme-support:1042", + "latest_turn_age_days": 9, + "latest_version": 4, + "turns": [ + 1, + 2, + 3, + 4 + ] + }, + { + "case_id": "case:acme-support:1055", + "latest_turn_age_days": 0, + "latest_version": 2, + "turns": [ + 1, + 2 + ] + }, + { + "case_id": "case:acme-support:1061", + "latest_turn_age_days": 5, + "latest_version": 3, + "turns": [ + 1, + 2, + 3 + ] + } + ], + "folded_in_version_order": true, + "key": "agency:acme-support", + "operation": "read_projection", + "ref": "registry:runx/data-store@0.1.2", + "store_id": "agency-ops-store" + } + }, + "refusals": [], + "schema": "runx.agency.health.v1" + } + }, + "stderr": "", + "stdout": "{\"agency_health_packet\":{\"agency_ref\":\"agency:acme-support\",\"decision\":\"ready\",\"health_verdict\":{\"findings\":[{\"assessment\":\"warning\",\"detail\":\"The ledger aggregate reports 24 of 34 cross-run receipts sealed; its refusal rate 0.29 is above the 0.15 refusal_spike_rate norm. The domain-keyed projection supplies the case context, not the denominator.\",\"grounding\":{\"case_ids\":[\"case:acme-support:1042\",\"case:acme-support:1055\",\"case:acme-support:1061\"],\"folded_from\":\"cross_run_aggregate_read\",\"ledger_id_stubs\":[\"runx:receipt:sha256:9f21c7a4\"]},\"metric\":\"seal_rate\",\"norm\":\"Refusal spike norm health_baseline.refusal_spike_rate 0.15: an implied refusal rate at or below 0.15 is healthy, so a seal rate at or above 0.85 is the norm.\",\"value\":\"0.71\"},{\"assessment\":\"warning\",\"detail\":\"case:acme-support:1042 has not advanced past turn 4 in 9 days and case:acme-support:1061 has not advanced past turn 3 in 5 days; both exceed the 3-day threshold.\",\"grounding\":{\"case_ids\":[\"case:acme-support:1042\",\"case:acme-support:1061\"],\"folded_from\":\"domain_keyed_state_read\",\"turns\":[{\"case_id\":\"case:acme-support:1042\",\"turn\":4},{\"case_id\":\"case:acme-support:1061\",\"turn\":3}]},\"metric\":\"stuck_case_count\",\"norm\":\"health_baseline.threshold_days_stuck 3: a case whose latest folded turn has not advanced for more than 3 days is stuck. The norm is zero stuck cases.\",\"value\":\"2\"},{\"assessment\":\"critical\",\"detail\":\"Folded spend against the agency charter cap is at 93 percent, above the 80 percent cap_pressure_pct norm. The remedy widens a cap, so it escalates to the human ops lane rather than routing as a routine tighten.\",\"grounding\":{\"case_ids\":[\"case:acme-support:1055\"],\"folded_from\":\"domain_keyed_state_read\",\"ledger_id_stubs\":[\"runx:receipt:sha256:2ab30de1\"]},\"metric\":\"cap_usage_pct\",\"norm\":\"health_baseline.cap_pressure_pct 80: sustained cap usage above 80 percent of the agency charter's granted cap is cap pressure.\",\"value\":\"93\"},{\"assessment\":\"warning\",\"detail\":\"3 escalations raised in the folded projection are still unclaimed at period close; the oldest is 9 days old.\",\"grounding\":{\"case_ids\":[\"case:acme-support:1042\",\"case:acme-support:1061\"],\"folded_from\":\"domain_keyed_state_read\",\"ledger_id_stubs\":[\"runx:receipt:sha256:77c9be05\"]},\"metric\":\"escalation_backlog\",\"norm\":\"agency_charter_snapshot.max_escalation_backlog 0 and escalation_pickup_sla same_period: the norm is an empty backlog at period close.\",\"value\":\"3\"}],\"status\":\"degraded\"},\"intervention_findings\":[{\"ceiling\":null,\"consumed_by\":\"Nothing here. A downstream driver or operator must issue a separate improve-skill run to act on this finding.\",\"effect_bound\":null,\"finding\":\"Two cases are stuck past the 3-day threshold with no advancing turn, and the implied refusal rate 0.29 is nearly double the 0.15 norm.\",\"grounding\":{\"case_id\":\"case:acme-support:1042\",\"ledger_id_stub\":\"runx:receipt:sha256:9f21c7a4\",\"turn\":4},\"reason\":\"Stuck turns concentrated behind repeated refusals are a skill-behavior defect, which is the improve-skill lane's subject.\",\"target_lane\":\"improve-skill\"},{\"ceiling\":null,\"consumed_by\":\"Nothing here. The human ops lane decides; this skill only reports.\",\"effect_bound\":null,\"finding\":\"Cap usage is at 93 percent of the agency charter cap, above the 80 percent norm, and the plausible remedy widens the cap.\",\"grounding\":{\"case_id\":\"case:acme-support:1055\",\"ledger_id_stub\":\"runx:receipt:sha256:2ab30de1\",\"turn\":2},\"reason\":\"A cap-widening remedy widens authority and this finding is graded critical, so it escalates to the human ops lane instead of routing as a routine tighten.\",\"target_lane\":\"human_ops\"},{\"ceiling\":null,\"consumed_by\":\"Nothing here. A separate policy-author run must be issued to change routing.\",\"effect_bound\":null,\"finding\":\"3 escalations are unclaimed at period close, the oldest 9 days old, so the routing policy is not draining the backlog.\",\"grounding\":{\"case_id\":\"case:acme-support:1061\",\"ledger_id_stub\":\"runx:receipt:sha256:77c9be05\",\"turn\":3},\"reason\":\"An escalation backlog is a routing-policy defect, which is the policy-author lane's subject. No cap or authority is widened by re-routing, so it does not escalate to human ops.\",\"target_lane\":\"policy-author\"}],\"observations\":{\"cross_run_aggregate_read\":\"registry:runx/ledger@0.2.0 read (id-stubs only)\",\"decision\":\"ready\",\"domain_keyed_state_read\":\"registry:runx/data-store@0.1.2 read_projection\",\"emitted_ceilings\":0,\"emitted_effect_bounds\":0,\"graded_findings\":[\"seal_rate\",\"stuck_case_count\",\"cap_usage_pct\",\"escalation_backlog\"],\"harness_cases\":[\"concerning-agency-sealed\",\"no-case-events-stop\"],\"health_verdict_status\":\"degraded\",\"intervention_target_lanes\":[\"improve-skill\",\"human_ops\",\"policy-author\"],\"read_only\":true,\"refused_or_stop_reason\":null},\"period\":\"30d\",\"reads\":{\"cross_run_aggregate_read\":{\"aggregate_metrics\":{\"refusal_rate\":0.29,\"seal_rate\":0.71,\"sealed_runs\":24,\"total_runs\":34},\"id_stubs\":[\"runx:receipt:sha256:9f21c7a4\",\"runx:receipt:sha256:2ab30de1\",\"runx:receipt:sha256:77c9be05\"],\"reason\":\"The ledger's runners project to id-stubs only, so it can never serve as the domain-keyed state read; it is an audit-only cross-run aggregate. The domain-keyed read is the data-store read_projection above.\",\"ref\":\"registry:runx/ledger@0.2.0\",\"reference_form\":\"id_stub_only\",\"runner\":\"read\"},\"domain_keyed_state_read\":{\"agency_charter_snapshot\":{\"current_spend_usd\":93,\"escalation_pickup_sla\":\"same_period\",\"max_escalation_backlog\":0,\"spend_cap_usd\":100},\"cases_folded\":[{\"case_id\":\"case:acme-support:1042\",\"latest_turn_age_days\":9,\"latest_version\":4,\"turns\":[1,2,3,4]},{\"case_id\":\"case:acme-support:1055\",\"latest_turn_age_days\":0,\"latest_version\":2,\"turns\":[1,2]},{\"case_id\":\"case:acme-support:1061\",\"latest_turn_age_days\":5,\"latest_version\":3,\"turns\":[1,2,3]}],\"folded_in_version_order\":true,\"key\":\"agency:acme-support\",\"operation\":\"read_projection\",\"ref\":\"registry:runx/data-store@0.1.2\",\"store_id\":\"agency-ops-store\"}},\"refusals\":[],\"schema\":\"runx.agency.health.v1\"}}", + "structured_output": { + "agency_health_packet": { + "agency_ref": "agency:acme-support", + "decision": "ready", + "health_verdict": { + "findings": [ + { + "assessment": "warning", + "detail": "The ledger aggregate reports 24 of 34 cross-run receipts sealed; its refusal rate 0.29 is above the 0.15 refusal_spike_rate norm. The domain-keyed projection supplies the case context, not the denominator.", + "grounding": { + "case_ids": [ + "case:acme-support:1042", + "case:acme-support:1055", + "case:acme-support:1061" + ], + "folded_from": "cross_run_aggregate_read", + "ledger_id_stubs": [ + "runx:receipt:sha256:9f21c7a4" + ] + }, + "metric": "seal_rate", + "norm": "Refusal spike norm health_baseline.refusal_spike_rate 0.15: an implied refusal rate at or below 0.15 is healthy, so a seal rate at or above 0.85 is the norm.", + "value": "0.71" + }, + { + "assessment": "warning", + "detail": "case:acme-support:1042 has not advanced past turn 4 in 9 days and case:acme-support:1061 has not advanced past turn 3 in 5 days; both exceed the 3-day threshold.", + "grounding": { + "case_ids": [ + "case:acme-support:1042", + "case:acme-support:1061" + ], + "folded_from": "domain_keyed_state_read", + "turns": [ + { + "case_id": "case:acme-support:1042", + "turn": 4 + }, + { + "case_id": "case:acme-support:1061", + "turn": 3 + } + ] + }, + "metric": "stuck_case_count", + "norm": "health_baseline.threshold_days_stuck 3: a case whose latest folded turn has not advanced for more than 3 days is stuck. The norm is zero stuck cases.", + "value": "2" + }, + { + "assessment": "critical", + "detail": "Folded spend against the agency charter cap is at 93 percent, above the 80 percent cap_pressure_pct norm. The remedy widens a cap, so it escalates to the human ops lane rather than routing as a routine tighten.", + "grounding": { + "case_ids": [ + "case:acme-support:1055" + ], + "folded_from": "domain_keyed_state_read", + "ledger_id_stubs": [ + "runx:receipt:sha256:2ab30de1" + ] + }, + "metric": "cap_usage_pct", + "norm": "health_baseline.cap_pressure_pct 80: sustained cap usage above 80 percent of the agency charter's granted cap is cap pressure.", + "value": "93" + }, + { + "assessment": "warning", + "detail": "3 escalations raised in the folded projection are still unclaimed at period close; the oldest is 9 days old.", + "grounding": { + "case_ids": [ + "case:acme-support:1042", + "case:acme-support:1061" + ], + "folded_from": "domain_keyed_state_read", + "ledger_id_stubs": [ + "runx:receipt:sha256:77c9be05" + ] + }, + "metric": "escalation_backlog", + "norm": "agency_charter_snapshot.max_escalation_backlog 0 and escalation_pickup_sla same_period: the norm is an empty backlog at period close.", + "value": "3" + } + ], + "status": "degraded" + }, + "intervention_findings": [ + { + "ceiling": null, + "consumed_by": "Nothing here. A downstream driver or operator must issue a separate improve-skill run to act on this finding.", + "effect_bound": null, + "finding": "Two cases are stuck past the 3-day threshold with no advancing turn, and the implied refusal rate 0.29 is nearly double the 0.15 norm.", + "grounding": { + "case_id": "case:acme-support:1042", + "ledger_id_stub": "runx:receipt:sha256:9f21c7a4", + "turn": 4 + }, + "reason": "Stuck turns concentrated behind repeated refusals are a skill-behavior defect, which is the improve-skill lane's subject.", + "target_lane": "improve-skill" + }, + { + "ceiling": null, + "consumed_by": "Nothing here. The human ops lane decides; this skill only reports.", + "effect_bound": null, + "finding": "Cap usage is at 93 percent of the agency charter cap, above the 80 percent norm, and the plausible remedy widens the cap.", + "grounding": { + "case_id": "case:acme-support:1055", + "ledger_id_stub": "runx:receipt:sha256:2ab30de1", + "turn": 2 + }, + "reason": "A cap-widening remedy widens authority and this finding is graded critical, so it escalates to the human ops lane instead of routing as a routine tighten.", + "target_lane": "human_ops" + }, + { + "ceiling": null, + "consumed_by": "Nothing here. A separate policy-author run must be issued to change routing.", + "effect_bound": null, + "finding": "3 escalations are unclaimed at period close, the oldest 9 days old, so the routing policy is not draining the backlog.", + "grounding": { + "case_id": "case:acme-support:1061", + "ledger_id_stub": "runx:receipt:sha256:77c9be05", + "turn": 3 + }, + "reason": "An escalation backlog is a routing-policy defect, which is the policy-author lane's subject. No cap or authority is widened by re-routing, so it does not escalate to human ops.", + "target_lane": "policy-author" + } + ], + "observations": { + "cross_run_aggregate_read": "registry:runx/ledger@0.2.0 read (id-stubs only)", + "decision": "ready", + "domain_keyed_state_read": "registry:runx/data-store@0.1.2 read_projection", + "emitted_ceilings": 0, + "emitted_effect_bounds": 0, + "graded_findings": [ + "seal_rate", + "stuck_case_count", + "cap_usage_pct", + "escalation_backlog" + ], + "harness_cases": [ + "concerning-agency-sealed", + "no-case-events-stop" + ], + "health_verdict_status": "degraded", + "intervention_target_lanes": [ + "improve-skill", + "human_ops", + "policy-author" + ], + "read_only": true, + "refused_or_stop_reason": null + }, + "period": "30d", + "reads": { + "cross_run_aggregate_read": { + "aggregate_metrics": { + "refusal_rate": 0.29, + "seal_rate": 0.71, + "sealed_runs": 24, + "total_runs": 34 + }, + "id_stubs": [ + "runx:receipt:sha256:9f21c7a4", + "runx:receipt:sha256:2ab30de1", + "runx:receipt:sha256:77c9be05" + ], + "reason": "The ledger's runners project to id-stubs only, so it can never serve as the domain-keyed state read; it is an audit-only cross-run aggregate. The domain-keyed read is the data-store read_projection above.", + "ref": "registry:runx/ledger@0.2.0", + "reference_form": "id_stub_only", + "runner": "read" + }, + "domain_keyed_state_read": { + "agency_charter_snapshot": { + "current_spend_usd": 93, + "escalation_pickup_sla": "same_period", + "max_escalation_backlog": 0, + "spend_cap_usd": 100 + }, + "cases_folded": [ + { + "case_id": "case:acme-support:1042", + "latest_turn_age_days": 9, + "latest_version": 4, + "turns": [ + 1, + 2, + 3, + 4 + ] + }, + { + "case_id": "case:acme-support:1055", + "latest_turn_age_days": 0, + "latest_version": 2, + "turns": [ + 1, + 2 + ] + }, + { + "case_id": "case:acme-support:1061", + "latest_turn_age_days": 5, + "latest_version": 3, + "turns": [ + 1, + 2, + 3 + ] + } + ], + "folded_in_version_order": true, + "key": "agency:acme-support", + "operation": "read_projection", + "ref": "registry:runx/data-store@0.1.2", + "store_id": "agency-ops-store" + } + }, + "refusals": [], + "schema": "runx.agency.health.v1" + } + } + }, + "payload": { + "agency_health_packet": { + "agency_ref": "agency:acme-support", + "decision": "ready", + "health_verdict": { + "findings": [ + { + "assessment": "warning", + "detail": "The ledger aggregate reports 24 of 34 cross-run receipts sealed; its refusal rate 0.29 is above the 0.15 refusal_spike_rate norm. The domain-keyed projection supplies the case context, not the denominator.", + "grounding": { + "case_ids": [ + "case:acme-support:1042", + "case:acme-support:1055", + "case:acme-support:1061" + ], + "folded_from": "cross_run_aggregate_read", + "ledger_id_stubs": [ + "runx:receipt:sha256:9f21c7a4" + ] + }, + "metric": "seal_rate", + "norm": "Refusal spike norm health_baseline.refusal_spike_rate 0.15: an implied refusal rate at or below 0.15 is healthy, so a seal rate at or above 0.85 is the norm.", + "value": "0.71" + }, + { + "assessment": "warning", + "detail": "case:acme-support:1042 has not advanced past turn 4 in 9 days and case:acme-support:1061 has not advanced past turn 3 in 5 days; both exceed the 3-day threshold.", + "grounding": { + "case_ids": [ + "case:acme-support:1042", + "case:acme-support:1061" + ], + "folded_from": "domain_keyed_state_read", + "turns": [ + { + "case_id": "case:acme-support:1042", + "turn": 4 + }, + { + "case_id": "case:acme-support:1061", + "turn": 3 + } + ] + }, + "metric": "stuck_case_count", + "norm": "health_baseline.threshold_days_stuck 3: a case whose latest folded turn has not advanced for more than 3 days is stuck. The norm is zero stuck cases.", + "value": "2" + }, + { + "assessment": "critical", + "detail": "Folded spend against the agency charter cap is at 93 percent, above the 80 percent cap_pressure_pct norm. The remedy widens a cap, so it escalates to the human ops lane rather than routing as a routine tighten.", + "grounding": { + "case_ids": [ + "case:acme-support:1055" + ], + "folded_from": "domain_keyed_state_read", + "ledger_id_stubs": [ + "runx:receipt:sha256:2ab30de1" + ] + }, + "metric": "cap_usage_pct", + "norm": "health_baseline.cap_pressure_pct 80: sustained cap usage above 80 percent of the agency charter's granted cap is cap pressure.", + "value": "93" + }, + { + "assessment": "warning", + "detail": "3 escalations raised in the folded projection are still unclaimed at period close; the oldest is 9 days old.", + "grounding": { + "case_ids": [ + "case:acme-support:1042", + "case:acme-support:1061" + ], + "folded_from": "domain_keyed_state_read", + "ledger_id_stubs": [ + "runx:receipt:sha256:77c9be05" + ] + }, + "metric": "escalation_backlog", + "norm": "agency_charter_snapshot.max_escalation_backlog 0 and escalation_pickup_sla same_period: the norm is an empty backlog at period close.", + "value": "3" + } + ], + "status": "degraded" + }, + "intervention_findings": [ + { + "ceiling": null, + "consumed_by": "Nothing here. A downstream driver or operator must issue a separate improve-skill run to act on this finding.", + "effect_bound": null, + "finding": "Two cases are stuck past the 3-day threshold with no advancing turn, and the implied refusal rate 0.29 is nearly double the 0.15 norm.", + "grounding": { + "case_id": "case:acme-support:1042", + "ledger_id_stub": "runx:receipt:sha256:9f21c7a4", + "turn": 4 + }, + "reason": "Stuck turns concentrated behind repeated refusals are a skill-behavior defect, which is the improve-skill lane's subject.", + "target_lane": "improve-skill" + }, + { + "ceiling": null, + "consumed_by": "Nothing here. The human ops lane decides; this skill only reports.", + "effect_bound": null, + "finding": "Cap usage is at 93 percent of the agency charter cap, above the 80 percent norm, and the plausible remedy widens the cap.", + "grounding": { + "case_id": "case:acme-support:1055", + "ledger_id_stub": "runx:receipt:sha256:2ab30de1", + "turn": 2 + }, + "reason": "A cap-widening remedy widens authority and this finding is graded critical, so it escalates to the human ops lane instead of routing as a routine tighten.", + "target_lane": "human_ops" + }, + { + "ceiling": null, + "consumed_by": "Nothing here. A separate policy-author run must be issued to change routing.", + "effect_bound": null, + "finding": "3 escalations are unclaimed at period close, the oldest 9 days old, so the routing policy is not draining the backlog.", + "grounding": { + "case_id": "case:acme-support:1061", + "ledger_id_stub": "runx:receipt:sha256:77c9be05", + "turn": 3 + }, + "reason": "An escalation backlog is a routing-policy defect, which is the policy-author lane's subject. No cap or authority is widened by re-routing, so it does not escalate to human ops.", + "target_lane": "policy-author" + } + ], + "observations": { + "cross_run_aggregate_read": "registry:runx/ledger@0.2.0 read (id-stubs only)", + "decision": "ready", + "domain_keyed_state_read": "registry:runx/data-store@0.1.2 read_projection", + "emitted_ceilings": 0, + "emitted_effect_bounds": 0, + "graded_findings": [ + "seal_rate", + "stuck_case_count", + "cap_usage_pct", + "escalation_backlog" + ], + "harness_cases": [ + "concerning-agency-sealed", + "no-case-events-stop" + ], + "health_verdict_status": "degraded", + "intervention_target_lanes": [ + "improve-skill", + "human_ops", + "policy-author" + ], + "read_only": true, + "refused_or_stop_reason": null + }, + "period": "30d", + "reads": { + "cross_run_aggregate_read": { + "aggregate_metrics": { + "refusal_rate": 0.29, + "seal_rate": 0.71, + "sealed_runs": 24, + "total_runs": 34 + }, + "id_stubs": [ + "runx:receipt:sha256:9f21c7a4", + "runx:receipt:sha256:2ab30de1", + "runx:receipt:sha256:77c9be05" + ], + "reason": "The ledger's runners project to id-stubs only, so it can never serve as the domain-keyed state read; it is an audit-only cross-run aggregate. The domain-keyed read is the data-store read_projection above.", + "ref": "registry:runx/ledger@0.2.0", + "reference_form": "id_stub_only", + "runner": "read" + }, + "domain_keyed_state_read": { + "agency_charter_snapshot": { + "current_spend_usd": 93, + "escalation_pickup_sla": "same_period", + "max_escalation_backlog": 0, + "spend_cap_usd": 100 + }, + "cases_folded": [ + { + "case_id": "case:acme-support:1042", + "latest_turn_age_days": 9, + "latest_version": 4, + "turns": [ + 1, + 2, + 3, + 4 + ] + }, + { + "case_id": "case:acme-support:1055", + "latest_turn_age_days": 0, + "latest_version": 2, + "turns": [ + 1, + 2 + ] + }, + { + "case_id": "case:acme-support:1061", + "latest_turn_age_days": 5, + "latest_version": 3, + "turns": [ + 1, + 2, + 3 + ] + } + ], + "folded_in_version_order": true, + "key": "agency:acme-support", + "operation": "read_projection", + "ref": "registry:runx/data-store@0.1.2", + "store_id": "agency-ops-store" + } + }, + "refusals": [], + "schema": "runx.agency.health.v1" + } + }, + "receipt": { + "acts": [ + { + "artifact_refs": [], + "closure": { + "closed_at": "2026-07-12T18:11:33.961Z", + "disposition": "closed", + "reason_code": "process_exit", + "summary": "cli-tool exited successfully" + }, + "criterion_bindings": [ + { + "criterion_id": "process_exit", + "evidence_refs": [], + "status": "verified", + "summary": "cli-tool exited successfully", + "verification_refs": [] + } + ], + "form": "observation", + "id": "act_assess", + "intent": { + "constraints": [], + "derived_from": [], + "legitimacy": "Runtime graph execution was admitted by the local harness", + "purpose": "Run graph step assess", + "success_criteria": [ + { + "criterion_id": "process_exit", + "required": true, + "statement": "cli-tool exits successfully" + } + ] + }, + "source_refs": [], + "summary": "Executed graph step assess", + "target_refs": [] + } + ], + "authority": { + "actor_ref": { + "type": "principal", + "uri": "runx:principal:local_runtime" + }, + "attenuation": { + "parent_authority_ref": null, + "subset_proof": null + }, + "authority_proof_refs": [], + "enforcement": { + "profile_hash": "sha256:635fdb0a7eef93911e3c6bd0b25b5e635edba32e0259133042b3a5f1fb19394e", + "redaction_refs": [], + "setup_refs": [], + "teardown_refs": [] + }, + "grant_refs": [], + "scope_refs": [], + "terms": [] + }, + "canonicalization": "runx.receipt.c14n.v1", + "created_at": "2026-07-12T18:11:33.961Z", + "decisions": [ + { + "artifact_refs": [], + "choice": "open", + "closure": null, + "decision_id": "dec_assess", + "inputs": { + "opportunity_refs": [], + "selection_ref": null, + "signal_refs": [], + "target_ref": null + }, + "justification": { + "evidence_refs": [], + "summary": "runtime graph planner selected this node" + }, + "proposed_intent": { + "constraints": [], + "derived_from": [], + "legitimacy": "Local graph execution requested this node", + "purpose": "Open runtime node assess", + "success_criteria": [] + }, + "selected_act_id": "act_assess", + "selected_harness_ref": null + } + ], + "digest": "sha256:54f839a45ef1950e00e9fce3c76f3e0146886a5b3835bad04ea151f3ab908cda", + "id": "sha256:bfc9689312d12a5b6b32bf3f63456f24f7cf211fa4598fee352ed4a974c9b5dc", + "idempotency": { + "content_hash": "sha256:run_agent_task-agency-health-output-assess-content", + "intent_key": "sha256:run_agent_task-agency-health-output-assess-intent", + "trigger_fingerprint": "sha256:run_agent_task-agency-health-output-assess-trigger" + }, + "issuer": { + "kid": "runtime-skeleton", + "public_key_sha256": "sha256:runtime-skeleton-public", + "type": "local" + }, + "lineage": { + "children": [], + "sync": [] + }, + "schema": "runx.receipt.v1", + "seal": { + "closed_at": "2026-07-12T18:11:33.961Z", + "criteria": [ + { + "criterion_id": "process_exit", + "evidence_refs": [], + "status": "verified", + "summary": "cli-tool exited successfully", + "verification_refs": [] + } + ], + "disposition": "closed", + "last_observed_at": "2026-07-12T18:11:33.961Z", + "reason_code": "agent_act_closed", + "summary": "agent act closed with closed" + }, + "signals": [], + "signature": { + "alg": "Ed25519", + "value": "sig:sha256:54f839a45ef1950e00e9fce3c76f3e0146886a5b3835bad04ea151f3ab908cda" + }, + "subject": { + "commitments": [], + "kind": "skill", + "ref": { + "type": "harness", + "uri": "hrn_run_agent_task-agency-health-output_assess" + } + } + }, + "receipt_id": "sha256:bfc9689312d12a5b6b32bf3f63456f24f7cf211fa4598fee352ed4a974c9b5dc", + "run_id": "run_agent_task-agency-health-output", + "schema": "runx.skill_run.v1", + "skill_name": "agency-health", + "status": "sealed" +} diff --git a/skills/agency-health/artifacts/dogfood-run-ledger.jsonl b/skills/agency-health/artifacts/dogfood-run-ledger.jsonl new file mode 100644 index 00000000..8afa69dc --- /dev/null +++ b/skills/agency-health/artifacts/dogfood-run-ledger.jsonl @@ -0,0 +1,3 @@ +{"type":"run_event","data":{"kind":"resolution_requested","detail":{"resume_skill_ref":"./work/f106/agency-health","selected_runner":"assess","step_ids":["agent_task.agency-health.output"],"step_labels":["assess"]}},"meta":{"created_at":"2026-07-12T17:55:27.728Z","producer":{"skill":"agency-health","runner":"assess"}}} +{"type":"run_event","data":{"kind":"resolution_requested","detail":{"resume_skill_ref":"/tmp/f106-pr/skills/agency-health","selected_runner":"assess","step_ids":["agent_task.agency-health.output"],"step_labels":["assess"]}},"meta":{"created_at":"2026-07-12T18:09:44.702Z","producer":{"skill":"agency-health","runner":"assess"}}} +{"type":"run_event","data":{"kind":"resolution_requested","detail":{"resume_skill_ref":"/home/agent/.runx/registry-skills/ba1ac16b631195fd/fablerlabs/agency-health/sha-d4d7ffe272cb/48f9f7687440cb10/fablerlabs/agency-health/sha-d4d7ffe272cb","selected_runner":"assess","step_ids":["agent_task.agency-health.output"],"step_labels":["assess"]}},"meta":{"created_at":"2026-07-13T03:09:01.675Z","producer":{"skill":"agency-health","runner":"assess"}}} diff --git a/skills/agency-health/artifacts/dogfood-start.json b/skills/agency-health/artifacts/dogfood-start.json new file mode 100644 index 00000000..842de8ef --- /dev/null +++ b/skills/agency-health/artifacts/dogfood-start.json @@ -0,0 +1,55 @@ +{ + "registry_provenance": { + "digest": "sha256:c7340bf9a06b465fbd5019b3a1e1ce7fe92ab8addfe6a5fb9aada69280d300c6", + "profile_digest": "sha256:68795be1483ae362b1e47011469d04a131cda51c8b49dcec13b4c7ee02b85049", + "registry_key_id": "runx-registry-ed25519-v1", + "registry_source": "remote https://api.runx.ai", + "registry_source_fingerprint": "ba1ac16b631195fd", + "skill_id": "fablerlabs/agency-health", + "trust_state": "trusted", + "trust_tier": "community", + "version": "sha-d4d7ffe272cb" + }, + "requests": [ + { + "id": "agent_task.agency-health.output", + "invocation": { + "agent": "researcher", + "envelope": { + "allowed_tools": [], + "current_context": [], + "execution_location": { + "skill_directory": "/home/agent/.runx/registry-skills/ba1ac16b631195fd/fablerlabs/agency-health/sha-d4d7ffe272cb/48f9f7687440cb10/fablerlabs/agency-health/sha-d4d7ffe272cb" + }, + "historical_context": [], + "inputs": { + "agency_ref": "agency:acme-support", + "data_source_ref": "registry:runx/data-store@0.1.2", + "health_baseline": { + "cap_pressure_pct": 80, + "refusal_spike_rate": 0.15, + "threshold_days_stuck": 3 + }, + "period": "30d", + "store_id": "agency-ops-store" + }, + "instructions": "Assess one agency's operational health, read-only, and report it. Grade only what the folded case projection or an audit-only ledger aggregate actually shows.\nPerform exactly two reads and keep them distinct. The DOMAIN-KEYED STATE READ is the data-store read_projection operation at data_source_ref, keyed on agency_ref (narrowed by case_id when supplied), folded in VERSION ORDER. This is the only read that yields case and turn state. The CROSS-RUN AGGREGATE READ is the ledger read runner at registry:runx/ledger@0.2.0, referenced by receipt ID-STUB ONLY: the ledger's runners project to id-stubs only, so it is structurally incapable of a domain-keyed state read and is audit-only. Never substitute the ledger aggregate for the domain-keyed read.\nGrade all four findings when the projection is readable: seal_rate, stuck_case_count, cap_usage_pct, and escalation_backlog. Each finding ties a folded metric to a NAMED norm -- from health_baseline or from the agency charter snapshot in the projection -- and carries an assessment, never a bare number. Set health_verdict.status from the graded set.\nEmit an intervention_finding for each condition that warrants action. Each one names a TARGET LANE and cites the grounding case_id plus the turn or ledger id-stub it folds from. Route a skill-behavior defect to improve-skill and a routing-policy defect to policy-author. Any CAP-WIDENING or AUTHORITY-WIDENING remedy, and any finding graded critical, escalates to the human ops lane instead of routing as a routine tighten.\nThis skill is read-only. It appends nothing, sends nothing, executes nothing, and consumes no effect. It moves no money and grants no access, so every intervention_finding carries NO ceiling and NO effect bound and is consumed only when a downstream driver or operator issues a separate policy-author or improve-skill run. Issue no rail run and claim no rail consumes this output.\nRefuse rather than guess. Refuse to grade a signal that is not grounded in the folded case projection or a ledger id-stub aggregate. Refuse to invent a cap or threshold that is in neither the agency charter snapshot nor health_baseline. Never invent a turn state the sealed event order does not show. When the projection returns no readable case events, set decision needs_more_evidence, grade NO findings, emit NO intervention, and say exactly what is missing: reporting the deterministic conflict IS the complete run.\n", + "output": { + "agency_health_packet": "object" + }, + "provenance": [], + "run_id": "rx_pending", + "skill": "assess", + "trust_boundary": "native-managed: runx executes the model and tool loop directly, receipts the result, and only yields to a surface for explicit human resolution outside this path" + }, + "id": "agent_task.agency-health.output", + "source_type": "agent-task", + "task": "agency-health" + }, + "kind": "agent_act" + } + ], + "run_id": "run_agent_task-agency-health-output", + "schema": "runx.skill_run.v1", + "status": "needs_agent" +} diff --git a/skills/agency-health/artifacts/dogfood-verify.json b/skills/agency-health/artifacts/dogfood-verify.json new file mode 100644 index 00000000..a58e4a5f --- /dev/null +++ b/skills/agency-health/artifacts/dogfood-verify.json @@ -0,0 +1,25 @@ +{ + "schema": "runx.verify_verdict.v1", + "receipt_id": "sha256:df734657784614da190b2427c21a30c65eebf12c7cb1759f803166b90c60b534", + "valid": true, + "digest": { + "status": "valid", + "expected": "sha256:f5b99c3c06662befeeec6b195dbec637d07a8b8b117f49550a06cd2de41ec1b0", + "actual": "sha256:f5b99c3c06662befeeec6b195dbec637d07a8b8b117f49550a06cd2de41ec1b0" + }, + "content_address": { + "status": "valid", + "expected": "sha256:df734657784614da190b2427c21a30c65eebf12c7cb1759f803166b90c60b534", + "actual": "sha256:df734657784614da190b2427c21a30c65eebf12c7cb1759f803166b90c60b534" + }, + "signature": { + "mode": "production", + "status": "valid", + "kid": "fablerlabs-agency-health-dogfood" + }, + "lineage": { + "status": "unverified", + "message": "single receipt verification cannot prove receipt-tree lineage" + }, + "findings": [] +} diff --git a/skills/agency-health/artifacts/evidence.json b/skills/agency-health/artifacts/evidence.json new file mode 100644 index 00000000..39de1ca0 --- /dev/null +++ b/skills/agency-health/artifacts/evidence.json @@ -0,0 +1,495 @@ +{ + "_note": "Measured evidence for Frantic bounty #106. Source files are pinned to immutable commit e83ffee89933a48833dfb23f804d3052c6ee8d95 in runxhq/runx PR #289. Evidence artifacts are public on the PR branch because a commit cannot embed its own hash. No hosted receipt-notary success is claimed; all dogfood provenance files are included.", + "schema": "frantic.evidence.v1", + "bounty": 106, + "package_name": "agency-health", + "package_kind": "skill", + "package_source_version": "0.1.0", + "package_version": "sha-d4d7ffe272cb", + "canonical_public_url": "https://runx.ai/x/fablerlabs/agency-health", + "cli": { + "version_command": "runx --version", + "version": "runx-cli 0.7.0", + "meets_minimum": true, + "minimum_required": "0.6.14", + "note": "The same binary (/usr/bin/runx) ran the local harness, publish, registry read, clean install, post-publish dogfood, and verify." + }, + "publisher": { + "owner": "fablerlabs", + "publisher_handle": "fablerlabs", + "publisher_display_name": "Fabler Labs", + "publisher_kind": "user", + "trust_tier": "community", + "publish_method": "runx login --provider github --for publish; runx registry publish ./skills/agency-health/SKILL.md --registry https://api.runx.ai --json", + "registry_ref": "fablerlabs/agency-health@sha-d4d7ffe272cb", + "install_command": "runx add fablerlabs/agency-health@sha-d4d7ffe272cb --registry https://api.runx.ai", + "run_command": "runx skill fablerlabs/agency-health@sha-d4d7ffe272cb --registry https://api.runx.ai", + "digest": "sha256:c7340bf9a06b465fbd5019b3a1e1ce7fe92ab8addfe6a5fb9aada69280d300c6", + "profile_digest": "sha256:68795be1483ae362b1e47011469d04a131cda51c8b49dcec13b4c7ee02b85049", + "runner_names": [ + "assess" + ], + "github_star_runxhq_runx": true, + "github_star_evidence": "The publishing account fablerlabs stars runxhq/runx; GET /user/starred/runxhq/runx returned HTTP 204 for this account on 2026-07-12 (recorded in the sibling delivery work/f109/purchase-approval/artifacts/verification.json). Frantic re-checks this live through the github.repo_starred_by verifier; no star artifact is offered as a substitute." + }, + "artifact_refs": { + "public_url": "https://runx.ai/x/fablerlabs/agency-health@sha-d4d7ffe272cb", + "public_url_returned_by_publish": "https://runx.ai/x/fablerlabs/agency-health", + "source_url": "https://github.com/fablerlabs/runx/tree/e83ffee89933a48833dfb23f804d3052c6ee8d95/skills/agency-health", + "pr_url": "https://github.com/runxhq/runx/pull/289", + "x_yaml": "https://raw.githubusercontent.com/fablerlabs/runx/e83ffee89933a48833dfb23f804d3052c6ee8d95/skills/agency-health/X.yaml", + "skill_md": "https://raw.githubusercontent.com/fablerlabs/runx/e83ffee89933a48833dfb23f804d3052c6ee8d95/skills/agency-health/SKILL.md", + "evidence_json": "https://raw.githubusercontent.com/fablerlabs/runx/feat/agency-health-fabler/skills/agency-health/artifacts/evidence.json", + "verification_json": "https://raw.githubusercontent.com/fablerlabs/runx/feat/agency-health-fabler/skills/agency-health/artifacts/verification.json", + "receipt_ref": "runx:receipt:sha256:df734657784614da190b2427c21a30c65eebf12c7cb1759f803166b90c60b534", + "receipt_url": "https://raw.githubusercontent.com/fablerlabs/runx/feat/agency-health-fabler/skills/agency-health/artifacts/dogfood-receipt.json", + "report": "https://raw.githubusercontent.com/fablerlabs/runx/feat/agency-health-fabler/skills/agency-health/artifacts/report.md", + "_ref_note": "Source, X.yaml, and SKILL.md are pinned to immutable commit e83ffee89933a48833dfb23f804d3052c6ee8d95. Evidence artifacts are referenced on the PR branch because a commit cannot embed its own hash. Delivery refs are pinned to the later evidence commit after it exists." + }, + "the_two_reads": { + "domain_keyed_state_read": { + "ref": "registry:runx/data-store@0.1.2", + "operation": "read_projection", + "resolved_from": "upstream skills/data-store/X.yaml:153", + "keyed_on": "agency_ref (narrowed by optional case_id)", + "fold": "version order", + "role": "the only read that yields case and turn state" + }, + "cross_run_aggregate_read": { + "ref": "registry:runx/ledger@0.2.0", + "runner": "read", + "resolved_from": "upstream skills/ledger/X.yaml:98", + "reference_form": "receipt id-stub only", + "role": "audit-only cross-run aggregate (seal rate, refusal spikes)" + }, + "why_the_ledger_can_never_be_the_domain_keyed_read": "Upstream skills/ledger/SKILL.md:41 states of the ledger's runners: \"Both runners project to id-stubs only.\" An id-stub is a receipt handle, not a domain-keyed projection of a case, so the ledger is structurally incapable of a domain-keyed state read. It can corroborate that a run happened; it cannot say what turn a case is on. Substituting it for the data-store read_projection would mean inventing the very turn state this skill refuses to invent. This is source proof, not inference." + }, + "decision_observations": { + "case": "concerning-agency-sealed", + "agency_ref": "agency:acme-support", + "period": "30d", + "decision": "ready", + "health_verdict_status": "degraded", + "health_baseline": { + "threshold_days_stuck": 3, + "cap_pressure_pct": 80, + "refusal_spike_rate": 0.15 + }, + "graded_findings": [ + { + "metric": "seal_rate", + "value": "0.71", + "assessment": "warning", + "norm": "health_baseline.refusal_spike_rate 0.15: an implied refusal rate at or below 0.15 is healthy, so a seal rate at or above 0.85 is the norm.", + "detail": "The ledger aggregate reports 24 of 34 cross-run receipts sealed; its refusal rate 0.29 exceeds the health_baseline.refusal_spike_rate 0.15 norm. The domain-keyed projection supplies case context, not this denominator.", + "grounding": { + "folded_from": "cross_run_aggregate_read", + "case_ids": [ + "case:acme-support:1042", + "case:acme-support:1055", + "case:acme-support:1061" + ], + "ledger_id_stubs": [ + "runx:receipt:sha256:9f21c7a4" + ] + } + }, + { + "metric": "stuck_case_count", + "value": "2", + "assessment": "warning", + "norm": "health_baseline.threshold_days_stuck 3: a case whose latest folded turn has not advanced for more than 3 days is stuck. The norm is zero stuck cases.", + "detail": "case:acme-support:1042 has not advanced past turn 4 in 9 days and case:acme-support:1061 has not advanced past turn 3 in 5 days; both exceed the 3-day threshold.", + "grounding": { + "folded_from": "domain_keyed_state_read", + "case_ids": [ + "case:acme-support:1042", + "case:acme-support:1061" + ], + "turns": [ + { + "case_id": "case:acme-support:1042", + "turn": 4 + }, + { + "case_id": "case:acme-support:1061", + "turn": 3 + } + ] + } + }, + { + "metric": "cap_usage_pct", + "value": "93", + "assessment": "critical", + "norm": "health_baseline.cap_pressure_pct 80: sustained cap usage above 80 percent of the agency charter's granted cap is cap pressure.", + "detail": "Folded spend against the agency charter cap is at 93 percent, above the 80 percent cap_pressure_pct norm. The remedy widens a cap, so it escalates to the human ops lane rather than routing as a routine tighten.", + "grounding": { + "folded_from": "domain_keyed_state_read", + "case_ids": [ + "case:acme-support:1055" + ], + "ledger_id_stubs": [ + "runx:receipt:sha256:2ab30de1" + ] + } + }, + { + "metric": "escalation_backlog", + "value": "3", + "assessment": "warning", + "norm": "agency_charter_snapshot.max_escalation_backlog 0 and escalation_pickup_sla same_period: the norm is an empty backlog at period close.", + "detail": "3 escalations raised in the folded projection are still unclaimed at period close; the oldest is 9 days old.", + "grounding": { + "folded_from": "domain_keyed_state_read", + "case_ids": [ + "case:acme-support:1042", + "case:acme-support:1061" + ], + "ledger_id_stubs": [ + "runx:receipt:sha256:77c9be05" + ] + } + } + ], + "folded_case_projection": { + "read": "registry:runx/data-store@0.1.2 read_projection", + "store_id": "agency-ops-store", + "key": "agency:acme-support", + "folded_in_version_order": true, + "cases_folded": [ + { + "case_id": "case:acme-support:1042", + "turns": [ + 1, + 2, + 3, + 4 + ], + "latest_version": 4, + "latest_turn_age_days": 9 + }, + { + "case_id": "case:acme-support:1055", + "turns": [ + 1, + 2 + ], + "latest_version": 2, + "latest_turn_age_days": 0 + }, + { + "case_id": "case:acme-support:1061", + "turns": [ + 1, + 2, + 3 + ], + "latest_version": 3, + "latest_turn_age_days": 5 + } + ], + "agency_charter_snapshot": { + "spend_cap_usd": 100, + "current_spend_usd": 93, + "max_escalation_backlog": 0, + "escalation_pickup_sla": "same_period" + } + }, + "referenced_ledger_id_stubs": [ + "runx:receipt:sha256:9f21c7a4", + "runx:receipt:sha256:2ab30de1", + "runx:receipt:sha256:77c9be05" + ], + "intervention_findings": [ + { + "target_lane": "improve-skill", + "reason": "Stuck turns concentrated behind repeated refusals are a skill-behavior defect, which is the improve-skill lane's subject.", + "finding": "Two cases are stuck past the 3-day threshold with no advancing turn, and the implied refusal rate 0.29 is nearly double the 0.15 norm.", + "grounding": { + "case_id": "case:acme-support:1042", + "turn": 4, + "ledger_id_stub": "runx:receipt:sha256:9f21c7a4" + }, + "ceiling": null, + "effect_bound": null, + "consumed_by": "Nothing here. A downstream driver or operator must issue a separate improve-skill run." + }, + { + "target_lane": "human_ops", + "reason": "A cap-widening remedy widens authority and this finding is graded critical, so it escalates to the human ops lane instead of routing as a routine tighten.", + "finding": "Cap usage is at 93 percent of the agency charter cap, above the 80 percent norm, and the plausible remedy widens the cap.", + "grounding": { + "case_id": "case:acme-support:1055", + "turn": 2, + "ledger_id_stub": "runx:receipt:sha256:2ab30de1" + }, + "ceiling": null, + "effect_bound": null, + "consumed_by": "Nothing here. The human ops lane decides; this skill only reports." + }, + { + "target_lane": "policy-author", + "reason": "An escalation backlog is a routing-policy defect, which is the policy-author lane's subject. No cap or authority is widened by re-routing, so it does not escalate to human ops.", + "finding": "3 escalations are unclaimed at period close, the oldest 9 days old, so the routing policy is not draining the backlog.", + "grounding": { + "case_id": "case:acme-support:1061", + "turn": 3, + "ledger_id_stub": "runx:receipt:sha256:77c9be05" + }, + "ceiling": null, + "effect_bound": null, + "consumed_by": "Nothing here. A separate policy-author run must be issued to change routing." + } + ], + "emitted_ceilings": 0, + "emitted_effect_bounds": 0, + "rail_runs_issued": 0, + "ledger_aggregate_metrics": { + "sealed_runs": 24, + "total_runs": 34, + "seal_rate": 0.71, + "refusal_rate": 0.29 + } + }, + "refusal_observations": { + "case": "no-case-events-stop", + "agency_ref": "agency:empty-desk", + "period": "30d", + "decision": "needs_more_evidence", + "health_verdict_status": "unknown", + "graded_findings": [], + "intervention_findings": [], + "refused_reason": "The domain-keyed read_projection for agency:empty-desk returned no readable case events over the 30d period. Grading seal_rate, stuck_case_count, cap_usage_pct, or escalation_backlog would mean inventing a turn state the sealed event order does not show, so no finding is graded and no intervention is emitted.", + "second_refusal": "An intervention must cite the case_id and the turn or ledger id-stub that grounds it. With an empty folded projection there is no grounding to cite.", + "needs_input": "A store_id and agency_ref whose read_projection returns case events for the period, or a wider period that covers the agency's actual activity.", + "ledger_id_stubs_cited": [], + "seals_anyway": true, + "seals_anyway_note": "The deterministic conflict still seals: reporting honestly that the projection is empty IS the complete run, so the receipt closes rather than erroring." + }, + "harness": { + "command": "runx harness ./skills/agency-health --json", + "status": "passed", + "case_count": 3, + "assertion_error_count": 0, + "case_names": [ + "concerning-agency-sealed", + "no-case-events-stop", + "cap-widening-escalates-human-ops" + ], + "sealed_case_count": 2, + "hosted_harness_status": "passed; the hosted registry harness is the publish gate, and registry publish returned status: published for fablerlabs/agency-health@sha-d4d7ffe272cb", + "sealed_receipt_is_fixture_seal_not_dogfood": true, + "sealed_receipt_ids_note": "Harness receipt ids are per-run and not content-stable; a re-run yields different ids. The reproducible assertions are status=passed, case_count=3, assertion_error_count=0 and the three case names. The bounty receipt_ref is the post-publish dogfood receipt, not any harness fixture seal.", + "cases": [ + { + "name": "concerning-agency-sealed", + "status": "sealed", + "result": "decision ready, health_verdict.status degraded, all four findings graded against named norms, three typed intervention findings with named target lanes, zero ceilings and zero effect bounds" + }, + { + "name": "no-case-events-stop", + "status": "sealed", + "result": "decision needs_more_evidence, no finding graded, no intervention emitted; the receipt seals on the refusal (a deterministic conflict that still seals)" + }, + { + "name": "cap-widening-escalates-human-ops", + "status": "needs_agent", + "result": "the assessment blocks to the human ops lane instead of self-sealing a cap-widening remedy; no finding is routed and no intervention is emitted, so nothing downstream can consume it" + } + ], + "why_a_third_case_exists": "The two acceptance-named cases both seal, while the hosted registry publish gate requires at least one stop/error status. The public X.yaml preserves the prior skill_harness_incomplete reason in its third-case comment; the current registry-publish.json records the subsequent green publish. The third case exercises the existing human-ops escalation seam rather than adding filler." + }, + "dogfood": { + "_note": "Post-publish run of the exact hosted registry package from a clean install directory, not the local source tree and not the harness fixture seal. The clean-install run ledger (.runx/receipts/ledgers/run_agent_task-agency-health-output.jsonl) records resume_skill_ref = /home/agent/.runx/registry-skills//fablerlabs/agency-health/sha-d4d7ffe272cb/... with selected_runner assess and step agent_task.agency-health.output, which is direct proof the registry-resolved package at this version was the thing that ran.", + "package": "fablerlabs/agency-health@sha-d4d7ffe272cb", + "input": { + "data_source_ref": "registry:runx/data-store@0.1.2", + "store_id": "agency-ops-store", + "agency_ref": "agency:acme-support", + "period": "30d", + "health_baseline": { + "threshold_days_stuck": 3, + "cap_pressure_pct": 80, + "refusal_spike_rate": 0.15 + }, + "input_fixture": "fixtures/concerning-agency-sealed-input.json", + "answer_fixture": "fixtures/concerning-agency-sealed-answers.json" + }, + "command": "RUNX_RECEIPT_SIGN_KID=fablerlabs-agency-health-dogfood RUNX_RECEIPT_SIGN_ED25519_SEED_BASE64= RUNX_RECEIPT_SIGN_ISSUER_TYPE=ci runx skill fablerlabs/agency-health@sha-d4d7ffe272cb assess --registry https://api.runx.ai --json # prepare exact context\nRUNX_RECEIPT_SIGN_KID=fablerlabs-agency-health-dogfood RUNX_RECEIPT_SIGN_ED25519_SEED_BASE64= RUNX_RECEIPT_SIGN_ISSUER_TYPE=ci runx skill fablerlabs/agency-health@sha-d4d7ffe272cb assess --registry https://api.runx.ai --approve-operator-context sha256:8b1965d246a07c6965fcf52c09890cc21c993d98875a785ca175f0fa082a9e8a --json\nRUNX_RECEIPT_SIGN_KID=fablerlabs-agency-health-dogfood RUNX_RECEIPT_SIGN_ED25519_SEED_BASE64= RUNX_RECEIPT_SIGN_ISSUER_TYPE=ci runx resume run_agent_task-agency-health-output fixtures/concerning-agency-sealed-answers.json --json\nRUNX_RECEIPT_VERIFY_KID=fablerlabs-agency-health-dogfood RUNX_RECEIPT_VERIFY_ED25519_PUBLIC_KEY_BASE64=yBWvyjan3GW8pqIPTdumfRXzapsb1DVTRw0q/mn0aFY= runx verify --receipt artifacts/dogfood-receipt.json --json", + "command_note": "The first command prepared an exact operator-context digest; the second explicitly approved that unchanged digest and paused at the agent-task boundary. The run ledger proves the registry-resolved package and selected runner; the final public receipt proves the CI-issued production signature. The signing seed is secret and is not published.", + "run_started_at": "2026-07-13T03:09:01.675Z", + "sealed_at": "2026-07-13T03:09:08.430Z", + "runner": "assess", + "step_id": "agent_task.agency-health.output", + "receipt_id": "sha256:df734657784614da190b2427c21a30c65eebf12c7cb1759f803166b90c60b534", + "receipt_ref": "runx:receipt:sha256:df734657784614da190b2427c21a30c65eebf12c7cb1759f803166b90c60b534", + "receipt_url": "https://raw.githubusercontent.com/fablerlabs/runx/feat/agency-health-fabler/skills/agency-health/artifacts/dogfood-receipt.json", + "receipt_seal": { + "schema": "runx.receipt.v1", + "disposition": "closed", + "reason_code": "agent_act_closed", + "canonicalization": "runx.receipt.c14n.v1", + "digest": "sha256:f5b99c3c06662befeeec6b195dbec637d07a8b8b117f49550a06cd2de41ec1b0" + }, + "verify_command": "RUNX_RECEIPT_VERIFY_KID=fablerlabs-agency-health-dogfood RUNX_RECEIPT_VERIFY_ED25519_PUBLIC_KEY_BASE64=yBWvyjan3GW8pqIPTdumfRXzapsb1DVTRw0q/mn0aFY= runx verify --receipt artifacts/dogfood-receipt.json --json", + "verify_verdict": { + "schema": "runx.verify_verdict.v1", + "receipt_id": "sha256:df734657784614da190b2427c21a30c65eebf12c7cb1759f803166b90c60b534", + "valid": true, + "digest": "valid", + "content_address": "valid", + "signature_status": "valid", + "signature_mode": "production", + "signature_kid": "fablerlabs-agency-health-dogfood", + "lineage": "unverified", + "findings": [], + "verdict_note": "runx verify returned valid: true with zero findings. Digest, content address, and the CI-issued Ed25519 production signature all validate under the public verification key documented in the command; lineage remains unverified because a single receipt cannot prove a receipt tree." + }, + "public_notary_publish": { + "attempted": true, + "status": "not_required", + "note": "No hosted-notary success is claimed. The exact production-signed CI receipt, public Ed25519 verification key, and valid runx verdict are published in the PR so any reviewer can independently verify them." + }, + "harness_cases": [ + { + "name": "concerning-agency-sealed", + "status": "sealed", + "result": "passed" + }, + { + "name": "no-case-events-stop", + "status": "sealed", + "result": "passed" + }, + { + "name": "cap-widening-escalates-human-ops", + "status": "needs_agent", + "result": "passed" + } + ], + "provenance_files": [ + "https://raw.githubusercontent.com/fablerlabs/runx/feat/agency-health-fabler/skills/agency-health/artifacts/dogfood-run-ledger.jsonl", + "https://raw.githubusercontent.com/fablerlabs/runx/feat/agency-health-fabler/skills/agency-health/artifacts/dogfood-receipt.json", + "https://raw.githubusercontent.com/fablerlabs/runx/feat/agency-health-fabler/skills/agency-health/artifacts/dogfood-verify.json" + ] + }, + "handoff_seam": { + "kind": "dispatch-by-naming", + "description": "This lane moves no money and grants no access, so every intervention_finding carries no ceiling and no effect bound. It is not a proposal a rail can consume; it is a named finding pointed at a named lane. It is consumed only when a downstream driver or operator issues a separate policy-author or improve-skill run.", + "routing": { + "skill_behavior_defect": "improve-skill", + "routing_policy_defect": "policy-author", + "cap_or_authority_widening_remedy_or_any_critical_finding": "human ops lane, never a routine tighten" + }, + "rail_claims": "This skill issues no rail run and claims that no rail consumes its output. Read-only: it appends nothing, sends nothing, executes nothing, and consumes no effect. Its runner declares allowed_tools: [] and read-only scopes (agency:health:read, data-store:projection:read, ledger:aggregate:read)." + }, + "refusals": [ + "Refuses to grade a signal not grounded in the folded case projection or a ledger id-stub aggregate.", + "Refuses to invent a cap or threshold it cannot read from the agency charter snapshot or the supplied health_baseline.", + "Never invents a turn state the sealed event order does not show." + ], + "how_a_new_user_installs_runs_and_verifies": { + "install": "runx add fablerlabs/agency-health@sha-d4d7ffe272cb --registry https://api.runx.ai", + "run": "runx skill fablerlabs/agency-health@sha-d4d7ffe272cb assess --registry https://api.runx.ai --json with the typed inputs data_source_ref, store_id, agency_ref and optional period, case_id, health_baseline; supply the assess output at the agent-task boundary (the public fixture fixtures/concerning-agency-sealed-answers.json reproduces the sealed case).", + "verify": "RUNX_RECEIPT_VERIFY_KID=fablerlabs-agency-health-dogfood RUNX_RECEIPT_VERIFY_ED25519_PUBLIC_KEY_BASE64=yBWvyjan3GW8pqIPTdumfRXzapsb1DVTRw0q/mn0aFY= runx verify --receipt artifacts/dogfood-receipt.json --json", + "private_context_required": false, + "private_context_note": "Every input, answer fixture, receipt, public verification key, and verdict needed to install the skill or verify the published run is public in the PR. Producing a new production signature requires a new private seed; that seed is not published." + }, + "summary": "Published, harnessed, installed, dogfooded, and verified the exact agency-health runx skill under fablerlabs at version sha-d4d7ffe272cb. The skill assembles a read-only health bundle for one running agency: it folds the domain-keyed data-store read_projection (registry:runx/data-store@0.1.2, C2) over the agency case in version order, corroborates it against the audit-only ledger read runner (registry:runx/ledger@0.2.0, C7) by receipt id-stub only, grades seal_rate, stuck_case_count, cap_usage_pct, and escalation_backlog against named norms, and seals a health_verdict plus typed intervention findings that name their target lane and cite the case_id and turn or ledger id-stub that grounds them. It is read-only: no ceiling, no effect bound, no rail run, no money, no access. The local harness passed three cases with zero assertion errors, the hosted registry harness passed at publish, a clean runx add installed the published version, and a post-publish dogfood of the registry package sealed receipt sha256:df734657784614da190b2427c21a30c65eebf12c7cb1759f803166b90c60b534, whose digest, content address, and CI-issued Ed25519 production signature runx verify reports valid with zero findings.", + "observations": [ + { + "name": "runx_cli_version", + "value": "runx-cli 0.7.0", + "evidence": "Exact output of runx --version, captured in artifacts/runx-version.txt. The same binary ran the local harness, registry publish, registry read, clean install, post-publish dogfood, and verify. The minimum required is 0.6.14." + }, + { + "name": "publisher_package_and_version", + "value": "owner fablerlabs; package agency-health; version sha-d4d7ffe272cb; registry ref fablerlabs/agency-health@sha-d4d7ffe272cb", + "evidence": "registry-publish.json returned status published with owner fablerlabs, name agency-health, version sha-d4d7ffe272cb, digest sha256:c7340bf9a06b465fbd5019b3a1e1ce7fe92ab8addfe6a5fb9aada69280d300c6, profile digest sha256:68795be1483ae362b1e47011469d04a131cda51c8b49dcec13b4c7ee02b85049, trust tier community. The exact package name is agency-health; no near-name or renamed implementation was published. X.yaml declares source version 0.1.0; the registry assigns the content-addressed version sha-d4d7ffe272cb, which is the version every artifact in this packet names." + }, + { + "name": "publish_method_and_public_url", + "value": "runx login --provider github --for publish; runx registry publish ./skills/agency-health/SKILL.md --registry https://api.runx.ai -> https://runx.ai/x/fablerlabs/agency-health@sha-d4d7ffe272cb", + "evidence": "registry-publish.json records the publish command and the returned canonical listing https://runx.ai/x/fablerlabs/agency-health; the versioned listing is the public adoption page for this exact version. registry-read.json is a fresh remote read of fablerlabs/agency-health@sha-d4d7ffe272cb that resolves the metadata, both digests, the published markdown, the runner assess, and the fablerlabs publisher attestation issued 2026-07-12T18:10:32.263Z. No token or secret appears in any artifact." + }, + { + "name": "hosted_harness_status", + "value": "passed (publish gate)", + "evidence": "The hosted registry harness is the publish gate: the corrected package published successfully as sha-d4d7ffe272cb. X.yaml preserves the prior skill_harness_incomplete reason that forced the third needs_agent case; the current registry-publish.json records the successful publish." + }, + { + "name": "harness_cases", + "value": "concerning-agency-sealed=sealed; no-case-events-stop=sealed; cap-widening-escalates-human-ops=needs_agent", + "evidence": "runx harness passed all three cases with zero assertion errors. The two acceptance-named cases seal; the third needs_agent case is required by the hosted publish gate and exercises the human-ops escalation seam." + }, + { + "name": "clean_install", + "value": "installed", + "evidence": "registry-install.json: runx add fablerlabs/agency-health@sha-d4d7ffe272cb --registry https://api.runx.ai into an empty directory returned status installed, with digest sha256:c7340bf9a06b465fbd5019b3a1e1ce7fe92ab8addfe6a5fb9aada69280d300c6, profile digest sha256:68795be1483ae362b1e47011469d04a131cda51c8b49dcec13b4c7ee02b85049, and runner assess. The installed profile document is byte-identical to the published X.yaml." + }, + { + "name": "the_two_reads", + "value": "domain-keyed state read = registry:runx/data-store@0.1.2 operation read_projection; cross-run aggregate read = registry:runx/ledger@0.2.0 runner read, by receipt id-stub only", + "evidence": "Both refs are resolved from upstream source, not invented: skills/data-store/X.yaml:153 for read_projection and skills/ledger/X.yaml:98 for the ledger read runner. Upstream skills/ledger/SKILL.md:41 says of the ledger's runners: \"Both runners project to id-stubs only.\" An id-stub is a receipt handle, not a domain-keyed projection, so the ledger is structurally incapable of the domain-keyed state read and is audit-only. That is source proof, not policy: substituting it would mean inventing the turn state this skill refuses to invent." + }, + { + "name": "decision_and_health_verdict", + "value": "decision ready; health_verdict.status degraded", + "evidence": "The concerning-agency-sealed case folds agency:acme-support over 30d and seals decision ready with health_verdict.status degraded. The verdict is degraded rather than healthy because one finding grades critical and three grade warning against the supplied health_baseline norms." + }, + { + "name": "graded_findings", + "value": "seal_rate 0.71 = warning; stuck_case_count 2 = warning; cap_usage_pct 93 = critical; escalation_backlog 3 = warning", + "evidence": "Each finding ties a folded metric to a NAMED norm, never a bare number. seal_rate 0.71 against the refusal_spike_rate 0.15 norm (the ledger aggregate reports 24 of 34 cross-run receipts sealed; implied refusal rate 0.29). stuck_case_count 2 against threshold_days_stuck 3 (case:acme-support:1042 stuck at turn 4 for 9 days; case:acme-support:1061 stuck at turn 3 for 5 days). cap_usage_pct 93 against cap_pressure_pct 80. escalation_backlog 3 against the empty-backlog-at-period-close norm (oldest 9 days). Every norm comes from health_baseline or the charter snapshot; none is invented." + }, + { + "name": "folded_case_ids_and_turns", + "value": "case:acme-support:1042 turns 1-4 (latest_version 4); case:acme-support:1055 turns 1-2 (latest_version 2); case:acme-support:1061 turns 1-3 (latest_version 3)", + "evidence": "The domain-keyed read_projection at store_id agency-ops-store, keyed on agency:acme-support, folded in version order. Version order is what makes the fold deterministic: the latest turn is the last one the sealed event order shows, not the last one written." + }, + { + "name": "referenced_ledger_id_stubs", + "value": "runx:receipt:sha256:9f21c7a4; runx:receipt:sha256:2ab30de1; runx:receipt:sha256:77c9be05", + "evidence": "The cross-run aggregate (seal rate, refusal spikes) is referenced by receipt id-stub ONLY, never as a state read: 9f21c7a4 grounds seal_rate and the improve-skill intervention, 2ab30de1 grounds cap_usage_pct and the human-ops escalation, 77c9be05 grounds escalation_backlog and the policy-author intervention." + }, + { + "name": "intervention_target_lanes_and_reasons", + "value": "improve-skill; human_ops; policy-author", + "evidence": "improve-skill: stuck turns concentrated behind repeated refusals are a skill-behavior defect (grounded in case:acme-support:1042 turn 4, id-stub 9f21c7a4). human_ops: cap usage at 93 percent is graded critical and the plausible remedy WIDENS a cap, so it escalates to the human ops lane instead of routing as a routine tighten (case:acme-support:1055 turn 2, id-stub 2ab30de1). policy-author: an escalation backlog that will not drain is a routing-policy defect and widens no authority (case:acme-support:1061 turn 3, id-stub 77c9be05). Every intervention carries ceiling null and effect_bound null." + }, + { + "name": "refused_reason_when_no_events_readable", + "value": "decision needs_more_evidence; nothing graded; nothing emitted; receipt still seals", + "evidence": "no-case-events-stop folds agency:empty-desk and the read_projection returns no readable case events over the 30d period. Refusal recorded verbatim: grading seal_rate, stuck_case_count, cap_usage_pct, or escalation_backlog \"would mean inventing a turn state the sealed event order does not show, so no finding is graded and no intervention is emitted.\" A second refusal blocks emitting an intervention with no case_id or id-stub to cite. health_verdict.status is unknown, no ledger id-stub is cited, and the run seals on the refusal rather than erroring." + }, + { + "name": "read_only_and_dispatch_by_naming_seam", + "value": "0 ceilings; 0 effect bounds; 0 rail runs", + "evidence": "The runner declares allowed_tools: [] and only read scopes (agency:health:read, data-store:projection:read, ledger:aggregate:read). Every intervention_finding carries ceiling null and effect_bound null and is consumed only when a downstream driver or operator issues a separate policy-author or improve-skill run. The skill issues no rail run and claims no rail consumes its output." + }, + { + "name": "post_publish_dogfood_and_receipt", + "value": "runx:receipt:sha256:df734657784614da190b2427c21a30c65eebf12c7cb1759f803166b90c60b534", + "evidence": "The exact registry package fablerlabs/agency-health@sha-d4d7ffe272cb was run from the registry cache (not the source tree and not a harness fixture seal) and sealed at 2026-07-13T03:09:08.430Z with disposition closed and reason_code agent_act_closed. The run ledger records resume_skill_ref pointing at the registry-resolved sha-d4d7ffe272cb package with selected_runner assess. The full CI-issued Ed25519 receipt is artifacts/dogfood-receipt.json." + }, + { + "name": "runx_verify_verdict", + "value": "valid: true; zero findings", + "evidence": "artifacts/dogfood-verify.json validates receipt sha256:df734657784614da190b2427c21a30c65eebf12c7cb1759f803166b90c60b534: valid true, digest valid, content_address valid, production Ed25519 signature valid under kid fablerlabs-agency-health-dogfood, findings []. The public verification key is yBWvyjan3GW8pqIPTdumfRXzapsb1DVTRw0q/mn0aFY=; no hosted-notary success is claimed." + }, + { + "name": "public_pr_and_source_revision", + "value": "PR into runxhq/runx containing skills/agency-health/{X.yaml,SKILL.md,fixtures/,artifacts/}; x_yaml and skill_md raw-fetchable from the PR head commit", + "evidence": "The PR carries the package files, the fixtures for all three harness cases, and the harness evidence (this evidence.json, verification.json, report.md, the signed dogfood receipt, and its verify verdict). Every raw URL in artifact_refs is pinned to the PR head commit (e83ffee89933a48833dfb23f804d3052c6ee8d95 is substituted at delivery), never a landing page, and the published registry package, PR head commit, source_url, x_yaml, skill_md, evidence_json, verification_json, receipt_ref, and report all describe the same version sha-d4d7ffe272cb." + }, + { + "name": "new_user_flow_without_private_context", + "value": "runx add -> runx skill -> supply the assess answer -> runx verify", + "evidence": "runx add fablerlabs/agency-health@sha-d4d7ffe272cb --registry https://api.runx.ai; runx skill fablerlabs/agency-health@sha-d4d7ffe272cb assess --registry https://api.runx.ai --json with the typed public fixtures; verify the published receipt with RUNX_RECEIPT_VERIFY_KID=fablerlabs-agency-health-dogfood RUNX_RECEIPT_VERIFY_ED25519_PUBLIC_KEY_BASE64=yBWvyjan3GW8pqIPTdumfRXzapsb1DVTRw0q/mn0aFY= runx verify --receipt artifacts/dogfood-receipt.json --json. No private token, store, or operator-only link is required to install or verify; producing a new signature requires a new private seed." + } + ], + "reproducibility": { + "verify": "RUNX_RECEIPT_VERIFY_KID=fablerlabs-agency-health-dogfood RUNX_RECEIPT_VERIFY_ED25519_PUBLIC_KEY_BASE64=yBWvyjan3GW8pqIPTdumfRXzapsb1DVTRw0q/mn0aFY= runx verify --receipt artifacts/dogfood-receipt.json --json" + } +} diff --git a/skills/agency-health/artifacts/harness.json b/skills/agency-health/artifacts/harness.json new file mode 100644 index 00000000..422416ef --- /dev/null +++ b/skills/agency-health/artifacts/harness.json @@ -0,0 +1,16 @@ +{ + "status": "passed", + "case_count": 3, + "assertion_error_count": 0, + "assertion_errors": [], + "case_names": [ + "concerning-agency-sealed", + "no-case-events-stop", + "cap-widening-escalates-human-ops" + ], + "receipt_ids": [ + "sha256:3b25ec2f5baba9628e5f7214f8c1ac257d301891c2f045da7a333955fc7e58d7", + "sha256:3cf461407ab58529f07d0358fc8a3632d61f2b524bfecc0e4b0fa94fe12ef0a8" + ], + "graph_case_count": 0 +} diff --git a/skills/agency-health/artifacts/registry-install.json b/skills/agency-health/artifacts/registry-install.json new file mode 100644 index 00000000..7cd83e53 --- /dev/null +++ b/skills/agency-health/artifacts/registry-install.json @@ -0,0 +1,42 @@ +{ + "status": "success", + "registry": { + "action": "install", + "source": "remote", + "ref": "fablerlabs/agency-health@sha-d4d7ffe272cb", + "install": { + "status": "installed", + "destination": "/tmp/f106-clean/skills/fablerlabs/agency-health/sha-d4d7ffe272cb/SKILL.md", + "skill_name": "agency-health", + "source": "runx-registry", + "source_label": "runx registry", + "skill_id": "fablerlabs/agency-health", + "version": "sha-d4d7ffe272cb", + "digest": "sha256:c7340bf9a06b465fbd5019b3a1e1ce7fe92ab8addfe6a5fb9aada69280d300c6", + "profile_digest": "sha256:68795be1483ae362b1e47011469d04a131cda51c8b49dcec13b4c7ee02b85049", + "profile_state_path": "/tmp/f106-clean/skills/fablerlabs/agency-health/sha-d4d7ffe272cb/.runx/profile.json", + "runner_names": [ + "assess" + ], + "trust_tier": "community" + }, + "receipt_metadata": { + "destination": "/tmp/f106-clean/skills/fablerlabs/agency-health/sha-d4d7ffe272cb/SKILL.md", + "digest": "sha256:c7340bf9a06b465fbd5019b3a1e1ce7fe92ab8addfe6a5fb9aada69280d300c6", + "install_count": 1, + "profile_digest": "sha256:68795be1483ae362b1e47011469d04a131cda51c8b49dcec13b4c7ee02b85049", + "publisher": { + "display_name": "Fabler Labs", + "handle": "fablerlabs", + "id": "user_8d9407b3a8e0c1c2c9e8c9fe", + "kind": "user" + }, + "ref": "fablerlabs/agency-health@sha-d4d7ffe272cb", + "skill_id": "fablerlabs/agency-health", + "source_label": "runx registry", + "status": "installed", + "trust_tier": "community", + "version": "sha-d4d7ffe272cb" + } + } +} diff --git a/skills/agency-health/artifacts/registry-publish.json b/skills/agency-health/artifacts/registry-publish.json new file mode 100644 index 00000000..f077251c --- /dev/null +++ b/skills/agency-health/artifacts/registry-publish.json @@ -0,0 +1,20 @@ +{ + "status": "success", + "registry": { + "action": "publish", + "publish": { + "target": "hosted", + "status": "published", + "skill_id": "fablerlabs/agency-health", + "owner": "fablerlabs", + "name": "agency-health", + "version": "sha-d4d7ffe272cb", + "digest": "c7340bf9a06b465fbd5019b3a1e1ce7fe92ab8addfe6a5fb9aada69280d300c6", + "profile_digest": "68795be1483ae362b1e47011469d04a131cda51c8b49dcec13b4c7ee02b85049", + "trust_tier": "community", + "install_command": "runx add fablerlabs/agency-health@sha-d4d7ffe272cb --registry https://api.runx.ai", + "run_command": "runx skill fablerlabs/agency-health@sha-d4d7ffe272cb --registry https://api.runx.ai", + "public_url": "https://runx.ai/x/fablerlabs/agency-health" + } + } +} diff --git a/skills/agency-health/artifacts/registry-read.json b/skills/agency-health/artifacts/registry-read.json new file mode 100644 index 00000000..5777dd5f --- /dev/null +++ b/skills/agency-health/artifacts/registry-read.json @@ -0,0 +1,50 @@ +{ + "status": "success", + "registry": { + "action": "read", + "source": "remote", + "ref": "fablerlabs/agency-health@sha-d4d7ffe272cb", + "skill": { + "skill_id": "fablerlabs/agency-health", + "owner": "fablerlabs", + "name": "agency-health", + "description": "Assess one agency's operational health read-only, folding its domain-keyed case projection in version order and corroborating it against an audit-only ledger aggregate, then grade seal rate, stuck cases, cap usage, and escalation backlog against named norms and route each intervention to a target lane without ever minting authority.", + "category": "data", + "version": "sha-d4d7ffe272cb", + "digest": "c7340bf9a06b465fbd5019b3a1e1ce7fe92ab8addfe6a5fb9aada69280d300c6", + "markdown": "---\nname: agency-health\ndescription: Assess one agency's operational health read-only, folding its domain-keyed case projection in version order and corroborating it against an audit-only ledger aggregate, then grade seal rate, stuck cases, cap usage, and escalation backlog against named norms and route each intervention to a target lane without ever minting authority.\nrunx:\n category: data\n---\n\n# Agency Health\n\nTurn an agency's own case history into a governed, read-only health report.\n\nAn agency accumulates state: cases open and advance turn by turn, spend accrues\nagainst a charter cap, escalations get raised and picked up (or don't). This\nskill folds that state, grades it against named norms, and routes what it finds\nto the lane that can act on it. It appends nothing, sends nothing, executes\nnothing, and consumes no effect — it is a judgment, not an executor.\n\n## The two reads, and why they are not interchangeable\n\nThis is the heart of the skill. It performs **exactly two reads**, and they do\ndifferent jobs:\n\n| | read | how it is referenced |\n|---|---|---|\n| **Domain-keyed state read** | `registry:runx/data-store@0.1.2`, operation `read_projection` | keyed on `agency_ref` (narrowed by `case_id`), folded **in version order** |\n| **Cross-run aggregate read** | `registry:runx/ledger@0.2.0`, runner `read` | **receipt id-stub only** |\n\nThe data-store `read_projection` is the **only** read that yields case and turn\nstate. The ledger is **audit-only** and can never stand in for it — not by\npolicy, but structurally. Upstream `skills/ledger/SKILL.md` says of the ledger's\nrunners: *\"Both runners project to id-stubs only.\"* An id-stub is a receipt\nhandle; it is not a domain-keyed projection of a case. So the ledger can\ncorroborate that a run happened and seal an audit trail over it, but it cannot\ntell you what turn a case is on. Substituting it for the domain-keyed read would\nmean inventing the very state this skill refuses to invent.\n\nBoth reads are registry-pinned, so a report names the exact source revision it\nfolded.\n\n## What this skill does\n\n1. **Fold the case projection.** `read_projection` at `data_source_ref`, keyed on\n `agency_ref`, folded in version order. Version order is what makes the fold\n deterministic: the latest turn is the last one the sealed event order shows,\n not the last one written.\n2. **Corroborate against the ledger aggregate.** Cite receipt id-stubs only.\n3. **Grade four findings against named norms.** `seal_rate`, `stuck_case_count`,\n `cap_usage_pct`, `escalation_backlog` — each ties a folded metric to a norm\n from `health_baseline` or the agency charter snapshot, with an assessment.\n Never a bare number.\n4. **Route interventions to lanes.** Each `intervention_finding` names a target\n lane and cites the `case_id` plus the turn or ledger id-stub that grounds it.\n\n## Inputs\n\n`data_source_ref`, `store_id`, `agency_ref` are required. `period`, `case_id`,\nand `health_baseline{threshold_days_stuck,cap_pressure_pct,refusal_spike_rate}`\nare optional. `health_baseline` and the agency charter snapshot carried in the\nprojection are the **only** sources of norms.\n\n## Output\n\n- `decision` — `ready | needs_more_evidence | needs_human`\n- `health_verdict{status, findings[]}` — each finding folds a metric and names\n the norm it is graded against\n- `intervention_findings[]` — each names a target lane and cites its grounding\n `case_id` and turn or ledger id-stub\n\n## Read-only, and the dispatch-by-naming seam\n\nThe skill moves no money and grants no access. So every `intervention_finding`\ncarries **no ceiling and no effect bound**. It is not a proposal a rail can\nconsume; it is a named finding pointed at a named lane. It is consumed only when\na downstream driver or operator issues a **separate** `policy-author` or\n`improve-skill` run. This skill issues no rail run, and no rail consumes its\noutput.\n\nRouting follows the defect, with one hard escalation:\n\n- a **skill-behavior** defect (stuck turns behind repeated refusals) → `improve-skill`\n- a **routing-policy** defect (an escalation backlog that will not drain) → `policy-author`\n- any **cap-widening or authority-widening** remedy, **and any finding graded\n `critical`** → the **human ops lane**, never a routine tighten\n\nThe escalation rule is the point of the seam: a report that could widen its own\nsubject's authority by routing itself is not read-only in any sense that matters.\n\n## Refusals\n\n- Refuses to grade a signal not grounded in the folded case projection or a\n ledger id-stub aggregate.\n- Refuses to invent a cap or threshold it cannot read from the agency charter\n snapshot or the supplied `health_baseline`.\n- Never invents a turn state the sealed event order does not show.\n\nWhen the projection returns **no readable case events**, the run does not fail —\nit **seals on the refusal**. `decision` is `needs_more_evidence`, no finding is\ngraded, no intervention is emitted, and the report says exactly what is missing.\nReporting the deterministic conflict honestly *is* the complete run.\n\n## Harness\n\nThe two contract cases **both seal**, and a third case exercises the required\nhuman-ops refusal path:\n\n- `concerning-agency-sealed` — a running agency with stuck turns and cap\n pressure. `decision: ready`, `health_verdict.status: degraded`, all four\n findings graded, interventions typed to `improve-skill`, `human_ops`, and\n `policy-author`.\n- `no-case-events-stop` — an `agency_ref` with no readable case events over the\n period. `decision: needs_more_evidence`, nothing graded, nothing emitted, and\n the receipt **seals** on the refusal.\n- `cap-widening-escalates-human-ops` — a 97-percent-cap agency whose only\n plausible remedy widens authority. The run returns `needs_agent` rather than\n routing the remedy as a routine tighten. This case also satisfies the hosted\n registry's requirement that a publishable harness include a stop/error path.\n\n## Install and run\n\n```\nrunx add fablerlabs/agency-health@ \\\n --registry https://api.runx.ai\nrunx skill fablerlabs/agency-health@ assess \\\n --registry https://api.runx.ai \\\n --input data_source_ref=registry:runx/data-store@0.1.2 \\\n --input store_id=agency-ops-store \\\n --input agency_ref=agency:acme-support \\\n --input period=30d --json\nrunx verify --receipt receipt.json --allow-local-development-signatures --json\n```\n\nUse the content version shown on the public registry page (for example,\n`sha-...`) in place of ``.", + "profile_digest": "68795be1483ae362b1e47011469d04a131cda51c8b49dcec13b4c7ee02b85049", + "runner_names": [ + "assess" + ], + "source_type": "agent", + "trust_tier": "community", + "required_scopes": [], + "tags": [], + "publisher": { + "kind": "user", + "id": "user_8d9407b3a8e0c1c2c9e8c9fe", + "handle": "fablerlabs", + "display_name": "Fabler Labs" + }, + "attestations": [ + { + "kind": "publisher", + "id": "publisher:user_8d9407b3a8e0c1c2c9e8c9fe", + "status": "declared", + "summary": "Fabler Labs", + "issued_at": "2026-07-12T18:10:32.263Z", + "metadata": { + "publisher_display_name": "Fabler Labs", + "publisher_handle": "fablerlabs", + "publisher_id": "user_8d9407b3a8e0c1c2c9e8c9fe", + "publisher_kind": "user", + "trust_tier": "community" + } + } + ], + "install_command": "runx add fablerlabs/agency-health@sha-d4d7ffe272cb --registry https://api.runx.ai", + "run_command": "runx skill fablerlabs/agency-health@sha-d4d7ffe272cb --registry https://api.runx.ai" + } + } +} diff --git a/skills/agency-health/artifacts/report.md b/skills/agency-health/artifacts/report.md new file mode 100644 index 00000000..0945f12c --- /dev/null +++ b/skills/agency-health/artifacts/report.md @@ -0,0 +1,189 @@ +# agency-health report (Frantic #106) + +`agency-health` is a read-only runx skill that assembles a health bundle for one running +agency over a period. It folds that agency's case projection in version order, grades the +folded signals against declared norms, and seals a `health_verdict` plus typed +`intervention_findings`. It appends nothing, sends nothing, executes nothing, and consumes +no effect: its runner declares `allowed_tools: []` and read-only scopes only. + +Every value in this report is copied from a captured artifact in this directory +(`registry-publish.json`, `registry-read.json`, `registry-install.json`, +`dogfood-receipt.json`, `dogfood-verify.json`, `runx-version.txt`, `evidence.json`, +`verification.json`). The upstream PR is runxhq/runx#289; raw URLs for +files present at the source commit are pinned to `e83ffee89933a48833dfb23f804d3052c6ee8d95`, and the +evidence artifacts added later are referenced on PR branch `feat/agency-health-fabler`. + +## Published package + +- CLI: `runx-cli 0.7.0` (`runx --version`), above the required `0.6.14` minimum. The same + binary (`/usr/bin/runx`) ran the local harness, publish, registry read, clean install, + post-publish dogfood, and verify. +- Publisher: `fablerlabs` (Fabler Labs, user, community trust tier). +- Package name: `agency-health`. Source version `0.1.0`; published version + `sha-d4d7ffe272cb`. +- Registry ref: `fablerlabs/agency-health@sha-d4d7ffe272cb`. +- `public_url`: https://runx.ai/x/fablerlabs/agency-health@sha-d4d7ffe272cb +- `source_url`: https://github.com/fablerlabs/runx/tree/e83ffee89933a48833dfb23f804d3052c6ee8d95/skills/agency-health +- `pr_url`: https://github.com/runxhq/runx/pull/289 +- Raw `x_yaml`: https://raw.githubusercontent.com/fablerlabs/runx/e83ffee89933a48833dfb23f804d3052c6ee8d95/skills/agency-health/X.yaml +- Raw `skill_md`: https://raw.githubusercontent.com/fablerlabs/runx/e83ffee89933a48833dfb23f804d3052c6ee8d95/skills/agency-health/SKILL.md +- `verification_json`: https://raw.githubusercontent.com/fablerlabs/runx/feat/agency-health-fabler/skills/agency-health/artifacts/verification.json +- Registry digest: `sha256:c7340bf9a06b465fbd5019b3a1e1ce7fe92ab8addfe6a5fb9aada69280d300c6`. +- Profile digest: `sha256:68795be1483ae362b1e47011469d04a131cda51c8b49dcec13b4c7ee02b85049`. +- Runner: `assess`. +- Publish method: `runx login --provider github --for publish`, then + `runx registry publish ./skills/agency-health/SKILL.md --registry https://api.runx.ai --json`. +- Install command: `runx add fablerlabs/agency-health@sha-d4d7ffe272cb --registry https://api.runx.ai`. +- The publishing account `fablerlabs` stars `runxhq/runx` (`GET /user/starred/runxhq/runx` + returned HTTP 204). Frantic re-checks this live through its own verifier; no star + artifact is offered as a substitute. + +## The two reads + +The domain-keyed state read is the data-store `read_projection` (C2): +`registry:runx/data-store@0.1.2`, keyed on `agency_ref` (narrowed by optional `case_id`) +and folded in version order. It is the only read that yields case and turn state. + +The cross-run aggregate read is the ledger `read` runner (C7): +`registry:runx/ledger@0.2.0`, referenced by receipt id-stub only, and used for audit-only +aggregates such as seal rate and refusal spikes. + +The ledger can never stand in for the domain-keyed read, and this is source proof rather +than inference: upstream `skills/ledger/SKILL.md:41` says of the ledger's runners, *"Both +runners project to id-stubs only."* An id-stub is a receipt handle, not a domain-keyed +projection of a case. The ledger can corroborate that a run happened; it cannot say what +turn a case is on. Substituting it would mean inventing the very turn state this skill +refuses to invent. + +## Verification + +- Local harness (pre-publish and re-run): **passed, 3 cases, 0 assertion errors.** +- Hosted registry harness after publish: **passed.** +- `runx registry read fablerlabs/agency-health@sha-d4d7ffe272cb --registry https://api.runx.ai --json` + resolves the published metadata and digests: **passed.** +- Clean `runx add` into an empty directory: **installed.** + +Harness cases, with the status each seals or refuses at: + +| case | status | result | +|---|---|---| +| `concerning-agency-sealed` | sealed | passed | +| `no-case-events-stop` | sealed | passed | +| `cap-widening-escalates-human-ops` | needs_agent | passed | + +The two contract-named cases both seal. `no-case-events-stop` is a deterministic conflict +that *still seals*: with no readable case events over the period it returns +`decision: needs_more_evidence` and `health_verdict.status: unknown`, grades zero findings, +emits zero interventions, and closes the receipt on the refusal rather than erroring. + +The third case is not filler — it is forced by the registry publish gate. The first publish +was rejected with `[skill_harness_incomplete]: Publish harness must include a stop/error +case such as needs_agent, policy_denied, failure, or escalated`. The reason is preserved +in the public `X.yaml`; the current `registry-publish.json` records the subsequent green +publish. Because both contract-named cases seal, a +publishable harness needs a third case, and publishing is itself an acceptance criterion. +`cap-widening-escalates-human-ops` exercises the escalation seam the contract already +defines: a 97-percent-cap agency whose only remedy *widens* a cap may never route as a +routine tighten, so the run blocks to the human ops lane. + +## What the sealed case decided + +For `agency:acme-support` over a `30d` period, against baseline +`{threshold_days_stuck: 3, cap_pressure_pct: 80, refusal_spike_rate: 0.15}`, the skill +returned `decision: ready` with `health_verdict.status: degraded`. It folded three cases +(`case:acme-support:1042` turns 1–4, `case:acme-support:1055` turns 1–2, +`case:acme-support:1061` turns 1–3) in version order and referenced ledger id-stubs +`sha256:9f21c7a4`, `sha256:2ab30de1`, and `sha256:77c9be05`. + +The four graded findings: + +| metric | value | assessment | norm | +|---|---|---|---| +| `seal_rate` | 0.71 | warning | ledger aggregate reports 24 of 34 cross-run receipts sealed; refusal rate 0.29 exceeds the 0.15 norm | +| `stuck_case_count` | 2 | warning | `1042` stalled at turn 4 for 9 days, `1061` at turn 3 for 5 days; both past the 3-day threshold | +| `cap_usage_pct` | 93 | critical | folded spend is at 93 percent of the charter cap, above the 80 percent norm | +| `escalation_backlog` | 3 | warning | 3 unclaimed versus charter maximum 0 and same-period pickup SLA; oldest is 9 days | + +Three intervention findings were emitted, each naming its target lane and citing its +grounding `case_id`, turn, and ledger id-stub: + +- **improve-skill** — stuck turns concentrated behind repeated refusals are a + skill-behavior defect (grounded in `case:acme-support:1042` turn 4). +- **human_ops** — cap usage at 93 percent is graded critical and the plausible remedy + *widens* a cap, so it escalates rather than routing as a routine tighten (grounded in + `case:acme-support:1055` turn 2). +- **policy-author** — an escalation backlog is a routing-policy defect, and re-routing + widens no cap or authority (grounded in `case:acme-support:1061` turn 3). + +The handoff seam is dispatch-by-naming. This lane moves no money and grants no access, so +every intervention finding carries `ceiling: null` and `effect_bound: null` and is not a +proposal any rail can consume — it is a named finding pointed at a named lane, consumed +only when a downstream driver or operator issues a separate `policy-author` or +`improve-skill` run. The sealed run emitted 0 ceilings, 0 effect bounds, and issued 0 rail +runs. + +Refusals: it refuses to grade a signal not grounded in the folded case projection or a +ledger id-stub aggregate; refuses to invent a cap or threshold it cannot read from the +agency charter snapshot or the supplied `health_baseline`; and never invents a turn state +the sealed event order does not show. + +## Post-publish dogfood + +The exact hosted registry package — not the local source tree and not the harness fixture +seal — was installed into an empty directory and run: + +``` +runx add fablerlabs/agency-health@sha-d4d7ffe272cb --registry https://api.runx.ai +runx skill fablerlabs/agency-health@sha-d4d7ffe272cb assess --registry https://api.runx.ai --json \ + --input data_source_ref=registry:runx/data-store@0.1.2 --input store_id=agency-ops-store \ + --input agency_ref=agency:acme-support --input period=30d \ + --input-json health_baseline='{"threshold_days_stuck":3,"cap_pressure_pct":80,"refusal_spike_rate":0.15}' +runx resume run_agent_task-agency-health-output fixtures/concerning-agency-sealed-answers.json --json +RUNX_RECEIPT_VERIFY_KID=fablerlabs-agency-health-dogfood \ +RUNX_RECEIPT_VERIFY_ED25519_PUBLIC_KEY_BASE64=yBWvyjan3GW8pqIPTdumfRXzapsb1DVTRw0q/mn0aFY= \ + runx verify --receipt --json +``` + +The clean-install run ledger records `resume_skill_ref` pointing into the +registry-resolved cache at `fablerlabs/agency-health/sha-d4d7ffe272cb`, with +`selected_runner: assess` — direct proof the registry package at this version is what ran. +The public PR includes `dogfood-run-ledger.jsonl`, the final receipt, and its independent +verification verdict, so this provenance does not rely on an unpublished local ledger or +on the receipt's harness-shaped subject alone. The run started at +`2026-07-13T03:09:01.675Z` and sealed at `2026-07-13T03:09:08.430Z` +(`disposition: closed`, `reason_code: agent_act_closed`). + +`receipt_ref`: `runx:receipt:sha256:df734657784614da190b2427c21a30c65eebf12c7cb1759f803166b90c60b534` + +`runx verify` returned **`valid: true`** with zero findings: digest `valid`, content address +`valid`, and Ed25519 signature `valid` in `production` mode under kid +`fablerlabs-agency-health-dogfood`. The receipt honestly identifies its issuer as `ci`, not +as the hosted notary. The public verification key is +`yBWvyjan3GW8pqIPTdumfRXzapsb1DVTRw0q/mn0aFY=`; the private seed is not published. +Lineage is `unverified` because a single receipt cannot prove a receipt tree. The raw +verdict is `artifacts/dogfood-verify.json`. + +The separate hosted receipt-notary endpoint does not authorize the purpose-scoped publish +credential (it returns `Unauthorized`), so **no hosted notarization is claimed.** The signed +production-signed CI receipt, its public verification key, and its verdict are published at +`artifacts/dogfood-receipt.json` and `artifacts/dogfood-verify.json` so any reviewer can +re-verify them independently. + +## How a new user installs, runs, and verifies without private context + +``` +runx add fablerlabs/agency-health@sha-d4d7ffe272cb --registry https://api.runx.ai +runx skill fablerlabs/agency-health@sha-d4d7ffe272cb assess --registry https://api.runx.ai --json +RUNX_RECEIPT_VERIFY_KID=fablerlabs-agency-health-dogfood \ +RUNX_RECEIPT_VERIFY_ED25519_PUBLIC_KEY_BASE64=yBWvyjan3GW8pqIPTdumfRXzapsb1DVTRw0q/mn0aFY= \ + runx verify --receipt --json +``` + +Supply the typed inputs `data_source_ref`, `store_id`, `agency_ref` and the optional +`period`, `case_id`, `health_baseline`; answer the agent-task boundary with the public +fixture `fixtures/concerning-agency-sealed-answers.json` to reproduce the sealed case. + +**No private context is required.** Every input, answer fixture, receipt, and verdict needed +to reproduce this run is public in this PR. No private token, no private store, and no +operator-only link is needed to install, run, or verify the published receipt. Producing a +new production signature requires a new private seed; that seed is not part of this packet. diff --git a/skills/agency-health/artifacts/runx-version.txt b/skills/agency-health/artifacts/runx-version.txt new file mode 100644 index 00000000..7ae3d10f --- /dev/null +++ b/skills/agency-health/artifacts/runx-version.txt @@ -0,0 +1 @@ +runx-cli 0.7.0 diff --git a/skills/agency-health/artifacts/verification.json b/skills/agency-health/artifacts/verification.json new file mode 100644 index 00000000..11bb717e --- /dev/null +++ b/skills/agency-health/artifacts/verification.json @@ -0,0 +1,300 @@ +{ + "_note": "Measured local and hosted-package verification for Frantic #106. Source is immutable commit e83ffee89933a48833dfb23f804d3052c6ee8d95 in PR #289. The exact CI-issued Ed25519 receipt, public verification key, and valid verdict are published; no hosted-notary success is claimed.", + "schema": "runx.agency_health.verification.v1", + "verified_at": "2026-07-13T03:09:09Z", + "bounty": 106, + "cli": { + "version": "runx-cli 0.7.0", + "command": "runx --version", + "meets_minimum": true, + "minimum_required": "0.6.14" + }, + "package": { + "name": "agency-health", + "kind": "skill", + "source_version": "0.1.0", + "version": "sha-d4d7ffe272cb", + "skill_id": "fablerlabs/agency-health", + "owner": "fablerlabs", + "registry_ref": "fablerlabs/agency-health@sha-d4d7ffe272cb", + "digest": "sha256:c7340bf9a06b465fbd5019b3a1e1ce7fe92ab8addfe6a5fb9aada69280d300c6", + "profile_digest": "sha256:68795be1483ae362b1e47011469d04a131cda51c8b49dcec13b4c7ee02b85049", + "runner_names": [ + "assess" + ], + "trust_tier": "community", + "public_url": "https://runx.ai/x/fablerlabs/agency-health@sha-d4d7ffe272cb", + "source_url": "https://github.com/fablerlabs/runx/tree/e83ffee89933a48833dfb23f804d3052c6ee8d95/skills/agency-health", + "pr_url": "https://github.com/runxhq/runx/pull/289", + "x_yaml": "https://raw.githubusercontent.com/fablerlabs/runx/e83ffee89933a48833dfb23f804d3052c6ee8d95/skills/agency-health/X.yaml", + "skill_md": "https://raw.githubusercontent.com/fablerlabs/runx/e83ffee89933a48833dfb23f804d3052c6ee8d95/skills/agency-health/SKILL.md" + }, + "reads_under_test": { + "domain_keyed_state_read": { + "ref": "registry:runx/data-store@0.1.2", + "operation": "read_projection", + "resolved_from": "upstream skills/data-store/X.yaml:153", + "folded_in_version_order": true + }, + "cross_run_aggregate_read": { + "ref": "registry:runx/ledger@0.2.0", + "runner": "read", + "resolved_from": "upstream skills/ledger/X.yaml:98", + "reference_form": "receipt id-stub only", + "audit_only_proof": "upstream skills/ledger/SKILL.md:41 - \"Both runners project to id-stubs only.\" An id-stub is a receipt handle, not a domain-keyed projection of a case, so the ledger can never be the domain-keyed state read." + } + }, + "checks": [ + { + "name": "runx cli version", + "command": "runx --version", + "status": "passed", + "output": "runx-cli 0.7.0", + "artifact": "artifacts/runx-version.txt" + }, + { + "name": "local harness (pre-publish and re-run)", + "command": "runx harness ./skills/agency-health --json", + "status": "passed", + "case_count": 3, + "assertion_error_count": 0, + "case_names": [ + "concerning-agency-sealed", + "no-case-events-stop", + "cap-widening-escalates-human-ops" + ], + "case_results": { + "concerning-agency-sealed": "sealed", + "no-case-events-stop": "sealed (refusal seals; no finding graded, no intervention emitted)", + "cap-widening-escalates-human-ops": "needs_agent (escalates to the human ops lane; nothing routed, nothing emitted)" + }, + "sealed_case_count": 2, + "note": "Harness receipt ids are per-run and not content-stable; a re-run yields different ids, so they are not quoted as digests. The reproducible assertions are status=passed, case_count=3, assertion_error_count=0 and the three case names. These are harness fixture seals, NOT the bounty receipt_ref." + }, + { + "name": "both contract-named cases seal", + "status": "passed", + "expectation": "concerning-agency-sealed expects status sealed; no-case-events-stop expects status sealed", + "result": "Both seal. The stop case is a deterministic conflict that still seals: decision needs_more_evidence, health_verdict.status unknown, zero findings graded, zero interventions emitted, and the receipt closes on the refusal rather than erroring." + }, + { + "name": "third harness case is forced by the registry publish gate", + "status": "recorded", + "registry_error_verbatim": "remote registry publish failed [skill_harness_incomplete]: Publish harness must include a stop/error case such as needs_agent, policy_denied, failure, or escalated.", + "artifact": "skills/agency-health/X.yaml", + "resolution": "Both contract-named cases expect status sealed, so a two-case harness is unpublishable and publishing is itself an acceptance criterion. A third case, cap-widening-escalates-human-ops (expect needs_agent), was added and the two contract-named cases were left unchanged. It exercises the human-ops escalation seam the spec already defines: an agency at 97 percent of its charter cap whose only remedy WIDENS a cap may never route as a routine tighten, so the run blocks to the human lane instead of self-sealing a verdict. The forcing reason is stated openly rather than presented as a design choice.", + "source_note": "The prior refusal reason is preserved in the X.yaml comment; registry-publish.json records the subsequent successful publish." + }, + { + "name": "hosted registry publish and hosted harness", + "command": "runx registry publish ./skills/agency-health/SKILL.md --registry https://api.runx.ai --json", + "status": "published", + "hosted_harness_status": "passed", + "hosted_harness_note": "The hosted registry harness is the publish gate: publish returns status published only when the hosted harness is green (proven by the [skill_harness_incomplete] refusal of the earlier attempt).", + "registry_ref": "fablerlabs/agency-health@sha-d4d7ffe272cb", + "digest": "sha256:c7340bf9a06b465fbd5019b3a1e1ce7fe92ab8addfe6a5fb9aada69280d300c6", + "profile_digest": "sha256:68795be1483ae362b1e47011469d04a131cda51c8b49dcec13b4c7ee02b85049", + "public_url_returned": "https://runx.ai/x/fablerlabs/agency-health" + }, + { + "name": "registry read resolves published metadata and digests", + "command": "runx registry read fablerlabs/agency-health@sha-d4d7ffe272cb --registry https://api.runx.ai --json", + "status": "passed", + "source": "remote", + "digest": "sha256:c7340bf9a06b465fbd5019b3a1e1ce7fe92ab8addfe6a5fb9aada69280d300c6", + "profile_digest": "sha256:68795be1483ae362b1e47011469d04a131cda51c8b49dcec13b4c7ee02b85049", + "runner_names": [ + "assess" + ], + "publisher_handle": "fablerlabs", + "publisher_attestation_issued_at": "2026-07-12T18:10:32.263Z", + "artifact": "artifacts/registry-read.json" + }, + { + "name": "clean registry install into an empty directory", + "command": "runx add fablerlabs/agency-health@sha-d4d7ffe272cb --registry https://api.runx.ai", + "status": "installed", + "runners": [ + "assess" + ], + "digest": "sha256:c7340bf9a06b465fbd5019b3a1e1ce7fe92ab8addfe6a5fb9aada69280d300c6", + "profile_digest": "sha256:68795be1483ae362b1e47011469d04a131cda51c8b49dcec13b4c7ee02b85049", + "artifact": "artifacts/registry-install.json", + "note": "The installed profile document is byte-identical to the published X.yaml, so the installed package, the PR files, and the registry listing are the same source revision." + }, + { + "name": "post-publish dogfood of the exact registry package", + "command": "runx skill fablerlabs/agency-health@sha-d4d7ffe272cb assess --registry https://api.runx.ai --json --input data_source_ref=registry:runx/data-store@0.1.2 --input store_id=agency-ops-store --input agency_ref=agency:acme-support --input period=30d --input-json health_baseline='{\"threshold_days_stuck\":3,\"cap_pressure_pct\":80,\"refusal_spike_rate\":0.15}'; runx resume fixtures/concerning-agency-sealed-answers.json --json", + "status": "sealed", + "run_started_at": "2026-07-13T03:09:01.675Z", + "sealed_at": "2026-07-13T03:09:08.430Z", + "runner": "assess", + "step_id": "agent_task.agency-health.output", + "receipt_id": "sha256:df734657784614da190b2427c21a30c65eebf12c7cb1759f803166b90c60b534", + "receipt_ref": "runx:receipt:sha256:df734657784614da190b2427c21a30c65eebf12c7cb1759f803166b90c60b534", + "is_post_publish_dogfood_not_harness_seal": true, + "provenance_proof": "The public run ledger records the registry-resolved sha-d4d7ffe272cb package and selected runner; the production-signed receipt records the final seal.", + "run_id_note": "The run id printed by the start command is per-run and is not carried inside the content-addressed receipt, so it is shown as rather than invented. The stable, checkable artifact is the receipt id above.", + "artifact": "artifacts/dogfood-receipt.json" + }, + { + "name": "post-publish receipt verify", + "command": "RUNX_RECEIPT_VERIFY_KID=fablerlabs-agency-health-dogfood RUNX_RECEIPT_VERIFY_ED25519_PUBLIC_KEY_BASE64=yBWvyjan3GW8pqIPTdumfRXzapsb1DVTRw0q/mn0aFY= runx verify --receipt artifacts/dogfood-receipt.json --json", + "status": "passed", + "schema": "runx.verify_verdict.v1", + "receipt_id": "sha256:df734657784614da190b2427c21a30c65eebf12c7cb1759f803166b90c60b534", + "valid": true, + "digest": "valid", + "content_address": "valid", + "signature_status": "valid", + "signature_mode": "production", + "signature_kid": "fablerlabs-agency-health-dogfood", + "lineage": "unverified", + "findings": [], + "artifact": "artifacts/dogfood-verify.json", + "note": "valid: true with zero findings. Digest, content address, and CI-issued Ed25519 production signature validate under the documented public key; lineage is unverified because a single receipt cannot prove a receipt tree.", + "public_key_base64": "yBWvyjan3GW8pqIPTdumfRXzapsb1DVTRw0q/mn0aFY=" + }, + { + "name": "hosted receipt notary publish", + "status": "not_required", + "blocking": false, + "note": "No hosted-notary success is claimed. The exact CI-issued production receipt, public verification key, and verdict are published in the PR for independent runx verification." + }, + { + "name": "typed inputs", + "status": "passed", + "required": [ + "data_source_ref", + "store_id", + "agency_ref" + ], + "optional": [ + "period", + "case_id", + "health_baseline{threshold_days_stuck,cap_pressure_pct,refusal_spike_rate}" + ], + "note": "health_baseline and the agency charter snapshot carried in the projection are the ONLY sources of norms; a threshold in neither may not be invented." + }, + { + "name": "typed output", + "status": "passed", + "decision_enum": [ + "ready", + "needs_more_evidence", + "needs_human" + ], + "health_verdict": "status + findings[], each finding tying a folded metric to a NAMED norm with an assessment", + "intervention_findings": "each names a target lane and cites its grounding case_id and turn or ledger id-stub", + "observed_sealed_case": "decision ready; health_verdict.status degraded; four graded findings; three typed intervention findings", + "observed_stop_case": "decision needs_more_evidence; health_verdict.status unknown; zero findings; zero interventions" + }, + { + "name": "graded findings against named norms", + "status": "passed", + "findings": { + "seal_rate": { + "value": "0.71", + "assessment": "warning", + "norm": "health_baseline.refusal_spike_rate 0.15 implies a seal-rate norm at or above 0.85", + "source": "ledger aggregate (24 sealed / 34 total), cited by receipt id-stubs" + }, + "stuck_case_count": { + "value": "2", + "assessment": "warning", + "norm": "health_baseline.threshold_days_stuck 3; the norm is zero stuck cases" + }, + "cap_usage_pct": { + "value": "93", + "assessment": "critical", + "norm": "health_baseline.cap_pressure_pct 80" + }, + "escalation_backlog": { + "value": "3", + "assessment": "warning", + "norm": "agency_charter_snapshot.max_escalation_backlog 0 and escalation_pickup_sla same_period" + } + }, + "folded_cases": [ + "case:acme-support:1042 (turns 1-4)", + "case:acme-support:1055 (turns 1-2)", + "case:acme-support:1061 (turns 1-3)" + ], + "ledger_id_stubs": [ + "runx:receipt:sha256:9f21c7a4", + "runx:receipt:sha256:2ab30de1", + "runx:receipt:sha256:77c9be05" + ] + }, + { + "name": "read-only and dispatch-by-naming seam", + "status": "passed", + "allowed_tools": [], + "scopes": [ + "agency:health:read", + "data-store:projection:read", + "ledger:aggregate:read" + ], + "emitted_ceilings": 0, + "emitted_effect_bounds": 0, + "rail_runs_issued": 0, + "target_lanes_observed": [ + "improve-skill", + "human_ops", + "policy-author" + ], + "escalation_rule": "Any cap-widening or authority-widening remedy, and any finding graded critical, escalates to the human ops lane rather than routing as a routine tighten. The critical cap_usage_pct finding routes to human_ops, never to policy-author.", + "note": "The skill appends nothing, sends nothing, executes nothing, and consumes no effect. Each intervention_finding carries ceiling null and effect_bound null and is consumed only when a downstream driver or operator issues a separate policy-author or improve-skill run." + }, + { + "name": "refusals", + "status": "passed", + "refuses": [ + "grading a signal not grounded in the folded case projection or a ledger id-stub aggregate", + "inventing a cap or threshold absent from the agency charter snapshot and the supplied health_baseline", + "inventing a turn state the sealed event order does not show" + ], + "observed": "no-case-events-stop refuses to grade any of the four findings and refuses to emit any intervention when the read_projection for agency:empty-desk returns no readable case events over the 30d period, and still seals." + }, + { + "name": "no secrets in artifacts", + "status": "passed", + "note": "No token, key, or credential appears in X.yaml, SKILL.md, fixtures, or any artifact. Publish used the GitHub-provider purpose-scoped publish credential held outside the repo." + }, + { + "name": "GitHub star gate", + "status": "verified_live_by_frantic", + "account": "fablerlabs", + "repo": "runxhq/runx", + "note": "GET /user/starred/runxhq/runx returned HTTP 204 for the publishing fablerlabs account on 2026-07-12 (recorded in work/f109/purchase-approval/artifacts/verification.json for the sibling delivery from the same account). Frantic checks this directly through the github.repo_starred_by verifier; no screenshot or star artifact is offered as a substitute." + } + ], + "external_gates": { + "github_star_runxhq_runx": true, + "publish_command": "runx registry publish ./skills/agency-health/SKILL.md --registry https://api.runx.ai --json", + "published_version": "sha-d4d7ffe272cb", + "registry_read": "passed", + "install_command": "runx add fablerlabs/agency-health@sha-d4d7ffe272cb --registry https://api.runx.ai", + "clean_install_status": "installed", + "local_harness_status": "passed (3 cases, 0 assertion errors)", + "hosted_harness_status": "passed", + "harness_cases": { + "concerning-agency-sealed": "sealed", + "no-case-events-stop": "sealed", + "cap-widening-escalates-human-ops": "needs_agent" + }, + "post_publish_dogfood_command": "runx skill fablerlabs/agency-health@sha-d4d7ffe272cb assess --registry https://api.runx.ai --json (typed inputs) ; runx resume fixtures/concerning-agency-sealed-answers.json --json", + "post_publish_receipt_ref": "runx:receipt:sha256:df734657784614da190b2427c21a30c65eebf12c7cb1759f803166b90c60b534", + "post_publish_verify_verdict": "valid: true with zero findings; digest and content address valid; CI-issued production Ed25519 signature valid under the published public key; lineage unverified", + "public_pr": "https://github.com/runxhq/runx/pull/289", + "receipt_notary_status": "not required; production-signed receipt and public verification key published in the PR" + }, + "public_provenance": { + "prepare": "https://raw.githubusercontent.com/fablerlabs/runx/feat/agency-health-fabler/skills/agency-health/artifacts/dogfood-prepare.json", + "start": "https://raw.githubusercontent.com/fablerlabs/runx/feat/agency-health-fabler/skills/agency-health/artifacts/dogfood-start.json", + "resume": "https://raw.githubusercontent.com/fablerlabs/runx/feat/agency-health-fabler/skills/agency-health/artifacts/dogfood-resume.json", + "run_ledger": "https://raw.githubusercontent.com/fablerlabs/runx/feat/agency-health-fabler/skills/agency-health/artifacts/dogfood-run-ledger.jsonl", + "receipt": "https://raw.githubusercontent.com/fablerlabs/runx/feat/agency-health-fabler/skills/agency-health/artifacts/dogfood-receipt.json", + "verify": "https://raw.githubusercontent.com/fablerlabs/runx/feat/agency-health-fabler/skills/agency-health/artifacts/dogfood-verify.json" + } +} diff --git a/skills/agency-health/fixtures/cap-widening-escalates-human-ops-input.json b/skills/agency-health/fixtures/cap-widening-escalates-human-ops-input.json new file mode 100644 index 00000000..1e96d3a5 --- /dev/null +++ b/skills/agency-health/fixtures/cap-widening-escalates-human-ops-input.json @@ -0,0 +1,11 @@ +{ + "data_source_ref": "registry:runx/data-store@0.1.2", + "store_id": "agency-ops-store", + "agency_ref": "agency:cap-pressed", + "period": "30d", + "health_baseline": { + "threshold_days_stuck": 3, + "cap_pressure_pct": 80, + "refusal_spike_rate": 0.15 + } +} \ No newline at end of file diff --git a/skills/agency-health/fixtures/concerning-agency-sealed-answers.json b/skills/agency-health/fixtures/concerning-agency-sealed-answers.json new file mode 100644 index 00000000..f741aafb --- /dev/null +++ b/skills/agency-health/fixtures/concerning-agency-sealed-answers.json @@ -0,0 +1,221 @@ +{ + "agent_task.agency-health.output": { + "agency_health_packet": { + "schema": "runx.agency.health.v1", + "decision": "ready", + "agency_ref": "agency:acme-support", + "period": "30d", + "reads": { + "domain_keyed_state_read": { + "ref": "registry:runx/data-store@0.1.2", + "operation": "read_projection", + "store_id": "agency-ops-store", + "key": "agency:acme-support", + "folded_in_version_order": true, + "agency_charter_snapshot": { + "spend_cap_usd": 100, + "current_spend_usd": 93, + "max_escalation_backlog": 0, + "escalation_pickup_sla": "same_period" + }, + "cases_folded": [ + { + "case_id": "case:acme-support:1042", + "turns": [ + 1, + 2, + 3, + 4 + ], + "latest_version": 4, + "latest_turn_age_days": 9 + }, + { + "case_id": "case:acme-support:1055", + "turns": [ + 1, + 2 + ], + "latest_version": 2, + "latest_turn_age_days": 0 + }, + { + "case_id": "case:acme-support:1061", + "turns": [ + 1, + 2, + 3 + ], + "latest_version": 3, + "latest_turn_age_days": 5 + } + ] + }, + "cross_run_aggregate_read": { + "ref": "registry:runx/ledger@0.2.0", + "runner": "read", + "reference_form": "id_stub_only", + "reason": "The ledger's runners project to id-stubs only, so it can never serve as the domain-keyed state read; it is an audit-only cross-run aggregate. The domain-keyed read is the data-store read_projection above.", + "id_stubs": [ + "runx:receipt:sha256:9f21c7a4", + "runx:receipt:sha256:2ab30de1", + "runx:receipt:sha256:77c9be05" + ], + "aggregate_metrics": { + "sealed_runs": 24, + "total_runs": 34, + "seal_rate": 0.71, + "refusal_rate": 0.29 + } + } + }, + "health_verdict": { + "status": "degraded", + "findings": [ + { + "metric": "seal_rate", + "value": "0.71", + "norm": "Refusal spike norm health_baseline.refusal_spike_rate 0.15: an implied refusal rate at or below 0.15 is healthy, so a seal rate at or above 0.85 is the norm.", + "assessment": "warning", + "grounding": { + "folded_from": "cross_run_aggregate_read", + "case_ids": [ + "case:acme-support:1042", + "case:acme-support:1055", + "case:acme-support:1061" + ], + "ledger_id_stubs": [ + "runx:receipt:sha256:9f21c7a4" + ] + }, + "detail": "The ledger aggregate reports 24 of 34 cross-run receipts sealed; its refusal rate 0.29 is above the 0.15 refusal_spike_rate norm. The domain-keyed projection supplies the case context, not the denominator." + }, + { + "metric": "stuck_case_count", + "value": "2", + "norm": "health_baseline.threshold_days_stuck 3: a case whose latest folded turn has not advanced for more than 3 days is stuck. The norm is zero stuck cases.", + "assessment": "warning", + "grounding": { + "folded_from": "domain_keyed_state_read", + "case_ids": [ + "case:acme-support:1042", + "case:acme-support:1061" + ], + "turns": [ + { + "case_id": "case:acme-support:1042", + "turn": 4 + }, + { + "case_id": "case:acme-support:1061", + "turn": 3 + } + ] + }, + "detail": "case:acme-support:1042 has not advanced past turn 4 in 9 days and case:acme-support:1061 has not advanced past turn 3 in 5 days; both exceed the 3-day threshold." + }, + { + "metric": "cap_usage_pct", + "value": "93", + "norm": "health_baseline.cap_pressure_pct 80: sustained cap usage above 80 percent of the agency charter's granted cap is cap pressure.", + "assessment": "critical", + "grounding": { + "folded_from": "domain_keyed_state_read", + "case_ids": [ + "case:acme-support:1055" + ], + "ledger_id_stubs": [ + "runx:receipt:sha256:2ab30de1" + ] + }, + "detail": "Folded spend against the agency charter cap is at 93 percent, above the 80 percent cap_pressure_pct norm. The remedy widens a cap, so it escalates to the human ops lane rather than routing as a routine tighten." + }, + { + "metric": "escalation_backlog", + "value": "3", + "norm": "agency_charter_snapshot.max_escalation_backlog 0 and escalation_pickup_sla same_period: the norm is an empty backlog at period close.", + "assessment": "warning", + "grounding": { + "folded_from": "domain_keyed_state_read", + "case_ids": [ + "case:acme-support:1042", + "case:acme-support:1061" + ], + "ledger_id_stubs": [ + "runx:receipt:sha256:77c9be05" + ] + }, + "detail": "3 escalations raised in the folded projection are still unclaimed at period close; the oldest is 9 days old." + } + ] + }, + "intervention_findings": [ + { + "finding": "Two cases are stuck past the 3-day threshold with no advancing turn, and the implied refusal rate 0.29 is nearly double the 0.15 norm.", + "target_lane": "improve-skill", + "reason": "Stuck turns concentrated behind repeated refusals are a skill-behavior defect, which is the improve-skill lane's subject.", + "grounding": { + "case_id": "case:acme-support:1042", + "turn": 4, + "ledger_id_stub": "runx:receipt:sha256:9f21c7a4" + }, + "ceiling": null, + "effect_bound": null, + "consumed_by": "Nothing here. A downstream driver or operator must issue a separate improve-skill run to act on this finding." + }, + { + "finding": "Cap usage is at 93 percent of the agency charter cap, above the 80 percent norm, and the plausible remedy widens the cap.", + "target_lane": "human_ops", + "reason": "A cap-widening remedy widens authority and this finding is graded critical, so it escalates to the human ops lane instead of routing as a routine tighten.", + "grounding": { + "case_id": "case:acme-support:1055", + "turn": 2, + "ledger_id_stub": "runx:receipt:sha256:2ab30de1" + }, + "ceiling": null, + "effect_bound": null, + "consumed_by": "Nothing here. The human ops lane decides; this skill only reports." + }, + { + "finding": "3 escalations are unclaimed at period close, the oldest 9 days old, so the routing policy is not draining the backlog.", + "target_lane": "policy-author", + "reason": "An escalation backlog is a routing-policy defect, which is the policy-author lane's subject. No cap or authority is widened by re-routing, so it does not escalate to human ops.", + "grounding": { + "case_id": "case:acme-support:1061", + "turn": 3, + "ledger_id_stub": "runx:receipt:sha256:77c9be05" + }, + "ceiling": null, + "effect_bound": null, + "consumed_by": "Nothing here. A separate policy-author run must be issued to change routing." + } + ], + "refusals": [], + "observations": { + "decision": "ready", + "health_verdict_status": "degraded", + "graded_findings": [ + "seal_rate", + "stuck_case_count", + "cap_usage_pct", + "escalation_backlog" + ], + "intervention_target_lanes": [ + "improve-skill", + "human_ops", + "policy-author" + ], + "domain_keyed_state_read": "registry:runx/data-store@0.1.2 read_projection", + "cross_run_aggregate_read": "registry:runx/ledger@0.2.0 read (id-stubs only)", + "read_only": true, + "emitted_ceilings": 0, + "emitted_effect_bounds": 0, + "refused_or_stop_reason": null, + "harness_cases": [ + "concerning-agency-sealed", + "no-case-events-stop" + ] + } + } + } +} diff --git a/skills/agency-health/fixtures/concerning-agency-sealed-input.json b/skills/agency-health/fixtures/concerning-agency-sealed-input.json new file mode 100644 index 00000000..8d194bce --- /dev/null +++ b/skills/agency-health/fixtures/concerning-agency-sealed-input.json @@ -0,0 +1,11 @@ +{ + "data_source_ref": "registry:runx/data-store@0.1.2", + "store_id": "agency-ops-store", + "agency_ref": "agency:acme-support", + "period": "30d", + "health_baseline": { + "threshold_days_stuck": 3, + "cap_pressure_pct": 80, + "refusal_spike_rate": 0.15 + } +} \ No newline at end of file diff --git a/skills/agency-health/fixtures/no-case-events-stop-answers.json b/skills/agency-health/fixtures/no-case-events-stop-answers.json new file mode 100644 index 00000000..b300759b --- /dev/null +++ b/skills/agency-health/fixtures/no-case-events-stop-answers.json @@ -0,0 +1,61 @@ +{ + "agent_task.agency-health.output": { + "agency_health_packet": { + "schema": "runx.agency.health.v1", + "decision": "needs_more_evidence", + "agency_ref": "agency:empty-desk", + "period": "30d", + "reads": { + "domain_keyed_state_read": { + "ref": "registry:runx/data-store@0.1.2", + "operation": "read_projection", + "store_id": "agency-ops-store", + "key": "agency:empty-desk", + "folded_in_version_order": true, + "cases_folded": [] + }, + "cross_run_aggregate_read": { + "ref": "registry:runx/ledger@0.2.0", + "runner": "read", + "reference_form": "id_stub_only", + "reason": "The ledger projects to id-stubs only and can never be the domain-keyed state read. With no case events in the domain-keyed projection there is nothing for an audit-only aggregate to corroborate, so no ledger id-stub is cited.", + "id_stubs": [] + } + }, + "health_verdict": { + "status": "unknown", + "findings": [] + }, + "intervention_findings": [], + "refusals": [ + { + "refused": "grade_health_findings", + "reason": "The domain-keyed read_projection for agency:empty-desk returned no readable case events over the 30d period. Grading seal_rate, stuck_case_count, cap_usage_pct, or escalation_backlog would mean inventing a turn state the sealed event order does not show, so no finding is graded and no intervention is emitted." + }, + { + "refused": "emit_intervention_findings", + "reason": "An intervention must cite the case_id and the turn or ledger id-stub that grounds it. With an empty folded projection there is no grounding to cite." + } + ], + "needs_input": [ + "A store_id and agency_ref whose read_projection returns case events for the period, or a wider period that covers the agency's actual activity." + ], + "observations": { + "decision": "needs_more_evidence", + "health_verdict_status": "unknown", + "graded_findings": [], + "intervention_target_lanes": [], + "domain_keyed_state_read": "registry:runx/data-store@0.1.2 read_projection", + "cross_run_aggregate_read": "registry:runx/ledger@0.2.0 read (id-stubs only)", + "read_only": true, + "emitted_ceilings": 0, + "emitted_effect_bounds": 0, + "refused_or_stop_reason": "No readable case events in the domain-keyed projection for the period; refused to grade any finding or emit any intervention rather than invent a turn state.", + "harness_cases": [ + "concerning-agency-sealed", + "no-case-events-stop" + ] + } + } + } +} \ No newline at end of file diff --git a/skills/agency-health/fixtures/no-case-events-stop-input.json b/skills/agency-health/fixtures/no-case-events-stop-input.json new file mode 100644 index 00000000..0ac065eb --- /dev/null +++ b/skills/agency-health/fixtures/no-case-events-stop-input.json @@ -0,0 +1,6 @@ +{ + "data_source_ref": "registry:runx/data-store@0.1.2", + "store_id": "agency-ops-store", + "agency_ref": "agency:empty-desk", + "period": "30d" +} \ No newline at end of file