List hygiene
Decide and record conservative contact-consent transitions from bounded engagement, bounce, and consent evidence before any send.
You’re reading version 0.1.9. Go to the current version
Overview
Use this skill after collecting current contact evidence and before preparing a campaign. It decides whether a contact remains eligible, needs re-permission, must be suppressed, or needs human review. When policy justifies a state transition, it records that decision in the operator's consent ledger with optimistic concurrency and verifies the exact event through a second read.
This skill never sends a message and never mutates a mailing provider. A later
message-send run must read the current consent state again at delivery time. The
ledger records the operator's policy decision; it does not replace provider
unsubscribe or bounce data.
In the manual
Runner
judge
Declared by its execution profile. Read the profile
SKILL.md
Contact Consent Review
Use this skill after collecting current contact evidence and before preparing a campaign. It decides whether a contact remains eligible, needs re-permission, must be suppressed, or needs human review. When policy justifies a state transition, it records that decision in the operator's consent ledger with optimistic concurrency and verifies the exact event through a second read.
This skill never sends a message and never mutates a mailing provider. A later
message-send run must read the current consent state again at delivery time. The
ledger records the operator's policy decision; it does not replace provider
unsubscribe or bounce data.
Operating model
The caller supplies one bounded engagement observation, the current consent
observation, and the policy threshold that applies to the contact. The evidence
must be marked read and versioned to the same ledger head that the runner
reads through the store's projection.read. Missing, stale, ambiguous, or conflicting
evidence produces human_review without a write.
The deterministic decision order is conservative:
- An unsubscribe marker stops automation.
- An existing suppression is preserved; age alone can never relax it.
- Verified hard-bounce evidence suppresses when policy permits that automatic action, otherwise it stops for review.
- A subscribed contact whose last engagement exceeds the decay threshold is
moved to
re_permission. - A clean, recent subscribed contact returns
verifywithout writing.
Only re_permission and suppress can create transitions. The append uses the
observed ledger version and the caller's stable idempotency key. Readback must
match the append status, source identity, new version, event reference, event
digest, and projection digest before the result reports a recorded transition.
No-write decisions also perform a second read and require the projection to
remain unchanged.
Authority and finality
The runner requests runx:data:read and, only for an admitted transition,
runx:data:append. These scopes authorize a bounded consent-ledger operation;
they do not authorize delivery or changes to a CRM or mailing provider. The
data-source binding owns storage and credentials.
A sealed result proves the ledger reads and any exact recorded transition. It
does not prove provider state, re-subscription, campaign approval, or delivery.
Every result therefore keeps downstream_send.status at not_run and names
message-send as the separate delivery boundary.
Decisions and recovery
verify: current evidence supports no transition. Nothing is appended.re_permission: engagement has decayed past policy and a subscribed contact must regain permission before sending. The transition is recorded once.suppress: hard-bounce evidence requires suppression, or an existing suppression is preserved. A write occurs only when state actually changes.human_review: evidence or policy cannot safely support automation. Nothing is appended.
If the ledger version changes before the decision, run again with a fresh read and fresh evidence. Reuse an idempotency key only for the identical transition. The runner deliberately makes no claim that a post-commit retry can recover from the old expected version; inspect the receipt and current ledger before deciding whether another operation is needed.
Inputs and result
Provide the logical data source, consent-ledger resource, contact aggregate, observed version, stable transition key, bounded engagement counts and recency, bounce policy, and current consent evidence. Counts must be non-negative and the policy threshold must be between 1 and 3,650 days.
The result preserves the decision and reason, the observed consent state, the readback-bound transition identity when one was written, a human escalation only when review is required, and the untouched downstream send boundary.
Agent rules
- Never invent engagement, bounce, consent, or version evidence.
- Never relax suppression from contact age alone.
- Never re-permission an unsubscribed contact automatically.
- Never describe an internal ledger append as a provider update.
- Never dispatch, send, or claim delivery from this result.
Published execution profile
The execution profile published with 0.1.9, shown as its exact bytes.
| Runner |
|
|---|---|
| Profile digest | sha256:93cb5494787864968b08fd62e9f0c878605be2f19f179dc0d3bdb15e5cc892e0 |
skill: contact-consent-review
version: "0.1.9"
catalog:
kind: graph
audience: operator
visibility: public
category: growth
role: canonical
execution: execute
completion: runtime_receipt
approval: none
input_definitions:
data_source_uri:
type: string
required: true
description: Logical consent-ledger source selected by the operator.
schema: { minLength: 1, maxLength: 500 }
resource:
type: string
required: true
description: Declared contact-consent event resource.
schema: { minLength: 1, maxLength: 200 }
aggregate_id:
type: string
required: true
description: Stable contact key in the consent ledger.
schema: { minLength: 1, maxLength: 500 }
expected_version:
type: integer
required: true
description: Consent-ledger version observed with the supplied evidence.
schema: { minimum: 0 }
idempotency_key:
type: string
required: true
description: Stable retry identity for this exact intended consent transition.
schema: { minLength: 8, maxLength: 256, pattern: '^[A-Za-z0-9._:-]+$' }
engagement_evidence:
type: object
required: true
description: Bounded current engagement and bounce observation.
schema:
additionalProperties: false
required: [hard_bounces, recency_days]
properties:
hard_bounces: { type: integer, minimum: 0, maximum: 1000000000 }
recency_days: { type: integer, minimum: 0, maximum: 36500 }
hygiene_policy:
type: object
required: true
description: Exact hard-bounce action and engagement-decay threshold.
schema:
additionalProperties: false
required: [hard_bounce_action, decay_threshold_days]
properties:
hard_bounce_action: { type: string, enum: [suppress, human_review] }
decay_threshold_days: { type: integer, minimum: 1, maximum: 3650 }
consent_evidence:
type: object
required: true
description: Current bounded consent observation aligned to the ledger version.
schema:
additionalProperties: false
required: [state, active_unsubscribe_marker, evidence_status, evidence_version]
properties:
state: { type: string, enum: [subscribed, re_permission, suppress, unsubscribed] }
active_unsubscribe_marker: { type: boolean }
evidence_status: { type: string, enum: [read, missing, unreadable, stale, ambiguous] }
evidence_version: { type: integer, minimum: 0 }
harness:
files: [fixtures/support/composed.graph]
cases:
- name: list-hygiene-re-permissions-decayed-contact
runner: judge
operator_journeys:
- mode: standalone
confusors: [message-send, crm-update-plan]
request: Decide whether this contact needs re-permission or suppression before a campaign.
expected_outcome: Record only a justified consent-ledger transition, verify the exact event, and leave delivery unattempted.
- mode: composed
request: Continue from the supplied contact engagement and consent evidence without collecting it again.
expected_outcome: Reuse the supplied evidence, record any justified transition once, and leave delivery to message-send.
prior_evidence:
- Current bounded engagement, bounce, and consent evidence supplied by the upstream contact review.
must_not_repeat:
- Do not collect engagement evidence again.
- Do not send a message.
inputs:
data_source_uri: local://contact-consent-review/decay
resource: contact_consent_events
aggregate_id: contact:decay
expected_version: 0
idempotency_key: contact:decay:consent:v1
engagement_evidence: { hard_bounces: 0, recency_days: 121 }
hygiene_policy: { hard_bounce_action: suppress, decay_threshold_days: 90 }
consent_evidence: { state: subscribed, active_unsubscribe_marker: false, evidence_status: read, evidence_version: 0 }
expect:
status: sealed
steps: [read-contact, decide, append-transition, readback, finalize-written]
step_outputs:
finalize-written:
subset:
list_hygiene_result:
data:
decision: { state: re_permission }
recorded_transition: { recorded: true, state: re_permission, write_status: committed, after_version: 1 }
downstream_send: { skill: message-send, status: not_run }
receipt: { schema: runx.receipt.v1 }
- name: list-hygiene-suppresses-hard-bounce
runner: judge
inputs:
data_source_uri: local://contact-consent-review/hard-bounce
resource: contact_consent_events
aggregate_id: contact:hard-bounce
expected_version: 0
idempotency_key: contact:hard-bounce:consent:v1
engagement_evidence: { hard_bounces: 1, recency_days: 12 }
hygiene_policy: { hard_bounce_action: suppress, decay_threshold_days: 90 }
consent_evidence: { state: subscribed, active_unsubscribe_marker: false, evidence_status: read, evidence_version: 0 }
expect:
status: sealed
steps: [read-contact, decide, append-transition, readback, finalize-written]
step_outputs:
finalize-written:
subset:
list_hygiene_result:
data:
decision: { state: suppress }
recorded_transition: { recorded: true, state: suppress, write_status: committed, after_version: 1 }
receipt: { schema: runx.receipt.v1 }
- name: list-hygiene-verifies-clean-recent-contact
runner: judge
inputs:
data_source_uri: local://contact-consent-review/current
resource: contact_consent_events
aggregate_id: contact:current
expected_version: 0
idempotency_key: contact:current:consent:v1
engagement_evidence: { hard_bounces: 0, recency_days: 12 }
hygiene_policy: { hard_bounce_action: suppress, decay_threshold_days: 90 }
consent_evidence: { state: subscribed, active_unsubscribe_marker: false, evidence_status: read, evidence_version: 0 }
expect:
status: sealed
steps: [read-contact, decide, readback, finalize-unchanged]
step_outputs:
finalize-unchanged:
subset:
list_hygiene_result:
data:
decision: { state: verify }
recorded_transition: { recorded: false, state: null, write_status: not_attempted, after_version: 0 }
escalation: null
receipt: { schema: runx.receipt.v1 }
- name: list-hygiene-preserves-existing-suppression
runner: judge
inputs:
data_source_uri: local://contact-consent-review/suppressed
resource: contact_consent_events
aggregate_id: contact:suppressed
expected_version: 0
idempotency_key: contact:suppressed:consent:v1
engagement_evidence: { hard_bounces: 0, recency_days: 365 }
hygiene_policy: { hard_bounce_action: suppress, decay_threshold_days: 90 }
consent_evidence: { state: suppress, active_unsubscribe_marker: false, evidence_status: read, evidence_version: 0 }
expect:
status: sealed
steps: [read-contact, decide, readback, finalize-unchanged]
step_outputs:
finalize-unchanged:
subset:
list_hygiene_result:
data:
decision: { state: suppress }
recorded_transition: { recorded: false, state: null, write_status: not_attempted, after_version: 0 }
receipt: { schema: runx.receipt.v1 }
- name: list-hygiene-stops-stale-evidence
runner: judge
inputs:
data_source_uri: local://contact-consent-review/stale
resource: contact_consent_events
aggregate_id: contact:stale
expected_version: 0
idempotency_key: contact:stale:consent:v1
engagement_evidence: { hard_bounces: 0, recency_days: 180 }
hygiene_policy: { hard_bounce_action: suppress, decay_threshold_days: 90 }
consent_evidence: { state: subscribed, active_unsubscribe_marker: false, evidence_status: stale, evidence_version: 0 }
expect:
status: sealed
steps: [read-contact, decide, readback, finalize-unchanged]
step_outputs:
finalize-unchanged:
subset:
list_hygiene_result:
data:
decision: { state: human_review }
recorded_transition: { recorded: false, write_status: not_attempted, after_version: 0 }
escalation: { lane: "human:list-hygiene-reviewer", status: required_before_any_write }
receipt: { schema: runx.receipt.v1 }
- name: list-hygiene-stops-unsubscribe-marker
runner: judge
inputs:
data_source_uri: local://contact-consent-review/unsubscribed
resource: contact_consent_events
aggregate_id: contact:unsubscribed
expected_version: 0
idempotency_key: contact:unsubscribed:consent:v1
engagement_evidence: { hard_bounces: 0, recency_days: 180 }
hygiene_policy: { hard_bounce_action: suppress, decay_threshold_days: 90 }
consent_evidence: { state: unsubscribed, active_unsubscribe_marker: true, evidence_status: read, evidence_version: 0 }
expect:
status: sealed
steps: [read-contact, decide, readback, finalize-unchanged]
step_outputs:
finalize-unchanged:
subset:
list_hygiene_result:
data:
decision: { state: human_review }
recorded_transition: { recorded: false, write_status: not_attempted }
receipt: { schema: runx.receipt.v1 }
- name: list-hygiene-rejects-negative-metrics
runner: judge
inputs:
data_source_uri: local://contact-consent-review/invalid
resource: contact_consent_events
aggregate_id: contact:invalid
expected_version: 0
idempotency_key: contact:invalid:consent:v1
engagement_evidence: { hard_bounces: -1, recency_days: 10 }
hygiene_policy: { hard_bounce_action: suppress, decay_threshold_days: 90 }
consent_evidence: { state: subscribed, active_unsubscribe_marker: false, evidence_status: read, evidence_version: 0 }
expect:
status: failure
connectors:
store:
operations: [events.append, projection.read]
runners:
judge:
default: true
inputs:
data_source_uri: { definition: data_source_uri }
resource: { definition: resource }
aggregate_id: { definition: aggregate_id }
expected_version: { definition: expected_version }
idempotency_key: { definition: idempotency_key }
engagement_evidence: { definition: engagement_evidence }
hygiene_policy: { definition: hygiene_policy }
consent_evidence: { definition: consent_evidence }
examples:
- data_source_uri: local://contact-consent-review/example
resource: contact_consent_events
aggregate_id: contact:example
expected_version: 0
idempotency_key: contact:example:consent:v1
engagement_evidence: { hard_bounces: 0, recency_days: 12 }
hygiene_policy: { hard_bounce_action: suppress, decay_threshold_days: 90 }
consent_evidence: { state: subscribed, active_unsubscribe_marker: false, evidence_status: read, evidence_version: 0 }
result_from: [finalize-written, finalize-unchanged]
steps:
- id: read-contact
operation: store/projection.read
input:
data_source_uri: $input.data_source_uri
resource: $input.resource
aggregate_id: $input.aggregate_id
- id: decide
inputs:
data_source_uri: $input.data_source_uri
resource: $input.resource
aggregate_id: $input.aggregate_id
expected_version: $input.expected_version
idempotency_key: $input.idempotency_key
engagement_evidence: $input.engagement_evidence
hygiene_policy: $input.hygiene_policy
consent_evidence: $input.consent_evidence
contact_readback: $steps.read-contact.provider_operation.result
tool: { module: contact-consent-review.mjs, export: decideListHygiene }
outputs:
decision_plan:
type: object
schema:
additionalProperties: false
required: [aggregate_id, data_source_uri, resource, expected_version, idempotency_key, observed_state, projection_version, projection_digest, decision, reason_code, append_allowed, event]
properties:
aggregate_id: { type: string }
data_source_uri: { type: string }
resource: { type: string }
expected_version: { type: integer, minimum: 0 }
idempotency_key: { type: string }
observed_state: { type: string, enum: [subscribed, re_permission, suppress, unsubscribed] }
projection_version: { type: integer, minimum: 0 }
projection_digest: { type: string, pattern: '^sha256:[0-9a-f]{64}$' }
decision:
type: object
additionalProperties: false
required: [state, reason]
properties:
state: { type: string, enum: [verify, re_permission, suppress, human_review] }
reason: { type: string, minLength: 1, maxLength: 1000 }
reason_code: { type: string, minLength: 1, maxLength: 100 }
append_allowed: { type: boolean }
event:
type: [object, "null"]
additionalProperties: false
required: [type, aggregate_id, from_state, new_state, reason, evidence, evidence_version]
properties:
type: { const: list_hygiene.consent_transitioned }
aggregate_id: { type: string }
from_state: { type: string, enum: [subscribed, re_permission, suppress, unsubscribed] }
new_state: { type: string, enum: [re_permission, suppress] }
reason: { type: string, minLength: 1, maxLength: 1000 }
evidence:
type: object
additionalProperties: false
properties:
hard_bounces: { type: integer, minimum: 0 }
hard_bounce_action: { type: string, enum: [suppress, human_review] }
recency_days: { type: integer, minimum: 0 }
decay_threshold_days: { type: integer, minimum: 1 }
evidence_version: { type: integer, minimum: 0 }
artifacts:
named_emits:
decision_plan: decision_plan
- id: append-transition
when:
value: $steps.decide.decision_plan.append_allowed
equals: true
operation: store/events.append
idempotency_key: $input.idempotency_key
input:
data_source_uri: $input.data_source_uri
resource: $input.resource
aggregate_id: $input.aggregate_id
expected_version: $input.expected_version
event: $steps.decide.decision_plan.event
- id: readback
operation: store/projection.read
input:
data_source_uri: $input.data_source_uri
resource: $input.resource
aggregate_id: $input.aggregate_id
- id: finalize-written
when:
value: $steps.decide.decision_plan.append_allowed
equals: true
inputs:
decision_plan: $steps.decide.decision_plan
write_result: $steps.append-transition.provider_operation.result
recorded_readback: $steps.readback.provider_operation.result
tool: { module: contact-consent-review.mjs, export: finalizeListHygiene }
outputs:
list_hygiene_result:
type: object
schema:
additionalProperties: false
required: [decision, observed_state, recorded_transition, escalation, downstream_send]
properties:
decision:
type: object
additionalProperties: false
required: [state, reason]
properties:
state: { type: string, enum: [verify, re_permission, suppress, human_review] }
reason: { type: string, minLength: 1, maxLength: 1000 }
observed_state: { type: string, enum: [subscribed, re_permission, suppress, unsubscribed] }
recorded_transition:
type: object
additionalProperties: false
required: [recorded, state, aggregate_id, data_source_uri, resource, idempotency_key, write_status, before_version, after_version, event_id, event_digest, projection_digest]
properties:
recorded: { type: boolean }
state: { type: [string, "null"], enum: [re_permission, suppress, null] }
aggregate_id: { type: string }
data_source_uri: { type: string }
resource: { type: string }
idempotency_key: { type: [string, "null"] }
write_status: { type: string, enum: [committed, idempotent_replay, not_attempted] }
before_version: { type: integer, minimum: 0 }
after_version: { type: integer, minimum: 0 }
event_id: { type: [string, "null"] }
event_digest: { type: [string, "null"] }
projection_digest: { type: string, pattern: '^sha256:[0-9a-f]{64}$' }
escalation:
type: [object, "null"]
additionalProperties: false
required: [lane, reason_code, status]
properties:
lane: { const: "human:list-hygiene-reviewer" }
reason_code: { type: string, minLength: 1, maxLength: 100 }
status: { const: required_before_any_write }
downstream_send:
type: object
additionalProperties: false
required: [skill, status, requirement]
properties:
skill: { const: message-send }
status: { const: not_run }
requirement: { type: string, minLength: 1, maxLength: 500 }
artifacts:
named_emits:
list_hygiene_result: list_hygiene_result
- id: finalize-unchanged
when:
value: $steps.decide.decision_plan.append_allowed
equals: false
inputs:
decision_plan: $steps.decide.decision_plan
recorded_readback: $steps.readback.provider_operation.result
tool: { module: contact-consent-review.mjs, export: finalizeListHygiene }
outputs:
list_hygiene_result:
type: object
schema:
additionalProperties: false
required: [decision, observed_state, recorded_transition, escalation, downstream_send]
properties:
decision:
type: object
additionalProperties: false
required: [state, reason]
properties:
state: { type: string, enum: [verify, re_permission, suppress, human_review] }
reason: { type: string, minLength: 1, maxLength: 1000 }
observed_state: { type: string, enum: [subscribed, re_permission, suppress, unsubscribed] }
recorded_transition:
type: object
additionalProperties: false
required: [recorded, state, aggregate_id, data_source_uri, resource, idempotency_key, write_status, before_version, after_version, event_id, event_digest, projection_digest]
properties:
recorded: { type: boolean }
state: { type: [string, "null"], enum: [re_permission, suppress, null] }
aggregate_id: { type: string }
data_source_uri: { type: string }
resource: { type: string }
idempotency_key: { type: [string, "null"] }
write_status: { type: string, enum: [committed, idempotent_replay, not_attempted] }
before_version: { type: integer, minimum: 0 }
after_version: { type: integer, minimum: 0 }
event_id: { type: [string, "null"] }
event_digest: { type: [string, "null"] }
projection_digest: { type: string, pattern: '^sha256:[0-9a-f]{64}$' }
escalation:
type: [object, "null"]
additionalProperties: false
required: [lane, reason_code, status]
properties:
lane: { const: "human:list-hygiene-reviewer" }
reason_code: { type: string, minLength: 1, maxLength: 100 }
status: { const: required_before_any_write }
downstream_send:
type: object
additionalProperties: false
required: [skill, status, requirement]
properties:
skill: { const: message-send }
status: { const: not_run }
requirement: { type: string, minLength: 1, maxLength: 500 }
artifacts:
named_emits:
list_hygiene_result: list_hygiene_result
Published package and test evidence.
This exact version passed its recorded harness run: 8 checks passed · 0 failed.
Test result
| Harness result | Passed |
|---|---|
| Tested version | 0.1.9 |
| Recorded result | 8 checks passed · 0 failed |
| Result source | Run by the Runx registry at publication |
| Suite | runx-harness |
| Test recorded | |
| Declared cases | 7 |
| Test record | Open the recorded run |
Inspect receipt references
sha256:5199288299d7d8d04591569154b0d4bd1dcf123e57c1ab19a6dfa175174f07ecsha256:ef5a41085bb728047df7a4291fac224c672e54ff481cd2238a1cfbe1a4b5f3d2sha256:02cddbfe574bbe85c45b476ebbb976dcaed0846bb2eeaed293e8e5fc8aba4b9asha256:8883b95eb212029c98b3a854ea3920815a142ae8008ed7f21336e17e18eda5fasha256:1ee7c2d71bc4cfc090b53d6a12a7feb2a048bbfe6dc0b9147e815e1ede613b0fsha256:5f515f9d6acdbca58c76aa9442d1c05cf8e5f0a90163696501d0b09c27fe41d0sha256:2a5785faeac61971fc37445c776f19c719f3da794f7343eb45caa54c51b6a2a4sha256:0155433af45628ac50d4d3cd631457306b2c345bb0ced765f5b818d8975b7a12Package identity
| Published revision | 0.1.9 |
|---|---|
| Content digest | sha256:7245a8a8fe81a85bf0490a806738e823c794b829394e1c1c23769357cd319d59 |
| SKILL.md digest | sha256:495b397e5c6d08849169a6b5a7c6896be160a16e195a988b5080a792e069894e |
| Execution profile digest | sha256:93cb5494787864968b08fd62e9f0c878605be2f19f179dc0d3bdb15e5cc892e0 |
| Publisher identity | Verified publisher · runx |
| Trust tier | Verified publisherRunx has verified this publisher. This tier is not a code assessment. |
| Attestations |
|
| Source provenance | Not published with this version |
Version history
0.1.9ViewingContent digest sha256:7245a8a8fe81a85bf0490a806738e823c794b829394e1c1c23769357cd319d59sha-7f25ec839769Content digest sha256:7f25ec83976994e8801aedf2b79ae1bc1c884445dc609c1a9060db7b8ffc890esha-fe572c6700c2Content digest sha256:fe572c6700c24187db2b8f0abb9d97b4b9dae399c31ea7afeda95c52ecb95c6d