opencode-collaboration 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. opencode_collaboration-0.2.0/PKG-INFO +99 -0
  2. opencode_collaboration-0.2.0/README.md +70 -0
  3. opencode_collaboration-0.2.0/opencode_collaboration.egg-info/PKG-INFO +99 -0
  4. opencode_collaboration-0.2.0/opencode_collaboration.egg-info/SOURCES.txt +21 -0
  5. opencode_collaboration-0.2.0/opencode_collaboration.egg-info/dependency_links.txt +1 -0
  6. opencode_collaboration-0.2.0/opencode_collaboration.egg-info/entry_points.txt +2 -0
  7. opencode_collaboration-0.2.0/opencode_collaboration.egg-info/requires.txt +11 -0
  8. opencode_collaboration-0.2.0/opencode_collaboration.egg-info/top_level.txt +1 -0
  9. opencode_collaboration-0.2.0/pyproject.toml +66 -0
  10. opencode_collaboration-0.2.0/setup.cfg +4 -0
  11. opencode_collaboration-0.2.0/src/__init__.py +0 -0
  12. opencode_collaboration-0.2.0/src/main.py +1 -0
  13. opencode_collaboration-0.2.0/tests/test_agent_behavior.py +443 -0
  14. opencode_collaboration-0.2.0/tests/test_agent_daemon.py +242 -0
  15. opencode_collaboration-0.2.0/tests/test_detector.py +79 -0
  16. opencode_collaboration-0.2.0/tests/test_doc_generator.py +482 -0
  17. opencode_collaboration-0.2.0/tests/test_e2e.py +1436 -0
  18. opencode_collaboration-0.2.0/tests/test_exception_handler.py +855 -0
  19. opencode_collaboration-0.2.0/tests/test_git_monitor.py +251 -0
  20. opencode_collaboration-0.2.0/tests/test_state_machine.py +266 -0
  21. opencode_collaboration-0.2.0/tests/test_state_manager.py +109 -0
  22. opencode_collaboration-0.2.0/tests/test_state_manager_v2.py +362 -0
  23. opencode_collaboration-0.2.0/tests/test_workflow.py +82 -0
@@ -0,0 +1,99 @@
1
+ Metadata-Version: 2.4
2
+ Name: opencode-collaboration
3
+ Version: 0.2.0
4
+ Summary: 双Agent协作框架 - 产品经理与开发的分离式协作工具
5
+ Author-email: OpenCode <dev@opencode.ai>
6
+ License: MIT
7
+ Keywords: collaboration,agent,project-management,cli
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.8
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Requires-Python: >=3.8
18
+ Description-Content-Type: text/markdown
19
+ Requires-Dist: click>=8.0
20
+ Requires-Dist: pyyaml>=6.0
21
+ Requires-Dist: jinja2>=3.0
22
+ Requires-Dist: rich>=12.0
23
+ Requires-Dist: inquirer>=2.0
24
+ Provides-Extra: dev
25
+ Requires-Dist: pytest>=7.0; extra == "dev"
26
+ Requires-Dist: pytest-cov>=4.0; extra == "dev"
27
+ Requires-Dist: black>=23.0; extra == "dev"
28
+ Requires-Dist: flake8>=6.0; extra == "dev"
29
+
30
+ # 双Agent协作开发系统
31
+
32
+ 基于 OpenCode 的双 Agent 协作框架,实现产品经理与开发的分离式协作。
33
+
34
+ ## 目录结构
35
+
36
+ ```
37
+ dual-agent-collaboration-system/
38
+ ├── docs/
39
+ │ ├── 01-requirements/ # 需求阶段文档
40
+ │ │ ├── requirements_v*.md # 需求文档
41
+ │ │ ├── system_design_v*.md # 系统设计
42
+ │ │ ├── requirements_review_*.md # 评审意见
43
+ │ │ └── requirements_signoff.md # 签署确认
44
+ │ ├── 02-design/ # 设计阶段文档
45
+ │ ├── 03-test/ # 测试阶段文档
46
+ │ ├── 04-changelog/ # 变更记录
47
+ │ └── COLLABORATION_GUIDE.md # 协作流程指南
48
+ ├── state/
49
+ │ └── project_state.yaml # 项目状态文件
50
+ ├── src/ # 源代码
51
+ ├── scripts/ # 辅助脚本
52
+ └── .gitignore
53
+ ```
54
+
55
+ ## 快速开始
56
+
57
+ ### Agent 1 (产品经理) 初始化项目
58
+ ```bash
59
+ cd dual-agent-collaboration-system
60
+ git pull
61
+ # 创建需求文档
62
+ # 更新状态文件
63
+ git add .
64
+ git commit -m "feat(requirements): initial requirements"
65
+ git push
66
+ ```
67
+
68
+ ### Agent 2 (开发) 开始评审
69
+ ```bash
70
+ cd dual-agent-collaboration-system
71
+ git pull
72
+ # 阅读需求文档
73
+ # 创建评审意见
74
+ git add .
75
+ git commit -m "review(requirements): initial review"
76
+ git push
77
+ ```
78
+
79
+ ## 协作流程
80
+
81
+ 1. **需求评审** → Agent1 创建需求 → Agent2 Review → 双方确认
82
+ 2. **设计评审** → Agent1 创建设计 → Agent2 Review → 双方确认
83
+ 3. **开发测试** → Agent2 开发 → Agent1 黑盒测试 → 通过确认
84
+ 4. **部署发布** → Agent1 部署 → 更新变更记录
85
+
86
+ ## 状态文件
87
+
88
+ 每次操作后更新 `state/project_state.yaml`,记录当前阶段和状态。
89
+
90
+ ## 标签规范
91
+
92
+ - `requirements-v1-approved` - 需求确认
93
+ - `design-v1-approved` - 设计确认
94
+ - `test-v1-passed` - 测试通过
95
+ - `release-v1.0.0` - 正式发布
96
+
97
+ ## 详细说明
98
+
99
+ 参见 [协作流程指南](docs/COLLABORATION_GUIDE.md)
@@ -0,0 +1,70 @@
1
+ # 双Agent协作开发系统
2
+
3
+ 基于 OpenCode 的双 Agent 协作框架,实现产品经理与开发的分离式协作。
4
+
5
+ ## 目录结构
6
+
7
+ ```
8
+ dual-agent-collaboration-system/
9
+ ├── docs/
10
+ │ ├── 01-requirements/ # 需求阶段文档
11
+ │ │ ├── requirements_v*.md # 需求文档
12
+ │ │ ├── system_design_v*.md # 系统设计
13
+ │ │ ├── requirements_review_*.md # 评审意见
14
+ │ │ └── requirements_signoff.md # 签署确认
15
+ │ ├── 02-design/ # 设计阶段文档
16
+ │ ├── 03-test/ # 测试阶段文档
17
+ │ ├── 04-changelog/ # 变更记录
18
+ │ └── COLLABORATION_GUIDE.md # 协作流程指南
19
+ ├── state/
20
+ │ └── project_state.yaml # 项目状态文件
21
+ ├── src/ # 源代码
22
+ ├── scripts/ # 辅助脚本
23
+ └── .gitignore
24
+ ```
25
+
26
+ ## 快速开始
27
+
28
+ ### Agent 1 (产品经理) 初始化项目
29
+ ```bash
30
+ cd dual-agent-collaboration-system
31
+ git pull
32
+ # 创建需求文档
33
+ # 更新状态文件
34
+ git add .
35
+ git commit -m "feat(requirements): initial requirements"
36
+ git push
37
+ ```
38
+
39
+ ### Agent 2 (开发) 开始评审
40
+ ```bash
41
+ cd dual-agent-collaboration-system
42
+ git pull
43
+ # 阅读需求文档
44
+ # 创建评审意见
45
+ git add .
46
+ git commit -m "review(requirements): initial review"
47
+ git push
48
+ ```
49
+
50
+ ## 协作流程
51
+
52
+ 1. **需求评审** → Agent1 创建需求 → Agent2 Review → 双方确认
53
+ 2. **设计评审** → Agent1 创建设计 → Agent2 Review → 双方确认
54
+ 3. **开发测试** → Agent2 开发 → Agent1 黑盒测试 → 通过确认
55
+ 4. **部署发布** → Agent1 部署 → 更新变更记录
56
+
57
+ ## 状态文件
58
+
59
+ 每次操作后更新 `state/project_state.yaml`,记录当前阶段和状态。
60
+
61
+ ## 标签规范
62
+
63
+ - `requirements-v1-approved` - 需求确认
64
+ - `design-v1-approved` - 设计确认
65
+ - `test-v1-passed` - 测试通过
66
+ - `release-v1.0.0` - 正式发布
67
+
68
+ ## 详细说明
69
+
70
+ 参见 [协作流程指南](docs/COLLABORATION_GUIDE.md)
@@ -0,0 +1,99 @@
1
+ Metadata-Version: 2.4
2
+ Name: opencode-collaboration
3
+ Version: 0.2.0
4
+ Summary: 双Agent协作框架 - 产品经理与开发的分离式协作工具
5
+ Author-email: OpenCode <dev@opencode.ai>
6
+ License: MIT
7
+ Keywords: collaboration,agent,project-management,cli
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.8
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Requires-Python: >=3.8
18
+ Description-Content-Type: text/markdown
19
+ Requires-Dist: click>=8.0
20
+ Requires-Dist: pyyaml>=6.0
21
+ Requires-Dist: jinja2>=3.0
22
+ Requires-Dist: rich>=12.0
23
+ Requires-Dist: inquirer>=2.0
24
+ Provides-Extra: dev
25
+ Requires-Dist: pytest>=7.0; extra == "dev"
26
+ Requires-Dist: pytest-cov>=4.0; extra == "dev"
27
+ Requires-Dist: black>=23.0; extra == "dev"
28
+ Requires-Dist: flake8>=6.0; extra == "dev"
29
+
30
+ # 双Agent协作开发系统
31
+
32
+ 基于 OpenCode 的双 Agent 协作框架,实现产品经理与开发的分离式协作。
33
+
34
+ ## 目录结构
35
+
36
+ ```
37
+ dual-agent-collaboration-system/
38
+ ├── docs/
39
+ │ ├── 01-requirements/ # 需求阶段文档
40
+ │ │ ├── requirements_v*.md # 需求文档
41
+ │ │ ├── system_design_v*.md # 系统设计
42
+ │ │ ├── requirements_review_*.md # 评审意见
43
+ │ │ └── requirements_signoff.md # 签署确认
44
+ │ ├── 02-design/ # 设计阶段文档
45
+ │ ├── 03-test/ # 测试阶段文档
46
+ │ ├── 04-changelog/ # 变更记录
47
+ │ └── COLLABORATION_GUIDE.md # 协作流程指南
48
+ ├── state/
49
+ │ └── project_state.yaml # 项目状态文件
50
+ ├── src/ # 源代码
51
+ ├── scripts/ # 辅助脚本
52
+ └── .gitignore
53
+ ```
54
+
55
+ ## 快速开始
56
+
57
+ ### Agent 1 (产品经理) 初始化项目
58
+ ```bash
59
+ cd dual-agent-collaboration-system
60
+ git pull
61
+ # 创建需求文档
62
+ # 更新状态文件
63
+ git add .
64
+ git commit -m "feat(requirements): initial requirements"
65
+ git push
66
+ ```
67
+
68
+ ### Agent 2 (开发) 开始评审
69
+ ```bash
70
+ cd dual-agent-collaboration-system
71
+ git pull
72
+ # 阅读需求文档
73
+ # 创建评审意见
74
+ git add .
75
+ git commit -m "review(requirements): initial review"
76
+ git push
77
+ ```
78
+
79
+ ## 协作流程
80
+
81
+ 1. **需求评审** → Agent1 创建需求 → Agent2 Review → 双方确认
82
+ 2. **设计评审** → Agent1 创建设计 → Agent2 Review → 双方确认
83
+ 3. **开发测试** → Agent2 开发 → Agent1 黑盒测试 → 通过确认
84
+ 4. **部署发布** → Agent1 部署 → 更新变更记录
85
+
86
+ ## 状态文件
87
+
88
+ 每次操作后更新 `state/project_state.yaml`,记录当前阶段和状态。
89
+
90
+ ## 标签规范
91
+
92
+ - `requirements-v1-approved` - 需求确认
93
+ - `design-v1-approved` - 设计确认
94
+ - `test-v1-passed` - 测试通过
95
+ - `release-v1.0.0` - 正式发布
96
+
97
+ ## 详细说明
98
+
99
+ 参见 [协作流程指南](docs/COLLABORATION_GUIDE.md)
@@ -0,0 +1,21 @@
1
+ README.md
2
+ pyproject.toml
3
+ opencode_collaboration.egg-info/PKG-INFO
4
+ opencode_collaboration.egg-info/SOURCES.txt
5
+ opencode_collaboration.egg-info/dependency_links.txt
6
+ opencode_collaboration.egg-info/entry_points.txt
7
+ opencode_collaboration.egg-info/requires.txt
8
+ opencode_collaboration.egg-info/top_level.txt
9
+ src/__init__.py
10
+ src/main.py
11
+ tests/test_agent_behavior.py
12
+ tests/test_agent_daemon.py
13
+ tests/test_detector.py
14
+ tests/test_doc_generator.py
15
+ tests/test_e2e.py
16
+ tests/test_exception_handler.py
17
+ tests/test_git_monitor.py
18
+ tests/test_state_machine.py
19
+ tests/test_state_manager.py
20
+ tests/test_state_manager_v2.py
21
+ tests/test_workflow.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ oc-collab = src.cli.main:main
@@ -0,0 +1,11 @@
1
+ click>=8.0
2
+ pyyaml>=6.0
3
+ jinja2>=3.0
4
+ rich>=12.0
5
+ inquirer>=2.0
6
+
7
+ [dev]
8
+ pytest>=7.0
9
+ pytest-cov>=4.0
10
+ black>=23.0
11
+ flake8>=6.0
@@ -0,0 +1,66 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "opencode-collaboration"
7
+ version = "0.2.0"
8
+ description = "双Agent协作框架 - 产品经理与开发的分离式协作工具"
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ license = {text = "MIT"}
12
+ authors = [
13
+ {name = "OpenCode", email = "dev@opencode.ai"}
14
+ ]
15
+ keywords = ["collaboration", "agent", "project-management", "cli"]
16
+ classifiers = [
17
+ "Development Status :: 3 - Alpha",
18
+ "Intended Audience :: Developers",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.8",
22
+ "Programming Language :: Python :: 3.9",
23
+ "Programming Language :: Python :: 3.10",
24
+ "Programming Language :: Python :: 3.11",
25
+ "Programming Language :: Python :: 3.12"
26
+ ]
27
+ dependencies = [
28
+ "click>=8.0",
29
+ "pyyaml>=6.0",
30
+ "jinja2>=3.0",
31
+ "rich>=12.0",
32
+ "inquirer>=2.0"
33
+ ]
34
+
35
+ [project.optional-dependencies]
36
+ dev = [
37
+ "pytest>=7.0",
38
+ "pytest-cov>=4.0",
39
+ "black>=23.0",
40
+ "flake8>=6.0"
41
+ ]
42
+
43
+ [project.scripts]
44
+ oc-collab = "src.cli.main:main"
45
+
46
+ [tool.setuptools.packages.find]
47
+ where = ["."]
48
+ include = ["src"]
49
+
50
+
51
+ [tool.pytest.ini_options]
52
+ testpaths = ["tests"]
53
+ python_files = ["test_*.py"]
54
+ python_classes = ["Test*"]
55
+ python_functions = ["test_*"]
56
+ addopts = "-v --tb=short"
57
+
58
+ [tool.black]
59
+ line-length = 100
60
+ target-version = ["py38", "py39", "py310", "py311", "py312"]
61
+ include = "src/.*\\.py$"
62
+
63
+ [tool.flake8]
64
+ max-line-length = 100
65
+ exclude = ["__pycache__", ".git", "build", "dist"]
66
+ per-file-ignores = ["__init__.py:F401"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
File without changes
@@ -0,0 +1 @@
1
+ # 代码实现