2026-08-23 22:07:38 -03:00
{
"$schema" : "https://json-schema.org/draft/2020-12/schema" ,
"$id" : "https://hermes.bstein.dev/contracts/hux/v1/privacy.schema.json" ,
"title" : "HUX privacy policy, topic scoping and retention" ,
"description" : "Sensitive-topic behaviour (HUX-10). The policy names each topic class, whether memory may be written from it, how long conversation-scoped context survives, and which just-in-time notice the surface must show. A retention audit record proves the rules ran." ,
"$defs" : {
2026-08-24 00:27:38 -03:00
"topic" : {
"type" : "string" ,
"enum" : [
"health" ,
"finance" ,
"legal" ,
"relationships" ,
"credentials" ,
"minors" ,
"location" ,
"biometric"
]
} ,
2026-08-23 22:07:38 -03:00
"policy" : {
"type" : "object" ,
"additionalProperties" : false ,
2026-08-24 00:27:38 -03:00
"required" : [
"schema" ,
"version" ,
"topics" ,
"topic_scoping" ,
"retention_audit"
] ,
2026-08-23 22:07:38 -03:00
"properties" : {
2026-08-24 00:27:38 -03:00
"schema" : {
"const" : "hux.privacy_policy.v1"
} ,
"version" : {
"type" : "integer" ,
"minimum" : 1
} ,
2026-08-23 22:07:38 -03:00
"topics" : {
"type" : "array" ,
"minItems" : 8 ,
"items" : {
"type" : "object" ,
"additionalProperties" : false ,
2026-08-24 00:27:38 -03:00
"required" : [
"topic" ,
"sensitivity" ,
"memory_write" ,
"decay_days" ,
"notice"
] ,
2026-08-23 22:07:38 -03:00
"properties" : {
2026-08-24 00:27:38 -03:00
"topic" : {
"$ref" : "#/$defs/topic"
} ,
"sensitivity" : {
"$ref" : "common.schema.json#/$defs/sensitivity"
} ,
"memory_write" : {
"type" : "string" ,
"enum" : [
"ask" ,
"deny"
]
} ,
"decay_days" : {
"type" : "integer" ,
"minimum" : 1 ,
"maximum" : 365
} ,
"notice" : {
"type" : "string" ,
"minLength" : 1 ,
"maxLength" : 280
}
2026-08-23 22:07:38 -03:00
}
}
} ,
"topic_scoping" : {
"type" : "object" ,
"additionalProperties" : false ,
2026-08-24 00:27:38 -03:00
"required" : [
"scope_to_conversation" ,
"cross_surface_sharing"
] ,
2026-08-23 22:07:38 -03:00
"properties" : {
2026-08-24 00:27:38 -03:00
"scope_to_conversation" : {
"const" : true
} ,
"cross_surface_sharing" : {
"type" : "string" ,
"enum" : [
"never" ,
"same_owner_only"
]
}
2026-08-23 22:07:38 -03:00
}
} ,
"retention_audit" : {
"type" : "object" ,
"additionalProperties" : false ,
2026-08-24 00:27:38 -03:00
"required" : [
"interval_days" ,
"actions"
] ,
2026-08-23 22:07:38 -03:00
"properties" : {
2026-08-24 00:27:38 -03:00
"interval_days" : {
"type" : "integer" ,
"minimum" : 1 ,
"maximum" : 30
} ,
"actions" : {
"type" : "array" ,
"minItems" : 1 ,
"uniqueItems" : true ,
"items" : {
"type" : "string" ,
"enum" : [
"expire_memory" ,
"decay_topic_context" ,
"purge_forgotten_content" ,
"report"
]
}
}
2026-08-23 22:07:38 -03:00
}
2026-08-24 00:27:38 -03:00
} ,
"audit_stale" : {
"type" : "boolean" ,
"description" : "True when the last retention audit is older than 48 hours (SO-27)."
2026-08-23 22:07:38 -03:00
}
}
} ,
"notice" : {
"type" : "object" ,
"description" : "Just-in-time notice a surface shows when a sensitive topic is detected. Emitted as event kind privacy.notice." ,
"additionalProperties" : false ,
2026-08-24 00:27:38 -03:00
"required" : [
"schema" ,
"topic" ,
"conversation_id" ,
"text" ,
"controls" ,
"shown_at"
] ,
2026-08-23 22:07:38 -03:00
"properties" : {
2026-08-24 00:27:38 -03:00
"schema" : {
"const" : "hux.privacy_notice.v1"
} ,
"topic" : {
"$ref" : "#/$defs/topic"
} ,
"conversation_id" : {
"$ref" : "common.schema.json#/$defs/id"
} ,
"text" : {
"type" : "string" ,
"minLength" : 1 ,
"maxLength" : 280
} ,
"controls" : {
"type" : "array" ,
"minItems" : 1 ,
"uniqueItems" : true ,
"items" : {
"type" : "string" ,
"enum" : [
"forget_this_conversation" ,
"switch_to_private" ,
"disable_memory_here" ,
"dismiss"
]
}
} ,
"shown_at" : {
"$ref" : "common.schema.json#/$defs/timestamp"
}
2026-08-23 22:07:38 -03:00
}
} ,
"audit" : {
"type" : "object" ,
"additionalProperties" : false ,
2026-08-24 00:27:38 -03:00
"required" : [
"schema" ,
"id" ,
"ran_at" ,
"policy_version" ,
"results"
] ,
2026-08-23 22:07:38 -03:00
"properties" : {
2026-08-24 00:27:38 -03:00
"schema" : {
"const" : "hux.retention_audit.v1"
} ,
"id" : {
"$ref" : "common.schema.json#/$defs/id"
} ,
"ran_at" : {
"$ref" : "common.schema.json#/$defs/timestamp"
} ,
"policy_version" : {
"type" : "integer" ,
"minimum" : 1
} ,
2026-08-23 22:07:38 -03:00
"results" : {
"type" : "array" ,
"items" : {
"type" : "object" ,
"additionalProperties" : false ,
2026-08-24 00:27:38 -03:00
"required" : [
"action" ,
"count"
] ,
2026-08-23 22:07:38 -03:00
"properties" : {
2026-08-24 00:27:38 -03:00
"action" : {
"type" : "string" ,
"enum" : [
"expire_memory" ,
"decay_topic_context" ,
"purge_forgotten_content" ,
"report"
]
} ,
"count" : {
"type" : "integer" ,
"minimum" : 0
}
2026-08-23 22:07:38 -03:00
}
}
}
}
}
} ,
"oneOf" : [
2026-08-24 00:27:38 -03:00
{
"$ref" : "#/$defs/policy"
} ,
{
"$ref" : "#/$defs/notice"
} ,
{
"$ref" : "#/$defs/audit"
}
2026-08-23 22:07:38 -03:00
]
}