[P1] Add AgentProlog XDG config.prolog + JSON canonical loader #127
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/prolog-rlm#127
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?
Parent: #126
Depends on: #75/#77 for final scoped-state/project-identity integration.
Goal
Implement AgentProlog's two configuration modes:
config.prolog;The user XDG config is intentionally programmable. It should support an Emacs-like experience where the operator can define predicates, helpers, loaders and later hook/tool/detector registrations in ordinary Prolog.
Default user path:
with
$HOME/.configfallback.Trust model
User config
The XDG
config.prologis trusted executable operator/host code and is loaded normally by AgentProlog. It is not restricted to closed ground terms and is not sandboxed from the AgentProlog process.The stock config runtime provides a standard JSON loader so a user may write a small Prolog config that imports
config.jsonand then overrides or extends it with Prolog rules.Project config
Executable project Prolog requires an explicit trusted-project decision bound to the structured project identity from #75. Merely opening/cloning a repository must not execute its config.
An untrusted project config candidate may be discovered and presented, but execution waits for project trust. Project trust is a host-code trust decision, not an AgentProlog tool permission or authority tier.
Runtime operations registered from config
Once trusted, config code itself has process privileges. Separately, tools/effects/providers registered through canonical AgentProlog runtime APIs continue to use those APIs' schemas, capabilities, authority, confinement, cancellation and durable-effect semantics when invoked.
Editing and file mode
AgentProlog must expose trusted config-edit/write APIs for frontends, but editing config is a normal file mutation and must pass the existing authority boundary. The model cannot silently rewrite its own executable configuration.
Files created or rewritten by AgentProlog must be mode
0600. Authorized rewrites should tighten broader existing modes to0600. Use atomic replacement where practical and test the resulting mode.An approval UI should make clear that a config edit is privileged because the changed Prolog runs as host extension code after reload.
Scope
config.prologloading;0600enforcement;This slice does not need the full #128 hook registry yet, but its API must preserve the executable Prolog module/config environment needed for later registration.
Acceptance
config.prologexecutes as trusted Prolog configuration.config.prolog.0600files.0600.Non-goals
No full hook/tool/detector implementation in this slice; those are #128-#130. No implicit trust of repository code. No duplicate DeepSeek-local settings authority.
Child of #126; closed with the epic under the restored canonical boundary (#141, 2026-08-31): AgentProlog product configuration/UX belongs to lost-rob0t/agentProlog, and this is not a current prolog-rlm gap blocking a coding agent. Re-file in the product repo if still wanted.