comitia 0.1.1__tar.gz → 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.
- comitia-0.1.1/README.md → comitia-0.2.0/PKG-INFO +120 -37
- comitia-0.1.1/PKG-INFO → comitia-0.2.0/README.md +97 -60
- {comitia-0.1.1 → comitia-0.2.0}/pyproject.toml +4 -6
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/__init__.py +1 -1
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/cli.py +38 -9
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/discussion/converse.py +4 -4
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/discussion/panel.py +1 -1
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/host.py +48 -67
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/skill/SKILL.md +10 -3
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/web/service.py +1 -6
- {comitia-0.1.1 → comitia-0.2.0}/tests/test_host.py +1 -1
- {comitia-0.1.1 → comitia-0.2.0}/tests/test_plan_and_cli.py +20 -0
- {comitia-0.1.1 → comitia-0.2.0}/uv.lock +5 -5
- {comitia-0.1.1 → comitia-0.2.0}/.gitignore +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/LICENSE +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/LICENSES/crossby-MIT.txt +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/__main__.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/api.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/catalog.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/control.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/diffs.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/discussion/__init__.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/discussion/api.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/discussion/cli.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/discussion/config.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/discussion/console.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/discussion/journal.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/discussion/panel_view.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/discussion/prompts/converse_asker.md +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/discussion/prompts/converse_summary.md +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/discussion/transcript.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/engine.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/findings.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/plan.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/posting.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/prompts.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/recipe.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/report.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/settings.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/starters/decision-debate.yml +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/starters/deep-review.yml +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/starters/message-test.yml +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/starters/pr-review-light.yml +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/starters/pr-review.yml +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/starters/prd-review.yml +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/store.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/web/__init__.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/web/server.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/web/static/app.js +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/web/static/index.html +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/src/comitia/web/static/styles.css +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/tests/conftest.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/tests/discussion/__init__.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/tests/discussion/test_converse.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/tests/discussion/test_converse_cmd.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/tests/discussion/test_journal.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/tests/discussion/test_panel.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/tests/discussion/test_panel_cmd.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/tests/discussion/test_panel_settings.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/tests/discussion/test_panel_view.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/tests/fixtures/crossby-0.63-journal.jsonl +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/tests/fixtures/make_crossby_journal.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/tests/test_antigravity_cursor_host.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/tests/test_api.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/tests/test_codex_host.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/tests/test_discussion.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/tests/test_import.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/tests/test_posting.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/tests/test_resume.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/tests/test_review_fixes.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/tests/test_scenarios.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/tests/test_settings.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/tests/test_turns.py +0 -0
- {comitia-0.1.1 → comitia-0.2.0}/tests/test_web.py +0 -0
|
@@ -1,40 +1,96 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: comitia
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Run AI consultations and panels from your coding agent, with repeatable recipes and evidence-linked findings.
|
|
5
|
+
Project-URL: Repository, https://github.com/ivanviragine/comitia
|
|
6
|
+
Project-URL: Issues, https://github.com/ivanviragine/comitia/issues
|
|
7
|
+
Author: Ivan Viragine
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
License-File: LICENSES/crossby-MIT.txt
|
|
11
|
+
Requires-Python: >=3.11
|
|
12
|
+
Requires-Dist: crossby<0.76.0,>=0.75.0
|
|
13
|
+
Requires-Dist: pydantic>=2.0
|
|
14
|
+
Requires-Dist: pyyaml>=6.0
|
|
15
|
+
Requires-Dist: rich>=13.0
|
|
16
|
+
Requires-Dist: typer<0.26,>=0.12
|
|
17
|
+
Provides-Extra: dev
|
|
18
|
+
Requires-Dist: mypy>=1.10; extra == 'dev'
|
|
19
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
20
|
+
Requires-Dist: ruff>=0.4; extra == 'dev'
|
|
21
|
+
Requires-Dist: types-pyyaml>=6.0; extra == 'dev'
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
|
|
1
24
|
# comitia
|
|
2
25
|
|
|
3
|
-
|
|
26
|
+
<p align="center">
|
|
27
|
+
<img src="https://raw.githubusercontent.com/ivanviragine/comitia/main/docs/assets/comitia.jpeg" width="400" alt="Comitia logo with three AI agents around a code document">
|
|
28
|
+
</p>
|
|
29
|
+
|
|
30
|
+
**Comitia lets AI coding tools talk to each other.**
|
|
31
|
+
|
|
32
|
+
Use it to check a diagnosis, get feedback on a document or message, debate a
|
|
33
|
+
decision, or review a pull request. A YAML recipe defines who takes part, their
|
|
34
|
+
instructions or personas, how they interact, and what the report focuses on.
|
|
4
35
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
36
|
+
- **Independent answers** (`answers`). Participants respond on their own before
|
|
37
|
+
Comitia brings their findings together.
|
|
38
|
+
- **Consultation** (`consultation`). A lead asks one other participant questions
|
|
39
|
+
and follows up on the answers.
|
|
40
|
+
- **Panel** (`panel`). A lead consults several participants. In a shared panel,
|
|
41
|
+
participants can also see one another’s replies.
|
|
8
42
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
43
|
+
Run a quick consultation from the terminal or use a recipe for a repeatable
|
|
44
|
+
discussion. Recipe reports link their findings to the turns that produced
|
|
45
|
+
them. When you check revised material against an earlier run, the report shows
|
|
46
|
+
which findings still apply.
|
|
47
|
+
|
|
48
|
+
Use Comitia from Claude Code, Codex, Antigravity CLI, or Cursor CLI. Crossby
|
|
49
|
+
powers the participants, which run through the coding-agent CLIs you already
|
|
50
|
+
use. Each CLI uses its configured account and billing. [Crossby](https://github.com/ivanviragine/crossby)
|
|
51
|
+
|
|
52
|
+
## Use it from your agent
|
|
13
53
|
|
|
14
|
-
|
|
54
|
+
You’ll need Python 3.11+ and at least one supported coding-agent CLI signed
|
|
55
|
+
in to its provider. From the project where you want to discuss material:
|
|
15
56
|
|
|
16
57
|
```bash
|
|
17
|
-
uv tool install comitia
|
|
18
|
-
comitia setup
|
|
58
|
+
uv tool install comitia
|
|
59
|
+
comitia setup --skill-only --host codex
|
|
19
60
|
```
|
|
20
61
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
62
|
+
Use `claude`, `antigravity`, or `cursor` for another host. Omit `--host` to
|
|
63
|
+
install the skill for all four. This setup writes the skill files. Make sure
|
|
64
|
+
`comitia` is on your host’s PATH and open or reload the project in your host.
|
|
65
|
+
After upgrading Comitia, use `--force` with `--skill-only` to replace an
|
|
66
|
+
existing skill file after reviewing local edits.
|
|
24
67
|
|
|
25
|
-
|
|
68
|
+
In Codex, start with `$discuss`. In Claude Code or Antigravity CLI, use
|
|
69
|
+
`/discuss`. You can also name the skill in a prompt:
|
|
70
|
+
|
|
71
|
+
> Use the discuss skill to have two AI participants challenge the rollout plan in `decision.md`. Show me the plan before running it.
|
|
72
|
+
|
|
73
|
+
Other things to ask:
|
|
74
|
+
|
|
75
|
+
- “Have Claude and Codex check the diagnosis in `incident.md`. What evidence
|
|
76
|
+
would distinguish the likely causes?”
|
|
77
|
+
- “Review `announcement.md` from the perspective of a new customer and a
|
|
78
|
+
skeptical editor.”
|
|
79
|
+
- “Have two advocates argue the rollout options in `decision.md`, then ask a
|
|
80
|
+
lead to weigh the trade-offs.”
|
|
81
|
+
|
|
82
|
+
The `discuss` skill chooses or writes a recipe and shows the plan. With the
|
|
83
|
+
default `approval: host`, your host’s permission flow decides whether the run
|
|
84
|
+
starts. [Approval](#approval)
|
|
26
85
|
|
|
27
|
-
|
|
28
|
-
picks or writes a recipe, shows you the plan, and starts the run once Claude
|
|
29
|
-
Code's own permission flow lets it. Then: *"address the open findings"*, and
|
|
30
|
-
*"check again"*.
|
|
86
|
+
### Configure host approvals
|
|
31
87
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
88
|
+
Run `comitia setup --host claude` to configure Claude Code’s read-only commands
|
|
89
|
+
and sandbox exclusion as well as installing the skill. If you choose
|
|
90
|
+
`approval: strict`, run `comitia setup --host YOUR_HOST` to add the approval
|
|
91
|
+
rules or hooks for that host. Strict mode expects the plain `comitia run`
|
|
92
|
+
command on PATH. Claude Code may ask you to trust the project before it loads
|
|
93
|
+
its settings.
|
|
38
94
|
|
|
39
95
|
### From Codex
|
|
40
96
|
|
|
@@ -141,6 +197,16 @@ it again, and a diff that changed since is refused as a changed plan.
|
|
|
141
197
|
|
|
142
198
|
## Use it from the terminal
|
|
143
199
|
|
|
200
|
+
Ask one agent to question another about a diagnosis.
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
comitia converse claude codex \
|
|
204
|
+
--goal "Check the proposed cause in incident.md. What evidence would confirm it?"
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
For a recipe run, pick a starter or [write your own](#a-recipe). This example
|
|
208
|
+
reviews a document and checks a revised version against the earlier findings.
|
|
209
|
+
|
|
144
210
|
```bash
|
|
145
211
|
comitia recipe new my-review --from prd-review # writes recipes/my-review.yml
|
|
146
212
|
comitia check my-review --material PRD.md # the plan; starts no agent
|
|
@@ -186,22 +252,39 @@ in the output), 1 error or failed run, 2 plan refused, 3 not approved.
|
|
|
186
252
|
|
|
187
253
|
## A recipe
|
|
188
254
|
|
|
255
|
+
This recipe gives a diagnosis two independent readers. The investigator checks
|
|
256
|
+
the evidence while the skeptic looks for competing explanations.
|
|
257
|
+
|
|
189
258
|
```yaml
|
|
190
|
-
# recipes/
|
|
259
|
+
# recipes/diagnosis.yml
|
|
191
260
|
format: answers
|
|
192
261
|
participants:
|
|
193
|
-
-
|
|
194
|
-
|
|
262
|
+
- id: investigator
|
|
263
|
+
tool: claude
|
|
264
|
+
instructions: Trace the proposed cause back to the evidence.
|
|
265
|
+
- id: skeptic
|
|
266
|
+
tool: codex
|
|
267
|
+
persona: personas/incident-skeptic
|
|
195
268
|
limits: {turn_timeout: 15m}
|
|
196
|
-
report_instructions:
|
|
197
|
-
providers: [anthropic,
|
|
198
|
-
# synthesizer: {tool: codex}
|
|
199
|
-
# require_blocked: [reads_outside_workspace] # isolation
|
|
269
|
+
report_instructions: Separate observations from hypotheses and rank the next checks.
|
|
270
|
+
# providers: [anthropic, openai] # every company the material may reach
|
|
271
|
+
# synthesizer: {tool: codex} # who writes the report (default: the first participant)
|
|
272
|
+
# require_blocked: [reads_outside_workspace] # isolation requires Claude Code
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
Save the recipe as `recipes/diagnosis.yml` and create
|
|
276
|
+
`personas/incident-skeptic/instructions.md` with a brief such as “Find plausible
|
|
277
|
+
alternative causes and say what evidence would distinguish them.” Check the plan
|
|
278
|
+
and use the run command it prints.
|
|
279
|
+
|
|
280
|
+
```bash
|
|
281
|
+
comitia check diagnosis --material incident.md \
|
|
282
|
+
--goal "Weigh the likely causes and identify the next check."
|
|
200
283
|
```
|
|
201
284
|
|
|
202
285
|
A participant has a `tool`, and optionally a `model`, an `effort`, and either
|
|
203
|
-
`instructions` (a file
|
|
204
|
-
`instructions.md` and reference files.
|
|
286
|
+
`instructions` (a file or text) or a `persona` folder holding
|
|
287
|
+
`instructions.md` and optional text reference files.
|
|
205
288
|
|
|
206
289
|
A participant can also get `skills`: folders of the project that each hold a
|
|
207
290
|
`SKILL.md`. They are copied, as they were when the plan was built, into a
|
|
@@ -253,9 +336,9 @@ the prompt asks for.
|
|
|
253
336
|
|
|
254
337
|
## A consultation or a panel
|
|
255
338
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
339
|
+
Set `lead` to the participant that should ask the questions. The first
|
|
340
|
+
participant leads by default. A panel lead addresses participants by `@id`,
|
|
341
|
+
and `limits.max_rounds` caps how many messages the lead can send.
|
|
259
342
|
|
|
260
343
|
```yaml
|
|
261
344
|
# recipes/deep-review.yml
|
|
@@ -1,63 +1,73 @@
|
|
|
1
|
-
Metadata-Version: 2.5
|
|
2
|
-
Name: comitia
|
|
3
|
-
Version: 0.1.1
|
|
4
|
-
Summary: Know what's fixed, what's still open and what's new before your agent builds.
|
|
5
|
-
Project-URL: Repository, https://github.com/ivanviragine/comitia
|
|
6
|
-
Project-URL: Issues, https://github.com/ivanviragine/comitia/issues
|
|
7
|
-
Author: Ivan Viragine
|
|
8
|
-
License-Expression: MIT
|
|
9
|
-
License-File: LICENSE
|
|
10
|
-
License-File: LICENSES/crossby-MIT.txt
|
|
11
|
-
Requires-Python: >=3.11
|
|
12
|
-
Requires-Dist: crossby<0.72.0,>=0.71.0
|
|
13
|
-
Requires-Dist: pydantic>=2.0
|
|
14
|
-
Requires-Dist: pyyaml>=6.0
|
|
15
|
-
Requires-Dist: rich>=13.0
|
|
16
|
-
Requires-Dist: typer<0.26,>=0.12
|
|
17
|
-
Provides-Extra: dev
|
|
18
|
-
Requires-Dist: mypy>=1.10; extra == 'dev'
|
|
19
|
-
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
20
|
-
Requires-Dist: ruff>=0.4; extra == 'dev'
|
|
21
|
-
Requires-Dist: types-pyyaml>=6.0; extra == 'dev'
|
|
22
|
-
Description-Content-Type: text/markdown
|
|
23
|
-
|
|
24
1
|
# comitia
|
|
25
2
|
|
|
26
|
-
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="https://raw.githubusercontent.com/ivanviragine/comitia/main/docs/assets/comitia.jpeg" width="400" alt="Comitia logo with three AI agents around a code document">
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
**Comitia lets AI coding tools talk to each other.**
|
|
8
|
+
|
|
9
|
+
Use it to check a diagnosis, get feedback on a document or message, debate a
|
|
10
|
+
decision, or review a pull request. A YAML recipe defines who takes part, their
|
|
11
|
+
instructions or personas, how they interact, and what the report focuses on.
|
|
27
12
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
13
|
+
- **Independent answers** (`answers`). Participants respond on their own before
|
|
14
|
+
Comitia brings their findings together.
|
|
15
|
+
- **Consultation** (`consultation`). A lead asks one other participant questions
|
|
16
|
+
and follows up on the answers.
|
|
17
|
+
- **Panel** (`panel`). A lead consults several participants. In a shared panel,
|
|
18
|
+
participants can also see one another’s replies.
|
|
31
19
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
20
|
+
Run a quick consultation from the terminal or use a recipe for a repeatable
|
|
21
|
+
discussion. Recipe reports link their findings to the turns that produced
|
|
22
|
+
them. When you check revised material against an earlier run, the report shows
|
|
23
|
+
which findings still apply.
|
|
24
|
+
|
|
25
|
+
Use Comitia from Claude Code, Codex, Antigravity CLI, or Cursor CLI. Crossby
|
|
26
|
+
powers the participants, which run through the coding-agent CLIs you already
|
|
27
|
+
use. Each CLI uses its configured account and billing. [Crossby](https://github.com/ivanviragine/crossby)
|
|
28
|
+
|
|
29
|
+
## Use it from your agent
|
|
36
30
|
|
|
37
|
-
|
|
31
|
+
You’ll need Python 3.11+ and at least one supported coding-agent CLI signed
|
|
32
|
+
in to its provider. From the project where you want to discuss material:
|
|
38
33
|
|
|
39
34
|
```bash
|
|
40
|
-
uv tool install comitia
|
|
41
|
-
comitia setup
|
|
35
|
+
uv tool install comitia
|
|
36
|
+
comitia setup --skill-only --host codex
|
|
42
37
|
```
|
|
43
38
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
Use `claude`, `antigravity`, or `cursor` for another host. Omit `--host` to
|
|
40
|
+
install the skill for all four. This setup writes the skill files. Make sure
|
|
41
|
+
`comitia` is on your host’s PATH and open or reload the project in your host.
|
|
42
|
+
After upgrading Comitia, use `--force` with `--skill-only` to replace an
|
|
43
|
+
existing skill file after reviewing local edits.
|
|
47
44
|
|
|
48
|
-
|
|
45
|
+
In Codex, start with `$discuss`. In Claude Code or Antigravity CLI, use
|
|
46
|
+
`/discuss`. You can also name the skill in a prompt:
|
|
47
|
+
|
|
48
|
+
> Use the discuss skill to have two AI participants challenge the rollout plan in `decision.md`. Show me the plan before running it.
|
|
49
|
+
|
|
50
|
+
Other things to ask:
|
|
51
|
+
|
|
52
|
+
- “Have Claude and Codex check the diagnosis in `incident.md`. What evidence
|
|
53
|
+
would distinguish the likely causes?”
|
|
54
|
+
- “Review `announcement.md` from the perspective of a new customer and a
|
|
55
|
+
skeptical editor.”
|
|
56
|
+
- “Have two advocates argue the rollout options in `decision.md`, then ask a
|
|
57
|
+
lead to weigh the trade-offs.”
|
|
58
|
+
|
|
59
|
+
The `discuss` skill chooses or writes a recipe and shows the plan. With the
|
|
60
|
+
default `approval: host`, your host’s permission flow decides whether the run
|
|
61
|
+
starts. [Approval](#approval)
|
|
49
62
|
|
|
50
|
-
|
|
51
|
-
picks or writes a recipe, shows you the plan, and starts the run once Claude
|
|
52
|
-
Code's own permission flow lets it. Then: *"address the open findings"*, and
|
|
53
|
-
*"check again"*.
|
|
63
|
+
### Configure host approvals
|
|
54
64
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
65
|
+
Run `comitia setup --host claude` to configure Claude Code’s read-only commands
|
|
66
|
+
and sandbox exclusion as well as installing the skill. If you choose
|
|
67
|
+
`approval: strict`, run `comitia setup --host YOUR_HOST` to add the approval
|
|
68
|
+
rules or hooks for that host. Strict mode expects the plain `comitia run`
|
|
69
|
+
command on PATH. Claude Code may ask you to trust the project before it loads
|
|
70
|
+
its settings.
|
|
61
71
|
|
|
62
72
|
### From Codex
|
|
63
73
|
|
|
@@ -164,6 +174,16 @@ it again, and a diff that changed since is refused as a changed plan.
|
|
|
164
174
|
|
|
165
175
|
## Use it from the terminal
|
|
166
176
|
|
|
177
|
+
Ask one agent to question another about a diagnosis.
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
comitia converse claude codex \
|
|
181
|
+
--goal "Check the proposed cause in incident.md. What evidence would confirm it?"
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
For a recipe run, pick a starter or [write your own](#a-recipe). This example
|
|
185
|
+
reviews a document and checks a revised version against the earlier findings.
|
|
186
|
+
|
|
167
187
|
```bash
|
|
168
188
|
comitia recipe new my-review --from prd-review # writes recipes/my-review.yml
|
|
169
189
|
comitia check my-review --material PRD.md # the plan; starts no agent
|
|
@@ -209,22 +229,39 @@ in the output), 1 error or failed run, 2 plan refused, 3 not approved.
|
|
|
209
229
|
|
|
210
230
|
## A recipe
|
|
211
231
|
|
|
232
|
+
This recipe gives a diagnosis two independent readers. The investigator checks
|
|
233
|
+
the evidence while the skeptic looks for competing explanations.
|
|
234
|
+
|
|
212
235
|
```yaml
|
|
213
|
-
# recipes/
|
|
236
|
+
# recipes/diagnosis.yml
|
|
214
237
|
format: answers
|
|
215
238
|
participants:
|
|
216
|
-
-
|
|
217
|
-
|
|
239
|
+
- id: investigator
|
|
240
|
+
tool: claude
|
|
241
|
+
instructions: Trace the proposed cause back to the evidence.
|
|
242
|
+
- id: skeptic
|
|
243
|
+
tool: codex
|
|
244
|
+
persona: personas/incident-skeptic
|
|
218
245
|
limits: {turn_timeout: 15m}
|
|
219
|
-
report_instructions:
|
|
220
|
-
providers: [anthropic,
|
|
221
|
-
# synthesizer: {tool: codex}
|
|
222
|
-
# require_blocked: [reads_outside_workspace] # isolation
|
|
246
|
+
report_instructions: Separate observations from hypotheses and rank the next checks.
|
|
247
|
+
# providers: [anthropic, openai] # every company the material may reach
|
|
248
|
+
# synthesizer: {tool: codex} # who writes the report (default: the first participant)
|
|
249
|
+
# require_blocked: [reads_outside_workspace] # isolation requires Claude Code
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
Save the recipe as `recipes/diagnosis.yml` and create
|
|
253
|
+
`personas/incident-skeptic/instructions.md` with a brief such as “Find plausible
|
|
254
|
+
alternative causes and say what evidence would distinguish them.” Check the plan
|
|
255
|
+
and use the run command it prints.
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
comitia check diagnosis --material incident.md \
|
|
259
|
+
--goal "Weigh the likely causes and identify the next check."
|
|
223
260
|
```
|
|
224
261
|
|
|
225
262
|
A participant has a `tool`, and optionally a `model`, an `effort`, and either
|
|
226
|
-
`instructions` (a file
|
|
227
|
-
`instructions.md` and reference files.
|
|
263
|
+
`instructions` (a file or text) or a `persona` folder holding
|
|
264
|
+
`instructions.md` and optional text reference files.
|
|
228
265
|
|
|
229
266
|
A participant can also get `skills`: folders of the project that each hold a
|
|
230
267
|
`SKILL.md`. They are copied, as they were when the plan was built, into a
|
|
@@ -276,9 +313,9 @@ the prompt asks for.
|
|
|
276
313
|
|
|
277
314
|
## A consultation or a panel
|
|
278
315
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
316
|
+
Set `lead` to the participant that should ask the questions. The first
|
|
317
|
+
participant leads by default. A panel lead addresses participants by `@id`,
|
|
318
|
+
and `limits.max_rounds` caps how many messages the lead can send.
|
|
282
319
|
|
|
283
320
|
```yaml
|
|
284
321
|
# recipes/deep-review.yml
|
|
@@ -4,18 +4,16 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "comitia"
|
|
7
|
-
version = "0.
|
|
8
|
-
description = "
|
|
7
|
+
version = "0.2.0"
|
|
8
|
+
description = "Run AI consultations and panels from your coding agent, with repeatable recipes and evidence-linked findings."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
11
11
|
license-files = ["LICENSE", "LICENSES/*.txt"]
|
|
12
12
|
requires-python = ">=3.11"
|
|
13
13
|
authors = [{ name = "Ivan Viragine" }]
|
|
14
14
|
dependencies = [
|
|
15
|
-
#
|
|
16
|
-
|
|
17
|
-
# crossby.api, py.typed, route(), agent detection, has_search_tool and project_files.
|
|
18
|
-
"crossby>=0.71.0,<0.72.0",
|
|
15
|
+
# Crossby supplies the tool runtime and metadata. Pin the tested minor series.
|
|
16
|
+
"crossby>=0.75.0,<0.76.0",
|
|
19
17
|
"typer>=0.12,<0.26",
|
|
20
18
|
"pydantic>=2.0",
|
|
21
19
|
"pyyaml>=6.0",
|
|
@@ -26,7 +26,7 @@ from comitia.settings import Approval, SettingsError, effective_approval, load_s
|
|
|
26
26
|
app = typer.Typer(
|
|
27
27
|
add_completion=False,
|
|
28
28
|
no_args_is_help=True,
|
|
29
|
-
help="
|
|
29
|
+
help="Run repeatable AI consultations and panels with the coding agents you already use.",
|
|
30
30
|
)
|
|
31
31
|
recipe_app = typer.Typer(no_args_is_help=True, help="Recipes: who discusses and how.")
|
|
32
32
|
app.add_typer(recipe_app, name="recipe")
|
|
@@ -830,18 +830,47 @@ def note(
|
|
|
830
830
|
|
|
831
831
|
|
|
832
832
|
@app.command()
|
|
833
|
-
def setup(
|
|
834
|
-
|
|
833
|
+
def setup(
|
|
834
|
+
as_json: bool = JSON,
|
|
835
|
+
skill_only: bool = typer.Option(False, "--skill-only", help="Write only the discussion skill."),
|
|
836
|
+
target_host: str = typer.Option(
|
|
837
|
+
"all", "--host", help="Target claude, codex, antigravity, cursor, or all."
|
|
838
|
+
),
|
|
839
|
+
force: bool = typer.Option(
|
|
840
|
+
False, "--force", help="Replace a differing skill with --skill-only."
|
|
841
|
+
),
|
|
842
|
+
) -> None:
|
|
843
|
+
"""Install the discuss skill and optionally configure host approvals."""
|
|
835
844
|
root = _root()
|
|
845
|
+
installers = {
|
|
846
|
+
"claude": host.setup_claude,
|
|
847
|
+
"codex": host.setup_codex,
|
|
848
|
+
"antigravity": host.setup_antigravity,
|
|
849
|
+
"cursor": host.setup_cursor,
|
|
850
|
+
}
|
|
851
|
+
if target_host != "all" and target_host not in installers:
|
|
852
|
+
_fail(
|
|
853
|
+
f"Unknown host {target_host!r}. Choose from: {', '.join(installers)}, all.",
|
|
854
|
+
as_json=as_json,
|
|
855
|
+
)
|
|
856
|
+
targets = list(installers) if target_host == "all" else [target_host]
|
|
857
|
+
if skill_only:
|
|
858
|
+
try:
|
|
859
|
+
changes = host.setup_skills(root, targets, force=force)
|
|
860
|
+
except host.HostError as exc:
|
|
861
|
+
_fail(str(exc), as_json=as_json)
|
|
862
|
+
text = "\n".join(f"- {change}" for change in changes) or "Already set up; nothing changed."
|
|
863
|
+
_out(as_json, {"project": str(root), "changes": changes, "skill_only": True}, text)
|
|
864
|
+
return
|
|
865
|
+
if force:
|
|
866
|
+
_fail("--force requires --skill-only.", as_json=as_json)
|
|
867
|
+
|
|
836
868
|
approval = _preset(root, as_json=as_json)
|
|
837
869
|
strict = approval == "strict"
|
|
838
870
|
try:
|
|
839
|
-
changes =
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
+ host.setup_antigravity(root, strict=strict)
|
|
843
|
-
+ host.setup_cursor(root, strict=strict)
|
|
844
|
-
)
|
|
871
|
+
changes = [
|
|
872
|
+
change for target in targets for change in installers[target](root, strict=strict)
|
|
873
|
+
]
|
|
845
874
|
except host.HostError as exc:
|
|
846
875
|
_fail(str(exc), as_json=as_json)
|
|
847
876
|
text = "\n".join(f"- {change}" for change in changes) or "Already set up; nothing changed."
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Copied from crossby v0.71.0 (src/crossby/services/converse.py), imports aside.
|
|
2
2
|
"""Goal-driven consultations between two headless AI coding agents.
|
|
3
3
|
|
|
4
|
-
``
|
|
4
|
+
``comitia converse ASKER RESPONDER --goal ...`` lets one agent consult another.
|
|
5
5
|
The asker holds the goal: it decides what to ask, judges each answer, asks
|
|
6
6
|
follow-up questions, and decides when it has enough. The responder never sees
|
|
7
7
|
the goal; it only answers the asker's messages. ``crossby ask`` (see
|
|
8
|
-
:
|
|
8
|
+
:func:`crossby.api.ask`) is the single-question primitive.
|
|
9
9
|
|
|
10
10
|
Each side keeps its own native session: every turn after its first resumes
|
|
11
11
|
that session and carries only the other agent's latest message, whole. Nothing
|
|
@@ -383,7 +383,7 @@ def _status(result: HeadlessSessionResult) -> str:
|
|
|
383
383
|
"""``failed``, plus the recognized reason and the tool's own status.
|
|
384
384
|
|
|
385
385
|
For example ``failed: not signed in (native: api_error)``; see
|
|
386
|
-
:func:`crossby.
|
|
386
|
+
:func:`crossby.api.describe_session_status`.
|
|
387
387
|
"""
|
|
388
388
|
from crossby.api import describe_session_status
|
|
389
389
|
|
|
@@ -481,7 +481,7 @@ def run_conversation(
|
|
|
481
481
|
always returns the turns completed so far.
|
|
482
482
|
|
|
483
483
|
``journal`` receives every event as it happens (see
|
|
484
|
-
:mod:`
|
|
484
|
+
:mod:`comitia.discussion.journal`). ``resume`` continues a consultation that
|
|
485
485
|
stopped without an answer: both sides resume their own sessions, the next
|
|
486
486
|
side gets the message it was owed, and up to ``max_rounds`` more answers
|
|
487
487
|
are allowed.
|
|
@@ -22,7 +22,7 @@ crossby adds only protocol text: the lead's opening notice (the goal, the
|
|
|
22
22
|
roster and the limit; replaceable through ``protocol_notice``, whose grammar
|
|
23
23
|
never changes), the ``@id`` labels, failure notes, the final-turn nudge, and
|
|
24
24
|
one request for the last line when an agent lead's reply lacks a valid one.
|
|
25
|
-
Everything is journaled (see :mod:`
|
|
25
|
+
Everything is journaled (see :mod:`comitia.discussion.journal`).
|
|
26
26
|
"""
|
|
27
27
|
|
|
28
28
|
from __future__ import annotations
|
|
@@ -45,12 +45,21 @@ from importlib import resources
|
|
|
45
45
|
from pathlib import Path
|
|
46
46
|
from typing import Any
|
|
47
47
|
|
|
48
|
-
from crossby.api import
|
|
48
|
+
from crossby.api import (
|
|
49
|
+
AgentProcess,
|
|
50
|
+
AIToolID,
|
|
51
|
+
agent_ancestors,
|
|
52
|
+
nearest_agent,
|
|
53
|
+
parent_program,
|
|
54
|
+
tool_display_name,
|
|
55
|
+
)
|
|
49
56
|
from crossby.api import under_agent as under_agent
|
|
50
57
|
|
|
51
58
|
from comitia import store
|
|
52
59
|
|
|
53
60
|
SKILL_NAME = "discuss"
|
|
61
|
+
_SHARED_SKILL_DIR = Path(".agents/skills")
|
|
62
|
+
_CLAUDE_SKILL_DIR = Path(".claude/skills")
|
|
54
63
|
# Commands only the user may approve.
|
|
55
64
|
# Each a whole word after `comitia`, never one that follows a module name in code
|
|
56
65
|
# (`from comitia import ...`): the hook reads those as starts.
|
|
@@ -69,9 +78,6 @@ _LAUNCHERS = frozenset({"uv", "uvx", "pipx", "poetry", "pdm", "hatch", "rye", "c
|
|
|
69
78
|
# inside its sandbox, the sandbox's kind.
|
|
70
79
|
_CODEX_THREAD = "CODEX_THREAD_ID"
|
|
71
80
|
_CODEX_SANDBOX = "CODEX_SANDBOX"
|
|
72
|
-
# macOS's proc_pidinfo, PROC_PIDTBSDINFO: a struct proc_bsdinfo of 136 bytes, with the
|
|
73
|
-
# short name at byte 48.
|
|
74
|
-
_BSDINFO, _BSDINFO_SIZE = 3, 136
|
|
75
81
|
# The settings sources Claude Code reads, as its `--setting-sources` flag names them.
|
|
76
82
|
SOURCES = frozenset({"user", "project", "local"})
|
|
77
83
|
_MANAGED = (
|
|
@@ -164,15 +170,6 @@ APPROVED_VIA = {
|
|
|
164
170
|
AIToolID.ANTIGRAVITY_CLI: "Antigravity's approval prompt",
|
|
165
171
|
AIToolID.CURSOR: "Cursor's approval path",
|
|
166
172
|
}
|
|
167
|
-
# What a run approved through each agent's own permission flow says it was.
|
|
168
|
-
_AGENT_NAMES = {
|
|
169
|
-
AIToolID.CLAUDE: "Claude Code",
|
|
170
|
-
AIToolID.CODEX: "Codex",
|
|
171
|
-
AIToolID.CURSOR: "Cursor",
|
|
172
|
-
AIToolID.ANTIGRAVITY_CLI: "Antigravity",
|
|
173
|
-
AIToolID.OPENCODE: "OpenCode",
|
|
174
|
-
AIToolID.COPILOT: "Copilot CLI",
|
|
175
|
-
}
|
|
176
173
|
# The hosts comitia knows how to count on, as its refusals name them.
|
|
177
174
|
_KNOWN_HOSTS = "Claude Code, Codex, Antigravity or Cursor"
|
|
178
175
|
|
|
@@ -403,45 +400,7 @@ def project_asks(
|
|
|
403
400
|
|
|
404
401
|
def _invocation() -> tuple[str, str | None]:
|
|
405
402
|
"""How this process was started: its ``argv[0]``, and the program that started it."""
|
|
406
|
-
return sys.argv[0],
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
def _parent_program() -> str | None:
|
|
410
|
-
"""The short name of the program that started this process; None when unreadable.
|
|
411
|
-
|
|
412
|
-
Read in-process (Linux's ``/proc``, macOS's ``libproc``), so no program on ``PATH``
|
|
413
|
-
answers for it. crossby reads the agents above a process; this is the shell or the
|
|
414
|
-
launcher in between, which is no agent.
|
|
415
|
-
"""
|
|
416
|
-
pid = os.getppid()
|
|
417
|
-
name: str | None
|
|
418
|
-
try:
|
|
419
|
-
name = Path(f"/proc/{pid}/comm").read_text(encoding="utf-8", errors="replace").strip()
|
|
420
|
-
except OSError:
|
|
421
|
-
name = _libproc_name(pid) if sys.platform == "darwin" else None
|
|
422
|
-
return name or None
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
def _libproc_name(pid: int) -> str | None:
|
|
426
|
-
"""A process's short name, from macOS's ``proc_pidinfo``."""
|
|
427
|
-
import ctypes
|
|
428
|
-
|
|
429
|
-
try:
|
|
430
|
-
libproc = ctypes.CDLL("/usr/lib/libproc.dylib", use_errno=True)
|
|
431
|
-
libproc.proc_pidinfo.argtypes = [
|
|
432
|
-
ctypes.c_int,
|
|
433
|
-
ctypes.c_int,
|
|
434
|
-
ctypes.c_uint64,
|
|
435
|
-
ctypes.c_void_p,
|
|
436
|
-
ctypes.c_int,
|
|
437
|
-
]
|
|
438
|
-
libproc.proc_pidinfo.restype = ctypes.c_int
|
|
439
|
-
buffer = ctypes.create_string_buffer(_BSDINFO_SIZE)
|
|
440
|
-
if libproc.proc_pidinfo(pid, _BSDINFO, 0, buffer, _BSDINFO_SIZE) < _BSDINFO_SIZE:
|
|
441
|
-
return None
|
|
442
|
-
except (OSError, AttributeError, ValueError):
|
|
443
|
-
return None
|
|
444
|
-
return buffer.raw[48:64].split(b"\0", 1)[0].decode(errors="replace")
|
|
403
|
+
return sys.argv[0], parent_program()
|
|
445
404
|
|
|
446
405
|
|
|
447
406
|
def started_as_command() -> bool:
|
|
@@ -482,7 +441,7 @@ def agent_name() -> str:
|
|
|
482
441
|
nearest = nearest_agent()
|
|
483
442
|
if nearest is None:
|
|
484
443
|
return "an agent"
|
|
485
|
-
return
|
|
444
|
+
return tool_display_name(nearest.tool)
|
|
486
445
|
|
|
487
446
|
|
|
488
447
|
def approved_via() -> str:
|
|
@@ -1082,13 +1041,7 @@ def setup_codex(
|
|
|
1082
1041
|
|
|
1083
1042
|
def _shared_skill(root: Path, host: str) -> list[str]:
|
|
1084
1043
|
"""The ``discuss`` skill in ``.agents/skills``, which Codex, Antigravity and Cursor read."""
|
|
1085
|
-
|
|
1086
|
-
text = skill_text()
|
|
1087
|
-
if skill.is_file() and skill.read_text(encoding="utf-8") == text:
|
|
1088
|
-
return []
|
|
1089
|
-
skill.parent.mkdir(parents=True, exist_ok=True)
|
|
1090
|
-
skill.write_text(text, encoding="utf-8")
|
|
1091
|
-
return [f"wrote the `{SKILL_NAME}` skill for {host} to {skill.relative_to(root)}"]
|
|
1044
|
+
return _install_skill(root, _SHARED_SKILL_DIR, label=f" for {host}")
|
|
1092
1045
|
|
|
1093
1046
|
|
|
1094
1047
|
def _strict_json(path: Path) -> dict[str, Any] | None:
|
|
@@ -1998,6 +1951,40 @@ def skill_text() -> str:
|
|
|
1998
1951
|
return resources.files("comitia").joinpath("skill", "SKILL.md").read_text(encoding="utf-8")
|
|
1999
1952
|
|
|
2000
1953
|
|
|
1954
|
+
def _install_skill(
|
|
1955
|
+
root: Path, directory: Path, *, label: str = "", force: bool = True
|
|
1956
|
+
) -> list[str]:
|
|
1957
|
+
relative = directory / SKILL_NAME / "SKILL.md"
|
|
1958
|
+
skill = root / relative
|
|
1959
|
+
text = skill_text()
|
|
1960
|
+
if skill.is_file() and skill.read_text(encoding="utf-8") == text:
|
|
1961
|
+
return []
|
|
1962
|
+
if skill.exists() and not force:
|
|
1963
|
+
return [f"kept existing {relative}; pass --force to replace it"]
|
|
1964
|
+
skill.parent.mkdir(parents=True, exist_ok=True)
|
|
1965
|
+
skill.write_text(text, encoding="utf-8")
|
|
1966
|
+
return [f"wrote the `{SKILL_NAME}` skill{label} to {relative}"]
|
|
1967
|
+
|
|
1968
|
+
|
|
1969
|
+
def setup_skills(root: Path, hosts: Sequence[str], *, force: bool) -> list[str]:
|
|
1970
|
+
"""Install the discussion skill without configuring host permissions or hooks."""
|
|
1971
|
+
directories = dict.fromkeys(
|
|
1972
|
+
_CLAUDE_SKILL_DIR if host == "claude" else _SHARED_SKILL_DIR for host in hosts
|
|
1973
|
+
)
|
|
1974
|
+
try:
|
|
1975
|
+
for directory in directories:
|
|
1976
|
+
skill = root / directory / SKILL_NAME / "SKILL.md"
|
|
1977
|
+
if skill.is_symlink() or not skill.resolve().is_relative_to(root.resolve()):
|
|
1978
|
+
raise HostError(f"Cannot write the skill through {skill}.")
|
|
1979
|
+
return [
|
|
1980
|
+
change
|
|
1981
|
+
for directory in directories
|
|
1982
|
+
for change in _install_skill(root, directory, force=force)
|
|
1983
|
+
]
|
|
1984
|
+
except (OSError, RuntimeError) as exc:
|
|
1985
|
+
raise HostError(f"Could not install the discussion skill: {exc}") from exc
|
|
1986
|
+
|
|
1987
|
+
|
|
2001
1988
|
def _add(items: list[Any], value: str) -> bool:
|
|
2002
1989
|
if value in items:
|
|
2003
1990
|
return False
|
|
@@ -2013,13 +2000,7 @@ def setup_claude(root: Path, *, strict: bool) -> list[str]:
|
|
|
2013
2000
|
The rules that let the read-only commands run unasked, and running comitia outside
|
|
2014
2001
|
the sandbox, are added under every preset: neither approves anything.
|
|
2015
2002
|
"""
|
|
2016
|
-
changes
|
|
2017
|
-
skill = root / ".claude" / "skills" / SKILL_NAME / "SKILL.md"
|
|
2018
|
-
text = skill_text()
|
|
2019
|
-
if not skill.is_file() or skill.read_text(encoding="utf-8") != text:
|
|
2020
|
-
skill.parent.mkdir(parents=True, exist_ok=True)
|
|
2021
|
-
skill.write_text(text, encoding="utf-8")
|
|
2022
|
-
changes.append(f"wrote the `{SKILL_NAME}` skill to {skill.relative_to(root)}")
|
|
2003
|
+
changes = _install_skill(root, _CLAUDE_SKILL_DIR)
|
|
2023
2004
|
|
|
2024
2005
|
path = root / ".claude" / "settings.json"
|
|
2025
2006
|
settings = _read(path)
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: discuss
|
|
3
|
-
description:
|
|
4
|
-
|
|
5
|
-
to
|
|
3
|
+
description: >
|
|
4
|
+
Run a Comitia consultation or panel when the user wants multiple AI participants
|
|
5
|
+
to critique a draft, compare options, or debate a decision. Also use for following
|
|
6
|
+
up on findings from an earlier Comitia run.
|
|
6
7
|
---
|
|
7
8
|
|
|
9
|
+
Comitia runs through the user's configured coding-agent CLIs, powered by Crossby.
|
|
8
10
|
`comitia` runs a recipe: read-only AI participants review the material, each on
|
|
9
11
|
its own (`answers`), or in a discussion where a lead questions one other
|
|
10
12
|
(`consultation`) or several (`panel`); a report gives every finding an ID that
|
|
11
13
|
lasts from run to run. Every command takes `--json`.
|
|
12
14
|
|
|
15
|
+
If `comitia` is unavailable in the host, tell the user to install it with
|
|
16
|
+
`uv tool install comitia`, make the executable available on the host's PATH,
|
|
17
|
+
and reload the session.
|
|
18
|
+
|
|
13
19
|
1. Pick the recipe. `comitia recipe list` shows the user's recipes and the
|
|
14
20
|
starters. If none fits the request (other participants, another job), write
|
|
15
21
|
one: `comitia recipe new NAME --from prd-review`, then edit
|
|
@@ -19,6 +25,7 @@ lasts from run to run. Every command takes `--json`.
|
|
|
19
25
|
2. Run `comitia check RECIPE --material FILE` (for a code review, `--pr NUMBER`
|
|
20
26
|
or `--diff main...HEAD` instead) and show the user the plan it prints, whole: who takes part, which companies the material reaches, what
|
|
21
27
|
each can read. If the plan is refused, say why and stop or fix the recipe.
|
|
28
|
+
Stop at the preview if the user has only requested a plan.
|
|
22
29
|
3. Start the run with the exact command `check` printed
|
|
23
30
|
(`comitia run RECIPE --material FILE --plan ID`), using your own background
|
|
24
31
|
tool; it returns when the run ends, so do not poll. The host's own permission
|
|
@@ -40,11 +40,6 @@ APPROVED_VIA = "the comitia page"
|
|
|
40
40
|
MAX_LISTED = 400
|
|
41
41
|
MAX_PREVIEW = 200_000
|
|
42
42
|
_SKIPPED_DIRS = frozenset({"node_modules", "__pycache__", "dist", "build", "target"})
|
|
43
|
-
# The companies the page offers for a recipe's `providers`; crossby names each one.
|
|
44
|
-
_COMPANIES = (
|
|
45
|
-
"anthropic", "openai", "google", "xai", "github",
|
|
46
|
-
"cursor", "opencode", "amazon", "microsoft", "openrouter",
|
|
47
|
-
) # fmt: skip
|
|
48
43
|
_NOT_APPROVING = (
|
|
49
44
|
"This page cannot approve anything: it was not started from a terminal, so it cannot "
|
|
50
45
|
"tell that the request comes from you. Run `comitia ui` in your own terminal."
|
|
@@ -106,7 +101,7 @@ class Service:
|
|
|
106
101
|
"personas": catalog.personas(self.root),
|
|
107
102
|
"skills": catalog.skills(self.root),
|
|
108
103
|
"mcp": catalog.mcp(self.root),
|
|
109
|
-
"companies": {company: api.company_name(company) for company in
|
|
104
|
+
"companies": {company: api.company_name(company) for company in api.COMPANIES},
|
|
110
105
|
# Read-only is required of everyone; these are the ones a recipe may add.
|
|
111
106
|
"channels": sorted(
|
|
112
107
|
channel.value for channel in RestrictionChannel if channel not in planning.READ_ONLY
|
|
@@ -382,7 +382,7 @@ def test_the_program_that_started_this_one_is_named() -> None:
|
|
|
382
382
|
import subprocess
|
|
383
383
|
import sys
|
|
384
384
|
|
|
385
|
-
probe = "from comitia import host; print(host.
|
|
385
|
+
probe = "from comitia import host; print(host._invocation()[1])"
|
|
386
386
|
done = subprocess.run([sys.executable, "-c", probe], capture_output=True, text=True, check=True)
|
|
387
387
|
named = done.stdout.strip()
|
|
388
388
|
if named == "None":
|
|
@@ -442,6 +442,26 @@ def test_setup_under_host_says_it_leaves_the_asking_to_the_host(commands: Projec
|
|
|
442
442
|
assert "ask" not in settings["permissions"]
|
|
443
443
|
|
|
444
444
|
|
|
445
|
+
def test_skill_only_setup_leaves_strict_host_settings_alone(commands: Project) -> None:
|
|
446
|
+
_strict(commands)
|
|
447
|
+
options = ["setup", "--skill-only", "--host", "codex", "--json"]
|
|
448
|
+
result = runner.invoke(cli.app, options)
|
|
449
|
+
assert result.exit_code == 0, result.output
|
|
450
|
+
assert json.loads(result.output)["skill_only"]
|
|
451
|
+
skill = commands.root / ".agents" / "skills" / "discuss" / "SKILL.md"
|
|
452
|
+
assert skill.read_text(encoding="utf-8") == host.skill_text()
|
|
453
|
+
assert not (commands.root / ".claude").exists()
|
|
454
|
+
assert not (commands.root / ".codex").exists()
|
|
455
|
+
|
|
456
|
+
skill.write_text("local edits", encoding="utf-8")
|
|
457
|
+
result = runner.invoke(cli.app, options)
|
|
458
|
+
assert result.exit_code == 0, result.output
|
|
459
|
+
assert skill.read_text(encoding="utf-8") == "local edits"
|
|
460
|
+
result = runner.invoke(cli.app, [*options, "--force"])
|
|
461
|
+
assert result.exit_code == 0, result.output
|
|
462
|
+
assert skill.read_text(encoding="utf-8") == host.skill_text()
|
|
463
|
+
|
|
464
|
+
|
|
445
465
|
def test_setup_and_check_say_when_an_agent_run_would_be_refused(
|
|
446
466
|
commands: Project, monkeypatch: pytest.MonkeyPatch
|
|
447
467
|
) -> None:
|
|
@@ -117,7 +117,7 @@ wheels = [
|
|
|
117
117
|
|
|
118
118
|
[[package]]
|
|
119
119
|
name = "comitia"
|
|
120
|
-
version = "0.
|
|
120
|
+
version = "0.2.0"
|
|
121
121
|
source = { editable = "." }
|
|
122
122
|
dependencies = [
|
|
123
123
|
{ name = "crossby" },
|
|
@@ -137,7 +137,7 @@ dev = [
|
|
|
137
137
|
|
|
138
138
|
[package.metadata]
|
|
139
139
|
requires-dist = [
|
|
140
|
-
{ name = "crossby", specifier = ">=0.
|
|
140
|
+
{ name = "crossby", specifier = ">=0.75.0,<0.76.0" },
|
|
141
141
|
{ name = "mypy", marker = "extra == 'dev'", specifier = ">=1.10" },
|
|
142
142
|
{ name = "pydantic", specifier = ">=2.0" },
|
|
143
143
|
{ name = "pytest", marker = "extra == 'dev'", specifier = ">=8.0" },
|
|
@@ -151,7 +151,7 @@ provides-extras = ["dev"]
|
|
|
151
151
|
|
|
152
152
|
[[package]]
|
|
153
153
|
name = "crossby"
|
|
154
|
-
version = "0.
|
|
154
|
+
version = "0.75.0"
|
|
155
155
|
source = { registry = "https://pypi.org/simple" }
|
|
156
156
|
dependencies = [
|
|
157
157
|
{ name = "jsonschema" },
|
|
@@ -166,9 +166,9 @@ dependencies = [
|
|
|
166
166
|
{ name = "tomli-w" },
|
|
167
167
|
{ name = "typer" },
|
|
168
168
|
]
|
|
169
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
169
|
+
sdist = { url = "https://files.pythonhosted.org/packages/48/22/528fa453b5ac8c3ebcb4771a5c364acf1c213dfa85735b9dca32de2de5d3/crossby-0.75.0.tar.gz", hash = "sha256:5cdf5a9423b8e8891a827a5e62d45dfaf69f402619aa773dc927ee5a3205c832", size = 1507166, upload-time = "2026-11-30T23:07:09.268Z" }
|
|
170
170
|
wheels = [
|
|
171
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
171
|
+
{ url = "https://files.pythonhosted.org/packages/06/49/668ef495c3773fd539a28593fbed2c0bc2aca22d49a6c2c8cc9b45dd6066/crossby-0.75.0-py3-none-any.whl", hash = "sha256:e6a9239dc893329c6b87d465db01d7c0bca976cee0b150b17bba11d01db8e007", size = 826264, upload-time = "2026-11-30T23:07:07.756Z" },
|
|
172
172
|
]
|
|
173
173
|
|
|
174
174
|
[[package]]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|