Skip to content

Commit 6be99b0

Browse files
authored
Merge pull request #28 from StrategyLogic:release/reason-chain
Introduce reason chain feature and JSON validation
2 parents dcfaac2 + d3086fd commit 6be99b0

24 files changed

Lines changed: 1990 additions & 99 deletions

README.md

Lines changed: 24 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1-
# OmenAI
1+
<div align="center">
2+
<h1>OmenAI</h1>
3+
<strong><p>Strategic Reasoning Engine - Analyze, Simulate, Explain.</p></strong>
4+
<p>English | <a href="README.zh.md">中文</a></p>
25

3-
**The AI-Powered Strategic Reasoning Engine.**
6+
![Codecov](https://img.shields.io/codecov/c/github/StrategyLogic/omen) [![Package](https://img.shields.io/github/actions/workflow/status/StrategyLogic/omen/package.yml)](https://img.shields.io/github/actions/workflow/status/StrategyLogic/omen/package.yml) ![License](https://img.shields.io/pypi/l/omenai) ![Downloads](https://img.shields.io/pepy/dt/omenai) ![PyPI Version](https://img.shields.io/pypi/v/omenai)
7+
</div>
48

5-
![Codecov](https://img.shields.io/codecov/c/github/StrategyLogic/omen) [![Package](https://img.shields.io/github/actions/workflow/status/StrategyLogic/omen/package.yml)](https://img.shields.io/github/actions/workflow/status/StrategyLogic/omen/package.yml) ![License](https://img.shields.io/pypi/l/omenai) ![Downloads](https://img.shields.io/pepy/dt/omenai) ![PyPI Version](https://img.shields.io/pypi/v/omenai) ![GitHub Stars](https://img.shields.io/github/stars/StrategyLogic/omen?style=social)
9+
[**Omen**](https://github.com/StrategyLogic/omen) (Chinese: 爻) is a strategic reasoning engine based on **Explainable AI**. It leverages **ontological modeling** to understand the phenomena and essence of the strategic world, and **counterfactual analysis** to simulate the known and unknown in decision-making scenarios, generating verifiable, comparable, and explainable decision support for decision-makers.
610

7-
> **Simulate the Signs. Reveal the Chaos.**
8-
9-
[**Omen**](https://github.com/StrategyLogic/omen) (Chinese: 爻) is an open-source strategic reasoning engine. It leverages multi-agent game theory, capability space modeling to simulate phenomena, and counterfactual analysis to reason how technological evolution impacts market landscapes.
10-
11-
[中文版](README.zh.md) | [Official Repo](https://github.com/StrategyLogic/omen) | [Concepts](docs/concepts.md) | [Quick Start](docs/quick-start.md) | [Case Templates](docs/case-template.md) | [Roadmap](docs/roadmap.md)
11+
[Concepts](docs/concepts.md) | [Quick Start](docs/quick-start.md) | [Case Templates](docs/case-template.md) | [Roadmap](docs/roadmap.md)
1212

1313
## ⭐ What Omen Does
1414

15-
Unlike traditional predictive models, Omen does not promise to *predict a certain future*. Instead, it generates **interpretable, replayable, and comparable future branching paths**. Its core responsibility is to reveal faint omens, critical branching points, and evolutionary trajectories within complex systems, empowering founders, product strategists, technology leaders, and investment analysts to understand:
15+
> **Simulate the Signs. Reveal the Chaos.**
16+
17+
Unlike traditional predictive models, Omen is designed for complex strategic reasoning and does not promise to *predict a certain future*. Instead, it generates **interpretable, replayable, and comparable future branching paths**. Its core responsibility is to reveal faint omens, critical branching points, and evolutionary trajectories within complex systems, empowering founders, product strategists, technology leaders, and investment analysts to understand:
1618

1719
* 🔄 **Substitution Logic**: Which technology will replace another under what critical conditions?
1820
* 🛡️ **Capability Evolution**: Which core capabilities will be enhanced first, and which will coexist long-term?
@@ -46,12 +48,6 @@ A complete reasoning session typically answers the following questions:
4648

4749
Environment requirements: Python 3.12+ with `pip` package manager.
4850

49-
```bash
50-
pip install omenai
51-
```
52-
53-
From source:
54-
5551
```bash
5652
git clone https://github.com/StrategyLogic/omen.git
5753
cd omen
@@ -61,45 +57,29 @@ pip install -e .
6157

6258
### Run Example
6359
```bash
64-
# run simulate
65-
omen simulate --scenario data/scenarios/ontology.json
66-
67-
# run simulate with stable seed (reproducible)
68-
omen simulate --scenario data/scenarios/ontology.json --seed 42
69-
70-
# explain results
71-
omen explain --input output/result.json
72-
73-
# compare scenarios with generic overrides
74-
omen compare --scenario data/scenarios/ontology.json --overrides '{"user_overlap_threshold": 0.9}'
75-
76-
# compare with business parameter entrypoint (budget shock)
77-
omen compare --scenario data/scenarios/ontology.json --budget-actor ai-memory --budget-delta 200
78-
79-
# keep historical outputs
80-
omen compare --scenario data/scenarios/ontology.json --budget-actor ai-memory --budget-delta 200 --incremental
60+
# Step 1. analyze situation from a built-in case
61+
omen analyze situation --doc sap_reltio_acquisition --pack-id sap
62+
# Step 2. generate scenario planning artifact from situation
63+
omen scenario --situation sap
8164
```
8265

8366
### View Results
8467

85-
**Local File Protection**: Output files are written to the root-level `output/` directory, which is excluded in `.gitignore` to avoid being tracked or accidentally uploaded, protecting your data from leakage.
86-
87-
Example: `output/result.json`, `output/explanation.json`, `output/comparison.json`
88-
89-
By default, each run of the simulation will overwrite the previous results; you can add the `--incremental` to generate new files with a timestamp suffix, which applies to all `omen CLI` commands.
68+
**Strategic Actor Persona UI**
9069

9170
```bash
92-
# This will not overwrite the previous output (output file will automatically have a timestamp suffix)
93-
omen simulate --scenario data/scenarios/ontology.json --incremental
71+
streamlit run app/strategic_actor.py
9472
```
9573

96-
By default, `simulate` use random seed to generate non-deterministic results; you can set a fixed `--seed` for reproducibility, it is recommended to compare different scenarios with the same seed to see the pure impact of parameter changes without random noise.
74+
Then open `http://localhost:8501` and select a case from `cases/actors/` to view persona narrative, graph, and timeline.
75+
76+
**Strategic Situation Brief**
77+
78+
After `omen analyze situation`, read the generated brief:
9779

9880
```bash
99-
# Run simulate with a fixed seed (results will be reproducible)
100-
omen compare --scenario data/scenarios/ontology.json --budget-actor ai-memory --budget-delta 200 --seed 42
101-
# Run another scenario with the same seed to compare results
102-
omen compare --scenario data/scenarios/ontology.json --budget-actor ai-memory --budget-delta 300 --seed 42
81+
# Example brief path
82+
data/scenarios/sap/situation.md
10383
```
10484

10585
Want to learn more? Read the [precision evaluation](docs/precision.md) document.

README.zh.md

Lines changed: 26 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
1-
# OmenAI
1+
<div align="center">
2+
<h1>OmenAI</h1>
3+
<strong><p>战略推演引擎 - 分析、模拟、解释</p></strong>
4+
<p><a href="README.md">English</a> | 中文</p>
25

3-
**AI驱动的开源战略推演引擎。**
6+
![Codecov](https://img.shields.io/codecov/c/github/StrategyLogic/omen) [![Package](https://img.shields.io/github/actions/workflow/status/StrategyLogic/omen/package.yml)](https://img.shields.io/github/actions/workflow/status/StrategyLogic/omen/package.yml) ![License](https://img.shields.io/pypi/l/omenai) ![Downloads](https://img.shields.io/pepy/dt/omenai) ![PyPI Version](https://img.shields.io/pypi/v/omenai)
47

5-
![Codecov](https://img.shields.io/codecov/c/github/StrategyLogic/omen) [![Package](https://img.shields.io/github/actions/workflow/status/StrategyLogic/omen/package.yml)](https://img.shields.io/github/actions/workflow/status/StrategyLogic/omen/package.yml) ![License](https://img.shields.io/pypi/l/omenai) ![Downloads](https://img.shields.io/pepy/dt/omenai) ![PyPI Version](https://img.shields.io/pypi/v/omenai) ![GitHub Stars](https://img.shields.io/github/stars/StrategyLogic/omen?style=social)
8+
</div>
69

7-
> 模拟征兆,揭示混沌
10+
[**Omen**](https://github.com/StrategyLogic/omen) (中文:爻)是基于**可解释AI**的战略推演引擎。它以**本体论建模**理解战略世界中的现象与本质,以**反事实分析**模拟决策情景中的已知与未知,为决策者生成可验证、可比较和可解释的决策依据
811

9-
[**Omen**](https://github.com/StrategyLogic/omen) (中文:爻)是一个开源战略推演引擎,通过多智能体博弈、能力空间建模来模拟现象,结合反事实分析,推演技术演化如何影响市场格局。
12+
[核心概念](docs/concepts.md) | [快速开始](docs/quick-start.md) | [案例模板](docs/case-template.md) | [项目路线图](docs/roadmap.md)
1013

11-
[English version](README.md) | [官方仓库](https://github.com/StrategyLogic/omen) | [核心概念](docs/concepts.md) | [快速开始](docs/quick-start.md) | [案例模板](docs/case-template.md) | [项目路线图](docs/roadmap.md)
14+
## 💡 Omen 做什么?
1215

13-
## ⭐ Omen 具体做什么?
16+
> 模拟征兆,揭示混沌。
1417
15-
Omen 不承诺预测一个*确定的未来*,而是生成**可解释、可回放、可比较的未来分叉路径**。它的核心职责是揭示复杂系统中的微弱征兆、关键分叉点与演化轨迹,赋能创始人、产品战略家、技术领袖与投资分析师理解
18+
与传统的预测模型不同,Omen 是面向复杂战略推演的引擎,它不局限在*单一确定的未来*,而是生成可解释、可回放、可比较的未来分叉路径。通过拆解复杂系统中的因果链条与逻辑关联,精准捕捉微弱征兆、关键分叉点与演化轨迹,让创始人、产品战略家、技术领袖与投资分析师清晰理解
1619

1720
* 🔄 **替代逻辑**:哪项技术会在什么临界条件下替代另一项?
18-
* 🛡️ **能力演化**哪些核心能力会先被瓦解,哪些将长期共存?
21+
* 🛡️ **能力演化**哪些核心能力会先被增强,哪些将长期共存?
1922
* 🏆 **策略胜率**:哪类策略组合更容易赢得市场、资本与开发者生态?
2023
***时间窗口**:何时是自研、结盟、并购或收缩的最佳时机?
2124

25+
通过可解释的逻辑推演,Omen 致力于揭示技术演进如何重塑市场格局,让每一次战略决策可计算、可模拟、可验证、可追溯。
26+
2227
## ✨ 核心功能
2328

2429
| 功能模块 | 描述 |
@@ -46,12 +51,6 @@ Omen 不承诺预测一个*确定的未来*,而是生成**可解释、可回
4651

4752
运行环境要求:Python 3.12+ `pip` 包管理器。
4853

49-
```bash
50-
pip install omenai
51-
```
52-
53-
从源码安装:
54-
5554
```bash
5655
git clone https://github.com/StrategyLogic/omen.git
5756
cd omen
@@ -61,45 +60,27 @@ pip install -e .
6160

6261
### 运行示例
6362
```bash
64-
# 运行模拟
65-
omen simulate --scenario data/scenarios/ontology.json
66-
67-
# 使用固定 seed 运行(可复现)
68-
omen simulate --scenario data/scenarios/ontology.json --seed 42
69-
70-
# 生成解释报告
71-
omen explain --input output/result.json
72-
73-
# 使用通用覆盖参数做对比
74-
omen compare --scenario data/scenarios/ontology.json --overrides '{"user_overlap_threshold": 0.9}'
75-
76-
# 使用商业主参数入口(资金冲击)做对比
77-
omen compare --scenario data/scenarios/ontology.json --budget-actor ai-memory --budget-delta 200
78-
79-
# 保留历史输出(时间戳后缀)
80-
omen compare --scenario data/scenarios/ontology.json --budget-actor ai-memory --budget-delta 200 --incremental
63+
# 第一步:内置案例情势分析
64+
omen analyze situation --doc sap_reltio_acquisition --pack-id sap
65+
# 第二步:从情势生成情景规划
66+
omen scenario --situation sap
8167
```
8268

83-
### 查看运行结果
84-
85-
**本地文件保护**:输出的文件在项目根目录下的 `output/` 中,默认已在 `.gitignore` 排除,它不会被跟踪或误上传,避免你的数据被泄漏。
86-
87-
示例:`output/result.json` `output/explanation.json` `output/comparison.json`
69+
### 查看结果
8870

89-
每次运行模拟,*默认*覆盖上一次的运行结果;你可以通过添加 `--incremental` 参数生成带时间戳后缀的新文件,该参数对所有 `omen CLI` 命令有效。
71+
**战略主体画像 UI**
9072

9173
```bash
92-
# 不会覆盖上一次输出(输出文件自动加上时间戳后缀)
93-
omen simulate --scenario data/scenarios/ontology.json --incremental
74+
streamlit run app/strategic_actor.py
9475
```
76+
然后打开 `http://localhost:8501`,选择 `cases/actors/` 中的一个案例,查看画像叙事、图谱和时间线。
9577

96-
默认情况下,`simulate` 每次会使用随机 seed 扰动模拟结果;当你需要稳定地使用某次模拟结果时,如:注入不同的场景参数为同一次模拟结果进行对比,请显式传入固定的 `--seed` 值。
78+
**战略情势简报**
9779

80+
在执行 `omen analyze situation` 后,阅读生成的简报:
9881
```bash
99-
# 使用固定 seed 运行
100-
omen compare --scenario data/scenarios/ontology.json --budget-actor ai-memory --budget-delta 200 --seed 42
101-
# 两次不同的参数运行在同一次模拟结果上,以实现控制变量和可比性
102-
omen compare --scenario data/scenarios/ontology.json --budget-actor ai-memory --budget-delta 300 --seed 42
82+
# 简报示例路径
83+
data/scenarios/sap/situation.md
10384
```
10485

10586
想了解更多?阅读[精度评估](docs/precision.md)文档。

0 commit comments

Comments
 (0)