Demo log hook

The demo log hook is a minimal post-commit observer that logs every committed Transaction to the console and emits an event on the in-process event bus. It is Phase 1's proof that the hook infrastructure works end-to-end.

What it records

For each committed Transaction:

  • Transaction id and submitting agent
  • Count of asserts + retracts
  • Target Document ids touched
  • Gate traversal timing (cheap instrumentation)

Why ship it in Phase 1

  • Demonstrability. A visible log during the 6-minute demo makes the registry feel alive, not abstract.
  • Verification. The Phase 1 build plan lists "demo hook fires" as a verification step; this hook is what that step asserts against.
  • Development ergonomics. While Phase 1 code-at-init hooks evolve, a console log is the fastest feedback loop.

Not in Phase 1

  • No persistent audit log (Phase 4 adds an append-only DerivedAuxGraph for transaction history).
  • No Slack / email / webhook fan-out (Phase 4 adds the HTTP-webhook transport kind; this hook will remain as the local-only option).
Demo log hook — Sparqdown Docs