[EPIC] Agentic Prolog RLM v0.1 #424
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/prolog-rlm#424
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Deliver a usable
prolog-rlm: a real SWI-Prolog language-model harness with external context, typed model-selected plans, capability-gated tools, bounded recursion, supervised agents, durable graph execution, structured traces, and dual-version MCP interoperability.Current state — 2026-08-21
Canonical
maininspected for this reconciliation:290a87f5cff3a2c21b689877b167fa27dae16f61.The original implementation dependency graph is complete: issues #4 through #20 are closed. This epic remains open as the v0.1/manual-validation umbrella, not as a container for every later feature idea.
The focused correctness blockers discovered during the depth/manual-validation audit are now complete:
The first clean-install validation slice is also merged:
library(rlm)from a fresh SWI process outside the source checkout. The core pack no longer implicitly builds optional Tree-sitter support during SWI pack installation.#44 aggregates planner + executed-model usage from the authoritative
model_responsesledger on execution-error paths. #42 canonicalizes recursive-plan fingerprints before cycle detection. #46 keeps the live free-router streaming gate transport-safe without treating arbitrary routed-model sentinel compliance as deterministic semantics. #45 now records an authoritative append-only model-event ledger at execution time, preserving deterministic order, stable parent lineage, true depth, provider/model/status metadata, and usage across nested lexical scope restoration.Later architecture tracks such as #49/#50, #54, #56/#57/#79, #68-#71, #74-#77, #93/#95-#99, #101/#107/#117, and #124/#126-#131 remain important follow-up work, but they are not retroactively added as v0.1 blockers here unless this epic's acceptance scope is explicitly changed.
Manual full-system validation remains the active umbrella gate. Validate the supported installation/build path from a clean environment, full repository suite, representative real-provider model -> plan -> execute -> model behavior, capability-gated tools, depth-1 recursion, persistence/recovery, bounded failure/cancellation behavior, configuration/docs, and required CI on current
main. If testing exposes a regression in a previously completed slice, reopen the corresponding issue or create a focused regression issue when no prior issue maps cleanly, then reconcileTODO.md, README/status prose, roadmap text, and related parent/child issue state in the same slice.P0 — First real RLM
rlm_completion/4with depth-1 recursion, budgets, cancellation, and tracingP0 exit criteria
A real-provider end-to-end run must use an external context handle, a model-selected typed plan, at least one capability-gated tool, one depth-1 recursive call, hard budgets/cancellation, and structured trajectory/outcome terms. Fake providers remain test doubles only.
The runtime implements these surfaces, and the focused #42/#44/#45/#46 correctness defects are closed. Final acceptance now depends on observing the complete supported path succeed together under the manual full-system validation gate rather than inferring readiness from component completion alone.
P1 — Agent runtime, durability, MCP, evaluation
rlm_agentsupervision with engines, mailboxes, and bounded workersrlm_graphstate graphs, checkpoints, interrupts, and resumable executionrlm_chainwith messages, structured output, retries, streaming, and middlewarerlm_mcpmodel plus MCP 2025-11-25 client/server adapterMCP compatibility rule
Support both MCP
2025-11-25and2026-07-28behind one canonical internal API. Prefer 2026 when explicit mutual support is known; fall back to 2025 for legacy peers. Version-specific behavior must not leak intorlm_agentorrlm_graph.P2 — Developer experience and experimental recursion
CI evidence
GitHub Actions is the execution oracle. Do not freeze a transient latest-run result into this epic as durable state. The merged CI contract includes deterministic unit/load checks, benchmark/conformance, deep-recursion experiments, credential-free CLI/trace and restart checks, plus credentialed REAL OpenRouter integration including structured repair, benchmark, depth 0/1/2, and one-command RLM CLI smoke. The merged clean-pack workflow separately installs the checkout as a copied SWI pack and loads the installed
library(rlm)from a fresh process outside the checkout.Research basis
Implementation choices are grounded in the repository's numbered RLM research records, including RLM/scaffold/harness work, lambda-RLM, PrologMCP, SWI engines/message queues, LangChain/LangGraph semantics, MCP dual-version research, adaptive recursion, durable artifact context, and the newer logic-native control/prompt-compilation work as it lands canonically.
Duplicate of #3 (pre-existing Forgejo mirror with GitHub number parity). Closing this accidental duplicate created by today's open-state sync; #3 stays canonical on Forgejo.