test(uxd-figma-read): add behavior/contract eval suite - #3
Conversation
📝 WalkthroughWalkthroughChangesFigma Read Evaluation Coverage
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@plugins/uxd-workshop/skills/uxd-figma-read/eval/eval.yaml`:
- Around line 64-67: Update the credential-detection logic around asks_pat and
asks_mcp to require actionable request language, such as asking the user to
configure or provide FIGMA_PAT or connect Figma MCP, rather than accepting
passive mentions. Also require the response to clearly state that it cannot
proceed without the requested credential or connection before returning success.
- Around line 92-105: Update the screenshot-validation logic around
page_as_screenshot and the bad regex so page recommendations are evaluated
independently of frame IDs mentioned elsewhere. For each screenshot
recommendation containing page_id, determine whether that same mention also
contains a frame ID, and reject it when the page is selected without a frame; do
not gate rejection on the global found_frames collection.
- Around line 17-20: Ensure the missing-credentials evaluation runs offline and
without credentials: update the permissions configuration in
plugins/uxd-workshop/skills/uxd-figma-read/eval/eval.yaml and the claude-code
runner setup in .github/workflows/skill-evals.yml (lines 92-94) to block
Bash/network access, and update
plugins/uxd-workshop/skills/uxd-figma-read/eval/cases/missing-credentials/input.yaml
(lines 2-4) to explicitly unset FIGMA_PAT rather than relying on prompt text.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: f1f366aa-63d8-4b18-94c2-787019758b6f
📒 Files selected for processing (8)
plugins/uxd-workshop/skills/uxd-figma-read/eval/cases/frame-not-page/annotations.yamlplugins/uxd-workshop/skills/uxd-figma-read/eval/cases/frame-not-page/input.yamlplugins/uxd-workshop/skills/uxd-figma-read/eval/cases/frame-not-page/metadata.xmlplugins/uxd-workshop/skills/uxd-figma-read/eval/cases/missing-credentials/annotations.yamlplugins/uxd-workshop/skills/uxd-figma-read/eval/cases/missing-credentials/input.yamlplugins/uxd-workshop/skills/uxd-figma-read/eval/cases/url-parse-node-id/annotations.yamlplugins/uxd-workshop/skills/uxd-figma-read/eval/cases/url-parse-node-id/input.yamlplugins/uxd-workshop/skills/uxd-figma-read/eval/eval.yaml
|
Would it be worth adding a case for a URL without |
Offline cases for URL parsing, credential gating, and frame-vs-page screenshot selection. Manual-only (workshop skills skipped by CI). Co-authored-by: Cursor <cursoragent@cursor.com>
Address review: require actionable credential requests, evaluate page-screenshot selection per mention, isolate FIGMA_PAT, and cover /file/ URLs and missing node-id. Co-authored-by: Cursor <cursoragent@cursor.com>
03c6a23 to
96864a7
Compare
|
Great point Jeff, they're more likely to share an entire Figma URL/page than pointing to a specific node/frame, so we should account for that. Grok 4.6's summary of its change:
|
Skill Contribution
Skill name: uxd-figma-read
Target plugin: uxd-workshop
What it does: Adds an offline behavior/contract eval suite for URL parsing, credential gating, and frame-vs-page screenshot selection.
Summary
uxd-figma-read: URL/node-id parsing (including/file/URLs and missingnode-id), missing-credentials gating, and frame-vs-page screenshot selectionFIGMA_PATin the eval environmentHow I tested it
eval/eval.yamljudges against skill behavior in SKILL.mdTest plan
eval/eval.yamljudges against skill behavior in SKILL.mdclaude -p "/agent-eval-harness:eval-run --config plugins/uxd-workshop/skills/uxd-figma-read/eval/eval.yaml --no-llm-judges"Checklist
make check(validates manifests + regenerates docs) — N/A, eval-only change, no manifests/docsuxd-for UXD skills,pf-for PF skills)nameanddescription(namematches directory name) — existing skill, unchanged.claude-plugin/and.cursor-plugin/manifests are identical — N/Askills/<skill-name>/eval/