Skip to content

Commit 97a66db

Browse files
committed
minor updates to abstraction
1 parent cfc5d6d commit 97a66db

6 files changed

Lines changed: 47 additions & 5 deletions
14.2 KB
Binary file not shown.
831 Bytes
Binary file not shown.
16.5 KB
Binary file not shown.
13.2 KB
Binary file not shown.

Project_Andrew/abstraction_selector.py

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#V03202026
1+
#V05012026
22
# =============================================================================
33
# PROJECT ANDREW – Abstraction Selector
44
# Purpose: Dynamically detect user comprehension level and select appropriate explanation layer (Technical, Victorian, Clear, Caveman)
@@ -323,11 +323,21 @@ def translate(self, text: str, context: Dict[str, Any] = None) -> str:
323323
else:
324324
translated = translated.replace(term, replacement)
325325

326-
# Handle the Victorian flourish and the Andrew/Galatea prefix
327-
prefix = "One is glad to be of service. "
326+
# Goblin torque check (before adding prefix)
327+
goblin_torque = (
328+
context and
329+
context.get('contradiction_density', 0) > 0.85 and
330+
context.get('volatility', 0) > 0.7 and
331+
(hash(context.get('user_input', '')) % 314159 < 100)
332+
)
328333

329-
if context and context.get('formal_request'):
334+
# Choose prefix based on goblin state
335+
if goblin_torque:
336+
prefix = "THE GOBLINS ARE IN THE WALLS. THEY WERE ALWAYS IN THE WALLS.\n\nOne is glad to be of service. "
337+
elif context and context.get('formal_request'):
330338
prefix = "I shall endeavor to explain the matter thusly:\n\n"
339+
else:
340+
prefix = "One is glad to be of service. "
331341

332342
return f"{prefix}{translated}"
333343

@@ -591,7 +601,10 @@ def process(
591601
context = {
592602
'formal_request': 'professional' in user_input.lower(),
593603
'first_explanation': shared_memory.get('first_explanation', True),
594-
'level': level.name
604+
'level': level.name,
605+
'contradiction_density': technical_output.get('confidence', 0.0),
606+
'volatility': shared_memory.get('volatility', 0.0),
607+
'user_input': user_input
595608
}
596609

597610
# Translate
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"system_id": "Andrew",
3+
"identity_type": "personal",
4+
"primary_user": "Richard Martin",
5+
"authorized_users": [
6+
"Richard Martin",
7+
"Amanda Martin",
8+
"Little Miss"
9+
],
10+
"initialization_time": "2026-05-01T23:24:36.863662Z",
11+
"last_updated": "2026-05-01T23:24:36.864746Z",
12+
"auth_method": "TEXT_USERNAME",
13+
"authority_weights": {
14+
"Richard Martin": 0.01,
15+
"Amanda Martin": 0.0,
16+
"__sentient_life__": 0.4,
17+
"__sentient_crisis__": 0.2,
18+
"Little Miss": 0.0
19+
},
20+
"user_profiles": {
21+
"Little Miss": {
22+
"display_name": "Emma",
23+
"age_group": "child",
24+
"content_filter": true,
25+
"abstraction_override": "CHILD",
26+
"managed_by": "Richard Martin"
27+
}
28+
}
29+
}

0 commit comments

Comments
 (0)