py-agent-orchestra 0.1.1__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 (123) hide show
  1. py_agent_orchestra-0.1.1/LICENSE +21 -0
  2. py_agent_orchestra-0.1.1/MANIFEST.in +1 -0
  3. py_agent_orchestra-0.1.1/PKG-INFO +231 -0
  4. py_agent_orchestra-0.1.1/README.md +207 -0
  5. py_agent_orchestra-0.1.1/pyproject.toml +108 -0
  6. py_agent_orchestra-0.1.1/setup.cfg +4 -0
  7. py_agent_orchestra-0.1.1/skills/agent-orchestra-developer/SKILL-meta.md +58 -0
  8. py_agent_orchestra-0.1.1/skills/agent-orchestra-developer/SKILL.md +118 -0
  9. py_agent_orchestra-0.1.1/skills/agent-orchestra-reviewer/SKILL-meta.md +60 -0
  10. py_agent_orchestra-0.1.1/skills/agent-orchestra-reviewer/SKILL.md +129 -0
  11. py_agent_orchestra-0.1.1/src/agent_orchestra/__init__.py +5 -0
  12. py_agent_orchestra-0.1.1/src/agent_orchestra/__main__.py +6 -0
  13. py_agent_orchestra-0.1.1/src/agent_orchestra/adapter/__init__.py +1 -0
  14. py_agent_orchestra-0.1.1/src/agent_orchestra/adapter/base.py +49 -0
  15. py_agent_orchestra-0.1.1/src/agent_orchestra/adapter/claude_code.py +762 -0
  16. py_agent_orchestra-0.1.1/src/agent_orchestra/adapter/codex.py +505 -0
  17. py_agent_orchestra-0.1.1/src/agent_orchestra/adapter/developer.py +87 -0
  18. py_agent_orchestra-0.1.1/src/agent_orchestra/adapter/errors.py +19 -0
  19. py_agent_orchestra-0.1.1/src/agent_orchestra/adapter/issue_reviewer.py +55 -0
  20. py_agent_orchestra-0.1.1/src/agent_orchestra/adapter/process.py +142 -0
  21. py_agent_orchestra-0.1.1/src/agent_orchestra/adapter/registry.py +207 -0
  22. py_agent_orchestra-0.1.1/src/agent_orchestra/agents.py +208 -0
  23. py_agent_orchestra-0.1.1/src/agent_orchestra/attempt_documents.py +131 -0
  24. py_agent_orchestra-0.1.1/src/agent_orchestra/audit.py +1369 -0
  25. py_agent_orchestra-0.1.1/src/agent_orchestra/cli.py +2158 -0
  26. py_agent_orchestra-0.1.1/src/agent_orchestra/developer_remediation.py +489 -0
  27. py_agent_orchestra-0.1.1/src/agent_orchestra/errors.py +7 -0
  28. py_agent_orchestra-0.1.1/src/agent_orchestra/evidence.py +745 -0
  29. py_agent_orchestra-0.1.1/src/agent_orchestra/execution_context.py +267 -0
  30. py_agent_orchestra-0.1.1/src/agent_orchestra/invocations.py +1218 -0
  31. py_agent_orchestra-0.1.1/src/agent_orchestra/issue_review.py +796 -0
  32. py_agent_orchestra-0.1.1/src/agent_orchestra/issue_sources.py +593 -0
  33. py_agent_orchestra-0.1.1/src/agent_orchestra/manifest/assignments.toml +18 -0
  34. py_agent_orchestra-0.1.1/src/agent_orchestra/manifest/claude-code.toml +9 -0
  35. py_agent_orchestra-0.1.1/src/agent_orchestra/manifest/codex.toml +9 -0
  36. py_agent_orchestra-0.1.1/src/agent_orchestra/manifest/evidence.toml +43 -0
  37. py_agent_orchestra-0.1.1/src/agent_orchestra/manifest/github.toml +16 -0
  38. py_agent_orchestra-0.1.1/src/agent_orchestra/manifest/gitlab.toml +16 -0
  39. py_agent_orchestra-0.1.1/src/agent_orchestra/manifests.py +509 -0
  40. py_agent_orchestra-0.1.1/src/agent_orchestra/messages.py +711 -0
  41. py_agent_orchestra-0.1.1/src/agent_orchestra/models.py +270 -0
  42. py_agent_orchestra-0.1.1/src/agent_orchestra/persisted_enum.py +45 -0
  43. py_agent_orchestra-0.1.1/src/agent_orchestra/py.typed +1 -0
  44. py_agent_orchestra-0.1.1/src/agent_orchestra/queued_review.py +1066 -0
  45. py_agent_orchestra-0.1.1/src/agent_orchestra/reports.py +100 -0
  46. py_agent_orchestra-0.1.1/src/agent_orchestra/retention.py +620 -0
  47. py_agent_orchestra-0.1.1/src/agent_orchestra/review_batch.py +88 -0
  48. py_agent_orchestra-0.1.1/src/agent_orchestra/review_fanout.py +79 -0
  49. py_agent_orchestra-0.1.1/src/agent_orchestra/reviewer_batch_run.py +1749 -0
  50. py_agent_orchestra-0.1.1/src/agent_orchestra/reviewer_paths.py +97 -0
  51. py_agent_orchestra-0.1.1/src/agent_orchestra/reviewer_plan.py +117 -0
  52. py_agent_orchestra-0.1.1/src/agent_orchestra/runtime_metadata.py +253 -0
  53. py_agent_orchestra-0.1.1/src/agent_orchestra/schemas.py +591 -0
  54. py_agent_orchestra-0.1.1/src/agent_orchestra/settings.py +267 -0
  55. py_agent_orchestra-0.1.1/src/agent_orchestra/skill_install.py +223 -0
  56. py_agent_orchestra-0.1.1/src/agent_orchestra/stats_review.py +1084 -0
  57. py_agent_orchestra-0.1.1/src/agent_orchestra/store.py +868 -0
  58. py_agent_orchestra-0.1.1/src/agent_orchestra/usage.py +43 -0
  59. py_agent_orchestra-0.1.1/src/agent_orchestra/worker.py +1003 -0
  60. py_agent_orchestra-0.1.1/src/agent_orchestra/workflow.py +100 -0
  61. py_agent_orchestra-0.1.1/src/agent_orchestra/worktrees.py +44 -0
  62. py_agent_orchestra-0.1.1/src/py_agent_orchestra.egg-info/PKG-INFO +231 -0
  63. py_agent_orchestra-0.1.1/src/py_agent_orchestra.egg-info/SOURCES.txt +121 -0
  64. py_agent_orchestra-0.1.1/src/py_agent_orchestra.egg-info/dependency_links.txt +1 -0
  65. py_agent_orchestra-0.1.1/src/py_agent_orchestra.egg-info/entry_points.txt +6 -0
  66. py_agent_orchestra-0.1.1/src/py_agent_orchestra.egg-info/requires.txt +1 -0
  67. py_agent_orchestra-0.1.1/src/py_agent_orchestra.egg-info/top_level.txt +1 -0
  68. py_agent_orchestra-0.1.1/tests/__init__.py +1 -0
  69. py_agent_orchestra-0.1.1/tests/cli_helpers.py +277 -0
  70. py_agent_orchestra-0.1.1/tests/conftest.py +124 -0
  71. py_agent_orchestra-0.1.1/tests/data/__init__.py +1 -0
  72. py_agent_orchestra-0.1.1/tests/data/cli_agents/__init__.py +1 -0
  73. py_agent_orchestra-0.1.1/tests/data/cli_agents/developer.py +87 -0
  74. py_agent_orchestra-0.1.1/tests/data/cli_agents/fake_codex.py +69 -0
  75. py_agent_orchestra-0.1.1/tests/data/cli_agents/reviewer.py +128 -0
  76. py_agent_orchestra-0.1.1/tests/data/live_runtime/changes/calculator.py +7 -0
  77. py_agent_orchestra-0.1.1/tests/data/live_runtime/remediated/calculator.py +7 -0
  78. py_agent_orchestra-0.1.1/tests/data/live_runtime/repository/calculator.py +7 -0
  79. py_agent_orchestra-0.1.1/tests/data/live_runtime/repository/test_calculator.py +18 -0
  80. py_agent_orchestra-0.1.1/tests/live/__init__.py +1 -0
  81. py_agent_orchestra-0.1.1/tests/live/runtime_harness.py +719 -0
  82. py_agent_orchestra-0.1.1/tests/live/test_claude_integration.py +268 -0
  83. py_agent_orchestra-0.1.1/tests/live/test_codex_integration.py +217 -0
  84. py_agent_orchestra-0.1.1/tests/test_agents.py +385 -0
  85. py_agent_orchestra-0.1.1/tests/test_attempt_documents.py +165 -0
  86. py_agent_orchestra-0.1.1/tests/test_audit.py +984 -0
  87. py_agent_orchestra-0.1.1/tests/test_claude_code_reviewer.py +454 -0
  88. py_agent_orchestra-0.1.1/tests/test_cli.py +249 -0
  89. py_agent_orchestra-0.1.1/tests/test_cli_intake.py +502 -0
  90. py_agent_orchestra-0.1.1/tests/test_cli_queries.py +851 -0
  91. py_agent_orchestra-0.1.1/tests/test_cli_resume.py +1017 -0
  92. py_agent_orchestra-0.1.1/tests/test_cli_run.py +1695 -0
  93. py_agent_orchestra-0.1.1/tests/test_developer_adapters.py +490 -0
  94. py_agent_orchestra-0.1.1/tests/test_errors.py +67 -0
  95. py_agent_orchestra-0.1.1/tests/test_evidence.py +339 -0
  96. py_agent_orchestra-0.1.1/tests/test_invocations.py +920 -0
  97. py_agent_orchestra-0.1.1/tests/test_issue_review.py +1012 -0
  98. py_agent_orchestra-0.1.1/tests/test_issue_sources.py +488 -0
  99. py_agent_orchestra-0.1.1/tests/test_job_views.py +1144 -0
  100. py_agent_orchestra-0.1.1/tests/test_live_runtime_capabilities.py +53 -0
  101. py_agent_orchestra-0.1.1/tests/test_live_runtime_harness.py +218 -0
  102. py_agent_orchestra-0.1.1/tests/test_manifests.py +320 -0
  103. py_agent_orchestra-0.1.1/tests/test_release.py +227 -0
  104. py_agent_orchestra-0.1.1/tests/test_reports.py +39 -0
  105. py_agent_orchestra-0.1.1/tests/test_retention.py +597 -0
  106. py_agent_orchestra-0.1.1/tests/test_review_batch.py +143 -0
  107. py_agent_orchestra-0.1.1/tests/test_review_fanout.py +178 -0
  108. py_agent_orchestra-0.1.1/tests/test_reviewer_adapters.py +252 -0
  109. py_agent_orchestra-0.1.1/tests/test_reviewer_paths.py +78 -0
  110. py_agent_orchestra-0.1.1/tests/test_reviewer_plan.py +142 -0
  111. py_agent_orchestra-0.1.1/tests/test_runtime_metadata.py +227 -0
  112. py_agent_orchestra-0.1.1/tests/test_runtime_registry.py +532 -0
  113. py_agent_orchestra-0.1.1/tests/test_schemas.py +423 -0
  114. py_agent_orchestra-0.1.1/tests/test_settings.py +362 -0
  115. py_agent_orchestra-0.1.1/tests/test_skill_install.py +156 -0
  116. py_agent_orchestra-0.1.1/tests/test_stats_review.py +2016 -0
  117. py_agent_orchestra-0.1.1/tests/test_store.py +524 -0
  118. py_agent_orchestra-0.1.1/tests/test_streaming_process.py +146 -0
  119. py_agent_orchestra-0.1.1/tests/test_worker.py +615 -0
  120. py_agent_orchestra-0.1.1/tests/test_worker_reviewer_batch.py +1979 -0
  121. py_agent_orchestra-0.1.1/tests/test_worker_reviewer_namespace.py +186 -0
  122. py_agent_orchestra-0.1.1/tests/test_workflow.py +123 -0
  123. py_agent_orchestra-0.1.1/tests/test_worktrees.py +43 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Alex Sokolsky
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ recursive-include tests *.py
@@ -0,0 +1,231 @@
1
+ Metadata-Version: 2.4
2
+ Name: py-agent-orchestra
3
+ Version: 0.1.1
4
+ Summary: A lightweight local workflow orchestrator for development and review agents.
5
+ Author: Alex Sokolsky
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/asokolsky/agent-orchestra
8
+ Project-URL: Documentation, https://github.com/asokolsky/agent-orchestra/tree/main/docs
9
+ Project-URL: Issues, https://github.com/asokolsky/agent-orchestra/issues
10
+ Project-URL: Repository, https://github.com/asokolsky/agent-orchestra
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.14
17
+ Classifier: Topic :: Software Development :: Quality Assurance
18
+ Classifier: Typing :: Typed
19
+ Requires-Python: >=3.14
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: pydantic<3,>=2.12
23
+ Dynamic: license-file
24
+
25
+ # agent-orchestra
26
+
27
+ Agents are good. Collaborating agents are even better.
28
+ Claude has
29
+ [sub-agents](https://code.claude.com/docs/en/sub-agents)
30
+ and OpenAI has
31
+ [subagents](https://learn.chatgpt.com/docs/agent-configuration/subagents).
32
+ But... How about combining the agents from different vendors?
33
+
34
+ [`agent-orchestra`](docs/cli.md) is a local CLI for coordinating coding agents.
35
+ Each agent gets a role and an assigned Git worktree. Workflow state and review
36
+ artifacts stay outside that worktree.
37
+
38
+ What do you get after the agents finish? An approval tied to one exact diff,
39
+ schema-validated responses, and evidence you can inspect later.
40
+
41
+ Use an isolated linked worktree for development and an exact-head detached
42
+ worktree for remote review.
43
+
44
+ ## Problem We Are Trying to Solve
45
+
46
+ Coding agents can implement and review changes, but coordinating several agent
47
+ task attempts is still largely manual.
48
+
49
+ Agent-orchestra intends to be a thin coordination layer offering improved agent productivity.
50
+
51
+ ## Concepts
52
+
53
+ See [Roles, runtimes, adapters, and capabilities](docs/concepts.md) for the
54
+ canonical definitions. See the [CLI reference](docs/cli.md) for every command,
55
+ option, default, output, and exit behavior.
56
+
57
+ Agent Orchestra distinguishes source-code reviewers and source-code developers,
58
+ which exchange diff-bound findings, from issue reviewers and issue creators,
59
+ which exchange readiness feedback about issue prose. The shorter persisted role
60
+ values `reviewer` and `developer` refer to the source-code roles unless an
61
+ `issue_review` job supplies the scenario context.
62
+
63
+ ## Toolchain
64
+
65
+ The project targets Python 3.14 and requires Git 2.36 or newer for
66
+ NUL-delimited worktree metadata. `mise` installs `uv` and provides the routine
67
+ project tasks. `uv` manages the virtual environment and dependencies, runs the
68
+ Python tools, and builds the source and wheel distributions. Ruff provides
69
+ formatting and linting, mypy checks types, and pytest runs the test suite.
70
+
71
+ ## Installation
72
+
73
+ Agent Orchestra currently requires Python 3.14. Install the published CLI with
74
+ [`uv`](https://docs.astral.sh/uv/guides/tools/):
75
+
76
+ ```shell
77
+ uv tool install py-agent-orchestra
78
+ agent-orchestra --version
79
+ ```
80
+
81
+ [`pipx`](https://pipx.pypa.io/) is an equivalent option:
82
+
83
+ ```shell
84
+ pipx install py-agent-orchestra
85
+ ```
86
+
87
+ The PyPI project is named `py-agent-orchestra`; it installs the
88
+ `agent-orchestra` command. Then install the bundled developer and reviewer
89
+ skills for Codex and Claude Code:
90
+
91
+ ```shell
92
+ agent-orchestra skills install \
93
+ --skill agent-orchestra-developer \
94
+ --skill agent-orchestra-reviewer
95
+ ```
96
+
97
+ The [primer](docs/primer.md) continues from here. If you want to change Agent
98
+ Orchestra itself, use the source-checkout steps under [Development](#development).
99
+
100
+ Provider diagnostics, built-in runtime arguments, and canonical evidence names
101
+ are declared in versioned TOML files under
102
+ `src/agent_orchestra/manifest/`. These files ship in both distribution formats
103
+ and are validated before the CLI handles a command. See
104
+ [Packaged knowledge manifests](docs/design.md#packaged-knowledge-manifests) for
105
+ the schema, compatibility rules, and stable failure codes.
106
+
107
+ ## Supported scenarios
108
+
109
+ - The implemented [local development and review workflow](docs/workflows.md#local-development-and-review)
110
+ captures an existing uncommitted diff as a job, dispatches an independent
111
+ source-code reviewer, sends structured findings to a source-code developer
112
+ for remediation, and
113
+ repeats review against each new diff digest. Codex and Claude Code can be
114
+ selected independently for either role. Interrupted and validation-required
115
+ jobs can resume from durable task and attempt evidence. Approval stops at the
116
+ commit-authorization boundary; committing and publishing remain separate
117
+ user-authorized actions.
118
+ - The implemented [issue-refinement workflow](docs/workflows.md#issue-refinement)
119
+ captures a GitHub or GitLab issue and reviews its immutable source digest
120
+ before development
121
+ begins. An issue reviewer checks that its problem statement, scope, constraints,
122
+ risks, and acceptance criteria are clear and testable, then communicates
123
+ actionable feedback to the issue creator. The issue can be revised and reviewed
124
+ again until it is ready for implementation. Codex and Claude Code receive the
125
+ same provider-neutral request. Review is read-only; the generated feedback
126
+ can be posted only through a separate explicitly authorized command.
127
+ - The implemented [`audit`](docs/cli.md#audit) view reconstructs ordered state,
128
+ tasks, attempts, canonical message summaries, and provider actions for either
129
+ workflow. Optional local verification checks the finalized evidence index and
130
+ hashes without reading process-stream contents or contacting a provider.
131
+ - The implemented [`stats`](docs/cli.md#stats) report summarizes review verdicts,
132
+ job standing, and finding dispositions across a rolling time window while
133
+ identifying jobs whose history is unavailable.
134
+ - The implemented [settings and retention commands](docs/cli.md#global-settings)
135
+ provide XDG-aware storage defaults, effective-value inspection, and a
136
+ dry-run-first policy for expiring terminal job evidence. Database cleanup and
137
+ unmatched-directory cleanup require separate explicit options.
138
+ - The designed [remote pull-request review workflow](docs/workflows.md#remote-pull-request-review)
139
+ starts from a pull-request URL and reviews one exact remote head. Remote
140
+ pull-request enqueueing and provider-side review actions are not implemented.
141
+
142
+ The [design and message contract](docs/design.md) defines the shared protocol
143
+ and the [CLI reference](docs/cli.md) documents the implemented commands.
144
+
145
+ ## Using it
146
+
147
+ The [primer](docs/primer.md) takes you from an unreviewed change to a review you
148
+ can act on: installing the role skills, capturing a diff, running the review, and
149
+ reading the result.
150
+
151
+ The [documentation index](docs/README.md) says what every other document is for.
152
+
153
+ ## Current scope
154
+
155
+ The current implementation provides:
156
+
157
+ - typed job, review, and finding models;
158
+ - an explicit, validated state machine;
159
+ - SQLite job storage with transition history and optimistic updates;
160
+ - an interface for agent adapters with timeouts;
161
+ - digest capture for tracked and untracked local changes;
162
+ - Markdown review rendering;
163
+ - commands to initialize state, enqueue local changes from one repo or a
164
+ directory of repos, and inspect jobs and tasks;
165
+ - commands to capture GitHub and GitLab issues and run digest-bound,
166
+ provider-neutral readiness reviews;
167
+ - XDG-aware persistent settings plus dry-run-first evidence retention with
168
+ auditable expiry markers and fail-closed orphan handling;
169
+ - a Python-native installer for Codex and Claude Code skills;
170
+ - versioned developer and reviewer skills under `skills/`;
171
+ - built-in Codex and Claude Code adapters for developer and reviewer roles,
172
+ selected independently, plus a custom one-review command escape hatch;
173
+ - a bounded remediation loop with strict messages, finding dispositions,
174
+ digest progress checks, role-specific timeouts, resumable interruptions and
175
+ blocked handoffs, and iteration exhaustion;
176
+ - adapter-neutral attempt records separating requested and effective model
177
+ provenance, plus read-only process stream viewing through tasks.
178
+
179
+ The source-code roles are documented separately:
180
+
181
+ - [Source-code developer role](docs/role-developer.md)
182
+ - [Source-code reviewer role](docs/role-reviewer.md)
183
+ - [Issue reviewer role](docs/role-issue-reviewer.md)
184
+ - [Issue creator responsibility](docs/role-issue-creator.md)
185
+
186
+ Installation and invocation examples are in the
187
+ [primer](docs/primer.md).
188
+
189
+ Every review and remediation request, result, artifact, attempt
190
+ configuration, process log, and terminal failure is persisted outside the
191
+ worktree. Recoverable jobs continue with the same job ID through the
192
+ [`resume` command](docs/cli.md#resume); terminal replacements can retain lineage
193
+ through [`enqueue-local --supersedes`](docs/cli.md#enqueue-local). Initial
194
+ clean-worktree development, worktree creation, leases, and remote pull-request
195
+ operations remain subsequent increments. Issue-review feedback can be posted to
196
+ GitHub or GitLab only through the explicit `post-issue-feedback --authorize`
197
+ boundary.
198
+
199
+ ## Development
200
+
201
+ Install the toolchain, synchronize the development dependencies, and run the
202
+ standard gates:
203
+
204
+ ```shell
205
+ mise install
206
+ uv sync --group dev
207
+ mise run format
208
+ mise run lint
209
+ mise run mypy
210
+ mise run tests
211
+ mise run build
212
+ mise run verify-dist
213
+ git diff --check
214
+ ```
215
+
216
+ Continuous integration runs the same gates on every push and pull request,
217
+ substituting `mise run format-check` for `mise run format` so a branch is
218
+ verified rather than rewritten. Run `mise run format-check` locally to see what
219
+ CI will see.
220
+
221
+ Authenticated runtime checks are deliberately separate from the ordinary test
222
+ suite. After installing the corresponding role skills, run
223
+ `mise run test-live-claude` or `mise run test-live-codex`; see
224
+ [Opt-in live runtime verification](docs/cli.md#opt-in-live-runtime-verification)
225
+ for prerequisites, cost, isolation, and failure semantics.
226
+
227
+ `mise run tests` distributes the suite across one worker per available CPU,
228
+ which takes it from about a minute to about fifteen seconds. Parallel workers
229
+ interleave their output, so use `mise run tests-serial` when reading a single
230
+ failure: it runs everything in one verbose process. Both tasks run the same
231
+ tests and must both pass.
@@ -0,0 +1,207 @@
1
+ # agent-orchestra
2
+
3
+ Agents are good. Collaborating agents are even better.
4
+ Claude has
5
+ [sub-agents](https://code.claude.com/docs/en/sub-agents)
6
+ and OpenAI has
7
+ [subagents](https://learn.chatgpt.com/docs/agent-configuration/subagents).
8
+ But... How about combining the agents from different vendors?
9
+
10
+ [`agent-orchestra`](docs/cli.md) is a local CLI for coordinating coding agents.
11
+ Each agent gets a role and an assigned Git worktree. Workflow state and review
12
+ artifacts stay outside that worktree.
13
+
14
+ What do you get after the agents finish? An approval tied to one exact diff,
15
+ schema-validated responses, and evidence you can inspect later.
16
+
17
+ Use an isolated linked worktree for development and an exact-head detached
18
+ worktree for remote review.
19
+
20
+ ## Problem We Are Trying to Solve
21
+
22
+ Coding agents can implement and review changes, but coordinating several agent
23
+ task attempts is still largely manual.
24
+
25
+ Agent-orchestra intends to be a thin coordination layer offering improved agent productivity.
26
+
27
+ ## Concepts
28
+
29
+ See [Roles, runtimes, adapters, and capabilities](docs/concepts.md) for the
30
+ canonical definitions. See the [CLI reference](docs/cli.md) for every command,
31
+ option, default, output, and exit behavior.
32
+
33
+ Agent Orchestra distinguishes source-code reviewers and source-code developers,
34
+ which exchange diff-bound findings, from issue reviewers and issue creators,
35
+ which exchange readiness feedback about issue prose. The shorter persisted role
36
+ values `reviewer` and `developer` refer to the source-code roles unless an
37
+ `issue_review` job supplies the scenario context.
38
+
39
+ ## Toolchain
40
+
41
+ The project targets Python 3.14 and requires Git 2.36 or newer for
42
+ NUL-delimited worktree metadata. `mise` installs `uv` and provides the routine
43
+ project tasks. `uv` manages the virtual environment and dependencies, runs the
44
+ Python tools, and builds the source and wheel distributions. Ruff provides
45
+ formatting and linting, mypy checks types, and pytest runs the test suite.
46
+
47
+ ## Installation
48
+
49
+ Agent Orchestra currently requires Python 3.14. Install the published CLI with
50
+ [`uv`](https://docs.astral.sh/uv/guides/tools/):
51
+
52
+ ```shell
53
+ uv tool install py-agent-orchestra
54
+ agent-orchestra --version
55
+ ```
56
+
57
+ [`pipx`](https://pipx.pypa.io/) is an equivalent option:
58
+
59
+ ```shell
60
+ pipx install py-agent-orchestra
61
+ ```
62
+
63
+ The PyPI project is named `py-agent-orchestra`; it installs the
64
+ `agent-orchestra` command. Then install the bundled developer and reviewer
65
+ skills for Codex and Claude Code:
66
+
67
+ ```shell
68
+ agent-orchestra skills install \
69
+ --skill agent-orchestra-developer \
70
+ --skill agent-orchestra-reviewer
71
+ ```
72
+
73
+ The [primer](docs/primer.md) continues from here. If you want to change Agent
74
+ Orchestra itself, use the source-checkout steps under [Development](#development).
75
+
76
+ Provider diagnostics, built-in runtime arguments, and canonical evidence names
77
+ are declared in versioned TOML files under
78
+ `src/agent_orchestra/manifest/`. These files ship in both distribution formats
79
+ and are validated before the CLI handles a command. See
80
+ [Packaged knowledge manifests](docs/design.md#packaged-knowledge-manifests) for
81
+ the schema, compatibility rules, and stable failure codes.
82
+
83
+ ## Supported scenarios
84
+
85
+ - The implemented [local development and review workflow](docs/workflows.md#local-development-and-review)
86
+ captures an existing uncommitted diff as a job, dispatches an independent
87
+ source-code reviewer, sends structured findings to a source-code developer
88
+ for remediation, and
89
+ repeats review against each new diff digest. Codex and Claude Code can be
90
+ selected independently for either role. Interrupted and validation-required
91
+ jobs can resume from durable task and attempt evidence. Approval stops at the
92
+ commit-authorization boundary; committing and publishing remain separate
93
+ user-authorized actions.
94
+ - The implemented [issue-refinement workflow](docs/workflows.md#issue-refinement)
95
+ captures a GitHub or GitLab issue and reviews its immutable source digest
96
+ before development
97
+ begins. An issue reviewer checks that its problem statement, scope, constraints,
98
+ risks, and acceptance criteria are clear and testable, then communicates
99
+ actionable feedback to the issue creator. The issue can be revised and reviewed
100
+ again until it is ready for implementation. Codex and Claude Code receive the
101
+ same provider-neutral request. Review is read-only; the generated feedback
102
+ can be posted only through a separate explicitly authorized command.
103
+ - The implemented [`audit`](docs/cli.md#audit) view reconstructs ordered state,
104
+ tasks, attempts, canonical message summaries, and provider actions for either
105
+ workflow. Optional local verification checks the finalized evidence index and
106
+ hashes without reading process-stream contents or contacting a provider.
107
+ - The implemented [`stats`](docs/cli.md#stats) report summarizes review verdicts,
108
+ job standing, and finding dispositions across a rolling time window while
109
+ identifying jobs whose history is unavailable.
110
+ - The implemented [settings and retention commands](docs/cli.md#global-settings)
111
+ provide XDG-aware storage defaults, effective-value inspection, and a
112
+ dry-run-first policy for expiring terminal job evidence. Database cleanup and
113
+ unmatched-directory cleanup require separate explicit options.
114
+ - The designed [remote pull-request review workflow](docs/workflows.md#remote-pull-request-review)
115
+ starts from a pull-request URL and reviews one exact remote head. Remote
116
+ pull-request enqueueing and provider-side review actions are not implemented.
117
+
118
+ The [design and message contract](docs/design.md) defines the shared protocol
119
+ and the [CLI reference](docs/cli.md) documents the implemented commands.
120
+
121
+ ## Using it
122
+
123
+ The [primer](docs/primer.md) takes you from an unreviewed change to a review you
124
+ can act on: installing the role skills, capturing a diff, running the review, and
125
+ reading the result.
126
+
127
+ The [documentation index](docs/README.md) says what every other document is for.
128
+
129
+ ## Current scope
130
+
131
+ The current implementation provides:
132
+
133
+ - typed job, review, and finding models;
134
+ - an explicit, validated state machine;
135
+ - SQLite job storage with transition history and optimistic updates;
136
+ - an interface for agent adapters with timeouts;
137
+ - digest capture for tracked and untracked local changes;
138
+ - Markdown review rendering;
139
+ - commands to initialize state, enqueue local changes from one repo or a
140
+ directory of repos, and inspect jobs and tasks;
141
+ - commands to capture GitHub and GitLab issues and run digest-bound,
142
+ provider-neutral readiness reviews;
143
+ - XDG-aware persistent settings plus dry-run-first evidence retention with
144
+ auditable expiry markers and fail-closed orphan handling;
145
+ - a Python-native installer for Codex and Claude Code skills;
146
+ - versioned developer and reviewer skills under `skills/`;
147
+ - built-in Codex and Claude Code adapters for developer and reviewer roles,
148
+ selected independently, plus a custom one-review command escape hatch;
149
+ - a bounded remediation loop with strict messages, finding dispositions,
150
+ digest progress checks, role-specific timeouts, resumable interruptions and
151
+ blocked handoffs, and iteration exhaustion;
152
+ - adapter-neutral attempt records separating requested and effective model
153
+ provenance, plus read-only process stream viewing through tasks.
154
+
155
+ The source-code roles are documented separately:
156
+
157
+ - [Source-code developer role](docs/role-developer.md)
158
+ - [Source-code reviewer role](docs/role-reviewer.md)
159
+ - [Issue reviewer role](docs/role-issue-reviewer.md)
160
+ - [Issue creator responsibility](docs/role-issue-creator.md)
161
+
162
+ Installation and invocation examples are in the
163
+ [primer](docs/primer.md).
164
+
165
+ Every review and remediation request, result, artifact, attempt
166
+ configuration, process log, and terminal failure is persisted outside the
167
+ worktree. Recoverable jobs continue with the same job ID through the
168
+ [`resume` command](docs/cli.md#resume); terminal replacements can retain lineage
169
+ through [`enqueue-local --supersedes`](docs/cli.md#enqueue-local). Initial
170
+ clean-worktree development, worktree creation, leases, and remote pull-request
171
+ operations remain subsequent increments. Issue-review feedback can be posted to
172
+ GitHub or GitLab only through the explicit `post-issue-feedback --authorize`
173
+ boundary.
174
+
175
+ ## Development
176
+
177
+ Install the toolchain, synchronize the development dependencies, and run the
178
+ standard gates:
179
+
180
+ ```shell
181
+ mise install
182
+ uv sync --group dev
183
+ mise run format
184
+ mise run lint
185
+ mise run mypy
186
+ mise run tests
187
+ mise run build
188
+ mise run verify-dist
189
+ git diff --check
190
+ ```
191
+
192
+ Continuous integration runs the same gates on every push and pull request,
193
+ substituting `mise run format-check` for `mise run format` so a branch is
194
+ verified rather than rewritten. Run `mise run format-check` locally to see what
195
+ CI will see.
196
+
197
+ Authenticated runtime checks are deliberately separate from the ordinary test
198
+ suite. After installing the corresponding role skills, run
199
+ `mise run test-live-claude` or `mise run test-live-codex`; see
200
+ [Opt-in live runtime verification](docs/cli.md#opt-in-live-runtime-verification)
201
+ for prerequisites, cost, isolation, and failure semantics.
202
+
203
+ `mise run tests` distributes the suite across one worker per available CPU,
204
+ which takes it from about a minute to about fifteen seconds. Parallel workers
205
+ interleave their output, so use `mise run tests-serial` when reading a single
206
+ failure: it runs everything in one verbose process. Both tasks run the same
207
+ tests and must both pass.
@@ -0,0 +1,108 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "py-agent-orchestra"
7
+ version = "0.1.1"
8
+ description = "A lightweight local workflow orchestrator for development and review agents."
9
+ readme = "README.md"
10
+ requires-python = ">=3.14"
11
+ license = "MIT"
12
+ license-files = ["LICENSE"]
13
+ authors = [{ name = "Alex Sokolsky" }]
14
+ dependencies = ["pydantic>=2.12,<3"]
15
+ classifiers = [
16
+ "Development Status :: 3 - Alpha",
17
+ "Environment :: Console",
18
+ "Intended Audience :: Developers",
19
+ "Operating System :: OS Independent",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.14",
22
+ "Topic :: Software Development :: Quality Assurance",
23
+ "Typing :: Typed",
24
+ ]
25
+
26
+ [project.urls]
27
+ Homepage = "https://github.com/asokolsky/agent-orchestra"
28
+ Documentation = "https://github.com/asokolsky/agent-orchestra/tree/main/docs"
29
+ Issues = "https://github.com/asokolsky/agent-orchestra/issues"
30
+ Repository = "https://github.com/asokolsky/agent-orchestra"
31
+
32
+ [project.scripts]
33
+ agent-orchestra = "agent_orchestra.cli:main"
34
+ agent-orchestra-codex-reviewer = "agent_orchestra.adapter.codex:main"
35
+ agent-orchestra-claude-code-reviewer = "agent_orchestra.adapter.claude_code:main"
36
+ agent-orchestra-codex-developer = "agent_orchestra.adapter.codex:developer_main"
37
+ agent-orchestra-claude-code-developer = "agent_orchestra.adapter.claude_code:developer_main"
38
+
39
+ [dependency-groups]
40
+ # uv sync --group dev
41
+ dev = [
42
+ "mypy>=1.16.1",
43
+ "pytest>=8.4",
44
+ "pytest-xdist>=3.6",
45
+ "ruff>=0.12.1",
46
+ ]
47
+
48
+ [tool.uv]
49
+ default-groups = ["dev"]
50
+
51
+ [tool.setuptools]
52
+ package-dir = { "" = "src" }
53
+ packages = ["agent_orchestra", "agent_orchestra.adapter"]
54
+ include-package-data = false
55
+
56
+ [tool.setuptools.package-data]
57
+ agent_orchestra = ["py.typed", "manifest/*.toml"]
58
+
59
+ [tool.setuptools.data-files]
60
+ "share/agent-orchestra/skills/agent-orchestra-developer" = [
61
+ "skills/agent-orchestra-developer/SKILL.md",
62
+ "skills/agent-orchestra-developer/SKILL-meta.md",
63
+ ]
64
+ "share/agent-orchestra/skills/agent-orchestra-reviewer" = [
65
+ "skills/agent-orchestra-reviewer/SKILL.md",
66
+ "skills/agent-orchestra-reviewer/SKILL-meta.md",
67
+ ]
68
+
69
+ [tool.pytest.ini_options]
70
+ addopts = "-q"
71
+ testpaths = ["tests"]
72
+ norecursedirs = ["tests/data"]
73
+ markers = [
74
+ "live_claude: opt-in tests that invoke an installed authenticated Claude CLI",
75
+ "live_codex: opt-in tests that invoke an installed authenticated Codex CLI",
76
+ ]
77
+
78
+ [tool.ruff]
79
+ line-length = 88
80
+ extend-exclude = ["tests/data/live_runtime"]
81
+
82
+ [tool.ruff.lint]
83
+ select = ["ALL"]
84
+ ignore = [
85
+ "A001","A002","ANN401","ARG001",
86
+ "B006","B011","BLE001",
87
+ "C901","COM812","CPY001",
88
+ "D100","D101","D102","D103","D104","D107","D200","D202","D203","D205","D212","D400","D401","D415",
89
+ "E501","EM102","ERA001",
90
+ "FBT001",
91
+ "G004",
92
+ "Q000","Q003",
93
+ "N801","N803","N806",
94
+ "PT009","PT015","PT027","PLR0915","PLR1711","PLR0912","PLR0913","PLR2004","PLW0603",
95
+ "RET505","RET507","RUF022",
96
+ "S101","S603","SIM114","SLF001",
97
+ "T201",
98
+ "TRY003","TRY300"
99
+ ]
100
+
101
+ [tool.ruff.format]
102
+ quote-style = "single"
103
+
104
+ [tool.mypy]
105
+ strict = true
106
+ warn_return_any = true
107
+ warn_unused_configs = true
108
+ exclude = ["^tests/data/live_runtime/"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,58 @@
1
+ ---
2
+ title: "Agent Orchestra Developer Meta"
3
+ purpose: "Meta documentation for the agent-orchestra-developer skill."
4
+ audience:
5
+ - developers
6
+ - agent-authors
7
+ tags:
8
+ - skill-meta
9
+ - agent-orchestra-developer
10
+ authors:
11
+ - "asokolsky@gmail.com"
12
+ created-at: "2026-09-02T14:31:12+0200"
13
+ updated-at: "2026-09-08T09:15:00+0200"
14
+ ---
15
+
16
+ # Agent Orchestra Developer Meta
17
+
18
+ Meta documentation for the
19
+ [agent-orchestra-developer skill](./SKILL.md).
20
+
21
+ ## Relationship To Existing Standards
22
+
23
+ - The skill follows the Agent Skills specification for its directory and
24
+ `SKILL.md` frontmatter.
25
+ - The same `SKILL.md` is portable to OpenAI Codex and Anthropic Claude Code;
26
+ neither runtime receives a divergent role contract.
27
+ - Version and source metadata, dependency documentation, and this companion
28
+ file follow the conventions established by the DLI SOT skill-authoring
29
+ workflow.
30
+ - Worktree safety and action authorization remain subject to the instructions
31
+ of the repo being changed and the agent runtime executing the skill.
32
+
33
+ ## Dependencies
34
+
35
+ No external skills are required. The workflow uses the Git CLI already required
36
+ by agent-orchestra.
37
+
38
+ | Dependency | Source | Install |
39
+ |---|---|---|
40
+ | `git` | [Git](https://git-scm.com/) | `brew install git` |
41
+
42
+ Git provides worktree status and diff evidence to the developer. If Git is
43
+ unavailable or the assigned path is not a Git worktree, return `blocked` without
44
+ editing files.
45
+
46
+ ## Departures And Rationale
47
+
48
+ The SOT companion-document convention uses SOT-specific link syntax. This repo
49
+ uses standard Markdown links because it is not rendered by the SOT documentation
50
+ toolchain. Product-specific UI metadata is omitted because Anthropic has no
51
+ counterpart to `agents/openai.yaml`, and a shared Agent Skills source prevents
52
+ the two runtimes from drifting. No other departures are intended.
53
+
54
+ ## Update Cadence
55
+
56
+ Review this skill whenever the developer request/result contract, CLI schema,
57
+ workflow states, lifecycle authorization rules, or upstream Agent Skills
58
+ specification changes. Otherwise, review it annually.