Files
2026Technology-Competition/README.md
T
lhl 6372bb17b9 feat(run): 试运行脚本 + 运行说明(真实 LLM 默认 / --fake 离线)
- scripts/run_trial.py:库级端到端驱动(argparse 默认指向 samples/ 股票追加改修+sunOnly+真实模板)
  - --fake 离线 FakeEngine(无 key)/ 默认 build_inference_engine 真实 LLM(读 .env)
  - SourceParser → WriteOrchestrator 门控自动影响调查 → output/output.docx + impact-report.json
  - 暴露 main(argv) 供测试
- tests/test_run_trial.py(fake 模式断言 13 章 + summary 16/5/8/3/50/0 + 文件产出 + docx 注入)
- .gitignore 新增 output/(试运行产物不入库)
- 新建 README.md(安装 / .env 配置 / 离线与真实试运行 / 输出 / 测试)
- 全量 364 passed / 99.28%;fake 试运行 PASS(13 章、summary 与 MVP 基线一致)
2026-08-24 11:05:45 +08:00

63 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Genesis — 概要设计书自动生成 Agent
读取 Excel 版要件定义、概要设计做成说明书、概要设计模板、概要设计书记入规则和图表规则等输入资料,自动生成符合规范的 Word 版概要设计书(追加/改修场景会结合既有系统源码做影响调查)。
## 安装
```powershell
# 1. 创建虚拟环境并安装依赖(Python >= 3.11
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e ".[dev]"
# 2. 配置 LLM API Key(真实模式必需;离线 --fake 模式可跳过)
# 编辑 .env(已被 .gitignore 忽略,密钥不入库):
# GENESIS_INFERENCE__API_KEY=sk-xxx
# 可选:
# GENESIS_INFERENCE__BASE_URL=https://api.deepseek.com
# GENESIS_INFERENCE__MODEL=deepseek-chat
```
## 试运行
默认输入为 `samples/` 下既有样本(追加改修·股票场景 + sunOnly 既有系统 + 真实概要设计书模板)。
### 离线 Fake 模式(无需 API key,验证整条管线)
```powershell
python scripts/run_trial.py --fake
```
### 真实 LLM 模式(需先在 .env 配置 API Key
```powershell
python scripts/run_trial.py
```
### 输出
- `output/output.docx` — 概要设计书
- `output/impact-report.json` — 影响调查书(JSON,独立可下载)
`output/` 已加入 `.gitignore`,试运行产物不入库。
### 自定义输入
```powershell
python scripts/run_trial.py `
--requirement samples\要件定義_追加改修_股票.xlsx `
--template samples\概要設計書テンプレート.docx `
--rules samples\概要設計做成説明書.docx samples\記入規則.docx `
--existing-system samples\existing-system `
--language java `
--output output\output.docx
```
## 测试
```powershell
python -m pytest
```
全量单测 + 覆盖率检查(红线 `fail_under = 99`)。