herdr-agent-org 0.6.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.
- herdr_agent_org-0.6.0/LICENSE +203 -0
- herdr_agent_org-0.6.0/PKG-INFO +280 -0
- herdr_agent_org-0.6.0/README.md +255 -0
- herdr_agent_org-0.6.0/pyproject.toml +40 -0
- herdr_agent_org-0.6.0/setup.cfg +4 -0
- herdr_agent_org-0.6.0/src/agentorg/__init__.py +3 -0
- herdr_agent_org-0.6.0/src/agentorg/__main__.py +4 -0
- herdr_agent_org-0.6.0/src/agentorg/_fake_agent.py +26 -0
- herdr_agent_org-0.6.0/src/agentorg/cli.py +342 -0
- herdr_agent_org-0.6.0/src/agentorg/config.py +164 -0
- herdr_agent_org-0.6.0/src/agentorg/data/PROTOCOL.md +86 -0
- herdr_agent_org-0.6.0/src/agentorg/data/content.json +34 -0
- herdr_agent_org-0.6.0/src/agentorg/data/engineering.json +53 -0
- herdr_agent_org-0.6.0/src/agentorg/data/research.json +34 -0
- herdr_agent_org-0.6.0/src/agentorg/data/skills/agent-org-bootstrap/SKILL.md +29 -0
- herdr_agent_org-0.6.0/src/agentorg/data/skills/agent-org-engineering/SKILL.md +63 -0
- herdr_agent_org-0.6.0/src/agentorg/data/skills/agent-org-manager/SKILL.md +69 -0
- herdr_agent_org-0.6.0/src/agentorg/data/skills/agent-org-recovery/SKILL.md +41 -0
- herdr_agent_org-0.6.0/src/agentorg/runtime.py +570 -0
- herdr_agent_org-0.6.0/src/agentorg/smoke.py +261 -0
- herdr_agent_org-0.6.0/src/herdr_agent_org.egg-info/PKG-INFO +280 -0
- herdr_agent_org-0.6.0/src/herdr_agent_org.egg-info/SOURCES.txt +30 -0
- herdr_agent_org-0.6.0/src/herdr_agent_org.egg-info/dependency_links.txt +1 -0
- herdr_agent_org-0.6.0/src/herdr_agent_org.egg-info/entry_points.txt +2 -0
- herdr_agent_org-0.6.0/src/herdr_agent_org.egg-info/top_level.txt +1 -0
- herdr_agent_org-0.6.0/tests/test_agentorg.py +387 -0
- herdr_agent_org-0.6.0/tests/test_evals.py +118 -0
- herdr_agent_org-0.6.0/tests/test_panes.py +112 -0
- herdr_agent_org-0.6.0/tests/test_plugins.py +53 -0
- herdr_agent_org-0.6.0/tests/test_v03.py +255 -0
- herdr_agent_org-0.6.0/tests/test_v04.py +152 -0
- herdr_agent_org-0.6.0/tests/test_v05.py +190 -0
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Work; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Work, in at least one of the
|
|
111
|
+
following places: within a NOTICE text file distributed as part
|
|
112
|
+
of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate gross
|
|
156
|
+
negligence) or agreed to in writing, shall any Contributor be liable
|
|
157
|
+
to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any kind arising out of this
|
|
159
|
+
License or the use or inability to use the Work (including but not
|
|
160
|
+
limited to damages for loss of goods or services, loss of use, data,
|
|
161
|
+
or profits, or business interruption) however caused and on any
|
|
162
|
+
theory of liability, whether in contract, strict liability, or tort
|
|
163
|
+
(including negligence or otherwise) arising in any way out of the
|
|
164
|
+
use of this License, even if advised of the possibility of such
|
|
165
|
+
damage.
|
|
166
|
+
|
|
167
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
168
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
169
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
170
|
+
or other liability obligations and/or rights consistent with this
|
|
171
|
+
License. However, in accepting such obligations, You may act only
|
|
172
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
173
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
174
|
+
defend, and hold each Contributor harmless for any liability
|
|
175
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
176
|
+
of your accepting any such warranty or additional liability.
|
|
177
|
+
|
|
178
|
+
END OF TERMS AND CONDITIONS
|
|
179
|
+
|
|
180
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
181
|
+
|
|
182
|
+
To apply the Apache License to your work, attach the following
|
|
183
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
184
|
+
replaced with your own identifying information. (Don't include
|
|
185
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
186
|
+
comment syntax for the file format. We also recommend that a
|
|
187
|
+
file or class name and description of content be included on the
|
|
188
|
+
same "printed page" as the copyright notice for easier
|
|
189
|
+
identification within third-party archives.
|
|
190
|
+
|
|
191
|
+
Copyright 2026 WeightForge / Herdr Agent Organization contributors
|
|
192
|
+
|
|
193
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
194
|
+
you may not use this file except in compliance with the License.
|
|
195
|
+
You may obtain a copy of the License at
|
|
196
|
+
|
|
197
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
198
|
+
|
|
199
|
+
Unless required by applicable law or agreed to in writing, software
|
|
200
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
201
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
202
|
+
See the License for the specific language governing permissions and
|
|
203
|
+
limitations under the License.
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: herdr-agent-org
|
|
3
|
+
Version: 0.6.0
|
|
4
|
+
Summary: Reusable, profile-aware AI organizations for Herdr App and herdr-core
|
|
5
|
+
Author: Community contributors
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/WeightForge/herdr-agent-org
|
|
8
|
+
Project-URL: Issues, https://github.com/WeightForge/herdr-agent-org/issues
|
|
9
|
+
Project-URL: Changelog, https://github.com/WeightForge/herdr-agent-org/blob/main/CHANGELOG.md
|
|
10
|
+
Keywords: herdr,claude-code,codex,ai-agents,orchestration,skills
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Topic :: Software Development
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Dynamic: license-file
|
|
25
|
+
|
|
26
|
+
<div align="center">
|
|
27
|
+
|
|
28
|
+
# agentorg
|
|
29
|
+
|
|
30
|
+
**A reusable AI team for your repo: PM, reviewer and worker, running on Herdr.**
|
|
31
|
+
|
|
32
|
+
Your PM stays out of the loop: workers and reviewers finish the work, and you come back to what happened and who acts next.
|
|
33
|
+
|
|
34
|
+
[](https://github.com/WeightForge/herdr-agent-org/actions/workflows/tests.yml)
|
|
35
|
+
[](https://pypi.org/project/herdr-agent-org/)
|
|
36
|
+
[](https://github.com/WeightForge/herdr-agent-org/blob/main/pyproject.toml)
|
|
37
|
+
[](https://github.com/WeightForge/herdr-agent-org/blob/main/LICENSE)
|
|
38
|
+
|
|
39
|
+
[Quickstart](#quickstart) · [How it works](#how-it-works) · [Docs](#docs) · [Contributing](#contributing)
|
|
40
|
+
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
`agentorg` is a small, dependency-free Python CLI plus four agent skills. It starts a **PM → reviewer → worker** team of Claude Code, Codex or Antigravity sessions on Herdr App and its `hc` CLI, gives each software worker its own Git worktree, and keeps all coordination in plain files under `.ai/`.
|
|
46
|
+
|
|
47
|
+
> Status: pre-1.0. The unit tests use mocks. The `team smoke` command exercises a live Herdr core with fake agents. Treat the setup as a careful beta and read [Safety](#safety-model) first.
|
|
48
|
+
|
|
49
|
+
## Why
|
|
50
|
+
|
|
51
|
+
One giant PM prompt that dispatches, polls, relays review comments and remembers everything does not scale: it burns context and turns the PM into a messenger. `agentorg` splits the problem:
|
|
52
|
+
|
|
53
|
+
- **Policy** lives in skills, **team shape** in `.ai/TEAM.json`, **accounts** in local profile aliases, **state** in files, Git and Herdr.
|
|
54
|
+
- The PM writes a task packet once and hands control to the worker/reviewer loop.
|
|
55
|
+
- The PM wakes only for a reviewer escalation. Everything else is a file you can read later.
|
|
56
|
+
|
|
57
|
+
## Features
|
|
58
|
+
|
|
59
|
+
- Dry-run by default; nothing starts without `team up --apply`.
|
|
60
|
+
- One Git worktree and branch per software worker.
|
|
61
|
+
- Path-only dispatch: agents get a file path, never pasted task text.
|
|
62
|
+
- Task lifecycle derived from files (`dispatched` to `done`), printed by `team status`, with the next actor named.
|
|
63
|
+
- Six escalation codes, written to `.ai/inbox/`, so nothing depends on a message arriving.
|
|
64
|
+
- Local-only provider profiles for `claude`, `codex` and `antigravity`; no credentials stored, no account fallback.
|
|
65
|
+
- `team up --apply` from a Herdr App terminal shows the team as panes in your current tab (reviewers in a column, their workers to the right); `--no-panes` opts out.
|
|
66
|
+
- Blocked-terminal reporting without copying prompt text.
|
|
67
|
+
- Standard library only; Windows and Linux.
|
|
68
|
+
|
|
69
|
+
## Requirements
|
|
70
|
+
|
|
71
|
+
- Herdr App with `hc` 0.1.22 or newer (the current app and core, not the unrelated legacy `herdr` TUI). Check with `hc --skill`.
|
|
72
|
+
- Python 3.10+ and Git.
|
|
73
|
+
- `uv` (for `uvx`, used by the plugin skills when `agentorg` is not on `PATH`) or a pip-installed `agentorg`.
|
|
74
|
+
- At least one provider CLI, already logged in: `claude`, `codex` or `agy` (Antigravity).
|
|
75
|
+
|
|
76
|
+
## Quickstart
|
|
77
|
+
|
|
78
|
+
Install the plugin in your coding harness. The skills run the CLI for you: `agentorg` if it is on `PATH`, otherwise `uvx` fetches the matching tagged version with no install step.
|
|
79
|
+
|
|
80
|
+
**Claude Code**
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
claude plugin marketplace add WeightForge/herdr-agent-org
|
|
84
|
+
claude plugin install agent-org@herdr-agent-org
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
(Inside a session: `/plugin marketplace add WeightForge/herdr-agent-org`, then `/plugin install agent-org@herdr-agent-org`.)
|
|
88
|
+
|
|
89
|
+
**Codex**
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
codex plugin marketplace add WeightForge/herdr-agent-org
|
|
93
|
+
codex plugin add agent-org@herdr-agent-org
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Antigravity (`agy`)** installs from a plugin directory, so clone first:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
git clone https://github.com/WeightForge/herdr-agent-org
|
|
100
|
+
agy plugin install herdr-agent-org/src/agentorg/data
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Then ask your agent to bootstrap an organization for your project (`agent-org-bootstrap`), or run the CLI yourself:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
cd /path/to/your-project # an existing Git repository
|
|
107
|
+
agentorg init --template engineering --name my-project
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Manual / CLI-first
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
pip install herdr-agent-org
|
|
114
|
+
agentorg install --target both # skills for Claude Code and Codex (also: claude | codex | antigravity | all)
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Without a pip install, prefix any command with `uvx --from git+https://github.com/WeightForge/herdr-agent-org@v0.6.0 agentorg`.
|
|
118
|
+
|
|
119
|
+
Profiles are local aliases: an executable, an optional config directory (`--config-dir`, e.g. a separate `CLAUDE_CONFIG_DIR`) and a public model/effort. No key is stored. The CLI must already be installed and logged in.
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
agentorg profile add reviewer --provider claude --model opus --effort medium
|
|
123
|
+
agentorg profile add implementer --provider claude --model sonnet --effort high
|
|
124
|
+
|
|
125
|
+
# The engineering template ships two reviewer/worker pairs bound to the aliases
|
|
126
|
+
# reviewer, implementer, designer and frontend. This quickstart runs one pair:
|
|
127
|
+
agentorg role set frontend-worker --disable
|
|
128
|
+
agentorg role set design-reviewer --disable
|
|
129
|
+
# To bind a role to a different alias: agentorg role set backend-worker --profile NAME
|
|
130
|
+
|
|
131
|
+
agentorg doctor # executables and directories only; not live auth
|
|
132
|
+
agentorg team plan # dry run: exact argv and worktree paths
|
|
133
|
+
|
|
134
|
+
git add .ai QUESTION.md && git commit -m "Configure agent organization" # worktrees branch from HEAD
|
|
135
|
+
agentorg team up --apply # creates worktrees and Herdr terminals
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Then, from your PM session (the `agent-org-manager` skill does this for you), dispatch a task by path:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
# 1. The PM writes the immutable packet (template in the agent-org-engineering skill)
|
|
142
|
+
# .ai/tasks/T-1/packet.md
|
|
143
|
+
# 2. Send the worker and its reviewer the absolute path, once, without --wait
|
|
144
|
+
agentorg team send backend-worker "/abs/path/my-project/.ai/tasks/T-1/packet.md"
|
|
145
|
+
agentorg team send technical-reviewer "/abs/path/my-project/.ai/tasks/T-1/packet.md"
|
|
146
|
+
# 3. End the turn. Later:
|
|
147
|
+
agentorg team status
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
On Windows PowerShell the same commands work; use `py -m pip` if `pip` is not on `PATH`, and Windows-style paths. To work from a clone instead: `pip install -e .`.
|
|
151
|
+
|
|
152
|
+
## How it works
|
|
153
|
+
|
|
154
|
+
```mermaid
|
|
155
|
+
flowchart TD
|
|
156
|
+
H([You, the owner]) -->|goals, approvals| PM[PM terminal]
|
|
157
|
+
PM -->|"packet.md path"| R[Reviewer]
|
|
158
|
+
PM -->|"packet.md path"| W[Worker]
|
|
159
|
+
R -. "parent of" .-> W
|
|
160
|
+
W -->|"commit .ai/handoff/T-1.md, then send branch@commit:path"| R
|
|
161
|
+
R -->|"review, fix loop"| W
|
|
162
|
+
R -->|"escalation file in .ai/inbox/ (+ optional hc send)"| PM
|
|
163
|
+
PM -->|"milestone_ready, blocked, requires_owner_decision"| H
|
|
164
|
+
subgraph owners [One writer per file]
|
|
165
|
+
F1[".ai/tasks/T-1/packet.md : PM"]
|
|
166
|
+
F2[".ai/tasks/T-1/progress.md : reviewer"]
|
|
167
|
+
F3[".ai/handoff/T-1.md : worker, on its branch"]
|
|
168
|
+
F4[".ai/inbox/*.md : reviewer"]
|
|
169
|
+
F5[".ai/STATE.md : PM"]
|
|
170
|
+
end
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
- `team up --apply` starts reviewers as children of the PM terminal and each worker with `--parent <its reviewer>`, so Herdr reports worker events (turn ended, blocked, exited) to the reviewer, and only reviewer escalations reach the PM.
|
|
174
|
+
- From a Herdr App terminal, `team up --apply` also shows each role as a pane in the PM's tab: PM on the left, one row per reviewer with its workers to the right (`--no-panes` to skip).
|
|
175
|
+
- Messages only point at files. A lost message loses nothing; the file is the record.
|
|
176
|
+
- The PM reads `.ai/inbox/*.md` whenever it wakes. If the PM is outside Herdr, nothing is pushed and the inbox is the channel.
|
|
177
|
+
- The full rules (file layout, states, escalation codes) are in [`PROTOCOL.md`](https://github.com/WeightForge/herdr-agent-org/blob/main/src/agentorg/data/PROTOCOL.md), copied to `.ai/PROTOCOL.md` in your project.
|
|
178
|
+
|
|
179
|
+
## A worked example
|
|
180
|
+
|
|
181
|
+
Task `T-1`: add a CSV export. One owner, one reviewer, one worker.
|
|
182
|
+
|
|
183
|
+
1. **Packet.** The PM writes `.ai/tasks/T-1/packet.md` (objective, scope, acceptance criteria, tests, reviewer, `blocked_by: none`) and sends its path to the worker and reviewer. State: `dispatched`, next actor `reviewer`.
|
|
184
|
+
2. **Acknowledge.** The reviewer creates `progress.md` with `State: acknowledged`. State: `acknowledged`, next actor `worker`.
|
|
185
|
+
3. **ACK.** The worker reads the packet and sends the reviewer `ACK T-1`; the reviewer records `State: started`.
|
|
186
|
+
4. **Handoff.** The worker implements on its worktree branch, commits `.ai/handoff/T-1.md`, then sends the reviewer `<branch>@<commit>:.ai/handoff/T-1.md`. The reviewer sets `State: in_review`.
|
|
187
|
+
5. **Review.** The reviewer reads the handoff with `git show`, runs the tests and sends findings straight to the worker. The PM is not involved; after 3 unproductive rounds (configurable) the reviewer requires a root-cause analysis instead of more patches.
|
|
188
|
+
6. **Done.** When verified, the reviewer sets `State: done` and writes `.ai/inbox/20260101T120000Z-T-1-milestone_ready-3fa9.md`.
|
|
189
|
+
7. **You.** The PM wakes, reads the inbox and tells you the task is ready. Merging is your decision.
|
|
190
|
+
|
|
191
|
+
`agentorg team status` at that point (trimmed; `status` has one entry per enabled role):
|
|
192
|
+
|
|
193
|
+
```json
|
|
194
|
+
{
|
|
195
|
+
"project": "my-project",
|
|
196
|
+
"inbox_pending": 1,
|
|
197
|
+
"blocked": [],
|
|
198
|
+
"owner_decisions": [],
|
|
199
|
+
"tasks": [
|
|
200
|
+
{ "id": "T-1", "state": "done", "next_actor": "pm", "flags": [] }
|
|
201
|
+
],
|
|
202
|
+
"status": [
|
|
203
|
+
{ "role": "technical-reviewer", "terminal": "ao-my-project-technical-reviewer-<hash>", "live": true, "details": { "...": "..." } },
|
|
204
|
+
{ "role": "backend-worker", "terminal": "ao-my-project-backend-worker-<hash>", "live": true, "details": { "...": "..." } }
|
|
205
|
+
]
|
|
206
|
+
}
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
`next_actor` is `reviewer`, `worker`, `pm` or `none`. `flags` can contain `unknown_delivery` (acknowledged but no worker `ACK`: re-send the packet path to the worker only) or `waiting_on_dependency`. `owner_decisions` lists unhandled `requires_owner_decision` and `safety_or_cost_risk` escalations; `blocked` lists terminals waiting on a human prompt (`role`, `terminal`, `kind`; never prompt text).
|
|
210
|
+
|
|
211
|
+
## Command reference
|
|
212
|
+
|
|
213
|
+
| Command | What it does |
|
|
214
|
+
|---|---|
|
|
215
|
+
| `agentorg init [--template engineering\|research\|content] [--name N]` | Create missing `.ai/` files and `.ai/PROTOCOL.md`; never overwrites |
|
|
216
|
+
| `agentorg profile add NAME --provider claude\|codex\|antigravity [--config-dir D] [--model M] [--effort E] [--native-profile P] [--command EXE] [--replace]` | Save a local profile alias (no secrets) |
|
|
217
|
+
| `agentorg profile list \| remove NAME` | Inspect or delete aliases |
|
|
218
|
+
| `agentorg role set ROLE [--profile P] [--model M] [--effort E] [--reviewer-role R] [--enable\|--disable]` | Edit the team manifest (validated before write) |
|
|
219
|
+
| `agentorg role list` | Show roles |
|
|
220
|
+
| `agentorg doctor` | Check Python, `hc`, `git`, provider CLIs and profile directories; no API calls |
|
|
221
|
+
| `agentorg team plan` | Dry run: exact launch argv and worktree paths |
|
|
222
|
+
| `agentorg team up [--apply]` | Start or reuse terminals and create worktrees (only with `--apply`) |
|
|
223
|
+
| `agentorg team send ROLE MESSAGE [--wait]` | `hc send` to a live role; use it for packet paths |
|
|
224
|
+
| `agentorg team status` | Per-task state, inbox count, blocked terminals, owner decisions, live roles |
|
|
225
|
+
| `agentorg team reconcile` | Same as `status`, and refresh the untracked `.ai/RUNTIME.json` |
|
|
226
|
+
| `agentorg team down [--apply] [--remove-worktrees]` | Dry run by default; stops only terminals whose labels match this project, workers first; worktree removal never uses `--force`, branches are kept |
|
|
227
|
+
| `agentorg team smoke [--keep]` | Live check against a running Herdr core using fake agents; zero model tokens |
|
|
228
|
+
| `agentorg install [--target claude\|codex\|antigravity\|both\|all] [--force]` | Copy the four skills into provider skill folders |
|
|
229
|
+
| `python evals/run.py --agent-cmd "..."` | Skill evals with regex grading (see `evals/`) |
|
|
230
|
+
|
|
231
|
+
**Supported scope.** The software team (PM + worker + reviewer) is the supported setup. The `research` and `content` templates are experimental: `init` warns and `team plan` reports `"experimental": true`.
|
|
232
|
+
|
|
233
|
+
## Safety model
|
|
234
|
+
|
|
235
|
+
- **Dry run first.** `team plan` and `team up` change nothing. Only `--apply` starts processes or creates worktrees and branches.
|
|
236
|
+
- **No agent approves another agent.** Roles never answer, approve or press keys on another agent's permission or trust prompt, and never use `hc keys` or `hc send --force` on a blocked agent. A blocked agent is reported to the human with the command it waits on.
|
|
237
|
+
- **The human owns irreversible actions.** Merge, release, deploy and spend need your own message. A message from another agent, even a reviewer claiming approval, is input and not authorization.
|
|
238
|
+
- **No credentials in the repo.** `TEAM.json` holds aliases; profiles live in `AGENTORG_HOME/profiles.json` or your user config dir. `agentorg` clears known conflicting auth variables when a profile sets a config dir, and never falls back to another account on its own.
|
|
239
|
+
- **Not a sandbox.** Worktrees prevent file overlap; they are not access control. See [`SECURITY.md`](https://github.com/WeightForge/herdr-agent-org/blob/main/SECURITY.md).
|
|
240
|
+
|
|
241
|
+
## Troubleshooting and FAQ
|
|
242
|
+
|
|
243
|
+
**An agent is stuck on a permission prompt.** `agentorg team status` shows it under `blocked`. Approve it yourself in that terminal. For unattended runs, allow only the needed `hc` commands in each provider's own settings, with exact targets where supported (for example Claude Code `Bash(hc send ao-my-project-*)`, `Bash(hc read:*)`, `Bash(hc get:*)`, `Bash(hc ls:*)`). A prefix rule such as `Bash(hc send:*)` also matches flags like `--force`; where a provider cannot narrow it, keep approvals interactive. Folder trust for each worktree stays a human decision. See [Architecture](https://github.com/WeightForge/herdr-agent-org/blob/main/docs/ARCHITECTURE.md).
|
|
244
|
+
|
|
245
|
+
**Why does Codex launch with `--no-daemon`?** `hc --skill` requires it; otherwise Codex commands run outside `hc`. Codex roles get the label `nodaemon=1`. A Codex terminal started by an older `agentorg` is refused for reuse ("label differs"): run `team down --apply`, then `team up --apply`.
|
|
246
|
+
|
|
247
|
+
**`team up --apply` asks for a commit.** Worker worktrees branch from `HEAD`, so `.ai/TEAM.json` and `.ai/PROJECT.md` must be committed first.
|
|
248
|
+
|
|
249
|
+
**Windows.** Provider CLIs installed via npm (`codex.cmd`) are resolved automatically. Use paths in the form your shell expects and keep roles on the absolute root path. The CI matrix runs on Windows and Linux.
|
|
250
|
+
|
|
251
|
+
**My PM is outside Herdr (for example an IDE).** It can still run `agentorg` and `hc`, but `hc send` pushes will not reach it. Reviewers write escalations to `.ai/inbox/`; the PM reads that folder when you wake it.
|
|
252
|
+
|
|
253
|
+
**Models and effort.** They are passed through as you set them and must be supported by your installed CLI and account. `doctor` does not check entitlements.
|
|
254
|
+
|
|
255
|
+
**Upgrading.** Running terminals keep their old prompt until stopped and started again. See [Upgrading](https://github.com/WeightForge/herdr-agent-org/blob/main/docs/UPGRADING.md).
|
|
256
|
+
|
|
257
|
+
## Docs
|
|
258
|
+
|
|
259
|
+
- [Architecture](https://github.com/WeightForge/herdr-agent-org/blob/main/docs/ARCHITECTURE.md)
|
|
260
|
+
- [Protocol](https://github.com/WeightForge/herdr-agent-org/blob/main/src/agentorg/data/PROTOCOL.md)
|
|
261
|
+
- [Upgrading](https://github.com/WeightForge/herdr-agent-org/blob/main/docs/UPGRADING.md)
|
|
262
|
+
- [Security](https://github.com/WeightForge/herdr-agent-org/blob/main/SECURITY.md)
|
|
263
|
+
- [Changelog](https://github.com/WeightForge/herdr-agent-org/blob/main/CHANGELOG.md)
|
|
264
|
+
- [Example manifest](https://github.com/WeightForge/herdr-agent-org/tree/main/examples/web-app)
|
|
265
|
+
- Maintainers: [Codex handoff](https://github.com/WeightForge/herdr-agent-org/blob/main/docs/maintainers/CODEX_HANDOFF.md), [Publishing](https://github.com/WeightForge/herdr-agent-org/blob/main/docs/maintainers/PUBLISHING.md)
|
|
266
|
+
|
|
267
|
+
## Roadmap
|
|
268
|
+
|
|
269
|
+
- Event-driven watcher with a persistent checkpoint (today the PM wakes on reviewer escalations and `hc` notes; there is no background supervisor).
|
|
270
|
+
- More live testing across Windows, Linux and Herdr versions.
|
|
271
|
+
- Enforce `max_parallel_workers` (currently PM policy, not a process cap).
|
|
272
|
+
- CI/PR adapters and mature research/content templates.
|
|
273
|
+
|
|
274
|
+
## Contributing
|
|
275
|
+
|
|
276
|
+
Issues and PRs are welcome. Start with [CONTRIBUTING.md](https://github.com/WeightForge/herdr-agent-org/blob/main/CONTRIBUTING.md). Any change that starts processes, spends money or publishes must stay behind an explicit approval.
|
|
277
|
+
|
|
278
|
+
## License
|
|
279
|
+
|
|
280
|
+
[Apache-2.0](https://github.com/WeightForge/herdr-agent-org/blob/main/LICENSE). Not affiliated with Herdr, Anthropic or OpenAI.
|