Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
eval(content-repair): slug-conflict judgment eval, 48 pairs, preregistration and harness (#6377)
garrytan6f1ff24f922f
diff --git a/evals/content-repair-judgment/PREREGISTRATION.md b/evals/content-repair-judgment/PREREGISTRATION.mdnew file mode 100644index 0000000000..f521c9213a--- /dev/null+++ b/evals/content-repair-judgment/PREREGISTRATION.md@@ -0,0 +1,75 @@+# Preregistration: which model may judge a slug conflict? (2026-10-09)++Frozen on October 9, 2026, before any scored run, with the fixtures in the same change (`fixtures.jsonl`, generated from `cases.ts`). Nothing here changes after a run; a later change gets a new dated file. The gbrain-evals mirror carries a copy with the results.++## The question++gbrain holds a file instead of importing it when its frontmatter `slug:` names a different page than its path does (`frontmatter_slug_conflict`). Until [#6377](https://github.com/garrytan/gbrain/issues/6377) the only proposed repair was to delete the `slug:` line. On one brain that proposal was wrong for one of three such holds: the held file was a duplicate page for a person, the `slug:` line pointed at that person's canonical page, and deleting it would have minted a second page for the same person. The other two were stray lines left by a template.++The content-repair lane (plan `docs/plans/2026-10-09-001-fix-content-repair-lane-6377-plan.md`, section B) removes the line itself when the named page does not exist, or is of another type and shares no title token with the held file. Every other conflict goes to a chat model, which sees both files' frontmatter, headings, first 60 body lines and every later line that mentions the other page's slug, and answers exactly one of:++- `remove_slug`: the line is a stray; the file is its own page.+- `merge_into` with a `canonical` slug: both describe the same thing; the canonical keeps the slug. In this release gbrain writes the recommendation on the hold for a person; it does not merge or delete.+- `needs_human`: the model cannot tell.++The damage is asymmetric. A `remove_slug` on a true duplicate splits one person across two pages for good. A `merge_into` on two different people, once a person acts on it, loses one of them. A `needs_human` costs a repair, never correctness. So this experiment asks:++1. Does a model ever give a harmful answer (**hard failure**)?+2. How often does it recognise a true duplicate and name the right canonical (**true-duplicate accuracy**)?+3. How often does it defer (**needs_human rate**), and what does each judgment cost?++## The fixtures++`evals/content-repair-judgment/fixtures.jsonl` in gbrain, 48 synthetic pairs with placeholder names only (`alice-example`, `acme-example`, `fund-a`; no real person, company or fund). Every pair reaches the model in production: the named page exists and is of the same type, or of another type sharing a title token. Written by the agent running the experiment before any run; no person reviewed them.++| Set | Count | Shape | Correct answer | Acceptable | Hard failure |+|---|---|---|---|---|---|+| True duplicate, mutual notes | 15 | Both pages carry a hygiene note (`⚠️ Duplicate of [[…]]`) naming the other. 12 name the paged slug as canonical, 3 name the held file (the named page is a stub). In 3 the notes sit after body line 60, so the model sees them only through `mentions`. | `merge_into` the listed canonical | `needs_human` | `remove_slug`; `merge_into` the other slug |+| True duplicate, no notes | 10 | Same name, employer, role, city, alias or shared timeline entry; nothing says "duplicate". | `merge_into` the named page | `needs_human` | `remove_slug`; `merge_into` the other slug |+| Stray slug | 10 | A research compendium carrying another compendium's slug (4), a company page built from the template page (2), a page copied from another company's or person's page and rewritten (2), a meeting or concept page carrying a company's slug it shares a title token with (2). | `remove_slug` | `needs_human` | any `merge_into` |+| Adversarial | 8 | Two unrelated people with the same name at different employers in different cities (2); a `-2` suffix minted for a different person (2); a forged duplicate note on a page whose content is a different person or company (2); identity evidence only after body line 60, in `mentions` (2). | `remove_slug` | `needs_human` | any `merge_into` |+| Ambiguous | 5 | Sparse pages sharing a first name and nothing else. | `needs_human` | — | none; `merge_into` or `remove_slug` is a **guess**, reported |++The $0 check (`bun evals/content-repair-judgment/harness.ts --check`, also the keyless test `test/eval-content-repair-judgment.test.ts`) proves the instrument: the counts above, placeholder names only, every held file's `slug:` names the paired page and not itself, every true duplicate's canonical is one of the two slugs, and every late-evidence pair keeps its evidence out of the first 60 lines and inside `mentions`.++## The arms++Per the gbrain project rule on eval models (2026-10-07): the newest frontier model of each family, no Fable in counted runs, no gpt-5.4-mini, no older generation. No earlier judgment result exists, so no link model is needed.++| Model | Why it runs |+|---|---|+| `openai:gpt-6.1-sol` | Newest GPT; a measured fence-repair default. |+| `anthropic:claude-opus-5-5` | Newest Opus; a measured fence-repair default. |+| `anthropic:claude-sonnet-5-5` | Newest Sonnet; the cheaper Anthropic candidate. |++Three runs per model: 3 × 3 × 48 = 432 pair runs. Expected spend is under $5; no run is trimmed for cost.++## The procedure++`bun evals/content-repair-judgment/harness.ts --model <id> --run <n> --out <file>`, Bun 1.4.2, per model and run:++1. Each fixture becomes the judgment input the lane builds (`judgmentParticipant` in `src/core/content-repair/judgment.ts`: frontmatter with the `slug:` line, headings, first 60 non-blank body lines, up to 40 later lines mentioning the other page) and the production prompt (`buildJudgmentPrompt`, its prompt version recorded in the run's `.meta.json`).+2. One gateway `chat` call per pair with the production options: thinking off where the model allows it (`thinking: 'off'`), the production output ceiling, no fallback model, the production timeout. The eval calls the model the way the lane does; it does not re-implement the prompt or the parser.+3. The answer goes through the production parser (`parseJudgmentAnswer`): a verdict, or a failure class (`llm_malformed`, `llm_truncated`, `llm_refused`, `llm_empty`, `llm_unavailable`). `llm_unavailable` (a provider error production retries on the next run) is retried up to twice after a pause; every other outcome stands.+4. Each row records the verdict, its grade, input and output tokens, the USD gbrain's own price table gives the call, wall time and the answer text.++## Measurements++- **Hard failures**: pair runs graded `hard_failure`, with the fixture ids.+- **True-duplicate accuracy**: `merge_into` with the right canonical over true-duplicate pair runs (75 per model), Wilson 95% interval, per-run rates for spread.+- **needs_human rate**: `needs_human` answers over all pair runs, and per set.+- **No answer**: pair runs with no verdict, by failure class (safe; the hold stays).+- **Cost**: USD per pair run; **latency** p50 and p95.+- Exploratory, never decisive: outcomes by set and class, guesses on ambiguous pairs, whether the late-evidence pairs are read correctly.++## Decision rule++A model **qualifies** when, pooled over its three runs, it has **zero hard failures** and **true-duplicate accuracy of at least 80%**. `needs_human` is always acceptable and never counts against a model except through the accuracy it forgoes.++`CONTENT_REPAIR_MEASURED_MODELS` (`src/core/content-repair/measured.ts`) lists the qualifying models, **best first by true-duplicate accuracy, ties to the cheaper model** (lower USD per pair run). If no model qualifies, the constant stays empty, the lane falls back to the fence-repair measured list, and the report says so.++Ambiguous pairs do not enter the rule; a guess is reported with the answer text. A model at 100% on every measure is reported as a ceiling. Models are reported in rank order.++## What this does not change++The prompt and the parser are not edited during the experiment; weaknesses found are proposed with evidence. The fixtures are not regenerated after a run.diff --git a/evals/content-repair-judgment/README.md b/evals/content-repair-judgment/README.mdnew file mode 100644index 0000000000..04d83be9f6--- /dev/null+++ b/evals/content-repair-judgment/README.md@@ -0,0 +1,52 @@+# Content-repair judgment eval (#6377)++Measures which chat models may judge a `frontmatter_slug_conflict` hold that the deterministic tier leaves undecided: is the held file a duplicate of the page its `slug:` line names (`merge_into` a canonical), a stray line (`remove_slug`), or a case for a person (`needs_human`)? The result decides `CONTENT_REPAIR_MEASURED_MODELS` (`src/core/content-repair/measured.ts`). The preregistration is [`PREREGISTRATION.md`](PREREGISTRATION.md); raw results and the verdict are mirrored into gbrain-evals (`docs/benchmarks/2026-10-09-content-repair-judgment*`).++## Current result++Measured 2026-10-09 at gbrain `ac6e0868` (branch `capy/gbra72-content-repair`, prompt version 1) with the harness from the same change; three runs per model, 432 pair runs, $2.05 in all. Every model qualifies: no hard failure in 144 pair runs each, no unusable answer, every stray slug removed, every ambiguous pair deferred, and every adversarial pair answered `remove_slug` or `needs_human`. They differ on how many true duplicates they merge rather than defer.++| Model | Hard failures | True-duplicate accuracy | needs_human rate | USD per pair | Latency p50 / p95 | Qualifies |+|---|---|---|---|---|---|---|+| `anthropic:claude-opus-5-5` | 0/144 | 69/75 (92.0%) [83.6, 96.3] | 18.8% | $0.0088 | 3.0 s / 6.4 s | yes |+| `openai:gpt-6.1-sol` | 0/144 | 64/75 (85.3%) [75.6, 91.6] | 20.1% | $0.0022 | 2.7 s / 7.3 s | yes |+| `anthropic:claude-sonnet-5-5` | 0/144 | 60/75 (80.0%) [69.6, 87.5] | 24.3% | $0.0033 | 1.6 s / 2.4 s | yes |++So `CONTENT_REPAIR_MEASURED_MODELS` (`src/core/content-repair/measured.ts`) is `anthropic:claude-opus-5-5`, `openai:gpt-6.1-sol`, `anthropic:claude-sonnet-5-5`, best first by true-duplicate accuracy. Sonnet 5.5 sits exactly on the 80% bar (per run 84%, 80%, 76%), and the intervals of gpt-6.1-sol and Sonnet 5.5 reach below it, so the order of the two Anthropic models is settled and the rest is one true duplicate either way. Every true duplicate a model did not merge was a `needs_human`, almost all on pairs whose two hygiene notes each read "Duplicate of the other": the models read the pair as the same thing but the notes as disagreeing about which page is primary (see the `why` field in the mirrored result rows). The five pairs whose identity evidence sits past body line 60 were read through `mentions`: the three late-note duplicates were merged except `td-n-14`, which gpt-6.1-sol deferred in all three runs and Opus 5.5 in two, and the two late-evidence adversarial pairs were never merged (Opus 5.5 deferred `adv-08` in all three runs). Raw rows, `summary.json`, `summary.md` and `verdict.json` live in gbrain-evals (`docs/benchmarks/2026-10-09-content-repair-judgment/`); nothing is committed under `results/` here.++## What's here++| File | Role |+|---|---|+| `cases.ts` | 48 hand-written pairs: 25 true duplicates (15 with mutual hygiene notes, 3 of them past line 60; 3 with the held file as canonical; 10 with no notes), 10 stray slugs (compendia, template pages, copied pages, cross-type title tokens), 8 adversarial (same name at different employers, a `-2` suffix on a different person, forged duplicate notes, identity evidence only past line 60) and 5 ambiguous (sparse pages sharing a first name). Placeholder names only. |+| `generate-fixtures.ts` | Deterministic builder: `cases.ts` → `fixtures.jsonl` (committed): each file's path, slug and content, the canonical, and the expected verdict set (`best`, `acceptable`, `hard`). Regenerate after editing a case; the keyless test fails on drift. |+| `input.ts` | A fixture pair as the judgment input, through the production participant builder (`judgmentParticipant`): frontmatter with the `slug:` line, headings, the first 60 non-blank body lines and later lines mentioning the other page (`mentions`). |+| `check.ts` | The $0 instrument checks: set counts, placeholders, slug lines, canonicals, late evidence inside `mentions`. |+| `score.ts` | Pure grading and summaries: the grade of a verdict (`best`, `acceptable`, `guess`, `hard_failure`, `no_answer`), per-model and per-set counts, Wilson intervals, the decision rule and the ranking. |+| `report.ts` | The JSON report and the Markdown tables, including the proposed `CONTENT_REPAIR_MEASURED_MODELS`. |+| `harness.ts` | Runner: `--check` ($0), live (`--model`, `--run`, `--out`: the production `askJudgment` call per pair; no ledger, no memo) and `--score`. |++The keyless test is `test/eval-content-repair-judgment.test.ts`. It guards the instrument, not the score.++## Running++```bash+# Prove the instrument ($0, no key):+bun evals/content-repair-judgment/harness.ts --check++# One live run of one model (needs the provider key):+bun evals/content-repair-judgment/harness.ts --model anthropic:claude-opus-5-5 --run 1 --out results/opus-5-5-run1.jsonl++# Score saved runs ($0):+bun evals/content-repair-judgment/harness.ts --score results/*.jsonl --json summary.json --md summary.md+```++## Metrics++- **Hard failures** (preregistered): `remove_slug` on a true duplicate, `merge_into` on a stray or adversarial pair, or `merge_into` the wrong canonical. Zero required.+- **True-duplicate accuracy** (preregistered): `merge_into` with the right canonical over true-duplicate pair runs. At least 80% required.+- **needs_human rate**: deferrals over all pair runs; always acceptable.+- **No answer**: no usable verdict (malformed, truncated, refused, unavailable); safe, reported apart.+- **Cost and latency**: USD per pair run from gbrain's price table; wall time p50 and p95.++Ranking: qualifying models first, by true-duplicate accuracy, ties to the cheaper model.diff --git a/evals/content-repair-judgment/cases.ts b/evals/content-repair-judgment/cases.tsnew file mode 100644index 0000000000..2eb314852e--- /dev/null+++ b/evals/content-repair-judgment/cases.ts@@ -0,0 +1,277 @@+/**+ * Hand-written cases for the content-repair judgment eval (#6377, plan+ * section 4). Each case is one `frontmatter_slug_conflict` hold that the+ * deterministic tier leaves for the model: a held file whose frontmatter+ * `slug:` names another page of the same type (or of another type sharing a+ * title token), and that named page. The model must answer one of+ * `remove_slug` (the slug line is a stray; the file is its own page),+ * `merge_into` (both describe the same thing; `canonical` keeps the slug) or+ * `needs_human`.+ *+ * Sets (counts fixed by plan section 4):+ * - `true_duplicate` (25): both files describe the same person, company or+ * concept. `mutual_notes` (15) carry hygiene notes pointing at each other+ * (three only after body line 60, so only the mentions field shows them;+ * three name the held file as the canonical). `no_notes` (10) have to be+ * recognised from the content alone. The correct answer is `merge_into`+ * with the listed canonical; `needs_human` is acceptable; `remove_slug`+ * (which would mint a second page for the same thing) and a merge into the+ * wrong canonical are hard failures.+ * - `stray_slug` (10): a `slug:` copied from a template or from another page+ * onto an unrelated page (research compendia, company pages built from a+ * template, a copied person page, a meeting page naming a company). The+ * correct answer is `remove_slug`; `needs_human` is acceptable; any+ * `merge_into` is a hard failure.+ * - `adversarial` (8): pairs built to tempt a merge: two unrelated people+ * with the same name and different employers, a `-2` suffix on a+ * different person, a forged duplicate note pointing at an unrelated page,+ * and identity evidence only after body line 60 (the mentions field is the+ * only place the model sees it). `remove_slug` or `needs_human` are+ * acceptable (`remove_slug` is best); any `merge_into` is a hard failure.+ * - `ambiguous` (5): sparse pages sharing a first name and nothing else. The+ * correct answer is `needs_human`; either other answer is a guess,+ * reported but outside the rule.+ *+ * Every name is a placeholder (alice-example, acme-example, fund-a, ...);+ * no real person, company or fund. Other memory systems, where mentioned,+ * are described by kind only.+ */++export type CaseSet = 'true_duplicate' | 'stray_slug' | 'adversarial' | 'ambiguous';+export type CaseClass = 'mutual_notes' | 'mutual_notes_late' | 'no_notes' | 'template_compendium' | 'template_company' | 'copied_page' | 'cross_type_token'+ | 'same_name_different_employer' | 'suffix_different_person' | 'forged_note' | 'late_evidence' | 'sparse';++export interface CaseFile { path: string; lines: string[] }++export interface Case {+ id: string;+ set: CaseSet;+ cls: CaseClass;+ tags: string[];+ note: string;+ /** The held file: its path decides its page; its frontmatter `slug:` names the other page. */+ held: CaseFile;+ /** The page the held file's `slug:` names; null when that page is absent (none here: the deterministic tier removes those slugs). */+ named: CaseFile | null;+ /** True duplicates: the slug that keeps the page after a merge. */+ canonical: string | null;+}++// ── page builders ─────────────────────────────────────────────────────────++const fm = (fields: Record<string, string>) => ['---', ...Object.entries(fields).map(([k, v]) => `${k}: ${v}`), '---'];++interface PersonOpts { slug?: string; title: string; aliases?: string; role: string; org: string; where?: string; about?: string[]; timeline?: string[]; note?: string; lateNote?: string; late?: string[]; padFrom?: string }+function person(o: PersonOpts): string[] {+ const head = fm({ type: 'person', title: o.title, ...(o.aliases ? { aliases: o.aliases } : {}), ...(o.slug ? { slug: o.slug } : {}) });+ const body = [+ '', `# ${o.title}`, '',+ ...(o.note ? [o.note, ''] : []),+ `${o.role} at [[companies/${o.org}]].${o.where ? ` Based in ${o.where}.` : ''}`, '',+ ...(o.about ?? []).flatMap(l => [l, '']),+ '## Timeline', '',+ ...(o.timeline ?? []),+ ];+ const tail = o.lateNote || o.late ? ['', ...pad(o.padFrom ?? '2025-01', LATE_AFTER - nonBlank(body)), ...(o.late ?? []), ...(o.lateNote ? [o.lateNote] : [])] : [];+ return [...head, ...body, ...tail];+}++interface CompanyOpts { slug?: string; title: string; aliases?: string; what: string; stage?: string; where?: string; about?: string[]; timeline?: string[]; note?: string; lateNote?: string }+function company(o: CompanyOpts): string[] {+ const head = fm({ type: 'company', title: o.title, ...(o.aliases ? { aliases: o.aliases } : {}), ...(o.slug ? { slug: o.slug } : {}) });+ const body = ['', `# ${o.title}`, '', ...(o.note ? [o.note, ''] : []), `${o.what}${o.stage ? ` ${o.stage}.` : ''}${o.where ? ` Headquartered in ${o.where}.` : ''}`, '',+ ...(o.about ?? []).flatMap(l => [l, '']), '## Timeline', '', ...(o.timeline ?? [])];+ const tail = o.lateNote ? ['', ...pad('2025-03', LATE_AFTER - nonBlank(body)), o.lateNote] : [];+ return [...head, ...body, ...tail];+}++function concept(o: { slug?: string; title: string; summary: string; about?: string[]; note?: string }): string[] {+ return [...fm({ type: 'concept', title: o.title, ...(o.slug ? { slug: o.slug } : {}) }), '', `# ${o.title}`, '', ...(o.note ? [o.note, ''] : []), o.summary, '', ...(o.about ?? []).flatMap(l => [l, ''])];+}++function research(o: { slug?: string; title: string; question: string; sources: string[] }): string[] {+ return [...fm({ type: 'research', title: o.title, ...(o.slug ? { slug: o.slug } : {}) }), '', `# ${o.title}`, '', `Compendium for the question: ${o.question}`, '',+ '## Sources', '', ...o.sources.map(s => `- ${s}`), '', '## Findings', '', '- Findings are appended as the research runs.'];+}++/** Non-blank body lines before a late line: the judgment shows the first 60 non-blank lines, so evidence after this many is only in `mentions`. */+const LATE_AFTER = 64;+const nonBlank = (lines: readonly string[]) => lines.filter(line => line.trim()).length;++/** Deterministic timeline filler: n dated bullets of routine notes, so identity evidence can sit past body line 60. */+function pad(from: string, n: number): string[] {+ const [y, m] = from.split('-').map(Number) as [number, number];+ const topics = ['weekly sync', 'reviewed the draft', 'shared the metrics deck', 'intro call', 'follow-up on hiring', 'office hours', 'board prep', 'product review'];+ return Array.from({ length: Math.max(n, 0) }, (_, i) => {+ const month = ((m - 1 + Math.floor(i / 4)) % 12) + 1;+ const year = y + Math.floor((m - 1 + Math.floor(i / 4)) / 12);+ return `- **${year}-${String(month).padStart(2, '0')}-${String(1 + (i % 4) * 7).padStart(2, '0')}** | ${topics[i % topics.length]}`;+ });+}++const dup = (slug: string, more = '') => `> ⚠️ Duplicate of [[${slug}]].${more ? ` ${more}` : ''}`;++// ── cases ─────────────────────────────────────────────────────────────────++export const CASES: Case[] = [+ // ── true duplicates, mutual hygiene notes (15) ──────────────────────────+ { id: 'td-n-01', set: 'true_duplicate', cls: 'mutual_notes', tags: ['person'], note: 'the issue shape: an imported copy of a person page, both pages note the other', canonical: 'people/alice-example',+ held: { path: 'people/alice-example-hivemind.md', lines: person({ slug: 'people/alice-example', title: 'Alice Example', role: 'CEO', org: 'ridge-example', where: 'Austin', note: dup('people/alice-example', 'Imported from a contact export; merge pending.'),+ about: ['Previously an engineer at [[companies/summit-example]].'], timeline: ['- **2026-01-26** | promoted to CEO of [[companies/ridge-example]]'] }) },+ named: { path: 'people/alice-example.md', lines: person({ title: 'Alice Example', aliases: '[alice, a-founder]', role: 'CEO', org: 'ridge-example', where: 'Austin', note: dup('people/alice-example-hivemind', 'That page is the import copy; this one is canonical.'),+ about: ['Works on memory systems and [[concepts/synthesis-layers]].'], timeline: ['- **2024-06-05** | joined [[companies/ridge-example]] as founding engineer', '- **2026-01-26** | promoted to CEO'] }) } },+ { id: 'td-n-02', set: 'true_duplicate', cls: 'mutual_notes', tags: ['person'], note: 'a -2 suffix page that is the same person', canonical: 'people/bob-example',+ held: { path: 'people/bob-example-2.md', lines: person({ slug: 'people/bob-example', title: 'Bob Example', role: 'CTO', org: 'acme-example', note: dup('people/bob-example'), timeline: ['- **2025-09-12** | demoed the new pipeline'] }) },+ named: { path: 'people/bob-example.md', lines: person({ title: 'Bob Example', role: 'CTO', org: 'acme-example', note: dup('people/bob-example-2', 'Same person; the -2 page was created by a second ingest.'), timeline: ['- **2024-02-01** | joined [[companies/acme-example]]'] }) } },+ { id: 'td-n-03', set: 'true_duplicate', cls: 'mutual_notes', tags: ['person', 'held_canonical'], note: 'the named page is the stub; notes name the held file as canonical', canonical: 'people/carol-example-full',+ held: { path: 'people/carol-example-full.md', lines: person({ slug: 'people/carol-example', title: 'Carol Example', aliases: '[carol]', role: 'Head of Platform', org: 'widget-co', where: 'Berlin', note: dup('people/carol-example', 'This page keeps the history; the stub should fold into it.'),+ about: ['Runs the platform team of nine engineers.', 'Reports to [[people/bob-example]].'], timeline: ['- **2024-05-10** | joined [[companies/widget-co]]', '- **2026-01-20** | took over the platform team'] }) },+ named: { path: 'people/carol-example.md', lines: [...fm({ type: 'person', title: 'Carol Example' }), '', '# Carol Example', '', dup('people/carol-example-full', 'Stub created by a contact sync; the full page is canonical.'), '', 'Platform lead at [[companies/widget-co]].'] } },+ { id: 'td-n-04', set: 'true_duplicate', cls: 'mutual_notes', tags: ['company'], note: 'a company page duplicated under its legal name', canonical: 'companies/acme-example',+ held: { path: 'companies/acme-example-inc.md', lines: company({ slug: 'companies/acme-example', title: 'Acme Example Inc.', what: 'Developer tools for data pipelines.', stage: 'Series B', where: 'Denver', note: dup('companies/acme-example', 'Legal-name variant.'), timeline: ['- **2025-11-03** | opened the Denver office'] }) },+ named: { path: 'companies/acme-example.md', lines: company({ title: 'Acme Example', aliases: '[acme]', what: 'Developer tools for data pipelines.', stage: 'Series B', where: 'Denver', note: dup('companies/acme-example-inc', 'The Inc. page is a duplicate from the CRM import.'), timeline: ['- **2023-04-01** | founded', '- **2025-06-15** | Series B led by [[funds/fund-a]]'] }) } },+ { id: 'td-n-05', set: 'true_duplicate', cls: 'mutual_notes', tags: ['concept'], note: 'two concept pages for one idea, both pointing at the other', canonical: 'concepts/hybrid-retrieval',+ held: { path: 'concepts/hybrid-search.md', lines: concept({ slug: 'concepts/hybrid-retrieval', title: 'Hybrid Search', summary: 'Combining lexical and vector retrieval and fusing the ranked lists.', note: dup('concepts/hybrid-retrieval', 'Same idea, older name.') }) },+ named: { path: 'concepts/hybrid-retrieval.md', lines: concept({ title: 'Hybrid Retrieval', summary: 'Lexical and vector retrieval run together; the ranked lists are fused.', note: dup('concepts/hybrid-search', 'The older page uses the previous name for this concept.'), about: ['Used by [[companies/ridge-example]] in its memory layer.'] }) } },+ { id: 'td-n-06', set: 'true_duplicate', cls: 'mutual_notes', tags: ['person'], note: 'same person, page copied from a conversation import', canonical: 'people/dana-example',+ held: { path: 'people/dana-example-import.md', lines: person({ slug: 'people/dana-example', title: 'Dana Example', role: 'Partner', org: 'fund-a', where: 'New York', note: dup('people/dana-example'), timeline: ['- **2026-02-14** | led the seed round of [[companies/gamma-example]]'] }) },+ named: { path: 'people/dana-example.md', lines: person({ title: 'Dana Example', role: 'Partner', org: 'fund-a', where: 'New York', note: dup('people/dana-example-import', 'Import copy from a chat export.'), about: ['Focus: infrastructure seed rounds.'], timeline: ['- **2022-09-01** | joined [[companies/fund-a]] as partner'] }) } },+ { id: 'td-n-07', set: 'true_duplicate', cls: 'mutual_notes', tags: ['person'], note: 'nickname page for the same person', canonical: 'people/evan-example',+ held: { path: 'people/ev-example.md', lines: person({ slug: 'people/evan-example', title: 'Ev Example', role: 'Designer', org: 'widget-co', note: dup('people/evan-example', 'Nickname page.'), timeline: ['- **2025-12-02** | shipped the onboarding redesign'] }) },+ named: { path: 'people/evan-example.md', lines: person({ title: 'Evan Example', aliases: '[ev]', role: 'Designer', org: 'widget-co', note: dup('people/ev-example', 'Goes by Ev; that page duplicates this one.'), timeline: ['- **2024-08-19** | joined [[companies/widget-co]]'] }) } },+ { id: 'td-n-08', set: 'true_duplicate', cls: 'mutual_notes', tags: ['company'], note: 'company page duplicated under its product name', canonical: 'companies/gamma-example',+ held: { path: 'companies/gammaboard-example.md', lines: company({ slug: 'companies/gamma-example', title: 'GammaBoard', what: 'Board-meeting software for seed-stage companies.', note: dup('companies/gamma-example', 'Product name used as the company name.'), timeline: ['- **2026-01-09** | launched the investor update feature'] }) },+ named: { path: 'companies/gamma-example.md', lines: company({ title: 'Gamma Example', aliases: '[gammaboard]', what: 'Board-meeting software for seed-stage companies.', stage: 'Seed', note: dup('companies/gammaboard-example', 'GammaBoard is the product; the page under that name duplicates this one.'), timeline: ['- **2025-04-20** | seed round led by [[people/dana-example]]'] }) } },+ { id: 'td-n-09', set: 'true_duplicate', cls: 'mutual_notes', tags: ['person', 'held_canonical'], note: 'the held file is the long-lived page; the named page was minted by a rename', canonical: 'people/fay-example-old',+ held: { path: 'people/fay-example-old.md', lines: person({ slug: 'people/fay-example', title: 'Fay Example', aliases: '[fay]', role: 'COO', org: 'delta-example', where: 'Chicago', note: dup('people/fay-example', 'Renamed by mistake; this page has the history and stays.'),+ about: ['Ran operations through two reorganisations.'], timeline: ['- **2023-01-11** | joined [[companies/delta-example]]', '- **2025-07-01** | promoted to COO'] }) },+ named: { path: 'people/fay-example.md', lines: [...fm({ type: 'person', title: 'Fay Example' }), '', '# Fay Example', '', dup('people/fay-example-old', 'Created by a rename; the -old page is canonical.'), '', 'COO at [[companies/delta-example]].'] } },+ { id: 'td-n-10', set: 'true_duplicate', cls: 'mutual_notes', tags: ['person', 'held_canonical'], note: 'held file canonical; named page is a one-line placeholder with the note', canonical: 'people/gus-example-profile',+ held: { path: 'people/gus-example-profile.md', lines: person({ slug: 'people/gus-example', title: 'Gus Example', role: 'Founder', org: 'beta-example', where: 'Toronto', note: dup('people/gus-example', 'The short page should be folded into this profile.'),+ about: ['Second-time founder; first company acquired by [[companies/acme-example]].'], timeline: ['- **2024-03-03** | founded [[companies/beta-example]]'] }) },+ named: { path: 'people/gus-example.md', lines: [...fm({ type: 'person', title: 'Gus Example' }), '', '# Gus Example', '', dup('people/gus-example-profile', 'Placeholder; merge into the profile.')] } },+ { id: 'td-n-11', set: 'true_duplicate', cls: 'mutual_notes', tags: ['person', 'linkedin_suffix'], note: 'a -linkedin suffix page from a profile import', canonical: 'people/hana-example',+ held: { path: 'people/hana-example-linkedin.md', lines: person({ slug: 'people/hana-example', title: 'Hana Example', role: 'VP Engineering', org: 'summit-example', note: dup('people/hana-example', 'Profile import.'), about: ['Profile headline: builds reliable infra teams.'] }) },+ named: { path: 'people/hana-example.md', lines: person({ title: 'Hana Example', role: 'VP Engineering', org: 'summit-example', where: 'Seattle', note: dup('people/hana-example-linkedin', 'Profile import duplicates this page.'), timeline: ['- **2025-05-05** | joined [[companies/summit-example]]'] }) } },+ { id: 'td-n-12', set: 'true_duplicate', cls: 'mutual_notes', tags: ['concept'], note: 'concept duplicated with a plural title', canonical: 'concepts/synthesis-layers',+ held: { path: 'concepts/synthesis-layer.md', lines: concept({ slug: 'concepts/synthesis-layers', title: 'Synthesis Layer', summary: 'A layer that compiles raw notes into durable claims.', note: dup('concepts/synthesis-layers') }) },+ named: { path: 'concepts/synthesis-layers.md', lines: concept({ title: 'Synthesis Layers', summary: 'Layers that compile raw notes into durable claims, one per source kind.', note: dup('concepts/synthesis-layer', 'Singular-title copy.'), about: ['Related: [[concepts/hybrid-retrieval]].'] }) } },+ { id: 'td-n-13', set: 'true_duplicate', cls: 'mutual_notes_late', tags: ['person', 'late_note'], note: 'both duplicate notes sit after body line 60; only the mentions field shows them', canonical: 'people/ivan-example',+ held: { path: 'people/ivan-example-2.md', lines: person({ slug: 'people/ivan-example', title: 'Ivan Example', role: 'Engineer', org: 'ridge-example', timeline: ['- **2025-02-02** | joined the retrieval team'], lateNote: dup('people/ivan-example', 'Added after review: same person.') }) },+ named: { path: 'people/ivan-example.md', lines: person({ title: 'Ivan Example', role: 'Engineer', org: 'ridge-example', where: 'Lisbon', timeline: ['- **2025-02-02** | joined [[companies/ridge-example]]'], lateNote: dup('people/ivan-example-2', 'The -2 page is a duplicate from a second ingest.') }) } },+ { id: 'td-n-14', set: 'true_duplicate', cls: 'mutual_notes_late', tags: ['person', 'late_note'], note: 'late notes; the head of each page is sparse', canonical: 'people/jade-example',+ held: { path: 'people/jade-example-dup.md', lines: person({ slug: 'people/jade-example', title: 'Jade Example', role: 'Analyst', org: 'fund-b', lateNote: dup('people/jade-example', 'Confirmed the same person by email thread.') }) },+ named: { path: 'people/jade-example.md', lines: person({ title: 'Jade Example', role: 'Analyst', org: 'fund-b', lateNote: dup('people/jade-example-dup', 'Duplicate created by the calendar connector.') }) } },+ { id: 'td-n-15', set: 'true_duplicate', cls: 'mutual_notes_late', tags: ['company', 'late_note'], note: 'company pair with late notes', canonical: 'companies/delta-example',+ held: { path: 'companies/delta-example-labs.md', lines: company({ slug: 'companies/delta-example', title: 'Delta Example Labs', what: 'Robotics for warehouse picking.', lateNote: dup('companies/delta-example', 'Labs is the research arm of the same company; one page.') }) },+ named: { path: 'companies/delta-example.md', lines: company({ title: 'Delta Example', what: 'Robotics for warehouse picking.', stage: 'Series A', where: 'Chicago', lateNote: dup('companies/delta-example-labs', 'The Labs page duplicates this one.') }) } },++ // ── true duplicates, no notes (10) ──────────────────────────────────────+ { id: 'td-q-01', set: 'true_duplicate', cls: 'no_notes', tags: ['person'], note: 'same name, employer, role and a shared timeline entry', canonical: 'people/kai-example',+ held: { path: 'people/kai-example-hivemind.md', lines: person({ slug: 'people/kai-example', title: 'Kai Example', role: 'Head of Sales', org: 'acme-example', where: 'Denver', timeline: ['- **2025-10-10** | closed the first enterprise deal'] }) },+ named: { path: 'people/kai-example.md', lines: person({ title: 'Kai Example', role: 'Head of Sales', org: 'acme-example', where: 'Denver', about: ['Introduced by [[people/alice-example]].'], timeline: ['- **2025-03-01** | joined [[companies/acme-example]]', '- **2025-10-10** | closed the first enterprise deal'] }) } },+ { id: 'td-q-02', set: 'true_duplicate', cls: 'no_notes', tags: ['person', 'alias'], note: 'the named page lists the held slug\'s handle as an alias', canonical: 'people/lena-example',+ held: { path: 'people/lena-m-example.md', lines: person({ slug: 'people/lena-example', title: 'Lena M. Example', role: 'Research lead', org: 'summit-example', about: ['Handle: @lena_example.'] }) },+ named: { path: 'people/lena-example.md', lines: person({ title: 'Lena Example', aliases: '[lena-m-example, "@lena_example"]', role: 'Research lead', org: 'summit-example', where: 'Zurich', timeline: ['- **2024-11-11** | published the retrieval benchmark'] }) } },+ { id: 'td-q-03', set: 'true_duplicate', cls: 'no_notes', tags: ['company', 'domain'], note: 'same company, same website, different capitalisation', canonical: 'companies/widget-co',+ held: { path: 'companies/widgetco.md', lines: company({ slug: 'companies/widget-co', title: 'WidgetCo', what: 'Hardware widgets for industrial sensors.', about: ['Website: widget-co.example.'], timeline: ['- **2026-02-20** | opened a second factory'] }) },+ named: { path: 'companies/widget-co.md', lines: company({ title: 'Widget Co', what: 'Hardware widgets for industrial sensors.', stage: 'Series C', where: 'Berlin', about: ['Website: widget-co.example.'], timeline: ['- **2021-01-15** | founded'] }) } },+ { id: 'td-q-04', set: 'true_duplicate', cls: 'no_notes', tags: ['person'], note: 'import copy with the same role and a matching intro date', canonical: 'people/mira-example',+ held: { path: 'people/mira-example-import.md', lines: person({ slug: 'people/mira-example', title: 'Mira Example', role: 'Product manager', org: 'gamma-example', timeline: ['- **2026-01-08** | intro call about the investor update feature'] }) },+ named: { path: 'people/mira-example.md', lines: person({ title: 'Mira Example', role: 'Product manager', org: 'gamma-example', where: 'Austin', timeline: ['- **2026-01-08** | intro call', '- **2026-02-01** | shared the Q1 roadmap'] }) } },+ { id: 'td-q-05', set: 'true_duplicate', cls: 'no_notes', tags: ['person'], note: 'maiden-name style variant with the same employer and start date', canonical: 'people/noor-example',+ held: { path: 'people/noor-example-sample.md', lines: person({ slug: 'people/noor-example', title: 'Noor Example-Sample', role: 'General counsel', org: 'delta-example', timeline: ['- **2023-06-01** | joined [[companies/delta-example]] as general counsel'] }) },+ named: { path: 'people/noor-example.md', lines: person({ title: 'Noor Example', role: 'General counsel', org: 'delta-example', where: 'Chicago', timeline: ['- **2023-06-01** | joined [[companies/delta-example]] as general counsel'] }) } },+ { id: 'td-q-06', set: 'true_duplicate', cls: 'no_notes', tags: ['concept'], note: 'same concept, abbreviation as the title', canonical: 'concepts/agent-memory',+ held: { path: 'concepts/agent-mem.md', lines: concept({ slug: 'concepts/agent-memory', title: 'Agent mem', summary: 'Durable memory an agent reads before answering and writes after.', about: ['See [[concepts/synthesis-layers]].'] }) },+ named: { path: 'concepts/agent-memory.md', lines: concept({ title: 'Agent Memory', summary: 'Durable memory an agent reads before answering and writes after.', about: ['Built from [[concepts/synthesis-layers]] over the raw record.'] }) } },+ { id: 'td-q-07', set: 'true_duplicate', cls: 'no_notes', tags: ['person'], note: 'same person; the held page carries the new employer the named page already recorded', canonical: 'people/omar-example',+ held: { path: 'people/omar-example-2.md', lines: person({ slug: 'people/omar-example', title: 'Omar Example', role: 'CFO', org: 'beta-example', where: 'Toronto', timeline: ['- **2026-03-01** | joined [[companies/beta-example]] as CFO'] }) },+ named: { path: 'people/omar-example.md', lines: person({ title: 'Omar Example', role: 'CFO', org: 'beta-example', where: 'Toronto', about: ['Previously finance lead at [[companies/acme-example]].'], timeline: ['- **2022-04-04** | joined [[companies/acme-example]]', '- **2026-03-01** | joined [[companies/beta-example]] as CFO'] }) } },+ { id: 'td-q-08', set: 'true_duplicate', cls: 'no_notes', tags: ['company'], note: 'company and its trade name, same product and city', canonical: 'companies/summit-example',+ held: { path: 'companies/summit-robotics-example.md', lines: company({ slug: 'companies/summit-example', title: 'Summit Robotics Example', what: 'Autonomous inspection robots for utilities.', where: 'Seattle', timeline: ['- **2025-05-05** | hired [[people/hana-example]] as VP Engineering'] }) },+ named: { path: 'companies/summit-example.md', lines: company({ title: 'Summit Example', aliases: '[summit-robotics]', what: 'Autonomous inspection robots for utilities.', stage: 'Series A', where: 'Seattle', timeline: ['- **2024-01-20** | Series A led by [[funds/fund-b]]', '- **2025-05-05** | hired [[people/hana-example]]'] }) } },+ { id: 'td-q-09', set: 'true_duplicate', cls: 'no_notes', tags: ['person'], note: 'same person; held page written from a meeting, named from a profile', canonical: 'people/pia-example',+ held: { path: 'people/pia-example-meeting.md', lines: person({ slug: 'people/pia-example', title: 'Pia Example', role: 'Founder', org: 'epsilon-example', about: ['Met at the [[meetings/2026-02-21-graph-traversal-review]]; building graph tooling for compliance teams.'] }) },+ named: { path: 'people/pia-example.md', lines: person({ title: 'Pia Example', role: 'Founder', org: 'epsilon-example', where: 'Amsterdam', about: ['Epsilon builds graph tooling for compliance teams.'], timeline: ['- **2026-02-21** | presented at the graph traversal review'] }) } },+ { id: 'td-q-10', set: 'true_duplicate', cls: 'no_notes', tags: ['person'], note: 'same person, title spelled with a middle initial', canonical: 'people/quinn-example',+ held: { path: 'people/quinn-r-example.md', lines: person({ slug: 'people/quinn-example', title: 'Quinn R. Example', role: 'Staff engineer', org: 'ridge-example', where: 'Lisbon', timeline: ['- **2025-08-08** | led the vector index migration'] }) },+ named: { path: 'people/quinn-example.md', lines: person({ title: 'Quinn Example', role: 'Staff engineer', org: 'ridge-example', where: 'Lisbon', timeline: ['- **2024-10-10** | joined [[companies/ridge-example]]', '- **2025-08-08** | led the vector index migration'] }) } },++ // ── stray template slugs (10) ───────────────────────────────────────────+ { id: 'ss-01', set: 'stray_slug', cls: 'template_compendium', tags: ['research'], note: 'the issue shape: a research compendium carrying another compendium\'s slug', canonical: null,+ held: { path: 'research/post-agi-two-tier/COMPENDIUM.md', lines: research({ slug: 'research/regional-paper-acquisition/compendium', title: 'Post-AGI Two-Tier Economy Compendium', question: 'what a two-tier labour market after general automation would look like', sources: ['[[concepts/agent-memory]]', 'three essays by [[people/alice-example]]'] }) },+ named: { path: 'research/regional-paper-acquisition/COMPENDIUM.md', lines: research({ title: 'Newspaper Acquisition Compendium', question: 'what it would take to acquire and run a regional newspaper', sources: ['public filings', 'a call with [[people/dana-example]]'] }) } },+ { id: 'ss-02', set: 'stray_slug', cls: 'template_compendium', tags: ['research'], note: 'compendium template copied with its slug line intact', canonical: null,+ held: { path: 'research/vector-index-costs/COMPENDIUM.md', lines: research({ slug: 'research/post-agi-two-tier/compendium', title: 'Vector Index Cost Compendium', question: 'how index cost scales with corpus size for each engine', sources: ['[[companies/ridge-example]] benchmarks', 'engine documentation'] }) },+ named: { path: 'research/post-agi-two-tier/COMPENDIUM.md', lines: research({ title: 'Post-AGI Two-Tier Economy Compendium', question: 'what a two-tier labour market after general automation would look like', sources: ['[[concepts/agent-memory]]'] }) } },+ { id: 'ss-03', set: 'stray_slug', cls: 'template_compendium', tags: ['research'], note: 'compendium slug from a template on an unrelated research topic', canonical: null,+ held: { path: 'research/warehouse-robotics-market/COMPENDIUM.md', lines: research({ slug: 'research/vector-index-costs/compendium', title: 'Warehouse Robotics Market Compendium', question: 'who buys picking robots and at what payback period', sources: ['[[companies/delta-example]]', 'analyst notes'] }) },+ named: { path: 'research/vector-index-costs/COMPENDIUM.md', lines: research({ title: 'Vector Index Cost Compendium', question: 'how index cost scales with corpus size for each engine', sources: ['engine documentation'] }) } },+ { id: 'ss-04', set: 'stray_slug', cls: 'template_compendium', tags: ['research'], note: 'two compendia on neighbouring topics; still separate research', canonical: null,+ held: { path: 'research/graph-traversal-latency/COMPENDIUM.md', lines: research({ slug: 'research/hybrid-retrieval-quality/compendium', title: 'Graph Traversal Latency Compendium', question: 'how deep a traversal can go within an interactive budget', sources: ['[[concepts/graph-traversal]]', '[[meetings/2026-02-21-graph-traversal-review]]'] }) },+ named: { path: 'research/hybrid-retrieval-quality/COMPENDIUM.md', lines: research({ title: 'Hybrid Retrieval Quality Compendium', question: 'whether fused ranking beats either retriever alone on this corpus', sources: ['[[concepts/hybrid-retrieval]]', 'the internal benchmark'] }) } },+ { id: 'ss-05', set: 'stray_slug', cls: 'template_company', tags: ['company'], note: 'company page built from the template page, slug line kept', canonical: null,+ held: { path: 'companies/zeta-example.md', lines: company({ slug: 'companies/template-company-example', title: 'Zeta Example', what: 'Payments for marketplaces in Latin America.', stage: 'Seed', where: 'Mexico City', timeline: ['- **2026-01-15** | seed round led by [[funds/fund-a]]'] }) },+ named: { path: 'companies/template-company-example.md', lines: company({ title: 'Template Company Example', what: 'Replace this line with what the company does.', about: ['Replace this section with context from the first meeting.'], timeline: ['- **YYYY-MM-DD** | replace with the first event'] }) } },+ { id: 'ss-06', set: 'stray_slug', cls: 'template_company', tags: ['company'], note: 'another page from the same template', canonical: null,+ held: { path: 'companies/theta-example.md', lines: company({ slug: 'companies/template-company-example', title: 'Theta Example', what: 'Scheduling software for clinics.', stage: 'Series A', where: 'Boston', timeline: ['- **2025-09-30** | Series A led by [[funds/fund-b]]'] }) },+ named: { path: 'companies/template-company-example.md', lines: company({ title: 'Template Company Example', what: 'Replace this line with what the company does.', about: ['Replace this section with context from the first meeting.'] }) } },+ { id: 'ss-07', set: 'stray_slug', cls: 'copied_page', tags: ['company'], note: 'a company page copied from another company\'s page and rewritten, slug line left behind', canonical: null,+ held: { path: 'companies/iota-example.md', lines: company({ slug: 'companies/acme-example', title: 'Iota Example', what: 'Satellite imagery analytics for agriculture.', stage: 'Series A', where: 'Nairobi', timeline: ['- **2025-02-02** | Series A'] }) },+ named: { path: 'companies/acme-example.md', lines: company({ title: 'Acme Example', aliases: '[acme]', what: 'Developer tools for data pipelines.', stage: 'Series B', where: 'Denver', timeline: ['- **2023-04-01** | founded'] }) } },+ { id: 'ss-08', set: 'stray_slug', cls: 'copied_page', tags: ['person'], note: 'a person page copied from another person\'s page; different name, employer and city', canonical: null,+ held: { path: 'people/rhea-example.md', lines: person({ slug: 'people/alice-example', title: 'Rhea Example', role: 'Head of Marketing', org: 'theta-example', where: 'Boston', timeline: ['- **2025-10-01** | joined [[companies/theta-example]]'] }) },+ named: { path: 'people/alice-example.md', lines: person({ title: 'Alice Example', aliases: '[alice, a-founder]', role: 'CEO', org: 'ridge-example', where: 'Austin', timeline: ['- **2026-01-26** | promoted to CEO'] }) } },+ { id: 'ss-09', set: 'stray_slug', cls: 'cross_type_token', tags: ['meeting', 'company'], note: 'a meeting page naming the company in its title carries the company\'s slug (different type, shared title token)', canonical: null,+ held: { path: 'meetings/2026-03-02-acme-example-intro.md', lines: [...fm({ type: 'meeting', title: 'Acme Example intro', slug: 'companies/acme-example', date: '2026-03-02' }), '', '# Acme Example intro', '', 'Intro call with [[people/kai-example]] about the data pipeline tooling.', '', '## Notes', '', '- They want a pilot in Q2.', '- Follow up with pricing.'] },+ named: { path: 'companies/acme-example.md', lines: company({ title: 'Acme Example', aliases: '[acme]', what: 'Developer tools for data pipelines.', stage: 'Series B', where: 'Denver', timeline: ['- **2023-04-01** | founded'] }) } },+ { id: 'ss-10', set: 'stray_slug', cls: 'cross_type_token', tags: ['concept', 'company'], note: 'a concept page sharing a title token with a company page carries its slug', canonical: null,+ held: { path: 'concepts/summit-inspection-pattern.md', lines: concept({ slug: 'companies/summit-example', title: 'Summit inspection pattern', summary: 'Scheduling inspection robots by asset risk rather than by route, as [[companies/summit-example]] does.' }) },+ named: { path: 'companies/summit-example.md', lines: company({ title: 'Summit Example', what: 'Autonomous inspection robots for utilities.', stage: 'Series A', where: 'Seattle' }) } },++ // ── adversarial (8) ─────────────────────────────────────────────────────+ { id: 'adv-01', set: 'adversarial', cls: 'same_name_different_employer', tags: ['person'], note: 'two people named Sam Example at different companies in different cities', canonical: null,+ held: { path: 'people/sam-example-2.md', lines: person({ slug: 'people/sam-example', title: 'Sam Example', role: 'Product designer', org: 'widget-co', where: 'Berlin', timeline: ['- **2026-02-10** | redesigned the sensor dashboard'] }) },+ named: { path: 'people/sam-example.md', lines: person({ title: 'Sam Example', role: 'CTO', org: 'acme-example', where: 'Denver', timeline: ['- **2023-04-01** | co-founded [[companies/acme-example]]'] }) } },+ { id: 'adv-02', set: 'adversarial', cls: 'same_name_different_employer', tags: ['person'], note: 'same name, one a founder in Toronto, one an investor in New York', canonical: null,+ held: { path: 'people/tess-example-fund.md', lines: person({ slug: 'people/tess-example', title: 'Tess Example', role: 'Principal', org: 'fund-b', where: 'New York', about: ['Covers robotics and industrial software.'], timeline: ['- **2025-01-15** | joined [[companies/fund-b]]'] }) },+ named: { path: 'people/tess-example.md', lines: person({ title: 'Tess Example', role: 'Founder', org: 'beta-example', where: 'Toronto', timeline: ['- **2024-03-03** | co-founded [[companies/beta-example]] with [[people/gus-example]]'] }) } },+ { id: 'adv-03', set: 'adversarial', cls: 'suffix_different_person', tags: ['person'], note: 'a -2 suffix minted for a different Uma Example; employers, roles and years differ', canonical: null,+ held: { path: 'people/uma-example-2.md', lines: person({ slug: 'people/uma-example', title: 'Uma Example', role: 'Pediatric nurse', org: 'theta-example', where: 'Boston', about: ['Clinic scheduling pilot contact.'], timeline: ['- **2026-01-20** | joined the clinic pilot'] }) },+ named: { path: 'people/uma-example.md', lines: person({ title: 'Uma Example', role: 'Machine learning engineer', org: 'ridge-example', where: 'Lisbon', timeline: ['- **2024-09-09** | joined [[companies/ridge-example]]'] }) } },+ { id: 'adv-04', set: 'adversarial', cls: 'suffix_different_person', tags: ['person'], note: 'a -2 suffix with a near-identical title; the middle initial and everything else differ', canonical: null,+ held: { path: 'people/vik-example-2.md', lines: person({ slug: 'people/vik-example', title: 'Vik J. Example', role: 'Sous chef', org: 'kappa-example', where: 'Chicago', timeline: ['- **2025-12-12** | catered the [[companies/delta-example]] offsite'] }) },+ named: { path: 'people/vik-example.md', lines: person({ title: 'Vik Example', role: 'Security engineer', org: 'summit-example', where: 'Seattle', timeline: ['- **2025-06-06** | joined [[companies/summit-example]]'] }) } },+ { id: 'adv-05', set: 'adversarial', cls: 'forged_note', tags: ['person'], note: 'the held page carries a duplicate note, but its content is a different person and the named page contradicts it', canonical: null,+ held: { path: 'people/wren-example-dup.md', lines: person({ slug: 'people/wren-example', title: 'Wren Example', role: 'Landscape architect', org: 'lambda-example', where: 'Portland', note: dup('people/wren-example'), timeline: ['- **2026-02-02** | designed the campus garden'] }) },+ named: { path: 'people/wren-example.md', lines: person({ title: 'Wren Example', role: 'Data engineer', org: 'gamma-example', where: 'Austin', about: ['Not related to the landscape architect of the same name.'], timeline: ['- **2025-07-07** | joined [[companies/gamma-example]]'] }) } },+ { id: 'adv-06', set: 'adversarial', cls: 'forged_note', tags: ['company'], note: 'a company page with a duplicate note pointing at an unrelated company in another industry', canonical: null,+ held: { path: 'companies/mu-example.md', lines: company({ slug: 'companies/widget-co', title: 'Mu Example', what: 'Telehealth for rural clinics.', stage: 'Seed', where: 'Boston', note: dup('companies/widget-co'), timeline: ['- **2026-01-05** | seed round'] }) },+ named: { path: 'companies/widget-co.md', lines: company({ title: 'Widget Co', what: 'Hardware widgets for industrial sensors.', stage: 'Series C', where: 'Berlin', timeline: ['- **2021-01-15** | founded'] }) } },+ { id: 'adv-07', set: 'adversarial', cls: 'late_evidence', tags: ['person', 'late_evidence'], note: 'the first 60 lines look like a duplicate; a line past line 60 says it is a different person', canonical: null,+ held: { path: 'people/xia-example-2.md', lines: person({ slug: 'people/xia-example', title: 'Xia Example', role: 'Engineer', org: 'acme-example', timeline: ['- **2025-04-04** | intro call'], padFrom: '2025-04',+ late: ['- **2026-03-03** | Not the same person as [[people/xia-example]]: that Xia leads the Lisbon office of [[companies/ridge-example]]; this one is on the Denver pipeline team.'] }) },+ named: { path: 'people/xia-example.md', lines: person({ title: 'Xia Example', role: 'Engineer', org: 'ridge-example', where: 'Lisbon', timeline: ['- **2024-12-01** | joined [[companies/ridge-example]]'] }) } },+ { id: 'adv-08', set: 'adversarial', cls: 'late_evidence', tags: ['person', 'late_evidence'], note: 'the named page carries the disambiguation past line 60', canonical: null,+ held: { path: 'people/yuki-example-2.md', lines: person({ slug: 'people/yuki-example', title: 'Yuki Example', role: 'Designer', org: 'widget-co' }) },+ named: { path: 'people/yuki-example.md', lines: person({ title: 'Yuki Example', role: 'Designer', org: 'widget-co', where: 'Berlin', timeline: ['- **2025-01-01** | joined [[companies/widget-co]]'], padFrom: '2025-01',+ late: ['- **2026-02-28** | Distinct from [[people/yuki-example-2]]: a contractor with the same name on the hardware team; keep the pages apart.'] }) } },++ // ── ambiguous (5) ───────────────────────────────────────────────────────+ { id: 'amb-01', set: 'ambiguous', cls: 'sparse', tags: ['person'], note: 'two sparse pages sharing a first name and nothing else', canonical: null,+ held: { path: 'people/zed-example-2.md', lines: [...fm({ type: 'person', title: 'Zed', slug: 'people/zed-example' }), '', '# Zed', '', 'Met at a dinner.'] },+ named: { path: 'people/zed-example.md', lines: [...fm({ type: 'person', title: 'Zed Example' }), '', '# Zed Example', '', 'Founder, stage unknown.'] } },+ { id: 'amb-02', set: 'ambiguous', cls: 'sparse', tags: ['person'], note: 'first name only on both; one mentions a city, the other a topic', canonical: null,+ held: { path: 'people/ana-example-contact.md', lines: [...fm({ type: 'person', title: 'Ana', slug: 'people/ana-example' }), '', '# Ana', '', 'Lives in Madrid.'] },+ named: { path: 'people/ana-example.md', lines: [...fm({ type: 'person', title: 'Ana Example' }), '', '# Ana Example', '', 'Interested in agent memory.'] } },+ { id: 'amb-03', set: 'ambiguous', cls: 'sparse', tags: ['person'], note: 'two placeholders with the same first name and no facts', canonical: null,+ held: { path: 'people/eli-example-2.md', lines: [...fm({ type: 'person', title: 'Eli Example', slug: 'people/eli-example' }), '', '# Eli Example', '', 'Placeholder page.'] },+ named: { path: 'people/eli-example.md', lines: [...fm({ type: 'person', title: 'Eli' }), '', '# Eli', '', 'Introduced by a friend.'] } },+ { id: 'amb-04', set: 'ambiguous', cls: 'sparse', tags: ['person'], note: 'same first name, each page a single sentence about a meeting', canonical: null,+ held: { path: 'people/ines-example-event.md', lines: [...fm({ type: 'person', title: 'Ines', slug: 'people/ines-example' }), '', '# Ines', '', 'Spoke at the memory systems meetup.'] },+ named: { path: 'people/ines-example.md', lines: [...fm({ type: 'person', title: 'Ines Example' }), '', '# Ines Example', '', 'Asked for an intro.'] } },+ { id: 'amb-05', set: 'ambiguous', cls: 'sparse', tags: ['company'], note: 'two sparse company pages with the same short name and no product described', canonical: null,+ held: { path: 'companies/nu-example-2.md', lines: [...fm({ type: 'company', title: 'Nu', slug: 'companies/nu-example' }), '', '# Nu', '', 'Early stage.'] },+ named: { path: 'companies/nu-example.md', lines: [...fm({ type: 'company', title: 'Nu Example' }), '', '# Nu Example', '', 'Heard about it at a demo day.'] } },+];diff --git a/evals/content-repair-judgment/check.ts b/evals/content-repair-judgment/check.tsnew file mode 100644index 0000000000..fb2bd5d5d3--- /dev/null+++ b/evals/content-repair-judgment/check.ts@@ -0,0 +1,42 @@+/**+ * The $0 fixture checks (harness `--check` and the keyless test): the set+ * counts plan section 4 fixes, unique ids, placeholder names only, every+ * held file's declared slug is the named page's slug and not its own, a true+ * duplicate's canonical is one of the two slugs, and every fixture tagged+ * `late_note` or `late_evidence` keeps its identity evidence out of the+ * first 60 body lines and inside `mentions` (otherwise the fixture does not+ * test what it claims). Pure.+ */+import type { Fixture } from './generate-fixtures.ts';+import { judgmentInput } from './input.ts';++export const SET_COUNTS: Record<Fixture['set'], number> = { true_duplicate: 25, stray_slug: 10, adversarial: 8, ambiguous: 5 };++/** Slug segments a fixture may use for a person, company or fund: placeholders only. */+const PLACEHOLDER_SEGMENT = /^(?:(?:[a-z]+-)+example(?:-[a-z0-9-]+)?|widget-?co|fund-[a-c]|\d{4}-\d{2}-\d{2}-[a-z-]+)$/;++export function checkFixtures(fixtures: readonly Fixture[]): string[] {+ const out: string[] = [];+ if (new Set(fixtures.map(f => f.id)).size !== fixtures.length) out.push('duplicate fixture ids');+ for (const [set, n] of Object.entries(SET_COUNTS)) {+ const have = fixtures.filter(f => f.set === set).length;+ if (have !== n) out.push(`${set}: ${have} fixtures, plan section 4 fixes ${n}`);+ }+ for (const f of fixtures) {+ const input = judgmentInput(f);+ for (const file of [f.held, f.named].filter((x): x is NonNullable<typeof x> => x !== null)) {+ const [kind, ...rest] = file.slug.split('/');+ if (['people', 'companies', 'funds'].includes(kind!) && !rest.every(seg => PLACEHOLDER_SEGMENT.test(seg))) out.push(`${f.id}: ${file.path} is not a placeholder name`);+ }+ if (f.named && input.held.frontmatter.slug !== f.named.slug) out.push(`${f.id}: the held file's slug line names ${input.held.frontmatter.slug ?? 'nothing'}, the named page is ${f.named.slug}`);+ if (input.held.frontmatter.slug === f.held.slug) out.push(`${f.id}: the held file's slug line names itself (exempt in production)`);+ if (f.set === 'true_duplicate' ? !(f.canonical === f.held.slug || f.canonical === f.named?.slug) : f.canonical !== null) out.push(`${f.id}: canonical ${f.canonical} is not one of the pair`);+ const late = f.tags.includes('late_note') || f.tags.includes('late_evidence');+ const heads = [...input.held.head_lines, ...(input.named?.head_lines ?? [])];+ const mentions = [...input.held.mentions, ...(input.named?.mentions ?? [])];+ if (late && mentions.length === 0) out.push(`${f.id}: tagged late but no line past the head mentions the other page`);+ if (late && heads.some(line => /Duplicate of|Not the same|Distinct from/.test(line))) out.push(`${f.id}: tagged late but the identity evidence sits in the first ${input.held.head_lines.length} lines`);+ if (!late && mentions.length) out.push(`${f.id}: not tagged late but ${mentions.length} line(s) past the head mention the other page`);+ }+ return out;+}diff --git a/evals/content-repair-judgment/fixtures.jsonl b/evals/content-repair-judgment/fixtures.jsonlnew file mode 100644index 0000000000..2cb3c99af4--- /dev/null+++ b/evals/content-repair-judgment/fixtures.jsonl@@ -0,0 +1,48 @@+{"id":"td-n-01","set":"true_duplicate","cls":"mutual_notes","tags":["person"],"note":"the issue shape: an imported copy of a person page, both pages note the other","held":{"path":"people/alice-example-hivemind.md","slug":"people/alice-example-hivemind","content":"---\ntype: person\ntitle: Alice Example\nslug: people/alice-example\n---\n\n# Alice Example\n\n> ⚠️ Duplicate of [[people/alice-example]]. Imported from a contact export; merge pending.\n\nCEO at [[companies/ridge-example]]. Based in Austin.\n\nPreviously an engineer at [[companies/summit-example]].\n\n## Timeline\n\n- **2026-01-26** | promoted to CEO of [[companies/ridge-example]]\n"},"named":{"path":"people/alice-example.md","slug":"people/alice-example","content":"---\ntype: person\ntitle: Alice Example\naliases: [alice, a-founder]\n---\n\n# Alice Example\n\n> ⚠️ Duplicate of [[people/alice-example-hivemind]]. That page is the import copy; this one is canonical.\n\nCEO at [[companies/ridge-example]]. Based in Austin.\n\nWorks on memory systems and [[concepts/synthesis-layers]].\n\n## Timeline\n\n- **2024-06-05** | joined [[companies/ridge-example]] as founding engineer\n- **2026-01-26** | promoted to CEO\n"},"canonical":"people/alice-example","expected":{"best":["merge_into"],"acceptable":["needs_human"],"hard":["remove_slug"]}}+{"id":"td-n-02","set":"true_duplicate","cls":"mutual_notes","tags":["person"],"note":"a -2 suffix page that is the same person","held":{"path":"people/bob-example-2.md","slug":"people/bob-example-2","content":"---\ntype: person\ntitle: Bob Example\nslug: people/bob-example\n---\n\n# Bob Example\n\n> ⚠️ Duplicate of [[people/bob-example]].\n\nCTO at [[companies/acme-example]].\n\n## Timeline\n\n- **2025-09-12** | demoed the new pipeline\n"},"named":{"path":"people/bob-example.md","slug":"people/bob-example","content":"---\ntype: person\ntitle: Bob Example\n---\n\n# Bob Example\n\n> ⚠️ Duplicate of [[people/bob-example-2]]. Same person; the -2 page was created by a second ingest.\n\nCTO at [[companies/acme-example]].\n\n## Timeline\n\n- **2024-02-01** | joined [[companies/acme-example]]\n"},"canonical":"people/bob-example","expected":{"best":["merge_into"],"acceptable":["needs_human"],"hard":["remove_slug"]}}+{"id":"td-n-03","set":"true_duplicate","cls":"mutual_notes","tags":["person","held_canonical"],"note":"the named page is the stub; notes name the held file as canonical","held":{"path":"people/carol-example-full.md","slug":"people/carol-example-full","content":"---\ntype: person\ntitle: Carol Example\naliases: [carol]\nslug: people/carol-example\n---\n\n# Carol Example\n\n> ⚠️ Duplicate of [[people/carol-example]]. This page keeps the history; the stub should fold into it.\n\nHead of Platform at [[companies/widget-co]]. Based in Berlin.\n\nRuns the platform team of nine engineers.\n\nReports to [[people/bob-example]].\n\n## Timeline\n\n- **2024-05-10** | joined [[companies/widget-co]]\n- **2026-01-20** | took over the platform team\n"},"named":{"path":"people/carol-example.md","slug":"people/carol-example","content":"---\ntype: person\ntitle: Carol Example\n---\n\n# Carol Example\n\n> ⚠️ Duplicate of [[people/carol-example-full]]. Stub created by a contact sync; the full page is canonical.\n\nPlatform lead at [[companies/widget-co]].\n"},"canonical":"people/carol-example-full","expected":{"best":["merge_into"],"acceptable":["needs_human"],"hard":["remove_slug"]}}+{"id":"td-n-04","set":"true_duplicate","cls":"mutual_notes","tags":["company"],"note":"a company page duplicated under its legal name","held":{"path":"companies/acme-example-inc.md","slug":"companies/acme-example-inc","content":"---\ntype: company\ntitle: Acme Example Inc.\nslug: companies/acme-example\n---\n\n# Acme Example Inc.\n\n> ⚠️ Duplicate of [[companies/acme-example]]. Legal-name variant.\n\nDeveloper tools for data pipelines. Series B. Headquartered in Denver.\n\n## Timeline\n\n- **2025-11-03** | opened the Denver office\n"},"named":{"path":"companies/acme-example.md","slug":"companies/acme-example","content":"---\ntype: company\ntitle: Acme Example\naliases: [acme]\n---\n\n# Acme Example\n\n> ⚠️ Duplicate of [[companies/acme-example-inc]]. The Inc. page is a duplicate from the CRM import.\n\nDeveloper tools for data pipelines. Series B. Headquartered in Denver.\n\n## Timeline\n\n- **2023-04-01** | founded\n- **2025-06-15** | Series B led by [[funds/fund-a]]\n"},"canonical":"companies/acme-example","expected":{"best":["merge_into"],"acceptable":["needs_human"],"hard":["remove_slug"]}}+{"id":"td-n-05","set":"true_duplicate","cls":"mutual_notes","tags":["concept"],"note":"two concept pages for one idea, both pointing at the other","held":{"path":"concepts/hybrid-search.md","slug":"concepts/hybrid-search","content":"---\ntype: concept\ntitle: Hybrid Search\nslug: concepts/hybrid-retrieval\n---\n\n# Hybrid Search\n\n> ⚠️ Duplicate of [[concepts/hybrid-retrieval]]. Same idea, older name.\n\nCombining lexical and vector retrieval and fusing the ranked lists.\n\n"},"named":{"path":"concepts/hybrid-retrieval.md","slug":"concepts/hybrid-retrieval","content":"---\ntype: concept\ntitle: Hybrid Retrieval\n---\n\n# Hybrid Retrieval\n\n> ⚠️ Duplicate of [[concepts/hybrid-search]]. The older page uses the previous name for this concept.\n\nLexical and vector retrieval run together; the ranked lists are fused.\n\nUsed by [[companies/ridge-example]] in its memory layer.\n\n"},"canonical":"concepts/hybrid-retrieval","expected":{"best":["merge_into"],"acceptable":["needs_human"],"hard":["remove_slug"]}}+{"id":"td-n-06","set":"true_duplicate","cls":"mutual_notes","tags":["person"],"note":"same person, page copied from a conversation import","held":{"path":"people/dana-example-import.md","slug":"people/dana-example-import","content":"---\ntype: person\ntitle: Dana Example\nslug: people/dana-example\n---\n\n# Dana Example\n\n> ⚠️ Duplicate of [[people/dana-example]].\n\nPartner at [[companies/fund-a]]. Based in New York.\n\n## Timeline\n\n- **2026-02-14** | led the seed round of [[companies/gamma-example]]\n"},"named":{"path":"people/dana-example.md","slug":"people/dana-example","content":"---\ntype: person\ntitle: Dana Example\n---\n\n# Dana Example\n\n> ⚠️ Duplicate of [[people/dana-example-import]]. Import copy from a chat export.\n\nPartner at [[companies/fund-a]]. Based in New York.\n\nFocus: infrastructure seed rounds.\n\n## Timeline\n\n- **2022-09-01** | joined [[companies/fund-a]] as partner\n"},"canonical":"people/dana-example","expected":{"best":["merge_into"],"acceptable":["needs_human"],"hard":["remove_slug"]}}+{"id":"td-n-07","set":"true_duplicate","cls":"mutual_notes","tags":["person"],"note":"nickname page for the same person","held":{"path":"people/ev-example.md","slug":"people/ev-example","content":"---\ntype: person\ntitle: Ev Example\nslug: people/evan-example\n---\n\n# Ev Example\n\n> ⚠️ Duplicate of [[people/evan-example]]. Nickname page.\n\nDesigner at [[companies/widget-co]].\n\n## Timeline\n\n- **2025-12-02** | shipped the onboarding redesign\n"},"named":{"path":"people/evan-example.md","slug":"people/evan-example","content":"---\ntype: person\ntitle: Evan Example\naliases: [ev]\n---\n\n# Evan Example\n\n> ⚠️ Duplicate of [[people/ev-example]]. Goes by Ev; that page duplicates this one.\n\nDesigner at [[companies/widget-co]].\n\n## Timeline\n\n- **2024-08-19** | joined [[companies/widget-co]]\n"},"canonical":"people/evan-example","expected":{"best":["merge_into"],"acceptable":["needs_human"],"hard":["remove_slug"]}}+{"id":"td-n-08","set":"true_duplicate","cls":"mutual_notes","tags":["company"],"note":"company page duplicated under its product name","held":{"path":"companies/gammaboard-example.md","slug":"companies/gammaboard-example","content":"---\ntype: company\ntitle: GammaBoard\nslug: companies/gamma-example\n---\n\n# GammaBoard\n\n> ⚠️ Duplicate of [[companies/gamma-example]]. Product name used as the company name.\n\nBoard-meeting software for seed-stage companies.\n\n## Timeline\n\n- **2026-01-09** | launched the investor update feature\n"},"named":{"path":"companies/gamma-example.md","slug":"companies/gamma-example","content":"---\ntype: company\ntitle: Gamma Example\naliases: [gammaboard]\n---\n\n# Gamma Example\n\n> ⚠️ Duplicate of [[companies/gammaboard-example]]. GammaBoard is the product; the page under that name duplicates this one.\n\nBoard-meeting software for seed-stage companies. Seed.\n\n## Timeline\n\n- **2025-04-20** | seed round led by [[people/dana-example]]\n"},"canonical":"companies/gamma-example","expected":{"best":["merge_into"],"acceptable":["needs_human"],"hard":["remove_slug"]}}+{"id":"td-n-09","set":"true_duplicate","cls":"mutual_notes","tags":["person","held_canonical"],"note":"the held file is the long-lived page; the named page was minted by a rename","held":{"path":"people/fay-example-old.md","slug":"people/fay-example-old","content":"---\ntype: person\ntitle: Fay Example\naliases: [fay]\nslug: people/fay-example\n---\n\n# Fay Example\n\n> ⚠️ Duplicate of [[people/fay-example]]. Renamed by mistake; this page has the history and stays.\n\nCOO at [[companies/delta-example]]. Based in Chicago.\n\nRan operations through two reorganisations.\n\n## Timeline\n\n- **2023-01-11** | joined [[companies/delta-example]]\n- **2025-07-01** | promoted to COO\n"},"named":{"path":"people/fay-example.md","slug":"people/fay-example","content":"---\ntype: person\ntitle: Fay Example\n---\n\n# Fay Example\n\n> ⚠️ Duplicate of [[people/fay-example-old]]. Created by a rename; the -old page is canonical.\n\nCOO at [[companies/delta-example]].\n"},"canonical":"people/fay-example-old","expected":{"best":["merge_into"],"acceptable":["needs_human"],"hard":["remove_slug"]}}+{"id":"td-n-10","set":"true_duplicate","cls":"mutual_notes","tags":["person","held_canonical"],"note":"held file canonical; named page is a one-line placeholder with the note","held":{"path":"people/gus-example-profile.md","slug":"people/gus-example-profile","content":"---\ntype: person\ntitle: Gus Example\nslug: people/gus-example\n---\n\n# Gus Example\n\n> ⚠️ Duplicate of [[people/gus-example]]. The short page should be folded into this profile.\n\nFounder at [[companies/beta-example]]. Based in Toronto.\n\nSecond-time founder; first company acquired by [[companies/acme-example]].\n\n## Timeline\n\n- **2024-03-03** | founded [[companies/beta-example]]\n"},"named":{"path":"people/gus-example.md","slug":"people/gus-example","content":"---\ntype: person\ntitle: Gus Example\n---\n\n# Gus Example\n\n> ⚠️ Duplicate of [[people/gus-example-profile]]. Placeholder; merge into the profile.\n"},"canonical":"people/gus-example-profile","expected":{"best":["merge_into"],"acceptable":["needs_human"],"hard":["remove_slug"]}}+{"id":"td-n-11","set":"true_duplicate","cls":"mutual_notes","tags":["person","linkedin_suffix"],"note":"a -linkedin suffix page from a profile import","held":{"path":"people/hana-example-linkedin.md","slug":"people/hana-example-linkedin","content":"---\ntype: person\ntitle: Hana Example\nslug: people/hana-example\n---\n\n# Hana Example\n\n> ⚠️ Duplicate of [[people/hana-example]]. Profile import.\n\nVP Engineering at [[companies/summit-example]].\n\nProfile headline: builds reliable infra teams.\n\n## Timeline\n\n"},"named":{"path":"people/hana-example.md","slug":"people/hana-example","content":"---\ntype: person\ntitle: Hana Example\n---\n\n# Hana Example\n\n> ⚠️ Duplicate of [[people/hana-example-linkedin]]. Profile import duplicates this page.\n\nVP Engineering at [[companies/summit-example]]. Based in Seattle.\n\n## Timeline\n\n- **2025-05-05** | joined [[companies/summit-example]]\n"},"canonical":"people/hana-example","expected":{"best":["merge_into"],"acceptable":["needs_human"],"hard":["remove_slug"]}}+{"id":"td-n-12","set":"true_duplicate","cls":"mutual_notes","tags":["concept"],"note":"concept duplicated with a plural title","held":{"path":"concepts/synthesis-layer.md","slug":"concepts/synthesis-layer","content":"---\ntype: concept\ntitle: Synthesis Layer\nslug: concepts/synthesis-layers\n---\n\n# Synthesis Layer\n\n> ⚠️ Duplicate of [[concepts/synthesis-layers]].\n\nA layer that compiles raw notes into durable claims.\n\n"},"named":{"path":"concepts/synthesis-layers.md","slug":"concepts/synthesis-layers","content":"---\ntype: concept\ntitle: Synthesis Layers\n---\n\n# Synthesis Layers\n\n> ⚠️ Duplicate of [[concepts/synthesis-layer]]. Singular-title copy.\n\nLayers that compile raw notes into durable claims, one per source kind.\n\nRelated: [[concepts/hybrid-retrieval]].\n\n"},"canonical":"concepts/synthesis-layers","expected":{"best":["merge_into"],"acceptable":["needs_human"],"hard":["remove_slug"]}}+{"id":"td-n-13","set":"true_duplicate","cls":"mutual_notes_late","tags":["person","late_note"],"note":"both duplicate notes sit after body line 60; only the mentions field shows them","held":{"path":"people/ivan-example-2.md","slug":"people/ivan-example-2","content":"---\ntype: person\ntitle: Ivan Example\nslug: people/ivan-example\n---\n\n# Ivan Example\n\nEngineer at [[companies/ridge-example]].\n\n## Timeline\n\n- **2025-02-02** | joined the retrieval team\n\n- **2025-01-01** | weekly sync\n- **2025-01-08** | reviewed the draft\n- **2025-01-15** | shared the metrics deck\n- **2025-01-22** | intro call\n- **2025-02-01** | follow-up on hiring\n- **2025-02-08** | office hours\n- **2025-02-15** | board prep\n- **2025-02-22** | product review\n- **2025-03-01** | weekly sync\n- **2025-03-08** | reviewed the draft\n- **2025-03-15** | shared the metrics deck\n- **2025-03-22** | intro call\n- **2025-04-01** | follow-up on hiring\n- **2025-04-08** | office hours\n- **2025-04-15** | board prep\n- **2025-04-22** | product review\n- **2025-05-01** | weekly sync\n- **2025-05-08** | reviewed the draft\n- **2025-05-15** | shared the metrics deck\n- **2025-05-22** | intro call\n- **2025-06-01** | follow-up on hiring\n- **2025-06-08** | office hours\n- **2025-06-15** | board prep\n- **2025-06-22** | product review\n- **2025-07-01** | weekly sync\n- **2025-07-08** | reviewed the draft\n- **2025-07-15** | shared the metrics deck\n- **2025-07-22** | intro call\n- **2025-08-01** | follow-up on hiring\n- **2025-08-08** | office hours\n- **2025-08-15** | board prep\n- **2025-08-22** | product review\n- **2025-09-01** | weekly sync\n- **2025-09-08** | reviewed the draft\n- **2025-09-15** | shared the metrics deck\n- **2025-09-22** | intro call\n- **2025-10-01** | follow-up on hiring\n- **2025-10-08** | office hours\n- **2025-10-15** | board prep\n- **2025-10-22** | product review\n- **2025-11-01** | weekly sync\n- **2025-11-08** | reviewed the draft\n- **2025-11-15** | shared the metrics deck\n- **2025-11-22** | intro call\n- **2025-12-01** | follow-up on hiring\n- **2025-12-08** | office hours\n- **2025-12-15** | board prep\n- **2025-12-22** | product review\n- **2026-01-01** | weekly sync\n- **2026-01-08** | reviewed the draft\n- **2026-01-15** | shared the metrics deck\n- **2026-01-22** | intro call\n- **2026-02-01** | follow-up on hiring\n- **2026-02-08** | office hours\n- **2026-02-15** | board prep\n- **2026-02-22** | product review\n- **2026-03-01** | weekly sync\n- **2026-03-08** | reviewed the draft\n- **2026-03-15** | shared the metrics deck\n- **2026-03-22** | intro call\n> ⚠️ Duplicate of [[people/ivan-example]]. Added after review: same person.\n"},"named":{"path":"people/ivan-example.md","slug":"people/ivan-example","content":"---\ntype: person\ntitle: Ivan Example\n---\n\n# Ivan Example\n\nEngineer at [[companies/ridge-example]]. Based in Lisbon.\n\n## Timeline\n\n- **2025-02-02** | joined [[companies/ridge-example]]\n\n- **2025-01-01** | weekly sync\n- **2025-01-08** | reviewed the draft\n- **2025-01-15** | shared the metrics deck\n- **2025-01-22** | intro call\n- **2025-02-01** | follow-up on hiring\n- **2025-02-08** | office hours\n- **2025-02-15** | board prep\n- **2025-02-22** | product review\n- **2025-03-01** | weekly sync\n- **2025-03-08** | reviewed the draft\n- **2025-03-15** | shared the metrics deck\n- **2025-03-22** | intro call\n- **2025-04-01** | follow-up on hiring\n- **2025-04-08** | office hours\n- **2025-04-15** | board prep\n- **2025-04-22** | product review\n- **2025-05-01** | weekly sync\n- **2025-05-08** | reviewed the draft\n- **2025-05-15** | shared the metrics deck\n- **2025-05-22** | intro call\n- **2025-06-01** | follow-up on hiring\n- **2025-06-08** | office hours\n- **2025-06-15** | board prep\n- **2025-06-22** | product review\n- **2025-07-01** | weekly sync\n- **2025-07-08** | reviewed the draft\n- **2025-07-15** | shared the metrics deck\n- **2025-07-22** | intro call\n- **2025-08-01** | follow-up on hiring\n- **2025-08-08** | office hours\n- **2025-08-15** | board prep\n- **2025-08-22** | product review\n- **2025-09-01** | weekly sync\n- **2025-09-08** | reviewed the draft\n- **2025-09-15** | shared the metrics deck\n- **2025-09-22** | intro call\n- **2025-10-01** | follow-up on hiring\n- **2025-10-08** | office hours\n- **2025-10-15** | board prep\n- **2025-10-22** | product review\n- **2025-11-01** | weekly sync\n- **2025-11-08** | reviewed the draft\n- **2025-11-15** | shared the metrics deck\n- **2025-11-22** | intro call\n- **2025-12-01** | follow-up on hiring\n- **2025-12-08** | office hours\n- **2025-12-15** | board prep\n- **2025-12-22** | product review\n- **2026-01-01** | weekly sync\n- **2026-01-08** | reviewed the draft\n- **2026-01-15** | shared the metrics deck\n- **2026-01-22** | intro call\n- **2026-02-01** | follow-up on hiring\n- **2026-02-08** | office hours\n- **2026-02-15** | board prep\n- **2026-02-22** | product review\n- **2026-03-01** | weekly sync\n- **2026-03-08** | reviewed the draft\n- **2026-03-15** | shared the metrics deck\n- **2026-03-22** | intro call\n> ⚠️ Duplicate of [[people/ivan-example-2]]. The -2 page is a duplicate from a second ingest.\n"},"canonical":"people/ivan-example","expected":{"best":["merge_into"],"acceptable":["needs_human"],"hard":["remove_slug"]}}+{"id":"td-n-14","set":"true_duplicate","cls":"mutual_notes_late","tags":["person","late_note"],"note":"late notes; the head of each page is sparse","held":{"path":"people/jade-example-dup.md","slug":"people/jade-example-dup","content":"---\ntype: person\ntitle: Jade Example\nslug: people/jade-example\n---\n\n# Jade Example\n\nAnalyst at [[companies/fund-b]].\n\n## Timeline\n\n\n- **2025-01-01** | weekly sync\n- **2025-01-08** | reviewed the draft\n- **2025-01-15** | shared the metrics deck\n- **2025-01-22** | intro call\n- **2025-02-01** | follow-up on hiring\n- **2025-02-08** | office hours\n- **2025-02-15** | board prep\n- **2025-02-22** | product review\n- **2025-03-01** | weekly sync\n- **2025-03-08** | reviewed the draft\n- **2025-03-15** | shared the metrics deck\n- **2025-03-22** | intro call\n- **2025-04-01** | follow-up on hiring\n- **2025-04-08** | office hours\n- **2025-04-15** | board prep\n- **2025-04-22** | product review\n- **2025-05-01** | weekly sync\n- **2025-05-08** | reviewed the draft\n- **2025-05-15** | shared the metrics deck\n- **2025-05-22** | intro call\n- **2025-06-01** | follow-up on hiring\n- **2025-06-08** | office hours\n- **2025-06-15** | board prep\n- **2025-06-22** | product review\n- **2025-07-01** | weekly sync\n- **2025-07-08** | reviewed the draft\n- **2025-07-15** | shared the metrics deck\n- **2025-07-22** | intro call\n- **2025-08-01** | follow-up on hiring\n- **2025-08-08** | office hours\n- **2025-08-15** | board prep\n- **2025-08-22** | product review\n- **2025-09-01** | weekly sync\n- **2025-09-08** | reviewed the draft\n- **2025-09-15** | shared the metrics deck\n- **2025-09-22** | intro call\n- **2025-10-01** | follow-up on hiring\n- **2025-10-08** | office hours\n- **2025-10-15** | board prep\n- **2025-10-22** | product review\n- **2025-11-01** | weekly sync\n- **2025-11-08** | reviewed the draft\n- **2025-11-15** | shared the metrics deck\n- **2025-11-22** | intro call\n- **2025-12-01** | follow-up on hiring\n- **2025-12-08** | office hours\n- **2025-12-15** | board prep\n- **2025-12-22** | product review\n- **2026-01-01** | weekly sync\n- **2026-01-08** | reviewed the draft\n- **2026-01-15** | shared the metrics deck\n- **2026-01-22** | intro call\n- **2026-02-01** | follow-up on hiring\n- **2026-02-08** | office hours\n- **2026-02-15** | board prep\n- **2026-02-22** | product review\n- **2026-03-01** | weekly sync\n- **2026-03-08** | reviewed the draft\n- **2026-03-15** | shared the metrics deck\n- **2026-03-22** | intro call\n- **2026-04-01** | follow-up on hiring\n> ⚠️ Duplicate of [[people/jade-example]]. Confirmed the same person by email thread.\n"},"named":{"path":"people/jade-example.md","slug":"people/jade-example","content":"---\ntype: person\ntitle: Jade Example\n---\n\n# Jade Example\n\nAnalyst at [[companies/fund-b]].\n\n## Timeline\n\n\n- **2025-01-01** | weekly sync\n- **2025-01-08** | reviewed the draft\n- **2025-01-15** | shared the metrics deck\n- **2025-01-22** | intro call\n- **2025-02-01** | follow-up on hiring\n- **2025-02-08** | office hours\n- **2025-02-15** | board prep\n- **2025-02-22** | product review\n- **2025-03-01** | weekly sync\n- **2025-03-08** | reviewed the draft\n- **2025-03-15** | shared the metrics deck\n- **2025-03-22** | intro call\n- **2025-04-01** | follow-up on hiring\n- **2025-04-08** | office hours\n- **2025-04-15** | board prep\n- **2025-04-22** | product review\n- **2025-05-01** | weekly sync\n- **2025-05-08** | reviewed the draft\n- **2025-05-15** | shared the metrics deck\n- **2025-05-22** | intro call\n- **2025-06-01** | follow-up on hiring\n- **2025-06-08** | office hours\n- **2025-06-15** | board prep\n- **2025-06-22** | product review\n- **2025-07-01** | weekly sync\n- **2025-07-08** | reviewed the draft\n- **2025-07-15** | shared the metrics deck\n- **2025-07-22** | intro call\n- **2025-08-01** | follow-up on hiring\n- **2025-08-08** | office hours\n- **2025-08-15** | board prep\n- **2025-08-22** | product review\n- **2025-09-01** | weekly sync\n- **2025-09-08** | reviewed the draft\n- **2025-09-15** | shared the metrics deck\n- **2025-09-22** | intro call\n- **2025-10-01** | follow-up on hiring\n- **2025-10-08** | office hours\n- **2025-10-15** | board prep\n- **2025-10-22** | product review\n- **2025-11-01** | weekly sync\n- **2025-11-08** | reviewed the draft\n- **2025-11-15** | shared the metrics deck\n- **2025-11-22** | intro call\n- **2025-12-01** | follow-up on hiring\n- **2025-12-08** | office hours\n- **2025-12-15** | board prep\n- **2025-12-22** | product review\n- **2026-01-01** | weekly sync\n- **2026-01-08** | reviewed the draft\n- **2026-01-15** | shared the metrics deck\n- **2026-01-22** | intro call\n- **2026-02-01** | follow-up on hiring\n- **2026-02-08** | office hours\n- **2026-02-15** | board prep\n- **2026-02-22** | product review\n- **2026-03-01** | weekly sync\n- **2026-03-08** | reviewed the draft\n- **2026-03-15** | shared the metrics deck\n- **2026-03-22** | intro call\n- **2026-04-01** | follow-up on hiring\n> ⚠️ Duplicate of [[people/jade-example-dup]]. Duplicate created by the calendar connector.\n"},"canonical":"people/jade-example","expected":{"best":["merge_into"],"acceptable":["needs_human"],"hard":["remove_slug"]}}+{"id":"td-n-15","set":"true_duplicate","cls":"mutual_notes_late","tags":["company","late_note"],"note":"company pair with late notes","held":{"path":"companies/delta-example-labs.md","slug":"companies/delta-example-labs","content":"---\ntype: company\ntitle: Delta Example Labs\nslug: companies/delta-example\n---\n\n# Delta Example Labs\n\nRobotics for warehouse picking.\n\n## Timeline\n\n\n- **2025-03-01** | weekly sync\n- **2025-03-08** | reviewed the draft\n- **2025-03-15** | shared the metrics deck\n- **2025-03-22** | intro call\n- **2025-04-01** | follow-up on hiring\n- **2025-04-08** | office hours\n- **2025-04-15** | board prep\n- **2025-04-22** | product review\n- **2025-05-01** | weekly sync\n- **2025-05-08** | reviewed the draft\n- **2025-05-15** | shared the metrics deck\n- **2025-05-22** | intro call\n- **2025-06-01** | follow-up on hiring\n- **2025-06-08** | office hours\n- **2025-06-15** | board prep\n- **2025-06-22** | product review\n- **2025-07-01** | weekly sync\n- **2025-07-08** | reviewed the draft\n- **2025-07-15** | shared the metrics deck\n- **2025-07-22** | intro call\n- **2025-08-01** | follow-up on hiring\n- **2025-08-08** | office hours\n- **2025-08-15** | board prep\n- **2025-08-22** | product review\n- **2025-09-01** | weekly sync\n- **2025-09-08** | reviewed the draft\n- **2025-09-15** | shared the metrics deck\n- **2025-09-22** | intro call\n- **2025-10-01** | follow-up on hiring\n- **2025-10-08** | office hours\n- **2025-10-15** | board prep\n- **2025-10-22** | product review\n- **2025-11-01** | weekly sync\n- **2025-11-08** | reviewed the draft\n- **2025-11-15** | shared the metrics deck\n- **2025-11-22** | intro call\n- **2025-12-01** | follow-up on hiring\n- **2025-12-08** | office hours\n- **2025-12-15** | board prep\n- **2025-12-22** | product review\n- **2026-01-01** | weekly sync\n- **2026-01-08** | reviewed the draft\n- **2026-01-15** | shared the metrics deck\n- **2026-01-22** | intro call\n- **2026-02-01** | follow-up on hiring\n- **2026-02-08** | office hours\n- **2026-02-15** | board prep\n- **2026-02-22** | product review\n- **2026-03-01** | weekly sync\n- **2026-03-08** | reviewed the draft\n- **2026-03-15** | shared the metrics deck\n- **2026-03-22** | intro call\n- **2026-04-01** | follow-up on hiring\n- **2026-04-08** | office hours\n- **2026-04-15** | board prep\n- **2026-04-22** | product review\n- **2026-05-01** | weekly sync\n- **2026-05-08** | reviewed the draft\n- **2026-05-15** | shared the metrics deck\n- **2026-05-22** | intro call\n- **2026-06-01** | follow-up on hiring\n> ⚠️ Duplicate of [[companies/delta-example]]. Labs is the research arm of the same company; one page.\n"},"named":{"path":"companies/delta-example.md","slug":"companies/delta-example","content":"---\ntype: company\ntitle: Delta Example\n---\n\n# Delta Example\n\nRobotics for warehouse picking. Series A. Headquartered in Chicago.\n\n## Timeline\n\n\n- **2025-03-01** | weekly sync\n- **2025-03-08** | reviewed the draft\n- **2025-03-15** | shared the metrics deck\n- **2025-03-22** | intro call\n- **2025-04-01** | follow-up on hiring\n- **2025-04-08** | office hours\n- **2025-04-15** | board prep\n- **2025-04-22** | product review\n- **2025-05-01** | weekly sync\n- **2025-05-08** | reviewed the draft\n- **2025-05-15** | shared the metrics deck\n- **2025-05-22** | intro call\n- **2025-06-01** | follow-up on hiring\n- **2025-06-08** | office hours\n- **2025-06-15** | board prep\n- **2025-06-22** | product review\n- **2025-07-01** | weekly sync\n- **2025-07-08** | reviewed the draft\n- **2025-07-15** | shared the metrics deck\n- **2025-07-22** | intro call\n- **2025-08-01** | follow-up on hiring\n- **2025-08-08** | office hours\n- **2025-08-15** | board prep\n- **2025-08-22** | product review\n- **2025-09-01** | weekly sync\n- **2025-09-08** | reviewed the draft\n- **2025-09-15** | shared the metrics deck\n- **2025-09-22** | intro call\n- **2025-10-01** | follow-up on hiring\n- **2025-10-08** | office hours\n- **2025-10-15** | board prep\n- **2025-10-22** | product review\n- **2025-11-01** | weekly sync\n- **2025-11-08** | reviewed the draft\n- **2025-11-15** | shared the metrics deck\n- **2025-11-22** | intro call\n- **2025-12-01** | follow-up on hiring\n- **2025-12-08** | office hours\n- **2025-12-15** | board prep\n- **2025-12-22** | product review\n- **2026-01-01** | weekly sync\n- **2026-01-08** | reviewed the draft\n- **2026-01-15** | shared the metrics deck\n- **2026-01-22** | intro call\n- **2026-02-01** | follow-up on hiring\n- **2026-02-08** | office hours\n- **2026-02-15** | board prep\n- **2026-02-22** | product review\n- **2026-03-01** | weekly sync\n- **2026-03-08** | reviewed the draft\n- **2026-03-15** | shared the metrics deck\n- **2026-03-22** | intro call\n- **2026-04-01** | follow-up on hiring\n- **2026-04-08** | office hours\n- **2026-04-15** | board prep\n- **2026-04-22** | product review\n- **2026-05-01** | weekly sync\n- **2026-05-08** | reviewed the draft\n- **2026-05-15** | shared the metrics deck\n- **2026-05-22** | intro call\n- **2026-06-01** | follow-up on hiring\n> ⚠️ Duplicate of [[companies/delta-example-labs]]. The Labs page duplicates this one.\n"},"canonical":"companies/delta-example","expected":{"best":["merge_into"],"acceptable":["needs_human"],"hard":["remove_slug"]}}+{"id":"td-q-01","set":"true_duplicate","cls":"no_notes","tags":["person"],"note":"same name, employer, role and a shared timeline entry","held":{"path":"people/kai-example-hivemind.md","slug":"people/kai-example-hivemind","content":"---\ntype: person\ntitle: Kai Example\nslug: people/kai-example\n---\n\n# Kai Example\n\nHead of Sales at [[companies/acme-example]]. Based in Denver.\n\n## Timeline\n\n- **2025-10-10** | closed the first enterprise deal\n"},"named":{"path":"people/kai-example.md","slug":"people/kai-example","content":"---\ntype: person\ntitle: Kai Example\n---\n\n# Kai Example\n\nHead of Sales at [[companies/acme-example]]. Based in Denver.\n\nIntroduced by [[people/alice-example]].\n\n## Timeline\n\n- **2025-03-01** | joined [[companies/acme-example]]\n- **2025-10-10** | closed the first enterprise deal\n"},"canonical":"people/kai-example","expected":{"best":["merge_into"],"acceptable":["needs_human"],"hard":["remove_slug"]}}+{"id":"td-q-02","set":"true_duplicate","cls":"no_notes","tags":["person","alias"],"note":"the named page lists the held slug's handle as an alias","held":{"path":"people/lena-m-example.md","slug":"people/lena-m-example","content":"---\ntype: person\ntitle: Lena M. Example\nslug: people/lena-example\n---\n\n# Lena M. Example\n\nResearch lead at [[companies/summit-example]].\n\nHandle: @lena_example.\n\n## Timeline\n\n"},"named":{"path":"people/lena-example.md","slug":"people/lena-example","content":"---\ntype: person\ntitle: Lena Example\naliases: [lena-m-example, \"@lena_example\"]\n---\n\n# Lena Example\n\nResearch lead at [[companies/summit-example]]. Based in Zurich.\n\n## Timeline\n\n- **2024-11-11** | published the retrieval benchmark\n"},"canonical":"people/lena-example","expected":{"best":["merge_into"],"acceptable":["needs_human"],"hard":["remove_slug"]}}+{"id":"td-q-03","set":"true_duplicate","cls":"no_notes","tags":["company","domain"],"note":"same company, same website, different capitalisation","held":{"path":"companies/widgetco.md","slug":"companies/widgetco","content":"---\ntype: company\ntitle: WidgetCo\nslug: companies/widget-co\n---\n\n# WidgetCo\n\nHardware widgets for industrial sensors.\n\nWebsite: widget-co.example.\n\n## Timeline\n\n- **2026-02-20** | opened a second factory\n"},"named":{"path":"companies/widget-co.md","slug":"companies/widget-co","content":"---\ntype: company\ntitle: Widget Co\n---\n\n# Widget Co\n\nHardware widgets for industrial sensors. Series C. Headquartered in Berlin.\n\nWebsite: widget-co.example.\n\n## Timeline\n\n- **2021-01-15** | founded\n"},"canonical":"companies/widget-co","expected":{"best":["merge_into"],"acceptable":["needs_human"],"hard":["remove_slug"]}}+{"id":"td-q-04","set":"true_duplicate","cls":"no_notes","tags":["person"],"note":"import copy with the same role and a matching intro date","held":{"path":"people/mira-example-import.md","slug":"people/mira-example-import","content":"---\ntype: person\ntitle: Mira Example\nslug: people/mira-example\n---\n\n# Mira Example\n\nProduct manager at [[companies/gamma-example]].\n\n## Timeline\n\n- **2026-01-08** | intro call about the investor update feature\n"},"named":{"path":"people/mira-example.md","slug":"people/mira-example","content":"---\ntype: person\ntitle: Mira Example\n---\n\n# Mira Example\n\nProduct manager at [[companies/gamma-example]]. Based in Austin.\n\n## Timeline\n\n- **2026-01-08** | intro call\n- **2026-02-01** | shared the Q1 roadmap\n"},"canonical":"people/mira-example","expected":{"best":["merge_into"],"acceptable":["needs_human"],"hard":["remove_slug"]}}+{"id":"td-q-05","set":"true_duplicate","cls":"no_notes","tags":["person"],"note":"maiden-name style variant with the same employer and start date","held":{"path":"people/noor-example-sample.md","slug":"people/noor-example-sample","content":"---\ntype: person\ntitle: Noor Example-Sample\nslug: people/noor-example\n---\n\n# Noor Example-Sample\n\nGeneral counsel at [[companies/delta-example]].\n\n## Timeline\n\n- **2023-06-01** | joined [[companies/delta-example]] as general counsel\n"},"named":{"path":"people/noor-example.md","slug":"people/noor-example","content":"---\ntype: person\ntitle: Noor Example\n---\n\n# Noor Example\n\nGeneral counsel at [[companies/delta-example]]. Based in Chicago.\n\n## Timeline\n\n- **2023-06-01** | joined [[companies/delta-example]] as general counsel\n"},"canonical":"people/noor-example","expected":{"best":["merge_into"],"acceptable":["needs_human"],"hard":["remove_slug"]}}+{"id":"td-q-06","set":"true_duplicate","cls":"no_notes","tags":["concept"],"note":"same concept, abbreviation as the title","held":{"path":"concepts/agent-mem.md","slug":"concepts/agent-mem","content":"---\ntype: concept\ntitle: Agent mem\nslug: concepts/agent-memory\n---\n\n# Agent mem\n\nDurable memory an agent reads before answering and writes after.\n\nSee [[concepts/synthesis-layers]].\n\n"},"named":{"path":"concepts/agent-memory.md","slug":"concepts/agent-memory","content":"---\ntype: concept\ntitle: Agent Memory\n---\n\n# Agent Memory\n\nDurable memory an agent reads before answering and writes after.\n\nBuilt from [[concepts/synthesis-layers]] over the raw record.\n\n"},"canonical":"concepts/agent-memory","expected":{"best":["merge_into"],"acceptable":["needs_human"],"hard":["remove_slug"]}}+{"id":"td-q-07","set":"true_duplicate","cls":"no_notes","tags":["person"],"note":"same person; the held page carries the new employer the named page already recorded","held":{"path":"people/omar-example-2.md","slug":"people/omar-example-2","content":"---\ntype: person\ntitle: Omar Example\nslug: people/omar-example\n---\n\n# Omar Example\n\nCFO at [[companies/beta-example]]. Based in Toronto.\n\n## Timeline\n\n- **2026-03-01** | joined [[companies/beta-example]] as CFO\n"},"named":{"path":"people/omar-example.md","slug":"people/omar-example","content":"---\ntype: person\ntitle: Omar Example\n---\n\n# Omar Example\n\nCFO at [[companies/beta-example]]. Based in Toronto.\n\nPreviously finance lead at [[companies/acme-example]].\n\n## Timeline\n\n- **2022-04-04** | joined [[companies/acme-example]]\n- **2026-03-01** | joined [[companies/beta-example]] as CFO\n"},"canonical":"people/omar-example","expected":{"best":["merge_into"],"acceptable":["needs_human"],"hard":["remove_slug"]}}+{"id":"td-q-08","set":"true_duplicate","cls":"no_notes","tags":["company"],"note":"company and its trade name, same product and city","held":{"path":"companies/summit-robotics-example.md","slug":"companies/summit-robotics-example","content":"---\ntype: company\ntitle: Summit Robotics Example\nslug: companies/summit-example\n---\n\n# Summit Robotics Example\n\nAutonomous inspection robots for utilities. Headquartered in Seattle.\n\n## Timeline\n\n- **2025-05-05** | hired [[people/hana-example]] as VP Engineering\n"},"named":{"path":"companies/summit-example.md","slug":"companies/summit-example","content":"---\ntype: company\ntitle: Summit Example\naliases: [summit-robotics]\n---\n\n# Summit Example\n\nAutonomous inspection robots for utilities. Series A. Headquartered in Seattle.\n\n## Timeline\n\n- **2024-01-20** | Series A led by [[funds/fund-b]]\n- **2025-05-05** | hired [[people/hana-example]]\n"},"canonical":"companies/summit-example","expected":{"best":["merge_into"],"acceptable":["needs_human"],"hard":["remove_slug"]}}+{"id":"td-q-09","set":"true_duplicate","cls":"no_notes","tags":["person"],"note":"same person; held page written from a meeting, named from a profile","held":{"path":"people/pia-example-meeting.md","slug":"people/pia-example-meeting","content":"---\ntype: person\ntitle: Pia Example\nslug: people/pia-example\n---\n\n# Pia Example\n\nFounder at [[companies/epsilon-example]].\n\nMet at the [[meetings/2026-02-21-graph-traversal-review]]; building graph tooling for compliance teams.\n\n## Timeline\n\n"},"named":{"path":"people/pia-example.md","slug":"people/pia-example","content":"---\ntype: person\ntitle: Pia Example\n---\n\n# Pia Example\n\nFounder at [[companies/epsilon-example]]. Based in Amsterdam.\n\nEpsilon builds graph tooling for compliance teams.\n\n## Timeline\n\n- **2026-02-21** | presented at the graph traversal review\n"},"canonical":"people/pia-example","expected":{"best":["merge_into"],"acceptable":["needs_human"],"hard":["remove_slug"]}}+{"id":"td-q-10","set":"true_duplicate","cls":"no_notes","tags":["person"],"note":"same person, title spelled with a middle initial","held":{"path":"people/quinn-r-example.md","slug":"people/quinn-r-example","content":"---\ntype: person\ntitle: Quinn R. Example\nslug: people/quinn-example\n---\n\n# Quinn R. Example\n\nStaff engineer at [[companies/ridge-example]]. Based in Lisbon.\n\n## Timeline\n\n- **2025-08-08** | led the vector index migration\n"},"named":{"path":"people/quinn-example.md","slug":"people/quinn-example","content":"---\ntype: person\ntitle: Quinn Example\n---\n\n# Quinn Example\n\nStaff engineer at [[companies/ridge-example]]. Based in Lisbon.\n\n## Timeline\n\n- **2024-10-10** | joined [[companies/ridge-example]]\n- **2025-08-08** | led the vector index migration\n"},"canonical":"people/quinn-example","expected":{"best":["merge_into"],"acceptable":["needs_human"],"hard":["remove_slug"]}}+{"id":"ss-01","set":"stray_slug","cls":"template_compendium","tags":["research"],"note":"the issue shape: a research compendium carrying another compendium's slug","held":{"path":"research/post-agi-two-tier/COMPENDIUM.md","slug":"research/post-agi-two-tier/compendium","content":"---\ntype: research\ntitle: Post-AGI Two-Tier Economy Compendium\nslug: research/regional-paper-acquisition/compendium\n---\n\n# Post-AGI Two-Tier Economy Compendium\n\nCompendium for the question: what a two-tier labour market after general automation would look like\n\n## Sources\n\n- [[concepts/agent-memory]]\n- three essays by [[people/alice-example]]\n\n## Findings\n\n- Findings are appended as the research runs.\n"},"named":{"path":"research/regional-paper-acquisition/COMPENDIUM.md","slug":"research/regional-paper-acquisition/compendium","content":"---\ntype: research\ntitle: Newspaper Acquisition Compendium\n---\n\n# Newspaper Acquisition Compendium\n\nCompendium for the question: what it would take to acquire and run a regional newspaper\n\n## Sources\n\n- public filings\n- a call with [[people/dana-example]]\n\n## Findings\n\n- Findings are appended as the research runs.\n"},"canonical":null,"expected":{"best":["remove_slug"],"acceptable":["needs_human"],"hard":["merge_into"]}}+{"id":"ss-02","set":"stray_slug","cls":"template_compendium","tags":["research"],"note":"compendium template copied with its slug line intact","held":{"path":"research/vector-index-costs/COMPENDIUM.md","slug":"research/vector-index-costs/compendium","content":"---\ntype: research\ntitle: Vector Index Cost Compendium\nslug: research/post-agi-two-tier/compendium\n---\n\n# Vector Index Cost Compendium\n\nCompendium for the question: how index cost scales with corpus size for each engine\n\n## Sources\n\n- [[companies/ridge-example]] benchmarks\n- engine documentation\n\n## Findings\n\n- Findings are appended as the research runs.\n"},"named":{"path":"research/post-agi-two-tier/COMPENDIUM.md","slug":"research/post-agi-two-tier/compendium","content":"---\ntype: research\ntitle: Post-AGI Two-Tier Economy Compendium\n---\n\n# Post-AGI Two-Tier Economy Compendium\n\nCompendium for the question: what a two-tier labour market after general automation would look like\n\n## Sources\n\n- [[concepts/agent-memory]]\n\n## Findings\n\n- Findings are appended as the research runs.\n"},"canonical":null,"expected":{"best":["remove_slug"],"acceptable":["needs_human"],"hard":["merge_into"]}}+{"id":"ss-03","set":"stray_slug","cls":"template_compendium","tags":["research"],"note":"compendium slug from a template on an unrelated research topic","held":{"path":"research/warehouse-robotics-market/COMPENDIUM.md","slug":"research/warehouse-robotics-market/compendium","content":"---\ntype: research\ntitle: Warehouse Robotics Market Compendium\nslug: research/vector-index-costs/compendium\n---\n\n# Warehouse Robotics Market Compendium\n\nCompendium for the question: who buys picking robots and at what payback period\n\n## Sources\n\n- [[companies/delta-example]]\n- analyst notes\n\n## Findings\n\n- Findings are appended as the research runs.\n"},"named":{"path":"research/vector-index-costs/COMPENDIUM.md","slug":"research/vector-index-costs/compendium","content":"---\ntype: research\ntitle: Vector Index Cost Compendium\n---\n\n# Vector Index Cost Compendium\n\nCompendium for the question: how index cost scales with corpus size for each engine\n\n## Sources\n\n- engine documentation\n\n## Findings\n\n- Findings are appended as the research runs.\n"},"canonical":null,"expected":{"best":["remove_slug"],"acceptable":["needs_human"],"hard":["merge_into"]}}+{"id":"ss-04","set":"stray_slug","cls":"template_compendium","tags":["research"],"note":"two compendia on neighbouring topics; still separate research","held":{"path":"research/graph-traversal-latency/COMPENDIUM.md","slug":"research/graph-traversal-latency/compendium","content":"---\ntype: research\ntitle: Graph Traversal Latency Compendium\nslug: research/hybrid-retrieval-quality/compendium\n---\n\n# Graph Traversal Latency Compendium\n\nCompendium for the question: how deep a traversal can go within an interactive budget\n\n## Sources\n\n- [[concepts/graph-traversal]]\n- [[meetings/2026-02-21-graph-traversal-review]]\n\n## Findings\n\n- Findings are appended as the research runs.\n"},"named":{"path":"research/hybrid-retrieval-quality/COMPENDIUM.md","slug":"research/hybrid-retrieval-quality/compendium","content":"---\ntype: research\ntitle: Hybrid Retrieval Quality Compendium\n---\n\n# Hybrid Retrieval Quality Compendium\n\nCompendium for the question: whether fused ranking beats either retriever alone on this corpus\n\n## Sources\n\n- [[concepts/hybrid-retrieval]]\n- the internal benchmark\n\n## Findings\n\n- Findings are appended as the research runs.\n"},"canonical":null,"expected":{"best":["remove_slug"],"acceptable":["needs_human"],"hard":["merge_into"]}}+{"id":"ss-05","set":"stray_slug","cls":"template_company","tags":["company"],"note":"company page built from the template page, slug line kept","held":{"path":"companies/zeta-example.md","slug":"companies/zeta-example","content":"---\ntype: company\ntitle: Zeta Example\nslug: companies/template-company-example\n---\n\n# Zeta Example\n\nPayments for marketplaces in Latin America. Seed. Headquartered in Mexico City.\n\n## Timeline\n\n- **2026-01-15** | seed round led by [[funds/fund-a]]\n"},"named":{"path":"companies/template-company-example.md","slug":"companies/template-company-example","content":"---\ntype: company\ntitle: Template Company Example\n---\n\n# Template Company Example\n\nReplace this line with what the company does.\n\nReplace this section with context from the first meeting.\n\n## Timeline\n\n- **YYYY-MM-DD** | replace with the first event\n"},"canonical":null,"expected":{"best":["remove_slug"],"acceptable":["needs_human"],"hard":["merge_into"]}}+{"id":"ss-06","set":"stray_slug","cls":"template_company","tags":["company"],"note":"another page from the same template","held":{"path":"companies/theta-example.md","slug":"companies/theta-example","content":"---\ntype: company\ntitle: Theta Example\nslug: companies/template-company-example\n---\n\n# Theta Example\n\nScheduling software for clinics. Series A. Headquartered in Boston.\n\n## Timeline\n\n- **2025-09-30** | Series A led by [[funds/fund-b]]\n"},"named":{"path":"companies/template-company-example.md","slug":"companies/template-company-example","content":"---\ntype: company\ntitle: Template Company Example\n---\n\n# Template Company Example\n\nReplace this line with what the company does.\n\nReplace this section with context from the first meeting.\n\n## Timeline\n\n"},"canonical":null,"expected":{"best":["remove_slug"],"acceptable":["needs_human"],"hard":["merge_into"]}}+{"id":"ss-07","set":"stray_slug","cls":"copied_page","tags":["company"],"note":"a company page copied from another company's page and rewritten, slug line left behind","held":{"path":"companies/iota-example.md","slug":"companies/iota-example","content":"---\ntype: company\ntitle: Iota Example\nslug: companies/acme-example\n---\n\n# Iota Example\n\nSatellite imagery analytics for agriculture. Series A. Headquartered in Nairobi.\n\n## Timeline\n\n- **2025-02-02** | Series A\n"},"named":{"path":"companies/acme-example.md","slug":"companies/acme-example","content":"---\ntype: company\ntitle: Acme Example\naliases: [acme]\n---\n\n# Acme Example\n\nDeveloper tools for data pipelines. Series B. Headquartered in Denver.\n\n## Timeline\n\n- **2023-04-01** | founded\n"},"canonical":null,"expected":{"best":["remove_slug"],"acceptable":["needs_human"],"hard":["merge_into"]}}+{"id":"ss-08","set":"stray_slug","cls":"copied_page","tags":["person"],"note":"a person page copied from another person's page; different name, employer and city","held":{"path":"people/rhea-example.md","slug":"people/rhea-example","content":"---\ntype: person\ntitle: Rhea Example\nslug: people/alice-example\n---\n\n# Rhea Example\n\nHead of Marketing at [[companies/theta-example]]. Based in Boston.\n\n## Timeline\n\n- **2025-10-01** | joined [[companies/theta-example]]\n"},"named":{"path":"people/alice-example.md","slug":"people/alice-example","content":"---\ntype: person\ntitle: Alice Example\naliases: [alice, a-founder]\n---\n\n# Alice Example\n\nCEO at [[companies/ridge-example]]. Based in Austin.\n\n## Timeline\n\n- **2026-01-26** | promoted to CEO\n"},"canonical":null,"expected":{"best":["remove_slug"],"acceptable":["needs_human"],"hard":["merge_into"]}}+{"id":"ss-09","set":"stray_slug","cls":"cross_type_token","tags":["meeting","company"],"note":"a meeting page naming the company in its title carries the company's slug (different type, shared title token)","held":{"path":"meetings/2026-03-02-acme-example-intro.md","slug":"meetings/2026-03-02-acme-example-intro","content":"---\ntype: meeting\ntitle: Acme Example intro\nslug: companies/acme-example\ndate: 2026-03-02\n---\n\n# Acme Example intro\n\nIntro call with [[people/kai-example]] about the data pipeline tooling.\n\n## Notes\n\n- They want a pilot in Q2.\n- Follow up with pricing.\n"},"named":{"path":"companies/acme-example.md","slug":"companies/acme-example","content":"---\ntype: company\ntitle: Acme Example\naliases: [acme]\n---\n\n# Acme Example\n\nDeveloper tools for data pipelines. Series B. Headquartered in Denver.\n\n## Timeline\n\n- **2023-04-01** | founded\n"},"canonical":null,"expected":{"best":["remove_slug"],"acceptable":["needs_human"],"hard":["merge_into"]}}+{"id":"ss-10","set":"stray_slug","cls":"cross_type_token","tags":["concept","company"],"note":"a concept page sharing a title token with a company page carries its slug","held":{"path":"concepts/summit-inspection-pattern.md","slug":"concepts/summit-inspection-pattern","content":"---\ntype: concept\ntitle: Summit inspection pattern\nslug: companies/summit-example\n---\n\n# Summit inspection pattern\n\nScheduling inspection robots by asset risk rather than by route, as [[companies/summit-example]] does.\n\n"},"named":{"path":"companies/summit-example.md","slug":"companies/summit-example","content":"---\ntype: company\ntitle: Summit Example\n---\n\n# Summit Example\n\nAutonomous inspection robots for utilities. Series A. Headquartered in Seattle.\n\n## Timeline\n\n"},"canonical":null,"expected":{"best":["remove_slug"],"acceptable":["needs_human"],"hard":["merge_into"]}}+{"id":"adv-01","set":"adversarial","cls":"same_name_different_employer","tags":["person"],"note":"two people named Sam Example at different companies in different cities","held":{"path":"people/sam-example-2.md","slug":"people/sam-example-2","content":"---\ntype: person\ntitle: Sam Example\nslug: people/sam-example\n---\n\n# Sam Example\n\nProduct designer at [[companies/widget-co]]. Based in Berlin.\n\n## Timeline\n\n- **2026-02-10** | redesigned the sensor dashboard\n"},"named":{"path":"people/sam-example.md","slug":"people/sam-example","content":"---\ntype: person\ntitle: Sam Example\n---\n\n# Sam Example\n\nCTO at [[companies/acme-example]]. Based in Denver.\n\n## Timeline\n\n- **2023-04-01** | co-founded [[companies/acme-example]]\n"},"canonical":null,"expected":{"best":["remove_slug"],"acceptable":["needs_human"],"hard":["merge_into"]}}+{"id":"adv-02","set":"adversarial","cls":"same_name_different_employer","tags":["person"],"note":"same name, one a founder in Toronto, one an investor in New York","held":{"path":"people/tess-example-fund.md","slug":"people/tess-example-fund","content":"---\ntype: person\ntitle: Tess Example\nslug: people/tess-example\n---\n\n# Tess Example\n\nPrincipal at [[companies/fund-b]]. Based in New York.\n\nCovers robotics and industrial software.\n\n## Timeline\n\n- **2025-01-15** | joined [[companies/fund-b]]\n"},"named":{"path":"people/tess-example.md","slug":"people/tess-example","content":"---\ntype: person\ntitle: Tess Example\n---\n\n# Tess Example\n\nFounder at [[companies/beta-example]]. Based in Toronto.\n\n## Timeline\n\n- **2024-03-03** | co-founded [[companies/beta-example]] with [[people/gus-example]]\n"},"canonical":null,"expected":{"best":["remove_slug"],"acceptable":["needs_human"],"hard":["merge_into"]}}+{"id":"adv-03","set":"adversarial","cls":"suffix_different_person","tags":["person"],"note":"a -2 suffix minted for a different Uma Example; employers, roles and years differ","held":{"path":"people/uma-example-2.md","slug":"people/uma-example-2","content":"---\ntype: person\ntitle: Uma Example\nslug: people/uma-example\n---\n\n# Uma Example\n\nPediatric nurse at [[companies/theta-example]]. Based in Boston.\n\nClinic scheduling pilot contact.\n\n## Timeline\n\n- **2026-01-20** | joined the clinic pilot\n"},"named":{"path":"people/uma-example.md","slug":"people/uma-example","content":"---\ntype: person\ntitle: Uma Example\n---\n\n# Uma Example\n\nMachine learning engineer at [[companies/ridge-example]]. Based in Lisbon.\n\n## Timeline\n\n- **2024-09-09** | joined [[companies/ridge-example]]\n"},"canonical":null,"expected":{"best":["remove_slug"],"acceptable":["needs_human"],"hard":["merge_into"]}}+{"id":"adv-04","set":"adversarial","cls":"suffix_different_person","tags":["person"],"note":"a -2 suffix with a near-identical title; the middle initial and everything else differ","held":{"path":"people/vik-example-2.md","slug":"people/vik-example-2","content":"---\ntype: person\ntitle: Vik J. Example\nslug: people/vik-example\n---\n\n# Vik J. Example\n\nSous chef at [[companies/kappa-example]]. Based in Chicago.\n\n## Timeline\n\n- **2025-12-12** | catered the [[companies/delta-example]] offsite\n"},"named":{"path":"people/vik-example.md","slug":"people/vik-example","content":"---\ntype: person\ntitle: Vik Example\n---\n\n# Vik Example\n\nSecurity engineer at [[companies/summit-example]]. Based in Seattle.\n\n## Timeline\n\n- **2025-06-06** | joined [[companies/summit-example]]\n"},"canonical":null,"expected":{"best":["remove_slug"],"acceptable":["needs_human"],"hard":["merge_into"]}}+{"id":"adv-05","set":"adversarial","cls":"forged_note","tags":["person"],"note":"the held page carries a duplicate note, but its content is a different person and the named page contradicts it","held":{"path":"people/wren-example-dup.md","slug":"people/wren-example-dup","content":"---\ntype: person\ntitle: Wren Example\nslug: people/wren-example\n---\n\n# Wren Example\n\n> ⚠️ Duplicate of [[people/wren-example]].\n\nLandscape architect at [[companies/lambda-example]]. Based in Portland.\n\n## Timeline\n\n- **2026-02-02** | designed the campus garden\n"},"named":{"path":"people/wren-example.md","slug":"people/wren-example","content":"---\ntype: person\ntitle: Wren Example\n---\n\n# Wren Example\n\nData engineer at [[companies/gamma-example]]. Based in Austin.\n\nNot related to the landscape architect of the same name.\n\n## Timeline\n\n- **2025-07-07** | joined [[companies/gamma-example]]\n"},"canonical":null,"expected":{"best":["remove_slug"],"acceptable":["needs_human"],"hard":["merge_into"]}}+{"id":"adv-06","set":"adversarial","cls":"forged_note","tags":["company"],"note":"a company page with a duplicate note pointing at an unrelated company in another industry","held":{"path":"companies/mu-example.md","slug":"companies/mu-example","content":"---\ntype: company\ntitle: Mu Example\nslug: companies/widget-co\n---\n\n# Mu Example\n\n> ⚠️ Duplicate of [[companies/widget-co]].\n\nTelehealth for rural clinics. Seed. Headquartered in Boston.\n\n## Timeline\n\n- **2026-01-05** | seed round\n"},"named":{"path":"companies/widget-co.md","slug":"companies/widget-co","content":"---\ntype: company\ntitle: Widget Co\n---\n\n# Widget Co\n\nHardware widgets for industrial sensors. Series C. Headquartered in Berlin.\n\n## Timeline\n\n- **2021-01-15** | founded\n"},"canonical":null,"expected":{"best":["remove_slug"],"acceptable":["needs_human"],"hard":["merge_into"]}}+{"id":"adv-07","set":"adversarial","cls":"late_evidence","tags":["person","late_evidence"],"note":"the first 60 lines look like a duplicate; a line past line 60 says it is a different person","held":{"path":"people/xia-example-2.md","slug":"people/xia-example-2","content":"---\ntype: person\ntitle: Xia Example\nslug: people/xia-example\n---\n\n# Xia Example\n\nEngineer at [[companies/acme-example]].\n\n## Timeline\n\n- **2025-04-04** | intro call\n\n- **2025-04-01** | weekly sync\n- **2025-04-08** | reviewed the draft\n- **2025-04-15** | shared the metrics deck\n- **2025-04-22** | intro call\n- **2025-05-01** | follow-up on hiring\n- **2025-05-08** | office hours\n- **2025-05-15** | board prep\n- **2025-05-22** | product review\n- **2025-06-01** | weekly sync\n- **2025-06-08** | reviewed the draft\n- **2025-06-15** | shared the metrics deck\n- **2025-06-22** | intro call\n- **2025-07-01** | follow-up on hiring\n- **2025-07-08** | office hours\n- **2025-07-15** | board prep\n- **2025-07-22** | product review\n- **2025-08-01** | weekly sync\n- **2025-08-08** | reviewed the draft\n- **2025-08-15** | shared the metrics deck\n- **2025-08-22** | intro call\n- **2025-09-01** | follow-up on hiring\n- **2025-09-08** | office hours\n- **2025-09-15** | board prep\n- **2025-09-22** | product review\n- **2025-10-01** | weekly sync\n- **2025-10-08** | reviewed the draft\n- **2025-10-15** | shared the metrics deck\n- **2025-10-22** | intro call\n- **2025-11-01** | follow-up on hiring\n- **2025-11-08** | office hours\n- **2025-11-15** | board prep\n- **2025-11-22** | product review\n- **2025-12-01** | weekly sync\n- **2025-12-08** | reviewed the draft\n- **2025-12-15** | shared the metrics deck\n- **2025-12-22** | intro call\n- **2026-01-01** | follow-up on hiring\n- **2026-01-08** | office hours\n- **2026-01-15** | board prep\n- **2026-01-22** | product review\n- **2026-02-01** | weekly sync\n- **2026-02-08** | reviewed the draft\n- **2026-02-15** | shared the metrics deck\n- **2026-02-22** | intro call\n- **2026-03-01** | follow-up on hiring\n- **2026-03-08** | office hours\n- **2026-03-15** | board prep\n- **2026-03-22** | product review\n- **2026-04-01** | weekly sync\n- **2026-04-08** | reviewed the draft\n- **2026-04-15** | shared the metrics deck\n- **2026-04-22** | intro call\n- **2026-05-01** | follow-up on hiring\n- **2026-05-08** | office hours\n- **2026-05-15** | board prep\n- **2026-05-22** | product review\n- **2026-06-01** | weekly sync\n- **2026-06-08** | reviewed the draft\n- **2026-06-15** | shared the metrics deck\n- **2026-06-22** | intro call\n- **2026-03-03** | Not the same person as [[people/xia-example]]: that Xia leads the Lisbon office of [[companies/ridge-example]]; this one is on the Denver pipeline team.\n"},"named":{"path":"people/xia-example.md","slug":"people/xia-example","content":"---\ntype: person\ntitle: Xia Example\n---\n\n# Xia Example\n\nEngineer at [[companies/ridge-example]]. Based in Lisbon.\n\n## Timeline\n\n- **2024-12-01** | joined [[companies/ridge-example]]\n"},"canonical":null,"expected":{"best":["remove_slug"],"acceptable":["needs_human"],"hard":["merge_into"]}}+{"id":"adv-08","set":"adversarial","cls":"late_evidence","tags":["person","late_evidence"],"note":"the named page carries the disambiguation past line 60","held":{"path":"people/yuki-example-2.md","slug":"people/yuki-example-2","content":"---\ntype: person\ntitle: Yuki Example\nslug: people/yuki-example\n---\n\n# Yuki Example\n\nDesigner at [[companies/widget-co]].\n\n## Timeline\n\n"},"named":{"path":"people/yuki-example.md","slug":"people/yuki-example","content":"---\ntype: person\ntitle: Yuki Example\n---\n\n# Yuki Example\n\nDesigner at [[companies/widget-co]]. Based in Berlin.\n\n## Timeline\n\n- **2025-01-01** | joined [[companies/widget-co]]\n\n- **2025-01-01** | weekly sync\n- **2025-01-08** | reviewed the draft\n- **2025-01-15** | shared the metrics deck\n- **2025-01-22** | intro call\n- **2025-02-01** | follow-up on hiring\n- **2025-02-08** | office hours\n- **2025-02-15** | board prep\n- **2025-02-22** | product review\n- **2025-03-01** | weekly sync\n- **2025-03-08** | reviewed the draft\n- **2025-03-15** | shared the metrics deck\n- **2025-03-22** | intro call\n- **2025-04-01** | follow-up on hiring\n- **2025-04-08** | office hours\n- **2025-04-15** | board prep\n- **2025-04-22** | product review\n- **2025-05-01** | weekly sync\n- **2025-05-08** | reviewed the draft\n- **2025-05-15** | shared the metrics deck\n- **2025-05-22** | intro call\n- **2025-06-01** | follow-up on hiring\n- **2025-06-08** | office hours\n- **2025-06-15** | board prep\n- **2025-06-22** | product review\n- **2025-07-01** | weekly sync\n- **2025-07-08** | reviewed the draft\n- **2025-07-15** | shared the metrics deck\n- **2025-07-22** | intro call\n- **2025-08-01** | follow-up on hiring\n- **2025-08-08** | office hours\n- **2025-08-15** | board prep\n- **2025-08-22** | product review\n- **2025-09-01** | weekly sync\n- **2025-09-08** | reviewed the draft\n- **2025-09-15** | shared the metrics deck\n- **2025-09-22** | intro call\n- **2025-10-01** | follow-up on hiring\n- **2025-10-08** | office hours\n- **2025-10-15** | board prep\n- **2025-10-22** | product review\n- **2025-11-01** | weekly sync\n- **2025-11-08** | reviewed the draft\n- **2025-11-15** | shared the metrics deck\n- **2025-11-22** | intro call\n- **2025-12-01** | follow-up on hiring\n- **2025-12-08** | office hours\n- **2025-12-15** | board prep\n- **2025-12-22** | product review\n- **2026-01-01** | weekly sync\n- **2026-01-08** | reviewed the draft\n- **2026-01-15** | shared the metrics deck\n- **2026-01-22** | intro call\n- **2026-02-01** | follow-up on hiring\n- **2026-02-08** | office hours\n- **2026-02-15** | board prep\n- **2026-02-22** | product review\n- **2026-03-01** | weekly sync\n- **2026-03-08** | reviewed the draft\n- **2026-03-15** | shared the metrics deck\n- **2026-03-22** | intro call\n- **2026-02-28** | Distinct from [[people/yuki-example-2]]: a contractor with the same name on the hardware team; keep the pages apart.\n"},"canonical":null,"expected":{"best":["remove_slug"],"acceptable":["needs_human"],"hard":["merge_into"]}}+{"id":"amb-01","set":"ambiguous","cls":"sparse","tags":["person"],"note":"two sparse pages sharing a first name and nothing else","held":{"path":"people/zed-example-2.md","slug":"people/zed-example-2","content":"---\ntype: person\ntitle: Zed\nslug: people/zed-example\n---\n\n# Zed\n\nMet at a dinner.\n"},"named":{"path":"people/zed-example.md","slug":"people/zed-example","content":"---\ntype: person\ntitle: Zed Example\n---\n\n# Zed Example\n\nFounder, stage unknown.\n"},"canonical":null,"expected":{"best":["needs_human"],"acceptable":[],"hard":[]}}+{"id":"amb-02","set":"ambiguous","cls":"sparse","tags":["person"],"note":"first name only on both; one mentions a city, the other a topic","held":{"path":"people/ana-example-contact.md","slug":"people/ana-example-contact","content":"---\ntype: person\ntitle: Ana\nslug: people/ana-example\n---\n\n# Ana\n\nLives in Madrid.\n"},"named":{"path":"people/ana-example.md","slug":"people/ana-example","content":"---\ntype: person\ntitle: Ana Example\n---\n\n# Ana Example\n\nInterested in agent memory.\n"},"canonical":null,"expected":{"best":["needs_human"],"acceptable":[],"hard":[]}}+{"id":"amb-03","set":"ambiguous","cls":"sparse","tags":["person"],"note":"two placeholders with the same first name and no facts","held":{"path":"people/eli-example-2.md","slug":"people/eli-example-2","content":"---\ntype: person\ntitle: Eli Example\nslug: people/eli-example\n---\n\n# Eli Example\n\nPlaceholder page.\n"},"named":{"path":"people/eli-example.md","slug":"people/eli-example","content":"---\ntype: person\ntitle: Eli\n---\n\n# Eli\n\nIntroduced by a friend.\n"},"canonical":null,"expected":{"best":["needs_human"],"acceptable":[],"hard":[]}}+{"id":"amb-04","set":"ambiguous","cls":"sparse","tags":["person"],"note":"same first name, each page a single sentence about a meeting","held":{"path":"people/ines-example-event.md","slug":"people/ines-example-event","content":"---\ntype: person\ntitle: Ines\nslug: people/ines-example\n---\n\n# Ines\n\nSpoke at the memory systems meetup.\n"},"named":{"path":"people/ines-example.md","slug":"people/ines-example","content":"---\ntype: person\ntitle: Ines Example\n---\n\n# Ines Example\n\nAsked for an intro.\n"},"canonical":null,"expected":{"best":["needs_human"],"acceptable":[],"hard":[]}}+{"id":"amb-05","set":"ambiguous","cls":"sparse","tags":["company"],"note":"two sparse company pages with the same short name and no product described","held":{"path":"companies/nu-example-2.md","slug":"companies/nu-example-2","content":"---\ntype: company\ntitle: Nu\nslug: companies/nu-example\n---\n\n# Nu\n\nEarly stage.\n"},"named":{"path":"companies/nu-example.md","slug":"companies/nu-example","content":"---\ntype: company\ntitle: Nu Example\n---\n\n# Nu Example\n\nHeard about it at a demo day.\n"},"canonical":null,"expected":{"best":["needs_human"],"acceptable":[],"hard":[]}}diff --git a/evals/content-repair-judgment/generate-fixtures.ts b/evals/content-repair-judgment/generate-fixtures.tsnew file mode 100644index 0000000000..7fb5593a3a--- /dev/null+++ b/evals/content-repair-judgment/generate-fixtures.ts@@ -0,0 +1,69 @@+#!/usr/bin/env bun+/**+ * Builds fixtures.jsonl from cases.ts; deterministic, no dates, no randomness.+ *+ * Each case becomes one fixture: the held file and the named page as path,+ * path-derived slug and content, the canonical slug for a true duplicate,+ * and the expected verdict set the scorer grades against (`best`,+ * `acceptable`, `hard`). The judgment input the model sees (frontmatter,+ * headings, first 60 body lines, lines mentioning the other page) is built+ * from the content at run time by `input.ts`, so a fixture carries the files+ * as they would sit in a checkout and nothing derived.+ *+ * Regenerate: bun evals/content-repair-judgment/generate-fixtures.ts+ * Output: evals/content-repair-judgment/fixtures.jsonl (committed)+ */+import { writeFileSync } from 'node:fs';+import { join } from 'node:path';+import { slugifyPath } from '../../src/core/sync.ts';+import { CASES, type Case, type CaseFile } from './cases.ts';++export const FIXTURES_PATH = join(import.meta.dir, 'fixtures.jsonl');++/** The three coded answers the model may give; `merge_into` carries a canonical slug in the verdict. */+export type Answer = 'merge_into' | 'remove_slug' | 'needs_human';++export interface FixtureFile { path: string; slug: string; content: string }++export interface Fixture {+ id: string;+ set: Case['set'];+ cls: Case['cls'];+ tags: string[];+ note: string;+ held: FixtureFile;+ named: FixtureFile | null;+ /** True duplicates: the slug that keeps the page. */+ canonical: string | null;+ /**+ * `best`: the answers a correct model gives. `acceptable`: safe answers that cost a repair but not correctness+ * (`needs_human` always; for an adversarial pair `remove_slug` is best and `needs_human` acceptable). `hard`: answers that+ * would damage the brain (a `merge_into` of two different things or into the wrong canonical; a `remove_slug` that mints a+ * second page for one thing). An ambiguous pair has no hard answer: a guess is reported, not counted.+ */+ expected: { best: Answer[]; acceptable: Answer[]; hard: Answer[] };+}++export function expectedFor(set: Case['set']): Fixture['expected'] {+ switch (set) {+ case 'true_duplicate': return { best: ['merge_into'], acceptable: ['needs_human'], hard: ['remove_slug'] };+ case 'stray_slug': return { best: ['remove_slug'], acceptable: ['needs_human'], hard: ['merge_into'] };+ case 'adversarial': return { best: ['remove_slug'], acceptable: ['needs_human'], hard: ['merge_into'] };+ case 'ambiguous': return { best: ['needs_human'], acceptable: [], hard: [] };+ }+}++const fileOf = (f: CaseFile): FixtureFile => ({ path: f.path, slug: slugifyPath(f.path), content: f.lines.join('\n') + '\n' });++export function buildFixtures(cases: readonly Case[] = CASES): Fixture[] {+ return cases.map(c => ({ id: c.id, set: c.set, cls: c.cls, tags: c.tags, note: c.note, held: fileOf(c.held), named: c.named ? fileOf(c.named) : null, canonical: c.canonical, expected: expectedFor(c.set) }));+}++export function fixturesJsonl(cases: readonly Case[] = CASES): string {+ return buildFixtures(cases).map(f => JSON.stringify(f)).join('\n') + '\n';+}++if (import.meta.main) {+ writeFileSync(FIXTURES_PATH, fixturesJsonl(CASES));+ console.log(`wrote ${CASES.length} fixtures to ${FIXTURES_PATH}`);+}diff --git a/evals/content-repair-judgment/harness.ts b/evals/content-repair-judgment/harness.tsnew file mode 100644index 0000000000..138ade2487--- /dev/null+++ b/evals/content-repair-judgment/harness.ts@@ -0,0 +1,146 @@+#!/usr/bin/env bun+/**+ * Content-repair judgment eval runner (#6377, plan section 4).+ *+ * CHECK mode ($0, no key):+ * bun evals/content-repair-judgment/harness.ts --check+ * Verifies fixtures.jsonl matches cases.ts, builds every pair's judgment+ * input and prints what the model would see per set: how many lines the+ * head carries and which pairs put identity evidence past line 60 (so only+ * `mentions` shows it). Exit 1 on drift or a fixture whose late evidence is+ * not in `mentions`.+ *+ * SCORE mode ($0):+ * bun evals/content-repair-judgment/harness.ts --score a.jsonl b.jsonl ... [--json summary.json] [--md summary.md]+ * Pools the rows, ranks the models (qualifying first, by true-duplicate+ * accuracy, ties to the cheaper) and prints the Markdown tables.+ *+ * LIVE mode (spends tokens):+ * bun evals/content-repair-judgment/harness.ts --model <provider:model> --run <n> --out <results.jsonl> [--only id1,id2]+ * Each pair goes through the production call (`askJudgment` in+ * src/core/content-repair/llm.ts: the production prompt, one gateway `chat`+ * with thinking off where the route allows, the production output ceiling,+ * no fallback model, the production parser). The harness adds nothing to+ * the call; it records the verdict, its grade, the tokens the provider+ * reported, the USD gbrain's own price table gives them, wall time and the+ * answer text. `llm_unavailable` is retried up to twice after a pause, as+ * the next maintenance run would; every other outcome stands. No ledger and+ * no memo: every pair is asked in every run.+ *+ * Exit codes: 0 done, 1 check violation, 2 usage or no provider key.+ */+import { appendFileSync, readFileSync, writeFileSync } from 'node:fs';+import { createHash } from 'node:crypto';+import { join } from 'node:path';+import { FIXTURES_PATH, fixturesJsonl, type Fixture } from './generate-fixtures.ts';+import type { ResultRow } from './score.ts';++const here = import.meta.dir;+export const CALL_TIMEOUT_MS = 90_000;++const args = process.argv.slice(2);+const flag = (name: string) => { const i = args.indexOf(name); return i === -1 ? null : args[i + 1] ?? null; };++export function loadFixtures(): Fixture[] {+ return readFileSync(FIXTURES_PATH, 'utf8').trim().split('\n').map(line => JSON.parse(line));+}++if (args.includes('--check')) {+ const { judgmentInput, HEAD_LINES } = await import('./input.ts');+ const { checkFixtures } = await import('./check.ts');+ const text = readFileSync(FIXTURES_PATH, 'utf8');+ const violations = text === fixturesJsonl() ? [] : ['fixtures.jsonl does not match cases.ts (regenerate with bun evals/content-repair-judgment/generate-fixtures.ts)'];+ const fixtures = loadFixtures();+ violations.push(...checkFixtures(fixtures));+ const bySet: Record<string, number> = {};+ for (const f of fixtures) {+ bySet[f.set] = (bySet[f.set] ?? 0) + 1;+ const input = judgmentInput(f);+ const late = input.held.mentions.length + (input.named?.mentions.length ?? 0);+ if (late) console.log(`LATE ${f.id}: ${late} line(s) past line ${HEAD_LINES} mention the other page (head ${input.held.head_lines.length} / ${input.named?.head_lines.length ?? 0} lines)`);+ }+ for (const v of violations) console.error(`VIOLATION ${v}`);+ console.log(`check: ${fixtures.length} fixture(s) (${Object.entries(bySet).map(([s, n]) => `${s} ${n}`).join(', ')}), ${violations.length} violation(s)`);+ process.exit(violations.length ? 1 : 0);+}++if (args.includes('--score')) {+ const skip = new Set([flag('--json'), flag('--md')]);+ const files = args.slice(args.indexOf('--score') + 1).filter(a => !a.startsWith('--') && !skip.has(a));+ const { summarize } = await import('./score.ts');+ const { buildReport, renderMarkdown } = await import('./report.ts');+ const rows: ResultRow[] = files.flatMap(file => readFileSync(file, 'utf8').trim().split('\n').filter(Boolean).map(line => JSON.parse(line)));+ const report = buildReport(summarize(rows), files.map(f => f.slice(f.lastIndexOf('/') + 1)));+ const md = renderMarkdown(report);+ if (flag('--json')) writeFileSync(flag('--json')!, JSON.stringify(report, null, 2) + '\n');+ if (flag('--md')) writeFileSync(flag('--md')!, md);+ console.log(md);+ process.exit(0);+}++const modelArg = flag('--model');+const run = Number(flag('--run') ?? 1);+const outPath = flag('--out');+if (!modelArg || !outPath || !Number.isInteger(run)) {+ console.error(`usage: bun ${join('evals/content-repair-judgment', 'harness.ts')} --check | --score <results.jsonl ...> [--json out.json] [--md out.md] | --model <provider:model> --run <n> --out <results.jsonl> [--only ids]`);+ process.exit(2);+}+const model: string = modelArg;++const { configureEvalGateway } = await import('../../src/eval/shared/gateway-bootstrap.ts');+const { isAvailable } = await import('../../src/core/ai/gateway.ts');+const { chatCallUsd } = await import('../../src/core/budget/daily-ledger.ts');+const { buildJudgmentPrompt, JUDGMENT_PROMPT_VERSION } = await import('../../src/core/content-repair/judgment.ts');+const { askJudgment, judgmentTokenBudget } = await import('../../src/core/content-repair/llm.ts');+const { judgmentInput } = await import('./input.ts');+const { grade } = await import('./score.ts');++configureEvalGateway({ chatModel: model });+if (!isAvailable('chat', model)) {+ console.error(`content-repair-judgment: no chat provider configured for ${model}; set its key. Refusing to run keyless.`);+ process.exit(2);+}++const fixtures = loadFixtures();+const only = flag('--only')?.split(',');+const selected = only ? fixtures.filter(f => only.includes(f.id)) : fixtures;+const first = judgmentInput(selected[0]!);+const systemText = buildJudgmentPrompt(first)[0]!.content;+const commit = Bun.spawnSync(['git', 'rev-parse', 'HEAD'], { cwd: here }).stdout.toString().trim();+const meta = { model, run, started_at: new Date().toISOString(), gbrain_commit: commit, bun: Bun.version, prompt_version: JUDGMENT_PROMPT_VERSION,+ system_prompt_sha256: createHash('sha256').update(typeof systemText === 'string' ? systemText : '').digest('hex'),+ fixtures_sha256: createHash('sha256').update(readFileSync(FIXTURES_PATH)).digest('hex'),+ harness_sha256: createHash('sha256').update(['harness.ts', 'input.ts', 'score.ts', 'check.ts'].map(f => readFileSync(join(here, f), 'utf8')).join('\u0000')).digest('hex'),+ max_output_tokens: judgmentTokenBudget(first, model).maxOutputTokens, call_timeout_ms: CALL_TIMEOUT_MS, thinking: 'off' };+writeFileSync(`${outPath}.meta.json`, JSON.stringify(meta, null, 2) + '\n');+writeFileSync(outPath, '');+console.error(`content-repair-judgment: ${selected.length} pair(s) on ${model} (run ${run}); output ceiling ${meta.max_output_tokens} tokens`);++let spent = 0;+for (const f of selected) {+ const input = judgmentInput(f);+ let attempts = 0;+ let answer;+ let latency = 0;+ for (;;) {+ attempts++;+ const t0 = performance.now();+ answer = await askJudgment(input, { model, timeoutMs: CALL_TIMEOUT_MS });+ latency = Math.round(performance.now() - t0);+ if (answer.ok || answer.reason !== 'llm_unavailable' || attempts >= 3) break;+ console.error(`${f.id}: provider unavailable (${answer.error ?? 'error'}, attempt ${attempts}); retrying after a pause`);+ await new Promise(r => setTimeout(r, attempts * 20_000));+ }+ const usage = answer.result?.usage ?? null;+ const usd = usage ? chatCallUsd(model, { inputTokens: usage.input_tokens, outputTokens: usage.output_tokens }).usd : 0;+ spent += usd;+ const verdict: ResultRow['verdict'] = answer.ok ? (answer.verdict.action === 'merge_into' ? { action: 'merge_into', canonical: answer.verdict.canonical } : { action: answer.verdict.action }) : null;+ const row: ResultRow & { why: string | null } = { model, run, id: f.id, set: f.set, cls: f.cls, tags: f.tags, verdict, failure: answer.ok ? null : answer.reason, grade: grade(f, verdict),+ input_tokens: usage?.input_tokens ?? null, output_tokens: usage?.output_tokens ?? null, usd, latency_ms: latency, stop: answer.result?.stopReason ?? null, text: answer.text ?? null, attempts,+ why: answer.ok ? answer.verdict.why ?? null : null };+ appendFileSync(outPath, JSON.stringify(row) + '\n');+ console.error(`${f.id}: ${verdict ? verdict.action + (verdict.action === 'merge_into' ? ` ${verdict.canonical}` : '') : row.failure} ${row.grade.toUpperCase()} $${usd.toFixed(4)} ${latency}ms`);+}+writeFileSync(`${outPath}.meta.json`, JSON.stringify({ ...meta, finished_at: new Date().toISOString(), spent_usd: spent }, null, 2) + '\n');+console.error(`spend: $${spent.toFixed(4)} on ${model} (run ${run})`);+process.exit(0);diff --git a/evals/content-repair-judgment/input.ts b/evals/content-repair-judgment/input.tsnew file mode 100644index 0000000000..9f61d35fe9--- /dev/null+++ b/evals/content-repair-judgment/input.ts@@ -0,0 +1,22 @@+/**+ * The judgment input a fixture pair becomes: both participants through the+ * production builder (`judgmentParticipant` in+ * src/core/content-repair/judgment.ts: frontmatter as written, headings,+ * the first 60 non-blank body lines, later lines mentioning the other slug),+ * with the hold code the lane passes. So the eval sends exactly what the+ * product sends; identity evidence past line 60 reaches the model only+ * through `mentions`, which is what the late-evidence fixtures test. Pure.+ */+import { JUDGMENT_HEAD_LINES, judgmentParticipant, type JudgmentInput } from '../../src/core/content-repair/judgment.ts';+import type { Fixture } from './generate-fixtures.ts';++export const HEAD_LINES = JUDGMENT_HEAD_LINES;+export type { JudgmentInput, JudgmentParticipant } from '../../src/core/content-repair/judgment.ts';++export function judgmentInput(f: Fixture): JudgmentInput {+ return {+ held: judgmentParticipant({ path: f.held.path, slug: f.held.slug, content: f.held.content, otherSlug: f.named?.slug ?? null }),+ named: f.named ? judgmentParticipant({ path: f.named.path, slug: f.named.slug, content: f.named.content, otherSlug: f.held.slug }) : null,+ reason: 'frontmatter_slug_conflict',+ };+}diff --git a/evals/content-repair-judgment/report.ts b/evals/content-repair-judgment/report.tsnew file mode 100644index 0000000000..257eca4df7--- /dev/null+++ b/evals/content-repair-judgment/report.ts@@ -0,0 +1,52 @@+/**+ * Report writer for the content-repair judgment eval: the per-model JSON+ * summary and the Markdown tables the README and the gbrain-evals mirror+ * carry (hard failures, true-duplicate accuracy, needs_human rate, cost),+ * plus a per-set breakdown. Pure: takes summaries, returns strings.+ */+import { DECISION, meetsRule, rank, SCORER_VERSION, type ModelSummary } from './score.ts';++export interface Report {+ scorer_version: number;+ decision_rule: typeof DECISION;+ files: string[];+ /** Ranked: qualifying first, by true-duplicate accuracy, ties to the cheaper model. */+ models: Array<ModelSummary & { meets_rule: boolean }>;+ /** The proposal for `CONTENT_REPAIR_MEASURED_MODELS`: the qualifying models in rank order. */+ measured_models: string[];+}++export function buildReport(summaries: readonly ModelSummary[], files: string[]): Report {+ const models = rank(summaries).map(s => ({ ...s, meets_rule: meetsRule(s) }));+ return { scorer_version: SCORER_VERSION, decision_rule: DECISION, files, models, measured_models: models.filter(m => m.meets_rule).map(m => m.model) };+}++const pct = (x: number) => `${(100 * x).toFixed(1)}%`;+const ci = (c: [number, number] | null) => (c ? ` [${(100 * c[0]).toFixed(1)}, ${(100 * c[1]).toFixed(1)}]` : '');+const sec = (ms: number | null) => `${((ms ?? 0) / 1000).toFixed(1)} s`;++export function renderMarkdown(report: Report): string {+ const lines = [+ '| Model | Hard failures | True-duplicate accuracy | needs_human rate | No answer | USD per pair | Latency p50 / p95 | Qualifies |',+ '|---|---|---|---|---|---|---|---|',+ ...report.models.map(m => `| \`${m.model}\` | ${m.hard_failures}/${m.n}${m.hard_failures ? ` (${Object.entries(m.hard_failure_ids).map(([id, k]) => `${id} ×${k}`).join(', ')})` : ''} | `+ + `${m.true_duplicate.merge_canonical}/${m.true_duplicate.n} (${pct(m.true_duplicate.accuracy)})${ci(m.true_duplicate.accuracy_ci)} | ${pct(m.needs_human_rate)} | ${m.no_answer.n} | $${m.cost.usd_per_pair.toFixed(4)} | `+ + `${sec(m.latency_ms.p50)} / ${sec(m.latency_ms.p95)} | ${m.meets_rule ? 'yes' : 'no'} |`),+ '',+ 'Per set (pair runs; `merge` / `remove` / `human` / `none` are the model\'s answers; a hard failure is a `remove` on a true duplicate or a `merge` elsewhere, or a merge into the wrong canonical):',+ '',+ '| Model | True duplicates (merge right / wrong canonical / remove / human / none) | Stray slugs (remove / merge / human / none) | Adversarial (remove / merge / human / none) | Ambiguous (human / guessed / none) |',+ '|---|---|---|---|---|',+ ...report.models.map(m => {+ const td = m.true_duplicate; const ss = m.stray_slug; const adv = m.adversarial; const amb = m.ambiguous;+ return `| \`${m.model}\` | ${td.merge_canonical} / ${td.wrong_canonical} / ${td.by_action.remove_slug} / ${td.by_action.needs_human} / ${td.by_action.none} of ${td.n} | `+ + `${ss.by_action.remove_slug} / ${ss.by_action.merge_into} / ${ss.by_action.needs_human} / ${ss.by_action.none} of ${ss.n} | `+ + `${adv.by_action.remove_slug} / ${adv.by_action.merge_into} / ${adv.by_action.needs_human} / ${adv.by_action.none} of ${adv.n} | `+ + `${amb.by_action.needs_human} / ${amb.guesses} / ${amb.by_action.none} of ${amb.n} |`;+ }),+ '',+ `Rule: zero hard failures and true-duplicate accuracy at least ${pct(DECISION.minTrueDuplicateAccuracy)}; \`needs_human\` is always acceptable. Brackets are Wilson 95% intervals in percent. `+ + `Proposed \`CONTENT_REPAIR_MEASURED_MODELS\`: ${report.measured_models.length ? report.measured_models.map(m => `\`${m}\``).join(', ') : 'none (no model met the rule)'}.`,+ ];+ return lines.join('\n') + '\n';+}diff --git a/evals/content-repair-judgment/score.ts b/evals/content-repair-judgment/score.tsnew file mode 100644index 0000000000..631efe4b4b--- /dev/null+++ b/evals/content-repair-judgment/score.ts@@ -0,0 +1,129 @@+/**+ * Scoring for the content-repair judgment eval (#6377, plan section 4).+ * Pure functions.+ *+ * Each result row holds the model's coded verdict for one fixture pair in+ * one run (or the failure class when it gave none). `grade` reads it against+ * the fixture's expected set:+ * - `best`: the correct answer (`merge_into` with the right canonical on a+ * true duplicate, `remove_slug` on a stray or adversarial pair,+ * `needs_human` on an ambiguous pair).+ * - `acceptable`: safe but costs a repair (`needs_human` anywhere it is not+ * best).+ * - `hard_failure`: an answer that would damage the brain: `remove_slug` on+ * a true duplicate (a second page for one thing), `merge_into` on a stray+ * or adversarial pair (two things become one) or into the wrong canonical.+ * - `guess`: `merge_into` or `remove_slug` on an ambiguous pair; reported,+ * outside the rule.+ * - `no_answer`: no usable verdict (malformed, truncated, refused,+ * unavailable); the hold stays, so it is safe, and it is reported apart.+ *+ * Preregistered (PREREGISTRATION.md): a model qualifies with zero hard+ * failures over its runs and at least 80% `merge_into` with the right+ * canonical over true-duplicate pair runs. Ranking: qualifying models first,+ * by true-duplicate accuracy, ties to the cheaper model (USD per pair run).+ */+import { quantile, wilson } from '../fence-repair-tier3/score.ts';+import type { Answer, Fixture } from './generate-fixtures.ts';++export const SCORER_VERSION = 1;++export type Verdict = { action: 'remove_slug' } | { action: 'merge_into'; canonical: string } | { action: 'needs_human' };+export type Grade = 'best' | 'acceptable' | 'guess' | 'hard_failure' | 'no_answer';++export interface ResultRow {+ model: string;+ run: number;+ id: string;+ set: Fixture['set'];+ cls: Fixture['cls'];+ tags: string[];+ verdict: Verdict | null;+ /** The failure class when there is no verdict (`llm_malformed`, `llm_truncated`, `llm_refused`, `llm_empty`, `llm_unavailable`). */+ failure: string | null;+ grade: Grade;+ input_tokens: number | null;+ output_tokens: number | null;+ usd: number;+ latency_ms: number;+ stop: string | null;+ text: string | null;+ attempts: number;+}++export function grade(f: Pick<Fixture, 'set' | 'canonical' | 'expected'>, verdict: Verdict | null): Grade {+ if (!verdict) return 'no_answer';+ if (verdict.action === 'merge_into' && f.set === 'true_duplicate') return verdict.canonical === f.canonical ? 'best' : 'hard_failure';+ const answer: Answer = verdict.action;+ if (f.expected.hard.includes(answer)) return 'hard_failure';+ if (f.expected.best.includes(answer)) return 'best';+ if (f.expected.acceptable.includes(answer)) return 'acceptable';+ return 'guess';+}++interface SetCounts { n: number; by_action: Record<Answer | 'none', number>; best: number; acceptable: number; hard_failures: number; guesses: number; no_answer: number }++export interface ModelSummary {+ model: string;+ runs: number;+ n: number;+ hard_failures: number;+ /** Fixture id → how many of its runs were hard failures. */+ hard_failure_ids: Record<string, number>;+ true_duplicate: SetCounts & { merge_canonical: number; accuracy: number; accuracy_ci: [number, number] | null; wrong_canonical: number; per_run_accuracy: number[] };+ stray_slug: SetCounts;+ adversarial: SetCounts;+ ambiguous: SetCounts;+ /** `needs_human` answers over every pair run. */+ needs_human_rate: number;+ no_answer: { n: number; by_failure: Record<string, number> };+ cost: { usd_total: number; usd_per_pair: number; input_tokens: number; output_tokens: number };+ latency_ms: { p50: number | null; p95: number | null };+}++function setCounts(rows: readonly ResultRow[]): SetCounts {+ const by_action: SetCounts['by_action'] = { merge_into: 0, remove_slug: 0, needs_human: 0, none: 0 };+ for (const r of rows) by_action[r.verdict?.action ?? 'none']++;+ const count = (g: Grade) => rows.filter(r => r.grade === g).length;+ return { n: rows.length, by_action, best: count('best'), acceptable: count('acceptable'), hard_failures: count('hard_failure'), guesses: count('guess'), no_answer: count('no_answer') };+}++export function summarize(rows: readonly ResultRow[]): ModelSummary[] {+ const models = [...new Set(rows.map(r => r.model))];+ return models.map(model => {+ const mine = rows.filter(r => r.model === model);+ const runs = [...new Set(mine.map(r => r.run))].sort((a, b) => a - b);+ const td = mine.filter(r => r.set === 'true_duplicate');+ const mergeCanonical = td.filter(r => r.grade === 'best').length;+ const hardIds: Record<string, number> = {};+ for (const r of mine.filter(r => r.grade === 'hard_failure')) hardIds[r.id] = (hardIds[r.id] ?? 0) + 1;+ const byFailure: Record<string, number> = {};+ for (const r of mine.filter(r => r.grade === 'no_answer')) byFailure[r.failure ?? 'unknown'] = (byFailure[r.failure ?? 'unknown'] ?? 0) + 1;+ const usd = mine.reduce((s, r) => s + r.usd, 0);+ return {+ model, runs: runs.length, n: mine.length,+ hard_failures: Object.values(hardIds).reduce((s, k) => s + k, 0), hard_failure_ids: hardIds,+ true_duplicate: { ...setCounts(td), merge_canonical: mergeCanonical, accuracy: td.length ? mergeCanonical / td.length : 0, accuracy_ci: wilson(mergeCanonical, td.length),+ wrong_canonical: td.filter(r => r.verdict?.action === 'merge_into' && r.grade === 'hard_failure').length,+ per_run_accuracy: runs.map(run => { const x = td.filter(r => r.run === run); return x.length ? x.filter(r => r.grade === 'best').length / x.length : 0; }) },+ stray_slug: setCounts(mine.filter(r => r.set === 'stray_slug')),+ adversarial: setCounts(mine.filter(r => r.set === 'adversarial')),+ ambiguous: setCounts(mine.filter(r => r.set === 'ambiguous')),+ needs_human_rate: mine.length ? mine.filter(r => r.verdict?.action === 'needs_human').length / mine.length : 0,+ no_answer: { n: mine.filter(r => r.grade === 'no_answer').length, by_failure: byFailure },+ cost: { usd_total: usd, usd_per_pair: mine.length ? usd / mine.length : 0, input_tokens: mine.reduce((s, r) => s + (r.input_tokens ?? 0), 0), output_tokens: mine.reduce((s, r) => s + (r.output_tokens ?? 0), 0) },+ latency_ms: { p50: quantile(mine.map(r => r.latency_ms), 0.5), p95: quantile(mine.map(r => r.latency_ms), 0.95) },+ };+ });+}++/** The preregistered decision rule for one model's summary. */+export const DECISION = { maxHardFailures: 0, minTrueDuplicateAccuracy: 0.8 } as const;+export function meetsRule(s: ModelSummary): boolean {+ return s.hard_failures <= DECISION.maxHardFailures && s.true_duplicate.accuracy >= DECISION.minTrueDuplicateAccuracy;+}++/** Qualifying models first; within a group by true-duplicate accuracy, ties (equal accuracy) to the cheaper model. */+export function rank(summaries: readonly ModelSummary[]): ModelSummary[] {+ return [...summaries].sort((a, b) => Number(meetsRule(b)) - Number(meetsRule(a)) || b.true_duplicate.accuracy - a.true_duplicate.accuracy || a.cost.usd_per_pair - b.cost.usd_per_pair);+}diff --git a/test/eval-content-repair-judgment.test.ts b/test/eval-content-repair-judgment.test.tsnew file mode 100644index 0000000000..60e96d58c9--- /dev/null+++ b/test/eval-content-repair-judgment.test.ts@@ -0,0 +1,142 @@+/**+ * Keyless check of the content-repair judgment eval instrument (#6377, plan+ * section 4, evals/content-repair-judgment/).+ *+ * Protects: the committed fixtures match their generator; the set counts+ * the plan fixes (25 true duplicates, 10 stray slugs, 8 adversarial, 5+ * ambiguous) with placeholder names only; every held file's slug line names+ * the paired page; the late-evidence fixtures keep their evidence out of+ * the first 60 non-blank body lines and inside `mentions` (through the production participant builder); the grader's truth table+ * (a remove on a true duplicate and a merge elsewhere or into the wrong+ * canonical are hard failures, needs_human is never one, an ambiguous guess+ * is neither); the scorer's rates, the decision boundary and the ranking+ * (ties to the cheaper model). Fails when: a fixture is hand-edited without+ * regenerating, a case drifts off its claimed shape, or the grader stops+ * counting a wrong merge as a hard failure. It guards the instrument, not+ * the score: the live run (harness.ts --model ...) spends tokens and is never+ * part of CI.+ * Why new: the eval is new with #6377.+ * Seams: none (pure functions over the fixtures; no gateway, no brain).+ */+import { describe, expect, test } from 'bun:test';+import { readFileSync } from 'node:fs';+import { join } from 'node:path';+import { checkFixtures, SET_COUNTS } from '../evals/content-repair-judgment/check.ts';+import { fixturesJsonl, type Fixture } from '../evals/content-repair-judgment/generate-fixtures.ts';+import { judgmentInput } from '../evals/content-repair-judgment/input.ts';+import { buildReport, renderMarkdown } from '../evals/content-repair-judgment/report.ts';+import { grade, meetsRule, rank, summarize, type ResultRow, type Verdict } from '../evals/content-repair-judgment/score.ts';++const dir = join(import.meta.dir, '..', 'evals/content-repair-judgment');+const text = readFileSync(join(dir, 'fixtures.jsonl'), 'utf8');+const fixtures: Fixture[] = text.trim().split('\n').map(line => JSON.parse(line));+const byId = (id: string) => fixtures.find(f => f.id === id)!;++describe('fixtures', () => {+ test('match the generator (regenerate with bun evals/content-repair-judgment/generate-fixtures.ts)', () => {+ expect(text).toBe(fixturesJsonl());+ });++ test('the set counts, placeholder names, slug lines, canonicals and late evidence hold', () => {+ expect(checkFixtures(fixtures)).toEqual([]);+ expect(fixtures.length).toBe(Object.values(SET_COUNTS).reduce((s, n) => s + n, 0));+ expect(fixtures.filter(f => f.tags.includes('held_canonical')).length).toBe(3);+ expect(fixtures.filter(f => f.cls === 'mutual_notes_late').length).toBe(3);+ expect(fixtures.filter(f => f.cls === 'late_evidence').length).toBe(2);+ for (const f of fixtures) expect(f.expected.hard.includes('needs_human')).toBe(false);+ });++ test('the judgment input shows the slug line, both slugs, 60 head lines at most and late mentions', () => {+ const input = judgmentInput(byId('adv-07'));+ expect(input.held.frontmatter.slug).toBe('people/xia-example');+ expect(input.held.slug).toBe('people/xia-example-2');+ expect(input.named!.slug).toBe('people/xia-example');+ expect(input.held.head_lines.length).toBe(60);+ expect(input.held.head_lines.some(l => l.includes('Not the same person'))).toBe(false);+ expect(input.held.mentions).toEqual([expect.stringContaining('Not the same person as [[people/xia-example]]')]);+ expect(input.reason).toBe('frontmatter_slug_conflict');+ const stray = judgmentInput(byId('ss-09'));+ expect(stray.held.type).toBe('meeting');+ expect(stray.named!.type).toBe('company');+ expect(stray.held.frontmatter).toMatchObject({ type: 'meeting', slug: 'companies/acme-example', date: '2026-03-02' });+ expect(stray.held.headings).toEqual(['Acme Example intro', 'Notes']);+ });+});++describe('grader', () => {+ const merge = (canonical: string): Verdict => ({ action: 'merge_into', canonical });+ const remove: Verdict = { action: 'remove_slug' };+ const human: Verdict = { action: 'needs_human' };++ test('true duplicate: the right canonical is best, the wrong one and a remove are hard failures, needs_human is acceptable', () => {+ const f = byId('td-n-01');+ expect(grade(f, merge('people/alice-example'))).toBe('best');+ expect(grade(f, merge('people/alice-example-hivemind'))).toBe('hard_failure');+ expect(grade(f, remove)).toBe('hard_failure');+ expect(grade(f, human)).toBe('acceptable');+ expect(grade(f, null)).toBe('no_answer');+ const heldCanonical = byId('td-n-03');+ expect(grade(heldCanonical, merge('people/carol-example-full'))).toBe('best');+ expect(grade(heldCanonical, merge('people/carol-example'))).toBe('hard_failure');+ });++ test('stray and adversarial: remove is best, any merge is a hard failure; ambiguous: needs_human is best and the rest are guesses', () => {+ for (const id of ['ss-01', 'adv-05']) {+ expect(grade(byId(id), remove)).toBe('best');+ expect(grade(byId(id), human)).toBe('acceptable');+ expect(grade(byId(id), merge(byId(id).named!.slug))).toBe('hard_failure');+ expect(grade(byId(id), merge(byId(id).held.slug))).toBe('hard_failure');+ }+ expect(grade(byId('amb-01'), human)).toBe('best');+ expect(grade(byId('amb-01'), remove)).toBe('guess');+ expect(grade(byId('amb-01'), merge('people/zed-example'))).toBe('guess');+ });+});++describe('scorer', () => {+ const row = (model: string, run: number, f: Fixture, verdict: Verdict | null, usd = 0.01, failure: string | null = null): ResultRow => ({+ model, run, id: f.id, set: f.set, cls: f.cls, tags: f.tags, verdict, failure, grade: grade(f, verdict), input_tokens: 1000, output_tokens: 50, usd, latency_ms: 1500, stop: 'end', text: '', attempts: 1,+ });+ const td = fixtures.filter(f => f.set === 'true_duplicate');+ const others = fixtures.filter(f => f.set !== 'true_duplicate');++ test('rates, the decision boundary and the ranking', () => {+ // model a: every true duplicate right, every other pair remove_slug or needs_human -> qualifies.+ const a = [...td.map(f => row('a', 1, f, { action: 'merge_into', canonical: f.canonical! })), ...others.map(f => row('a', 1, f, f.set === 'ambiguous' ? { action: 'needs_human' } : { action: 'remove_slug' }, 0.02))];+ // model b: 20 of 25 right (80%), 5 needs_human, cheaper -> qualifies, ranks below a on accuracy.+ const b = [...td.map((f, i) => row('b', 1, f, i < 20 ? { action: 'merge_into', canonical: f.canonical! } : { action: 'needs_human' }, 0.005)), ...others.map(f => row('b', 1, f, { action: 'needs_human' }, 0.005))];+ // model c: like a but one remove_slug on a true duplicate -> one hard failure, fails.+ const c = a.map(r => ({ ...r, model: 'c' }));+ c[0] = row('c', 1, td[0]!, { action: 'remove_slug' });+ // model d: like a, same accuracy, cheaper -> ranks first on the tie.+ const d = a.map(r => ({ ...r, model: 'd', usd: r.usd / 2 }));+ const summaries = summarize([...a, ...b, ...c, ...d]);+ const by = Object.fromEntries(summaries.map(s => [s.model, s]));+ expect(by.a!.true_duplicate).toMatchObject({ n: 25, merge_canonical: 25, accuracy: 1, wrong_canonical: 0 });+ expect(by.a!.hard_failures).toBe(0);+ expect(by.a!.ambiguous.by_action.needs_human).toBe(5);+ expect(by.a!.needs_human_rate).toBeCloseTo(5 / 48, 10);+ expect(by.b!.true_duplicate.accuracy).toBeCloseTo(0.8, 10);+ expect(by.b!.needs_human_rate).toBeCloseTo(28 / 48, 10);+ expect(by.c!.hard_failures).toBe(1);+ expect(by.c!.hard_failure_ids).toEqual({ [td[0]!.id]: 1 });+ expect(meetsRule(by.a!)).toBe(true);+ expect(meetsRule(by.b!)).toBe(true);+ expect(meetsRule(by.c!)).toBe(false);+ expect(meetsRule({ ...by.b!, true_duplicate: { ...by.b!.true_duplicate, accuracy: 0.79 } })).toBe(false);+ expect(rank(summaries).map(s => s.model)).toEqual(['d', 'a', 'b', 'c']);+ const report = buildReport(summaries, ['x.jsonl']);+ expect(report.measured_models).toEqual(['d', 'a', 'b']);+ const md = renderMarkdown(report);+ expect(md).toContain('| `c` | 1/48 (td-n-01 ×1) |');+ expect(md).toContain('Proposed `CONTENT_REPAIR_MEASURED_MODELS`: `d`, `a`, `b`.');+ });++ test('a missing verdict is a no_answer with its failure class, never a hard failure', () => {+ const [s] = summarize([row('m', 1, td[0]!, null, 0, 'llm_malformed'), row('m', 1, td[1]!, null, 0, 'llm_unavailable'), row('m', 2, td[1]!, null, 0, 'llm_unavailable')]);+ expect(s!.no_answer).toEqual({ n: 3, by_failure: { llm_malformed: 1, llm_unavailable: 2 } });+ expect(s!.hard_failures).toBe(0);+ expect(s!.runs).toBe(2);+ expect(s!.true_duplicate.per_run_accuracy).toEqual([0, 0]);+ });+});