openpencil/packages
Fini 2902bdc88e feat(ai-skills): teach parent_id rule + trim PREFER list "Different from"
Two diet/teaching changes to elements.md, both motivated by today's
ab-v4 smoke results:

(a) parent_id teaching — minimax-m2.7 invented "members-section" /
    "canvas" as parent_id values on its multi-tool composite output,
    then every one of its 14 tags failed apply with "parent_id X not
    found in document". Same pattern as yesterday. Adds an explicit
    rule near the top of elements.md (right under the multi-tool
    banner) — `parent_id` is REAL or OMITTED, never invented. The
    `<page>` / `<panel>` / `<sidebar>` placeholders in the cookbook
    recipes are documentation conventions; in actual output, OMIT
    the field. Names the failure mode by reproducing the error
    message format so models learn to avoid it.

(b) Phase 3 token diet — strip ". Different from <tool> (...)"
    disambiguation suffixes from the PREFER list (22 entries had
    them, ~80-200 chars each = ~2.5kb / ~625 tokens saved). The
    primary keyword + tool-name + capability description survives
    intact; the cross-references pointing at sibling tools get
    dropped. Risk: slight increase in wrong-tool routing on
    ambiguous prompts. Worth it for the size reduction; the
    decision tree alone still shows the tool family in context.

Verified by mechanical diff — perl in-place edit, then visual
review confirms no other content was touched. 3785 vitest pass,
format clean, tsc silent.

Net effect on T-prompt size (chars / 4 estimate):
  T + composite + mobile: was 17,930 → now 17,475 (-455 chars)
  T + composite + dashboard: was 18,437 → now 17,983 (-454 chars)
  T + obvious + dashboard: ~14,009 → ~13,556 (-453 chars)

Per-arm savings are smaller than the raw 2.5kb trim because (a)
adds ~700 chars of parent_id teaching. Net win: ~450 chars / ~110
tokens per call. Modest but compounds across 520+ ab-v4 runs.
2026-04-29 09:49:58 +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 chore(release): bump to v0.8.0 2026-04-27 08:20:00 +08:00
pen-ai-skills feat(ai-skills): teach parent_id rule + trim PREFER list "Different from" 2026-04-29 09:49:58 +08:00
pen-core fix(pen-core): reject invalid enum values in 5 more element builders 2026-04-29 09:49:57 +08:00
pen-engine chore(release): bump to v0.8.0 2026-04-27 08:20:00 +08:00
pen-figma chore(release): bump to v0.8.0 2026-04-27 08:20:00 +08:00
pen-mcp fix(ai): step-card marker clips overflow + tighten doc to short index 2026-04-28 08:55:00 +08:00
pen-react chore(release): bump to v0.8.0 2026-04-27 08:20:00 +08:00
pen-renderer chore(release): bump to v0.8.0 2026-04-27 08:20:00 +08:00
pen-sdk chore(release): bump to v0.8.0 2026-04-27 08:20:00 +08:00
pen-types chore(release): bump to v0.8.0 2026-04-27 08:20:00 +08:00
CLAUDE.md V0.7.0 (#95) 2026-04-11 23:25:13 +08:00