@simonren/quorum 0.12.1 → 0.13.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.
package/README.md CHANGED
@@ -95,7 +95,7 @@ You have a question → /multi-consult → question + criteria → Codex, Gemi
95
95
  {
96
96
  "codex": {
97
97
  "enabled": true,
98
- "model": "gpt-5.5",
98
+ "model": "gpt-6.1-sol",
99
99
  "reasoningEffort": "high",
100
100
  "serviceTier": "fast",
101
101
  "consultReasoningEffort": "xhigh",
@@ -71,15 +71,15 @@ The call takes minutes. Do not call it twice for the same work.
71
71
 
72
72
  ## Step 3 — Verify, then judge
73
73
 
74
- The result is a `# Multi-Model Review` header followed by `## Standard review` and `## Adversarial review`, each holding one `<review model=… pass=… status=…>` block per model. Each block is a reviewer's raw response in the shape `## Verdict` / `## Findings` (`[S1|S2|S3]` with Location, Evidence, Impact, Fix, Confidence) / `## Answers` / `## Decisions`. A block may carry `status="failed"` or a `⚠️ Format drift` line.
74
+ The result is a `# Multi-Model Review` header followed by `## Standard review` and `## Adversarial review`, each holding one `<review model=… pass=… status=…>` block per model. Each block is a reviewer's raw response in the shape `## Verdict` / `## Findings` (`[S1|S2]` with Location, Evidence, Impact, Fix, Confidence; `[S3]` as one-liners) / `## Answers` / `## Decisions`. A block may carry `status="failed"` or a `⚠️ Format drift` line.
75
75
 
76
76
  1. **Read every block.** Note which model/pass failed and why; that goes in your report.
77
77
  2. **Merge findings** into one deduplicated list across models and passes. Record who raised each. Agreement raises priority but does not replace verification.
78
- 3. **Verify each finding yourself.** Open the file at the cited location, trace the failure path, and mark it:
78
+ 3. **Verify the findings that decide the verdict, once each:** every S1/S2, and any finding that would change your verdict. Read only the cited ranges, batching several locations into one tool call; trace the failure path and mark it:
79
79
  - ✓✓ verified — you confirmed the failure path in the code
80
80
  - ✓ plausible — consistent with the code, not fully traced
81
81
  - ✗ rejected — say why in one line
82
- Adversarial-only findings are speculative by design: verify before acting. A finding with no location or evidence is unverified, not accepted.
82
+ S3 findings are listed as `? unverified` unless you verify them because you are about to fix them. Adversarial-only findings are speculative by design: verify before acting. A finding with no location or evidence is unverified, not accepted.
83
83
  4. **Resolve your own uncertainties** from the Answers sections, load-bearing first. Do the same for your questions and decisions; note where reviewers disagree with each other.
84
84
  5. **Decide.** Your verdict, judged against your bar, not a tally of the panel's.
85
85
 
@@ -91,7 +91,7 @@ Use this shape:
91
91
  **Verdict:** SHIP | SHIP WITH FIXES | DO NOT SHIP — <one sentence against the bar>
92
92
 
93
93
  **Must fix** (S1/S2, ✓✓ or ✓): `path:line` — what is wrong → what you will do
94
- **Worth fixing** (S3): …
94
+ **Worth fixing** (S3, `? unverified` unless marked): …
95
95
  **Rejected:** <finding> — <why>, one line each
96
96
  **Uncertainties resolved:** <load-bearing items: verified / refuted / still open>
97
97
 
@@ -63,6 +63,12 @@ export class CodexAdapter extends CliAdapter {
63
63
  if (effectiveTier !== 'default') {
64
64
  args.push('-c', `service_tier=${effectiveTier}`);
65
65
  }
66
+ // A code review's evidence is the working tree; web fetches only add
67
+ // turns (38% of review runs made them). Consult keeps web for questions
68
+ // that depend on current library or service behaviour.
69
+ if (ctx.kind === 'review') {
70
+ args.push('-c', 'web_search="disabled"');
71
+ }
66
72
  const decoder = new CodexEventDecoder();
67
73
  const cliStartTime = Date.now();
68
74
  const tierLabel = effectiveTier !== 'default' ? ` [${effectiveTier}]` : '';
package/dist/config.d.ts CHANGED
@@ -8,8 +8,8 @@
8
8
  * cached config or re-reads when the file changed on disk.
9
9
  * - Missing file → defaults in memory (no write). `initConfig()` (server
10
10
  * start-up) creates the file with defaults on first launch.
11
- * - Invalid JSON → defaults, warn on stderr. A schema violation in one
12
- * adapter's section resets only that section; the others survive.
11
+ * - Invalid JSON → defaults, warn on stderr. A schema violation resets only
12
+ * the offending fields; the rest of that section and the others survive.
13
13
  * - Partial user configs are deep-merged against defaults via Zod `.default()`.
14
14
  * - Tool-call arguments override config (e.g. `reasoningEffort` on a single
15
15
  * `multi_review` call). Config only sets defaults.
package/dist/config.js CHANGED
@@ -8,8 +8,8 @@
8
8
  * cached config or re-reads when the file changed on disk.
9
9
  * - Missing file → defaults in memory (no write). `initConfig()` (server
10
10
  * start-up) creates the file with defaults on first launch.
11
- * - Invalid JSON → defaults, warn on stderr. A schema violation in one
12
- * adapter's section resets only that section; the others survive.
11
+ * - Invalid JSON → defaults, warn on stderr. A schema violation resets only
12
+ * the offending fields; the rest of that section and the others survive.
13
13
  * - Partial user configs are deep-merged against defaults via Zod `.default()`.
14
14
  * - Tool-call arguments override config (e.g. `reasoningEffort` on a single
15
15
  * `multi_review` call). Config only sets defaults.
@@ -26,7 +26,7 @@ export const CodexConfigSchema = z
26
26
  .object({
27
27
  /** Set to false to leave Codex out of the panel even when installed. */
28
28
  enabled: z.boolean().default(true),
29
- model: z.string().default('gpt-5.5'),
29
+ model: z.string().default('gpt-6.1-sol'),
30
30
  reasoningEffort: z.enum(REASONING_EFFORTS).default('high'),
31
31
  serviceTier: z.enum(SERVICE_TIERS).default('fast'),
32
32
  /** Consult-specific defaults — consult questions are deeper than reviews,
@@ -182,8 +182,8 @@ export function setConfigPathForTesting(path) {
182
182
  // INTERNAL
183
183
  // =============================================================================
184
184
  /**
185
- * Parse each adapter's config independently so a typo in one section only
186
- * resets that adapter to defaults — the other adapters' settings survive.
185
+ * Parse each adapter's config independently, and on a schema violation reset
186
+ * only the offending fields — every valid setting survives.
187
187
  */
188
188
  function loadConfigFromDisk(path) {
189
189
  if (!existsSync(path))
@@ -209,14 +209,20 @@ function loadConfigFromDisk(path) {
209
209
  const result = {};
210
210
  for (const { key, schema } of adapters) {
211
211
  const section = raw[key];
212
- try {
213
- result[key] = schema.parse(section);
214
- }
215
- catch (error) {
216
- const msg = error instanceof Error ? error.message : String(error);
217
- console.error(`[quorum] Invalid "${key}" config — using ${key} defaults. Error: ${msg}`);
218
- result[key] = schema.parse(undefined);
212
+ const parsed = schema.safeParse(section);
213
+ if (parsed.success) {
214
+ result[key] = parsed.data;
215
+ continue;
219
216
  }
217
+ // Drop only the offending fields: a bad effort level must not also
218
+ // discard a valid `model` and silently run the default one.
219
+ const bad = new Set(parsed.error.issues.map((issue) => issue.path[0]));
220
+ const kept = typeof section === 'object' && section !== null && !Array.isArray(section)
221
+ ? Object.fromEntries(Object.entries(section).filter(([field]) => !bad.has(field)))
222
+ : undefined;
223
+ const dropped = kept ? [...bad].join(', ') : `the whole "${key}" section`;
224
+ console.error(`[quorum] Invalid "${key}" config — using defaults for ${dropped}. Error: ${parsed.error.message}`);
225
+ result[key] = schema.parse(kept);
220
226
  }
221
227
  return result;
222
228
  }
@@ -66,7 +66,7 @@ export function buildConsultPrompt(request) {
66
66
  ' one and say what would flip you to the other.',
67
67
  '- Be concrete: name the specific technology, pattern, or code change.',
68
68
  ' Cite file:line when referencing code.',
69
- '- Aim for 300–700 words. Go longer only if the question needs it.',
69
+ '- Hard limit: 700 words in total.',
70
70
  ].join('\n'));
71
71
  sections.push([
72
72
  'Respond in this exact structure with these exact ## headers in this',
package/dist/handoff.js CHANGED
@@ -207,6 +207,9 @@ function renderGroundRules() {
207
207
  return `## GROUND RULES
208
208
 
209
209
  - Read-only. Do not create, modify, or delete files. Do not run anything that changes state: no git commit/checkout/stash/reset/push, no installs, no formatters, no test runs that write.
210
+ - Stay inside the working directory: do not read, list, or search paths outside it — no hunting parent or sibling directories for AGENTS.md or CLAUDE.md.
211
+ - No web access: do not fetch URLs or search the web. The code in the working directory is the evidence.
212
+ - Read what you need: locate with \`rg -n\`, then read a line range (\`sed -n 'a,bp'\`) rather than \`cat\` of whole large files. Aim for about 12 tool calls; go beyond that only to confirm a finding that would change the verdict.
210
213
  - If the directory is a git repository, \`git status\`, \`git diff\`, \`git diff --cached\` and \`git log -3 --stat\` are the fastest way to find the change; when the brief names a base ref, \`git diff <base>...HEAD\` is the change. If it is not a repository, or the tree is clean and no base ref is given, work from PRIORITY FILES and the brief.
211
214
  - Verify before you report. Open the file, quote the line. A finding without a location and evidence is not a finding.
212
215
  - Stay in scope: the change and the code it touches. Report a pre-existing problem elsewhere only if the change activates it or the bar depends on it, and label it "pre-existing".
@@ -304,20 +307,22 @@ function renderResponseFormat(mode) {
304
307
  : 'Judge against the acceptance bar.';
305
308
  return `## RESPONSE FORMAT
306
309
 
307
- Use exactly these \`##\` headers, in this order, and nothing before the first one.
310
+ Use exactly these \`##\` headers, in this order, and nothing before the first one. Hard limit: 900 words in total. Prefer one strong finding over several weak ones.
308
311
 
309
312
  ## Verdict
310
313
  One line: \`SHIP\`, \`SHIP WITH FIXES\`, or \`DO NOT SHIP\`, then one sentence of justification. ${verdictNote}
311
314
 
312
315
  ## Findings
313
- Ordered by severity, most severe first. Write \`None.\` if there are no material findings. For each:
314
- ### [S1|S2|S3] <short title>
316
+ Ordered by severity, most severe first. Write \`None.\` if there are no material findings. For each S1 or S2 finding:
317
+ ### [S1|S2] <short title>
315
318
  - Location: \`path:line\`
316
319
  - Evidence: what in the code shows it — quote the line or trace the path
317
320
  - Impact: what goes wrong, and under what conditions
318
321
  - Fix: the concrete change
319
322
  - Confidence: high | medium | low — say so if the finding rests on an inference you could not verify
320
323
 
324
+ After them, at most 5 S3 findings, one line each: \`- [S3] <short title> — path:line — <fix>\`.
325
+
321
326
  Severity: S1 = blocks the bar (data loss, security, wrong results, crash on a common path). S2 = real bug or gap; ship only after fixing. S3 = worth fixing, not blocking.
322
327
 
323
328
  ## Answers
@@ -8,8 +8,12 @@
8
8
  * delimiters.
9
9
  */
10
10
  import { ReviewFailure, ReviewResult } from '../adapters/base.js';
11
- /** Per-model output cap so one runaway reviewer cannot crowd out the others. */
12
- export declare const MAX_OUTPUT_CHARS = 60000;
11
+ /**
12
+ * Per-model output cap so one runaway reviewer cannot crowd out the others.
13
+ * The prompts cap a review at 900 words and a consult answer at 700 (~6K
14
+ * chars), so this only bites when a model ignores its length limit.
15
+ */
16
+ export declare const MAX_OUTPUT_CHARS = 20000;
13
17
  export declare const NO_CLIS_TEXT: string;
14
18
  export interface ToolText {
15
19
  [key: string]: unknown;
@@ -7,8 +7,12 @@
7
7
  * because the raw output is free markdown and cannot be relied on for
8
8
  * delimiters.
9
9
  */
10
- /** Per-model output cap so one runaway reviewer cannot crowd out the others. */
11
- export const MAX_OUTPUT_CHARS = 60_000;
10
+ /**
11
+ * Per-model output cap so one runaway reviewer cannot crowd out the others.
12
+ * The prompts cap a review at 900 words and a consult answer at 700 (~6K
13
+ * chars), so this only bites when a model ignores its length limit.
14
+ */
15
+ export const MAX_OUTPUT_CHARS = 20_000;
12
16
  const ERROR_EMOJI = {
13
17
  cli_not_found: '❌',
14
18
  timeout: '⏱️',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simonren/quorum",
3
- "version": "0.12.1",
3
+ "version": "0.13.0",
4
4
  "description": "MCP server for Claude Code — a quorum of AI models (Codex, Gemini, Claude Fable with fresh context) for standard + adversarial review and consultation, synthesized by Claude Code",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",