Add source linter, negative test fixtures, and fallback guidance

- scripts/lint.py: reject raw rectangles, absolute coordinates, hue-budget
  and callout/group/formula-order violations at the source level
- tests/invalid/ + tests/lint-invalid/: negative fixtures proving the
  package and linter reject bad input; test.sh now runs both directions
- references/fallback.md: degraded path when no LaTeX is available
- tests/group-callout.tex: exercise \stgroup and \stcallout
- agents/openai.yaml: agent config
- Docs and .sty updated to match
This commit is contained in:
dela
2026-08-05 16:41:22 +08:00
parent 7b59c81d02
commit 866173a831
34 changed files with 786 additions and 54 deletions
+10 -7
View File
@@ -1,7 +1,8 @@
# Pre-delivery checklist
A clean `build.sh` proves only that TeX was happy. Nothing below is checked by the compiler.
Work through it against the rendered PNG. Any mandatory violation means redraw, not patch.
`build.sh` already checks the source rules, package invariants, missing glyphs and text-box
overflow. The math, semantics and rendered relationships below still require inspection.
Any mandatory violation means redraw, not patch.
## 1. Math (before looking at the picture)
@@ -30,18 +31,20 @@ Open the PNG at 100 %. Most of the first three items are automatic under the flo
they still need looking at, because the cursor only guarantees that objects do not *push*
into each other, not that the figure reads correctly.
- [ ] No absolute coordinate that a `\strow`/`\stcol` could have expressed. Every remaining
hand-placed node is wrapped in `\sttrack`.
- [ ] `\sttopformula` called after the bands, so the formula is centered on the real figure.
- [ ] Every lint exemption in the source is genuinely required and explained; deliverables
normally have none.
- [ ] No forbidden intersection, tangency, clipping or occlusion — including stack offset
sheets, brackets, arrow labels and the meaning box.
- [ ] Every connector's white label underlay covers only its own connector.
- [ ] No connector crosses a box that is not its endpoint.
- [ ] Symbols and shapes sit on two flat lanes per row; stage headings share a left rail.
- [ ] Every `\stgroup` outline names a composite the computation actually has, is captioned,
and carries its members' role hue (`neutral` only for genuinely mixed members).
- [ ] Every `\stcallout` is an aside about its whole band, not a step: one per band, no
taller than the band, and nothing in it that belongs in `\stmeaningbox`.
- [ ] Top zone compact (≤2 formula lines, no shape underbraces).
- [ ] Bottom box: one column, ≤3 rows, no overflow, no shrunken type.
- [ ] Signature outside the box, one line, names what the figure actually shows, not clipped
and not visually dominant.
- [ ] If requested, signature is outside the box, one line, accurate, unclipped and subdued.
- [ ] Structural support exact: known zeros unfilled, masks and diagonals exactly right.
## 5. Thumbnail audit