tech-debt: Declare ajv and a YAML parser for the intelligence check
Back to our planProblem
The intelligence check (scripts/check-intelligence.mjs, #337) uses ajv and js-yaml, which are installed today only as dependencies of other packages (ajv through payload, pinned by our overrides; js-yaml through eslint). If those packages drop them, the check breaks.
They weren't added to package.json in #337 because any change to package.json runs the Dependency Audit, which fails on main since 2026-10-24 on high-severity advisories in existing production dependencies (@payloadcms/richtext-lexical via @lexical/headless and happy-dom, and undici; tracked with #178). Adding the two packages would block an unrelated PR on that.
Proposed fix
Once the Dependency Audit passes on main again, add ajv and js-yaml (or yaml) to devDependencies with --legacy-peer-deps, run npm audit, and update the comment at the top of the script.
Acceptance criteria
- Not done:
ajvand a YAML parser are listed indevDependencies. - Not done:
npm run check:intelligencepasses in CI.
Area
dependencies, ci
Priority
priority: low
Generated by Claude Code, opens in a new tab