Bidirectional sync between Obsidian PKM (human-friendly notes) and structured ontology (machine-queryable graph). Automatically extracts entities and relationships from markdown, maintains ontology graph, and provides feedback to improve note structure. Run sync every few hours via cron.
Philosophy: Obsidian is PRIMARY (human writes natural notes) → Ontology is DERIVED (machine extracts structure) → Feedback loop improves both
Obsidian Notes (Markdown)
↓ Extract (every 3 hours)
Ontology Graph (Structured)
↓ Query & Analyze
Insights & Suggestions
↓ Feedback
Improved Note Templates
| Situation | Action |
|---|---|
| After creating/updating contacts | Run sync to extract entities |
| Before business queries | Sync then query ontology |
| Weekly review | Sync + analyze + get suggestions |
| New project setup | Extract entities + suggest structure |
| Team status tracking | Sync daily-status → ontology → analytics |
references/contacts/*.md)Extracts:
Person entity (name, email, phone)works_at → Organizationmet_at → Eventassigned_to → Project (if mentioned)status → (prospect, warm_lead, client, etc.)Example:
# Alice Johnson
**Email:** [email protected]
**Company:** Acme Corp
**Met At:** Tech Conference 2026
**Projects:** Project Alpha
## Notes
Great developer, responsive communication.
Becomes:
{
"entity": {
"id": "person_alice_johnson",
"type": "Person",
"properties": {
"name": "Alice Johnson",
"email": "[email protected]",
"notes": "Great developer, responsive communication"
}
},
"relations": [
{"from": "person_alice_johnson", "rel": "works_at", "to": "org_acme"},
{"from": "person_alice_johnson", "rel": "met_at", "to": "event_tech_conference_2026"},
{"from": "person_alice_johnson", "rel": "assigned_to", "to": "project_alpha"}
]
}
references/clients/*.md)Extracts:
Organization entityhas_contract_value → numberprojects → Project entitiesprimary_contact → Personreferences/team/*.md)Extracts:
Person entityworks_for → Organizationassigned_to → Project[]reports_to → Personresponse_pattern → (proactive, reactive, non-responsive)daily-status/YYYY-MM-DD/*.md)Extracts:
response_time property on Personstatus_update → Eventblockers → Issue entitiesbehavioral_pattern trackingprojects/*.md)Extracts:
Project entityfor_client → Organizationteam → Person[]status, value, deadline# Run extraction
python3 skills/obsidian-ontology-sync/scripts/sync.py extract
# What it does:
# 1. Scan configured Obsidian directories
# 2. Parse markdown frontmatter + content
# 3. Extract entities (Person, Project, Organization, etc.)
# 4. Extract relationships (works_at, assigned_to, etc.)
# 5. Write to ontology using append-only operations
Detection Rules:
# Contact files
if file.startswith("references/contacts/"):
entity_type = "Person"
extract_email_from_content()
extract_company_from_property("Company:")
extract_projects_from_links([[Project]])
# Client files
if file.startswith("references/clients/"):
entity_type = "Organization"
extract_contract_value()
extract_projects()
# Team files
if file.startswith("references/team/"):
entity_type = "Person"
role = "team_member"
extract_assignments()
extract_response_patterns()
# Run analytics
python3 skills/obsidian-ontology-sync/scripts/sync.py analyze
# Generates insights like:
# - "3 team members have no assigned projects"
# - "Contact 'John Doe' missing email address"
# - "Project 'X' has 5 people but no client linked"
# - "10 contacts from AI Summit not linked to follow-up tasks"
# Get suggestions
python3 skills/obsidian-ontology-sync/scripts/sync.py feedback
# Creates:
# - Missing property suggestions
# - Broken link reports
# - Relationship suggestions
# - Template improvements
Example Feedback:
# Sync Feedback - 2026-02-27
## Missing Information (10 items)
- [ ] `Alice Johnson` missing phone number
- [ ] `Bob` missing email in team file
- [ ] Project `Project Alpha` missing deadline
## Suggested Links (5 items)
- [ ] Link `Jane Doe` (TechHub) to organization `TechHub`
- [ ] Link `Eve` to project (found in daily-status but not in team file)
## Relationship Insights
- `Project Alpha` team: Alice, Carol, David (extracted from daily-status)
- Suggest updating project file with team assignments
## Template Suggestions
- Add `Projects: [[]]` field to contact template
- Add `Response Pattern:` field to team template
# /root/life/pkm/ontology-sync/config.yaml