Skip to content

Commit bb95582

Browse files
jedudenclaude
andauthored
Document inline vs file-based kinds selection criteria (#412)
* Mark plan 208 as complete; PR #391 merged 2026-05-24 * Add guide: choose between inline and file-based kinds * Fold kind-form decision into file-kinds.md; drop standalone guide Addresses /code-review findings on PR #412: - Wrong Diatáxis type (was how-to, content is background/decision-aid). Folded the unique 'when to keep inline / when to lift' selection criteria into docs/guides/file-kinds.md as a new H2 above the existing 'Split a kind into its own file' section, where it sits next to the mechanics it points at. - Removed the standalone guide and its catalog rows. - Cut sections that duplicated file-kinds.md or kind-files.md: the YAML side-by-side examples (closed: false would have errored on a frontmatter-only schema), the 'what stays inline regardless' block, the comparison table, and the 'mixing both forms' example (which mislabeled this repo's inline kinds as file-based). - Dropped the stale .mdsmith.yml line-count snapshot. - Removed the 'maintenance decision, not a behavioral one' seesaw. - New section uses zero em-dashes. * Replace 'alt-tabbing' with 'switching' in file-kinds.md Global-English pass: alt-tab is a Windows/Linux phrasal-verb idiom; the plain verb 'switching' is keyboard-agnostic and reads on a first pass for non-native readers. * Address /code-review findings 1-5 on file-kinds.md - F1: replace bare KindBody with 'body keys' (host page never defines the typed term; reference page expects this guide to define it). - F2: section-end pointer now goes directly to the kind-files reference instead of the next H2 (which itself relayed there). - F3: 'A PR touching X names itself' was an idiomatic personification; rewrite as 'carries the kind name in its path'. - F4: trim the 'Split a kind' H2 opener that re-stated the same trigger the new decision-aid section above already delivered; H2 now opens with the action. - F5: 'outweighs the history isolation' used an undefined noun phrase; expand to 'outweighs the gain of isolating each kind's edit history'. --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 3f3e6f0 commit bb95582

3 files changed

Lines changed: 53 additions & 6 deletions

File tree

PLAN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ footer: |
133133
| 205 | 🔲 | | [Move extension.ts concerns to wiring.ts](plan/205_arch-fix-extension-ts-srp.md) |
134134
| 206 | 🔲 | | [Document cue/ in architecture layering map](plan/206_arch-fix-cue-types-docs.md) |
135135
| 207 || sonnet | [LSP fix preview via ChangeAnnotation](plan/207_lsp-fix-preview.md) |
136-
| 208 | 🔳 | opus | [Kind-per-file config under `.mdsmith/kinds/`](plan/208_kind-files.md) |
136+
| 208 | | opus | [Kind-per-file config under `.mdsmith/kinds/`](plan/208_kind-files.md) |
137137
| 209 | 🔲 | opus | [Convention-per-file config under `.mdsmith/conventions/`](plan/209_convention-files.md) |
138138
| 210 || opus | [Single source of truth for product messaging via `mdsmith extract`](plan/210_messaging-source-of-truth.md) |
139139
| 211 | 🔲 | opus | [`<?include?>` projects any typed value of any kind via `extract`](plan/211_include-extract-value.md) |

docs/guides/file-kinds.md

Lines changed: 51 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,12 +230,59 @@ effective kinds:
230230
- plan (from kind-assignment[2]: glob plan/*.md AND fields-present id)
231231
```
232232

233+
## Choose inline or file-based
234+
235+
Both forms accept the same body keys and
236+
produce identical diagnostics. Pick per kind
237+
based on edit history, body size, and how
238+
reviewers read the diff.
239+
240+
### When to keep a kind inline
241+
242+
Inline is the default. Keep a kind inline when:
243+
244+
- The body fits on a screen and the project's
245+
`kinds:` block is under about 50 lines.
246+
Scanning every kind at once is faster in one
247+
file.
248+
- The kind is new and still under iteration.
249+
Editing in place is faster than switching
250+
between two files.
251+
- The kind sits next to a related override or
252+
`kind-assignment:` entry, and the proximity
253+
helps a reader follow the wiring.
254+
- The project has fewer than six kinds. The
255+
review cost of one extra file per kind
256+
outweighs the gain of isolating each kind's
257+
edit history.
258+
259+
### When to lift a kind into its own file
260+
261+
Move the kind to `.mdsmith/kinds/<name>.yaml`
262+
when:
263+
264+
- The `kinds:` block has grown past about 150
265+
lines or six kinds, and per-kind edits dirty
266+
unrelated config history.
267+
- A reviewer should see which kind changed from
268+
the file list alone. A PR touching
269+
`.mdsmith/kinds/<name>.yaml` carries the kind
270+
name in its path. A PR touching `.mdsmith.yml`
271+
forces the reviewer to open the diff to find
272+
which kind moved.
273+
- The kind body is large. A long frontmatter
274+
schema and many rule overrides bloat the
275+
inline view of every other kind.
276+
- The kind is reused across repos. Copying a
277+
standalone file is cleaner than excising a
278+
named block from a shared `.mdsmith.yml`.
279+
280+
See [Kind files reference](../reference/kind-files.md)
281+
for layout details and the basename rule.
282+
233283
## Split a kind into its own file
234284

235-
When a project's `kinds:` block has grown large
236-
enough that one kind's edits dirty the same
237-
`.mdsmith.yml` as every other config change, lift
238-
the kind into a standalone file under
285+
Lift the kind into a standalone file under
239286
`.mdsmith/kinds/<name>.yaml`. The basename is the
240287
kind's name; the body is identical to the inline
241288
`kinds.<name>:` body.

plan/208_kind-files.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
id: 208
33
title: Kind-per-file config under `.mdsmith/kinds/`
4-
status: "🔳"
4+
status: ""
55
model: opus
66
depends-on: [146, 135]
77
summary: >-

0 commit comments

Comments
 (0)