docs(major2): invariantraden - eksperten svarer paa forslaget paa bordet, og svaret brukes

CLAUDE.md: en invariantrad etter verdict-gate-raden, i husets skjelett - nevneren
(grep "prior_" finner EN soem, maskinens egen), D6 og hvorfor alternativet ble
forkastet, den ledger-bevisste attempts_remaining, honoured = "hentet faktisk",
kanalvalget begrunnet av tre maalinger, den kaller-eide sinken, skriv-iff-reviewer,
de fem nektene ved navn og den hostede pre-whitelist-sjekken. Load-bearing-blokka
lister M1-M40 med roedtall, M29 staar som et FUNN (uvitnet baerer), og de to
armene som var groenne av feil grunn i steg 1-8 er skrevet ned som repoets
vakuoes-gate-klasse, sekstende og syttende gang. Aerlighets-grensene til slutt.

README.md: --proposal-review i enkeltprosjekt-flagglista og en prosablokk etter
--plan-review/--checkpoint-dir-paret, i samme form - hva operatoeren ser og
skriver, at en revise KJOEPER ett forsoek til under de eksisterende takene, at
approve ikke er en ekspertdom, og alle fem nektene navngitt (--checkpoint-dir-en
peker paa --resume, doera som VIRKER). Kundevendt vokabular.

Ny arm: test_the_readme_block_names_every_flag_the_cli_refuses_the_door_with,
Fase-3-formen (raa tekst, uttrukket blokk, kontroll paa at uttrekkeren finner noe
som finnes). Intet M-nummer - lista lukket ved M40 - saa den ble drevet ROED TO
ganger: mot README-en foer blokka fantes, og med blokka paa plass men
--checkpoint-dir omskrevet til aa beskrive nekten uten aa navngi flagget.

1364 passed / 5 skipped. Golden demo-transcript.stdout BYTE-UENDRET
(shasum -a 1 av INNHOLDET = ea8c534773acdbe41ae68f2c55724d69aaf8be4f). Node-ID-ene
er et strengt supersett: 1319 -> 1369, 0 fjernet. mypy og ruff rene.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-09-05 20:40:16 +02:00
commit 4a3655fc07
3 changed files with 211 additions and 1 deletions

View file

@ -416,7 +416,8 @@ when the seam is detached, so the loop cannot silently degrade into theater.
cannot exercise every flag:
- **Single-project**`PROJECT_ID --docs-dir <dir>`, plus optional `--bundle-dir`,
`--verdict-dir`, `--outbox-dir` (which requires `--run-id`), `--dimension-config`,
`--semantic-retrieval`, `--decision`/`--rationale`, `--live-dry-run`, and
`--semantic-retrieval`, `--decision`/`--rationale`, `--live-dry-run`, `--proposal-review`
(opt-in: answer the proposal the validator just accepted, at your terminal — see below), and
`--scripted-replies <file>` (the offline whole-loop door — see
[Walk the whole chain offline](#walk-the-whole-chain-offline); mutually exclusive with
`--live-dry-run`, which stops before the first model call rather than answering it), and
@ -511,6 +512,44 @@ when the seam is detached, so the loop cannot silently degrade into theater.
`--checkpoint-dir` are refused together (two doors onto one review), as are `--resume` and
`--explore` (two sources of one exploration).
**Answering the proposal review (`--proposal-review`).** The plan review asks you about the
*plan*, before any candidate exists. This one asks you about the **candidate on the table**:
every time the deterministic validator accepts a proposal, the run stops and shows you the
measure, the cost lines it touches, the claimed saving, the validator's percentiles, the
checker's verdict and how many further attempts are still affordable. You type `approve` to
take it as it stands, or `revise <what to change>`.
A `revise` is not a note filed for later. It **buys one more generation attempt** under the
caps the run already had — no new loop — and your words go into that attempt's prompt verbatim,
where they stay standing until you next answer. The run then carries whatever the validator
ruled on that later attempt: the expert asks for another try, the machine still decides. Every
round trip is written to `{run_id}-proposal-reviews.json` with your words, which candidate you
were shown, and whether the attempt your `revise` bought actually ran. Input that ends without
an answer stops the run rather than counting as approval.
```bash
uv run python -m portfolio_optimiser.run BYGG-KONTOR-NORD --docs-dir <docs> \
--bundle-dir <bundle> --proposal-review --outbox-dir out --run-id r1
```
`approve` is **not** an expert verdict, and does not become one: it says the candidate may
stand, not that the measure was reviewed and judged. The verdict still arrives the way it
always did — `--decision`/`--rationale` on the run, or a verdict file dropped into
`--verdict-dir` for a later run to read.
The door belongs to single-project mode, and every other combination is refused by name rather
than quietly ignored: `--portfolio` (its waves share one terminal, so several projects'
candidates would arrive at the same prompt with nothing to tell them apart), `--report` (a
read-only roll-up generates nothing to review), `--live-dry-run` (it stops before the first
model call, so no candidate ever reaches you), `--proposals-from-mandate` (that mode settles the
commission deterministically and never generates a candidate), and `--checkpoint-dir` (a parked
exploration returns before any candidate exists — pass `--proposal-review` at `--resume`
instead, which is where the two doors do compose).
Like the plan review it is **synchronous**, so the hosted surface refuses it by name and points
at this CLI. With `--explore --plan-review --proposal-review` you answer two different doors
from the same terminal in sequence: first the plan, then each candidate the validator accepts.
- **Deriving the cost baseline from the knowledge base**`--derive-cost-baseline` (opt-in,
requires `--bundle-dir`). The deterministic validator anchors a proposal's `affected_items` to
the project's actual cost lines. Normally those come from a hand-written `cost-baseline.json` in