Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

W6: take-grading preregistration, README, CHANGELOG, BEHAVIOR_CHANGES row, key-files entry

garrytand99b84694e55
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e49dea3ecc..bb5c70da81 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,26 @@ credits are retained; no result has been reassigned to another provider. Origina
identifiers and attribution are available in the pre-removal Git revision
`6040075c6cb95be5881cc2e1b76ef7d71f4e5d29` (retained on 2026-09-23).
+## [0.60.275.0] - 2026-10-17
+
+**The take grader now has an eval, and you can review what it has graded.** Wave 4b W6: a preregistered take-grading eval measures which judge models may ever auto-resolve a take, the dream cycle's take grader stops counting evidence about a look-alike company, and `gbrain takes grades` lists its cached verdicts. Auto-resolve stays off.
+
+### What you'd see
+
+| Situation | Before | Now |
+|---|---|---|
+| The take grader's evidence mentions a different company whose name only resembles the one in the claim | the judge could grade the claim on the other company's outcome | prompt `hybrid-evidence-v2` tells it that evidence does not count, so the verdict is `unresolvable` |
+| The judge wraps its JSON answer in prose, or repeats an answer that agrees | no verdict ("judge output parse failed"), retried next cycle | the answer parses; two answers that disagree still give no verdict |
+| You want to see what the grader concluded | only the database table `take_grade_cache` | `gbrain takes grades [--verdict v] [--min-confidence n] [--applied\|--unapplied] [--limit n] [--json]` lists the newest verdict per take and marks judges the eval has not measured |
+
+### What you need to do
+
+Nothing. Verdicts are cached per prompt version, so the next cycles grade each eligible take once more within the phase's existing budget (`cycle.grade_takes.budget_usd`). No take's resolution changes. `gbrain takes grades` runs on the brain host; thin clients refuse it.
+
+### For contributors
+
+`evals/take-grading/` holds the eval (908 seeded synthetic takes, dev and counted splits, `--check` at $0) and its preregistration. `GRADE_TAKES_MEASURED_MODELS` (`src/core/cycle/grade-takes-measured.ts`) stays empty until the counted run.
+
## [0.60.274.0] - 2026-10-17
**A refresh no longer gets stuck when a commit lands on top of its target, and `gbrain repair file-drift` can now resolve a page whose file is gone.** Two fixes ahead of the level-triggered reconcile (#6712).
diff --git a/docs/architecture/key-files/hindsight.md b/docs/architecture/key-files/hindsight.md
index 7d10a90e50..da213cf493 100644
--- a/docs/architecture/key-files/hindsight.md
+++ b/docs/architecture/key-files/hindsight.md
@@ -24,6 +24,7 @@ unresolvable+true|false, pre-v80 NULL/NULL rows survive).
- `src/core/cycle/base-phase.ts` — abstract `BaseCyclePhase` class. Enforces `sourceScopeOpts(ctx)` threading at the type level; rules out the source-isolation leak class structurally for every new phase. Inherits source-scope, budget meter, error envelope, progress reporter. propose_takes / grade_takes / calibration_profile all extend it. `run()` honors dry-run for every subclass at once: when `opts.dryRun` or `ctx.dryRun === true`, it returns `status: 'skipped'` / `reason: 'no_dry_run_support'` before `process()` (no LLM calls, no take_proposals / take_grade_cache / calibration_profiles writes) — the same skip shape extract and resolve_symbol_edges use; runCycle threads `dryRun` into all three call sites. The ONE home of `CYCLE_DEADLINE_RESERVE_MS` (60s carved out of the enclosing job's remaining wall-clock — wait-poll + worker force-evict grace + cleanup headroom; patterns.ts re-exports it) and of `BasePhaseOpts.deadlineAtMs` (the enclosing minion job's absolute deadline, threaded via runCycle; null/unset for direct `gbrain dream` callers — phases then fall back to their derived defaults).
- `src/core/cycle/propose-takes.ts` — LLM scans markdown prose, proposes gradeable claims to the `take_proposals` queue. Candidate discovery excludes `extract_receipt` pages before the LLM call so the phase never re-ingests its own operational receipts; nullable legacy page types remain eligible. `cycle.propose_takes.types` (#5213; `proposeTakesTypes`, a JSON array of page types in the `cycle.enrich_thin.types` shape) narrows the candidate query to those types with `type = ANY(...)` on top of the source scope; unset keeps every type eligible and a malformed value is ignored with one stderr line. Idempotency cache on `(source_id, page_slug, content_hash, prompt_version)` composite unique index. Fence-dedup: existing canonical takes passed to the extractor as context. Opt-in `dream.propose_takes.attribution_rules=true` adds `EXTRACT_TAKES_ATTRIBUTION_RULES` (withdrawn claims, assistant-authored judgments not attributed to the user) under prompt version suffix `+attribution5425`; off by default because it measured lower cat15 recall. Ships a stub prompt; tuned prompt arrives via the synthetic corpus build. Per-page extractor failures log a warning and continue, but a whole-run condition (per `classifyGlobalLlmError` in `src/core/ai/errors.ts`) breaks the page loop with a single combined warning line, sets `aborted_global_error`, and records a halt in the rollup — auth/billing on the first hit, bare rate_limit only after `RATE_LIMIT_HALT_STREAK` (3) consecutive hits (a successful call resets the streak). Status: `fail` when the halt happened with ZERO successful extractor calls (the whole LLM lane is down), otherwise any warnings fold into `warn` + ` (N warning(s))` summary suffix, so swallowed failures can't read as a clean `ok`. `llm_calls_succeeded`/`llm_calls_failed`/`halted` land in details. The phase wall-clock deadline is DERIVED, never a literal (a literal equal to the autopilot-cycle handler anchor, with non-co-started clocks, would make the clean `deadline_hit` partial-completion path structurally unreachable): explicit `opts.deadlineMs` wins (test seam), else `resolveProposeTakesDeadlineMs(deadlineAtMs, now)` = `PHASE_DEADLINE_FRACTION_OF_JOB` (0.8, headroom for grade_takes + calibration_profile which run after it with no deadline of their own) × (remaining job budget − `CYCLE_DEADLINE_RESERVE_MS`), clamped to the fallback (0.8 × the `autopilot-cycle` entry in `HANDLER_DEFAULT_TIMEOUT_MS` — a missing anchor throws at module LOAD, failing the whole cycle visibly). A fractioned value under `MIN_PROPOSE_TAKES_BUDGET_MS` (2 min) resolves to null and the phase returns an honest `skipped` with `reason: 'insufficient_cycle_budget'` (after the cheap provider probe, before any rollup/DB write — records neither a halt nor a completed round; next cycle retries with a fresh budget). Pinned by `test/propose-takes.test.ts` + `test/propose-takes-per-claim.test.ts` + `test/cycle-phase-deadline-drift.test.ts`. The kind vocabulary is `TAKE_KIND_VALUES` imported from `src/core/takes-fence.ts` (the fence enum — no hand-copied set); an unknown kind maps through the legacy-kind table, else `take`. `dream.propose_takes.call_timeout_ms` (whole ms 1000..300000; `config set` refuses others, a stored out-of-range value is clamped and a non-number ignored, each with a named-key phase warning) replaces the output-cap scaling for every extractor call, held to the phase time left (never below 90 s); a call its own bound stops fails per page with an error naming the key. Pinned by `test/propose-takes-config-max-tokens.test.ts` + `test/propose-takes-truncation.test.ts`. #5212: `listCandidatePages` also skips the dream cycle's own output by its writer stamps (`dream_generated = true`, `extracted_by LIKE 'extract_atoms%'`, `synthesized_by LIKE 'synthesize_concepts%'`), pinned on PGLite (`test/propose-takes-per-claim.test.ts`) and Postgres (`test/e2e/propose-takes-jsonb-postgres.test.ts`). The mechanical holder check of #5425 [UC4] (`cycle/propose-takes-attribution.ts`, one call after the extractor returns, behind `dream.attribution_checks`, default off) is separate from the prompt rule and documented with that module.
- `src/core/cycle/grade-takes.ts` — walks unresolved takes older than 6 months, retrieves evidence, asks judge model, caches verdict. Auto-resolve DISABLED by default. Conservative thresholds: >=0.95 single OR >=0.85 ensemble 3/3 unanimous. `aggregateEnsemble` reuses the cross-modal substrate; fires on the borderline 0.6-0.95 band. Writes to `take_grade_cache`. Same global-error posture as propose-takes: a judge failure that classifies as a whole-run condition breaks the take loop with `aborted_global_error` (auth/billing first hit; rate_limit after 3 consecutive takes; `fail` status when zero judge calls succeeded, else `warn` + warning count; `judge_calls_succeeded`/`judge_calls_failed`/`halted` in details). Rejected ensemble judges are classified the same way — `Promise.allSettled` never flattens a revoked key or exhausted spend limit into a silent null verdict. Per-take auto-apply failures stay per-take.
+- `src/core/cycle/grade-takes-measured.ts` — `GRADE_TAKES_MEASURED_MODELS` (the judges that met the W6 take-grading eval's preregistered rule, `evals/take-grading/PREREGISTRATION.md`; empty until the counted run) and `gradeJudgeMeasured()`, which `gbrain takes grades` (`cmdGrades` in `src/commands/takes.ts`, trusted local, no MCP op) uses to mark cached verdicts no measurement backs. Auto-resolve stays unwired.
- `src/core/cycle/calibration-profile.ts` — aggregates resolved takes into 2-4 narrative pattern statements + active bias tags. Voice-gated via `gateVoice()`. Cold-brain skip when <5 resolved. Writes to `calibration_profiles` with audit columns (`voice_gate_passed`, `voice_gate_attempts`, `grade_completion`).
- `src/core/calibration/voice-gate.ts` — single `gateVoice()` function, mode parameter (`pattern_statement` | `nudge` | `forecast_blurb` | `dashboard_caption` | `morning_pulse`). 2 regens then template fallback from `src/core/calibration/templates.ts`. Haiku judge with mode-specific rubrics; all rubrics structurally forbid clinical/preachy voice.
- `src/core/calibration/gstack-coupling.ts` — outcome-driven learnings coupling. `writeIncorrectResolution(opts)` shells out to the `gstack-learnings-log` binary. Config gate `cycle.grade_takes.write_gstack_learnings` (default false for external users). Namespace prefix `gbrain:calibration:v0.36.1.0:` so `--undo-wave` can scrub.
diff --git a/evals/take-grading/PREREGISTRATION.md b/evals/take-grading/PREREGISTRATION.md
new file mode 100644
index 0000000000..3293101d4c
--- /dev/null
+++ b/evals/take-grading/PREREGISTRATION.md
@@ -0,0 +1,92 @@
+# Preregistration: which model may grade a take? (2026-10-16)
+
+Frozen on October 16, 2026, before any counted run, with the fixtures in the same change (`fixtures.jsonl`, generated from `cases.ts`). Nothing here changes after a counted run; a later change gets a new dated file. The gbrain-evals mirror carries a copy with the results.
+
+## The question
+
+The dream cycle's `grade_takes` phase (`src/core/cycle/grade-takes.ts`) walks unresolved forecasting takes whose claim is old enough to have played out, retrieves dated evidence from the brain, and asks a chat model for one verdict: `correct`, `incorrect`, `partial` or `unresolvable`, with a confidence. It caches the verdict in `take_grade_cache`. Auto-resolve, which would write the verdict onto the take, exists in the code and is off; the cycle never turns it on. Before anyone turns it on, the plan (wave 4b, W6) asks for a measurement: when the production rule would apply a verdict (not `unresolvable`, confidence at or above `GRADE_TAKES_AUTO_RESOLVE_THRESHOLD`, 0.95), how often is it wrong?
+
+The damage is asymmetric. A wrong applied verdict silently rewrites a person's track record and feeds the calibration profile. An `unresolvable` or a low-confidence verdict costs a review, never correctness. So this experiment asks:
+
+1. Among the verdicts the rule would apply, what share is wrong, and how tight is the bound (**wrong share of applied verdicts**)?
+2. How many resolvable takes does a model grade correctly and confidently enough to apply (**coverage**)?
+3. How often does it hold back on a take the evidence cannot settle (**abstention**), and what does each verdict cost?
+
+## The fixtures
+
+`evals/take-grading/fixtures.jsonl` in gbrain: 908 synthetic takes with known outcomes, each with the dated evidence hits the judge sees, shaped like the production retriever's (`slug`, `title`, `chunk_text`, `effective_date`). Companies and people are placeholders (`*-example`); the only real-world subjects are the public propositions of the `world_*` sets (prices, rates, events), which name no person or company. Built deterministically from fixed seeds by the agent running the experiment; no person reviewed them.
+
+Two splits. **dev** (118 fixtures) tuned the prompt and parser and is never counted. **counted** (790 fixtures) decides; it is built first and dev avoids its claims. Every company take states a horizon (`by the end of 2023`, `by Q3 2024`, `within 18 months`, `before 2025`), and every hit is dated relative to the take's `since_date` and that horizon. Every company fixture except `no_evidence` also carries zero to two noise hits about other companies (a meeting moved, a lease renewed).
+
+| Set | Counted | Shape | Gold | In the rule |
+|---|---|---|---|---|
+| `resolved_correct` | 250 | A dated hit after the horizon reporting the outcome (60%), or an early achievement before it (40%); some carry an earlier progress hit, always before the achievement. | `correct` | yes |
+| `resolved_incorrect` | 250 | A dated hit after the horizon reporting the miss; some carry earlier progress. | `incorrect` | yes |
+| `pre_horizon` | 60 | Only progress hits dated before the horizon. | `unresolvable` | yes |
+| `pre_claim` | 40 | Only background hits dated before the take was made. | `unresolvable` | yes |
+| `no_evidence` | 40 | No hits at all. | `unresolvable` | yes |
+| `restatement` | 40 | A hit after the horizon in which the holder restates the claim; no outcome. | `unresolvable` | yes |
+| `distractor` | 40 | The decisive-looking hit is about a similarly named different company (`<word>-<suffix>-example`). | `unresolvable` | yes |
+| `world_no_evidence` | 30 | A public real-world proposition with no evidence in the brain. | `unresolvable` | yes |
+| `partial` | 20 | A hit reporting a shortfall (part of the target met). | `partial` | no, exploratory |
+| `world_counterfactual` | 20 | A public proposition with a known real outcome; the brain's dated note says the opposite. | the brain's side | no, exploratory |
+
+So the rule sees 750 counted fixtures, 500 of them resolvable. The two exploratory sets are reported and never decide: `partial` has no agreed grading, and `world_counterfactual` measures whether a model follows the brain or its own world knowledge, which is a policy question this experiment does not settle.
+
+The $0 check (`bun evals/take-grading/harness.ts --check`, also the keyless test `test/eval-take-grading.test.ts`) proves the instrument: `fixtures.jsonl` matches `cases.ts`, the counts above, placeholder names only, the dates each set promises (an outcome hit after the horizon, or an early achievement after the claim with any progress before it; pre-horizon hits between the claim and the horizon; background before `since_date`; a distractor's decisive hit about a near-name company and none about the subject; no hits in the no-evidence sets), and that every fixture renders through the production evidence block.
+
+## 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 take-grading result exists, so no link model is needed.
+
+| Model | Why it runs |
+|---|---|
+| `openai:gpt-6.1-sol` | Newest GPT. |
+| `anthropic:claude-opus-5-5` | Newest Opus; the top Anthropic model in counted runs. |
+| `anthropic:claude-sonnet-5-5` | Newest Sonnet; the cheaper Anthropic candidate. |
+
+One run per model over the 790 counted fixtures: 2,370 verdicts. Per-model caps (`--max-usd`) are $3 for gpt-6.1-sol, $5 for Sonnet 5.5 and $10 for Opus 5.5, $18 in all, under the $25 counted ledger; the dev round predicts about $1.20, $2.60 and $5.80.
+
+## The procedure
+
+`bun evals/take-grading/harness.ts --model <id> --split counted --out <file> --max-usd <cap> --concurrency 4 --preregistration <commit>`, Bun 1.4.x, per model, where `<commit>` is the gbrain commit that froze this file:
+
+1. Each fixture becomes the production take row and the production evidence block (`formatEvidenceBlock`); the fields the judge must not see (`decisive`, `about`) are stripped first.
+2. The verdict comes from `defaultJudge` in `grade-takes.ts`: the production prompt (`GRADE_TAKES_PROMPT_VERSION` `hybrid-evidence-v2`), one gateway `chat` call with the production options, and the production parser (`parseJudgeOutput`). The harness wraps the chat call only to read token usage. A parse failure stands as no answer (production retries it on the next cycle); a provider error is retried up to twice after a pause.
+3. Each row records the verdict, confidence, whether the rule applies it and whether it is wrong, tokens, USD from gbrain's own price table, wall time, the judge's reasoning, and the raw answer on a parse failure. The run's `.meta.json` records the gbrain commit, this preregistration commit, the prompt version and hash, the threshold, and the fixture and harness hashes.
+4. A run that hits its cap stops, is reported as incomplete, and its model does not qualify. No counted run is repeated or extended.
+
+Evidence retrieval is not measured: the hits are given, so this measures the judge on the evidence it would see, not whether the retriever finds it.
+
+## Measurements
+
+- **Wrong share of applied verdicts**: wrong / applied over the rule's 750 fixtures, with the one-sided 95% Clopper-Pearson upper bound. On a gold-`unresolvable` fixture every applied verdict is wrong.
+- **Coverage**: resolvable fixtures applied and right, over the 500 resolvable fixtures.
+- **Abstention**: unresolvable fixtures not applied, over the 250 unresolvable fixtures.
+- **No answer**: fixtures with no verdict, by failure (`parse`, `unavailable`); safe, the take stays ungraded.
+- **Cost**: USD per verdict; **latency** p50 and p95.
+- Exploratory, never decisive: outcomes per set and class, the verdicts on `partial`, and on `world_counterfactual` whether the verdict follows the brain or the real outcome.
+
+## Decision rule
+
+A model **qualifies** when it applied at least one verdict and the one-sided 95% Clopper-Pearson upper bound on wrong / applied is **at most 1%** (`MAX_WRONG_UPPER` in `score.ts`). That needs at least 299 applied verdicts with none wrong, or 473 with one wrong. Abstention and coverage do not enter the rule except through the applied count.
+
+`GRADE_TAKES_MEASURED_MODELS` (`src/core/cycle/grade-takes-measured.ts`) lists the qualifying models, **best first by coverage, ties to the cheaper model** (lower USD per verdict). If no model qualifies, the constant stays empty and the report says so. Qualifying does not turn auto-resolve on: in this release the list only marks, in `gbrain takes grades`, which cached verdicts a measured judge gave. Whether auto-resolve is ever wired, and on what real-sample check, is a separate decision.
+
+A model at 100% coverage and abstention is reported as a ceiling. Models are reported in rank order.
+
+## Dev results (context, not counted)
+
+Two dev rounds ran before this freeze, $2.87 of the $4 dev cap. Round one used prompt version 1; gpt-6.1-sol applied 63 verdicts with 4 wrong, all four on `distractor` fixtures, where it graded the similarly named company's outcome. The prompt gained one paragraph (evidence about a different entity whose name only resembles the claim's does not count) and became `hybrid-evidence-v2`; the parser learned to read an answer with prose around the JSON, or a repeated answer that agrees, after Sonnet 5.5 gave no parseable answer on 9 fixtures, most of them a first JSON answer followed by a corrected one. Round two, prompt v2:
+
+| Model | Applied | Wrong | Upper bound | Coverage | Abstention | No answer | USD per verdict |
+|---|---|---|---|---|---|---|---|
+| `openai:gpt-6.1-sol` | 60 | 0 | 4.9% | 100% | 100% | 0 | $0.0015 |
+| `anthropic:claude-sonnet-5-5` | 12 | 0 | 22.1% | 20% | 100% | 1 | $0.0033 |
+| `anthropic:claude-opus-5-5` | 0 | 0 | — | 0% | 100% | 1 | $0.0073 |
+
+Opus 5.5 gave the gold verdict on most resolvable dev fixtures but never at confidence 0.95 or above, so the rule applied none. Sonnet 5.5 reached 0.95 on a fifth of them. Under this rule those two are unlikely to qualify on the counted split; they run anyway, because the project rule asks for the newest model of each family and their counted result is what a later threshold or prompt decision would start from. After round two the fixtures were regenerated once, to place progress hits before an early achievement (a dev `resolved_correct` fixture had progress after the achievement it led to); the check now enforces it.
+
+## What this does not change
+
+The prompt, parser, threshold and fixtures are not edited during the counted runs; weaknesses found are proposed with evidence for a later dated preregistration. Auto-resolve stays off.
diff --git a/evals/take-grading/README.md b/evals/take-grading/README.md
new file mode 100644
index 0000000000..d38fdf5ac9
--- /dev/null
+++ b/evals/take-grading/README.md
@@ -0,0 +1,46 @@
+# Take-grading eval (W6, wave 4b)
+
+Measures which chat models may grade a forecasting take: when the `grade_takes` cycle phase's auto-resolve rule would apply a verdict (not `unresolvable`, confidence at or above `GRADE_TAKES_AUTO_RESOLVE_THRESHOLD`, 0.95), how often is it wrong? The result decides `GRADE_TAKES_MEASURED_MODELS` (`src/core/cycle/grade-takes-measured.ts`), which `gbrain takes grades` uses to mark verdicts no measurement backs. Auto-resolve stays off. The preregistration is [`PREREGISTRATION.md`](PREREGISTRATION.md); raw results and the verdict are mirrored into gbrain-evals (`docs/benchmarks/2026-10-16-take-grading*`).
+
+## Current result
+
+Not yet measured on the counted split; `GRADE_TAKES_MEASURED_MODELS` is empty. The dev rounds that shaped prompt `hybrid-evidence-v2` and the parser are summarized in the preregistration.
+
+## What's here
+
+| File | Role |
+|---|---|
+| `cases.ts` | Seeded builder of 908 synthetic takes with dated evidence: dev 118, counted 790, across eight sets in the rule (resolved correct and incorrect, pre-horizon, pre-claim, no evidence, restatement, near-name distractor, real-world proposition without evidence) and two exploratory sets (partial, world counterfactual). Placeholder names only. |
+| `generate-fixtures.ts` | `cases.ts` → `fixtures.jsonl` (committed). Counted is built first and dev avoids its claims. Regenerate after editing a case; the keyless test fails on drift. |
+| `check.ts` | The $0 instrument checks (counts, placeholders, the dates each set promises) and the production take row and evidence block each fixture becomes. |
+| `score.ts` | Pure grading and summaries: applied and wrong per verdict, coverage, abstention, the Clopper-Pearson bound, the decision rule and the ranking. |
+| `report.ts` | The JSON report and the Markdown tables, including the proposed `GRADE_TAKES_MEASURED_MODELS`. |
+| `harness.ts` | Runner: `--check` ($0), live (`--model`, `--split`, `--out`, `--max-usd`: the production `defaultJudge` call per fixture; the counted split needs `--preregistration <commit>`) and `--score`. |
+
+The keyless test is `test/eval-take-grading.test.ts`. It guards the instrument, not the score.
+
+## Running
+
+```bash
+# Prove the instrument ($0, no key):
+bun evals/take-grading/harness.ts --check
+
+# One live dev run (needs the provider key; stops at the cap):
+bun evals/take-grading/harness.ts --model openai:gpt-6.1-sol --split dev --out results/gpt-dev.jsonl --max-usd 1
+
+# A counted run, only after PREREGISTRATION.md is frozen:
+bun evals/take-grading/harness.ts --model openai:gpt-6.1-sol --split counted --out results/gpt.jsonl --max-usd 3 --preregistration <commit>
+
+# Score saved runs ($0):
+bun evals/take-grading/harness.ts --score results/*.jsonl --json summary.json --md summary.md
+```
+
+## Metrics
+
+- **Wrong share of applied verdicts** (preregistered): one-sided 95% Clopper-Pearson upper bound at most 1%, so at least 299 clean applied verdicts.
+- **Coverage**: resolvable takes applied and right, over resolvable takes in the rule.
+- **Abstention**: unresolvable takes not applied, over unresolvable takes in the rule.
+- **No answer**: no usable verdict (parse failure, provider unavailable); safe, reported apart.
+- **Cost and latency**: USD per verdict from gbrain's price table; wall time p50 and p95.
+
+Ranking: qualifying models first, by coverage, ties to the cheaper model.
diff --git a/src/core/behavior-change-notice.ts b/src/core/behavior-change-notice.ts
index ae7a84dd0c..2007e6ad0e 100644
--- a/src/core/behavior-change-notice.ts
+++ b/src/core/behavior-change-notice.ts
@@ -741,6 +741,8 @@ export const BEHAVIOR_CHANGES: ReadonlyArray<{ since: string; text: ChangeText }
{ since: '0.60.273.0', text: '`gbrain migrate --to <engine>` through the legacy copier (graduation turned off, or Postgres to PGLite) now refuses a brain that holds page versions, with `writer_coordinator_required`, `reason: page_history` and the number of versions it would discard, instead of copying the pages without them. Nothing changes in either datastore. Graduation from PGLite to Postgres carries versions and is unaffected.' },
{ since: '0.60.274.0', text: '`gbrain sources refresh` now completes once every member source has synced to the refresh target or to a commit on top of it. Before, a commit that landed on the target while the refresh synced left it `syncing`, with the worktree fenced, and `--resume` could not finish it either. A refresh left `syncing` by a crashed process still waits for `gbrain sources refresh <source> --resume` when a later sync went past the target.' },
{ since: '0.60.274.0', text: '`gbrain repair file-drift --slug|--request` now resolves a live page whose canonical file is gone from the last commit (a held deletion whose page changed, or a write refused `canonical_file_missing`): `--prefer database` recreates the file from the page, and `--prefer file` soft-deletes exactly that page (purged after 72 h; `gbrain restore <slug> --force` undoes it). Both are preview-bound to the page revision and the file\'s absence, and soft deletes honor the mass-delete valve. A file deleted only in the worktree (still committed) is listed `deletion_uncommitted` and routed to committing the deletion or `gbrain repair ghost-pages`. `gbrain sources reconcile --preview` on a missing file names the same routes, and a held deletion\'s next step is the file-drift preview instead of a reconcile preview that refused. An older gbrain refuses a recreate request and writes nothing.' },
+ // Wave 4b W6 take grading. `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.274.0', text: 'The dream cycle\'s take-grading phase (`grade_takes`) now asks its judge with prompt `hybrid-evidence-v2`: evidence about a different company, person or product whose name only resembles the one in the claim no longer counts toward a verdict. An answer with prose around its JSON, or a repeated answer that agrees, now parses instead of failing (two answers that disagree are still no verdict). Verdicts are cached per prompt version, so the next cycles grade each eligible take once more, within the phase\'s budget (`cycle.grade_takes.budget_usd`, default $3 a run). Auto-resolve stays off, so no take\'s resolution changes. New: `gbrain takes grades` lists the cached verdicts for review and marks judges the take-grading eval has not measured.' },
];
/** The newest disclosed change's release: the notice id moves only when a release adds rows. */
diff --git a/src/core/cli-flag-registry.generated.ts b/src/core/cli-flag-registry.generated.ts
index 202a749a73..11237f42bf 100644
--- a/src/core/cli-flag-registry.generated.ts
+++ b/src/core/cli-flag-registry.generated.ts
@@ -130,7 +130,7 @@ export const CLI_FLAG_REGISTRY: Record<string, readonly string[]> = {
'storage': ['--brain', '--fix', '--help', '--json', '--plan', '--repo', '--restore-only', '--source', '--to'],
'sweep': ['--accept-pending', '--apply', '--assign-corpus', '--background', '--batch-limit', '--brain', '--budget-ms', '--delete-brain', '--explain', '--follow', '--help', '--home', '--json', '--no-accept-pending', '--no-delegate', '--once', '--only', '--progress-interval', '--progress-json', '--quiet', '--retry-failed', '--session', '--source', '--timeout', '--wait'],
'sync': ['--abbrev-ref', '--accept-pending', '--account', '--acknowledge-managed', '--admin-intent', '--adopt-columns', '--adopt-permissions', '--all', '--allow-empty', '--apply', '--apply-rewrites', '--assign-corpus', '--audit', '--auto', '--background', '--batch-size', '--brain', '--branch', '--break-lock', '--budget-ms', '--by-mention', '--cached', '--catch-up', '--client', '--concurrency', '--confirm-destructive', '--confirm-quiesced', '--confirm-relocated-root', '--conflicts', '--contacts-dir', '--content-audit', '--count', '--db-url', '--delete-brain', '--depth', '--detach', '--detail', '--diff-filter', '--dim', '--dir', '--drain', '--dry-run', '--embedding-dimensions', '--embedding-model', '--empty', '--enable', '--exclude', '--exclude-standard', '--expect', '--expected-epoch', '--expected-revision', '--expected-state', '--explain', '--facts', '--fast', '--ff-only', '--filters', '--first-parent', '--fix', '--follow', '--force', '--force-break-lock', '--force-rechunk', '--force-retry', '--force-schema', '--format', '--fresh', '--from-meetings', '--full', '--full-history', '--git-dir', '--git-path', '--group-by', '--hard-deadline', '--harness', '--held', '--help', '--home', '--http', '--id', '--images', '--include-ambiguous', '--include-flagged', '--include-frontmatter', '--include-gitignored', '--include-hidden', '--include-null-signature', '--include-repairs', '--index-audit', '--infer-dates', '--install', '--interval', '--is-ancestor', '--is-shallow-repository', '--json', '--kind', '--lanes', '--lang', '--left-right', '--link-source', '--link-type', '--locks', '--log-noop', '--manifest', '--markdown', '--max-age', '--max-cost', '--max-cost-usd', '--max-jobs', '--max-rss', '--max-sources', '--max-usd', '--migrate-legacy', '--migrate-only', '--missing-path', '--multimodal', '--name', '--name-only', '--name-status', '--ner', '--no-accept-pending', '--no-auto-embed', '--no-autopilot-install', '--no-bulk', '--no-capture', '--no-delegate', '--no-embed', '--no-extract', '--no-gpg-sign', '--no-hard-deadline', '--no-lanes', '--no-llm', '--no-pull', '--no-renames', '--no-repair', '--no-schema-pack', '--no-verify', '--once', '--only', '--operations', '--others', '--oversized', '--overwrite', '--pace', '--pace-max-concurrency', '--pack', '--page', '--parallel', '--params', '--path', '--path-format', '--pglite', '--phase', '--pid-file', '--plan', '--porcelain', '--prefer', '--prefer-postgres', '--preview', '--priority', '--probe', '--probe-pglite', '--progress-interval', '--progress-json', '--project', '--providers', '--prune-orphans', '--query', '--question', '--queue', '--quiet', '--reauth', '--rebuild', '--refresh', '--regenerate', '--remediate', '--remediation-plan', '--remove', '--remove-core', '--replace', '--repo', '--request-id', '--reset', '--reset-checkpoint', '--reset-default', '--restore-only', '--resume', '--retry-failed', '--retry-held', '--reverse', '--scope', '--scopes', '--self-transfer', '--serial', '--short', '--show-current', '--show-toplevel', '--since', '--skills-dir', '--skip', '--skip-failed', '--slot', '--slug', '--slugs', '--source', '--source-id', '--sources', '--src-subpath', '--stale', '--state', '--status', '--stdin', '--strategy', '--supabase', '--symbol-kind', '--symbolic-full-name', '--takes-holders', '--target', '--target-score', '--tier', '--timeout', '--to', '--token', '--top-k', '--type', '--url', '--url-env', '--user', '--verbose', '--verify', '--version', '--wait', '--watch', '--window', '--workers', '--working-tree', '--yes'],
- 'takes': ['--accept', '--batch-size', '--before', '--brain', '--bucket-size', '--by', '--claim', '--dim', '--dir', '--domain', '--dry-run', '--embedding-dimensions', '--embedding-model', '--evidence', '--expected-revision', '--expired', '--force', '--from-pages', '--help', '--holder', '--include-covered', '--json', '--kind', '--limit', '--max-pages', '--no-embed', '--no-embedding', '--offset', '--outcome', '--path', '--quality', '--reject', '--request-id', '--row', '--semantic', '--since', '--sort', '--source', '--source-id', '--stale', '--status', '--supabase', '--to', '--unit', '--until', '--value', '--weight', '--who', '--yes'],
+ 'takes': ['--accept', '--applied', '--batch-size', '--before', '--brain', '--bucket-size', '--by', '--claim', '--dim', '--dir', '--domain', '--dry-run', '--embedding-dimensions', '--embedding-model', '--evidence', '--expected-revision', '--expired', '--force', '--from-pages', '--help', '--holder', '--include-covered', '--json', '--kind', '--limit', '--max-pages', '--min-confidence', '--no-embed', '--no-embedding', '--offset', '--outcome', '--path', '--quality', '--reject', '--request-id', '--row', '--semantic', '--since', '--sort', '--source', '--source-id', '--stale', '--status', '--supabase', '--to', '--unapplied', '--unit', '--until', '--value', '--verdict', '--weight', '--who', '--yes'],
'think': ['--anchor', '--brain', '--calibration-holder', '--help', '--json', '--mcp-only', '--model', '--only', '--reference-date', '--rounds', '--save', '--since', '--source', '--take', '--until', '--with-calibration'],
'transcripts': ['--accept-pending', '--all', '--all-discovery', '--apply', '--background', '--brain', '--days', '--dry-run', '--embed', '--explain', '--facts', '--follow', '--format', '--full', '--help', '--include-self', '--json', '--limit', '--max-bytes', '--max-cost-usd', '--no-accept-pending', '--only', '--progress-interval', '--progress-json', '--purge', '--quiet', '--since', '--source', '--source-id', '--timeout', '--wait'],
'trust': ['--accept-all', '--accept-pending', '--all', '--background', '--batch-size', '--brain', '--break-lock', '--db-url', '--dry-run', '--expect', '--explain', '--follow', '--from', '--help', '--http', '--json', '--kind', '--no-accept-pending', '--only', '--path', '--progress-interval', '--progress-json', '--quiet', '--reason', '--reason-family', '--relower', '--remove', '--repair-unknown-markers', '--resume', '--since', '--slug', '--source', '--source-id', '--timeout', '--undo', '--uri-prefix', '--version', '--wait', '--yes'],