RAGE #260: add Prolog command-loop advice seam #249

Closed
nsaspy wants to merge 0 commits from rage/260-prolog-command-advice into master
Owner

Consumes the next bounded Zara Core slice of #260. The original immutable RAGE start remains 9f3b779b876df360001b12d0100698f334beb8b8; after #264 advanced canonical master, the stale branch was preserved at backup/rage-260-prolog-command-advice-pre-rebase-20260903 and recovered onto current master b8cdbbdab66792dede09971d5826bb3494d1f6ff.

RAGE state: implementation candidate awaiting exact-head gates.

The deterministic RED contract already existed in scripts/test-prolog-command-advice.sh. Production now adds the missing trusted-local Prolog command advice seam:

  • advice_command_loop/3 and dynamic/multifile command_handler/2 live in the canonical modules/command_loop.pl runtime;
  • override dispatch requires both [hooks].enabled=true and [hooks].allow_override=true through the existing hooks_loader:hook_policy/2 authority;
  • user speech never selects or constructs a callable Prolog goal — resolved Intent/Args are matched against trusted local source clauses only;
  • a handler that simply fails leaves the command unhandled and preserves the existing core commands:execute/2 path;
  • a handler exception becomes a bounded failure result and does not fall through into a second core execution, preventing duplicate side effects;
  • execute_resolved/3 remains reply owner, so existing reply lifecycle hooks stay canonical;
  • no Android production changes, second Prolog runtime, shell interpolation, or tool/capability-policy bypass.

Evidence:

  • rage/260-prolog-command-advice.org
  • rage/260-prolog-command-advice-research.org
  • rage/260-prolog-command-advice-design.org
  • scripts/test-prolog-command-advice.sh

Exact candidate head: 3e6e4352c62055f621d2b73ac63fcba19a29c19e.

Do not merge while draft or until the full exact-head GitHub Actions run is conclusively green and review/thread checks are clear.

Consumes the next bounded Zara Core slice of #260. The original immutable RAGE start remains `9f3b779b876df360001b12d0100698f334beb8b8`; after #264 advanced canonical master, the stale branch was preserved at `backup/rage-260-prolog-command-advice-pre-rebase-20260903` and recovered onto current master `b8cdbbdab66792dede09971d5826bb3494d1f6ff`. RAGE state: **implementation candidate awaiting exact-head gates**. The deterministic RED contract already existed in `scripts/test-prolog-command-advice.sh`. Production now adds the missing trusted-local Prolog command advice seam: - `advice_command_loop/3` and dynamic/multifile `command_handler/2` live in the canonical `modules/command_loop.pl` runtime; - override dispatch requires both `[hooks].enabled=true` and `[hooks].allow_override=true` through the existing `hooks_loader:hook_policy/2` authority; - user speech never selects or constructs a callable Prolog goal — resolved `Intent/Args` are matched against trusted local source clauses only; - a handler that simply fails leaves the command unhandled and preserves the existing core `commands:execute/2` path; - a handler exception becomes a bounded failure result and does **not** fall through into a second core execution, preventing duplicate side effects; - `execute_resolved/3` remains reply owner, so existing reply lifecycle hooks stay canonical; - no Android production changes, second Prolog runtime, shell interpolation, or tool/capability-policy bypass. Evidence: - `rage/260-prolog-command-advice.org` - `rage/260-prolog-command-advice-research.org` - `rage/260-prolog-command-advice-design.org` - `scripts/test-prolog-command-advice.sh` Exact candidate head: `3e6e4352c62055f621d2b73ac63fcba19a29c19e`. **Do not merge while draft or until the full exact-head GitHub Actions run is conclusively green and review/thread checks are clear.**
nsaspy closed this pull request 2026-09-04 23:10:12 +00:00
Some checks failed
CI / test (pull_request) Failing after 5s
CI / android skeleton gate (pull_request) Failing after 5s
CI / shared mic / Ubuntu 24.04 (pull_request) Failing after 6m11s
CI / shared mic / Arch Linux (pull_request) Failing after 11m23s

Pull request closed

Sign in to join this conversation.
No description provided.