feat: P2 — provider-agnostic embeddings + subtree loading
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 2s

- system-embeddings (new skill): hashing-trick embeddings for memory-object
  vectors. Works offline with no Ollama/API dependency. Falls back to
  hashing-trick when no embedding backend is registered. Extensible —
  set *embedding-backend* to use Ollama/OpenAI/any provider.
- programming-org: add org-subtree-extract and org-heading-list for
  targeting specific headlines in Org text without loading whole files.
- core-context: add context-skill-subtree thin wrapper delegating to
  org-subtree-extract. Core stays thin — parsing lives in the skill.
This commit is contained in:
2026-05-03 11:43:27 -04:00
parent 836c9ba7b8
commit b67cd12d88
6 changed files with 349 additions and 4 deletions

View File

@@ -97,7 +97,25 @@ Reads the raw literate source of a specific skill for inspection. Used when the
(data-dir (uiop:ensure-directory-pathname (or (uiop:getenv "PASSEPARTOUT_DATA_DIR") (namestring (merge-pathnames ".local/share/passepartout/" (user-homedir-pathname))))))
(org-dir (merge-pathnames "org/" data-dir))
(full-path (merge-pathnames filename org-dir)))
(if (uiop:file-exists-p full-path) (uiop:read-file-string full-path) nil)))
(if (uiop:file-exists-p full-path) (uiop:read-file-string full-path) nil)))
#+end_src
** Subtree Skill Source (context-skill-subtree)
Returns a specific headline subtree from a skill's Org file. Delegates to
=org-subtree-extract= in the =programming-org= skill for actual parsing.
#+begin_src lisp
(defun context-skill-subtree (skill-name heading-name)
"Reads a specific headline subtree from a skill's Org source file.
Returns the content under HEADING-NAME (including children) as a string,
or nil if the heading is not found."
(let ((full-source (context-skill-source skill-name)))
(unless full-source (return-from context-skill-subtree nil))
(if (fboundp 'org-subtree-extract)
(org-subtree-extract full-source heading-name)
;; Fallback: no org-subtree-extract available, return full source
full-source)))
#+end_src
** Harness Logs (context-logs)