coprogrammer 0.3.0a1__tar.gz → 0.3.0a2__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.
- coprogrammer-0.3.0a2/PKG-INFO +210 -0
- coprogrammer-0.3.0a2/README.md +169 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/pyproject.toml +2 -2
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/__init__.py +1 -1
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/assets/skills/coprogrammer-active-sync/SKILL.md +13 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/cli.py +4 -1
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/manager_store.py +18 -1
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/mcp_server.py +2 -2
- coprogrammer-0.3.0a2/src/coprogrammer/onboarding.py +181 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/workflow_mcp.py +6 -0
- coprogrammer-0.3.0a2/src/coprogrammer.egg-info/PKG-INFO +210 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer.egg-info/SOURCES.txt +2 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/tests/test_manager_store.py +65 -0
- coprogrammer-0.3.0a2/tests/test_onboarding.py +201 -0
- coprogrammer-0.3.0a1/PKG-INFO +0 -387
- coprogrammer-0.3.0a1/README.md +0 -346
- coprogrammer-0.3.0a1/src/coprogrammer.egg-info/PKG-INFO +0 -387
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/LICENSE +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/setup.cfg +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/__main__.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/assets/skills/coprogrammer-integration-plan/SKILL.md +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/assets/skills/coprogrammer-pr-digest-review/SKILL.md +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/assets/skills/coprogrammer-project-covenant/SKILL.md +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/assets/skills/coprogrammer-project-setup/SKILL.md +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/assets/skills/coprogrammer-task-brief/SKILL.md +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/assets/templates/AGENTS.md +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/assets/templates/CLAUDE.md +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/assets/templates/COORDINATION.md +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/assets/templates/copilot-instructions.md +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/assets/templates/handoff.md +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/assets/templates/task-brief.md +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/briefing.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/channels.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/collaboration.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/collaboration_cli.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/collaboration_mcp.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/demo.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/evidence.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/integrations.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/knowledge.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/knowledge_mcp.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/providers.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/review.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/review_summary.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/scheduler.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/scheduler_cli.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/scheduler_mcp.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/setup.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/workflow.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/workflow_cli.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer/workspace.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer.egg-info/dependency_links.txt +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer.egg-info/entry_points.txt +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/src/coprogrammer.egg-info/top_level.txt +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/tests/test_briefing.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/tests/test_channels.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/tests/test_cli.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/tests/test_collaboration.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/tests/test_collaboration_processes.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/tests/test_demo.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/tests/test_integrations.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/tests/test_knowledge.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/tests/test_knowledge_mcp.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/tests/test_manager_performance.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/tests/test_mcp_robustness.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/tests/test_plugin_package.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/tests/test_providers.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/tests/test_review.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/tests/test_review_summary.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/tests/test_review_summary_cli.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/tests/test_scheduler.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/tests/test_scheduling_integration.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/tests/test_setup.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/tests/test_upgrade_cli.py +0 -0
- {coprogrammer-0.3.0a1 → coprogrammer-0.3.0a2}/tests/test_workspace_workflow.py +0 -0
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: coprogrammer
|
|
3
|
+
Version: 0.3.0a2
|
|
4
|
+
Summary: Shared tasks, file boundaries and handoffs for coding agents.
|
|
5
|
+
Author: Qiu Guanzong
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2026 Qiu Guanzong
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
28
|
+
Project-URL: Homepage, https://github.com/QIU-Guanzong/CoProgrammer
|
|
29
|
+
Project-URL: Repository, https://github.com/QIU-Guanzong/CoProgrammer
|
|
30
|
+
Project-URL: Issues, https://github.com/QIU-Guanzong/CoProgrammer/issues
|
|
31
|
+
Keywords: ai,software-development,multi-agent,merge,code-review
|
|
32
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
33
|
+
Classifier: Intended Audience :: Developers
|
|
34
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
35
|
+
Classifier: Programming Language :: Python :: 3
|
|
36
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
37
|
+
Requires-Python: >=3.10
|
|
38
|
+
Description-Content-Type: text/markdown
|
|
39
|
+
License-File: LICENSE
|
|
40
|
+
Dynamic: license-file
|
|
41
|
+
|
|
42
|
+
# CoProgrammer
|
|
43
|
+
|
|
44
|
+
**Teamwork for coding agents.**
|
|
45
|
+
|
|
46
|
+
Shared tasks, file boundaries and durable handoffs for **Codex, Claude Code and
|
|
47
|
+
GitHub Copilot** working in the same Git repository.
|
|
48
|
+
|
|
49
|
+
[](https://github.com/QIU-Guanzong/CoProgrammer/actions/workflows/ci.yml)
|
|
50
|
+
[](LICENSE)
|
|
51
|
+
|
|
52
|
+
[简体中文](README.zh-CN.md) · [Try it](#try-the-preview) ·
|
|
53
|
+
[Two-window walkthrough](docs/GETTING_STARTED.md) ·
|
|
54
|
+
[Connect your client](docs/knowledge/README.md) · [Releases](https://github.com/QIU-Guanzong/CoProgrammer/releases)
|
|
55
|
+
|
|
56
|
+
## The problem
|
|
57
|
+
|
|
58
|
+
Codex is changing an API. Claude is updating its callers. Both need to know who
|
|
59
|
+
owns the files, when the upstream task is finished, and what happened before a
|
|
60
|
+
window restarted. Separate Git branches keep edits apart; the collaboration
|
|
61
|
+
still needs shared state.
|
|
62
|
+
|
|
63
|
+
CoProgrammer records **who owns a task, which paths it covers, what blocks it,
|
|
64
|
+
and what the next window needs to know**. Your coding tools write the code;
|
|
65
|
+
CoProgrammer coordinates their work through a local CLI and MCP server.
|
|
66
|
+
|
|
67
|
+
| Without a shared record | With CoProgrammer |
|
|
68
|
+
| --- | --- |
|
|
69
|
+
| Two windows try to claim overlapping work | Atomic task claims check owners, worktrees and path leases. |
|
|
70
|
+
| A worker starts before an upstream task finishes | Dependencies keep the task blocked until its prerequisite is done. |
|
|
71
|
+
| A handoff disappears in a terminal | Messages and explicit receipts persist across restarts. |
|
|
72
|
+
| A passing test refers to yesterday's files | Check receipts detect changed content, command, runtime or age. |
|
|
73
|
+
| Another computer has a different checkout | A portable handoff compares package version, HEAD, base and file content. |
|
|
74
|
+
|
|
75
|
+
## Try the preview
|
|
76
|
+
|
|
77
|
+
Requires **Python 3.10+** and **Git 2.36+**. Use an active Python virtual environment.
|
|
78
|
+
There are no runtime Python dependencies or model keys needed for the demo.
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
python -m pip install --pre --upgrade coprogrammer
|
|
82
|
+
coprogrammer demo
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
The demo creates two real Git worktrees, runs task claims, dependency and overlap
|
|
86
|
+
checks, sends a handoff, acknowledges it and completes the tasks. It checks each
|
|
87
|
+
result and cleans up the temporary project. No coding client or model is launched.
|
|
88
|
+
|
|
89
|
+
An excerpt from an actual run:
|
|
90
|
+
|
|
91
|
+
```text
|
|
92
|
+
[passed] Create two Git worktrees: Two branches share one repository and one Manager event log.
|
|
93
|
+
[passed] Block unfinished dependencies: Claude cannot claim documentation until the API task is finished.
|
|
94
|
+
[passed] Reject overlapping work: A different worktree cannot claim src/api.py while Codex holds src/**.
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
[What the demo checks →](docs/DEMO.md)
|
|
98
|
+
|
|
99
|
+
## Use it in your project
|
|
100
|
+
|
|
101
|
+
The `start` and `status` entry points require **0.3.0a2+**. Start in a committed Git
|
|
102
|
+
checkout on a named branch. Each coding window should use its own Git worktree.
|
|
103
|
+
Add `.coprogrammer/` to your project's `.gitignore` to keep local runtime state
|
|
104
|
+
out of commits.
|
|
105
|
+
|
|
106
|
+
```sh
|
|
107
|
+
# In the worktree used by Codex
|
|
108
|
+
coprogrammer start --client codex --session codex-api --task api-v2
|
|
109
|
+
coprogrammer status --session codex-api
|
|
110
|
+
|
|
111
|
+
# In the separate worktree used by Claude Code
|
|
112
|
+
coprogrammer start --client claude --session claude-ui --task api-v2
|
|
113
|
+
coprogrammer status --session claude-ui
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
`start` registers this window and previews client setup. It does not launch a
|
|
117
|
+
coding tool or install configuration. Add `--dry-run` to preview registration;
|
|
118
|
+
use `--resume` to explicitly refresh the same registered window after a break.
|
|
119
|
+
Status reads never refresh sessions. Default session freshness lasts five minutes.
|
|
120
|
+
|
|
121
|
+
In the Codex worktree, create a scoped task and inspect the next action:
|
|
122
|
+
|
|
123
|
+
```sh
|
|
124
|
+
coprogrammer manager task create --session codex-api --id api-v2 --title 'Update the API' --pattern 'src/api/**' --client codex
|
|
125
|
+
coprogrammer status --session codex-api
|
|
126
|
+
coprogrammer manager task claim --session codex-api --id api-v2
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Claims return an ownership token. Use it with the existing guard and finish
|
|
130
|
+
commands; the [two-window walkthrough](docs/GETTING_STARTED.md) covers dependency
|
|
131
|
+
setup, messages, receipts and completion. Status distinguishes repository-wide
|
|
132
|
+
readiness from work eligible for the selected window.
|
|
133
|
+
|
|
134
|
+
### Connect Codex, Claude Code or Copilot
|
|
135
|
+
|
|
136
|
+
Preview the project-local Skills, Markdown guidance and MCP configuration:
|
|
137
|
+
|
|
138
|
+
```sh
|
|
139
|
+
coprogrammer setup --client codex --include-content
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Review the output, then explicitly create missing files:
|
|
143
|
+
|
|
144
|
+
```sh
|
|
145
|
+
coprogrammer setup --client codex --apply
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Use `claude` or `copilot` for those clients. Existing project instructions are
|
|
149
|
+
preserved; differing Skills or MCP configuration are reported as conflicts.
|
|
150
|
+
Reload the client and follow its normal project/MCP trust flow. Generated
|
|
151
|
+
configuration alone does not establish a connection.
|
|
152
|
+
|
|
153
|
+
MCP exposes the same local workflows. `workspace_status` provides the combined
|
|
154
|
+
status view; `task_dispatch` previews eligible tasks. The packaged plugin
|
|
155
|
+
contains six Skills, and the CLI serves twelve read-only Markdown resources.
|
|
156
|
+
[Client setup](docs/knowledge/README.md) · [Plugin installation](docs/PLUGIN_QUICKSTART.md)
|
|
157
|
+
|
|
158
|
+
## What else can it do?
|
|
159
|
+
|
|
160
|
+
| Need | Entry point |
|
|
161
|
+
| --- | --- |
|
|
162
|
+
| Inspect work and blockers | `coprogrammer status`; [status guide](docs/GETTING_STARTED.md) |
|
|
163
|
+
| Send and acknowledge handoffs | `manager message`; [communication guide](docs/AGENT_RUNTIME_INTEROP.md) |
|
|
164
|
+
| Check file scope before edits | `manager task guard`; [scheduling guide](docs/MULTI_PLATFORM_QUICKSTART.md) |
|
|
165
|
+
| Detect stale test results | `check run` / `check verify`; [check receipts](docs/VALIDATION_EVIDENCE.md) |
|
|
166
|
+
| Continue on another computer | `manager handoff` / `workspace compare`; [portable handoffs](docs/WORKSPACE_HANDOFF.md) |
|
|
167
|
+
| Review a branch for integration | `digest` / `integration-plan`; [CLI reference](docs/GETTING_STARTED.md#prepare-a-pr) |
|
|
168
|
+
| Request a second opinion | Explicit Claude, GLM or DeepSeek review; [multi-platform guide](docs/MULTI_PLATFORM_QUICKSTART.md) |
|
|
169
|
+
|
|
170
|
+
## How it fits
|
|
171
|
+
|
|
172
|
+
Use CoProgrammer when you already run coding agents and need shared ownership,
|
|
173
|
+
communication and review evidence across their worktrees. It complements your
|
|
174
|
+
existing coding tools and GitHub review process.
|
|
175
|
+
|
|
176
|
+
[gstack](https://github.com/garrytan/gstack) provides opinionated development and
|
|
177
|
+
review workflows; [Beads](https://github.com/gastownhall/beads) provides persistent
|
|
178
|
+
agent work tracking; [Gas Town](https://github.com/gastownhall/gastown) manages
|
|
179
|
+
multi-agent workspaces and orchestration. CoProgrammer focuses on local task
|
|
180
|
+
ownership, path coordination, durable handoffs and inspectable integration
|
|
181
|
+
artifacts through a small Python CLI/MCP package.
|
|
182
|
+
[Comparison and design choices →](docs/research/onboarding-2026-10-12.md)
|
|
183
|
+
|
|
184
|
+
Local worktrees share a Manager. Independent clones have separate Managers:
|
|
185
|
+
portable handoffs compare context and do not transfer a global lease. Path
|
|
186
|
+
leases are cooperative checks, not filesystem permissions. Check records are
|
|
187
|
+
unauthenticated local evidence. PR approval and merging follow your project's
|
|
188
|
+
normal rules. The demo does not establish native client or live provider connectivity.
|
|
189
|
+
|
|
190
|
+
## Contribute or get help
|
|
191
|
+
|
|
192
|
+
[Report a reproducible problem](https://github.com/QIU-Guanzong/CoProgrammer/issues) ·
|
|
193
|
+
[Propose an integration](https://github.com/QIU-Guanzong/CoProgrammer/discussions) ·
|
|
194
|
+
[Contributor guide](CONTRIBUTING.md)
|
|
195
|
+
|
|
196
|
+
Good first contributions include a small client setup example, a clearer error
|
|
197
|
+
message or a regression for a real worktree conflict. Include the command,
|
|
198
|
+
version, expected result and actual result; remove private code and credentials.
|
|
199
|
+
If CoProgrammer helps your team, a star helps others discover it.
|
|
200
|
+
|
|
201
|
+
For source development:
|
|
202
|
+
|
|
203
|
+
```sh
|
|
204
|
+
git clone https://github.com/QIU-Guanzong/CoProgrammer.git
|
|
205
|
+
cd CoProgrammer
|
|
206
|
+
python -m pip install -e .
|
|
207
|
+
python -m unittest discover -s tests
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
[MIT license](LICENSE). Preview software; feedback and concrete bug reports are welcome.
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# CoProgrammer
|
|
2
|
+
|
|
3
|
+
**Teamwork for coding agents.**
|
|
4
|
+
|
|
5
|
+
Shared tasks, file boundaries and durable handoffs for **Codex, Claude Code and
|
|
6
|
+
GitHub Copilot** working in the same Git repository.
|
|
7
|
+
|
|
8
|
+
[](https://github.com/QIU-Guanzong/CoProgrammer/actions/workflows/ci.yml)
|
|
9
|
+
[](LICENSE)
|
|
10
|
+
|
|
11
|
+
[简体中文](README.zh-CN.md) · [Try it](#try-the-preview) ·
|
|
12
|
+
[Two-window walkthrough](docs/GETTING_STARTED.md) ·
|
|
13
|
+
[Connect your client](docs/knowledge/README.md) · [Releases](https://github.com/QIU-Guanzong/CoProgrammer/releases)
|
|
14
|
+
|
|
15
|
+
## The problem
|
|
16
|
+
|
|
17
|
+
Codex is changing an API. Claude is updating its callers. Both need to know who
|
|
18
|
+
owns the files, when the upstream task is finished, and what happened before a
|
|
19
|
+
window restarted. Separate Git branches keep edits apart; the collaboration
|
|
20
|
+
still needs shared state.
|
|
21
|
+
|
|
22
|
+
CoProgrammer records **who owns a task, which paths it covers, what blocks it,
|
|
23
|
+
and what the next window needs to know**. Your coding tools write the code;
|
|
24
|
+
CoProgrammer coordinates their work through a local CLI and MCP server.
|
|
25
|
+
|
|
26
|
+
| Without a shared record | With CoProgrammer |
|
|
27
|
+
| --- | --- |
|
|
28
|
+
| Two windows try to claim overlapping work | Atomic task claims check owners, worktrees and path leases. |
|
|
29
|
+
| A worker starts before an upstream task finishes | Dependencies keep the task blocked until its prerequisite is done. |
|
|
30
|
+
| A handoff disappears in a terminal | Messages and explicit receipts persist across restarts. |
|
|
31
|
+
| A passing test refers to yesterday's files | Check receipts detect changed content, command, runtime or age. |
|
|
32
|
+
| Another computer has a different checkout | A portable handoff compares package version, HEAD, base and file content. |
|
|
33
|
+
|
|
34
|
+
## Try the preview
|
|
35
|
+
|
|
36
|
+
Requires **Python 3.10+** and **Git 2.36+**. Use an active Python virtual environment.
|
|
37
|
+
There are no runtime Python dependencies or model keys needed for the demo.
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
python -m pip install --pre --upgrade coprogrammer
|
|
41
|
+
coprogrammer demo
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The demo creates two real Git worktrees, runs task claims, dependency and overlap
|
|
45
|
+
checks, sends a handoff, acknowledges it and completes the tasks. It checks each
|
|
46
|
+
result and cleans up the temporary project. No coding client or model is launched.
|
|
47
|
+
|
|
48
|
+
An excerpt from an actual run:
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
[passed] Create two Git worktrees: Two branches share one repository and one Manager event log.
|
|
52
|
+
[passed] Block unfinished dependencies: Claude cannot claim documentation until the API task is finished.
|
|
53
|
+
[passed] Reject overlapping work: A different worktree cannot claim src/api.py while Codex holds src/**.
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
[What the demo checks →](docs/DEMO.md)
|
|
57
|
+
|
|
58
|
+
## Use it in your project
|
|
59
|
+
|
|
60
|
+
The `start` and `status` entry points require **0.3.0a2+**. Start in a committed Git
|
|
61
|
+
checkout on a named branch. Each coding window should use its own Git worktree.
|
|
62
|
+
Add `.coprogrammer/` to your project's `.gitignore` to keep local runtime state
|
|
63
|
+
out of commits.
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
# In the worktree used by Codex
|
|
67
|
+
coprogrammer start --client codex --session codex-api --task api-v2
|
|
68
|
+
coprogrammer status --session codex-api
|
|
69
|
+
|
|
70
|
+
# In the separate worktree used by Claude Code
|
|
71
|
+
coprogrammer start --client claude --session claude-ui --task api-v2
|
|
72
|
+
coprogrammer status --session claude-ui
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
`start` registers this window and previews client setup. It does not launch a
|
|
76
|
+
coding tool or install configuration. Add `--dry-run` to preview registration;
|
|
77
|
+
use `--resume` to explicitly refresh the same registered window after a break.
|
|
78
|
+
Status reads never refresh sessions. Default session freshness lasts five minutes.
|
|
79
|
+
|
|
80
|
+
In the Codex worktree, create a scoped task and inspect the next action:
|
|
81
|
+
|
|
82
|
+
```sh
|
|
83
|
+
coprogrammer manager task create --session codex-api --id api-v2 --title 'Update the API' --pattern 'src/api/**' --client codex
|
|
84
|
+
coprogrammer status --session codex-api
|
|
85
|
+
coprogrammer manager task claim --session codex-api --id api-v2
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Claims return an ownership token. Use it with the existing guard and finish
|
|
89
|
+
commands; the [two-window walkthrough](docs/GETTING_STARTED.md) covers dependency
|
|
90
|
+
setup, messages, receipts and completion. Status distinguishes repository-wide
|
|
91
|
+
readiness from work eligible for the selected window.
|
|
92
|
+
|
|
93
|
+
### Connect Codex, Claude Code or Copilot
|
|
94
|
+
|
|
95
|
+
Preview the project-local Skills, Markdown guidance and MCP configuration:
|
|
96
|
+
|
|
97
|
+
```sh
|
|
98
|
+
coprogrammer setup --client codex --include-content
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Review the output, then explicitly create missing files:
|
|
102
|
+
|
|
103
|
+
```sh
|
|
104
|
+
coprogrammer setup --client codex --apply
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Use `claude` or `copilot` for those clients. Existing project instructions are
|
|
108
|
+
preserved; differing Skills or MCP configuration are reported as conflicts.
|
|
109
|
+
Reload the client and follow its normal project/MCP trust flow. Generated
|
|
110
|
+
configuration alone does not establish a connection.
|
|
111
|
+
|
|
112
|
+
MCP exposes the same local workflows. `workspace_status` provides the combined
|
|
113
|
+
status view; `task_dispatch` previews eligible tasks. The packaged plugin
|
|
114
|
+
contains six Skills, and the CLI serves twelve read-only Markdown resources.
|
|
115
|
+
[Client setup](docs/knowledge/README.md) · [Plugin installation](docs/PLUGIN_QUICKSTART.md)
|
|
116
|
+
|
|
117
|
+
## What else can it do?
|
|
118
|
+
|
|
119
|
+
| Need | Entry point |
|
|
120
|
+
| --- | --- |
|
|
121
|
+
| Inspect work and blockers | `coprogrammer status`; [status guide](docs/GETTING_STARTED.md) |
|
|
122
|
+
| Send and acknowledge handoffs | `manager message`; [communication guide](docs/AGENT_RUNTIME_INTEROP.md) |
|
|
123
|
+
| Check file scope before edits | `manager task guard`; [scheduling guide](docs/MULTI_PLATFORM_QUICKSTART.md) |
|
|
124
|
+
| Detect stale test results | `check run` / `check verify`; [check receipts](docs/VALIDATION_EVIDENCE.md) |
|
|
125
|
+
| Continue on another computer | `manager handoff` / `workspace compare`; [portable handoffs](docs/WORKSPACE_HANDOFF.md) |
|
|
126
|
+
| Review a branch for integration | `digest` / `integration-plan`; [CLI reference](docs/GETTING_STARTED.md#prepare-a-pr) |
|
|
127
|
+
| Request a second opinion | Explicit Claude, GLM or DeepSeek review; [multi-platform guide](docs/MULTI_PLATFORM_QUICKSTART.md) |
|
|
128
|
+
|
|
129
|
+
## How it fits
|
|
130
|
+
|
|
131
|
+
Use CoProgrammer when you already run coding agents and need shared ownership,
|
|
132
|
+
communication and review evidence across their worktrees. It complements your
|
|
133
|
+
existing coding tools and GitHub review process.
|
|
134
|
+
|
|
135
|
+
[gstack](https://github.com/garrytan/gstack) provides opinionated development and
|
|
136
|
+
review workflows; [Beads](https://github.com/gastownhall/beads) provides persistent
|
|
137
|
+
agent work tracking; [Gas Town](https://github.com/gastownhall/gastown) manages
|
|
138
|
+
multi-agent workspaces and orchestration. CoProgrammer focuses on local task
|
|
139
|
+
ownership, path coordination, durable handoffs and inspectable integration
|
|
140
|
+
artifacts through a small Python CLI/MCP package.
|
|
141
|
+
[Comparison and design choices →](docs/research/onboarding-2026-10-12.md)
|
|
142
|
+
|
|
143
|
+
Local worktrees share a Manager. Independent clones have separate Managers:
|
|
144
|
+
portable handoffs compare context and do not transfer a global lease. Path
|
|
145
|
+
leases are cooperative checks, not filesystem permissions. Check records are
|
|
146
|
+
unauthenticated local evidence. PR approval and merging follow your project's
|
|
147
|
+
normal rules. The demo does not establish native client or live provider connectivity.
|
|
148
|
+
|
|
149
|
+
## Contribute or get help
|
|
150
|
+
|
|
151
|
+
[Report a reproducible problem](https://github.com/QIU-Guanzong/CoProgrammer/issues) ·
|
|
152
|
+
[Propose an integration](https://github.com/QIU-Guanzong/CoProgrammer/discussions) ·
|
|
153
|
+
[Contributor guide](CONTRIBUTING.md)
|
|
154
|
+
|
|
155
|
+
Good first contributions include a small client setup example, a clearer error
|
|
156
|
+
message or a regression for a real worktree conflict. Include the command,
|
|
157
|
+
version, expected result and actual result; remove private code and credentials.
|
|
158
|
+
If CoProgrammer helps your team, a star helps others discover it.
|
|
159
|
+
|
|
160
|
+
For source development:
|
|
161
|
+
|
|
162
|
+
```sh
|
|
163
|
+
git clone https://github.com/QIU-Guanzong/CoProgrammer.git
|
|
164
|
+
cd CoProgrammer
|
|
165
|
+
python -m pip install -e .
|
|
166
|
+
python -m unittest discover -s tests
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
[MIT license](LICENSE). Preview software; feedback and concrete bug reports are welcome.
|
|
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "coprogrammer"
|
|
7
|
-
version = "0.3.
|
|
8
|
-
description = "
|
|
7
|
+
version = "0.3.0a2"
|
|
8
|
+
description = "Shared tasks, file boundaries and handoffs for coding agents."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
11
11
|
license = { file = "LICENSE" }
|
|
@@ -14,6 +14,19 @@ that does not require a live Manager read or write.
|
|
|
14
14
|
Use this workflow during coding when several agents, branches, or worktrees may
|
|
15
15
|
touch overlapping code or shared contracts.
|
|
16
16
|
|
|
17
|
+
## Quick entry points
|
|
18
|
+
|
|
19
|
+
With CLI 0.3.0a2+, inspect the current checkout using `coprogrammer status`.
|
|
20
|
+
For a registered window, use `coprogrammer status --session <window-id>` to
|
|
21
|
+
see work eligible for that client and worktree. Read-only status never pulses,
|
|
22
|
+
claims or acknowledges a message. MCP clients can call `workspace_status`.
|
|
23
|
+
|
|
24
|
+
To register a new window, preview `coprogrammer start --client <client> --session
|
|
25
|
+
<window-id> --task <task> --dry-run`, then run without `--dry-run` when authorized.
|
|
26
|
+
For the same existing window, explicitly add `--resume`; blocked/closed or
|
|
27
|
+
mismatched windows require reconciliation. Start never installs client files
|
|
28
|
+
or launches an agent. Keep the existing preview-first setup workflow.
|
|
29
|
+
|
|
17
30
|
## Workflow
|
|
18
31
|
|
|
19
32
|
For cross-window work, check `coprogrammer --version` in each environment.
|
|
@@ -410,6 +410,7 @@ def run_git(args: list[str], cwd: Path) -> str:
|
|
|
410
410
|
cwd=cwd,
|
|
411
411
|
check=False,
|
|
412
412
|
text=True,
|
|
413
|
+
encoding="utf-8",
|
|
413
414
|
capture_output=True,
|
|
414
415
|
env=env,
|
|
415
416
|
)
|
|
@@ -1787,11 +1788,13 @@ def command_manager_briefing(args: argparse.Namespace) -> int:
|
|
|
1787
1788
|
def build_parser() -> argparse.ArgumentParser:
|
|
1788
1789
|
parser = argparse.ArgumentParser(
|
|
1789
1790
|
prog="coprogrammer",
|
|
1790
|
-
description="
|
|
1791
|
+
description="Shared tasks, file boundaries and handoffs for coding agents. Start with 'coprogrammer demo'.",
|
|
1791
1792
|
)
|
|
1792
1793
|
subparsers = parser.add_subparsers(dest="command", required=True)
|
|
1793
1794
|
from . import __version__
|
|
1794
1795
|
parser.add_argument("--version", action="version", version=__version__)
|
|
1796
|
+
from .onboarding import add_parsers as add_onboarding_parsers
|
|
1797
|
+
add_onboarding_parsers(subparsers)
|
|
1795
1798
|
|
|
1796
1799
|
demo = subparsers.add_parser("demo", help="Run a real offline coordination demo in temporary Git worktrees.")
|
|
1797
1800
|
demo.add_argument("--json", action="store_true")
|
|
@@ -21,6 +21,23 @@ _LOCKS: dict[str, threading.RLock] = {}
|
|
|
21
21
|
_LOCKS_GUARD = threading.Lock()
|
|
22
22
|
_LOCAL = threading.local()
|
|
23
23
|
DEFAULT_LOCK_TIMEOUT = 10.0
|
|
24
|
+
_WINDOWS = os.name == "nt"
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def _replace_event_log(source: str, target: Path) -> None:
|
|
28
|
+
"""Keep the transaction locked across bounded Windows replacement retries."""
|
|
29
|
+
for attempt in range(6):
|
|
30
|
+
try:
|
|
31
|
+
os.replace(source, target)
|
|
32
|
+
return
|
|
33
|
+
except OSError as exc:
|
|
34
|
+
# Windows can briefly refuse replacement while another handle is
|
|
35
|
+
# closing or a filesystem observer is inspecting the new file.
|
|
36
|
+
# Retry the same complete, flushed file; never delete the old log.
|
|
37
|
+
if (not _WINDOWS or getattr(exc, "winerror", None) not in (5, 32, 33)
|
|
38
|
+
or attempt == 5):
|
|
39
|
+
raise
|
|
40
|
+
time.sleep(0.02 * 2 ** attempt)
|
|
24
41
|
|
|
25
42
|
|
|
26
43
|
def _reject_nonfinite(value: str) -> None:
|
|
@@ -149,7 +166,7 @@ class EventTransaction:
|
|
|
149
166
|
handle.write(json.dumps(event, ensure_ascii=False, sort_keys=True, allow_nan=False) + "\n")
|
|
150
167
|
handle.flush()
|
|
151
168
|
os.fsync(handle.fileno())
|
|
152
|
-
|
|
169
|
+
_replace_event_log(temporary, self.path)
|
|
153
170
|
temporary = None
|
|
154
171
|
except (OSError, TypeError, ValueError, RecursionError) as exc:
|
|
155
172
|
raise RuntimeError(f"cannot commit Manager event log {self.path}: {exc}") from exc
|
|
@@ -231,7 +231,7 @@ TOOLS.extend(scheduler_mcp.declarations(string_schema))
|
|
|
231
231
|
TOOLS.extend(workflow_mcp.declarations(string_schema))
|
|
232
232
|
READ_ONLY_TOOLS = {"digest_branch", "manager_status", "manager_briefing", "manager_forecast", "review_summary",
|
|
233
233
|
"manager_sync", "message_inbox", "manager_wait", "message_thread", "task_board", "task_guard"}
|
|
234
|
-
READ_ONLY_TOOLS.update({"workspace_snapshot", "task_dispatch", "manager_handoff", "handoff_check", "check_verify"})
|
|
234
|
+
READ_ONLY_TOOLS.update({"workspace_status", "workspace_snapshot", "task_dispatch", "manager_handoff", "handoff_check", "check_verify"})
|
|
235
235
|
for _tool in TOOLS:
|
|
236
236
|
_tool["inputSchema"]["additionalProperties"] = False
|
|
237
237
|
_tool["annotations"] = {
|
|
@@ -424,7 +424,7 @@ for _name in ("task_create", "task_claim", "task_renew", "task_finish", "task_re
|
|
|
424
424
|
TOOL_HANDLERS[_name] = lambda ctx, args, name=_name: json.dumps(
|
|
425
425
|
scheduler_mcp.dispatch(name, ctx, args), indent=2, ensure_ascii=False)
|
|
426
426
|
|
|
427
|
-
for _name in ("workspace_snapshot", "task_dispatch", "manager_handoff", "handoff_check", "check_verify"):
|
|
427
|
+
for _name in ("workspace_status", "workspace_snapshot", "task_dispatch", "manager_handoff", "handoff_check", "check_verify"):
|
|
428
428
|
TOOL_HANDLERS[_name] = lambda ctx, args, name=_name: json.dumps(
|
|
429
429
|
workflow_mcp.dispatch(name, ctx, args), indent=2, ensure_ascii=False)
|
|
430
430
|
|