| id | 96 |
|---|---|
| title | Adopt kinds in mdsmith repo and ship the docs |
| status | ✅ |
| model | sonnet |
| summary | Declare the kinds this repo needs, drop the four `proto.md` ignore entries, ship the file-kinds user guide. |
Prove the kinds and placeholder-grammar machinery
work end-to-end on this repo. Drop the four proto.md
entries from .mdsmith.yml ignore: and confirm
mdsmith check . stays green. Ship the user-facing
file-kinds guide so the new shape is discoverable.
.mdsmith.yml currently has these four ignore
entries, all schema/template files:
Plus the cross-file-reference-integrity exclude on
the placeholder link in internal/rules/proto.md
(line 47 of .mdsmith.yml).
Once kinds + placeholder grammar are in place, all
four files can be linted under their own kinds with
appropriate placeholders: settings.
Block-replace merge (plan 92) makes adoption verbose:
each kind that wants to add a placeholders: token
to a rule has to restate every other setting on that
rule. With deep-merge (plan 97) a kind can amend one
setting and leave the rest alone. Adopting after 97
ships shrinks this repo's kinds: block substantially
and removes the footgun of accidentally erasing a
sibling setting. Plan 97 is not a hard prerequisite,
but recommended order is 92 → 93 → 97 → 96.
Project-chosen names; a representative starter set:
kinds:
proto:
rules:
first-line-heading:
placeholders: [var-token, heading-question,
placeholder-section]
cross-file-reference-integrity:
placeholders: [var-token]
paragraph-readability: false
paragraph-structure: false
no-emphasis-as-heading: false
front-matter: false
plan:
rules:
required-structure:
schema: plan/proto.md
rule-readme:
rules:
required-structure:
schema: internal/rules/proto.md
skill:
rules:
required-structure:
schema: .claude/skills/proto.md
security-note:
rules:
required-structure:
schema: docs/security/proto.mdGlob assignment binds files to kinds:
kind-assignment:
- files: ["**/proto.md"]
kinds: [proto]
- files: ["plan/[0-9]*_*.md"] # excludes proto
kinds: [plan]
- files: ["internal/rules/MDS*/README.md"]
kinds: [rule-readme]
- files: [".claude/skills/*/SKILL.md"]
kinds: [skill]
- files: ["docs/security/[0-9]*.md"] # date-named
kinds: [security-note]Two new pieces:
docs/guides/file-kinds.md— user guide for kinds: declaration, assignment, merge order, conflict resolution, and themdsmith kinds resolve <file>troubleshooting workflow (from plan 95).- The placeholder-grammar concept page (already
produced by plan 93 at
docs/background/concepts/placeholder-grammar.md) — this plan only links to it from each rule README that opted in.
Plan 98 removes the archetypes subcommand and the
archetypes/ doc directory. Once those are gone, no
Hugo-vs-mdsmith terminology note is needed in this
plan — the collision is gone.
- Add the kind declarations and
kind-assignment:entries shown above to.mdsmith.yml. - Drop the four
proto.mdentries fromignore:and the placeholder-link entry fromcross-file-reference-integrity.exclude:. - Confirm
mdsmith check .stays green; iterate on kind bodies if any rule still flags a placeholder that's part of a real schema/template file. - Write
docs/guides/file-kinds.mdcovering kind declaration, assignment (front matter + globs), merge order, and conflict resolution. Walk throughmdsmith kinds resolve <file>as the troubleshooting path. - Update each rule README that gained a
placeholders:setting to link to the placeholder-grammar concept page (already covered by plan 93).
The proto kind disables seven rules outright:
first-line-heading, heading-increment,
blank-line-around-headings, no-emphasis-as-heading,
cross-file-reference-integrity, paragraph-readability,
paragraph-structure.
Body tokens cannot mask the structural placement of
<?require?> directives and HTML comments before the
first heading. The one external link in
internal/rules/proto.md uses an unbraced NAME
placeholder. No token matches that form. Plan 98 will
replace the link as part of the archetype-to-kinds
rename.
Each proto.md file resolves to two kinds.
- The broad
**/proto.mdentry picks up the proto kind. - A directory-scoped entry picks up the project-specific
kind. The plan and docs/security entries use
*.mdglobs that naturally includeproto.md. The internal/rules and .claude/skills directory globs target a different filename (MDS*/README.md,*/SKILL.md), so those entries listproto.mdexplicitly alongside the convention glob.
The later schema kind sets required-structure.schema:
to proto.md itself. That marks the file as its own
schema. The " outside a schema file" warning
then stays silent. With deep-merge (plan 97) the schema
setting from the project kind composes with the proto
kind's other settings rather than replacing them.
!-prefix exclusion (added to the config matcher in
this plan) is used in the docs/security/*.md override
to keep its content tunings off proto.md. It is not
used in kind-assignment: for schema kinds — excluding
proto.md from the project kind would strip the
schema. See docs/reference/globs.md
for full glob semantics.
The redundant schema overrides on plan/*.md,
docs/security/*.md, and internal/rules/MDS*/README.md
were removed once the matching kinds covered them.
Schema attachment for a file class now lives in one
place.
-
mdsmith check .passes with the fourproto.mdentries removed from.mdsmith.ymlignore:and the placeholder-linkcross-file-reference-integrity.exclude:entry removed. - Each
proto.mdfile is linted under its project kind, with placeholder-aware rules passing on its placeholder-rich body. - Adding a new schema file requires no
ignore:change — assigning it to an existing kind viakind-assignment:is enough. -
docs/guides/file-kinds.mdexists, describes declaration / assignment / merge / conflict resolution, and referencesmdsmith kinds resolveas the troubleshooting path. - Each rule that gained a
placeholders:setting in plan 93 has a README link to the placeholder-grammar concept page. - All tests pass:
go test ./... -
go tool golangci-lint runreports no issues