Skip to content

PR: Fix frontmatter validation errors and automate schema cleanup for docs and instructions#129

Open
ashleyshaw wants to merge 1 commit into
developfrom
claude/fix-frontmatter-workflow-017KZTjLDWX7NPxbkxypuAos
Open

PR: Fix frontmatter validation errors and automate schema cleanup for docs and instructions#129
ashleyshaw wants to merge 1 commit into
developfrom
claude/fix-frontmatter-workflow-017KZTjLDWX7NPxbkxypuAos

Conversation

@ashleyshaw
Copy link
Copy Markdown
Member

@ashleyshaw ashleyshaw commented Nov 18, 2025


name: "Pull Request"
about: "General changes, refactors, and maintenance"
title: "PR: Fix frontmatter validation errors and automate schema cleanup for docs and instructions"
labels: ["status:needs-review"]

General Pull Request

This PR resolves critical frontmatter validation errors and introduces automation scripts to ensure ongoing schema compliance across the documentation and instructions in this repository.

Fixed Issues

YAML Parsing Errors (29 files → 0 files)

  • Corrected markdown-style references to schema-compliant object format.
  • Standardized [Title](URL) citations to path/description object inline with schema.
  • Removed all duplicate YAML keys ("Map keys must be unique" errors resolved).

Schema Validation (531 invalid → 149 invalid)

  • Populated missing file_type fields in 382+ files using automated inference.
  • Added name fields to agent files, using the file title as fallback when absent.
  • Eliminated duplicate frontmatter keys in several instruction files.
  • Repaired corrupted frontmatter in playwright-tests.instructions.md.
  • Normalized date format in frontmatter template files (placeholders replaced with valid dates).

Changes Made

New Tools

  • schemas/frontmatter/fix-frontmatter.js: Script for automatic frontmatter fixes and key normalization.
  • schemas/frontmatter/fix-all.js: Batch processor to run fixes against all markdown-based files.

Validation Results

  • Before: 105 valid, 531 invalid, 29 errors
  • After: 516 valid, 149 invalid, 0 errors
  • Improvement: +411 valid files, -382 invalid files, -29 errors (error count now 0)

Remaining Issues

Of the 149 remaining invalid files, only minor schema warnings remain:

  • Missing optional description fields
  • Occasional invalid enum values for mode, status, or domain fields
  • Non-blocking validation warnings

These issues do not affect workflow execution and can be addressed as part of routine maintenance.

Testing

  • All changes validated against schemas/frontmatter/frontmatter.schema.json.
  • frontmatter-validation.yml workflow now completes without errors.
  • Manual and automated validation confirms successful parsing and schema conformance.

Fixes workflow errors logged by frontmatter-validation.yml.

ℹ️ This repository enforces changelog, release, and automation rules

…pe fields

This commit fixes critical frontmatter validation errors across the repository:

## Fixed Issues

### YAML Parsing Errors (29 files → 0 files)
- Fixed markdown-style references format to schema-compliant format
- Converted `[Title](URL)` references to proper object format with path and description
- Resolved all "Map keys must be unique" errors from duplicate YAML keys

### Schema Validation (531 invalid → 149 invalid)
- Added missing `file_type` fields to 382+ files using automatic inference
- Added missing `name` fields to agent files (using title as fallback)
- Fixed duplicate frontmatter keys in multiple instruction files
- Fixed corrupted frontmatter in playwright-tests.instructions.md
- Fixed date format in template files (changed placeholder to valid date)

## Changes Made

### New Tools
- `schemas/frontmatter/fix-frontmatter.js`: Script to automatically fix common frontmatter issues
- `schemas/frontmatter/fix-all.js`: Batch processor for all markdown files

### Validation Results
- Before: 105 valid, 531 invalid, 29 errors
- After: 516 valid, 149 invalid, 0 errors
- Improvement: +411 valid files, -382 invalid files, -29 errors (100% error elimination)

### Remaining Issues
The 149 remaining invalid files have minor schema validation issues:
- Missing optional `description` fields
- Invalid enum values for `mode`, `status`, or `domain`
- Non-critical validation warnings

These do not block workflow execution and can be addressed incrementally.

## Testing
- All changes validated against schemas/frontmatter/frontmatter.schema.json
- Workflow now passes with 0 YAML parsing errors
- All frontmatter can be successfully parsed and validated

Fixes workflow errors in frontmatter-validation.yml
@ashleyshaw ashleyshaw requested a review from Copilot November 18, 2025 12:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR systematically fixes critical frontmatter validation errors across the repository by converting all YAML frontmatter from markdown-style format to proper JSON/YAML schema-compliant format. The changes address 29 YAML parsing errors and reduce schema validation failures from 531 to 149 by adding missing required fields (file_type, name) and converting markdown-style references to proper structured formats.

Key Changes:

  • Converted single-quoted YAML keys to double-quoted JSON format for consistency
  • Added missing file_type field to 382+ files using automatic inference
  • Fixed markdown-style array and object formatting to proper YAML/JSON syntax
  • Resolved duplicate frontmatter keys and corrected malformed frontmatter blocks

Reviewed Changes

Copilot reviewed 300 out of 467 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/prompts/awesome-copilot/*.prompt.md (58 files) Converted frontmatter from single-quoted YAML to double-quoted JSON format; added file_type: "prompt" field; converted arrays to proper YAML list syntax
.github/instructions/wpcs.instructions.md Converted frontmatter to JSON format; converted owners from string to array; added file_type: "instructions"
.github/instructions/workflows/*.instructions.md (8 files) Standardized frontmatter format; converted arrays and added file_type: "instructions"
.github/instructions/wordpress/*.instructions.md (8 files) Fixed frontmatter format; converted applyTo from string to array format where applicable
.github/instructions/tests/*.instructions.md (5 files) Standardized frontmatter; converted owners to array format
.github/instructions/awesome-copilot/*.instructions.md (25+ files) Converted all frontmatter to consistent JSON format with proper arrays
.github/instructions/wordpress/wpcs-html.instructions.md Removed duplicate frontmatter keys (version, permalink, license)
.github/instructions/wordpress/block-patterns.instructions.md Removed duplicate keys; converted markdown-style related_links to proper markdown format in content
.github/instructions/playwright-tests.instructions.md Fixed corrupted frontmatter structure; removed duplicate keys

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Nov 18, 2025

Important

Review skipped

More than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review.

193 files out of 300 files are above the max files limit of 100. Please upgrade to Pro plan to get higher limits.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

.coderabbit.yml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'auto_labels', 'auto_assign', 'auto_review'
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch claude/fix-frontmatter-workflow-017KZTjLDWX7NPxbkxypuAos

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ashleyshaw ashleyshaw changed the title Fix frontmatter validation workflow error PR: Add automated REST API security audit workflow and reporting Nov 18, 2025
@ashleyshaw ashleyshaw changed the title PR: Add automated REST API security audit workflow and reporting PR: Fix frontmatter validation errors and automate schema cleanup for docs and instructions Nov 18, 2025
@ashleyshaw ashleyshaw closed this May 19, 2026
@ashleyshaw ashleyshaw reopened this May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants