memory-schema-preflight

Validate canonical YAML frontmatter and required Markdown sections in memory artifacts before CI.

Updated May 14, 2024
One-click install
npx skills add https://github.com/wagnerra23/oimpresso.com --skill memory-schema-preflight
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: memory-schema-preflight
Source: https://github.com/wagnerra23/oimpresso.com/tree/main/.claude/skills/memory-schema-preflight
Command: npx skills add https://github.com/wagnerra23/oimpresso.com --skill memory-schema-preflight

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

It prevents repeated CI failures caused by small but strict formatting and schema issues in the repository’s memory artifacts (SPEC.md, RUNBOOK.md, ADRs, sessions, handoffs, and charters).

Core Features & Use Cases

  • Schema pre-validation for memory artifacts: Enforces canonical rules extracted from scripts/memory-schemas/*.schema.json, including strict enums, quoted string formats for version/dates, and correct slug patterns.
  • Filename + section guardrails: Validates ADR filename patterns and required Markdown sections (e.g., SPEC requires one of the allowed User Story headings).
  • Pre-commit workflow to stop fail loops: Runs local validators before writes/edits and before git commit when changes touch the defined memory/* paths.

Quick Start

Activate this skill before editing any file under memory/requisitos or memory/decisions that ends with SPEC.md, RUNBOOK*.md, or any ADR/session/handoff/charter artifact.

Frequently Asked Questions about memory-schema-preflight

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate YAML frontmatter in Markdown files before committing?

You validate YAML frontmatter by running local schema validators that enforce canonical rules, strict enums, and quoted string formats for version and date fields, preventing formatting errors from reaching CI.

Why do my ADR files keep failing CI checks over filename patterns?

ADR files fail CI checks when their filenames do not match required slug and regex patterns. Running a pre-commit validation step locally catches these filename pattern mismatches before they trigger continuous integration failures.

What Markdown sections are required for a SPEC.md memory artifact?

SPEC.md memory artifacts require specific Markdown section headings, including one of the allowed User Story headings. Local validators check for these required section headings to ensure document structure complies with schema constraints.

Can I enforce RUNBOOK owner letter constraints locally?

You can enforce RUNBOOK owner letter constraints locally by running validation scripts against your memory artifacts. These scripts check that owner fields comply with strict schema rules before files are written or committed.

When should I run a schema pre-validation check on memory artifacts?

Schema pre-validation should run before write or edit operations on files within memory directories, and before git commit when changes touch defined memory paths. This prevents repeated CI failures caused by small formatting issues.

Does this schema validation work with session and handoff Markdown files?

Yes, schema validation works with session and handoff Markdown files, along with charters and requirements documents. It validates canonical YAML frontmatter and required Markdown sections across all defined memory artifact paths.