Skip to main content

Module reflection

Module reflection 

Source
Expand description

A3 — Dynamic Reflection & Self-Healing Loop.

A 3-stage reflection pipeline for LLM-generated VibeScript:

  1. Stage 1 — Search Match: Parse the generated source and verify it contains expected constructs (e.g., required capabilities, function declarations) using the A4 AST query engine.
  2. Stage 2 — Semantic Shape Linting: Enforce structural policies on the parsed AST (e.g., mandatory take: budget, forbidden calls, effect-class constraints) using the A4 policy engine.
  3. Stage 3 — Dry-Run State Injection: Attempt a sandboxed evaluation with injected state, catching runtime errors before committing.

Each stage produces diagnostics. If any stage fails, the loop retries (up to a configurable budget), feeding the accumulated diagnostics back as context for the next generation attempt.

Structs§

ReflectionConfig
Configuration for the reflection loop.
ReflectionLoop
The reflection engine. Runs the 3-stage pipeline on generated VibeScript.
ReflectionResult
The overall result of the reflection loop.
StageResult
The outcome of a single reflection stage.

Type Aliases§

ReflectionEngine
Alias for ReflectionLoop matching multi-agent orchestration terminology.