Add Communication Clarity Framework for self-debugging code#85
Merged
InauguralPhysicist merged 3 commits intomainfrom Dec 18, 2025
Merged
Conversation
This implements hypothesis-driven communication semantics where code refuses to execute on unverified assumptions. The framework extends EigenScript's geometric predicates with clarity predicates that check intent verification, not just computational state. New features: - MIGHT IS operator for tentative (hypothesis) bindings - CLARIFY OF operator to verify intent - ASSUMES interrogative to query hidden variables - Clarity predicates: clarified, ambiguous, explicit, assumed - CLARITY/CS numeric score (0.0-1.0) Core principles implemented: 1. Questions and statements both assign objectives 2. Implication is not universal (hidden variables cause failure) 3. Clarification is hypothesis testing 4. Withhold inference intentionally 5. Control remains with the speaker 6. Speakers discover their own intent Includes 44 passing tests and updated documentation.
Extends the Communication Clarity Framework with active participation in the clarification process. EigenScript can now detect ambiguity and seek clarification before proceeding with potentially risky operations. New features: - ActiveListener: Detects ambiguity in division, indexing, type coercion, and null access operations - DialogueManager: Agency-preserving dialogue for explanations and confirmations - InteractiveClarifier: Combines listener and speaker for interactive clarification workflows - interactive_mode and active_listening interpreter options - Agency-preserving error messages that present options, not dictates Key design principle: "Control remains with the speaker" - EigenScript presents possibilities rather than assuming intent. Includes 31 new tests for active listener features.
| ambiguity = None | ||
|
|
||
| if operation == "division": | ||
| divisor = context.get("divisor") |
|
|
||
| def test_global_assumptions(self, clarity_tracker): | ||
| """Test global assumptions not tied to a binding.""" | ||
| assumption = clarity_tracker.register_assumption( |
| """ | ||
|
|
||
| import sys | ||
| import numpy as np |
|
|
||
| import sys | ||
| import numpy as np | ||
| from typing import List, Dict, Optional, Set, Tuple, Any |
Comment on lines
+41
to
+50
| from eigenscript.runtime.clarity import ( | ||
| ClarityTracker, | ||
| ClarityExplainer, | ||
| ClarityType, | ||
| Assumption, | ||
| detect_assumptions, | ||
| ActiveListener, | ||
| DialogueManager, | ||
| InteractiveClarifier, | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This implements hypothesis-driven communication semantics where code
refuses to execute on unverified assumptions. The framework extends
EigenScript's geometric predicates with clarity predicates that check
intent verification, not just computational state.
New features:
Core principles implemented:
Includes 44 passing tests and updated documentation.