3 Commits

Author SHA1 Message Date
GlyphRunner System 4bc49c90b3 Implement LAIN ↔ Supercharged Glyph Bridge
New module:
- gx_lain/lain_glyph_bridge.py: Bridge connecting LedoGlyph600 to LAIN cognition

Functions:
- load_glyph_context(manifest, context): Load relevant glyph from registry
- inject_glyph_metadata_into_lane(lane_result, glyph_context): Add glyph fields to lane
- compute_glyph_resonance(glyph_context): Calculate glyph resonance metrics
- augment_fused_symbol_with_glyphs(fused_symbol, glyph_context): Add glyph to final output

Modified:
- gx_lain/runtime.py: Integrate glyph bridge into execute_with_lain()
  * Load glyph context as step 1 of cognition
  * Inject glyph metadata into each lane result
  * Augment fused symbol with glyph context
  * Add glyph_resonance to diagnostics
  * Track glyph loading in cognition_trace

Tests:
- tests/test_lain_glyph_bridge.py: 10 comprehensive tests
  * Context loading (with/without glyph)
  * Metadata injection (preserves existing fields)
  * Resonance computation (4-component metric)
  * Symbol augmentation
  * Full integration test

Features:
- Glyph metadata: id, name, category, score, period, band
- Frequency signatures: praw (P, R, A, W)
- Activation envelopes: mode, score
- Lineage: signature, inheritance weight
- Symbolic anatomy: power, complexity, resonance, stability, connectivity, affinity
- Resonance profile: activation + frequency + symbolic metrics (0.0-1.0)

All 18 integration tests still passing (no regressions).
2026-05-20 17:41:47 -04:00
GlyphRunner System 93ac2003b3 Implement real LAIN cognition engine with 8 lane processors
New modules:
- gx_lain/lane_processors.py: 8 symbolic lane processors
  * Lane 0: structural_logic (control flow, constraints)
  * Lane 1: semantic_flow (core meaning, narrative)
  * Lane 2: compression_residue (artifacts, hints)
  * Lane 3: symbolic_metadata (tags, annotations)
  * Lane 4: execution_hints (runtime guards, priorities)
  * Lane 5: predictive_scaffolding (hypotheses, priors)
  * Lane 6: contributor_imprint (author style, bias)
  * Lane 7: epoch_resonance (temporal context)

- gx_lain/runtime.py (updated): Real cognition loop
  * execute_with_lain(): Process all 8 lanes, capture timings
  * fuse_lanes(): Merge lane results into final symbol
  * compute_resonance(): Per-lane resonance metrics
  * render_output_text(): Mode-based output formatting

Features:
- Structured lane processing with error recovery
- Cognition trace with per-lane timing
- Resonance metrics (1.0 if lane has content)
- Fused symbol with deduplication
- Mode-aware output (ANALYZE vs SYNTHESIZE)
- No mutations, deterministic execution

All 18 integration tests pass unchanged.
2026-05-20 14:54:56 -04:00
GlyphRunner System af1265d2b2 Implement GX→LAIN runtime interface v1.0
Core pipeline: load_gx() → normalize_segments() → map_lanes() → build_envelope() → execute_with_lain()

Features:
- Load .gx files and extract manifest, segments, payload
- Normalize raw segments into canonical schema (id, start_line, end_line, text, symbolic_lane, semantic_role)
- Map segments into 8 symbolic lanes (structural_logic, semantic_flow, compression_residue, symbolic_metadata, execution_hints, predictive_scaffolding, contributor_imprint, epoch_resonance)
- Build ExecutionEnvelope with manifest, lanes, payload, context
- Stub LAIN execution with cognition_trace, fused_symbol, output_text, diagnostics
- Structured error handling via make_error()
- Interface versioning and deterministic execution

All integration tests still pass (18/18).
Main entry point: execute_gx_path(gx_path, context=None)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-05-20 13:54:33 -04:00