# Terraphim Knowledge Graph Configuration Multi-repository role-based knowledge graphs with controlled embeddings. ## Overview This repository contains knowledge graph configurations for different projects/roles, enabling: - Repository-specific semantic search - Domain-specific synonym expansion - Controlled embedding strategies - Isolated knowledge domains ## Structure ``` . ├── multi_repo_roles.json # Role definitions ├── KG_ROLES.md # Documentation └── kg/ # Knowledge graphs per role ├── terraphim-ai/ # Terraphim AI (Rust) ├── openclaw/ # OpenClaw (TypeScript) ├── last30days/ # Last30Days skill ├── system/ # System Operator └── terraphim-engineer/ # Default engineer role ``` ## Roles ### 1. Terraphim AI Developer - **Focus**: Rust-based AI assistant development - **Thesaurus**: Rust, Knowledge Graph, Agent, Search, Role - **Embeddings**: local (deep) ### 2. OpenClaw Developer - **Focus**: TypeScript gateway and agent platform - **Thesaurus**: TypeScript, Gateway, Channel, Skill, Config - **Embeddings**: local (standard) ### 3. Last30Days Skill Developer - **Focus**: Claude Code skill for web research - **Thesaurus**: Research, Reddit, Twitter/X, Web, Claude - **Embeddings**: none (basic) ### 4. System Operator - **Focus**: System administration and operations - **Thesaurus**: Logs, Config, Service, Network, Security - **Embeddings**: none (minimal) ### 5. Learning Capture - **Focus**: Personal knowledge and learning capture - **Thesaurus**: 20 concept groups (knowledge, config, git, etc.) - **Embeddings**: local (deep) ### 6. Terraphim Engineer (Default) - **Focus**: General engineering tasks - **Thesaurus**: Comprehensive 20-group thesaurus - **Embeddings**: local (deep) ## Usage ### Installation ```bash # Clone to Terraphim config directory git clone https://git.terraphim.cloud/kimie05c34be198a20b9/terraphim-kg-config.git ~/.config/terraphim/kg-config # Or copy files manually cp -r kg/* ~/.config/terraphim/kg/ cp multi_repo_roles.json ~/.config/terraphim/ ``` ### Configuration Update `~/.config/terraphim/settings.toml`: ```toml role_config = "~/.config/terraphim/multi_repo_roles.json" default_role = "LearningCapture" ``` ### Switching Roles ```bash # List roles terraphim-agent roles list # Select role terraphim-agent roles select "Terraphim AI Developer" # Query with synonym expansion terraphim-agent learn query "rust" ``` ## Thesaurus Format Each thesaurus is a JSON file mapping terms to canonical concepts: ```json { "name": "Role Name", "data": { "term1": { "id": 1, "nterm": "concept" }, "term2": { "id": 1, "nterm": "concept" }, "term3": { "id": 2, "nterm": "concept2" } } } ``` ## Embeddings Control | Role | Model | Depth | Use Case | |------|-------|-------|----------| | Terraphim AI | local | deep | Complex reasoning | | OpenClaw | local | standard | Balanced | | Last30Days | none | basic | Simple lookup | | System Operator | none | minimal | Log analysis | | Learning Capture | local | deep | Semantic memory | ## Synonym Groups ### Knowledge (ID: 1) learning, knowledge, lesson, insight, discovery ### Configuration (ID: 2) setup, configuration, install, deployment, initialize ### Git (ID: 3) gitea, git, github, repository, version control ### AI Assistant (ID: 4) terraphim, ai assistant, agent, claude, kimi ### Tool (ID: 5) skill, tool, capability, function, feature ### Storage (ID: 6) memory, storage, persistence, database ### Context Management (ID: 7) arscontexta, onecontext, context, progress ### Retrieval (ID: 8) search, retrieval, query, find, lookup ### Failure (ID: 9) error, failure, mistake, bug, issue, problem ### Documentation (ID: 10) documentation, docs, guide, manual, readme ### Programming Languages (IDs: 11-13) - Rust: rust, cargo - JavaScript: javascript, js, node, npm - Python: python, py, pip ### Testing (ID: 14) test, testing, spec, verify, validation ### Security (ID: 15) security, secure, safety, protect, guard, audit ### Performance (ID: 16) performance, speed, fast, optimize, efficiency ### Build (ID: 17) build, compile, make, package ### Execution (ID: 18) run, execute, start, launch ### Debugging (ID: 19) debug, debugging, troubleshoot, diagnose ### Repair (ID: 20) fix, repair, correct, resolve, solve ## License Apache-2.0