semantica-knowledge-graph

Record decisions and trace causal chains in a session-scoped knowledge graph.

2|Updated Jul 18, 2026
One-click install
npx skills add https://github.com/Arasz/ai-badger --skill semantica-knowledge-graph-arasz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: semantica-knowledge-graph
Source: https://github.com/Arasz/ai-badger/tree/main/features/common/skills/semantica-knowledge-graph
Command: npx skills add https://github.com/Arasz/ai-badger --skill semantica-knowledge-graph-arasz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Decisions made during a coding session are usually lost or scattered across chat logs, making it impossible to trace why a choice was made or find prior precedents. This Skill structures that reasoning into a queryable knowledge graph with provenance, then bridges it into persistent memory so insights survive the session. ## Core Features & Use Cases - Decision Recording with Provenance: Record decisions with category, scenario, reasoning, outcome, and confidence, then cite decision IDs in commits or PRs for traceability. - Entity Extraction & Causal Tracing: Extract entities and relationships from conversations via agent-guided reasoning, and trace causal chains or find precedents with graph queries. - Automatic Graph Persistence: PostToolUse hooks auto-save every export_graph result to per-session timestamped files under .semantica/, which AiRaccoon memory watches and ingests for cross-session retrieval. - Use Case: During an architecture review, record each design decision with its rationale, link the affected components as graph entities, and later run find_precedents to check whether a similar scenario was already decided. ## Quick Start Ask the agent to record the current design decision in the Semantica knowledge graph with its reasoning and confidence, then query the causal chain behind it.

Frequently Asked Questions about semantica-knowledge-graph

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I record a decision in a knowledge graph during a coding session?

Call record_decision with category, scenario, reasoning, outcome, and confidence parameters, then add related entities and relationships. Cite the returned decision ID in commits or PRs so the rationale stays traceable.

What is the difference between Semantica and AiRaccoon memory?

AiRaccoon memory_search answers what is known through semantic recall over indexed documents, while Semantica query_decisions answers how things are connected through structured graph reasoning. Durable facts go to AiRaccoon memory_write; ephemeral causal reasoning stays in Semantica.

Does the Semantica knowledge graph persist after the session ends?

No, the graph is session-scoped and dies on process exit with no import mechanism. The skill bridges this by auto-saving export_graph results to .semantica/ files, which AiRaccoon watches and ingests into its persistent SQLite memory.

Why is my .semantica directory empty after running export_graph?

An upstream bug in Semantica 0.6.5 and 0.6.6 makes every export_graph format error out, so an empty .semantica/ directory reflects that bug, not a broken bridge. Graph tools like record_decision and query_decisions still work normally.

Does entity extraction require an LLM API key?

No. The primary path is agent-guided extraction where the LLM reasons over concepts and calls add_entity directly. The optional native extract_entities path needs local PyTorch and transformers packages, not API keys.

When should I not use a knowledge graph for decision tracking?

Skip it for one-off fact lookups, which memory_search handles better, and for durable facts that must outlive the session, which belong in memory_write. Use the graph only when connections and causality between decisions matter.