orca-agent-workflow 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.
- orca_agent_workflow-0.2.0/LICENSE +21 -0
- orca_agent_workflow-0.2.0/PKG-INFO +214 -0
- orca_agent_workflow-0.2.0/README.md +200 -0
- orca_agent_workflow-0.2.0/pyproject.toml +33 -0
- orca_agent_workflow-0.2.0/setup.cfg +4 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/__init__.py +3 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/__main__.py +3 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/adoption.py +33 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/check_sync.py +93 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/cli.py +83 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/codex_review.py +364 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/doctor.py +33 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/gate.Dockerfile +9 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/install.py +313 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/migrate.py +178 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/native.py +142 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/resume_dispatch.py +160 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/review_gate.py +291 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/run_gates.py +263 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/sensitive.json +19 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/start.py +293 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/task_plan.py +301 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/task_scope.py +1256 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/AGENTS.md +49 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/CLAUDE.md +4 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/agents/LICENSE +21 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/agents/README.md +78 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/agents/WORKFLOW.md +65 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/agents/docs/cross-provider.md +79 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/agents/docs/roles/implementer.md +15 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/agents/docs/task-permissions.md +124 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/agents/skills/project-handoff/SKILL.md +23 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/agents/skills/review-pr/SKILL.md +41 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/agents/skills/review-pr/references/record.example.json +31 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/agents/skills/review-pr/references/reviewer.md +20 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/agents/skills/session-recover/SKILL.md +17 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/agents/skills/session-recover/references/recovery.md +38 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/agents/skills/session-recover/scripts/session_context.py +239 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/agents/skills/spec-and-delegate/SKILL.md +37 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/agents/skills/spec-and-delegate/references/spec-template.md +46 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/agents/skills/start-task/SKILL.md +72 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/agents/workflow.json +64 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/agents/workflow.py +82 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/claude/skills/project-handoff/SKILL.md +12 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/claude/skills/review-pr/SKILL.md +12 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/claude/skills/session-recover/SKILL.md +12 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/claude/skills/spec-and-delegate/SKILL.md +12 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/claude/skills/start-task/SKILL.md +12 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/gitattributes +5 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/githooks/pre-push +11 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/gitignore +3 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/opencode/commands/project-handoff.md +7 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/opencode/commands/review-pr.md +7 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/opencode/commands/session-recover.md +7 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/opencode/commands/spec-and-delegate.md +7 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow/template/opencode/commands/start-task.md +9 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow.egg-info/PKG-INFO +214 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow.egg-info/SOURCES.txt +59 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow.egg-info/dependency_links.txt +1 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow.egg-info/entry_points.txt +2 -0
- orca_agent_workflow-0.2.0/src/orca_agent_workflow.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Diar Sabri
|
|
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,214 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: orca-agent-workflow
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Guardrails for running AI coding agents on code that matters: scoped workers, independent review and isolated checks, coordinated through Orca.
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Project-URL: Homepage, https://github.com/diarsabri/orca-agent-workflow
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: Operating System :: OS Independent
|
|
9
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
10
|
+
Requires-Python: >=3.11
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Dynamic: license-file
|
|
14
|
+
|
|
15
|
+
# Orca Agent Workflow
|
|
16
|
+
|
|
17
|
+
**A reusable workflow for building projects with Claude Code and Codex in Orca.**
|
|
18
|
+
|
|
19
|
+
Describe a task, approve its plan, and review the resulting PR. Orca manages the
|
|
20
|
+
workspaces; this kit supplies shared instructions and the tools for scoped
|
|
21
|
+
implementation, checks, independent review and client handoffs.
|
|
22
|
+
|
|
23
|
+
## Get started from your coding agent
|
|
24
|
+
|
|
25
|
+
Open your existing repository in **Claude Code, Codex or OpenCode**, then paste:
|
|
26
|
+
|
|
27
|
+
> Install and set up https://github.com/diarsabri/orca-agent-workflow in this
|
|
28
|
+
> repository, including Orca if it is missing. Follow INSTALL.md, preserve existing
|
|
29
|
+
> work, and verify the result.
|
|
30
|
+
|
|
31
|
+
Your agent handles dependency setup and workflow adoption in one flow. You do not
|
|
32
|
+
need to install Orca first or move the current session into it. It will check what
|
|
33
|
+
is already installed, install missing prerequisites within your request, start
|
|
34
|
+
Orca when needed, merge your project's instructions, and validate the result.
|
|
35
|
+
System permission dialogs, first-launch choices and sign-in can still need you;
|
|
36
|
+
the agent continues after those steps. OpenCode can perform setup; the full task
|
|
37
|
+
workflow currently requires a supported Claude/Codex coordinator and Claude Code
|
|
38
|
+
for implementation. Missing clients/accounts are resolved during setup.
|
|
39
|
+
|
|
40
|
+
See [the agent installation entry point](INSTALL.md) or the
|
|
41
|
+
[getting-started guide](docs/getting-started.md) for details. This repository must
|
|
42
|
+
be accessible to you; private installations need GitHub access.
|
|
43
|
+
|
|
44
|
+
## Where Orca fits
|
|
45
|
+
|
|
46
|
+
[Orca](https://github.com/stablyai/orca) is the required desktop environment and
|
|
47
|
+
runtime for managing coding-agent sessions and isolated Git worktrees. **It is a
|
|
48
|
+
workflow dependency that the setup agent can install, not a prerequisite for
|
|
49
|
+
starting setup.** Bring your own coding-agent account.
|
|
50
|
+
|
|
51
|
+
Automated Orca bootstrap currently supports macOS with an existing Homebrew:
|
|
52
|
+
the [official cask](https://github.com/stablyai/homebrew-orca/blob/main/Casks/orca.rb)
|
|
53
|
+
installs the app and its CLI. The helper uses the upstream command
|
|
54
|
+
`brew install --cask stablyai/orca/orca`, then `orca open --json` when needed. It
|
|
55
|
+
reuses existing installations and never forces an upgrade or runtime restart.
|
|
56
|
+
Other platforms/install methods use [Orca's official installers](https://www.onorca.dev/docs/install)
|
|
57
|
+
with the agent guiding or performing the supported steps. OS interaction may be
|
|
58
|
+
required. The kit runs natively on macOS, Linux and Windows (no WSL); its tests
|
|
59
|
+
run on all three in CI. On Windows, use `python` or `py -3` where this guide says
|
|
60
|
+
`python3`, and Codex review qualification is not available yet (see
|
|
61
|
+
[compatibility](docs/compatibility.md)).
|
|
62
|
+
|
|
63
|
+
Once adoption is reviewed and committed, open Claude Code or Codex in the project
|
|
64
|
+
and describe your task normally, for example: “Add a weekly habit summary.” The
|
|
65
|
+
shared project instructions select `start-task` for substantive implementation;
|
|
66
|
+
that session coordinates discovery, implementation, checks and review. Questions
|
|
67
|
+
and small edits stay lightweight. Assigned workers/reviewers keep their roles,
|
|
68
|
+
and follow-ups continue the existing task. No separate initialization prompt.
|
|
69
|
+
|
|
70
|
+
Use a fresh session after first adoption, or have the existing agent read the
|
|
71
|
+
updated `AGENTS.md` and `start-task` skill once. This is instruction-based routing,
|
|
72
|
+
not an execution hook that guarantees every agent follows it.
|
|
73
|
+
|
|
74
|
+
For an explicit new Orca workspace, the optional launcher remains:
|
|
75
|
+
|
|
76
|
+
```sh
|
|
77
|
+
python3 .agents/workflow.py start "Build a simple habit tracker"
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
This opens a fresh Orca worktree with your coordinator and planning instructions.
|
|
81
|
+
You approve the spec before a scoped implementation worker runs. Use
|
|
82
|
+
`python3 .agents/workflow.py status` for the next step or `start --dry-run` to preview.
|
|
83
|
+
Claude Code is currently required for the implementation worker; Codex can
|
|
84
|
+
coordinate and review after qualification. OpenCode can perform setup; its confined
|
|
85
|
+
worker dispatch is not qualified. Docker supplies isolated project checks.
|
|
86
|
+
|
|
87
|
+
## Optional skill installation
|
|
88
|
+
|
|
89
|
+
If you prefer to install the skill yourself, run this inside the target repo:
|
|
90
|
+
|
|
91
|
+
```sh
|
|
92
|
+
npx skills add diarsabri/orca-agent-workflow --skill setup-orca-workflow --copy
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Then ask your current agent to set up the workflow, including Orca if needed.
|
|
96
|
+
The Skills CLI needs Node/npm; the direct agent/temporary-checkout path above
|
|
97
|
+
uses Git and Python instead. The `--copy` option keeps installed skill files
|
|
98
|
+
compatible with gate snapshots. Your agent can read the installed skill directly
|
|
99
|
+
without requiring a new coding session.
|
|
100
|
+
|
|
101
|
+
## Manual setup and automation
|
|
102
|
+
|
|
103
|
+
The workflow's runtime is a Python package, `orca-agent-workflow` (standard library
|
|
104
|
+
only, Python 3.11+), run through [uv](https://docs.astral.sh/uv/). From release 0.2.0:
|
|
105
|
+
|
|
106
|
+
```sh
|
|
107
|
+
uvx orca-agent-workflow@0.2.0 init --target ./my-project
|
|
108
|
+
uvx orca-agent-workflow@0.2.0 init --target ./my-project --apply
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
For a vendored install from the release tag:
|
|
112
|
+
|
|
113
|
+
```sh
|
|
114
|
+
uvx --from git+https://github.com/diarsabri/orca-agent-workflow@v0.2.0 orca-agent-workflow init --target ./my-project --vendor --apply
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
The PyPI pin selects a version whose uploaded filenames cannot be reused.
|
|
118
|
+
The release workflow builds the wheel from the source distribution, tests that wheel
|
|
119
|
+
on Linux, macOS and Windows, and publishes both files with attestations. A version
|
|
120
|
+
pin in `uvx` does not verify a specific artifact hash. Use `--vendor` to review
|
|
121
|
+
and commit the runtime code with the application.
|
|
122
|
+
|
|
123
|
+
`init` previews by default and writes with `--apply`. It suggests checks from the
|
|
124
|
+
project, never replaces an existing file, and lists files that need a semantic
|
|
125
|
+
merge with a candidate under `.tmp/orca-agent-workflow/merge/`; the setup skill
|
|
126
|
+
does that merge with you. Projects from an earlier version use `migrate` instead.
|
|
127
|
+
|
|
128
|
+
An application receives about 27 files, all under `.agents/` and `.claude/` plus
|
|
129
|
+
`AGENTS.md`, `CLAUDE.md` and ignore/attribute rules, and no runtime code. The runtime
|
|
130
|
+
version is pinned in `.agents/workflow.json`; `.agents/workflow.py` runs exactly that
|
|
131
|
+
version through `uvx`, or the copy in `.agents/runtime/` with `--vendor`. Add `--opencode` for OpenCode
|
|
132
|
+
commands or `--pre-push-hook` for the protected-branch hook. The project guide is
|
|
133
|
+
installed as `.agents/README.md`.
|
|
134
|
+
|
|
135
|
+
The kit's MIT notice is preserved in `.agents/LICENSE`; your application's license
|
|
136
|
+
stays yours to choose. A GitHub template copy gives you the starter kit itself;
|
|
137
|
+
use the skill or `init` to adopt it into a separate application.
|
|
138
|
+
|
|
139
|
+
## Try the mechanics without a model account
|
|
140
|
+
|
|
141
|
+
```sh
|
|
142
|
+
cd orca-agent-workflow
|
|
143
|
+
python3 examples/offline_demo.py
|
|
144
|
+
python3 -m unittest discover -s tests -q
|
|
145
|
+
python3 scripts/check_docs.py
|
|
146
|
+
python3 .agents/workflow.py doctor
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
The offline demo creates a disposable project, plans a synthetic approved task,
|
|
150
|
+
checks allowed/denied file operations, and freezes reviewer inputs. It performs
|
|
151
|
+
no model calls and does not pretend to be an independent model review.
|
|
152
|
+
|
|
153
|
+
## What is included
|
|
154
|
+
|
|
155
|
+
| Capability | Implementation |
|
|
156
|
+
| --- | --- |
|
|
157
|
+
| Shared project contract | `AGENTS.md`, `CLAUDE.md`, project configuration and thin skill adapters |
|
|
158
|
+
| Approved task scope | Exact read/write/sensitive paths from `plan` |
|
|
159
|
+
| Constrained implementation | Experimental Claude file-only broker with preparation/probe receipts |
|
|
160
|
+
| Coordinator verification | Disposable local Docker gates, trusted build inputs, no runtime network |
|
|
161
|
+
| Independent review | Frozen inputs, exact base/head, complete-coverage reporting and local evidence gate |
|
|
162
|
+
| Client recovery | Model-free local transcript reader plus exact-session handoff procedure |
|
|
163
|
+
| Adoption | Agent-led setup, shared default task routing, careful instruction merging and an optional workspace launcher |
|
|
164
|
+
|
|
165
|
+
## Provider support is explicit
|
|
166
|
+
|
|
167
|
+
- **Planner:** configure Claude or Codex in the shared roles policy.
|
|
168
|
+
- **Implementer:** Claude through the prepared/probed file-only adapter.
|
|
169
|
+
- **Reviewer:** a fresh scoped Claude session, or an opt-in locally qualified
|
|
170
|
+
Codex reviewer. Codex review starts disabled in generated projects. Once
|
|
171
|
+
both providers can review, the reviewer comes from a provider other than
|
|
172
|
+
the planner's unless that provider cannot run, which the review discloses.
|
|
173
|
+
- **Codex implementation:** disabled until native capability scope is verified.
|
|
174
|
+
- **OpenCode:** shared instructions/command adapters; confined worker dispatch is
|
|
175
|
+
not qualified by this release.
|
|
176
|
+
|
|
177
|
+
Model IDs in the example policy are editable examples from the originating setup,
|
|
178
|
+
not a promise of account availability. The starter gate image supports standard-
|
|
179
|
+
library Python checks; application dependencies and Node/web support need a
|
|
180
|
+
reviewed project-specific image. See [compatibility](docs/compatibility.md).
|
|
181
|
+
|
|
182
|
+
## Why this shape
|
|
183
|
+
|
|
184
|
+
```mermaid
|
|
185
|
+
flowchart LR
|
|
186
|
+
P[Planner] --> A[Approved spec]
|
|
187
|
+
A --> I[Scoped implementer]
|
|
188
|
+
I --> G[Isolated checks]
|
|
189
|
+
G --> R[Fresh reviewer]
|
|
190
|
+
R --> H[Human merge]
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Planning needs context. Implementation benefits from a small, explicit job.
|
|
194
|
+
Review needs fresh context and the complete diff. Keeping those roles distinct
|
|
195
|
+
makes handoffs and permission decisions visible without expecting every provider
|
|
196
|
+
to expose identical native features.
|
|
197
|
+
|
|
198
|
+
The approved spec is the primary scope. A small fixed backstop protects the
|
|
199
|
+
workflow itself and credentials; sensitive build/configuration files are declared
|
|
200
|
+
and reviewed rather than added to an endlessly expanding forbidden-file list.
|
|
201
|
+
|
|
202
|
+
Read the [architecture](docs/architecture.md), [workflow](.agents/WORKFLOW.md),
|
|
203
|
+
[permission guide](.agents/docs/task-permissions.md), [security model](docs/security.md),
|
|
204
|
+
and [validation record](docs/validation.md) for operational details and limits.
|
|
205
|
+
|
|
206
|
+
## Contribute or adapt
|
|
207
|
+
|
|
208
|
+
See [contributing](CONTRIBUTING.md). The public release has fresh history and
|
|
209
|
+
synthetic fixtures; it contains no application source, project transcripts,
|
|
210
|
+
credentials or production configuration from the originating private pilot.
|
|
211
|
+
|
|
212
|
+
[MIT licensed](LICENSE). Independent project by Diar Sabri, built for use with
|
|
213
|
+
separately installed Orca and model CLIs. No affiliation or endorsement is implied;
|
|
214
|
+
their subscriptions, trademarks and licenses remain separate.
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
# Orca Agent Workflow
|
|
2
|
+
|
|
3
|
+
**A reusable workflow for building projects with Claude Code and Codex in Orca.**
|
|
4
|
+
|
|
5
|
+
Describe a task, approve its plan, and review the resulting PR. Orca manages the
|
|
6
|
+
workspaces; this kit supplies shared instructions and the tools for scoped
|
|
7
|
+
implementation, checks, independent review and client handoffs.
|
|
8
|
+
|
|
9
|
+
## Get started from your coding agent
|
|
10
|
+
|
|
11
|
+
Open your existing repository in **Claude Code, Codex or OpenCode**, then paste:
|
|
12
|
+
|
|
13
|
+
> Install and set up https://github.com/diarsabri/orca-agent-workflow in this
|
|
14
|
+
> repository, including Orca if it is missing. Follow INSTALL.md, preserve existing
|
|
15
|
+
> work, and verify the result.
|
|
16
|
+
|
|
17
|
+
Your agent handles dependency setup and workflow adoption in one flow. You do not
|
|
18
|
+
need to install Orca first or move the current session into it. It will check what
|
|
19
|
+
is already installed, install missing prerequisites within your request, start
|
|
20
|
+
Orca when needed, merge your project's instructions, and validate the result.
|
|
21
|
+
System permission dialogs, first-launch choices and sign-in can still need you;
|
|
22
|
+
the agent continues after those steps. OpenCode can perform setup; the full task
|
|
23
|
+
workflow currently requires a supported Claude/Codex coordinator and Claude Code
|
|
24
|
+
for implementation. Missing clients/accounts are resolved during setup.
|
|
25
|
+
|
|
26
|
+
See [the agent installation entry point](INSTALL.md) or the
|
|
27
|
+
[getting-started guide](docs/getting-started.md) for details. This repository must
|
|
28
|
+
be accessible to you; private installations need GitHub access.
|
|
29
|
+
|
|
30
|
+
## Where Orca fits
|
|
31
|
+
|
|
32
|
+
[Orca](https://github.com/stablyai/orca) is the required desktop environment and
|
|
33
|
+
runtime for managing coding-agent sessions and isolated Git worktrees. **It is a
|
|
34
|
+
workflow dependency that the setup agent can install, not a prerequisite for
|
|
35
|
+
starting setup.** Bring your own coding-agent account.
|
|
36
|
+
|
|
37
|
+
Automated Orca bootstrap currently supports macOS with an existing Homebrew:
|
|
38
|
+
the [official cask](https://github.com/stablyai/homebrew-orca/blob/main/Casks/orca.rb)
|
|
39
|
+
installs the app and its CLI. The helper uses the upstream command
|
|
40
|
+
`brew install --cask stablyai/orca/orca`, then `orca open --json` when needed. It
|
|
41
|
+
reuses existing installations and never forces an upgrade or runtime restart.
|
|
42
|
+
Other platforms/install methods use [Orca's official installers](https://www.onorca.dev/docs/install)
|
|
43
|
+
with the agent guiding or performing the supported steps. OS interaction may be
|
|
44
|
+
required. The kit runs natively on macOS, Linux and Windows (no WSL); its tests
|
|
45
|
+
run on all three in CI. On Windows, use `python` or `py -3` where this guide says
|
|
46
|
+
`python3`, and Codex review qualification is not available yet (see
|
|
47
|
+
[compatibility](docs/compatibility.md)).
|
|
48
|
+
|
|
49
|
+
Once adoption is reviewed and committed, open Claude Code or Codex in the project
|
|
50
|
+
and describe your task normally, for example: “Add a weekly habit summary.” The
|
|
51
|
+
shared project instructions select `start-task` for substantive implementation;
|
|
52
|
+
that session coordinates discovery, implementation, checks and review. Questions
|
|
53
|
+
and small edits stay lightweight. Assigned workers/reviewers keep their roles,
|
|
54
|
+
and follow-ups continue the existing task. No separate initialization prompt.
|
|
55
|
+
|
|
56
|
+
Use a fresh session after first adoption, or have the existing agent read the
|
|
57
|
+
updated `AGENTS.md` and `start-task` skill once. This is instruction-based routing,
|
|
58
|
+
not an execution hook that guarantees every agent follows it.
|
|
59
|
+
|
|
60
|
+
For an explicit new Orca workspace, the optional launcher remains:
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
python3 .agents/workflow.py start "Build a simple habit tracker"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
This opens a fresh Orca worktree with your coordinator and planning instructions.
|
|
67
|
+
You approve the spec before a scoped implementation worker runs. Use
|
|
68
|
+
`python3 .agents/workflow.py status` for the next step or `start --dry-run` to preview.
|
|
69
|
+
Claude Code is currently required for the implementation worker; Codex can
|
|
70
|
+
coordinate and review after qualification. OpenCode can perform setup; its confined
|
|
71
|
+
worker dispatch is not qualified. Docker supplies isolated project checks.
|
|
72
|
+
|
|
73
|
+
## Optional skill installation
|
|
74
|
+
|
|
75
|
+
If you prefer to install the skill yourself, run this inside the target repo:
|
|
76
|
+
|
|
77
|
+
```sh
|
|
78
|
+
npx skills add diarsabri/orca-agent-workflow --skill setup-orca-workflow --copy
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Then ask your current agent to set up the workflow, including Orca if needed.
|
|
82
|
+
The Skills CLI needs Node/npm; the direct agent/temporary-checkout path above
|
|
83
|
+
uses Git and Python instead. The `--copy` option keeps installed skill files
|
|
84
|
+
compatible with gate snapshots. Your agent can read the installed skill directly
|
|
85
|
+
without requiring a new coding session.
|
|
86
|
+
|
|
87
|
+
## Manual setup and automation
|
|
88
|
+
|
|
89
|
+
The workflow's runtime is a Python package, `orca-agent-workflow` (standard library
|
|
90
|
+
only, Python 3.11+), run through [uv](https://docs.astral.sh/uv/). From release 0.2.0:
|
|
91
|
+
|
|
92
|
+
```sh
|
|
93
|
+
uvx orca-agent-workflow@0.2.0 init --target ./my-project
|
|
94
|
+
uvx orca-agent-workflow@0.2.0 init --target ./my-project --apply
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
For a vendored install from the release tag:
|
|
98
|
+
|
|
99
|
+
```sh
|
|
100
|
+
uvx --from git+https://github.com/diarsabri/orca-agent-workflow@v0.2.0 orca-agent-workflow init --target ./my-project --vendor --apply
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
The PyPI pin selects a version whose uploaded filenames cannot be reused.
|
|
104
|
+
The release workflow builds the wheel from the source distribution, tests that wheel
|
|
105
|
+
on Linux, macOS and Windows, and publishes both files with attestations. A version
|
|
106
|
+
pin in `uvx` does not verify a specific artifact hash. Use `--vendor` to review
|
|
107
|
+
and commit the runtime code with the application.
|
|
108
|
+
|
|
109
|
+
`init` previews by default and writes with `--apply`. It suggests checks from the
|
|
110
|
+
project, never replaces an existing file, and lists files that need a semantic
|
|
111
|
+
merge with a candidate under `.tmp/orca-agent-workflow/merge/`; the setup skill
|
|
112
|
+
does that merge with you. Projects from an earlier version use `migrate` instead.
|
|
113
|
+
|
|
114
|
+
An application receives about 27 files, all under `.agents/` and `.claude/` plus
|
|
115
|
+
`AGENTS.md`, `CLAUDE.md` and ignore/attribute rules, and no runtime code. The runtime
|
|
116
|
+
version is pinned in `.agents/workflow.json`; `.agents/workflow.py` runs exactly that
|
|
117
|
+
version through `uvx`, or the copy in `.agents/runtime/` with `--vendor`. Add `--opencode` for OpenCode
|
|
118
|
+
commands or `--pre-push-hook` for the protected-branch hook. The project guide is
|
|
119
|
+
installed as `.agents/README.md`.
|
|
120
|
+
|
|
121
|
+
The kit's MIT notice is preserved in `.agents/LICENSE`; your application's license
|
|
122
|
+
stays yours to choose. A GitHub template copy gives you the starter kit itself;
|
|
123
|
+
use the skill or `init` to adopt it into a separate application.
|
|
124
|
+
|
|
125
|
+
## Try the mechanics without a model account
|
|
126
|
+
|
|
127
|
+
```sh
|
|
128
|
+
cd orca-agent-workflow
|
|
129
|
+
python3 examples/offline_demo.py
|
|
130
|
+
python3 -m unittest discover -s tests -q
|
|
131
|
+
python3 scripts/check_docs.py
|
|
132
|
+
python3 .agents/workflow.py doctor
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
The offline demo creates a disposable project, plans a synthetic approved task,
|
|
136
|
+
checks allowed/denied file operations, and freezes reviewer inputs. It performs
|
|
137
|
+
no model calls and does not pretend to be an independent model review.
|
|
138
|
+
|
|
139
|
+
## What is included
|
|
140
|
+
|
|
141
|
+
| Capability | Implementation |
|
|
142
|
+
| --- | --- |
|
|
143
|
+
| Shared project contract | `AGENTS.md`, `CLAUDE.md`, project configuration and thin skill adapters |
|
|
144
|
+
| Approved task scope | Exact read/write/sensitive paths from `plan` |
|
|
145
|
+
| Constrained implementation | Experimental Claude file-only broker with preparation/probe receipts |
|
|
146
|
+
| Coordinator verification | Disposable local Docker gates, trusted build inputs, no runtime network |
|
|
147
|
+
| Independent review | Frozen inputs, exact base/head, complete-coverage reporting and local evidence gate |
|
|
148
|
+
| Client recovery | Model-free local transcript reader plus exact-session handoff procedure |
|
|
149
|
+
| Adoption | Agent-led setup, shared default task routing, careful instruction merging and an optional workspace launcher |
|
|
150
|
+
|
|
151
|
+
## Provider support is explicit
|
|
152
|
+
|
|
153
|
+
- **Planner:** configure Claude or Codex in the shared roles policy.
|
|
154
|
+
- **Implementer:** Claude through the prepared/probed file-only adapter.
|
|
155
|
+
- **Reviewer:** a fresh scoped Claude session, or an opt-in locally qualified
|
|
156
|
+
Codex reviewer. Codex review starts disabled in generated projects. Once
|
|
157
|
+
both providers can review, the reviewer comes from a provider other than
|
|
158
|
+
the planner's unless that provider cannot run, which the review discloses.
|
|
159
|
+
- **Codex implementation:** disabled until native capability scope is verified.
|
|
160
|
+
- **OpenCode:** shared instructions/command adapters; confined worker dispatch is
|
|
161
|
+
not qualified by this release.
|
|
162
|
+
|
|
163
|
+
Model IDs in the example policy are editable examples from the originating setup,
|
|
164
|
+
not a promise of account availability. The starter gate image supports standard-
|
|
165
|
+
library Python checks; application dependencies and Node/web support need a
|
|
166
|
+
reviewed project-specific image. See [compatibility](docs/compatibility.md).
|
|
167
|
+
|
|
168
|
+
## Why this shape
|
|
169
|
+
|
|
170
|
+
```mermaid
|
|
171
|
+
flowchart LR
|
|
172
|
+
P[Planner] --> A[Approved spec]
|
|
173
|
+
A --> I[Scoped implementer]
|
|
174
|
+
I --> G[Isolated checks]
|
|
175
|
+
G --> R[Fresh reviewer]
|
|
176
|
+
R --> H[Human merge]
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Planning needs context. Implementation benefits from a small, explicit job.
|
|
180
|
+
Review needs fresh context and the complete diff. Keeping those roles distinct
|
|
181
|
+
makes handoffs and permission decisions visible without expecting every provider
|
|
182
|
+
to expose identical native features.
|
|
183
|
+
|
|
184
|
+
The approved spec is the primary scope. A small fixed backstop protects the
|
|
185
|
+
workflow itself and credentials; sensitive build/configuration files are declared
|
|
186
|
+
and reviewed rather than added to an endlessly expanding forbidden-file list.
|
|
187
|
+
|
|
188
|
+
Read the [architecture](docs/architecture.md), [workflow](.agents/WORKFLOW.md),
|
|
189
|
+
[permission guide](.agents/docs/task-permissions.md), [security model](docs/security.md),
|
|
190
|
+
and [validation record](docs/validation.md) for operational details and limits.
|
|
191
|
+
|
|
192
|
+
## Contribute or adapt
|
|
193
|
+
|
|
194
|
+
See [contributing](CONTRIBUTING.md). The public release has fresh history and
|
|
195
|
+
synthetic fixtures; it contains no application source, project transcripts,
|
|
196
|
+
credentials or production configuration from the originating private pilot.
|
|
197
|
+
|
|
198
|
+
[MIT licensed](LICENSE). Independent project by Diar Sabri, built for use with
|
|
199
|
+
separately installed Orca and model CLIs. No affiliation or endorsement is implied;
|
|
200
|
+
their subscriptions, trademarks and licenses remain separate.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77"] # PEP 639 license fields
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "orca-agent-workflow"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "Guardrails for running AI coding agents on code that matters: scoped workers, independent review and isolated checks, coordinated through Orca."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
license-files = ["LICENSE"]
|
|
12
|
+
requires-python = ">=3.11"
|
|
13
|
+
dependencies = []
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
"Operating System :: OS Independent",
|
|
17
|
+
"Topic :: Software Development :: Quality Assurance",
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
[project.urls]
|
|
21
|
+
Homepage = "https://github.com/diarsabri/orca-agent-workflow"
|
|
22
|
+
|
|
23
|
+
[project.scripts]
|
|
24
|
+
orca-agent-workflow = "orca_agent_workflow.cli:main"
|
|
25
|
+
|
|
26
|
+
[tool.setuptools.dynamic]
|
|
27
|
+
version = {attr = "orca_agent_workflow.__version__"}
|
|
28
|
+
|
|
29
|
+
[tool.setuptools.packages.find]
|
|
30
|
+
where = ["src"]
|
|
31
|
+
|
|
32
|
+
[tool.setuptools.package-data]
|
|
33
|
+
orca_agent_workflow = ["*.json", "*.Dockerfile", "template/**/*"]
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"""Describe the local Git revisions used at the first project handoff."""
|
|
2
|
+
|
|
3
|
+
import subprocess
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
|
|
6
|
+
from orca_agent_workflow import task_scope
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def revisions(root: Path) -> dict[str, str]:
|
|
10
|
+
def git_text(*args: str) -> str:
|
|
11
|
+
try:
|
|
12
|
+
return task_scope.git_bytes(root, *args).decode().strip()
|
|
13
|
+
except (subprocess.CalledProcessError, FileNotFoundError):
|
|
14
|
+
return ""
|
|
15
|
+
|
|
16
|
+
def policy(commit: str) -> str:
|
|
17
|
+
if not commit:
|
|
18
|
+
return "unresolved"
|
|
19
|
+
entry = git_text("ls-tree", commit, "--", task_scope.CONFIG)
|
|
20
|
+
return f"{commit} (policy {'present' if entry else 'unavailable'})"
|
|
21
|
+
|
|
22
|
+
head = gate = worker = default_ref = ""
|
|
23
|
+
if (root / ".git").exists():
|
|
24
|
+
head = git_text("rev-parse", "--verify", "HEAD^{commit}")
|
|
25
|
+
default_ref = git_text("symbolic-ref", "--quiet", "refs/remotes/origin/HEAD")
|
|
26
|
+
if default_ref:
|
|
27
|
+
gate = git_text("rev-parse", "--verify", default_ref + "^{commit}")
|
|
28
|
+
worker = git_text("merge-base", "HEAD", "origin/HEAD")
|
|
29
|
+
return {
|
|
30
|
+
"workspace (committed HEAD)": policy(head),
|
|
31
|
+
"gate (origin default branch)": policy(gate) if default_ref else "origin/HEAD unavailable",
|
|
32
|
+
"worker (merge base with origin/HEAD)": policy(worker) if default_ref else "origin/HEAD unavailable",
|
|
33
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Check the project's workflow contract without calling a model or changing settings."""
|
|
3
|
+
|
|
4
|
+
import sys
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
from orca_agent_workflow import __version__, review_gate, task_scope
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def check(root: Path) -> list[str]:
|
|
11
|
+
problems = []
|
|
12
|
+
try:
|
|
13
|
+
config = task_scope.load_config((root / task_scope.CONFIG).read_bytes())
|
|
14
|
+
policy = task_scope.roles_policy(config)
|
|
15
|
+
pinned = config["runtime"].get("version")
|
|
16
|
+
if config["runtime"].get("package") != "orca-agent-workflow" or not pinned:
|
|
17
|
+
problems.append("runtime must pin an orca-agent-workflow version")
|
|
18
|
+
elif pinned != __version__:
|
|
19
|
+
problems.append(f"Runtime {__version__} differs from the pinned {pinned}")
|
|
20
|
+
if not isinstance(config["project"].get("checks", []), list):
|
|
21
|
+
problems.append("project.checks must be a list of commands")
|
|
22
|
+
if policy.get("reviewer_provider_differs_from_planner") != "preferred":
|
|
23
|
+
problems.append('reviewer_provider_differs_from_planner must be "preferred"')
|
|
24
|
+
for role in ("planner", "implementer", "reviewer"):
|
|
25
|
+
profiles = policy.get("roles", {}).get(role)
|
|
26
|
+
if not isinstance(profiles, list):
|
|
27
|
+
problems.append(f"Missing role: {role}")
|
|
28
|
+
continue
|
|
29
|
+
for profile in profiles:
|
|
30
|
+
if profile.get("enabled") is True and not review_gate.exact_model(
|
|
31
|
+
profile.get("agent"), profile.get("model")
|
|
32
|
+
):
|
|
33
|
+
problems.append(f"Enabled {role} requires an exact model ID")
|
|
34
|
+
if (
|
|
35
|
+
role == "implementer"
|
|
36
|
+
and profile.get("agent") != "claude"
|
|
37
|
+
and profile.get("enabled")
|
|
38
|
+
):
|
|
39
|
+
problems.append("Only the qualified Claude file-only implementer is supported")
|
|
40
|
+
skills = (
|
|
41
|
+
"start-task",
|
|
42
|
+
"spec-and-delegate",
|
|
43
|
+
"review-pr",
|
|
44
|
+
"project-handoff",
|
|
45
|
+
"session-recover",
|
|
46
|
+
)
|
|
47
|
+
for skill in skills:
|
|
48
|
+
canonical = root / f".agents/skills/{skill}/SKILL.md"
|
|
49
|
+
adapter = root / f".claude/skills/{skill}/SKILL.md"
|
|
50
|
+
command = root / f".opencode/commands/{skill}.md"
|
|
51
|
+
if not canonical.is_file():
|
|
52
|
+
problems.append(f"Missing shared skill: {skill}")
|
|
53
|
+
if (
|
|
54
|
+
not adapter.is_file()
|
|
55
|
+
or f".agents/skills/{skill}/SKILL.md" not in adapter.read_text(encoding="utf-8")
|
|
56
|
+
):
|
|
57
|
+
problems.append(f"Claude adapter drift: {skill}")
|
|
58
|
+
# OpenCode commands are optional; once installed they must stay thin.
|
|
59
|
+
if (root / ".opencode/commands").is_dir() and (
|
|
60
|
+
not command.is_file()
|
|
61
|
+
or f".agents/skills/{skill}/SKILL.md" not in command.read_text(encoding="utf-8")
|
|
62
|
+
):
|
|
63
|
+
problems.append(f"OpenCode command drift: {skill}")
|
|
64
|
+
if ".agents/skills/start-task/SKILL.md" not in (root / "AGENTS.md").read_text(encoding="utf-8"):
|
|
65
|
+
problems.append(
|
|
66
|
+
"AGENTS.md must route substantive tasks to the shared start-task skill"
|
|
67
|
+
)
|
|
68
|
+
if "@AGENTS.md" not in (root / "CLAUDE.md").read_text(encoding="utf-8"):
|
|
69
|
+
problems.append("CLAUDE.md must import the shared contract")
|
|
70
|
+
for path in (
|
|
71
|
+
".agents/workflow.py",
|
|
72
|
+
".agents/WORKFLOW.md",
|
|
73
|
+
".agents/docs/roles/implementer.md",
|
|
74
|
+
".agents/skills/spec-and-delegate/references/spec-template.md",
|
|
75
|
+
):
|
|
76
|
+
if not (root / path).is_file():
|
|
77
|
+
problems.append(f"Missing workflow file: {path}")
|
|
78
|
+
except (OSError, ValueError, KeyError, TypeError) as exc:
|
|
79
|
+
problems.append(f"Invalid workflow configuration: {exc}")
|
|
80
|
+
return problems
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
def main() -> int:
|
|
84
|
+
problems = check(task_scope.project_folder())
|
|
85
|
+
for problem in problems:
|
|
86
|
+
print("workflow-check: " + problem, file=sys.stderr)
|
|
87
|
+
if not problems:
|
|
88
|
+
print("workflow-check: OK (shared contract, roles, and thin adapters)")
|
|
89
|
+
return int(bool(problems))
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
if __name__ == "__main__":
|
|
93
|
+
raise SystemExit(main())
|