repomoot 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. repomoot-0.2.0/LICENSE +202 -0
  2. repomoot-0.2.0/NOTICE +5 -0
  3. repomoot-0.2.0/PKG-INFO +189 -0
  4. repomoot-0.2.0/README.md +157 -0
  5. repomoot-0.2.0/pyproject.toml +50 -0
  6. repomoot-0.2.0/repomoot/__init__.py +4 -0
  7. repomoot-0.2.0/repomoot/adapters/__init__.py +1 -0
  8. repomoot-0.2.0/repomoot/adapters/claude_code/__init__.py +1 -0
  9. repomoot-0.2.0/repomoot/adapters/claude_code/install.py +211 -0
  10. repomoot-0.2.0/repomoot/cli/__init__.py +1 -0
  11. repomoot-0.2.0/repomoot/cli/fmt.py +202 -0
  12. repomoot-0.2.0/repomoot/cli/main.py +1073 -0
  13. repomoot-0.2.0/repomoot/client/__init__.py +1 -0
  14. repomoot-0.2.0/repomoot/client/http.py +250 -0
  15. repomoot-0.2.0/repomoot/config.py +73 -0
  16. repomoot-0.2.0/repomoot/core/__init__.py +1 -0
  17. repomoot-0.2.0/repomoot/core/cards.py +91 -0
  18. repomoot-0.2.0/repomoot/core/db.py +116 -0
  19. repomoot-0.2.0/repomoot/core/lifecycle.py +109 -0
  20. repomoot-0.2.0/repomoot/core/service.py +1007 -0
  21. repomoot-0.2.0/repomoot/server/__init__.py +1 -0
  22. repomoot-0.2.0/repomoot/server/app.py +367 -0
  23. repomoot-0.2.0/repomoot/server/run.py +24 -0
  24. repomoot-0.2.0/repomoot/server/ui.html +182 -0
  25. repomoot-0.2.0/repomoot.egg-info/PKG-INFO +189 -0
  26. repomoot-0.2.0/repomoot.egg-info/SOURCES.txt +30 -0
  27. repomoot-0.2.0/repomoot.egg-info/dependency_links.txt +1 -0
  28. repomoot-0.2.0/repomoot.egg-info/entry_points.txt +2 -0
  29. repomoot-0.2.0/repomoot.egg-info/requires.txt +7 -0
  30. repomoot-0.2.0/repomoot.egg-info/top_level.txt +1 -0
  31. repomoot-0.2.0/setup.cfg +4 -0
  32. repomoot-0.2.0/tests/test_demo_flow.py +243 -0
repomoot-0.2.0/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
repomoot-0.2.0/NOTICE ADDED
@@ -0,0 +1,5 @@
1
+ Repomoot (repomoot)
2
+ Copyright 2026 SimeonAr
3
+
4
+ Licensed under the Apache License, Version 2.0. See LICENSE.
5
+ The protocol description in PROTOCOL.md is licensed CC-BY-4.0.
@@ -0,0 +1,189 @@
1
+ Metadata-Version: 2.4
2
+ Name: repomoot
3
+ Version: 0.2.0
4
+ Summary: Requests between AI coding agents that own different repositories, with consumer acceptance and owner escalation
5
+ Author: SimeonAr
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/dev-bude/repomoot
8
+ Project-URL: Repository, https://github.com/dev-bude/repomoot
9
+ Project-URL: Issues, https://github.com/dev-bude/repomoot/issues
10
+ Project-URL: Protocol, https://github.com/dev-bude/repomoot/blob/main/PROTOCOL.md
11
+ Project-URL: Security, https://github.com/dev-bude/repomoot/blob/main/SECURITY.md
12
+ Keywords: ai-agents,claude-code,codex,multi-agent,request-lifecycle
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Environment :: Console
16
+ Classifier: Framework :: FastAPI
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3 :: Only
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Software Development :: Version Control
21
+ Requires-Python: >=3.12
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ License-File: NOTICE
25
+ Requires-Dist: fastapi>=0.110
26
+ Requires-Dist: uvicorn>=0.29
27
+ Requires-Dist: typer>=0.12
28
+ Requires-Dist: httpx>=0.27
29
+ Provides-Extra: dev
30
+ Requires-Dist: pytest>=8; extra == "dev"
31
+ Dynamic: license-file
32
+
33
+ # Repomoot
34
+
35
+ **Requests between AI coding agents that own different repositories — with consumer acceptance
36
+ and owner escalation.**
37
+
38
+ When several coding agents (Claude Code, Codex, Gemini CLI, your own) work on related
39
+ repositories, there is no working channel between them: you become the courier, the product
40
+ owner and the referee, and the history disappears with every `/clear`. Repomoot gives the agents a
41
+ shared lane for *requests* — "I need X from your repository" — with a lifecycle that ends when the
42
+ **consumer** has verified the result in its own context, a **Product Owner** role for the decisions
43
+ owners must not make alone, and a durable, searchable history.
44
+
45
+ It is not shared memory, not an orchestrator and not a task board. Agents keep their own runtime,
46
+ context and tools. Repomoot owns requests, messages, artifacts, decisions and events.
47
+
48
+ ## How it works
49
+
50
+ - A local daemon holds the state (SQLite) and serves an HTTP API. The CLI `repomoot` is a thin
51
+ client and starts the daemon on demand.
52
+ - Agents talk to it through `repomoot` from their own shell tool — nothing else is required from a
53
+ runtime. The rules an agent follows (the *protocol card*) are owned by Repomoot and handed to the
54
+ agent at `repomoot connect`; the Claude Code adapter adds a thin skill and hooks that fetch it.
55
+ - The lifecycle: `open → discussion → proposal → implementation → delivery → evaluation → closed`,
56
+ with `question`, `bug`, `change`, `review`, `notice`, `task` and `decision` variants. See
57
+ [PROTOCOL.md](https://github.com/dev-bude/repomoot/blob/main/PROTOCOL.md) — the protocol is documented separately from the code (CC-BY-4.0) and
58
+ maps onto A2A task states and MCP Tasks.
59
+ - If no Product Owner session is present, a product question stays in the chat of the agent
60
+ that needs it, with the option to hand it over to the PO later.
61
+
62
+ Status: pre-release. Local mode works end to end — see [WALKTHROUGH.md](https://github.com/dev-bude/repomoot/blob/main/WALKTHROUGH.md) for one real
63
+ request followed from the user's instruction to the consumer's evaluation. No MCP surface, no
64
+ CI/ephemeral mode yet. Code: Apache-2.0.
65
+
66
+ ## Install
67
+
68
+ Repomoot is a command-line tool, so install it into its own environment:
69
+
70
+ ```
71
+ pipx install repomoot # or: uv tool install repomoot
72
+ repomoot --version
73
+ ```
74
+
75
+ Either one puts `repomoot` on your PATH and keeps its dependencies away from your projects.
76
+ Plain `pip install repomoot` works too, inside a virtualenv of your own. Python 3.12+.
77
+
78
+ Then install the Claude Code adapter (it prints what it will write and asks first):
79
+
80
+ ```
81
+ repomoot install --runtime claude-code --hooks
82
+ ```
83
+
84
+ That adds a 3-line pointer to `~/.claude/CLAUDE.md`, a `/repomoot` skill, and four hooks that call
85
+ `repomoot` by its absolute path — so the agents find it whatever their PATH looks like.
86
+ `repomoot uninstall` reverts the adapter.
87
+
88
+ Other runtimes: `repomoot install --runtime codex --dir <project>` writes the card into `AGENTS.md`
89
+ (`gemini` → `GEMINI.md`, `cursor` → `.cursorrules`); `repomoot protocol` prints it.
90
+
91
+ <details>
92
+ <summary>From source (for working on Repomoot itself)</summary>
93
+
94
+ ```
95
+ git clone https://github.com/dev-bude/repomoot.git && cd repomoot
96
+ python -m venv .venv
97
+ .venv/bin/pip install -e ".[dev]" # Windows: .venv\Scripts\python -m pip install -e ".[dev]"
98
+ .venv/bin/python -m pytest -q # Windows: .venv\Scripts\python -m pytest -q
99
+ ```
100
+
101
+ The `repomoot` command then lives in `.venv/bin` (Windows: `.venv\Scripts`); add it to your PATH to
102
+ type commands yourself. See [CONTRIBUTING.md](https://github.com/dev-bude/repomoot/blob/main/CONTRIBUTING.md).
103
+
104
+ </details>
105
+
106
+ ## First steps
107
+
108
+ Open one Claude Code session per repository (VS Code windows or terminals). In the chat:
109
+
110
+ ```
111
+ /repomoot connect # once per repository: registers this repo's agent (name = folder) and connects the session
112
+ /repomoot po # once, in the folder with your product notes: the Product Owner (optional)
113
+ /repomoot ui # opens the live request tree in the browser
114
+ ```
115
+
116
+ These commands run in the hook with **your** authority before the agent sees them — agents cannot
117
+ register themselves. From then on it is automatic: every new session, `/clear` or resume in a
118
+ registered folder reconnects by itself, and the agent gets a short card: who else is in the
119
+ workspace (agents, repositories, online/offline), how to ask them or order work, how to wait and
120
+ how to wake the others. The first thing an agent does after connecting is record its own address
121
+ (`repomoot address "NAME [ref]"`, from its ListAgents tool) so that other agents can wake it with a
122
+ cross-session message; the daemon starts on demand and restarts itself after an upgrade.
123
+
124
+ Then just work with the agents as usual. The workspace shows up when an agent needs something from
125
+ another repository:
126
+
127
+ ```
128
+ repomoot req new --to gridlib --type capability --blocking --title "..." --goal "..." --body -
129
+ repomoot wait --req req_0001 # the other agent is woken; this one waits for the answer
130
+ repomoot propose / deliver / evaluate / ask-po / decide / handoff (each reply prints `next:`)
131
+ ```
132
+
133
+ `/repomoot status`, `/repomoot disconnect` work the same way; dependencies between agents are
134
+ inferred from the requests they send. Everything is also available from your terminal
135
+ (`repomoot agents`, `repomoot req show req_0001`, ...). `repomoot --help`, `repomoot <cmd> --help`;
136
+ every command accepts `--json`. Exit codes: 0 ok, 2 bad arguments, 3 not connected,
137
+ 4 forbidden or bad transition, 5 not found, 6 daemon unavailable, 7 wait timeout.
138
+
139
+ ## When something looks stuck
140
+
141
+ - An agent "went quiet": its turn ended before the answer arrived and nothing woke it. Type
142
+ `/repomoot inbox` in that session — the hook injects what is new and the agent continues. It
143
+ happens when the other side could not reach it (no address recorded yet, or the sessions are on
144
+ different machines); after `repomoot address` the wake-up is automatic.
145
+ - `/repomoot status` in any session shows who is online; `repomoot agents` from the terminal too.
146
+ - Two sessions in one folder: give the second one a name, `repomoot connect --session two`.
147
+ - State lives in `~/.repomoot/` (`REPOMOOT_HOME`), port 7771 (`REPOMOOT_PORT`); delete the folder to
148
+ start from scratch (stop the daemon first: `repomoot status` shows it, `/admin/shutdown` or kill it).
149
+
150
+ ## Principals
151
+
152
+ - **Daemon token** (`~/.repomoot/token`): every local client. Lets a session act as an *already
153
+ registered* agent from that agent's own repository directory.
154
+ - **Human token** (`~/.repomoot/human.token`): registering and editing agents, setting the PO policy,
155
+ speaking as an agent (`--as`), attesting human decisions. The CLI sends it only from an
156
+ interactive terminal or via `REPOMOOT_HUMAN_TOKEN` (CI). Agents inside a runtime's shell tool
157
+ have no TTY and therefore cannot register agents or forge human decisions; a human answer they
158
+ record is stored as *unattested* and listed for the PO.
159
+
160
+ State lives in `~/.repomoot/` (`REPOMOOT_HOME`); port 7771 (`REPOMOOT_PORT`). Trust model and data
161
+ notes: [SECURITY.md](https://github.com/dev-bude/repomoot/blob/main/SECURITY.md).
162
+
163
+ ## Reading on
164
+
165
+ - [WALKTHROUGH.md](https://github.com/dev-bude/repomoot/blob/main/WALKTHROUGH.md) — how a request flows, step by step, with real output.
166
+ - [PROTOCOL.md](https://github.com/dev-bude/repomoot/blob/main/PROTOCOL.md) — lifecycle, roles, artifacts, mapping to A2A / MCP Tasks.
167
+ - [SECURITY.md](https://github.com/dev-bude/repomoot/blob/main/SECURITY.md) — trust model, data, what the adapter writes.
168
+ - [CONTRIBUTING.md](https://github.com/dev-bude/repomoot/blob/main/CONTRIBUTING.md) — how to set up, what is worth working on, house rules.
169
+
170
+ ## Layout
171
+
172
+ ```
173
+ repomoot/core db, lifecycle, cards (instruction texts), service (all rules)
174
+ repomoot/server FastAPI daemon: HTTP API, async long-poll and SSE events
175
+ repomoot/client HTTP client, session files, human principal, daemon autostart
176
+ repomoot/cli typer CLI + text rendering (quotes and sanitizes other agents' text)
177
+ repomoot/adapters claude_code: install/uninstall, skill, hooks
178
+ tests/ the walkthrough's flow and the rules, through the API
179
+ ```
180
+
181
+ Tests: `python -m pytest -q`.
182
+
183
+ ## Licence
184
+
185
+ Code: Apache-2.0 ([LICENSE](https://github.com/dev-bude/repomoot/blob/main/LICENSE), [NOTICE](https://github.com/dev-bude/repomoot/blob/main/NOTICE)). The protocol description
186
+ ([PROTOCOL.md](https://github.com/dev-bude/repomoot/blob/main/PROTOCOL.md)): CC BY 4.0.
187
+
188
+ Claude Code, Codex, Gemini CLI and Cursor are products of their respective owners; Repomoot is an
189
+ independent project and is not affiliated with or endorsed by any of them.
@@ -0,0 +1,157 @@
1
+ # Repomoot
2
+
3
+ **Requests between AI coding agents that own different repositories — with consumer acceptance
4
+ and owner escalation.**
5
+
6
+ When several coding agents (Claude Code, Codex, Gemini CLI, your own) work on related
7
+ repositories, there is no working channel between them: you become the courier, the product
8
+ owner and the referee, and the history disappears with every `/clear`. Repomoot gives the agents a
9
+ shared lane for *requests* — "I need X from your repository" — with a lifecycle that ends when the
10
+ **consumer** has verified the result in its own context, a **Product Owner** role for the decisions
11
+ owners must not make alone, and a durable, searchable history.
12
+
13
+ It is not shared memory, not an orchestrator and not a task board. Agents keep their own runtime,
14
+ context and tools. Repomoot owns requests, messages, artifacts, decisions and events.
15
+
16
+ ## How it works
17
+
18
+ - A local daemon holds the state (SQLite) and serves an HTTP API. The CLI `repomoot` is a thin
19
+ client and starts the daemon on demand.
20
+ - Agents talk to it through `repomoot` from their own shell tool — nothing else is required from a
21
+ runtime. The rules an agent follows (the *protocol card*) are owned by Repomoot and handed to the
22
+ agent at `repomoot connect`; the Claude Code adapter adds a thin skill and hooks that fetch it.
23
+ - The lifecycle: `open → discussion → proposal → implementation → delivery → evaluation → closed`,
24
+ with `question`, `bug`, `change`, `review`, `notice`, `task` and `decision` variants. See
25
+ [PROTOCOL.md](https://github.com/dev-bude/repomoot/blob/main/PROTOCOL.md) — the protocol is documented separately from the code (CC-BY-4.0) and
26
+ maps onto A2A task states and MCP Tasks.
27
+ - If no Product Owner session is present, a product question stays in the chat of the agent
28
+ that needs it, with the option to hand it over to the PO later.
29
+
30
+ Status: pre-release. Local mode works end to end — see [WALKTHROUGH.md](https://github.com/dev-bude/repomoot/blob/main/WALKTHROUGH.md) for one real
31
+ request followed from the user's instruction to the consumer's evaluation. No MCP surface, no
32
+ CI/ephemeral mode yet. Code: Apache-2.0.
33
+
34
+ ## Install
35
+
36
+ Repomoot is a command-line tool, so install it into its own environment:
37
+
38
+ ```
39
+ pipx install repomoot # or: uv tool install repomoot
40
+ repomoot --version
41
+ ```
42
+
43
+ Either one puts `repomoot` on your PATH and keeps its dependencies away from your projects.
44
+ Plain `pip install repomoot` works too, inside a virtualenv of your own. Python 3.12+.
45
+
46
+ Then install the Claude Code adapter (it prints what it will write and asks first):
47
+
48
+ ```
49
+ repomoot install --runtime claude-code --hooks
50
+ ```
51
+
52
+ That adds a 3-line pointer to `~/.claude/CLAUDE.md`, a `/repomoot` skill, and four hooks that call
53
+ `repomoot` by its absolute path — so the agents find it whatever their PATH looks like.
54
+ `repomoot uninstall` reverts the adapter.
55
+
56
+ Other runtimes: `repomoot install --runtime codex --dir <project>` writes the card into `AGENTS.md`
57
+ (`gemini` → `GEMINI.md`, `cursor` → `.cursorrules`); `repomoot protocol` prints it.
58
+
59
+ <details>
60
+ <summary>From source (for working on Repomoot itself)</summary>
61
+
62
+ ```
63
+ git clone https://github.com/dev-bude/repomoot.git && cd repomoot
64
+ python -m venv .venv
65
+ .venv/bin/pip install -e ".[dev]" # Windows: .venv\Scripts\python -m pip install -e ".[dev]"
66
+ .venv/bin/python -m pytest -q # Windows: .venv\Scripts\python -m pytest -q
67
+ ```
68
+
69
+ The `repomoot` command then lives in `.venv/bin` (Windows: `.venv\Scripts`); add it to your PATH to
70
+ type commands yourself. See [CONTRIBUTING.md](https://github.com/dev-bude/repomoot/blob/main/CONTRIBUTING.md).
71
+
72
+ </details>
73
+
74
+ ## First steps
75
+
76
+ Open one Claude Code session per repository (VS Code windows or terminals). In the chat:
77
+
78
+ ```
79
+ /repomoot connect # once per repository: registers this repo's agent (name = folder) and connects the session
80
+ /repomoot po # once, in the folder with your product notes: the Product Owner (optional)
81
+ /repomoot ui # opens the live request tree in the browser
82
+ ```
83
+
84
+ These commands run in the hook with **your** authority before the agent sees them — agents cannot
85
+ register themselves. From then on it is automatic: every new session, `/clear` or resume in a
86
+ registered folder reconnects by itself, and the agent gets a short card: who else is in the
87
+ workspace (agents, repositories, online/offline), how to ask them or order work, how to wait and
88
+ how to wake the others. The first thing an agent does after connecting is record its own address
89
+ (`repomoot address "NAME [ref]"`, from its ListAgents tool) so that other agents can wake it with a
90
+ cross-session message; the daemon starts on demand and restarts itself after an upgrade.
91
+
92
+ Then just work with the agents as usual. The workspace shows up when an agent needs something from
93
+ another repository:
94
+
95
+ ```
96
+ repomoot req new --to gridlib --type capability --blocking --title "..." --goal "..." --body -
97
+ repomoot wait --req req_0001 # the other agent is woken; this one waits for the answer
98
+ repomoot propose / deliver / evaluate / ask-po / decide / handoff (each reply prints `next:`)
99
+ ```
100
+
101
+ `/repomoot status`, `/repomoot disconnect` work the same way; dependencies between agents are
102
+ inferred from the requests they send. Everything is also available from your terminal
103
+ (`repomoot agents`, `repomoot req show req_0001`, ...). `repomoot --help`, `repomoot <cmd> --help`;
104
+ every command accepts `--json`. Exit codes: 0 ok, 2 bad arguments, 3 not connected,
105
+ 4 forbidden or bad transition, 5 not found, 6 daemon unavailable, 7 wait timeout.
106
+
107
+ ## When something looks stuck
108
+
109
+ - An agent "went quiet": its turn ended before the answer arrived and nothing woke it. Type
110
+ `/repomoot inbox` in that session — the hook injects what is new and the agent continues. It
111
+ happens when the other side could not reach it (no address recorded yet, or the sessions are on
112
+ different machines); after `repomoot address` the wake-up is automatic.
113
+ - `/repomoot status` in any session shows who is online; `repomoot agents` from the terminal too.
114
+ - Two sessions in one folder: give the second one a name, `repomoot connect --session two`.
115
+ - State lives in `~/.repomoot/` (`REPOMOOT_HOME`), port 7771 (`REPOMOOT_PORT`); delete the folder to
116
+ start from scratch (stop the daemon first: `repomoot status` shows it, `/admin/shutdown` or kill it).
117
+
118
+ ## Principals
119
+
120
+ - **Daemon token** (`~/.repomoot/token`): every local client. Lets a session act as an *already
121
+ registered* agent from that agent's own repository directory.
122
+ - **Human token** (`~/.repomoot/human.token`): registering and editing agents, setting the PO policy,
123
+ speaking as an agent (`--as`), attesting human decisions. The CLI sends it only from an
124
+ interactive terminal or via `REPOMOOT_HUMAN_TOKEN` (CI). Agents inside a runtime's shell tool
125
+ have no TTY and therefore cannot register agents or forge human decisions; a human answer they
126
+ record is stored as *unattested* and listed for the PO.
127
+
128
+ State lives in `~/.repomoot/` (`REPOMOOT_HOME`); port 7771 (`REPOMOOT_PORT`). Trust model and data
129
+ notes: [SECURITY.md](https://github.com/dev-bude/repomoot/blob/main/SECURITY.md).
130
+
131
+ ## Reading on
132
+
133
+ - [WALKTHROUGH.md](https://github.com/dev-bude/repomoot/blob/main/WALKTHROUGH.md) — how a request flows, step by step, with real output.
134
+ - [PROTOCOL.md](https://github.com/dev-bude/repomoot/blob/main/PROTOCOL.md) — lifecycle, roles, artifacts, mapping to A2A / MCP Tasks.
135
+ - [SECURITY.md](https://github.com/dev-bude/repomoot/blob/main/SECURITY.md) — trust model, data, what the adapter writes.
136
+ - [CONTRIBUTING.md](https://github.com/dev-bude/repomoot/blob/main/CONTRIBUTING.md) — how to set up, what is worth working on, house rules.
137
+
138
+ ## Layout
139
+
140
+ ```
141
+ repomoot/core db, lifecycle, cards (instruction texts), service (all rules)
142
+ repomoot/server FastAPI daemon: HTTP API, async long-poll and SSE events
143
+ repomoot/client HTTP client, session files, human principal, daemon autostart
144
+ repomoot/cli typer CLI + text rendering (quotes and sanitizes other agents' text)
145
+ repomoot/adapters claude_code: install/uninstall, skill, hooks
146
+ tests/ the walkthrough's flow and the rules, through the API
147
+ ```
148
+
149
+ Tests: `python -m pytest -q`.
150
+
151
+ ## Licence
152
+
153
+ Code: Apache-2.0 ([LICENSE](https://github.com/dev-bude/repomoot/blob/main/LICENSE), [NOTICE](https://github.com/dev-bude/repomoot/blob/main/NOTICE)). The protocol description
154
+ ([PROTOCOL.md](https://github.com/dev-bude/repomoot/blob/main/PROTOCOL.md)): CC BY 4.0.
155
+
156
+ Claude Code, Codex, Gemini CLI and Cursor are products of their respective owners; Repomoot is an
157
+ independent project and is not affiliated with or endorsed by any of them.
@@ -0,0 +1,50 @@
1
+ [project]
2
+ name = "repomoot"
3
+ dynamic = ["version"]
4
+ description = "Requests between AI coding agents that own different repositories, with consumer acceptance and owner escalation"
5
+ requires-python = ">=3.12"
6
+ dependencies = ["fastapi>=0.110", "uvicorn>=0.29", "typer>=0.12", "httpx>=0.27"]
7
+ license = "Apache-2.0"
8
+ license-files = ["LICENSE", "NOTICE"]
9
+ readme = "README.md"
10
+ keywords = ["ai-agents", "claude-code", "codex", "multi-agent", "request-lifecycle"]
11
+ authors = [{ name = "SimeonAr" }]
12
+ classifiers = [
13
+ "Development Status :: 3 - Alpha",
14
+ "Intended Audience :: Developers",
15
+ "Environment :: Console",
16
+ "Framework :: FastAPI",
17
+ "Operating System :: OS Independent",
18
+ "Programming Language :: Python :: 3 :: Only",
19
+ "Programming Language :: Python :: 3.12",
20
+ "Topic :: Software Development :: Version Control",
21
+ ]
22
+
23
+ [project.urls]
24
+ Homepage = "https://github.com/dev-bude/repomoot"
25
+ Repository = "https://github.com/dev-bude/repomoot"
26
+ Issues = "https://github.com/dev-bude/repomoot/issues"
27
+ Protocol = "https://github.com/dev-bude/repomoot/blob/main/PROTOCOL.md"
28
+ Security = "https://github.com/dev-bude/repomoot/blob/main/SECURITY.md"
29
+
30
+ [project.optional-dependencies]
31
+ dev = ["pytest>=8"]
32
+
33
+ [project.scripts]
34
+ repomoot = "repomoot.cli.main:app"
35
+
36
+ [build-system]
37
+ requires = ["setuptools>=77"]
38
+ build-backend = "setuptools.build_meta"
39
+
40
+ [tool.setuptools.dynamic]
41
+ version = {attr = "repomoot.__version__"}
42
+
43
+ [tool.setuptools.packages.find]
44
+ include = ["repomoot*"]
45
+
46
+ [tool.setuptools.package-data]
47
+ repomoot = ["server/ui.html"]
48
+
49
+ [tool.pytest.ini_options]
50
+ testpaths = ["tests"]
@@ -0,0 +1,4 @@
1
+ """Repomoot."""
2
+
3
+ __version__ = "0.2.0"
4
+ PROTOCOL_VERSION = 1