Skip to content

Document inline vs file-based kinds selection criteria - #412

Merged
jeduden merged 5 commits into
mainfrom
claude/clever-fermi-Yzex0
May 28, 2026
Merged

Document inline vs file-based kinds selection criteria#412
jeduden merged 5 commits into
mainfrom
claude/clever-fermi-Yzex0

Conversation

@jeduden

@jeduden jeduden commented May 27, 2026

Copy link
Copy Markdown
Owner

Completes plan 208 by adding comprehensive guidance on when to declare kinds inline in .mdsmith.yml versus as standalone files under .mdsmith/kinds/.

Summary

This PR adds a new guide document that helps users and maintainers decide between the two equivalent forms for declaring kinds. Both forms produce identical behavior; the choice is purely a maintenance and review ergonomics decision.

Changes

  • New guide: docs/guides/inline-vs-file-kinds.md (168 lines)

    • Side-by-side examples showing the same kind in both forms
    • Selection criteria for keeping kinds inline (small, under iteration, co-located with related config)
    • Selection criteria for lifting kinds to files (large config blocks, per-kind edit isolation, large bodies, cross-repo reuse)
    • Comparison table covering edit history, file count, naming rules, and copy/conflict semantics
    • Guidance on mixing both forms in a single project
    • Cross-references to related documentation
  • Plan status: Marked plan 208 as complete (✅)

  • Index updates: Added the new guide to docs/guides/index.md and updated agent instruction files to reference it

Implementation notes

The guide follows the established pattern of decision-tree documentation (similar to the flavor/rule/convention/kind conceptual guide). It emphasizes that the two forms are behaviorally equivalent and frames the choice as a code review and maintenance concern rather than a technical one. The concrete line-count thresholds (50 lines for inline, 150 lines for file-based, 6 kinds as a breakpoint) are drawn from real experience with the project's own .mdsmith.yml configuration.

https://claude.ai/code/session_01UhQDukgFDZXzgaaBFVSf1e

@codecov

codecov Bot commented May 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.19%. Comparing base (33f817e) to head (a1fbf73).
⚠️ Report is 19 commits behind head on main.

Additional details and impacted files
Components Coverage Δ
Go 97.16% <ø> (ø)
TypeScript 99.54% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

claude added 3 commits May 27, 2026 21:03
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.
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.
- 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'.
@jeduden
jeduden merged commit bb95582 into main May 28, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants