figure-agent v0.1.7.1
Hardening release driven by the 4-agent mid-review of v0.1.7 before its first remote push.
Findings: non-string YAML scalars crashed the strip with TypeError, all-HTML-comment input silently fell back without a warning, the fallback string was prose an LLM might mis-read, and the priority-order paragraph was placed after the user-supplied content.
Fixed
scripts/llm_author_prompt.py_coerce_selection_noteshelper: warns to stderr (naming the example dir and encountered type) and coerces to str whenselection_notesis non-string (int, list, dict, bare YAML date such as2026-04-29).scripts/llm_author_prompt.py: warn to stderr whenselection_notesis non-empty before HTML-comment stripping but reduces to empty afterward.scripts/llm_author_prompt.py: shorten the missing-key fallback from prose"(none — only preview filename selected)"to"(none)"for parity withselected_previewand the briefing_section_body(empty)sentinel.
Changed
prompts/llm_author_tikz.md: priority-order paragraph is now placed before the{{selection_notes}}placeholder so the LLM absorbs the precedence rule before reading user content.prompts/llm_author_tikz.md: priority paragraph extended to cover the extension pattern (selection notes adding visual detail consistent with §6) — the dogfoodfig3_trap_schematic_v97/spec.yamlshows this is the real common pattern, not contradiction.
Tests
- Three regression tests in
tests/test_llm_author_prompt.py: non-string coercion, empty-after-strip warning, priority paragraph survival.
108 pytest pass (105 → 108), ruff clean.
See CHANGELOG.md for the v0.1.7 entry that introduced selection_notes plumbing, and docs/roadmap-v0.1.7-selection-notes.md for the full audit-driven design rationale.