AI Workspace Hub
Vault template
First committed by Benboerba620
Published in Benboerba620/ai-workspace-hub. Publisher page
83 GitHub stars
What it is
All-in-one AI 研究工作台:把 Codex / Claude Code / Cursor 变成有长期记忆的研究系统。wiki 摄入、研究闭环、快速筛选、假设追踪、播客、日报六大能力,零 API key 可跑基座。
Summary from the brain’s metadata
All-in-one AI 研究工作台:把 Codex / Claude Code / Cursor 变成有长期记忆的研究系统。wiki 摄入、研究闭环、快速筛选、假设追踪、播客、日报六大能力,零 API key 可跑基座。 Turn Codex, Claude Code, Cursor, and Cline into a persistent research workspace.
How it works
Memory model: Markdown vault
AutoGineer overview, from the brain’s own files
Memory model: Markdown vault. Folders: .github (agent config, 1 file); docs (docs, 2 files); examples (examples, 22 files); inbox (raw sources, 3 files); tests (tests, 18 files); tools (scripts, 39 files); wiki (wiki, 15 files). The agent reads hypothesis/, wiki/explorations/.
| Folder | Role | Files |
|---|---|---|
| .github | agent-config | 1 |
| docs | docs | 2 |
| examples | examples | 22 |
| inbox | raw-sources | 3 |
| tests | tests | 18 |
| tools | scripts | 39 |
| wiki | wiki | 15 |
| config | folder | 2 |
| evidence | folder | 1 |
| hypothesis | folder | 1 |
| output | folder | 7 |
| portfolio | folder | 2 |
| system | folder | 52 |
| workspace | folder | 11 |
The agent reads
- hypothesis/ evidence: AGENTS.md
- wiki/explorations/ evidence: AGENTS.md
Requirements
Runtimes: Python
Works with: Claude Code, OpenAI Codex, GitHub Copilot, Cursor, Kiro, OpenCode, Amp, Cline, JetBrains Junie, Devin (ex-Windsurf)
Set it up
Clone the repository at the commit AutoGineer scanned:
git clone https://github.com/Benboerba620/ai-workspace-hub.git && cd ai-workspace-hub && git checkout e01a41a06886c6d59f714e6c133004d241ea91acClaude Code reads CLAUDE.md from this folder automatically.
cd ai-workspace-hub && claude
AutoGineer scanned these files at commit e01a41a.
First committed by Benboerba620. Published in Benboerba620/ai-workspace-hub. Licence: MIT License.
Usage
AutoGineer’s guidance for this type of brain
Copy the vault into a folder, open it in your notes app, and point your agent at its instruction file: the agent reads and writes the notes as its memory.
Documentation by Benboerba620
<div align="center">
AI Workspace Hub
Turn Codex, Claude Code, Cursor, and Cline into a persistent research workspace.
把 AI 编程助手变成一套能长期记忆、持续研究、自动沉淀的工作台。
Image: CI Image: Python 3.10+ Image: GitHub stars Image: License
30 秒上手 · 六大能力 · 免费数据源 · 第一周怎么用 · 故障排查
Image: 完整流程演示:一句话安装 → Core Mode READY → 首次股票研究 → 研究偏好 → 主题假设 → 日报跟踪
<sub>演示动图按安装协议与 <a href="START-HERE.md">首次股票研究流程</a>脚本化生成(<a href="docs/gen_demo_gif.py">生成脚本</a>),非实录。</sub>
</div>
最近更新(2026-09-30):当前 Agent 可直接完成材料摘要与标签;日报显示数据来源、日期和缺失状态;安装附带免费数据源指南,daily-watch 与 podcast 均已内置。
对话很聪明,但工作流没有记忆;今天做完,明天又从头解释。
AI Workspace Hub 解决这个问题。六大能力开箱即用——核心工作流不需要 API key。
📖 想先了解设计思路?看作者的公众号长文:《从0构建 AI 协作系统(一):从最小可运行的 MVP 开始》
⚡ 30 秒上手
把下面这句话发给你的 AI agent(Codex / Claude Code / Cursor / Cline):
帮我按这个协议安装 AI Workspace Hub:
https://raw.githubusercontent.com/Benboerba620/ai-workspace-hub/main/INSTALL-FOR-AI.md
抓不到协议全文就先 git clone 本仓库,再读其中的 INSTALL-FOR-AI.md 逐字执行。Agent 会问你 4 个问题(路径、用途、现有 wiki、是否使用 Obsidian),然后自动创建完整工作区。装好后,先用样例确认安装:
把 inbox/first-note.md 整理进 personal wiki。预期:agent 读 AGENTS.md → 按 wiki/_schema.md 整理 → 写入 wiki/sources/ → 在 active-context.md 记录进度。
不需要 API key,不需要联网,不需要写任何代码。
样例通过后,开始第一份真实股票研究:
研究一家公司,同时帮我建立第一版研究偏好。
公司是:____;我现在关注它是因为:____。这次会同时产出研究报告、研究偏好 v0.1、可验证假设和后续跟踪指标。以后研究其他公司会复用并继续校准这套方法,而不是每次从空白开始。
<details> <summary>还没有 AI agent?先花 2 分钟装一个</summary>
任选其一,都有免费或试用档:
Claude Code(推荐):先装 Node.js,然后终端运行
npm install -g @anthropic-ai/claude-code,在任意目录输入claude登录 Claude 账号。Codex CLI:
npm install -g @openai/codex,输入codex登录 ChatGPT 账号。Cursor:去 cursor.com 下载安装,打开一个文件夹后用内置对话。
装好后回到上面,把那句话发给它就行。
</details>
<details> <summary>更习惯手动 clone?</summary>
git clone https://github.com/Benboerba620/ai-workspace-hub.git my-ai-workspace
cd my-ai-workspace用 AI agent 打开这个目录,直接试跑 inbox/first-note.md → wiki。
验证安装状态:
python3 system/scripts/check_workspace.py # Windows: python system/scripts/check_workspace.pyCore Mode 显示 READY 即可开始使用。
</details>
📈 股票研究主流程
首次研究引导 → 研究偏好 v0.1 → 研究结论 → 可验证假设
→ 跟踪指标 → daily-watch 日报 → 独立证据 → 假设复盘 → 长期知识START-HERE.md 是安装后的用户首页。信息摄入只是输入环节;系统的主线是让研究结论进入假设,并通过日报持续验证。
每份研究、假设和证据都有稳定 ID;当前状态只保存在 Markdown frontmatter。需要用户确认的 wiki 沉淀、假设调整、股票池新增和研究偏好变化会进入持久待确认队列。直接说:
看看我的研究系统现在有什么需要处理。Agent 会汇总进行中的研究、待复盘证据、到期假设和待确认动作,并给出下一步。
🧩 六大能力
| 能力 | 你可以怎么说 | 写入哪里 | API key | |
|---|---|---|---|---|
| 📚 | wiki | "把这篇文章整理进知识库" | wiki/ | 推荐(自动标签) |
| 🔬 | research | "帮我研究一下某公司 / 某行业" | output/research/ | 不需要 |
| 🔍 | screen | "帮我筛选 AI 产业链股票" | output/screen/ | 可选 |
| 📊 | daily-watch | "生成今天的盯盘日报" | output/daily-watch/ + evidence/ | 可选 |
| 🧪 | hypothesis | "把这个投资假设建档并追踪" | hypothesis/ | 不需要 |
| 🎙️ | podcast | "扫一下这几个播客并写进 wiki" | wiki/sources/ + output/pod2wiki/ | 当前 Agent 无需独立 Key;后台摘要需 Key |
daily-watch 和 podcast 已经内置在 Hub 中,不需要再单独安装。 后台自动标签、独立运行的播客摘要和部分行情源需要按需填写 API key;交互整理可由当前 Agent 完成。
零 key 可用:wiki 可由当前 Agent 摄入和补齐有依据的标签,不调用独立模型 API;research、hypothesis、screen(websearch 模式)、daily-watch(报告骨架 + 美股降级源)照常可用。
默认建议配置:先按 免费数据源接入指南 选择市场——美股可零 Key 使用 Nasdaq,A 股可从 Tushare 的基础日线档起步,yfinance 可作为个人研究备用;再按需配置 LLM、FMP 或 Longbridge Skill。
🔄 工作流程
flowchart LR
IN["inbox / web"] --> TAG["统一自动标签"]
TAG --> KB["wiki 知识库"]
KB --> R["research R*"]
R --> H["hypothesis H*"]
H --> W["唯一执行股票池"]
W --> D["daily-watch 日报"]
D --> E["evidence E-*"]
E -->|"用户确认后复盘"| H
R --> Q["review-queue Q-*"]
H --> Q
Q -->|"确认后执行"| KB
S["workspace status"] -.-> R
S -.-> H
S -.-> E
S -.-> Q核心不是"文件夹长什么样",而是:agent 进入目录后知道先读什么、做研究时先查本地 wiki、输出时事实与推测分开、证据和判断不混写、待确认动作不会随对话消失、明天继续时能从断点接上。
wiki 变大后也不会每次全量加载。每次研究先运行 Research Preflight:按 rule -> pattern -> exploration 加载相关可复用知识,同时扫描 entities / concepts / sources,只返回少量命中页面、命中理由和过期/冲突提示,再决定哪些问题需要联网。扫描不调用大模型,并生成可检查的回执。知识按 source -> exploration -> pattern -> rule 逐级提炼;每次晋级、降级或退役都保留用户确认、复审日期和失效条件。
材料进入 wiki 时按同一标签契约补齐 domain / ticker / concepts / related / entity_salience / tags。交互模式由当前 Agent 处理,后台模式使用统一打标器;历史补标默认只预览,已有人工字段不会被覆盖。
用真实案例理解 Wiki 晋级
产能扩张周期见顶案例 把一条真实研究判断拆成 4 个 Source、2 个已提炼 Exploration 和 1 张 draft Pattern:光伏与锂电是产生该 Pattern 的母案例,因此不能再次冒充独立确认,primary_confirmations 保持为 0。日常研究默认不会加载这张草稿卡;复盘模式可以找到它,未来经过两次新的独立事前验证并由用户确认后,才允许变成 active Pattern。累计三次独立确认后,再讨论是否形成可执行 Rule。
案例目录可以独立运行 summary 和 load,仓库测试同时守住“母案例不计确认、draft 不进入日常加载、满足门槛后才可晋级”三条边界。
系统不在某个模型里,而在这套文件协议里。谁读懂这套协议,谁就接上你的工作流。
⚙️ Core Mode / Enhanced Mode
| 模式 | API key | 能做什么 | 适合 |
|---|---|---|---|
| Core | 不需要 | wiki 摄入(无脚本自动标签)、研究草稿、快速筛选、假设建档、断点续传 | 临时未配置 API 时 |
| Enhanced | 按市场选填 | wiki 自动标签、播客摘要、行情日报、A 股 / 多市场数据、自动监控 | 默认日常使用 |
推荐路径:安装后运行 check_workspace.py → 按 DATA-SOURCES.md 选择免费或付费数据源 → 只填写实际需要的 key。暂时没有 key 时仍可先跑 Core Mode,美股基础行情还可走 Nasdaq 无 Key 源。
📅 第一周怎么用
| 天数 | 动作 | 目标 |
|---|---|---|
| Day 1 | 用当前 Agent 跑通 inbox/first-note.md → wiki;后台自动化再配置 Key | 确认摘要、自动标签和分类都能工作 |
| Day 2 | 放入 3-5 条真实材料 | 建立第一批知识库 |
| Day 3 | 让 agent 研究一个公司 / 行业 | 生成第一篇结构化报告 |
| Day 4 | check_workspace.py,按免费数据源指南选择 Nasdaq / Tushare / yfinance 等 | 增强行情能力 |
| Day 5 | 做一次主题筛选 | 形成候选池 |
| Day 6 | 扫一次播客 / 博客 | 建立外部信息流 |
| Day 7 | 运行结构体检,删掉没用规则 | 防止系统变胖 |
适合谁?
适合:投资研究员、个人投资者、内容创作者、AI power user、Markdown / Obsidian 用户、想做长期项目而不是一次性对话的人。
不适合:想要 GUI 应用、自动交易系统,或不愿意用 Markdown 管理知识的人。
<details> <summary><b>📂 目录结构</b></summary>
ai-workspace-hub/
├── AGENTS.md # Codex 入口路由
├── CLAUDE.md # Claude Code 入口路由
├── INSTALL-FOR-AI.md # 交给 AI agent 的安装协议
├── SMOKE-TEST.md # 冒烟测试
├── ARCHITECTURE.md # 架构说明
├── TROUBLESHOOTING.md # 故障排查
├── workspace/ # 配置、断点、看板与归档
│ ├── monitoring/ # 用户阅读的监控看板
│ └── archive/ # 退出主流程的历史材料
├── inbox/ # 临时输入材料
├── wiki/ # personal wiki(exploration / pattern / rule)
├── output/ # 研究、筛选、播客和日报输出
│ └── daily-watch/ # 日报归档
├── hypothesis/ # 投资假设和复盘
├── evidence/ # 独立证据账本
├── portfolio/ # 交易记录
├── config/ # 用户配置,不入 git
├── tools/ # podcast / daily-watch 工具
└── system/ # skills / integrations / scripts / templates</details>
<details> <summary><b>🗄️ 数据源与边界</b></summary>
| 名称 | 类型 | 用途 | 是否内置 |
|---|---|---|---|
| Nasdaq | 无 key 降级源 | 美股基础行情 | 是 |
| Finnhub | 免费账户 / 付费 | 美股行情备选;免费端点和额度以官方账户为准 | 是,需 key |
| EODHD | 免费小额度 / 付费 | 港股、韩国、芬兰等最近 EOD 备用;免费账户当前 20 次/日,不是实时价 | 是,需 key |
| yfinance | 无 Key | 多市场个人研究备用;非官方 Yahoo SDK,需额外安装 | 是,需开启 |
| tushare | 积分 / 单独权限 | A 股行情;当前 120 积分档可取非复权日线 | 是,需 token |
| FMP | 免费 Basic / 付费 | 免费档适合 EOD/profile 测试;全球覆盖和高级数据取决于套餐 | 是,需 key |
| Longbridge Skill | 外部 Agent 扩展 | 多市场查询、筛选、研究 | 否,独立安装授权 |
| websearch | Agent 能力 | 补充新闻、资料、公司信息 | 取决于 agent |
重要边界:本项目不做自动交易,不承诺数据源永远免费,不把 AI 输出包装成投资建议。缺少 API key 时优雅降级,不会让用户误以为工作区坏了。
</details>
<details> <summary><b>💻 常用命令</b></summary>
python3 system/scripts/check_workspace.py # 总检查
python3 system/scripts/workspace_status.py # 当前研究、证据和待办
python3 system/scripts/research_preflight.py --root . --context "你的研究问题和关键词" --research-id R-... --research-file output/research/报告.md --record # 扫描 Wiki 并更新研究报告
python3 system/scripts/knowledge_lifecycle.py --root . summary # 知识状态、到期复审和晋级候选
python3 system/scripts/knowledge_lifecycle.py --root . rebuild-index --apply # 重建三个短索引
python3 system/scripts/review_queue.py list # 查看持久待确认队列
python3 system/scripts/wiki_tagger.py --root . backfill wiki # 预览历史 wiki 补标
python3 -m unittest discover -s tests -v # 运行测试
python3 tools/daily-watch/scripts/check_setup.py --init # 初始化日报配置
python3 tools/podcast/scripts/fetch_podcasts.py --help # 播客工具帮助Python 工具需要 3.10+。Windows 用户用 python 代替 python3,或 py -3 指定版本。
</details>
<details> <summary><b>❓ 新手常见问题</b></summary>
Q:我不会写代码,能用这个项目吗?
可以。Core Mode 只需要把文本放进 inbox/,然后用自然语言告诉 AI agent 做什么。
Q:一定要用 Codex / Claude Code 吗? 不一定。任何能读写文件的 AI agent 都可以。Codex 和 Claude Code 效果最好,Cursor 和 Cline 也可以。
Q:安装 Hub 后,还要单独安装 daily-watchlist 或 pod2wiki 吗?
不需要。两套工具及其配置模板已经包含在 tools/daily-watch/ 和 tools/podcast/;你只需要按用途安装可选依赖,并按 免费数据源接入指南 选择是否配置 key。
Q:wiki 越来越大怎么办?
用 Obsidian 打开 wiki/ 目录做可视化管理,或让 AI agent 帮你整理归档。
Q:API key 会不会泄露?
config/ 已被 .gitignore 排除,不会被 git 提交。
Q:自动标签会把什么发给大模型?
会把当前 wiki 页面的 frontmatter 和正文发送给你在 config/pod2wiki.env 选择的模型服务商,只用于返回结构化标签。敏感材料应先确认所选服务商的数据政策,或跳过自动标签。
Q:可以和 Obsidian 一起用吗?
可以。安装时选择 Obsidian(或在已有 vault 中安装),Hub 会增加 reading-hub.md 和 reading-hub.base,用 9 个动态视图汇总待读内容;可直接在表格中填写 已读 / 精读 / 跳过,并优先按资料自身日期而不是本机文件时间排序。默认不安装,也不影响非 Obsidian 用户。需要 Obsidian 1.9+ 的 Bases 功能。
更多问题见 TROUBLESHOOTING.md。
</details>
Roadmap
更多真实研究工作流样例
更强的 screen 预设
更完善的 daily-watch 降级策略
证据来源质量分级和跨来源事件去重
知识索引的自动健康检查与过期提示
Contributing
欢迎提 issue / PR,尤其是新 agent 适配、研究报告模板、数据源接入、真实使用摩擦点、README / 教程 / 安装流程改进。
Star History
如果这个项目对你有帮助,欢迎点一下 ⭐ Star。它会帮助更多需要"长期 AI 工作流"的人发现这个项目,也会让我知道哪些方向值得继续做。
Disclaimer
AI Workspace Hub 是个人研究与知识管理工具,不构成投资建议。所有市场数据、公司信息、财务数字、新闻和监管信息都应以原始来源为准。
<!-- 文件说明:项目首页、价值介绍和快速上手。 -->
为什么已经在 Agent 中使用,还可能需要模型 Key?
交互整理可以由当前 Agent 完成:播客工具使用 --agent-handoff 准备原文与待处理队列,Agent 阅读原文后完成摘要和标签,不要求另配模型 Key。脚本在后台独立生成摘要才需要模型 API。两种方式的步骤与完成标准见 Podcast 流程。
tools/daily-watch/README.md
Daily Watch Tool
日报监控 + 假设追踪 + 交易记录工具。获取股票行情,生成每日报告,管理投资假设。
原始项目:daily-watchlist
快速使用
以下命令默认使用 python3,且需要 Python 3.10+。先运行 python3 --version;如果版本低于 3.10,请改用 python3.10 / python3.11 / python3.12,或安装新版 Python。如果你的环境只有 python 且版本 >=3.10,把命令里的 python3 替换成 python 即可。
# 1. 安装依赖
python3 -m pip install -r tools/daily-watch/requirements.txt
# 2. 初始化配置(复制示例文件到 config/)
python3 tools/daily-watch/scripts/check_setup.py --init
# 3. 编辑 config/daily-watchlist.env,填入你的 API key(可选)
# 4. 生成日报
python3 tools/daily-watch/scripts/generate_daily_report.py
# 5. 查询指定股票 profile
python3 tools/daily-watch/scripts/fetch_market_data.py --profile NVDA,AAPL
# 6. 查看假设状态
python3 tools/daily-watch/scripts/sync_hypothesis.pycheck_setup.py --init 会把 config-examples/ 下的示例文件复制到 config/,已有的文件不会被覆盖。之后修改 config/ 下的文件即可。
依赖
核心依赖:
python3 -m pip install -r tools/daily-watch/requirements.txt包含 requests、python-dotenv、pyyaml。
A 股数据需要额外装 tushare:
python3 -m pip install -r tools/daily-watch/requirements-tushare.txt目录结构
tools/daily-watch/
├── config-examples/ # 示例配置,--init 时复制到 config/
│ ├── daily-watchlist.example.yaml
│ ├── daily-watchlist.env.example
│ ├── daily-watchlist.watchlist.example.md
│ ├── hypothesis-tracker.example.yaml
│ └── hypothesis-tracker.rules.example.md
├── scripts/ # 所有可执行脚本
│ ├── check_setup.py # 环境检查 + 初始化
│ ├── generate_daily_report.py # 生成日报(主入口)
│ ├── fetch_market_data.py # 行情拉取 + 股票 profile
│ ├── fetch_macro_data.py # 宏观数据(VIX/SPY/QQQ/GLD/WTI/BTC)
│ ├── sync_hypothesis.py # 假设状态同步
│ ├── trade_stats.py # 交易统计
│ └── workspace_paths.py # 路径解析(被其他脚本引用)
└── templates/ # 报告模板
├── daily-watchlist-report-template.md
├── hypothesis-tracker-hypothesis-template.md
├── hypothesis-tracker-journal-template.md
└── hypothesis-tracker-report-template.md运行后在 workspace 根目录下生成:
config/ # 实际配置文件(从 config-examples/ 复制)
output/daily-watch/ # 生成的日报
└── 2026-06/
└── 2026-06-24.md
hypothesis/ # 假设文件(H1.md, H2.md, ...)
evidence/ # 独立证据账本(按月分目录)
portfolio/ # 交易和持仓
├── trades.csv
├── holdings.csv
└── journal/配置
示例文件在 tools/daily-watch/config-examples/,运行 check_setup.py --init 复制到 config/ 后使用:
| 文件 | 用途 |
|---|---|
daily-watchlist.yaml | 主配置(模块开关、阈值、关注主题) |
daily-watchlist.env | API key |
daily-watchlist-watchlist.md | 股票池 |
hypothesis-tracker.yaml | 假设追踪配置(确定性阈值、交易规则、风控) |
hypothesis-tracker.rules.md | 投资纪律(文本,供假设决策参考) |
配置文件格式
主配置文件 config/daily-watchlist.yaml,所有字段均有默认值,可以只写需要改的部分。
最小配置
只需指定市场类型即可运行:
market: us完整配置
# 市场类型:us / cn / hk / mixed
market: mixed
# 模块开关:关闭后对应章节不会拉取数据
modules:
macro: true # 宏观数据(VIX/SPY/QQQ/GLD/WTI/BTC)
earnings: true # 财报日历(需要 FMP key)
focus_areas: true # 重点主题
wiki: auto # wiki 联动
# 报告生成参数
reporting:
model_profile: domestic # default / domestic(选择 LLM profile)
secondary_verify: true # 国内模型时建议开启二次验证
theme_min_score: 3 # 主题命中最低分
theme_min_hits: 2 # 主题命中最低次数
# 异动阈值(涨跌幅超过此值的股票会进入"重点异动")
thresholds:
large_cap_move: 3 # 大盘股异动阈值 %
small_cap_move: 7 # 中小盘股异动阈值 %
# 假设追踪
hypothesis_tracking:
enabled: true
directory: hypothesis # 假设文件存放目录
max_matches: 8 # 日报中最多展示的信号数
auto_writeback: true # 自动登记证据,并在假设时间线追加引用
suggest_new_hypothesis_threshold: 2 # 重复主题超过此数建议建立新假设
# 重点关注领域(最多 3 个)
focus_areas:
- name: "AI 与数据中心"
keywords: ["AI", "data center", "GPU", "inference", "LLM", "算力", "大模型"]
required_any: ["AI", "data center", "GPU", "inference"] # 至少命中一个才算
exclude: ["airline", "ceasefire"] # 排除关键词字段说明:
thresholds:用于自动识别异动股。大盘股(Market Cap = Large)用large_cap_move,其余用small_cap_move。focus_areas.required_any:假设必须命中其中至少一个关键词才会被归入该主题。不设则只看keywords。hypothesis_tracking.auto_writeback:开启后,脚本把当日触发的异动/财报信号写入evidence/,再把证据 ID 引用追加到对应假设。不会自动改变假设确定性或状态。
股票池格式
股票池文件 config/daily-watchlist-watchlist.md 是标准 Markdown 表格。按行业分组,每组一个二级标题 + 一张表。
格式要求
前五列(Ticker / Name / Market / Market Cap / Category)必填
后三列(Tier / Hypothesis / Notes)可选
每个行业分组用
## 行业名作为二级标题,下面跟一张表表头行和分隔行(
|---|---|)必须有
示例
## Technology
| Ticker | Name | Market | Market Cap | Category | Tier | Hypothesis | Notes |
|------|------|------|----------|------|------|------------|-------|
| NVDA | NVIDIA | US | Large | Technology | HOT | H1 | GPU supply chain bellwether |
| MSFT | Microsoft | US | Large | Technology | HOT | H1 | Cloud + AI infrastructure |
| AAPL | Apple | US | Large | Technology | WARM | H1 | AI device cycle / services |
## Energy
| Ticker | Name | Market | Market Cap | Category | Tier | Hypothesis | Notes |
|------|------|------|----------|------|------|------------|-------|
| XOM | Exxon Mobil | US | Large | Energy | WARM | H3 | Oil cycle monitor |字段说明
| 字段 | 说明 | 取值 |
|---|---|---|
| Ticker | 股票代码 | 美股直接写 NVDA;A 股写 601857.SH / 000001.SZ;港股写 0700.HK |
| Market | 市场 | US / CN / HK / KR / FI 等 |
| Market Cap | 市值分类 | Large / Mid / Small(影响异动阈值) |
| Category | 行业 | 任意文本,用于报告分组 |
| Tier | 监控热度 | HOT(重点)/ WARM(跟踪)/ COLD(基准) |
| Hypothesis | 关联假设 | 对应 hypothesis/ 下的假设 ID,如 H1、H2 |
Ticker 后缀规则:脚本用后缀判断数据源。.SH/.SZ 走 tushare(A 股),.HK 走 tushare(港股),无后缀默认走 FMP/Nasdaq(美股)。后缀必须大写。
输出示例
运行 generate_daily_report.py 后在 output/daily-watch/YYYY-MM/YYYY-MM-DD.md 生成一份 Markdown 日报。旧工作区若已有 daily-watchlist-reports/,会继续写入旧位置,避免拆分历史记录。
报告结构
# 每日监控简报 - 2026-06-24(星期二)
## 市场概览
VIX / SPY / QQQ / GLD / WTI / BTC 的当前价和涨跌幅表格
市场情绪摘要
## 个股异动
### 重点异动 ← 超过阈值的股票,附分类和摘要占位
### 其他异动 ← 涨跌幅排序的其他股票(前 5)
## 财报跟踪
### 已披露 ← 本周已出财报的 watchlist 股票
### 本周待披露 ← 本周即将出财报的 watchlist 股票
## 重点主题 ← 按 focus_areas 配置生成的主题区块
## 假设联动
### 已追踪假设概览 ← hypothesis/ 下所有假设的状态表
### 今日触发信号 ← 异动/财报/主题与假设的交叉命中
### 操作建议
## 信息来源 ← 本次拉取的数据源清单报告由脚本生成数据骨架。新闻检索和原因分析部分是占位符,设计上由 Claude Code 通过 WebSearch 补充。
证据登记与假设联动
开启 auto_writeback 后,如果当日有股票异动或财报事件命中了某条假设的关联标的,脚本会先创建 evidence/YYYY-MM/E-*.md,再在对应 hypothesis/H*.md 的“证据时间线”追加引用,格式如:
### 2026-06-24
- 🟡 **[DW-2026-06-24-mover-nvda-h1] E-2026-06-24-mover-nvda-h1** - NVDA 今日涨跌幅 +4.52%,分类 Technology
- 证据:evidence/2026-06/E-2026-06-24-mover-nvda-h1.md
- 来源:output/daily-watch/2026-06/2026-06-24.md
- 影响:待复盘;本条引用不改变 frontmatter 中的确定性或状态。同一天同一信号不会重复写入(用 dedup_key 和 marker 去重)。
零 Key 运行
没有配置任何 API key 时(daily-watchlist.env 保持默认的 your_* 占位符),工具仍然可以运行:
美股:自动 fallback 到 Nasdaq 无 Key 源,能拿到基础行情(最新价、涨跌幅)
宏观数据:需要 FMP key,没有则宏观表格全部显示
N/AA 股 / 港股:需要 tushare token,没有则对应股票无数据
财报日历:需要 FMP key,没有则财报章节为空
报告骨架:无论有没有 key,报告文件都会生成,缺失的数据位显示
N/A或[待补充]
所以最低成本的试跑路径是:只放几只美股到 watchlist,不配任何 key,直接跑。
数据源
| 数据源 | 市场 | 费用 | 必要性 | env key |
|---|---|---|---|---|
| FMP | 免费 Basic 以美股 EOD/profile 测试为主;扩展市场看套餐 | 免费 250 次/日 / 付费 | 可选(财报、宏观等功能需要) | FMP_API_KEY |
| tushare | A 股(.SH/.SZ)、港股(.HK) | 120 积分非复权日线当前 0 元;其他看权限 | A 股/港股需要 | TUSHARE_TOKEN |
| Nasdaq | 美股基础行情 | 无 Key | 自动 fallback(FMP 未返回时) | 无 |
| Finnhub | 美股 | 免费账户 / 付费 | 可选 fallback | FINNHUB_API_KEY |
| EODHD | 港股、韩国、芬兰等最近 EOD | 免费 20 次/日 / 付费 | 可选 fallback;不是实时价 | EOD_API_KEY |
| yfinance | 多市场 | 无 Key;个人研究/教育用途 | 可选 fallback(需额外安装) | ENABLE_YFINANCE=true |
完整接入步骤、官方入口和使用边界见工作区根目录的 DATA-SOURCES.md。
Fallback 顺序(单只股票 FMP 未返回时):Nasdaq → Finnhub → EOD → yfinance。每个源按 env key 是否配置自动决定是否尝试。
yfinance 后缀映射:Yahoo 对上交所使用 .SS 后缀,脚本会自动把 watchlist 里的 601857.SH 映射为 601857.SS 再查询;.SZ / .HK 与 Yahoo 一致,无需转换。watchlist 中仍然统一写 tushare 风格的 .SH。
Longbridge Skill/CLI 是独立 Agent 扩展,不是本脚本的内置数据源。需要时按官方说明另行安装和授权。
环境变量
配置文件 config/daily-watchlist.env:
# 可选:Financial Modeling Prep(免费 Basic 功能有限;扩展市场、财报和宏观看套餐)
FMP_API_KEY=your_fmp_api_key
# 可选:Tushare Pro,用于 A 股(.SH/.SZ)和港股(.HK)
TUSHARE_TOKEN=your_tushare_token
# 备用行情源(全部可选)
FINNHUB_API_KEY=
EOD_API_KEY=
ENABLE_YFINANCE=值为空或以 your_ 开头的 key 会被自动跳过,不会触发 API 调用。
脚本说明
| 脚本 | 用途 | 输出 |
|---|---|---|
check_setup.py | 检查 Python 版本、依赖包、配置文件、API 连通性 | 终端打印检查结果 |
check_setup.py --init | 同上 + 把示例配置复制到 config/ | 终端打印 + 创建文件 |
generate_daily_report.py | 拉取行情 + 宏观 + 假设,生成日报 | JSON({"report_path": "..."})到 stdout |
fetch_market_data.py | 拉取 watchlist 所有股票行情 + 异动 + 财报 | JSON 到 stdout |
fetch_market_data.py --profile NVDA,AAPL | 查询指定股票的公司 profile | JSON 到 stdout |
fetch_macro_data.py | 拉取宏观指标(VIX/SPY/QQQ/GLD/WTI/BTC) | JSON 到 stdout |
sync_hypothesis.py | 扫描 hypothesis/ 下的假设文件,输出状态汇总 | 终端输出 |
trade_stats.py | 读取 portfolio/trades.csv 计算交易统计 | 终端输出 |
所有数据脚本的结构化数据输出到 stdout(JSON),日志和警告输出到 stderr。
常见问题
python3 不是内部或外部命令
Windows 上通常只有 python。确认版本 >= 3.10 后把所有命令里的 python3 换成 python:
python --version # 确认 >= 3.10
python tools/daily-watch/scripts/check_setup.py --inittushare 返回 500 错误
通常是 token 权限不够。tushare 的部分接口需要积分。到 tushare 个人中心 检查积分和接口权限。daily_basic(用于 A 股市值)需要 120 积分以上。
某只股票没有数据返回
按以下顺序排查:
Ticker 格式:A 股必须带后缀(
601857.SH不是601857),港股必须带.HK(0700.HK不是700),后缀必须大写数据源:A 股 / 港股需要 tushare token;纯美股无 key 时 Nasdaq 源能覆盖大部分
非交易时间:脚本取最近 5-14 个自然日内的数据,周末和长假也能拿到最近一个交易日的数据
FMP 限流与覆盖:免费 Basic 当前有 250 次/天限制,且不是免费全球全功能;股票池太大或请求高级端点时会缺数据
找不到配置文件
Error: Could not locate workspace root脚本从脚本文件自身所在位置(tools/daily-watch/scripts/)逐级向上查找包含 workspace/workspace-config.md 或 config/daily-watchlist.yaml 的目录作为 workspace 根——与你在哪个目录下运行命令(cwd)无关。出现此错误说明脚本所在目录的所有上级目录里都没有这两个标记,请确保:
已运行
check_setup.py --init在 workspace 根生成config/目录脚本文件仍位于 workspace 内(
tools/daily-watch/scripts/),没有被单独拷贝到 workspace 之外
报告中数据全是 N/A
说明所有数据源都没有返回有效数据。运行 check_setup.py 看哪些源是通的:
python3 tools/daily-watch/scripts/check_setup.py输出会逐项标注 [OK] / [FAIL] / [WARN],包括 FMP key 连通性测试和 tushare token 验证。
193 files · 8 not served here
- .gitattributes
- .github/workflows/ci.yml
- .gitignore
- AGENTS.md
- ARCHITECTURE.md
- ATTRIBUTION.md
- CHANGELOG.md
- CLAUDE.md
- DATA-SOURCES.md (not served here)
- INSTALL-FOR-AI.md
- LICENSE
- README.md
- SMOKE-TEST.md
- START-HERE.md
- TROUBLESHOOTING.md
- config/.gitkeep
- config/README.md
- docs/demo.gif (not served here)
- docs/gen_demo_gif.py
- evidence/README.md
- examples/README.md
- examples/knowledge-lifecycle-cycle-top/README.md
- examples/knowledge-lifecycle-cycle-top/wiki/explorations/lithium-cycle-review.md
- examples/knowledge-lifecycle-cycle-top/wiki/explorations/solar-cycle-review.md
- examples/knowledge-lifecycle-cycle-top/wiki/patterns/capacity-expansion-cycle-top.md
- examples/knowledge-lifecycle-cycle-top/wiki/sources/lithium-capacity-expansion.md
- examples/knowledge-lifecycle-cycle-top/wiki/sources/lithium-participant-pressure.md
- examples/knowledge-lifecycle-cycle-top/wiki/sources/solar-equipment-orders.md
- examples/knowledge-lifecycle-cycle-top/wiki/sources/solar-leader-slowdown.md
- examples/knowledge-lifecycle-cycle-top/workspace/workspace-config.md
- examples/smoke-test/output/first-ingest/2026-06-05-smoke-test.md
- examples/smoke-test/output/pdf-ingest/2026-06-05-smoke-test.md
- examples/smoke-test/output/wiki-read-priority/2026-06-05-answer-from-wiki.md
- examples/smoke-test/wiki/concepts/ai-workspace-file-protocol.md
- examples/smoke-test/wiki/concepts/pdf-to-md-ingest.md
- examples/smoke-test/wiki/explorations/2026-06-05-first-ingest-smoke-test.md
- examples/smoke-test/wiki/explorations/2026-06-05-pdf-ingest-smoke-test.md
- examples/smoke-test/wiki/raw/2026-06-05-first-note.md
- examples/smoke-test/wiki/raw/2026-06-05-sample-ai-workspace.md
- examples/smoke-test/wiki/raw/2026-06-05-sample-ai-workspace.pdf (not served here)
- examples/smoke-test/wiki/sources/2026-06-05-first-note.md
- examples/smoke-test/wiki/sources/2026-06-05-sample-ai-workspace.md
- hypothesis/README.md
- inbox/README.md
- inbox/first-note.md
- inbox/sample-ai-workspace.pdf (not served here)
- output/.gitkeep
- output/README.md
- output/daily-watch/README.md
- output/pod2wiki/.gitkeep
- output/research/.gitkeep
- output/research/preflight/.gitkeep
- output/screen/.gitkeep
- portfolio/README.md
- portfolio/journal/.gitkeep
- requirements-pdf.txt
- requirements.lock
- requirements.txt
- system/README.md
- system/integrations/_template.md
- system/integrations/daily-watchlist.md
- system/integrations/hypothesis-tracker.md
- system/integrations/object-model.md
- system/integrations/personal-wiki.md
- system/integrations/pod2wiki.md
- system/interfaces/README.md
- system/lib/__init__.py
- system/lib/llm_client.py
- system/managed-files.json
- system/scripts/check_workspace.py
- system/scripts/install_workspace.py
- system/scripts/knowledge_lifecycle.py
- system/scripts/pdf_to_md.py
- system/scripts/prune_active_context.py (not served here)
- system/scripts/research_preflight.py
- system/scripts/review_queue.py
- system/scripts/upgrade_workspace.py
- system/scripts/wiki_tagger.py
- system/scripts/workspace_doctor.py
- system/scripts/workspace_status.py
- system/skills/_template.md
- system/skills/daily-watch-ht.md
- system/skills/daily-watch-import.md
- system/skills/daily-watch.md
- system/skills/first-ingest.md
- system/skills/first-research.md
- system/skills/hypothesis-review.md
- system/skills/knowledge-lifecycle.md
- system/skills/pdf-ingest.md
- system/skills/podcast.md
- system/skills/post-install-cleanup.md
- system/skills/research-closeout.md
- system/skills/research.md
- system/skills/screen.md
- system/skills/structure-health.md
- system/skills/upgrade-workspace.md
- system/skills/workspace-doctor.md
- system/skills/workspace-status.md
- system/templates/AGENTS.md
- system/templates/CLAUDE.md
- system/templates/active-context.md
- system/templates/evidence-entry.md
- system/templates/friction-log.md
- system/templates/interfaces-README.md
- system/templates/reading-hub.base
- system/templates/reading-hub.md
- system/templates/research-profile.md
- system/templates/research-report.md
- system/templates/review-queue.md
- system/templates/workspace-config.md
- tests/README.md
- tests/_test_paths.py
- tests/conftest.py
- tests/test_agent_handoff.py
- tests/test_daily_watch_fixes.py
- tests/test_data_coverage.py
- tests/test_first_research_e2e.py
- tests/test_install_workspace.py
- tests/test_knowledge_lifecycle.py
- tests/test_llm_config.py
- tests/test_no_key_degradation.py
- tests/test_podcast_fixes.py
- tests/test_prune_active_context.py
- tests/test_repository_contract.py
- tests/test_research_preflight.py
- tests/test_wiki_tagger.py (not served here)
- tests/test_workspace_paths.py
- tests/test_workspace_state.py
- tools/README.md
- tools/__init__.py
- tools/daily-watch/README.md
- tools/daily-watch/__init__.py
- tools/daily-watch/config-examples/daily-watchlist.env.example
- tools/daily-watch/config-examples/daily-watchlist.example.yaml
- tools/daily-watch/config-examples/daily-watchlist.watchlist.empty.md
- tools/daily-watch/config-examples/daily-watchlist.watchlist.example.md
- tools/daily-watch/config-examples/hypothesis-tracker.example.yaml
- tools/daily-watch/config-examples/hypothesis-tracker.rules.example.md
- tools/daily-watch/pyproject.toml
- tools/daily-watch/requirements-tushare.txt
- tools/daily-watch/requirements.txt
- tools/daily-watch/scripts/__init__.py
- tools/daily-watch/scripts/check_setup.py (not served here)
- tools/daily-watch/scripts/fetch_macro_data.py
- tools/daily-watch/scripts/fetch_market_data.py (not served here)
- tools/daily-watch/scripts/generate_daily_report.py
- tools/daily-watch/scripts/sync_hypothesis.py
- tools/daily-watch/scripts/trade_stats.py
- tools/daily-watch/scripts/workspace_paths.py
- tools/daily-watch/templates/daily-watchlist-report-template.md
- tools/daily-watch/templates/hypothesis-tracker-hypothesis-template.md
- tools/daily-watch/templates/hypothesis-tracker-journal-template.md
- tools/daily-watch/templates/hypothesis-tracker-report-template.md
- tools/podcast/.env.example
- tools/podcast/README.md
- tools/podcast/__init__.py
- tools/podcast/examples/config.ai-investing.yaml
- tools/podcast/pyproject.toml
- tools/podcast/requirements-transcribe.txt
- tools/podcast/requirements.txt
- tools/podcast/scripts/__init__.py
- tools/podcast/scripts/fetch_podcasts.py
- tools/podcast/scripts/llm_client.py
- tools/podcast/scripts/podcast_batch_summarize.py
- tools/podcast/scripts/podcast_feed_registry.py
- tools/podcast/scripts/podcast_rss_transcribe.py
- tools/podcast/scripts/proxy_config.py
- wiki/README.md
- wiki/_schema.md
- wiki/concepts/.gitkeep
- wiki/entities/.gitkeep
- wiki/explorations/.gitkeep
- wiki/explorations/_index.md
- wiki/explorations/_template.md
- wiki/false-beliefs.md
- wiki/patterns/_index.md
- wiki/patterns/_template.md
- wiki/raw/.gitkeep
- wiki/rules.md
- wiki/rules/_index.md
- wiki/rules/_template.md
- wiki/sources/.gitkeep
- workspace/README.md
- workspace/archive/README.md
- workspace/meta/active-context.md
- workspace/meta/friction-log.md
- workspace/monitoring/README.md
- workspace/monitoring/watchlist.md
- workspace/patterns/_index.md
- workspace/patterns/_template.md
- workspace/research-profile.md
- workspace/review-queue.md
- workspace/workspace-config.md
Advantages
- Local-first: the memory stays in files or a database on your own machine (a rule-derived fact from the brain’s files, evidence: README.md)
- Plain markdown memory that you can read and edit yourself (a rule-derived fact from the brain’s files, evidence: wiki)
- No API key is named in its files (a rule-derived fact from the brain’s files, evidence: README.md)
- Open licence (MIT) (a rule-derived fact from the brain’s files)
Limitations
- No ZIP download: install it from its source (a rule-derived fact from the brain’s files)
Security
Risk level: Low risk
This brain runs
Agent instructions that run or fetch something (24)
AGENTS.md:工具代码在 `tools/` 目录下。首次使用时 agent 检查依赖,缺什么用 `python3 -m pip install ...` 安装;如果环境只有 `python`,再替换成 `python -m pip ...`。AGENTS.md:用户说“看看现在该做什么”时,运行 `python system/scripts/workspace_status.py`(macOS/Linux 可用 `python3`)。AGENTS.md:python3 system/scripts/prune_active_context.py # dry-run,先看会剪什么AGENTS.md:python3 system/scripts/prune_active_context.py --apply # 确认后执行AGENTS.md:装好上手后一次性瘦身:`system/skills/post-install-cleanup.md`(清安装脚手架 + 精简必读文件)。AGENTS.md:active-context 三道闸门:`python3 system/scripts/prune_active_context.py --apply`。CLAUDE.md:工具代码在 `tools/` 目录下。首次使用时 agent 检查依赖,缺什么用 `python3 -m pip install ...` 安装;如果环境只有 `python`,再替换成 `python -m pip ...`。CLAUDE.md:用户说“看看现在该做什么”时,运行 `python system/scripts/workspace_status.py`(macOS/Linux 可用 `python3`)。CLAUDE.md:python3 system/scripts/prune_active_context.py # dry-run,先看会剪什么CLAUDE.md:python3 system/scripts/prune_active_context.py --apply # 确认后执行CLAUDE.md:装好上手后一次性瘦身:`system/skills/post-install-cleanup.md`(清安装脚手架 + 精简必读文件)。CLAUDE.md:active-context 三道闸门:`python3 system/scripts/prune_active_context.py --apply`。system/templates/AGENTS.md:工具代码在 `tools/` 目录下。首次使用时 agent 检查依赖,缺什么用 `python3 -m pip install ...` 安装;如果环境只有 `python`,再替换成 `python -m pip ...`。system/templates/AGENTS.md:用户说“看看现在该做什么”时,运行 `python system/scripts/workspace_status.py`(macOS/Linux 可用 `python3`)。system/templates/AGENTS.md:python3 system/scripts/prune_active_context.py # dry-run,先看会剪什么system/templates/AGENTS.md:python3 system/scripts/prune_active_context.py --apply # 确认后执行system/templates/AGENTS.md:装好上手后一次性瘦身:`system/skills/post-install-cleanup.md`(清安装脚手架 + 精简必读文件)。system/templates/AGENTS.md:active-context 三道闸门:`python3 system/scripts/prune_active_context.py --apply`。system/templates/CLAUDE.md:工具代码在 `tools/` 目录下。首次使用时 agent 检查依赖,缺什么用 `python3 -m pip install ...` 安装;如果环境只有 `python`,再替换成 `python -m pip ...`。system/templates/CLAUDE.md:用户说“看看现在该做什么”时,运行 `python system/scripts/workspace_status.py`(macOS/Linux 可用 `python3`)。system/templates/CLAUDE.md:python3 system/scripts/prune_active_context.py # dry-run,先看会剪什么system/templates/CLAUDE.md:python3 system/scripts/prune_active_context.py --apply # 确认后执行system/templates/CLAUDE.md:装好上手后一次性瘦身:`system/skills/post-install-cleanup.md`(清安装脚手架 + 精简必读文件)。system/templates/CLAUDE.md:active-context 三道闸门:`python3 system/scripts/prune_active_context.py --apply`。
- Low risk: network-instructions (AGENTS.md:52)
- Low risk: network-instructions (CLAUDE.md:52)
- Low risk: scripts-present (system/scripts/prune_active_context.py)
- Low risk: network-instructions (system/templates/AGENTS.md:52)
- Low risk: network-instructions (system/templates/CLAUDE.md:52)
Attribution and licence
- First committed by
Benboerba620
- Publisher
- Benbor (Community)
- Source
- Benboerba620/ai-workspace-hub · commit e01a41a
- Licence
- MIT License (files served here)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
- Contributors
- Benboerba620
AutoGineer is not affiliated with or endorsed by Benboerba620.
Install from source
8 of its files are not served here, so there is no ZIP. Benboerba620/ai-workspace-hub at e01a41a