Skip to content

Coding standards: cover image accessibility, PowerShell matching and constants, and requirement-ID formatting #15

Description

The MSX coding standards are the single browsable source of truth for how code and documentation are written across the ecosystem. When the PSModule instruction files were retired (PSModule/Process-PSModule#349) their guidance moved into a docs site (PSModule/docs#43); the MSX standards re-author and expand most of it, but a few authoring conventions from that guidance have no home here yet.

Request

What is confusing or missing: A contributor or agent authoring documentation or PowerShell against the MSX standards cannot find guidance on three points that the retired PSModule guides covered:

  • Image accessibility — the Markdown standard says nothing about images, so nothing states that every image needs descriptive alt text (needed by screen readers and when an image fails to load), or that repeated URLs read better as reference-style links.
  • PowerShell matching and constants — the PowerShell standard covers $null comparisons and membership but not which operator to reach for when matching text (-like for wildcards, -match for regular expressions, the -c prefix for case-sensitive comparison), nor how to make a value that must not change read-only.
  • Requirement identifiersSpec-Driven Development says to number requirements and the template shows F1 / N1, but the prose never names the identifier scheme, nor that identifiers are written in bold and cited unchanged from the design and the acceptance criteria.

Acceptance criteria

  • The Markdown standard states that images carry descriptive alt text and that repeated or long URLs may use reference-style links.
  • The PowerShell standard states which operator to use for wildcard and regular-expression matching and how to force case sensitivity, and how to declare a read-only constant.
  • The Spec-Driven Development standard names the F# / N# requirement-identifier convention and that identifiers are bold and cited consistently.
  • All additions pass the existing documentation CI (super-linter, link check, index check) and do not reverse any deliberate markdownlint relaxation.

The PSModule "requirement number formatting" rule uses a non-breaking hyphen for FR-001 / NFR-001-style identifiers. MSX identifiers are F1 / N1 with no hyphen, so that rule is adapted to the MSX scheme rather than copied.


Technical Decisions

Additions land in existing pages rather than new ones, so the standards stay navigable and the generated index is unchanged:

  • src/docs/Coding-Standards/Markdown.md — extend the "Style beyond the linter" section.
  • src/docs/Coding-Standards/PowerShell/index.md — extend the "Idioms and pitfalls" section.
  • src/docs/Ways-of-Working/Spec-Driven-Development.md — clarify the "Requirements" section.

No lint configuration changes: the deliberate relaxations (line length, list-marker style, blank-line rules) stand.


Implementation Plan

  • Add image alt-text and reference-style-link guidance to the Markdown standard.
  • Add matching-operator and read-only-constant idioms to the PowerShell standard.
  • Name the F# / N# bold requirement-identifier convention in Spec-Driven Development.
  • Verify Update-DocumentationIndex.ps1 -Check and Test-DocumentationLink.ps1 pass locally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions