8000 The Judge's default pair · Issue #37 · kiran-brahma/writing-tool · GitHub
[go: up one dir, main page]

Skip to content

The Judge's default pair #37

Closed
Closed

Description

@kiran-brahma

Parent

#34 — the Obelus v1.2 spec (docs/specs/obelus-v1.2.md). Covers stories 171–172.

What to build

JudgePanel currently defaults to revisions[1] against revisions[0]. revisionsOf returns
newest-first, so that is the two most recent auto-revisions — usually a few words apart and not
worth a Judge call.

Default instead to the last flagged Revision against now. With no flagged Revision, default to the
oldest Revision against now, so the default is still a real comparison rather than no comparison.

Extract the choice as a pure function rather than leaving it in useState initialisers, and keep the
existing behaviour that a Verdict is only shown while the passages on screen are the ones it judged.

Where

  • src/core/judgeSelection.ts — defaultJudgePair(revisions), pure.
  • src/editor/JudgePanel.tsx — use it for the initial pair, including the effect at lines 76–79 that
    settles the choice once Revisions have loaded.

Acceptance criteria

  • The default pair is the last flagged Revision against now. (story 171)
  • With no flagged Revision, the default pair is the oldest Revision against now. (story 172)
  • With fewer than two Revisions, the panel behaves as it does today — no pair, no crash.
  • The Writer can still choose any two Revisions; the default is a starting point, not a
    restriction.
  • A stale Verdict is still never shown against a pair it did not judge.

Verification

Pure tests on defaultJudgePair: a flagged Revision present; none present; one Revision; none. Same
input, same output.

No DOM layer.

Constitution

Unchanged. The Judge still receives two passages and nothing else — no document, no history, no
authorship, no findings — and still runs twice with the labels swapped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentSpec is ready for an agent to implement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0