The trap
find --meta note_type=X aliases to the frontmatter type: field, which holds the authored casing (Chapter). But the result row displays the snake-cased search-index projection (chapter). So the output shows you a value that, fed back into the same query, returns zero rows — silently, exit 0.
Verified against a live project:
$ bm find --meta 'note_type=chapter' --fields chapter_number --plain
exit=0 # <- zero rows, no error
$ bm find --meta 'note_type=Chapter' --fields chapter_number --plain
chapters/Chapter 1.md {"chapter_number":"1"}
...
exit=0
$ bm find --meta 'note_type=Chapter' --json | jq '.results[0].metadata'
{"note_type": "chapter"} # <- the value that matches nothing
Same shape for multi-word types: LiteraryDevice is authored, literary_device is displayed.
Why it matters
An agent reading its own results learns the wrong value and writes a query returning nothing. Zero rows with exit 0 is indistinguishable from "no notes match" — the failure never announces itself. This is the same silent-wrong-answer class as the wrong-project writes (#1415) and the never-indexed empty reads (#1414).
Options
- Display the value that queries (authored
type) rather than the index projection.
- Match case-insensitively on
note_type predicates, so both spellings work.
- Normalize the predicate the same way the projection is normalized, so
chapter matches Chapter.
(2) or (3) seem kinder than making callers care about which representation they are looking at; (1) alone still leaves the two spellings behaving differently.
Found while verifying the literary-analysis skill's documented commands (#1424), where every note_type example was written from the displayed value and therefore returned nothing.
🤖 Generated with Claude Code
https://claude.ai/code/session_014pmKq6bqCi6Zp6BTHuZjrp
The trap
find --meta note_type=Xaliases to the frontmattertype:field, which holds the authored casing (Chapter). But the result row displays the snake-cased search-index projection (chapter). So the output shows you a value that, fed back into the same query, returns zero rows — silently, exit 0.Verified against a live project:
Same shape for multi-word types:
LiteraryDeviceis authored,literary_deviceis displayed.Why it matters
An agent reading its own results learns the wrong value and writes a query returning nothing. Zero rows with exit 0 is indistinguishable from "no notes match" — the failure never announces itself. This is the same silent-wrong-answer class as the wrong-project writes (#1415) and the never-indexed empty reads (#1414).
Options
type) rather than the index projection.note_typepredicates, so both spellings work.chaptermatchesChapter.(2) or (3) seem kinder than making callers care about which representation they are looking at; (1) alone still leaves the two spellings behaving differently.
Found while verifying the literary-analysis skill's documented commands (#1424), where every
note_typeexample was written from the displayed value and therefore returned nothing.🤖 Generated with Claude Code
https://claude.ai/code/session_014pmKq6bqCi6Zp6BTHuZjrp