Why
humanizeLabel() currently splits on - and capitalizes the first letter of each word, producing Openapi V3 Migration instead of OpenAPI v3 Migration. Kebab-case destroys all case information, so acronyms and version tokens cannot be recovered from the string alone. This makes generated headings and sidebar labels look machine-generated for projects with API, REST, OAuth, or similar names.
What Changes
- Add a static acronym dictionary to
humanizeLabel()that maps lowercase tokens to their canonical form (e.g.,api→API,openapi→OpenAPI) - Add version token detection: tokens matching
/^v\d+$/(e.g.,v3,v10) stay lowercase - Add optional
titlefield support in.openspec.yamlfor changes — if present, used verbatim instead of humanizing the directory name - Add optional frontmatter
title:support inspec.mdfiles — if present, used verbatim as the spec label
Capabilities
New Capabilities
label-dictionary: Acronym dictionary and version token detection withinhumanizeLabel(), plustitleoverride support from.openspec.yamland spec frontmatter.
Modified Capabilities
label-humanization: Extended with dictionary lookup and version token handling. Override viatitlefield takes precedence over automatic humanization.openspec-folder-reader: Must read and exposetitlefrom.openspec.yamlfor changes, and parse frontmattertitlefromspec.mdfiles.
Impact
src/utils.ts— extendhumanizeLabel(), updatereadOpenSpecFolder()to extract titlessrc/types.ts— add optionaltitle?: stringtoCapabilitySpecandChange- No breaking changes to the public API
- All call sites that currently pass
nameto display functions pick uptitle ?? nameautomatically