mirror of
https://github.com/garrytan/gbrain.git
synced 2026-07-30 11:22:34 +00:00
Cross-references each contradiction finding against the active calibration
profile. When a contradiction's domain matches an active bias tag (e.g.
"over-confident-geography" or "late-on-macro-tech"), the output gains a
one-line bias context explaining which pattern this fits.
Pure functions only — no DB writes, no LLM calls. The probe runner imports
tagFindingWithCalibration() and applies it to each finding before emitting.
When no profile exists or no tags match, the helper returns null and the
runner emits the unchanged finding (regression R2 — contradictions output
is byte-identical to v0.32.6 when no calibration profile is present).
Match heuristic (v0.36.0.0 ship-state):
Bias tags are kebab-case axis-then-domain slugs ('over-confident-geography').
computeDomainHint() extracts a domain hint from the finding's slugs +
holder + verdict text:
- wiki/companies/... → hiring | market-timing
- wiki/people/... → founder-behavior
- macro / geography / tactics / ai segments in slug → matching tag
First-match-wins for ordering determinism.
Match is intentionally fuzzy — the v0.32.6 contradictions probe doesn't
yet carry structured domain metadata. v0.37+ structured-domain-on-takes
(Hindsight-style enum) tightens this.
Output:
Returns { bias_tag: string, context: string } | null.
Context format: "This contradiction fits your active bias pattern
\"<tag>\" (Brier 0.31). Verdict: contradiction; severity: medium.
Consider reviewing both sides through the lens of that pattern."
Tests: 13 cases.
R2 regression (2): null profile → null tag; empty active_bias_tags → null tag.
computeDomainHint (5): companies / people / macro / geography / unknown
paths produce expected hints.
Match path (4): macro→late-on-macro-tech, geography→over-confident-geography,
mismatch returns null, first-match-wins with multiple candidate tags.
buildBiasContextString (2): emits tag+verdict+severity+Brier; omits
Brier when null (no "Brier null" leak).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>