New file: org/system-embedding-gateway.org / lisp/system-embedding-gateway.lisp.
- Pluggable backends via *embedding-backend* hook and EMBEDDING_PROVIDER env var
- :hashing (default) — FNV-1a hashing trick, zero dependencies
- :ollama — POST /api/embeddings to local Ollama (nomic-embed-text)
- *embedding-queue* tracks pending objects; embed-all-pending drains queue
with store-wide scan as fallback
- embed-queue-object called after ingest-ast to mark objects for embedding
- Deleted old stub system-embeddings.org (hashing-only, no provider switching)
- Exported embedding symbols from defpackage
Also:
- Added (in-package :passepartout) to system-model-router.org (was missing,
caused CL-USER::DEFSKILL error on daemon start)
- Added system-embedding-gateway to skill-loader exclusion list
- Updated ROADMAP
Adds *scope-resolver* hook in core-loop-perceive that the context-manager
skill sets at load time. The perceive gate now passes the active scope
to ingest-ast, tagging all ingested objects with the current context scope.
Implementation:
- core-loop-perceive: *scope-resolver* defvar (default nil → :memex),
two ingest-ast calls now pass (if *scope-resolver* (funcall it) :memex)
- core-defpackage: export *scope-resolver* and context-query
- system-context-manager: auto-init sets *scope-resolver* to #'current-scope
This completes the Memory Scope Segmentation feature: all three scopes
(:memex, :session, :project) are supported, scope-aware retrieval
(context-query :scope / context-scoped-query) was already implemented,
and ingested objects now correctly carry the active scope.
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.
REPL tool:
- ~/.opencode/bin/repl — connects to running daemon, evaluates Lisp forms,
returns results. Usage: repl '(+ 1 2)' or via stdin.
- Server-side handler in programming-repl skill registers for :repl-eval
sensor, bypasses LLM pipeline, writes result back through reply-stream.
- Core provides pre-reason-handler registry (register-pre-reason-handler)
for skills to register custom sensors without modifying core code.
HITL gateway integration:
- hitl-handle-message: TUI, Telegram, and Signal gateways intercept
approval/deny commands before they reach the LLM.
- hitl-create/hitl-approve/hitl-deny: in-memory HITL store with correlation
tokens for gateway-agnostic approval.
- loop-gate-perceive detects HITL commands and blocks LLM processing.
Naming drift fixes (the complete batch):
- register-actuator vs actuator-register — fixed to register-actuator
- process-signal vs loop-process — alias added
- perceive-gate/reason-gate/act-gate vs loop-gate-* — aliases added
- initialize-actuators vs actuator-initialize — fixed to actuator-initialize
- initialize-all-skills vs skill-initialize-all — fixed to skill-initialize-all
- inject-stimulus alias added for backward compatibility
- All original gateway-manager inject-stimulus → stimulus-inject + HITL check
- 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.