@biaoo/tiangong-wiki 0.2.0 → 0.2.2
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 +39 -50
- package/README.zh-CN.md +39 -50
- package/SKILL.md +75 -107
- package/assets/templates/achievement.md +8 -8
- package/assets/templates/bridge.md +8 -8
- package/assets/templates/concept.md +14 -18
- package/assets/templates/faq.md +8 -10
- package/assets/templates/lesson.md +8 -8
- package/assets/templates/method.md +16 -8
- package/assets/templates/misconception.md +10 -10
- package/assets/templates/person.md +8 -8
- package/assets/templates/research-note.md +10 -10
- package/assets/templates/resume.md +11 -10
- package/assets/templates/source-summary.md +8 -12
- package/assets/tiangong-wiki-framework.png +0 -0
- package/assets/wiki.config.default.json +6 -3
- package/dist/commands/asset.js +21 -0
- package/dist/commands/skill.js +78 -0
- package/dist/commands/template.js +30 -0
- package/dist/core/cli-env.js +34 -5
- package/dist/core/global-config.js +61 -0
- package/dist/core/onboarding.js +252 -102
- package/dist/core/workflow-context.js +58 -21
- package/dist/core/workspace-skills.js +496 -60
- package/dist/daemon/server.js +8 -0
- package/dist/index.js +36 -1
- package/dist/operations/asset.js +81 -0
- package/dist/operations/query.js +25 -1
- package/dist/operations/template-lint.js +160 -0
- package/dist/utils/asset.js +75 -0
- package/dist/utils/errors.js +6 -0
- package/package.json +2 -1
- package/references/cli-interface.md +32 -1
- package/references/template-design-guide.md +125 -113
- package/references/{env.md → troubleshooting.md} +64 -33
- package/references/vault-to-wiki-instruction.md +109 -51
- package/references/wiki-maintenance-instruction.md +15 -15
package/README.md
CHANGED
|
@@ -24,6 +24,21 @@
|
|
|
24
24
|
npm install -g @biaoo/tiangong-wiki
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
+
## Update
|
|
28
|
+
|
|
29
|
+
Upgrade the npm package itself:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm install -g @biaoo/tiangong-wiki@latest
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Refresh workspace-local managed skills after upgrading the CLI or when upstream skill content changes:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
tiangong-wiki skill status
|
|
39
|
+
tiangong-wiki skill update --all
|
|
40
|
+
```
|
|
41
|
+
|
|
27
42
|
<details>
|
|
28
43
|
<summary><strong>Use as an AI Agent Skill</strong></summary>
|
|
29
44
|
|
|
@@ -41,17 +56,36 @@ Or let the setup wizard handle everything:
|
|
|
41
56
|
tiangong-wiki setup
|
|
42
57
|
```
|
|
43
58
|
|
|
59
|
+
To manage workspace-local skills from arbitrary repo/path sources after setup:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
tiangong-wiki skill add ../my-skills --skill notes
|
|
63
|
+
tiangong-wiki skill status
|
|
64
|
+
tiangong-wiki skill update notes
|
|
65
|
+
tiangong-wiki skill update --all
|
|
66
|
+
```
|
|
67
|
+
|
|
44
68
|
</details>
|
|
45
69
|
|
|
46
70
|
## Quick Start
|
|
47
71
|
|
|
48
72
|
```bash
|
|
73
|
+
cd /path/to/your/workspace # run commands from the workspace root
|
|
49
74
|
tiangong-wiki setup # interactive config wizard
|
|
50
75
|
tiangong-wiki doctor # verify configuration
|
|
51
76
|
tiangong-wiki init # initialize workspace
|
|
52
77
|
tiangong-wiki sync # index Markdown pages
|
|
53
78
|
```
|
|
54
79
|
|
|
80
|
+
`tiangong-wiki setup` creates a workspace-local `.wiki.env` and records it as your default workspace config. Command resolution now follows this order:
|
|
81
|
+
|
|
82
|
+
1. `--env-file <path>`
|
|
83
|
+
2. `WIKI_ENV_FILE`
|
|
84
|
+
3. The nearest `.wiki.env` found by walking upward from your current directory
|
|
85
|
+
4. The global default workspace config written by `tiangong-wiki setup`
|
|
86
|
+
|
|
87
|
+
That means commands still work best from inside a workspace, but they can also run from outside the workspace after setup, or target a specific workspace explicitly with `--env-file`.
|
|
88
|
+
|
|
55
89
|
```bash
|
|
56
90
|
tiangong-wiki find --type concept --status active # structured query
|
|
57
91
|
tiangong-wiki fts "Bayesian" # full-text search
|
|
@@ -60,16 +94,17 @@ tiangong-wiki graph bayes-theorem --depth 2 # graph traversal
|
|
|
60
94
|
```
|
|
61
95
|
|
|
62
96
|
```bash
|
|
63
|
-
tiangong-wiki daemon
|
|
97
|
+
tiangong-wiki daemon start # start the daemon in the background
|
|
64
98
|
tiangong-wiki dashboard # open dashboard in browser
|
|
99
|
+
# or: tiangong-wiki daemon run # run the daemon in the foreground for debugging
|
|
65
100
|
```
|
|
66
101
|
|
|
67
|
-
> Environment variables are managed via `.wiki.env` (created by `tiangong-wiki setup`). See [references/
|
|
102
|
+
> Environment variables are managed via `.wiki.env` (created by `tiangong-wiki setup`). The CLI prefers the nearest local `.wiki.env`, then falls back to the global default workspace config. See [references/troubleshooting.md](./references/troubleshooting.md) for the full reference.
|
|
68
103
|
|
|
69
104
|
## CLI
|
|
70
105
|
|
|
71
106
|
```
|
|
72
|
-
Setup setup · doctor · check-config
|
|
107
|
+
Setup setup · skill · doctor · check-config
|
|
73
108
|
Indexing init · sync
|
|
74
109
|
Query find · fts · search · graph
|
|
75
110
|
Inspect list · page-info · stat · lint
|
|
@@ -84,53 +119,7 @@ See [references/cli-interface.md](./references/cli-interface.md) for the full co
|
|
|
84
119
|
|
|
85
120
|
## Architecture
|
|
86
121
|
|
|
87
|
-
|
|
88
|
-
┌──────────────────────────────────────────────────────────┐
|
|
89
|
-
│ Vault (raw input) │
|
|
90
|
-
│ PDFs, docs, notes, bookmarks, clippings │
|
|
91
|
-
└────────────────────────┬─────────────────────────────────┘
|
|
92
|
-
│ vault diff / vault queue
|
|
93
|
-
▼
|
|
94
|
-
┌──────────────────────────────────────────────────────────┐
|
|
95
|
-
│ Agentic Workflow (Codex SDK) │
|
|
96
|
-
│ │
|
|
97
|
-
│ ┌─────────┐ read ┌────────────┐ discover ┌─────┐ │
|
|
98
|
-
│ │ Parser │ ──────► │ tiangong-wiki-skill │ ────────► │ LLM │ │
|
|
99
|
-
│ │ Skills │ source │ find / fts │ + decide │ │ │
|
|
100
|
-
│ └─────────┘ └────────────┘ └─────┘ │
|
|
101
|
-
│ pdf · docx · pptx │
|
|
102
|
-
│ │
|
|
103
|
-
│ → skip / create page / update page / propose only │
|
|
104
|
-
└────────────────────────┬─────────────────────────────────┘
|
|
105
|
-
│ write pages
|
|
106
|
-
▼
|
|
107
|
-
┌──────────────────────────────────────────────────────────┐
|
|
108
|
-
│ Markdown Pages (SSOT) │
|
|
109
|
-
│ wiki/pages/**/*.md │
|
|
110
|
-
└────────────────────────┬─────────────────────────────────┘
|
|
111
|
-
│ tiangong-wiki sync
|
|
112
|
-
▼
|
|
113
|
-
┌──────────────────────────────────────────────────────────┐
|
|
114
|
-
│ SQLite Index (index.db) │
|
|
115
|
-
│ │
|
|
116
|
-
│ pages structured metadata (dynamic columns) │
|
|
117
|
-
│ pages_fts FTS5 full-text search │
|
|
118
|
-
│ vec_pages sqlite-vec vector embeddings │
|
|
119
|
-
│ edges knowledge graph (source → target) │
|
|
120
|
-
└──┬───────────┬───────────┬───────────┬───────────────────┘
|
|
121
|
-
│ │ │ │
|
|
122
|
-
▼ ▼ ▼ ▼
|
|
123
|
-
find fts search graph
|
|
124
|
-
│ │ │ │
|
|
125
|
-
└───────────┴───────────┴───────────┘
|
|
126
|
-
│
|
|
127
|
-
▼
|
|
128
|
-
JSON stdout / HTTP daemon
|
|
129
|
-
│
|
|
130
|
-
┌────────────┴────────────┐
|
|
131
|
-
▼ ▼
|
|
132
|
-
CLI / Scripts Web Dashboard
|
|
133
|
-
```
|
|
122
|
+

|
|
134
123
|
|
|
135
124
|
**Vault → Pages** — Raw materials land in the vault. An agentic workflow reads each file, discovers the current ontology via `tiangong-wiki type list / find / fts`, and decides whether to skip, create, or update a page.
|
|
136
125
|
|
package/README.zh-CN.md
CHANGED
|
@@ -24,6 +24,21 @@
|
|
|
24
24
|
npm install -g @biaoo/tiangong-wiki
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
+
## 更新
|
|
28
|
+
|
|
29
|
+
升级 npm 包本身:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm install -g @biaoo/tiangong-wiki@latest
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
升级 CLI 后,或上游 skill 内容有更新时,刷新工作区本地 managed skills:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
tiangong-wiki skill status
|
|
39
|
+
tiangong-wiki skill update --all
|
|
40
|
+
```
|
|
41
|
+
|
|
27
42
|
<details>
|
|
28
43
|
<summary><strong>作为 AI Agent Skill 使用</strong></summary>
|
|
29
44
|
|
|
@@ -41,17 +56,36 @@ npx skills add Biaoo/tiangong-wiki -a codex -g # 全局安装(跨项目
|
|
|
41
56
|
tiangong-wiki setup
|
|
42
57
|
```
|
|
43
58
|
|
|
59
|
+
如果需要把任意 repo/path 来源的 skill 作为工作区本地 managed skill 管理,可以继续使用:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
tiangong-wiki skill add ../my-skills --skill notes
|
|
63
|
+
tiangong-wiki skill status
|
|
64
|
+
tiangong-wiki skill update notes
|
|
65
|
+
tiangong-wiki skill update --all
|
|
66
|
+
```
|
|
67
|
+
|
|
44
68
|
</details>
|
|
45
69
|
|
|
46
70
|
## 快速开始
|
|
47
71
|
|
|
48
72
|
```bash
|
|
73
|
+
cd /path/to/your/workspace # 在工作区根目录执行命令
|
|
49
74
|
tiangong-wiki setup # 交互式配置向导
|
|
50
75
|
tiangong-wiki doctor # 验证配置
|
|
51
76
|
tiangong-wiki init # 初始化工作区
|
|
52
77
|
tiangong-wiki sync # 索引 Markdown 文件
|
|
53
78
|
```
|
|
54
79
|
|
|
80
|
+
`tiangong-wiki setup` 会创建工作区本地 `.wiki.env`,并将其记录为默认工作区配置。CLI 的配置解析优先级如下:
|
|
81
|
+
|
|
82
|
+
1. `--env-file <path>`
|
|
83
|
+
2. `WIKI_ENV_FILE`
|
|
84
|
+
3. 从当前目录向上查找最近的 `.wiki.env`
|
|
85
|
+
4. `tiangong-wiki setup` 写入的全局默认工作区配置
|
|
86
|
+
|
|
87
|
+
这意味着命令仍然最适合在 workspace 内执行;但 setup 之后,即使在 workspace 外运行,也可以通过默认配置正常工作,或者通过 `--env-file` 显式指定目标工作区。
|
|
88
|
+
|
|
55
89
|
```bash
|
|
56
90
|
tiangong-wiki find --type concept --status active # 结构化查询
|
|
57
91
|
tiangong-wiki fts "贝叶斯" # 全文搜索
|
|
@@ -60,16 +94,17 @@ tiangong-wiki graph bayes-theorem --depth 2 # 图遍历
|
|
|
60
94
|
```
|
|
61
95
|
|
|
62
96
|
```bash
|
|
63
|
-
tiangong-wiki daemon
|
|
97
|
+
tiangong-wiki daemon start # 后台启动 daemon
|
|
64
98
|
tiangong-wiki dashboard # 在浏览器中打开仪表盘
|
|
99
|
+
# 或者:tiangong-wiki daemon run # 前台运行 daemon,适合调试
|
|
65
100
|
```
|
|
66
101
|
|
|
67
|
-
> 环境变量通过 `.wiki.env` 管理(由 `tiangong-wiki setup`
|
|
102
|
+
> 环境变量通过 `.wiki.env` 管理(由 `tiangong-wiki setup` 创建)。CLI 会优先使用最近的本地 `.wiki.env`,找不到时再 fallback 到全局默认工作区配置。完整参考见 [references/troubleshooting.md](./references/troubleshooting.md)。
|
|
68
103
|
|
|
69
104
|
## CLI
|
|
70
105
|
|
|
71
106
|
```
|
|
72
|
-
配置引导 setup · doctor · check-config
|
|
107
|
+
配置引导 setup · skill · doctor · check-config
|
|
73
108
|
索引管理 init · sync
|
|
74
109
|
查询 find · fts · search · graph
|
|
75
110
|
自省 list · page-info · stat · lint
|
|
@@ -84,53 +119,7 @@ Vault vault list | diff | queue
|
|
|
84
119
|
|
|
85
120
|
## 技术架构
|
|
86
121
|
|
|
87
|
-
|
|
88
|
-
┌──────────────────────────────────────────────────────────┐
|
|
89
|
-
│ Vault(原始素材) │
|
|
90
|
-
│ PDF、文档、笔记、书签、剪藏 │
|
|
91
|
-
└────────────────────────┬─────────────────────────────────┘
|
|
92
|
-
│ vault diff / vault queue
|
|
93
|
-
▼
|
|
94
|
-
┌──────────────────────────────────────────────────────────┐
|
|
95
|
-
│ Agentic Workflow(Codex SDK) │
|
|
96
|
-
│ │
|
|
97
|
-
│ ┌─────────┐ 解析 ┌────────────┐ 发现体系 ┌─────┐ │
|
|
98
|
-
│ │ Parser │ ──────► │ tiangong-wiki-skill │ ────────► │ LLM │ │
|
|
99
|
-
│ │ Skills │ 素材 │ find / fts │ + 决策 │ │ │
|
|
100
|
-
│ └─────────┘ └────────────┘ └─────┘ │
|
|
101
|
-
│ pdf · docx · pptx │
|
|
102
|
-
│ │
|
|
103
|
-
│ → 跳过 / 创建页面 / 更新页面 / 仅提议 │
|
|
104
|
-
└────────────────────────┬─────────────────────────────────┘
|
|
105
|
-
│ 写入页面
|
|
106
|
-
▼
|
|
107
|
-
┌──────────────────────────────────────────────────────────┐
|
|
108
|
-
│ Markdown 页面(唯一真实来源) │
|
|
109
|
-
│ wiki/pages/**/*.md │
|
|
110
|
-
└────────────────────────┬─────────────────────────────────┘
|
|
111
|
-
│ tiangong-wiki sync
|
|
112
|
-
▼
|
|
113
|
-
┌──────────────────────────────────────────────────────────┐
|
|
114
|
-
│ SQLite 索引 (index.db) │
|
|
115
|
-
│ │
|
|
116
|
-
│ pages 结构化元数据(动态列) │
|
|
117
|
-
│ pages_fts FTS5 全文搜索 │
|
|
118
|
-
│ vec_pages sqlite-vec 向量嵌入 │
|
|
119
|
-
│ edges 知识图谱(source → target) │
|
|
120
|
-
└──┬───────────┬───────────┬───────────┬───────────────────┘
|
|
121
|
-
│ │ │ │
|
|
122
|
-
▼ ▼ ▼ ▼
|
|
123
|
-
find fts search graph
|
|
124
|
-
│ │ │ │
|
|
125
|
-
└───────────┴───────────┴───────────┘
|
|
126
|
-
│
|
|
127
|
-
▼
|
|
128
|
-
JSON stdout / HTTP daemon
|
|
129
|
-
│
|
|
130
|
-
┌────────────┴────────────┐
|
|
131
|
-
▼ ▼
|
|
132
|
-
CLI / 脚本 Web 仪表盘
|
|
133
|
-
```
|
|
122
|
+

|
|
134
123
|
|
|
135
124
|
**Vault → Pages** — 原始素材进入 vault,Agentic Workflow 逐个阅读,通过 `tiangong-wiki type list / find / fts` 发现当前知识体系,决定跳过、创建或更新页面。
|
|
136
125
|
|
package/SKILL.md
CHANGED
|
@@ -1,116 +1,84 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: tiangong-wiki-skill
|
|
3
|
-
description: "
|
|
3
|
+
description: "Use when you need to retrieve historically accumulated knowledge, methods, or behavioral patterns before answering or acting; when a conversation or workflow produces durable insights worth preserving for future reuse; or when you discover existing wiki content that is outdated or incorrect and needs correction."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Wiki Skill
|
|
7
7
|
|
|
8
8
|
## Core Goal
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
tiangong-wiki
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
## Layer Boundary
|
|
82
|
-
- `SKILL.md` describes the on-demand skill interface used by agents during queries and manual knowledge maintenance.
|
|
83
|
-
- Automatic vault-to-wiki processing, daemon scheduling, queue retries, NAS polling, and workflow artifacts belong to the service layer.
|
|
84
|
-
- Service-layer operations are documented in `references/service-admin.md`.
|
|
85
|
-
|
|
86
|
-
## Environment Contract
|
|
87
|
-
Required:
|
|
88
|
-
- `WIKI_PATH`
|
|
89
|
-
|
|
90
|
-
Optional for semantic retrieval or vector-based type recommendation:
|
|
91
|
-
- `EMBEDDING_BASE_URL`
|
|
92
|
-
- `EMBEDDING_API_KEY`
|
|
93
|
-
- `EMBEDDING_MODEL`
|
|
94
|
-
- `EMBEDDING_DIMENSIONS`
|
|
95
|
-
|
|
96
|
-
Automatic vault processing uses additional `WIKI_AGENT_*` variables, but those belong to the service layer rather than the skill interface. Read `references/service-admin.md` when operating the daemon or queue worker.
|
|
97
|
-
|
|
98
|
-
## Output Contract
|
|
99
|
-
- Query commands return JSON to stdout.
|
|
100
|
-
- Mutating commands return JSON summaries or created file paths to stdout.
|
|
101
|
-
- `lint`, `check-config`, `template list/show`, `type list/show/recommend`, and `daemon status` support text or JSON output where documented.
|
|
102
|
-
- Errors are emitted as structured JSON to stderr with `type=config|runtime|not_found|not_configured`.
|
|
103
|
-
|
|
104
|
-
## References
|
|
105
|
-
- `references/cli-interface.md`
|
|
106
|
-
- `references/data-model.md`
|
|
107
|
-
- `references/template-design-guide.md`
|
|
108
|
-
- `references/runtime.md`
|
|
109
|
-
- `references/env.md`
|
|
110
|
-
- `references/wiki-maintenance-instruction.md`
|
|
111
|
-
- `references/vault-to-wiki-instruction.md`
|
|
112
|
-
- `references/service-admin.md`
|
|
9
|
+
|
|
10
|
+
Use the local wiki as the **durable knowledge layer** — not just for the current conversation, but for all future work. Query first, then read or edit the Markdown files that remain the source of truth.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
Activate this skill in three scenarios:
|
|
15
|
+
|
|
16
|
+
### 1. Knowledge Retrieval
|
|
17
|
+
|
|
18
|
+
You need historical knowledge, methods, behavioral patterns, or prior decisions before answering or acting.
|
|
19
|
+
|
|
20
|
+
**Trigger:** The current task could benefit from previously captured insights, or the user asks about something that may already exist in the wiki.
|
|
21
|
+
|
|
22
|
+
**Minimal steps:**
|
|
23
|
+
1. Choose a retrieval strategy based on what you know:
|
|
24
|
+
- Know the type, tag, or metadata → `tiangong-wiki find`
|
|
25
|
+
- Have a keyword or short phrase → `tiangong-wiki fts`
|
|
26
|
+
- Fuzzy intent, embeddings configured → `tiangong-wiki search`
|
|
27
|
+
- Need graph context or related pages → `tiangong-wiki graph`
|
|
28
|
+
2. Inspect the best candidate with `tiangong-wiki page-info <id>`.
|
|
29
|
+
3. Read the Markdown file if you need full content.
|
|
30
|
+
|
|
31
|
+
**Stop when:** you have enough context to proceed, or no relevant pages exist.
|
|
32
|
+
|
|
33
|
+
### 2. Knowledge Capture
|
|
34
|
+
|
|
35
|
+
A conversation, task, or other skill produced a high-value insight, method, correction, or piece of information worth preserving.
|
|
36
|
+
|
|
37
|
+
**Trigger:** You recognize durable knowledge — something that would be useful to retrieve in a future context.
|
|
38
|
+
|
|
39
|
+
**Two paths:**
|
|
40
|
+
|
|
41
|
+
- **Direct page creation** — when you can clearly identify the page type and structure the content yourself:
|
|
42
|
+
1. Search for existing pages to avoid duplicates (`find`, `fts`, or `search`).
|
|
43
|
+
2. Discover the ontology: `tiangong-wiki type recommend --text "<summary>" --keywords "a,b,c" --format json`.
|
|
44
|
+
3. Update an existing page if one covers the same knowledge object. Create a new page only when the object is distinct.
|
|
45
|
+
4. After writing: `tiangong-wiki sync --path <page-id>` then `tiangong-wiki lint --path <page-id> --format json`.
|
|
46
|
+
|
|
47
|
+
- **Save to vault** — when the material is raw, complex, or needs further processing:
|
|
48
|
+
1. Save the file to `vault/`.
|
|
49
|
+
2. The vault-to-wiki workflow will handle triage and page creation.
|
|
50
|
+
3. See `references/vault-to-wiki-instruction.md` for the full decision model.
|
|
51
|
+
|
|
52
|
+
**Key rules:**
|
|
53
|
+
- Do not assume any page type is the default destination. Always discover via CLI.
|
|
54
|
+
- Prefer updating the best existing page over creating near-duplicates.
|
|
55
|
+
- Only use frontmatter fields declared by the chosen type (`tiangong-wiki type show <type>`). Do not invent ad-hoc fields.
|
|
56
|
+
- Preserve provenance with `sourceRefs` and type-specific source fields.
|
|
57
|
+
|
|
58
|
+
### 3. Knowledge Maintenance
|
|
59
|
+
|
|
60
|
+
You discover that existing wiki content is outdated, incorrect, or incomplete during retrieval or conversation.
|
|
61
|
+
|
|
62
|
+
**Trigger:** A retrieved page contains stale information, or new evidence contradicts existing content.
|
|
63
|
+
|
|
64
|
+
**Minimal steps:**
|
|
65
|
+
1. Locate the page: `tiangong-wiki find` or `tiangong-wiki page-info <id>`.
|
|
66
|
+
2. Edit the Markdown file — keep edits minimal and provenance-preserving.
|
|
67
|
+
3. After editing: `tiangong-wiki sync --path <page-id>` then `tiangong-wiki lint --path <page-id> --format json`.
|
|
68
|
+
|
|
69
|
+
**For systematic maintenance** (health checks, orphan cleanup, stale content review), see `references/wiki-maintenance-instruction.md`.
|
|
70
|
+
|
|
71
|
+
## References (read on demand)
|
|
72
|
+
|
|
73
|
+
| Document | Read when... |
|
|
74
|
+
|----------|-------------|
|
|
75
|
+
| `references/cli-interface.md` | You need full command options, flags, or output format details |
|
|
76
|
+
| `references/vault-to-wiki-instruction.md` | Processing vault files into wiki pages |
|
|
77
|
+
| `references/wiki-maintenance-instruction.md` | Running systematic maintenance or health checks |
|
|
78
|
+
| `references/template-design-guide.md` | Designing a new page type or evolving an existing template |
|
|
79
|
+
| `references/troubleshooting.md` | Environment setup, configuration issues, or error diagnosis |
|
|
113
80
|
|
|
114
81
|
## Assets
|
|
115
|
-
|
|
116
|
-
- `assets/
|
|
82
|
+
|
|
83
|
+
- `assets/wiki.config.default.json` — default configuration template
|
|
84
|
+
- `assets/templates/` — Markdown page templates for each registered type
|
|
@@ -15,18 +15,18 @@ issuer:
|
|
|
15
15
|
verifiable: "yes"
|
|
16
16
|
---
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## What
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
State the achievement in one factual sentence. Include the scope, level, and issuing context. Do not editorialize — let the facts speak.
|
|
21
21
|
|
|
22
|
-
##
|
|
22
|
+
## How
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
Describe the key steps, investment, and challenges involved in earning this achievement. Focus on what is quantifiable or verifiable: duration, scale, constraints overcome. Do not write a narrative essay.
|
|
25
25
|
|
|
26
|
-
##
|
|
26
|
+
## Demonstrated Capabilities
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
List the specific capabilities this achievement provides evidence for. Use terms that other pages (resume, person) can reference. Think of this as a reusable capability tag set.
|
|
29
29
|
|
|
30
|
-
##
|
|
30
|
+
## Evidence
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
Provide verifiable proof: certificate links, publication URLs, official records, screenshots, or third-party references. If the achievement claims to be verifiable (frontmatter `verifiable: "yes"`), this section must contain at least one checkable item.
|
|
@@ -16,18 +16,18 @@ fromConcepts: []
|
|
|
16
16
|
toConcepts: []
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## Source Knowledge
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Identify the origin domain, course, or knowledge system. Link to existing concept or method pages that represent the source-side knowledge being transferred. When a source-side concept already has a node in the wiki, record its nodeId in frontmatter `fromConcepts` instead of leaving the mapping only in prose.
|
|
22
22
|
|
|
23
|
-
##
|
|
23
|
+
## Target Scenario
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
Describe the target problem, domain, or context where the source knowledge is being applied. State the constraints and requirements specific to the target that make direct transfer non-trivial.
|
|
26
26
|
|
|
27
|
-
##
|
|
27
|
+
## Transfer Mapping
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
Describe how each source-side concept or method maps to its target-side equivalent. Use explicit A → B mappings where possible. For each mapping, note what adapts cleanly and what requires modification. Use the body to explain the mapping, and keep `fromConcepts` / `toConcepts` in sync for the key nodes so the graph retains the structure.
|
|
30
30
|
|
|
31
|
-
##
|
|
31
|
+
## Invalid Transfers
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
State the conditions under which this bridge breaks down. Which assumptions from the source domain do not hold in the target? What would go wrong if the transfer were applied without these caveats?
|
|
@@ -14,34 +14,30 @@ masteryLevel: medium
|
|
|
14
14
|
prerequisites: []
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
-
##
|
|
17
|
+
## Definition
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Provide a precise, quotable definition of this concept. A reader should be able to cite this section without additional context. Do not write an introductory paragraph — write the definition.
|
|
20
20
|
|
|
21
|
-
##
|
|
21
|
+
## Prerequisites
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
List the concepts, terms, or background knowledge required to understand this one. Link to existing wiki pages where possible.
|
|
24
24
|
|
|
25
|
-
##
|
|
25
|
+
## Formal Specification
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
Write the key formulas, criteria, thresholds, or formal rules that define this concept's behavior. If the concept has no formal specification, describe the decision boundary — under what conditions does something qualify as this concept vs. not?
|
|
28
28
|
|
|
29
|
-
##
|
|
29
|
+
## Intuition & Analogy
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
Provide one mental model, analogy, or worked example that builds correct intuition quickly. Prefer concrete examples over abstract explanations.
|
|
32
32
|
|
|
33
|
-
##
|
|
33
|
+
## Typical Applications
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
Name specific problems, project types, or domains where this concept is actively used. Do not list hypothetical uses — list real or well-documented ones.
|
|
36
36
|
|
|
37
|
-
##
|
|
37
|
+
## Boundary & Confusion
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
State what this concept is most easily confused with, and the specific test or criterion that distinguishes them. Do not just say "they are different" — describe what input or situation would produce a different outcome under each.
|
|
40
40
|
|
|
41
|
-
##
|
|
41
|
+
## Open Questions
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
## 来源
|
|
46
|
-
|
|
47
|
-
说明这个概念主要来自哪些来源,并确保这些来源同步写入 frontmatter 的 sourceRefs。
|
|
43
|
+
Record what remains unclear, what edge cases are unresolved, or what further investigation is needed. This section is expected to shrink as confidence increases.
|
package/assets/templates/faq.md
CHANGED
|
@@ -12,20 +12,18 @@ updatedAt: 2026-04-06
|
|
|
12
12
|
frequency:
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## Question
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Write the question in the exact phrasing a real person would use. Do not abstract, rephrase, or make it sound formal — preserve the natural language of the asker.
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## Quick Answer
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Provide a self-contained answer in 2-3 sentences that can be directly reused in a reply. It must be correct and complete enough to stand alone without reading further.
|
|
22
22
|
|
|
23
|
-
##
|
|
23
|
+
## Full Explanation
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
Expand with conditions, exceptions, edge cases, and examples. Explain why the quick answer is correct and under what circumstances it might not apply.
|
|
26
26
|
|
|
27
|
-
##
|
|
27
|
+
## Related Pages
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
如果这个问题已经不再高频,也请在正文里说明是否应该降级维护或归档。
|
|
29
|
+
Link to concept, method, or source-summary pages that provide deeper context. Use relatedPages frontmatter to keep these connections in the graph.
|
|
@@ -14,18 +14,18 @@ severity: medium
|
|
|
14
14
|
actionable: "yes"
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
-
##
|
|
17
|
+
## Event
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Describe what happened — only the facts that are necessary to understand the lesson. Do not write a chronological narrative; keep only the causal chain that led to the outcome.
|
|
20
20
|
|
|
21
|
-
##
|
|
21
|
+
## Stable Rule
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
State the durable insight extracted from this event. This should be a general rule or principle that applies beyond this specific incident. If you cannot state it as a rule, reconsider whether this is truly a lesson or just an event record.
|
|
24
24
|
|
|
25
|
-
##
|
|
25
|
+
## Action Protocol
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
Write the concrete actions, checklist items, or decision rules to follow when a similar situation arises. Each item should be executable — "be more careful" is not an action.
|
|
28
28
|
|
|
29
|
-
##
|
|
29
|
+
## Verification
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
Describe how you would test whether this lesson actually improves outcomes. What would you measure? What would indicate the lesson was applied correctly vs. ignored?
|