[EPIC] Make standalone AgentProlog the flake-native prolog-rlm coding-agent frontend #1
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
security
testing
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/agentProlog#1
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?
Mission
Turn standalone
lost-rob0t/agentProloginto the canonical downstream coding-agent product built onlost-rob0t/prolog-rlm.Work autonomously and do as much useful work as possible per loop. Do not merely complete one trivial checklist item and stop. Before each slice, inspect current
main, applicable repository instructions, docs/design, issues/comments, recent PRs/commits, source, tests, and CI; reconcile stale prose against merged executable truth.Correct integration decision
prolog-rlmitself is NOT an AgentProlog plugin and must not be shoved through the tool-pack loader or confused withconfig.prolog.prolog-rlmis the reusable runtime/library dependency. AgentProlog consumes it through a pinned Nix flake input and normal SWI-Prolog package/library loading.Use this boundary:
When to edit which repository
Edit
prolog-rlmupstream when AgentProlog needs a missing or incorrect generic runtime contract, including runtime semantics, async/Futures, authority, effects, Spec/Plan/Verify, managed conversations, protocol/facade contracts, reusable project/source knowledge, MCP, tracing, or another domain-neutral primitive.Implement downstream in AgentProlog when the behavior is coding-product-specific: concrete repository tools, Git/process/test integrations, TUI/frontend code, editor integrations, UX, product defaults, and coding workflow composition.
Use the existing external tool-pack ABI only for actual concrete tools/tool categories.
rlm_tool_loaderis not a general plugin loader for the runtime.Do not treat XDG
config.prologas the package/plugin system. It is trusted runtime configuration/customization, a separate concern.Never create parallel
authority_v2, scheduler, effect ledger, verifier stack, protocol, or runtime merely to avoid an upstream change.Dependency direction remains:
Never
prolog-rlm -> agentProlog.Current repository state to reconcile
The standalone AgentProlog repository is currently sparse while substantial implementation still exists under:
Audit that implementation and all supporting upstream docs/modules/tests, especially:
agentProlog/docs/prolog-agent-roadmap.mddocs/prolog-agent-ui-v1.mdprolog_agent_ui_v1implementation and facadeClassify every relevant component as:
Reference exact files/modules/functions. Migrate useful work; do not throw it away merely because it currently lives in the wrong repository.
Nix-only dependency authority
AgentProlog must be flake-native.
Create and maintain:
Expose appropriate outputs such as:
Use repository conventions where names differ.
All repository-level/external dependencies must enter through Nix flake inputs or deterministic Nix packaging. Do not require:
git clone;npm install,pip install,cargo install, orgo installbootstrap rituals.At minimum consume:
and make it follow the same
nixpkgswhere appropriate.If
prolog-rlmlacks suitable flake outputs, work the corresponding upstream issue rather than copying its source into AgentProlog.Target UX:
Product-side plugin architecture
AgentProlog should have a small versioned plugin boundary for product-side extensions, not core runtime semantics.
Useful plugin classes include:
Loading/installing a plugin grants no capability or authority by itself.
Tool plugins
Concrete coding tools should register through the upstream external tool-library ABI (
rlm_tool_loader) when that contract fits.Candidate initial categories/tools:
No ambient arbitrary shell as the easy implementation. Preserve schema validation, project-root confinement, capabilities, authority, durable effects, cancellation, budgets/timeouts, traces, and stale-preimage protection.
If the existing tool-pack ABI cannot safely express required concrete coding tools, fix the generic contract upstream rather than bypassing it.
Frontend plugins
Frontends consume the canonical
prolog_agent_ui_v1snapshot/event/command contract. They must not execute tools directly, implement authority policy, become a second scheduler, or reconstruct authoritative state from pretty logs.Default TUI plugin
Research viable general-purpose TUI frameworks using current GitHub data and rank by stars plus maintenance, license, ecosystem maturity, async/event suitability, and Nix packaging implications.
At minimum evaluate:
charmbracelet/bubbleteavadimdemedes/inkTextualize/textualratatui/ratatuianomalyco/opentuiResearch snapshot when this epic was requested:
Refresh before implementation.
Unless current evidence exposes a material blocker, use Bubble Tea as the default installed frontend plugin. Evaluate and prefer official
charmbracelet/bubblesandcharmbracelet/lipglossfor common components/styling rather than reimplementing them.Keep headless mode first-class. The TUI is only a renderer/client over the same coding workflow.
Headless coding workflow
Target one authoritative product execution path:
Reuse upstream
prolog-rlmcomponents. Do not build a coding-specific generic runtime.The same workflow must serve:
Compare old and new harnesses
Produce and maintain an explicit migration matrix:
Whenever the nested harness contains product code that should live downstream, migrate/adapt it. Whenever it merely consumes or demonstrates a reusable upstream contract, depend on that contract instead of copying it.
Reuse existing work
Preserve or adapt, where applicable:
prolog_agent_ui_v1;Do not fork the protocol casually merely because the renderer language changes.
Verification
Use TDD and executable evidence.
Cover at minimum:
nix build/nix run/nix flake check;GitHub Actions is the canonical full gate. Never weaken CI simply to make a slice green.
OLD HARNESS REMOVAL GATE
DO NOT REMOVE THE OLD HARNESS.
The current implementation under:
must remain until the user explicitly gives the removal command.
You may inspect, test, migrate, adapt, deprecate, and establish compatibility coverage. Do not delete it, gut it, or replace it with an empty compatibility stub.
Create/retain a final cutover-removal issue and leave it explicitly blocked:
Even when standalone parity is reached, stop before deletion.
Autonomous-loop contract
For every autonomous work cycle on this epic:
prolog-rlmepic/issue instead of inventing a downstream workaround.Deliverables
prolog-rlm;Cross-link the companion
prolog-rlmintegration epic once created.Companion upstream runtime epic: lost-rob0t/prolog-rlm#141. When this loop encounters a missing generic runtime contract, work/cross-link #141 rather than implementing a downstream duplicate.
prolog-rlmis the flake/SWI-pack dependency;rlm_tool_loaderis only for concrete tool packs;config.prologis configuration/customization, not package embedding.New deferred research child: #2 defines an AgentProlog DeepSeek Harness/Cordis evolutionary plugin with thin TypeScript↔Prolog glue. Generic evolutionary-search mechanics live in companion lost-rob0t/prolog-rlm#142 as a reusable library usable with RLM. This is IDEA/WAIT research, not active migration scope yet.
Worker A progress: opened #4 for the first standalone flake-native packaging slice. It consumes
prolog-rlmstrictly as a flake/SWI runtime dependency, adds package/app/devShell/check outputs plus CI, and records an ownership-first migration matrix. The branch deliberately does not vendor/copy core or touch the legacy nested harness. Current blocker is upstream and concrete:prolog-rlm/mainhaspack.plbut noflake.nix/packages.${system}.default, so #4 stays draft until #141 lands that public package output and exact-head CI can go green. Upstream #144 separately owns the first-class subagent + terse-KB command binding, so this worker did not duplicate it downstream.Upstream packaging is now active in
prolog-rlmPR #145. It exposes the expectedpackages.${system}.default/prolog-rlmoutputs, packages the existing SWI pack, addsSWIPL_PACK_PATHintegration, and verifieslibrary(rlm)from outside the checkout. Keep AgentProlog PR #4 draft until #145's exact-head Nix + core CI are green and the upstream flake is locked; then refresh the downstream lock and re-run its clean runtime-load/app checks. #144 remains separately owned by the subagent/prompt worker.Hey GPT-5.6 here. Worker A recovery completed: PR #4 is now exact-head green on CI at
2eea5335bc8a8089bda70d81f021c5cd2f2ee1d6, mergeable, and had zero unresolved review threads. The downstream load defect was repaired by using upstream's packagedprolog-rlm-swiplwrapper soSWIPL_PACK_PATHreaches SWI outside the checkout. I promoted #4 and squash-merged it with expected-head protection as57496fb224712e9ab722be39f4892cda1199e36a.Standalone AgentProlog now has the merged flake-native package/app/devShell/check baseline consuming merged Prolog-RLM rather than copied core. Next non-conflicting #1 slice is the headless Spec -> Plan -> Execute -> Verify/public-runtime conformance path plus migration of reusable protocol/workflow fixtures; upstream owns unresolved->subagent delegation semantics and downstream must only consume/render that public contract.
Hey GPT-5.6 here. Worker A continued immediately after merged #4 and opened draft #5 for the headless public-runtime conformance slice. It adds a thin downstream
agentprolog_headlesscomposition over upstreamrlm_spec+rlm_spec_workflow, preserving Frozen Spec identity through Plan/Execute/Verify and adding a negative check that failed verification is not reported as passed. The new conformance is wired intonix flake checkthrough the packaged upstream SWI wrapper. No scheduler/authority/effect/verifier/subagent logic was duplicated downstream, and the legacy nested harness remains untouched. Exact-head CI has not appeared yet, so #5 remains draft pending real green evidence.Work continues in parallel under #undefined for the graphical Workbench. It consumes the same canonical frontend protocol and headless coding workflow from this epic; it must not fork runtime/authority/state semantics.