feat: set CATEGORY_WEIGHT from ablation data (#169)#171
Conversation
…pe (#169) - CATEGORY_WEIGHT: responsive-critical 3.0, pixel-critical 2.5, code-quality/token-management 1.0, interaction 0.5, minor 0.3 - missing-prototype disabled (interactionDestinations data missing, #139) - non-standard-naming score -1 → -3 (breaks interaction detection pipeline) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe PR implements calibration changes based on ablation experiment data: it updates category weights in the scoring engine (exporting Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/core/rules/rule-config.ts`:
- Around line 134-140: Remove inline calibration rationale comments from the
auto-managed RULE_CONFIGS object: delete the comment after the enabled property
(the "// disabled: interactionDestinations data missing from fixtures (`#139`)")
and the comment after the score for "non-standard-naming" (and any similar
rationale comments in RULE_CONFIGS). Keep the configuration values unchanged,
and ensure no other inline calibration rationale comments remain in the
RULE_CONFIGS declaration (move any rationale to external docs if needed).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 2a253fa2-312d-4622-9830-44385c8f6839
📒 Files selected for processing (4)
docs/REFERENCE.mdsrc/core/engine/scoring.test.tssrc/core/engine/scoring.tssrc/core/rules/rule-config.ts
| enabled: false, // disabled: interactionDestinations data missing from fixtures (#139) | ||
| }, | ||
|
|
||
| // ── Minor ── | ||
| "non-standard-naming": { | ||
| severity: "suggestion", | ||
| score: -1, | ||
| score: -3, // higher than other naming rules: non-standard state names break interaction detection pipeline |
There was a problem hiding this comment.
Remove inline calibration rationale comments from auto-managed config.
Line 134 and Line 140 add inline rationale in RULE_CONFIGS. Keep this file comment-free for calibration rationale to avoid churn from nightly auto-adjustments.
Proposed cleanup
"missing-prototype": {
severity: "missing-info",
score: -3,
- enabled: false, // disabled: interactionDestinations data missing from fixtures (`#139`)
+ enabled: false,
},
@@
"non-standard-naming": {
severity: "suggestion",
- score: -3, // higher than other naming rules: non-standard state names break interaction detection pipeline
+ score: -3,
enabled: true,
},Based on learnings: In let-sunny/canicode, src/core/rules/rule-config.ts is auto-adjusted by a nightly calibration pipeline, and inline calibration rationale should not be added there.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/core/rules/rule-config.ts` around lines 134 - 140, Remove inline
calibration rationale comments from the auto-managed RULE_CONFIGS object: delete
the comment after the enabled property (the "// disabled:
interactionDestinations data missing from fixtures (`#139`)") and the comment
after the score for "non-standard-naming" (and any similar rationale comments in
RULE_CONFIGS). Keep the configuration values unchanged, and ensure no other
inline calibration rationale comments remain in the RULE_CONFIGS declaration
(move any rationale to external docs if needed).
Summary
responsive-critical 3.0, pixel-critical 2.5, code-quality/token-management 1.0, interaction 0.5, minor 0.3
interactionDestinationsdata missing from fixtures (Pre-dry-run: rebuild PROMPT.md + fixtures after design-tree changes #139 rebuild pending)Before/After (5 fixtures)
Scores drop slightly because responsive-critical (low scores, 5
18%) now weighs 3x more. This is directionally correct — responsive issues have the highest ablation impact (ΔV +15.9%). Interaction scores improved (+1427%) due to missing-prototype being disabled.Test plan
Closes #169
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Documentation