Skip to content

fix: allinone Skill 云函数示例缺少 Node.js/CommonJS 环境说明,导致 LLM Judge 评估时报 require is not defined#681

Open
binggg wants to merge 1 commit intomainfrom
automation/attribution-issue-mojfr7pz-cpmu9w-allinone-skill-node-js-commonjs-llm-judg
Open

fix: allinone Skill 云函数示例缺少 Node.js/CommonJS 环境说明,导致 LLM Judge 评估时报 require is not defined#681
binggg wants to merge 1 commit intomainfrom
automation/attribution-issue-mojfr7pz-cpmu9w-allinone-skill-node-js-commonjs-llm-judg

Conversation

@binggg
Copy link
Copy Markdown
Member

@binggg binggg commented Apr 29, 2026

Attribution issue

  • issueId: issue_mojfr7pz_cpmu9w
  • category: skill
  • canonicalTitle: allinone Skill 云函数示例缺少 Node.js/CommonJS 环境说明,导致 LLM Judge 评估时报 require is not defined
  • representativeRun: atomic-js-cloudbase-get-wx-context/2026-04-29T02-24-06-mter1i

Automation summary

SUMMARY:

  • root_cause: The cloud-functions skill's Event Function documentation lacked any CommonJS/Node.js module system guidance. While HTTP Functions had explicit CommonJS vs ESM guidance (in both SKILL.md and http-functions.md), Event Functions had no such guidance. Agents reading the skill could infer ESM was acceptable since the Web invocation example used import cloudbase from "@cloudbase/js-sdk", leading to require is not defined or Cannot use import statement runtime errors when writing Event Function code.
  • changes: Added CommonJS/Node.js environment guidance across 4 files in config/source/:
  1. cloud-functions/references/event-functions.md — Added new "Module system: CommonJS only" section with explicit rules (require() not import, exports.main not export, no "type": "module" in package.json), correct example using wx-server-sdk + getWXContext(), and wrong ESM example showing the failure.
  2. cloud-functions/SKILL.md — Added gotcha: "Using ES Module syntax in Event Functions" to the Common mistakes section.
  3. cloud-functions/checklist.md — Added CommonJS check as step 2 in Required checks, and added ESM failure pattern to Common failure patte

Changed files

  • config/source/guideline/cloudbase/SKILL.md
  • config/source/skills/cloud-functions/SKILL.md
  • config/source/skills/cloud-functions/checklist.md
  • config/source/skills/cloud-functions/references/event-functions.md

@binggg
Copy link
Copy Markdown
Member Author

binggg commented Apr 29, 2026

Attribution post-PR evaluation

  • visibility: internal identifiers, run ids, and private links are intentionally omitted
  • attempt: 1
  • eval_scope: primary_only
  • overall: FAILED
  • summary: at least one planned evaluation case failed
  • updated_at: 2026-04-29T03:27:30.760Z

Cases

  • [FAILED] — primary — evaluation failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant