Skip to content

create-vale-rule: scope: raw lints YAML front matter as text #361

Description

@theCodeDrift

From the 2026-09-21 dogfood notes, measured on the pinned binary.

A scope: raw rule sees front matter as prose. product-name-casing flagged target: taskless in blog front matter, where lowercase is a machine key the publish path reads. Capitalizing it would have broken the corpus; the fixes are a scope that excludes front matter, or a pass fixture that carries the key.

---
target: taskless        # machine key, read by the publish path
---
Taskless compiles the correction into a rule.   # prose, correctly cased

The flip side is useful and belongs in the same passage: occurrence with min: 1 under scope: raw can require a front-matter field to exist.

extends: occurrence
message: "A blog draft needs a description in its frontmatter."
level: error
scope: raw
min: 1
token: '(?m)^description: .+$'

create-vale-rule.md lists frontmatter / frontmatter.<key> in the scope table but nothing says that raw includes front matter, or how to keep a machine key out of a prose rule.

What to do

  • Recipe: a gotcha in the scope section covering both directions, with a pass fixture that carries the machine key; topic version bump.
  • Vendor contract test pinning that scope: raw matches inside front matter and that frontmatter.<key> does not leak into body prose.
  • No changeset (recipe only).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIRelated to the taskless CLIdocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions