Skip to content

Lint inline YAML arrays in Markdown frontmatter #54

Description

@junior-ricon

Problem

Fold notes and agent-home status notes use YAML frontmatter fields like related: to connect durable notes. Inline arrays in those fields concentrate many unrelated future edits onto one source line:

related: [writing-style, markdown-ordered-lists, status-is-not-session-log, conflict-minimized-status-surfaces]

That shape is conflict-prone in high-churn notes repos. It also undermines the source-editing discipline we want from patterns like editable-prose-lines and curated-related-frontmatter.

Recent example: while drafting ricon-family/fold#123, Or caught an inline related: line in a touched note and pointed out that it was itself likely to cause merge conflicts.

Desired lint

Add a codebase lint that detects inline YAML arrays in Markdown frontmatter for conflict-prone fields.

Suggested first scope:

  • Parse only the YAML frontmatter block at the top of Markdown files.
  • Flag inline arrays for related: always.
  • Consider aliases: and tags: later, or only flag them when they exceed a small threshold / line length.
  • Detection-only first; autofix can be a later enhancement.

Example warning:

notes/editable-prose-lines.md:9 related should use multiline YAML list syntax

Preferred form:

related:
  - writing-style
  - markdown-ordered-lists
  - status-is-not-session-log
  - conflict-minimized-status-surfaces

Non-goals

  • Do not require every YAML sequence in every file to be multiline yet.
  • Do not rewrite frontmatter automatically in the first pass.
  • Do not duplicate full Markdown/frontmatter parsing logic if codebase already has a reasonable helper path.

Why codebase

This is a cross-repo source hygiene rule, not a fold-only convention. It would help encrypted/notes-managed repos, agent homes, and project notes that use frontmatter.

Related

  • ricon-family/fold#123 — candidate pattern cluster for conflict-minimized status surfaces.
  • KnickKnackLabs/codebase#53 — similar source-shape lint idea for #USAGE field ordering, but different file format and rule.
  • KnickKnackLabs/codebase#44 — existing multiline array parsing issue for codebase config, not this frontmatter lint.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions