# Finding

One finding with its evidence attached (Candor's NarrativeBlock): severity as icon and word (never colour alone), what was found, the evidence it rests on, and what to do next when there's a clear step.

- Registry name: `finding` (`@candor/finding`)
- Tier: Pro. Installing it needs a Pro, Premium or Team licence key: the person runs `npx candor-ui key <key>` themselves; never ask for the key in chat or write it to a file.
- Docs: https://candor.themethodic.com/docs/finding

## Install

```bash
npx candor-ui add finding
```

Run `npx candor-ui@latest init` once first (https://candor.themethodic.com/get-started.md). Without the CLI: `npx shadcn@latest add @candor/finding`.
It brings in: data, locale, utils.
npm packages: lucide-react@^1.67.0.

## Example

```tsx
"use client"

import { Finding } from "@/components/finding"
import type { Finding as FindingData } from "@/lib/data"

const findings: FindingData[] = [
  {
    id: "f1",
    severity: "critical",
    title: "Billing tests fail on the new discount rules",
    body: "Three tests in billing.test.ts fail when an invoice mixes annual and monthly discounts. This release changes that path.",
    evidence: [{ label: "billing.test.ts", detail: "3 failures" }, { label: "CI run", detail: "Nov 3, 09:12" }],
    action: "Hold the billing change until the fix passes; the rest can ship.",
  },
  {
    id: "f2",
    severity: "info",
    title: "The dark-mode flag is at 100% everywhere",
    body: "It has been fully on in Production and Staging for 41 days.",
    evidence: [{ label: "dark-mode", detail: "100% since Sep 25" }],
  },
]

export default function Example() {
  return (
    <div className="flex max-w-2xl flex-col gap-3">
      {findings.map((f) => (
        <Finding key={f.id} finding={f} />
      ))}
    </div>
  )
}
```

## <Finding>

Props:

- `finding: FindingData`: The finding: severity, title, what was found, its evidence and the next step if there is one.
- `headingLevel?: 2 | 3 | 4 | 5 | undefined` (default `3`): The title's heading level. Defaults to 3, under a ReportSection's h2.
- `className?: string | undefined`

## Strings (`finding`)

The fixed words, English by default. Override any of them under `finding` in `<LocaleProvider strings={{ finding: { … } }}>`; the table is exported as `findingStrings`.

- `critical`: Critical
- `serious`: Serious
- `warning`: Warning
- `info`: Note
- `evidence`: Evidence
- `next`: Next:

## Rules for using Candor UI

- Components take plain typed data. Never pass model output as HTML or render it as a link; messages are typed blocks.
- A control that can't be used says why: wrap it in `<Locked reason="…">`, don't just disable it.
- Don't show a value you don't have: leave it out (it renders as —) rather than guess. An estimate is labelled as one.
- Nothing is pre-selected in a decision a person makes, and the agent is named from your app's data, never from model output.
- Your app's words go in `LocaleProvider` (fixed strings) and `TermsProvider` (nouns); entity kinds and agent roles in `EntityKindsProvider` and `AgentRolesProvider`.
