design.md icon indicating copy to clipboard operation
design.md copied to clipboard

feat: add Iconography section to the DESIGN.md spec

Open mvanhorn opened this issue 5 months ago • 0 comments

Summary

Adds a recognized, prose-focused ## Iconography section to the DESIGN.md spec, positioned between Shapes and Components, per proposal #101 (building on #41 / #44).

Why

Iconography is a universal facet of a design system, yet ## Iconography was previously treated as an unknown section (it was literally the example of an unknown heading in the spec's Consumer Behavior table). Authors had no canonical place to document their icon library and conventions, and the linter could not order-check the section. Per PHILOSOPHY.md, the prose is where the design lives, so this section is added as prose-focused guidance rather than a new validated token group.

Changes

  • spec-config.yaml: adds a single Iconography entry to the sections: list between Shapes and Components. Because CANONICAL_ORDER and the section-order rule derive automatically from this config, the linter now recognizes and order-checks ## Iconography with no rule-code changes.
  • spec-gen/spec.mdx: adds the prose block describing the section, consistent with the other prose-focused sections (Colors, Typography, Shapes). It prompts authors to cover the icon library and rationale, style variant, stroke/weight conventions, size scale, color rules, and mixing policy. The "Unknown section heading" example in the Consumer Behavior table is updated from ## Iconography to ## Motion, since Iconography is now recognized.
  • docs/spec.md: regenerated via bun run spec:gen (not hand-edited). The Section Order list now includes Iconography in position 7.
  • examples/paws-and-paths/DESIGN.md: adds a short illustrative prose-first ## Iconography section between Shapes and Components.

In keeping with PHILOSOPHY.md and the issue direction, this is intentionally prose-focused: no required icons.* token group, no enum enforcement, and no icon-specific linter rules are introduced.

Testing

  • bun test passes (full suite; the existing spec-config and section-order tests are structural and required no changes).
  • bun run spec:gen is idempotent (--check reports docs/spec.md up to date; re-running produces no drift).
  • The updated paws-and-paths example lints clean (0 errors, 0 warnings): an ## Iconography heading between Shapes and Components produces no section-order finding, while placing it out of order still triggers the existing section-order rule.

Fixes #101

mvanhorn avatar Jun 23 '26 09:06 mvanhorn