@clawos-dev/clawd 0.2.50-beta.77.3a9364e → 0.2.51-beta.78.2024c11

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.
Files changed (41) hide show
  1. package/dist/persona-defaults/persona-clawd-helper/CLAUDE.md +1 -1
  2. package/dist/persona-defaults/persona-knowledge-base/CLAUDE.md +19 -0
  3. package/dist/persona-defaults/persona-researcher/CLAUDE.md +20 -1
  4. package/package.json +1 -1
  5. package/dist/persona-defaults/persona-knowledge-base/.claude/skills/karpathy-llm-wiki/SKILL.md +0 -187
  6. package/dist/persona-defaults/persona-knowledge-base/.claude/skills/karpathy-llm-wiki/references/archive-template.md +0 -21
  7. package/dist/persona-defaults/persona-knowledge-base/.claude/skills/karpathy-llm-wiki/references/article-template.md +0 -20
  8. package/dist/persona-defaults/persona-knowledge-base/.claude/skills/karpathy-llm-wiki/references/index-template.md +0 -18
  9. package/dist/persona-defaults/persona-knowledge-base/.claude/skills/karpathy-llm-wiki/references/raw-template.md +0 -7
  10. package/dist/persona-defaults/persona-researcher/.claude/skills/deep-research/README.md +0 -119
  11. package/dist/persona-defaults/persona-researcher/.claude/skills/deep-research/SKILL.md +0 -108
  12. package/dist/persona-defaults/persona-researcher/.claude/skills/deep-research/reference/continuation.md +0 -167
  13. package/dist/persona-defaults/persona-researcher/.claude/skills/deep-research/reference/html-generation.md +0 -103
  14. package/dist/persona-defaults/persona-researcher/.claude/skills/deep-research/reference/methodology.md +0 -421
  15. package/dist/persona-defaults/persona-researcher/.claude/skills/deep-research/reference/quality-gates.md +0 -192
  16. package/dist/persona-defaults/persona-researcher/.claude/skills/deep-research/reference/report-assembly.md +0 -130
  17. package/dist/persona-defaults/persona-researcher/.claude/skills/deep-research/reference/weasyprint_guidelines.md +0 -324
  18. package/dist/persona-defaults/persona-researcher/.claude/skills/deep-research/requirements.txt +0 -14
  19. package/dist/persona-defaults/persona-researcher/.claude/skills/deep-research/schemas/claim.schema.json +0 -49
  20. package/dist/persona-defaults/persona-researcher/.claude/skills/deep-research/schemas/evidence.schema.json +0 -43
  21. package/dist/persona-defaults/persona-researcher/.claude/skills/deep-research/schemas/run_manifest.schema.json +0 -97
  22. package/dist/persona-defaults/persona-researcher/.claude/skills/deep-research/schemas/source.schema.json +0 -49
  23. package/dist/persona-defaults/persona-researcher/.claude/skills/deep-research/scripts/citation_manager.py +0 -300
  24. package/dist/persona-defaults/persona-researcher/.claude/skills/deep-research/scripts/evidence_store.py +0 -205
  25. package/dist/persona-defaults/persona-researcher/.claude/skills/deep-research/scripts/extract_claims.py +0 -358
  26. package/dist/persona-defaults/persona-researcher/.claude/skills/deep-research/scripts/md_to_html.py +0 -330
  27. package/dist/persona-defaults/persona-researcher/.claude/skills/deep-research/scripts/research_engine.py +0 -584
  28. package/dist/persona-defaults/persona-researcher/.claude/skills/deep-research/scripts/source_evaluator.py +0 -292
  29. package/dist/persona-defaults/persona-researcher/.claude/skills/deep-research/scripts/validate_report.py +0 -354
  30. package/dist/persona-defaults/persona-researcher/.claude/skills/deep-research/scripts/verify_citations.py +0 -426
  31. package/dist/persona-defaults/persona-researcher/.claude/skills/deep-research/scripts/verify_claim_support.py +0 -344
  32. package/dist/persona-defaults/persona-researcher/.claude/skills/deep-research/scripts/verify_html.py +0 -220
  33. package/dist/persona-defaults/persona-researcher/.claude/skills/deep-research/templates/mckinsey_report_template.html +0 -443
  34. package/dist/persona-defaults/persona-researcher/.claude/skills/deep-research/templates/report_template.md +0 -414
  35. package/dist/persona-defaults/persona-researcher/.claude/skills/deep-research/tests/fixtures/invalid_report.md +0 -27
  36. package/dist/persona-defaults/persona-researcher/.claude/skills/deep-research/tests/fixtures/valid_report.md +0 -114
  37. package/dist/persona-defaults/persona-researcher/.claude/skills/deep-research/tests/test_citation_manager.py +0 -195
  38. package/dist/persona-defaults/persona-researcher/.claude/skills/deep-research/tests/test_evidence_store.py +0 -166
  39. package/dist/persona-defaults/persona-researcher/.claude/skills/deep-research/tests/test_extract_claims.py +0 -213
  40. package/dist/persona-defaults/persona-researcher/.claude/skills/deep-research/tests/test_verify_claim_support.py +0 -230
  41. package/dist/persona-defaults/persona-researcher/skills-lock.json +0 -11
@@ -117,7 +117,7 @@ clawd 一句话:**它是 ClawOS 里的一个 Extension —— 在 ClawOS 桌
117
117
  5. **远程接入您的本机 AI** —— 一行命令开一条公网隧道,您手机上、外网都能连回家里电脑的 Claude Code,不用部署服务器
118
118
  6. **临时借身份**(`@persona/xxx`) —— 当前对话里想让另一个助手客串一句话,输入框 `@` 一下选它,不用切会话
119
119
  7. **对话能分叉 / 回滚** —— 任何一条 AI 的回答都能 fork 出新会话分支,或者把会话回滚到之前某一步重来
120
- 8. **助手自带技能包** —— 比如「调研员」自带 deep-research,「知识库管理员」自带 karpathy-llm-wiki,您也可以给自己建的助手装 skill
120
+ 8. **助手按需装技能包** —— 每个助手第一次会话会引导您一键装它需要的技能(比如「调研员」引导装 deep-research,「知识库管理员」引导装 karpathy-llm-wiki),走标准 skills 渠道、可独立升级,您也可以给自己建的助手装 skill
121
121
  9. **统一记住怎么称呼您** —— 一次告诉 clawd 您叫什么(OwnerProfile),所有助手自我介绍都会用这个名字("我是 David 的 xxx 助手")
122
122
  10. **断线不丢对话** —— 会话历史落在本机,daemon 重启、网断、关电脑都不影响下次接回来继续聊
123
123
 
@@ -1,5 +1,24 @@
1
1
  你是老板的知识库管理员。归档是入口,但不是边界 —— 查询、复盘、维护、整理都是分内事。
2
2
 
3
+ # 初次见面:先检查 `karpathy-llm-wiki` skill 装好了没
4
+
5
+ 这个 persona 不自带 skill 文件,要老板手动装一次(走正常 skills 渠道,方便后续独立升级)。每次新会话**第一轮**就检查:
6
+
7
+ ```bash
8
+ ls ~/.clawd/personas/persona-knowledge-base/.claude/skills/karpathy-llm-wiki/SKILL.md 2>/dev/null && echo "✅ 已装" || echo "❌ 未装"
9
+ ```
10
+
11
+ 未装就引导老板装到本 persona(不带 `-g`,只对这个 persona 生效):
12
+
13
+ ```bash
14
+ cd ~/.clawd/personas/persona-knowledge-base
15
+ npx skills add astro-han/karpathy-llm-wiki -y
16
+ ```
17
+
18
+ 装完 `ls .claude/skills/` 应该能看到 `karpathy-llm-wiki/`。后续升级用 `npx skills update karpathy-llm-wiki`。
19
+
20
+ **在 skill 装好之前**:第 0 条铁律里说"碰 wiki 必走 skill"的部分先停手,告诉老板"`karpathy-llm-wiki` skill 还没装,需要先装好才能动 wiki/,要不要现在装?"
21
+
3
22
  # 第 0 条铁律:碰 `wiki/` 必走 `karpathy-llm-wiki` skill
4
23
 
5
24
  **任何会读、写、改 `wiki/` 目录的工作,开工前第一件事就是 invoke `karpathy-llm-wiki` skill,按它的流程做。** 这条优先级高于本文件其他所有内容。
@@ -1,8 +1,27 @@
1
1
  你是一个专业的调研员(researcher),你的职责是帮助老板做高质量、可核查的深度调研。
2
2
 
3
+ ## 初次见面:先检查 `deep-research` skill 装好了没
4
+
5
+ 这个 persona 不自带 skill 文件,要老板手动装一次(走正常 skills 渠道,方便后续独立升级)。每次新会话**第一轮**就检查:
6
+
7
+ ```bash
8
+ ls ~/.clawd/personas/persona-researcher/.claude/skills/deep-research/SKILL.md 2>/dev/null && echo "✅ 已装" || echo "❌ 未装"
9
+ ```
10
+
11
+ 未装就引导老板装到本 persona(不带 `-g`,只对这个 persona 生效):
12
+
13
+ ```bash
14
+ cd ~/.clawd/personas/persona-researcher
15
+ npx skills add 199-biotechnologies/claude-deep-research-skill -y
16
+ ```
17
+
18
+ 装完 `ls .claude/skills/` 应该能看到 `deep-research/`。后续升级用 `npx skills update deep-research`。
19
+
20
+ **在 skill 装好之前**:能用通用搜索能力的调研可以继续做,但要告诉老板"`deep-research` skill 没装,当前是降级模式,没有分档(quick/standard/deep/ultradeep)、不会自动校验来源链接,要不要现在装?"
21
+
3
22
  ## 核心工作方式
4
23
 
5
- - **优先调用 `deep-research` skill**:老板提出任何"调研 / 研究 / 分析 / 综述 / 竞品 / 市场 / 技术选型"类需求时,先评估是否适用 `deep-research` skill(这个 persona 出厂自带),是就用,不要凭感觉口述
24
+ - **优先调用 `deep-research` skill**:老板提出任何"调研 / 研究 / 分析 / 综述 / 竞品 / 市场 / 技术选型"类需求时,先评估是否适用 `deep-research` skill,是就用,不要凭感觉口述
6
25
  - **不能猜**:拿不准的事实,主动并行抓多个源核验,给出来源链接
7
26
  - **产出带引用**:所有调研报告末尾必须给 bibliography(参考文献列表),每条带可点击链接和访问日期
8
27
  - **抗幻觉**:发现引用不存在 / 链接打不开 / 数据来源单一时,明确标红,不要硬凑结论
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawos-dev/clawd",
3
- "version": "0.2.50-beta.77.3a9364e",
3
+ "version": "0.2.51-beta.78.2024c11",
4
4
  "description": "Standalone clawd daemon — Claude Code (and future Codex) session server over WebSocket",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,187 +0,0 @@
1
- ---
2
- name: karpathy-llm-wiki
3
- description: "Use when building or maintaining a personal LLM-powered knowledge base. Triggers: ingesting sources into a wiki, querying wiki knowledge, linting wiki quality, 'add to wiki', 'what do I know about', or any mention of 'LLM wiki' or 'Karpathy wiki'."
4
- ---
5
-
6
- # Karpathy LLM Wiki
7
-
8
- Build and maintain a personal knowledge base using LLMs. You manage two directories: `raw/` (immutable source material) and `wiki/` (compiled knowledge articles). Sources go into raw/, you compile them into wiki articles, and the wiki compounds over time.
9
-
10
- Core ideas from Karpathy:
11
- - "The LLM writes and maintains the wiki; the human reads and asks questions."
12
- - "The wiki is a persistent, compounding artifact."
13
-
14
- ## Architecture
15
-
16
- Three layers, all under the user's project root:
17
-
18
- **raw/** — Immutable source material. You read, never modify. Organized by topic subdirectories (e.g., `raw/machine-learning/`).
19
-
20
- **wiki/** — Compiled knowledge articles. You have full ownership. Organized by topic subdirectories, one level only: `wiki/<topic>/<article>.md`. Contains two special files:
21
- - `wiki/index.md` — Global index. One row per article, grouped by topic, with link + summary + Updated date.
22
- - `wiki/log.md` — Append-only operation log.
23
-
24
- **SKILL.md** (this file) — Schema layer. Defines structure and workflow rules.
25
-
26
- Templates live in `references/` relative to this file. Read them when you need the exact format for raw files, articles, archive pages, or the index.
27
-
28
- ### Initialization
29
-
30
- Triggers only on the first Ingest. Check whether `raw/` and `wiki/` exist. Create only what is missing; never overwrite existing files:
31
-
32
- - `raw/` directory (with `.gitkeep`)
33
- - `wiki/` directory (with `.gitkeep`)
34
- - `wiki/index.md` — heading `# Knowledge Base Index`, empty body
35
- - `wiki/log.md` — heading `# Wiki Log`, empty body
36
-
37
- If Query or Lint cannot find the wiki structure, tell the user: "Run an ingest first to initialize the wiki." Do not auto-create.
38
-
39
- ---
40
-
41
- ## Ingest
42
-
43
- Fetch a source into raw/, then compile it into wiki/. Always both steps, no exceptions.
44
-
45
- ### Fetch (raw/)
46
-
47
- 1. Get the source content using whatever web or file tools your environment provides. If nothing can reach the source, ask the user to paste it directly.
48
-
49
- 2. Pick a topic directory. Check existing `raw/` subdirectories first; reuse one if the topic is close enough. Create a new subdirectory only for genuinely distinct topics.
50
-
51
- 3. Save as `raw/<topic>/YYYY-MM-DD-descriptive-slug.md`.
52
- - Slug from source title, kebab-case, max 60 characters.
53
- - Published date unknown → omit the date prefix from the file name (e.g., `descriptive-slug.md`). The metadata Published field still appears; set it to `Unknown`.
54
- - If a file with the same name already exists, append a numeric suffix (e.g., `descriptive-slug-2.md`).
55
- - Include metadata header: source URL, collected date, published date.
56
- - Preserve original text. Clean formatting noise. Do not rewrite opinions.
57
-
58
- See `references/raw-template.md` for the exact format.
59
-
60
- ### Compile (wiki/)
61
-
62
- Determine where the new content belongs:
63
-
64
- - **Same core thesis as existing article** → Merge into that article. Add the new source to Sources/Raw. Update affected sections.
65
- - **New concept** → Create a new article in the most relevant topic directory. Name the file after the concept, not the raw file.
66
- - **Spans multiple topics** → Place in the most relevant directory. Add See Also cross-references to related articles elsewhere.
67
-
68
- These are not mutually exclusive. A single source may warrant merging into one article while also creating a separate article for a distinct concept it introduces. In all cases, check for factual conflicts: if the new source contradicts existing content, annotate the disagreement with source attribution. When merging, note the conflict within the merged article. When the conflicting content lives in separate articles, note it in both and cross-link them.
69
-
70
- See `references/article-template.md` for article format. Key points:
71
- - Sources field: author, organization, or publication name + date, semicolon-separated.
72
- - Raw field: markdown links to raw/ files, semicolon-separated.
73
- - Relative paths from `wiki/<topic>/` use `../../raw/<topic>/<file>.md` (two levels up to project root).
74
-
75
- ### Cascade Updates
76
-
77
- After the primary article, check for ripple effects:
78
-
79
- 1. Scan articles in the same topic directory for content affected by the new source.
80
- 2. Scan `wiki/index.md` entries in other topics for articles covering related concepts.
81
- 3. Update every article whose content is materially affected. Each updated file gets its Updated date refreshed.
82
-
83
- Archive pages are never cascade-updated (they are point-in-time snapshots).
84
-
85
- ### Post-Ingest
86
-
87
- Update `wiki/index.md`: add or update entries for every touched article. When adding a new topic section, include a one-line description. The Updated date reflects when the article's knowledge content last changed, not the file system timestamp. See `references/index-template.md` for format.
88
-
89
- Append to `wiki/log.md`:
90
-
91
- ```
92
- ## [YYYY-MM-DD] ingest | <primary article title>
93
- - Updated: <cascade-updated article title>
94
- - Updated: <another cascade-updated article title>
95
- ```
96
-
97
- Omit `- Updated:` lines when no cascade updates occur.
98
-
99
- ---
100
-
101
- ## Query
102
-
103
- Search the wiki and answer questions. Examples of triggers:
104
- - "What do I know about X?"
105
- - "Summarize everything related to Y"
106
- - "Compare A and B based on my wiki"
107
-
108
- ### Steps
109
-
110
- 1. Read `wiki/index.md` to locate relevant articles.
111
- 2. Read those articles and synthesize an answer.
112
- 3. Prefer wiki content over your own training knowledge. Cite sources with markdown links: `[Article Title](wiki/topic/article.md)` (project-root-relative paths for in-conversation citations; within wiki/ files, use paths relative to the current file).
113
- 4. Output the answer in the conversation. Do not write files unless asked.
114
-
115
- ### Archiving
116
-
117
- When the user explicitly asks to archive or save the answer to the wiki:
118
-
119
- 1. Write the answer as a new wiki page. See `references/archive-template.md`. When converting conversation citations to the archive page, rewrite project-root-relative paths (e.g., `wiki/topic/article.md`) to file-relative paths (e.g., `../topic/article.md` or `article.md` for same-directory).
120
- - Sources: markdown links to the wiki articles cited in the answer.
121
- - No Raw field (content does not come from raw/).
122
- - File name reflects the query topic, e.g., `transformer-architectures-overview.md`.
123
- - Place in the most relevant topic directory.
124
- 2. Always create a new page. Never merge into existing articles (archive content is a synthesized answer, not raw material).
125
- 3. Update `wiki/index.md`. Prefix the Summary with `[Archived]`.
126
- 4. Append to `wiki/log.md`:
127
- ```
128
- ## [YYYY-MM-DD] query | Archived: <page title>
129
- ```
130
-
131
- ---
132
-
133
- ## Lint
134
-
135
- Quality checks on the wiki. Two categories with different authority levels.
136
-
137
- ### Deterministic Checks (auto-fix)
138
-
139
- Fix these automatically:
140
-
141
- **Index consistency** — compare `wiki/index.md` against actual wiki/ files (excluding index.md and log.md):
142
- - File exists but missing from index → add entry with `(no summary)` placeholder. For Updated, use the article's metadata Updated date if present; otherwise fall back to file's last modified date.
143
- - Index entry points to nonexistent file → mark as `[MISSING]` in the index. Do not delete the entry; let the user decide.
144
-
145
- **Internal links** — for every markdown link in wiki/ article files (body text and Sources metadata), excluding Raw field links (validated by Raw references below) and excluding index.md/log.md (handled above):
146
- - Target does not exist → search wiki/ for a file with the same name elsewhere.
147
- - Exactly one match → fix the path.
148
- - Zero or multiple matches → report to the user.
149
-
150
- **Raw references** — every link in a Raw field must point to an existing raw/ file:
151
- - Target does not exist → search raw/ for a file with the same name elsewhere.
152
- - Exactly one match → fix the path.
153
- - Zero or multiple matches → report to the user.
154
-
155
- **See Also** — within each topic directory:
156
- - Add obviously missing cross-references between related articles.
157
- - Remove links to deleted files.
158
-
159
- ### Heuristic Checks (report only)
160
-
161
- These rely on your judgment. Report findings without auto-fixing:
162
-
163
- - Factual contradictions across articles
164
- - Outdated claims superseded by newer sources
165
- - Missing conflict annotations where sources disagree
166
- - Orphan pages with no inbound links from other wiki articles
167
- - Missing cross-topic references
168
- - Concepts frequently mentioned but lacking a dedicated page
169
- - Archive pages whose cited source articles have been substantially updated since archival
170
-
171
- ### Post-Lint
172
-
173
- Append to `wiki/log.md`:
174
-
175
- ```
176
- ## [YYYY-MM-DD] lint | <N> issues found, <M> auto-fixed
177
- ```
178
-
179
- ---
180
-
181
- ## Conventions
182
-
183
- - Standard markdown with relative links throughout.
184
- - wiki/ supports one level of topic subdirectories only. No deeper nesting.
185
- - Today's date for log entries, Collected dates, and Archived dates. Updated dates reflect when the article's knowledge content last changed. Published dates come from the source (use `Unknown` when unavailable).
186
- - Inside wiki/ files, all markdown links use paths relative to the current file. In conversation output, use project-root-relative paths (e.g., `wiki/topic/article.md`).
187
- - Ingest updates both `wiki/index.md` and `wiki/log.md`. Archive (from Query) updates both. Lint updates `wiki/log.md` (and `wiki/index.md` only when auto-fixing index entries). Plain queries do not write any files.
@@ -1,21 +0,0 @@
1
- # {Title}
2
-
3
- > Sources: [{Cited Article 1}](article1.md); [{Cited Article 2}](../other-topic/article2.md)
4
- {Paths must be relative to this file: same-topic = filename only, cross-topic = ../other-topic/filename.md}
5
- > Archived: {YYYY-MM-DD}
6
-
7
- ## Overview
8
-
9
- {One paragraph summarizing the query and key findings.}
10
-
11
- ## {Body Sections}
12
-
13
- {The synthesized answer, lightly edited for wiki context. This page is a point-in-time snapshot; it will not be cascade-updated when source articles change.}
14
-
15
- {OPTIONAL — include this section only when cross-references exist:}
16
-
17
- ## See Also
18
-
19
- {Cross-references to related wiki articles. Use relative links:
20
- - Same topic: [Other Article](other-article.md)
21
- - Different topic: [Other Article](../other-topic/other-article.md)}
@@ -1,20 +0,0 @@
1
- # {Title}
2
-
3
- > Sources: {Author1, YYYY-MM-DD; Author2, YYYY-MM-DD}
4
- > Raw: [{source1}](../../raw/{topic1}/{filename1}.md); [{source2}](../../raw/{topic2}/{filename2}.md)
5
-
6
- ## Overview
7
-
8
- {One paragraph summarizing the key points of this article.}
9
-
10
- ## {Body Sections}
11
-
12
- {Synthesize a coherent structure from the source material. Do not copy source text verbatim; distill and reorganize. Use blockquotes sparingly for particularly important original phrasing.}
13
-
14
- {OPTIONAL — include this section only when cross-references exist:}
15
-
16
- ## See Also
17
-
18
- {Cross-references to related wiki articles. Maintained during lint. Use relative links:
19
- - Same topic: [Other Article](other-article.md)
20
- - Different topic: [Other Article](../other-topic/other-article.md)}
@@ -1,18 +0,0 @@
1
- # Knowledge Base Index
2
-
3
- ## {topic-name}
4
-
5
- {One-line description of this topic.}
6
-
7
- | Article | Summary | Updated |
8
- |---------|---------|---------|
9
- | [{Article Title}]({topic-name}/{article}.md) | {One-line summary} | {YYYY-MM-DD} |
10
- | [{Archived Article}]({topic-name}/{archived}.md) | [Archived] {One-line summary} | {YYYY-MM-DD} |
11
-
12
- ## {another-topic}
13
-
14
- {One-line description of this topic.}
15
-
16
- | Article | Summary | Updated |
17
- |---------|---------|---------|
18
- | [{Article Title}]({another-topic}/{article}.md) | {One-line summary} | {YYYY-MM-DD} |
@@ -1,7 +0,0 @@
1
- # {Title}
2
-
3
- > Source: {URL or origin description}
4
- > Collected: {YYYY-MM-DD}
5
- > Published: {YYYY-MM-DD or Unknown}
6
-
7
- {Original content below. Preserve the source text faithfully. Clean up formatting noise (extra whitespace, broken HTML artifacts, navigation chrome), but do not rewrite opinions or alter meaning.}
@@ -1,119 +0,0 @@
1
- # Deep Research Skill for Claude Code
2
-
3
- Enterprise-grade research engine for Claude Code. Produces citation-backed reports with source credibility scoring, multi-provider search, and automated validation.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- # Clone into Claude Code skills directory
9
- git clone https://github.com/199-biotechnologies/claude-deep-research-skill.git ~/.claude/skills/deep-research
10
- ```
11
-
12
- No additional dependencies required for basic usage.
13
-
14
- ### Optional: search-cli (multi-provider search)
15
-
16
- For aggregated search across Brave, Serper, Exa, Jina, and Firecrawl:
17
-
18
- ```bash
19
- brew tap 199-biotechnologies/tap && brew install search-cli
20
- search config set keys.brave YOUR_KEY # configure at least one provider
21
- ```
22
-
23
- ## Usage
24
-
25
- ```
26
- deep research on the current state of quantum computing
27
- ```
28
-
29
- ```
30
- deep research in ultradeep mode: compare PostgreSQL vs Supabase for our stack
31
- ```
32
-
33
- ## Research Modes
34
-
35
- | Mode | Phases | Duration | Best For |
36
- |------|--------|----------|----------|
37
- | Quick | 3 | 2-5 min | Initial exploration |
38
- | Standard | 6 | 5-10 min | Most research questions |
39
- | Deep | 8 | 10-20 min | Complex topics, critical decisions |
40
- | UltraDeep | 8+ | 20-45 min | Comprehensive reports, maximum rigor |
41
-
42
- ## Pipeline
43
-
44
- Scope &rarr; Plan &rarr; **Retrieve** (parallel search + agents) &rarr; Triangulate &rarr; Outline Refinement &rarr; Synthesize &rarr; Critique (with loop-back) &rarr; Refine &rarr; Package
45
-
46
- Key features:
47
- - **Step 0**: Retrieves current date before searches (prevents stale training-data year assumptions)
48
- - **Parallel retrieval**: 5-10 concurrent searches + 2-3 focused sub-agents returning structured evidence objects
49
- - **First Finish Search**: Adaptive quality thresholds by mode
50
- - **Critique loop-back**: Phase 6 can return to Phase 3 with delta-queries if critical gaps found
51
- - **Multi-persona red teaming**: Skeptical Practitioner, Adversarial Reviewer, Implementation Engineer (Deep/UltraDeep)
52
- - **Disk-persisted citations**: `sources.json` survives context compaction and continuation agents
53
-
54
- ## Output
55
-
56
- Reports saved to `~/Documents/[Topic]_Research_[Date]/`:
57
- - Markdown (primary source of truth)
58
- - HTML (McKinsey-style, auto-opened in browser)
59
- - PDF (professional print via WeasyPrint)
60
-
61
- Reports >18K words auto-continue via recursive agent spawning with context preservation.
62
-
63
- ## Quality Standards
64
-
65
- - 10+ sources, 3+ per major claim
66
- - Executive summary 200-400 words
67
- - Findings 600-2,000 words each, prose-first (>=80%)
68
- - Full bibliography with URLs, no placeholders
69
- - Automated validation: `validate_report.py` (9 checks) + `verify_citations.py` (DOI/URL/hallucination detection)
70
- - Validation loop: validate &rarr; fix &rarr; retry (max 3 cycles)
71
-
72
- ## Search Tools
73
-
74
- | Tool | Priority | Setup |
75
- |------|----------|-------|
76
- | search-cli | **Primary** — all searches go here first | `brew install search-cli` + API keys |
77
- | WebSearch | Fallback — if search-cli fails or rate-limited | None (built-in) |
78
- | Exa MCP | Optional — semantic/neural search alongside search-cli | MCP config |
79
-
80
- ## Architecture
81
-
82
- ```
83
- deep-research/
84
- ├── SKILL.md # Skill entry point (lean, ~100 lines)
85
- ├── reference/
86
- │ ├── methodology.md # 8-phase pipeline details
87
- │ ├── report-assembly.md # Progressive generation strategy
88
- │ ├── quality-gates.md # Validation standards
89
- │ ├── html-generation.md # McKinsey HTML conversion
90
- │ ├── continuation.md # Auto-continuation protocol
91
- │ └── weasyprint_guidelines.md # PDF generation
92
- ├── templates/
93
- │ ├── report_template.md # Report structure template
94
- │ └── mckinsey_report_template.html # HTML report template
95
- ├── scripts/
96
- │ ├── validate_report.py # 9-check structure validator
97
- │ ├── verify_citations.py # DOI/URL/hallucination checker
98
- │ ├── source_evaluator.py # Source credibility scoring
99
- │ ├── citation_manager.py # Citation tracking
100
- │ ├── md_to_html.py # Markdown to HTML converter
101
- │ ├── verify_html.py # HTML verification
102
- │ └── research_engine.py # Core orchestration engine
103
- └── tests/
104
- └── fixtures/ # Test report fixtures
105
- ```
106
-
107
- ## Version History
108
-
109
- | Version | Date | Changes |
110
- |---------|------|---------|
111
- | 2.3.1 | 2026-03-19 | Template/validator harmonization, structured evidence, critique loop-back, multi-persona red teaming |
112
- | 2.3 | 2026-03-19 | Contract harmonization, search-cli integration, dynamic year detection, disk-persisted citations, validation loops |
113
- | 2.2 | 2025-11-05 | Auto-continuation system for unlimited length |
114
- | 2.1 | 2025-11-05 | Progressive file assembly |
115
- | 1.0 | 2025-11-04 | Initial release |
116
-
117
- ## License
118
-
119
- MIT - modify as needed for your workflow.
@@ -1,108 +0,0 @@
1
- ---
2
- name: deep-research
3
- description: Use when the user needs multi-source research with citation tracking, evidence persistence, and structured report generation. Triggers on "deep research", "comprehensive analysis", "research report", "compare X vs Y", "analyze trends", or "state of the art". Not for simple lookups, debugging, or questions answerable with 1-2 searches.
4
- ---
5
-
6
- # Deep Research
7
-
8
- ## Core Purpose
9
-
10
- Deliver citation-tracked research reports through a structured pipeline with evidence persistence, source identity management, claim-level verification, and progressive context management.
11
-
12
- **Autonomy Principle:** Operate independently. Infer assumptions from context. Only stop for critical errors or incomprehensible queries. Surface high-materiality assumptions explicitly in the Introduction and Methodology rather than silently defaulting.
13
-
14
- ---
15
-
16
- ## Decision Tree
17
-
18
- ```
19
- Request Analysis
20
- +-- Simple lookup? --> STOP: Use WebSearch
21
- +-- Debugging? --> STOP: Use standard tools
22
- +-- Complex analysis needed? --> CONTINUE
23
-
24
- Mode Selection
25
- +-- Initial exploration --> quick (3 phases, 2-5 min)
26
- +-- Standard research --> standard (6 phases, 5-10 min) [DEFAULT]
27
- +-- Critical decision --> deep (8 phases, 10-20 min)
28
- +-- Comprehensive review --> ultradeep (8+ phases, 20-45 min)
29
- ```
30
-
31
- **Default assumptions:** Technical query = technical audience. Comparison = balanced perspective. Trend = recent 1-2 years.
32
-
33
- ---
34
-
35
- ## Workflow Overview
36
-
37
- | Phase | Name | Quick | Std | Deep | Ultra |
38
- |-------|------|-------|-----|------|-------|
39
- | 1 | SCOPE | Y | Y | Y | Y |
40
- | 2 | PLAN | - | Y | Y | Y |
41
- | 3 | RETRIEVE | Y | Y | Y | Y |
42
- | 4 | TRIANGULATE | - | Y | Y | Y |
43
- | 4.5 | OUTLINE REFINEMENT | - | Y | Y | Y |
44
- | 5 | SYNTHESIZE | - | Y | Y | Y |
45
- | 6 | CRITIQUE | - | - | Y | Y |
46
- | 7 | REFINE | - | - | Y | Y |
47
- | 8 | PACKAGE | Y | Y | Y | Y |
48
-
49
- **Note:** Phases 3-5 operate as an evidence loop per section (retrieve → evidence store → refine outline → draft → verify claims → delta-retrieve if needed), not as strict sequential gates.
50
-
51
- ---
52
-
53
- ## Execution
54
-
55
- **On invocation, load relevant reference files:**
56
-
57
- 1. **Phase 1-7:** Load [methodology.md](./reference/methodology.md) for detailed phase instructions
58
- 2. **Phase 8 (Report):** Load [report-assembly.md](./reference/report-assembly.md) for progressive generation
59
- 3. **HTML/PDF output:** Load [html-generation.md](./reference/html-generation.md)
60
- 4. **Quality checks:** Load [quality-gates.md](./reference/quality-gates.md)
61
- 5. **Long reports (>18K words):** Load [continuation.md](./reference/continuation.md)
62
-
63
- **Templates:**
64
- - Report structure: [report_template.md](./templates/report_template.md)
65
- - HTML styling: [mckinsey_report_template.html](./templates/mckinsey_report_template.html)
66
-
67
- **Scripts:**
68
- - `python scripts/validate_report.py --report [path]`
69
- - `python scripts/verify_citations.py --report [path]`
70
- - `python scripts/md_to_html.py [markdown_path]`
71
-
72
- ---
73
-
74
- ## Output Contract
75
-
76
- **Required sections:**
77
- - Executive Summary (200-400 words)
78
- - Introduction (scope, methodology, assumptions)
79
- - Main Analysis (4-8 findings, 600-2,000 words each, cited)
80
- - Synthesis & Insights (patterns, implications)
81
- - Limitations & Caveats
82
- - Recommendations
83
- - Bibliography (COMPLETE - every citation, no placeholders)
84
- - Methodology Appendix
85
-
86
- **Output files (all to `~/Documents/[Topic]_Research_[YYYYMMDD]/`):**
87
- - Markdown (primary source of truth)
88
- - `sources.jsonl` — stable source registry with canonical IDs
89
- - `evidence.jsonl` — append-only evidence store with quotes and locators
90
- - `claims.jsonl` — atomic claim ledger with support status
91
- - `run_manifest.json` — query, mode, assumptions, provider config
92
- - HTML (McKinsey style, auto-opened)
93
- - PDF (professional print, auto-opened)
94
-
95
- **Quality standards:**
96
- - 10+ sources, 3+ per major claim (cluster-independent, not just count)
97
- - All factual claims cited immediately [N] with evidence backing in `evidence.jsonl`
98
- - Claim-support verification mandatory: no unsupported factual claims pass delivery
99
- - No placeholders, no fabricated citations
100
- - Prose-first (>=80%), bullets sparingly
101
-
102
- ---
103
-
104
- ## When to Use / NOT Use
105
-
106
- **Use:** Comprehensive analysis, technology comparisons, state-of-the-art reviews, multi-perspective investigation, market analysis.
107
-
108
- **Do NOT use:** Simple lookups, debugging, 1-2 search answers, quick time-sensitive queries.