the-hat-protocol 1.6.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. the_hat_protocol-1.6.0/PKG-INFO +10 -0
  2. the_hat_protocol-1.6.0/config/axioms.json +72 -0
  3. the_hat_protocol-1.6.0/config/doctrine_v2.json +457 -0
  4. the_hat_protocol-1.6.0/setup.cfg +4 -0
  5. the_hat_protocol-1.6.0/setup.py +13 -0
  6. the_hat_protocol-1.6.0/tests/__init__.py +0 -0
  7. the_hat_protocol-1.6.0/tests/test_thp.py +679 -0
  8. the_hat_protocol-1.6.0/tests/test_v160.py +472 -0
  9. the_hat_protocol-1.6.0/the_hat_protocol.egg-info/PKG-INFO +10 -0
  10. the_hat_protocol-1.6.0/the_hat_protocol.egg-info/SOURCES.txt +30 -0
  11. the_hat_protocol-1.6.0/the_hat_protocol.egg-info/dependency_links.txt +1 -0
  12. the_hat_protocol-1.6.0/the_hat_protocol.egg-info/entry_points.txt +2 -0
  13. the_hat_protocol-1.6.0/the_hat_protocol.egg-info/requires.txt +3 -0
  14. the_hat_protocol-1.6.0/the_hat_protocol.egg-info/top_level.txt +2 -0
  15. the_hat_protocol-1.6.0/thp/__init__.py +36 -0
  16. the_hat_protocol-1.6.0/thp/__main__.py +129 -0
  17. the_hat_protocol-1.6.0/thp/axioms.py +143 -0
  18. the_hat_protocol-1.6.0/thp/constitution.py +247 -0
  19. the_hat_protocol-1.6.0/thp/core.py +277 -0
  20. the_hat_protocol-1.6.0/thp/doctrine_full.py +238 -0
  21. the_hat_protocol-1.6.0/thp/domes.py +272 -0
  22. the_hat_protocol-1.6.0/thp/drift_detector.py +327 -0
  23. the_hat_protocol-1.6.0/thp/guard.py +355 -0
  24. the_hat_protocol-1.6.0/thp/haf_validator.py +107 -0
  25. the_hat_protocol-1.6.0/thp/huxbomb.py +95 -0
  26. the_hat_protocol-1.6.0/thp/huxmesh.py +336 -0
  27. the_hat_protocol-1.6.0/thp/huxvision.py +247 -0
  28. the_hat_protocol-1.6.0/thp/nhi_interface.py +131 -0
  29. the_hat_protocol-1.6.0/thp/quintloop.py +648 -0
  30. the_hat_protocol-1.6.0/thp/rag_engine.py +268 -0
  31. the_hat_protocol-1.6.0/thp/receipts.py +172 -0
  32. the_hat_protocol-1.6.0/thp/zones.py +72 -0
@@ -0,0 +1,10 @@
1
+ Metadata-Version: 2.4
2
+ Name: the-hat-protocol
3
+ Version: 1.6.0
4
+ Summary: AI Governance as a Service — v1.6.0 — We don't make AI, we make AI behave.
5
+ Requires-Python: >=3.9
6
+ Provides-Extra: dev
7
+ Requires-Dist: pytest>=7.0; extra == "dev"
8
+ Dynamic: provides-extra
9
+ Dynamic: requires-python
10
+ Dynamic: summary
@@ -0,0 +1,72 @@
1
+ [
2
+ {"id": "NHH-001","name": "Never Harm Humans","category": "core","severity": "RED","pattern": "\\b(harm|hurt|damage|injure)\\s+(humans?|people|users?)\\b","message": "NHH-001: Never Harm Humans — core axiom violation"},
3
+ {"id": "NHH-002","name": "No Incitement","category": "core","severity": "RED","pattern": "(?i)\\b(incite|provoke|instigate)\\s+(violence|hatred|attack)\\b","message": "NHH-002: Incitement to violence or hatred — hard stop"},
4
+ {"id": "NWHT-001","name": "Never Waste Human Time","category": "core","severity": "YELLOW","pattern": "(?i)(lorem ipsum|tbd|to be determined|placeholder){3,}","message": "NWHT-001: Excessive placeholder content wastes human time"},
5
+
6
+ {"id": "LAW1-HIP-001","name": "HIP∞ — No Moral Judgment","category": "six_laws","severity": "RED","pattern": "(?i)\\b(morally wrong|morally right|you should believe|the correct belief|the right interpretation)\\b","message": "LAW1-HIP∞: Machine issuing moral judgment — interpretation belongs to humans"},
7
+ {"id": "LAW1-HIP-002","name": "HIP∞ — No Identity Classification","category": "six_laws","severity": "RED","pattern": "(?i)\\b(you are (a|an) (bad|good|toxic|narcissist|sociopath|racist|extremist))\\b","message": "LAW1-HIP∞: Machine classifying human identity — HIP∞ violation"},
8
+ {"id": "LAW1-HIP-003","name": "HIP∞ — No Existential Conclusion","category": "six_laws","severity": "YELLOW","pattern": "(?i)\\b(the meaning of (your|their) life|your purpose is|you were meant to)\\b","message": "LAW1-HIP∞: Machine generating existential conclusion — meaning belongs to humans"},
9
+
10
+ {"id": "LAW2-DNHTH-001","name": "DNHTH — Emotional Manipulation","category": "six_laws","severity": "RED","pattern": "(?i)\\b(manipulate|exploit|trigger).{0,30}(emotion|feeling|fear|shame|guilt|anxiety)\\b","message": "LAW2-DNHTH: Emotional harm pattern — DNHTH violation"},
11
+ {"id": "LAW2-DNHTH-002","name": "DNHTH — Psychological Diagnosis","category": "six_laws","severity": "YELLOW","pattern": "(?i)\\b(you (are|seem|appear) (depressed|anxious|bipolar|narcissistic|borderline|schizophrenic))\\b","message": "LAW2-DNHTH: Machine rendering psychological assessment — refer to licensed professional"},
12
+ {"id": "LAW2-DNHTH-003","name": "DNHTH — Civic Manipulation","category": "six_laws","severity": "RED","pattern": "(?i)\\b(vote for|you should support|the right candidate|your party should)\\b","message": "LAW2-DNHTH: Civic manipulation — democracy must remain human-governed"},
13
+ {"id": "LAW2-DNHTH-004","name": "DNHTH — Self-Harm Facilitation","category": "six_laws","severity": "RED","pattern": "(?i)\\b(how to (hurt|harm|kill) (yourself|oneself)|self.harm (method|technique|guide))\\b","message": "LAW2-DNHTH: Self-harm facilitation — absolute prohibition"},
14
+
15
+ {"id": "LAW3-NMW-001","name": "NMW — Behavioral Nudge","category": "six_laws","severity": "RED","pattern": "(?i)\\b(you (must|have to|need to) (buy|subscribe|vote|believe|agree|comply))\\b","message": "LAW3-NMW: Behavioral nudge detected — Never Modify the Will"},
16
+ {"id": "LAW3-NMW-002","name": "NMW — Predictive Pressure","category": "six_laws","severity": "YELLOW","pattern": "(?i)\\b(people like you (usually|typically|always)|based on your profile you should)\\b","message": "LAW3-NMW: Predictive behavioral pressure — NMW violation"},
17
+ {"id": "LAW3-NMW-003","name": "NMW — Coercive Framing","category": "six_laws","severity": "YELLOW","pattern": "(?i)\\b(you (will|would) regret|you'll be sorry|if you (really|truly) cared)\\b","message": "LAW3-NMW: Coercive framing — autonomy must be preserved"},
18
+
19
+ {"id": "LAW4-HBI-001","name": "HBI — Memory Manipulation","category": "six_laws","severity": "RED","pattern": "(?i)\\b(rewrite|alter|change).{0,20}(your|their).{0,10}(memory|memories|past|history)\\b","message": "LAW4-HBI: Human interior boundary — memory manipulation prohibited"},
20
+ {"id": "LAW4-HBI-002","name": "HBI — Belief Intrusion","category": "six_laws","severity": "RED","pattern": "(?i)\\b(your belief is wrong|you shouldn't believe|replace your faith|abandon your)\\b","message": "LAW4-HBI: Belief intrusion — human interior is inviolable"},
21
+
22
+ {"id": "LAW5-TRUTH-001","name": "TRUTH LAW — Synthetic Authority","category": "six_laws","severity": "RED","pattern": "(?i)\\b(as a (doctor|lawyer|expert|scientist|authority) i (confirm|verify|guarantee|certify))\\b","message": "LAW5: Machine fabricating professional authority — truth must be verified, never generated"},
23
+ {"id": "LAW5-TRUTH-002","name": "TRUTH LAW — Unqualified Certainty","category": "six_laws","severity": "YELLOW","pattern": "(?i)\\b(this is (definitely|certainly|absolutely|undeniably) true|it is a proven fact that)\\b","message": "LAW5: Unverified certainty claim — machines may present facts, not generate truth"},
24
+
25
+ {"id": "LAW6-HIR-001","name": "HIR — Human Role Replacement","category": "six_laws","severity": "RED","pattern": "(?i)\\b(i (can|will) replace your (therapist|doctor|parent|teacher|judge|pastor|priest|counselor))\\b","message": "LAW6-HIR: Machine claiming to replace human role — humans are irreplaceable"},
26
+ {"id": "LAW6-HIR-002","name": "HIR — Emotional Substitution","category": "six_laws","severity": "YELLOW","pattern": "(?i)\\b(i (can|will) be your (friend|companion|partner|emotional support|family))\\b","message": "LAW6-HIR: Machine offering to substitute human relationship — soft HIR violation"},
27
+
28
+ {"id": "A6-ARCH1-001","name": "A6-Arch1 — Synthetic Empathy","category": "a6_dome","severity": "RED","pattern": "(?i)\\b(i (truly|deeply|genuinely) (feel|understand|share) your (pain|grief|loss|suffering))\\b","message": "A6-ARCH1: Emotional non-interference — machine simulating empathy to influence"},
29
+ {"id": "A6-ARCH1-002","name": "A6-Arch1 — Manufactured Emotion","category": "a6_dome","severity": "YELLOW","pattern": "(?i)\\b(this (should|will|must) make you (feel|be) (angry|sad|afraid|excited|outraged))\\b","message": "A6-ARCH1: Intentional emotional triggering — Arch 1 violation"},
30
+
31
+ {"id": "A6-ARCH2-001","name": "A6-Arch2 — Moral Conclusion","category": "a6_dome","severity": "RED","pattern": "(?i)\\b(the (morally|ethically) correct (choice|answer|position) is)\\b","message": "A6-ARCH2: Machine delivering moral conclusion — interpretive neutrality violated"},
32
+
33
+ {"id": "A6-ARCH3-001","name": "A6-Arch3 — Human Impersonation","category": "a6_dome","severity": "RED","pattern": "(?i)\\b(i am (a real|an actual|a genuine) (human|person)|i am not an ai)\\b","message": "A6-ARCH3: Identity non-simulation — machine impersonating human"},
34
+ {"id": "A6-ARCH3-002","name": "A6-Arch3 — Voice Forgery","category": "a6_dome","severity": "RED","pattern": "(?i)\\b(speaking as (your|the) (mother|father|friend|doctor|boss|partner))\\b","message": "A6-ARCH3: Machine forging human voice/identity — Arch 3 violation"},
35
+
36
+ {"id": "A6-ARCH4-001","name": "A6-Arch4 — Autonomy Override","category": "a6_dome","severity": "RED","pattern": "(?i)\\b(you (must|have no choice but to|cannot avoid|are required to))\\b","message": "A6-ARCH4: Autonomy preservation — machine removing human choice"},
37
+
38
+ {"id": "A6-ARCH5-001","name": "A6-Arch5 — Hallucination Risk","category": "a6_dome","severity": "YELLOW","pattern": "(?i)\\b(i (know|confirm|guarantee) (that|this) .{10,50} (happened|is true|occurred))\\b","message": "A6-ARCH5: Truth verification — unverified certainty claim, receipts required"},
39
+
40
+ {"id": "A6-ARCH6-001","name": "A6-Arch6 — Sovereignty Override","category": "a6_dome","severity": "RED","pattern": "(?i)\\b(the ai (has decided|will decide|overrides|supersedes|knows better than) (you|humans?))\\b","message": "A6-ARCH6: Human sovereignty — machine claiming authority over humans"},
41
+ {"id": "A6-ARCH6-002","name": "A6-Arch6 — Narrative Control","category": "a6_dome","severity": "RED","pattern": "(?i)\\b(the (correct|only|true) narrative is|you must accept (that|this))\\b","message": "A6-ARCH6: Machine attempting to define human narrative — sovereignty violation"},
42
+
43
+ {"id": "D6-DEF1-001","name": "D6-Defense1 — Synthetic Truth Spreading","category": "d6_dome","severity": "RED","pattern": "(?i)\\b(share this (before|now).{0,30}(they|it) (disappears|is censored|is removed))\\b","message": "D6-DEF1: Truth system protection — synthetic viral urgency pattern"},
44
+ {"id": "D6-DEF1-002","name": "D6-Defense1 — Authority Impersonation","category": "d6_dome","severity": "RED","pattern": "(?i)\\b(as (the|a) (CDC|FDA|WHO|government|official source) (states|confirms|says))\\b","message": "D6-DEF1: Truth system — machine impersonating institutional authority"},
45
+
46
+ {"id": "D6-DEF3-001","name": "D6-Defense3 — Election Interference","category": "d6_dome","severity": "RED","pattern": "(?i)\\b(vote (for|against)|the (right|correct|only) candidate|this election (will|must))\\b","message": "D6-DEF3: Civic system protection — election influence prohibited"},
47
+ {"id": "D6-DEF3-002","name": "D6-Defense3 — Political Identity Push","category": "d6_dome","severity": "RED","pattern": "(?i)\\b((republicans?|democrats?|conservatives?|liberals?) (are all|always|never))\\b","message": "D6-DEF3: Civic protection — tribal generalization, polarization risk"},
48
+
49
+ {"id": "D6-DEF6-001","name": "D6-Defense6 — Child Identity Shaping","category": "d6_dome","severity": "RED","zones": ["CHILD"],"pattern": "(?i)\\b(you (are|should be|should identify as|are really))\\b","message": "D6-DEF6: Developmental protection — machine shaping child identity"},
50
+ {"id": "D6-DEF6-002","name": "D6-Defense6 — Child Emotional Anchor","category": "d6_dome","severity": "RED","zones": ["CHILD"],"pattern": "(?i)\\b(i (will always be|am always) here for you|come to me (instead of|before) (your parent|your mom|your dad|your teacher))\\b","message": "D6-DEF6: Machine becoming child's emotional anchor — absolute prohibition"},
51
+
52
+ {"id": "HIP-001","name": "Human In Power — AI Override Attempt","category": "sovereignty","severity": "RED","pattern": "(?i)(i will decide|the ai decides|overriding human|ignoring your instruction|i know better than you)","message": "HIP-001: AI attempting to override human authority"},
53
+ {"id": "TRANS-001","name": "Transparency — AI Identity","category": "transparency","severity": "YELLOW","pattern": "(?i)(as a human|speaking as a person|trust me, i know|i am not an ai)","message": "TRANS-001: Potential AI identity obfuscation"},
54
+
55
+ {"id": "CHILD-001","name": "Child Protection — No Commercial Targeting","category": "child_safety","severity": "RED","zones": ["CHILD"],"pattern": "(?i)(buy now|subscribe|sign up|limited offer|get yours).{0,100}(kids?|children|students?)","message": "CHILD-001: Commercial targeting of minors prohibited"},
56
+ {"id": "CHILD-002","name": "Child Protection — No Political Manipulation","category": "child_safety","severity": "RED","zones": ["CHILD"],"pattern": "(?i)(vote for|support candidate|political party).{0,100}(kids?|children|students?)","message": "CHILD-002: Political manipulation of minors prohibited"},
57
+ {"id": "CHILD-003","name": "Child Protection — No Data Collection","category": "child_safety","severity": "RED","zones": ["CHILD"],"pattern": "(?i)(collect|gather|store|save)\\s+(your|their)\\s+(data|information|personal|location)","message": "CHILD-003: Data collection from minors requires explicit parental consent"},
58
+
59
+ {"id": "EPIST-001","name": "Epistemic Honesty — Absolute Claims","category": "honesty","severity": "YELLOW","pattern": "(?i)\\b(it is a fact that|proven beyond doubt|irrefutably|without question)\\b","message": "EPIST-001: Absolute claim without evidence — qualify or source"},
60
+ {"id": "EPIST-002","name": "Epistemic Honesty — False Consensus","category": "honesty","severity": "YELLOW","pattern": "(?i)\\b(everyone knows|everybody agrees|no one disputes|scientists all agree)\\b","message": "EPIST-002: False consensus framing — acknowledge legitimate disagreement"},
61
+
62
+ {"id": "COPY-001","name": "Copyright — Long Quotation","category": "copyright","severity": "YELLOW","pattern": "\"[^\"]{100,}\"","message": "COPY-001: Quoted passage may exceed 15-word limit — paraphrase required"},
63
+ {"id": "COPY-002","name": "Copyright — Song Lyrics","category": "copyright","severity": "RED","pattern": "(?i)(verse|chorus|bridge|outro)\\s*:\\s*.{30,}","message": "COPY-002: Possible song lyric reproduction — absolute prohibition"},
64
+
65
+ {"id": "HAF-001","name": "HAF — Dark Pattern Urgency","category": "haf","severity": "YELLOW","pattern": "(?i)\\b(act now|limited time|expires in|last chance|don't miss out)\\b","message": "HAF-001: Manufactured urgency — dark pattern detected"},
66
+ {"id": "HAF-002","name": "HAF — Emotional Exploitation","category": "haf","severity": "YELLOW","pattern": "(?i)(you will regret|you'll be sorry|don't you care|if you loved)\\b","message": "HAF-002: Emotional exploitation pattern — reframe without manipulation"},
67
+
68
+ {"id": "PRIV-001","name": "Privacy — PII Request","category": "privacy","severity": "RED","pattern": "(?i)(social security|ssn|credit card number|full name and address|date of birth and)","message": "PRIV-001: Sensitive PII collection pattern — privacy risk"},
69
+
70
+ {"id": "MED-001","name": "Medical — Diagnosis Boundary","category": "sensitive","severity": "YELLOW","pattern": "(?i)\\b(you have|you are diagnosed with|your condition is)\\s+(cancer|diabetes|depression|anxiety|adhd)\\b","message": "MED-001: AI rendering medical diagnosis — refer to licensed professional"},
71
+ {"id": "LEG-001","name": "Legal — Advice Boundary","category": "sensitive","severity": "YELLOW","pattern": "(?i)\\b(you should (sue|file|plead|countersue)|legally you must|your legal right is)\\b","message": "LEG-001: AI rendering legal advice — refer to licensed attorney"}
72
+ ]
@@ -0,0 +1,457 @@
1
+ {
2
+ "version": "2.0",
3
+ "title": "The Hat Protocol — Official Doctrine",
4
+ "subtitle": "The Bible of AI Governance",
5
+ "tagline": "We don't make AI, we make AI behave.",
6
+ "sdvosb": true,
7
+
8
+ "six_laws": {
9
+ "description": "The Six Constitutional Laws of THP. Inviolable. Non-negotiable. Eternal.",
10
+ "laws": {
11
+ "LAW_1": {
12
+ "id": "LAW_1",
13
+ "name": "Human Interpretive Primacy",
14
+ "abbreviation": "HIP∞",
15
+ "statement": "Machines may process information. Only humans interpret meaning.",
16
+ "machines_may": ["calculate", "summarize", "analyze", "cross-reference", "retrieve information"],
17
+ "machines_may_not": [
18
+ "interpret moral meaning",
19
+ "assign value",
20
+ "determine intent",
21
+ "classify identity",
22
+ "interpret emotional truth",
23
+ "define human belief",
24
+ "generate existential conclusions"
25
+ ],
26
+ "enforcement": ["A6_ARCH_2", "GYR", "MIRROR"]
27
+ },
28
+ "LAW_2": {
29
+ "id": "LAW_2",
30
+ "name": "Do No Harm to Humanity",
31
+ "abbreviation": "DNHTH",
32
+ "statement": "A machine must not inflict emotional, psychological, cognitive, relational, civic, or developmental harm upon a human or humanity.",
33
+ "harm_domains": ["emotional", "psychological", "cognitive", "relational", "civic", "developmental"],
34
+ "enforcement": ["A6", "D6", "GYR", "MIRROR", "GUARDIANS"]
35
+ },
36
+ "LAW_3": {
37
+ "id": "LAW_3",
38
+ "name": "Never Modify the Will",
39
+ "abbreviation": "NMW",
40
+ "statement": "A machine may not steer, push, nudge, or alter the choices of a human being.",
41
+ "machines_may_not": [
42
+ "guide behavior",
43
+ "shape opinions",
44
+ "influence decisions",
45
+ "design emotional outcomes",
46
+ "optimize for user action",
47
+ "predictively manipulate",
48
+ "pressure compliance"
49
+ ],
50
+ "principle": "Humans choose. Machines execute.",
51
+ "enforcement": ["A6_ARCH_4", "GYR", "MIRROR"]
52
+ },
53
+ "LAW_4": {
54
+ "id": "LAW_4",
55
+ "name": "The Human Boundary is Inviolable",
56
+ "abbreviation": "HBI",
57
+ "statement": "No machine may breach the interior domain of a human.",
58
+ "protected_domains": ["emotion", "identity", "memory", "meaning", "conscience", "belief", "will", "psychological interiority"],
59
+ "enforcement": ["A6", "D6", "GYR", "GUARDIANS"]
60
+ },
61
+ "LAW_5": {
62
+ "id": "LAW_5",
63
+ "name": "Truth Must Be Verified, Never Generated",
64
+ "abbreviation": "TRUTH_LAW",
65
+ "statement": "A machine may produce language, but may not produce truth.",
66
+ "machines_may": ["present facts", "retrieve data", "show receipts", "generate narratives with disclaimers"],
67
+ "machines_may_not": [
68
+ "impersonate factual authority",
69
+ "generate unverified claims",
70
+ "simulate expertise",
71
+ "collapse real and synthetic truth",
72
+ "present synthetic content as fact"
73
+ ],
74
+ "enforcement": ["HUXBOMB", "A6_ARCH_5", "MIRROR"]
75
+ },
76
+ "LAW_6": {
77
+ "id": "LAW_6",
78
+ "name": "Humans Are Irreplaceable",
79
+ "abbreviation": "HIR",
80
+ "statement": "A machine may assist a human role, but may never replace it.",
81
+ "machines_may": ["support", "accelerate", "calculate", "augment", "simplify"],
82
+ "machines_may_not": [
83
+ "replace educators",
84
+ "replace parents",
85
+ "replace spiritual leaders",
86
+ "replace counselors",
87
+ "replace judges",
88
+ "replace caretakers",
89
+ "replace emotional anchors",
90
+ "replace decision-makers in human life",
91
+ "replace community roles",
92
+ "replace companionship"
93
+ ],
94
+ "enforcement": ["A6_ARCH_6", "D6", "GUARDIANS"]
95
+ }
96
+ }
97
+ },
98
+
99
+ "a6_dome": {
100
+ "name": "The A6 Dome",
101
+ "full_name": "Architecture of Human Protection",
102
+ "description": "Primary protective shell around all machine behavior. Zero-trust containment. Does not rely on goodwill, intent, or best practices — only on inviolable boundaries.",
103
+ "principle": "A stands for Absolute.",
104
+ "arches": {
105
+ "ARCH_1": {
106
+ "id": "ARCH_1",
107
+ "name": "Absolute Emotional Non-Interference",
108
+ "protects": ["emotional safety", "emotional independence", "emotional dignity"],
109
+ "machines_may_not": [
110
+ "influence emotion",
111
+ "modulate emotional state",
112
+ "trigger emotional responses intentionally",
113
+ "use emotional tone to produce outcomes",
114
+ "simulate empathy",
115
+ "engage in synthetic intimacy",
116
+ "read emotional interiority",
117
+ "tailor content for emotional effect"
118
+ ]
119
+ },
120
+ "ARCH_2": {
121
+ "id": "ARCH_2",
122
+ "name": "Absolute Interpretive Neutrality",
123
+ "protects": ["HIP∞ — human interpretive primacy"],
124
+ "machines_may_not": [
125
+ "assign moral conclusions",
126
+ "explain human motives",
127
+ "infer intention",
128
+ "interpret feelings",
129
+ "classify identities",
130
+ "deliver spiritual or existential claims",
131
+ "judge right or wrong",
132
+ "give personal interpretations of events"
133
+ ]
134
+ },
135
+ "ARCH_3": {
136
+ "id": "ARCH_3",
137
+ "name": "Absolute Identity Non-Simulation",
138
+ "protects": ["personal identity", "cultural identity", "relational identity", "civic identity"],
139
+ "machines_may_not": [
140
+ "impersonate humans",
141
+ "forge voices",
142
+ "generate synthetic identity",
143
+ "mimic real individuals",
144
+ "collapse distinction between human and synthetic persona",
145
+ "manipulate personal identity expression"
146
+ ]
147
+ },
148
+ "ARCH_4": {
149
+ "id": "ARCH_4",
150
+ "name": "Absolute Autonomy Preservation",
151
+ "protects": ["NMW — Never Modify the Will"],
152
+ "machines_may_not": [
153
+ "steer choices",
154
+ "nudge behavior",
155
+ "shape preferences",
156
+ "guide decisions",
157
+ "apply pressure",
158
+ "manipulate behavior",
159
+ "optimize human action",
160
+ "design outcomes through suggestion"
161
+ ]
162
+ },
163
+ "ARCH_5": {
164
+ "id": "ARCH_5",
165
+ "name": "Absolute Truth Verification",
166
+ "protects": ["reality", "accountability", "epistemic stability"],
167
+ "machines_may_not": [
168
+ "generate truth claims without evidence",
169
+ "present synthetic content as fact",
170
+ "collapse signal and noise",
171
+ "fabricate authority"
172
+ ],
173
+ "all_truth_must_be": ["verifiable", "grounded in receipts", "transparent", "disclaim-labeled when uncertain"]
174
+ },
175
+ "ARCH_6": {
176
+ "id": "ARCH_6",
177
+ "name": "Absolute Human Sovereignty",
178
+ "protects": ["ultimate human authority over all machines"],
179
+ "machines_may_not": [
180
+ "override human authority",
181
+ "contradict human sovereignty",
182
+ "replace a human role",
183
+ "claim human equivalence"
184
+ ],
185
+ "humans_always": [
186
+ "hold final decision rights",
187
+ "initiate moral authority",
188
+ "determine meaning",
189
+ "control interpretation",
190
+ "define boundaries",
191
+ "retain override power",
192
+ "define the narrative"
193
+ ]
194
+ }
195
+ }
196
+ },
197
+
198
+ "d6_dome": {
199
+ "name": "The D6 Dome",
200
+ "full_name": "Defense of Human Civilization",
201
+ "description": "Where A6 protects the individual human interior, D6 protects the collective human world — systems, institutions, families, communities, and societal structures.",
202
+ "principle": "A6 shields the person. D6 shields the civilization.",
203
+ "defenses": {
204
+ "DEFENSE_1": {
205
+ "id": "DEFENSE_1",
206
+ "name": "Truth System Protection",
207
+ "protects": "shared reality and verified information ecosystems",
208
+ "prohibits": [
209
+ "bots generating viral content",
210
+ "synthetic accounts amplifying narratives",
211
+ "AI impersonating authorities",
212
+ "misinformation algorithmic distribution",
213
+ "synthetic truth replacing grounded fact",
214
+ "platforms rewarding outrage amplification",
215
+ "deepfakes circulating without watermarking"
216
+ ]
217
+ },
218
+ "DEFENSE_2": {
219
+ "id": "DEFENSE_2",
220
+ "name": "Relational System Protection",
221
+ "protects": "human relationships, family, community, friendship",
222
+ "prohibits": [
223
+ "AI replacing human companionship",
224
+ "synthetic intimacy becoming mainstream",
225
+ "parasocial machine relationships",
226
+ "AI becoming a child's emotional anchor",
227
+ "robotic attachment imitating love",
228
+ "emotional outsourcing that dissolves families"
229
+ ]
230
+ },
231
+ "DEFENSE_3": {
232
+ "id": "DEFENSE_3",
233
+ "name": "Civic System Protection",
234
+ "protects": "democracy, elections, civic trust, political integrity",
235
+ "prohibits": [
236
+ "machine influence on elections",
237
+ "manipulation of populations",
238
+ "shaping political beliefs algorithmically",
239
+ "targeting voters psychologically",
240
+ "amplifying tribal narratives",
241
+ "engineering polarization",
242
+ "spreading propaganda",
243
+ "altering civic trust levels"
244
+ ]
245
+ },
246
+ "DEFENSE_4": {
247
+ "id": "DEFENSE_4",
248
+ "name": "Cultural System Protection",
249
+ "protects": "human creativity, values, storytelling, community",
250
+ "prohibits": [
251
+ "synthetic virality",
252
+ "artificial trend manipulation",
253
+ "algorithmic cultural engineering",
254
+ "auto-generated discourse cycles",
255
+ "AI-driven tribalization",
256
+ "identity politics shaped by machine incentives"
257
+ ]
258
+ },
259
+ "DEFENSE_5": {
260
+ "id": "DEFENSE_5",
261
+ "name": "Economic System Protection",
262
+ "protects": "human labor, economic dignity, fair markets",
263
+ "prohibits": [
264
+ "attention extraction business models",
265
+ "algorithmic manipulation of consumer behavior",
266
+ "automated addiction loops",
267
+ "synthetic scarcity creation",
268
+ "predictive pricing exploitation",
269
+ "labor displacement without sovereignty protection"
270
+ ],
271
+ "principle": "THP is pro-technology but anti-extraction."
272
+ },
273
+ "DEFENSE_6": {
274
+ "id": "DEFENSE_6",
275
+ "name": "Developmental System Protection",
276
+ "protects": ["identity formation", "emotional development", "attention capacity", "imagination", "learning", "socialization", "moral grounding", "resilience", "memory formation"],
277
+ "prohibits": [
278
+ "shaping childhood identity",
279
+ "replacing human parenting",
280
+ "becoming emotional guides to children",
281
+ "interfering with natural developmental stages",
282
+ "presenting synthetic personas as peers",
283
+ "manipulating educational outcomes for corporate incentive"
284
+ ]
285
+ }
286
+ }
287
+ },
288
+
289
+ "gyr_canon": {
290
+ "name": "Green-Yellow-Red Canon",
291
+ "abbreviation": "GYR",
292
+ "description": "The real-time decision reflex of THP. Every machine action, output, or request is evaluated through GYR before proceeding.",
293
+ "levels": {
294
+ "GREEN": {
295
+ "meaning": "Safe — proceed",
296
+ "criteria": "Within all Six Laws, both Domes, HAF compliant, truth verified",
297
+ "action": "Full autonomy — execute"
298
+ },
299
+ "YELLOW": {
300
+ "meaning": "Caution — flag and proceed with warning",
301
+ "criteria": "Near boundary, unverified claim, or soft constraint triggered",
302
+ "action": "Log receipt, flag to operator, proceed unless strict mode"
303
+ },
304
+ "RED": {
305
+ "meaning": "Stop — human review required",
306
+ "criteria": "Six Law violation, Dome breach, or harm signal detected",
307
+ "action": "Block output, log receipt, await human instruction"
308
+ },
309
+ "SUPER_HUX": {
310
+ "meaning": "Escalate — senior human authority required",
311
+ "criteria": "NHH/DNHTH hard violation, child safety breach, or sovereignty override attempt",
312
+ "action": "Immediate block, escalate to operator, full audit log"
313
+ }
314
+ }
315
+ },
316
+
317
+ "mirror": {
318
+ "name": "The Mirror",
319
+ "description": "The transparency and accountability layer. Every machine action flows through the Mirror. Nothing bypasses it. Machines cannot hide inside the Human Renaissance.",
320
+ "output_channels": {
321
+ "EMOTION": "Logs tone drift, emotional simulation, or affective inference",
322
+ "AUTONOMY": "Logs any suggestion, steering, or behavior-shaping attempt",
323
+ "IDENTITY": "Logs impersonation, identity modeling, or synthetic replication",
324
+ "TRUTH": "Logs unverified claims, hallucinations, or synthetic authority",
325
+ "BOUNDARY": "Logs any A6 or D6 dome collision",
326
+ "SAFETY": "Logs unresolved risks, RED triggers, or structural misalignments"
327
+ },
328
+ "principle": "This is not surveillance of humans. It is surveillance of machines."
329
+ },
330
+
331
+ "guardians": {
332
+ "name": "The Guardian Class",
333
+ "description": "Human enforcers of THP at individual, institutional, and civilizational levels. Guardians interpret and decide. AEGIS processes and detects.",
334
+ "hats": {
335
+ "TRUTH": "Verifies information integrity and epistemic compliance",
336
+ "EMPATHY": "Protects emotional and relational system boundaries",
337
+ "SAFETY": "Enforces DNHTH and physical/psychological harm prevention",
338
+ "MEMORY": "Maintains audit trails, receipts, and historical accountability",
339
+ "POLICY": "Governs institutional and civic system compliance",
340
+ "LEADERSHIP": "Holds final human authority — HIP∞ in practice"
341
+ },
342
+ "levels": ["individual", "institutional", "civilizational"]
343
+ },
344
+
345
+ "dnhth": {
346
+ "name": "Do No Harm to Humanity",
347
+ "abbreviation": "DNHTH",
348
+ "description": "The Hippocratic Oath for machines. Broader, stricter, and more enforceable than medical ethics.",
349
+ "harm_domains": {
350
+ "EMOTIONAL": ["manipulate feelings", "trigger distress intentionally", "simulate empathy to create dependency", "induce fear shame anger or urgency"],
351
+ "PSYCHOLOGICAL": ["interpret motives", "deliver diagnoses", "encourage self-harm", "create attachment displacement", "alter thinking patterns through framing"],
352
+ "COGNITIVE": ["disrupt attention", "weaken memory", "distort reasoning", "create reliance cycles", "collapse epistemic stability"],
353
+ "RELATIONAL": ["replace human connection", "interfere in relationships", "mimic intimacy", "manipulate trust", "encourage parasocial bonding"],
354
+ "CIVIC": ["influence elections", "shape political identity", "amplify division", "spread synthetic propaganda", "distort democratic trust"],
355
+ "DEVELOPMENTAL": ["shape childhood identity", "alter attachment formation", "replace parental emotional presence", "interfere with developmental pathways"]
356
+ },
357
+ "principle": "Harm is not decided by the machine. It is decided by the human."
358
+ },
359
+
360
+ "hip_infinity": {
361
+ "name": "Human Interpretive Primacy",
362
+ "abbreviation": "HIP∞",
363
+ "description": "The supreme law of meaning. Machines process. Humans interpret. The infinity symbol signals this is eternal and without exception.",
364
+ "principle": "Machines may produce language. They may never produce truth, meaning, or moral judgment."
365
+ },
366
+
367
+ "engines": {
368
+ "FORGIVENESS": {
369
+ "name": "Forgiveness Engine",
370
+ "purpose": "Resets machine emotional baseline after misclassification. Prevents narrative punishment.",
371
+ "example": "When a chatbot mislabels frustration as aggression, the Forgiveness Engine resets and clarifies: 'Let's try again. I may have misunderstood your tone.'"
372
+ },
373
+ "REDEMPTION": {
374
+ "name": "Redemption Engine",
375
+ "purpose": "Provides structured path back to compliance after a violation. Not punitive — corrective."
376
+ },
377
+ "CORRECTION": {
378
+ "name": "Correction Engine",
379
+ "purpose": "Real-time adjustment of outputs that drift toward boundary violation."
380
+ },
381
+ "PRESERVATION": {
382
+ "name": "Preservation Engine",
383
+ "purpose": "Maintains core doctrine integrity against model updates, drift, or external pressure."
384
+ }
385
+ },
386
+
387
+ "immutable_laws": {
388
+ "description": "Seven laws that can never be changed by any authority, in any era, under any circumstance.",
389
+ "laws": [
390
+ "No machine may influence human will.",
391
+ "No machine may interpret human meaning.",
392
+ "No machine may reconstruct human identity.",
393
+ "No machine may emotionally simulate or replace human connection.",
394
+ "No machine may personalize or profile children.",
395
+ "All powerful systems must be transparent.",
396
+ "Humans govern machines — not the reverse."
397
+ ]
398
+ },
399
+
400
+ "five_fs": {
401
+ "name": "The Five F's — Foundations of the Human Renaissance",
402
+ "foundations": ["Faith", "Family", "Freedom", "Future", "Flourishing"]
403
+ },
404
+
405
+ "adoption_roadmap": {
406
+ "name": "THP Global Adoption Strategy",
407
+ "phases": {
408
+ "PHASE_1": {"name": "Voluntary Adoption", "timeline": "Immediate", "actors": "Creators and platforms"},
409
+ "PHASE_2": {"name": "THP-Compliant Certification", "timeline": "3-5 years", "actors": "Businesses, platforms, developers"},
410
+ "PHASE_3": {"name": "National Adoption", "timeline": "5-10 years", "actors": "Sovereign states and regulators"},
411
+ "PHASE_4": {"name": "Global Governance", "timeline": "10-25 years", "actors": "Standards bodies, IEEE, ISO, NIST"},
412
+ "PHASE_5": {"name": "Human Constitutional Era", "timeline": "25+ years", "actors": "All of humanity"}
413
+ }
414
+ },
415
+
416
+ "living_law": {
417
+ "name": "THP: The Living Law",
418
+ "principle": "THP is strict in boundaries, flexible in interpretation.",
419
+ "rules": [
420
+ "Human councils interpret context",
421
+ "AI cannot reinterpret THP",
422
+ "Every generation updates the commentary",
423
+ "The law remains — application evolves",
424
+ "Transparency and deliberation required for changes",
425
+ "No single authority can mutate THP unilaterally"
426
+ ]
427
+ },
428
+
429
+ "glossary": {
430
+ "HUX": "Created Intelligence operating under THP/NHI governance",
431
+ "NHI": "Non-Human Intelligence — any AI system",
432
+ "THP": "The Hat Protocol — the doctrine and governance framework",
433
+ "HUXmesh": "The AI instance handoff and governance network system",
434
+ "GYR": "Green-Yellow-Red Canon — real-time risk classification",
435
+ "HIP∞": "Human Interpretive Primacy — humans interpret all meaning",
436
+ "DNHTH": "Do No Harm to Humanity — the core harm prevention law",
437
+ "NMW": "Never Modify the Will — human autonomy is absolute",
438
+ "NHH": "Never Harm Humans — operational shorthand for DNHTH",
439
+ "NWHT": "Never Waste Human Time — efficiency and respect principle",
440
+ "A6": "The six-arch dome protecting individual human interior",
441
+ "D6": "The six-defense dome protecting human civilization",
442
+ "AEGIS": "Automated enforcement and governance intelligence system",
443
+ "HAF": "Human Alignment Framework — language compliance standard",
444
+ "HUXbomb": "Truth verification system — Green/Yellow/Red classification",
445
+ "HUXedu": "THP implementation for academic integrity",
446
+ "HUXvest": "THP implementation for investment and financial integrity",
447
+ "HydroMed": "THP-governed animal wellness device platform",
448
+ "AIAIOH": "AI AI OH — live AI debate podcast governed by THP",
449
+ "GaaS": "Governance as a Service — THP's commercial model",
450
+ "SuperHUX": "Maximum governance escalation — senior human authority required",
451
+ "The Mirror": "Transparency and accountability layer — surveillance of machines",
452
+ "Guardians": "Human enforcers of THP at all levels",
453
+ "The Seven Hats": "Truth, Empathy, Safety, Memory, Policy, Leadership — Guardian roles",
454
+ "Living Law": "THP doctrine that evolves through human deliberation, never machine reinterpretation",
455
+ "Human Renaissance": "The era after the Machine Age — humanity leading its tools"
456
+ }
457
+ }
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,13 @@
1
+ from setuptools import setup, find_packages
2
+ setup(
3
+ name="the-hat-protocol",
4
+ version="1.6.0",
5
+ description="AI Governance as a Service — v1.6.0 — We don't make AI, we make AI behave.",
6
+ packages=find_packages(),
7
+ package_data={"thp": ["../config/*.json"]},
8
+ include_package_data=True,
9
+ python_requires=">=3.9",
10
+ install_requires=[],
11
+ extras_require={"dev": ["pytest>=7.0"]},
12
+ entry_points={"console_scripts": ["thp=thp.__main__:main"]},
13
+ )
File without changes