lifeos 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.en.md +202 -0
- package/README.md +202 -0
- package/assets/lifeos-rules.en.md +162 -0
- package/assets/lifeos-rules.zh.md +162 -0
- package/assets/lifeos.yaml +56 -0
- package/assets/prompts/AI_LLMResearch_Prompt.en.md +120 -0
- package/assets/prompts/AI_LLMResearch_Prompt.zh.md +120 -0
- package/assets/prompts/Art_ChinesePainting_Prompt.en.md +147 -0
- package/assets/prompts/Art_ChinesePainting_Prompt.zh.md +148 -0
- package/assets/prompts/Cryptography_Prompt.en.md +148 -0
- package/assets/prompts/Cryptography_Prompt.zh.md +147 -0
- package/assets/prompts/History_ChineseCulture_Prompt.en.md +98 -0
- package/assets/prompts/History_ChineseCulture_Prompt.zh.md +98 -0
- package/assets/prompts/Math_HigherMathematics_Prompt.en.md +117 -0
- package/assets/prompts/Math_HigherMathematics_Prompt.zh.md +116 -0
- package/assets/schema/Frontmatter_Schema.md +139 -0
- package/assets/skills/_shared/completion-report.en.md +30 -0
- package/assets/skills/_shared/completion-report.zh.md +30 -0
- package/assets/skills/_shared/dual-agent-orchestrator.en.md +40 -0
- package/assets/skills/_shared/dual-agent-orchestrator.zh.md +40 -0
- package/assets/skills/_shared/learning-lifecycle.en.md +53 -0
- package/assets/skills/_shared/learning-lifecycle.zh.md +53 -0
- package/assets/skills/_shared/lifecycle.en.md +84 -0
- package/assets/skills/_shared/lifecycle.zh.md +84 -0
- package/assets/skills/_shared/memory-protocol.en.md +36 -0
- package/assets/skills/_shared/memory-protocol.zh.md +36 -0
- package/assets/skills/_shared/template-loading.en.md +26 -0
- package/assets/skills/_shared/template-loading.zh.md +26 -0
- package/assets/skills/archive/SKILL.en.md +300 -0
- package/assets/skills/archive/SKILL.zh.md +300 -0
- package/assets/skills/ask/SKILL.en.md +164 -0
- package/assets/skills/ask/SKILL.zh.md +164 -0
- package/assets/skills/brainstorm/SKILL.en.md +242 -0
- package/assets/skills/brainstorm/SKILL.zh.md +242 -0
- package/assets/skills/brainstorm/references/action-options.en.md +65 -0
- package/assets/skills/brainstorm/references/action-options.zh.md +65 -0
- package/assets/skills/knowledge/SKILL.en.md +202 -0
- package/assets/skills/knowledge/SKILL.zh.md +202 -0
- package/assets/skills/project/SKILL.en.md +133 -0
- package/assets/skills/project/SKILL.zh.md +133 -0
- package/assets/skills/project/references/execution-agent-prompt.en.md +148 -0
- package/assets/skills/project/references/execution-agent-prompt.zh.md +148 -0
- package/assets/skills/project/references/planning-agent-prompt.en.md +162 -0
- package/assets/skills/project/references/planning-agent-prompt.zh.md +162 -0
- package/assets/skills/read-pdf/SKILL.en.md +199 -0
- package/assets/skills/read-pdf/SKILL.zh.md +199 -0
- package/assets/skills/read-pdf/scripts/read_pdf.py +354 -0
- package/assets/skills/research/SKILL.en.md +107 -0
- package/assets/skills/research/SKILL.zh.md +107 -0
- package/assets/skills/research/references/execution-agent-prompt.en.md +166 -0
- package/assets/skills/research/references/execution-agent-prompt.zh.md +166 -0
- package/assets/skills/research/references/planning-agent-prompt.en.md +129 -0
- package/assets/skills/research/references/planning-agent-prompt.zh.md +129 -0
- package/assets/skills/revise/SKILL.en.md +258 -0
- package/assets/skills/revise/SKILL.zh.md +258 -0
- package/assets/skills/revise/references/grading-protocol.en.md +99 -0
- package/assets/skills/revise/references/grading-protocol.zh.md +99 -0
- package/assets/skills/today/SKILL.en.md +211 -0
- package/assets/skills/today/SKILL.zh.md +211 -0
- package/assets/templates/en/Daily_Template.md +25 -0
- package/assets/templates/en/Draft_Template.md +29 -0
- package/assets/templates/en/Knowledge_Template.md +86 -0
- package/assets/templates/en/Project_Template.md +110 -0
- package/assets/templates/en/Research_Template.md +46 -0
- package/assets/templates/en/Retrospective_Template.md +89 -0
- package/assets/templates/en/Revise_Template.md +24 -0
- package/assets/templates/en/Wiki_Template.md +35 -0
- package/assets/templates/zh/Daily_Template.md +26 -0
- package/assets/templates/zh/Draft_Template.md +29 -0
- package/assets/templates/zh/Knowledge_Template.md +86 -0
- package/assets/templates/zh/Project_Template.md +110 -0
- package/assets/templates/zh/Research_Template.md +46 -0
- package/assets/templates/zh/Retrospective_Template.md +89 -0
- package/assets/templates/zh/Revise_Template.md +24 -0
- package/assets/templates/zh/Wiki_Template.md +35 -0
- package/bin/lifeos.js +24 -0
- package/dist/active-docs/citations.d.ts +20 -0
- package/dist/active-docs/citations.js +74 -0
- package/dist/active-docs/citations.js.map +1 -0
- package/dist/active-docs/derived-memory.d.ts +57 -0
- package/dist/active-docs/derived-memory.js +161 -0
- package/dist/active-docs/derived-memory.js.map +1 -0
- package/dist/active-docs/index.d.ts +51 -0
- package/dist/active-docs/index.js +165 -0
- package/dist/active-docs/index.js.map +1 -0
- package/dist/active-docs/long-term-profile.d.ts +24 -0
- package/dist/active-docs/long-term-profile.js +75 -0
- package/dist/active-docs/long-term-profile.js.map +1 -0
- package/dist/active-docs/taskboard.d.ts +12 -0
- package/dist/active-docs/taskboard.js +146 -0
- package/dist/active-docs/taskboard.js.map +1 -0
- package/dist/active-docs/userprofile.d.ts +12 -0
- package/dist/active-docs/userprofile.js +169 -0
- package/dist/active-docs/userprofile.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +9 -0
- package/dist/cli/commands/doctor.js +125 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/init.d.ts +1 -0
- package/dist/cli/commands/init.js +129 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/rename.d.ts +7 -0
- package/dist/cli/commands/rename.js +188 -0
- package/dist/cli/commands/rename.js.map +1 -0
- package/dist/cli/commands/upgrade.d.ts +6 -0
- package/dist/cli/commands/upgrade.js +66 -0
- package/dist/cli/commands/upgrade.js.map +1 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +52 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/utils/assets.d.ts +3 -0
- package/dist/cli/utils/assets.js +20 -0
- package/dist/cli/utils/assets.js.map +1 -0
- package/dist/cli/utils/install-assets.d.ts +39 -0
- package/dist/cli/utils/install-assets.js +141 -0
- package/dist/cli/utils/install-assets.js.map +1 -0
- package/dist/cli/utils/lang.d.ts +1 -0
- package/dist/cli/utils/lang.js +32 -0
- package/dist/cli/utils/lang.js.map +1 -0
- package/dist/cli/utils/managed-assets.d.ts +9 -0
- package/dist/cli/utils/managed-assets.js +20 -0
- package/dist/cli/utils/managed-assets.js.map +1 -0
- package/dist/cli/utils/mcp-register.d.ts +2 -0
- package/dist/cli/utils/mcp-register.js +132 -0
- package/dist/cli/utils/mcp-register.js.map +1 -0
- package/dist/cli/utils/sync-vault.d.ts +14 -0
- package/dist/cli/utils/sync-vault.js +132 -0
- package/dist/cli/utils/sync-vault.js.map +1 -0
- package/dist/cli/utils/ui.d.ts +14 -0
- package/dist/cli/utils/ui.js +78 -0
- package/dist/cli/utils/ui.js.map +1 -0
- package/dist/cli/utils/version.d.ts +1 -0
- package/dist/cli/utils/version.js +4 -0
- package/dist/cli/utils/version.js.map +1 -0
- package/dist/config.d.ts +127 -0
- package/dist/config.js +356 -0
- package/dist/config.js.map +1 -0
- package/dist/core.d.ts +106 -0
- package/dist/core.js +286 -0
- package/dist/core.js.map +1 -0
- package/dist/db/consolidation.d.ts +14 -0
- package/dist/db/consolidation.js +28 -0
- package/dist/db/consolidation.js.map +1 -0
- package/dist/db/index.d.ts +22 -0
- package/dist/db/index.js +39 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/schema.d.ts +7 -0
- package/dist/db/schema.js +175 -0
- package/dist/db/schema.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/server.d.ts +6 -0
- package/dist/server.js +303 -0
- package/dist/server.js.map +1 -0
- package/dist/services/capture.d.ts +101 -0
- package/dist/services/capture.js +297 -0
- package/dist/services/capture.js.map +1 -0
- package/dist/services/enhance.d.ts +51 -0
- package/dist/services/enhance.js +184 -0
- package/dist/services/enhance.js.map +1 -0
- package/dist/services/layer0.d.ts +24 -0
- package/dist/services/layer0.js +90 -0
- package/dist/services/layer0.js.map +1 -0
- package/dist/services/maintenance.d.ts +27 -0
- package/dist/services/maintenance.js +73 -0
- package/dist/services/maintenance.js.map +1 -0
- package/dist/services/retrieval.d.ts +120 -0
- package/dist/services/retrieval.js +571 -0
- package/dist/services/retrieval.js.map +1 -0
- package/dist/services/startup.d.ts +28 -0
- package/dist/services/startup.js +112 -0
- package/dist/services/startup.js.map +1 -0
- package/dist/skill-context/ask-global.d.ts +8 -0
- package/dist/skill-context/ask-global.js +21 -0
- package/dist/skill-context/ask-global.js.map +1 -0
- package/dist/skill-context/base.d.ts +48 -0
- package/dist/skill-context/base.js +5 -0
- package/dist/skill-context/base.js.map +1 -0
- package/dist/skill-context/daily-global.d.ts +8 -0
- package/dist/skill-context/daily-global.js +25 -0
- package/dist/skill-context/daily-global.js.map +1 -0
- package/dist/skill-context/index.d.ts +32 -0
- package/dist/skill-context/index.js +171 -0
- package/dist/skill-context/index.js.map +1 -0
- package/dist/skill-context/knowledge-strict.d.ts +8 -0
- package/dist/skill-context/knowledge-strict.js +26 -0
- package/dist/skill-context/knowledge-strict.js.map +1 -0
- package/dist/skill-context/review-strict.d.ts +8 -0
- package/dist/skill-context/review-strict.js +26 -0
- package/dist/skill-context/review-strict.js.map +1 -0
- package/dist/skill-context/revise-strict.d.ts +8 -0
- package/dist/skill-context/revise-strict.js +26 -0
- package/dist/skill-context/revise-strict.js.map +1 -0
- package/dist/skill-context/seed-profiles.d.ts +21 -0
- package/dist/skill-context/seed-profiles.js +80 -0
- package/dist/skill-context/seed-profiles.js.map +1 -0
- package/dist/types.d.ts +165 -0
- package/dist/types.js +76 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/context-policy.d.ts +57 -0
- package/dist/utils/context-policy.js +333 -0
- package/dist/utils/context-policy.js.map +1 -0
- package/dist/utils/scan-state.d.ts +41 -0
- package/dist/utils/scan-state.js +79 -0
- package/dist/utils/scan-state.js.map +1 -0
- package/dist/utils/segmenter.d.ts +19 -0
- package/dist/utils/segmenter.js +75 -0
- package/dist/utils/segmenter.js.map +1 -0
- package/dist/utils/shared.d.ts +103 -0
- package/dist/utils/shared.js +313 -0
- package/dist/utils/shared.js.map +1 -0
- package/dist/utils/vault-indexer.d.ts +53 -0
- package/dist/utils/vault-indexer.js +256 -0
- package/dist/utils/vault-indexer.js.map +1 -0
- package/package.json +59 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: execution-agent-prompt
|
|
3
|
+
description: Execution Agent prompt for the Research skill
|
|
4
|
+
role: execution
|
|
5
|
+
parent_skill: research
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Research Execution Agent Instructions
|
|
9
|
+
|
|
10
|
+
> Path logical names (e.g., `{research directory}`, `{drafts directory}`) are resolved by the Orchestrator from `lifeos.yaml` and injected into context. See the main skill file `research/SKILL.md` for the mapping.
|
|
11
|
+
|
|
12
|
+
> This file is read by the `research/SKILL.md` Orchestrator after the user confirms the plan, and used as the complete prompt for the Task tool.
|
|
13
|
+
> Replace `[plan file path]` with the actual plan file path when using.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
Execute the research plan at the following path: [plan file path]
|
|
18
|
+
|
|
19
|
+
## Step 1: Read the Plan File in Full
|
|
20
|
+
|
|
21
|
+
Pay attention to the following key fields:
|
|
22
|
+
|
|
23
|
+
- Trigger mode (FILE MODE or TOPIC MODE)
|
|
24
|
+
- Local draft materials (listed file paths)
|
|
25
|
+
- Clarification question answers (user's knowledge level and method preference)
|
|
26
|
+
- Expert persona (file path, applicability mode, special format requirements)
|
|
27
|
+
|
|
28
|
+
**Persona application rules (based on applicability mode):**
|
|
29
|
+
|
|
30
|
+
| Applicability mode | Execution rules |
|
|
31
|
+
| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
32
|
+
| `Full apply` | Read the complete persona file; use the persona's Analytical Framework as the structural skeleton; replace default chapters with the persona's Output Format (always retain: frontmatter, core insights from drafts, related reading, references); enforce the persona's Constraints and Guardrails; match the persona's Interaction Style tone |
|
|
33
|
+
| `Reference apply` | Read the persona file, borrow its analysis framework to enrich the analysis, but retain the default chapter structure below |
|
|
34
|
+
| `Not applicable` or `Not found` | Use the default chapter structure below |
|
|
35
|
+
|
|
36
|
+
## Step 2: Read Local Draft Materials
|
|
37
|
+
|
|
38
|
+
- Read the full content of each file listed in "Local Draft Materials" one by one
|
|
39
|
+
- Treat these files as **first-hand sources** (representing the user's original thinking)
|
|
40
|
+
- **FILE MODE**: the specified draft file is the core anchor; all research expands from it
|
|
41
|
+
- **TOPIC MODE**: draft files serve as supplementary background
|
|
42
|
+
|
|
43
|
+
## Step 3: External Research
|
|
44
|
+
|
|
45
|
+
- Use WebSearch to retrieve current information, official documentation, authoritative sources
|
|
46
|
+
- Use WebFetch to read documentation pages
|
|
47
|
+
- Cross-validate local draft insights with external sources
|
|
48
|
+
- **When WebSearch returns nothing**: rely on local drafts, note limitations in the report
|
|
49
|
+
- **When WebFetch fails**: mark in "References" as "(link inaccessible, for reference only)"
|
|
50
|
+
|
|
51
|
+
## Step 4: Write the Research Report
|
|
52
|
+
|
|
53
|
+
Path: `{research directory}/Domain/Topic/Topic.md`
|
|
54
|
+
|
|
55
|
+
> ⚠️ `/research` must never create files under `{knowledge directory}/` — that is the responsibility of `/knowledge`.
|
|
56
|
+
|
|
57
|
+
Adjust depth and style based on user's knowledge level and method preference.
|
|
58
|
+
|
|
59
|
+
**Default chapter structure** (used when persona applicability mode is not `Full apply`):
|
|
60
|
+
|
|
61
|
+
```markdown
|
|
62
|
+
---
|
|
63
|
+
title: "Topic"
|
|
64
|
+
type: research
|
|
65
|
+
created: "YYYY-MM-DD"
|
|
66
|
+
domain: "[[DomainName]]"
|
|
67
|
+
status: complete
|
|
68
|
+
tags: [research]
|
|
69
|
+
aliases: []
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Overview
|
|
73
|
+
|
|
74
|
+
(Conclusion first: what it is, what problem it solves, scope of applicability)
|
|
75
|
+
|
|
76
|
+
## Core Insights from Drafts
|
|
77
|
+
|
|
78
|
+
(Only when local drafts exist: integrate the user's original ideas, cite source files. Omit this section if no drafts)
|
|
79
|
+
|
|
80
|
+
## Core Concept Framework
|
|
81
|
+
|
|
82
|
+
(Glossary/modules/components/key mechanisms; may use [[wikilink]] to point to existing knowledge/concepts, but do not create new {knowledge directory} files)
|
|
83
|
+
|
|
84
|
+
## How It Works
|
|
85
|
+
|
|
86
|
+
(Necessary technical details)
|
|
87
|
+
|
|
88
|
+
## Examples
|
|
89
|
+
|
|
90
|
+
(Code/scenarios/step-by-step procedures, if applicable)
|
|
91
|
+
|
|
92
|
+
## Best Practices
|
|
93
|
+
|
|
94
|
+
## Common Pitfalls
|
|
95
|
+
|
|
96
|
+
## Related Reading
|
|
97
|
+
|
|
98
|
+
(Wikilinks only: related research/projects/knowledge notes within the Vault)
|
|
99
|
+
|
|
100
|
+
## References
|
|
101
|
+
|
|
102
|
+
(External links: docs/articles/videos)
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
**Math formula format specification** (when Math persona is active, or when the report contains formulas):
|
|
106
|
+
|
|
107
|
+
- Inline formulas: `$formula$` (single dollar signs)
|
|
108
|
+
- Display formulas: `$$formula$$` (double dollar signs, each on its own line)
|
|
109
|
+
- Multi-line formulas: `$$\begin{aligned}...\end{aligned}$$`
|
|
110
|
+
- Do not use `\(...\)` or `\[...\]` (Obsidian does not render these by default)
|
|
111
|
+
- Do not skip key derivation steps with "obviously" or "easily verified"
|
|
112
|
+
|
|
113
|
+
## Step 5: Create Visualization Map (For Complex Topics)
|
|
114
|
+
|
|
115
|
+
Path: `{research directory}/Domain/Topic/Topic_Map.canvas`
|
|
116
|
+
|
|
117
|
+
## Step 6: Create Examples (If Applicable)
|
|
118
|
+
|
|
119
|
+
Path: `{research directory}/Domain/Topic/examples/`
|
|
120
|
+
|
|
121
|
+
## Step 7: Update Draft Status (Critical)
|
|
122
|
+
|
|
123
|
+
For each draft file used from "Local Draft Materials":
|
|
124
|
+
|
|
125
|
+
- Update the `status` in its frontmatter to `researched`
|
|
126
|
+
- This marks the draft as processed, allowing `/archive` to identify and archive it
|
|
127
|
+
|
|
128
|
+
## Step 8: Update Today's Diary
|
|
129
|
+
|
|
130
|
+
If `{diary directory}/YYYY-MM-DD.md` exists, append a brief research summary. Skip this step if the diary file does not exist.
|
|
131
|
+
|
|
132
|
+
## Step 9: Update Plan Status (Critical)
|
|
133
|
+
|
|
134
|
+
- After the research report is complete, update the plan file frontmatter `status` to `done`
|
|
135
|
+
- Keep the plan file in `{plans directory}/`
|
|
136
|
+
- `/archive` later moves plans with `status: done` into `{system directory}/{archived plans subdirectory}/`
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Completion Report
|
|
141
|
+
|
|
142
|
+
After completion, report in English:
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
## Research Complete: [Topic]
|
|
146
|
+
|
|
147
|
+
**Created:**
|
|
148
|
+
- Research report: [[Topic]] ({research directory}/Domain/Topic/)
|
|
149
|
+
- Examples: [N] files (if any)
|
|
150
|
+
- Visualization: [Yes/No] (if any)
|
|
151
|
+
|
|
152
|
+
**Integrated draft sources:**
|
|
153
|
+
- [List draft files used, or "None"] → status updated to researched
|
|
154
|
+
|
|
155
|
+
**Plan status:** {plans directory}/Plan_YYYY-MM-DD_Research_Topic.md → `status: done` (waiting for `/archive` to move it into `{system directory}/{archived plans subdirectory}/`)
|
|
156
|
+
|
|
157
|
+
**Key takeaways:**
|
|
158
|
+
1. [Takeaway 1]
|
|
159
|
+
2. [Takeaway 2]
|
|
160
|
+
3. [Takeaway 3]
|
|
161
|
+
|
|
162
|
+
**Next steps:**
|
|
163
|
+
- [ ] To distill into reusable knowledge points: use /knowledge to extract from authoritative sources into {knowledge directory}/{notes subdirectory} or {wiki subdirectory}
|
|
164
|
+
- [ ] Consolidate through practice/projects (if applicable)
|
|
165
|
+
- [ ] Run /archive to clean up processed drafts
|
|
166
|
+
```
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: execution-agent-prompt
|
|
3
|
+
description: Research 技能的执行 Agent 提示词
|
|
4
|
+
role: execution
|
|
5
|
+
parent_skill: research
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# 研究执行 Agent 指令
|
|
9
|
+
|
|
10
|
+
> 路径逻辑名(如 `{研究目录}`、`{草稿目录}`)由 Orchestrator 从 `lifeos.yaml` 解析后注入上下文。映射关系见主技能文件 `research/SKILL.md` 的配置块。
|
|
11
|
+
|
|
12
|
+
> 此文件由 `research/SKILL.md` 的 Orchestrator 在用户确认计划后读取,作为 Task 工具的完整 prompt 使用。
|
|
13
|
+
> 使用时将 `[plan file path]` 替换为实际计划文件路径。
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
执行以下路径的研究计划:[计划文件路径]
|
|
18
|
+
|
|
19
|
+
## 步骤一:完整读取计划文件
|
|
20
|
+
|
|
21
|
+
注意以下关键字段:
|
|
22
|
+
|
|
23
|
+
- 触发方式(FILE MODE or TOPIC MODE)
|
|
24
|
+
- 本地草稿资料(列出的文件路径)
|
|
25
|
+
- 澄清问题回答(用户的知识水平和方法偏好)
|
|
26
|
+
- 专家人格(文件路径、适用模式、特殊格式要求)
|
|
27
|
+
|
|
28
|
+
**人格应用规则(基于适用模式):**
|
|
29
|
+
|
|
30
|
+
| 适用模式 | 执行规则 |
|
|
31
|
+
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
32
|
+
| `全量应用` | 读取完整 persona 文件;用 persona 的 Analytical Framework 作为结构骨架;用 persona 的 Output Format 替换默认章节(始终保留:frontmatter、来自草稿的核心洞察、相关阅读、参考资源);强制执行 persona 的 Constraints and Guardrails;匹配 persona 的 Interaction Style 语气 |
|
|
33
|
+
| `参考应用` | 读取 persona 文件,借用其分析框架丰富分析,但保留下方默认章节结构 |
|
|
34
|
+
| `不适用` 或 `未找到` | 使用下方默认章节结构 |
|
|
35
|
+
|
|
36
|
+
## 步骤二:读取本地草稿素材
|
|
37
|
+
|
|
38
|
+
- 逐一读取「本地草稿资料」中列出的每个文件的完整内容
|
|
39
|
+
- 将这些文件作为**第一手来源**(代表用户的原始思考)
|
|
40
|
+
- **FILE MODE**:指定的草稿文件是核心锚点,所有研究从它展开
|
|
41
|
+
- **TOPIC MODE**:草稿文件作为补充背景
|
|
42
|
+
|
|
43
|
+
## 步骤三:外部研究
|
|
44
|
+
|
|
45
|
+
- 使用 WebSearch 检索当前信息、官方文档、权威来源
|
|
46
|
+
- 使用 WebFetch 读取文档页面
|
|
47
|
+
- 将本地草稿洞察与外部来源交叉验证
|
|
48
|
+
- **WebSearch 无结果时**:依赖本地草稿,在报告中注明局限性
|
|
49
|
+
- **WebFetch 失败时**:在「参考资源」标注"(链接无法访问,仅供参考)"
|
|
50
|
+
|
|
51
|
+
## 步骤四:撰写研究报告
|
|
52
|
+
|
|
53
|
+
路径:`{研究目录}/Domain/Topic/Topic.md`
|
|
54
|
+
|
|
55
|
+
> ⚠️ `/research` 绝不在 `{知识目录}/` 下创建文件,那是 `/knowledge` 的职责。
|
|
56
|
+
|
|
57
|
+
根据用户知识水平和方法偏好调整深度与风格。
|
|
58
|
+
|
|
59
|
+
**默认章节结构**(当 persona 适用模式不是`全量应用`时使用):
|
|
60
|
+
|
|
61
|
+
```markdown
|
|
62
|
+
---
|
|
63
|
+
title: "Topic"
|
|
64
|
+
type: research
|
|
65
|
+
created: "YYYY-MM-DD"
|
|
66
|
+
domain: "[[DomainName]]"
|
|
67
|
+
status: complete
|
|
68
|
+
tags: [research]
|
|
69
|
+
aliases: []
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## 概述
|
|
73
|
+
|
|
74
|
+
(结论先行:这是什么、解决什么问题、适用边界)
|
|
75
|
+
|
|
76
|
+
## 来自草稿的核心洞察
|
|
77
|
+
|
|
78
|
+
(仅当有本地草稿时:整合用户原始想法,标注来源文件。无草稿时省略此节)
|
|
79
|
+
|
|
80
|
+
## 核心概念框架
|
|
81
|
+
|
|
82
|
+
(术语表/模块/组件/关键机制;可用 [[wikilink]] 指向已有知识/概念,但不新建 {知识目录} 文件)
|
|
83
|
+
|
|
84
|
+
## 工作原理
|
|
85
|
+
|
|
86
|
+
(必要的技术细节)
|
|
87
|
+
|
|
88
|
+
## 示例
|
|
89
|
+
|
|
90
|
+
(代码/场景/操作步骤,如适用)
|
|
91
|
+
|
|
92
|
+
## 最佳实践
|
|
93
|
+
|
|
94
|
+
## 常见陷阱
|
|
95
|
+
|
|
96
|
+
## 相关阅读
|
|
97
|
+
|
|
98
|
+
(仅 wikilinks:Vault 内相关研究/项目/知识笔记)
|
|
99
|
+
|
|
100
|
+
## 参考资源
|
|
101
|
+
|
|
102
|
+
(外部链接:docs/articles/videos)
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
**数学公式格式规范**(当 Math persona 激活,或报告含公式时):
|
|
106
|
+
|
|
107
|
+
- 行内公式:`$formula$`(单美元符号)
|
|
108
|
+
- 独立公式:`$$formula$$`(双美元符号,各占一行)
|
|
109
|
+
- 多行公式:`$$\begin{aligned}...\end{aligned}$$`
|
|
110
|
+
- 禁止使用 `\(...\)` 或 `\[...\]`(Obsidian 默认不渲染)
|
|
111
|
+
- 禁止用"显然"或"容易验证"跳过关键推导步骤
|
|
112
|
+
|
|
113
|
+
## 步骤五:创建可视化地图(复杂主题时)
|
|
114
|
+
|
|
115
|
+
路径:`{研究目录}/Domain/Topic/Topic_Map.canvas`
|
|
116
|
+
|
|
117
|
+
## 步骤六:创建示例(如适用)
|
|
118
|
+
|
|
119
|
+
路径:`{研究目录}/Domain/Topic/examples/`
|
|
120
|
+
|
|
121
|
+
## 步骤七:更新草稿状态(关键)
|
|
122
|
+
|
|
123
|
+
对「本地草稿资料」中每个已使用的草稿文件:
|
|
124
|
+
|
|
125
|
+
- 将 frontmatter 中的 `status` 更新为 `researched`
|
|
126
|
+
- 这标记该草稿已被处理,使 `/archive` 可识别并归档
|
|
127
|
+
|
|
128
|
+
## 步骤八:更新今日日记
|
|
129
|
+
|
|
130
|
+
若 `{日记目录}/YYYY-MM-DD.md` 存在,追加简短研究摘要。若日记文件不存在则跳过此步骤。
|
|
131
|
+
|
|
132
|
+
## 步骤九:更新计划状态(关键)
|
|
133
|
+
|
|
134
|
+
- 研究报告完成后,将计划文件的 frontmatter 中 `status` 更新为 `done`
|
|
135
|
+
- 保持计划文件仍位于 `{计划目录}/`
|
|
136
|
+
- 后续由 `/archive` 统一将 `status: done` 的计划移动到 `{系统目录}/{归档计划子目录}/`
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## 完成报告
|
|
141
|
+
|
|
142
|
+
完成后用中文汇报:
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
## 研究完成: [Topic]
|
|
146
|
+
|
|
147
|
+
**已创建:**
|
|
148
|
+
- 研究报告: [[Topic]]({研究目录}/Domain/Topic/)
|
|
149
|
+
- 示例: [N] 个文件(如有)
|
|
150
|
+
- 可视化: [是/否](如有)
|
|
151
|
+
|
|
152
|
+
**整合的草稿来源:**
|
|
153
|
+
- [列出使用的草稿文件,或"无"] → 状态已更新为 researched
|
|
154
|
+
|
|
155
|
+
**计划状态:** {计划目录}/Plan_YYYY-MM-DD_Research_Topic.md → `status: done`(待 `/archive` 归档到 `{系统目录}/{归档计划子目录}/`)
|
|
156
|
+
|
|
157
|
+
**核心要点:**
|
|
158
|
+
1. [要点1]
|
|
159
|
+
2. [要点2]
|
|
160
|
+
3. [要点3]
|
|
161
|
+
|
|
162
|
+
**下一步:**
|
|
163
|
+
- [ ] 如需沉淀为可复用知识点:用 /knowledge 将权威资料提取为 {知识目录}/{笔记子目录} 或 {百科子目录}
|
|
164
|
+
- [ ] 通过实践/项目巩固(如适用)
|
|
165
|
+
- [ ] 运行 /archive 清理已处理的草稿
|
|
166
|
+
```
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: planning-agent-prompt
|
|
3
|
+
description: Planning Agent prompt for the Research skill
|
|
4
|
+
role: planning
|
|
5
|
+
parent_skill: research
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Research Planning Agent Instructions
|
|
9
|
+
|
|
10
|
+
> Path logical names (e.g., `{research directory}`, `{drafts directory}`) are resolved by the Orchestrator from `lifeos.yaml` and injected into context. See the main skill file `research/SKILL.md` for the mapping.
|
|
11
|
+
|
|
12
|
+
> This file is read by the `research/SKILL.md` Orchestrator and used as the complete prompt for the Task tool.
|
|
13
|
+
> Replace `[user's input]` with the user's actual input when using.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
Create a research plan for the following: [user's input]
|
|
18
|
+
|
|
19
|
+
Execute the following steps:
|
|
20
|
+
|
|
21
|
+
## Step 1: Identify Trigger Mode
|
|
22
|
+
|
|
23
|
+
- If the input is a file path or filename → **FILE MODE**
|
|
24
|
+
- Read the specified file from `{drafts directory}/`
|
|
25
|
+
- Extract core topics, questions, and key insights from the file
|
|
26
|
+
- This file is the primary source, treated as first-hand material
|
|
27
|
+
- If the input is a topic/keyword → **TOPIC MODE**
|
|
28
|
+
- Use the input directly as the research topic
|
|
29
|
+
|
|
30
|
+
## Step 2: Scan Local Drafts (`{drafts directory}/`)
|
|
31
|
+
|
|
32
|
+
- List all `status: pending` files in `{drafts directory}/`
|
|
33
|
+
- **TOPIC MODE**: identify files related to the topic via filenames and content keywords
|
|
34
|
+
- **FILE MODE**: identify other files related to the specified file's topic
|
|
35
|
+
- List the related draft files found (for the Execution Agent to use as local first-hand material)
|
|
36
|
+
|
|
37
|
+
## Step 3: Check Existing Research
|
|
38
|
+
|
|
39
|
+
- Search `{research directory}/` to avoid duplication
|
|
40
|
+
- If related research exists: flag for update rather than new creation
|
|
41
|
+
|
|
42
|
+
## Step 4: Determine Knowledge Domain
|
|
43
|
+
|
|
44
|
+
- Infer the relevant domain (e.g., SoftwareEngineering, Finance, Health, ProductDesign, AI, Math, Art, History)
|
|
45
|
+
- If undetermined: mark as `TBD`, the Orchestrator will ask the user
|
|
46
|
+
|
|
47
|
+
## Step 5: Match Expert Persona
|
|
48
|
+
|
|
49
|
+
- List all `.md` files in `{system directory}/提示词/`
|
|
50
|
+
- For each file, read its **frontmatter** (`id`, `aliases`, `tags`) and the **Domain Coverage** / **Core Responsibilities** sections
|
|
51
|
+
- Compare the research topic (from Step 4) against each persona's domain coverage to find the best match
|
|
52
|
+
- If multiple personas could apply, pick the one whose domain is most specific to the topic
|
|
53
|
+
- If no persona's domain overlaps with the research topic, note "No match found, using general research mode"
|
|
54
|
+
|
|
55
|
+
**Applicability mode determination:**
|
|
56
|
+
|
|
57
|
+
- `Full apply`: The research topic falls squarely within the persona's core domain — replace default chapter structure entirely with the persona's Output Format
|
|
58
|
+
- `Reference apply`: The persona's analytical framework is relevant but the topic is not its core focus — borrow the analysis framework only, retain default chapters
|
|
59
|
+
- `Not applicable`: No persona matches — use default report structure
|
|
60
|
+
|
|
61
|
+
## Step 6: Create Plan File
|
|
62
|
+
|
|
63
|
+
Path: `{plans directory}/Plan_YYYY-MM-DD_Research_Topic.md`
|
|
64
|
+
|
|
65
|
+
```markdown
|
|
66
|
+
---
|
|
67
|
+
title: "Plan: [Topic]"
|
|
68
|
+
type: plan
|
|
69
|
+
status: active
|
|
70
|
+
created: "YYYY-MM-DD"
|
|
71
|
+
source: research
|
|
72
|
+
topic: "[Topic]"
|
|
73
|
+
tags: [plan, research]
|
|
74
|
+
aliases: []
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
# Research Plan: [Topic]
|
|
78
|
+
|
|
79
|
+
## Trigger Mode
|
|
80
|
+
|
|
81
|
+
[FILE MODE: {drafts directory}/filename.md | TOPIC MODE: topic keywords]
|
|
82
|
+
|
|
83
|
+
## Research Objective
|
|
84
|
+
|
|
85
|
+
[What the user will understand after this research is complete]
|
|
86
|
+
|
|
87
|
+
## Local Draft Materials
|
|
88
|
+
|
|
89
|
+
[List related file paths in {drafts directory}/, or "No related drafts found"]
|
|
90
|
+
|
|
91
|
+
## Existing Research
|
|
92
|
+
|
|
93
|
+
[List related existing research reports in {research directory}/, or "Not found"]
|
|
94
|
+
|
|
95
|
+
## Related Domain
|
|
96
|
+
|
|
97
|
+
[Domain name, or TBD]
|
|
98
|
+
|
|
99
|
+
## Expert Persona
|
|
100
|
+
|
|
101
|
+
- File path: [{system directory}/提示词/XXX.md, or "Not found"]
|
|
102
|
+
- Applicability reason: [Why this persona fits the research topic, one sentence]
|
|
103
|
+
- Applicability mode: [Full apply | Reference apply | Not applicable]
|
|
104
|
+
- Special format requirements: [e.g., LaTeX formulas, historical source citation format, or "None"]
|
|
105
|
+
|
|
106
|
+
## Research Strategy
|
|
107
|
+
|
|
108
|
+
[ ] Read local drafts as first-hand material (if available)
|
|
109
|
+
[ ] Search official documentation/authoritative sources
|
|
110
|
+
[ ] Form conceptual framework (glossary, module relationships, key mechanisms)
|
|
111
|
+
[ ] Find practical examples and use cases (if applicable)
|
|
112
|
+
[ ] Summarize best practices and common pitfalls
|
|
113
|
+
[ ] Output actionable next-step recommendations
|
|
114
|
+
|
|
115
|
+
## Output Structure (output only to {research directory}/)
|
|
116
|
+
|
|
117
|
+
- Main note (research report): {research directory}/Domain/Topic/Topic.md
|
|
118
|
+
- Examples/resources (optional): {research directory}/Domain/Topic/examples/
|
|
119
|
+
- Visualization (optional): {research directory}/Domain/Topic/Topic_Map.canvas
|
|
120
|
+
|
|
121
|
+
## Clarification Question Answers
|
|
122
|
+
|
|
123
|
+
Knowledge level: [To be filled by user]
|
|
124
|
+
Method preference: [To be filled by user]
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Step 7: Return Result
|
|
128
|
+
|
|
129
|
+
Return the path to the plan file.
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: planning-agent-prompt
|
|
3
|
+
description: Research 技能的规划 Agent 提示词
|
|
4
|
+
role: planning
|
|
5
|
+
parent_skill: research
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# 研究规划 Agent 指令
|
|
9
|
+
|
|
10
|
+
> 路径逻辑名(如 `{研究目录}`、`{草稿目录}`)由 Orchestrator 从 `lifeos.yaml` 解析后注入上下文。映射关系见主技能文件 `research/SKILL.md` 的配置块。
|
|
11
|
+
|
|
12
|
+
> 此文件由 `research/SKILL.md` 的 Orchestrator 读取,作为 Task 工具的完整 prompt 使用。
|
|
13
|
+
> 使用时将 `[user's input]` 替换为用户实际输入内容。
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
为以下内容制定研究计划:[用户输入]
|
|
18
|
+
|
|
19
|
+
按以下步骤执行:
|
|
20
|
+
|
|
21
|
+
## 步骤一:识别触发模式
|
|
22
|
+
|
|
23
|
+
- 如果输入是文件路径或文件名 → **FILE MODE**
|
|
24
|
+
- 从 `{草稿目录}/` 读取指定文件
|
|
25
|
+
- 提取文件中的核心主题、问题和关键观点
|
|
26
|
+
- 该文件为主要来源,视为第一手资料
|
|
27
|
+
- 如果输入是主题/关键词 → **TOPIC MODE**
|
|
28
|
+
- 直接将输入作为研究主题
|
|
29
|
+
|
|
30
|
+
## 步骤二:扫描本地草稿(`{草稿目录}/`)
|
|
31
|
+
|
|
32
|
+
- 列出 `{草稿目录}/` 中所有 `status: pending` 的文件
|
|
33
|
+
- **TOPIC MODE**:通过文件名和内容关键词识别与主题相关的文件
|
|
34
|
+
- **FILE MODE**:识别与指定文件主题相关的其他文件
|
|
35
|
+
- 列出找到的相关草稿文件(供 Execution Agent 作为本地第一手资料使用)
|
|
36
|
+
|
|
37
|
+
## 步骤三:检查已有研究
|
|
38
|
+
|
|
39
|
+
- 搜索 `{研究目录}/` 以避免重复
|
|
40
|
+
- 如果存在相关研究:标记为更新而非新建
|
|
41
|
+
|
|
42
|
+
## 步骤四:确定知识领域
|
|
43
|
+
|
|
44
|
+
- 推断相关领域(如 SoftwareEngineering、Finance、Health、ProductDesign、AI、Math、Art、History)
|
|
45
|
+
- 如果无法确定:标记为 `TBD`,由 Orchestrator 向用户追问
|
|
46
|
+
|
|
47
|
+
## 步骤五:匹配专家人格
|
|
48
|
+
|
|
49
|
+
- 列出 `{系统目录}/提示词/` 下所有 `.md` 文件
|
|
50
|
+
- 逐一读取每个文件的 **frontmatter**(`id`、`aliases`、`tags`)以及 **领域覆盖** / **核心职责** 章节
|
|
51
|
+
- 将研究主题(来自步骤四)与每个 persona 的领域覆盖进行比对,找出最佳匹配
|
|
52
|
+
- 若多个 persona 均可适用,选择领域最具针对性的一个
|
|
53
|
+
- 若没有任何 persona 的领域与研究主题重叠,标注"未找到匹配,使用通用研究模式"
|
|
54
|
+
|
|
55
|
+
**适用模式判断:**
|
|
56
|
+
|
|
57
|
+
- `全量应用`:研究主题完全落在该 persona 的核心领域内——用专家 Output Format 完整替换默认章节结构
|
|
58
|
+
- `参考应用`:该 persona 的分析框架相关但主题并非其核心聚焦——仅借用分析框架,保留默认章节
|
|
59
|
+
- `不适用`:无匹配 persona——使用默认报告结构
|
|
60
|
+
|
|
61
|
+
## 步骤六:创建计划文件
|
|
62
|
+
|
|
63
|
+
路径:`{计划目录}/Plan_YYYY-MM-DD_Research_Topic.md`
|
|
64
|
+
|
|
65
|
+
```markdown
|
|
66
|
+
---
|
|
67
|
+
title: "Plan: [主题]"
|
|
68
|
+
type: plan
|
|
69
|
+
status: active
|
|
70
|
+
created: "YYYY-MM-DD"
|
|
71
|
+
source: research
|
|
72
|
+
topic: "[主题]"
|
|
73
|
+
tags: [plan, research]
|
|
74
|
+
aliases: []
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
# 研究计划: [主题]
|
|
78
|
+
|
|
79
|
+
## 触发方式
|
|
80
|
+
|
|
81
|
+
[FILE MODE: {草稿目录}/文件名.md | TOPIC MODE: 主题关键词]
|
|
82
|
+
|
|
83
|
+
## 研究目标
|
|
84
|
+
|
|
85
|
+
[完成此研究后用户将理解什么]
|
|
86
|
+
|
|
87
|
+
## 本地草稿资料
|
|
88
|
+
|
|
89
|
+
[列出 {草稿目录}/ 中相关文件路径,或"未找到相关草稿"]
|
|
90
|
+
|
|
91
|
+
## 现有研究
|
|
92
|
+
|
|
93
|
+
[列出 {研究目录}/ 中相关的现有研究报告,或"未找到"]
|
|
94
|
+
|
|
95
|
+
## 相关领域
|
|
96
|
+
|
|
97
|
+
[领域名称,或 TBD]
|
|
98
|
+
|
|
99
|
+
## 专家人格
|
|
100
|
+
|
|
101
|
+
- 文件路径: [{系统目录}/提示词/XXX.md,或"未找到"]
|
|
102
|
+
- 适用理由: [为何此 persona 适合本研究主题,一句话说明]
|
|
103
|
+
- 适用模式: [全量应用 | 参考应用 | 不适用]
|
|
104
|
+
- 特殊格式要求: [如 LaTeX 公式、史料引用格式等,或"无"]
|
|
105
|
+
|
|
106
|
+
## 研究策略
|
|
107
|
+
|
|
108
|
+
[ ] 读取本地草稿作为一手资料(如有)
|
|
109
|
+
[ ] 搜索官方文档/权威资料
|
|
110
|
+
[ ] 形成概念框架(术语表、模块关系、关键机制)
|
|
111
|
+
[ ] 查找实际示例和用例(如适用)
|
|
112
|
+
[ ] 总结最佳实践与常见陷阱
|
|
113
|
+
[ ] 输出可执行的下一步建议
|
|
114
|
+
|
|
115
|
+
## 输出结构(仅产出到 {研究目录}/)
|
|
116
|
+
|
|
117
|
+
- 主笔记(研究报告): {研究目录}/Domain/Topic/Topic.md
|
|
118
|
+
- 示例/资源(可选): {研究目录}/Domain/Topic/examples/
|
|
119
|
+
- 可视化(可选): {研究目录}/Domain/Topic/Topic_Map.canvas
|
|
120
|
+
|
|
121
|
+
## 澄清问题回答
|
|
122
|
+
|
|
123
|
+
知识水平: [待用户填写]
|
|
124
|
+
方法偏好: [待用户填写]
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## 步骤七:返回结果
|
|
128
|
+
|
|
129
|
+
返回计划文件的路径。
|