Verification

From forcedotcom/apex-language-support · View interactive version

Verification is an AI agent skill from the GitHub repository forcedotcom/apex-language-support. Verification steps for code changes. Debug mode defers lint; full checklist before merge. Use after changes or when planning.

How to use this skill

Skill file

Verification

Do each step in order; do not skip a step unless all previous are passing except in debug mode. Run from repo root; use -w for a single package. After changes outside debug mode, restart from step 1.

  1. npm run compile — references/compile.md (TS4023: ts4023-effect-errors, TS1261: ts1261-filename-casing)
  2. npm run lint — fix new errors/warnings (defer in debug mode — see Debug mode)
  3. Effect code: node_modules/.bin/effect-language-service diagnostics --project tsconfig.json (or --file <path>) — fix reported issues; read_lints does not surface Effect LS. Call the local bin directly, never bare npx (the unscoped registry name is a typosquat). If the bin is missing (fresh clone / pruned node_modules), note it and run npm install — do not skip silently or fall back to npx.
  4. npm run test - See references/unit-tests.md
  5. npm run bundle to ensure bundles still build
  1. If working in packages that define test:web / test:desktop (e.g. packages/apex-ls): run from root npm run test:web -w <package-name> -- --retries 0 / npm run test:desktop -w <package-name> -- --retries 0 as needed. Skip if your changes are not in those packages.
  1. node_modules/.bin/knip - check for dead code related to your changes (local bin, not npx). If the bin is missing, note it and run npm install — do not skip silently or fall back to npx.
  1. check for dupes npm run check:dupes and then look in jscpd-report (and parser-ast report if using check:dupes:parser-ast) to make sure none of your changes are flagged.

For parser-ast diagnostic catalog or generator changes, run after precompile:

range through DiagnosticProcessingService

through generate-messages.mjs

Debug mode

Use when actively debugging a bug (repro, instrumentation, iterative fixes) — including Cursor Debug mode with runtime logging.

Lint suspended (explicit user request)

If the user asks to suspend lint, stop running lint, or says lint is getting in the way of debugging:

Return to the full ordered checklist when leaving debug (e.g. pre-PR, session end).

Rules

Troubleshooting

Plans

When creating plans in plan mode, include verification after the "actual" todos (full checklist; in debug work, note lint/knip/dupes run before merge).

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.