Commit Graph

2 Commits

Author SHA1 Message Date
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