Files
portal/tools
Дмитрий 726c2121b5 feat(classifier-match): lower threshold 0.8→0.6 + inline router-skip override
Two changes:
1. CONFIDENCE_THRESHOLD 0.8 → 0.6 — catches borderline recommendations
   that previously slipped through. Driver: brain-retro #10 shows 0%
   single-node-skill follow-through, suggesting hook needs to fire more.
2. Inline escape hatch — 'router-skip: <reason 50+ chars>' in assistant text.
   Per-tool scope (does not affect other tools in same turn). Replaces
   the documented 'override: <reason>' hint which was a self-bypass
   loophole — high-friction 50+ char justification discourages reflexive use.

Per Level 2 of plan docs/superpowers/plans/2026-05-28-router-discipline-level-1-2.md.

Legacy tests flipped (2 tests):
- 'allows when confidence exactly 0.7 (raised threshold)' →
  'BLOCKS when confidence exactly 0.7 (above new threshold 0.6)'
- 'allows when confidence 0.75 (still under raised threshold)' →
  'BLOCKS when confidence 0.75 (above new threshold 0.6)'
These tests previously asserted block:false at 0.7/0.75 under the old 0.8
threshold; with 0.6 threshold they now correctly assert block:true.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 17:52:43 +03:00
..