Skip to content

Knowledge Extraction

From SKILL.md to Ontology

A skill is not just code — it’s structured knowledge. OntoCore extracts this knowledge and compiles it into a queryable ontology.


What Gets Extracted

Every skill is compiled with:

ElementPropertyDescription
Identityoc:nature, oc:genus, oc:differentia”A is a B that C” definition
Intentsoc:resolvesIntentWhat user intentions this skill resolves
Requirementsoc:hasRequirementDependencies (EnvVar, Tool, Hardware, API, Knowledge)
Knowledge Nodesoc:impartsKnowledgeEpistemic knowledge (8-12 per skill)
State Transitionsoc:requiresState, oc:yieldsState, oc:handlesFailurePreconditions, outcomes, error handling
Execution Payloadoc:hasPayloadOptional code to execute
Provenanceoc:generatedByAttestation (which LLM compiled it)

Knowledge Nodes

The heart of knowledge extraction. Each skill imparts 8-12 Knowledge Nodes — structured epistemic rules.

The 10 Knowledge Node Types

TypeDescriptionExample
HeuristicRule of thumb”Prefer streaming for files >100MB”
AntiPatternWhat to avoid”Don’t read entire file into memory”
PreFlightCheckVerify before execution”Check disk space before download”
RecoveryTacticHow to recover from failure”Retry with exponential backoff”
OptimizationHintPerformance guidance”Cache compiled regex patterns”
ContextualConstraintWhen this applies”Only works on Unix systems”
ImplementationDetailTechnical specifics”Uses libcurl for HTTP”
ExternalDependencyRequired tools/libs”Requires Python 3.10+“
FailureModeHow it can fail”Timeout on slow networks”
SuccessMetricHow to measure success”Process completes in <5s”

Node Structure

Each Knowledge Node has:

  • directiveContent — The actual rule or insight
  • appliesToContext — When this applies
  • hasRationale — Why this rule exists
  • severityLevel — How important (critical, warning, info)

Modular Ontology Architecture

The Single Skill as Module

Each compiled skill is a self-contained .ttl file:

ontoskills/
├── ontoskills-core.ttl # Core TBox (shared)
├── index.ttl # Manifest with owl:imports
├── pdf/
│ └── ontoskill.ttl # PDF skill module
├── markdown/
│ └── ontoskill.ttl # Markdown skill module
└── email/
└── ontoskill.ttl # Email skill module

Pluggable Knowledge

  • Add a skill → Drop a .ttl file
  • Remove a skill → Delete the .ttl file
  • Update a skill → Replace the .ttl file

The global ontology grows by addition, not modification.


Querying the Knowledge

Find Skills by Intent

SELECT ?skill WHERE {
?skill oc:resolvesIntent "create_pdf"
}

Get Knowledge Nodes for a Skill

SELECT ?content ?type WHERE {
<skill:pdf> oc:impartsKnowledge ?node .
?node oc:directiveContent ?content .
?node a ?type .
}

Find Anti-Patterns Across All Skills

SELECT ?skill ?content WHERE {
?skill oc:impartsKnowledge ?node .
?node a oc:AntiPattern .
?node oc:directiveContent ?content .
}

The Value Proposition

Before (Reading Files)After (Ontology Query)
Parse 50 SKILL.md filesSingle SPARQL query
~500KB text scan~1KB query
Non-deterministicExact results
Context overflowQuery what you need
LLM interpretsGraph returns

Knowledge becomes queryable. Intelligence becomes democratized.