1<!--
2SPDX-FileCopyrightText: Amolith <amolith@secluded.site>
3
4SPDX-License-Identifier: CC0-1.0
5-->
6
7# Crosscheck
8
9Crosscheck is an [OpenProse 14][OpenProse]\* workflow that has a main LLM agent
10orchestrate parallel subagents to review code, come up with findings, validate
11those findings, and provide a report.
12
13[OpenProse]: https://github.com/openprose/prose/tree/v0.14.0
14
15I hate that there's terminology, but I think there has to be 😭 Maybe I'll come
16up with clearer terms for the non-OpenProse things that won't require
17explanation.
18
19For Prose:
20
21- OpenProse: Markdown files ("contracts") that turn the LLM agent you're
22 interacting with into a sort of "virtual machine" that executes those Markdown
23 contracts.
24- Prose Complete: describes any LLM harness, like Crush, Claude Code, etc., with
25 the required tools to execute OpenProse.
26- Prose VM: the main, front-and-center conversation/session/thread with an LLM
27 agent in a Prose Complete harness.
28
29For Crosscheck:
30
31- Runner: either a subagent in your Prose VM or a standalone Prose Complete
32 harness invoked by your Prose VM through its shell tool.
33
34\*Specifically OpenProse 14 because later versions change drastically, adding a
35whole "reactor" thing that replaces Prose Complete harnesses, and OpenProse's
36harness agnosticism is a huge reason I like it. So we're sticking with when it
37was good :)
38
39Run Crosscheck from the repository or worktree being reviewed:
40
41<!-- rumdl-disable MD013 -->
42
43```bash
44# simple use
45prose run ~/where/you/cloned/crosscheck/src -- subject: "current diff"
46# with preferences
47prose run ~/where/you/cloned/crosscheck/src -- subject: "git diff main" preferences: "crush run --yolo with minimax, kimi, qwen, and deepseek reviewers, no mimo"
48```
49
50<!-- rumdl-enable MD013 -->
51
52- `subject`: current diff, ref range, branch, paths, PR description, or a
53 natural-language review target
54- `preferences`: optional runner/model/focus/exclusion/local-testing guidance
55
56## Setup
57
58You'll need [OpenProse 14][OpenProse]'s agent skill and standard-library
59dependency cache. This installs both from the `v0.14.0` zip archive, replacing
60any existing copies at those two paths.
61
62<!-- rumdl-disable MD013 -->
63
64```bash
65set -euo pipefail
66
67OPENPROSE_TAG=v0.14.0
68tmpdir="$(mktemp -d)"
69
70curl -fsSL \
71 "https://github.com/openprose/prose/archive/refs/tags/${OPENPROSE_TAG}.zip" \
72 -o "${tmpdir}/openprose.zip"
73
74unzip -q "${tmpdir}/openprose.zip" -d "${tmpdir}"
75srcdir="$(find "${tmpdir}" -mindepth 1 -maxdepth 1 -type d -name 'prose-*' | head -n 1)"
76test -n "${srcdir}"
77
78mkdir -p \
79 "${HOME}/.agents/skills" \
80 "${HOME}/.agents/prose/deps/github.com/openprose"
81
82rm -rf \
83 "${HOME}/.agents/skills/open-prose" \
84 "${HOME}/.agents/prose/deps/github.com/openprose/prose"
85
86cp -R "${srcdir}/skills/open-prose" \
87 "${HOME}/.agents/skills/open-prose"
88
89cp -R "${srcdir}" \
90 "${HOME}/.agents/prose/deps/github.com/openprose/prose"
91
92rm -rf "${tmpdir}"
93```
94
95<!-- rumdl-enable MD013 -->
96
97The first `cp` installs the `open-prose` skill. OpenProse has a global
98dependency cache of Markdown (seems crazy, but I guess it makes sense?) and the
99second copy puts the `std/...` and `co/...` deps in the right place.
100
101Other dependencies:
102
103- `bash`, `curl`, `unzip`, and ordinary shell utilities such as `mktemp`,
104 `find`, `head`, `mkdir`, `rm`, and `cp` for the setup command above.
105- At least one Prose Complete harness like [Crush][Crush], [Pi][Pi], [Amp][Amp],
106 [Claude Code][Claude Code], or [Codex][Codex] on your PATH that can load the
107 `open-prose` skill and give the LLM filesystem and shell access.
108 - You'll interact with the Prose VM and it must either use built-in subagents
109 or invoke itself/another Prose Complete harness through the shell tool. If
110 you want a read-only review, the Prose Complete harness should have an
111 effective read-only mode.
112- Model/provider credentials configured for the runner. Local models _can_ work
113 well for this, but unless you have stellar hardware, the quantisations you'll
114 be limited to might yield very poor results.
115- The VCS CLI needed by your `subject`. The examples above use `git`, if your
116 repo is `jj`, you'll need that.
117
118Microsandbox is not required yet, but it will be for the escalation path where
119reviewers and validators can build and execute adversarial probes inside
120isolated environments.
121
122[Crush]: https://github.com/charmbracelet/crush
123[Pi]: https://github.com/earendil-works/pi/tree/main/packages/coding-agent
124[Amp]: https://ampcode.com
125[Claude Code]: https://claude.com/product/claude-code
126[Codex]: https://github.com/openai/codex