Skip to content

docs(claude-md): exempt markdown/config files from the 400-line cap#40

Merged
ethanj merged 1 commit intomainfrom
docs/claude-md-markdown-cap-exemption
Apr 23, 2026
Merged

docs(claude-md): exempt markdown/config files from the 400-line cap#40
ethanj merged 1 commit intomainfrom
docs/claude-md-markdown-cap-exemption

Conversation

@ethanj
Copy link
Copy Markdown
Contributor

@ethanj ethanj commented Apr 23, 2026

Summary

Scope the 400-line file cap in CLAUDE.md to code files only. Markdown
and other prose/config files (.md, .mdx, .yaml, .json, .toml)
are exempt — long planning documents, roadmaps, and reference catalogs
are allowed to grow as substance requires.

Why

The cap exists to prevent code files from becoming unmaintainable. It
was being applied to long-form documentation where length tracks the
substance being captured, not code complexity. Concrete trigger: the
benchmark-parity roadmap (ROADMAP-benchmarks.md in the research repo)
sits at ~580 lines after multiple review-pass revisions; it shouldn't
flag as a process violation, and neither should similarly thorough
planning or reference docs.

One-line change, 1 file:

  • CLAUDE.md line 36 — widens the rule's phrasing to name code-file
    extensions and explicitly exempt prose/config extensions.

Test plan

  • Policy-only change; no code or test impact.
  • Manually verified the updated wording reads cleanly in context.

🤖 Generated with Claude Code

The workspace 400-line file cap is targeted at code files (TS, Py,
JS, shell, SQL) where large single files reduce maintainability.
It was being applied to markdown planning documents, roadmaps, and
reference catalogs where length tracks the substance being captured,
not code complexity. Clarify the scope so long documentation files
like ROADMAP-benchmarks.md (≈580 lines after Codex review round 8)
are not flagged as process violations.
@ethanj ethanj merged commit dc185c4 into main Apr 23, 2026
1 check passed
@ethanj ethanj deleted the docs/claude-md-markdown-cap-exemption branch April 23, 2026 08:57
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.

1 participant