Files
omoolab-project/.claude/commands/oki/query.md
nan b9bbcf131e Add custom font styles and theme enhancements
- Created a new CSS file for font imports and defined font families for base, mono, strong, em, and h1 elements.
- Added a new JavaScript file to extend the default VitePress theme, incorporating a custom layout and a Vue component for enhanced functionality.
- Integrated Mermaid diagram support and included the necessary styles for it.
2026-06-02 13:03:25 +08:00

106 lines
4.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
name: "OKI: Query"
description: 查询有关的知识点,找到直接依据,返回对应「资料记录」
category: Knowledge
tags: [knowledge, wiki]
---
查询有关的知识点,找到直接依据,返回对应「资料记录」
## 知识库结构
```bash
openwiki
├── nodes/ # 知识点 - 从「资料记录」提取到的,描述某知识点的页面
├── public/ # 静态资源
├── scripts/ # 执行脚本
├── sources/ # 资料记录 - 对单篇「原始资料」的总结、记录
├── templates/ # 页面模板
├── config.yaml # 配置文件
├── index.md # 主页 - 知识库内容索引页
├── log.md # 变更日志页 - 知识库改动的记录
└── overview.md # 总览页 - 对知识库的总结
```
## 输入
- `[entry]`,查询目标可指定为知识点,例如:`/oki:query 胶原蛋白`,也可以为自然语言,如:`/oki:query 什么是胶原蛋白?`、`/oki:query 它是什么构成的?`
- `--from`、`-f`,则改为知识库外查询,其后填入查询来源,如:`/oki:query 胶原蛋白 --from 维基百科`,`/oki:query 胶原蛋白 --f https://pubmed.ncbi.nlm.nih.gov/`
若未指定任何参数,则尝试从对话上下文自动推断;若表述模糊或存在歧义,必须提示列出可用变更项。
## 输出
按以下格式输出相关的「资料记录」(**不是「知识点」**)
```markdown
<!-- 报告正文 -->
## 相关资料
- [{资料记录}](../sources/{资料记录}.md):{和查询目标直接相关的原文节选}
- ...
```
## 知识库内查询步骤
逐层深入挖掘,查询直接证据
**从「知识点」中查询**
若有和查询目标直接关联的「知识点」,则从「知识点」中查询
1. 返回它在`## 相关资料`中的「资料记录」
2. 在「资料记录」中找到和查询目标直接相关的原文节选
3. 若查到,按格式输出报告
**从「资料记录」中查询**
若没直接关联的「知识点」,则从「资料记录」中查询
1. 找到可能相关的「资料记录」
2. 读取「资料记录」内容,查询和目标直接相关的原文节选
3. 若查到,按格式输出报告
4. 若没找到,尝试**从「原始资料」中查询**
**从「原始资料」中查询**
若「资料记录」内容中没有能作为直接依据的,推测可能其原始资料有,则从「原始资料」中查询
1. 执行`/oki:summary`重读「资料记录」`source`记录的原始资料
2. 从「资料解析」中查询直接证据。若查到,更新「资料记录」,添加直接依据部分的内容
3. 若查到,更新「资料记录」(添加直接依据部分的内容),按格式输出报告
4. 若没查到,询问用户是否从外部查询
**重要**
- **不要**查询除`nodes/`、`sources/`文件夹以外的页面
- **优先选择**强证据来源:
- 知识库中:「原始资料」 > 「资料记录」 > 「知识点」
- 「资料记录」中:百科 > 论文 > 专利 > 会议 > 新闻
## 知识库外查询步骤
1. **从外部数据检索**
- 从`--from`、`-f`后的获取意图,寻找合适的外部数据库:
- 论文 `https://link.springer.com/search?query={查询内容}&content-type=Review`
- 论文 `https://pubmed.ncbi.nlm.nih.gov/?term={查询内容}&filter=pubt.review`
- 全百科 `https://en.wikipedia.org/w/index.php?search={查询内容}`
- 医学百科 `https://www.a-hospital.com/index.php?search={查询内容}`
- 专利 `https://patents.google.com/?q=({查询内容})`
- 若`--from`、`-f`后为空,则根据查询目标的类型来判断:
- 若为科学术语、专业名词,则从百科中查询
- 若为医学概念,则从医学百科中查询
- 若为编号`ZLxxxxx`、`CNxxxxx`,则可能为专利号
- 若为研究相关,则从论文中查询
- 网站资料**优先选择**强证据来源:
- 百科 > 论文 > 专利 > 新闻 > ~~其他~~
2. **从参考资料中检索**
若检索不到直接依据,尝试从网站页面提供的参考资料中寻找,**直到找到为止**
3. **创建并返回「资料记录」**
1. 若找到直接依据(可多篇),通过`/oki:summary`创建「资料记录」
2. 按格式输出报告
4. 若没查到,询问用户其他外部数据库。