| id | 76 |
|---|---|
| title | Rename misleading parameter names |
| status | ✅ |
| summary | Rename ratio to tokens-per-word, max-words to max-words-per-sentence, max-column-width-variance to max-column-width-ratio, and warn on directory-structure no-op. |
Part of the user-model work from plan 73. Addresses #68 (user model clarity) and #73 (Hugo user "did you mean?" hint).
Depends on: none (independent of other plans). Update plan 74 guide after landing.
Each config parameter name tells you what it measures and what unit it uses.
Blind trials (plan 73) found three names that mislead:
ratio: 0.75in token-budget: 2/5 read it as a warning threshold. It is a words-to- tokens multiplier.max-words: 40in paragraph-structure: reads as per-paragraph limit. It is per-sentence.max-column-width-variance: 60in table-readability: reads as statistical variance. It is max/min ratio.
Also found: directory-structure: true without
allowed is a silent no-op.
No deprecation. Rename in place, update all config files and docs in a single PR.
- Rename
ratiototokens-per-wordin MDS028 (token-budget):
- Update
ApplySettingsandDefaultSettingsininternal/rules/tokenbudget/rule.go - Update
internal/rules/MDS028-token-budget/README.md - Update
.mdsmith.yml
- Rename
max-wordstomax-words-per-sentencein MDS024 (paragraph-structure):
- Update
internal/rules/paragraphstructure/rule.go - Update
internal/rules/MDS024-paragraph-structure/README.md - Update
.mdsmith.yml
- Rename
max-column-width-variancetomax-column-width-ratioin MDS026 (table-readability):
- Update
internal/rules/tablereadability/rule.go - Update
internal/rules/MDS026-table-readability/README.md - Update
.mdsmith.yml
- Add config warning for MDS033
(directory-structure) when enabled without
allowed:
- In
ApplySettings, when enabled butallowedis empty or absent, mark the rule as configured soCheckruns - In
Check, when configured with an emptyallowed, emit a config warning:directory-structure: rule enabled but no "allowed" patterns configured - Update
internal/rules/MDS033-directory-structure/README.md
- Add "did you mean?" diagnostic for case-mismatched front-matter keys in catalog (MDS019):
- Extract referenced
{Field}placeholder names from the row template (or{{.Field}}if plan 75 has not yet landed) - For each name, check key presence in the file's front-matter map (not empty-value)
- If exact key is missing but a case-
insensitive match exists, emit:
catalog: field "Title" not found; did you mean "title"? - Hugo users write
.Title; this catches muscle-memory errors without false- positiving on intentionally empty values
- Update all overrides in
.mdsmith.ymlthat reference renamed keys. - Update
docs/guides/directives/guides anddocs/guides/metrics-tradeoffs.mdif they reference old names. - Run
mdsmith check .to verify.
-
ratiorenamed totokens-per-word -
max-wordsrenamed tomax-words-per-sentence -
max-column-width-variancerenamed tomax-column-width-ratio -
directory-structure: truewithoutallowedemits a config warning - Case-mismatched front-matter key in catalog emits "did you mean?" hint
-
.mdsmith.ymluses new names throughout - All rule READMEs use new names
- All tests pass:
go test ./... -
go tool golangci-lint runreports no issues -
mdsmith check .passes