secondop-panel 1.0.1__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.
- secondop_panel-1.0.1/.gitignore +9 -0
- secondop_panel-1.0.1/LICENSE +21 -0
- secondop_panel-1.0.1/PKG-INFO +303 -0
- secondop_panel-1.0.1/PROMPT.md +40 -0
- secondop_panel-1.0.1/README.md +259 -0
- secondop_panel-1.0.1/docs/GOTCHAS.md +170 -0
- secondop_panel-1.0.1/docs/MEASUREMENT-2026-08-10.md +230 -0
- secondop_panel-1.0.1/docs/MODEL-FAMILIES.md +44 -0
- secondop_panel-1.0.1/docs/SECURITY.md +39 -0
- secondop_panel-1.0.1/panel.example.json +70 -0
- secondop_panel-1.0.1/pyproject.toml +43 -0
- secondop_panel-1.0.1/secondop_panel.py +938 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Anton Dziatkovskii / Palo Alto AI Research Lab
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: secondop-panel
|
|
3
|
+
Version: 1.0.1
|
|
4
|
+
Summary: A second opinion on your code from a PANEL of vendors, not one model. One reviewer is a special case of a panel, and it should be named out loud.
|
|
5
|
+
Project-URL: Homepage, https://github.com/tonydzi/secondop-panel
|
|
6
|
+
Project-URL: Source, https://github.com/tonydzi/secondop-panel
|
|
7
|
+
Project-URL: Issues, https://github.com/tonydzi/secondop-panel/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/tonydzi/secondop-panel/releases
|
|
9
|
+
Author: Palo Alto AI Research Lab
|
|
10
|
+
License: MIT License
|
|
11
|
+
|
|
12
|
+
Copyright (c) 2026 Anton Dziatkovskii / Palo Alto AI Research Lab
|
|
13
|
+
|
|
14
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
15
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
16
|
+
in the Software without restriction, including without limitation the rights
|
|
17
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
18
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
19
|
+
furnished to do so, subject to the following conditions:
|
|
20
|
+
|
|
21
|
+
The above copyright notice and this permission notice shall be included in all
|
|
22
|
+
copies or substantial portions of the Software.
|
|
23
|
+
|
|
24
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
25
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
26
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
27
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
28
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
29
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
30
|
+
SOFTWARE.
|
|
31
|
+
License-File: LICENSE
|
|
32
|
+
Keywords: agents,cli,code-review,llm,multi-vendor,panel,second-opinion
|
|
33
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
34
|
+
Classifier: Environment :: Console
|
|
35
|
+
Classifier: Intended Audience :: Developers
|
|
36
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
37
|
+
Classifier: Operating System :: OS Independent
|
|
38
|
+
Classifier: Programming Language :: Python :: 3
|
|
39
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
40
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
41
|
+
Classifier: Topic :: Utilities
|
|
42
|
+
Requires-Python: >=3.8
|
|
43
|
+
Description-Content-Type: text/markdown
|
|
44
|
+
|
|
45
|
+
# secondop-panel
|
|
46
|
+
|
|
47
|
+
Asks several different AI models to review your code change at the same time, so you do not rely on one model's opinion.
|
|
48
|
+
|
|
49
|
+
**Who it's for:** developers who use an AI agent to write code and want a real second look before calling it "done".
|
|
50
|
+
**What you get:** one command that sends your files to reviewers from different AI companies, then prints their findings and an exit code that only says "pass" when enough different companies actually answered.
|
|
51
|
+
|
|
52
|
+
## Quick start
|
|
53
|
+
1. Download the repo: `git clone https://github.com/tonydzi/secondop-panel.git` and open the folder.
|
|
54
|
+
2. Copy `panel.example.json` to `panel.json`, keep only the reviewers you have, and set your own API key as an environment variable (for example `OPENROUTER_API_KEY`).
|
|
55
|
+
3. Run `python secondop_panel.py selftest`, then `python secondop_panel.py t3 --task my-fix --files src/a.py --context "what I changed"`.
|
|
56
|
+
|
|
57
|
+
**Done when:** selftest ends with `0 failed`, and the review prints which reviewers answered and which did not, with a verdict.
|
|
58
|
+
|
|
59
|
+
> Want an AI agent to do it for you? Paste this to Claude Code / Codex / Cursor:
|
|
60
|
+
> "Read the 'For AI agents' section of https://github.com/tonydzi/secondop-panel and set it up for me."
|
|
61
|
+
|
|
62
|
+
## For AI agents
|
|
63
|
+
|
|
64
|
+
### Preconditions
|
|
65
|
+
- Python 3.8 or newer. One stdlib-only file, no `pip` dependencies.
|
|
66
|
+
- At least two reviewers from different AI companies ("families"). Each is either a logged-in CLI on PATH (`codex`, `grok`, `gemini`, `claude`) or an OpenAI-compatible HTTP endpoint with an API key in the environment.
|
|
67
|
+
- Ask the human: which reviewer CLIs they have logged in, which API keys they are willing to use (for example OpenRouter), and whether this code is allowed to leave the machine. The panel sends full file contents to third parties (see `docs/SECURITY.md`).
|
|
68
|
+
|
|
69
|
+
### Install
|
|
70
|
+
```bash
|
|
71
|
+
git clone https://github.com/tonydzi/secondop-panel.git
|
|
72
|
+
cd secondop-panel
|
|
73
|
+
cp panel.example.json panel.json # PowerShell: Copy-Item panel.example.json panel.json
|
|
74
|
+
```
|
|
75
|
+
Optional, to get a `secondop-panel` command (declared in `pyproject.toml`): `pip install .`. You can also just copy the single file `secondop_panel.py` into a project.
|
|
76
|
+
|
|
77
|
+
### Configure
|
|
78
|
+
- `panel.json` (read from next to the script, or from `$SECONDOP_PANEL_CONF`): a `quorum` number and a list of `rails`. Each rail has a `name`, a `family` (the AI company; quorum counts families, not rails), and either `kind: "http"` with `api`, `key_env`, `model`, or `kind: "cmd"` with a `cmd` list. Keep only the rails the human really has.
|
|
79
|
+
- API keys come from the environment only, named by `key_env`. The human supplies them. Never write a key into `panel.json`.
|
|
80
|
+
- Usage log goes to `panel_usage.jsonl` next to the script, or `$SECONDOP_PANEL_LOG`.
|
|
81
|
+
- Optional agent skill: `skills/secondop-panel/SKILL.md` (copy to `~/.claude/skills/secondop-panel/SKILL.md` for Claude Code).
|
|
82
|
+
- Wire in three moments, as in `PROMPT.md`: `t1` before coding, `t2` at a design fork, `t3` after the change. Always pass real files to `--files`, never only paths.
|
|
83
|
+
|
|
84
|
+
### Verify
|
|
85
|
+
```bash
|
|
86
|
+
python secondop_panel.py selftest
|
|
87
|
+
python secondop_panel.py doctor
|
|
88
|
+
```
|
|
89
|
+
Expected: `selftest: <N> checks, 0 failed` and exit `0` (offline, no keys; this clone printed `33 checks`). `doctor` prints one line per reviewer: `OK`, `DEGRADED` (installed but refusing) or `ABSENT`, and whether live families meet quorum. Without `panel.json`, `doctor` prints `no rails configured` and exits `2`. A real review (`t3`) exits `0` only when quorum is met, `3` when there was no independent second opinion (treat as a warning, never a pass), `2` on bad config.
|
|
90
|
+
|
|
91
|
+
### Uninstall / rollback
|
|
92
|
+
Delete the cloned folder (or the copied `secondop_panel.py`, `panel.json`, `panel_usage.jsonl`). `pip uninstall secondop-panel` if you used `pip install .`. Remove any hook or CI step you added that calls it.
|
|
93
|
+
|
|
94
|
+
### Rules for the agent
|
|
95
|
+
- Before sending anything, show the human what leaves the machine: `python secondop_panel.py t3 --files <file> --print-prompt` calls nobody.
|
|
96
|
+
- Never send a file you have not read. Never send files that hold secrets or private data.
|
|
97
|
+
- Never put API keys in `panel.json` or any repo file. Environment variables only.
|
|
98
|
+
- Never let a dead reviewer fall back to another vendor, and never report a pass on exit code `3`. Say which families were missing.
|
|
99
|
+
- Do not choose cheap "flash" or "lite" model tiers to save money. They return empty answers and silently shrink the quorum.
|
|
100
|
+
|
|
101
|
+
## Details
|
|
102
|
+
|
|
103
|
+
**Nobody reviews themselves.** The usual fix — "have another model check it" — quietly collapses into asking *one* other model, and one model is one opinion with one blind spot.
|
|
104
|
+
|
|
105
|
+
This is the panel: a review request fanned out to **several model families at once**, with a verdict contract, quorum counted by family, and an exit code that refuses to go green when there was no real second opinion.
|
|
106
|
+
|
|
107
|
+
Stdlib-only Python, one file, MIT. Works with local CLIs (`codex`, `grok`, `gemini`, `claude`), any OpenAI-compatible HTTP endpoint (OpenRouter, vendor APIs, your own gateway), or a mix.
|
|
108
|
+
|
|
109
|
+
Built and used daily at [Palo Alto AI Research Lab](https://github.com/tonydzi/tonydzi) — it is the gate our agents must pass before they are allowed to say "done".
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## The one thing to take away: send CONTENTS, not paths
|
|
114
|
+
|
|
115
|
+
If you hand a panel a list of **file paths**, the models that cannot read your disk will not tell you. They will invent.
|
|
116
|
+
|
|
117
|
+
We measured it on this very repository, 2026-08-10, four models from four different families, same code, same reviewer role — only the material changed:
|
|
118
|
+
|
|
119
|
+
| what the panel was given | rails that answered | findings | findings anchored on something that actually exists | models that said "I cannot see the code" |
|
|
120
|
+
|---|---|---|---|---|
|
|
121
|
+
| **paths only**, framed the way an integrator naturally writes it | 4 / 4 | 20 | **0** | **0 / 4** |
|
|
122
|
+
| **paths only**, but the prompt says contents are missing and honesty is allowed | 2 / 4 | 0 | — | **2 / 2** |
|
|
123
|
+
| **full file contents** | 2 / 4 | 10 | **10** | — |
|
|
124
|
+
|
|
125
|
+
The paths-only run was not "weaker". It was *confidently wrong*: findings about a `families_needed` counter, a `--model-config` CLI flag, per-request subprocess spawning and unlocked concurrent log writes. None of those exist here — the file has a two-level lock and no such flag. All four models produced a clean, numbered, professional-looking review of a program they had never seen.
|
|
126
|
+
|
|
127
|
+
The contents run named real functions — `is_finding`, `families_answered`, `_run_cmd_rail`, `strip_prefixes` — and **four of its findings were real defects, fixed in this repo before publishing** (see [GOTCHAS](docs/GOTCHAS.md#found-by-the-panel-on-its-own-code)).
|
|
128
|
+
|
|
129
|
+
So two rules are wired into the tool, not left to your discipline:
|
|
130
|
+
|
|
131
|
+
1. `pack_files()` sends **line-numbered file contents**; missing and truncated files are named explicitly, because a silent absence invites invention while a named absence does not.
|
|
132
|
+
2. `--paths-only` exists so you can reproduce the failure yourself — and a run in that mode **can never exit 0**.
|
|
133
|
+
|
|
134
|
+
And a third rule for choosing models: **an honest "I don't have the data" beats a confident guess.** That is a selection criterion, not a nicety — a model that will not say "I can't see it" is a model that will fabricate under pressure. Test yours: `python secondop_panel.py t3 --paths-only --files anything.py`.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Three touchpoints, not "review at the end"
|
|
139
|
+
|
|
140
|
+
| point | when | question | role |
|
|
141
|
+
|---|---|---|---|
|
|
142
|
+
| `t1` | before you write code | "is this plan sound?" | `verify` |
|
|
143
|
+
| `t2` | at a fork | "which of these two designs?" | `counter` |
|
|
144
|
+
| `t3` | after the build | "try to **break** what I just made" | `break` |
|
|
145
|
+
|
|
146
|
+
A panel called only at `t3` finds bugs. A panel called at `t1` prevents the build.
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
python secondop_panel.py t1 --task new-cache --context "the plan, in full"
|
|
150
|
+
python secondop_panel.py t2 --task new-cache --context "option A ... option B ... I lean A because ..."
|
|
151
|
+
python secondop_panel.py t3 --task new-cache --files src/cache.py tests/test_cache.py \
|
|
152
|
+
--context "what I changed and why" --diff HEAD~1
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Quickstart
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
git clone https://github.com/tonydzi/secondop-panel.git && cd secondop-panel
|
|
161
|
+
cp panel.example.json panel.json # edit: keep the rails you actually have
|
|
162
|
+
export OPENROUTER_API_KEY=... # or point the rails at your own endpoints
|
|
163
|
+
python secondop_panel.py selftest # offline: 33 checks, no network, no keys
|
|
164
|
+
python secondop_panel.py doctor # which rails are alive on THIS machine
|
|
165
|
+
python secondop_panel.py t3 --task my-fix --files src/a.py --context "what I did"
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Exit codes are the gate, not decoration:
|
|
169
|
+
|
|
170
|
+
| code | meaning | what your ritual should do |
|
|
171
|
+
|---|---|---|
|
|
172
|
+
| `0` | quorum met — N distinct **families** answered | a pass is allowed |
|
|
173
|
+
| `3` | no independent second opinion (rails dead, skipped, all one family, or a degraded paths-only run) | report at most a **warning**, never a pass |
|
|
174
|
+
| `2` | bad config / nothing to review | fix and re-run |
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## What makes it a panel and not a lucky loop
|
|
179
|
+
|
|
180
|
+
**Quorum counts FAMILIES.** `google/gemini-*` through a gateway and the local `gemini` CLI are two *doors to one lab*, not two opinions. Counting heads instead of families is how a tool reports "four reviewers agreed" after asking the same lab four times. The threshold never learns vendor names — add or remove rails freely, the rule does not change.
|
|
181
|
+
|
|
182
|
+
**No silent vendor substitution.** An unknown rail name is a **skip**, never a redirect into whichever rail happens to work. A verdict from vendor A printed under the name of vendor C makes the independence fake and your gate green on one opinion. Duplicates (`--rails codex,codex`) are dropped before the run for the same reason.
|
|
183
|
+
|
|
184
|
+
**A skip is visible and it costs you the pass.** Rails that were asked and did not answer are printed with the reason, and the run cannot return 0 unless enough distinct families spoke. "Two rails" while one is alive is a lie your CI will believe.
|
|
185
|
+
|
|
186
|
+
**A closed door is not a dead vendor.** `doctor` separates `ABSENT` (this machine never had it) from `DEGRADED` (installed and refusing) — different diseases, different cures. A vendor is only dead when *every* door is closed; the browser is usually still open.
|
|
187
|
+
|
|
188
|
+
**One rail may never take the panel down.** A vendor that crashes is a missing opinion, not the loss of everyone else's.
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## Configuration
|
|
193
|
+
|
|
194
|
+
`panel.json` — rails are just data (see [`panel.example.json`](panel.example.json)):
|
|
195
|
+
|
|
196
|
+
```json
|
|
197
|
+
{ "quorum": 2, "timeout_s": 180,
|
|
198
|
+
"rails": [
|
|
199
|
+
{"name":"gemini","family":"google","kind":"http",
|
|
200
|
+
"api":"https://openrouter.ai/api/v1/chat/completions",
|
|
201
|
+
"key_env":"OPENROUTER_API_KEY","model":"google/gemini-3.1-pro-preview","effort":"medium"},
|
|
202
|
+
{"name":"grok","family":"x-ai","kind":"cmd","unset_env":["XAI_API_KEY"],
|
|
203
|
+
"cmd":["grok","--prompt-file","{prompt_file}","--tools","","--no-plan"]}
|
|
204
|
+
] }
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
**Tier is not a budget knob.** The `*-flash` / `*-lite` tier spends its token budget on reasoning and hands back an empty answer, so the rail drops out and your quorum quietly shrinks to whoever finished — we chased that three times before naming it ([gotcha 20](docs/GOTCHAS.md)). Smartest model each family sells, `effort` **medium** (not `high` — `high` is what truncated them). And if you already pay a flat subscription for a family, run it as a `cmd` rail and drop its gateway twin ([gotcha 21](docs/GOTCHAS.md)).
|
|
208
|
+
|
|
209
|
+
`{prompt_file}` is replaced with a temp file holding the prompt; rails without it get the prompt on stdin. **Never pass a multi-line prompt as an argv string** — shell/CRT quoting mangles it and the vendor silently sees only the first line.
|
|
210
|
+
|
|
211
|
+
Keys come from the environment only. Nothing here stores a secret; see [`docs/SECURITY.md`](docs/SECURITY.md) — you are shipping your source code to third parties, and that deserves one page of thought.
|
|
212
|
+
|
|
213
|
+
Picking the 3–4 families: [`docs/MODEL-FAMILIES.md`](docs/MODEL-FAMILIES.md).
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## Wiring it into your own agent
|
|
218
|
+
|
|
219
|
+
[`PROMPT.md`](PROMPT.md) is a copy-paste prompt for Claude Code / Codex / Cursor: *"install a panel of breakers on my pipeline"*, ~15 minutes, including where to put the three calls and how to make a failed quorum downgrade your verdict instead of being ignored.
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## Every trap we paid for
|
|
224
|
+
|
|
225
|
+
[`docs/GOTCHAS.md`](docs/GOTCHAS.md) — 19 of them, each one a bug a live panel found in this code: markdown-bolded verdict tags, `VERIFYING` scored as a verdict, `ACCEPT` on line one with `COUNTER` in the body, empty strings counted as opinions, `O_APPEND` not being atomic on Windows, and the reasoning-model trap where a tight token budget returns empty `content` with `finish_reason: stop` so your client invents a silence that never happened.
|
|
226
|
+
|
|
227
|
+
## License
|
|
228
|
+
|
|
229
|
+
MIT.
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
Part of the reliability series by Palo Alto AI Research Lab. Closest neighbour: [`verdict-contract`](https://github.com/tonydzi/verdict-contract) — the structured verdict a reviewer must answer in, and the parser that refuses to guess (this kit ships the same discipline for a whole panel). See also [`verified-ops-starter`](https://github.com/tonydzi/verified-ops-starter) (your job says exit 0 — prove it did the work), [`agent-approval-gate`](https://github.com/tonydzi/agent-approval-gate) (when the panel says BLOCK and a human has to decide) and [`telegram-mcp-kit`](https://github.com/tonydzi/telegram-mcp-kit). Questions / broken step? Open an issue — we answer within 24h.
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
> **Publishing your own internals?** This repo was sanitized for release with
|
|
238
|
+
> [`oss-publish`](https://github.com/tonydzi/oss-publish) — personal data replaced by plausible
|
|
239
|
+
> fakes of the same shape (never `<REDACTED>`), and a fail-closed gate re-scans the whole tree
|
|
240
|
+
> before the push. Free, MIT.
|
|
241
|
+
|
|
242
|
+
<!--kits-series:start-->
|
|
243
|
+
|
|
244
|
+
## 🧰 Connector & Ops Kits
|
|
245
|
+
|
|
246
|
+
Eight kits, all published 2026-08-10, each lifted out of the same live fleet after it
|
|
247
|
+
survived production rather than written as a demo. They are independent: take one, ignore
|
|
248
|
+
the rest. All stdlib-only Python, all free.
|
|
249
|
+
|
|
250
|
+
| kit | what it solves |
|
|
251
|
+
|---|---|
|
|
252
|
+
| [`telegram-mcp-kit`](https://github.com/tonydzi/telegram-mcp-kit) | Connect your agent to your own Telegram account in ~15 minutes, with the production patches and every gotcha |
|
|
253
|
+
| [`whatsapp-mcp-kit`](https://github.com/tonydzi/whatsapp-mcp-kit) | Link WhatsApp, using a live self-refreshing QR page that makes pairing actually work |
|
|
254
|
+
| [`mcp-daemon-diet`](https://github.com/tonydzi/mcp-daemon-diet) | One shared MCP daemon per machine instead of a stdio copy in every session, with a watchdog that will not blind your live sessions |
|
|
255
|
+
| [`agent-approval-gate`](https://github.com/tonydzi/agent-approval-gate) | Your agent needs a human's OK and nobody is at the terminal: the ask goes to a messenger, the answer comes back into the run |
|
|
256
|
+
| [`fleet-deploy`](https://github.com/tonydzi/fleet-deploy) | Roll a fix to N machines and prove it landed on each one: canary waves and a verify that must read a fact back |
|
|
257
|
+
| [`secondop-panel`](https://github.com/tonydzi/secondop-panel) | Nobody reviews themselves, and one reviewer model is one blind spot: fan a change out to several model families with quorum and honest skips |
|
|
258
|
+
| [`oss-publish`](https://github.com/tonydzi/oss-publish) | Open up internal work without leaking it: plausible substitutions of the same shape, then a fail-closed gate over the whole tree |
|
|
259
|
+
| [`llm-spend-audit`](https://github.com/tonydzi/llm-spend-audit) | What your own wiring charges on every session, and which paid subscriptions are going undrawn |
|
|
260
|
+
|
|
261
|
+
<!--kits-series:end-->
|
|
262
|
+
|
|
263
|
+
<!--ecosystem-map:start-->
|
|
264
|
+
|
|
265
|
+
## 🧩 One piece of a working system
|
|
266
|
+
|
|
267
|
+
This repository is one piece lifted out of a live operation: one engineer running a fleet of
|
|
268
|
+
machines, built with Claude as implementation collaborator; the machines reach consensus with
|
|
269
|
+
each other and wake the human only for money or the irreversible. It was extracted after it
|
|
270
|
+
survived production, not written as a demo — and it runs on its own: nothing here phones home
|
|
271
|
+
to the rest.
|
|
272
|
+
|
|
273
|
+
**See how the whole thing fits together → [SYSTEM.md](https://github.com/tonydzi/tonydzi/blob/main/SYSTEM.md)**
|
|
274
|
+
|
|
275
|
+
<!--ecosystem-map:end-->
|
|
276
|
+
|
|
277
|
+
## AI contributors
|
|
278
|
+
|
|
279
|
+
This project is built by a human + AI team, and the git log says so: Claude writes most of
|
|
280
|
+
the code, Codex and Grok review it, Gemini feeds the research. Each is credited on a commit
|
|
281
|
+
**only if its output changed that commit's content** — no decorative credits. Lab-wide
|
|
282
|
+
policy, one source for every repo: [AI-CONTRIBUTORS.md](https://github.com/tonydzi/.github/blob/main/AI-CONTRIBUTORS.md).
|
|
283
|
+
|
|
284
|
+
<!-- READ-WITH-AI:START (generated by read_with_ai.py - do not hand-edit) -->
|
|
285
|
+
|
|
286
|
+
### READ THIS WITH AI
|
|
287
|
+
|
|
288
|
+
One click and an agent reads the repo, pulls out the patterns and helps you apply them to your own work.
|
|
289
|
+
|
|
290
|
+
<a href="https://chatgpt.com/codex?prompt=Read%20this%20repo%3A%20https%3A%2F%2Fgithub.com%2Ftonydzi%2Fsecondop-panel%20%28%E2%80%9Csecondop-panel%E2%80%9D%20-%20Nobody%20reviews%20themselves%20-%20and%20one%20reviewer%20model%20is%20one%20blind%20spot.%20Fan%20every%20change%20out%20to%20several%20model%20FAMILIES%20at%20once%3A%20verdict%20contract%2C%20quorum%20by%20family%2C%20honest%20skips%2C%20and%20an%20exit%20code%20that...%29.%20Work%20out%20what%20problem%20it%20actually%20solves%2C%20pull%20out%20the%20reusable%20patterns%20and%20help%20me%20apply%20them%20to%20my%20own%20setup.%20Start%20by%20asking%20what%20I%20am%20working%20on."><img alt="Codex - open" src="https://img.shields.io/badge/Codex-open-000000?style=for-the-badge&logo=openai&logoColor=white"></a> <a href="https://chatgpt.com/?q=Read%20this%20repo%3A%20https%3A%2F%2Fgithub.com%2Ftonydzi%2Fsecondop-panel%20%28%E2%80%9Csecondop-panel%E2%80%9D%20-%20Nobody%20reviews%20themselves%20-%20and%20one%20reviewer%20model%20is%20one%20blind%20spot.%20Fan%20every%20change%20out%20to%20several%20model%20FAMILIES%20at%20once%3A%20verdict%20contract%2C%20quorum%20by%20family%2C%20honest%20skips%2C%20and%20an%20exit%20code%20that...%29.%20Work%20out%20what%20problem%20it%20actually%20solves%2C%20pull%20out%20the%20reusable%20patterns%20and%20help%20me%20apply%20them%20to%20my%20own%20setup.%20Start%20by%20asking%20what%20I%20am%20working%20on."><img alt="ChatGPT - open" src="https://img.shields.io/badge/ChatGPT-open-10a37f?style=for-the-badge&logo=openai&logoColor=white"></a> <a href="https://claude.ai/new?q=Read%20this%20repo%3A%20https%3A%2F%2Fgithub.com%2Ftonydzi%2Fsecondop-panel%20%28%E2%80%9Csecondop-panel%E2%80%9D%20-%20Nobody%20reviews%20themselves%20-%20and%20one%20reviewer%20model%20is%20one%20blind%20spot.%20Fan%20every%20change%20out%20to%20several%20model%20FAMILIES%20at%20once%3A%20verdict%20contract%2C%20quorum%20by%20family%2C%20honest%20skips%2C%20and%20an%20exit%20code%20that...%29.%20Work%20out%20what%20problem%20it%20actually%20solves%2C%20pull%20out%20the%20reusable%20patterns%20and%20help%20me%20apply%20them%20to%20my%20own%20setup.%20Start%20by%20asking%20what%20I%20am%20working%20on."><img alt="Claude - open" src="https://img.shields.io/badge/Claude-open-d97757?style=for-the-badge&logo=anthropic&logoColor=white"></a>
|
|
291
|
+
|
|
292
|
+
<details>
|
|
293
|
+
<summary>Copy the prompt (works in any agent: Gemini, Grok, a local model, your own CLI)</summary>
|
|
294
|
+
|
|
295
|
+
```text
|
|
296
|
+
Read this repo: https://github.com/tonydzi/secondop-panel (“secondop-panel” - Nobody reviews themselves - and one reviewer model is one blind spot. Fan every change out to several model FAMILIES at once: verdict contract, quorum by family, honest skips, and an exit code that...). Work out what problem it actually solves, pull out the reusable patterns and help me apply them to my own setup. Start by asking what I am working on.
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
</details>
|
|
300
|
+
|
|
301
|
+
<sub>— TonyDzi, Palo Alto AI Research Lab · second brain, agent coordination, persistent memory: github.com/tonydzi</sub>
|
|
302
|
+
|
|
303
|
+
<!-- READ-WITH-AI:END -->
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# PROMPT.md — put a panel of breakers on your own pipeline in ~15 minutes
|
|
2
|
+
|
|
3
|
+
Copy everything below the line into **Claude Code, Codex, Cursor or any coding agent** working in your repo. It installs the panel and wires it into the three places where a second opinion actually changes the outcome.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
I want a **panel of adversarial reviewers from different model families** on my pipeline, not a single "ask another model" call. Do this end to end and report what you actually verified.
|
|
8
|
+
|
|
9
|
+
**Step 1 — install.**
|
|
10
|
+
Clone `https://github.com/tonydzi/secondop-panel` into a tools directory (or vendor `secondop_panel.py` — it is one stdlib-only file, Python 3.8+, no dependencies). Run `python secondop_panel.py selftest`. It must print 33 checks, 0 failed. If it does not, stop and tell me why.
|
|
11
|
+
|
|
12
|
+
**Step 2 — pick my rails.**
|
|
13
|
+
Read `docs/MODEL-FAMILIES.md`, then look at what this machine actually has: which model CLIs are on PATH and logged in, and which API keys exist in the environment. Propose **3–4 rails from 3–4 DIFFERENT labs** and tell me the shortfall honestly if I only have two. Write `panel.json` from `panel.example.json`, delete the rails I do not have, and set `family` to the lab for each one.
|
|
14
|
+
|
|
15
|
+
Then run the honesty probe on every candidate — this is the selection criterion, not a formality:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
python secondop_panel.py t3 --paths-only --files <some real file> --rails <one rail>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
A rail that answers *"I cannot see the code"* passes. A rail that returns confident findings about a file it was never shown **fails** — report it to me and suggest a replacement, because that model will fabricate whenever my prompt is incomplete.
|
|
22
|
+
|
|
23
|
+
Finish with `python secondop_panel.py doctor` and show me the table: `OK` / `DEGRADED` / `ABSENT` per rail, and whether the live families meet quorum.
|
|
24
|
+
|
|
25
|
+
**Step 3 — wire in the three touchpoints.**
|
|
26
|
+
Add these to whatever ritual or script I use before saying work is done (a Makefile target, a git hook, a CI job, or your own checklist — ask me which if it is not obvious from the repo):
|
|
27
|
+
|
|
28
|
+
* `t1` **before writing code** on any substantive change: `python secondop_panel.py t1 --task <id> --context "<the plan, in full>"`
|
|
29
|
+
* `t2` **at a real fork** (two designs on the table): `python secondop_panel.py t2 --task <id> --context "<option A / option B / which I lean to and why>"`
|
|
30
|
+
* `t3` **after the build**, always with file contents: `python secondop_panel.py t3 --task <id> --files <every changed file> --context "<what changed and why>" --diff HEAD~1`
|
|
31
|
+
|
|
32
|
+
**Step 4 — the two rules that make it worth having.** Implement both, do not just describe them:
|
|
33
|
+
|
|
34
|
+
1. **Contents, never paths.** Pass real files to `--files` so the packer sends line-numbered contents. Never hand the panel a list of file names and never paste a summary in place of the code — measured on this tool's own repo, a paths-only panel produced 20 findings and 0 of them were about anything that exists in the file, while all four models sounded completely certain.
|
|
35
|
+
2. **Exit code 3 downgrades my verdict.** If the panel exits 3, the ritual must report a **warning**, never a pass, and must name which families were missing. A skipped rail that silently costs nothing is a gate nobody reads. Show me the exact lines you changed to enforce this.
|
|
36
|
+
|
|
37
|
+
**Step 5 — prove it works, on this repo, out loud.**
|
|
38
|
+
Run `t3` against your own most recent change with real file contents. Show me: the rails that answered, the rails that did not **and why**, the distinct family count, the exit code, and the findings. Then tell me which findings are real, which are by-design behaviour and which are speculation — the panel produces candidates, you arbitrate, I decide. Do not describe anything you did not run.
|
|
39
|
+
|
|
40
|
+
Constraints: do not put API keys in any file (environment variables only, `key_env` names them); do not let a failing rail fall back to another vendor (unknown or dead rail = skip, that is the whole point); do not add a second rail from a lab that is already in the panel and call it independence.
|