Skip to content

Commit 2bff8ae

Browse files
author
merge-queue-bot
committed
Merge PR #541: markdownlint migration: auto-conversion via mdsmith init --from-markdownlint + guide rewrite
2 parents 6a6abf4 + ce8ba27 commit 2bff8ae

26 files changed

Lines changed: 2455 additions & 162 deletions

.github/copilot-instructions.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ row: "- [{summary}](../{filename})"
110110
- [User guides for mdsmith directives, structure enforcement, and migration.](../docs/guides/index.md)
111111
- [Every channel that ships the mdsmith binary, the VS Code extension, or the Claude Code plugin — npm, PyPI, Homebrew, asdf, mise, a Flatpak bundle, the GitHub release, the Visual Studio Marketplace plus Open VSX, and the in-repository Claude Code marketplace — and which channel to pick for which workflow.](../docs/guides/install.md)
112112
- [Trade-offs and threshold guidance for readability, structure, length, and token budgets.](../docs/guides/metrics-tradeoffs.md)
113-
- [Move a project from markdownlint-cli or markdownlint-cli2 to mdsmith — the rule mapping, the config rewrite, and the markdownlint-to-mdsmith rule correspondence.](../docs/guides/migrate-from-markdownlint.md)
113+
- [Convert a markdownlint config to `.mdsmith.yml` with `mdsmith init --from-markdownlint`, review the conversion notes, move inline disables into overrides, and run both linters in parallel until cutover.](../docs/guides/migrate-from-markdownlint.md)
114114
- [Use `<?catalog?>` with a per-file `summary` front matter field to emit a one-line index of a directory, so AI coding agents read a few thousand tokens of metadata up front and only `Read` the files a task actually touches.](../docs/guides/progressive-disclosure.md)
115115
- [Declare a document-structure schema inline on a kind or in a proto.md file, validate headings and front matter, and tighten rule config per section.](../docs/guides/schemas.md)
116116
- [CLI commands, flags, exit codes, and output format.](../docs/reference/cli.md)
@@ -121,7 +121,7 @@ row: "- [{summary}](../{filename})"
121121
- [Emit a schema-conformant Markdown file as a JSON/YAML/msgpack data tree.](../docs/reference/cli/extract.md)
122122
- [Auto-fix lint issues in Markdown files in place.](../docs/reference/cli/fix.md)
123123
- [Show built-in documentation for rules, metrics, and concept pages.](../docs/reference/cli/help.md)
124-
- [Generate a default `.mdsmith.yml` config in the current directory.](../docs/reference/cli/init.md)
124+
- [Generate a default `.mdsmith.yml` config in the current directory, or convert an existing markdownlint config with `--from-markdownlint`.](../docs/reference/cli/init.md)
125125
- [Inspect declared file kinds and resolve effective rule config per file.](../docs/reference/cli/kinds.md)
126126
- [Selection-style commands that walk the workspace and emit matches.](../docs/reference/cli/list.md)
127127
- [Run a Language Server Protocol server on stdio for editor integrations.](../docs/reference/cli/lsp.md)
@@ -136,6 +136,7 @@ row: "- [{summary}](../{filename})"
136136
- [Glob pattern syntax across mdsmith config, directives, and CLI argument expansion, with the supported exclusion semantics for each surface.](../docs/reference/globs.md)
137137
- [Look up exact CLI commands, config glob and schema syntax, the built-in conventions, and the section-schema grammar.](../docs/reference/index.md)
138138
- [Each file under `.mdsmith/kinds/` declares one kind. The basename is the kind name; the file body carries the full `KindBody` — schema, rules, `path-pattern:`, `extends:`. Sits alongside inline `kinds.<name>:` in `.mdsmith.yml`.](../docs/reference/kind-files.md)
139+
- [Every markdownlint rule and the mdsmith rule that covers it, generated from the rule README front matter — the same data `mdsmith init --from-markdownlint` reads.](../docs/reference/markdownlint-mapping.md)
139140
- [Named field-type shortcuts for inline schema frontmatter values — the registered names, the canonical CUE each one resolves to, and example usage.](../docs/reference/schema-types.md)
140141
- [Section-schema reference for inline `kinds.<name>.schema:` blocks. Covers the `heading:` discriminator, the `regex:` matcher (a Go RE2 body with `\#(digits)` and `\#(fmvar(...))` helpers), the `repeat: {min, max}` cardinality field, and the matching algorithm. `proto.md` files are parsed into the same shape by the schema package, but MDS020's file-schema check still uses its legacy parser; see the proto.md section below for what is and is not migrated.](../docs/reference/section-schema.md)
141142
- [mdsmith collects no telemetry, no usage analytics, no error reports, and no identifiers. The CLI and the LSP server make no outbound network calls at runtime.](../docs/reference/telemetry.md)

AGENTS.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ row: "- [{summary}]({filename})"
116116
- [User guides for mdsmith directives, structure enforcement, and migration.](docs/guides/index.md)
117117
- [Every channel that ships the mdsmith binary, the VS Code extension, or the Claude Code plugin — npm, PyPI, Homebrew, asdf, mise, a Flatpak bundle, the GitHub release, the Visual Studio Marketplace plus Open VSX, and the in-repository Claude Code marketplace — and which channel to pick for which workflow.](docs/guides/install.md)
118118
- [Trade-offs and threshold guidance for readability, structure, length, and token budgets.](docs/guides/metrics-tradeoffs.md)
119-
- [Move a project from markdownlint-cli or markdownlint-cli2 to mdsmith — the rule mapping, the config rewrite, and the markdownlint-to-mdsmith rule correspondence.](docs/guides/migrate-from-markdownlint.md)
119+
- [Convert a markdownlint config to `.mdsmith.yml` with `mdsmith init --from-markdownlint`, review the conversion notes, move inline disables into overrides, and run both linters in parallel until cutover.](docs/guides/migrate-from-markdownlint.md)
120120
- [Use `<?catalog?>` with a per-file `summary` front matter field to emit a one-line index of a directory, so AI coding agents read a few thousand tokens of metadata up front and only `Read` the files a task actually touches.](docs/guides/progressive-disclosure.md)
121121
- [Declare a document-structure schema inline on a kind or in a proto.md file, validate headings and front matter, and tighten rule config per section.](docs/guides/schemas.md)
122122
- [CLI commands, flags, exit codes, and output format.](docs/reference/cli.md)
@@ -127,7 +127,7 @@ row: "- [{summary}]({filename})"
127127
- [Emit a schema-conformant Markdown file as a JSON/YAML/msgpack data tree.](docs/reference/cli/extract.md)
128128
- [Auto-fix lint issues in Markdown files in place.](docs/reference/cli/fix.md)
129129
- [Show built-in documentation for rules, metrics, and concept pages.](docs/reference/cli/help.md)
130-
- [Generate a default `.mdsmith.yml` config in the current directory.](docs/reference/cli/init.md)
130+
- [Generate a default `.mdsmith.yml` config in the current directory, or convert an existing markdownlint config with `--from-markdownlint`.](docs/reference/cli/init.md)
131131
- [Inspect declared file kinds and resolve effective rule config per file.](docs/reference/cli/kinds.md)
132132
- [Selection-style commands that walk the workspace and emit matches.](docs/reference/cli/list.md)
133133
- [Run a Language Server Protocol server on stdio for editor integrations.](docs/reference/cli/lsp.md)
@@ -142,6 +142,7 @@ row: "- [{summary}]({filename})"
142142
- [Glob pattern syntax across mdsmith config, directives, and CLI argument expansion, with the supported exclusion semantics for each surface.](docs/reference/globs.md)
143143
- [Look up exact CLI commands, config glob and schema syntax, the built-in conventions, and the section-schema grammar.](docs/reference/index.md)
144144
- [Each file under `.mdsmith/kinds/` declares one kind. The basename is the kind name; the file body carries the full `KindBody` — schema, rules, `path-pattern:`, `extends:`. Sits alongside inline `kinds.<name>:` in `.mdsmith.yml`.](docs/reference/kind-files.md)
145+
- [Every markdownlint rule and the mdsmith rule that covers it, generated from the rule README front matter — the same data `mdsmith init --from-markdownlint` reads.](docs/reference/markdownlint-mapping.md)
145146
- [Named field-type shortcuts for inline schema frontmatter values — the registered names, the canonical CUE each one resolves to, and example usage.](docs/reference/schema-types.md)
146147
- [Section-schema reference for inline `kinds.<name>.schema:` blocks. Covers the `heading:` discriminator, the `regex:` matcher (a Go RE2 body with `\#(digits)` and `\#(fmvar(...))` helpers), the `repeat: {min, max}` cardinality field, and the matching algorithm. `proto.md` files are parsed into the same shape by the schema package, but MDS020's file-schema check still uses its legacy parser; see the proto.md section below for what is and is not migrated.](docs/reference/section-schema.md)
147148
- [mdsmith collects no telemetry, no usage analytics, no error reports, and no identifiers. The CLI and the LSP server make no outbound network calls at runtime.](docs/reference/telemetry.md)

CLAUDE.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ row: "- [{summary}]({filename})"
102102
- [User guides for mdsmith directives, structure enforcement, and migration.](docs/guides/index.md)
103103
- [Every channel that ships the mdsmith binary, the VS Code extension, or the Claude Code plugin — npm, PyPI, Homebrew, asdf, mise, a Flatpak bundle, the GitHub release, the Visual Studio Marketplace plus Open VSX, and the in-repository Claude Code marketplace — and which channel to pick for which workflow.](docs/guides/install.md)
104104
- [Trade-offs and threshold guidance for readability, structure, length, and token budgets.](docs/guides/metrics-tradeoffs.md)
105-
- [Move a project from markdownlint-cli or markdownlint-cli2 to mdsmith — the rule mapping, the config rewrite, and the markdownlint-to-mdsmith rule correspondence.](docs/guides/migrate-from-markdownlint.md)
105+
- [Convert a markdownlint config to `.mdsmith.yml` with `mdsmith init --from-markdownlint`, review the conversion notes, move inline disables into overrides, and run both linters in parallel until cutover.](docs/guides/migrate-from-markdownlint.md)
106106
- [Use `<?catalog?>` with a per-file `summary` front matter field to emit a one-line index of a directory, so AI coding agents read a few thousand tokens of metadata up front and only `Read` the files a task actually touches.](docs/guides/progressive-disclosure.md)
107107
- [Declare a document-structure schema inline on a kind or in a proto.md file, validate headings and front matter, and tighten rule config per section.](docs/guides/schemas.md)
108108
- [CLI commands, flags, exit codes, and output format.](docs/reference/cli.md)
@@ -113,7 +113,7 @@ row: "- [{summary}]({filename})"
113113
- [Emit a schema-conformant Markdown file as a JSON/YAML/msgpack data tree.](docs/reference/cli/extract.md)
114114
- [Auto-fix lint issues in Markdown files in place.](docs/reference/cli/fix.md)
115115
- [Show built-in documentation for rules, metrics, and concept pages.](docs/reference/cli/help.md)
116-
- [Generate a default `.mdsmith.yml` config in the current directory.](docs/reference/cli/init.md)
116+
- [Generate a default `.mdsmith.yml` config in the current directory, or convert an existing markdownlint config with `--from-markdownlint`.](docs/reference/cli/init.md)
117117
- [Inspect declared file kinds and resolve effective rule config per file.](docs/reference/cli/kinds.md)
118118
- [Selection-style commands that walk the workspace and emit matches.](docs/reference/cli/list.md)
119119
- [Run a Language Server Protocol server on stdio for editor integrations.](docs/reference/cli/lsp.md)
@@ -128,6 +128,7 @@ row: "- [{summary}]({filename})"
128128
- [Glob pattern syntax across mdsmith config, directives, and CLI argument expansion, with the supported exclusion semantics for each surface.](docs/reference/globs.md)
129129
- [Look up exact CLI commands, config glob and schema syntax, the built-in conventions, and the section-schema grammar.](docs/reference/index.md)
130130
- [Each file under `.mdsmith/kinds/` declares one kind. The basename is the kind name; the file body carries the full `KindBody` — schema, rules, `path-pattern:`, `extends:`. Sits alongside inline `kinds.<name>:` in `.mdsmith.yml`.](docs/reference/kind-files.md)
131+
- [Every markdownlint rule and the mdsmith rule that covers it, generated from the rule README front matter — the same data `mdsmith init --from-markdownlint` reads.](docs/reference/markdownlint-mapping.md)
131132
- [Named field-type shortcuts for inline schema frontmatter values — the registered names, the canonical CUE each one resolves to, and example usage.](docs/reference/schema-types.md)
132133
- [Section-schema reference for inline `kinds.<name>.schema:` blocks. Covers the `heading:` discriminator, the `regex:` matcher (a Go RE2 body with `\#(digits)` and `\#(fmvar(...))` helpers), the `repeat: {min, max}` cardinality field, and the matching algorithm. `proto.md` files are parsed into the same shape by the schema package, but MDS020's file-schema check still uses its legacy parser; see the proto.md section below for what is and is not migrated.](docs/reference/section-schema.md)
133134
- [mdsmith collects no telemetry, no usage analytics, no error reports, and no identifiers. The CLI and the LSP server make no outbound network calls at runtime.](docs/reference/telemetry.md)

README.md

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ Together they keep a whole docs tree consistent as it grows, so
5454
the same Markdown can drive your README, your docs site, and
5555
downstream pipelines.
5656

57+
Already on markdownlint? `mdsmith init --from-markdownlint`
58+
converts your config and notes whatever needs review.
59+
5760
One rule engine runs everywhere you work: in CI, in your editor
5861
through `mdsmith lsp`, and in your coding agent through a Claude
5962
Code plugin. The check that blocks a merge is the same one you see
@@ -256,25 +259,25 @@ header: |
256259
|---------|-------------|
257260
row: "| [`{command}`]({filename}) | {summary} |"
258261
?>
259-
| Command | Description |
260-
| ------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
261-
| [`check`](docs/reference/cli/check.md) | Lint Markdown files for style issues. |
262-
| [`deps`](docs/reference/cli/deps.md) | List a file's dependency-graph edges (includes, links, catalogs, builds). |
263-
| [`export`](docs/reference/cli/export.md) | Write a portable, directive-free copy of a Markdown file. |
264-
| [`extract`](docs/reference/cli/extract.md) | Emit a schema-conformant Markdown file as a JSON/YAML/msgpack data tree. |
265-
| [`fix`](docs/reference/cli/fix.md) | Auto-fix lint issues in Markdown files in place. |
266-
| [`help`](docs/reference/cli/help.md) | Show built-in documentation for rules, metrics, and concept pages. |
267-
| [`init`](docs/reference/cli/init.md) | Generate a default `.mdsmith.yml` config in the current directory. |
268-
| [`kinds`](docs/reference/cli/kinds.md) | Inspect declared file kinds and resolve effective rule config per file. |
269-
| [`list`](docs/reference/cli/list.md) | Selection-style commands that walk the workspace and emit matches. |
270-
| [`list backlinks`](docs/reference/cli/backlinks.md) | List workspace links that point at a file. |
271-
| [`list query`](docs/reference/cli/query.md) | Select Markdown files by a CUE expression on front matter. |
272-
| [`lsp`](docs/reference/cli/lsp.md) | Run a Language Server Protocol server on stdio for editor integrations. |
273-
| [`merge-driver`](docs/reference/cli/merge-driver.md) | Git merge driver that resolves conflicts inside generated sections. |
274-
| [`metrics`](docs/reference/cli/metrics.md) | List and rank shared Markdown metrics (file length, token estimate, readability, …). |
275-
| [`pre-merge-commit`](docs/reference/cli/pre-merge-commit.md) | Install / manage a pre-merge-commit hook that runs `mdsmith fix` after a merge. |
276-
| [`rename`](docs/reference/cli/rename.md) | Rename a heading or link-reference label and rewrite every dependent edit. |
277-
| [`version`](docs/reference/cli/version.md) | Print the mdsmith build version and exit. |
262+
| Command | Description |
263+
| ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
264+
| [`check`](docs/reference/cli/check.md) | Lint Markdown files for style issues. |
265+
| [`deps`](docs/reference/cli/deps.md) | List a file's dependency-graph edges (includes, links, catalogs, builds). |
266+
| [`export`](docs/reference/cli/export.md) | Write a portable, directive-free copy of a Markdown file. |
267+
| [`extract`](docs/reference/cli/extract.md) | Emit a schema-conformant Markdown file as a JSON/YAML/msgpack data tree. |
268+
| [`fix`](docs/reference/cli/fix.md) | Auto-fix lint issues in Markdown files in place. |
269+
| [`help`](docs/reference/cli/help.md) | Show built-in documentation for rules, metrics, and concept pages. |
270+
| [`init`](docs/reference/cli/init.md) | Generate a default `.mdsmith.yml` config in the current directory, or convert an existing markdownlint config with `--from-markdownlint`. |
271+
| [`kinds`](docs/reference/cli/kinds.md) | Inspect declared file kinds and resolve effective rule config per file. |
272+
| [`list`](docs/reference/cli/list.md) | Selection-style commands that walk the workspace and emit matches. |
273+
| [`list backlinks`](docs/reference/cli/backlinks.md) | List workspace links that point at a file. |
274+
| [`list query`](docs/reference/cli/query.md) | Select Markdown files by a CUE expression on front matter. |
275+
| [`lsp`](docs/reference/cli/lsp.md) | Run a Language Server Protocol server on stdio for editor integrations. |
276+
| [`merge-driver`](docs/reference/cli/merge-driver.md) | Git merge driver that resolves conflicts inside generated sections. |
277+
| [`metrics`](docs/reference/cli/metrics.md) | List and rank shared Markdown metrics (file length, token estimate, readability, …). |
278+
| [`pre-merge-commit`](docs/reference/cli/pre-merge-commit.md) | Install / manage a pre-merge-commit hook that runs `mdsmith fix` after a merge. |
279+
| [`rename`](docs/reference/cli/rename.md) | Rename a heading or link-reference label and rewrite every dependent edit. |
280+
| [`version`](docs/reference/cli/version.md) | Print the mdsmith build version and exit. |
278281
<?/catalog?>
279282

280283
That command table and the feature list above are generated by mdsmith's own directives.

0 commit comments

Comments
 (0)