Skip to content

B-L23K-slug-first-filenames-id-at-end

Consider flipping entity filenames to slug-first, id-at-the-end (before the extension): entity-identifier-shape-D0002.md instead of D-0002-entity-identifier-shape.md. Would amend D-0002-entity-identifier-shape.

Why it’s worth it now. Ids became opaque base-36 (D7F2M, DORMG), so an id-first filename sorts the directory view by random noise. Slug-first sorts by topicdata-model, datamodel-categorization, entity-* cluster together — making the file view actually useful. It also fits decisions already made: files live in per-type directories (so the leading prefix’s “this is a decision” role is redundant), and D0002 already rules that order lives in manifests, not ids.

Tradeoffs to weigh:

  • Mixed sort when slug-less (drv-1, cap-1, T0001) and slug-bearing files share a directory — though each type-dir is usually uniform.
  • Non-standard: the Nygard/MADR ADR convention is NNNN-title.md (id-first); adr-tools etc. expect it. SDLC uses its own machinery, so this is weak.
  • Lowercase-dash prefixes get an ambiguous tail seam (sdlc-prod-1 — id prod-1 or 1?); rides on the still-deferred prefix-grammar question.
  • Rename cost: amending D0002 is docs-only, but renaming the existing slug-bearing corpus (decisions / standards / principles / products ≈ 25 files) + every inbound wikilink is a real sweep, and the scaffolding scripts that emit filenames need a one-line flip (code → belongs in M-ML68, the identifier-migration milestone).

Likely disposition if adopted: amend D0002, apply to new entities immediately, and fold the existing-corpus rename + scaffolding change into M-ML68 rather than a second big rename mid-planning. Deferred for now — thinking about it more.


← Back to Backlog