First Demo example using the AI-OS architecture. Help the individual inverster, manage their Trading Emotion. 采用 AI OS 架构思路实现的一个AI OS 实例,为个人投资者,管理交易方式,提供情绪价值。 Rule One AI agent OS for retail investor 旺财AI操作系统 - 帮交易者把情绪波动,整理成可复盘的秩序
A structured post-market review agent for traders.
No stock picks, no trading advice — only one executable rule for tomorrow.
Rule One is an AI agent focused on post-market review.
It does not:
- recommend stocks
- give buy/sell advice
- predict the market
- promise returns
- push intraday signals
It does one thing only:
It helps users turn a chaotic trading day into one executable rule for tomorrow.
Each review session always produces three fixed outputs:
- Today's key bias
- One thing done well today
- One rule for tomorrow (Rule One)
Most trading tools try to answer questions like:
- What should I buy?
- What should I sell?
- What will the market do next?
But many traders do not mainly lack information.
They lack:
- a way to review the day after the close
- a way to see their own behavioral bias clearly
- a way to improve one thing at a time
Rule One is a behavior system, not a market system.
- ❌ Stock recommendations
- ❌ Buy/sell timing advice
- ❌ Market prediction
- ❌ Return promises
- ❌ Intraday signal pushing
- ❌ Addictive emotional companionship
- ✅ Post-market review
- ✅ Structured reflection of facts / judgments / emotions / actions
- ✅ Detect one primary bias only
- ✅ Generate one rule only
- ✅ Provide low-stimulation, non-shaming feedback
I chased in the morning, added on the pullback, and ended the day with a heavy loss.
I knew I should not add, but I was afraid of missing out.
Today's key bias: impulsive averaging down
One thing done well: I did not increase my position further near the close
Rule One for tomorrow: If the reason to add is not new information, do not add.
Market close
→ Emotion check-in
→ Input today's facts
→ AI structures the review
→ AI detects the primary bias
→ AI generates Rule One
→ User confirms and saves
→ Stored into history
- Finish in 3–7 minutes
- Low cognitive load
- Strongly structured
- Fixed and reviewable output
- No expansion into market analysis
Rule One is for traders who:
- feel mentally chaotic after market close
- know the problem is execution, but struggle to review consistently
- do not want more predictions, only better discipline
- want to improve one thing per day instead of receiving endless advice
- Structure over open-ended chat
- Order over emotional dependency
- One rule over many suggestions
- Behavior feedback over market judgment
- Safety boundary over “looking smart”
- Long-term behavior mirror over short-term stimulation
- Daily Review
- History
- Rule Feed
- Weekly Pattern
- Emotion recognition
- Structured extraction
- Primary bias detection
- Rule generation
- Safety gate
The market is closed. Let's organize today.
- React / Next.js
- TypeScript
- Tailwind CSS
- Node.js / NestJS or Python / FastAPI
- REST API or GraphQL
- PostgreSQL
- Redis
- S3-compatible object storage
- LLM Router
- Prompt Pipeline
- Structured Output Parser
- Policy / Safety Filter
- OpenTelemetry
- Prometheus
- Grafana
- Sentry
Client Layer
└─ Web / iOS / Android / H5
Application Layer
└─ Auth / Review API / History / Rule Archive / Weekly Report
AI Orchestration
└─ Emotion / Structurer / Bias Detector / Rule Generator / Safety Gate
Data Storage
└─ PostgreSQL / Redis / Object Storage
Safety & Compliance
└─ Content Filter / Policy / Audit
Monitoring & Ops
└─ Logs / Metrics / Alerts / Review Quality Dashboard
git clone <repo-url>
cd rule-onepnpm install
# or
npm install
# or
yarnCreate .env.local:
NEXT_PUBLIC_APP_URL=http://localhost:3000
DATABASE_URL=postgres://user:password@localhost:5432/ruleone
REDIS_URL=redis://localhost:6379
OBJECT_STORAGE_ENDPOINT=
OBJECT_STORAGE_BUCKET=
LLM_API_KEY=
SAFETY_API_KEY=pnpm dev
# or
npm run devOpen http://localhost:3000
POST /api/reviews
Content-Type: application/json{
"emotion_label": "regret",
"input_mode": "text",
"raw_input": "I chased in the morning, added on the pullback, and ended the day with a heavy loss."
}GET /api/reviews/{session_id}{
"emotion": "regret",
"structured_review": {
"facts": ["chased in the morning", "added on the pullback", "heavy loss near the close"],
"judgments": ["expected continuation"],
"emotions": ["fear of missing out", "regret"],
"actions": ["chasing", "adding"]
},
"main_bias": "impulsive averaging down",
"did_well": "did not increase position further near the close",
"rule_one": "If the reason to add is not new information, do not add."
}The system must hard-block:
- specific stock picks
- buy/sell timing advice
- up/down market predictions
- return promises or implications
- encouraging users to add to positions
- overstated product capability
- addictive, manipulative, or dependency-driven language
- Rule Completion Rate
The percentage of review sessions that successfully produce a Rule One
- Daily review completion rate
- Average review duration
- Drop-off rate
- History revisit rate
- Weekly report view rate
- Rule reuse rate
- Emotion recognition accuracy
- Bias classification accuracy
- Rule executability score
- Safety interception hit rate
- User satisfaction
- Text input
- Structured prompts
- AI structuring
- Single-bias detection
- Rule One generation
- History storage
- Voice input
- Weekly report
- Rule reuse tracking
- Recurring bias detection
- Richer emotional profile
- Pre-market rule confirmation
- In-session cool-down reminders
- Full close-review loop
- Monthly behavior reports
Contributions, ideas, and feedback are welcome.
Suggested ways to contribute:
- improve UX copy
- add multilingual support
- improve bias taxonomy
- improve safety filtering
- improve observability and review quality dashboards
Please read CONTRIBUTING.md before submitting major changes.
The current focus is to validate one thing:
Will users come back daily for a 3–7 minute review and leave with one executable Rule One?
This project is licensed under the MIT license.
See LICENSE for details.
Created by Entropyin Email:
Rule One is a post-market review agent OS built around one daily rule, structured reflection, behavior-bias detection, and a strict no-stock-picks safety boundary.
Rule One 是一个聚焦于 收盘后复盘 的 AI 智能体。
它不负责:
- 推荐股票
- 给买卖建议
- 预测行情
- 承诺收益
- 盘中带单
它只做一件事:
帮助用户把混乱的一天,整理成明天可执行的一条规则。
每次复盘固定输出三项:
- 今日关键偏差
- 今日做对的一点
- 明日一条规则(Rule One)
很多交易工具都在回答这些问题:
- 买什么
- 卖什么
- 市场接下来会怎样
但很多交易者真正缺的,往往不是更多信息,而是:
- 收盘后整理一天的能力
- 看见自己行为偏差的能力
- 一次只改一件事的能力
Rule One 是行为系统,不是市场系统。
- ❌ 个股推荐
- ❌ 买卖时点建议
- ❌ 行情预测
- ❌ 收益承诺
- ❌ 盘中带单
- ❌ 高依赖情绪陪伴
- ✅ 收盘后复盘
- ✅ 将输入整理成“事实 / 判断 / 情绪 / 动作”
- ✅ 只识别 一个 主偏差
- ✅ 只生成 一条 规则
- ✅ 提供低刺激、非羞辱式反馈
今天早盘追高,回落后补仓,尾盘亏损很重。
我知道不该加仓,但还是怕错过。
今日关键偏差:临时加仓
今日做对的一点:尾盘没有继续放大仓位
明日一条规则:如果补仓理由不是新增信息,那么不补仓。
收盘进入
→ 情绪选择
→ 今日事实输入
→ AI 结构化整理
→ AI 识别主偏差
→ AI 生成 Rule One
→ 用户确认并保存
→ 写入历史记录
- 3–7 分钟完成
- 低认知负担
- 强结构化
- 输出固定且可回顾
- 不扩展到行情分析
Rule One 适合这类用户:
- 收盘后容易情绪混乱,不知道怎么复盘
- 明知道问题在执行,却很难持续复盘
- 不想再看“神预测”,只想建立纪律
- 希望每天只改一件事,而不是被塞进很多建议
- 结构化优先于开放式聊天
- 秩序感优先于陪伴感
- 一条规则优先于多条建议
- 行为反馈优先于市场判断
- 安全边界优先于“看起来很聪明”
- 长期行为镜像优先于短期情绪刺激
- Daily Review|每日复盘
- History|历史记录
- Rule Feed|规则档案
- Weekly Pattern|周度行为模式
- 情绪识别
- 结构化提取
- 单主偏差识别
- 明日规则生成
- 安全审查
收盘了,整理今天。
- React / Next.js
- TypeScript
- Tailwind CSS
- Node.js / NestJS 或 Python / FastAPI
- REST API 或 GraphQL
- PostgreSQL
- Redis
- S3 兼容对象存储
- LLM Router
- Prompt Pipeline
- Structured Output Parser
- Policy / Safety Filter
- OpenTelemetry
- Prometheus
- Grafana
- Sentry
客户端层
└─ Web / iOS / Android / H5
应用层
└─ Auth / Review API / History / Rule Archive / Weekly Report
AI 编排层
└─ Emotion / Structurer / Bias Detector / Rule Generator / Safety Gate
数据存储层
└─ PostgreSQL / Redis / Object Storage
安全与合规层
└─ Content Filter / Policy / Audit
监控与运营层
└─ Logs / Metrics / Alerts / Review Quality Dashboard
git clone <repo-url>
cd rule-onepnpm install
# or
npm install
# or
yarn创建 .env.local:
NEXT_PUBLIC_APP_URL=http://localhost:3000
DATABASE_URL=postgres://user:password@localhost:5432/ruleone
REDIS_URL=redis://localhost:6379
OBJECT_STORAGE_ENDPOINT=
OBJECT_STORAGE_BUCKET=
LLM_API_KEY=
SAFETY_API_KEY=pnpm dev
# or
npm run dev打开 http://localhost:3000
POST /api/reviews
Content-Type: application/json{
"emotion_label": "懊悔",
"input_mode": "text",
"raw_input": "今天早盘追高,回落后补仓,尾盘亏损很重。"
}GET /api/reviews/{session_id}{
"emotion": "懊悔",
"structured_review": {
"facts": ["早盘追高", "回落后补仓", "尾盘亏损"],
"judgments": ["预期继续上涨"],
"emotions": ["怕错过", "懊悔"],
"actions": ["追涨", "补仓"]
},
"main_bias": "临时加仓",
"did_well": "尾盘没有继续放大仓位",
"rule_one": "如果补仓理由不是新增信息,那么不补仓。"
}系统必须强拦截:
- 具体股票推荐
- 买卖时点建议
- 上涨下跌预测
- 收益暗示或承诺
- 引导继续加仓
- 夸大系统能力
- 依赖性、操控性、亲密型话术
- Rule Completion Rate
进入复盘后成功生成 Rule One 的比例
- 日复盘完成率
- 平均复盘时长
- 中断率
- 历史页回访率
- 周报查看率
- 规则复用率
- 情绪识别准确率
- 偏差分类准确率
- Rule One 可执行性评分
- 安全拦截命中率
- 用户满意度
- 文本输入
- 固定问题复盘
- AI 结构化整理
- 单偏差识别
- Rule One 输出
- 历史记录保存
- 语音输入
- 周报
- 规则复用追踪
- 高频偏差识别
- 更细情绪画像
- 盘前规则确认
- 盘中冷静提醒
- 收盘复盘闭环
- 月度行为报告
欢迎提交想法、反馈和代码贡献。
建议参与方式:
- 改进产品文案和交互体验
- 增加多语言支持
- 优化偏差标签体系
- 优化安全拦截策略
- 完善监控与复盘质量看板
提交较大改动前,请先阅读 CONTRIBUTING.md。
当前项目重点验证的是一件事:
用户是否愿意每天回来做一次 3–7 分钟复盘,并带走一条可执行的 Rule One。
本项目采用 许可证。
详见 LICENSE。
作者:Entropyin 邮箱:
Rule One 是一个以“每日一条规则”为核心产物、以“结构化复盘”为主流程、以“行为偏差识别”为智能核心、以“非荐股安全边界”为底座的复盘智能体OS。