fix(chat): auto-escalation offer fires for complex asks (#12)#244
Merged
Conversation
"plan and build me a 5-page competitor report with charts" never offered
"Promote to Project?" — it just degenerated in chat. Cause: the escalation
prefilter dropped any message under 60 chars, and that prompt is 56. The
action-verb regex matched fine; the length floor killed it before the classifier
ran.
- Lowered the floor 60 -> 24 in _maybe_escalate_suggestion. Trivial single-verb
messages ("build") still skip; the action-verb regex + Qwen classifier remain
the real gate. The offer is emitted AFTER the reply regardless of how the reply
went, so even when a "plan and build" prompt degenerates in chat, the user now
gets the Project offer — and Project mode is what that work belongs in.
- Removed a stray ⚠️ emoji from the empty-reply notice (no-emoji rule).
3 new tests: the 56-char ask fires; trivial/verbless messages skip (classifier
must not even run); a classifier "no" is respected. 15 escalation tests pass,
ruff clean.
Live-test: in CODEC chat, type "plan and build me a 5-page competitor report with
charts" — a "Promote to Project mode?" chip now appears under the reply.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The 'Promote to Project?' offer never fired for 'plan and build me a 5-page competitor report with charts' — the prefilter dropped messages under 60 chars, and it's 56. Lowered the floor to 24 (the action-verb regex + Qwen classifier are the real gate). The offer is emitted after the reply, so even a degenerated 'plan and build' answer now shows the Project offer. 3 tests, ruff clean. Also removed a stray emoji.