claude-code - 💡(How to fix) Fix Feature request: TDD, Convention over Configuration, and MVC as default operating modes [1 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#56444Fetched 2026-05-06 06:27:52
View on GitHub
Comments
1
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×2commented ×1cross-referenced ×1

Root Cause

When I explicitly told Claude to follow TDD, CoD, and MVC, the quality of output went through the roof. The difference was night and day:

Before (default Claude behavior):

  • Builds features first, tests as an afterthought (if at all)
  • Makes arbitrary structural decisions per-feature
  • Mixes concerns freely

After (TDD + CoD + MVC enforced):

  • Test defines what "done" means BEFORE code is written
  • Conventions eliminate decision fatigue — same pattern every time
  • Model (URL/data), View (component), Controller (event handlers) stay cleanly separated
  • Bugs caught at write time, not deploy time
  • Features ship faster because the test proves they work

Fix Action

Fix / Workaround

Current Workaround

RAW_BUFFERClick to expand / collapse

The Ask

Claude Code should default to TDD (Test-Driven Development), Convention over Configuration, and MVC patterns when building software. Not as suggestions — as the default operating mode.

Why This Matters

When I explicitly told Claude to follow TDD, CoD, and MVC, the quality of output went through the roof. The difference was night and day:

Before (default Claude behavior):

  • Builds features first, tests as an afterthought (if at all)
  • Makes arbitrary structural decisions per-feature
  • Mixes concerns freely

After (TDD + CoD + MVC enforced):

  • Test defines what "done" means BEFORE code is written
  • Conventions eliminate decision fatigue — same pattern every time
  • Model (URL/data), View (component), Controller (event handlers) stay cleanly separated
  • Bugs caught at write time, not deploy time
  • Features ship faster because the test proves they work

What This Would Look Like

  1. TDD by default: When asked to build a feature, Claude writes the test first, shows it failing (red), then writes the code to make it pass (green), then refactors. Not "I'll add tests after" — tests first.

  2. Convention over Configuration: When there's an established pattern in the codebase (file naming, component structure, API shape), Claude follows it without asking. New files match existing conventions. No reinventing per-feature.

  3. MVC awareness: Claude separates data (model), presentation (view), and behavior (controller) naturally. URL params as model, components as views, event handlers as controllers. Not mixing data fetching into presentation or UI logic into data layers.

The Evidence

In a single session with these principles enforced:

  • 32 issues closed
  • 15 features shipped
  • 454 i18n keys in sync across 2 languages
  • 500+ E2E tests passing
  • Zero regressions

The quality improvement is not marginal — it is transformative. These should be defaults, not opt-in behaviors.

Current Workaround

Users must explicitly instruct Claude to follow TDD in their CLAUDE.md or conversation. Most users do not know to do this, which means most Claude Code output ships without tests, without conventions, and with mixed concerns.

extent analysis

TL;DR

Update Claude Code to default to Test-Driven Development (TDD), Convention over Configuration, and Model-View-Controller (MVC) patterns to improve output quality.

Guidance

  • Identify the current default behavior of Claude Code and compare it with the desired TDD, Convention over Configuration, and MVC patterns.
  • Update the Claude Code configuration to prioritize writing tests before code, following established conventions, and separating concerns into model, view, and controller components.
  • Verify the effectiveness of these changes by tracking metrics such as issues closed, features shipped, and tests passing, as well as monitoring for regressions.
  • Consider implementing a feedback mechanism to ensure users are aware of the importance of these principles and can provide input on their effectiveness.

Example

No code snippet is provided as the issue focuses on high-level design principles rather than specific code implementation.

Notes

The proposed solution relies on the assumption that updating Claude Code to default to TDD, Convention over Configuration, and MVC patterns will have a transformative impact on output quality, as evidenced by the provided data.

Recommendation

Apply workaround: Update Claude Code to default to TDD, Convention over Configuration, and MVC patterns, as the data suggests a significant improvement in output quality when these principles are enforced.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING