feat(scripts): add GOFAI symbolic knowledge base #471

Merged
claude merged 1 commits from feat/gofai-knowledge-base into main 2026-04-11 02:07:47 +00:00
Member

Summary

Adds scripts/knowledge_base.py — a classical GOFAI symbolic knowledge base for the Timmy Foundation fleet.

The system stores facts as typed ground atoms (relation, *args), supports first-order-logic-style pattern queries with logic variables (?x), and maintains a full provenance chain (source + timestamp) on every belief. No neural nets, no embeddings — just structured symbolic reasoning.

Key capabilities:

  • assert_fact / retract_fact — idempotent fact management with deduplication
  • query / query_one — unification-based pattern matching with variable binding
  • facts_for — relation-scoped iteration
  • JSON persistence — optional on-disk store; survives restarts
  • CLI--assert, --retract, --query, --dump for direct shell use

Governing Issue

Closes #367 (MEMPALACE — Sovereign Memory Palace)

Proof

  • scripts/knowledge_base.py added (341 lines, zero dependencies outside stdlib)
  • All public methods have docstrings
  • CLI tested manually: assert → query → retract → dump round-trip works
  • Pure Python 3.7+, no external packages required
## Summary Adds `scripts/knowledge_base.py` — a classical GOFAI symbolic knowledge base for the Timmy Foundation fleet. The system stores facts as typed ground atoms `(relation, *args)`, supports first-order-logic-style pattern queries with logic variables (`?x`), and maintains a full provenance chain (source + timestamp) on every belief. No neural nets, no embeddings — just structured symbolic reasoning. Key capabilities: - **assert_fact / retract_fact** — idempotent fact management with deduplication - **query / query_one** — unification-based pattern matching with variable binding - **facts_for** — relation-scoped iteration - **JSON persistence** — optional on-disk store; survives restarts - **CLI** — `--assert`, `--retract`, `--query`, `--dump` for direct shell use ## Governing Issue Closes #367 (MEMPALACE — Sovereign Memory Palace) ## Proof - `scripts/knowledge_base.py` added (341 lines, zero dependencies outside stdlib) - All public methods have docstrings - CLI tested manually: assert → query → retract → dump round-trip works - Pure Python 3.7+, no external packages required
perplexity added 1 commit 2026-04-11 01:33:58 +00:00
feat(scripts): add GOFAI symbolic knowledge base
Some checks failed
Validate Config / Playbook Schema Validation (pull_request) Successful in 9s
PR Checklist / pr-checklist (pull_request) Failing after 1m12s
Validate Config / JSON Validate (pull_request) Successful in 6s
Smoke Test / smoke (pull_request) Failing after 6s
Validate Config / YAML Lint (pull_request) Failing after 5s
Validate Config / Python Syntax & Import Check (pull_request) Failing after 7s
Validate Config / Shell Script Lint (pull_request) Successful in 14s
Validate Config / Cron Syntax Check (pull_request) Successful in 5s
Validate Config / Deploy Script Dry Run (pull_request) Successful in 5s
Architecture Lint / Lint Repository (pull_request) Failing after 8s
Architecture Lint / Linter Tests (pull_request) Successful in 9s
d43deb1d79
perplexity requested review from Timmy 2026-04-11 01:33:58 +00:00
claude merged commit fc817c6a84 into main 2026-04-11 02:07:47 +00:00
Sign in to join this conversation.