openpencil/packages
Fini 2faf79b5d1 feat(ai): aesthetic detectors — rotation / text-cornerRadius / mixed-sibling-cornerRadius
Why: user reports the validation pipeline lacks "aesthetic standards"
— it accepts misalignment, unwanted corner radius, and other visual
issues as "normal". Existing detectors are pure code-quality (invisible
container / empty path / text height / sibling inconsistency); they
don't catch design-system violations the user can see at a glance.
Vision validation does, but it only runs on Anthropic / Codex /
OpenCode / Gemini providers and only above 30 nodes — leaving a long
tail of small-design / builtin-provider runs with no aesthetic check
at all. Adding cheap pure-function detectors closes that gap with no
upstream provider dependency.

What: 3 new pure detectors in pen-ai-skills/diagnostics:

  - detectUnexpectedRotation — flags non-axis-aligned rotation on
    UI-bearing nodes (frame / text / shape). Skips path / line /
    polygon / image (legitimate decorative geometry frequently
    rotated), skips multiples of 90° (intentional vertical text /
    grid). Catches the "tilted card" hallucination cleanly.

  - detectTextCornerRadius — flags text nodes with cornerRadius > 0.
    Text isn't drawn into a clipped rectangle so the prop is silently
    dropped at render time, but it survives in the doc and burns
    LLM context on subsequent batch_get calls. Suggested fix: remove.

  - detectMixedSiblingCornerRadius — stricter than the existing
    sibling-inconsistency check on cornerRadius alone. Flags outliers
    when 2+ of 3 same-type-and-role siblings share a value and one
    differs (e.g. three cards with cornerRadius 8 / 8 / 12 reads as
    ragged on canvas). Skips 1-1-1 three-way splits (no canonical
    modal) and divider / spacer nodes (visual primitives).

All three are wired through detectAllIssues + the index.ts public
exports + the debug_validation_report MCP tool's `categories` enum so
the user / agent can opt-in or filter via `op debug_validation_report
--categories unexpected-rotation`.

35 new tests cover the load-bearing positive + negative cases for each
detector. 219/219 pen-ai-skills tests pass (was 184; +35). 1080/1080
AI service tests still pass.
2026-05-09 20:59:37 +08:00
..
agent-native@e1f90cab96 chore(agent): bump agent-native to v0.4.0 release 2026-04-17 19:04:15 +08:00
pen-acp Merge origin/v0.8.0 into feat/rust-ification 2026-05-03 21:00:00 +08:00
pen-ai-skills feat(ai): aesthetic detectors — rotation / text-cornerRadius / mixed-sibling-cornerRadius 2026-05-09 20:59:37 +08:00
pen-core Merge remote-tracking branch 'origin/v0.8.0' into v0.8.0 2026-05-08 22:33:12 +08:00
pen-engine Merge origin/v0.8.0 into feat/rust-ification 2026-05-03 21:00:00 +08:00
pen-figma Merge origin/v0.8.0 into feat/rust-ification 2026-05-03 21:00:00 +08:00
pen-mcp feat(ai): aesthetic detectors — rotation / text-cornerRadius / mixed-sibling-cornerRadius 2026-05-09 20:59:37 +08:00
pen-react Merge origin/v0.8.0 into feat/rust-ification 2026-05-03 21:00:00 +08:00
pen-renderer Merge feat/rust-ification into v0.8.0 (Step 0 Rust workspace bootstrap) 2026-05-04 21:00:00 +08:00
pen-sdk Merge origin/v0.8.0 into feat/rust-ification 2026-05-03 21:00:00 +08:00
pen-types Merge origin/v0.8.0 into feat/rust-ification 2026-05-03 21:00:00 +08:00
CLAUDE.md V0.7.0 (#95) 2026-04-11 23:25:13 +08:00