Metadata-Version: 2.5
Name: comitia
Version: 0.2.1
Summary: Run AI consultations and panels from your coding agent, with repeatable recipes and evidence-linked findings.
Project-URL: Repository, https://github.com/ivanviragine/comitia
Project-URL: Issues, https://github.com/ivanviragine/comitia/issues
Author: Ivan Viragine
License-Expression: MIT
License-File: LICENSE
License-File: LICENSES/crossby-MIT.txt
Requires-Python: >=3.11
Requires-Dist: crossby<0.76.0,>=0.75.0
Requires-Dist: pydantic>=2.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: rich>=13.0
Requires-Dist: typer<0.26,>=0.12
Provides-Extra: dev
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Requires-Dist: types-pyyaml>=6.0; extra == 'dev'
Description-Content-Type: text/markdown

# comitia

<p align="center">
  <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">
</p>

**Comitia lets AI coding tools talk to each other.**

Use it to check a diagnosis, get feedback on a document or message, debate a
decision, or review a pull request. A YAML recipe defines who takes part, their
instructions or personas, how they interact, and what the report focuses on.

- **Independent answers** (`answers`). Participants respond on their own before
  Comitia brings their findings together.
- **Consultation** (`consultation`). A lead asks one other participant questions
  and follows up on the answers.
- **Panel** (`panel`). A lead consults several participants. In a shared panel,
  participants can also see one another’s replies.

Run a quick consultation from the terminal or use a recipe for a repeatable
discussion. Recipe reports link their findings to the turns that produced
them. When you check revised material against an earlier run, the report shows
which findings still apply.

Use Comitia from Claude Code, Codex, Antigravity CLI, or Cursor CLI. Crossby
powers the participants, which run through the coding-agent CLIs you already
use. Each CLI uses its configured account and billing. [Crossby](https://github.com/ivanviragine/crossby)

## Use it from your agent

You’ll need Python 3.11+ and at least one supported coding-agent CLI signed
in to its provider. From the project where you want to discuss material:

```bash
uv tool install comitia
comitia setup --skill-only --host codex
```

Use `claude`, `antigravity`, or `cursor` for another host. Omit `--host` to
install the skill for all four. This setup writes the skill files. Make sure
`comitia` is on your host’s PATH and open or reload the project in your host.
After upgrading Comitia, use `--force` with `--skill-only` to replace an
existing skill file after reviewing local edits.

In Codex, start with `$discuss`. In Claude Code or Antigravity CLI, use
`/discuss`. You can also name the skill in a prompt:

> Use the discuss skill to have two AI participants challenge the rollout plan in `decision.md`. Show me the plan before running it.

Other things to ask:

- “Have Claude and Codex check the diagnosis in `incident.md`. What evidence
  would distinguish the likely causes?”
- “Review `announcement.md` from the perspective of a new customer and a
  skeptical editor.”
- “Have two advocates argue the rollout options in `decision.md`, then ask a
  lead to weigh the trade-offs.”

The `discuss` skill chooses or writes a recipe and shows the plan, including
the providers that receive the material. With the default `approval: host`,
your host’s permission flow decides whether the run starts. Inspect participant
status before using the findings. A partial report can contain useful findings
from the participants that answered. [Approval](#approval)

### Configure host approvals

Run `comitia setup --host claude` to configure Claude Code’s read-only commands
and sandbox exclusion as well as installing the skill. If you choose
`approval: strict`, run `comitia setup --host YOUR_HOST` to add the approval
rules or hooks for that host. Strict mode expects the plain `comitia run`
command on PATH. Claude Code may ask you to trust the project before it loads
its settings.

### From Codex

`comitia setup` installs the `discuss` skill for Codex in `.agents/skills`.
Under `approval: strict`, it adds a rule in `~/.codex/rules/comitia.rules` that makes Codex ask
before every `comitia run`, `dismiss`, `post`, `resume` and `import-journal`
(a `prompt` rule wins over any `allow`), and comitia's hook in
`~/.codex/hooks.json`, which stops a wrapped one. Codex runs a new hook only once
you trust it, so open `/hooks` in Codex and trust comitia's.

Under Codex, a run counts as approved when it passes through Codex's own
approval path, whoever your Codex settings send that to: you, or Codex's
automatic reviewer if you set `approvals_reviewer = "auto_review"`. That is a
choice you made in Codex, so comitia follows it, and the run records that it
was approved through Codex. Before counting on it, comitia asks Codex itself
(`codex execpolicy check`) whether the rules Codex loads (yours, and a trusted
project's) make it ask for the command as you gave it, and asks Codex's app
server whether it would run the hook, enabled and trusted. comitia counts on
your Codex configuration as written, so a Codex started with configuration on
its command line (`-c`, `--enable`, `--disable`, `--ignore-rules`,
`--ignore-user-config`, `-a`, or a profile that changes its rules, hooks or
approvals) is refused, as is one started with
`--dangerously-bypass-approvals-and-sandbox`, which skips its approvals.

comitia reads those from the command line of the Codex session it runs
under, so start that session with `codex --no-daemon`. A plain `codex` runs
its sessions in Codex's shared background server (`codex app-server`), which
also runs the sessions of Codex's IDE extension and desktop app. Under that
server, comitia cannot see how a session was started, so it refuses.

Codex keeps each conversation's approval setting with the conversation. With
the automatic reviewer on, the background server can give a conversation a
setting that turns down every command a rule asks about, without asking anyone,
and `codex resume --no-daemon` carries that setting over. comitia reads the
setting from the conversation's log and says so before the run. To change it,
type `/permissions` in Codex and choose "Ask for approval".

Inside Codex's sandbox comitia cannot write its records, and the tools it
starts cannot reach their companies, so Codex asks to run it outside the
sandbox, and that request takes the same approval path. A command with a
variable set in front (`COMITIA_HOME=... comitia run`) is refused like a
wrapped one: Codex's rules may not see the start of it.

If the host keeps the command in a sandbox that blocks a child Codex process,
that participant can fail and the report shows the partial result. Use Codex’s
normal approval prompt for the exact previewed command, or start the same
recipe from Claude Code or your terminal if your host policy permits it.

### From Antigravity

`comitia setup` installs the `discuss` skill for Antigravity CLI (`agy`) in
`.agents/skills`. Under `approval: strict`, it adds a hook in
`~/.gemini/config/hooks.json`, the hooks file Antigravity reads as it starts (a
project's `.agents/hooks.json` loads only once a session is under way, too late
for its first command). The hook makes Antigravity always ask you before every
`comitia run`, `dismiss`, `post`, `resume` and `import-journal`, in any mode
and whatever you answered "always allow" to before, and it stops a wrapped one.
Before counting on that prompt, comitia checks that the hook is there and on,
for each tool Antigravity runs a shell command with, and that nothing else
names a hook `comitia`. An Antigravity started with
`--dangerously-skip-permissions` (which runs every command unasked, past the
hook's question) or with `--settings` is refused.

### From Cursor

`comitia setup` installs the `discuss` skill for Cursor CLI in
`.agents/skills`. Under `approval: strict`, it adds a hook in
`~/.cursor/hooks.json`, which makes Cursor ask before every `comitia run`,
`dismiss`, `post`, `resume` and `import-journal` and stops a wrapped one. As
under Codex, the question goes down the approval path you set: you, or Cursor's
auto-review. A Cursor started with `--force` or `--yolo`, or set to Run
Everything (`approvalMode: unrestricted`), runs every command not refused
outright, past the hook's question, and is refused; so is one whose settings
(`~/.cursor/cli-config.json`, a project's `.cursor/cli.json`) allow `comitia`
commands.

## Use it in the browser

```bash
comitia ui        # in your project; opens a local page
```

The page does everything the commands do: pick a recipe and files, read the
plan, approve it, watch who is writing, read the report with every source turn
in place (and, for a consultation or panel, the whole discussion), add notes,
dismiss findings, check again, resume a stopped run, compare two runs, and edit
recipes in a form or as YAML. Comparing two runs puts their participants,
sessions and counts side by side; when one is a check again of the other, or of
a run before it, each finding gets one row with its status in both, and two
unrelated runs have their findings listed apart, since the same ID names a
different point in each.

In the recipe form, the model and effort lists follow the tool you pick: they
come from crossby's own catalog, so only what that tool takes is offered.

It listens on loopback only, with a fresh access token each start, and refuses
requests from any other page. Under `approval: host` (the default) and `none`
it approves runs, resumptions, posts and dismissals however `comitia ui` was
started: your host's own permission flow let it start, as it lets any command.
The run records `the page (approval: host)`. Under `approval: strict`, or for a
recipe that tightens to it, it approves only when you started `comitia ui`
from your own terminal; started any other way (by an agent, say) it shows
everything and approves nothing. Files it reads as material must be inside the
project.

A new review takes files of the project, a pull request by number, or a Git
range. For the last two the plan shows the diff it fetched; approving fetches
it again, and a diff that changed since is refused as a changed plan.

## Use it from the terminal

Ask one agent to question another about a diagnosis.

```bash
comitia converse claude codex \
  --goal "Check the proposed cause in incident.md. What evidence would confirm it?"
```

For a recipe run, pick a starter or [write your own](#a-recipe). This example
reviews a document and checks a revised version against the earlier findings.

```bash
comitia recipe new my-review --from prd-review   # writes recipes/my-review.yml
comitia check my-review --material PRD.md         # the plan; starts no agent
comitia run my-review --material PRD.md           # shows the plan, asks, runs, prints the report
# ...edit PRD.md...
comitia note F2 --text "added an owner per gate"  # a claim, never evidence
comitia dismiss F4 --note "panels stay"           # the author's call
comitia run my-review --material PRD.md --prior last   # every earlier finding gets a verdict
```

To review code, use the `pr-review` starter: four reviewers read the same diff,
each through one lens (correctness, security, design, tests), held to the same
rules: report only what this change should change, show a blocker with an input
and its wrong result, and report nothing that is fine. For a change that
touches only tests and docs, `pr-review-light` drops the security lens.

```bash
comitia check pr-review --pr 123            # a pull request's diff, through gh
comitia check pr-review --diff main...HEAD  # or any Git range in the project
```

The diff is saved in comitia's store, outside the working tree, and the command
`check` prints runs that saved copy. Reviewers may read the rest of the project
for context, so check out the code under review first.

| Command | What it does |
| --- | --- |
| `recipe new NAME [--from STARTER]`, `recipe list` | Write a recipe; list recipes and starters |
| `check RECIPE --material FILE... [--diff RANGE] [--pr NUMBER]` | Show the plan: participants and report writer, companies on each route, what each can read, the most sessions |
| `run RECIPE --material FILE... [--diff RANGE] [--pr NUMBER] [--goal TEXT] [--prior RUN] [--plan ID] [--background]` | Run the approved plan; returns when it ends |
| `status [RUN]`, `report [RUN]`, `runs`, `stop [RUN]` | Who is writing; the report; past runs; stop a run |
| `import-journal JOURNAL --material FILE... [--check] [--plan ID] [--background]` | Make a report of an earlier `crossby converse` consultation, with your approval, so it can be checked again like any run |
| `resume RUN [--check] [--background]` | Take a stopped run up from where it stopped, with your approval; `--check` shows what it keeps and runs |
| `note FINDING... --text TEXT`, `dismiss FINDING... --note TEXT`, either with `--from-file FILE` | Record what was done; dismiss with the author's approval, once for all the findings named. The file has one `ID: text` line per finding |
| `post [RUN] [--finding ID...] [--markdown]` | Post the findings on the pull request the run reviewed, with your approval; or print them as Markdown |
| `setup` | Install the `discuss` skill in each host; under `approval: strict`, also the approval rules and the hook that keeps them honest |
| `ui [--port N] [--no-open]` | The page, on loopback |
| `converse ASKER RESPONDER --goal TEXT`, `converse --continue DIR` | A quick consultation between two agents, with no recipe or plan ([below](#quick-consultations-from-the-terminal)) |
| `panel NAME --goal TEXT` | A lead consults the members of a panel recipe in `.comitia.yml` (or `.crossby.yml`) |

Every command takes `--json`. Exit codes: 0 done (a partial result is flagged
in the output), 1 error or failed run, 2 plan refused, 3 not approved.

## A recipe

This recipe gives a diagnosis two independent readers. The investigator checks
the evidence while the skeptic looks for competing explanations.

```yaml
# recipes/diagnosis.yml
format: answers
participants:
  - id: investigator
    tool: claude
    instructions: Trace the proposed cause back to the evidence.
  - id: skeptic
    tool: codex
    persona: personas/incident-skeptic
limits: {turn_timeout: 15m}
report_instructions: Separate observations from hypotheses and rank the next checks.
# providers: [anthropic, openai]   # every company the material may reach
# synthesizer: {tool: codex}       # who writes the report (default: the first participant)
# require_blocked: [reads_outside_workspace]   # isolation requires Claude Code
```

Save the recipe as `recipes/diagnosis.yml` and create
`personas/incident-skeptic/instructions.md` with a brief such as “Find plausible
alternative causes and say what evidence would distinguish them.” Check the plan
and use the run command it prints.

```bash
comitia check diagnosis --material incident.md \
  --goal "Weigh the likely causes and identify the next check."
```

A participant has a `tool`, and optionally a `model`, an `effort`, and either
`instructions` (a file or text) or a `persona` folder holding
`instructions.md` and optional text reference files.

A participant can also get `skills`: folders of the project that each hold a
`SKILL.md`. They are copied, as they were when the plan was built, into a
folder of the participant's own, in the place its tool looks for skills. The
plan lists them, and a changed skill is a changed plan. A participant with
skills or a persona answers from that folder, is told where the project is,
and may read it. Only an isolated recipe keeps a participant to its own folder.

```yaml
  - {id: security, tool: claude, skills: [skills/threat-model]}
```

A participant can also get MCP servers for the run, on top of the ones its
tool already has: `mcp` names servers defined in the project's `.mcp.json`.
Like skills, they put the participant in a folder of its own, from which it
can still read the project. Their tools run without asking, since nobody is
there to approve a call, and an MCP server can do whatever it does, so the
plan names each server and says so. A server's definition is never copied
into the run; if it changed after you approved the plan, the run stops.
Claude Code, Codex and Antigravity take them; other tools are refused in the
plan. An environment entry such as `"TOKEN": "${TOKEN}"` is forwarded from
your environment on all three.

```yaml
  - {id: docs, tool: claude, mcp: [internal-docs]}
```

Antigravity (Gemini) has no search tool when it runs unattended: it can only
read files whose paths it already knows. Left to guess, it can spend a whole
turn opening names that do not exist, so comitia gives it the project's file
list (the first 300 paths, shallowest first, from Git where there is a
repository), and a turn that runs out of time is not tried again. A
repository-wide check is still slow. `search_commands: true` on a participant lets it run search and read
commands (`rg`, `grep`, `ls`, `cat`, `git grep`, ...). Antigravity cannot tell
such a command from one that also writes, so the plan then says that writes
are not blocked for that participant. Keep it off for material you do not
trust, such as a pull request from outside; the `pr-review` starter leaves it
off. Other tools ignore the setting.

```yaml
  - {id: design, tool: antigravity-cli, model: gemini-4-argon, search_commands: true}
```

Every answer comitia reads is one JSON object in a set form. Antigravity is
also given that form, and checks the answer against it before it returns it:
asked in the prompt alone, Gemini 4 Neon once answered in long prose instead,
twice, and its findings were lost. Claude Code and Codex answer in the form
the prompt asks for.

## A consultation or a panel

Set `lead` to the participant that should ask the questions. The first
participant leads by default. A panel lead addresses participants by `@id`,
and `limits.max_rounds` caps how many messages the lead can send.

```yaml
# recipes/deep-review.yml
format: consultation
lead: claude                      # default: the first participant
participants:
  - {id: claude, tool: claude, effort: high, instructions: Press on anything vague.}
  - {id: gemini, tool: antigravity-cli, model: gemini-4-argon, effort: high}
limits: {turn_timeout: 15m, max_rounds: 4}   # the most messages the lead may send
providers: [anthropic, google]
# visibility: shared   # a panel only: each also sees the others' replies (default: private)
```

The discussion runs as a panel on comitia's own engine, in which everyone is
read-only, the lead included. The lead holds the material and the goal; the others get the material
with their first message and answer only what the lead sends them (in a
`shared` panel, also the others' replies). When it ends, each participant, in
a fresh session given the discussion, lists the points it raised and the turns
of its own where it raised them, from the discussion alone, without opening
files; comitia keeps only turns that really are that participant's. From there it is a review like any other: the same
verdicts on earlier findings, the same report writer (by default the lead's
tool and model), and the report links each finding to the discussion turns and
shows the whole discussion. A participant that does not answer is noted at the
top and the run is partial; if the lead fails, or the only other participant in
a consultation does, the run fails. The plan counts every session the
discussion can use, and checks each tool as the resumed session its later turns
are.

An earlier `crossby converse` consultation can join this history:
`comitia import-journal .crossby/conversations/<time>/events.jsonl --material SPEC.md
--check` shows the plan (the journal's two sides, with the tools, models and
efforts it names, the asker leading and writing the report), and the command
it prints imports it once you approve. The discussion is the journal's and is
not run again: each side lists the points it raised in it, the report is
written, and a later `run --prior N` checks a revision against it. The
material is given again because a journal does not hold it; the run keeps a
copy, and the journal's hash is part of the plan.

The `deep-review` starter is a consultation, and `decision-debate` a shared
panel where two advocates argue a decision and the lead weighs them. The
participants the lead questions can have a persona folder, skills or MCP
servers: each then joins the discussion from a folder of its own, told its part
there, and may still read the project. The lead answers from the project with
`instructions`, and `search_commands` and isolation are for `answers`, for now.

## From Python

`comitia.api` runs consultations and panels from a program, on the engine a
recipe's discussion uses. The backends and workspaces come from `crossby.api`,
which knows each tool:

```python
from pathlib import Path

from crossby.api import CliBackend, ProjectWorkspace

from comitia.api import Lead, Member, PanelSpec, panel

project = Path.cwd()
result = panel(
    PanelSpec(
        goal="Would this pricing page convert?",
        lead=Lead(backend=CliBackend(tool="claude"), folder=project),
        members=(
            Member(
                id="cto", backend=CliBackend(tool="codex"), workspace=ProjectWorkspace(path=project)
            ),
        ),
    ),
    on_event=lambda event: print(event.type),
    events_path=project / "panel.jsonl",
)
print(result.final_answer)
```

`comitia.api.panel(PanelSpec(goal=…, lead=Lead(…), members=(Member(id=…,
backend=CliBackend(…), workspace=…), …)), on_event=…, events_path=…,
inputs=HumanInput())` runs the panel. `on_event` gets every event on a
dispatcher thread, and a UI answers a human seat with `inputs.submit(request_id,
text, recipients=…, done=…)` (or `HumanInput(responder)` answers
synchronously). A journal problem never stops a panel: the result's
`journal_error` says why the events file is missing or incomplete, and
`sink_errors` lists each `on_event` failure that dropped the sink.
`continue_panel` carries on a panel that stopped without a final answer, from
its journal; `read_panel` and `read_conversation` read a journal without running
anything; and `converse` is the two-agent consultation.

Moving from `crossby.api`: change the import; the names and arguments are the same.

There is no approval step in the library: it runs what it is given, and the
approval a run needs applies to comitia's commands. `comitia.api` is the
supported contract; before 1.0 a minor release may change it, with a migration
note, so pin a minor series.

## Quick consultations from the terminal

For a quick, scriptable consultation with no recipe, plan or findings,
`comitia converse` and `comitia panel` are the commands `crossby converse`
and `crossby panel` were, with the same flags, defaults and exit codes (0
answered, 2 stopped by a limit, 1 a session failed, 130 interrupted). Messages
and progress go to stderr, and the final answer to stdout:

```bash
# The asker (Claude) checks a diagnosis by questioning the responder (Codex)
comitia converse claude codex --goal "Check whether this diagnosis is sound: …"

# Script it: JSON on stdout, no live messages on stderr
comitia converse claude cursor --goal-file goal.md --max-rounds 3 --json --quiet

# Continue one that stopped on a limit, with up to 3 more answers
comitia converse --continue .crossby/conversations/20261110T201500123456 --max-rounds 3

# A lead consults several read-only members by @id
comitia panel pricing --goal "Would this pricing page convert?"
```

The asker holds the goal and the responder never sees it. A panel's recipe
lives under `panels:` in `.comitia.yml`. A project that keeps its panels in
`.crossby.yml`, where `crossby panel` read them, works as it is, and the panel's
opening lines name the file it read:

```yaml
# .comitia.yml
panels:
  pricing:
    lead: {tool: claude}
    members:
      - {id: cto, name: Rui, tool: codex, instructions: personas/cto.md}
      - {id: founder, tool: cursor, folder: founder}
    visibility: private   # or shared
    max_rounds: 5
```

Their journals and transcripts are written where crossby wrote them,
`.crossby/conversations/<time>/` and `.crossby/panels/<time>/`, so a
consultation can still be imported with `comitia import-journal`. Under
`approval: host` or `none` these commands never ask: a person who types one ran
it, and an agent's host has already applied its own permission flow. Under
`approval: strict` each needs your own approval first, as a run does, and
`comitia setup` adds rules for them.

## Approval

Who approves a run is the project's choice, in `.comitia.yml` at its root:

```yaml
approval: host   # host (default), none, or strict
```

- `host`: the host's own permission flow decides, such as Claude Code's prompt
  or Codex's approval path. A project with no `.comitia.yml` gets `host`.
- `none`: runs without asking.
- `strict`: only your own prompt counts.

A recipe may set `approval:` too, but only to tighten: the stricter of the two
applies (`none`, then `host`, then `strict`). An agent can write a recipe, while
`.comitia.yml` is yours, and for the same reason there is no flag or
environment variable for it. Every plan shows its preset, as in `Approval: host
(the host's own permission flow decides)`, and the preset is part of the plan's
ID. Each run records it, with how it was approved, at the top of its report. An
invalid `.comitia.yml` refuses the plan, naming the problem.

How each preset approves a run, an import, a resumption, a dismissal or a post:

- **`host`**: in your own terminal, comitia asks you. Under a coding agent, the
  agent ran the command through its own permission flow, in whatever mode you
  set, and that is the approval. The run records it as `the host's own
  permission flow (Claude Code)`. With no terminal and no agent (cron, say),
  nothing is approved: set `none` for that.
- **`none`**: nobody is asked, not even in a terminal. The run records
  `approval: none (.comitia.yml)`.
- **`strict`**: only your own prompt counts, as [Strict mode](#strict-mode)
  describes.

A resumption takes the stricter of its plan's preset and the project's current
one. `comitia check` warns that a run would be refused only under `strict`,
the one preset where the host's own setup can refuse it.

`comitia setup` installs approval rules and hooks only under `strict`. Under
all presets it installs the `discuss` skill and configures Claude Code's
read-only commands and sandbox exclusions. Approval rules and hooks from an
earlier setup stay active under the host's own permission flow. Claude Code still asks where its `ask` rules for comitia are, and the
hooks still turn down a wrapped command and make Cursor and Antigravity ask
before a plain one. comitia cannot relax them per project: a hook sees the
command, not which project's `.comitia.yml` it will run under (`cd`, `env -C`
or `sh -c` can change that), so a hook that stood down in a `host` project
would let a wrapped command reach a `strict` one unasked. To stop them, remove
the comitia `ask` rules and the `comitia hook` entry from the project's
`.claude/settings.json`, and the comitia entries from
`~/.codex/rules/comitia.rules`, `~/.codex/hooks.json`,
`~/.gemini/config/hooks.json` and `~/.cursor/hooks.json`.

### Strict mode

Approval comes from you: a terminal prompt, the page you opened from your
terminal, or Claude Code's own prompt (an explicit `ask` rule, which prompts in
every permission mode and wins over any allow rule). An agent with none of
these is refused. A terminal counts only when no coding agent started
comitia: an agent can make a terminal and answer its prompt, so under Claude
Code (or with `codex`, `cursor-agent`, `opencode`, `agy` or `copilot` above it,
as crossby finds them) only the host's own prompt counts, and a `comitia ui`
started there approves nothing.

comitia counts on that prompt only when the Claude Code it runs under reads
the rule: from the folder Claude Code was started in, or your own settings. An
agent that runs `comitia` from another project, whose rules Claude Code never
loaded, is refused. The rule matches only a command starting with `comitia
run`, so `setup` also installs a hook that stops a wrapped one (`env comitia
run`, `sh -c '…'`, `uv run comitia run`, `python -m comitia`) before it runs
and tells the agent to run the plain command, and the run is refused where that
hook is missing. The hook takes any quoted argument, heredoc or piped text that
names a comitia start as a command, unless only a program that prints or
searches reads it, or it is a message (`-m`, `--body`, ...). It reads a name the
way a shell writes it back (`com'itia'`, `$'\x63omitia'`). What the command
line does not show is not caught: a command put together from shell variables,
aliases or functions, a name a shell expands (a glob, `{comitia,}`), or a
command kept in a file that a script or tool runs (`bash deploy.sh`, an npm
script, a Makefile target). Like Claude Code's own rules, these cover the
commands an agent writes; they are not a wall around the program. A host
started with flags that skip its approvals (Codex's
`--dangerously-bypass-approvals-and-sandbox` or `-c`, Cursor's `--force`,
Antigravity's `--dangerously-skip-permissions`) is refused too.

## What it guarantees

- **Permissions are part of the plan.** Every session is a `crossby.api.ask`,
  fresh and unattended, or a turn of a panel on comitia's own engine in which
  every seat is read-only, the lead included. By default, file edits and shell writes must be blocked
  before a participant starts. Antigravity's opt-in search commands can also
  write, and selected MCP servers run with their own permissions. The plan
  discloses these exceptions before approval.
- **A run does exactly the plan you approved.** The plan's ID is a hash of the
  recipe, the material, every participant's tool, model, effort, version, route
  and instructions, and the approval preset. `run --plan ID` refuses if anything
  changed. Who approves it follows the preset: see [Approval](#approval), and
  [Strict mode](#strict-mode) for what only your own prompt allows.
- **A stopped run resumes on the same plan.** A run that ended without its
  report (stopped, failed, or its process gone) can resume: what it committed
  is kept, a consultation or panel carries on in its own sessions with no more
  messages than the plan allowed, and only what is missing runs, then the
  report. Every participant is checked again first: a tool that only updated
  itself since is shown, and the resumption uses it; a changed route, reading
  or restriction refuses it.
  `resume --check` shows what it keeps and runs and the most sessions it can
  use, and the resumption is approved like a run, under the stricter of its
  plan's preset and the project's.
- **Routes are read, not assumed.** Companies on each route come from the
  tool's configuration (Claude Code settings and environment, Codex
  `config.toml`, the gateway and model name for Cursor, Copilot and OpenCode).
  An unknown route produces a warning. If the recipe specifies `providers`,
  every route must be known and every company must be on that list.
- **Every finding has a source.** Each finding links to the turns it came
  from; `report.html` expands them in place.
- **Pull request review preview.** `comitia post`, or the button
  on a run's page, shows the review it would leave on the pull request the
  run read: a finding that quotes a line of the diff becomes a comment on that
  line, and the others go in the review body. The approval preset governs
  posting. Comitia submits a comment review under your GitHub login and
  records it with the run. If the pull request changed
  since the run, findings are not placed on lines. Where findings go is not
  part of the recipe: it follows from what was reviewed, and any run can be
  printed as Markdown.
- **An answer given unread shows.** The report says how many findings each
  participant stated and how many times it used its tools before answering
  (`not at all` when it opened nothing), as its tool reported it: tool calls
  for Codex and Antigravity, tool rounds for Claude Code. A tool that does not
  say is left out.
- **No finding is lost.** Each participant's findings get references, and any
  the report writer leaves out are added back on their own. If the writer
  fails, the report lists them unmerged and says so at the top.
- **Resolved needs checked evidence.** On a check-again, reviewers first form
  a fresh view with no earlier findings, then give each earlier finding a
  verdict. `resolved` counts only with a quote that is in this run's copy of
  the material and was not there when the finding was raised, or a cited
  deletion that was there then and is gone. Unchanged material, a bare "fixed", or the
  author's notes never count. If one reviewer has evidence and another says it
  is still open, it stays open and shows as a disagreement.
- **Dismissed stays dismissed.** A reviewer can object, citing a turn, but
  cannot reopen it.
- **Local run storage.** Runs live in `~/.comitia` (override with
  `COMITIA_HOME`), outside the project, so reviewers reading the workspace do
  not find earlier findings. Each run folder holds `plan.json`, a copy of the
  material, `events.jsonl` (crossby's journal format), `findings.json` and the
  report. On POSIX, Comitia restricts access to that project's store when it
  creates a run, saves a diff, or records a plan. New discussion journals also
  use owner-only permissions. Each agent CLI manages its own session storage.
  `uv tool uninstall comitia` removes the CLI. Review and remove saved runs
  separately if you no longer need their copies of the material. Installed
  skills and host approval rules are files in the locations named above.

## Not yet

Hosts other than Claude Code, Codex, Antigravity's CLI and Cursor's CLI (the
Antigravity and Cursor apps are refused). A run that ended with its report, even a partial
one, is not resumed: its findings already have IDs; run the recipe again.
Isolation (`require_blocked: [reads_outside_workspace]`) runs on Claude Code
2.1.328 or later only, so the `message-test` starter uses two Claude Code
personas; `comitia check` refuses any other tool there and says why.

## Contributing

See [Contributing](https://github.com/ivanviragine/comitia/blob/main/CONTRIBUTING.md)
for local checks, issue reports, and release recovery.

## License

Comitia is available under the [MIT License](https://github.com/ivanviragine/comitia/blob/main/LICENSE). The
[Crossby MIT notice](https://github.com/ivanviragine/comitia/blob/main/LICENSES/crossby-MIT.txt) covers code ported from Crossby.
