Obsidian Ontology Sync
2026-03-27
新闻来源:网淘吧
围观:14
电脑广告
手机广告
Obsidian-Ontology 同步
核心理念Obsidian 是主体(人类撰写自然笔记)→ Ontology 是衍生物(机器提取结构)→ 反馈循环促进两者共同提升
核心概念
Obsidian Notes (Markdown)
↓ Extract (every 3 hours)
Ontology Graph (Structured)
↓ Query & Analyze
Insights & Suggestions
↓ Feedback
Improved Note Templates
使用时机
| 情景 | 操作 |
|---|---|
| 创建/更新联系人后 | 运行同步以提取实体 |
| 业务查询前 | 先同步,再查询本体 |
| 每周回顾 | 同步 + 分析 + 获取建议 |
| 新项目设置 | 提取实体 + 建议结构 |
| 团队状态跟踪 | 同步每日状态 → 本体 → 分析 |
提取内容
从联系人笔记中提取(references/contacts/*.md)
提取项:
人员实体(姓名、电子邮件、电话)工作于→组织相遇于→活动分配给→项目(如提及)状态→(潜在客户、意向客户、客户等)
示例:
# Alice Johnson
**Email:** alice@company.com
**Company:** Acme Corp
**Met At:** Tech Conference 2026
**Projects:** Project Alpha
## Notes
Great developer, responsive communication.
变为:
{
"entity": {
"id": "person_alice_johnson",
"type": "Person",
"properties": {
"name": "Alice Johnson",
"email": "alice@company.com",
"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"}
]
}
来自客户笔记(参考资料/客户/*.md)
提取:
组织实体拥有合同价值→ 数字项目→项目实体主要联系人→人员
来自团队笔记 (references/team/*.md)
提取内容:
人员实体供职于→组织分配给→项目[]向...汇报→人员响应模式→ (主动型,被动型,无响应型)
来自每日状态 (daily-status/YYYY-MM-DD/*.md)
提取内容:
响应时间人员的属性状态更新→事件阻碍因素→问题实体行为模式追踪
来自项目笔记 (projects/*.md)
提取内容:
项目实体为客户端→组织团队→人员[]状态,价值,截止日期
同步流程
1. 提取阶段(Markdown → 本体)
# 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
检测规则:
# 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()
2. 分析阶段(本体 → 洞察)
# 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"
3. 反馈阶段(洞察 → 改进个人知识管理)
# Get suggestions
python3 skills/obsidian-ontology-sync/scripts/sync.py feedback
# Creates:
# - Missing property suggestions
# - Broken link reports
# - Relationship suggestions
# - Template improvements
反馈示例:
# 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
配置
config.yaml
# /root/life/pkm/ontology-sync/config.yaml
obsidian:
vault_path: /root/life/pkm
# What to sync
sources:
contacts:
path: references/contacts
entity_type: Person
extract:
- email_from_content
- company_from_property
- projects_from_links
clients:
path: references/clients
entity_type: Organization
extract:
- contract_value
- projects
- contacts
team:
path: references/team
entity_type: Person
role: team_member
extract:
- assignments
- response_patterns
- reports_to
daily_status:
path: daily-status
extract:
- response_times
- behavioral_patterns
- blockers
ontology:
storage_path: /root/life/pkm/memory/ontology
format: jsonl # or sqlite for scale
# Entity types to track
entities:
- Person
- Organization
- Project
- Event
- Task
# Relationships to extract
relationships:
- works_at
- assigned_to
- met_at
- for_client
- reports_to
- has_task
- blocks
feedback:
output_path: /root/life/pkm/ontology-sync/feedback
generate_reports: true
suggest_templates: true
highlight_missing: true
schedule:
# Run via cron every 3 hours
sync_interval: "0 */3 * * *"
analyze_daily: "0 9 * * *" # 9 AM daily
feedback_weekly: "0 10 * * MON" # Monday 10 AM
计划同步(Cron集成)
设置自动同步
# Add to OpenClaw cron
python3 skills/obsidian-ontology-sync/scripts/setup-cron.py
# Or manually via cron tool
cron add \
--schedule "0 */3 * * *" \
--task "python3 skills/obsidian-ontology-sync/scripts/sync.py extract" \
--label "Obsidian → Ontology Sync"
已创建的Cron作业:
- 每3小时:从Obsidian提取实体 → 更新本体
- 每日上午9点:运行分析并生成洞察
- 每周一上午10点:生成反馈报告 + 模板建议
查询(使用本体)
同步完成后,您可以查询:
# All team members on high-value projects
python3 skills/ontology/scripts/ontology.py query \
--type Person \
--where '{"role":"team_member"}' \
--related assigned_to \
--filter '{"type":"Project","value__gt":400000}'
# Contacts from specific event not yet followed up
python3 skills/ontology/scripts/ontology.py query \
--type Person \
--where '{"met_at":"event_tech_conference_2026"}' \
--missing has_task
# Team response patterns
python3 skills/ontology/scripts/ontology.py query \
--type Person \
--where '{"role":"team_member"}' \
--aggregate response_pattern
# Projects by client
python3 skills/ontology/scripts/ontology.py query \
--type Project \
--group-by for_client \
--count
反馈循环示例
示例1:缺失邮箱检测
本体发现:缺少邮箱属性的人员实体
反馈生成:
## Missing Contact Information
The following team members are missing email addresses:
- [ ] Bob (`references/team/Bob.md`)
- [ ] Lucky (`references/team/Lucky.md`)
**Suggestion:** Add email field to team member template:
\`\`\`markdown
**Email:**
\`\`\`
示例2:项目链接断裂
本体发现:人员被指派至不存在的项目
反馈生成:
## Broken Project References
Found references to projects that don't have dedicated files:
- [ ] "Project Epsilon" mentioned in team files but no `projects/Project Epsilon.md`
- [ ] "Project Delta Tata DT" assigned but no project file
**Suggestion:** Create project files with template
示例3:关系发现
本体发现:多人在同一家公司工作
反馈生成:
## Suggested Company Grouping
Found 3 contacts at "TechHub":
- Jane Doe
- [2 others from daily-status mentions]
**Suggestion:** Create `references/clients/TechHub.md` and link contacts
与日常工作流程集成
早间例行(上午9点)
# Cron runs analysis
# Generates daily-insights.md with:
- Response rate from yesterday's status requests
- Projects needing attention (blockers mentioned)
- Contacts to follow up (met > 3 days ago, no task)
每周回顾(周一上午10点)
# Cron generates weekly feedback
# Creates suggestions for:
- Missing information to fill in
- Broken links to fix
- New templates to adopt
- Relationship insights
按需查询
# Before a meeting
"Show me all interactions with Client X"
# Resource planning
"Which team members are on <3 projects?"
# Sales pipeline
"Contacts met at conferences in last 30 days without follow-up"
优势
✅ 为您
- 零额外工作量:只需继续正常书写Obsidian笔记
- 自动结构化:本体自动提取
- 强大查询:在所有数据中发现模式
- 质量提升:反馈循环捕捉遗漏信息
- 无重复录入:单一事实来源(Obsidian)
✅ 对于团队管理
- 追踪成员参与项目情况(自动提取)
- 监控响应模式(来自每日状态)
- 识别工作量不均衡
- 发现跨项目障碍
✅ 对于销售/业务拓展
- 追踪联系人网络(你见过谁、在哪里、何时)
- 跟进提醒(超过7天前联系过的)
- 关系映射(谁认识谁)
- 销售管道洞察(潜在客户 → 温线索 → 客户)
✅ 对于财务
- 项目估值(从客户笔记中提取)
- 团队成本分配(人员 → 项目 → 收入)
- 收入预测(活跃项目 × 价值)
同步后的文件结构
/root/life/pkm/
├── references/
│ ├── contacts/ # Source notes (you write these)
│ ├── clients/ # Source notes
│ └── team/ # Source notes
├── daily-status/ # Source notes
├── projects/ # Source notes
│
├── memory/ontology/ # Generated ontology
│ ├── graph.jsonl # Entity/relation storage
│ └── schema.yaml # Type definitions
│
└── ontology-sync/ # Sync outputs
├── config.yaml # Your config
├── feedback/
│ ├── daily-insights.md
│ ├── weekly-feedback.md
│ └── suggestions.md
└── logs/
└── sync-YYYY-MM-DD.log
高级功能:双向同步
未来能力:
根据本体论洞见更新 Obsidian 笔记:
# Automatically add missing fields
python3 skills/obsidian-ontology-sync/scripts/sync.py apply-feedback
# What it does:
# - Adds missing email field to contact notes
# - Creates suggested project files
# - Links related entities
# - Updates frontmatter
安全须知:修改文件前务必创建备份。
与其他方案的比较
| 方案 | 优点 | 缺点 |
|---|---|---|
| 纯手动本体维护 | 完全掌控 | 工作量过大,易落后 |
| 仅使用 Obsidian | 简单 | 无法进行结构化查询 |
| 仅使用本体论工具 | 查询功能强大 | 对用户不友好 |
| 本技能 | 兼取两者之长 | 需要初始设置 |
入门指南
1. 安装依赖项
# Already have ontology skill installed
clawhub install obsidian # If not already installed
2. 创建配置
python3 skills/obsidian-ontology-sync/scripts/init.py
# Creates:
# - config.yaml with your vault path
# - ontology directory structure
# - cron jobs
3. 运行首次同步
# Manual first sync to test
python3 skills/obsidian-ontology-sync/scripts/sync.py extract --dry-run
# See what would be extracted
# Review, then run for real:
python3 skills/obsidian-ontology-sync/scripts/sync.py extract
4. 启用自动同步
python3 skills/obsidian-ontology-sync/scripts/setup-cron.py
# Confirms cron jobs:
# ✓ Sync every 3 hours
# ✓ Daily analysis at 9 AM
# ✓ Weekly feedback Monday 10 AM
5. 查询您的数据
# Try some queries
python3 skills/obsidian-ontology-sync/scripts/query.py "team members on high value projects"
故障排除
提取问题
# Dry run to see what would be extracted
python3 skills/obsidian-ontology-sync/scripts/sync.py extract --dry-run --verbose
# Check specific file
python3 skills/obsidian-ontology-sync/scripts/debug.py \
--file references/contacts/Alice.md
查询未找到数据
# Check what's in ontology
python3 skills/ontology/scripts/ontology.py query --type Person
# Verify sync ran
cat /root/life/pkm/ontology-sync/logs/sync-latest.log
未生成反馈
# Manually run analysis
python3 skills/obsidian-ontology-sync/scripts/sync.py analyze
python3 skills/obsidian-ontology-sync/scripts/sync.py feedback
版本历史
- 1.0.0(2026-02-27) - 包含数据提取、分析和反馈回路的初始版本
作者:专为大规模团队管理、联系人追踪和商业智能而构建许可证:MIT标签:obsidian, 本体论, 知识图谱, 个人知识管理, 自动化, 同步
文章底部电脑广告
手机广告位-内容正文底部
上一篇:Document Pro
下一篇:Spotify


微信扫一扫,打赏作者吧~