Commit ef39514
feat(v0.8.0): hybrid classifier (heuristic + API), drop cli backend
BREAKING: --backend=cli is deprecated. Default is now --backend=hybrid.
Background: Anthropic changed `claude -p` to bill against a separate
token budget instead of riding the Pro/Max subscription, so v0.7.x's
`cli` backend silently charged users who had explicitly opted into a
"free fallback". This release replaces it with a heuristic-first hybrid
that runs zero-network pattern matching on common phrasing cues, and
falls back to the Anthropic API only when the heuristic is uncertain.
New backends:
- hybrid (default): heuristic → API fallback if ANTHROPIC_API_KEY set
- heuristic: pattern-only, no LLM, zero cost / offline
- api: always call the Anthropic API (best quality, paid)
The cli backend value remains accepted as a legacy alias; it routes to
hybrid and prints a one-line stderr deprecation warning. Will be
removed in v0.9.0.
Plugin hooks.json and install-hooks settings.json template both drop
the explicit --backend=cli flag; the binary's `hybrid` default wins.
Pattern coverage (EN+RU): Decision, Rejection, Evidence, Finding,
Constraint, Hypothesis, Correction. Heuristic catches the obvious
cases — file:line references, "we decided to", "won't work",
"test passed", "rate limit", etc.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 34715cc commit ef39514
12 files changed
Lines changed: 518 additions & 21 deletions
File tree
- crates
- tj-cli
- src
- tj-core/src/classifier
- tj-mcp
- plugin
- .claude-plugin
- hooks
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
10 | 61 | | |
11 | 62 | | |
12 | 63 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
813 | 813 | | |
814 | 814 | | |
815 | 815 | | |
816 | | - | |
817 | | - | |
818 | | - | |
819 | | - | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
820 | 825 | | |
821 | 826 | | |
822 | 827 | | |
| |||
835 | 840 | | |
836 | 841 | | |
837 | 842 | | |
838 | | - | |
839 | | - | |
| 843 | + | |
| 844 | + | |
840 | 845 | | |
841 | 846 | | |
842 | 847 | | |
| |||
1363 | 1368 | | |
1364 | 1369 | | |
1365 | 1370 | | |
1366 | | - | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
1367 | 1376 | | |
1368 | 1377 | | |
1369 | 1378 | | |
| |||
1789 | 1798 | | |
1790 | 1799 | | |
1791 | 1800 | | |
1792 | | - | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
1793 | 1821 | | |
1794 | 1822 | | |
1795 | 1823 | | |
1796 | | - | |
1797 | | - | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
| 1830 | + | |
| 1831 | + | |
| 1832 | + | |
| 1833 | + | |
| 1834 | + | |
| 1835 | + | |
| 1836 | + | |
| 1837 | + | |
| 1838 | + | |
| 1839 | + | |
| 1840 | + | |
| 1841 | + | |
| 1842 | + | |
1798 | 1843 | | |
| 1844 | + | |
| 1845 | + | |
| 1846 | + | |
1799 | 1847 | | |
1800 | 1848 | | |
1801 | 1849 | | |
| |||
0 commit comments