Summary
The NESTED_QUOTES lint check (gbrain frontmatter validate and gbrain doctor) flags any line in YAML frontmatter with 3 or more unescaped double quotes as nested-quote violations. This false-positives on the legitimate YAML pattern key: ["A", "B", "C"] (flow-sequence array of quoted strings), which is valid YAML and parses correctly.
Reproduce
---
type: law
related: ["LAW-001", "LAW-009", "LAW-013"]
---
$ gbrain frontmatter validate file.md
[NESTED_QUOTES]:3 Nested double quotes in YAML value (use single quotes for the outer)
Why this is a FP
- The line is valid YAML (parses cleanly to
["LAW-001", "LAW-009", "LAW-013"])
- The lint description suggests
key: "value with "inner" quote" (a single value with malformed escaping), which is genuinely broken
- The detector counts raw
" characters per line; arrays of quoted strings naturally have ≥4 quotes per line
Impact
Surfaces 16+ false-positive WARN-level lint findings on legitimate vault content. Brain owners cannot reach Health 100/100 without rewriting valid YAML to unquoted form (e.g., [LAW-001, LAW-009, LAW-013]), which then breaks if any value contains a colon or starts with a special char.
Suggested fix
Detect actual nested-quote pattern (single-value with unescaped inner quotes) rather than counting per-line quote count. Alternatively, parse the YAML value first and only flag if a string value contains an unescaped ".
Environment
- gbrain v0.22.16
- Source:
src/core/markdown.ts:219 and src/core/brain-writer.ts:115
- Surfaced via Nous AGaaS substrate audit (~16 FPs across LAW/AMENDMENT files with
related: ["..."] arrays)
Summary
The
NESTED_QUOTESlint check (gbrain frontmatter validateandgbrain doctor) flags any line in YAML frontmatter with 3 or more unescaped double quotes as nested-quote violations. This false-positives on the legitimate YAML patternkey: ["A", "B", "C"](flow-sequence array of quoted strings), which is valid YAML and parses correctly.Reproduce
Why this is a FP
["LAW-001", "LAW-009", "LAW-013"])key: "value with "inner" quote"(a single value with malformed escaping), which is genuinely broken"characters per line; arrays of quoted strings naturally have ≥4 quotes per lineImpact
Surfaces 16+ false-positive WARN-level lint findings on legitimate vault content. Brain owners cannot reach
Health 100/100without rewriting valid YAML to unquoted form (e.g.,[LAW-001, LAW-009, LAW-013]), which then breaks if any value contains a colon or starts with a special char.Suggested fix
Detect actual nested-quote pattern (single-value with unescaped inner quotes) rather than counting per-line quote count. Alternatively, parse the YAML value first and only flag if a string value contains an unescaped
".Environment
src/core/markdown.ts:219andsrc/core/brain-writer.ts:115related: ["..."]arrays)