@optima-chat/optima-agent 0.8.98 → 0.8.99
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/.claude/settings.local.json +166 -0
- package/.claude/skills/.kb-skills-managed.json +9 -0
- package/.claude/skills/ingesting-sources/SKILL.md +76 -0
- package/.claude/skills/initializing-kb/SKILL.md +102 -0
- package/.claude/skills/kol-outreach/SKILL.md +351 -272
- package/.claude/skills/linting-the-wiki/SKILL.md +69 -0
- package/.claude/skills/querying-the-wiki/SKILL.md +66 -0
- package/.claude/skills/updating-related-pages/SKILL.md +76 -0
- package/dist/bin/bi-cli.js +0 -0
- package/dist/bin/browser-cli.js +0 -0
- package/dist/bin/comfy.d.ts +3 -0
- package/dist/bin/comfy.d.ts.map +1 -0
- package/dist/bin/comfy.js +3 -0
- package/dist/bin/comfy.js.map +1 -0
- package/dist/bin/commerce.js +0 -0
- package/dist/bin/gen.js +0 -0
- package/dist/bin/google-ads.js +0 -0
- package/dist/bin/growth.d.ts +3 -0
- package/dist/bin/growth.d.ts.map +1 -0
- package/dist/bin/growth.js +3 -0
- package/dist/bin/growth.js.map +1 -0
- package/dist/bin/logistics.js +0 -0
- package/dist/bin/optima.js +0 -0
- package/dist/bin/scout.js +0 -0
- package/dist/bin/sentinel.js +0 -0
- package/dist/bin/shopify.js +0 -0
- package/dist/bin/sync-kb-skills.d.ts +6 -0
- package/dist/bin/sync-kb-skills.d.ts.map +1 -0
- package/dist/bin/sync-kb-skills.js +65 -0
- package/dist/bin/sync-kb-skills.js.map +1 -0
- package/dist/src/hooks-loader.d.ts +6 -0
- package/dist/src/hooks-loader.d.ts.map +1 -0
- package/dist/src/hooks-loader.js +215 -0
- package/dist/src/hooks-loader.js.map +1 -0
- package/dist/src/ui/App.d.ts +6 -0
- package/dist/src/ui/App.d.ts.map +1 -0
- package/dist/src/ui/App.js +164 -0
- package/dist/src/ui/App.js.map +1 -0
- package/dist/src/ui/components/Composer.d.ts +10 -0
- package/dist/src/ui/components/Composer.d.ts.map +1 -0
- package/dist/src/ui/components/Composer.js +13 -0
- package/dist/src/ui/components/Composer.js.map +1 -0
- package/dist/src/ui/components/Header.d.ts +7 -0
- package/dist/src/ui/components/Header.d.ts.map +1 -0
- package/dist/src/ui/components/Header.js +7 -0
- package/dist/src/ui/components/Header.js.map +1 -0
- package/dist/src/ui/components/Message.d.ts +12 -0
- package/dist/src/ui/components/Message.d.ts.map +1 -0
- package/dist/src/ui/components/Message.js +21 -0
- package/dist/src/ui/components/Message.js.map +1 -0
- package/dist/src/ui/components/MessageList.d.ts +9 -0
- package/dist/src/ui/components/MessageList.d.ts.map +1 -0
- package/dist/src/ui/components/MessageList.js +18 -0
- package/dist/src/ui/components/MessageList.js.map +1 -0
- package/dist/src/ui/components/Spinner.d.ts +6 -0
- package/dist/src/ui/components/Spinner.d.ts.map +1 -0
- package/dist/src/ui/components/Spinner.js +7 -0
- package/dist/src/ui/components/Spinner.js.map +1 -0
- package/dist/src/ui/components/StatusBar.d.ts +11 -0
- package/dist/src/ui/components/StatusBar.d.ts.map +1 -0
- package/dist/src/ui/components/StatusBar.js +7 -0
- package/dist/src/ui/components/StatusBar.js.map +1 -0
- package/dist/src/ui/components/index.d.ts +7 -0
- package/dist/src/ui/components/index.d.ts.map +1 -0
- package/dist/src/ui/components/index.js +7 -0
- package/dist/src/ui/components/index.js.map +1 -0
- package/dist/src/validation/error-formatter.d.ts +21 -0
- package/dist/src/validation/error-formatter.d.ts.map +1 -0
- package/dist/src/validation/error-formatter.js +98 -0
- package/dist/src/validation/error-formatter.js.map +1 -0
- package/dist/src/validation/index.d.ts +10 -0
- package/dist/src/validation/index.d.ts.map +1 -0
- package/dist/src/validation/index.js +10 -0
- package/dist/src/validation/index.js.map +1 -0
- package/dist/src/validation/json-validator.d.ts +25 -0
- package/dist/src/validation/json-validator.d.ts.map +1 -0
- package/dist/src/validation/json-validator.js +173 -0
- package/dist/src/validation/json-validator.js.map +1 -0
- package/dist/src/validation/schema.d.ts +353 -0
- package/dist/src/validation/schema.d.ts.map +1 -0
- package/dist/src/validation/schema.js +57 -0
- package/dist/src/validation/schema.js.map +1 -0
- package/dist/src/validation/suggestions.d.ts +25 -0
- package/dist/src/validation/suggestions.d.ts.map +1 -0
- package/dist/src/validation/suggestions.js +144 -0
- package/dist/src/validation/suggestions.js.map +1 -0
- package/dist/src/validation/types.d.ts +40 -0
- package/dist/src/validation/types.d.ts.map +1 -0
- package/dist/src/validation/types.js +5 -0
- package/dist/src/validation/types.js.map +1 -0
- package/dist/src/validation/yaml-validator.d.ts +25 -0
- package/dist/src/validation/yaml-validator.d.ts.map +1 -0
- package/dist/src/validation/yaml-validator.js +177 -0
- package/dist/src/validation/yaml-validator.js.map +1 -0
- package/package.json +5 -3
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(gh api:*)",
|
|
5
|
+
"WebFetch(domain:platform.claude.com)",
|
|
6
|
+
"Bash(git init:*)",
|
|
7
|
+
"Bash(mkdir:*)",
|
|
8
|
+
"Bash(npm run typecheck:*)",
|
|
9
|
+
"Bash(npm view:*)",
|
|
10
|
+
"WebSearch",
|
|
11
|
+
"Bash(commerce --help)",
|
|
12
|
+
"Bash(done)",
|
|
13
|
+
"Bash(commerce product:*)",
|
|
14
|
+
"Bash(commerce order:*)",
|
|
15
|
+
"Bash(commerce i18n:*)",
|
|
16
|
+
"Bash(google-ads:*)",
|
|
17
|
+
"Bash(scout --help:*)",
|
|
18
|
+
"Bash(tree:*)",
|
|
19
|
+
"Bash(cloc:*)",
|
|
20
|
+
"Bash(npm run build:*)",
|
|
21
|
+
"Bash(git restore:*)",
|
|
22
|
+
"Bash(gh repo view:*)",
|
|
23
|
+
"Bash(mv:*)",
|
|
24
|
+
"Bash(rmdir:*)",
|
|
25
|
+
"Bash(git add:*)",
|
|
26
|
+
"Bash(git commit:*)",
|
|
27
|
+
"Bash(git push)",
|
|
28
|
+
"Bash(timeout 5 npm run optima:*)",
|
|
29
|
+
"Bash(npm install:*)",
|
|
30
|
+
"Bash(cat:*)",
|
|
31
|
+
"Bash(gh issue create:*)",
|
|
32
|
+
"Bash(npx tsx:*)",
|
|
33
|
+
"Bash(timeout 30 npx tsx:*)",
|
|
34
|
+
"Bash(git push origin feature/ask-user-question)",
|
|
35
|
+
"Bash(node:*)",
|
|
36
|
+
"Bash(npm version:*)",
|
|
37
|
+
"Bash(git push:*)",
|
|
38
|
+
"Bash(npm publish:*)",
|
|
39
|
+
"Bash(pkill:*)",
|
|
40
|
+
"Bash(git -C /Users/verypro/optima-agent log --oneline --all -- \".claude/\")",
|
|
41
|
+
"Bash(wc:*)",
|
|
42
|
+
"Bash(grep:*)",
|
|
43
|
+
"Bash(find:*)",
|
|
44
|
+
"Bash(commerce collection --help:*)",
|
|
45
|
+
"Bash(commerce collection update --help:*)",
|
|
46
|
+
"Bash(commerce collection set-cover:*)",
|
|
47
|
+
"Bash(commerce collection get --help:*)",
|
|
48
|
+
"Bash(commerce collection list --help:*)",
|
|
49
|
+
"Bash(commerce collection create --help:*)",
|
|
50
|
+
"Bash(commerce collection remove-products:*)",
|
|
51
|
+
"Bash(commerce collection list-products:*)",
|
|
52
|
+
"Bash(commerce --version:*)",
|
|
53
|
+
"Bash(bi-cli --version:*)",
|
|
54
|
+
"Bash(commerce homepage create --help:*)",
|
|
55
|
+
"Bash(commerce homepage reorder --help:*)",
|
|
56
|
+
"Bash(commerce homepage delete --help:*)",
|
|
57
|
+
"Bash(commerce homepage update-images:*)",
|
|
58
|
+
"Bash(commerce homepage update-collections:*)",
|
|
59
|
+
"Bash(commerce homepage update-target:*)",
|
|
60
|
+
"Bash(commerce homepage switch-template:*)",
|
|
61
|
+
"Bash(commerce inventory:*)",
|
|
62
|
+
"Bash(commerce merchant:*)",
|
|
63
|
+
"Bash(commerce review:*)",
|
|
64
|
+
"Bash(commerce product-page:*)",
|
|
65
|
+
"Bash(bi-cli:*)",
|
|
66
|
+
"Bash(comfy:*)",
|
|
67
|
+
"Bash(scout search:*)",
|
|
68
|
+
"Bash(scout product:*)",
|
|
69
|
+
"Bash(commerce homepage create-collections:*)",
|
|
70
|
+
"Bash(commerce homepage create-featured:*)",
|
|
71
|
+
"Bash(commerce homepage create-collection-products:*)",
|
|
72
|
+
"Bash(commerce homepage create-banner:*)",
|
|
73
|
+
"Bash(xargs -I {} sh -c 'echo \"\"\"\"=== {} ===\"\"\"\"; head -3 /Users/verypro/optima-agent/.claude/skills/{}/SKILL.md | grep \"\"\"\"name:\"\"\"\"')",
|
|
74
|
+
"Bash(ls:*)",
|
|
75
|
+
"Bash(gh issue view:*)",
|
|
76
|
+
"Bash(npx markdownlint-cli:*)",
|
|
77
|
+
"Bash(chmod:*)",
|
|
78
|
+
"Bash(npm whoami:*)",
|
|
79
|
+
"Bash(tsx test-scripts/test-headless-progress.ts:*)",
|
|
80
|
+
"Bash(DEBUG_STREAM=1 node dist/bin/optima.js:*)",
|
|
81
|
+
"Bash(git describe:*)",
|
|
82
|
+
"WebFetch(domain:github.com)",
|
|
83
|
+
"Bash(./scripts/test-headless.sh:*)",
|
|
84
|
+
"Bash(./scripts/test-headless-simple.sh:*)",
|
|
85
|
+
"Bash(env)",
|
|
86
|
+
"Bash(gh pr list:*)",
|
|
87
|
+
"Bash(gh pr view:*)",
|
|
88
|
+
"Bash(gh pr diff:*)",
|
|
89
|
+
"Bash(optima --version:*)",
|
|
90
|
+
"Bash(optima agent headless:*)",
|
|
91
|
+
"Bash(optima headless:*)",
|
|
92
|
+
"Bash(/Users/verypro/optima-agent/scripts/test-headless.sh:*)",
|
|
93
|
+
"Bash(/Users/verypro/optima-agent/scripts/test-headless-simple.sh:*)",
|
|
94
|
+
"Bash(tee:*)",
|
|
95
|
+
"Bash(CONV_ID=\"conv-1\":*)",
|
|
96
|
+
"Bash(echo:*)",
|
|
97
|
+
"Bash(scout tiktok trending --help:*)",
|
|
98
|
+
"Bash(scout tiktok trending:*)",
|
|
99
|
+
"Bash(git checkout:*)",
|
|
100
|
+
"Bash(npm test:*)",
|
|
101
|
+
"Bash(git tag:*)",
|
|
102
|
+
"Bash(/private/tmp/claude/-Users-verypro-optima-agent/68a9ac2c-def2-44e1-b42b-e53bd9022ab6/scratchpad/test-canUseTool.sh)",
|
|
103
|
+
"Bash(optima --help:*)",
|
|
104
|
+
"Bash(npx @optima-chat/ads-cli:*)",
|
|
105
|
+
"Bash(head:*)",
|
|
106
|
+
"Bash(git pull:*)",
|
|
107
|
+
"Bash(pnpm build:*)",
|
|
108
|
+
"Skill(read-code)",
|
|
109
|
+
"Bash(npm run cli:*)",
|
|
110
|
+
"Bash(scout:*)",
|
|
111
|
+
"WebFetch(domain:docs.scrapecreators.com)",
|
|
112
|
+
"WebFetch(domain:scrapecreators.com)",
|
|
113
|
+
"Bash(gh auth status:*)",
|
|
114
|
+
"Bash(optima-agent:*)",
|
|
115
|
+
"Bash(python3:*)",
|
|
116
|
+
"Bash(python3 -c \" import sys content = sys.stdin.read\\(\\) # Find flushMessageQueueSync idx = content.find\\(''flushMessageQueueSync''\\) # Get context around it lines = content.split\\(''\\\\n''\\) for i, line in enumerate\\(lines\\): if ''flushMessageQueueSync'' in line and ''private'' in line: for j in range\\(i, min\\(i+20, len\\(lines\\)\\)\\): print\\(f''{j+1}: {lines[j]}''\\) break \")",
|
|
117
|
+
"Bash(optima:*)",
|
|
118
|
+
"WebFetch(domain:www.npmjs.com)",
|
|
119
|
+
"WebFetch(domain:registry.npmjs.org)",
|
|
120
|
+
"WebFetch(domain:zod.dev)",
|
|
121
|
+
"Bash(npm ls:*)",
|
|
122
|
+
"Bash(NODE_DEBUG=child_process npx tsx:*)",
|
|
123
|
+
"Bash(DEBUG_CLAUDE_AGENT_SDK=1 npx tsx:*)",
|
|
124
|
+
"Bash(CLAUDECODE= npx tsx:*)",
|
|
125
|
+
"Bash(env:*)",
|
|
126
|
+
"Bash(gh release:*)",
|
|
127
|
+
"Bash(npm info:*)",
|
|
128
|
+
"Bash(gh run:*)",
|
|
129
|
+
"Bash(gtimeout 90:*)",
|
|
130
|
+
"Bash(sentinel:*)",
|
|
131
|
+
"Bash(gh pr:*)",
|
|
132
|
+
"Bash(git fetch:*)",
|
|
133
|
+
"Bash(git log:*)",
|
|
134
|
+
"Bash(npm bin:*)",
|
|
135
|
+
"Bash(git status:*)",
|
|
136
|
+
"Bash(browser-cli --version && browser-cli --help)",
|
|
137
|
+
"Bash(browser-cli status:*)",
|
|
138
|
+
"Bash(browser-cli launch:*)",
|
|
139
|
+
"Bash(browser-cli screenshot:*)",
|
|
140
|
+
"Bash(browser-cli --version)",
|
|
141
|
+
"Bash(browser-cli close:*)",
|
|
142
|
+
"Bash(npm update:*)",
|
|
143
|
+
"Bash(node -e \"console.log\\(require\\('./node_modules/@optima-chat/browser-cli/package.json'\\).version\\)\")",
|
|
144
|
+
"WebFetch(domain:raw.githubusercontent.com)",
|
|
145
|
+
"Bash(aws ecs:*)",
|
|
146
|
+
"Bash(aws ecr:*)",
|
|
147
|
+
"Bash(gh search:*)",
|
|
148
|
+
"Bash(npx tsc:*)",
|
|
149
|
+
"Bash(find /Users/verypro/optima-agent -path */node_modules -prune -o -type f \\\\\\(-name *comfy* -o -name *gen* \\\\\\) -print)",
|
|
150
|
+
"Bash(export PATH=\"/usr/local/bin:$PATH\")",
|
|
151
|
+
"Bash(pnpm add:*)",
|
|
152
|
+
"Bash(cp -r ~/optima-agent/test/skills/kol-outreach/fixtures/one-active-campaign ~/optima-agent/test/skills/kol-outreach/fixtures/max-rounds-hit)",
|
|
153
|
+
"Bash(cp -r ~/optima-agent/test/skills/kol-outreach/fixtures/one-active-campaign ~/optima-agent/test/skills/kol-outreach/fixtures/budget-almost-spent)",
|
|
154
|
+
"Bash(cp -r ~/optima-agent/test/skills/kol-outreach/fixtures/one-active-campaign ~/optima-agent/test/skills/kol-outreach/fixtures/two-active-campaigns)",
|
|
155
|
+
"Bash(cp -r ~/optima-agent/test/skills/kol-outreach/fixtures/one-active-campaign ~/optima-agent/test/skills/kol-outreach/fixtures/brand-only)",
|
|
156
|
+
"Bash(pnpm vitest:*)",
|
|
157
|
+
"Bash(pnpm test:*)",
|
|
158
|
+
"Bash(pnpm --filter @optima-scout/backend test --reporter=verbose backend/src/routes/outreach/__tests__/lock.test.ts backend/src/routes/outreach/__tests__/inbound.test.ts)",
|
|
159
|
+
"Bash(npx vitest:*)",
|
|
160
|
+
"Bash(DATABASE_URL=postgres://optima_scout:optima_scout_dev@localhost:7293/optima_scout pnpm --filter @optima-scout/backend test)",
|
|
161
|
+
"Bash(pnpm --filter @optima-scout/backend exec vitest run src/routes/outreach/__tests__/inbound.test.ts)"
|
|
162
|
+
],
|
|
163
|
+
"deny": [],
|
|
164
|
+
"ask": []
|
|
165
|
+
}
|
|
166
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ingesting-sources
|
|
3
|
+
description: Use when new source material needs to be incorporated into a maintained knowledge base.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Ingesting Sources
|
|
7
|
+
|
|
8
|
+
这个 skill 负责把原始材料做第一次落库,进入持续维护的 wiki 结构。它的产物不只是摘要,而是一页来源页,以及一份清晰的“还有哪些页面需要随之更新”的映射。
|
|
9
|
+
|
|
10
|
+
## 职责
|
|
11
|
+
|
|
12
|
+
- 从 `raw/` 读取新来源
|
|
13
|
+
- 在 `wiki/sources/` 中创建或更新对应页面
|
|
14
|
+
- 抽取关键事实、实体和主题
|
|
15
|
+
- 标出 wiki 其他位置中受影响的页面
|
|
16
|
+
|
|
17
|
+
## 不负责
|
|
18
|
+
|
|
19
|
+
- 全量维护性清理
|
|
20
|
+
- 泛化问答
|
|
21
|
+
|
|
22
|
+
## 工作规则
|
|
23
|
+
|
|
24
|
+
来源页不仅要说明来源说了什么,还要说明它会如何影响 wiki 的其他部分。
|
|
25
|
+
|
|
26
|
+
## 流程
|
|
27
|
+
|
|
28
|
+
使用这个 skill 时,按以下顺序进行:
|
|
29
|
+
|
|
30
|
+
1. 在 `raw/` 中定位来源文件
|
|
31
|
+
2. 仔细阅读来源,提取主要论点、证据、实体和开放问题
|
|
32
|
+
3. 在 `wiki/sources/` 中创建或更新对应页面
|
|
33
|
+
4. 列出哪些 entity、overview 和 analysis 页面受到影响
|
|
34
|
+
5. 如果任务范围包含来源页之外的更新,就交给 `updating-related-pages` 的行为处理,或执行一次有边界的相关页更新
|
|
35
|
+
6. 如果这个来源是首次进入 wiki,则更新 `index.md` 和 `log.md`
|
|
36
|
+
|
|
37
|
+
## 来源页内容
|
|
38
|
+
|
|
39
|
+
除非仓库已经有更强的既有格式,否则来源页应至少包含:
|
|
40
|
+
|
|
41
|
+
- 来源标题
|
|
42
|
+
- 简短摘要
|
|
43
|
+
- 关键论点
|
|
44
|
+
- 关键证据或观察
|
|
45
|
+
- 相关实体、主题或概念
|
|
46
|
+
- 对既有理解产生的冲突、修正或压力
|
|
47
|
+
- 指向受影响页面的链接
|
|
48
|
+
|
|
49
|
+
## 抽取规则
|
|
50
|
+
|
|
51
|
+
在 ingest 过程中:
|
|
52
|
+
|
|
53
|
+
- 将来源明确表达的内容与你自己的综合推断区分开
|
|
54
|
+
- 不要把大段原文直接复制进 wiki
|
|
55
|
+
- 优先写成简洁、可链接、之后可更新的陈述
|
|
56
|
+
- 当来源含混或不完整时,显式记录不确定性
|
|
57
|
+
- 遇到冲突要记录,不要静默抹平
|
|
58
|
+
|
|
59
|
+
## 何时创建相关页面
|
|
60
|
+
|
|
61
|
+
在 ingest 过程中,出现下列情况时应建议新建页面:
|
|
62
|
+
|
|
63
|
+
- 某个人、组织、产品或概念很重要,但还没有稳定页面
|
|
64
|
+
- 来源引入了一个新的 recurring topic
|
|
65
|
+
- 来源实质性改变了某个既有 overview
|
|
66
|
+
- 形成的综合结果已经明显值得进入 `wiki/analyses/`
|
|
67
|
+
|
|
68
|
+
## 最小交付标准
|
|
69
|
+
|
|
70
|
+
一次成功的 ingest 至少应留下:
|
|
71
|
+
|
|
72
|
+
- 一页可用的 `wiki/sources/` 页面
|
|
73
|
+
- 一份清晰的受影响页面列表
|
|
74
|
+
- 足够明确的结构,使下一步 update 很自然
|
|
75
|
+
|
|
76
|
+
如果 ingest 最终只留下了一段模糊摘要,而没有连到 wiki 的其他部分,那它就是不完整的。
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: initializing-kb
|
|
3
|
+
description: Use when creating a new markdown-based knowledge base, or when an existing repository needs to be turned into a structured knowledge base with clear page types and maintenance rules.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Initializing KB
|
|
7
|
+
|
|
8
|
+
这个 skill 用来定义一个基于 Markdown 的知识库的运行契约。它的主要产物是一份可用的 `AGENTS.md`,以及少量与之匹配的模板调整,使仓库真正可维护。
|
|
9
|
+
|
|
10
|
+
## 职责
|
|
11
|
+
|
|
12
|
+
- 定义页面类型
|
|
13
|
+
- 定义命名约定
|
|
14
|
+
- 定义 ingest、query 和 lint 工作流
|
|
15
|
+
- 创建或更新 `AGENTS.md`
|
|
16
|
+
|
|
17
|
+
## 不负责
|
|
18
|
+
|
|
19
|
+
- ingest 具体来源
|
|
20
|
+
- 大范围 wiki 维护
|
|
21
|
+
|
|
22
|
+
## 工作规则
|
|
23
|
+
|
|
24
|
+
优先使用少量、边界清晰的页面类型,而不是难以维护的深层目录体系。
|
|
25
|
+
|
|
26
|
+
## 流程
|
|
27
|
+
|
|
28
|
+
使用这个 skill 时,按以下顺序进行:
|
|
29
|
+
|
|
30
|
+
1. 检查当前仓库布局
|
|
31
|
+
2. 确认 `raw/`、`wiki/`、`index.md`、`log.md` 和 `AGENTS.md` 是否已经存在
|
|
32
|
+
3. 判断现有结构是可小修复用,还是需要更强约束的重整
|
|
33
|
+
4. 定义这个仓库所需的最小页面类型集合
|
|
34
|
+
5. 编写或更新 `AGENTS.md`
|
|
35
|
+
6. 做少量与规则匹配的模板调整,保证仓库布局和规则一致
|
|
36
|
+
|
|
37
|
+
除非知识库规模和内容已经明确需要,否则不要发明庞大的分类体系。
|
|
38
|
+
|
|
39
|
+
## 默认结构
|
|
40
|
+
|
|
41
|
+
除非仓库已经有更成熟的既有结构,否则优先采用这个默认形态:
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
raw/
|
|
45
|
+
wiki/
|
|
46
|
+
overview/
|
|
47
|
+
entities/
|
|
48
|
+
sources/
|
|
49
|
+
analyses/
|
|
50
|
+
index.md
|
|
51
|
+
log.md
|
|
52
|
+
AGENTS.md
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## 页面模型
|
|
56
|
+
|
|
57
|
+
默认页面职责如下:
|
|
58
|
+
|
|
59
|
+
- `wiki/sources/`:每个来源一页
|
|
60
|
+
- `wiki/entities/`:每个跨多个来源反复出现的稳定实体或概念一页
|
|
61
|
+
- `wiki/overview/`:每个主题或认知领域一页
|
|
62
|
+
- `wiki/analyses/`:长期有效的答案、比较、综合或决策记录
|
|
63
|
+
|
|
64
|
+
避免混淆这些角色。来源页不应同时承担某个概念的长期实体页职责,分析页也不应取代主题综述页。
|
|
65
|
+
|
|
66
|
+
## 命名规则
|
|
67
|
+
|
|
68
|
+
优先使用可预测的命名:
|
|
69
|
+
|
|
70
|
+
- 来源页:`YYYY-MM-DD-short-source-name.md`
|
|
71
|
+
- 分析页:`YYYY-MM-DD-short-analysis-name.md`
|
|
72
|
+
- 实体页:`kebab-case-entity-name.md`
|
|
73
|
+
- 综述页:`kebab-case-topic-name.md`
|
|
74
|
+
|
|
75
|
+
统一优先使用 ISO 日期和 kebab-case。
|
|
76
|
+
|
|
77
|
+
## `AGENTS.md` 必须定义什么
|
|
78
|
+
|
|
79
|
+
至少应包含:
|
|
80
|
+
|
|
81
|
+
- 仓库目标
|
|
82
|
+
- `raw/` 的 source-of-truth 规则
|
|
83
|
+
- 页面类型及其职责
|
|
84
|
+
- ingest 工作流
|
|
85
|
+
- query 工作流
|
|
86
|
+
- lint 工作流
|
|
87
|
+
- 编辑规则
|
|
88
|
+
- 命名约定
|
|
89
|
+
- 何时应新建页面,而不是继续扩写旧页
|
|
90
|
+
- agent 修改后的输出要求
|
|
91
|
+
|
|
92
|
+
## 好的结果
|
|
93
|
+
|
|
94
|
+
一个好的 schema 应该让这些决策变得容易:
|
|
95
|
+
|
|
96
|
+
- 新来源应该落到哪里
|
|
97
|
+
- 一个概念什么时候值得拥有独立实体页
|
|
98
|
+
- 一个高价值答案应该写回哪里
|
|
99
|
+
- 冲突信息应如何呈现
|
|
100
|
+
- 之后如何再次找到这些页面
|
|
101
|
+
|
|
102
|
+
如果更新完 `AGENTS.md` 之后这些决策仍然模糊,说明 schema 还没有完成。
|