# Evidence & Numeric Integrity Gate

> **Purpose**: Runtime constraints for Stages 3-6. The goal is not prettier writing; it is preventing key facts, numbers, charts, and recommendations from being upgraded when the evidence chain is not strong enough.

## Scope

These items must be covered by integrity checks:

- Headline numbers in the executive summary
- Chart data
- Key evidence supporting strategic recommendations
- Key entity facts in due diligence, M&A, target screening, and corporate background checks
- B/C/D-grade evidence used for strong judgments

## Source Types

| source_type | Definition | Can Support Key Facts? |
|-------------|------------|------------------------|
| `primary` | Raw record or first-hand material | Yes |
| `official` | Government, regulator, or official registry | Yes |
| `company_disclosure` | Company announcement, annual report, prospectus, filing | Yes |
| `expert` | Interview notes or expert view | Can support judgment, not objective facts alone |
| `media` | News, industry article, self-media | Lead only; trace original source |
| `aggregator` | Company-info platform, report aggregator, web summary | Lead only; key facts need primary source |

## Evidence Claim Ledger Fields

Key evidence must be registered in `evidence_base.md`:

```text
claim_id: E-001
claim_type: numeric | entity | relationship | filing | litigation | license | recommendation_support
claim_text: [evidence claim]
value: [if applicable]
unit: [if applicable]
currency: [if applicable]
period: [numeric claim period]
source_id: [source identifier]
source_type: primary | official | company_disclosure | expert | media | aggregator
source_grade: A | B | C | D
source_date: YYYY-MM-DD
retrieved_at: YYYY-MM-DD
origin_id: [original source behind secondary source; leave blank and downgrade if unknown]
primary_source_required: true | false
primary_source_present: true | false
used_in: headline | chart | insight | appendix
```

## Blocking Rules

These must FAIL:

- In due diligence / M&A / target screening, key facts such as entity status, ownership / parent relationships, officers, regulatory filings, licenses, major litigation, and filings lack primary sources.
- Headline numbers or key chart data lack `claim_id` / `evidence_id` / `source_id` back-links.
- Report-level `claim_id` / `evidence_id` / `source_id` references cannot be found in the `Evidence Claim Ledger`.
- Strong recommendations, clear enter/acquire calls, or other high-certainty judgments are supported only by C/D-grade sources.
- Multiple secondary sources repeat the same original source but are counted as independent cross-validation.

## Report Back-Link Requirements

Core numbers and charts in `report.html` must use machine-readable back-links, not only human-readable footnotes such as "Source: report name".

Recommended pattern:

```html
<div class="headline" data-claim-id="E-001">Market size reached RMB 100B</div>
<div
  id="chart-market-size"
  data-claim-id="E-001"
  data-value="100"
  data-unit="billion"
  data-currency="RMB"
  data-period="2025"
></div>
```

When ECharts are generated by scripts, keep `claimIds: ["E-001", "E-002"]` or an equivalent `data-claim-id` / `data-source-id` marker near the chart. Every ID must resolve to a `claim_id` or `source_id` in the `Evidence Claim Ledger`.

When a chart references a numeric claim, prefer adding `data-value` / `data-unit` / `data-currency` / `data-period` to the chart container. Stage 6 compares those machine-readable fields against the `Evidence Claim Ledger`; if `data-value` is absent, it at least checks whether the claim `value` appears in the corresponding ECharts `data` array.

## Warning Rules

These must WARN:

- Core numbers lack `retrieved_at`.
- Numbers lack `unit`, `period`, or contain a currency but lack `currency`.
- A/B-grade aggregator sources lack `origin_id`, making independence unverifiable.
- Core numbers in fast-moving markets do not explain freshness.

## Downgrade Principle

When the evidence chain is not strong enough, do not use high-certainty language.

| Evidence State | Allowed Tone |
|----------------|--------------|
| A/B with sufficient primary sources | Clear recommendation allowed |
| B/C with insufficient primary sources | Conditional recommendation only |
| C/D or untraced source | Treat as hypothesis / risk item only |
