feat(ratchet): add --verbose flag to score subcommand#49
Conversation
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds an optional ChangesVerbose Score Output
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Summary
Adds a
--verboseflag toratchet.py scorethat prints a per-variablebreakdown of the composite metric.
scorealready printsf/p/q/rby default, so--verbosesurfaces whatisn't shown today: each variable's weight (the layer's exponent) and its
weighted contribution (
base ** exponent), plus the raw aggregate countsthat were previously only available via
--json.Closes #26
Changes
tools/flow-install/skills/_shared/ratchet.py(display-only, +35/-0):parse_args()— added--verboseto thescoresubparser (optional,action="store_true").command_score()— when--verboseis set (and not--json), print abreakdown:
variable | raw | weight | weighted contributionfor each activevariable (f/p/q/r, plus h/c at layer 2), followed by the raw aggregates.
No change to the metric,
compute_score, JSON output, or any othersubcommand. The breakdown reuses the in-file
DEFAULT_CONFIGexponents andmirrors
compute_score's(1 - x)inversion for r/h/c, so the printedcontributions multiply back to the reported score.
Acceptance criteria
score --skill issue-flow --verboseprints per-variable detailsTesting
This repo has no pytest gate for
ratchet.py, so I verified by runtime output(same approach as #45):