Commit Graph

15 Commits

Author SHA1 Message Date
97168ae512 refactor: Migrate tests into literate Org files per LP standard
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 3s
- Add test suites inline in harness/communication.org
- Add test suites inline in harness/perceive.org, reason.org, act.org
- Add test suites inline in harness/skills.org, memory.org, loop.org
- Tests now live alongside code, not in separate .lisp files
- Each test block has prose explaining its purpose

Test results: 84/84 pass (100%)
2026-04-25 19:01:48 -04:00
ac14cb0708 Enhance TUI: command history, multi-line input, UI chrome
- Add command history with ↑↓ arrow navigation
- Add multi-line input support (Shift+Enter)
- Add UI chrome: borders, help bar, status bar
- Add slash commands: /help, /exit, /clear
- Style messages with emoji prefixes (🤔 💬 🔧 )
- Format incoming messages with format-incoming function
- Fix input rendering with conditional bold attributes
2026-04-23 13:54:21 -04:00
442f177177 Fix tests: add :tangle to mock org blocks, fix parse-message 2026-04-23 13:44:03 -04:00
dfe318425f Add v0.2.0 features: vector search + tool permissions
- Local vector search: Ollama embeddings + semantic search
  - get-embedding with caching
  - cosine-similarity computation
  - semantic-search cognitive tool
  - :semantic-search tool for LLM queries

- Tool permission tiers: security gating for cognitive tools
  - Three tiers: :allow, :deny, :ask
  - Gate in execute-tool-action before tool runs
  - Defaults: :deny for shell/delete-file, :ask for eval/write-file
  - :tool-permissions cognitive tool for management

- Embedding provider support: Ollama AND llama.cpp
  - EMBEDDING_PROVIDER env var
  - EMBEDDING_MODEL env var
  - LLAMA_HOST for llama.cpp server

- .env.example: Add embedding config variables
- Fix parse-message in communication.lisp

- Update ASDF: add test files, tool-permissions skill

All 60 tests pass (6 suites x 100%)
2026-04-23 13:43:50 -04:00
92b6f3cf2b feat: Add cognitive tools to skills.org (reload-skill, read-file, write-file, replace-string)
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 3s
New tools require manual addition to skills.lisp due to compilation issue.
2026-04-22 20:57:41 -04:00
2cdd8fe1a4 docs: Comprehensive literate documentation for harness core
- loop.org: Explain metabolic pipeline, error recovery, heartbeat
- reason.org: Document dual-engine architecture (probabilistic + deterministic)
- act.org: Detail actuation, actuator pattern, feedback loop
- perceive.org: Explain signal normalization, async vs sync processing
- manifest.org: Add ASDF system design, boundary contract

Each function now has its own code block with detailed docstrings explaining:
- What the function does
- Why it was designed that way
- How it fits into the larger system
- Parameter descriptions
- Return values
2026-04-22 16:49:27 -04:00
cbd786e6b1 fix: Add normalize-plist-keywords and fix RESPONSE unbound bug
- Add normalize-plist-keywords to convert LLM output TYPE -> :TYPE
- Fix reason-gate to validate candidate is proper plist
- Add debugging logs to trace LLM responses
- Fix syntax error (extra paren) in think function
2026-04-22 15:51:03 -04:00
586847bd02 fix: Implement COSINE-SIMILARITY and fix memory persistence serialization
- Replace stub COSINE-SIMILARITY with real dot-product implementation
- Fix memory persistence to convert hash tables to alists before serialization
2026-04-22 15:26:39 -04:00
6bfc95e136 feat: Add make-load-form for org-object serialization
Add make-load-form method to enable standard CL serialization of
org-object structs. This is a prerequisite for proper memory persistence.
2026-04-22 15:25:17 -04:00
620267a8df feat: Add memory persistence functions (save/load-memory-to-disk)
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 2s
- Add save-memory-to-disk and load-memory-from-disk to memory.lisp
- Integrate auto-save into heartbeat (every N intervals)
- Load memory on daemon startup, save on graceful shutdown/SIGINT
- Add exports to package.lisp

NOTE: Hash table serialization requires object walker for complex structures.
      Current implementation fails on load due to unreadable objects.
2026-04-22 15:14:18 -04:00
b62b7f1095 fix: protocol validator allows REQUEST without :target if :source is present
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 3s
- Relax validate-communication-protocol-schema to accept :REQUEST messages without
  :target when :source is present in :meta (reason-gate infers target from source).
- This preserves 'equality of clients' — gateways don't duplicate routing logic.
- Add communication-validator to ASD components.
- Fixes TCP CLI gateway integration: clients can now connect and receive responses.
- Verified with test client: 13/13 skills load, Perceive gate processes messages.
2026-04-22 14:47:34 -04:00
aae6938880 fix: Skill loader respects :tangle blocks and breaks circular dep with validator
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 5s
- load-skill-from-org now only collects #+begin_src lisp blocks that have a
  :tangle directive pointing to a runtime .lisp file, excluding tests/ paths.
- validate-lisp-syntax falls back to a basic reader check when
  lisp-validator-validate is not yet fboundp, breaking the circular dependency
  between the harness loader and the validator skill.
- Verified full boot: 13/13 skills load successfully, including the new
  skill-lisp-validator (priority 900) and skill-policy (priority 500).
2026-04-22 13:18:29 -04:00
76040c1f48 feat: Add Lisp Validator skill with 3-phase deterministic gate
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 5s
- Implements structural (O(n) paren balance), syntactic (reader with *read-eval* nil),
  and semantic (whitelist AST walk) validation.
- Exposes :validate-lisp cognitive tool for Probabilistic Engine self-correction.
- Replaces validate-lisp-syntax stub in harness/skills.org with delegation.
- Adds mandatory validation rule to Probabilistic Engine system prompt.
- Refactors org-skill-policy.org with 6 concrete invariants (Transparency, Autonomy,
  Zero-Bloat, Modularity, Mentorship, Sustainability) and explicit override hierarchy.
- Adds Harness Boundary Contract to harness/manifest.org.
2026-04-22 13:12:49 -04:00
6c333af7aa ARCH: Finalize semantic reorganization, skill jailing, and unified CLI
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 4s
2026-04-22 11:38:13 -04:00
60f2c152e0 REORG: Apply semantic directory structure and documentation cleanup
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 2s
2026-04-21 19:07:32 -04:00