Skip to content

fix(triage): stop AI from dumping every task into q2 - #80

Merged
TrainTravel merged 1 commit into
mainfrom
fix/eisenhower-better-distribution
Jun 11, 2026
Merged

fix(triage): stop AI from dumping every task into q2#80
TrainTravel merged 1 commit into
mainfrom
fix/eisenhower-better-distribution

Conversation

@TrainTravel

Copy link
Copy Markdown
Owner

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 eisenhowerSystemPrompt in supabase/functions/todo-triage/index.ts. No client changes, no schema changes.

Three reinforcements:

  1. CRITICAL ANTI-DEFAULT RULE: explicit "do NOT default to q2 when no explicit deadline is given."
  2. Time-marker rules: maps common temporal phrases (今天 / 明天 / 一個月 / today / tomorrow / next month, etc.) to quadrant implications.
  3. Task-type heuristics: when no marker exists, classify by task semantics — groceries → q1/q3, decluttering → q4, career growth → q2, helping a friend → q3/q4, etc.
  4. Distribution self-check: soft sanity rail — "if more than 60% of a batch ≥ 4 lands in q2, re-examine."

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:

  • 我要去買菜 → q1 or q3
  • 我要整理家裡 → q4
  • 我要訂一個月後的機票 → q2 (correctly — the "one month later" marker matches)
  • 我要幫朋友看履歷 → q3 (helping a friend) or q4 (open-ended)

Test plan

  • tsc --noEmit clean (edge fn typechecks within the existing build)
  • Redeploy todo-triage after merge
  • Re-run the original 4-item Mandarin brain dump; verify ≥ 3 different quadrants populated
  • Sanity-check English equivalent: "buy milk, organize closet, book flight in November, reply to Sarah"
  • If the distribution check fires too aggressively (i.e. legitimate all-q2 batches get reclassified), tune the threshold

🤖 Generated with Claude Code

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>
@TrainTravel
TrainTravel merged commit 3f846e2 into main Jun 11, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant