基于世界模型的自动化编码系统
Project description
🌍 World OS AutoCode
基于世界模型的自动化编码系统 —— 让 AI 编码有法可依,有据可查
🎯 什么是 World OS AutoCode
核心思想:将你的项目转化为一个「世界模型」,让 AI 真正理解你的项目
World Model = State + Goals + Invariants + Ontology
Agent Actions = Read / Write / Edit / Bash / Grep / Glob / Agent / TodoWrite
| 组件 | 作用 | 存储 |
|---|---|---|
| State | 项目运行态,记录每个模块的状态和验证结果 | harness/state.json |
| Goals | 形式化需求,每个需求都有验收标准 | harness/requirements/*.req.md |
| Invariants | 不变量约束,每次变更后自动验证 | harness/invariants/*.sh |
| Ontology | 实体知识图谱,明确业务实体和依赖关系 | harness/entity-map.json |
✨ 核心特性
🧠 16+ 敏捷认知技能覆盖全研发流程
| 阶段 | 技能 |
|---|---|
| 核心认知 | 需求追溯 • DoD 检查 • 变更影响分析 |
| 需求阶段 | 用户故事拆解 • 完整性检查 • 优先级矩阵 |
| 产品阶段 | PMF 验证 • 用户旅程分析 • 复杂度-价值象限 |
| 架构阶段 | ADR 记录 • NFR 量化 • 技术债务评估 |
👥 角色化权限控制
| 角色 | 职责 |
|---|---|
| 产品经理 | 优先级决策、PMF 验证 |
| 架构师 | 架构决策、技术债务评估 |
| 开发者 | DoD 检查、影响分析 |
| QA 工程师 | 需求追溯、验收检查 |
| 数据分析师 | 数据驱动决策 |
🚀 命令行集成
worldos-harness --help
🚀 快速开始
安装
# PyPI 安装
pip install worldos-autocode
# 同时安装 skills 管理工具
pip install worldos-autocode[skills]
# 从源码安装最新版
git clone https://github.com/worldos/world-os-autocode.git
cd world-os-autocode
pip install -e .
初始化新项目
# 创建项目目录并初始化
mkdir my-project && cd my-project
worldos-harness init
这将生成以下目录结构:
my-project/
└── harness/
├── state.json # 项目状态
├── entity-map.json # 实体图谱
├── knowledge/ # 知识文档
│ ├── index.yaml
│ ├── product/ # PRD/用户故事
│ ├── technical/ # API/设计
│ └── domain/ # 术语/规则
├── requirements/ # 形式化需求
└── invariants/ # 验证脚本
同步知识
# 仅同步本地知识(无需飞书)
worldos-harness sync --local-only
# 同步并深度分析项目
worldos-harness sync --deep
查看状态
worldos-harness status
使用敏捷认知技能
# 列出所有技能
worldos-harness agile list
# 按角色过滤
worldos-harness agile list --role=developer
# 调用技能(定义完成检查)
worldos-harness agile invoke definition-of-done \
--role=developer \
--context='{"task_type": "feature", "artifacts": ["code", "tests"]}'
# 执行工作流(Sprint 规划)
worldos-harness agile workflow sprint_planning
📦 发布包说明
本项目提供三个 PyPI 包:
| 包 | 用途 | 安装 |
|---|---|---|
| worldos-autocode | 核心框架 + CLI 工具 | pip install worldos-autocode |
| reqharness | 独立敏捷研发技能包 | pip install reqharness |
| worldos-skills | Claude Code 技能安装工具 | pip install worldos-skills |
安装 Claude Code Skills
安装完成 worldos-skills 后,可以一键安装技能到 Claude Code:
# 安装所有 skills 到默认位置 (~/.claude/skills)
worldos-skills install --all
# 检查安装状态
worldos-skills status
# 只安装 worldos-harness
worldos-skills install --worldos
🏗️ 架构
┌─────────────────────────────────────────────┐
│ CLI / API Skill Hub Workflow │
└─────────────┬─────────────┬─────────────────┘
│ │
▼ ▼
┌───────────────────────┐
│ Harness Core │
│ State Goals Inv │
└───────────────────────┘
设计原则:
- 知识优先:知识文档驱动开发,而非代码驱动
- 不变量验证:每次变更后自动验证,不把问题带到下一环节
- 角色协同:不同角色专注不同职责,权限清晰
- 渐进式:可从小项目开始,逐步扩展知识体系
📚 文档
- CLAUDE.md - Agent 执行协议
- ARCHITECTURE.md - 详细架构设计
- PROJECT_ROADMAP.md - 项目路线图
- SKILLS_INSTALL.md - 技能安装指南
- CHANGELOG.md - 版本变更记录
🤝 贡献
欢迎所有形式的贡献!请参阅 CONTRIBUTING.md 了解详情。
# 开发环境搭建
git clone https://github.com/your-username/world-os-autocode.git
cd world-os-autocode
python -m venv venv && source venv/bin/activate
pip install -e ".[dev]"
pytest tests/
👥 社区
- GitHub Discussions - 讨论交流
- Issue Tracker - 问题反馈
📄 许可证
Apache-2.0 © World OS Team
由 World OS Team 用 ❤️ 构建
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
worldos_autocode-0.1.0.tar.gz
(440.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file worldos_autocode-0.1.0.tar.gz.
File metadata
- Download URL: worldos_autocode-0.1.0.tar.gz
- Upload date:
- Size: 440.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c6fdca65e632dd18bd87aa521b05769c33882d66a7b8bbb98489a03ca34fe30
|
|
| MD5 |
4e25840a4e938b43a97ee80e7fc99708
|
|
| BLAKE2b-256 |
6ff6c64eb453d4764ab6ee48324cf30cde8a55b11dcbbc18c640e14025cd1ed1
|
File details
Details for the file worldos_autocode-0.1.0-py3-none-any.whl.
File metadata
- Download URL: worldos_autocode-0.1.0-py3-none-any.whl
- Upload date:
- Size: 225.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36cc23f85b7a6867a2f003b4b8104a1f5f087bb8a81e8b787dfa34c6f7a41f5e
|
|
| MD5 |
c6cfcae7bf74f4d8f446bee72efa748e
|
|
| BLAKE2b-256 |
5d6fdf116312f3009d4ac574b0075f28adaed349a51694109f21bdc98b3bdee9
|