Root cause chain:
1. proto-get was used throughout the pipeline but never defined — added
to core-communication.org as a keyword-normalizing getf wrapper.
2. security-dispatcher.lisp was loaded by skill-initialize-all into a
separate package, making HITL functions invisible to :passepartout.
Fixed by adding to ASDF component list and excluding from skill loader.
3. org-id-generate was referenced from hitl-create but lives in an
unexported skill package — replaced with uuid:make-v4-uuid.
4. uiop:string-prefix-p was called with :test keyword argument it does
not accept — replaced with string-downcase normalization on both sides.
Also:
- Export hitl-create, hitl-approve, hitl-deny, hitl-handle-message,
stimulus-inject from :passepartout for REPL accessibility.
Fixes 4 pre-existing PROSE-BEFORE-CODE violations in the HITL in-memory
store section. Each function (hitl-create, hitl-approve, hitl-deny,
hitl-handle-message) now has a *** sub-heading with explanatory prose
before its code block.
(setf (getf signal :approved t)) → (setf (getf signal :approved) t)
Caught during system compilation. This is exactly the class of bug that
the REPL-first discipline would have caught instantly.
- dispatcher-check: add :level :approval-required to network/high-impact returns
- cognitive-verify: distinguish approval-required from hard rejection; pass
approval requests through to act gate instead of returning early
- loop-gate-reason: don't retry approval requests; pass them as approved-action
with :status :requires-approval
- loop-gate-act: detect approval-required, create Flight Plan, dispatch HITL
message to user's client, don't execute original action
- loop-gate-perceive: handle re-injected approved signals from
dispatcher-approvals-process; set :approved-action on signal
- dispatcher-approvals-process: fix function name (stimulus-inject) and wrap
action in proper signal envelope with :sensor :approval-required
- Fix: list-objects-with-attribute → memory-objects-by-attribute
- Fix: org-id-new → org-id-generate
- Fix: inject-stimulus → stimulus-inject (correct function name)
Flow:
1. LLM proposes high-risk action → dispatcher returns approval-required
2. cognitive-verify collects approval request → passes to reason as :requires-approval
3. loop-gate-act creates Flight Plan → dispatches HITL message to client → exits
4. Human approves in Emacs → heartbeat re-injects with :approved t
5. Re-injected signal flows through pipeline → dispatcher passes through
6. Action executed normally
- Added ;; REPL-VERIFIED: comments to all 164 definition blocks across 30 org files
- Split 32 multi-definition blocks into one-per-block (one function per block)
- Added Org headlines to 45 blocks missing prose-before-code
- verify-repl now returns PASS on entire org/ directory
- system-context-manager (new skill): stack-based project focusing with
push-context/pop-context, path resolution relative to base path, and
scope-aware memory queries via context-scoped-query.
- core-memory: add :scope slot to memory-object struct (default :memex).
- core-memory: ingest-ast accepts &key (scope :memex), propagates to children.
- core-context: context-query accepts :scope parameter for filtering.
- DEFECT FIX: renamed org-object-* accessors to memory-object-*
across core-context, security-dispatcher, tests, and defpackage exports.
The struct was renamed but accessor references were never updated —
the code referenced nonexistent functions.
- New system-event-orchestrator skill with hook registry, cron registry, and tier classifier
- Three dispatch tiers: :reflex (no LLM), :cognition (light), :reasoning (full)
- Org-mode timestamp parsing for repeat patterns (+1w, +1d, +1m)
- Registers on heartbeat via defskill, dispatches due cron jobs
- Fix all remaining harness-log → log-message references across org files