2 Commits

Author SHA1 Message Date
ee81fa2755 fix: system-self-improve — complete self-edit with tangle+reload, fix self-repair
Some checks failed
Deploy (Gitea) / deploy (push) Has been cancelled
Reworked the system-self-improve skill end-to-end:

1. self-improve-edit:
   - Inline text replacement (no longer depends on org-modify which was
     in an unexported skill package and broken)
   - After editing a .org file, automatically tangles to .lisp, compiles,
     and loads the result into the running daemon
   - Memory snapshot before edit for rollback safety

2. self-improve-balance-parens:
   - New utility: detects unbalanced parens via the Lisp reader, counts
     open/close parens using loop+char= (avoiding #\( #\) which
     confuse text-based paren counting)
   - Returns balanced code or nil if already balanced

3. self-improve-repair-syntax:
   - New driver: locates a skill's .org source file, extracts all lisp
     blocks, runs each through balance-parens, writes fixes back,
     then tangles+compiles+loads

4. self-improve-fix:
   - Diagnosis phase (unchanged): pattern-matches error logs for Reader
     Error, Undefined symbol, or PACKAGE errors
   - Repair phase (new): dispatches syntax errors to
     self-improve-repair-syntax; other error types return diagnosis
     with :repaired nil

5. Infrastructure:
   - org-tangle-file: reads #+PROPERTY: header-args:lisp :tangle from
     any .org file, extracts blocks, writes .lisp, compiles, loads
   - org-extract-lisp-blocks: extracts all #+begin_src lisp blocks
     from an Org content string
2026-05-03 14:49:13 -04:00
5a0d1b1c38 remediation: backfill v0.1.0/v0.2.0 gaps (P0+P1)
- vault: add vault-get-secret/vault-set-secret wrappers
- programming-org: implement org-modify (text search-replace) and org-ast-render (AST to Org text)
- programming-literate: implement literate-block-balance-check (paren validation) and literate-tangle-sync-check (org→lisp diff)
- system-self-improve: replace stubs with surgical text editing and error diagnosis; remove dead first defskill
- system-event-orchestrator: implement orchestrator-bootstrap (scan Org files for HOOK/CRON)
- system-archivist: implement Scribe distillation (daily logs→atomic notes) and Gardener link/orphan repair
- system-memory: implement memory-inspect with type/todo/orphan statistics
- core-skills, core-context: fix path relic (skills/ → lisp/, org/)
- docs: add Token Economics section to DESIGN_DECISIONS, remediation roadmap entries
2026-05-03 10:43:14 -04:00