# ontology-engine > Convert PARA-structured markdown vault to RDF/TTL knowledge graph. Extract items, meetings, and relationships into semantic triples. - Author: hwaa - Repository: DinN0000/knowledge-graph - Version: 20260209131658 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-09 - Source: https://github.com/DinN0000/knowledge-graph - Web: https://mule.run/skillshub/@@DinN0000/knowledge-graph~ontology-engine:20260209131658 --- --- name: ontology-engine description: Convert PARA-structured markdown vault to RDF/TTL knowledge graph. Extract items, meetings, and relationships into semantic triples. --- # Ontology Engine (PARA) Convert PARA-structured markdown vault to RDF/TTL ontology for semantic querying. ## Usage ### Build Knowledge Graph ```bash source .venv/bin/activate && \ python .claude/skills/ontology-engine/scripts/vault_to_ttl.py ./vault --output ./knowledge.ttl ``` ### With Custom Folders ```bash source .venv/bin/activate && \ python .claude/skills/ontology-engine/scripts/vault_to_ttl.py ./vault \ --inbox-dir 0_Inbox \ --project-dir 1_Project \ --area-dir 2_Area \ --resource-dir 3_Resource \ --archive-dir 4_Archive \ --output ./knowledge.ttl ``` ## Parameters | Parameter | Default | Description | |-----------|---------|-------------| | `vault_path` | Required | Root vault directory | | `--output` | `knowledge.ttl` | Output TTL file | | `--inbox-dir` | `0_Inbox` | Inbox folder | | `--project-dir` | `1_Project` | Project folder | | `--area-dir` | `2_Area` | Area folder | | `--resource-dir` | `3_Resource` | Resource folder | | `--archive-dir` | `4_Archive` | Archive folder | ## PARA Folder Structure | Folder | Type | Contents | |--------|------|----------| | `0_Inbox/` | Flat | `*.md` files | | `1_Project/` | Nested | `YYMM ProjectName/` subfolders | | `2_Area/` | Flat | `*.md` files | | `3_Resource/` | Flat | `*.md` files | | `4_Archive/` | Nested | `YYMM ProjectName/` subfolders | ## Extraction Rules ### Item Files **Location**: All PARA folders **Extracted Fields**: - Name (from YAML `title` or filename) - Tags (from YAML `tags`) - Summary (from YAML `summary`) - Date (from YAML `date` or folder name) - Status (from YAML `status`) ### Project/Archive Folders **Folder Pattern**: `YYMM ProjectName` or `YYMMDD ProjectName` **Extracted Fields**: - Project name (from folder name) - Start date (from folder name) - Tags (aggregated from files) - Summary (from first file) - Status (archived for Archive folder) ### Meetings **Pattern**: `## YYYY.MM.DD` or `## YYYY-MM-DD` headings **Extracted Fields**: - Date - Summary (content under heading) - Topics (hashtags in content) - Source item ### Relationships **From [[Wikilinks]]**: - Item → Item: `:relatedTo` - Meeting → Item: `:sourceItem` - Meeting → Topic: `:hasTopic` ## Output Schema ### Classes | Class | Description | |-------|-------------| | `:Item` | Note item from any PARA folder | | `:PARAFolder` | PARA folder (inbox, project, area, resource, archive) | | `:Meeting` | Meeting, call, or interaction | | `:Topic` | Discussion topic | ### Properties | Property | Domain | Range | |----------|--------|-------| | `:name` | Any | string | | `:date` | Meeting/Item | date | | `:summary` | Any | string | | `:filePath` | Item/PARAFolder | string | | `:tag` | Item | string | | `:inFolder` | Item | PARAFolder | | `:paraType` | PARAFolder | string | | `:relatedTo` | Item | Item | | `:hasStatus` | Item | string | | `:sourceItem` | Meeting | Item | | `:hasTopic` | Meeting | Topic | ## Example Output ```turtle @prefix : . @prefix data: . data:folder_1_Project a :PARAFolder ; :name "1_Project" ; :paraType "project" . data:item_AI_Platform a :Item ; :name "AI Platform" ; :inFolder data:folder_1_Project ; :summary "AI automation platform development" ; :date "2024-01-15"^^xsd:date ; :hasStatus "active" . data:AI_Platform_meeting_0 a :Meeting ; :sourceItem data:item_AI_Platform ; :date "2024-01-15"^^xsd:date ; :summary "Project kickoff" . ``` ## Dependencies ```bash pip install rdflib pyyaml ```