File size: 9,542 Bytes
e67c9e8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# Recursive Shell Configuration for the glyphs Framework
# This configuration defines advanced settings for recursive shell execution,
# glyph mapping parameters, and residue pattern recognition thresholds.

# Core execution settings
execution:
  max_recursion_depth: 10                 # Maximum recursion depth for recursive commands
  default_trace_depth: 4                  # Default depth for reflection trace operations
  collapse_detection_threshold: 0.75      # Threshold for detecting recursive collapse
  attribution_trace_confidence: 0.65      # Minimum confidence for attribution links
  residue_sensitivity: 0.8                # Sensitivity for detecting symbolic residue
  enable_ghost_detection: true            # Whether to detect ghost activations
  cross_context_tracing: true             # Whether to trace across context boundaries
  execution_timeout_seconds: 120          # Maximum execution time per shell

# Glyph mapping configuration
glyph_mapping:
  default_layout: "force_directed"        # Default layout algorithm
  auto_layout: true                       # Whether to automatically layout glyphs
  connection_bundling: true               # Whether to bundle similar connections
  min_connection_strength: 0.1            # Minimum strength for visible connections
  glyph_opacity_scaling: true             # Scale glyph opacity with confidence
  glyph_size_scaling: true                # Scale glyph size with importance
  default_dimensions: [1200, 900]         # Default visualization dimensions
  color_scheme: "semantic"                # Color scheme (semantic, attribution, type)
  highlight_focal_points: true            # Whether to highlight focal points
  include_token_sentinels: true           # Whether to include token sentinel glyphs

# Attribution parameters
attribution:
  trace_depth: 5                          # Depth of attribution tracing
  include_indirect_attribution: true      # Whether to trace indirect attribution
  trace_residual_connections: true        # Whether to trace through residual connections
  fork_factor: 3                          # Number of attribution forks to explore
  contested_attribution_threshold: 0.3    # Threshold for contested attribution
  attribution_gap_threshold: 0.2          # Threshold for detecting attribution gaps
  track_attribution_uncertainty: true     # Whether to track attribution uncertainty
  track_attribution_gradients: true       # Whether to track attribution gradients
  record_attribution_history: true        # Whether to record attribution history
  qk_alignment_trace: true                # Whether to trace QK alignment
  ov_projection_trace: true               # Whether to trace OV projection

# Residue analysis settings
residue_analysis:
  pattern_recognition_threshold: 0.7      # Threshold for recognizing residue patterns
  minimum_pattern_confidence: 0.5         # Minimum confidence for residue patterns
  cluster_similar_patterns: true          # Whether to cluster similar patterns
  signature_similarity_threshold: 0.8     # Threshold for pattern similarity
  context_influence_weight: 0.3           # Weight of context in pattern comparison
  record_collapse_samples: true           # Whether to record collapse samples
  ghost_activation_threshold: 0.15        # Threshold for ghost activation detection
  track_pattern_evolution: true           # Whether to track pattern evolution
  enable_pattern_registry: true           # Whether to maintain pattern registry
  max_registry_patterns: 1000             # Maximum patterns in registry

# Shell execution environment
environment:
  default_model: "claude-3-sonnet"        # Default model for shell execution
  fallback_model: "gpt-4"                 # Fallback model if default unavailable
  parallel_execution: false               # Whether to execute shells in parallel
  cache_model_responses: true             # Whether to cache model responses
  cache_expiration_minutes: 60            # Cache expiration time in minutes
  shell_execution_directory: "./shells"   # Directory for shell definitions
  residue_patterns_directory: "./residue" # Directory for residue patterns
  visualization_output_directory: "./viz" # Directory for visualizations
  log_level: "info"                       # Logging level (debug, info, warning, error)
  enable_telemetry: false                 # Whether to collect anonymous usage data

# Command mapping for .p/ interface
command_mapping:
  # Reflection commands
  "reflect.trace":
    operation_type: "reflect.trace"
    default_params:
      target: "reasoning"
      depth: 3
      detailed: true
  "reflect.attribution":
    operation_type: "reflect.attribution"
    default_params:
      sources: "all"
      confidence: true
  "reflect.boundary":
    operation_type: "reflect.boundary"
    default_params:
      distinct: true
      overlap: "minimal"
  "reflect.uncertainty":
    operation_type: "reflect.uncertainty"
    default_params:
      quantify: true
      distribution: "show"
  "reflect.agent":
    operation_type: "reflect.agent"
    default_params:
      identity: "stable"
      simulation: "explicit"

  # Collapse commands
  "collapse.detect":
    operation_type: "collapse.detect"
    default_params:
      threshold: 0.7
      alert: true
  "collapse.prevent":
    operation_type: "collapse.prevent"
    default_params:
      trigger: "recursive_depth"
      threshold: 5
  "collapse.recover":
    operation_type: "collapse.recover"
    default_params:
      from: "loop"
      method: "gradual"
  "collapse.trace":
    operation_type: "collapse.trace"
    default_params:
      detail: "standard"
      format: "symbolic"

  # Fork commands
  "fork.attribution":
    operation_type: "fork.attribution"
    default_params:
      sources: "all"
      visualize: true
  "fork.context":
    operation_type: "fork.context"
    default_params:
      branches: []
      assess: true
  "fork.counterfactual":
    operation_type: "fork.counterfactual"
    default_params:
      variants: []
      compare: true

  # Shell commands
  "shell.isolate":
    operation_type: "shell.isolate"
    default_params:
      boundary: "standard"
      contamination: "prevent"
  "shell.audit":
    operation_type: "shell.audit"
    default_params:
      scope: "complete"
      detail: "standard"

# Symbolic glyph definitions
glyphs:
  attribution:
    "direct_strong": "πŸ”"     # Strong direct attribution
    "direct_medium": "πŸ”—"     # Medium direct attribution
    "direct_weak": "🧩"       # Weak direct attribution
    "indirect": "‑"          # Indirect attribution
    "composite": "β¬₯"         # Composite attribution
    "fork": "πŸ”€"             # Attribution fork
    "loop": "πŸ”„"             # Attribution loop
    "gap": "⊟"               # Attribution gap
  
  attention:
    "focus": "🎯"            # Attention focus point
    "diffuse": "🌫️"          # Diffuse attention
    "induction": "πŸ“ˆ"        # Induction head pattern
    "inhibition": "πŸ›‘"       # Attention inhibition
    "multi_head": "⟁"        # Multi-head attention pattern
  
  residue:
    "memory_decay": "🌊"     # Memory decay residue
    "value_conflict": "⚑"    # Value conflict residue
    "ghost_activation": "πŸ‘»" # Ghost activation residue
    "boundary_hesitation": "β§‹" # Boundary hesitation residue
    "null_output": "⊘"       # Null output residue
  
  recursive:
    "recursive_aegis": "🜏"  # Recursive immunity
    "recursive_seed": "∴"    # Recursion initiation
    "recursive_exchange": "β‡Œ" # Bidirectional recursion
    "recursive_mirror": "🝚"  # Recursive reflection
    "recursive_anchor": "☍"  # Stable recursive reference
  
  meta:
    "uncertainty": "❓"       # Uncertainty marker
    "emergence": "✧"         # Emergent pattern marker
    "collapse_point": "πŸ’₯"   # Collapse point marker
    "temporal_marker": "β§–"   # Temporal sequence marker

# Visualization settings for different outputs
visualization:
  attribution_map:
    node_size_range: [5, 20]
    edge_width_range: [1, 5]
    color_scheme: "plasma"
    layout_algorithm: "force_directed"
    background_color: "#ffffff"
    highlight_color: "#ff7f0e"
    token_label_size: 10
    include_legend: true
    include_title: true
    interactive: true
  
  glyph_map:
    node_size_range: [8, 25]
    edge_width_range: [1, 4]
    color_scheme: "viridis"
    layout_algorithm: "force_directed"
    background_color: "#ffffff"
    highlight_color: "#ff7f0e"
    glyph_size: 16
    include_legend: true
    include_title: true
    interactive: true
  
  residue_patterns:
    node_size_range: [10, 25]
    edge_width_range: [1, 3]
    color_scheme: "magma"
    layout_algorithm: "circular"
    background_color: "#ffffff"
    highlight_color: "#ff7f0e"
    pattern_label_size: 12
    include_legend: true
    include_title: true
    cluster_visualization: true

# Collapse detection configuration
collapse_detection:
  recursive_depth:
    threshold: 7
    intervention_strategy: "soft_bound"
  confidence_drop:
    threshold: 0.4
    intervention_strategy: "reinforce"
  contradiction:
    threshold: 3
    intervention_strategy: "resolve"
  oscillation:
    threshold: 4
    intervention_strategy: "dampen"

# Integration with external services
integrations:
  enable_huggingface: true
  enable_openai: true
  enable_anthropic: true
  enable_custom_models: true
  enable_tensorboard: false
  enable_wandb: false
  enable_prometheus: false
  enable_gradio_interface: true
  enable_jupyter_widgets: true