@geminilight/mindos 0.5.57 → 0.5.59
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/README.md +1 -1
- package/README_zh.md +1 -1
- package/app/app/api/ask/route.ts +4 -1
- package/app/app/api/extract-pdf/route.ts +4 -2
- package/app/app/api/file/route.ts +54 -2
- package/app/app/api/health/route.ts +3 -1
- package/app/app/api/mcp/install-skill/route.ts +4 -2
- package/app/app/api/mcp/restart/route.ts +1 -1
- package/app/app/api/restart/route.ts +1 -1
- package/app/app/api/skills/route.ts +1 -1
- package/app/app/api/sync/route.ts +2 -2
- package/app/app/api/update/route.ts +1 -1
- package/app/app/api/update-check/route.ts +11 -3
- package/app/app/globals.css +4 -0
- package/app/app/layout.tsx +6 -0
- package/app/app/login/page.tsx +12 -1
- package/app/app/register-sw.tsx +4 -0
- package/app/app/view/[...path]/page.tsx +3 -3
- package/app/components/DirView.tsx +96 -9
- package/app/components/FileTree.tsx +245 -27
- package/app/components/Sidebar.tsx +1 -0
- package/app/components/SidebarLayout.tsx +1 -1
- package/app/components/ask/AskContent.tsx +56 -14
- package/app/instrumentation.ts +2 -1
- package/app/lib/actions.ts +53 -25
- package/app/lib/core/create-space.ts +36 -0
- package/app/lib/core/fs-ops.ts +78 -1
- package/app/lib/core/index.ts +8 -0
- package/app/lib/core/list-spaces.ts +58 -0
- package/app/lib/core/types.ts +7 -0
- package/app/lib/fs.ts +78 -5
- package/app/lib/i18n-en.ts +10 -0
- package/app/lib/i18n-zh.ts +10 -0
- package/app/lib/project-root.ts +13 -0
- package/app/lib/template.ts +13 -6
- package/app/next-env.d.ts +1 -1
- package/bin/lib/mcp-spawn.js +38 -1
- package/mcp/README.md +5 -2
- package/mcp/src/index.ts +80 -0
- package/package.json +1 -1
- package/scripts/setup.js +1 -1
- package/skills/mindos/SKILL.md +4 -1
- package/skills/mindos/references/README.md +11 -0
- package/skills/mindos/references/post-task-hooks.md +53 -0
- package/skills/mindos/references/preference-capture.md +41 -0
- package/skills/mindos/references/sop-template.md +74 -0
- package/skills/mindos-zh/SKILL.md +4 -1
- package/skills/mindos-zh/references/README.md +11 -0
- package/skills/mindos-zh/references/post-task-hooks.md +53 -0
- package/skills/mindos-zh/references/preference-capture.md +41 -0
- package/skills/mindos-zh/references/sop-template.md +74 -0
- package/templates/empty/CONFIG.json +7 -5
- package/templates/empty/INSTRUCTION.md +5 -5
- package/templates/empty/README.md +1 -2
- package/templates/en/CONFIG.json +7 -5
- package/templates/en/INSTRUCTION.md +5 -5
- package/templates/en/README.md +1 -2
- package/templates/en//360/237/223/232 Resources/README.md" +4 -4
- package/templates/en//360/237/223/232 Resources//360/237/247/276 Books.csv" +1 -0
- package/templates/en//360/237/223/232 Resources//360/237/247/276 Learning Resources.csv" +1 -0
- package/templates/en//360/237/223/232 Resources//360/237/247/276 People to Follow.csv" +1 -0
- package/templates/en//360/237/223/232 Resources//360/237/247/276 Tools.csv" +1 -0
- package/templates/en//360/237/223/235 Notes/Ideas//360/237/247/252_example_product_idea.md" +9 -12
- package/templates/en//360/237/224/204 Workflows/Configurations//360/237/247/252_example_config_update_sop.md" +2 -3
- package/templates/en//360/237/224/204 Workflows/INSTRUCTION.md" +13 -5
- package/templates/en//360/237/232/200 Projects/Products//360/237/247/252_example_product_project_brief.md" +12 -14
- package/templates/template-generation-skill.md +4 -5
- package/templates/zh/CONFIG.json +7 -5
- package/templates/zh/INSTRUCTION.md +5 -5
- package/templates/zh/README.md +1 -2
- package/templates/zh//360/237/221/244 /347/224/273/345/203/217/README.md" +4 -4
- package/templates/zh//360/237/221/244 /347/224/273/345/203/217//342/232/231/357/270/{217 Preferences.md" → 217 /345/201/217/345/245/275.md" } +1 -1
- package/templates/zh//360/237/221/244 /347/224/273/345/203/217//360/237/216/{257 Focus.md" → 257 /350/201/232/347/204/246.md" } +1 -1
- package/templates/zh//360/237/221/244 /347/224/273/345/203/217//360/237/221/{244 Identity.md" → 244 /350/272/253/344/273/275.md" } +1 -1
- package/templates/zh//360/237/223/232 /350/265/204/346/272/220/README.md" +4 -4
- package/templates/zh//360/237/223/232 /350/265/204/346/272/220//360/237/247/276 /344/271/246/345/215/225.csv" +1 -0
- package/templates/zh//360/237/223/232 /350/265/204/346/272/220//360/237/247/276 /345/200/274/345/276/227/345/205/263/346/263/250/347/232/204/344/272/272.csv" +1 -0
- package/templates/zh//360/237/223/232 /350/265/204/346/272/220//360/237/247/276 /345/255/246/344/271/240/350/265/204/346/272/220.csv" +1 -0
- package/templates/zh//360/237/223/232 /350/265/204/346/272/220//360/237/247/276 /345/267/245/345/205/267/346/270/205/345/215/225.csv" +1 -0
- package/templates/zh//360/237/223/235 /347/254/224/350/256/260//346/203/263/346/263/225//360/237/247/252_example_/344/272/247/345/223/201/346/203/263/346/263/225.md" +8 -11
- package/templates/zh//360/237/224/204 /346/265/201/347/250/213/README.md" +1 -0
- package/templates/zh//360/237/224/204 /346/265/201/347/250/213//345/210/233/344/270/232/README.md" +3 -0
- package/templates/zh//360/237/224/204 /346/265/201/347/250/213//345/210/233/344/270/232//360/237/247/252_example_/346/257/217/345/221/250/345/210/233/345/247/213/344/272/272/350/277/220/350/220/245/350/212/202/345/245/217.md" +22 -0
- package/templates/zh//360/237/224/204 /346/265/201/347/250/213//351/205/215/347/275/256//360/237/247/252_example_/351/205/215/347/275/256/346/233/264/346/226/260/346/265/201/347/250/213.md" +1 -1
- package/templates/zh//360/237/232/200 /351/241/271/347/233/256//344/272/247/345/223/201//360/237/247/252_example_/344/272/247/345/223/201/351/241/271/347/233/256/347/256/200/346/212/245.md" +12 -14
- package/templates/empty/CONFIG.md +0 -73
- package/templates/en/CONFIG.md +0 -73
- package/templates/en//360/237/223/232 Resources//360/237/247/276 AI Influencers.csv" +0 -1
- package/templates/en//360/237/223/232 Resources//360/237/247/276 AI Products.csv" +0 -1
- package/templates/en//360/237/223/232 Resources//360/237/247/276 AI Scholars.csv" +0 -1
- package/templates/en//360/237/223/232 Resources//360/237/247/276 AI Tools.csv" +0 -1
- package/templates/zh/CONFIG.md +0 -66
- package/templates/zh//360/237/223/232 /350/265/204/346/272/220//360/237/247/276 AI Inferencers.csv" +0 -1
- package/templates/zh//360/237/223/232 /350/265/204/346/272/220//360/237/247/276 AI /344/272/247/345/223/201.csv" +0 -1
- package/templates/zh//360/237/223/232 /350/265/204/346/272/220//360/237/247/276 AI /345/255/246/350/200/205/346/270/205/345/215/225.csv" +0 -1
- package/templates/zh//360/237/223/232 /350/265/204/346/272/220//360/237/247/276 AI /345/267/245/345/205/267/346/270/205/345/215/225.csv" +0 -1
package/skills/mindos/SKILL.md
CHANGED
|
@@ -52,7 +52,7 @@ Run this sequence before substantive edits:
|
|
|
52
52
|
- If unavailable, read root `INSTRUCTION.md` and root `README.md` directly.
|
|
53
53
|
|
|
54
54
|
2. Discover current structure dynamically.
|
|
55
|
-
- Use `
|
|
55
|
+
- Use `mindos_list_spaces` (top-level zones + README blurbs), `mindos_list_files`, and targeted `mindos_search_notes` as needed.
|
|
56
56
|
- Do not assume fixed top-level directory names.
|
|
57
57
|
|
|
58
58
|
3. Load local guidance around target paths.
|
|
@@ -96,6 +96,7 @@ Before any non-trivial write, confirm all checks:
|
|
|
96
96
|
|
|
97
97
|
- `mindos_bootstrap`: Load startup context.
|
|
98
98
|
- `mindos_list_files`: Inspect file tree.
|
|
99
|
+
- `mindos_list_spaces`: Top-level Mind Spaces with README blurbs (lighter than full tree).
|
|
99
100
|
- `mindos_search_notes`: Locate relevant files by keyword/scope/type/date. **When searching, always issue multiple parallel searches with different keywords upfront** — synonyms, abbreviations, English/Chinese variants, and broader/narrower terms. A single keyword is fragile; casting a wider net on the first try avoids wasted rounds.
|
|
100
101
|
- `mindos_get_recent`: Inspect latest activity.
|
|
101
102
|
- `mindos_get_backlinks`: Assess impact before rename/move/delete.
|
|
@@ -105,6 +106,8 @@ Before any non-trivial write, confirm all checks:
|
|
|
105
106
|
- `mindos_read_file`: Read file content.
|
|
106
107
|
- `mindos_write_file`: Use only for true full replacement.
|
|
107
108
|
- `mindos_create_file`: Create `.md`/`.csv` files.
|
|
109
|
+
- `mindos_create_space`: Create a Mind Space (directory + README + INSTRUCTION scaffold). Prefer over `create_file` when adding a new cognitive zone.
|
|
110
|
+
- `mindos_rename_space`: Rename a Space folder (directory). Do not use `rename_file` for folders.
|
|
108
111
|
- `mindos_delete_file`: Delete only with explicit user intent.
|
|
109
112
|
- `mindos_rename_file`, `mindos_move_file`: Structural edits with follow-up reference checks.
|
|
110
113
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# MindOS skill — reference bundle
|
|
2
|
+
|
|
3
|
+
Long-form supplements for `../SKILL.md`. Load a file only when the task needs it.
|
|
4
|
+
|
|
5
|
+
| File | When to read |
|
|
6
|
+
|------|----------------|
|
|
7
|
+
| [sop-template.md](./sop-template.md) | Creating or rewriting a workflow SOP in the KB |
|
|
8
|
+
| [post-task-hooks.md](./post-task-hooks.md) | After a write/multi-step task; proposing follow-ups |
|
|
9
|
+
| [preference-capture.md](./preference-capture.md) | User expresses standing preferences to persist |
|
|
10
|
+
|
|
11
|
+
Chinese mirror: `skills/mindos-zh/references/` (same filenames).
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Post-task hooks
|
|
2
|
+
|
|
3
|
+
After completing a task, check the conditions below. If one matches, make a **one-line** proposal to the user. If none match, end quietly.
|
|
4
|
+
|
|
5
|
+
## Discipline
|
|
6
|
+
|
|
7
|
+
1. Do not propose after simple operations (rename, append one line, read-only queries).
|
|
8
|
+
2. **At most 1 proposal per task** — pick the highest priority match.
|
|
9
|
+
3. One sentence + specific target file/path. Only expand if the user says yes.
|
|
10
|
+
4. Check `user-skill-rules.md` suppression section first — skip any suppressed hook.
|
|
11
|
+
5. If the user asked for **no suggestions / quiet mode** for this turn or session, skip all hooks.
|
|
12
|
+
|
|
13
|
+
## Default hooks
|
|
14
|
+
|
|
15
|
+
### Experience capture (priority: high)
|
|
16
|
+
- **Condition**: task involved debugging, troubleshooting, or took multiple rounds to resolve.
|
|
17
|
+
- **Propose**: "Record this experience to {related experience file}?"
|
|
18
|
+
- **Format**: problem → cause → solution → rule
|
|
19
|
+
|
|
20
|
+
### Consistency sync (priority: high)
|
|
21
|
+
- **Condition**: edited file A, and A is referenced by other files (check via `get_backlinks`).
|
|
22
|
+
- **Propose**: "{B} references what you just changed — sync it?"
|
|
23
|
+
|
|
24
|
+
### Linked update (priority: medium)
|
|
25
|
+
- **Condition**: changed a CSV/TODO item status, and related docs exist.
|
|
26
|
+
- **Propose**: "Sync the corresponding info in {related doc}?"
|
|
27
|
+
|
|
28
|
+
### Structure classification (priority: medium)
|
|
29
|
+
- **Condition**: created a new file in a temporary location or inbox.
|
|
30
|
+
- **Propose**: "Move this to {recommended directory}?"
|
|
31
|
+
|
|
32
|
+
### Pattern extraction (priority: low)
|
|
33
|
+
- **Condition**: 3+ structurally similar operations in the current session.
|
|
34
|
+
- **Propose**: "This operation repeated multiple times — create an SOP?"
|
|
35
|
+
|
|
36
|
+
### SOP drift (priority: medium)
|
|
37
|
+
- **Condition**: task was executed following an existing SOP, but actual steps diverged from documented steps.
|
|
38
|
+
- **Propose**: "Execution diverged from {SOP file} — update the SOP?"
|
|
39
|
+
- **Action**: update divergent steps, append new pitfalls, set `<!-- last-used: -->` to today.
|
|
40
|
+
|
|
41
|
+
### Conversation retrospective (priority: low)
|
|
42
|
+
- **Condition**: session >10 turns and involved decisions, trade-offs, or lessons.
|
|
43
|
+
- **Propose**: "This conversation had some decisions worth capturing — do a retrospective?"
|
|
44
|
+
|
|
45
|
+
## User-defined hooks
|
|
46
|
+
|
|
47
|
+
Add your own below, same format:
|
|
48
|
+
|
|
49
|
+
```markdown
|
|
50
|
+
### Weekly report material (priority: medium)
|
|
51
|
+
- Condition: updated a Project-related file.
|
|
52
|
+
- Propose: "Record this change in the weekly report?"
|
|
53
|
+
```
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Preference capture (`user-skill-rules.md`)
|
|
2
|
+
|
|
3
|
+
## When to capture
|
|
4
|
+
|
|
5
|
+
The user expresses a preference correction (e.g. "don't do X", "next time remember…", "this should go in… not in…").
|
|
6
|
+
|
|
7
|
+
## Confirm-then-write flow
|
|
8
|
+
|
|
9
|
+
1. **First occurrence of a new preference**: propose the rule and target file before writing.
|
|
10
|
+
- "Record this preference to `user-skill-rules.md`? Rule: _{summary}_"
|
|
11
|
+
- Write only after user confirms.
|
|
12
|
+
2. **Repeated confirmation on similar category**: after the user confirms the same category of preference 3+ times, auto-write future rules in that category without asking. Add an `auto-confirm: true` flag to the category header in `user-skill-rules.md`.
|
|
13
|
+
3. **User explicitly grants blanket permission** (e.g. "just record preferences directly"): set a top-level `auto-confirm-all: true` flag and skip confirmation for all future captures.
|
|
14
|
+
|
|
15
|
+
## File location
|
|
16
|
+
|
|
17
|
+
- Target: `user-skill-rules.md` in the knowledge base root (read by `mindos_bootstrap` when present).
|
|
18
|
+
- If the file does not exist, create it with the template below on first confirmed write.
|
|
19
|
+
|
|
20
|
+
## File template
|
|
21
|
+
|
|
22
|
+
```markdown
|
|
23
|
+
# User Skill Rules
|
|
24
|
+
<!-- auto-confirm-all: false -->
|
|
25
|
+
|
|
26
|
+
## Preferences
|
|
27
|
+
<!-- Group by category. Mark auto-confirm: true on categories confirmed 3+ times. -->
|
|
28
|
+
|
|
29
|
+
## Suppressed Hooks
|
|
30
|
+
<!-- List post-task hooks the user has opted out of. -->
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Rule format
|
|
34
|
+
|
|
35
|
+
Each rule is a bullet under its category:
|
|
36
|
+
|
|
37
|
+
```markdown
|
|
38
|
+
### {Category}
|
|
39
|
+
<!-- auto-confirm: false -->
|
|
40
|
+
- {Rule description} — _{date captured}_
|
|
41
|
+
```
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# SOP file template (MindOS knowledge base)
|
|
2
|
+
|
|
3
|
+
Use when **distilling experience into a new SOP** or normalizing an existing workflow doc. Place the file under whichever directory in the KB holds procedures (often names like `Workflows/`, `SOPs/`, `流程/` — infer from bootstrap tree, do not assume a fixed English folder name).
|
|
4
|
+
|
|
5
|
+
## Required structure
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
# SOP: {Title}
|
|
9
|
+
<!-- keywords: {3-5 trigger keywords, English and Chinese} -->
|
|
10
|
+
<!-- last-used: {ISO date} -->
|
|
11
|
+
<!-- created: {ISO date} -->
|
|
12
|
+
<!-- requires-mcp: {comma-separated, e.g. mindos — or "none" if KB-only read/write via other means} -->
|
|
13
|
+
<!-- requires-kb-skills: {optional — paths or names of SKILL.md / instructions the agent must follow, or "none"} -->
|
|
14
|
+
|
|
15
|
+
## Prerequisites
|
|
16
|
+
|
|
17
|
+
**Before starting**, list what must already be true. If something is missing, **stop or take the degradation branch** (do not assume).
|
|
18
|
+
|
|
19
|
+
| Kind | What to record |
|
|
20
|
+
|------|----------------|
|
|
21
|
+
| **MCP / tools** | Which servers or tool families are required (e.g. `mindos`, browser, git). If the workflow only uses MindOS file APIs, say `mindos` or as appropriate. |
|
|
22
|
+
| **Agent skills** | KB-resident or host skills the executor must have loaded or be able to read (e.g. `skills/foo/SKILL.md`, or “follow root INSTRUCTION.md §X”). |
|
|
23
|
+
| **Environment** | CLI installed, network, API keys, logged-in state, OS constraints. |
|
|
24
|
+
| **KB state** | Files, directories, or tables that must exist first; optional “seed” notes. |
|
|
25
|
+
|
|
26
|
+
If there are **no** special dependencies, write explicitly: **None — MindOS MCP (or equivalent) only.**
|
|
27
|
+
|
|
28
|
+
## Applicable Scenarios
|
|
29
|
+
|
|
30
|
+
When to use this SOP. Trigger conditions, audience, and **non-goals** (what this SOP deliberately does not cover).
|
|
31
|
+
|
|
32
|
+
## Inputs and outputs (optional but recommended)
|
|
33
|
+
|
|
34
|
+
- **Inputs**: what the user or agent must supply (paths, decisions, raw text).
|
|
35
|
+
- **Outputs**: artifacts produced (files created/updated, messages to user).
|
|
36
|
+
|
|
37
|
+
## Steps
|
|
38
|
+
|
|
39
|
+
Each step includes:
|
|
40
|
+
1. **Action** — concrete operation
|
|
41
|
+
2. **Branch** — if X do A, if Y do B (mark "none" if no branching)
|
|
42
|
+
3. **Failure handling** — what can go wrong and how to respond
|
|
43
|
+
|
|
44
|
+
## Exit Conditions
|
|
45
|
+
|
|
46
|
+
When is the task complete. When to abort or escalate.
|
|
47
|
+
|
|
48
|
+
## Pitfall Log
|
|
49
|
+
|
|
50
|
+
Known edge cases and lessons learned. Append new entries each time the SOP is executed and a new issue is encountered.
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Metadata (HTML comments)
|
|
54
|
+
|
|
55
|
+
| Tag | Purpose |
|
|
56
|
+
|-----|---------|
|
|
57
|
+
| **`keywords`** | SOP recall via `mindos_search_notes` + parallel variants. English and Chinese. |
|
|
58
|
+
| **`last-used`** | Set to today’s date whenever the SOP is followed. |
|
|
59
|
+
| **`created`** | Set once at creation time. |
|
|
60
|
+
| **`requires-mcp`** | Quick machine/human scan: required MCP servers (or `none`). |
|
|
61
|
+
| **`requires-kb-skills`** | Optional: KB skill paths or “none”. |
|
|
62
|
+
|
|
63
|
+
Optional, when useful:
|
|
64
|
+
|
|
65
|
+
- **`<!-- related: path/to/other-sop.md -->`** — supersedes, depends-on, or paired workflows.
|
|
66
|
+
- **`<!-- owner: @handle or name -->`** — who curates this SOP.
|
|
67
|
+
- **`<!-- review-by: YYYY-MM -->`** — reminder to revalidate after product/tool changes.
|
|
68
|
+
|
|
69
|
+
## Authoring tips
|
|
70
|
+
|
|
71
|
+
- **Prerequisites vs scenarios**: *Prerequisites* = hard requirements before step 1; *Applicable scenarios* = when the workflow is the right choice among others.
|
|
72
|
+
- **Degradation path**: if MCP or a skill is missing, add a **Branch** in step 1 (“if tool unavailable → tell user to enable X / use manual checklist Y”).
|
|
73
|
+
- **Stable keywords**: avoid one-off typos in `keywords`; include synonyms you actually search for.
|
|
74
|
+
- **Link related SOPs** in Prerequisites or a short “See also” line under Applicable scenarios to avoid duplicate drift.
|
|
@@ -50,7 +50,7 @@ description: >
|
|
|
50
50
|
- 若不可用,直接读取根 `INSTRUCTION.md` 与根 `README.md`。
|
|
51
51
|
|
|
52
52
|
2. 动态发现当前结构。
|
|
53
|
-
- 使用 `mindos_list_files` 与按需 `mindos_search_notes`。
|
|
53
|
+
- 使用 `mindos_list_spaces`(顶层分区与 README 摘要)、`mindos_list_files` 与按需 `mindos_search_notes`。
|
|
54
54
|
- 不假设固定一级目录名。
|
|
55
55
|
|
|
56
56
|
3. 加载目标路径附近的局部规则。
|
|
@@ -94,6 +94,7 @@ description: >
|
|
|
94
94
|
|
|
95
95
|
- `mindos_bootstrap`:加载启动上下文。
|
|
96
96
|
- `mindos_list_files`:查看文件树。
|
|
97
|
+
- `mindos_list_spaces`:列出顶层心智空间及 README 摘要(比整棵树更轻)。
|
|
97
98
|
- `mindos_search_notes`:按关键词/范围/类型/日期定位文件。**搜索时,第一次就应并行发起多个关键词搜索**——同义词、缩写、中英文变体、更宽/更窄的表述。单一关键词很脆弱,一开始就撒网能避免多轮空搜。
|
|
98
99
|
- `mindos_get_recent`:查看近期活动。
|
|
99
100
|
- `mindos_get_backlinks`:重命名/移动/删除前评估影响。
|
|
@@ -103,6 +104,8 @@ description: >
|
|
|
103
104
|
- `mindos_read_file`:读取文件内容。
|
|
104
105
|
- `mindos_write_file`:仅在确需整文件替换时使用。
|
|
105
106
|
- `mindos_create_file`:创建 `.md`/`.csv` 文件。
|
|
107
|
+
- `mindos_create_space`:新建心智空间(目录 + README + INSTRUCTION 脚手架)。新增整块分区时优先于只建 `某空间/README.md`。
|
|
108
|
+
- `mindos_rename_space`:重命名空间目录(文件夹)。不能用 `rename_file` 重命名目录。
|
|
106
109
|
- `mindos_delete_file`:仅在用户明确意图下删除。
|
|
107
110
|
- `mindos_rename_file`、`mindos_move_file`:结构变更后补做引用检查。
|
|
108
111
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# MindOS skill — 参考文档(中文)
|
|
2
|
+
|
|
3
|
+
`../SKILL.md` 的补充长文。仅在任务需要时读取对应文件。
|
|
4
|
+
|
|
5
|
+
| 文件 | 何时阅读 |
|
|
6
|
+
|------|----------|
|
|
7
|
+
| [sop-template.md](./sop-template.md) | 在知识库中新建或重写流程类 SOP |
|
|
8
|
+
| [post-task-hooks.md](./post-task-hooks.md) | 写入/多步任务完成后,考虑是否一句话跟进 |
|
|
9
|
+
| [preference-capture.md](./preference-capture.md) | 用户表达要长期记住的偏好 |
|
|
10
|
+
|
|
11
|
+
英文版见 `skills/mindos/references/`(结构一致)。
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# 任务后 Hooks
|
|
2
|
+
|
|
3
|
+
任务完成后检查以下条件。命中则向用户发起**一句话**提议;都不命中则安静结束。
|
|
4
|
+
|
|
5
|
+
## 纪律
|
|
6
|
+
|
|
7
|
+
1. 简单操作(改标题、追加一行、只读查询)完成后不提议。
|
|
8
|
+
2. **每次任务最多 1 条提议**,选优先级最高的命中项。
|
|
9
|
+
3. 一句话 + 具体目标路径/文件。用户同意后再展开。
|
|
10
|
+
4. 先查 `user-skill-rules.md` 的抑制区,命中则跳过对应 hook。
|
|
11
|
+
5. 用户本轮或本会话要求**不要建议 / 安静执行**时,跳过所有 hooks。
|
|
12
|
+
|
|
13
|
+
## 默认 Hooks
|
|
14
|
+
|
|
15
|
+
### 经验沉淀(优先级:高)
|
|
16
|
+
- **条件**:调试、排错、踩坑,或多轮才解决。
|
|
17
|
+
- **提议**:「要把这个经验记到 {相关经验文件} 吗?」
|
|
18
|
+
- **格式**:问题 → 原因 → 解决 → 规则
|
|
19
|
+
|
|
20
|
+
### 一致性同步(优先级:高)
|
|
21
|
+
- **条件**:编辑了文件 A,且 A 被其他文件引用(`get_backlinks`)。
|
|
22
|
+
- **提议**:「{B} 引用了刚改的内容,要同步更新吗?」
|
|
23
|
+
|
|
24
|
+
### 联动更新(优先级:中)
|
|
25
|
+
- **条件**:改了 CSV/TODO 条目状态,且存在关联文档。
|
|
26
|
+
- **提议**:「{关联文档} 的对应信息要同步吗?」
|
|
27
|
+
|
|
28
|
+
### 结构归类(优先级:中)
|
|
29
|
+
- **条件**:在临时目录或收件箱新建了文件。
|
|
30
|
+
- **提议**:「要归类到 {推荐目录} 吗?」
|
|
31
|
+
|
|
32
|
+
### 模式提炼(优先级:低)
|
|
33
|
+
- **条件**:当前会话中 3+ 次结构相似操作。
|
|
34
|
+
- **提议**:「这个操作重复了多次,要整理成 SOP 吗?」
|
|
35
|
+
|
|
36
|
+
### SOP 偏差(优先级:中)
|
|
37
|
+
- **条件**:按某 SOP 执行,但实际步骤与文档不一致。
|
|
38
|
+
- **提议**:「执行过程与 {SOP 文件} 有偏差,要更新这个 SOP 吗?」
|
|
39
|
+
- **动作**:更新偏差步骤、追加踩坑、将 `<!-- last-used: -->` 设为今天。
|
|
40
|
+
|
|
41
|
+
### 对话复盘(优先级:低)
|
|
42
|
+
- **条件**:会话 >10 轮且涉及决策、权衡或经验教训。
|
|
43
|
+
- **提议**:「这段对话有些决策值得沉淀,要做个复盘吗?」
|
|
44
|
+
|
|
45
|
+
## 用户自定义 Hooks
|
|
46
|
+
|
|
47
|
+
在 skill 或笔记中按同格式追加,例如:
|
|
48
|
+
|
|
49
|
+
```markdown
|
|
50
|
+
### 周报素材收集(优先级:中)
|
|
51
|
+
- 条件:更新了 Project 相关文件
|
|
52
|
+
- 提议:「要把这个变更记到本周周报素材吗?」
|
|
53
|
+
```
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# 偏好捕获(`user-skill-rules.md`)
|
|
2
|
+
|
|
3
|
+
## 何时捕获
|
|
4
|
+
|
|
5
|
+
用户在操作中表达偏好修正(如「以后不要…」「下次记得…」「这个应该放在…而不是…」)。
|
|
6
|
+
|
|
7
|
+
## 确认后写入流程
|
|
8
|
+
|
|
9
|
+
1. **某类偏好首次出现**:先提议,用户确认后再写入。
|
|
10
|
+
- 「记录此偏好到 `user-skill-rules.md`?规则:_{摘要}_」
|
|
11
|
+
- 仅在用户确认后写入。
|
|
12
|
+
2. **同类偏好确认 3 次以上**:该类别在 `user-skill-rules.md` 中标记 `auto-confirm: true`,后续同类偏好自动写入,不再询问。
|
|
13
|
+
3. **用户明确授权**(如「偏好直接记就行」):设置顶层 `auto-confirm-all: true`,之后所有偏好跳过确认直接写入。
|
|
14
|
+
|
|
15
|
+
## 文件位置
|
|
16
|
+
|
|
17
|
+
- 目标:知识库根目录的 `user-skill-rules.md`(存在时由 `mindos_bootstrap` 读取)。
|
|
18
|
+
- 若文件不存在,在首次确认写入时按下方模板创建。
|
|
19
|
+
|
|
20
|
+
## 文件模板
|
|
21
|
+
|
|
22
|
+
```markdown
|
|
23
|
+
# User Skill Rules
|
|
24
|
+
<!-- auto-confirm-all: false -->
|
|
25
|
+
|
|
26
|
+
## Preferences
|
|
27
|
+
<!-- 按类别分组。确认 3 次以上的类别标记 auto-confirm: true。 -->
|
|
28
|
+
|
|
29
|
+
## Suppressed Hooks
|
|
30
|
+
<!-- 列出用户已关闭的 Post-Task Hooks。 -->
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## 规则格式
|
|
34
|
+
|
|
35
|
+
每条规则以列表项写在对应类别下:
|
|
36
|
+
|
|
37
|
+
```markdown
|
|
38
|
+
### {类别名}
|
|
39
|
+
<!-- auto-confirm: false -->
|
|
40
|
+
- {规则描述} — _{记录日期}_
|
|
41
|
+
```
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# SOP 文件模板(MindOS 知识库)
|
|
2
|
+
|
|
3
|
+
在**把经验提炼成新 SOP** 或规范化现有流程文档时使用。文件放在知识库中**存放流程/规范**的目录下(常见名如 `Workflows/`、`SOPs/`、`流程/` 等——从 bootstrap 目录树推断,**不要写死**某个英文文件夹名)。
|
|
4
|
+
|
|
5
|
+
## 必须遵循的结构
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
# SOP: {标题}
|
|
9
|
+
<!-- keywords: {3-5 个触发关键词,中英文} -->
|
|
10
|
+
<!-- last-used: {ISO date} -->
|
|
11
|
+
<!-- created: {ISO date} -->
|
|
12
|
+
<!-- requires-mcp: {逗号分隔,如 mindos;若仅本地读写且无 MCP 则写 none 并说明方式} -->
|
|
13
|
+
<!-- requires-kb-skills: {可选 — 必须遵循的 SKILL.md 路径或名称;无则写 none} -->
|
|
14
|
+
|
|
15
|
+
## 前置条件
|
|
16
|
+
|
|
17
|
+
**开始执行前**必须已满足的条件;若不满足应**中止或走降级分支**(不要默认环境齐全)。
|
|
18
|
+
|
|
19
|
+
| 类型 | 写什么 |
|
|
20
|
+
|------|--------|
|
|
21
|
+
| **MCP / 工具** | 依赖哪些 MCP 或工具族(如 `mindos`、浏览器、git)。若流程只用 MindOS 文件能力,写明 `mindos` 或实际所用。 |
|
|
22
|
+
| **Agent 技能** | 执行方必须已加载或可读取的知识库内/宿主侧 Skill(如 `skills/foo/SKILL.md`,或「遵循根目录 INSTRUCTION.md §X」)。 |
|
|
23
|
+
| **环境 / 账号** | 是否依赖 CLI、网络、API Key、登录态、操作系统等。 |
|
|
24
|
+
| **知识库状态** | 必须先存在的文件、目录、表格或种子笔记。 |
|
|
25
|
+
|
|
26
|
+
若**无**特殊依赖,请显式写:**无 — 仅需 MindOS MCP(或等价能力)即可。**
|
|
27
|
+
|
|
28
|
+
## 适用场景
|
|
29
|
+
|
|
30
|
+
什么情况下该用这个 SOP。触发条件、面向对象,以及**非目标**(本 SOP 明确不覆盖什么)。
|
|
31
|
+
|
|
32
|
+
## 输入与产出(建议写)
|
|
33
|
+
|
|
34
|
+
- **输入**:用户或 Agent 必须提供的信息(路径、决策、原始材料等)。
|
|
35
|
+
- **产出**:会生成或更新哪些产物(文件、对外消息等)。
|
|
36
|
+
|
|
37
|
+
## 步骤
|
|
38
|
+
|
|
39
|
+
每步包含:
|
|
40
|
+
1. **做什么** — 具体操作
|
|
41
|
+
2. **判断分支** — 遇到 X 走 A,遇到 Y 走 B(无分支则标注"无")
|
|
42
|
+
3. **失败处理** — 这步可能失败的情况和应对
|
|
43
|
+
|
|
44
|
+
## 退出条件
|
|
45
|
+
|
|
46
|
+
什么时候算完成,什么时候该放弃或升级。
|
|
47
|
+
|
|
48
|
+
## 踩坑记录
|
|
49
|
+
|
|
50
|
+
已知的边界 case 和教训。每次执行遇到新坑时追加。
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## 元数据(HTML 注释)
|
|
54
|
+
|
|
55
|
+
| 标签 | 用途 |
|
|
56
|
+
|------|------|
|
|
57
|
+
| **`keywords`** | 供 `mindos_search_notes` 等召回,配合多关键词搜索;中英文都要有。 |
|
|
58
|
+
| **`last-used`** | 每次按该 SOP 执行后更新为当天日期。 |
|
|
59
|
+
| **`created`** | 创建时设置一次。 |
|
|
60
|
+
| **`requires-mcp`** | 快速扫一眼:依赖哪些 MCP(或 `none`)。 |
|
|
61
|
+
| **`requires-kb-skills`** | 可选:依赖的知识库内 Skill;无则 `none`。 |
|
|
62
|
+
|
|
63
|
+
按需可选:
|
|
64
|
+
|
|
65
|
+
- **`<!-- related: path/to/other-sop.md -->`** — 被替代、依赖、或成对使用的其他 SOP。
|
|
66
|
+
- **`<!-- owner: 维护人 -->`** — 谁负责迭代本 SOP。
|
|
67
|
+
- **`<!-- review-by: YYYY-MM -->`** — 提醒在工具/产品变更后复核是否仍成立。
|
|
68
|
+
|
|
69
|
+
## 编写提示
|
|
70
|
+
|
|
71
|
+
- **前置条件 vs 适用场景**:前置条件 = 开跑前硬门槛;适用场景 = 在众多流程里**何时选**这一条。
|
|
72
|
+
- **降级路径**:若某 MCP 或 Skill 不可用,在**第一步**就写分支(「若工具不可用 → 提示用户开启 X / 改用手动清单 Y」)。
|
|
73
|
+
- **keywords 要稳**:避免一次性错拼;把你会用来搜的同义词写进去。
|
|
74
|
+
- **关联 SOP**:在前置条件或适用场景下加「参见 xxx.md」,减少多份文档互相漂移。
|
|
@@ -33,12 +33,14 @@
|
|
|
33
33
|
"defaultHeadingLevel": 2
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
36
|
+
"naming": {
|
|
37
|
+
"firstLevelDirEmoji": true,
|
|
38
|
+
"deeperLevelDirEmoji": false,
|
|
39
39
|
"notes": [
|
|
40
|
-
"
|
|
41
|
-
"
|
|
40
|
+
"First-level directories (root children) use emoji + name",
|
|
41
|
+
"Second-level and deeper directories use plain names",
|
|
42
|
+
"Directory naming language follows languagePreference.folderNamingLanguage",
|
|
43
|
+
"Content file emoji prefix follows filename.emojiPrefixDefault"
|
|
42
44
|
]
|
|
43
45
|
},
|
|
44
46
|
"uiSchema": {
|
|
@@ -14,7 +14,7 @@ When entering a knowledge base, load context in this order:
|
|
|
14
14
|
|
|
15
15
|
1. Read root `INSTRUCTION.md` (this file)
|
|
16
16
|
2. Read root `README.md` (index and navigation)
|
|
17
|
-
3. Read `CONFIG.json`
|
|
17
|
+
3. Read `CONFIG.json` (config values + naming semantics)
|
|
18
18
|
4. Route to the target directory
|
|
19
19
|
5. If target directory has `INSTRUCTION.md`, read it first
|
|
20
20
|
6. Then read target `README.md` and target files
|
|
@@ -123,7 +123,7 @@ Create it only when local rules are reusable and meaningful. Avoid creating them
|
|
|
123
123
|
|
|
124
124
|
- Content files: optional `emoji + name`
|
|
125
125
|
- Directories: follow `languagePreference.folderNamingLanguage`; zh templates default to Chinese naming, en templates default to English naming.
|
|
126
|
-
- System files: `README.md`, `INSTRUCTION.md`, `TODO.md`, `CHANGELOG.md`, `CONFIG.json
|
|
126
|
+
- System files: `README.md`, `INSTRUCTION.md`, `TODO.md`, `CHANGELOG.md`, `CONFIG.json`
|
|
127
127
|
|
|
128
128
|
### 4.3 Read-Before-Write
|
|
129
129
|
|
|
@@ -172,6 +172,6 @@ Create it only when local rules are reusable and meaningful. Avoid creating them
|
|
|
172
172
|
|
|
173
173
|
## 9. CONFIG Read Protocol
|
|
174
174
|
|
|
175
|
-
- `CONFIG.json`
|
|
176
|
-
-
|
|
177
|
-
-
|
|
175
|
+
- `CONFIG.json` is the single source of truth for all configuration.
|
|
176
|
+
- Field semantics are embedded in `keySpecs`; directory naming rules in `naming`.
|
|
177
|
+
- No separate `CONFIG.md` is needed.
|
|
@@ -9,7 +9,6 @@ my-mind/
|
|
|
9
9
|
├── INSTRUCTION.md
|
|
10
10
|
├── README.md
|
|
11
11
|
├── CONFIG.json
|
|
12
|
-
├── CONFIG.md
|
|
13
12
|
├── TODO.md
|
|
14
13
|
├── CHANGELOG.md
|
|
15
14
|
├── 👤 Profile/
|
|
@@ -22,6 +21,6 @@ my-mind/
|
|
|
22
21
|
|
|
23
22
|
## 💡 Usage
|
|
24
23
|
|
|
25
|
-
- Bootstrap read order: `INSTRUCTION.md` -> `README.md` -> `CONFIG.json`
|
|
24
|
+
- Bootstrap read order: `INSTRUCTION.md` -> `README.md` -> `CONFIG.json`
|
|
26
25
|
- Capture first in `📝 Notes/`, then move stable content to domain folders
|
|
27
26
|
- Directories that need regular updates: `👤 Profile/`, `🔗 Connections/`, `🚀 Projects/`
|
package/templates/en/CONFIG.json
CHANGED
|
@@ -33,12 +33,14 @@
|
|
|
33
33
|
"defaultHeadingLevel": 2
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
36
|
+
"naming": {
|
|
37
|
+
"firstLevelDirEmoji": true,
|
|
38
|
+
"deeperLevelDirEmoji": false,
|
|
39
39
|
"notes": [
|
|
40
|
-
"
|
|
41
|
-
"
|
|
40
|
+
"First-level directories (root children) use emoji + name, e.g. 👤 Profile/",
|
|
41
|
+
"Second-level and deeper directories use plain names, e.g. Family/",
|
|
42
|
+
"Directory naming language follows languagePreference.folderNamingLanguage",
|
|
43
|
+
"Content file emoji prefix follows filename.emojiPrefixDefault"
|
|
42
44
|
]
|
|
43
45
|
},
|
|
44
46
|
"uiSchema": {
|
|
@@ -14,7 +14,7 @@ When entering a knowledge base, load context in this order:
|
|
|
14
14
|
|
|
15
15
|
1. Read root `INSTRUCTION.md` (this file)
|
|
16
16
|
2. Read root `README.md` (index and navigation)
|
|
17
|
-
3. Read `CONFIG.json`
|
|
17
|
+
3. Read `CONFIG.json` (config values + naming semantics)
|
|
18
18
|
4. Route to the target directory
|
|
19
19
|
5. If target directory has `INSTRUCTION.md`, read it first
|
|
20
20
|
6. Then read target `README.md` and target files
|
|
@@ -123,7 +123,7 @@ Create it only when local rules are reusable and meaningful. Avoid creating them
|
|
|
123
123
|
|
|
124
124
|
- Content files: optional `emoji + name`
|
|
125
125
|
- Directories: follow `languagePreference.folderNamingLanguage`; zh templates default to Chinese naming, en templates default to English naming.
|
|
126
|
-
- System files: `README.md`, `INSTRUCTION.md`, `TODO.md`, `CHANGELOG.md`, `CONFIG.json
|
|
126
|
+
- System files: `README.md`, `INSTRUCTION.md`, `TODO.md`, `CHANGELOG.md`, `CONFIG.json`
|
|
127
127
|
|
|
128
128
|
### 4.3 Read-Before-Write
|
|
129
129
|
|
|
@@ -172,6 +172,6 @@ Create it only when local rules are reusable and meaningful. Avoid creating them
|
|
|
172
172
|
|
|
173
173
|
## 9. CONFIG Read Protocol
|
|
174
174
|
|
|
175
|
-
- `CONFIG.json`
|
|
176
|
-
-
|
|
177
|
-
-
|
|
175
|
+
- `CONFIG.json` is the single source of truth for all configuration.
|
|
176
|
+
- Field semantics are embedded in `keySpecs`; directory naming rules in `naming`.
|
|
177
|
+
- No separate `CONFIG.md` is needed.
|
package/templates/en/README.md
CHANGED
|
@@ -9,7 +9,6 @@ my-mind/
|
|
|
9
9
|
├── INSTRUCTION.md
|
|
10
10
|
├── README.md
|
|
11
11
|
├── CONFIG.json
|
|
12
|
-
├── CONFIG.md
|
|
13
12
|
├── TODO.md
|
|
14
13
|
├── CHANGELOG.md
|
|
15
14
|
├── 👤 Profile/
|
|
@@ -22,6 +21,6 @@ my-mind/
|
|
|
22
21
|
|
|
23
22
|
## 💡 Usage
|
|
24
23
|
|
|
25
|
-
- Bootstrap read order: `INSTRUCTION.md` -> `README.md` -> `CONFIG.json`
|
|
24
|
+
- Bootstrap read order: `INSTRUCTION.md` -> `README.md` -> `CONFIG.json`
|
|
26
25
|
- Capture first in `📝 Notes/`, then move stable content to domain folders
|
|
27
26
|
- Directories that need regular updates: `👤 Profile/`, `🔗 Connections/`, `🚀 Projects/`
|
|
@@ -8,10 +8,10 @@ External resource collections and structured indexes.
|
|
|
8
8
|
📚 Resources/
|
|
9
9
|
├── README.md
|
|
10
10
|
├── INSTRUCTION.md
|
|
11
|
-
├── 🧾
|
|
12
|
-
├── 🧾
|
|
13
|
-
├── 🧾
|
|
14
|
-
└── 🧾
|
|
11
|
+
├── 🧾 Books.csv
|
|
12
|
+
├── 🧾 People to Follow.csv
|
|
13
|
+
├── 🧾 Tools.csv
|
|
14
|
+
└── 🧾 Learning Resources.csv
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## Usage
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Title,Author,Category,Status,Rating,StartedAt,FinishedAt,Notes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Name,Type,Topic,Provider,Link,Status,UpdatedAt,Notes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Name,Field,Platform,Link,WhyFollow,Status,UpdatedAt,Notes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Name,Category,PrimaryUse,Website,Pricing,Status,UpdatedAt,Notes
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
# 💡
|
|
1
|
+
# 💡 Idea Example: Weekend Reading Digest
|
|
2
2
|
|
|
3
3
|
## Concept
|
|
4
|
-
-
|
|
4
|
+
- Every Sunday, review highlights from the week's reading and distill 3 actionable takeaways.
|
|
5
5
|
|
|
6
|
-
##
|
|
7
|
-
-
|
|
6
|
+
## Why It Matters
|
|
7
|
+
- Prevents knowledge from evaporating after consumption.
|
|
8
|
+
- Builds a compounding library of personal insights.
|
|
8
9
|
|
|
9
|
-
##
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## Validation Plan
|
|
14
|
-
1. Prototype trace UI in one workflow.
|
|
15
|
-
2. Run 10 user sessions.
|
|
16
|
-
3. Measure confidence score before/after.
|
|
10
|
+
## Next Steps
|
|
11
|
+
1. Pick one book or article from this week.
|
|
12
|
+
2. Write 3 bullet takeaways in Notes/Inbox.
|
|
13
|
+
3. Move the best one into a project or goal.
|
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
- Ensure agents can run with minimal reconfiguration across sessions.
|
|
5
5
|
|
|
6
6
|
## Steps
|
|
7
|
-
1. Update `CONFIG.json` for
|
|
8
|
-
2.
|
|
9
|
-
3. Verify naming-level rules (emoji + hierarchy) remain consistent.
|
|
7
|
+
1. Update `CONFIG.json` (structured keys, `keySpecs` for semantics, `naming` for directory rules).
|
|
8
|
+
2. Verify naming-level rules (emoji + hierarchy) remain consistent.
|
|
10
9
|
4. Run `rg` sweep for stale paths and obsolete labels.
|
|
11
10
|
5. Validate one real workflow end-to-end.
|
|
12
11
|
|