Skip to content

Add three focused second opinions: requirements, plan and decision - #36

Merged
razbenaharon merged 2 commits into
mainfrom
feature/focused-reviews
Nov 24, 2026
Merged

razbenaharon merged 2 commits into
mainfrom
feature/focused-reviews

Conversation

@razbenaharon

Copy link
Copy Markdown
Owner

Summary

Three commands ask Codex one defined engineering question about files the user chooses, through the same package, approval and Codex run as /modelquad:review:

  • /modelquad:check-requirements (focus requirements, task kind review): per requirement, met on the evidence, a gap, or not shown by the tests.
  • /modelquad:plan-review (plan, architecture): contradictions with a requirement, assumptions to verify, what to decide before coding.
  • /modelquad:challenge-decision (decision, architecture): when an RFC/ADR decision holds, what could reverse it, the check that would settle it.

How it works:

  • review_package and delegate take a closed focus. ModelQuad puts that focus's fixed instruction (src/modelquad/focus.py) in front of Claude's task text, so the package id covers it. A changed text, file or focus after the preview sends nothing.
  • With a focus, the preview returns the whole task text after the credential screen, exactly as Codex receives it. The text is never stored in the ledger.
  • A general review's package id is computed as before.
  • The preview names files that the task text or a sent document mentions but that were not sent (mentioned_files). It reads only the texts the packer already checked, follows no link, and applies the read rules and the secret-name check. Nothing is added to the package.
  • A .modelquad.toml that removes a task kind removes its focused reviews.
  • modelquad review package --focus shows the same preview in a terminal.

No issue to close.

Reviewer notes:

  • An independent Codex review of the diff found six claims. Fixed here:
    • the preview showed the task text before redaction;
    • the mention hint re-opened files without the packer's link checks;
    • the instruction allowed a heading in the FINDING location field.
  • Two other points it raised also exist in general reviews, so they are not changed here: a named folder's name can appear in the omission list sent to Codex, and a newly excluded file sends less than was approved, which is deliberate.
  • Pilot: 9 cases (gap / sound / missing material per task). Same files, model gpt-6.2-sol and medium effort for the focused and the general prompt, graded blind. With the shipped instruction:
    • seeded gaps found: 6/6 focused, 6/6 general;
    • false positives: 3 focused, 7 general;
    • missing material explained: 3/3 focused, 2/3 general.
    • One run per case, so variance is not measured.
    • An earlier instruction that forbade general technical knowledge missed the SQLite-over-SMB case that the general review caught; the shipped text allows such knowledge, marked as such.

Tests run

  • python scripts/check.py fast
  • python scripts/check.py python (3322 passed)
  • New or changed behaviour has tests (tests/test_focused_reviews.py, 38 tests)

Real smoke run of all three commands through Claude Code in print mode, with the working-tree plugin and an isolated state folder: each called review_package with the right focus and kind, then delegate with the approved package id, and Codex answered. Without a grant, print mode refused the call ("requires permission"), as intended; the smoke used a standing grant for the test folder only. Claude Code's interactive approval dialog was not exercised.

Windows version: Windows 11 Pro 10.0.26300

AI assistance

Claude Code (Claude Opus 5.5) wrote the code, tests and docs, and ran the smoke test and pilot. Codex reviewed the diff read-only, and a Claude Sonnet agent graded the pilot answers blind.

Checklist

  • Every commit of mine is signed off (git commit -s), as described in CONTRIBUTING.md (DCO 1.1). The maintainer's own commits need none.
  • The change does not weaken the safety invariants in AGENTS.md.
  • A new host or provider was agreed in an issue first, or this change adds none.
  • Documentation is updated, and describes only what the code does today.

🤖 Generated with Claude Code

razbenaharon and others added 2 commits November 23, 2026 23:35
/modelquad:check-requirements, /modelquad:plan-review and
/modelquad:challenge-decision ask Codex one defined question about the
files the user chooses. review_package and delegate take a closed `focus`
(requirements -> review, plan and decision -> architecture); ModelQuad puts
the focus's fixed instruction (focus.py) in front of the task text, so the
package id covers it, and the preview returns the whole task text after
the credential screen. A general review's package id is unchanged.

The preview names files the task text or a sent document mentions that
were not sent, read only from the texts the packer already checked and
reached through no link; nothing is added. A repository that removes a
task kind removes its focused reviews.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed file

Codex's payload names the entries the package left out, such as a named
folder, but the package id covered only the files sent: naming a folder
beside the files changed what Codex read under the same id. When the
names go beyond the files sent, the id now covers them; a package whose
names are all sent keeps its id.

A file a read rule began to exclude between the preview and the launch
was dropped and the review ran on less than was approved. The launch now
sends exactly the approved files or nothing.

Both were found by the read-only Codex review of the focused reviews.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@razbenaharon
razbenaharon merged commit 0e681a0 into main Nov 24, 2026
7 checks passed
@razbenaharon
razbenaharon deleted the feature/focused-reviews branch November 24, 2026 09:18
@razbenaharon razbenaharon mentioned this pull request Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant