Validate changelog

From lightspeedwp/.github · View interactive version

Validate changelog is an AI agent skill from the GitHub repository lightspeedwp/.github. Validate CHANGELOG.md entries and structure against Keep a Changelog 1.1.0 and this repository's changelog rules. Use when adding or editing changelog entries, before pushing a PR that touches CHANGELOG.md, or when the changelog CI checks fail.

How to use this skill

Skill file

Validate Changelog

Validate a changelog entry or a whole CHANGELOG.md the same way this

repository's CI does, before pushing.

When to use this skill

Procedure

Follow the steps in order. Stop and fix failures before moving on.

1. Check the single entry first (two-gate validation)

From the repository root, validate the entry (a YAML file) with the changelog

agent's own validator. --entry takes a file path; to pass the YAML on stdin

instead, use --input -:

node agents/changelog-agent/changelog-validator.js --entry ./path/to/entry.yml --json

This runs the two gates in

agents/changelog-agent/includes/changelogValidator.cjs — entry format, then

structure — using the rules in .github/changelog-rules.yml. A non-zero exit

means the entry itself is invalid; fix the entry, not the validator.

2. Validate the whole file the way CI does

node scripts/agents/includes/changelogUtils.cjs --validate CHANGELOG.md
node scripts/validation/validate-changelog.cjs CHANGELOG.md

These are the exact commands .github/workflows/changelog-unified.yml runs.

The second command enforces the rules in

.github/validation/changelog/rules.json, including CHK_MAX_LENGTH

(entries must not exceed 250 characters). The schema file

schemas/changelog.schema.json defines the expected document shape.

3. Entry rules

Every entry must:

(Added, Changed, Deprecated, Removed, Fixed, Security).

("Faster Sync: files now sync 2x faster" rather than

"refactored sync worker internals").

Examples

Valid entry:

- **Stale Changelog-Agent Links Repointed** — The agent index, agent docs and automation docs, plus the changelog safety script, again point at `agents/changelog-agent/` after the move left them aimed at removed paths. (#3814)

Invalid entry (describes implementation, no PR or issue reference):

- Refactored the internal validation helper to use a different module loading strategy with additional error handling branches and logging statements throughout the file for debugging purposes.

Edge cases

pass-through JSON result (passed: 0, failed: 0, warnings: 0) for CI

plumbing. It performs no validation: a zero exit from it proves nothing.

Always run steps 1 and 2 above.

branch conflicts there, keep both sides' entries rather than picking one.

.github/reports/ describe historical layouts and are intentionally not

updated; validate only live docs and the changelog itself.

command (step 2) is authoritative for merging; record the disagreement

for the changelog maintainers instead of editing either validator.

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.