fix(triage): stop AI from dumping every task into q2 - #80
Merged
Conversation
Real-world report: a 4-item Mandarin brain dump came back with all four
items classified as q2 ("important, not urgent"), even though one of
them (我要去買菜 — buy groceries) is clearly same-week and another
(我要整理家裡 — organize the apartment) is canonically q4. The matrix
becomes useless as a sorting tool when everything lands in the safest
bucket.
Root cause: the system prompt only defined the four quadrants; it
didn't tell the model how to handle naked intents that lack a temporal
marker. LLMs default to q2 in that case because it's the
least-likely-to-be-wrong label. That's a known failure mode for
Eisenhower-style classifications.
Three reinforcements in the prompt:
1. CRITICAL ANTI-DEFAULT RULE: explicit "do NOT default to q2."
2. Time-marker rules: maps common temporal phrases (今天/明天/一個月)
to their quadrant implications, with Chinese, English, and French
variants so the model spots them across the supported languages.
3. Task-type heuristics: gives the model concrete categories
(groceries → q1/q3, decluttering → q4, career growth → q2, etc.)
with example phrases so it can classify without a deadline marker.
4. Distribution self-check: "if >60% of a batch ≥ 4 lands in q2,
re-examine." A soft sanity rail.
Edge fn still ships JSON in the same shape; only the system prompt
changes. No client changes needed. After this merges, redeploy the
function via Lovable (same way the previous deploy was triggered) so
the live function picks up the new prompt.
Co-Authored-By: Claude Opus 4.7 <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.
Summary
The user reported a 4-item Mandarin brain dump where all four came back as q2 ("Important, Not Urgent"), including 我要去買菜 (buy groceries — clearly same-week) and 我要整理家裡 (organize the apartment — canonically q4). The Priority Quadrants board is useless as a sorting tool when everything lands in the safest bucket.
What changed
Only
eisenhowerSystemPromptinsupabase/functions/todo-triage/index.ts. No client changes, no schema changes.Three reinforcements:
After merge
Redeploy the edge function via Lovable (same trigger as the previous deploy). Then the user's same 4-item brain dump should distribute across multiple quadrants:
Test plan
tsc --noEmitclean (edge fn typechecks within the existing build)🤖 Generated with Claude Code