feat(#285): TDD enforcement — Iron Law, reviewers, Monitor gate, tdd.enforce config#337
Conversation
…enforce config
Adds Superpowers-style mandatory TDD enforcement when tdd.enforce: true in
.map/config.yaml:
- MapConfig.tdd_enforce field with tdd.enforce YAML alias (dead-toggle guard)
- map-tdd SKILL.md: Iron Law ("NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST"),
RED-GREEN-REFACTOR mandatory cycle, 14-item Red Flags list, 11-item
Rationalization Table with counters, tdd.enforce config check in Step 0
- map-tdd SKILL.md: Spec Compliance Reviewer (adversarial, SPEC-COMPLIANT verdict)
and Code Quality Reviewer (sequential gate: spec passes before code review starts)
- monitor.md: TDD Violation Detection section with tdd_violation verdict, criteria
for detecting code-before-test, rationalization detection patterns, JSON output schema
- Tests: VC7 (6 tests for tdd_enforce field/alias), VC8 (11 tests for template content)
- map-tdd body budget bumped to 545 (irreducible enforcement control flow)
- All changes go through templates_src → make render-templates pipeline
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HZ3wHDow49xBGUwWFPH2mD
|
Warning Review limit reached
Next review available in: 46 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Closes #285.
Adds Superpowers-style mandatory TDD enforcement controlled by a
tdd.enforce: trueflag in.map/config.yaml.Changes
MapConfig— config flagtdd_enforce: bool = Falsefield with dotted YAML aliastdd.enforcewired intoload_map_configFalseso existing workflows are unaffectedmap-tddSKILL.md — enforcement upgradeNO PRODUCTION CODE WITHOUT A FAILING TEST FIRST— deletion, not refactoring, for code written before a failing testtdd.enforcefrom.map/config.yamland activates Iron Law enforcementSPEC-COMPLIANT: YES/NOverdictmonitor.md— TDD violation detection gatetdd.enforce: truetdd_checkblock andtdd_violationverdicttdd_violationsetsvalid: false; directs deletion + restart, not "just add tests"Tests (17 new tests)
TestVc7TddEnforce(6 tests): defaultFalse, YAML alias loadstrue/false, alias dead-toggle guard, field existenceTestVc8TddTemplateContent(11 tests): Iron Law text, RED-GREEN-REFACTOR, rationalization table, Red Flags, spec/code reviewers, sequential gate,tdd.enforcereference, Monitor violation section,tdd_violationverdict, rationalization detectionmap-tddbody budget bumped to 545 inHIGH_TRAFFIC_SKILL_BODY_BUDGETS(irreducible enforcement control flow)All changes go through the
templates_src→make render-templatessingle-source pipeline.make checkpasses: 3444 passed, 4 skipped, 0 failures.Generated by Claude Code