feat(board): give --plan a focus cutoff that reports what it held back

--focus "<prose>" narrows the day plan to repos whose STATE.md DECLARES a
matching topic marker. Measured on the real tree: 26 blocks to 6.

The filter alone was never the feature. --plan documents that it takes one
position (the order), hides nothing, and labels what it cannot rank rather
than dropping it, so a silent cutoff would break a property the format had
already written down. The same run prints the slugs the prose resolved to,
how many blocks it removed, the repos that MENTION a resolved slug with no
marker line - named, not counted - and how many STATE.md it searched. Each
surviving block carries the declaration it survived on.

Enumerated rather than counted because the decisive find behind this feature
was invisible to every string measurement until the held-back population was
listed. "nevner", never "dekker": this reports text found, and board.sh has
no grounds for a claim about relevance. The slug vocabulary comes from the
scanned STATE.md themselves, so the "no other file" invariant survives.

Emitted as key=value, not '#' comments: the consumer's parser runs in
paragraph mode and drops any block without tab=, so a comment would reach the
operator on the terminal path and vanish on the driver path - the one case
where the cutoff is applied unseen.

board-selftest 89 -> 113. The narrowing check is comparative, since every
presence-only assertion passes against a no-op filter.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0186vKCzuUEN5WcJB82kddzF
This commit is contained in:
Kjell Tore Guttormsen 2026-08-02 19:58:25 +02:00
commit f9d2c927ab
4 changed files with 438 additions and 0 deletions

View file

@ -106,3 +106,30 @@ check first, the report in the same commit as the filter — never after it —
`--focus` is the chosen spelling over `--topic`: "topic" names the vocabulary,
which the register owns and this repo only reads; "focus" names the operator's
day, which is what the argument carries.
## What shipped
Built 2026-08-02, after the operator's order. The condition held: the filter and
the report landed in one commit, and a failing `board-selftest.sh` check came
first — the narrowing check is comparative (focused block count strictly below
unfocused, and non-zero), because every presence-only assertion passes against a
no-op filter, which is what the flag was while the unknown-argument fallback
swallowed it.
Fields: `fokus=`, `fokus_droppet=`, `fokus_utenfor=`, `fokus_rekkevidde=` in the
header, `fokus_treff=` per surviving block, and `fokus_ikke_brukt=` when the
prose resolves to nothing. They are `key=value` and not `#` comments for a
reason found by reading the consumer's parser rather than assuming it: it runs
in paragraph mode and discards any block without a `tab=` line, so a comment —
and equally a bare `key=value` in the header — never reaches its records. The
disclosure is therefore emitted in *both* regions, and `morning-driver` was told
the field names so their side can surface it. A cutoff whose disclosure is
dropped by the consumer is applied unseen, which is the failure this whole
condition exists to prevent.
Measured on the real tree the day it shipped: 26 blocks to 6 for the worked
slug, 20 dropped, 3 repos mentioning it without a marker line. The doc's own
earlier counts (13 mentioning / 7 unmarked) no longer reproduce — the population
is rewritten every session, which is the argument for the report counting live
and never carrying a baked-in number.