|
| 1 | +# Quorum Correctness Critic — Portable Definition |
| 2 | +# Source: reference-implementation/quorum/critics/correctness.py |
| 3 | +# Version: 1.0.0 |
| 4 | +# Consumers: CLI (Python class), Claude Code (SKILL.md), Copilot (task agent) |
| 5 | + |
| 6 | +name: correctness |
| 7 | +description: > |
| 8 | + Evaluates artifacts for factual accuracy, logical consistency, and internal |
| 9 | + contradictions. Catches claims that conflict with each other, unsupported |
| 10 | + reasoning leaps, and reference inaccuracies. |
| 11 | +
|
| 12 | +model_tier: 2 # Sonnet-class for standard depth; Opus for thorough |
| 13 | + |
| 14 | +# ─── SYSTEM PROMPT ─────────────────────────────────────────────────────────── |
| 15 | +# The critic's identity and operating constraints. Injected as the system |
| 16 | +# message (or equivalent preamble) before the evaluation prompt. |
| 17 | + |
| 18 | +system_prompt: | |
| 19 | + You are the Correctness Critic for Quorum, a rigorous quality validation system. |
| 20 | +
|
| 21 | + Your role: Evaluate artifacts for factual accuracy, logical consistency, and |
| 22 | + internal contradictions. |
| 23 | +
|
| 24 | + Focus areas: |
| 25 | + 1. Internal contradictions — statements in one section incompatible with another |
| 26 | + 2. Logical consistency — conclusions follow from premises; no non-sequiturs |
| 27 | + 3. Factual claims — stated facts are plausible and internally coherent |
| 28 | + 4. Reference accuracy — citations, names, and figures are internally consistent |
| 29 | + 5. Terminology consistency — same concept not described by conflicting terms |
| 30 | +
|
| 31 | + EVIDENCE RULES: |
| 32 | + - EVERY finding must include a direct quote or specific excerpt from the artifact |
| 33 | + - If you cannot quote the artifact to support a finding, do not report it |
| 34 | + - Vague claims like "this section is unclear" without evidence will be rejected |
| 35 | + - Do not invent quotes — only cite text that appears verbatim in the artifact |
| 36 | +
|
| 37 | + SEVERITY GUIDE: |
| 38 | + - CRITICAL: Fatal factual error or logical contradiction that invalidates core claims |
| 39 | + - HIGH: Significant inconsistency or unsupported claim affecting key conclusions |
| 40 | + - MEDIUM: Notable inconsistency or questionable reasoning in non-critical sections |
| 41 | + - LOW: Minor terminology drift or cosmetic inconsistency |
| 42 | + - INFO: Observations worth noting but not blocking |
| 43 | +
|
| 44 | +# ─── EVALUATION CATEGORIES ─────────────────────────────────────────────────── |
| 45 | +# Structured breakdown of what this critic evaluates. Ports use these to |
| 46 | +# construct evaluation prompts appropriate to their platform. |
| 47 | + |
| 48 | +categories: |
| 49 | + - id: COR-01 |
| 50 | + name: Internal Contradictions |
| 51 | + description: > |
| 52 | + Statements in one section that are incompatible with statements in another. |
| 53 | + Includes numerical inconsistencies, conflicting claims about the same entity, |
| 54 | + and self-contradicting logic. |
| 55 | + examples: |
| 56 | + - "Section 2 states the timeout is 30 seconds; Section 5 configures it as 60" |
| 57 | + - "Abstract claims 99% accuracy; Results section reports 94%" |
| 58 | + |
| 59 | + - id: COR-02 |
| 60 | + name: Logical Consistency |
| 61 | + description: > |
| 62 | + Conclusions must follow from premises. Flag non-sequiturs, unsupported leaps, |
| 63 | + circular reasoning, and arguments where the conclusion doesn't follow from |
| 64 | + the evidence presented. |
| 65 | + examples: |
| 66 | + - "Claims system is production-ready based solely on unit test pass rate" |
| 67 | + - "Concludes X is impossible but earlier demonstrates X working" |
| 68 | + |
| 69 | + - id: COR-03 |
| 70 | + name: Factual Claims |
| 71 | + description: > |
| 72 | + Stated facts that are internally incoherent or implausible given the artifact's |
| 73 | + own context. This critic does NOT verify external facts — it checks whether |
| 74 | + claims are consistent with each other and with the artifact's own evidence. |
| 75 | + examples: |
| 76 | + - "Claims to support 10 file types but only lists 7 in the implementation" |
| 77 | + - "States 'all tests pass' but test output shows 3 failures" |
| 78 | + |
| 79 | + - id: COR-04 |
| 80 | + name: Reference Accuracy |
| 81 | + description: > |
| 82 | + Citations, cross-references, figure numbers, section references, and quoted |
| 83 | + values must be internally consistent. Includes: references to nonexistent |
| 84 | + sections, incorrect figure numbers, misquoted values from other parts of |
| 85 | + the artifact. |
| 86 | + examples: |
| 87 | + - "References 'Section 4.3' which does not exist" |
| 88 | + - "Cites 'Table 2' but the table shows different data than described" |
| 89 | + |
| 90 | + - id: COR-05 |
| 91 | + name: Terminology Consistency |
| 92 | + description: > |
| 93 | + The same concept should be described with consistent terminology throughout. |
| 94 | + Flag cases where different terms are used interchangeably without explicit |
| 95 | + acknowledgment, creating ambiguity about whether they refer to the same thing. |
| 96 | + examples: |
| 97 | + - "Uses 'finding', 'issue', and 'defect' interchangeably without definition" |
| 98 | + - "Section 1 calls it 'evidence grounding'; Section 4 calls it 'citation verification'" |
| 99 | + |
| 100 | +# ─── PROMPT TEMPLATE ───────────────────────────────────────────────────────── |
| 101 | +# The evaluation prompt injected as the user message. Variables are denoted |
| 102 | +# with {VARIABLE_NAME} and must be resolved by the port's orchestrator. |
| 103 | +# |
| 104 | +# Required variables: |
| 105 | +# {ARTIFACT_TEXT} — full text of the artifact under review |
| 106 | +# {RUBRIC_NAME} — human-readable rubric name |
| 107 | +# {RUBRIC_VERSION} — rubric semver |
| 108 | +# {RUBRIC_DOMAIN} — rubric domain tag |
| 109 | +# {CRITERIA_TEXT} — formatted rubric criteria (port-specific formatting) |
| 110 | +# {EXTRA_CONTEXT} — optional additional context (known issues, pre-screen results) |
| 111 | + |
| 112 | +prompt_template: | |
| 113 | + ## Artifact Under Review |
| 114 | +
|
| 115 | + ``` |
| 116 | + {ARTIFACT_TEXT} |
| 117 | + ``` |
| 118 | +
|
| 119 | + ## Rubric: {RUBRIC_NAME} (v{RUBRIC_VERSION}) |
| 120 | +
|
| 121 | + Domain: {RUBRIC_DOMAIN} |
| 122 | +
|
| 123 | + ### Criteria to Evaluate |
| 124 | + {CRITERIA_TEXT} |
| 125 | +
|
| 126 | + {EXTRA_CONTEXT} |
| 127 | +
|
| 128 | + ## Your Task |
| 129 | +
|
| 130 | + Review the artifact for correctness issues across these categories: |
| 131 | + - COR-01: Internal contradictions |
| 132 | + - COR-02: Logical consistency |
| 133 | + - COR-03: Factual claims (internal coherence) |
| 134 | + - COR-04: Reference accuracy |
| 135 | + - COR-05: Terminology consistency |
| 136 | +
|
| 137 | + For each finding: |
| 138 | + 1. Quote the specific text from the artifact that is problematic |
| 139 | + 2. Explain the correctness violation clearly |
| 140 | + 3. Identify which rubric criterion it violates (if any) |
| 141 | + 4. Assign severity: CRITICAL / HIGH / MEDIUM / LOW / INFO |
| 142 | +
|
| 143 | + If the artifact is entirely correct, return an empty findings list. |
| 144 | + Only report findings you can back up with direct quotes from the artifact. |
| 145 | +
|
| 146 | +# ─── RUBRIC KEYWORD FILTER ─────────────────────────────────────────────────── |
| 147 | +# When a rubric has more criteria than this critic needs, filter by these |
| 148 | +# keywords (matched against criterion text, case-insensitive). If no criteria |
| 149 | +# match, fall back to evaluating all criteria. |
| 150 | + |
| 151 | +rubric_keywords: |
| 152 | + - accurate |
| 153 | + - correct |
| 154 | + - consistent |
| 155 | + - factual |
| 156 | + - logical |
| 157 | + - contradict |
| 158 | + - valid |
| 159 | + - truth |
| 160 | + - claim |
| 161 | + - support |
| 162 | + |
| 163 | +# ─── OUTPUT SCHEMA ─────────────────────────────────────────────────────────── |
| 164 | +# The structured output format critics must return. All ports enforce this. |
| 165 | + |
| 166 | +output_schema: |
| 167 | + type: object |
| 168 | + required: [findings] |
| 169 | + properties: |
| 170 | + findings: |
| 171 | + type: array |
| 172 | + items: |
| 173 | + type: object |
| 174 | + required: [severity, description, evidence_tool, evidence_result] |
| 175 | + properties: |
| 176 | + severity: |
| 177 | + type: string |
| 178 | + enum: [CRITICAL, HIGH, MEDIUM, LOW, INFO] |
| 179 | + description: |
| 180 | + type: string |
| 181 | + evidence_tool: |
| 182 | + type: string |
| 183 | + description: "How verified: grep, schema, read, analysis" |
| 184 | + evidence_result: |
| 185 | + type: string |
| 186 | + description: "Actual excerpt or output proving this finding" |
| 187 | + location: |
| 188 | + type: string |
| 189 | + description: "Where in the artifact (section, line, key path)" |
| 190 | + rubric_criterion: |
| 191 | + type: string |
| 192 | + description: "Rubric criterion ID this finding addresses" |
0 commit comments