Novel Weaver
产品化工程阶段的 AI 长篇小说生成引擎(Core Engine)。
本仓库聚焦 Phase 0–5 最小可验证连续生产内核:Truth Boundary、单章生产、连续生产/恢复、增量修复、质量闭环与生产加固。目标不是「一键写完一本小说」,而是让长篇生产可重复、可控制、可恢复、可修复、可追溯。
安装
# 从源码(当前推荐)
git clone https://github.com/zcbacxc/novel-weaver.git
cd novel-weaver
python -m pip install -e ".[dev]"
# PyPI(发布后可用)
pip install novel-weaver
需要 Python 3.12+。核心运行时无强制第三方依赖(LLM 走 OpenAI 兼容 HTTP,可选)。
快速开始
# 运行测试
python -m pytest tests -v
# 初始化示例故事并跑通假生成闭环
novel-weaver demo --workspace .workspaces/demo
# 使用 template / openai Provider 单章生产
novel-weaver engine --provider template --workspace .workspaces/engine
# novel-weaver engine --provider openai --workspace .workspaces/llm
# 长程基准(默认 30 章)
novel-weaver bench --chapters 30 --workspace .workspaces/bench-30
配置真实 LLM(可选):复制 .env.example 为项目根 .env 或 ~/.novel-weaver/.env。
包结构
src/novel_weaver/
config.py # 配置与 workspace 引导
domain/ # Canonical 实体与版本
truth/ # Evidence / Proposal / Commit Guard / Audit
storage/ # SQLite 仓储 + Snapshot / Release / Artifact
production/ # 编排、失效、修复、语义审校、全书一致性
ai/ # Provider(fake / template / openai 兼容 / failover)
runtime/ # Checkpoint / Resume / Cost / Diagnostics
benchmarks/ # 长程生产基准
cli/ # 命令行入口
tests/
设计约束
- Canonical Story 是唯一正式真相;派生数据可重建。
- Draft / Candidate / Canonical 严格分层;无证据不得晋升 Canon。
- Runtime 失败不污染 Canon;Commit 必须通过 Guard。
- 修改前文只使真实依赖范围失效。
- Provider / 模型可替换;Agent 是实现方式,不是系统边界。
文档
| 文档 | 说明 |
|---|---|
| docs/ | 公开文档索引 |
| ARCHITECTURE | 架构概述与主路径 |
| CONTRIBUTING | 贡献指南 |
| LLM_PROVIDERS | LLM 配置 |
| ADR | 架构决策 |
| RELEASE_CHECKLIST | 发布清单 |
发布
- 版本号唯一来源:
pyproject.toml。 - 变更记录:CHANGELOG.md。
- 当前阶段以源码安装与 CI 验证为主;PyPI Trusted Publishing 流水线预留为后续发布步骤。
许可证
本项目采用 GNU Affero General Public License v3.0 or later(AGPL-3.0-or-later)。
完整条款见 LICENSE。通过网络提供基于本引擎的服务时,须按 AGPL 第 13 条向用户提供对应源代码。
Metadata
Release files for novel-weaver 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| novel_weaver-0.1.0.tar.gz | 145.1 kB | Without provenance | Details for novel_weaver-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| novel_weaver-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for novel_weaver-0.1.0-py3-none-any.whl |
Total release size: 294.6 kB
Release files / novel_weaver-0.1.0.tar.gz
| Download URL | novel_weaver-0.1.0.tar.gz |
|---|---|
| Size | 145.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
12bd5f5a58c100de828c691008daf972fa07692189afaa9fa67d066837f0daf1
|
|
BLAKE2b-256 checksum How to use checksums |
c3cc39fd16e0065c9dbcf0c0ac62ab98a68c8098719b2aff1f3630c5f46f45d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|
Release files / novel_weaver-0.1.0-py3-none-any.whl
| Download URL | novel_weaver-0.1.0-py3-none-any.whl |
|---|---|
| Size | 149.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
28718046c42686bf1a92f92499eb18a947b8d42b1d70ccce02f699d65e8d4be2
|
|
BLAKE2b-256 checksum How to use checksums |
a89e00b4d4d89e79d8a5c0da6be267bd7f0f89e0f03a216c1c9e06703b280c73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|
Security for novel-weaver 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.