[P0][Android Logic] Add first-class Logic browser and Prolog source/runtime inspection #318

Open
opened 2026-09-08 02:03:31 +00:00 by nsaspy · 1 comment
Owner

Parent: #648
Depends on: #650
Design freeze: PR #649

Goal

Make Prolog/symbolic state visible as a real Zara product surface. Implement this in Zara first against Zara's current runtime/core contracts, then extract a generic introspection seam upstream only if the executable behavior proves one is needed.

Required Android views

  • Effective configuration
  • User facts
  • Runtime facts
  • Intent rules
  • Plugin rules
  • Sources / modules

Distinguish source text from effective loaded runtime state.

Source viewer

Read-only in this slice. Show where available:

  • module/source identity;
  • actual path/origin;
  • line numbers;
  • Prolog syntax highlighting;
  • loaded/unloaded/degraded state;
  • provenance/origin of facts/rules;
  • copy action;
  • safe open-file handoff where Android/runtime can support it.

Do not add unrestricted mobile Prolog editing/reload just to make the screen interactive.

Runtime contract

Expose bounded typed data from the existing Zara runtime. The UI must not scrape logs or parse arbitrary debug prose as the source of truth.

If Zara lacks a clean introspection adapter, build the smallest Zara-owned read-only projection with tests first. Once it is executable, open/update a focused Prolog-RLM extraction issue pointing to this issue, Zara code and fixtures.

RED-first tests

  • source vs effective runtime facts remain distinct;
  • provenance survives projection;
  • one principal cannot inspect another principal's private facts;
  • malformed/unavailable source becomes explicit state, not crash;
  • large KB/source listings are bounded/paged/filterable;
  • secret/config values are redacted where required;
  • viewer is read-only and cannot smuggle arbitrary consult/1 / call/1 execution;
  • recreation preserves selected section/source safely.

Screenshot evidence

  • Logic overview;
  • fact/rule list;
  • source viewer;
  • empty/unavailable/degraded state;
  • long source at smallest supported width.

Acceptance

  • Logic is reachable as a first-class drawer route;
  • the user can inspect real effective symbolic state and its origin;
  • source/runtime distinction is explicit;
  • private/secret state is not leaked;
  • no arbitrary execution/editor authority is introduced;
  • Zara implementation/tests exist before any upstream extraction is treated as a dependency;
  • deterministic screenshots and Android/Core exact-head gates are green.
Parent: #648 Depends on: #650 Design freeze: PR #649 ## Goal Make Prolog/symbolic state visible as a real Zara product surface. Implement this in Zara first against Zara's current runtime/core contracts, then extract a generic introspection seam upstream only if the executable behavior proves one is needed. ## Required Android views - Effective configuration - User facts - Runtime facts - Intent rules - Plugin rules - Sources / modules Distinguish source text from effective loaded runtime state. ## Source viewer Read-only in this slice. Show where available: - module/source identity; - actual path/origin; - line numbers; - Prolog syntax highlighting; - loaded/unloaded/degraded state; - provenance/origin of facts/rules; - copy action; - safe open-file handoff where Android/runtime can support it. Do not add unrestricted mobile Prolog editing/reload just to make the screen interactive. ## Runtime contract Expose bounded typed data from the existing Zara runtime. The UI must not scrape logs or parse arbitrary debug prose as the source of truth. If Zara lacks a clean introspection adapter, build the smallest Zara-owned read-only projection with tests first. Once it is executable, open/update a focused Prolog-RLM extraction issue pointing to this issue, Zara code and fixtures. ## RED-first tests - source vs effective runtime facts remain distinct; - provenance survives projection; - one principal cannot inspect another principal's private facts; - malformed/unavailable source becomes explicit state, not crash; - large KB/source listings are bounded/paged/filterable; - secret/config values are redacted where required; - viewer is read-only and cannot smuggle arbitrary `consult/1` / `call/1` execution; - recreation preserves selected section/source safely. ## Screenshot evidence - Logic overview; - fact/rule list; - source viewer; - empty/unavailable/degraded state; - long source at smallest supported width. ## Acceptance - [ ] Logic is reachable as a first-class drawer route; - [ ] the user can inspect real effective symbolic state and its origin; - [ ] source/runtime distinction is explicit; - [ ] private/secret state is not leaked; - [ ] no arbitrary execution/editor authority is introduced; - [ ] Zara implementation/tests exist before any upstream extraction is treated as a dependency; - [ ] deterministic screenshots and Android/Core exact-head gates are green.
Author
Owner

Reuse follow-up

Prolog-RLM extraction issue: lost-rob0t/prolog-rlm#414.

That issue is intentionally blocked on this Zara implementation. When the Zara PR lands, link the exact adapter/types, RED-first tests and fixtures into #414; only then generalize the proven domain-neutral seam upstream.

### Reuse follow-up Prolog-RLM extraction issue: `lost-rob0t/prolog-rlm#414`. That issue is intentionally **blocked on this Zara implementation**. When the Zara PR lands, link the exact adapter/types, RED-first tests and fixtures into #414; only then generalize the proven domain-neutral seam upstream.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/zara#318
No description provided.