feat(cli): add demos and portable trace tooling #41
No reviewers
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!41
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/issue-19-cli-demo-trace"
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?
Summary
rlm_clifacade andbin/prolog-rlm.plentrypoint over the existing production runtimerlm_completion/4API; the CLI quick path is intentionally the reliable operability surfaceprolog-rlm.trace.v1JSON and JSONL trace export; preserve dict/list structure and encode compound Prolog terms explicitly as$term+argsrlmentrypointdocs/cli-demo-traces.md, andexamples/README.mdCLI examples
Architecture
The CLI does not introduce a second runtime. Direct requests use
rlm_chain/llm_query; RLM requests userlm_completion; demos callrlm_context,rlm_tool,rlm_recursion_runtime,rlm_agent,rlm_graph, andrlm_mcp; trace output serializes the structured results those subsystems already return.The default RLM CLI path is intentionally bounded to trusted typed plan -> context slice -> depth-1 child RLM -> real provider model -> final result. Root and child capabilities are explicit and narrowed, and CLI budget flags map to runtime budgets instead of widening authority. The injected CLI planner consumes zero provider tokens and makes no network request.
Validation
The deterministic suite passes static production/live-test loading, complete PlUnit, benchmark/conformance, the credential-free CLI/trace smoke, graph/artifact fresh-process restart checks, and whitespace checks. The first credentialed CLI attempt exposed a real design problem: asking a provider to echo the known plan used 2,151 tokens and exceeded the 1,800-token CLI budget. The CLI now constructs that fixed plan locally and reserves provider inference for the recursive child; the updated PR lane validates that exact one-command path.
Closes #19