amicus 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/LICENSE +21 -0
  3. package/README.md +477 -0
  4. package/bin/amicus.js +382 -0
  5. package/electron/assets/icon.png +0 -0
  6. package/electron/assets/icon.svg +5 -0
  7. package/electron/fold.js +163 -0
  8. package/electron/ipc-setup.js +176 -0
  9. package/electron/load-failsafe.js +85 -0
  10. package/electron/main.js +468 -0
  11. package/electron/preload-setup.js +38 -0
  12. package/electron/preload.js +33 -0
  13. package/electron/setup-ui-alias-script.js +218 -0
  14. package/electron/setup-ui-aliases.js +85 -0
  15. package/electron/setup-ui-keys-script.js +115 -0
  16. package/electron/setup-ui-keys.js +97 -0
  17. package/electron/setup-ui-model.js +138 -0
  18. package/electron/setup-ui-styles.js +327 -0
  19. package/electron/setup-ui.js +465 -0
  20. package/electron/summary.js +118 -0
  21. package/electron/toolbar.js +229 -0
  22. package/electron/window-position.js +35 -0
  23. package/package.json +98 -0
  24. package/scripts/postinstall.js +193 -0
  25. package/scripts/setup-hooks.js +42 -0
  26. package/skill/SKILL.md +976 -0
  27. package/skills/second-opinion/COUNCIL-DESIGN.md +227 -0
  28. package/skills/second-opinion/MODEL-NOTES.md +104 -0
  29. package/skills/second-opinion/SKILL.md +389 -0
  30. package/src/cli-handlers.js +188 -0
  31. package/src/cli.js +400 -0
  32. package/src/conflict.js +144 -0
  33. package/src/context-compression.js +102 -0
  34. package/src/context.js +199 -0
  35. package/src/drift.js +144 -0
  36. package/src/environment.js +157 -0
  37. package/src/headless.js +742 -0
  38. package/src/index.js +106 -0
  39. package/src/jsonl-parser.js +180 -0
  40. package/src/mcp-server.js +625 -0
  41. package/src/mcp-tools.js +407 -0
  42. package/src/opencode-client.js +615 -0
  43. package/src/prompt-builder.js +355 -0
  44. package/src/prompts/cowork-agent-prompt.js +118 -0
  45. package/src/session-manager.js +414 -0
  46. package/src/session.js +180 -0
  47. package/src/sidecar/context-builder.js +297 -0
  48. package/src/sidecar/continue.js +212 -0
  49. package/src/sidecar/crash-handler.js +56 -0
  50. package/src/sidecar/fanout-leg.js +107 -0
  51. package/src/sidecar/fanout-output.js +46 -0
  52. package/src/sidecar/fanout.js +236 -0
  53. package/src/sidecar/interactive.js +217 -0
  54. package/src/sidecar/models.js +135 -0
  55. package/src/sidecar/progress.js +218 -0
  56. package/src/sidecar/read.js +183 -0
  57. package/src/sidecar/resume.js +221 -0
  58. package/src/sidecar/session-utils.js +288 -0
  59. package/src/sidecar/setup-window.js +79 -0
  60. package/src/sidecar/setup.js +280 -0
  61. package/src/sidecar/start.js +251 -0
  62. package/src/utils/agent-mapping.js +138 -0
  63. package/src/utils/alias-audit.js +98 -0
  64. package/src/utils/alias-resolver.js +77 -0
  65. package/src/utils/api-key-store.js +259 -0
  66. package/src/utils/api-key-validation.js +97 -0
  67. package/src/utils/auth-json.js +109 -0
  68. package/src/utils/config.js +291 -0
  69. package/src/utils/curated-models.js +82 -0
  70. package/src/utils/env-compat.js +38 -0
  71. package/src/utils/env-loader.js +54 -0
  72. package/src/utils/idle-watchdog.js +225 -0
  73. package/src/utils/input-validators.js +127 -0
  74. package/src/utils/lifecycle.js +43 -0
  75. package/src/utils/logger.js +84 -0
  76. package/src/utils/mcp-discovery.js +194 -0
  77. package/src/utils/mcp-validators.js +78 -0
  78. package/src/utils/model-catalog.js +103 -0
  79. package/src/utils/model-fetcher.js +179 -0
  80. package/src/utils/model-validator.js +207 -0
  81. package/src/utils/path-setup.js +41 -0
  82. package/src/utils/port-pid.js +39 -0
  83. package/src/utils/prompt-source.js +53 -0
  84. package/src/utils/result-schema.js +261 -0
  85. package/src/utils/server-setup.js +93 -0
  86. package/src/utils/session-abort.js +53 -0
  87. package/src/utils/session-lock.js +95 -0
  88. package/src/utils/shared-server.js +216 -0
  89. package/src/utils/start-helpers.js +76 -0
  90. package/src/utils/thinking-validators.js +92 -0
  91. package/src/utils/update-notifier-loader.js +18 -0
  92. package/src/utils/updater.js +157 -0
  93. package/src/utils/validators.js +300 -0
@@ -0,0 +1,227 @@
1
+ # Second Opinion v3 — "LLM Council" Design
2
+
3
+ _Status: implemented (v3). v2 (2026-06-03) added the council mechanics; v3 (2026-06-10) swapped the
4
+ transport onto the Amicus fanout/JSON engine primitives. v2 history lives in git
5
+ (`V2-COUNCIL-DESIGN.md`, deleted at v3)._
6
+ _Design for `SKILL.md` and `MODEL-NOTES.md` of the `second-opinion` skill._
7
+
8
+ ## 1. Intent
9
+
10
+ Upgrade `second-opinion` by porting the best mechanics of the **LLM Council** web-app
11
+ pattern — peer cross-review, anonymized
12
+ ranking, aggregate scoring, and a designated chairman — into the skill, while keeping its
13
+ existing strengths (model recommendation, sidecar orchestration, tiered accept/deny,
14
+ reviewed-copy output, and the MODEL-NOTES self-improvement loop).
15
+
16
+ This is the **"full port" (option C)**: cross-review + anonymization + aggregate scoring +
17
+ non-Claude chairman + per-model inspectable artifacts.
18
+
19
+ ## 2. Core framing & principles
20
+
21
+ - **Second-opinion is a *secondary* review tool.** By the time it runs, **Claude has already
22
+ given its opinion** in the main conversation. The skill exists to bring in *independent
23
+ outside* views.
24
+ - **The council is the *non-Claude* bench by default.** Council members are models from
25
+ families other than the orchestrator (Gemini, DeepSeek, GPT, etc.). Claude is **not** a
26
+ first-opinion council member unless the optional "Claude in the council" toggle is on (§5.4)
27
+ — and even then it is judged but does not vote or chair.
28
+ - **Claude's role shrinks to orchestrator:** prep material, recommend the council, anonymize,
29
+ drive the stages, score, present accept/deny, write files. **Claude does not synthesize the
30
+ verdict** — a council model chairs that (§5.3).
31
+ - **Subject of review.** The novel cross-review step has models critique **each other's
32
+ reviews of your artifact** — *not* re-review the artifact. (LLM Council ranks the models'
33
+ own answers; here the "answers" are the reviews.)
34
+ - **This is an executed skill, not an app.** All council logic (anonymize → rank → aggregate →
35
+ chair) is prose workflow Claude performs while driving the `amicus` CLI. v3 note: the *transport*
36
+ is now engine-native — each review wave is ONE `amicus fanout --json` call returning structured
37
+ run documents — but scoring, tallying, anonymization, and synthesis remain Claude's manual work.
38
+ No backend, no parsing code beyond reading JSON fields.
39
+
40
+ ## 3. What changes vs. v1
41
+
42
+ | Area | v1 | v3 (this design) |
43
+ |---|---|---|
44
+ | Independent reviews | ✅ Phase 2 parallel sidecars | ✅ Stage 1 — now emits a **structured findings list** |
45
+ | Cross-review | ❌ none | ⭐ **Stage 2** — anonymized peer ranking **+** per-finding adjudication |
46
+ | Synthesis | Claude synthesizes | ⭐ **Council-model chair** synthesizes; Claude only presents |
47
+ | Decision tiers | Claude's consensus/divergence read | ⭐ **Peer-validated** tiers (Confirmed / Contested / Singleton) |
48
+ | Scoring | none | ⭐ Reviewer **street-cred** + per-finding **peer-confidence** |
49
+ | Artifacts | reviewed copy + report | + per-model raw reviews, cross-review matrix, chair verdict (run folder) |
50
+ | MODEL-NOTES | per-model quirks | + **reviewer-reliability** rolling table feeding recommendations |
51
+ | Transport (v3) | N parallel `start` calls + prose-scraping | ⭐ one `fanout --json` wave per stage; briefings via `--prompt-file`; JSON status/summary parsing |
52
+
53
+ Preserved unchanged: intake/criteria intake, the MODEL-NOTES operating rules, reviewed-copy vs
54
+ standalone-report logic, cost guardrail, and the Stage 6 approval-gated MODEL-NOTES update.
55
+
56
+ ## 4. The council flow
57
+
58
+ Run as ordered phases; track as todos. **Three sequential waves of model calls** (Stage 1 →
59
+ 2 → 3 each depend on the prior); within each wave, models run in parallel.
60
+
61
+ ### Stage 0 — Intake & prep
62
+ - Confirm **source material**, **the analysis**, **the criteria** (ask only for what's missing).
63
+ - Prepare material for council models per MODEL-NOTES (extract clean text from links / large /
64
+ marked-up sources to a small temp file; small text used as-is).
65
+ - Pick the council: **non-Claude models, default 3 from different families** (enough voices for
66
+ a real cross-review + a tie-breaker). Recommend ranked-by-fit (consult MODEL-NOTES
67
+ reviewer-reliability), state cost, **disclose run shape up front** — "~2N+1 calls across 3
68
+ waves, ~X min" — and **wait for confirmation**. Honor the cost guardrail.
69
+ - **Scale-down is explicit:** 1 model = thorough single pass (skip Stage 2 & chair); 2 = cross-
70
+ review works but ranking is thin; 3 = default deep council.
71
+ - **Optional — "Claude in the council" (default off):** offer to add Claude as a *judged*
72
+ contributor so the bench's verdict on Claude's own take is visible. When on, Claude adds one
73
+ Stage-1 review to the bundle but does **not** judge (Stage 2) or chair (Stage 3). See §5.4.
74
+
75
+ ### Stage 1 — Independent reviews
76
+ - All council models review **your artifact** via ONE fanout wave (see SKILL.md Stage 1 for the
77
+ canonical command). The wave JSON returns every leg's status + review in one parse. A red-team
78
+ reviewer with a distinct brief runs as a separate concurrent `amicus start --json` call alongside the wave (fanout legs share
79
+ one prompt by design).
80
+ - Required structured output: a **findings list**, each finding = `id · claim · severity
81
+ (blocker/major/minor/nit) · location (section/quote) · rationale`, plus a short overall take.
82
+ - Save each raw review to the run folder (§6).
83
+ - If **"Claude in the council"** is on, Claude also produces a **fresh** review in the same
84
+ findings format (a new structured pass on the artifact, regardless of any upstream feedback)
85
+ and adds it to the bundle as one more review (§5.4).
86
+
87
+ ### Stage 2 — Cross-review (the headline)
88
+ - Claude builds **one shared anonymized bundle**: all Stage 1 reviews relabeled **Review A/B/C…**,
89
+ with a private label↔model map Claude keeps (§5.1).
90
+ - The **same bundle** goes to **every** council model — exactly fanout's shared-prompt model: one
91
+ wave call distributes it, and each judge is asked to do two things on the bundle:
92
+ 1. **Rank** the reviews by accuracy + insight, ending with a parseable block:
93
+ `FINAL RANKING:` then `1. Review C` / `2. Review A` … (LLM Council's format).
94
+ 2. **Adjudicate findings** — for each finding in the bundle: `agree | dispute | neutral` +
95
+ one-line reason (an "I missed this, it's valid" counts as agree). Findings are referenced
96
+ by **review label + finding id** (e.g. `A2` = Review A's 2nd finding) so Claude can map
97
+ each verdict back to the originating model and claim when tallying.
98
+ - Each model **unknowingly ranks/adjudicates its own review too** — this is the anti-favoritism
99
+ mechanism, not a bug (§5.1).
100
+ - Claude de-anonymizes for scoring/display only.
101
+
102
+ ### Stage 3 — Council-chair synthesis
103
+ - A designated **non-Claude** chair (recommended + confirmed in Stage 0/launch) receives all
104
+ reviews + rankings + adjudications and writes the **synthesized verdict**, weighted by
105
+ street-cred and peer-confidence. Independent of Claude.
106
+ - Chair selection & fallback: §5.3.
107
+
108
+ ### Stage 4 — Tiered decisions (peer-validated)
109
+ - **Consensus tier** = **Confirmed** findings (peers agree) → offer one **bulk accept/deny**
110
+ (user may name exceptions).
111
+ - **Judgment tier** = **Contested** (peers dispute/split) or **Singleton** (only the raiser)
112
+ findings → present **each individually**, showing the dissent and which model raised/disputed it.
113
+ - Record every decision (accepted / denied / modified).
114
+
115
+ ### Stage 5 — Outputs
116
+ - **Editable source** → write `<stem>-reviewed.<ext>` next to the original (accepted changes
117
+ only; validate structural integrity). **Fixed source** → standalone reviewed report.
118
+ - Always write the run folder artifacts (§6).
119
+
120
+ ### Stage 6 — Capture lessons (compounding)
121
+ - Reflect on failures/mitigations and briefing wording, as today.
122
+ - **Additionally** update the per-model **reviewer-reliability** table (§7).
123
+ - **Show the proposed MODEL-NOTES diff and get approval before writing.** Keep it tight.
124
+
125
+ ## 5. Key mechanics
126
+
127
+ ### 5.1 Anonymization (shared bundle)
128
+ - After Stage 1, Claude assembles **one** bundle with stable labels Review A/B/C… and keeps a
129
+ private map (e.g., `Review A → deepseek`, `Review B → gemini`, …).
130
+ - The identical bundle is sent to every judge. Because a model can't tell which review is its
131
+ own, it ranks/adjudicates all of them honestly; symmetric self-bias washes out across judges.
132
+ - Claude only de-anonymizes when computing scores and writing the matrix/report for the user.
133
+ - When "Claude in the council" is on, Claude's own review is anonymized into the **same** bundle
134
+ and judged blind by the council models. Claude never ranks/adjudicates (it holds the map) —
135
+ the asymmetry detailed in §5.4.
136
+
137
+ ### 5.2 Scoring (Claude tallies by hand — no code required)
138
+ - **Street cred** = each model's **average rank position** across all judges' `FINAL RANKING:`
139
+ blocks (lower = better), exactly as LLM Council's aggregate. Surface as a small table.
140
+ - **Per-finding peer-confidence** = qualitative tier from the adjudications:
141
+ - **Confirmed** — agrees clearly outweigh disputes (and ≥2 judges engaged).
142
+ - **Contested** — meaningful split or explicit disputes.
143
+ - **Singleton** — only the original raiser; others neutral/silent.
144
+ These tiers drive Stage 4. Claude exercises judgment at the margins; no rigid formula.
145
+
146
+ ### 5.3 Chair selection & fallback
147
+ - Default: Claude **recommends a non-Claude chair** from the council each run (often the
148
+ strongest reasoner / best reviewer-reliability) and the user confirms at launch.
149
+ - The chair **may** also be a Stage-1 council member (it sees the anonymized bundle + scores).
150
+ - **Fallback order if the chair fails:** re-run → promote next-best council model →
151
+ **Claude chairs only as last resort, with explicit disclosure** that the verdict is no longer
152
+ fully independent.
153
+
154
+ ### 5.4 Claude in the council (optional, default off)
155
+ Lets you see how the bench judges Claude's *own* take.
156
+ - **Asymmetric by necessity.** Claude is the orchestrator and holds the label↔model map, so it
157
+ cannot judge blind. Therefore Claude **contributes a review to be judged but does not vote
158
+ (Stage 2) or chair (Stage 3).** The verdict stays independent.
159
+ - **Which review: always fresh** — Claude does a new structured Stage-1 review on the artifact
160
+ every time it's enabled (not a formalization of upstream feedback).
161
+ - **Readout — "How Claude's review fared":** Claude's street-cred rank among peers and the
162
+ Confirmed/Contested/Singleton split of its findings, reported in the matrix and report.
163
+ - **Integrity:** when Claude presents results, it reports the bench's verdict on its own review
164
+ at face value — no defending or re-litigating.
165
+
166
+ ## 6. Outputs & naming
167
+ One tidy run folder: `output/<stem>-council/` (or `./second-opinion/<stem>-council/` if no
168
+ `output/` exists):
169
+ - `review-<model>.md` ×N — raw Stage 1 reviews (plus `review-claude.md` when "Claude in the
170
+ council" is on)
171
+ - `crossreview-matrix.md` — adjudication grid + street-cred table (de-anonymized)
172
+ - `verdict.md` — the chair's synthesis
173
+ - `report.md` — synthesis + decision log + what was applied (+ the "How Claude's review fared"
174
+ readout when "Claude in the council" is on)
175
+ - `<stem>-reviewed.<ext>` — written **next to the original**, as today (editable sources only)
176
+ - Temp extracts get a clearly-temporary name and are cleaned up at the end.
177
+
178
+ ## 7. MODEL-NOTES reviewer-reliability
179
+ Add a compact rolling table consulted in Stage 0 and updated (with approval) in Stage 6:
180
+
181
+ | model | runs | avg street-cred | confirm-rate | notes |
182
+ |---|---|---|---|---|
183
+
184
+ - **avg street-cred** — running average rank when peer-ranked.
185
+ - **confirm-rate** — share of this model's findings that ended up **Confirmed** by peers.
186
+ - Used to justify recommendations ("DeepSeek findings peer-confirm ~80% → strong default
187
+ reviewer"). Kept tight per the existing no-bloat rule; merge/prune rather than append.
188
+
189
+ ## 8. Gating, cost, degradation & failure handling
190
+
191
+ - **Gating:** council is the default identity but scales down (§ Stage 0). Always disclose run
192
+ shape/cost and confirm before launching.
193
+ - **Cost guardrail (unchanged):** never `o3`/`o3-pro` unless the user asks by name; warn on cost.
194
+ - **Degradation (judge-count thresholds, unchanged):** gating counts **non-Claude judges**.
195
+ 1 judge → single-pass (no Stage 2/chair); if the bench drops below 2 mid-run, degrade to
196
+ single-pass and disclose. 2 judges → Stage 2 runs but note the thin ranking. ("Claude in the
197
+ council" adds a *judged* review but **no** judge.)
198
+ - **Wave-degrade rules (v3):** leg failures are read from the wave document
199
+ (`status: partial`, `counts`, per-leg `status`/`error`):
200
+ - **Stage 1:** a leg ends `error`/`timeout`/`crashed`/`aborted` → proceed when ≥2 reviews
201
+ survive; below 2, offer a re-run of the dead leg or a disclosed downgrade to single-pass.
202
+ - **Stage 2:** a judge leg dies → tally rankings/adjudications over the surviving judges and
203
+ disclose the reduced bench in `crossreview-matrix.md`. Tier definitions are unchanged (they
204
+ already count "judges engaged").
205
+ - **Stage 3:** chair failure uses the same fallback chain (re-run → promote next-best non-Claude
206
+ → Claude chairs with explicit disclosure).
207
+ - **Run stats (v3):** `report.md` includes a per-leg table (model, status, durationMs) read from
208
+ the wave/run documents. The schema carries no cost data — never invent cost figures.
209
+ - **Transient failures:** provider 502s etc. → re-run the affected leg (solo `start --json`) or
210
+ the wave; never present a half-finished run as an answer.
211
+
212
+ ## 9. Non-goals (YAGNI)
213
+ - No web UI, API server, or persistent conversation store (LLM Council's app shell).
214
+ - No code/backend for scoring or parsing — Claude does it inline.
215
+ - No automatic MODEL-NOTES writes — always approval-gated.
216
+ - Claude is **not** a council member by default; it joins only via the opt-in toggle (§5.4),
217
+ and even then it is judged-but-non-voting/non-chairing.
218
+
219
+ ## 10. Open questions
220
+ - None blocking. Possible later refinement: a numeric peer-confidence score instead of the
221
+ three qualitative tiers, if tiers prove too coarse in practice.
222
+
223
+ ## 11. Implementation surface
224
+ - `SKILL.md` — the Stage 0–6 council flow on the v3 transport.
225
+ - `MODEL-NOTES.md` — reviewer-reliability table, per-model quirks, cost guardrail, Stage-2
226
+ briefing tips. Engine workarounds that F1/F2/F4 made obsolete were pruned at v3.
227
+ - No other files.
@@ -0,0 +1,104 @@
1
+ # MODEL-NOTES — Operating Lessons for Amicus Models
2
+
3
+ This file is the `second-opinion` skill's evolving memory of **how to actually drive each model
4
+ well**. Read it before Stage 0 (council selection and launch); update it, with the user's
5
+ approval, at the end of each run (Stage 6). Keep it tight — merge and prune rather than append.
6
+
7
+ _Last updated: 2026-06-10 (v3 migration: engine workarounds pruned — see changelog)._
8
+
9
+ ## Global operating rules (all models)
10
+ - **Council runs are headless by design** (autonomous batch work): `fanout` is headless by
11
+ definition; solo runs use `--no-ui`. Interactive GUI sessions are for the `sidecar` chat skill,
12
+ not councils.
13
+ - **`--agent Plan`** for review/analysis — read-only, so a model can't accidentally edit the source.
14
+ - **`--no-context`** always — council briefings are self-contained; don't drag the host
15
+ conversation in.
16
+ - **`--summary-length verbose`** — the analysis IS the deliverable; don't let it get summarized away.
17
+ - **Briefings via `--prompt-file`** (temp `_tmp-*.md` files in the run folder — `output/<stem>-council/`,
18
+ defined in SKILL.md Stage 0) — no size cap, no shell-quoting hazards. Never inline a briefing as
19
+ a CLI argument.
20
+ - **Run in the background (`run_in_background: true`); you're notified on completion. Don't poll.**
21
+ - **Read results from the JSON documents** (`--json`): a wave's `legs[].summary` / a run's
22
+ `summary` is the model's output; `status`/`error`/`counts` are ground truth for failures. Never
23
+ scrape stderr logs to judge success.
24
+ - **Transient provider errors** (502s, connection drops): re-run the affected leg (solo
25
+ `amicus start --json`, same briefing file) or the wave — see per-model notes for
26
+ model-specific signals. Never present a half-finished run as an answer.
27
+ - **Credentials:** keys live in `~/.config/amicus/.env` (legacy `~/.config/sidecar/.env` still
28
+ read). Configure with `amicus setup`.
29
+
30
+ ## Stage-2 cross-review briefing tips
31
+
32
+ - **Send the same anonymized bundle to every judge** — stable labels Review A/B/C…, no model
33
+ names — so rankings are directly comparable (one fanout wave distributes it).
34
+ - **Require a `FINAL RANKING:` block** at the end of the response (e.g. `1. Review C / 2. Review
35
+ A …`), plus a per-finding `agree | dispute | neutral` verdict with a one-line reason for each
36
+ finding referenced by label+id (e.g. `A2`).
37
+
38
+ ## Per-model notes
39
+
40
+ ### Gemini (`--model gemini`)
41
+ - **Strengths:** fast, very large context. Good for broad sweeps and long documents.
42
+ - **Quirk:** tends to narrate intentions and pad with preamble; instruct it to emit the
43
+ structured output verbatim, without preamble. (Historical: its narrate-then-glob habit used to
44
+ trip the old headless poller; the engine handles tool-call gaps now — F1.)
45
+ - Don't trust its self-reported version string ("I am gemini-X") as ground truth.
46
+
47
+ ### DeepSeek (`--model deepseek` → via OpenRouter)
48
+ - **Strengths:** resilient; produces strong, well-structured, well-cited critical analysis. A good
49
+ default reviewer and a proven chair.
50
+ - **Quirk:** occasional transient 502 mid-run → re-run the leg.
51
+
52
+ ### GPT (`--model gpt` → via OpenRouter)
53
+ - **Strengths:** reachable via the OpenRouter key; resilient; very thorough structured critique
54
+ (25 findings on a 1-page framework). Cleanly separates the review criteria.
55
+ - **Quirks:** verbose — peers dinged it for volume-over-judgment (good coverage, lower
56
+ discrimination); **self-ranked its own review #1** in cross-review → discount self-votes.
57
+
58
+ ### (others — add as used)
59
+ - Opus / o-series etc. are reachable via amicus **if their API keys are configured**. Add notes
60
+ here the first time each is used.
61
+
62
+ ## Reviewer-reliability table
63
+
64
+ Consulted in Stage 0 (council selection) and updated with approval in Stage 6.
65
+
66
+ - **avg street-cred** — rolling average of this model's per-run street-cred (mean rank position
67
+ across judges' `FINAL RANKING:` blocks; lower = better).
68
+ - **confirm-rate** — share of this model's findings that reached the **Confirmed** tier (agrees
69
+ outweigh disputes, ≥ 2 judges engaged).
70
+
71
+ | model | runs | avg street-cred | confirm-rate | notes |
72
+ | --- | --- | --- | --- | --- |
73
+ | deepseek | 1 | 2.33 | 100% (12/12) | strong synthesis, resilient; chaired well |
74
+ | gpt | 1 | 2.67 | 92% (23/25) | thorough but verbose; self-ranked #1 → discount; OpenRouter |
75
+ | gemini | 1 | 3.67 | 89% (8/9) | fast, large-context; more absolute/adversarial ("blocker" inflation); ranked lowest |
76
+
77
+ _Scale note: the 2026-06-04 run used a 4-review pool (Claude in-council), so street-cred is on a
78
+ 1–4 scale rather than 1–3 — treat these as run-1 baselines, not directly comparable to future
79
+ 3-model runs. Merge/prune rather than append._
80
+
81
+ ## Cost guardrail
82
+ - **Never** use `o3` / `o3-pro` unless the user explicitly asks for it by name — these cost
83
+ roughly $10–60+ per request. Warn about cost before proceeding even when asked.
84
+
85
+ ## General
86
+ - Model citations are usually real but **verify any load-bearing reference before publishing**;
87
+ watch for loosely-attached attributions (e.g., a real paper cited for the wrong claim).
88
+ - Prefer models from **different families** for genuinely independent opinions.
89
+
90
+ ## Lessons changelog
91
+ - **2026-06-03** — Seeded from the study-guide review (Gemini + DeepSeek). Found the (since-fixed)
92
+ headless poller trap and Gemini's narrate-then-glob pattern; confirmed DeepSeek's resilience and
93
+ its occasional transient 502.
94
+ - **2026-06-03** — v2 council upgrade: added cross-review (Stage-2 anonymized peer ranking +
95
+ per-finding adjudication) and reviewer-reliability tracking.
96
+ - **2026-06-04** — Trusst messaging-framework council (Gemini + GPT + DeepSeek + Claude-in-council;
97
+ DeepSeek chair). First GPT use → per-model note. First scored reviewer-reliability rows
98
+ (deepseek 2.33/100%, gpt 2.67/92%, gemini 3.67/89%; 1–4 scale).
99
+ - **2026-06-10** — v3 migration: transport moved to `fanout --json` + `--prompt-file` (F4); pruned
100
+ the obsolete engine workarounds they replaced — the headless-poller trap + single-read/no-glob/
101
+ no-narration ritual + "Polling loop exited" false-alarm note (fixed by F1), the ~32 KB inline-arg
102
+ cap (superseded by `--prompt-file`), the absolute-path/cwd trap (fixed by F2), and the
103
+ GUI-hangs-on-this-machine rule (resolved 2026-06-10; headless stays the council default by
104
+ design). Config path updated to `~/.config/amicus/.env`.