@simonren/quorum 0.14.0 → 0.15.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.
@@ -63,7 +63,7 @@ Call `multi_review` with:
63
63
  - `outputType`: `implementation` for code you changed; `plan` for a plan not yet executed; `findings` for an investigation or audit result; `analysis`; `proposal` for a design.
64
64
  - `analyzedFiles`: the files you created or modified, relative to `workingDir`.
65
65
  - `baseRef`: only when the work is already committed (a branch or PR checked out with a clean tree): the ref to diff against, e.g. `main` or the merge-base SHA. Omit for uncommitted work.
66
- - `focusAreas`: only if the user named one, and only values from `security`, `performance`, `architecture`, `correctness`, `maintainability`, `scalability`, `testing`, `documentation`. Omit otherwise.
66
+ - `focusAreas`: only if the user named one, and only values from `security`, `performance`, `architecture`, `correctness`, `maintainability`, `scalability`, `testing`, `documentation`. Omit otherwise. By default reviewers read the source change in full and only skim its tests (coverage gaps, tests that pass for the wrong reason); pass `testing` when the user wants the tests themselves reviewed in depth.
67
67
  - `customPrompt`: the steering text from `$ARGUMENTS` minus reserved tokens. Omit if empty.
68
68
  - `serviceTier` / `reasoningEffort`: only from bracketed reserved tokens.
69
69
 
package/dist/handoff.js CHANGED
@@ -175,7 +175,7 @@ For each: what specifically should be documented and where.`,
175
175
  // PROMPT SECTIONS SHARED BY BOTH PASSES
176
176
  // =============================================================================
177
177
  const TASK_BY_OUTPUT_TYPE = {
178
- implementation: 'Code changes the requesting agent made in the working directory. Locate the change (git diff if the directory is a repository, otherwise PRIORITY FILES), read it in full, then judge it against the acceptance bar.',
178
+ implementation: 'Code changes the requesting agent made in the working directory. Locate the change (git diff if the directory is a repository, otherwise PRIORITY FILES), read it at the depth TEST FILES sets below, then judge it against the acceptance bar.',
179
179
  plan: 'A plan the requesting agent wrote before implementing. Nothing has changed on disk yet. Judge whether the plan is complete, correct against the code as it exists today, and safe to execute; point at existing code that contradicts it.',
180
180
  findings: 'Findings the requesting agent produced from analysis (an audit, a bug investigation, a root-cause claim). Verify each finding against the code: confirm it, refute it, or add what it missed.',
181
181
  analysis: 'An analysis the requesting agent wrote up. Check its reasoning and evidence against the code and flag conclusions the code does not support.',
@@ -215,6 +215,36 @@ function renderGroundRules() {
215
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".
216
216
  - Do not restate the brief, do not praise, no preamble. Your reader is the requesting agent, which will verify every claim against the code and synthesize a verdict across several reviewers.`;
217
217
  }
218
+ /**
219
+ * How deep to read the tests that ship with a change. A small logic change
220
+ * often carries ten times its size in tests; read line by line by every
221
+ * reviewer in both passes, they dominate the run. Tests are deprioritized,
222
+ * never excluded from the standard pass: a test that asserts nothing is what
223
+ * makes a broken change look green. Only an implementation has a diff to read.
224
+ */
225
+ function renderTestScope(handoff, mode) {
226
+ if ((handoff.outputType ?? 'implementation') !== 'implementation')
227
+ return null;
228
+ const heading = '## TEST FILES';
229
+ if (handoff.focusAreas?.includes('testing')) {
230
+ return `${heading}
231
+
232
+ Testing is a requested focus: read the changed test files in full, alongside the source.`;
233
+ }
234
+ const split = 'List the changed files before reading any (`git diff --stat`, or PRIORITY FILES) and split them into source and tests — test and spec files, fixtures, snapshots, mocks.';
235
+ const source = '- Read the source change in full. That is where the tool budget goes.';
236
+ const testOnly = '- If the change touches no source file, the tests are the change: read them in full.';
237
+ const tests = mode === 'adversarial'
238
+ ? '- Skip the test files. The standard reviewer running in parallel checks coverage. Open one only to confirm or refute a finding about the source.'
239
+ : `- Do not read test files line by line. Skim the test names and the assertions that exercise the changed source paths, and answer two questions only: is a changed logic path untested, and does a test pass for the wrong reason (asserts nothing, asserts the mock, logic mocked away)?
240
+ - Report nothing else about test code: no style, structure, naming, or duplication findings.`;
241
+ return `${heading}
242
+
243
+ ${split}
244
+ ${source}
245
+ ${tests}
246
+ ${testOnly}`;
247
+ }
218
248
  function renderUncertainties(handoff) {
219
249
  if (!handoff.uncertainties || handoff.uncertainties.length === 0)
220
250
  return null;
@@ -349,6 +379,7 @@ export function buildHandoffPrompt(options) {
349
379
  checklist,
350
380
  renderTask(handoff),
351
381
  renderGroundRules(),
382
+ renderTestScope(handoff, 'standard'),
352
383
  renderUncertainties(handoff),
353
384
  renderQuestions(handoff),
354
385
  renderDecisions(handoff, 'standard'),
@@ -435,6 +466,7 @@ Before finalizing, check that each finding is:
435
466
  stance,
436
467
  renderTask(handoff),
437
468
  renderGroundRules(),
469
+ renderTestScope(handoff, 'adversarial'),
438
470
  renderUncertainties(handoff),
439
471
  renderQuestions(handoff),
440
472
  renderDecisions(handoff, 'adversarial'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simonren/quorum",
3
- "version": "0.14.0",
3
+ "version": "0.15.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",