From 98087b43c5af93049245758cdbe8ce4fffa1ac63 Mon Sep 17 00:00:00 2001 From: Amr Gharbeia Date: Wed, 6 May 2026 19:45:05 -0400 Subject: [PATCH] =?UTF-8?q?v0.4.0:=20differentiator=20=E2=80=94=20REPL=20T?= =?UTF-8?q?DD=20+=20prose=20(daemon-side)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RED proofs (pre-v0.4.0): - (getf (cognitive-verify ...) :gate-trace) → NIL (no trace) - Reason suite: 12/0 (no gate-trace assertions) - TUI actuator: no enrichment of rule-count/foveal-id GREEN proofs (v0.4.0): - gate-trace: ((:GATE mock-gate :RESULT :PASSED)), length 1 - Reason suite: 15/0 (new gate-trace assertions) - TUI actuator enriches :rule-count, :foveal-id in payload Prose: - core-loop-reason.org: Gate Trace section — explains that no competitor can ship this because none has deterministic gates to trace. 0 LLM tokens per gate. - core-loop-act.org: TUI Differentiator Enrichment section — documents :rule-count (HITL pending count) and :foveal-id flow. --- org/core-loop-act.org | 8 ++++++++ org/core-loop-reason.org | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/org/core-loop-act.org b/org/core-loop-act.org index cd321fc..649338c 100644 --- a/org/core-loop-act.org +++ b/org/core-loop-act.org @@ -88,6 +88,14 @@ Because a skill's deterministic gate runs during Reason, but between Reason and (format stream "~a" (frame-message action)) (finish-output stream)))))) #+end_src + +** TUI Differentiator Enrichment (v0.4.0) + +The TUI actuator is the last point in the pipeline before the response leaves the daemon. It enriches the action plist with fields that power the TUI's differentiator visualizations: + +- ~:rule-count~ = ~(hash-table-count *hitl-pending*)~ — the number of pending HITL actions. The user watches this counter tick as they teach the agent their preferences. +- ~:foveal-id~ = the current foveal focus from the signal context — enables the TUI's focus map status line. +- ~:gate-trace~ — already attached by ~cognitive-verify~, flows through the action plist unchanged. #+end_src ** Action Dispatch (action-dispatch) diff --git a/org/core-loop-reason.org b/org/core-loop-reason.org index 1ca2f93..2df793b 100644 --- a/org/core-loop-reason.org +++ b/org/core-loop-reason.org @@ -257,6 +257,12 @@ The system prompt assembly order — identity, tools, context, logs, mandates The deterministic engine is the strict guard. It receives a proposed action from the probabilistic engine and runs it through every registered deterministic gate, sorted by priority. +**Gate Trace (v0.4.0)** + +As part of v0.4.0's TUI differentiator visualizations, ~cognitive-verify~ now accumulates a ~:gate-trace~ — a list of ~(:gate :result <:passed|:blocked|:approval>)~ entries — as each deterministic gate processes the action. The trace is prepended to the result plist via ~list*~ and flows through the pipeline to the TUI actuator, which transmits it to the client. + +This is Passepartout's permanent UX advantage: no competitor can ship a gate trace because none has deterministic gates to trace. Claude Code, OpenClaw, and Hermes Agent all use prompt-based guardrails where the safety decision is invisible. In Passepartout, the user sees exactly which nine safety gates ran, what each decided, and why — all at 0 LLM tokens. + Skills register deterministic gates via ~defskill~ with the ~:deterministic~ keyword. Each gate is a function that receives (action context) and returns either: - A modified action (the gate approves or adjusts the proposal) - A LOG or EVENT plist (the gate rejects the proposal with a reason)