v0.4.0: differentiator — REPL TDD + prose (daemon-side)
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 3s

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.
This commit is contained in:
2026-05-06 19:45:05 -04:00
parent 0e8ba36ddb
commit 98087b43c5
2 changed files with 14 additions and 0 deletions

View File

@@ -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)

View File

@@ -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 <name> :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)