[P0] Implement typed plan AST, validator, and interpreter #7

Closed
opened 2026-08-12 01:18:01 +00:00 by lost-rob0t · 0 comments
lost-rob0t commented 2026-08-12 01:18:01 +00:00 (Migrated from github.com)

Goal

Let the model choose semantic strategy without granting unrestricted Prolog execution.

Scope

  • define a canonical typed plan term/AST;
  • support initial operations for context, model, recursive RLM, tool, parallel, retry, checkpoint, and final result;
  • parse/normalize model-produced structured plans;
  • validate arity/types/capabilities before execution;
  • reject unknown or unsafe operations;
  • estimate execution budget before starting where possible;
  • interpret plans deterministically with bounded output capture;
  • retain structured validation/execution errors.

Acceptance criteria

  • valid plans execute without eval-style source execution;
  • malformed/unknown operations fail before side effects;
  • raw unrestricted call/1 is not exposed to model-generated plans;
  • nested plans honor a global budget;
  • plan execution emits structured transition events;
  • tests cover valid, malformed, capability-denied, and runaway plans.

Dependencies

Research

See RLM-RESEARCH-003-typed-symbolic-execution.org and lambda-RLM findings.

## Goal Let the model choose semantic strategy without granting unrestricted Prolog execution. ## Scope - define a canonical typed plan term/AST; - support initial operations for context, model, recursive RLM, tool, parallel, retry, checkpoint, and final result; - parse/normalize model-produced structured plans; - validate arity/types/capabilities before execution; - reject unknown or unsafe operations; - estimate execution budget before starting where possible; - interpret plans deterministically with bounded output capture; - retain structured validation/execution errors. ## Acceptance criteria - valid plans execute without `eval`-style source execution; - malformed/unknown operations fail before side effects; - raw unrestricted `call/1` is not exposed to model-generated plans; - nested plans honor a global budget; - plan execution emits structured transition events; - tests cover valid, malformed, capability-denied, and runaway plans. ## Dependencies - #4 - #6 - parent #3 ## Research See `RLM-RESEARCH-003-typed-symbolic-execution.org` and lambda-RLM findings.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/prolog-rlm#7
No description provided.